@microsoft/applicationinsights-dependencies-js 2.7.5-nightly.2203-01 → 2.8.0-beta.2203-01
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/applicationinsights-dependencies-js.integrity.json +9 -9
- package/browser/applicationinsights-dependencies-js.js +318 -173
- package/browser/applicationinsights-dependencies-js.js.map +1 -1
- package/browser/applicationinsights-dependencies-js.min.js +2 -2
- package/browser/applicationinsights-dependencies-js.min.js.map +1 -1
- package/dist/applicationinsights-dependencies-js.d.ts +1 -1
- package/dist/applicationinsights-dependencies-js.js +318 -173
- package/dist/applicationinsights-dependencies-js.js.map +1 -1
- package/dist/applicationinsights-dependencies-js.min.js +2 -2
- package/dist/applicationinsights-dependencies-js.min.js.map +1 -1
- package/dist/applicationinsights-dependencies-js.rollup.d.ts +1 -1
- package/dist-esm/TraceParent.js +1 -1
- package/dist-esm/ajax.js +1 -1
- package/dist-esm/ajaxRecord.js +1 -1
- package/dist-esm/ajaxUtils.js +1 -1
- package/dist-esm/applicationinsights-dependencies-js.js +1 -1
- package/package.json +4 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Application Insights JavaScript SDK - Dependencies Plugin, 2.
|
|
2
|
+
* Application Insights JavaScript SDK - Dependencies Plugin, 2.8.0-beta.2203-01
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
|
-
var e=this,t=function(e){"use strict";var i="function",s="object",a="undefined",P="prototype",p="hasOwnProperty",n=Object,y=n[P],t=n.assign,b=n.create,r=n.defineProperty,A=y[p],o=null;function Z(e){return void 0===e&&(e=!0),o&&e||(typeof globalThis!==a&&globalThis&&(o=globalThis),typeof self!==a&&self&&(o=self),typeof window!==a&&window&&(o=window),typeof global!==a&&global&&(o=global)),o}function S(e){throw new TypeError(e)}(Z()||{}).Symbol,(Z()||{}).Reflect;var Q=t||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])y[p].call(t,a)&&(e[a]=t[a]);return e},w=function(e,t){return(w=n.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t[p](n)&&(e[n]=t[n])})(e,t)};function M(e,t){function n(){this.constructor=e}typeof t!==i&&null!==t&&S("Class extends value "+t+" is not a constructor or null"),w(e,t),e[P]=null===t?function(e){if(b)return b(e);if(null==e)return{};var t=typeof e;function n(){}return t!==s&&t!==i&&S("Object prototype may only be an Object:"+e),n[P]=e,new n}(t):(n[P]=t[P],new n)}var q="constructor",g="prototype",R="function",F="_dynInstFuncs",D="_isDynProxy",h="_dynClass",L="_dynInstChk",E=L,j="_dfOpts",k="_unknown_",H="__proto__",ee="useBaseInst",te="setInstFuncs",ne=Object,re=ne.getPrototypeOf,ae=0;function m(e,t){return e&&ne[g].hasOwnProperty.call(e,t)}function oe(e){return e&&(e===ne[g]||e===Array[g])}function ie(e){return oe(e)||e===Function[g]}function x(e){if(e){if(re)return re(e);e=e[H]||e[g]||(e[q]?e[q][g]:null);if(e)return e}return null}function se(e,t){var n=[],r=ne.getOwnPropertyNames;if(r)n=r(e);else for(var a in e)"string"==typeof a&&m(e,a)&&n.push(a);if(n&&0<n.length)for(var o=0;o<n.length;o++)t(n[o])}function ue(e,t,n){return t!==q&&typeof e[t]===R&&(n||m(e,t))}function le(e){throw new TypeError("DynamicProto: "+e)}function ce(e,t){for(var n=e.length-1;0<=n;n--)if(e[n]===t)return 1}function de(e,t){return m(e,g)?e.name||t||k:((e||{})[q]||{}).name||t||k}function fe(e,r,t,n){m(e,g)||le("theClass is an invalid class definition.");var a,o,i,s,u,l,c=e[g],d=(function(e){if(re)for(var t=[],n=x(r);n&&!ie(n)&&!ce(t,n);){if(n===e)return 1;t.push(n),n=x(n)}}(c)||le("["+de(e)+"] is not in class hierarchy of ["+de(r)+"]"),null),e=(m(c,h)?d=c[h]:(d="_dynCls$"+de(e,"_")+"$"+ae,ae++,c[h]=d),fe[j]),f=!!e[ee],p=(f&&n&&n[ee]!==undefined&&(f=!!n[ee]),o={},se(a=r,function(e){!o[e]&&ue(a,e,!1)&&(o[e]=a[e])}),o),f=(t(r,function(e,t,n,o){function r(e,t,n){var r,a=t[n];return a[D]&&o&&!1!==(r=e[F]||{})[E]&&(a=(r[t[h]]||{})[n]||a),function(){return a.apply(e,arguments)}}for(var a={},i=(se(n,function(e){a[e]=r(t,n,e)}),x(e)),s=[];i&&!ie(i)&&!ce(s,i);)se(i,function(e){!a[e]&&ue(i,e,!re)&&(a[e]=r(t,i,e))}),s.push(i),i=x(i);return a}(c,r,p,f)),!!re&&!!e[te]);i=c,t=d,s=r,u=p,e=!1!==(f=f&&n?!!n[te]:f),oe(i)||(c=s[F]=s[F]||{},l=c[t]=c[t]||{},!1!==c[E]&&(c[E]=!!e),se(s,function(e){var n,r,a;ue(s,e,!1)&&s[e]!==u[e]&&(l[e]=s[e],delete s[e],m(i,e)&&(!i[e]||i[e][D])||(i[e]=(n=i,r=e,(a=function(){var e,t;return(function(e,t,n,r){var a=null;if(e&&m(n,h)){var o=e[F]||{};if((a=(o[n[h]]||{})[t])||le("Missing ["+t+"] "+R),!a[L]&&!1!==o[E]){for(var i=!m(e,t),s=x(e),u=[];i&&s&&!ie(s)&&!ce(u,s);){var l=s[t];if(l){i=l===r;break}u.push(s),s=x(s)}try{i&&(e[t]=a),a[L]=1}catch(c){o[E]=!1}}}return a}(this,r,n,a)||(typeof(t=(t=n[e=r])===a?x(n)[e]:t)!==R&&le("["+e+"] is not a "+R),t)).apply(this,arguments)})[D]=1,a)))}))}fe[j]={setInstFuncs:!0,useBaseInst:!0},(t=l=l||{})[t.CRITICAL=1]="CRITICAL",t[t.WARNING=2]="WARNING";var l,N={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},pe="attachEvent",ge="addEventListener",he="toISOString",me="trim",t="toString",xe=r,ve=n.keys,ye=String[P][me],Ce=Date[P][he],r=Array.isArray,Te=y[t],Ie=(A[t].call(n),/-([a-z])/g),be=/([^\w\d_$])/g,Ae=/^(\d+[\w\d_$])/,Se=Object.getPrototypeOf;function we(e){return e===undefined||typeof e===a}function _(e){return null===e||we(e)}function O(e){return!(!e||typeof e!==i)}function U(e,t){if(e)for(var n in e)A.call(e,n)&&t.call(e,n,e[n])}function Me(e,t){return!(!e||!t||!~e.indexOf(t))}var qe=r||function(e){return!(!e||"[object Array]"!==Te.call(e))};function V(e){return"string"==typeof e}function W(e,t,n){var r=e.length;try{for(var a=0;a<r&&!(a in e&&-1===t.call(n||e,e[a],a,e));a++);}catch(o){}}function Re(e){return e&&(ye&&e[me]?e[me]():e.replace?e.replace(/^\s+|\s+$/g,""):e)}var Fe=!{toString:null}.propertyIsEnumerable("toString"),De=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];function Le(e){var t=typeof e;if(t===i||t===s&&null!==e||S("objKeys called on non-object"),!Fe&&ve)return ve(e);var n,r=[];for(n in e)e&&A.call(e,n)&&r.push(n);if(Fe)for(var a=De.length,o=0;o<a;o++)e&&A.call(e,De[o])&&r.push(De[o]);return r}function Ee(){var e=Date;return e.now?e.now():(new e).getTime()}var je="window",ke="documentMode",He="performance",Pe="JSON",Ne="msie",_e="trident/",Oe=null,Ue=null;function c(e){var t=Z();return t&&t[e]?t[e]:e===je&&typeof window===s&&window?window:null}function Ve(){return typeof document===s&&document?document:c("document")}function We(){return typeof navigator===s&&navigator?navigator:c("navigator")}function Be(){return c(He)}function ze(){return typeof JSON===s&&JSON||null!==c(Pe)}function Ke(){return ze()?JSON||c(Pe):null}function B(e){var t=Object[P].toString.call(e),n="";return"[object Error]"===t?n="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":ze()&&(n=Ke().stringify(e)),t+n}var Xe=null;function Ge(e){return e?'"'+e.replace(/\"/g,"")+'"':""}function $e(e,t){var n,r=typeof console!==a?console:c("console");r&&(n="log",O(r[n=r[e]?e:n])&&r[n](t))}Ye.dataType="MessageData";var Je=Ye;function Ye(e,t,n,r){void 0===n&&(n=!1),this.messageId=e,this.message=(n?"AI: ":"AI (Internal): ")+e;n="",ze()&&(n=Ke().stringify(r)),e=(t?" message:"+Ge(t):"")+(r?" props:"+Ge(n):"");this.message+=e}var Ze=function Zt(a){this.identifier="DiagnosticLogger",this.queue=[];var s=0,u={};fe(Zt,this,function(o){function e(e,t){e=a[e];return _(e)?t:e}function i(e,t){var n,r=(n=(n=Xe)||!0===a.disableDbgExt?n:Xe||(r=c("Microsoft"),Xe=r?r.ApplicationInsights:Xe))?n.ChromeDbgExt:null;r&&r.diagLog&&r.diagLog(e,t)}_(a)&&(a={}),o.consoleLoggingLevel=function(){return e("loggingLevelConsole",0)},o.telemetryLoggingLevel=function(){return e("loggingLevelTelemetry",1)},o.maxInternalMessageLimit=function(){return e("maxMessageLimit",25)},o.enableDebugExceptions=function(){return e("enableDebugExceptions",!1)},o.throwInternal=function(e,t,n,r,a){t=new Je(t,n,a=void 0!==a&&a,r);if(o.enableDebugExceptions())throw t;n=e===l.CRITICAL?"errorToConsole":"warnToConsole";we(t.message)?i("throw"+(e===l.CRITICAL?"Critical":"Warning"),t):(r=o.consoleLoggingLevel(),a?(a=+t.messageId,!u[a]&&e<=r&&(o[n](t.message),u[a]=!0)):e<=r&&o[n](t.message),o.logInternalMessage(e,t))},o.warnToConsole=function(e){$e("warn",e),i("warning",e)},o.errorToConsole=function(e){$e("error",e),i("error",e)},o.resetInternalMessageCount=function(){s=0,u={}},o.logInternalMessage=function(e,t){var n,r;s>=o.maxInternalMessageLimit()||(r=!0,n="AITR_"+t.messageId,u[n]?r=!1:u[n]=!0,r&&(e<=o.telemetryLoggingLevel()&&(o.queue.push(t),s++,i(e===l.CRITICAL?"error":"warn",t)),s===o.maxInternalMessageLimit()&&(r=new Je(N.MessageLimitPerPVExceeded,n="Internal events throttle limit per PageView reached for this app.",!1),o.queue.push(r),e===l.CRITICAL?o.errorToConsole(n):o.warnToConsole(n))))}})},Qe=(u.ParentContextKey="parent",u.ChildrenContextKey="childEvts",u);function u(e,a,t){var r,o=this,i=!1;o.start=Ee(),o.name=e,o.isAsync=t,o.isChildEvt=function(){return!1},O(a)&&(i=function(e){if(xe)try{var t={enumerable:!0,configurable:!0,get:function(){return!r&&O(a)&&(r=a(),a=null),r}};return xe(e,"payload",t),!0}catch(n){}return!1}(o)),o.getCtx=function(e){return e?(e===u.ParentContextKey||e===u.ChildrenContextKey?o:o.ctx||{})[e]:null},o.setCtx=function(e,t){e&&(e===u.ParentContextKey?(o[e]||(o.isChildEvt=function(){return!0}),o[e]=t):e===u.ChildrenContextKey?o[e]=t:(o.ctx=o.ctx||{})[e]=t)},o.complete=function(){var e=0,t=o.getCtx(u.ChildrenContextKey);if(qe(t))for(var n=0;n<t.length;n++){var r=t[n];r&&(e+=r.time)}o.time=Ee()-o.start,o.exTime=o.time-e,o.complete=function(){},!i&&O(a)&&(o.payload=a())}}var et="CoreUtils.doPerf";function tt(e,t,n,r,a){if(e)if(e=O(e.getPerfMgr)?e.getPerfMgr():e){var o,i=void 0,s=e.getCtx(et);try{if(i=e.create(t(),r,a))return s&&i.setCtx&&(i.setCtx(Qe.ParentContextKey,s),s.getCtx&&s.setCtx&&((o=s.getCtx(Qe.ChildrenContextKey))||(o=[],s.setCtx(Qe.ChildrenContextKey,o)),o.push(i))),e.setCtx(et,i),n(i)}catch(u){i&&i.setCtx&&i.setCtx("exception",u)}finally{i&&e.fire(i),e.setCtx(et,s)}}n()}var nt=function(a,t){var o=this,i=null,s=O(a.processTelemetry),u=O(a.setNextPlugin);o._hasRun=!1,o.getPlugin=function(){return a},o.getNext=function(){return i},o.setNext=function(e){i=e},o.processTelemetry=function(n,r){r=r||t;var e=a?a.identifier:"TelemetryPluginChain";tt(r?r.core():null,function(){return e+":processTelemetry"},function(){if(a&&s){o._hasRun=!0;try{r.setNext(i),u&&a.setNextPlugin(i),i&&(i._hasRun=!1),a.processTelemetry(n,r)}catch(t){var e=i&&i._hasRun;i&&e||r.diagLog().throwInternal(l.CRITICAL,N.PluginException,"Plugin ["+a.identifier+"] failed during processTelemetry - "+B(t)),i&&!e&&i.processTelemetry(n,r)}}else i&&(o._hasRun=!0,i.processTelemetry(n,r))},function(){return{item:n}},!n.sync)}};function rt(e,t){var n=[];if(e&&0<e.length)for(var r=null,a=0;a<e.length;a++){var o=e[a];o&&O(o.processTelemetry)&&(o=new nt(o,t),n.push(o),r&&r.setNext(o),r=o)}return 0<n.length?n[0]:null}var at=function Qt(e,a,n,t){var r,o,i,s,u=this,l=null;null!==t&&(e&&O(e.getPlugin)?l=function(e,t,n){var r=[],a=!n;if(e)for(;e;){var o=e.getPlugin();!a&&o!==n||(a=!0,r.push(o)),e=e.getNext()}return a||r.push(n),rt(r,t)}(e,u,t||e.getPlugin()):t?(r=u,i=e,s=!1,(o=t)&&e&&(i=[],W(e,function(e){!s&&e!==o||(s=!0,i.push(e))})),o&&!s&&(i=i||[]).push(o),l=rt(i,r)):we(t)&&(l=rt(e,u))),u.core=function(){return n},u.diagLog=function(){return(n||{}).logger||new Ze(a)},u.getCfg=function(){return a},u.getExtCfg=function(e,t){var n,r;return void 0===t&&(t={}),(n=a&&(r=a.extensionConfig)&&e?r[e]:n)||t},u.getConfig=function(e,t,n){void 0===n&&(n=!1);var r,e=u.getExtCfg(e,null);return e&&!_(e[t])?r=e[t]:a&&!_(a[t])&&(r=a[t]),_(r)?n:r},u.hasNext=function(){return null!=l},u.getNext=function(){return l},u.setNext=function(e){l=e},u.processNext=function(e){var t=l;t&&(l=t.getNext(),t.processTelemetry(e,u))},u.createNew=function(e,t){return new Qt((e=void 0===e?null:e)||l,a,n,t)}},ot="getPlugin",t=(it.prototype.initialize=function(e,t,n,r){this._baseTelInit(e,t,n,r)},it);function it(){var s=this,u=!1,l=null,c=null;s.core=null,s.diagLog=function(e){return s._getTelCtx(e).diagLog()},s.isInitialized=function(){return u},s.setInitialized=function(e){u=e},s.setNextPlugin=function(e){c=e},s.processNext=function(e,t){t?t.processNext(e):c&&O(c.processTelemetry)&&c.processTelemetry(e,null)},s._getTelCtx=function(e){var t,e=e=void 0===e?null:e;return e||(t=l||new at(null,{},s.core),e=c&&c[ot]?t.createNew(null,c[ot]):t.createNew(null,c)),e},s._baseTelInit=function(e,t,n,r){e&&(i="extensionConfig",o=a=[],e&&(o=e[i])!==a&&_(o)&&(e[i]=o=a)),!r&&t&&(r=t.getProcessTelContext().getNext());var a,o,i=c;c&&c[ot]&&(i=c[ot]()),s.core=t,l=new at(r,e,t,i),u=!0}}var st=4294967296,d=4294967295,ut=!1,lt=123456789,ct=987654321;function dt(e){var t=c("crypto")||c("msCrypto"),t=t&&t.getRandomValues?t.getRandomValues(new Uint32Array(1))[0]&d:(!(t=We())||t.userAgent===Ue&&null!==Oe||(t=((Ue=t.userAgent)||"").toLowerCase(),Oe=Me(t,Ne)||Me(t,_e)),Oe?(ut||function(){try{var e=2147483647&Ee();(t=(Math.random()*st^e)+e)<0&&(t>>>=0),lt=123456789+t&d,ct=987654321-t&d,ut=!0}catch(n){}var t}(),t=((ct=36969*(65535&ct)+(ct>>16)&d)<<16)+(65535&(lt=18e3*(65535<)+(lt>>16)&d))>>>0&d|0,(t>>>=0)&d):Math.floor(st*Math.random()|0));return e||(t>>>=0),t}function z(){for(var e,t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],n="",r=0;r<4;r++)n+=t[15&(e=dt())]+t[e>>4&15]+t[e>>8&15]+t[e>>12&15]+t[e>>16&15]+t[e>>20&15]+t[e>>24&15]+t[e>>28&15];var a=t[8+(3&dt())|0];return n.substr(0,8)+n.substr(9,4)+"4"+n.substr(13,3)+a+n.substr(16,3)+n.substr(19,12)}var ft="_aiHooks",pt=["req","rsp","hkErr","fnErr"];function gt(e,t){if(e)for(var n=0;n<e.length&&!t(e[n],n);n++);}function ht(e,i,s,u,l){0<=l&&l<=2&>(e,function(e,t){var e=e.cbks,n=e[pt[l]];if(n){i.ctx=function(){return u[t]=u[t]||{}};try{n.apply(i.inst,s)}catch(a){n=i.err;try{var r=e.hkErr;r&&(i.err=a,r.apply(i.inst,s))}catch(o){}finally{i.err=n}}}})}function mt(u){return function(){var n=arguments,e=u.h,r={name:u.n,inst:this,ctx:null,set:function(e,t){(n=o([],n))[e]=t,a=o([r],n)}},t=[],a=o([r],n);function o(t,e){return gt(e,function(e){t.push(e)}),t}ht(e,r,a,t,0);var i=u.f;try{r.rslt=i.apply(this,n)}catch(s){throw r.err=s,ht(e,r,a,t,3),s}return ht(e,r,a,t,1),r.rslt}}function xt(e,t,n,r){if(void 0===r&&(r=!0),e&&t&&n){e=function o(e,t,n){var r=null;return e&&(A.call(e,t)?r=e:n&&(r=o(function(e){if(e){if(Se)return Se(e);e=e.__proto__||e[P]||e.constructor;if(e)return e}return null}(e),t,!1))),r}(e,t,r);if(e){var a,r=e[t];if(typeof r===i)return(a=r[ft])||((r=mt(a={i:0,n:t,f:r,h:[]}))[ft]=a,e[t]=r),t={id:a.i,cbks:n,rm:function(){var n=this.id;gt(a.h,function(e,t){return e.id===n&&(a.h.splice(t,1),1)})}},a.i++,a.h.push(t),t}}return null}function vt(e,t,n){var r,a,o=t.length,i=(e=e,(t=t)&&150<(t=Re(t.toString())).length&&(a=t.substring(0,150),e&&e.throwInternal(l.WARNING,N.NameTooLong,"name is too long. It has been truncated to 150 characters.",{name:t},!0)),a||t);if(i.length!==o){for(var s=0,u=i;n[u]!==undefined;)s++,u=i.substring(0,147)+(r=void 0,(r="00"+s).substr(r.length-3));i=u}return i}function v(e,t,n){var r;return void 0===n&&(n=1024),t&&(n=n||1024,(t=Re(t)).toString().length>n&&(r=t.toString().substring(0,n),e&&e.throwInternal(l.WARNING,N.StringValueTooLong,"string value is too long. It has been truncated to "+n+" characters.",{value:t},!0))),r||t}function yt(e,t){var n,r=N.UrlTooLong;return t&&2048<(t=Re(t)).length&&(n=t.substring(0,2048),e&&e.throwInternal(l.WARNING,r,"input is too long, it has been truncated to 2048 characters.",{data:t},!0)),n||t}function Ct(r,e){var a;return e&&(a={},U(e,function(e,t){if(t&&typeof t===s&&ze())try{t=Ke().stringify(t)}catch(n){r&&r.throwInternal(l.WARNING,N.CannotSerializeObjectNonSerializable,"custom property is not valid",{exception:n},!0)}t=v(r,t,8192),e=vt(r,e,a),a[e]=t}),e=a),e}function Tt(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,a=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<a?a+".":"")+(r=r.length<2?"0"+r:r)+":"+n+":"+t+"."+e}var K,It="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",bt="iKey",At=((r=K={})[r.AI=0]="AI",r[r.AI_AND_W3C=1]="AI_AND_W3C",r[r.W3C=2]="W3C",Ve()||{}),St=0,wt=[null,null,null,null,null];function Mt(n){var e=St,t=wt,r=t[e];return At.createElement?t[e]||(r=t[e]=At.createElement("a")):r={host:function(){var e=qt(n,!0)||"";if(e){var t=e.match(/(www[0-9]?\.)?(.[^/:]+)(\:[\d]+)?/i);if(null!=t&&3<t.length&&V(t[2])&&0<t[2].length)return t[2]+(t[3]||"")}return e}()},r.href=n,++e>=t.length&&(e=0),St=e,r}function qt(e,t){var n=null;return e&&null!=(e=e.match(/(\w*):\/\/(.[^/:]+)(\:[\d]+)?/i))&&2<e.length&&V(e[2])&&0<e[2].length&&(n=e[2]||"",t&&2<e.length&&(t=(e[1]||"").toLowerCase(),e=e[3]||"",n+=e="http"==t&&":80"===e||"https"==t&&":443"===e?"":e)),n}var Rt=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],X={correlationIdPrefix:"cid-v1:",canIncludeCorrelationHeader:function(e,t,n){if(!t||e&&e.disableCorrelationHeaders)return!1;if(e&&e.correlationHeaderExcludePatterns)for(var r=0;r<e.correlationHeaderExcludePatterns.length;r++)if(e.correlationHeaderExcludePatterns[r].test(t))return!1;var a=Mt(t).host.toLowerCase();if(a&&(~a.indexOf(":443")||~a.indexOf(":80"))&&(a=(qt(t,!0)||"").toLowerCase()),(!e||!e.enableCorsCorrelation)&&a&&a!==n)return!1;var o,n=e&&e.correlationHeaderDomains;if(n&&(W(n,function(e){e=RegExp(e.toLowerCase().replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*"));o=o||e.test(a)}),!o))return!1;var i=e&&e.correlationHeaderExcludedDomains;if(!i||0===i.length)return!0;for(r=0;r<i.length;r++)if(RegExp(i[r].toLowerCase().replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*")).test(a))return!1;return a&&0<a.length},getCorrelationContext:function(e){if(e){e=X.getCorrelationContextValue(e,"appId");if(e&&e!==X.correlationIdPrefix)return e}},getCorrelationContextValue:function(e,t){if(e)for(var n=e.split(","),r=0;r<n.length;++r){var a=n[r].split("=");if(2===a.length&&a[0]===t)return a[1]}}};function Ft(){var e=Be();if(e&&e.now&&e.timing){e=e.now()+e.timing.navigationStart;if(0<e)return e}return Ee()}function Dt(e,t){return 0===e||0===t||_(e)||_(t)?null:t-e}M(jt,Lt=function(){this.ver=2,this.success=!0,this.properties={},this.measurements={}}),jt.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",jt.dataType="RemoteDependencyData";var Lt,Et=jt;function jt(e,t,n,r,a,o,i,s,u,l,c,d){void 0===u&&(u="Ajax");var f,p,g,h,m=Lt.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=Tt(a),m.success=o,m.resultCode=i+"",m.type=v(e,u),t=e,a=s,u=i=o=r,i=(s=n)&&0<s.length?(p=(n=Mt(s)).host,i||(null!=n.pathname?("/"!=((f=0===n.pathname.length?"/":n.pathname)[0]||"")&&(f="/"+f),u=n.pathname,v(t,a?a+" "+f:f)):v(t,s))):p=o,{target:p,name:i,data:u});return m.data=yt(e,r)||n.data,m.target=v(e,n.target),l&&(m.target="".concat(m.target," | ").concat(l)),m.name=v(e,n.name),m.properties=Ct(e,c),m.measurements=(g=e,(a=d)&&(h={},U(a,function(e,t){e=vt(g,e,h),h[e]=t}),a=h),a),m}Ht.create=function(e,t,n,r,a,o){if(n=v(r,n)||"not_specified",_(e)||_(t)||_(n))throw Error("Input doesn't contain all required fields");var r="",i=(e[bt]&&(r=e[bt],delete e[bt]),{name:n,time:function(e){if(e){if(Ce)return e[he]();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}}(new Date),iKey:r,ext:o||{},tags:[],data:{},baseType:t,baseData:e});return _(a)||U(a,function(e,t){i.data[e]=t}),i};var kt=Ht;function Ht(){}var C="properties";function Pt(e,t,n){t=e[t],n=e[n];return t&&n?Dt(t,n):0}function T(e,t,n,r,a){n=Pt(n,r,a);return n?I(e,t,Tt(n)):0}function I(e,t,n){var r="ajaxPerf",a=0;return e&&t&&n&&((e[r]=e[r]||{})[t]=n,a=1),a}var Nt=function(){var e=this;e.openDone=!1,e.setRequestHeaderDone=!1,e.sendDone=!1,e.abortDone=!1,e.stateChangeAttached=!1},_t=function en(e,t,n){var r=this,a=n,y="responseText";r.perfMark=null,r.completed=!1,r.requestHeadersSize=null,r.requestHeaders=null,r.responseReceivingDuration=null,r.callbackDuration=null,r.ajaxTotalDuration=null,r.aborted=0,r.pageUrl=null,r.requestUrl=null,r.requestSize=0,r.method=null,r.status=null,r.requestSentTime=null,r.responseStartedTime=null,r.responseFinishedTime=null,r.callbackFinishedTime=null,r.endTime=null,r.xhrMonitoringState=new Nt,r.clientFailure=0,r.traceID=e,r.spanID=t,fe(en,r,function(v){v.getAbsoluteUrl=function(){return v.requestUrl?(e=Mt(v.requestUrl))?e.href:void 0:null;var e},v.getPathName=function(){return v.requestUrl?yt(a,(e=v.method,t=v.requestUrl,e?e.toUpperCase()+" "+t:t)):null;var e,t},v.CreateTrackItem=function(e,t,n){if(v.ajaxTotalDuration=Math.round(1e3*Dt(v.requestSentTime,v.responseFinishedTime))/1e3,v.ajaxTotalDuration<0)return null;(e={id:"|"+v.traceID+"."+v.spanID,target:v.getAbsoluteUrl(),name:v.getPathName(),type:e,startTime:null,duration:v.ajaxTotalDuration,success:200<=+v.status&&+v.status<400,responseCode:+v.status,method:v.method})[C]={HttpMethod:v.method};var r,a,o,i,s,u,l,c,d,f,p,g,h,m,x;return v.requestSentTime&&(e.startTime=new Date,e.startTime.setTime(v.requestSentTime)),i=(r=v).perfTiming,s=(a=e)[C]||{},u=0,l="duration",c="startTime",d="connect"+"End",f="request"+"Start",p="response"+"End",g="transferSize",h="encodedBodySize",m="decodedBodySize",x="serverTiming",i?(u=(u=(u=(u=(u=(u=(u|=T(s,"End",i,"redirectStart","End"))|T(s,"domainLookup",i,"domainLookupStart","domainLookupEnd"))|T(s,"connect",i,"connectStart",d))|T(s,"request",i,f,"requestEnd"))|T(s,"response",i,"responseStart",p))|T(s,"networkConnect",i,c,d))|T(s,"sentRequest",i,f,p),u=(u|=I(s,l,d=i[l]||Pt(i,c,p)||0))|I(s,"perfTotal",d),(f=i[x])&&(o={},W(f,function(e,t){var n,t=e.name||""+t,t=n=(n=t)&&V(t)?(n=(n=t.replace(Ie,function(e,t){return t.toUpperCase()})).replace(be,"_")).replace(Ae,function(e,t){return"_"+t}):n,r=o[t]||{};U(e,function(e,t){!("name"!==e&&V(t)||"number"==typeof t)||!(t=r[e]?r[e]+";"+t:t)&&V(t)||(r[e]=t)}),o[t]=r}),u|=I(s,x,o)),u=(u=(u|=I(s,g,i[g]))|I(s,h,i[h]))|I(s,m,i[m])):r.perfMark&&(u|=I(s,"missing",r.perfAttempts)),u&&(a[C]=s),t&&0<Le(v.requestHeaders).length&&(e[C]=e[C]||{},e[C].requestHeaders=v.requestHeaders),n&&(l=n())&&((c=l.correlationContext)&&(e.correlationContext=c),l.headerMap&&0<Le(l.headerMap).length&&(e[C]=e[C]||{},e[C].responseHeaders=l.headerMap),v.errorStatusText&&400<=v.status&&(p=l.type,e[C]=e[C]||{},""!==p&&"text"!==p||(e[C][y]=l[y]?l.statusText+" - "+l[y]:l.statusText),"json"===p&&(e[C][y]=l.response?l.statusText+" - "+JSON.stringify(l.response):l.statusText))),e}})},Ot=(f.isValidTraceId=function(e){return e.match(/^[0-9a-f]{32}$/)&&"00000000000000000000000000000000"!==e},f.isValidSpanId=function(e){return e.match(/^[0-9a-f]{16}$/)&&"0000000000000000"!==e},f.prototype.toString=function(){return"".concat(this.version,"-").concat(this.traceId,"-").concat(this.spanId,"-").concat(this.traceFlag)},f.DEFAULT_TRACE_FLAG="01",f.DEFAULT_VERSION="00",f);function f(e,t){var n=this;n.traceFlag=f.DEFAULT_TRACE_FLAG,n.version=f.DEFAULT_VERSION,e&&f.isValidTraceId(e)?n.traceId=e:n.traceId=z(),t&&f.isValidSpanId(t)?n.spanId=t:n.spanId=z().substr(0,16)}var Ut="ai.ajxmn.",Vt="diagLog",G="ajaxData",Wt="throwInternal",Bt="fetch",zt=0;function Kt(e){var t=!1,n=(function(){var e=!1;try{e=!!c("XMLHttpRequest")}catch(t){}return e}()&&(t=!(_(n=XMLHttpRequest[P])||_(n.open)||_(n.send)||_(n.abort))),function(e){var t=((e=(e=void 0===e?null:e)?e:(t=We()||{})?(t.userAgent||"").toLowerCase():"")||"").toLowerCase();if(Me(t,Ne))return e=Ve()||{},Math.max(parseInt(t.split(Ne)[1]),e[ke]||0);if(Me(t,_e)){e=parseInt(t.split(_e)[1]);if(e)return e+4}return null}());if(t=!(n&&n<9)&&t)try{(new XMLHttpRequest)[G]={};var r=XMLHttpRequest[P].open;XMLHttpRequest[P].open=r}catch(a){t=!1,Gt(e,N.FailedMonitorAjaxOpen,"Failed to enable XMLHttpRequest monitoring, extension is not supported",{exception:B(a)})}return t}function Xt(e){var t="";try{_(e)||_(e[G])||_(e[G].requestUrl)||(t+="(url: '"+e[G].requestUrl+"')")}catch(n){}return t}function Gt(e,t,n,r,a){e[Vt]()[Wt](l.CRITICAL,t,n,r,a)}function $(e,t,n,r,a){e[Vt]()[Wt](l.WARNING,t,n,r,a)}function $t(t,n,r){return function(e){Gt(t,n,r,{ajaxDiagnosticsMessage:Xt(e.inst),exception:B(e.err)})}}function J(e,t){return e&&t?e.indexOf(t):-1}M(Y,Jt=t),Y.getDefaultConfig=function(){return{maxAjaxCallsPerView:500,disableAjaxTracking:!1,disableFetchTracking:!0,excludeRequestFromAutoTrackingPatterns:undefined,disableCorrelationHeaders:!1,distributedTracingMode:K.AI_AND_W3C,correlationHeaderExcludedDomains:["*.blob.core.windows.net","*.blob.core.chinacloudapi.cn","*.blob.core.cloudapi.de","*.blob.core.usgovcloudapi.net"],correlationHeaderDomains:undefined,correlationHeaderExcludePatterns:undefined,appId:undefined,enableCorsCorrelation:!1,enableRequestHeaderTracking:!1,enableResponseHeaderTracking:!1,enableAjaxErrorStatusText:!1,enableAjaxPerfTracking:!1,maxAjaxPerfLookupAttempts:3,ajaxPerfLookupDelay:25,ignoreHeaders:["Authorization","X-API-Key","WWW-Authenticate"],addRequestContext:undefined}},Y.getEmptyConfig=function(){var t=this.getDefaultConfig();return U(t,function(e){t[e]=undefined}),t},Y.prototype.processTelemetry=function(e,t){this.processNext(e,t)},Y.identifier="AjaxDependencyPlugin";var Jt,r=Y;function Y(){var y,C,T,I,b,A,S,e=Jt.call(this)||this,w=(e.identifier=Y.identifier,e.priority=120,"trackDependencyDataInternal"),t=typeof location===s&&location?location:c("location"),M=!1,q=!1,R=t&&t.host&&t.host.toLowerCase(),F=Y.getEmptyConfig(),D=!1,r=0,L=!1,E=0,j=!1,k=[],H={};return fe(Y,e,function(c,s){function d(t){var n=!0;return(t||F.ignoreHeaders)&&W(F.ignoreHeaders,function(e){if(e.toLowerCase()==t.toLowerCase())return n=!1,-1}),n}function u(e,t,n){k.push(e?xt(e[P],t,n,!1):null)}function f(e,t,n){var r=!1,a=((V(t)?t:(t||{}).url||"")||"").toLowerCase();if(W(b,function(e){var t=e;V(e)&&(t=RegExp(e)),r=r||t.test(a)}),r)return r;var o=J(a,"?"),i=J(a,"#");return-1!==(o=-1===o||-1!==i&&i<o?i:o)&&(a=a.substring(0,o)),_(e)?_(t)||(r="object"==typeof t&&!0===t[It]||!!n&&!0===n[It]):r=!0===e[It]||!0===a[It],(r=!(r||!a||(i=a,!~Rt.indexOf(i.toLowerCase())))||r)?H[a]||(H[a]=1):H[a]&&(r=!0),r}function p(e,t){var n=!0,r=q;return _(e)||(n=!0===t||!_(e[G])),r&&n}function g(n){n[G].xhrMonitoringState.stateChangeAttached=function(e,t,n,r){void 0===r&&(r=!1);var a=!1;if(!_(e))try{_(e[ge])?_(e[pe])||(e[pe]("on"+t,n),a=!0):(e[ge](t,n,r),a=!0)}catch(o){}return a}(n,"readystatechange",function(){try{n&&4===n.readyState&&p(n)&&((o=(a=n)[G]).responseFinishedTime=Ft(),o.status=a.status,l("xmlhttprequest",o,function(){try{var e=o.CreateTrackItem("Ajax",D,function(){var e,n,t={statusText:a.statusText,headerMap:null,correlationContext:i(a),type:a.responseType,responseText:function(e){try{var t=e.responseType;if(""===t||"text"===t)return e.responseText}catch(n){}return null}(a),response:a.response};return j&&(e=a.getAllResponseHeaders())&&(e=Re(e).split(/[\r\n]+/),n={},W(e,function(e){var e=e.split(": "),t=e.shift(),e=e.join(": ");d(t)&&(n[t]=e)}),t.headerMap=n),t}),t=void 0;try{A&&(t=A({status:a.status,xhr:a}))}catch(n){$(c,N.FailedAddingCustomDefinedRequestContext,"Failed to add custom defined request context as configured call back may missing a null check.")}e?(t!==undefined&&(e.properties=Q(Q({},e.properties),t)),c[w](e)):r(null,{requestSentTime:o.requestSentTime,responseFinishedTime:o.responseFinishedTime})}finally{try{a[G]=null}catch(n){}}},function(e){r(e,null)}))}catch(t){var e=B(t);e&&-1!==J(e.toLowerCase(),"c00c023f")||Gt(c,N.FailedMonitorAjaxRSC,"Failed to monitor XMLHttpRequest 'readystatechange' event handler, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:Xt(n),exception:e})}function r(e,t){t=t||{};t.ajaxDiagnosticsMessage=Xt(a),e&&(t.exception=B(e)),$(c,N.FailedMonitorAjaxDur,"Failed to calculate the duration of the ajax call, monitoring data for this ajax call won't be sent.",t)}var a,o})}function i(e){try{var t,n=e.getAllResponseHeaders();if(null!==n&&-1!==J(n.toLowerCase(),"request-context"))return t=e.getResponseHeader("Request-Context"),X.getCorrelationContext(t)}catch(r){$(c,N.FailedMonitorAjaxGetCorrelationHeader,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{ajaxDiagnosticsMessage:Xt(e),exception:B(r)})}}function h(e,t){var n;t.requestUrl&&I&&L&&(n=Be())&&O(n.mark)&&(e=I+e+"#"+ ++zt,n.mark(e),(e=n.getEntriesByName(e))&&1===e.length&&(t.perfMark=e[0]))}function l(o,i,s,u){var l=i.perfMark,c=Be(),d=F.maxAjaxPerfLookupAttempts,f=F.ajaxPerfLookupDelay,p=i.requestUrl,g=0;!function h(){try{if(c&&l){g++;for(var e=null,t=c.getEntries(),n=t.length-1;0<=n;n--){var r=t[n];if(r){if("resource"===r.entryType)r.initiatorType!==o||-1===J(r.name,p)&&-1===J(p,r.name)||(e=r);else if("mark"===r.entryType&&r.name===l.name){i.perfTiming=e;break}if(r.startTime<l.startTime-1e3)break}}}!l||i.perfTiming||d<=g||!1===i["async"]?(l&&O(c.clearMarks)&&c.clearMarks(l.name),i.perfAttempts=g,s()):setTimeout(h,f)}catch(a){u(a)}}()}function m(e){var t="";try{_(e)||(t+="(url: '".concat("string"==typeof e?e:e.url,"')"))}catch(n){Gt(c,N.FailedMonitorAjaxOpen,"Failed to grab failed fetch diagnostics message",{exception:B(n)})}return t}function x(e,r,a,o,i,s){function u(e,t,n){n=n||{};n.fetchDiagnosticsMessage=m(a),t&&(n.exception=B(t)),$(c,e,"Failed to calculate the duration of the fetch call, monitoring data for this fetch call won't be sent.",n)}i&&(i.responseFinishedTime=Ft(),i.status=r,l("fetch",i,function(){var e,t=i.CreateTrackItem("Fetch",D,s);try{A&&(e=A({status:r,request:a,response:o}))}catch(n){$(c,N.FailedAddingCustomDefinedRequestContext,"Failed to add custom defined request context as configured call back may missing a null check.")}t?(e!==undefined&&(t.properties=Q(Q({},t.properties),e)),c[w](t)):u(N.FailedMonitorAjaxDur,null,{requestSentTime:i.requestSentTime,responseFinishedTime:i.responseFinishedTime})},function(e){u(N.FailedMonitorAjaxGetCorrelationHeader,e,null)}))}function v(e){if(e&&e.headers)try{var t=e.headers.get("Request-Context");return X.getCorrelationContext(t)}catch(n){$(c,N.FailedMonitorAjaxGetCorrelationHeader,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{fetchDiagnosticsMessage:m(e),exception:B(n)})}}c.initialize=function(e,t,n,r){if(!c.isInitialized()){s.initialize(e,t,n,r);var a=c._getTelCtx(),t=(U(Y.getDefaultConfig(),function(e,t){F[e]=a.getConfig(Y.identifier,e,t)}),F.distributedTracingMode);if(D=F.enableRequestHeaderTracking,S=F.enableAjaxErrorStatusText,L=F.enableAjaxPerfTracking,E=F.maxAjaxCallsPerView,j=F.enableResponseHeaderTracking,b=F.excludeRequestFromAutoTrackingPatterns,A=F.addRequestContext,T=t===K.AI||t===K.AI_AND_W3C,C=t===K.AI_AND_W3C||t===K.W3C,L&&(r=e.instrumentationKey||"unkwn",I=5<r.length?Ut+r.substring(r.length-5)+".":Ut+r+"."),!1===F.disableAjaxTracking&&Kt(c)&&!q&&(u(XMLHttpRequest,"open",{req:function(e,t,n,r){var a,o,e=e.inst,i=e[G];!f(e,n)&&p(e,!0)&&(i&&i.xhrMonitoringState.openDone||(i=e,t=t,n=n,r=r,o=y&&y.telemetryTrace&&y.telemetryTrace.traceID||z(),a=z().substr(0,16),(o=new _t(o,a,c[Vt]())).method=t,o.requestUrl=n,o.xhrMonitoringState.openDone=!0,o.requestHeaders={},o["async"]=r,o.errorStatusText=S,i[G]=o),g(e))},hkErr:$t(c,N.FailedMonitorAjaxOpen,"Failed to monitor XMLHttpRequest.open, monitoring data for this ajax call may be incorrect.")}),u(XMLHttpRequest,"send",{req:function(e,t){var e=e.inst,n=e[G];p(e)&&!n.xhrMonitoringState.sendDone&&(h("xhr",n),n.requestSentTime=Ft(),c.includeCorrelationHeaders(n,undefined,undefined,e),n.xhrMonitoringState.sendDone=!0)},hkErr:$t(c,N.FailedMonitorAjaxSend,"Failed to monitor XMLHttpRequest, monitoring data for this ajax call may be incorrect.")}),u(XMLHttpRequest,"abort",{req:function(e){var e=e.inst,t=e[G];p(e)&&!t.xhrMonitoringState.abortDone&&(t.aborted=1,t.xhrMonitoringState.abortDone=!0)},hkErr:$t(c,N.FailedMonitorAjaxAbort,"Failed to monitor XMLHttpRequest.abort, monitoring data for this ajax call may be incorrect.")}),D&&u(XMLHttpRequest,"setRequestHeader",{req:function(e,t,n){e=e.inst;p(e)&&d(t)&&(e[G].requestHeaders[t]=n)},hkErr:$t(c,N.FailedMonitorAjaxSetRequestHeader,"Failed to monitor XMLHttpRequest.setRequestHeader, monitoring data for this ajax call may be incorrect.")}),q=!0),(e=!(t=Z())||_(t.Request)||_(t.Request[P])||_(t[Bt])?null:t[Bt])&&(r=Z(),l=e.polyfill,!1===F.disableFetchTracking?(k.push(xt(r,Bt,{req:function(e,t,n){var r,a,o,i,s,u;!M||f(null,t,n)||l&&q||(r=e.ctx(),a=t,o=n,i=y&&y.telemetryTrace&&y.telemetryTrace.traceID||z(),s=z().substr(0,16),(i=new _t(i,s,c[Vt]())).requestSentTime=Ft(),i.errorStatusText=S,a instanceof Request?i.requestUrl=a?a.url:"":i.requestUrl=a,s="GET",o&&o.method?s=o.method:a&&a instanceof Request&&(s=a.method),i.method=s,u={},D&&new Headers((o?o.headers:0)||a instanceof Request&&a.headers||{}).forEach(function(e,t){d(t)&&(u[t]=e)}),i.requestHeaders=u,h("fetch",i),s=i,(o=c.includeCorrelationHeaders(s,t,n))!==n&&e.set(1,o),r.data=s)},rsp:function(e,n){var r=e.ctx().data;r&&(e.rslt=e.rslt.then(function(t){return x(0,(t||{}).status,n,t,r,function(){var n,e={statusText:t.statusText,headerMap:null,correlationContext:v(t)};return j&&(n={},t.headers.forEach(function(e,t){d(t)&&(n[t]=e)}),e.headerMap=n),e}),t})["catch"](function(e){throw x(0,0,n,null,r,null,e.message),e}))},hkErr:$t(c,N.FailedMonitorAjaxOpen,"Failed to monitor Window.fetch, monitoring data for this fetch call may be incorrect.")})),M=!0):l&&k.push(xt(r,Bt,{req:function(e,t,n){f(null,t,n)}})),l&&(r[Bt].polyfill=l)),0<n.length&&n){for(var o=void 0,i=0;!o&&i<n.length;)n[i]&&"AppInsightsPropertiesPlugin"===n[i].identifier&&(o=n[i]),i++;o&&(y=o.context)}}var l},c.teardown=function(){W(k,function(e){e.rm()}),q=M=!(k=[]),c.setInitialized(!1)},c.trackDependencyData=function(e,t){c[w](e,t)},c.includeCorrelationHeaders=function(e,t,n,r){var a,o,i,s=c._currentWindowHost||R;return t?(X.canIncludeCorrelationHeader(F,e.getAbsoluteUrl(),s)&&((n=n||{}).headers=new Headers(n.headers||t instanceof Request&&t.headers||{}),T&&(a="|"+e.traceID+"."+e.spanID,n.headers.set("Request-Id",a),D&&(e.requestHeaders["Request-Id"]=a)),(o=F.appId||y&&y.appId())&&(n.headers.set("Request-Context","appId=cid-v1:"+o),D&&(e.requestHeaders["Request-Context"]="appId=cid-v1:"+o)),C&&(i=new Ot(e.traceID,e.spanID),n.headers.set("traceparent",i.toString()),D&&(e.requestHeaders.traceparent=i.toString()))),n):r?(X.canIncludeCorrelationHeader(F,e.getAbsoluteUrl(),s)&&(T&&(a="|"+e.traceID+"."+e.spanID,r.setRequestHeader("Request-Id",a),D&&(e.requestHeaders["Request-Id"]=a)),(o=F.appId||y&&y.appId())&&(r.setRequestHeader("Request-Context","appId=cid-v1:"+o),D&&(e.requestHeaders["Request-Context"]="appId=cid-v1:"+o)),C&&(i=new Ot(e.traceID,e.spanID),r.setRequestHeader("traceparent",i.toString()),D&&(e.requestHeaders.traceparent=i.toString()))),r):undefined},c[w]=function(e,t,n){-1===E||r<E?(F.distributedTracingMode!==K.W3C&&F.distributedTracingMode!==K.AI_AND_W3C||"string"!=typeof e.id||"."===e.id[e.id.length-1]||(e.id+="."),_(e.startTime)&&(e.startTime=new Date),e=kt.create(e,Et.dataType,Et.envelopeType,c[Vt](),t,n),c.core.track(e)):r===E&&Gt(c,N.MaxAjaxPerPVExceeded,"Maximum ajax per page view limit reached, ajax monitoring is paused until the next trackPageView(). In order to increase the limit set the maxAjaxCallsPerView configuration parameter.",!0),++r}}),e}e.AjaxPlugin=r,e.ajaxRecord=_t;var t=e,r="__esModule",e={value:!0},Yt=Object.defineProperty;if(Yt)try{return void Yt(t,r,e)}catch(tn){}typeof e.value!==undefined&&(t[r]=e.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(e){"use strict";var i="function",s="object",o="undefined",P="prototype",S="hasOwnProperty",n=Object,w=n[P],t=n.assign,M=n.create,r=n.defineProperty,p=w[S],a=null;function G(e){return void 0===e&&(e=!0),a&&e||(typeof globalThis!==o&&globalThis&&(a=globalThis),typeof self!==o&&self&&(a=self),typeof window!==o&&window&&(a=window),typeof global!==o&&global&&(a=global)),a}function q(e){throw new TypeError(e)}(G()||{}).Symbol,(G()||{}).Reflect;var $=t||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])w[S].call(t,o)&&(e[o]=t[o]);return e},F=function(e,t){return(F=n.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t[S](n)&&(e[n]=t[n])})(e,t)};function R(e,t){function n(){this.constructor=e}typeof t!==i&&null!==t&&q("Class extends value "+t+" is not a constructor or null"),F(e,t),e[P]=null===t?function(e){if(M)return M(e);if(null==e)return{};var t=typeof e;function n(){}return t!==s&&t!==i&&q("Object prototype may only be an Object:"+e),n[P]=e,new n}(t):(n[P]=t[P],new n)}var D="constructor",g="prototype",L="function",E="_dynInstFuncs",k="_isDynProxy",h="_dynClass",j="_dynInstChk",H=j,J="_dfOpts",Y="_unknown_",Z="__proto__",Q="useBaseInst",ee="setInstFuncs",te=Object,ne=te.getPrototypeOf,re=0;function m(e,t){return e&&te[g].hasOwnProperty.call(e,t)}function oe(e){return e&&(e===te[g]||e===Array[g])}function ae(e){return oe(e)||e===Function[g]}function v(e){if(e){if(ne)return ne(e);e=e[Z]||e[g]||(e[D]?e[D][g]:null);if(e)return e}return null}function ie(e,t){var n=[],r=te.getOwnPropertyNames;if(r)n=r(e);else for(var o in e)"string"==typeof o&&m(e,o)&&n.push(o);if(n&&0<n.length)for(var a=0;a<n.length;a++)t(n[a])}function se(e,t,n){return t!==D&&typeof e[t]===L&&(n||m(e,t))}function ue(e){throw new TypeError("DynamicProto: "+e)}function le(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||Y:((e||{})[D]||{}).name||t||Y}function x(e,r,t,n){m(e,g)||ue("theClass is an invalid class definition.");var o,a,i,s,u,l,c=e[g],d=(function(e){if(ne)for(var t=[],n=v(r);n&&!ae(n)&&!le(t,n);){if(n===e)return 1;t.push(n),n=v(n)}}(c)||ue("["+ce(e)+"] is not in class hierarchy of ["+ce(r)+"]"),null),e=(m(c,h)?d=c[h]:(d="_dynCls$"+ce(e,"_")+"$"+re,re++,c[h]=d),x[J]),f=!!e[Q],p=(f&&n&&n[Q]!==undefined&&(f=!!n[Q]),a={},ie(o=r,function(e){!a[e]&&se(o,e,!1)&&(a[e]=o[e])}),a),f=(t(r,function(e,t,n,a){function r(e,t,n){var r,o=t[n];return o[k]&&a&&!1!==(r=e[E]||{})[H]&&(o=(r[t[h]]||{})[n]||o),function(){return o.apply(e,arguments)}}for(var o={},i=(ie(n,function(e){o[e]=r(t,n,e)}),v(e)),s=[];i&&!ae(i)&&!le(s,i);)ie(i,function(e){!o[e]&&se(i,e,!ne)&&(o[e]=r(t,i,e))}),s.push(i),i=v(i);return o}(c,r,p,f)),!!ne&&!!e[ee]);i=c,t=d,s=r,u=p,e=!1!==(f=f&&n?!!n[ee]:f),oe(i)||(c=s[E]=s[E]||{},l=c[t]=c[t]||{},!1!==c[H]&&(c[H]=!!e),ie(s,function(e){var n,r,o;se(s,e,!1)&&s[e]!==u[e]&&(l[e]=s[e],delete s[e],m(i,e)&&(!i[e]||i[e][k])||(i[e]=(n=i,r=e,(o=function(){var e,t;return(function(e,t,n,r){var o=null;if(e&&m(n,h)){var a=e[E]||{};if((o=(a[n[h]]||{})[t])||ue("Missing ["+t+"] "+L),!o[j]&&!1!==a[H]){for(var i=!m(e,t),s=v(e),u=[];i&&s&&!ae(s)&&!le(u,s);){var l=s[t];if(l){i=l===r;break}u.push(s),s=v(s)}try{i&&(e[t]=o),o[j]=1}catch(c){a[H]=!1}}}return o}(this,r,n,o)||(typeof(t=(t=n[e=r])===o?v(n)[e]:t)!==L&&ue("["+e+"] is not a "+L),t)).apply(this,arguments)})[k]=1,o)))}))}x[J]={setInstFuncs:!0,useBaseInst:!0},(t=y=y||{})[t.CRITICAL=1]="CRITICAL",t[t.WARNING=2]="WARNING";var y,N={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},de="attachEvent",fe="addEventListener",pe="toISOString",ge="trim",t="toString",he="constructor",me=r,r=n.freeze,ve=n.keys,xe=String[P][ge],ye=Date[P][pe],u=Array.isArray,Ce=w[t],Te=p[t],Ie=Te.call(n),be=/-([a-z])/g,Ae=/([^\w\d_$])/g,Se=/^(\d+[\w\d_$])/,we=Object.getPrototypeOf;function Me(e){if(e){if(we)return we(e);e=e.__proto__||e[P]||e[he];if(e)return e}return null}function qe(e){return e===undefined||typeof e===o}function _(e){return null===e||qe(e)}function Fe(e){return!(!e||typeof e!==s)}function O(e){return!(!e||typeof e!==i)}function U(e,t){if(e)for(var n in e)p.call(e,n)&&t.call(e,n,e[n])}function Re(e,t){return!(!e||!t||!~e.indexOf(t))}var C=u||function(e){return!(!e||"[object Array]"!==Ce.call(e))};function V(e){return"string"==typeof e}function De(e){return e&&"object"==typeof e&&(!(e=(we||Me)(e))||typeof(e=e[he]&&p.call(e,he)?e[he]:e)===i&&Te.call(e)===Ie)}function W(e,t,n){var r=e.length;try{for(var o=0;o<r&&!(o in e&&-1===t.call(n||e,e[o],o,e));o++);}catch(a){}}function Le(e){return e&&(xe&&e[ge]?e[ge]():e.replace?e.replace(/^\s+|\s+$/g,""):e)}var Ee=!{toString:null}.propertyIsEnumerable("toString"),ke=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];function je(e){var t=typeof e;if(t===i||t===s&&null!==e||q("objKeys called on non-object"),!Ee&&ve)return ve(e);var n,r=[];for(n in e)e&&p.call(e,n)&&r.push(n);if(Ee)for(var o=ke.length,a=0;a<o;a++)e&&p.call(e,ke[a])&&r.push(ke[a]);return r}var He=r||function(e){return e};function Pe(){var e=Date;return e.now?e.now():(new e).getTime()}var Ne="window",_e="documentMode",Oe="performance",Ue="JSON",Ve="msie",We="trident/",ze="XMLHttpRequest",Be=null,Ke=null;function l(e){var t=G();return t&&t[e]?t[e]:e===Ne&&typeof window===s&&window?window:null}function Xe(){return typeof document===s&&document?document:l("document")}function Ge(){return typeof navigator===s&&navigator?navigator:l("navigator")}function $e(){return l(Oe)}function Je(){return typeof JSON===s&&JSON||null!==l(Ue)}function Ye(){return Je()?JSON||l(Ue):null}function z(e){var t=Object[P].toString.call(e),n="";return"[object Error]"===t?n="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":Je()&&(n=Ye().stringify(e)),t+n}var Ze=null;function Qe(e){return e?'"'+e.replace(/\"/g,"")+'"':""}function et(e,t){var n,r=typeof console!==o?console:l("console");r&&(n="log",O(r[n=r[e]?e:n])&&r[n](t))}nt.dataType="MessageData";var tt=nt;function nt(e,t,n,r){void 0===n&&(n=!1),this.messageId=e,this.message=(n?"AI: ":"AI (Internal): ")+e;n="",Je()&&(n=Ye().stringify(r)),e=(t?" message:"+Qe(t):"")+(r?" props:"+Qe(n):"");this.message+=e}var rt=function cn(o){this.identifier="DiagnosticLogger",this.queue=[];var s=0,u={};x(cn,this,function(a){function e(e,t){e=o[e];return _(e)?t:e}function i(e,t){var n,r=(n=(n=Ze)||!0===o.disableDbgExt?n:Ze||(r=l("Microsoft"),Ze=r?r.ApplicationInsights:Ze))?n.ChromeDbgExt:null;r&&r.diagLog&&r.diagLog(e,t)}_(o)&&(o={}),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,o){t=new tt(t,n,o=void 0!==o&&o,r);if(a.enableDebugExceptions())throw t;n=e===y.CRITICAL?"errorToConsole":"warnToConsole";qe(t.message)?i("throw"+(e===y.CRITICAL?"Critical":"Warning"),t):(r=a.consoleLoggingLevel(),o?(o=+t.messageId,!u[o]&&e<=r&&(a[n](t.message),u[o]=!0)):e<=r&&a[n](t.message),a.logInternalMessage(e,t))},a.warnToConsole=function(e){et("warn",e),i("warning",e)},a.errorToConsole=function(e){et("error",e),i("error",e)},a.resetInternalMessageCount=function(){s=0,u={}},a.logInternalMessage=function(e,t){var n,r;s>=a.maxInternalMessageLimit()||(r=!0,n="AITR_"+t.messageId,u[n]?r=!1:u[n]=!0,r&&(e<=a.telemetryLoggingLevel()&&(a.queue.push(t),s++,i(e===y.CRITICAL?"error":"warn",t)),s===a.maxInternalMessageLimit()&&(r=new tt(N.MessageLimitPerPVExceeded,n="Internal events throttle limit per PageView reached for this app.",!1),a.queue.push(r),e===y.CRITICAL?a.errorToConsole(n):a.warnToConsole(n))))}})},ot=(c.ParentContextKey="parent",c.ChildrenContextKey="childEvts",c);function c(e,o,t){var r,a=this,i=!1;a.start=Pe(),a.name=e,a.isAsync=t,a.isChildEvt=function(){return!1},O(o)&&(i=function(e){if(me)try{var t={enumerable:!0,configurable:!0,get:function(){return!r&&O(o)&&(r=o(),o=null),r}};return me(e,"payload",t),!0}catch(n){}return!1}(a)),a.getCtx=function(e){return e?(e===c.ParentContextKey||e===c.ChildrenContextKey?a:a.ctx||{})[e]:null},a.setCtx=function(e,t){e&&(e===c.ParentContextKey?(a[e]||(a.isChildEvt=function(){return!0}),a[e]=t):e===c.ChildrenContextKey?a[e]=t:(a.ctx=a.ctx||{})[e]=t)},a.complete=function(){var e=0,t=a.getCtx(c.ChildrenContextKey);if(C(t))for(var n=0;n<t.length;n++){var r=t[n];r&&(e+=r.time)}a.time=Pe()-a.start,a.exTime=a.time-e,a.complete=function(){},!i&&O(o)&&(a.payload=o())}}var at="CoreUtils.doPerf";function it(e,t,n,r,o){if(e)if(e=O(e.getPerfMgr)?e.getPerfMgr():e){var a,i=void 0,s=e.getCtx(at);try{if(i=e.create(t(),r,o))return s&&i.setCtx&&(i.setCtx(ot.ParentContextKey,s),s.getCtx&&s.setCtx&&((a=s.getCtx(ot.ChildrenContextKey))||(a=[],s.setCtx(ot.ChildrenContextKey,a)),a.push(i))),e.setCtx(at,i),n(i)}catch(u){i&&i.setCtx&&i.setCtx("exception",u)}finally{i&&e.fire(i),e.setCtx(at,s)}}n()}var st="TelemetryPluginChain",ut="_hasRun",lt="_getTelCtx",ct=0;function dt(e,i,n,t){var r=null,o=null,r=t?function(e,t,n,r){for(;e;){if(e.getPlugin()===r)return e;e=e.getNext()}return ft([r],t,n)}(e,i,n,t):e,a={core:function(){return n},diagLog:function(){return(n||{}).logger||new rt(i)},getCfg:function(){return i},getExtCfg:s,getConfig:function(e,t,n){void 0===n&&(n=!1);var r,e=s(e,null);return e&&!_(e[t])?r=e[t]:i&&!_(i[t])&&(r=i[t]),_(r)?n:r},hasNext:function(){return null!=r},getNext:function(){return r},setNext:function(e){r=e},processNext:function(t){u(function(e){e.processTelemetry(t,a)})},iterate:function(t){for(;r;)u(function(e){e=e.getPlugin();e&&t(e)})},createNew:function(e,t){return dt((e=C(e=void 0===e?null:e)?ft(e,i,n,t):e)||r,i,n,t)},onComplete:function(e){o=e}};function s(e,t,n){var r,o,a;return void 0===t&&(t={}),void 0===n&&(n=0),(r=i&&(o=i.extensionConfig)&&e?o[e]:r)?Fe(t)&&0!==n&&(a=function f(){var e=arguments,t=e[0]||{},n=e.length,r=!1,o=1;for(0<n&&"boolean"==typeof t&&(r=t,t=e[o]||{},o++),Fe(t)||(t={});o<n;o++){var a,i,s,u,l=e[o],c=C(l),d=Fe(l);for(a in l)(c&&a in l||d&&p.call(l,a))&&(i=l[a],s=void 0,r&&i&&((s=C(i))||De(i))&&(u=t[a],s?C(u)||(u=[]):De(u)||(u={}),i=f(r,u,i)),i!==undefined&&(t[a]=i))}return t}(!0,t,r),i&&2===n&&U(t,function(e){var t;_(a[e])&&!_(t=i[e])&&(a[e]=t)})):r=t,r}function u(e){var t=r;t?(r=t.getNext(),e(t)):o&&(o(),o=null)}return a}function ft(e,t,n,r){var o,a=null,i=!r;return C(e)&&0<e.length&&(o=null,W(e,function(e){(i=!i&&r===e||i)&&e&&O(e.processTelemetry)&&(e=pt(e,t,n),a=a||e,o&&o._setNext(e),o=e)})),r&&!a?ft([r],t,n):a}function pt(u,l,c){var d=null,n=O(u.processTelemetry),r=O(u.setNextPlugin),f=u?u.identifier+"-"+u.priority+"-"+ct++:"Unknown-0-"+ct++,p={getPlugin:function(){return u},getNext:function(){return d},processTelemetry:function(t,e){o(e,function(e){return!!n&&(r&&u.setNextPlugin(d),u.processTelemetry(t,e),!0)},function(e){d.processTelemetry(t,e)},"processTelemetry",function(){return{item:t}},!t.sync)},_id:f,_setNext:function(e){d=e}};function o(r,o,a,i,e,t){r=(r=r||(u&&O(u[lt])?u[lt]():r))||dt(p,l,c);var n=u?u.identifier:st,s=(s=r[ut])||(r[ut]={});it(r.core(),function(){return n+":"+i},function(){var e=!(s[f]=!0);if(r.setNext(d),u)try{var t=d?d._id:"";t&&(s[t]=!1),e=o(r)}catch(n){t=!d||s[d._id];t&&(e=!0),d&&t||r.diagLog().throwInternal(y.CRITICAL,N.PluginException,"Plugin ["+u.identifier+"] failed during "+i+" - "+z(n)+", run flags: "+z(s))}d&&!e&&a(r)},e,t)}return He(p)}var gt="getPlugin",t=function dn(){var s,u,l,t,c=this;function n(e){var t,e=e=void 0===e?null:e;return e||(t=u||dt(null,{},c.core),e=l&&l[gt]?t.createNew(null,l[gt]):t.createNew(null,l)),e}s=!1,c.core=null,l=u=null,t=[],x(dn,c,function(e){e.initialize=function(e,t,n,r){e&&(i="extensionConfig",a=o=[],e&&(a=e[i])!==o&&_(a)&&(e[i]=a=o)),!r&&t&&(r=t.getProcessTelContext().getNext());var o,a,i=l;l&&l[gt]&&(i=l[gt]()),c.core=t,u=dt(r,e,t,i),s=!0},e._addHook=function(e){e&&(C(e)?t=t.concat(e):t.push(e))}}),c.diagLog=function(e){return n(e).diagLog()},c.isInitialized=function(){return s},c.setInitialized=function(e){s=e},c.setNextPlugin=function(e){l=e},c.processNext=function(e,t){t?t.processNext(e):l&&O(l.processTelemetry)&&l.processTelemetry(e,null)},c._getTelCtx=n},ht=4294967296,d=4294967295,mt=!1,vt=123456789,xt=987654321;function yt(e){var t,n=0,r=l("crypto")||l("msCrypto");if(0===(n=r&&r.getRandomValues?r.getRandomValues(new Uint32Array(1))[0]&d:n)&&(!(r=Ge())||r.userAgent===Ke&&null!==Be||(r=((Ke=r.userAgent)||"").toLowerCase(),Be=Re(r,Ve)||Re(r,We)),Be)){if(!mt)try{var o=2147483647&Pe();(t=(Math.random()*ht^o)+o)<0&&(t>>>=0),vt=123456789+t&d,xt=987654321-t&d,mt=!0}catch(a){}r=((xt=36969*(65535&xt)+(xt>>16)&d)<<16)+(65535&(vt=18e3*(65535&vt)+(vt>>16)&d))>>>0&d|0,n=(r>>>=0)&d}return 0===n&&(n=Math.floor(ht*Math.random()|0)),e||(n>>>=0),n}function Ct(){for(var e,t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],n="",r=0;r<4;r++)n+=t[15&(e=yt())]+t[e>>4&15]+t[e>>8&15]+t[e>>12&15]+t[e>>16&15]+t[e>>20&15]+t[e>>24&15]+t[e>>28&15];var o=t[8+(3&yt())|0];return n.substr(0,8)+n.substr(9,4)+"4"+n.substr(13,3)+o+n.substr(16,3)+n.substr(19,12)}var Tt="_aiHooks",It=["req","rsp","hkErr","fnErr"];function bt(e,t){if(e)for(var n=0;n<e.length&&!t(e[n],n);n++);}function At(e,i,s,u,l){0<=l&&l<=2&&bt(e,function(e,t){var e=e.cbks,n=e[It[l]];if(n){i.ctx=function(){return u[t]=u[t]||{}};try{n.apply(i.inst,s)}catch(o){n=i.err;try{var r=e.hkErr;r&&(i.err=o,r.apply(i.inst,s))}catch(a){}finally{i.err=n}}}})}function St(u){return function(){var n=arguments,e=u.h,r={name:u.n,inst:this,ctx:null,set:function(e,t){(n=a([],n))[e]=t,o=a([r],n)}},t=[],o=a([r],n);function a(t,e){return bt(e,function(e){t.push(e)}),t}r.evt=l("event"),At(e,r,o,t,0);var i=u.f;try{r.rslt=i.apply(this,n)}catch(s){throw r.err=s,At(e,r,o,t,3),s}return At(e,r,o,t,1),r.rslt}}function wt(e,t,n,r){if(void 0===r&&(r=!0),e&&t&&n){e=function a(e,t,n){var r=null;return e&&(p.call(e,t)?r=e:n&&(r=a(Me(e),t,!1))),r}(e,t,r);if(e){var o,r=e[t];if(typeof r===i)return(o=r[Tt])||((r=St(o={i:0,n:t,f:r,h:[]}))[Tt]=o,e[t]=r),t={id:o.i,cbks:n,rm:function(){var n=this.id;bt(o.h,function(e,t){return e.id===n&&(o.h.splice(t,1),1)})}},o.i++,o.h.push(t),t}}return null}function Mt(e,t,n){var r,o,a=t.length,i=(e=e,(t=t)&&150<(t=Le(t.toString())).length&&(o=t.substring(0,150),e&&e.throwInternal(y.WARNING,N.NameTooLong,"name is too long. It has been truncated to 150 characters.",{name:t},!0)),o||t);if(i.length!==a){for(var s=0,u=i;n[u]!==undefined;)s++,u=i.substring(0,147)+(r=void 0,(r="00"+s).substr(r.length-3));i=u}return i}function T(e,t,n){var r;return void 0===n&&(n=1024),t&&(n=n||1024,(t=Le(t)).toString().length>n&&(r=t.toString().substring(0,n),e&&e.throwInternal(y.WARNING,N.StringValueTooLong,"string value is too long. It has been truncated to "+n+" characters.",{value:t},!0))),r||t}function qt(e,t){var n,r=N.UrlTooLong;return t&&2048<(t=Le(t)).length&&(n=t.substring(0,2048),e&&e.throwInternal(y.WARNING,r,"input is too long, it has been truncated to 2048 characters.",{data:t},!0)),n||t}function Ft(r,e){var o;return e&&(o={},U(e,function(e,t){if(Fe(t)&&Je())try{t=Ye().stringify(t)}catch(n){r&&r.throwInternal(y.WARNING,N.CannotSerializeObjectNonSerializable,"custom property is not valid",{exception:n},!0)}t=T(r,t,8192),e=Mt(r,e,o),o[e]=t}),e=o),e}function Rt(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,o=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<o?o+".":"")+(r=r.length<2?"0"+r:r)+":"+n+":"+t+"."+e}var B,Dt="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",Lt="iKey",Et=((u=B={})[u.AI=0]="AI",u[u.AI_AND_W3C=1]="AI_AND_W3C",u[u.W3C=2]="W3C",Xe()||{}),kt=0,jt=[null,null,null,null,null];function Ht(n){var e=kt,t=jt,r=t[e];return Et.createElement?t[e]||(r=t[e]=Et.createElement("a")):r={host:function(){var e=Pt(n,!0)||"";if(e){var t=e.match(/(www[0-9]?\.)?(.[^/:]+)(\:[\d]+)?/i);if(null!=t&&3<t.length&&V(t[2])&&0<t[2].length)return t[2]+(t[3]||"")}return e}()},r.href=n,++e>=t.length&&(e=0),kt=e,r}function Pt(e,t){var n=null;return e&&null!=(e=e.match(/(\w*):\/\/(.[^/:]+)(\:[\d]+)?/i))&&2<e.length&&V(e[2])&&0<e[2].length&&(n=e[2]||"",t&&2<e.length&&(t=(e[1]||"").toLowerCase(),e=e[3]||"",n+=e="http"==t&&":80"===e||"https"==t&&":443"===e?"":e)),n}var Nt=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],_t={correlationIdPrefix:"cid-v1:",canIncludeCorrelationHeader:function(e,t,n){if(!t||e&&e.disableCorrelationHeaders)return!1;if(e&&e.correlationHeaderExcludePatterns)for(var r=0;r<e.correlationHeaderExcludePatterns.length;r++)if(e.correlationHeaderExcludePatterns[r].test(t))return!1;var o=Ht(t).host.toLowerCase();if(o&&(~o.indexOf(":443")||~o.indexOf(":80"))&&(o=(Pt(t,!0)||"").toLowerCase()),(!e||!e.enableCorsCorrelation)&&o&&o!==n)return!1;var a,n=e&&e.correlationHeaderDomains;if(n&&(W(n,function(e){e=RegExp(e.toLowerCase().replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*"));a=a||e.test(o)}),!a))return!1;var i=e&&e.correlationHeaderExcludedDomains;if(!i||0===i.length)return!0;for(r=0;r<i.length;r++)if(RegExp(i[r].toLowerCase().replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*")).test(o))return!1;return o&&0<o.length},getCorrelationContext:function(e){if(e){e=_t.getCorrelationContextValue(e,"appId");if(e&&e!==_t.correlationIdPrefix)return e}},getCorrelationContextValue:function(e,t){if(e)for(var n=e.split(","),r=0;r<n.length;++r){var o=n[r].split("=");if(2===o.length&&o[0]===t)return o[1]}}};function Ot(){var e=$e();if(e&&e.now&&e.timing){e=e.now()+e.timing.navigationStart;if(0<e)return e}return Pe()}function Ut(e,t){return 0===e||0===t||_(e)||_(t)?null:t-e}R(zt,Vt=function(){this.ver=2,this.success=!0,this.properties={},this.measurements={}}),zt.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",zt.dataType="RemoteDependencyData";var Vt,Wt=zt;function zt(e,t,n,r,o,a,i,s,u,l,c,d){void 0===u&&(u="Ajax");var f,p,g,h,m=Vt.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=Rt(o),m.success=a,m.resultCode=i+"",m.type=T(e,u),t=e,o=s,u=i=a=r,i=(s=n)&&0<s.length?(p=(n=Ht(s)).host,i||(null!=n.pathname?("/"!=((f=0===n.pathname.length?"/":n.pathname)[0]||"")&&(f="/"+f),u=n.pathname,T(t,o?o+" "+f:f)):T(t,s))):p=a,{target:p,name:i,data:u});return m.data=qt(e,r)||n.data,m.target=T(e,n.target),l&&(m.target="".concat(m.target," | ").concat(l)),m.name=T(e,n.name),m.properties=Ft(e,c),m.measurements=(g=e,(o=d)&&(h={},U(o,function(e,t){e=Mt(g,e,h),h[e]=t}),o=h),o),m}Kt.create=function(e,t,n,r,o,a){if(n=T(r,n)||"not_specified",_(e)||_(t)||_(n))throw Error("Input doesn't contain all required fields");var r="",i=(e[Lt]&&(r=e[Lt],delete e[Lt]),{name:n,time:function(e){if(e){if(ye)return e[pe]();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}}(new Date),iKey:r,ext:a||{},tags:[],data:{},baseType:t,baseData:e});return _(o)||U(o,function(e,t){i.data[e]=t}),i};var Bt=Kt;function Kt(){}var I="properties";function Xt(e,t,n){t=e[t],n=e[n];return t&&n?Ut(t,n):0}function b(e,t,n,r,o){n=Xt(n,r,o);return n?A(e,t,Rt(n)):0}function A(e,t,n){var r="ajaxPerf",o=0;return e&&t&&n&&((e[r]=e[r]||{})[t]=n,o=1),o}var Gt=function(){var e=this;e.openDone=!1,e.setRequestHeaderDone=!1,e.sendDone=!1,e.abortDone=!1,e.stateChangeAttached=!1},$t=function fn(e,t,n){var r=this,o=n,y="responseText";r.perfMark=null,r.completed=!1,r.requestHeadersSize=null,r.requestHeaders=null,r.responseReceivingDuration=null,r.callbackDuration=null,r.ajaxTotalDuration=null,r.aborted=0,r.pageUrl=null,r.requestUrl=null,r.requestSize=0,r.method=null,r.status=null,r.requestSentTime=null,r.responseStartedTime=null,r.responseFinishedTime=null,r.callbackFinishedTime=null,r.endTime=null,r.xhrMonitoringState=new Gt,r.clientFailure=0,r.traceID=e,r.spanID=t,x(fn,r,function(x){x.getAbsoluteUrl=function(){return x.requestUrl?(e=Ht(x.requestUrl))?e.href:void 0:null;var e},x.getPathName=function(){return x.requestUrl?qt(o,(e=x.method,t=x.requestUrl,e?e.toUpperCase()+" "+t:t)):null;var e,t},x.CreateTrackItem=function(e,t,n){if(x.ajaxTotalDuration=Math.round(1e3*Ut(x.requestSentTime,x.responseFinishedTime))/1e3,x.ajaxTotalDuration<0)return null;(e={id:"|"+x.traceID+"."+x.spanID,target:x.getAbsoluteUrl(),name:x.getPathName(),type:e,startTime:null,duration:x.ajaxTotalDuration,success:200<=+x.status&&+x.status<400,responseCode:+x.status,method:x.method})[I]={HttpMethod:x.method};var r,o,a,i,s,u,l,c,d,f,p,g,h,m,v;return x.requestSentTime&&(e.startTime=new Date,e.startTime.setTime(x.requestSentTime)),i=(r=x).perfTiming,s=(o=e)[I]||{},u=0,l="duration",c="startTime",d="connect"+"End",f="request"+"Start",p="response"+"End",g="transferSize",h="encodedBodySize",m="decodedBodySize",v="serverTiming",i?(u=(u=(u=(u=(u=(u=(u|=b(s,"End",i,"redirectStart","End"))|b(s,"domainLookup",i,"domainLookupStart","domainLookupEnd"))|b(s,"connect",i,"connectStart",d))|b(s,"request",i,f,"requestEnd"))|b(s,"response",i,"responseStart",p))|b(s,"networkConnect",i,c,d))|b(s,"sentRequest",i,f,p),u=(u|=A(s,l,d=i[l]||Xt(i,c,p)||0))|A(s,"perfTotal",d),(f=i[v])&&(a={},W(f,function(e,t){var n,t=e.name||""+t,t=n=(n=t)&&V(t)?(n=(n=t.replace(be,function(e,t){return t.toUpperCase()})).replace(Ae,"_")).replace(Se,function(e,t){return"_"+t}):n,r=a[t]||{};U(e,function(e,t){!("name"!==e&&V(t)||"number"==typeof t)||!(t=r[e]?r[e]+";"+t:t)&&V(t)||(r[e]=t)}),a[t]=r}),u|=A(s,v,a)),u=(u=(u|=A(s,g,i[g]))|A(s,h,i[h]))|A(s,m,i[m])):r.perfMark&&(u|=A(s,"missing",r.perfAttempts)),u&&(o[I]=s),t&&0<je(x.requestHeaders).length&&(e[I]=e[I]||{},e[I].requestHeaders=x.requestHeaders),n&&(l=n())&&((c=l.correlationContext)&&(e.correlationContext=c),l.headerMap&&0<je(l.headerMap).length&&(e[I]=e[I]||{},e[I].responseHeaders=l.headerMap),x.errorStatusText&&400<=x.status&&(p=l.type,e[I]=e[I]||{},""!==p&&"text"!==p||(e[I][y]=l[y]?l.statusText+" - "+l[y]:l.statusText),"json"===p&&(e[I][y]=l.response?l.statusText+" - "+JSON.stringify(l.response):l.statusText))),e}})},Jt=(f.isValidTraceId=function(e){return e.match(/^[0-9a-f]{32}$/)&&"00000000000000000000000000000000"!==e},f.isValidSpanId=function(e){return e.match(/^[0-9a-f]{16}$/)&&"0000000000000000"!==e},f.prototype.toString=function(){return"".concat(this.version,"-").concat(this.traceId,"-").concat(this.spanId,"-").concat(this.traceFlag)},f.DEFAULT_TRACE_FLAG="01",f.DEFAULT_VERSION="00",f);function f(e,t){var n=this;n.traceFlag=f.DEFAULT_TRACE_FLAG,n.version=f.DEFAULT_VERSION,e&&f.isValidTraceId(e)?n.traceId=e:n.traceId=Ct(),t&&f.isValidSpanId(t)?n.spanId=t:n.spanId=Ct().substr(0,16)}var Yt="ai.ajxmn.",Zt="diagLog",K="ajaxData",Qt="throwInternal",en="fetch",tn=0;function nn(e){var t=!1,n=(function(){var e=!1;try{e=!!l(ze)}catch(t){}return e}()&&(t=!(_(n=XMLHttpRequest[P])||_(n.open)||_(n.send)||_(n.abort))),function(e){var t=((e=(e=void 0===e?null:e)?e:(t=Ge()||{})?(t.userAgent||"").toLowerCase():"")||"").toLowerCase();if(Re(t,Ve))return e=Xe()||{},Math.max(parseInt(t.split(Ve)[1]),e[_e]||0);if(Re(t,We)){e=parseInt(t.split(We)[1]);if(e)return e+4}return null}());if(t=!(n&&n<9)&&t)try{(new XMLHttpRequest)[K]={};var r=XMLHttpRequest[P].open;XMLHttpRequest[P].open=r}catch(o){t=!1,on(e,N.FailedMonitorAjaxOpen,"Failed to enable XMLHttpRequest monitoring, extension is not supported",{exception:z(o)})}return t}function rn(e){var t="";try{_(e)||_(e[K])||_(e[K].requestUrl)||(t+="(url: '"+e[K].requestUrl+"')")}catch(n){}return t}function on(e,t,n,r,o){e[Zt]()[Qt](y.CRITICAL,t,n,r,o)}function an(e,t,n,r,o){e[Zt]()[Qt](y.WARNING,t,n,r,o)}function sn(t,n,r){return function(e){on(t,n,r,{ajaxDiagnosticsMessage:rn(e.inst),exception:z(e.err)})}}function un(e,t){return e&&t?e.indexOf(t):-1}R(X,ln=t),X.getDefaultConfig=function(){return{maxAjaxCallsPerView:500,disableAjaxTracking:!1,disableFetchTracking:!0,excludeRequestFromAutoTrackingPatterns:undefined,disableCorrelationHeaders:!1,distributedTracingMode:B.AI_AND_W3C,correlationHeaderExcludedDomains:["*.blob.core.windows.net","*.blob.core.chinacloudapi.cn","*.blob.core.cloudapi.de","*.blob.core.usgovcloudapi.net"],correlationHeaderDomains:undefined,correlationHeaderExcludePatterns:undefined,appId:undefined,enableCorsCorrelation:!1,enableRequestHeaderTracking:!1,enableResponseHeaderTracking:!1,enableAjaxErrorStatusText:!1,enableAjaxPerfTracking:!1,maxAjaxPerfLookupAttempts:3,ajaxPerfLookupDelay:25,ignoreHeaders:["Authorization","X-API-Key","WWW-Authenticate"],addRequestContext:undefined}},X.getEmptyConfig=function(){var t=this.getDefaultConfig();return U(t,function(e){t[e]=undefined}),t},X.prototype.processTelemetry=function(e,t){this.processNext(e,t)},X.identifier="AjaxDependencyPlugin";var ln,r=X;function X(){var y,C,T,I,b,A,S,e=ln.call(this)||this,w=(e.identifier=X.identifier,e.priority=120,"trackDependencyDataInternal"),t=typeof location===s&&location?location:l("location"),M=!1,q=!1,F=t&&t.host&&t.host.toLowerCase(),R=X.getEmptyConfig(),D=!1,r=0,L=!1,E=0,k=!1,j=[],H={};return x(X,e,function(c,s){function d(t){var n=!0;return(t||R.ignoreHeaders)&&W(R.ignoreHeaders,function(e){if(e.toLowerCase()==t.toLowerCase())return n=!1,-1}),n}function u(e,t,n){j.push(e?wt(e[P],t,n,!1):null)}function f(e,t,n){var r=!1,o=((V(t)?t:(t||{}).url||"")||"").toLowerCase();if(W(b,function(e){var t=e;V(e)&&(t=RegExp(e)),r=r||t.test(o)}),r)return r;var a=un(o,"?"),i=un(o,"#");return-1!==(a=-1===a||-1!==i&&i<a?i:a)&&(o=o.substring(0,a)),_(e)?_(t)||(r="object"==typeof t&&!0===t[Dt]||!!n&&!0===n[Dt]):r=!0===e[Dt]||!0===o[Dt],(r=!(r||!o||(i=o,!~Nt.indexOf(i.toLowerCase())))||r)?H[o]||(H[o]=1):H[o]&&(r=!0),r}function p(e,t){var n=!0,r=q;return _(e)||(n=!0===t||!_(e[K])),r&&n}function g(n){n[K].xhrMonitoringState.stateChangeAttached=function(e,t,n,r){void 0===r&&(r=!1);var o=!1;if(!_(e))try{_(e[fe])?_(e[de])||(e[de]("on"+t,n),o=!0):(e[fe](t,n,r),o=!0)}catch(a){}return o}(n,"readystatechange",function(){try{n&&4===n.readyState&&p(n)&&((a=(o=n)[K]).responseFinishedTime=Ot(),a.status=o.status,l("xmlhttprequest",a,function(){try{var e=a.CreateTrackItem("Ajax",D,function(){var e,n,t={statusText:o.statusText,headerMap:null,correlationContext:i(o),type:o.responseType,responseText:function(e){try{var t=e.responseType;if(""===t||"text"===t)return e.responseText}catch(n){}return null}(o),response:o.response};return k&&(e=o.getAllResponseHeaders())&&(e=Le(e).split(/[\r\n]+/),n={},W(e,function(e){var e=e.split(": "),t=e.shift(),e=e.join(": ");d(t)&&(n[t]=e)}),t.headerMap=n),t}),t=void 0;try{A&&(t=A({status:o.status,xhr:o}))}catch(n){an(c,N.FailedAddingCustomDefinedRequestContext,"Failed to add custom defined request context as configured call back may missing a null check.")}e?(t!==undefined&&(e.properties=$($({},e.properties),t)),c[w](e)):r(null,{requestSentTime:a.requestSentTime,responseFinishedTime:a.responseFinishedTime})}finally{try{o[K]=null}catch(n){}}},function(e){r(e,null)}))}catch(t){var e=z(t);e&&-1!==un(e.toLowerCase(),"c00c023f")||on(c,N.FailedMonitorAjaxRSC,"Failed to monitor XMLHttpRequest 'readystatechange' event handler, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:rn(n),exception:e})}function r(e,t){t=t||{};t.ajaxDiagnosticsMessage=rn(o),e&&(t.exception=z(e)),an(c,N.FailedMonitorAjaxDur,"Failed to calculate the duration of the ajax call, monitoring data for this ajax call won't be sent.",t)}var o,a})}function i(e){try{var t,n=e.getAllResponseHeaders();if(null!==n&&-1!==un(n.toLowerCase(),"request-context"))return t=e.getResponseHeader("Request-Context"),_t.getCorrelationContext(t)}catch(r){an(c,N.FailedMonitorAjaxGetCorrelationHeader,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{ajaxDiagnosticsMessage:rn(e),exception:z(r)})}}function h(e,t){var n;t.requestUrl&&I&&L&&(n=$e())&&O(n.mark)&&(e=I+e+"#"+ ++tn,n.mark(e),(e=n.getEntriesByName(e))&&1===e.length&&(t.perfMark=e[0]))}function l(a,i,s,u){var l=i.perfMark,c=$e(),d=R.maxAjaxPerfLookupAttempts,f=R.ajaxPerfLookupDelay,p=i.requestUrl,g=0;!function h(){try{if(c&&l){g++;for(var e=null,t=c.getEntries(),n=t.length-1;0<=n;n--){var r=t[n];if(r){if("resource"===r.entryType)r.initiatorType!==a||-1===un(r.name,p)&&-1===un(p,r.name)||(e=r);else if("mark"===r.entryType&&r.name===l.name){i.perfTiming=e;break}if(r.startTime<l.startTime-1e3)break}}}!l||i.perfTiming||d<=g||!1===i["async"]?(l&&O(c.clearMarks)&&c.clearMarks(l.name),i.perfAttempts=g,s()):setTimeout(h,f)}catch(o){u(o)}}()}function m(e){var t="";try{_(e)||(t+="(url: '".concat("string"==typeof e?e:e.url,"')"))}catch(n){on(c,N.FailedMonitorAjaxOpen,"Failed to grab failed fetch diagnostics message",{exception:z(n)})}return t}function v(e,r,o,a,i,s){function u(e,t,n){n=n||{};n.fetchDiagnosticsMessage=m(o),t&&(n.exception=z(t)),an(c,e,"Failed to calculate the duration of the fetch call, monitoring data for this fetch call won't be sent.",n)}i&&(i.responseFinishedTime=Ot(),i.status=r,l("fetch",i,function(){var e,t=i.CreateTrackItem("Fetch",D,s);try{A&&(e=A({status:r,request:o,response:a}))}catch(n){an(c,N.FailedAddingCustomDefinedRequestContext,"Failed to add custom defined request context as configured call back may missing a null check.")}t?(e!==undefined&&(t.properties=$($({},t.properties),e)),c[w](t)):u(N.FailedMonitorAjaxDur,null,{requestSentTime:i.requestSentTime,responseFinishedTime:i.responseFinishedTime})},function(e){u(N.FailedMonitorAjaxGetCorrelationHeader,e,null)}))}function x(e){if(e&&e.headers)try{var t=e.headers.get("Request-Context");return _t.getCorrelationContext(t)}catch(n){an(c,N.FailedMonitorAjaxGetCorrelationHeader,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{fetchDiagnosticsMessage:m(e),exception:z(n)})}}c.initialize=function(e,t,n,r){if(!c.isInitialized()){s.initialize(e,t,n,r);var o=c._getTelCtx(),t=(U(X.getDefaultConfig(),function(e,t){R[e]=o.getConfig(X.identifier,e,t)}),R.distributedTracingMode);if(D=R.enableRequestHeaderTracking,S=R.enableAjaxErrorStatusText,L=R.enableAjaxPerfTracking,E=R.maxAjaxCallsPerView,k=R.enableResponseHeaderTracking,b=R.excludeRequestFromAutoTrackingPatterns,A=R.addRequestContext,T=t===B.AI||t===B.AI_AND_W3C,C=t===B.AI_AND_W3C||t===B.W3C,L&&(r=e.instrumentationKey||"unkwn",I=5<r.length?Yt+r.substring(r.length-5)+".":Yt+r+"."),!1===R.disableAjaxTracking&&nn(c)&&!q&&(u(XMLHttpRequest,"open",{req:function(e,t,n,r){var o,a,e=e.inst,i=e[K];!f(e,n)&&p(e,!0)&&(i&&i.xhrMonitoringState.openDone||(i=e,t=t,n=n,r=r,a=y&&y.telemetryTrace&&y.telemetryTrace.traceID||Ct(),o=Ct().substr(0,16),(a=new $t(a,o,c[Zt]())).method=t,a.requestUrl=n,a.xhrMonitoringState.openDone=!0,a.requestHeaders={},a["async"]=r,a.errorStatusText=S,i[K]=a),g(e))},hkErr:sn(c,N.FailedMonitorAjaxOpen,"Failed to monitor XMLHttpRequest.open, monitoring data for this ajax call may be incorrect.")}),u(XMLHttpRequest,"send",{req:function(e,t){var e=e.inst,n=e[K];p(e)&&!n.xhrMonitoringState.sendDone&&(h("xhr",n),n.requestSentTime=Ot(),c.includeCorrelationHeaders(n,undefined,undefined,e),n.xhrMonitoringState.sendDone=!0)},hkErr:sn(c,N.FailedMonitorAjaxSend,"Failed to monitor XMLHttpRequest, monitoring data for this ajax call may be incorrect.")}),u(XMLHttpRequest,"abort",{req:function(e){var e=e.inst,t=e[K];p(e)&&!t.xhrMonitoringState.abortDone&&(t.aborted=1,t.xhrMonitoringState.abortDone=!0)},hkErr:sn(c,N.FailedMonitorAjaxAbort,"Failed to monitor XMLHttpRequest.abort, monitoring data for this ajax call may be incorrect.")}),D&&u(XMLHttpRequest,"setRequestHeader",{req:function(e,t,n){e=e.inst;p(e)&&d(t)&&(e[K].requestHeaders[t]=n)},hkErr:sn(c,N.FailedMonitorAjaxSetRequestHeader,"Failed to monitor XMLHttpRequest.setRequestHeader, monitoring data for this ajax call may be incorrect.")}),q=!0),(e=!(t=G())||_(t.Request)||_(t.Request[P])||_(t[en])?null:t[en])&&(r=G(),l=e.polyfill,!1===R.disableFetchTracking?(j.push(wt(r,en,{req:function(e,t,n){var r,o,a,i,s,u;!M||f(null,t,n)||l&&q||(r=e.ctx(),o=t,a=n,i=y&&y.telemetryTrace&&y.telemetryTrace.traceID||Ct(),s=Ct().substr(0,16),(i=new $t(i,s,c[Zt]())).requestSentTime=Ot(),i.errorStatusText=S,o instanceof Request?i.requestUrl=o?o.url:"":i.requestUrl=o,s="GET",a&&a.method?s=a.method:o&&o instanceof Request&&(s=o.method),i.method=s,u={},D&&new Headers((a?a.headers:0)||o instanceof Request&&o.headers||{}).forEach(function(e,t){d(t)&&(u[t]=e)}),i.requestHeaders=u,h("fetch",i),s=i,(a=c.includeCorrelationHeaders(s,t,n))!==n&&e.set(1,a),r.data=s)},rsp:function(e,n){var r=e.ctx().data;r&&(e.rslt=e.rslt.then(function(t){return v(0,(t||{}).status,n,t,r,function(){var n,e={statusText:t.statusText,headerMap:null,correlationContext:x(t)};return k&&(n={},t.headers.forEach(function(e,t){d(t)&&(n[t]=e)}),e.headerMap=n),e}),t})["catch"](function(e){throw v(0,0,n,null,r,null,e.message),e}))},hkErr:sn(c,N.FailedMonitorAjaxOpen,"Failed to monitor Window.fetch, monitoring data for this fetch call may be incorrect.")})),M=!0):l&&j.push(wt(r,en,{req:function(e,t,n){f(null,t,n)}})),l&&(r[en].polyfill=l)),0<n.length&&n){for(var a=void 0,i=0;!a&&i<n.length;)n[i]&&"AppInsightsPropertiesPlugin"===n[i].identifier&&(a=n[i]),i++;a&&(y=a.context)}}var l},c.teardown=function(){W(j,function(e){e.rm()}),q=M=!(j=[]),c.setInitialized(!1)},c.trackDependencyData=function(e,t){c[w](e,t)},c.includeCorrelationHeaders=function(e,t,n,r){var o,a,i,s=c._currentWindowHost||F;return t?(_t.canIncludeCorrelationHeader(R,e.getAbsoluteUrl(),s)&&((n=n||{}).headers=new Headers(n.headers||t instanceof Request&&t.headers||{}),T&&(o="|"+e.traceID+"."+e.spanID,n.headers.set("Request-Id",o),D&&(e.requestHeaders["Request-Id"]=o)),(a=R.appId||y&&y.appId())&&(n.headers.set("Request-Context","appId=cid-v1:"+a),D&&(e.requestHeaders["Request-Context"]="appId=cid-v1:"+a)),C&&(i=new Jt(e.traceID,e.spanID),n.headers.set("traceparent",i.toString()),D&&(e.requestHeaders.traceparent=i.toString()))),n):r?(_t.canIncludeCorrelationHeader(R,e.getAbsoluteUrl(),s)&&(T&&(o="|"+e.traceID+"."+e.spanID,r.setRequestHeader("Request-Id",o),D&&(e.requestHeaders["Request-Id"]=o)),(a=R.appId||y&&y.appId())&&(r.setRequestHeader("Request-Context","appId=cid-v1:"+a),D&&(e.requestHeaders["Request-Context"]="appId=cid-v1:"+a)),C&&(i=new Jt(e.traceID,e.spanID),r.setRequestHeader("traceparent",i.toString()),D&&(e.requestHeaders.traceparent=i.toString()))),r):undefined},c[w]=function(e,t,n){-1===E||r<E?(R.distributedTracingMode!==B.W3C&&R.distributedTracingMode!==B.AI_AND_W3C||"string"!=typeof e.id||"."===e.id[e.id.length-1]||(e.id+="."),_(e.startTime)&&(e.startTime=new Date),e=Bt.create(e,Wt.dataType,Wt.envelopeType,c[Zt](),t,n),c.core.track(e)):r===E&&on(c,N.MaxAjaxPerPVExceeded,"Maximum ajax per page view limit reached, ajax monitoring is paused until the next trackPageView(). In order to increase the limit set the maxAjaxCallsPerView configuration parameter.",!0),++r}}),e}e.AjaxPlugin=r,e.ajaxRecord=$t;u=e,t="__esModule",r={value:!0},e=Object.defineProperty;if(e)try{return void e(u,t,r)}catch(pn){}typeof r.value!==undefined&&(u[t]=r.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-dependencies-js.min.js.map
|