@microsoft/applicationinsights-dependencies-js
Advanced tools
Comparing version 2.6.2 to 2.6.3
/*! | ||
* Application Insights JavaScript SDK - Dependencies Plugin, 2.6.2 | ||
* Application Insights JavaScript SDK - Dependencies Plugin, 2.6.3 | ||
* Copyright (c) Microsoft and contributors. All rights reserved. | ||
*/ | ||
var e=this,t=function(e){"use strict";var i="function",s="object",u="undefined",N="prototype",r="hasOwnProperty",n=Object,t=n[N],a=n.create,o=n.defineProperty,l=t[r];function _(){return typeof globalThis!==u&&globalThis?globalThis:typeof self!==u&&self?self:typeof window!==u&&window?window:typeof global!==u&&global?global:null}function c(e){throw new TypeError(e)}(_()||{}).Symbol,(_()||{}).Reflect;var d=function(e,t){return(d=n.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t[r](n)&&(e[n]=t[n])})(e,t)};function f(e,t){function n(){this.constructor=e}typeof t!==i&&null!==t&&c("Class extends value "+t+" is not a constructor or null"),d(e,t),e[N]=null===t?function(e){if(a)return a(e);if(null==e)return{};var t=typeof e;function n(){}return t!==s&&t!==i&&c("Object prototype may only be an Object:"+e),n[N]=e,new n}(t):(n[N]=t[N],new n)}var p,g="constructor",h="prototype",m="function",x="_dynInstFuncs",v="_isDynProxy",T="_dynClass",y="_dynCls$",C="_dynInstChk",A=C,I="_dfOpts",M="_unknown_",S="__proto__",b="useBaseInst",E="setInstFuncs",q=Object,H=q.getPrototypeOf,w=0;function D(e,t){return e&&q[h].hasOwnProperty.call(e,t)}function L(e){return e&&(e===q[h]||e===Array[h])}function R(e){return L(e)||e===Function[h]}function F(e){if(e){if(H)return H(e);if(e=e[S]||e[h]||(e[g]?e[g][h]:null))return e}return null}function P(e,t){var n=[],r=q.getOwnPropertyNames;if(r)n=r(e);else for(var a in e)"string"==typeof a&&D(e,a)&&n.push(a);if(n&&0<n.length)for(var o=0;o<n.length;o++)t(n[o])}function j(e,t,n){return t!==g&&typeof e[t]===m&&(n||D(e,t))}function k(e){throw new TypeError("DynamicProto: "+e)}function O(e,t){for(var n=e.length-1;0<=n;n--)if(e[n]===t)return 1}function G(e,t){return D(e,h)?e.name||t||M:((e||{})[g]||{}).name||t||M}function z(e,r,t,n){D(e,h)||k("theClass is an invalid class definition.");var a=e[h];!function(e){if(H)for(var t=[],n=F(r);n&&!R(n)&&!O(t,n);){if(n===e)return 1;t.push(n),n=F(n)}}(a)&&k("["+G(e)+"] is not in class hierarchy of ["+G(r)+"]");var o=null;D(a,T)?o=a[T]:(o=y+G(e,"_")+"$"+w,w++,a[T]=o);var i,s,u,l,c,d,f=z[I],p=!!f[b];p&&n&&n[b]!==undefined&&(p=!!n[b]),t(r,function(e,t,n,o){function r(e,t,n){var r,a=t[n];return a[v]&&o&&!1!==(r=e[x]||{})[A]&&(a=(r[t[T]]||{})[n]||a),function(){return a.apply(e,arguments)}}var a={};P(n,function(e){a[e]=r(t,n,e)});for(var i=F(e),s=[];i&&!R(i)&&!O(s,i);)P(i,function(e){!a[e]&&j(i,e,!H)&&(a[e]=r(t,i,e))}),s.push(i),i=F(i);return a}(a,r,(s={},P(i=r,function(e){!s[e]&&j(i,e,!1)&&(s[e]=i[e])}),e=s),p)),u=a,o=o,l=r,c=e,n=!1!==(f=(f=!!H&&!!f[E])&&n?!!n[E]:f),L(u)||(f=l[x]=l[x]||{},d=f[o]=f[o]||{},!1!==f[A]&&(f[A]=!!n),P(l,function(e){var n,r,a;j(l,e,!1)&&l[e]!==c[e]&&(d[e]=l[e],delete l[e],D(u,e)&&(!u[e]||u[e][v])||(u[e]=(n=u,r=e,(a=function(){var e,t;return(function(e,t,n,r){var a=null;if(e&&D(n,T)){var o=e[x]||{};if((a=(o[n[T]]||{})[t])||k("Missing ["+t+"] "+m),!a[C]&&!1!==o[A]){for(var i=!D(e,t),s=F(e),u=[];i&&s&&!R(s)&&!O(u,s);){var l=s[t];if(l){i=l===r;break}u.push(s),s=F(s)}try{i&&(e[t]=a),a[C]=1}catch(c){o[A]=!1}}}return a}(this,r,n,a)||(typeof(t=(t=n[e=r])===a?F(n)[e]:t)!==m&&k("["+e+"] is not a "+m),t)).apply(this,arguments)})[v]=1,a)))}))}z[I]={setInstFuncs:!0,useBaseInst:!0},(ke=p=p||{})[ke.CRITICAL=1]="CRITICAL",ke[ke.WARNING=2]="WARNING";var U={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},X="attachEvent",V="addEventListener",W="detachEvent",B="removeEventListener",K=o;function $(e){return t.toString.call(e)}function J(e){return e===undefined||typeof e===u}function Y(e){return null===e||J(e)}function Z(e){return typeof e===i}function Q(e,t,n,r){void 0===r&&(r=!1);var a=!1;if(!Y(e))try{Y(e[V])?Y(e[X])||(e[X]("on"+t,n),a=!0):(e[V](t,n,r),a=!0)}catch(o){}return a}function ee(e,t,n,r){if(void 0===r&&(r=!1),!Y(e))try{Y(e[B])?Y(e[W])||e[W]("on"+t,n):e[B](t,n,r)}catch(a){}}function te(e,t){if(e)for(var n in e)l.call(e,n)&&t.call(e,n,e[n])}function ne(e,t){return!(!e||!t||!~e.indexOf(t))}function re(e){return"string"==typeof e}function ae(e,t,n){for(var r=e.length,a=0;a<r&&!(a in e&&-1===t.call(n||e,e[a],a,e));a++);}var oe=!{toString:null}.propertyIsEnumerable("toString"),ie=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];function se(e){var t=typeof e;t===i||t===s&&null!==e||c("objKeys called on non-object");var n,r=[];for(n in e)e&&l.call(e,n)&&r.push(n);if(oe)for(var a=ie.length,o=0;o<a;o++)e&&l.call(e,ie[o])&&r.push(ie[o]);return r}function ue(){var e=Date;return e.now?e.now():(new e).getTime()}var le="window",ce="navigator",de="location",fe="performance",pe="JSON",ge="crypto",he="msCrypto",me="msie",xe="trident/",ve=null,Te=null;function ye(e){var t=_();return t&&t[e]?t[e]:e===le&&typeof window===s&&window?window:null}function Ce(){return typeof navigator===s&&navigator?navigator:ye(ce)}function Ae(){return ye(fe)}function Ie(){return typeof JSON===s&&JSON||null!==ye(pe)}function Me(){return Ie()?JSON||ye(pe):null}function Se(e){var t=Object[N].toString.call(e),n="";return"[object Error]"===t?n="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":Ie()&&(n=Me().stringify(e)),t+n}function be(e){return e?'"'+e.replace(/\"/g,"")+'"':""}var Ee=(qe.dataType="MessageData",qe);function qe(e,t,n,r){void 0===n&&(n=!1),this.messageId=e,this.message=(n?"AI: ":"AI (Internal): ")+e,e="",Ie()&&(e=Me().stringify(r)),e=(t?" message:"+be(t):"")+(r?" props:"+be(e):""),this.message+=e}var He=function Bt(n){this.identifier="DiagnosticLogger",this.queue=[];var a=0,i={};z(Bt,this,function(o){function e(e,t){return Y(e=n[e])?t:e}Y(n)&&(n={}),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){if(n=new Ee(t,n,a=void 0!==a&&a,r),o.enableDebugExceptions())throw n;J(n)||!n||J(n.message)||(r=o.consoleLoggingLevel(),a?(a=+n.messageId,!i[a]&&r>=p.WARNING&&(o.warnToConsole(n.message),i[a]=!0)):r>=p.WARNING&&o.warnToConsole(n.message),o.logInternalMessage(e,n))},o.warnToConsole=function(e){var t,n=typeof console!==u?console:ye("console");n&&(t="log",Z(n[t=n.warn?"warn":t])&&n[t](e))},o.resetInternalMessageCount=function(){a=0,i={}},o.logInternalMessage=function(e,t){var n,r;a>=o.maxInternalMessageLimit()||(n=!0,r="AITR_"+t.messageId,i[r]?n=!1:i[r]=!0,n&&(e<=o.telemetryLoggingLevel()&&(o.queue.push(t),a++),a===o.maxInternalMessageLimit()&&(t=new Ee(U.MessageLimitPerPVExceeded,e="Internal events throttle limit per PageView reached for this app.",!1),o.queue.push(t),o.warnToConsole(e))))}})},we="ctx",De=(Le.ParentContextKey="parent",Le.ChildrenContextKey="childEvts",Le);function Le(e,a,t){var r,o=this,i=!1;o.start=ue(),o.name=e,o.isAsync=t,o.isChildEvt=function(){return!1},Z(a)&&(i=function(e){if(K)try{var t={enumerable:!0,configurable:!0,get:function(){return!r&&Z(a)&&(r=a(),a=null),r}};return K(e,"payload",t),!0}catch(n){}return!1}(o)),o.getCtx=function(e){return e?(e===Le.ParentContextKey||e===Le.ChildrenContextKey?o:o[we]||{})[e]:null},o.setCtx=function(e,t){e&&(e===Le.ParentContextKey?(o[e]||(o.isChildEvt=function(){return!0}),o[e]=t):e===Le.ChildrenContextKey?o[e]=t:(o[we]=o[we]||{})[e]=t)},o.complete=function(){var e=0,t=o.getCtx(Le.ChildrenContextKey);if("[object Array]"===$(t))for(var n=0;n<t.length;n++){var r=t[n];r&&(e+=r.time)}o.time=ue()-o.start,o.exTime=o.time-e,o.complete=function(){},!i&&Z(a)&&(o.payload=a())}}var Ne="CoreUtils.doPerf";function _e(e,t,n,r,a){if(e){var o=e;if(o=o&&Z(o.getPerfMgr)?o.getPerfMgr():o){var i,s=void 0,e=o.getCtx(Ne);try{if(s=o.create(t(),r,a))return e&&s.setCtx&&(s.setCtx(De.ParentContextKey,e),e.getCtx&&e.setCtx&&((i=e.getCtx(De.ChildrenContextKey))||(i=[],e.setCtx(De.ChildrenContextKey,i)),i.push(s))),o.setCtx(Ne,s),n(s)}catch(u){s&&s.setCtx&&s.setCtx("exception",u)}finally{s&&o.fire(s),o.setCtx(Ne,e)}}}return n()}var Re=function(a,t){var o=this,i=null,s=Z(a.processTelemetry),u=Z(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){var e=a?a.identifier:"TelemetryPluginChain";_e((r=r||t)?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(p.CRITICAL,U.PluginException,"Plugin ["+a.identifier+"] failed during processTelemetry - "+t),i&&!e&&i.processTelemetry(n,r)}}else i&&(o._hasRun=!0,i.processTelemetry(n,r))},function(){return{item:n}},!n.sync)}};function Fe(e,t){var n=[];if(e&&0<e.length)for(var r=null,a=0;a<e.length;a++){var o=e[a];o&&Z(o.processTelemetry)&&(o=new Re(o,t),n.push(o),r&&r.setNext(o),r=o)}return 0<n.length?n[0]:null}var Pe=function Kt(e,a,n,t){var r,o,i,s,u=this,l=null;null!==t&&(e&&Z(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),Fe(r,t)}(e,u,t||e.getPlugin()):t?(r=u,i=e,s=!1,(o=t)&&e&&(i=[],ae(e,function(e){!s&&e!==o||(s=!0,i.push(e))})),o&&!s&&(i=i||[]).push(o),l=Fe(i,r)):J(t)&&(l=Fe(e,u))),u.core=function(){return n},u.diagLog=function(){return(n||{}).logger||new He(a)},u.getCfg=function(){return a},u.getExtCfg=function(e,t){var n,r;return void 0===t&&(t={}),!a||(r=a.extensionConfig)&&e&&(n=r[e]),n||t},u.getConfig=function(e,t,n){var r;return void 0===n&&(n=!1),(e=u.getExtCfg(e,null))&&!Y(e[t])?r=e[t]:a&&!Y(a[t])&&(r=a[t]),Y(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 Kt((e=void 0===e?null:e)||l,a,n,t)}},je="getPlugin",ke=(Oe.prototype.initialize=function(e,t,n,r){this._baseTelInit(e,t,n,r)},Oe);function Oe(){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&&Z(c.processTelemetry)&&c.processTelemetry(e,null)},s._getTelCtx=function(e){var t=e=void 0===e?null:e;return t||(e=l||new Pe(null,{},s.core),t=c&&c[je]?e.createNew(null,c[je]):e.createNew(null,c)),t},s._baseTelInit=function(e,t,n,r){var a,o;e&&(a="extensionConfig",i=o=[],!e||(i=e[a])!==o&&Y(i)&&(e[a]=i=o)),!r&&t&&(r=t.getProcessTelContext().getNext());var i=c;c&&c[je]&&(i=c[je]()),s.core=t,l=new Pe(r,e,t,i),u=!0}}var Ge=4294967296,ze=4294967295,Ue=!1,Xe=123456789,Ve=987654321;function We(e){var t=ye(ge)||ye(he),n=t&&t.getRandomValues?t.getRandomValues(new Uint32Array(1))[0]&ze:(!(n=Ce())||n.userAgent===Te&&null!==ve||(n=((Te=n.userAgent)||"").toLowerCase(),ve=ne(n,me)||ne(n,xe)),ve?(Ue||function(){try{var e=2147483647&ue();(t=(Math.random()*Ge^e)+e)<0&&(t>>>=0),Xe=123456789+t&ze,Ve=987654321-t&ze,Ue=!0}catch(n){}var t}(),t=((Ve=36969*(65535&Ve)+(Ve>>16)&ze)<<16)+(65535&(Xe=18e3*(65535&Xe)+(Xe>>16)&ze))>>>0&ze|0,(t>>>=0)&ze):Math.floor(Ge*Math.random()|0));return e||(n>>>=0),n}function Be(){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=We())]+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&We())|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 Ke={Attach:Q,AttachEvent:Q,Detach:ee,DetachEvent:ee},$e="_aiHooks",Je=["req","rsp","hkErr","fnErr"],Ye="__proto__",Ze="constructor";function Qe(e,t){if(e)for(var n=0;n<e.length&&!t(e[n],n);n++);}function et(e,i,s,u,l){0<=l&&l<=2&&Qe(e,function(e,t){var n=e.cbks;if(e=n[Je[l]]){i.ctx=function(){return u[t]=u[t]||{}};try{e.apply(i.inst,s)}catch(a){e=i.err;try{var r=n[Je[2]];r&&(i.err=a,r.apply(i.inst,s))}catch(o){}finally{i.err=e}}}})}function tt(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 Qe(e,function(e){t.push(e)}),t}et(e,r,a,t,0);var i=u.f;try{r.rslt=i.apply(this,n)}catch(s){throw r.err=s,et(e,r,a,t,3),s}return et(e,r,a,t,1),r.rslt}}var nt=Object.getPrototypeOf;function rt(e,t,n,r){if(void 0===r&&(r=!0),e&&t&&n&&(e=function o(e,t,n){var r=null;return e&&(e&&l.call(e,t)?r=e:n&&(r=o(function(e){if(e){if(nt)return nt(e);if(e=e[Ye]||e[N]||e[Ze])return e}return null}(e),t,!1))),r}(e,t,r))&&typeof(r=e[t])===i){var a=r[$e];return a||((r=tt(a={i:0,n:t,f:r,h:[]}))[$e]=a,e[t]=r),n={id:a.i,cbks:n,rm:function(){var n=this.id;Qe(a.h,function(e,t){return e.id===n&&(a.h.splice(t,1),1)})}},a.i++,a.h.push(n),n}return null}var at={requestContextHeader:"Request-Context",requestContextTargetKey:"appId",requestContextAppIdFormat:"appId=cid-v1:",requestIdHeader:"Request-Id",traceParentHeader:"traceparent",traceStateHeader:"tracestate",sdkContextHeader:"Sdk-Context",sdkContextHeaderAppIdRequest:"appId",requestContextHeaderLowerCase:"request-context"},ot=(it.sanitizeKeyAndAddUniqueness=function(e,t,n){var r=t.length,a=it.sanitizeKey(e,t);if(a.length!==r){for(var o=0,i=a;n[i]!==undefined;)o++,i=a.substring(0,it.MAX_NAME_LENGTH-3)+it.padNumber(o);a=i}return a},it.sanitizeKey=function(e,t){var n;return t&&(t=it.trim(t.toString())).length>it.MAX_NAME_LENGTH&&(n=t.substring(0,it.MAX_NAME_LENGTH),e.throwInternal(p.WARNING,U.NameTooLong,"name is too long. It has been truncated to "+it.MAX_NAME_LENGTH+" characters.",{name:t},!0)),n||t},it.sanitizeString=function(e,t,n){var r;return void 0===n&&(n=it.MAX_STRING_LENGTH),t&&(n=n||it.MAX_STRING_LENGTH,(t=it.trim(t)).toString().length>n&&(r=t.toString().substring(0,n),e.throwInternal(p.WARNING,U.StringValueTooLong,"string value is too long. It has been truncated to "+n+" characters.",{value:t},!0))),r||t},it.sanitizeUrl=function(e,t){return it.sanitizeInput(e,t,it.MAX_URL_LENGTH,U.UrlTooLong)},it.sanitizeMessage=function(e,t){var n;return t&&t.length>it.MAX_MESSAGE_LENGTH&&(n=t.substring(0,it.MAX_MESSAGE_LENGTH),e.throwInternal(p.WARNING,U.MessageTruncated,"message is too long, it has been truncated to "+it.MAX_MESSAGE_LENGTH+" characters.",{message:t},!0)),n||t},it.sanitizeException=function(e,t){var n;return t&&t.length>it.MAX_EXCEPTION_LENGTH&&(n=t.substring(0,it.MAX_EXCEPTION_LENGTH),e.throwInternal(p.WARNING,U.ExceptionTruncated,"exception is too long, it has been truncated to "+it.MAX_EXCEPTION_LENGTH+" characters.",{exception:t},!0)),n||t},it.sanitizeProperties=function(r,e){var a;return e&&(a={},te(e,function(e,t){if(typeof t===s&&Ie())try{t=Me().stringify(t)}catch(n){r.throwInternal(p.WARNING,U.CannotSerializeObjectNonSerializable,"custom property is not valid",{exception:n},!0)}t=it.sanitizeString(r,t,it.MAX_PROPERTY_LENGTH),e=it.sanitizeKeyAndAddUniqueness(r,e,a),a[e]=t}),e=a),e},it.sanitizeMeasurements=function(n,e){var r;return e&&(r={},te(e,function(e,t){e=it.sanitizeKeyAndAddUniqueness(n,e,r),r[e]=t}),e=r),e},it.sanitizeId=function(e,t){return t&&it.sanitizeInput(e,t,it.MAX_ID_LENGTH,U.IdTooLong).toString()},it.sanitizeInput=function(e,t,n,r){var a;return t&&(t=it.trim(t)).length>n&&(a=t.substring(0,n),e.throwInternal(p.WARNING,r,"input is too long, it has been truncated to "+n+" characters.",{data:t},!0)),a||t},it.padNumber=function(e){return(e="00"+e).substr(e.length-3)},it.trim=function(e){return re(e)?e.replace(/^\s+|\s+$/g,""):e},it.MAX_NAME_LENGTH=150,it.MAX_ID_LENGTH=128,it.MAX_PROPERTY_LENGTH=8192,it.MAX_STRING_LENGTH=1024,it.MAX_URL_LENGTH=2048,it.MAX_MESSAGE_LENGTH=32768,it.MAX_EXCEPTION_LENGTH=32768,it);function it(){}function st(e){var t=""+(e=Math.round(e=isNaN(e)||e<0?0:e))%1e3,n=""+Math.floor(e/1e3)%60,r=""+Math.floor(e/6e4)%60,a=""+Math.floor(e/36e5)%24,t=1===t.length?"00"+t:2===t.length?"0"+t:t,n=n.length<2?"0"+n:n,r=r.length<2?"0"+r:r;return(0<(e=Math.floor(e/864e5))?e+".":"")+(a=a.length<2?"0"+a:a)+":"+r+":"+n+"."+t}var ut,lt,ct="Microsoft_ApplicationInsights_BypassAjaxInstrumentation";(o={})[o.LocalStorage=0]="LocalStorage",o[o.SessionStorage=1]="SessionStorage",(o=ut={})[o.Default=0]="Default",o[o.Required=1]="Required",o[o.Array=2]="Array",o[o.Hidden=4]="Hidden",(o=lt=lt||{})[o.AI=0]="AI",o[o.AI_AND_W3C=1]="AI_AND_W3C",o[o.W3C=2]="W3C";var dt=(typeof document===s&&document?document:ye("document"))||{},ft=0,pt=[null,null,null,null,null];function gt(e){var t,n,r=ft,a=pt,o=a[r];return dt.createElement?a[r]||(o=a[r]=dt.createElement("a")):o={host:(t=ht(t=e,!0))&&null!=(n=t.match(/(www[0-9]?\.)?(.[^/:]+)(\:[\d]+)?/i))&&3<n.length&&re(n[2])&&0<n[2].length?n[2]+(n[3]||""):t},o.href=e,++r>=a.length&&(r=0),ft=r,o}function ht(e,t){var n=null;return!e||null!=(e=e.match(/(\w*):\/\/(.[^/:]+)(\:[\d]+)?/i))&&2<e.length&&re(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 mt={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,o=gt(t).host.toLowerCase();if(o&&(~o.indexOf(":443")||~o.indexOf(":80"))&&(o=(ht(t,!0)||"").toLowerCase()),!(e&&e.enableCorsCorrelation||o===n))return!1;if((n=e&&e.correlationHeaderDomains)&&(ae(n,function(e){e=RegExp(e.toLowerCase().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,".*")).test(o))return!1;return o&&0<o.length},getCorrelationContext:function(e){if((e=e&&mt.getCorrelationContextValue(e,at.requestContextTargetKey))&&e!==mt.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 xt(){var e=Ae();return e&&e.now&&e.timing&&0<(e=e.now()+e.timing.navigationStart)?e:ue()}function vt(e,t){return 0===e||0===t||Y(e)||Y(t)?null:t-e}var Tt,yt=(f(Ct,Tt=function(){this.ver=2,this.success=!0,this.properties={},this.measurements={}}),Ct.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",Ct.dataType="RemoteDependencyData",Ct);function Ct(e,t,n,r,a,o,i,s,u,l,c,d){void 0===u&&(u="Ajax");var f=Tt.call(this)||this;f.aiDataContract={id:ut.Required,ver:ut.Required,name:ut.Default,resultCode:ut.Default,duration:ut.Default,success:ut.Default,data:ut.Default,target:ut.Default,type:ut.Default,properties:ut.Default,measurements:ut.Default,kind:ut.Default,value:ut.Default,count:ut.Default,min:ut.Default,max:ut.Default,stdDev:ut.Default,dependencyKind:ut.Default,dependencySource:ut.Default,commandName:ut.Default,dependencyTypeName:ut.Default},f.id=t,f.duration=st(a),f.success=o,f.resultCode=i+"",f.type=ot.sanitizeString(e,u);var p,g,i=(p=e,t=s,i=o=a=r,o=(u=n)&&0<u.length?(g=(s=gt(u)).host,o||(null!=s.pathname?("/"!=((n=0===s.pathname.length?"/":s.pathname)[0]||"")&&(n="/"+n),i=s.pathname,ot.sanitizeString(p,t?t+" "+n:n)):ot.sanitizeString(p,u))):g=a,{target:g,name:o,data:i});return f.data=ot.sanitizeUrl(e,r)||i.data,f.target=ot.sanitizeString(e,i.target),l&&(f.target=f.target+" | "+l),f.name=ot.sanitizeString(e,i.name),f.properties=ot.sanitizeProperties(e,c),f.measurements=ot.sanitizeMeasurements(e,d),f}var At=(It.create=function(e,t,n,r,a,o){if(n=ot.sanitizeString(r,n)||"not_specified",Y(e)||Y(t)||Y(n))throw Error("Input doesn't contain all required fields");var i={name:n,time:function(e){if("[object Date]"===$(e)){var t=function(e){return 1===(e=""+e).length?"0"+e:e};return 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"}}(new Date),iKey:"",ext:o||{},tags:[],data:{},baseType:t,baseData:e};return Y(a)||te(a,function(e,t){i.data[e]=t}),i},It);function It(){}var Mt="AppInsightsPropertiesPlugin",St="properties";function bt(e,t,n){t=e[t],n=e[n];return t&&n?vt(t,n):0}function Et(e,t,n,r,a){return(a=bt(n,r,a))?qt(e,t,st(a)):0}function qt(e,t,n){var r="ajaxPerf",a=0;return e&&t&&n&&((e[r]=e[r]||{})[t]=n,a=1),a}var Ht=function(){var e=this;e.openDone=!1,e.setRequestHeaderDone=!1,e.sendDone=!1,e.abortDone=!1,e.stateChangeAttached=!1},wt=function $t(e,t,n){var r=this,a=n,v="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 Ht,r.clientFailure=0,r.traceID=e,r.spanID=t,z($t,r,function(x){x.getAbsoluteUrl=function(){return x.requestUrl?(e=gt(x.requestUrl))?e.href:void 0:null;var e},x.getPathName=function(){return x.requestUrl?ot.sanitizeUrl(a,(e=x.method,t=x.requestUrl,e?e.toUpperCase()+" "+t:t)):null;var e,t},x.CreateTrackItem=function(e,t,n){return x.ajaxTotalDuration=Math.round(1e3*vt(x.requestSentTime,x.responseFinishedTime))/1e3,x.ajaxTotalDuration<0?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})[St]={HttpMethod:x.method},x.requestSentTime&&(e.startTime=new Date,e.startTime.setTime(x.requestSentTime)),i=(r=x).perfTiming,s=(a=e)[St]||{},u=0,l="startTime",c="connect"+"End",d="request"+"Start",f="response"+"End",p="transferSize",g="encodedBodySize",h="decodedBodySize",m="serverTiming",i?(u|=Et(s,"End",i,"redirectStart","End"),u|=Et(s,"domainLookup",i,"domainLookupStart","domainLookupEnd"),u|=Et(s,"connect",i,"connectStart",c),u|=Et(s,"request",i,d,"requestEnd"),u|=Et(s,"response",i,"responseStart",f),u|=Et(s,"networkConnect",i,l,c),u|=Et(s,"sentRequest",i,d,f),u|=qt(s,"duration",f=i.duration||bt(i,l,f)||0),u|=qt(s,"perfTotal",f),(f=i[m])&&(o={},ae(f,function(e,t){var n,r,t=(n=e.name||""+t,(r=/([^\w\d_$])/g).test(t=n)?n.replace(r,"_"):t),a=o[t]||{};te(e,function(e,t){("name"!==e&&re(t)||"number"==typeof t)&&(!(t=a[e]?a[e]+";"+t:t)&&re(t)||(a[e]=t))}),o[t]=a}),u|=qt(s,m,o)),u|=qt(s,p,i[p]),u|=qt(s,g,i[g]),u|=qt(s,h,i[h])):r.perfMark&&(u|=qt(s,"missing",r.perfAttempts)),u&&(a[St]=s),t&&0<se(x.requestHeaders).length&&(e[St]=e[St]||{},e[St].requestHeaders=x.requestHeaders),!n||(t=n())&&((n=t.correlationContext)&&(e.correlationContext=n),t.headerMap&&0<se(t.headerMap).length&&(e[St]=e[St]||{},e[St].responseHeaders=t.headerMap),400<=x.status&&(n=t.type,e[St]=e[St]||{},""!==n&&"text"!==n||(e[St][v]=t[v]?t.statusText+" - "+t[v]:t.statusText),"json"===n&&(e[St][v]=t.response?t.statusText+" - "+JSON.stringify(t.response):t.statusText))),e);var r,a,o,i,s,u,l,c,d,f,p,g,h,m}})},Dt=(Lt.isValidTraceId=function(e){return e.match(/^[0-9a-f]{32}$/)&&"00000000000000000000000000000000"!==e},Lt.isValidSpanId=function(e){return e.match(/^[0-9a-f]{16}$/)&&"0000000000000000"!==e},Lt.prototype.toString=function(){return this.version+"-"+this.traceId+"-"+this.spanId+"-"+this.traceFlag},Lt.DEFAULT_TRACE_FLAG="01",Lt.DEFAULT_VERSION="00",Lt);function Lt(e,t){var n=this;n.traceFlag=Lt.DEFAULT_TRACE_FLAG,n.version=Lt.DEFAULT_VERSION,e&&Lt.isValidTraceId(e)?n.traceId=e:n.traceId=Be(),t&&Lt.isValidSpanId(t)?n.spanId=t:n.spanId=Be().substr(0,16)}var Nt="ai.ajxmn.",_t="diagLog",Rt="ajaxData",Ft="throwInternal",Pt="fetch",jt=0;function kt(e){var t=!1;typeof XMLHttpRequest===u||Y(XMLHttpRequest)||(t=!(Y(a=XMLHttpRequest[N])||Y(a.open)||Y(a.send)||Y(a.abort)));var n,r,a=(r=(n=void 0===n?null:n)?n.toLowerCase():"",ne(r=n?r:(n=Ce()||{})?(n.userAgent||"").toLowerCase():"",me)?parseInt(r.split(me)[1]):ne(r,xe)&&(r=parseInt(r.split(xe)[1]))?r+4:null);if(t=!(a&&a<9)&&t)try{(new XMLHttpRequest)[Rt]={};var o=XMLHttpRequest[N].open;XMLHttpRequest[N].open=o}catch(i){t=!1,Gt(e,U.FailedMonitorAjaxOpen,"Failed to enable XMLHttpRequest monitoring, extension is not supported",{exception:Se(i)})}return t}function Ot(e){var t="";try{Y(e)||Y(e[Rt])||Y(e[Rt].requestUrl)||(t+="(url: '"+e[Rt].requestUrl+"')")}catch(n){}return t}function Gt(e,t,n,r,a){e[_t]()[Ft](p.CRITICAL,t,n,r,a)}function zt(e,t,n,r,a){e[_t]()[Ft](p.WARNING,t,n,r,a)}function Ut(t,n,r){return function(e){Gt(t,n,r,{ajaxDiagnosticsMessage:Ot(e.inst),exception:Se(e.err)})}}function Xt(e,t){return e&&t?e.indexOf(t):-1}var Vt,ke=(f(Wt,Vt=ke),Wt.getDefaultConfig=function(){return{maxAjaxCallsPerView:500,disableAjaxTracking:!1,disableFetchTracking:!0,disableCorrelationHeaders:!1,distributedTracingMode:lt.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}},Wt.getEmptyConfig=function(){var t=this.getDefaultConfig();return te(t,function(e){t[e]=undefined}),t},Wt.prototype.processTelemetry=function(e,t){this.processNext(e,t)},Wt.identifier="AjaxDependencyPlugin",Wt);function Wt(){var e=Vt.call(this)||this;e.identifier=Wt.identifier,e.priority=120;var v,T,y,C,A,I,M="trackDependencyDataInternal",t=typeof location===s&&location?location:ye(de),S=!1,b=!1,E=t&&t.host&&t.host.toLowerCase(),q=Wt.getEmptyConfig(),H=!1,r=0,w=0,D=[],L={};return z(Wt,e,function(l,c){function d(e,t,n){D.push(e?rt(e[N],t,n,!1):null)}function f(e,t,n){var r=!1,a=((re(t)?t:(t||{}).url||"")||"").toLowerCase(),o=Xt(a,"?"),i=Xt(a,"#");return-1!==(o=-1===o||-1!==i&&i<o?i:o)&&(a=a.substring(0,o)),Y(e)?Y(t)||(r="object"==typeof t&&!0===t[ct]||!!n&&!0===n[ct]):r=!0===e[ct]||!0===a[ct],r?L[a]||(L[a]=1):L[a]&&(r=!0),r}function p(e,t){var n=!0;return Y(e)||(n=!0===t||!Y(e[Rt])),b&&n}function g(o){o[Rt].xhrMonitoringState.stateChangeAttached=Ke.Attach(o,"readystatechange",function(){try{o&&4===o.readyState&&p(o)&&((a=(r=o)[Rt]).responseFinishedTime=xt(),a.status=r.status,s("xmlhttprequest",a,function(){try{var e=a.CreateTrackItem("Ajax",H,function(){var n,e,t={statusText:r.statusText,headerMap:null,correlationContext:i(r),type:r.responseType,responseText:function(e){try{var t=e.responseType;if(""===t||"text"===t)return e.responseText}catch(n){}return null}(r),response:r.response};return!I||(e=r.getAllResponseHeaders())&&(e=("string"!=typeof e?e:e.replace(/^\s+|\s+$/g,"")).split(/[\r\n]+/),n={},ae(e,function(e){var e=(t=e.split(": ")).shift(),t=t.join(": ");n[e]=t}),t.headerMap=n),t});e?l[M](e):n(null,{requestSentTime:a.requestSentTime,responseFinishedTime:a.responseFinishedTime})}finally{try{r[Rt]=null}catch(t){}}},function(e){n(e,null)}))}catch(t){var e=Se(t);e&&-1!==Xt(e.toLowerCase(),"c00c023f")||Gt(l,U.FailedMonitorAjaxRSC,"Failed to monitor XMLHttpRequest 'readystatechange' event handler, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:Ot(o),exception:e})}function n(e,t){(t=t||{}).ajaxDiagnosticsMessage=Ot(r),e&&(t.exception=Se(e)),zt(l,U.FailedMonitorAjaxDur,"Failed to calculate the duration of the ajax call, monitoring data for this ajax call won't be sent.",t)}var r,a})}function i(e){try{var t=e.getAllResponseHeaders();if(null!==t&&-1!==Xt(t.toLowerCase(),at.requestContextHeaderLowerCase)){var n=e.getResponseHeader(at.requestContextHeader);return mt.getCorrelationContext(n)}}catch(r){zt(l,U.FailedMonitorAjaxGetCorrelationHeader,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{ajaxDiagnosticsMessage:Ot(e),exception:Se(r)})}}function h(e,t){var n;t.requestUrl&&C&&A&&(n=Ae())&&Z(n.mark)&&(e=C+e+"#"+ ++jt,n.mark(e),(e=n.getEntriesByName(e))&&1===e.length&&(t.perfMark=e[0]))}function s(o,i,s,u){var l=i.perfMark,c=Ae(),d=q.maxAjaxPerfLookupAttempts,f=q.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===Xt(r.name,p)&&-1===Xt(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&&Z(c.clearMarks)&&c.clearMarks(l.name),i.perfAttempts=g,s()):setTimeout(h,f)}catch(a){u(a)}}()}function u(e){var t="";try{Y(e)||(t+="string"==typeof e?"(url: '"+e+"')":"(url: '"+e.url+"')")}catch(n){Gt(l,U.FailedMonitorAjaxOpen,"Failed to grab failed fetch diagnostics message",{exception:Se(n)})}return t}function m(e,t,r,n,a){function o(e,t,n){(n=n||{}).fetchDiagnosticsMessage=u(r),t&&(n.exception=Se(t)),zt(l,e,"Failed to calculate the duration of the fetch call, monitoring data for this fetch call won't be sent.",n)}n&&(n.responseFinishedTime=xt(),n.status=t,s("fetch",n,function(){var e=n.CreateTrackItem("Fetch",H,a);e?l[M](e):o(U.FailedMonitorAjaxDur,null,{requestSentTime:n.requestSentTime,responseFinishedTime:n.responseFinishedTime})},function(e){o(U.FailedMonitorAjaxGetCorrelationHeader,e,null)}))}function x(e){if(e&&e.headers)try{var t=e.headers.get(at.requestContextHeader);return mt.getCorrelationContext(t)}catch(n){zt(l,U.FailedMonitorAjaxGetCorrelationHeader,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{fetchDiagnosticsMessage:u(e),exception:Se(n)})}}l.initialize=function(e,t,n,r){if(!l.isInitialized()){c.initialize(e,t,n,r);var a=l._getTelCtx();if(te(Wt.getDefaultConfig(),function(e,t){q[e]=a.getConfig(Wt.identifier,e,t)}),r=q.distributedTracingMode,H=q.enableRequestHeaderTracking,A=q.enableAjaxPerfTracking,w=q.maxAjaxCallsPerView,I=q.enableResponseHeaderTracking,y=r===lt.AI||r===lt.AI_AND_W3C,T=r===lt.AI_AND_W3C||r===lt.W3C,A&&(s=e.instrumentationKey||"unkwn",C=5<s.length?Nt+s.substring(s.length-5)+".":Nt+s+"."),!1===q.disableAjaxTracking&&kt(l)&&!b&&(d(XMLHttpRequest,"open",{req:function(e,t,n,r){var a=e.inst,o=a[Rt];f(a,n)||!p(a,!0)||o&&o.xhrMonitoringState.openDone||(e=a,o=t,a=n,t=r,n=v&&v.telemetryTrace&&v.telemetryTrace.traceID||Be(),r=Be().substr(0,16),(r=new wt(n,r,l[_t]())).method=o,r.requestUrl=a,r.xhrMonitoringState.openDone=!0,r.requestHeaders={},r["async"]=t,e[Rt]=r,g(e))},hkErr:Ut(l,U.FailedMonitorAjaxOpen,"Failed to monitor XMLHttpRequest.open, monitoring data for this ajax call may be incorrect.")}),d(XMLHttpRequest,"send",{req:function(e,t){var n=e.inst,e=n[Rt];p(n)&&!e.xhrMonitoringState.sendDone&&(h("xhr",e),e.requestSentTime=xt(),l.includeCorrelationHeaders(e,undefined,undefined,n),e.xhrMonitoringState.sendDone=!0)},hkErr:Ut(l,U.FailedMonitorAjaxSend,"Failed to monitor XMLHttpRequest, monitoring data for this ajax call may be incorrect.")}),d(XMLHttpRequest,"abort",{req:function(e){var t=e.inst,e=t[Rt];p(t)&&!e.xhrMonitoringState.abortDone&&(e.aborted=1,e.xhrMonitoringState.abortDone=!0)},hkErr:Ut(l,U.FailedMonitorAjaxAbort,"Failed to monitor XMLHttpRequest.abort, monitoring data for this ajax call may be incorrect.")}),H&&d(XMLHttpRequest,"setRequestHeader",{req:function(e,t,n){p(e=e.inst)&&(e[Rt].requestHeaders[t]=n)},hkErr:Ut(l,U.FailedMonitorAjaxSetRequestHeader,"Failed to monitor XMLHttpRequest.setRequestHeader, monitoring data for this ajax call may be incorrect.")}),b=!0),(e=!(r=_())||Y(r.Request)||Y(r.Request[N])||Y(r[Pt])?null:r[Pt])&&(s=_(),u=e.polyfill,!1===q.disableFetchTracking?(D.push(rt(s,Pt,{req:function(e,t,n){var r,a;!S||f(null,t,n)||u&&b||(r=e.ctx(),a=function(e,t){var n=v&&v.telemetryTrace&&v.telemetryTrace.traceID||Be(),r=Be().substr(0,16);(n=new wt(n,r,l[_t]())).requestSentTime=xt(),e instanceof Request?n.requestUrl=e?e.url:"":n.requestUrl=e,r="GET",t&&t.method?r=t.method:e&&e instanceof Request&&(r=e.method),n.method=r;var a={};return H&&new Headers((t?t.headers:0)||e instanceof Request&&e.headers||{}).forEach(function(e,t){a[t]=e}),n.requestHeaders=a,h("fetch",n),n}(t,n),(t=l.includeCorrelationHeaders(a,t,n))!==n&&e.set(1,t),r.data=a)},rsp:function(e,t){var n=e.ctx().data;n&&(e.rslt=e.rslt.then(function(t){return m(0,(t||{}).status,t,n,function(){var n,e={statusText:t.statusText,headerMap:null,correlationContext:x(t)};return I&&(n={},t.headers.forEach(function(e,t){n[t]=e}),e.headerMap=n),e}),t})["catch"](function(e){throw m(0,0,t,n,null,e.message),e}))},hkErr:Ut(l,U.FailedMonitorAjaxOpen,"Failed to monitor Window.fetch, monitoring data for this fetch call may be incorrect.")})),S=!0):u&&D.push(rt(s,Pt,{req:function(e,t,n){f(null,t,n)}})),u&&(s[Pt].polyfill=u)),0<n.length&&n){for(var o=void 0,i=0;!o&&i<n.length;)n[i]&&n[i].identifier===Mt&&(o=n[i]),i++;o&&(v=o.context)}}var s,u},l.teardown=function(){ae(D,function(e){e.rm()}),b=S=!(D=[]),l.setInitialized(!1)},l.trackDependencyData=function(e,t){l[M](e,t)},l.includeCorrelationHeaders=function(e,t,n,r){var a,o,i,s=l._currentWindowHost||E;return t?(mt.canIncludeCorrelationHeader(q,e.getAbsoluteUrl(),s)&&((n=n||{}).headers=new Headers(n.headers||t instanceof Request&&t.headers||{}),y&&(a="|"+e.traceID+"."+e.spanID,n.headers.set(at.requestIdHeader,a),H&&(e.requestHeaders[at.requestIdHeader]=a)),(o=q.appId||v&&v.appId())&&(n.headers.set(at.requestContextHeader,at.requestContextAppIdFormat+o),H&&(e.requestHeaders[at.requestContextHeader]=at.requestContextAppIdFormat+o)),T&&(i=new Dt(e.traceID,e.spanID),n.headers.set(at.traceParentHeader,i.toString()),H&&(e.requestHeaders[at.traceParentHeader]=i.toString()))),n):r?(mt.canIncludeCorrelationHeader(q,e.getAbsoluteUrl(),s)&&(y&&(a="|"+e.traceID+"."+e.spanID,r.setRequestHeader(at.requestIdHeader,a),H&&(e.requestHeaders[at.requestIdHeader]=a)),(o=q.appId||v&&v.appId())&&(r.setRequestHeader(at.requestContextHeader,at.requestContextAppIdFormat+o),H&&(e.requestHeaders[at.requestContextHeader]=at.requestContextAppIdFormat+o)),T&&(i=new Dt(e.traceID,e.spanID),r.setRequestHeader(at.traceParentHeader,i.toString()),H&&(e.requestHeaders[at.traceParentHeader]=i.toString()))),r):undefined},l[M]=function(e,t,n){-1===w||r<w?(q.distributedTracingMode!==lt.W3C&&q.distributedTracingMode!==lt.AI_AND_W3C||"string"!=typeof e.id||"."===e.id[e.id.length-1]||(e.id+="."),Y(e.startTime)&&(e.startTime=new Date),n=At.create(e,yt.dataType,yt.envelopeType,l[_t](),t,n),l.core.track(n)):r===w&&Gt(l,U.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=ke,e.ajaxRecord=wt,function(e,t,n){var r=Object.defineProperty;if(r)try{return r(e,t,n)}catch(a){}typeof n.value!==undefined&&(e[t]=n.value)}(e,"__esModule",{value:!0})};"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||{})); | ||
var e=this,t=function(e){"use strict";var i="function",s="object",u="undefined",E="prototype",r="hasOwnProperty",n=Object,t=n[E],a=n.create,o=n.defineProperty,l=t[r];function j(){return typeof globalThis!==u&&globalThis?globalThis:typeof self!==u&&self?self:typeof window!==u&&window?window:typeof global!==u&&global?global:null}function c(e){throw new TypeError(e)}(j()||{}).Symbol,(j()||{}).Reflect;var d=function(e,t){return(d=n.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t[r](n)&&(e[n]=t[n])})(e,t)};function f(e,t){function n(){this.constructor=e}typeof t!==i&&null!==t&&c("Class extends value "+t+" is not a constructor or null"),d(e,t),e[E]=null===t?function(e){if(a)return a(e);if(null==e)return{};var t=typeof e;function n(){}return t!==s&&t!==i&&c("Object prototype may only be an Object:"+e),n[E]=e,new n}(t):(n[E]=t[E],new n)}var p,g="constructor",h="prototype",m="function",x="_dynInstFuncs",v="_isDynProxy",y="_dynClass",C="_dynCls$",T="_dynInstChk",I=T,b="_dfOpts",A="_unknown_",S="__proto__",w="useBaseInst",q="setInstFuncs",M=Object,F=M.getPrototypeOf,H=0;function D(e,t){return e&&M[h].hasOwnProperty.call(e,t)}function L(e){return e&&(e===M[h]||e===Array[h])}function R(e){return L(e)||e===Function[h]}function P(e){if(e){if(F)return F(e);if(e=e[S]||e[h]||(e[g]?e[g][h]:null))return e}return null}function N(e,t){var n=[],r=M.getOwnPropertyNames;if(r)n=r(e);else for(var a in e)"string"==typeof a&&D(e,a)&&n.push(a);if(n&&0<n.length)for(var o=0;o<n.length;o++)t(n[o])}function k(e,t,n){return t!==g&&typeof e[t]===m&&(n||D(e,t))}function _(e){throw new TypeError("DynamicProto: "+e)}function O(e,t){for(var n=e.length-1;0<=n;n--)if(e[n]===t)return 1}function U(e,t){return D(e,h)?e.name||t||A:((e||{})[g]||{}).name||t||A}function W(e,r,t,n){D(e,h)||_("theClass is an invalid class definition.");var a=e[h];!function(e){if(F)for(var t=[],n=P(r);n&&!R(n)&&!O(t,n);){if(n===e)return 1;t.push(n),n=P(n)}}(a)&&_("["+U(e)+"] is not in class hierarchy of ["+U(r)+"]");var o=null;D(a,y)?o=a[y]:(o=C+U(e,"_")+"$"+H,H++,a[y]=o);var i=W[b],s=!!i[w];s&&n&&n[w]!==undefined&&(s=!!n[w]);var u,l,c,d,f,p,e=(l={},N(u=r,function(e){!l[e]&&k(u,e,!1)&&(l[e]=u[e])}),l);t(r,function(e,t,n,o){function r(e,t,n){var r,a=t[n];return a[v]&&o&&!1!==(r=e[x]||{})[I]&&(a=(r[t[y]]||{})[n]||a),function(){return a.apply(e,arguments)}}var a={};N(n,function(e){a[e]=r(t,n,e)});for(var i=P(e),s=[];i&&!R(i)&&!O(s,i);)N(i,function(e){!a[e]&&k(i,e,!F)&&(a[e]=r(t,i,e))}),s.push(i),i=P(i);return a}(a,r,e,s)),i=!!F&&!!i[q],c=a,o=o,d=r,f=e,n=!1!==(i=i&&n?!!n[q]:i),L(c)||(i=d[x]=d[x]||{},p=i[o]=i[o]||{},!1!==i[I]&&(i[I]=!!n),N(d,function(e){var n,r,a;k(d,e,!1)&&d[e]!==f[e]&&(p[e]=d[e],delete d[e],D(c,e)&&(!c[e]||c[e][v])||(c[e]=(n=c,r=e,(a=function(){var e,t;return(function(e,t,n,r){var a=null;if(e&&D(n,y)){var o=e[x]||{};if((a=(o[n[y]]||{})[t])||_("Missing ["+t+"] "+m),!a[T]&&!1!==o[I]){for(var i=!D(e,t),s=P(e),u=[];i&&s&&!R(s)&&!O(u,s);){var l=s[t];if(l){i=l===r;break}u.push(s),s=P(s)}try{i&&(e[t]=a),a[T]=1}catch(c){o[I]=!1}}}return a}(this,r,n,a)||(typeof(t=(t=n[e=r])===a?P(n)[e]:t)!==m&&_("["+e+"] is not a "+m),t)).apply(this,arguments)})[v]=1,a)))}))}W[b]={setInstFuncs:!0,useBaseInst:!0},(Oe=p=p||{})[Oe.CRITICAL=1]="CRITICAL",Oe[Oe.WARNING=2]="WARNING";var V={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},B="attachEvent",z="addEventListener",K="detachEvent",X="removeEventListener",G=o;function $(e){return t.toString.call(e)}function J(e){return e===undefined||typeof e===u}function Z(e){return null===e||J(e)}function Q(e){return typeof e===i}function Y(e,t,n,r){void 0===r&&(r=!1);var a=!1;if(!Z(e))try{Z(e[z])?Z(e[B])||(e[B]("on"+t,n),a=!0):(e[z](t,n,r),a=!0)}catch(o){}return a}function ee(e,t,n,r){if(void 0===r&&(r=!1),!Z(e))try{Z(e[X])?Z(e[K])||e[K]("on"+t,n):e[X](t,n,r)}catch(a){}}function te(e,t){if(e)for(var n in e)l.call(e,n)&&t.call(e,n,e[n])}function ne(e,t){return!(!e||!t||!~e.indexOf(t))}function re(e){return"string"==typeof e}function ae(e,t,n){for(var r=e.length,a=0;a<r&&!(a in e&&-1===t.call(n||e,e[a],a,e));a++);}function oe(e){return"string"!=typeof e?e:e.replace(/^\s+|\s+$/g,"")}var ie=!{toString:null}.propertyIsEnumerable("toString"),se=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];function ue(e){var t=typeof e;t===i||t===s&&null!==e||c("objKeys called on non-object");var n,r=[];for(n in e)e&&l.call(e,n)&&r.push(n);if(ie)for(var a=se.length,o=0;o<a;o++)e&&l.call(e,se[o])&&r.push(se[o]);return r}function le(){var e=Date;return e.now?e.now():(new e).getTime()}var ce="window",de="navigator",fe="location",pe="performance",ge="JSON",he="crypto",me="msCrypto",xe="msie",ve="trident/",ye=null,Ce=null;function Te(e){var t=j();return t&&t[e]?t[e]:e===ce&&typeof window===s&&window?window:null}function Ie(){return typeof navigator===s&&navigator?navigator:Te(de)}function be(){return Te(pe)}function Ae(){return typeof JSON===s&&JSON||null!==Te(ge)}function Se(){return Ae()?JSON||Te(ge):null}function we(e){var t=Object[E].toString.call(e),n="";return"[object Error]"===t?n="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":Ae()&&(n=Se().stringify(e)),t+n}function qe(e){return e?'"'+e.replace(/\"/g,"")+'"':""}var Me=(Fe.dataType="MessageData",Fe);function Fe(e,t,n,r){void 0===n&&(n=!1),this.messageId=e,this.message=(n?"AI: ":"AI (Internal): ")+e,e="",Ae()&&(e=Se().stringify(r)),e=(t?" message:"+qe(t):"")+(r?" props:"+qe(e):""),this.message+=e}var He=function $t(n){this.identifier="DiagnosticLogger",this.queue=[];var a=0,i={};W($t,this,function(o){function e(e,t){return Z(e=n[e])?t:e}Z(n)&&(n={}),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){if(n=new Me(t,n,a=void 0!==a&&a,r),o.enableDebugExceptions())throw n;J(n)||!n||J(n.message)||(r=o.consoleLoggingLevel(),a?(a=+n.messageId,!i[a]&&r>=p.WARNING&&(o.warnToConsole(n.message),i[a]=!0)):r>=p.WARNING&&o.warnToConsole(n.message),o.logInternalMessage(e,n))},o.warnToConsole=function(e){var t,n=typeof console!==u?console:Te("console");n&&(t="log",Q(n[t=n.warn?"warn":t])&&n[t](e))},o.resetInternalMessageCount=function(){a=0,i={}},o.logInternalMessage=function(e,t){var n,r;a>=o.maxInternalMessageLimit()||(n=!0,r="AITR_"+t.messageId,i[r]?n=!1:i[r]=!0,n&&(e<=o.telemetryLoggingLevel()&&(o.queue.push(t),a++),a===o.maxInternalMessageLimit()&&(t=new Me(V.MessageLimitPerPVExceeded,e="Internal events throttle limit per PageView reached for this app.",!1),o.queue.push(t),o.warnToConsole(e))))}})},De="ctx",Le=(Re.ParentContextKey="parent",Re.ChildrenContextKey="childEvts",Re);function Re(e,a,t){var r,o=this,i=!1;o.start=le(),o.name=e,o.isAsync=t,o.isChildEvt=function(){return!1},Q(a)&&(i=function(e){if(G)try{var t={enumerable:!0,configurable:!0,get:function(){return!r&&Q(a)&&(r=a(),a=null),r}};return G(e,"payload",t),!0}catch(n){}return!1}(o)),o.getCtx=function(e){return e?(e===Re.ParentContextKey||e===Re.ChildrenContextKey?o:o[De]||{})[e]:null},o.setCtx=function(e,t){e&&(e===Re.ParentContextKey?(o[e]||(o.isChildEvt=function(){return!0}),o[e]=t):e===Re.ChildrenContextKey?o[e]=t:(o[De]=o[De]||{})[e]=t)},o.complete=function(){var e=0,t=o.getCtx(Re.ChildrenContextKey);if("[object Array]"===$(t))for(var n=0;n<t.length;n++){var r=t[n];r&&(e+=r.time)}o.time=le()-o.start,o.exTime=o.time-e,o.complete=function(){},!i&&Q(a)&&(o.payload=a())}}var Ee="CoreUtils.doPerf";function je(e,t,n,r,a){if(e){var o=e;if(o=o&&Q(o.getPerfMgr)?o.getPerfMgr():o){var i,s=void 0,e=o.getCtx(Ee);try{if(s=o.create(t(),r,a))return e&&s.setCtx&&(s.setCtx(Le.ParentContextKey,e),e.getCtx&&e.setCtx&&((i=e.getCtx(Le.ChildrenContextKey))||(i=[],e.setCtx(Le.ChildrenContextKey,i)),i.push(s))),o.setCtx(Ee,s),n(s)}catch(u){s&&s.setCtx&&s.setCtx("exception",u)}finally{s&&o.fire(s),o.setCtx(Ee,e)}}}return n()}var Pe=function(a,t){var o=this,i=null,s=Q(a.processTelemetry),u=Q(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";je(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(p.CRITICAL,V.PluginException,"Plugin ["+a.identifier+"] failed during processTelemetry - "+t),i&&!e&&i.processTelemetry(n,r)}}else i&&(o._hasRun=!0,i.processTelemetry(n,r))},function(){return{item:n}},!n.sync)}};function Ne(e,t){var n=[];if(e&&0<e.length)for(var r=null,a=0;a<e.length;a++){var o=e[a];o&&Q(o.processTelemetry)&&(o=new Pe(o,t),n.push(o),r&&r.setNext(o),r=o)}return 0<n.length?n[0]:null}var ke=function Jt(e,a,n,t){var r,o,i,s,u=this,l=null;null!==t&&(e&&Q(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),Ne(r,t)}(e,u,t||e.getPlugin()):t?(r=u,i=e,s=!1,(o=t)&&e&&(i=[],ae(e,function(e){!s&&e!==o||(s=!0,i.push(e))})),o&&!s&&(i=i||[]).push(o),l=Ne(i,r)):J(t)&&(l=Ne(e,u))),u.core=function(){return n},u.diagLog=function(){return(n||{}).logger||new He(a)},u.getCfg=function(){return a},u.getExtCfg=function(e,t){var n,r;return void 0===t&&(t={}),!a||(r=a.extensionConfig)&&e&&(n=r[e]),n||t},u.getConfig=function(e,t,n){var r;return void 0===n&&(n=!1),(e=u.getExtCfg(e,null))&&!Z(e[t])?r=e[t]:a&&!Z(a[t])&&(r=a[t]),Z(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 Jt((e=void 0===e?null:e)||l,a,n,t)}},_e="getPlugin",Oe=(Ue.prototype.initialize=function(e,t,n,r){this._baseTelInit(e,t,n,r)},Ue);function Ue(){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&&Q(c.processTelemetry)&&c.processTelemetry(e,null)},s._getTelCtx=function(e){var t=e=void 0===e?null:e;return t||(e=l||new ke(null,{},s.core),t=c&&c[_e]?e.createNew(null,c[_e]):e.createNew(null,c)),t},s._baseTelInit=function(e,t,n,r){var a,o;e&&(a="extensionConfig",i=o=[],!e||(i=e[a])!==o&&Z(i)&&(e[a]=i=o)),!r&&t&&(r=t.getProcessTelContext().getNext());var i=c;c&&c[_e]&&(i=c[_e]()),s.core=t,l=new ke(r,e,t,i),u=!0}}var We=4294967296,Ve=4294967295,Be=!1,ze=123456789,Ke=987654321;function Xe(e){var t=Te(he)||Te(me),n=t&&t.getRandomValues?t.getRandomValues(new Uint32Array(1))[0]&Ve:(!(n=Ie())||n.userAgent===Ce&&null!==ye||(n=((Ce=n.userAgent)||"").toLowerCase(),ye=ne(n,xe)||ne(n,ve)),ye?(Be||function(){try{var e=2147483647&le();(t=(Math.random()*We^e)+e)<0&&(t>>>=0),ze=123456789+t&Ve,Ke=987654321-t&Ve,Be=!0}catch(n){}var t}(),t=((Ke=36969*(65535&Ke)+(Ke>>16)&Ve)<<16)+(65535&(ze=18e3*(65535&ze)+(ze>>16)&Ve))>>>0&Ve|0,(t>>>=0)&Ve):Math.floor(We*Math.random()|0));return e||(n>>>=0),n}function Ge(){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=Xe())]+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&Xe())|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 $e={Attach:Y,AttachEvent:Y,Detach:ee,DetachEvent:ee},Je="_aiHooks",Ze=["req","rsp","hkErr","fnErr"],Qe="__proto__",Ye="constructor";function et(e,t){if(e)for(var n=0;n<e.length&&!t(e[n],n);n++);}function tt(e,i,s,u,l){0<=l&&l<=2&&et(e,function(e,t){var n=e.cbks;if(e=n[Ze[l]]){i.ctx=function(){return u[t]=u[t]||{}};try{e.apply(i.inst,s)}catch(a){e=i.err;try{var r=n[Ze[2]];r&&(i.err=a,r.apply(i.inst,s))}catch(o){}finally{i.err=e}}}})}function nt(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 et(e,function(e){t.push(e)}),t}tt(e,r,a,t,0);var i=u.f;try{r.rslt=i.apply(this,n)}catch(s){throw r.err=s,tt(e,r,a,t,3),s}return tt(e,r,a,t,1),r.rslt}}var rt=Object.getPrototypeOf;function at(e,t,n,r){if(void 0===r&&(r=!0),e&&t&&n&&(e=function o(e,t,n){var r=null;return e&&(e&&l.call(e,t)?r=e:n&&(r=o(function(e){if(e){if(rt)return rt(e);if(e=e[Qe]||e[E]||e[Ye])return e}return null}(e),t,!1))),r}(e,t,r))&&typeof(r=e[t])===i){var a=r[Je];return a||((r=nt(a={i:0,n:t,f:r,h:[]}))[Je]=a,e[t]=r),n={id:a.i,cbks:n,rm:function(){var n=this.id;et(a.h,function(e,t){return e.id===n&&(a.h.splice(t,1),1)})}},a.i++,a.h.push(n),n}return null}var ot={requestContextHeader:"Request-Context",requestContextTargetKey:"appId",requestContextAppIdFormat:"appId=cid-v1:",requestIdHeader:"Request-Id",traceParentHeader:"traceparent",traceStateHeader:"tracestate",sdkContextHeader:"Sdk-Context",sdkContextHeaderAppIdRequest:"appId",requestContextHeaderLowerCase:"request-context"};function it(e,t,n){var r,a,o=t.length,i=(t&&150<(t=oe(t.toString())).length&&(r=t.substring(0,150),e.throwInternal(p.WARNING,V.NameTooLong,"name is too long. It has been truncated to 150 characters.",{name:t},!0)),r||t);if(i.length!==o){for(var s=0,u=i;n[u]!==undefined;)s++,u=i.substring(0,147)+(a="00"+s).substr(a.length-3);i=u}return i}function st(e,t,n){var r;return void 0===n&&(n=1024),t&&(n=n||1024,(t=oe(t)).toString().length>n&&(r=t.toString().substring(0,n),e.throwInternal(p.WARNING,V.StringValueTooLong,"string value is too long. It has been truncated to "+n+" characters.",{value:t},!0))),r||t}function ut(e,t){return n=e,e=t,t=V.UrlTooLong,e&&2048<(e=oe(e)).length&&(r=e.substring(0,2048),n.throwInternal(p.WARNING,t,"input is too long, it has been truncated to 2048 characters.",{data:e},!0)),r||e;var n,r}function lt(r,e){var a;return e&&(a={},te(e,function(e,t){if(typeof t===s&&Ae())try{t=Se().stringify(t)}catch(n){r.throwInternal(p.WARNING,V.CannotSerializeObjectNonSerializable,"custom property is not valid",{exception:n},!0)}t=st(r,t,8192),e=it(r,e,a),a[e]=t}),e=a),e}function ct(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 dt,ft="Microsoft_ApplicationInsights_BypassAjaxInstrumentation";(o={})[o.LocalStorage=0]="LocalStorage",o[o.SessionStorage=1]="SessionStorage",(o=dt=dt||{})[o.AI=0]="AI",o[o.AI_AND_W3C=1]="AI_AND_W3C",o[o.W3C=2]="W3C";var pt=(typeof document===s&&document?document:Te("document"))||{},gt=0,ht=[null,null,null,null,null];function mt(e){var t,n,r=gt,a=ht,o=a[r];return pt.createElement?a[r]||(o=a[r]=pt.createElement("a")):o={host:(t=xt(t=e,!0))&&null!=(n=t.match(/(www[0-9]?\.)?(.[^/:]+)(\:[\d]+)?/i))&&3<n.length&&re(n[2])&&0<n[2].length?n[2]+(n[3]||""):t},o.href=e,++r>=a.length&&(r=0),gt=r,o}function xt(e,t){var n=null;return!e||null!=(e=e.match(/(\w*):\/\/(.[^/:]+)(\:[\d]+)?/i))&&2<e.length&&re(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 vt={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,o=mt(t).host.toLowerCase();if(o&&(~o.indexOf(":443")||~o.indexOf(":80"))&&(o=(xt(t,!0)||"").toLowerCase()),!(e&&e.enableCorsCorrelation||o===n))return!1;if((n=e&&e.correlationHeaderDomains)&&(ae(n,function(e){e=RegExp(e.toLowerCase().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,".*")).test(o))return!1;return o&&0<o.length},getCorrelationContext:function(e){if((e=e&&vt.getCorrelationContextValue(e,ot.requestContextTargetKey))&&e!==vt.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 yt(){var e=be();return e&&e.now&&e.timing&&0<(e=e.now()+e.timing.navigationStart)?e:le()}function Ct(e,t){return 0===e||0===t||Z(e)||Z(t)?null:t-e}var Tt,It=(f(bt,Tt=function(){this.ver=2,this.success=!0,this.properties={},this.measurements={}}),bt.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",bt.dataType="RemoteDependencyData",bt);function bt(e,t,n,r,a,o,i,s,u,l,c,d){void 0===u&&(u="Ajax");var f=Tt.call(this)||this;f.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},f.id=t,f.duration=ct(a),f.success=o,f.resultCode=i+"",f.type=st(e,u);var p,g,h,m,i=(p=e,t=s,i=o=a=r,o=(u=n)&&0<u.length?(g=(s=mt(u)).host,o||(null!=s.pathname?("/"!=((n=0===s.pathname.length?"/":s.pathname)[0]||"")&&(n="/"+n),i=s.pathname,st(p,t?t+" "+n:n)):st(p,u))):g=a,{target:g,name:o,data:i});return f.data=ut(e,r)||i.data,f.target=st(e,i.target),l&&(f.target=f.target+" | "+l),f.name=st(e,i.name),f.properties=lt(e,c),f.measurements=(h=e,d&&(m={},te(d,function(e,t){e=it(h,e,m),m[e]=t}),d=m),d),f}var At=(St.create=function(e,t,n,r,a,o){if(n=st(r,n)||"not_specified",Z(e)||Z(t)||Z(n))throw Error("Input doesn't contain all required fields");var i={name:n,time:function(e){if("[object Date]"===$(e)){var t=function(e){return 1===(e=""+e).length?"0"+e:e};return 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"}}(new Date),iKey:"",ext:o||{},tags:[],data:{},baseType:t,baseData:e};return Z(a)||te(a,function(e,t){i.data[e]=t}),i},St);function St(){}var wt="AppInsightsPropertiesPlugin",qt="properties";function Mt(e,t,n){t=e[t],n=e[n];return t&&n?Ct(t,n):0}function Ft(e,t,n,r,a){return(a=Mt(n,r,a))?Ht(e,t,ct(a)):0}function Ht(e,t,n){var r="ajaxPerf",a=0;return e&&t&&n&&((e[r]=e[r]||{})[t]=n,a=1),a}var Dt=function(){var e=this;e.openDone=!1,e.setRequestHeaderDone=!1,e.sendDone=!1,e.abortDone=!1,e.stateChangeAttached=!1},Lt=function Zt(e,t,n){var r=this,a=n,v="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 Dt,r.clientFailure=0,r.traceID=e,r.spanID=t,W(Zt,r,function(x){x.getAbsoluteUrl=function(){return x.requestUrl?(e=mt(x.requestUrl))?e.href:void 0:null;var e},x.getPathName=function(){return x.requestUrl?ut(a,(e=x.method,t=x.requestUrl,e?e.toUpperCase()+" "+t:t)):null;var e,t},x.CreateTrackItem=function(e,t,n){return x.ajaxTotalDuration=Math.round(1e3*Ct(x.requestSentTime,x.responseFinishedTime))/1e3,x.ajaxTotalDuration<0?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})[qt]={HttpMethod:x.method},x.requestSentTime&&(e.startTime=new Date,e.startTime.setTime(x.requestSentTime)),a=e,i=(r=x).perfTiming,s=a[qt]||{},u=0,l="startTime",c="connect"+"End",d="request"+"Start",f="response"+"End",p="transferSize",g="encodedBodySize",h="decodedBodySize",m="serverTiming",i?(u|=Ft(s,"End",i,"redirectStart","End"),u|=Ft(s,"domainLookup",i,"domainLookupStart","domainLookupEnd"),u|=Ft(s,"connect",i,"connectStart",c),u|=Ft(s,"request",i,d,"requestEnd"),u|=Ft(s,"response",i,"responseStart",f),u|=Ft(s,"networkConnect",i,l,c),u|=Ft(s,"sentRequest",i,d,f),u|=Ht(s,"duration",f=i.duration||Mt(i,l,f)||0),u|=Ht(s,"perfTotal",f),(f=i[m])&&(o={},ae(f,function(e,t){var n,r=(r=n=e.name||""+t,(t=/([^\w\d_$])/g).test(n)?n.replace(t,"_"):r),a=o[r]||{};te(e,function(e,t){("name"!==e&&re(t)||"number"==typeof t)&&(!(t=a[e]?a[e]+";"+t:t)&&re(t)||(a[e]=t))}),o[r]=a}),u|=Ht(s,m,o)),u|=Ht(s,p,i[p]),u|=Ht(s,g,i[g]),u|=Ht(s,h,i[h])):r.perfMark&&(u|=Ht(s,"missing",r.perfAttempts)),u&&(a[qt]=s),t&&0<ue(x.requestHeaders).length&&(e[qt]=e[qt]||{},e[qt].requestHeaders=x.requestHeaders),!n||(t=n())&&((n=t.correlationContext)&&(e.correlationContext=n),t.headerMap&&0<ue(t.headerMap).length&&(e[qt]=e[qt]||{},e[qt].responseHeaders=t.headerMap),400<=x.status&&(n=t.type,e[qt]=e[qt]||{},""!==n&&"text"!==n||(e[qt][v]=t[v]?t.statusText+" - "+t[v]:t.statusText),"json"===n&&(e[qt][v]=t.response?t.statusText+" - "+JSON.stringify(t.response):t.statusText))),e);var r,a,o,i,s,u,l,c,d,f,p,g,h,m}})},Rt=(Et.isValidTraceId=function(e){return e.match(/^[0-9a-f]{32}$/)&&"00000000000000000000000000000000"!==e},Et.isValidSpanId=function(e){return e.match(/^[0-9a-f]{16}$/)&&"0000000000000000"!==e},Et.prototype.toString=function(){return this.version+"-"+this.traceId+"-"+this.spanId+"-"+this.traceFlag},Et.DEFAULT_TRACE_FLAG="01",Et.DEFAULT_VERSION="00",Et);function Et(e,t){var n=this;n.traceFlag=Et.DEFAULT_TRACE_FLAG,n.version=Et.DEFAULT_VERSION,e&&Et.isValidTraceId(e)?n.traceId=e:n.traceId=Ge(),t&&Et.isValidSpanId(t)?n.spanId=t:n.spanId=Ge().substr(0,16)}var jt="ai.ajxmn.",Pt="diagLog",Nt="ajaxData",kt="throwInternal",_t="fetch",Ot=0;function Ut(e){var t=!1;typeof XMLHttpRequest===u||Z(XMLHttpRequest)||(t=!(Z(a=XMLHttpRequest[E])||Z(a.open)||Z(a.send)||Z(a.abort)));var n,r,a=ne(n=((n=(n=void 0===n?null:n)?n:(r=Ie()||{})?(r.userAgent||"").toLowerCase():"")||"").toLowerCase(),xe)?parseInt(n.split(xe)[1]):ne(n,ve)&&(n=parseInt(n.split(ve)[1]))?n+4:null;if(t=!(a&&a<9)&&t)try{(new XMLHttpRequest)[Nt]={};var o=XMLHttpRequest[E].open;XMLHttpRequest[E].open=o}catch(i){t=!1,Vt(e,V.FailedMonitorAjaxOpen,"Failed to enable XMLHttpRequest monitoring, extension is not supported",{exception:we(i)})}return t}function Wt(e){var t="";try{Z(e)||Z(e[Nt])||Z(e[Nt].requestUrl)||(t+="(url: '"+e[Nt].requestUrl+"')")}catch(n){}return t}function Vt(e,t,n,r,a){e[Pt]()[kt](p.CRITICAL,t,n,r,a)}function Bt(e,t,n,r,a){e[Pt]()[kt](p.WARNING,t,n,r,a)}function zt(t,n,r){return function(e){Vt(t,n,r,{ajaxDiagnosticsMessage:Wt(e.inst),exception:we(e.err)})}}function Kt(e,t){return e&&t?e.indexOf(t):-1}var Xt,Oe=(f(Gt,Xt=Oe),Gt.getDefaultConfig=function(){return{maxAjaxCallsPerView:500,disableAjaxTracking:!1,disableFetchTracking:!0,disableCorrelationHeaders:!1,distributedTracingMode:dt.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"]}},Gt.getEmptyConfig=function(){var t=this.getDefaultConfig();return te(t,function(e){t[e]=undefined}),t},Gt.prototype.processTelemetry=function(e,t){this.processNext(e,t)},Gt.identifier="AjaxDependencyPlugin",Gt);function Gt(){var e=Xt.call(this)||this;e.identifier=Gt.identifier,e.priority=120;var y,C,T,I,b,A,S="trackDependencyDataInternal",t=typeof location===s&&location?location:Te(fe),w=!1,q=!1,M=t&&t.host&&t.host.toLowerCase(),F=Gt.getEmptyConfig(),H=!1,r=0,D=0,L=[],R={};return W(Gt,e,function(l,c){function d(t){var n=!0;return(t||F.ignoreHeaders)&&ae(F.ignoreHeaders,function(e){if(e.toLowerCase()==t.toLowerCase())return n=!1,-1}),n}function f(e,t,n){L.push(e?at(e[E],t,n,!1):null)}function p(e,t,n){var r=!1,a=((re(t)?t:(t||{}).url||"")||"").toLowerCase(),o=Kt(a,"?"),i=Kt(a,"#");return-1!==(o=-1===o||-1!==i&&i<o?i:o)&&(a=a.substring(0,o)),Z(e)?Z(t)||(r="object"==typeof t&&!0===t[ft]||!!n&&!0===n[ft]):r=!0===e[ft]||!0===a[ft],r?R[a]||(R[a]=1):R[a]&&(r=!0),r}function g(e,t){var n=!0,r=q;return Z(e)||(n=!0===t||!Z(e[Nt])),r&&n}function h(o){o[Nt].xhrMonitoringState.stateChangeAttached=$e.Attach(o,"readystatechange",function(){try{o&&4===o.readyState&&g(o)&&((a=(r=o)[Nt]).responseFinishedTime=yt(),a.status=r.status,s("xmlhttprequest",a,function(){try{var e=a.CreateTrackItem("Ajax",H,function(){var e,n,t={statusText:r.statusText,headerMap:null,correlationContext:i(r),type:r.responseType,responseText:function(e){try{var t=e.responseType;if(""===t||"text"===t)return e.responseText}catch(n){}return null}(r),response:r.response};return!A||(e=r.getAllResponseHeaders())&&(e=oe(e).split(/[\r\n]+/),n={},ae(e,function(e){var e=(t=e.split(": ")).shift(),t=t.join(": ");d(e)&&(n[e]=t)}),t.headerMap=n),t});e?l[S](e):n(null,{requestSentTime:a.requestSentTime,responseFinishedTime:a.responseFinishedTime})}finally{try{r[Nt]=null}catch(t){}}},function(e){n(e,null)}))}catch(t){var e=we(t);e&&-1!==Kt(e.toLowerCase(),"c00c023f")||Vt(l,V.FailedMonitorAjaxRSC,"Failed to monitor XMLHttpRequest 'readystatechange' event handler, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:Wt(o),exception:e})}function n(e,t){(t=t||{}).ajaxDiagnosticsMessage=Wt(r),e&&(t.exception=we(e)),Bt(l,V.FailedMonitorAjaxDur,"Failed to calculate the duration of the ajax call, monitoring data for this ajax call won't be sent.",t)}var r,a})}function i(e){try{var t=e.getAllResponseHeaders();if(null!==t&&-1!==Kt(t.toLowerCase(),ot.requestContextHeaderLowerCase)){var n=e.getResponseHeader(ot.requestContextHeader);return vt.getCorrelationContext(n)}}catch(r){Bt(l,V.FailedMonitorAjaxGetCorrelationHeader,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{ajaxDiagnosticsMessage:Wt(e),exception:we(r)})}}function m(e,t){var n;t.requestUrl&&I&&b&&(n=be())&&Q(n.mark)&&(e=I+e+"#"+ ++Ot,n.mark(e),(e=n.getEntriesByName(e))&&1===e.length&&(t.perfMark=e[0]))}function s(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===Kt(r.name,p)&&-1===Kt(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&&Q(c.clearMarks)&&c.clearMarks(l.name),i.perfAttempts=g,s()):setTimeout(h,f)}catch(a){u(a)}}()}function u(e){var t="";try{Z(e)||(t+="string"==typeof e?"(url: '"+e+"')":"(url: '"+e.url+"')")}catch(n){Vt(l,V.FailedMonitorAjaxOpen,"Failed to grab failed fetch diagnostics message",{exception:we(n)})}return t}function x(e,t,r,n,a){function o(e,t,n){(n=n||{}).fetchDiagnosticsMessage=u(r),t&&(n.exception=we(t)),Bt(l,e,"Failed to calculate the duration of the fetch call, monitoring data for this fetch call won't be sent.",n)}n&&(n.responseFinishedTime=yt(),n.status=t,s("fetch",n,function(){var e=n.CreateTrackItem("Fetch",H,a);e?l[S](e):o(V.FailedMonitorAjaxDur,null,{requestSentTime:n.requestSentTime,responseFinishedTime:n.responseFinishedTime})},function(e){o(V.FailedMonitorAjaxGetCorrelationHeader,e,null)}))}function v(e){if(e&&e.headers)try{var t=e.headers.get(ot.requestContextHeader);return vt.getCorrelationContext(t)}catch(n){Bt(l,V.FailedMonitorAjaxGetCorrelationHeader,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{fetchDiagnosticsMessage:u(e),exception:we(n)})}}l.initialize=function(e,t,n,r){if(!l.isInitialized()){c.initialize(e,t,n,r);var a=l._getTelCtx();if(te(Gt.getDefaultConfig(),function(e,t){F[e]=a.getConfig(Gt.identifier,e,t)}),r=F.distributedTracingMode,H=F.enableRequestHeaderTracking,b=F.enableAjaxPerfTracking,D=F.maxAjaxCallsPerView,A=F.enableResponseHeaderTracking,T=r===dt.AI||r===dt.AI_AND_W3C,C=r===dt.AI_AND_W3C||r===dt.W3C,b&&(s=e.instrumentationKey||"unkwn",I=5<s.length?jt+s.substring(s.length-5)+".":jt+s+"."),!1===F.disableAjaxTracking&&Ut(l)&&!q&&(f(XMLHttpRequest,"open",{req:function(e,t,n,r){var a=e.inst,o=a[Nt];p(a,n)||!g(a,!0)||o&&o.xhrMonitoringState.openDone||(e=a,o=t,a=n,t=r,n=y&&y.telemetryTrace&&y.telemetryTrace.traceID||Ge(),r=Ge().substr(0,16),(r=new Lt(n,r,l[Pt]())).method=o,r.requestUrl=a,r.xhrMonitoringState.openDone=!0,r.requestHeaders={},r["async"]=t,e[Nt]=r,h(e))},hkErr:zt(l,V.FailedMonitorAjaxOpen,"Failed to monitor XMLHttpRequest.open, monitoring data for this ajax call may be incorrect.")}),f(XMLHttpRequest,"send",{req:function(e,t){var n=e.inst,e=n[Nt];g(n)&&!e.xhrMonitoringState.sendDone&&(m("xhr",e),e.requestSentTime=yt(),l.includeCorrelationHeaders(e,undefined,undefined,n),e.xhrMonitoringState.sendDone=!0)},hkErr:zt(l,V.FailedMonitorAjaxSend,"Failed to monitor XMLHttpRequest, monitoring data for this ajax call may be incorrect.")}),f(XMLHttpRequest,"abort",{req:function(e){var t=e.inst,e=t[Nt];g(t)&&!e.xhrMonitoringState.abortDone&&(e.aborted=1,e.xhrMonitoringState.abortDone=!0)},hkErr:zt(l,V.FailedMonitorAjaxAbort,"Failed to monitor XMLHttpRequest.abort, monitoring data for this ajax call may be incorrect.")}),H&&f(XMLHttpRequest,"setRequestHeader",{req:function(e,t,n){g(e=e.inst)&&d(t)&&(e[Nt].requestHeaders[t]=n)},hkErr:zt(l,V.FailedMonitorAjaxSetRequestHeader,"Failed to monitor XMLHttpRequest.setRequestHeader, monitoring data for this ajax call may be incorrect.")}),q=!0),(e=!(r=j())||Z(r.Request)||Z(r.Request[E])||Z(r[_t])?null:r[_t])&&(s=j(),u=e.polyfill,!1===F.disableFetchTracking?(L.push(at(s,_t,{req:function(e,t,n){var r,a;!w||p(null,t,n)||u&&q||(r=e.ctx(),a=function(e,t){var n=y&&y.telemetryTrace&&y.telemetryTrace.traceID||Ge(),r=Ge().substr(0,16);(n=new Lt(n,r,l[Pt]())).requestSentTime=yt(),e instanceof Request?n.requestUrl=e?e.url:"":n.requestUrl=e,r="GET",t&&t.method?r=t.method:e&&e instanceof Request&&(r=e.method),n.method=r;var a={};return H&&new Headers((t?t.headers:0)||e instanceof Request&&e.headers||{}).forEach(function(e,t){d(t)&&(a[t]=e)}),n.requestHeaders=a,m("fetch",n),n}(t,n),(t=l.includeCorrelationHeaders(a,t,n))!==n&&e.set(1,t),r.data=a)},rsp:function(e,t){var n=e.ctx().data;n&&(e.rslt=e.rslt.then(function(t){return x(0,(t||{}).status,t,n,function(){var n,e={statusText:t.statusText,headerMap:null,correlationContext:v(t)};return A&&(n={},t.headers.forEach(function(e,t){d(t)&&(n[t]=e)}),e.headerMap=n),e}),t})["catch"](function(e){throw x(0,0,t,n,null,e.message),e}))},hkErr:zt(l,V.FailedMonitorAjaxOpen,"Failed to monitor Window.fetch, monitoring data for this fetch call may be incorrect.")})),w=!0):u&&L.push(at(s,_t,{req:function(e,t,n){p(null,t,n)}})),u&&(s[_t].polyfill=u)),0<n.length&&n){for(var o=void 0,i=0;!o&&i<n.length;)n[i]&&n[i].identifier===wt&&(o=n[i]),i++;o&&(y=o.context)}}var s,u},l.teardown=function(){ae(L,function(e){e.rm()}),q=w=!(L=[]),l.setInitialized(!1)},l.trackDependencyData=function(e,t){l[S](e,t)},l.includeCorrelationHeaders=function(e,t,n,r){var a,o,i,s=l._currentWindowHost||M;return t?(vt.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(ot.requestIdHeader,a),H&&(e.requestHeaders[ot.requestIdHeader]=a)),(o=F.appId||y&&y.appId())&&(n.headers.set(ot.requestContextHeader,ot.requestContextAppIdFormat+o),H&&(e.requestHeaders[ot.requestContextHeader]=ot.requestContextAppIdFormat+o)),C&&(i=new Rt(e.traceID,e.spanID),n.headers.set(ot.traceParentHeader,i.toString()),H&&(e.requestHeaders[ot.traceParentHeader]=i.toString()))),n):r?(vt.canIncludeCorrelationHeader(F,e.getAbsoluteUrl(),s)&&(T&&(a="|"+e.traceID+"."+e.spanID,r.setRequestHeader(ot.requestIdHeader,a),H&&(e.requestHeaders[ot.requestIdHeader]=a)),(o=F.appId||y&&y.appId())&&(r.setRequestHeader(ot.requestContextHeader,ot.requestContextAppIdFormat+o),H&&(e.requestHeaders[ot.requestContextHeader]=ot.requestContextAppIdFormat+o)),C&&(i=new Rt(e.traceID,e.spanID),r.setRequestHeader(ot.traceParentHeader,i.toString()),H&&(e.requestHeaders[ot.traceParentHeader]=i.toString()))),r):undefined},l[S]=function(e,t,n){-1===D||r<D?(F.distributedTracingMode!==dt.W3C&&F.distributedTracingMode!==dt.AI_AND_W3C||"string"!=typeof e.id||"."===e.id[e.id.length-1]||(e.id+="."),Z(e.startTime)&&(e.startTime=new Date),n=At.create(e,It.dataType,It.envelopeType,l[Pt](),t,n),l.core.track(n)):r===D&&Vt(l,V.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=Oe,e.ajaxRecord=Lt,function(e,t,n){var r=Object.defineProperty;if(r)try{return r(e,t,n)}catch(a){}typeof n.value!==undefined&&(e[t]=n.value)}(e,"__esModule",{value:!0})};"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||{})); | ||
//# sourceMappingURL=applicationinsights-dependencies-js.min.js.map |
/* | ||
* Application Insights JavaScript SDK - Dependencies Plugin, 2.6.2 | ||
* Application Insights JavaScript SDK - Dependencies Plugin, 2.6.3 | ||
* Copyright (c) Microsoft and contributors. All rights reserved. | ||
@@ -270,2 +270,15 @@ */ | ||
}; | ||
// discard the header if it's defined as ignoreHeaders in ICorrelationConfig | ||
function _canIncludeHeaders(header) { | ||
var rlt = true; | ||
if (header || _config.ignoreHeaders) { | ||
arrForEach(_config.ignoreHeaders, (function (key) { | ||
if (key.toLowerCase() === header.toLowerCase()) { | ||
rlt = false; | ||
return -1; | ||
} | ||
})); | ||
} | ||
return rlt; | ||
} | ||
// Fetch Stuff | ||
@@ -311,3 +324,5 @@ function _instrumentFetch() { | ||
response.headers.forEach(function (value, name) { | ||
responseHeaderMap_1[name] = value; | ||
if (_canIncludeHeaders(name)) { | ||
responseHeaderMap_1[name] = value; | ||
} | ||
}); | ||
@@ -398,3 +413,3 @@ ajaxResponse.headerMap = responseHeaderMap_1; | ||
var xhr = args.inst; | ||
if (_isMonitoredXhrInstance(xhr)) { | ||
if (_isMonitoredXhrInstance(xhr) && _canIncludeHeaders(header)) { | ||
xhr[strAjaxData].requestHeaders[header] = value; | ||
@@ -537,3 +552,5 @@ } | ||
var value = parts.join(': '); | ||
responseHeaderMap_2[header] = value; | ||
if (_canIncludeHeaders(header)) { | ||
responseHeaderMap_2[header] = value; | ||
} | ||
}); | ||
@@ -681,3 +698,5 @@ ajaxResponse.headerMap = responseHeaderMap_2; | ||
headers.forEach(function (value, key) { | ||
requestHeaders[key] = value; | ||
if (_canIncludeHeaders(key)) { | ||
requestHeaders[key] = value; | ||
} | ||
}); | ||
@@ -774,3 +793,8 @@ } | ||
maxAjaxPerfLookupAttempts: 3, | ||
ajaxPerfLookupDelay: 25 | ||
ajaxPerfLookupDelay: 25, | ||
ignoreHeaders: [ | ||
"Authorization", | ||
"X-API-Key", | ||
"WWW-Authenticate" | ||
] | ||
}; | ||
@@ -777,0 +801,0 @@ return config; |
/* | ||
* Application Insights JavaScript SDK - Dependencies Plugin, 2.6.2 | ||
* Application Insights JavaScript SDK - Dependencies Plugin, 2.6.3 | ||
* Copyright (c) Microsoft and contributors. All rights reserved. | ||
@@ -7,3 +7,3 @@ */ | ||
import { DataSanitizer, dateTimeUtilsDuration, urlGetAbsoluteUrl, urlGetCompleteUrl, msToTimeSpan } from '@microsoft/applicationinsights-common'; | ||
import { dataSanitizeUrl, dateTimeUtilsDuration, urlGetAbsoluteUrl, urlGetCompleteUrl, msToTimeSpan } from '@microsoft/applicationinsights-common'; | ||
import { objKeys, arrForEach, isNumber, isString, normalizeJsName, objForEachKey } from '@microsoft/applicationinsights-core-js'; | ||
@@ -194,3 +194,3 @@ import dynamicProto from "@microsoft/dynamicproto-js"; | ||
self.getPathName = function () { | ||
return self.requestUrl ? DataSanitizer.sanitizeUrl(_logger, urlGetCompleteUrl(self.method, self.requestUrl)) : null; | ||
return self.requestUrl ? dataSanitizeUrl(_logger, urlGetCompleteUrl(self.method, self.requestUrl)) : null; | ||
}; | ||
@@ -197,0 +197,0 @@ self.CreateTrackItem = function (ajaxType, enableRequestHeaderTracking, getResponse) { |
/* | ||
* Application Insights JavaScript SDK - Dependencies Plugin, 2.6.2 | ||
* Application Insights JavaScript SDK - Dependencies Plugin, 2.6.3 | ||
* Copyright (c) Microsoft and contributors. All rights reserved. | ||
@@ -4,0 +4,0 @@ */ |
/* | ||
* Application Insights JavaScript SDK - Dependencies Plugin, 2.6.2 | ||
* Application Insights JavaScript SDK - Dependencies Plugin, 2.6.3 | ||
* Copyright (c) Microsoft and contributors. All rights reserved. | ||
@@ -4,0 +4,0 @@ */ |
/* | ||
* Application Insights JavaScript SDK - Dependencies Plugin, 2.6.2 | ||
* Application Insights JavaScript SDK - Dependencies Plugin, 2.6.3 | ||
* Copyright (c) Microsoft and contributors. All rights reserved. | ||
@@ -4,0 +4,0 @@ */ |
{ | ||
"metadata": { | ||
"toolPackage": "@microsoft/api-extractor", | ||
"toolVersion": "7.14.0", | ||
"toolVersion": "7.16.1", | ||
"schemaVersion": 1004, | ||
@@ -6,0 +6,0 @@ "oldestForwardsCompatibleVersion": 1001, |
/* | ||
* Microsoft Application Insights XHR dependencies plugin, 2.6.2 | ||
* Microsoft Application Insights XHR dependencies plugin, 2.6.3 | ||
* Copyright (c) Microsoft and contributors. All rights reserved. | ||
@@ -4,0 +4,0 @@ * |
/*! | ||
* Application Insights JavaScript SDK - Dependencies Plugin, 2.6.2 | ||
* Application Insights JavaScript SDK - Dependencies Plugin, 2.6.3 | ||
* Copyright (c) Microsoft and contributors. All rights reserved. | ||
*/ | ||
var e=this,t=function(e){"use strict";var i="function",s="object",u="undefined",N="prototype",r="hasOwnProperty",n=Object,t=n[N],a=n.create,o=n.defineProperty,l=t[r];function _(){return typeof globalThis!==u&&globalThis?globalThis:typeof self!==u&&self?self:typeof window!==u&&window?window:typeof global!==u&&global?global:null}function c(e){throw new TypeError(e)}(_()||{}).Symbol,(_()||{}).Reflect;var d=function(e,t){return(d=n.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t[r](n)&&(e[n]=t[n])})(e,t)};function f(e,t){function n(){this.constructor=e}typeof t!==i&&null!==t&&c("Class extends value "+t+" is not a constructor or null"),d(e,t),e[N]=null===t?function(e){if(a)return a(e);if(null==e)return{};var t=typeof e;function n(){}return t!==s&&t!==i&&c("Object prototype may only be an Object:"+e),n[N]=e,new n}(t):(n[N]=t[N],new n)}var p,g="constructor",h="prototype",m="function",x="_dynInstFuncs",v="_isDynProxy",T="_dynClass",y="_dynCls$",C="_dynInstChk",A=C,I="_dfOpts",M="_unknown_",S="__proto__",b="useBaseInst",E="setInstFuncs",q=Object,H=q.getPrototypeOf,w=0;function D(e,t){return e&&q[h].hasOwnProperty.call(e,t)}function L(e){return e&&(e===q[h]||e===Array[h])}function R(e){return L(e)||e===Function[h]}function F(e){if(e){if(H)return H(e);if(e=e[S]||e[h]||(e[g]?e[g][h]:null))return e}return null}function P(e,t){var n=[],r=q.getOwnPropertyNames;if(r)n=r(e);else for(var a in e)"string"==typeof a&&D(e,a)&&n.push(a);if(n&&0<n.length)for(var o=0;o<n.length;o++)t(n[o])}function j(e,t,n){return t!==g&&typeof e[t]===m&&(n||D(e,t))}function k(e){throw new TypeError("DynamicProto: "+e)}function O(e,t){for(var n=e.length-1;0<=n;n--)if(e[n]===t)return 1}function G(e,t){return D(e,h)?e.name||t||M:((e||{})[g]||{}).name||t||M}function z(e,r,t,n){D(e,h)||k("theClass is an invalid class definition.");var a=e[h];!function(e){if(H)for(var t=[],n=F(r);n&&!R(n)&&!O(t,n);){if(n===e)return 1;t.push(n),n=F(n)}}(a)&&k("["+G(e)+"] is not in class hierarchy of ["+G(r)+"]");var o=null;D(a,T)?o=a[T]:(o=y+G(e,"_")+"$"+w,w++,a[T]=o);var i,s,u,l,c,d,f=z[I],p=!!f[b];p&&n&&n[b]!==undefined&&(p=!!n[b]),t(r,function(e,t,n,o){function r(e,t,n){var r,a=t[n];return a[v]&&o&&!1!==(r=e[x]||{})[A]&&(a=(r[t[T]]||{})[n]||a),function(){return a.apply(e,arguments)}}var a={};P(n,function(e){a[e]=r(t,n,e)});for(var i=F(e),s=[];i&&!R(i)&&!O(s,i);)P(i,function(e){!a[e]&&j(i,e,!H)&&(a[e]=r(t,i,e))}),s.push(i),i=F(i);return a}(a,r,(s={},P(i=r,function(e){!s[e]&&j(i,e,!1)&&(s[e]=i[e])}),e=s),p)),u=a,o=o,l=r,c=e,n=!1!==(f=(f=!!H&&!!f[E])&&n?!!n[E]:f),L(u)||(f=l[x]=l[x]||{},d=f[o]=f[o]||{},!1!==f[A]&&(f[A]=!!n),P(l,function(e){var n,r,a;j(l,e,!1)&&l[e]!==c[e]&&(d[e]=l[e],delete l[e],D(u,e)&&(!u[e]||u[e][v])||(u[e]=(n=u,r=e,(a=function(){var e,t;return(function(e,t,n,r){var a=null;if(e&&D(n,T)){var o=e[x]||{};if((a=(o[n[T]]||{})[t])||k("Missing ["+t+"] "+m),!a[C]&&!1!==o[A]){for(var i=!D(e,t),s=F(e),u=[];i&&s&&!R(s)&&!O(u,s);){var l=s[t];if(l){i=l===r;break}u.push(s),s=F(s)}try{i&&(e[t]=a),a[C]=1}catch(c){o[A]=!1}}}return a}(this,r,n,a)||(typeof(t=(t=n[e=r])===a?F(n)[e]:t)!==m&&k("["+e+"] is not a "+m),t)).apply(this,arguments)})[v]=1,a)))}))}z[I]={setInstFuncs:!0,useBaseInst:!0},(ke=p=p||{})[ke.CRITICAL=1]="CRITICAL",ke[ke.WARNING=2]="WARNING";var U={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},X="attachEvent",V="addEventListener",W="detachEvent",B="removeEventListener",K=o;function $(e){return t.toString.call(e)}function J(e){return e===undefined||typeof e===u}function Y(e){return null===e||J(e)}function Z(e){return typeof e===i}function Q(e,t,n,r){void 0===r&&(r=!1);var a=!1;if(!Y(e))try{Y(e[V])?Y(e[X])||(e[X]("on"+t,n),a=!0):(e[V](t,n,r),a=!0)}catch(o){}return a}function ee(e,t,n,r){if(void 0===r&&(r=!1),!Y(e))try{Y(e[B])?Y(e[W])||e[W]("on"+t,n):e[B](t,n,r)}catch(a){}}function te(e,t){if(e)for(var n in e)l.call(e,n)&&t.call(e,n,e[n])}function ne(e,t){return!(!e||!t||!~e.indexOf(t))}function re(e){return"string"==typeof e}function ae(e,t,n){for(var r=e.length,a=0;a<r&&!(a in e&&-1===t.call(n||e,e[a],a,e));a++);}var oe=!{toString:null}.propertyIsEnumerable("toString"),ie=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];function se(e){var t=typeof e;t===i||t===s&&null!==e||c("objKeys called on non-object");var n,r=[];for(n in e)e&&l.call(e,n)&&r.push(n);if(oe)for(var a=ie.length,o=0;o<a;o++)e&&l.call(e,ie[o])&&r.push(ie[o]);return r}function ue(){var e=Date;return e.now?e.now():(new e).getTime()}var le="window",ce="navigator",de="location",fe="performance",pe="JSON",ge="crypto",he="msCrypto",me="msie",xe="trident/",ve=null,Te=null;function ye(e){var t=_();return t&&t[e]?t[e]:e===le&&typeof window===s&&window?window:null}function Ce(){return typeof navigator===s&&navigator?navigator:ye(ce)}function Ae(){return ye(fe)}function Ie(){return typeof JSON===s&&JSON||null!==ye(pe)}function Me(){return Ie()?JSON||ye(pe):null}function Se(e){var t=Object[N].toString.call(e),n="";return"[object Error]"===t?n="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":Ie()&&(n=Me().stringify(e)),t+n}function be(e){return e?'"'+e.replace(/\"/g,"")+'"':""}var Ee=(qe.dataType="MessageData",qe);function qe(e,t,n,r){void 0===n&&(n=!1),this.messageId=e,this.message=(n?"AI: ":"AI (Internal): ")+e,e="",Ie()&&(e=Me().stringify(r)),e=(t?" message:"+be(t):"")+(r?" props:"+be(e):""),this.message+=e}var He=function Bt(n){this.identifier="DiagnosticLogger",this.queue=[];var a=0,i={};z(Bt,this,function(o){function e(e,t){return Y(e=n[e])?t:e}Y(n)&&(n={}),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){if(n=new Ee(t,n,a=void 0!==a&&a,r),o.enableDebugExceptions())throw n;J(n)||!n||J(n.message)||(r=o.consoleLoggingLevel(),a?(a=+n.messageId,!i[a]&&r>=p.WARNING&&(o.warnToConsole(n.message),i[a]=!0)):r>=p.WARNING&&o.warnToConsole(n.message),o.logInternalMessage(e,n))},o.warnToConsole=function(e){var t,n=typeof console!==u?console:ye("console");n&&(t="log",Z(n[t=n.warn?"warn":t])&&n[t](e))},o.resetInternalMessageCount=function(){a=0,i={}},o.logInternalMessage=function(e,t){var n,r;a>=o.maxInternalMessageLimit()||(n=!0,r="AITR_"+t.messageId,i[r]?n=!1:i[r]=!0,n&&(e<=o.telemetryLoggingLevel()&&(o.queue.push(t),a++),a===o.maxInternalMessageLimit()&&(t=new Ee(U.MessageLimitPerPVExceeded,e="Internal events throttle limit per PageView reached for this app.",!1),o.queue.push(t),o.warnToConsole(e))))}})},we="ctx",De=(Le.ParentContextKey="parent",Le.ChildrenContextKey="childEvts",Le);function Le(e,a,t){var r,o=this,i=!1;o.start=ue(),o.name=e,o.isAsync=t,o.isChildEvt=function(){return!1},Z(a)&&(i=function(e){if(K)try{var t={enumerable:!0,configurable:!0,get:function(){return!r&&Z(a)&&(r=a(),a=null),r}};return K(e,"payload",t),!0}catch(n){}return!1}(o)),o.getCtx=function(e){return e?(e===Le.ParentContextKey||e===Le.ChildrenContextKey?o:o[we]||{})[e]:null},o.setCtx=function(e,t){e&&(e===Le.ParentContextKey?(o[e]||(o.isChildEvt=function(){return!0}),o[e]=t):e===Le.ChildrenContextKey?o[e]=t:(o[we]=o[we]||{})[e]=t)},o.complete=function(){var e=0,t=o.getCtx(Le.ChildrenContextKey);if("[object Array]"===$(t))for(var n=0;n<t.length;n++){var r=t[n];r&&(e+=r.time)}o.time=ue()-o.start,o.exTime=o.time-e,o.complete=function(){},!i&&Z(a)&&(o.payload=a())}}var Ne="CoreUtils.doPerf";function _e(e,t,n,r,a){if(e){var o=e;if(o=o&&Z(o.getPerfMgr)?o.getPerfMgr():o){var i,s=void 0,e=o.getCtx(Ne);try{if(s=o.create(t(),r,a))return e&&s.setCtx&&(s.setCtx(De.ParentContextKey,e),e.getCtx&&e.setCtx&&((i=e.getCtx(De.ChildrenContextKey))||(i=[],e.setCtx(De.ChildrenContextKey,i)),i.push(s))),o.setCtx(Ne,s),n(s)}catch(u){s&&s.setCtx&&s.setCtx("exception",u)}finally{s&&o.fire(s),o.setCtx(Ne,e)}}}return n()}var Re=function(a,t){var o=this,i=null,s=Z(a.processTelemetry),u=Z(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){var e=a?a.identifier:"TelemetryPluginChain";_e((r=r||t)?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(p.CRITICAL,U.PluginException,"Plugin ["+a.identifier+"] failed during processTelemetry - "+t),i&&!e&&i.processTelemetry(n,r)}}else i&&(o._hasRun=!0,i.processTelemetry(n,r))},function(){return{item:n}},!n.sync)}};function Fe(e,t){var n=[];if(e&&0<e.length)for(var r=null,a=0;a<e.length;a++){var o=e[a];o&&Z(o.processTelemetry)&&(o=new Re(o,t),n.push(o),r&&r.setNext(o),r=o)}return 0<n.length?n[0]:null}var Pe=function Kt(e,a,n,t){var r,o,i,s,u=this,l=null;null!==t&&(e&&Z(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),Fe(r,t)}(e,u,t||e.getPlugin()):t?(r=u,i=e,s=!1,(o=t)&&e&&(i=[],ae(e,function(e){!s&&e!==o||(s=!0,i.push(e))})),o&&!s&&(i=i||[]).push(o),l=Fe(i,r)):J(t)&&(l=Fe(e,u))),u.core=function(){return n},u.diagLog=function(){return(n||{}).logger||new He(a)},u.getCfg=function(){return a},u.getExtCfg=function(e,t){var n,r;return void 0===t&&(t={}),!a||(r=a.extensionConfig)&&e&&(n=r[e]),n||t},u.getConfig=function(e,t,n){var r;return void 0===n&&(n=!1),(e=u.getExtCfg(e,null))&&!Y(e[t])?r=e[t]:a&&!Y(a[t])&&(r=a[t]),Y(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 Kt((e=void 0===e?null:e)||l,a,n,t)}},je="getPlugin",ke=(Oe.prototype.initialize=function(e,t,n,r){this._baseTelInit(e,t,n,r)},Oe);function Oe(){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&&Z(c.processTelemetry)&&c.processTelemetry(e,null)},s._getTelCtx=function(e){var t=e=void 0===e?null:e;return t||(e=l||new Pe(null,{},s.core),t=c&&c[je]?e.createNew(null,c[je]):e.createNew(null,c)),t},s._baseTelInit=function(e,t,n,r){var a,o;e&&(a="extensionConfig",i=o=[],!e||(i=e[a])!==o&&Y(i)&&(e[a]=i=o)),!r&&t&&(r=t.getProcessTelContext().getNext());var i=c;c&&c[je]&&(i=c[je]()),s.core=t,l=new Pe(r,e,t,i),u=!0}}var Ge=4294967296,ze=4294967295,Ue=!1,Xe=123456789,Ve=987654321;function We(e){var t=ye(ge)||ye(he),n=t&&t.getRandomValues?t.getRandomValues(new Uint32Array(1))[0]&ze:(!(n=Ce())||n.userAgent===Te&&null!==ve||(n=((Te=n.userAgent)||"").toLowerCase(),ve=ne(n,me)||ne(n,xe)),ve?(Ue||function(){try{var e=2147483647&ue();(t=(Math.random()*Ge^e)+e)<0&&(t>>>=0),Xe=123456789+t&ze,Ve=987654321-t&ze,Ue=!0}catch(n){}var t}(),t=((Ve=36969*(65535&Ve)+(Ve>>16)&ze)<<16)+(65535&(Xe=18e3*(65535&Xe)+(Xe>>16)&ze))>>>0&ze|0,(t>>>=0)&ze):Math.floor(Ge*Math.random()|0));return e||(n>>>=0),n}function Be(){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=We())]+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&We())|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 Ke={Attach:Q,AttachEvent:Q,Detach:ee,DetachEvent:ee},$e="_aiHooks",Je=["req","rsp","hkErr","fnErr"],Ye="__proto__",Ze="constructor";function Qe(e,t){if(e)for(var n=0;n<e.length&&!t(e[n],n);n++);}function et(e,i,s,u,l){0<=l&&l<=2&&Qe(e,function(e,t){var n=e.cbks;if(e=n[Je[l]]){i.ctx=function(){return u[t]=u[t]||{}};try{e.apply(i.inst,s)}catch(a){e=i.err;try{var r=n[Je[2]];r&&(i.err=a,r.apply(i.inst,s))}catch(o){}finally{i.err=e}}}})}function tt(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 Qe(e,function(e){t.push(e)}),t}et(e,r,a,t,0);var i=u.f;try{r.rslt=i.apply(this,n)}catch(s){throw r.err=s,et(e,r,a,t,3),s}return et(e,r,a,t,1),r.rslt}}var nt=Object.getPrototypeOf;function rt(e,t,n,r){if(void 0===r&&(r=!0),e&&t&&n&&(e=function o(e,t,n){var r=null;return e&&(e&&l.call(e,t)?r=e:n&&(r=o(function(e){if(e){if(nt)return nt(e);if(e=e[Ye]||e[N]||e[Ze])return e}return null}(e),t,!1))),r}(e,t,r))&&typeof(r=e[t])===i){var a=r[$e];return a||((r=tt(a={i:0,n:t,f:r,h:[]}))[$e]=a,e[t]=r),n={id:a.i,cbks:n,rm:function(){var n=this.id;Qe(a.h,function(e,t){return e.id===n&&(a.h.splice(t,1),1)})}},a.i++,a.h.push(n),n}return null}var at={requestContextHeader:"Request-Context",requestContextTargetKey:"appId",requestContextAppIdFormat:"appId=cid-v1:",requestIdHeader:"Request-Id",traceParentHeader:"traceparent",traceStateHeader:"tracestate",sdkContextHeader:"Sdk-Context",sdkContextHeaderAppIdRequest:"appId",requestContextHeaderLowerCase:"request-context"},ot=(it.sanitizeKeyAndAddUniqueness=function(e,t,n){var r=t.length,a=it.sanitizeKey(e,t);if(a.length!==r){for(var o=0,i=a;n[i]!==undefined;)o++,i=a.substring(0,it.MAX_NAME_LENGTH-3)+it.padNumber(o);a=i}return a},it.sanitizeKey=function(e,t){var n;return t&&(t=it.trim(t.toString())).length>it.MAX_NAME_LENGTH&&(n=t.substring(0,it.MAX_NAME_LENGTH),e.throwInternal(p.WARNING,U.NameTooLong,"name is too long. It has been truncated to "+it.MAX_NAME_LENGTH+" characters.",{name:t},!0)),n||t},it.sanitizeString=function(e,t,n){var r;return void 0===n&&(n=it.MAX_STRING_LENGTH),t&&(n=n||it.MAX_STRING_LENGTH,(t=it.trim(t)).toString().length>n&&(r=t.toString().substring(0,n),e.throwInternal(p.WARNING,U.StringValueTooLong,"string value is too long. It has been truncated to "+n+" characters.",{value:t},!0))),r||t},it.sanitizeUrl=function(e,t){return it.sanitizeInput(e,t,it.MAX_URL_LENGTH,U.UrlTooLong)},it.sanitizeMessage=function(e,t){var n;return t&&t.length>it.MAX_MESSAGE_LENGTH&&(n=t.substring(0,it.MAX_MESSAGE_LENGTH),e.throwInternal(p.WARNING,U.MessageTruncated,"message is too long, it has been truncated to "+it.MAX_MESSAGE_LENGTH+" characters.",{message:t},!0)),n||t},it.sanitizeException=function(e,t){var n;return t&&t.length>it.MAX_EXCEPTION_LENGTH&&(n=t.substring(0,it.MAX_EXCEPTION_LENGTH),e.throwInternal(p.WARNING,U.ExceptionTruncated,"exception is too long, it has been truncated to "+it.MAX_EXCEPTION_LENGTH+" characters.",{exception:t},!0)),n||t},it.sanitizeProperties=function(r,e){var a;return e&&(a={},te(e,function(e,t){if(typeof t===s&&Ie())try{t=Me().stringify(t)}catch(n){r.throwInternal(p.WARNING,U.CannotSerializeObjectNonSerializable,"custom property is not valid",{exception:n},!0)}t=it.sanitizeString(r,t,it.MAX_PROPERTY_LENGTH),e=it.sanitizeKeyAndAddUniqueness(r,e,a),a[e]=t}),e=a),e},it.sanitizeMeasurements=function(n,e){var r;return e&&(r={},te(e,function(e,t){e=it.sanitizeKeyAndAddUniqueness(n,e,r),r[e]=t}),e=r),e},it.sanitizeId=function(e,t){return t&&it.sanitizeInput(e,t,it.MAX_ID_LENGTH,U.IdTooLong).toString()},it.sanitizeInput=function(e,t,n,r){var a;return t&&(t=it.trim(t)).length>n&&(a=t.substring(0,n),e.throwInternal(p.WARNING,r,"input is too long, it has been truncated to "+n+" characters.",{data:t},!0)),a||t},it.padNumber=function(e){return(e="00"+e).substr(e.length-3)},it.trim=function(e){return re(e)?e.replace(/^\s+|\s+$/g,""):e},it.MAX_NAME_LENGTH=150,it.MAX_ID_LENGTH=128,it.MAX_PROPERTY_LENGTH=8192,it.MAX_STRING_LENGTH=1024,it.MAX_URL_LENGTH=2048,it.MAX_MESSAGE_LENGTH=32768,it.MAX_EXCEPTION_LENGTH=32768,it);function it(){}function st(e){var t=""+(e=Math.round(e=isNaN(e)||e<0?0:e))%1e3,n=""+Math.floor(e/1e3)%60,r=""+Math.floor(e/6e4)%60,a=""+Math.floor(e/36e5)%24,t=1===t.length?"00"+t:2===t.length?"0"+t:t,n=n.length<2?"0"+n:n,r=r.length<2?"0"+r:r;return(0<(e=Math.floor(e/864e5))?e+".":"")+(a=a.length<2?"0"+a:a)+":"+r+":"+n+"."+t}var ut,lt,ct="Microsoft_ApplicationInsights_BypassAjaxInstrumentation";(o={})[o.LocalStorage=0]="LocalStorage",o[o.SessionStorage=1]="SessionStorage",(o=ut={})[o.Default=0]="Default",o[o.Required=1]="Required",o[o.Array=2]="Array",o[o.Hidden=4]="Hidden",(o=lt=lt||{})[o.AI=0]="AI",o[o.AI_AND_W3C=1]="AI_AND_W3C",o[o.W3C=2]="W3C";var dt=(typeof document===s&&document?document:ye("document"))||{},ft=0,pt=[null,null,null,null,null];function gt(e){var t,n,r=ft,a=pt,o=a[r];return dt.createElement?a[r]||(o=a[r]=dt.createElement("a")):o={host:(t=ht(t=e,!0))&&null!=(n=t.match(/(www[0-9]?\.)?(.[^/:]+)(\:[\d]+)?/i))&&3<n.length&&re(n[2])&&0<n[2].length?n[2]+(n[3]||""):t},o.href=e,++r>=a.length&&(r=0),ft=r,o}function ht(e,t){var n=null;return!e||null!=(e=e.match(/(\w*):\/\/(.[^/:]+)(\:[\d]+)?/i))&&2<e.length&&re(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 mt={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,o=gt(t).host.toLowerCase();if(o&&(~o.indexOf(":443")||~o.indexOf(":80"))&&(o=(ht(t,!0)||"").toLowerCase()),!(e&&e.enableCorsCorrelation||o===n))return!1;if((n=e&&e.correlationHeaderDomains)&&(ae(n,function(e){e=RegExp(e.toLowerCase().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,".*")).test(o))return!1;return o&&0<o.length},getCorrelationContext:function(e){if((e=e&&mt.getCorrelationContextValue(e,at.requestContextTargetKey))&&e!==mt.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 xt(){var e=Ae();return e&&e.now&&e.timing&&0<(e=e.now()+e.timing.navigationStart)?e:ue()}function vt(e,t){return 0===e||0===t||Y(e)||Y(t)?null:t-e}var Tt,yt=(f(Ct,Tt=function(){this.ver=2,this.success=!0,this.properties={},this.measurements={}}),Ct.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",Ct.dataType="RemoteDependencyData",Ct);function Ct(e,t,n,r,a,o,i,s,u,l,c,d){void 0===u&&(u="Ajax");var f=Tt.call(this)||this;f.aiDataContract={id:ut.Required,ver:ut.Required,name:ut.Default,resultCode:ut.Default,duration:ut.Default,success:ut.Default,data:ut.Default,target:ut.Default,type:ut.Default,properties:ut.Default,measurements:ut.Default,kind:ut.Default,value:ut.Default,count:ut.Default,min:ut.Default,max:ut.Default,stdDev:ut.Default,dependencyKind:ut.Default,dependencySource:ut.Default,commandName:ut.Default,dependencyTypeName:ut.Default},f.id=t,f.duration=st(a),f.success=o,f.resultCode=i+"",f.type=ot.sanitizeString(e,u);var p,g,i=(p=e,t=s,i=o=a=r,o=(u=n)&&0<u.length?(g=(s=gt(u)).host,o||(null!=s.pathname?("/"!=((n=0===s.pathname.length?"/":s.pathname)[0]||"")&&(n="/"+n),i=s.pathname,ot.sanitizeString(p,t?t+" "+n:n)):ot.sanitizeString(p,u))):g=a,{target:g,name:o,data:i});return f.data=ot.sanitizeUrl(e,r)||i.data,f.target=ot.sanitizeString(e,i.target),l&&(f.target=f.target+" | "+l),f.name=ot.sanitizeString(e,i.name),f.properties=ot.sanitizeProperties(e,c),f.measurements=ot.sanitizeMeasurements(e,d),f}var At=(It.create=function(e,t,n,r,a,o){if(n=ot.sanitizeString(r,n)||"not_specified",Y(e)||Y(t)||Y(n))throw Error("Input doesn't contain all required fields");var i={name:n,time:function(e){if("[object Date]"===$(e)){var t=function(e){return 1===(e=""+e).length?"0"+e:e};return 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"}}(new Date),iKey:"",ext:o||{},tags:[],data:{},baseType:t,baseData:e};return Y(a)||te(a,function(e,t){i.data[e]=t}),i},It);function It(){}var Mt="AppInsightsPropertiesPlugin",St="properties";function bt(e,t,n){t=e[t],n=e[n];return t&&n?vt(t,n):0}function Et(e,t,n,r,a){return(a=bt(n,r,a))?qt(e,t,st(a)):0}function qt(e,t,n){var r="ajaxPerf",a=0;return e&&t&&n&&((e[r]=e[r]||{})[t]=n,a=1),a}var Ht=function(){var e=this;e.openDone=!1,e.setRequestHeaderDone=!1,e.sendDone=!1,e.abortDone=!1,e.stateChangeAttached=!1},wt=function $t(e,t,n){var r=this,a=n,v="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 Ht,r.clientFailure=0,r.traceID=e,r.spanID=t,z($t,r,function(x){x.getAbsoluteUrl=function(){return x.requestUrl?(e=gt(x.requestUrl))?e.href:void 0:null;var e},x.getPathName=function(){return x.requestUrl?ot.sanitizeUrl(a,(e=x.method,t=x.requestUrl,e?e.toUpperCase()+" "+t:t)):null;var e,t},x.CreateTrackItem=function(e,t,n){return x.ajaxTotalDuration=Math.round(1e3*vt(x.requestSentTime,x.responseFinishedTime))/1e3,x.ajaxTotalDuration<0?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})[St]={HttpMethod:x.method},x.requestSentTime&&(e.startTime=new Date,e.startTime.setTime(x.requestSentTime)),i=(r=x).perfTiming,s=(a=e)[St]||{},u=0,l="startTime",c="connect"+"End",d="request"+"Start",f="response"+"End",p="transferSize",g="encodedBodySize",h="decodedBodySize",m="serverTiming",i?(u|=Et(s,"End",i,"redirectStart","End"),u|=Et(s,"domainLookup",i,"domainLookupStart","domainLookupEnd"),u|=Et(s,"connect",i,"connectStart",c),u|=Et(s,"request",i,d,"requestEnd"),u|=Et(s,"response",i,"responseStart",f),u|=Et(s,"networkConnect",i,l,c),u|=Et(s,"sentRequest",i,d,f),u|=qt(s,"duration",f=i.duration||bt(i,l,f)||0),u|=qt(s,"perfTotal",f),(f=i[m])&&(o={},ae(f,function(e,t){var n,r,t=(n=e.name||""+t,(r=/([^\w\d_$])/g).test(t=n)?n.replace(r,"_"):t),a=o[t]||{};te(e,function(e,t){("name"!==e&&re(t)||"number"==typeof t)&&(!(t=a[e]?a[e]+";"+t:t)&&re(t)||(a[e]=t))}),o[t]=a}),u|=qt(s,m,o)),u|=qt(s,p,i[p]),u|=qt(s,g,i[g]),u|=qt(s,h,i[h])):r.perfMark&&(u|=qt(s,"missing",r.perfAttempts)),u&&(a[St]=s),t&&0<se(x.requestHeaders).length&&(e[St]=e[St]||{},e[St].requestHeaders=x.requestHeaders),!n||(t=n())&&((n=t.correlationContext)&&(e.correlationContext=n),t.headerMap&&0<se(t.headerMap).length&&(e[St]=e[St]||{},e[St].responseHeaders=t.headerMap),400<=x.status&&(n=t.type,e[St]=e[St]||{},""!==n&&"text"!==n||(e[St][v]=t[v]?t.statusText+" - "+t[v]:t.statusText),"json"===n&&(e[St][v]=t.response?t.statusText+" - "+JSON.stringify(t.response):t.statusText))),e);var r,a,o,i,s,u,l,c,d,f,p,g,h,m}})},Dt=(Lt.isValidTraceId=function(e){return e.match(/^[0-9a-f]{32}$/)&&"00000000000000000000000000000000"!==e},Lt.isValidSpanId=function(e){return e.match(/^[0-9a-f]{16}$/)&&"0000000000000000"!==e},Lt.prototype.toString=function(){return this.version+"-"+this.traceId+"-"+this.spanId+"-"+this.traceFlag},Lt.DEFAULT_TRACE_FLAG="01",Lt.DEFAULT_VERSION="00",Lt);function Lt(e,t){var n=this;n.traceFlag=Lt.DEFAULT_TRACE_FLAG,n.version=Lt.DEFAULT_VERSION,e&&Lt.isValidTraceId(e)?n.traceId=e:n.traceId=Be(),t&&Lt.isValidSpanId(t)?n.spanId=t:n.spanId=Be().substr(0,16)}var Nt="ai.ajxmn.",_t="diagLog",Rt="ajaxData",Ft="throwInternal",Pt="fetch",jt=0;function kt(e){var t=!1;typeof XMLHttpRequest===u||Y(XMLHttpRequest)||(t=!(Y(a=XMLHttpRequest[N])||Y(a.open)||Y(a.send)||Y(a.abort)));var n,r,a=(r=(n=void 0===n?null:n)?n.toLowerCase():"",ne(r=n?r:(n=Ce()||{})?(n.userAgent||"").toLowerCase():"",me)?parseInt(r.split(me)[1]):ne(r,xe)&&(r=parseInt(r.split(xe)[1]))?r+4:null);if(t=!(a&&a<9)&&t)try{(new XMLHttpRequest)[Rt]={};var o=XMLHttpRequest[N].open;XMLHttpRequest[N].open=o}catch(i){t=!1,Gt(e,U.FailedMonitorAjaxOpen,"Failed to enable XMLHttpRequest monitoring, extension is not supported",{exception:Se(i)})}return t}function Ot(e){var t="";try{Y(e)||Y(e[Rt])||Y(e[Rt].requestUrl)||(t+="(url: '"+e[Rt].requestUrl+"')")}catch(n){}return t}function Gt(e,t,n,r,a){e[_t]()[Ft](p.CRITICAL,t,n,r,a)}function zt(e,t,n,r,a){e[_t]()[Ft](p.WARNING,t,n,r,a)}function Ut(t,n,r){return function(e){Gt(t,n,r,{ajaxDiagnosticsMessage:Ot(e.inst),exception:Se(e.err)})}}function Xt(e,t){return e&&t?e.indexOf(t):-1}var Vt,ke=(f(Wt,Vt=ke),Wt.getDefaultConfig=function(){return{maxAjaxCallsPerView:500,disableAjaxTracking:!1,disableFetchTracking:!0,disableCorrelationHeaders:!1,distributedTracingMode:lt.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}},Wt.getEmptyConfig=function(){var t=this.getDefaultConfig();return te(t,function(e){t[e]=undefined}),t},Wt.prototype.processTelemetry=function(e,t){this.processNext(e,t)},Wt.identifier="AjaxDependencyPlugin",Wt);function Wt(){var e=Vt.call(this)||this;e.identifier=Wt.identifier,e.priority=120;var v,T,y,C,A,I,M="trackDependencyDataInternal",t=typeof location===s&&location?location:ye(de),S=!1,b=!1,E=t&&t.host&&t.host.toLowerCase(),q=Wt.getEmptyConfig(),H=!1,r=0,w=0,D=[],L={};return z(Wt,e,function(l,c){function d(e,t,n){D.push(e?rt(e[N],t,n,!1):null)}function f(e,t,n){var r=!1,a=((re(t)?t:(t||{}).url||"")||"").toLowerCase(),o=Xt(a,"?"),i=Xt(a,"#");return-1!==(o=-1===o||-1!==i&&i<o?i:o)&&(a=a.substring(0,o)),Y(e)?Y(t)||(r="object"==typeof t&&!0===t[ct]||!!n&&!0===n[ct]):r=!0===e[ct]||!0===a[ct],r?L[a]||(L[a]=1):L[a]&&(r=!0),r}function p(e,t){var n=!0;return Y(e)||(n=!0===t||!Y(e[Rt])),b&&n}function g(o){o[Rt].xhrMonitoringState.stateChangeAttached=Ke.Attach(o,"readystatechange",function(){try{o&&4===o.readyState&&p(o)&&((a=(r=o)[Rt]).responseFinishedTime=xt(),a.status=r.status,s("xmlhttprequest",a,function(){try{var e=a.CreateTrackItem("Ajax",H,function(){var n,e,t={statusText:r.statusText,headerMap:null,correlationContext:i(r),type:r.responseType,responseText:function(e){try{var t=e.responseType;if(""===t||"text"===t)return e.responseText}catch(n){}return null}(r),response:r.response};return!I||(e=r.getAllResponseHeaders())&&(e=("string"!=typeof e?e:e.replace(/^\s+|\s+$/g,"")).split(/[\r\n]+/),n={},ae(e,function(e){var e=(t=e.split(": ")).shift(),t=t.join(": ");n[e]=t}),t.headerMap=n),t});e?l[M](e):n(null,{requestSentTime:a.requestSentTime,responseFinishedTime:a.responseFinishedTime})}finally{try{r[Rt]=null}catch(t){}}},function(e){n(e,null)}))}catch(t){var e=Se(t);e&&-1!==Xt(e.toLowerCase(),"c00c023f")||Gt(l,U.FailedMonitorAjaxRSC,"Failed to monitor XMLHttpRequest 'readystatechange' event handler, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:Ot(o),exception:e})}function n(e,t){(t=t||{}).ajaxDiagnosticsMessage=Ot(r),e&&(t.exception=Se(e)),zt(l,U.FailedMonitorAjaxDur,"Failed to calculate the duration of the ajax call, monitoring data for this ajax call won't be sent.",t)}var r,a})}function i(e){try{var t=e.getAllResponseHeaders();if(null!==t&&-1!==Xt(t.toLowerCase(),at.requestContextHeaderLowerCase)){var n=e.getResponseHeader(at.requestContextHeader);return mt.getCorrelationContext(n)}}catch(r){zt(l,U.FailedMonitorAjaxGetCorrelationHeader,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{ajaxDiagnosticsMessage:Ot(e),exception:Se(r)})}}function h(e,t){var n;t.requestUrl&&C&&A&&(n=Ae())&&Z(n.mark)&&(e=C+e+"#"+ ++jt,n.mark(e),(e=n.getEntriesByName(e))&&1===e.length&&(t.perfMark=e[0]))}function s(o,i,s,u){var l=i.perfMark,c=Ae(),d=q.maxAjaxPerfLookupAttempts,f=q.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===Xt(r.name,p)&&-1===Xt(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&&Z(c.clearMarks)&&c.clearMarks(l.name),i.perfAttempts=g,s()):setTimeout(h,f)}catch(a){u(a)}}()}function u(e){var t="";try{Y(e)||(t+="string"==typeof e?"(url: '"+e+"')":"(url: '"+e.url+"')")}catch(n){Gt(l,U.FailedMonitorAjaxOpen,"Failed to grab failed fetch diagnostics message",{exception:Se(n)})}return t}function m(e,t,r,n,a){function o(e,t,n){(n=n||{}).fetchDiagnosticsMessage=u(r),t&&(n.exception=Se(t)),zt(l,e,"Failed to calculate the duration of the fetch call, monitoring data for this fetch call won't be sent.",n)}n&&(n.responseFinishedTime=xt(),n.status=t,s("fetch",n,function(){var e=n.CreateTrackItem("Fetch",H,a);e?l[M](e):o(U.FailedMonitorAjaxDur,null,{requestSentTime:n.requestSentTime,responseFinishedTime:n.responseFinishedTime})},function(e){o(U.FailedMonitorAjaxGetCorrelationHeader,e,null)}))}function x(e){if(e&&e.headers)try{var t=e.headers.get(at.requestContextHeader);return mt.getCorrelationContext(t)}catch(n){zt(l,U.FailedMonitorAjaxGetCorrelationHeader,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{fetchDiagnosticsMessage:u(e),exception:Se(n)})}}l.initialize=function(e,t,n,r){if(!l.isInitialized()){c.initialize(e,t,n,r);var a=l._getTelCtx();if(te(Wt.getDefaultConfig(),function(e,t){q[e]=a.getConfig(Wt.identifier,e,t)}),r=q.distributedTracingMode,H=q.enableRequestHeaderTracking,A=q.enableAjaxPerfTracking,w=q.maxAjaxCallsPerView,I=q.enableResponseHeaderTracking,y=r===lt.AI||r===lt.AI_AND_W3C,T=r===lt.AI_AND_W3C||r===lt.W3C,A&&(s=e.instrumentationKey||"unkwn",C=5<s.length?Nt+s.substring(s.length-5)+".":Nt+s+"."),!1===q.disableAjaxTracking&&kt(l)&&!b&&(d(XMLHttpRequest,"open",{req:function(e,t,n,r){var a=e.inst,o=a[Rt];f(a,n)||!p(a,!0)||o&&o.xhrMonitoringState.openDone||(e=a,o=t,a=n,t=r,n=v&&v.telemetryTrace&&v.telemetryTrace.traceID||Be(),r=Be().substr(0,16),(r=new wt(n,r,l[_t]())).method=o,r.requestUrl=a,r.xhrMonitoringState.openDone=!0,r.requestHeaders={},r["async"]=t,e[Rt]=r,g(e))},hkErr:Ut(l,U.FailedMonitorAjaxOpen,"Failed to monitor XMLHttpRequest.open, monitoring data for this ajax call may be incorrect.")}),d(XMLHttpRequest,"send",{req:function(e,t){var n=e.inst,e=n[Rt];p(n)&&!e.xhrMonitoringState.sendDone&&(h("xhr",e),e.requestSentTime=xt(),l.includeCorrelationHeaders(e,undefined,undefined,n),e.xhrMonitoringState.sendDone=!0)},hkErr:Ut(l,U.FailedMonitorAjaxSend,"Failed to monitor XMLHttpRequest, monitoring data for this ajax call may be incorrect.")}),d(XMLHttpRequest,"abort",{req:function(e){var t=e.inst,e=t[Rt];p(t)&&!e.xhrMonitoringState.abortDone&&(e.aborted=1,e.xhrMonitoringState.abortDone=!0)},hkErr:Ut(l,U.FailedMonitorAjaxAbort,"Failed to monitor XMLHttpRequest.abort, monitoring data for this ajax call may be incorrect.")}),H&&d(XMLHttpRequest,"setRequestHeader",{req:function(e,t,n){p(e=e.inst)&&(e[Rt].requestHeaders[t]=n)},hkErr:Ut(l,U.FailedMonitorAjaxSetRequestHeader,"Failed to monitor XMLHttpRequest.setRequestHeader, monitoring data for this ajax call may be incorrect.")}),b=!0),(e=!(r=_())||Y(r.Request)||Y(r.Request[N])||Y(r[Pt])?null:r[Pt])&&(s=_(),u=e.polyfill,!1===q.disableFetchTracking?(D.push(rt(s,Pt,{req:function(e,t,n){var r,a;!S||f(null,t,n)||u&&b||(r=e.ctx(),a=function(e,t){var n=v&&v.telemetryTrace&&v.telemetryTrace.traceID||Be(),r=Be().substr(0,16);(n=new wt(n,r,l[_t]())).requestSentTime=xt(),e instanceof Request?n.requestUrl=e?e.url:"":n.requestUrl=e,r="GET",t&&t.method?r=t.method:e&&e instanceof Request&&(r=e.method),n.method=r;var a={};return H&&new Headers((t?t.headers:0)||e instanceof Request&&e.headers||{}).forEach(function(e,t){a[t]=e}),n.requestHeaders=a,h("fetch",n),n}(t,n),(t=l.includeCorrelationHeaders(a,t,n))!==n&&e.set(1,t),r.data=a)},rsp:function(e,t){var n=e.ctx().data;n&&(e.rslt=e.rslt.then(function(t){return m(0,(t||{}).status,t,n,function(){var n,e={statusText:t.statusText,headerMap:null,correlationContext:x(t)};return I&&(n={},t.headers.forEach(function(e,t){n[t]=e}),e.headerMap=n),e}),t})["catch"](function(e){throw m(0,0,t,n,null,e.message),e}))},hkErr:Ut(l,U.FailedMonitorAjaxOpen,"Failed to monitor Window.fetch, monitoring data for this fetch call may be incorrect.")})),S=!0):u&&D.push(rt(s,Pt,{req:function(e,t,n){f(null,t,n)}})),u&&(s[Pt].polyfill=u)),0<n.length&&n){for(var o=void 0,i=0;!o&&i<n.length;)n[i]&&n[i].identifier===Mt&&(o=n[i]),i++;o&&(v=o.context)}}var s,u},l.teardown=function(){ae(D,function(e){e.rm()}),b=S=!(D=[]),l.setInitialized(!1)},l.trackDependencyData=function(e,t){l[M](e,t)},l.includeCorrelationHeaders=function(e,t,n,r){var a,o,i,s=l._currentWindowHost||E;return t?(mt.canIncludeCorrelationHeader(q,e.getAbsoluteUrl(),s)&&((n=n||{}).headers=new Headers(n.headers||t instanceof Request&&t.headers||{}),y&&(a="|"+e.traceID+"."+e.spanID,n.headers.set(at.requestIdHeader,a),H&&(e.requestHeaders[at.requestIdHeader]=a)),(o=q.appId||v&&v.appId())&&(n.headers.set(at.requestContextHeader,at.requestContextAppIdFormat+o),H&&(e.requestHeaders[at.requestContextHeader]=at.requestContextAppIdFormat+o)),T&&(i=new Dt(e.traceID,e.spanID),n.headers.set(at.traceParentHeader,i.toString()),H&&(e.requestHeaders[at.traceParentHeader]=i.toString()))),n):r?(mt.canIncludeCorrelationHeader(q,e.getAbsoluteUrl(),s)&&(y&&(a="|"+e.traceID+"."+e.spanID,r.setRequestHeader(at.requestIdHeader,a),H&&(e.requestHeaders[at.requestIdHeader]=a)),(o=q.appId||v&&v.appId())&&(r.setRequestHeader(at.requestContextHeader,at.requestContextAppIdFormat+o),H&&(e.requestHeaders[at.requestContextHeader]=at.requestContextAppIdFormat+o)),T&&(i=new Dt(e.traceID,e.spanID),r.setRequestHeader(at.traceParentHeader,i.toString()),H&&(e.requestHeaders[at.traceParentHeader]=i.toString()))),r):undefined},l[M]=function(e,t,n){-1===w||r<w?(q.distributedTracingMode!==lt.W3C&&q.distributedTracingMode!==lt.AI_AND_W3C||"string"!=typeof e.id||"."===e.id[e.id.length-1]||(e.id+="."),Y(e.startTime)&&(e.startTime=new Date),n=At.create(e,yt.dataType,yt.envelopeType,l[_t](),t,n),l.core.track(n)):r===w&&Gt(l,U.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=ke,e.ajaxRecord=wt,function(e,t,n){var r=Object.defineProperty;if(r)try{return r(e,t,n)}catch(a){}typeof n.value!==undefined&&(e[t]=n.value)}(e,"__esModule",{value:!0})};"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||{})); | ||
var e=this,t=function(e){"use strict";var i="function",s="object",u="undefined",E="prototype",r="hasOwnProperty",n=Object,t=n[E],a=n.create,o=n.defineProperty,l=t[r];function j(){return typeof globalThis!==u&&globalThis?globalThis:typeof self!==u&&self?self:typeof window!==u&&window?window:typeof global!==u&&global?global:null}function c(e){throw new TypeError(e)}(j()||{}).Symbol,(j()||{}).Reflect;var d=function(e,t){return(d=n.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t[r](n)&&(e[n]=t[n])})(e,t)};function f(e,t){function n(){this.constructor=e}typeof t!==i&&null!==t&&c("Class extends value "+t+" is not a constructor or null"),d(e,t),e[E]=null===t?function(e){if(a)return a(e);if(null==e)return{};var t=typeof e;function n(){}return t!==s&&t!==i&&c("Object prototype may only be an Object:"+e),n[E]=e,new n}(t):(n[E]=t[E],new n)}var p,g="constructor",h="prototype",m="function",x="_dynInstFuncs",v="_isDynProxy",y="_dynClass",C="_dynCls$",T="_dynInstChk",I=T,b="_dfOpts",A="_unknown_",S="__proto__",w="useBaseInst",q="setInstFuncs",M=Object,F=M.getPrototypeOf,H=0;function D(e,t){return e&&M[h].hasOwnProperty.call(e,t)}function L(e){return e&&(e===M[h]||e===Array[h])}function R(e){return L(e)||e===Function[h]}function P(e){if(e){if(F)return F(e);if(e=e[S]||e[h]||(e[g]?e[g][h]:null))return e}return null}function N(e,t){var n=[],r=M.getOwnPropertyNames;if(r)n=r(e);else for(var a in e)"string"==typeof a&&D(e,a)&&n.push(a);if(n&&0<n.length)for(var o=0;o<n.length;o++)t(n[o])}function k(e,t,n){return t!==g&&typeof e[t]===m&&(n||D(e,t))}function _(e){throw new TypeError("DynamicProto: "+e)}function O(e,t){for(var n=e.length-1;0<=n;n--)if(e[n]===t)return 1}function U(e,t){return D(e,h)?e.name||t||A:((e||{})[g]||{}).name||t||A}function W(e,r,t,n){D(e,h)||_("theClass is an invalid class definition.");var a=e[h];!function(e){if(F)for(var t=[],n=P(r);n&&!R(n)&&!O(t,n);){if(n===e)return 1;t.push(n),n=P(n)}}(a)&&_("["+U(e)+"] is not in class hierarchy of ["+U(r)+"]");var o=null;D(a,y)?o=a[y]:(o=C+U(e,"_")+"$"+H,H++,a[y]=o);var i=W[b],s=!!i[w];s&&n&&n[w]!==undefined&&(s=!!n[w]);var u,l,c,d,f,p,e=(l={},N(u=r,function(e){!l[e]&&k(u,e,!1)&&(l[e]=u[e])}),l);t(r,function(e,t,n,o){function r(e,t,n){var r,a=t[n];return a[v]&&o&&!1!==(r=e[x]||{})[I]&&(a=(r[t[y]]||{})[n]||a),function(){return a.apply(e,arguments)}}var a={};N(n,function(e){a[e]=r(t,n,e)});for(var i=P(e),s=[];i&&!R(i)&&!O(s,i);)N(i,function(e){!a[e]&&k(i,e,!F)&&(a[e]=r(t,i,e))}),s.push(i),i=P(i);return a}(a,r,e,s)),i=!!F&&!!i[q],c=a,o=o,d=r,f=e,n=!1!==(i=i&&n?!!n[q]:i),L(c)||(i=d[x]=d[x]||{},p=i[o]=i[o]||{},!1!==i[I]&&(i[I]=!!n),N(d,function(e){var n,r,a;k(d,e,!1)&&d[e]!==f[e]&&(p[e]=d[e],delete d[e],D(c,e)&&(!c[e]||c[e][v])||(c[e]=(n=c,r=e,(a=function(){var e,t;return(function(e,t,n,r){var a=null;if(e&&D(n,y)){var o=e[x]||{};if((a=(o[n[y]]||{})[t])||_("Missing ["+t+"] "+m),!a[T]&&!1!==o[I]){for(var i=!D(e,t),s=P(e),u=[];i&&s&&!R(s)&&!O(u,s);){var l=s[t];if(l){i=l===r;break}u.push(s),s=P(s)}try{i&&(e[t]=a),a[T]=1}catch(c){o[I]=!1}}}return a}(this,r,n,a)||(typeof(t=(t=n[e=r])===a?P(n)[e]:t)!==m&&_("["+e+"] is not a "+m),t)).apply(this,arguments)})[v]=1,a)))}))}W[b]={setInstFuncs:!0,useBaseInst:!0},(Oe=p=p||{})[Oe.CRITICAL=1]="CRITICAL",Oe[Oe.WARNING=2]="WARNING";var V={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},B="attachEvent",z="addEventListener",K="detachEvent",X="removeEventListener",G=o;function $(e){return t.toString.call(e)}function J(e){return e===undefined||typeof e===u}function Z(e){return null===e||J(e)}function Q(e){return typeof e===i}function Y(e,t,n,r){void 0===r&&(r=!1);var a=!1;if(!Z(e))try{Z(e[z])?Z(e[B])||(e[B]("on"+t,n),a=!0):(e[z](t,n,r),a=!0)}catch(o){}return a}function ee(e,t,n,r){if(void 0===r&&(r=!1),!Z(e))try{Z(e[X])?Z(e[K])||e[K]("on"+t,n):e[X](t,n,r)}catch(a){}}function te(e,t){if(e)for(var n in e)l.call(e,n)&&t.call(e,n,e[n])}function ne(e,t){return!(!e||!t||!~e.indexOf(t))}function re(e){return"string"==typeof e}function ae(e,t,n){for(var r=e.length,a=0;a<r&&!(a in e&&-1===t.call(n||e,e[a],a,e));a++);}function oe(e){return"string"!=typeof e?e:e.replace(/^\s+|\s+$/g,"")}var ie=!{toString:null}.propertyIsEnumerable("toString"),se=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];function ue(e){var t=typeof e;t===i||t===s&&null!==e||c("objKeys called on non-object");var n,r=[];for(n in e)e&&l.call(e,n)&&r.push(n);if(ie)for(var a=se.length,o=0;o<a;o++)e&&l.call(e,se[o])&&r.push(se[o]);return r}function le(){var e=Date;return e.now?e.now():(new e).getTime()}var ce="window",de="navigator",fe="location",pe="performance",ge="JSON",he="crypto",me="msCrypto",xe="msie",ve="trident/",ye=null,Ce=null;function Te(e){var t=j();return t&&t[e]?t[e]:e===ce&&typeof window===s&&window?window:null}function Ie(){return typeof navigator===s&&navigator?navigator:Te(de)}function be(){return Te(pe)}function Ae(){return typeof JSON===s&&JSON||null!==Te(ge)}function Se(){return Ae()?JSON||Te(ge):null}function we(e){var t=Object[E].toString.call(e),n="";return"[object Error]"===t?n="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":Ae()&&(n=Se().stringify(e)),t+n}function qe(e){return e?'"'+e.replace(/\"/g,"")+'"':""}var Me=(Fe.dataType="MessageData",Fe);function Fe(e,t,n,r){void 0===n&&(n=!1),this.messageId=e,this.message=(n?"AI: ":"AI (Internal): ")+e,e="",Ae()&&(e=Se().stringify(r)),e=(t?" message:"+qe(t):"")+(r?" props:"+qe(e):""),this.message+=e}var He=function $t(n){this.identifier="DiagnosticLogger",this.queue=[];var a=0,i={};W($t,this,function(o){function e(e,t){return Z(e=n[e])?t:e}Z(n)&&(n={}),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){if(n=new Me(t,n,a=void 0!==a&&a,r),o.enableDebugExceptions())throw n;J(n)||!n||J(n.message)||(r=o.consoleLoggingLevel(),a?(a=+n.messageId,!i[a]&&r>=p.WARNING&&(o.warnToConsole(n.message),i[a]=!0)):r>=p.WARNING&&o.warnToConsole(n.message),o.logInternalMessage(e,n))},o.warnToConsole=function(e){var t,n=typeof console!==u?console:Te("console");n&&(t="log",Q(n[t=n.warn?"warn":t])&&n[t](e))},o.resetInternalMessageCount=function(){a=0,i={}},o.logInternalMessage=function(e,t){var n,r;a>=o.maxInternalMessageLimit()||(n=!0,r="AITR_"+t.messageId,i[r]?n=!1:i[r]=!0,n&&(e<=o.telemetryLoggingLevel()&&(o.queue.push(t),a++),a===o.maxInternalMessageLimit()&&(t=new Me(V.MessageLimitPerPVExceeded,e="Internal events throttle limit per PageView reached for this app.",!1),o.queue.push(t),o.warnToConsole(e))))}})},De="ctx",Le=(Re.ParentContextKey="parent",Re.ChildrenContextKey="childEvts",Re);function Re(e,a,t){var r,o=this,i=!1;o.start=le(),o.name=e,o.isAsync=t,o.isChildEvt=function(){return!1},Q(a)&&(i=function(e){if(G)try{var t={enumerable:!0,configurable:!0,get:function(){return!r&&Q(a)&&(r=a(),a=null),r}};return G(e,"payload",t),!0}catch(n){}return!1}(o)),o.getCtx=function(e){return e?(e===Re.ParentContextKey||e===Re.ChildrenContextKey?o:o[De]||{})[e]:null},o.setCtx=function(e,t){e&&(e===Re.ParentContextKey?(o[e]||(o.isChildEvt=function(){return!0}),o[e]=t):e===Re.ChildrenContextKey?o[e]=t:(o[De]=o[De]||{})[e]=t)},o.complete=function(){var e=0,t=o.getCtx(Re.ChildrenContextKey);if("[object Array]"===$(t))for(var n=0;n<t.length;n++){var r=t[n];r&&(e+=r.time)}o.time=le()-o.start,o.exTime=o.time-e,o.complete=function(){},!i&&Q(a)&&(o.payload=a())}}var Ee="CoreUtils.doPerf";function je(e,t,n,r,a){if(e){var o=e;if(o=o&&Q(o.getPerfMgr)?o.getPerfMgr():o){var i,s=void 0,e=o.getCtx(Ee);try{if(s=o.create(t(),r,a))return e&&s.setCtx&&(s.setCtx(Le.ParentContextKey,e),e.getCtx&&e.setCtx&&((i=e.getCtx(Le.ChildrenContextKey))||(i=[],e.setCtx(Le.ChildrenContextKey,i)),i.push(s))),o.setCtx(Ee,s),n(s)}catch(u){s&&s.setCtx&&s.setCtx("exception",u)}finally{s&&o.fire(s),o.setCtx(Ee,e)}}}return n()}var Pe=function(a,t){var o=this,i=null,s=Q(a.processTelemetry),u=Q(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";je(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(p.CRITICAL,V.PluginException,"Plugin ["+a.identifier+"] failed during processTelemetry - "+t),i&&!e&&i.processTelemetry(n,r)}}else i&&(o._hasRun=!0,i.processTelemetry(n,r))},function(){return{item:n}},!n.sync)}};function Ne(e,t){var n=[];if(e&&0<e.length)for(var r=null,a=0;a<e.length;a++){var o=e[a];o&&Q(o.processTelemetry)&&(o=new Pe(o,t),n.push(o),r&&r.setNext(o),r=o)}return 0<n.length?n[0]:null}var ke=function Jt(e,a,n,t){var r,o,i,s,u=this,l=null;null!==t&&(e&&Q(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),Ne(r,t)}(e,u,t||e.getPlugin()):t?(r=u,i=e,s=!1,(o=t)&&e&&(i=[],ae(e,function(e){!s&&e!==o||(s=!0,i.push(e))})),o&&!s&&(i=i||[]).push(o),l=Ne(i,r)):J(t)&&(l=Ne(e,u))),u.core=function(){return n},u.diagLog=function(){return(n||{}).logger||new He(a)},u.getCfg=function(){return a},u.getExtCfg=function(e,t){var n,r;return void 0===t&&(t={}),!a||(r=a.extensionConfig)&&e&&(n=r[e]),n||t},u.getConfig=function(e,t,n){var r;return void 0===n&&(n=!1),(e=u.getExtCfg(e,null))&&!Z(e[t])?r=e[t]:a&&!Z(a[t])&&(r=a[t]),Z(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 Jt((e=void 0===e?null:e)||l,a,n,t)}},_e="getPlugin",Oe=(Ue.prototype.initialize=function(e,t,n,r){this._baseTelInit(e,t,n,r)},Ue);function Ue(){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&&Q(c.processTelemetry)&&c.processTelemetry(e,null)},s._getTelCtx=function(e){var t=e=void 0===e?null:e;return t||(e=l||new ke(null,{},s.core),t=c&&c[_e]?e.createNew(null,c[_e]):e.createNew(null,c)),t},s._baseTelInit=function(e,t,n,r){var a,o;e&&(a="extensionConfig",i=o=[],!e||(i=e[a])!==o&&Z(i)&&(e[a]=i=o)),!r&&t&&(r=t.getProcessTelContext().getNext());var i=c;c&&c[_e]&&(i=c[_e]()),s.core=t,l=new ke(r,e,t,i),u=!0}}var We=4294967296,Ve=4294967295,Be=!1,ze=123456789,Ke=987654321;function Xe(e){var t=Te(he)||Te(me),n=t&&t.getRandomValues?t.getRandomValues(new Uint32Array(1))[0]&Ve:(!(n=Ie())||n.userAgent===Ce&&null!==ye||(n=((Ce=n.userAgent)||"").toLowerCase(),ye=ne(n,xe)||ne(n,ve)),ye?(Be||function(){try{var e=2147483647&le();(t=(Math.random()*We^e)+e)<0&&(t>>>=0),ze=123456789+t&Ve,Ke=987654321-t&Ve,Be=!0}catch(n){}var t}(),t=((Ke=36969*(65535&Ke)+(Ke>>16)&Ve)<<16)+(65535&(ze=18e3*(65535&ze)+(ze>>16)&Ve))>>>0&Ve|0,(t>>>=0)&Ve):Math.floor(We*Math.random()|0));return e||(n>>>=0),n}function Ge(){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=Xe())]+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&Xe())|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 $e={Attach:Y,AttachEvent:Y,Detach:ee,DetachEvent:ee},Je="_aiHooks",Ze=["req","rsp","hkErr","fnErr"],Qe="__proto__",Ye="constructor";function et(e,t){if(e)for(var n=0;n<e.length&&!t(e[n],n);n++);}function tt(e,i,s,u,l){0<=l&&l<=2&&et(e,function(e,t){var n=e.cbks;if(e=n[Ze[l]]){i.ctx=function(){return u[t]=u[t]||{}};try{e.apply(i.inst,s)}catch(a){e=i.err;try{var r=n[Ze[2]];r&&(i.err=a,r.apply(i.inst,s))}catch(o){}finally{i.err=e}}}})}function nt(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 et(e,function(e){t.push(e)}),t}tt(e,r,a,t,0);var i=u.f;try{r.rslt=i.apply(this,n)}catch(s){throw r.err=s,tt(e,r,a,t,3),s}return tt(e,r,a,t,1),r.rslt}}var rt=Object.getPrototypeOf;function at(e,t,n,r){if(void 0===r&&(r=!0),e&&t&&n&&(e=function o(e,t,n){var r=null;return e&&(e&&l.call(e,t)?r=e:n&&(r=o(function(e){if(e){if(rt)return rt(e);if(e=e[Qe]||e[E]||e[Ye])return e}return null}(e),t,!1))),r}(e,t,r))&&typeof(r=e[t])===i){var a=r[Je];return a||((r=nt(a={i:0,n:t,f:r,h:[]}))[Je]=a,e[t]=r),n={id:a.i,cbks:n,rm:function(){var n=this.id;et(a.h,function(e,t){return e.id===n&&(a.h.splice(t,1),1)})}},a.i++,a.h.push(n),n}return null}var ot={requestContextHeader:"Request-Context",requestContextTargetKey:"appId",requestContextAppIdFormat:"appId=cid-v1:",requestIdHeader:"Request-Id",traceParentHeader:"traceparent",traceStateHeader:"tracestate",sdkContextHeader:"Sdk-Context",sdkContextHeaderAppIdRequest:"appId",requestContextHeaderLowerCase:"request-context"};function it(e,t,n){var r,a,o=t.length,i=(t&&150<(t=oe(t.toString())).length&&(r=t.substring(0,150),e.throwInternal(p.WARNING,V.NameTooLong,"name is too long. It has been truncated to 150 characters.",{name:t},!0)),r||t);if(i.length!==o){for(var s=0,u=i;n[u]!==undefined;)s++,u=i.substring(0,147)+(a="00"+s).substr(a.length-3);i=u}return i}function st(e,t,n){var r;return void 0===n&&(n=1024),t&&(n=n||1024,(t=oe(t)).toString().length>n&&(r=t.toString().substring(0,n),e.throwInternal(p.WARNING,V.StringValueTooLong,"string value is too long. It has been truncated to "+n+" characters.",{value:t},!0))),r||t}function ut(e,t){return n=e,e=t,t=V.UrlTooLong,e&&2048<(e=oe(e)).length&&(r=e.substring(0,2048),n.throwInternal(p.WARNING,t,"input is too long, it has been truncated to 2048 characters.",{data:e},!0)),r||e;var n,r}function lt(r,e){var a;return e&&(a={},te(e,function(e,t){if(typeof t===s&&Ae())try{t=Se().stringify(t)}catch(n){r.throwInternal(p.WARNING,V.CannotSerializeObjectNonSerializable,"custom property is not valid",{exception:n},!0)}t=st(r,t,8192),e=it(r,e,a),a[e]=t}),e=a),e}function ct(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 dt,ft="Microsoft_ApplicationInsights_BypassAjaxInstrumentation";(o={})[o.LocalStorage=0]="LocalStorage",o[o.SessionStorage=1]="SessionStorage",(o=dt=dt||{})[o.AI=0]="AI",o[o.AI_AND_W3C=1]="AI_AND_W3C",o[o.W3C=2]="W3C";var pt=(typeof document===s&&document?document:Te("document"))||{},gt=0,ht=[null,null,null,null,null];function mt(e){var t,n,r=gt,a=ht,o=a[r];return pt.createElement?a[r]||(o=a[r]=pt.createElement("a")):o={host:(t=xt(t=e,!0))&&null!=(n=t.match(/(www[0-9]?\.)?(.[^/:]+)(\:[\d]+)?/i))&&3<n.length&&re(n[2])&&0<n[2].length?n[2]+(n[3]||""):t},o.href=e,++r>=a.length&&(r=0),gt=r,o}function xt(e,t){var n=null;return!e||null!=(e=e.match(/(\w*):\/\/(.[^/:]+)(\:[\d]+)?/i))&&2<e.length&&re(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 vt={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,o=mt(t).host.toLowerCase();if(o&&(~o.indexOf(":443")||~o.indexOf(":80"))&&(o=(xt(t,!0)||"").toLowerCase()),!(e&&e.enableCorsCorrelation||o===n))return!1;if((n=e&&e.correlationHeaderDomains)&&(ae(n,function(e){e=RegExp(e.toLowerCase().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,".*")).test(o))return!1;return o&&0<o.length},getCorrelationContext:function(e){if((e=e&&vt.getCorrelationContextValue(e,ot.requestContextTargetKey))&&e!==vt.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 yt(){var e=be();return e&&e.now&&e.timing&&0<(e=e.now()+e.timing.navigationStart)?e:le()}function Ct(e,t){return 0===e||0===t||Z(e)||Z(t)?null:t-e}var Tt,It=(f(bt,Tt=function(){this.ver=2,this.success=!0,this.properties={},this.measurements={}}),bt.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",bt.dataType="RemoteDependencyData",bt);function bt(e,t,n,r,a,o,i,s,u,l,c,d){void 0===u&&(u="Ajax");var f=Tt.call(this)||this;f.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},f.id=t,f.duration=ct(a),f.success=o,f.resultCode=i+"",f.type=st(e,u);var p,g,h,m,i=(p=e,t=s,i=o=a=r,o=(u=n)&&0<u.length?(g=(s=mt(u)).host,o||(null!=s.pathname?("/"!=((n=0===s.pathname.length?"/":s.pathname)[0]||"")&&(n="/"+n),i=s.pathname,st(p,t?t+" "+n:n)):st(p,u))):g=a,{target:g,name:o,data:i});return f.data=ut(e,r)||i.data,f.target=st(e,i.target),l&&(f.target=f.target+" | "+l),f.name=st(e,i.name),f.properties=lt(e,c),f.measurements=(h=e,d&&(m={},te(d,function(e,t){e=it(h,e,m),m[e]=t}),d=m),d),f}var At=(St.create=function(e,t,n,r,a,o){if(n=st(r,n)||"not_specified",Z(e)||Z(t)||Z(n))throw Error("Input doesn't contain all required fields");var i={name:n,time:function(e){if("[object Date]"===$(e)){var t=function(e){return 1===(e=""+e).length?"0"+e:e};return 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"}}(new Date),iKey:"",ext:o||{},tags:[],data:{},baseType:t,baseData:e};return Z(a)||te(a,function(e,t){i.data[e]=t}),i},St);function St(){}var wt="AppInsightsPropertiesPlugin",qt="properties";function Mt(e,t,n){t=e[t],n=e[n];return t&&n?Ct(t,n):0}function Ft(e,t,n,r,a){return(a=Mt(n,r,a))?Ht(e,t,ct(a)):0}function Ht(e,t,n){var r="ajaxPerf",a=0;return e&&t&&n&&((e[r]=e[r]||{})[t]=n,a=1),a}var Dt=function(){var e=this;e.openDone=!1,e.setRequestHeaderDone=!1,e.sendDone=!1,e.abortDone=!1,e.stateChangeAttached=!1},Lt=function Zt(e,t,n){var r=this,a=n,v="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 Dt,r.clientFailure=0,r.traceID=e,r.spanID=t,W(Zt,r,function(x){x.getAbsoluteUrl=function(){return x.requestUrl?(e=mt(x.requestUrl))?e.href:void 0:null;var e},x.getPathName=function(){return x.requestUrl?ut(a,(e=x.method,t=x.requestUrl,e?e.toUpperCase()+" "+t:t)):null;var e,t},x.CreateTrackItem=function(e,t,n){return x.ajaxTotalDuration=Math.round(1e3*Ct(x.requestSentTime,x.responseFinishedTime))/1e3,x.ajaxTotalDuration<0?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})[qt]={HttpMethod:x.method},x.requestSentTime&&(e.startTime=new Date,e.startTime.setTime(x.requestSentTime)),a=e,i=(r=x).perfTiming,s=a[qt]||{},u=0,l="startTime",c="connect"+"End",d="request"+"Start",f="response"+"End",p="transferSize",g="encodedBodySize",h="decodedBodySize",m="serverTiming",i?(u|=Ft(s,"End",i,"redirectStart","End"),u|=Ft(s,"domainLookup",i,"domainLookupStart","domainLookupEnd"),u|=Ft(s,"connect",i,"connectStart",c),u|=Ft(s,"request",i,d,"requestEnd"),u|=Ft(s,"response",i,"responseStart",f),u|=Ft(s,"networkConnect",i,l,c),u|=Ft(s,"sentRequest",i,d,f),u|=Ht(s,"duration",f=i.duration||Mt(i,l,f)||0),u|=Ht(s,"perfTotal",f),(f=i[m])&&(o={},ae(f,function(e,t){var n,r=(r=n=e.name||""+t,(t=/([^\w\d_$])/g).test(n)?n.replace(t,"_"):r),a=o[r]||{};te(e,function(e,t){("name"!==e&&re(t)||"number"==typeof t)&&(!(t=a[e]?a[e]+";"+t:t)&&re(t)||(a[e]=t))}),o[r]=a}),u|=Ht(s,m,o)),u|=Ht(s,p,i[p]),u|=Ht(s,g,i[g]),u|=Ht(s,h,i[h])):r.perfMark&&(u|=Ht(s,"missing",r.perfAttempts)),u&&(a[qt]=s),t&&0<ue(x.requestHeaders).length&&(e[qt]=e[qt]||{},e[qt].requestHeaders=x.requestHeaders),!n||(t=n())&&((n=t.correlationContext)&&(e.correlationContext=n),t.headerMap&&0<ue(t.headerMap).length&&(e[qt]=e[qt]||{},e[qt].responseHeaders=t.headerMap),400<=x.status&&(n=t.type,e[qt]=e[qt]||{},""!==n&&"text"!==n||(e[qt][v]=t[v]?t.statusText+" - "+t[v]:t.statusText),"json"===n&&(e[qt][v]=t.response?t.statusText+" - "+JSON.stringify(t.response):t.statusText))),e);var r,a,o,i,s,u,l,c,d,f,p,g,h,m}})},Rt=(Et.isValidTraceId=function(e){return e.match(/^[0-9a-f]{32}$/)&&"00000000000000000000000000000000"!==e},Et.isValidSpanId=function(e){return e.match(/^[0-9a-f]{16}$/)&&"0000000000000000"!==e},Et.prototype.toString=function(){return this.version+"-"+this.traceId+"-"+this.spanId+"-"+this.traceFlag},Et.DEFAULT_TRACE_FLAG="01",Et.DEFAULT_VERSION="00",Et);function Et(e,t){var n=this;n.traceFlag=Et.DEFAULT_TRACE_FLAG,n.version=Et.DEFAULT_VERSION,e&&Et.isValidTraceId(e)?n.traceId=e:n.traceId=Ge(),t&&Et.isValidSpanId(t)?n.spanId=t:n.spanId=Ge().substr(0,16)}var jt="ai.ajxmn.",Pt="diagLog",Nt="ajaxData",kt="throwInternal",_t="fetch",Ot=0;function Ut(e){var t=!1;typeof XMLHttpRequest===u||Z(XMLHttpRequest)||(t=!(Z(a=XMLHttpRequest[E])||Z(a.open)||Z(a.send)||Z(a.abort)));var n,r,a=ne(n=((n=(n=void 0===n?null:n)?n:(r=Ie()||{})?(r.userAgent||"").toLowerCase():"")||"").toLowerCase(),xe)?parseInt(n.split(xe)[1]):ne(n,ve)&&(n=parseInt(n.split(ve)[1]))?n+4:null;if(t=!(a&&a<9)&&t)try{(new XMLHttpRequest)[Nt]={};var o=XMLHttpRequest[E].open;XMLHttpRequest[E].open=o}catch(i){t=!1,Vt(e,V.FailedMonitorAjaxOpen,"Failed to enable XMLHttpRequest monitoring, extension is not supported",{exception:we(i)})}return t}function Wt(e){var t="";try{Z(e)||Z(e[Nt])||Z(e[Nt].requestUrl)||(t+="(url: '"+e[Nt].requestUrl+"')")}catch(n){}return t}function Vt(e,t,n,r,a){e[Pt]()[kt](p.CRITICAL,t,n,r,a)}function Bt(e,t,n,r,a){e[Pt]()[kt](p.WARNING,t,n,r,a)}function zt(t,n,r){return function(e){Vt(t,n,r,{ajaxDiagnosticsMessage:Wt(e.inst),exception:we(e.err)})}}function Kt(e,t){return e&&t?e.indexOf(t):-1}var Xt,Oe=(f(Gt,Xt=Oe),Gt.getDefaultConfig=function(){return{maxAjaxCallsPerView:500,disableAjaxTracking:!1,disableFetchTracking:!0,disableCorrelationHeaders:!1,distributedTracingMode:dt.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"]}},Gt.getEmptyConfig=function(){var t=this.getDefaultConfig();return te(t,function(e){t[e]=undefined}),t},Gt.prototype.processTelemetry=function(e,t){this.processNext(e,t)},Gt.identifier="AjaxDependencyPlugin",Gt);function Gt(){var e=Xt.call(this)||this;e.identifier=Gt.identifier,e.priority=120;var y,C,T,I,b,A,S="trackDependencyDataInternal",t=typeof location===s&&location?location:Te(fe),w=!1,q=!1,M=t&&t.host&&t.host.toLowerCase(),F=Gt.getEmptyConfig(),H=!1,r=0,D=0,L=[],R={};return W(Gt,e,function(l,c){function d(t){var n=!0;return(t||F.ignoreHeaders)&&ae(F.ignoreHeaders,function(e){if(e.toLowerCase()==t.toLowerCase())return n=!1,-1}),n}function f(e,t,n){L.push(e?at(e[E],t,n,!1):null)}function p(e,t,n){var r=!1,a=((re(t)?t:(t||{}).url||"")||"").toLowerCase(),o=Kt(a,"?"),i=Kt(a,"#");return-1!==(o=-1===o||-1!==i&&i<o?i:o)&&(a=a.substring(0,o)),Z(e)?Z(t)||(r="object"==typeof t&&!0===t[ft]||!!n&&!0===n[ft]):r=!0===e[ft]||!0===a[ft],r?R[a]||(R[a]=1):R[a]&&(r=!0),r}function g(e,t){var n=!0,r=q;return Z(e)||(n=!0===t||!Z(e[Nt])),r&&n}function h(o){o[Nt].xhrMonitoringState.stateChangeAttached=$e.Attach(o,"readystatechange",function(){try{o&&4===o.readyState&&g(o)&&((a=(r=o)[Nt]).responseFinishedTime=yt(),a.status=r.status,s("xmlhttprequest",a,function(){try{var e=a.CreateTrackItem("Ajax",H,function(){var e,n,t={statusText:r.statusText,headerMap:null,correlationContext:i(r),type:r.responseType,responseText:function(e){try{var t=e.responseType;if(""===t||"text"===t)return e.responseText}catch(n){}return null}(r),response:r.response};return!A||(e=r.getAllResponseHeaders())&&(e=oe(e).split(/[\r\n]+/),n={},ae(e,function(e){var e=(t=e.split(": ")).shift(),t=t.join(": ");d(e)&&(n[e]=t)}),t.headerMap=n),t});e?l[S](e):n(null,{requestSentTime:a.requestSentTime,responseFinishedTime:a.responseFinishedTime})}finally{try{r[Nt]=null}catch(t){}}},function(e){n(e,null)}))}catch(t){var e=we(t);e&&-1!==Kt(e.toLowerCase(),"c00c023f")||Vt(l,V.FailedMonitorAjaxRSC,"Failed to monitor XMLHttpRequest 'readystatechange' event handler, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:Wt(o),exception:e})}function n(e,t){(t=t||{}).ajaxDiagnosticsMessage=Wt(r),e&&(t.exception=we(e)),Bt(l,V.FailedMonitorAjaxDur,"Failed to calculate the duration of the ajax call, monitoring data for this ajax call won't be sent.",t)}var r,a})}function i(e){try{var t=e.getAllResponseHeaders();if(null!==t&&-1!==Kt(t.toLowerCase(),ot.requestContextHeaderLowerCase)){var n=e.getResponseHeader(ot.requestContextHeader);return vt.getCorrelationContext(n)}}catch(r){Bt(l,V.FailedMonitorAjaxGetCorrelationHeader,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{ajaxDiagnosticsMessage:Wt(e),exception:we(r)})}}function m(e,t){var n;t.requestUrl&&I&&b&&(n=be())&&Q(n.mark)&&(e=I+e+"#"+ ++Ot,n.mark(e),(e=n.getEntriesByName(e))&&1===e.length&&(t.perfMark=e[0]))}function s(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===Kt(r.name,p)&&-1===Kt(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&&Q(c.clearMarks)&&c.clearMarks(l.name),i.perfAttempts=g,s()):setTimeout(h,f)}catch(a){u(a)}}()}function u(e){var t="";try{Z(e)||(t+="string"==typeof e?"(url: '"+e+"')":"(url: '"+e.url+"')")}catch(n){Vt(l,V.FailedMonitorAjaxOpen,"Failed to grab failed fetch diagnostics message",{exception:we(n)})}return t}function x(e,t,r,n,a){function o(e,t,n){(n=n||{}).fetchDiagnosticsMessage=u(r),t&&(n.exception=we(t)),Bt(l,e,"Failed to calculate the duration of the fetch call, monitoring data for this fetch call won't be sent.",n)}n&&(n.responseFinishedTime=yt(),n.status=t,s("fetch",n,function(){var e=n.CreateTrackItem("Fetch",H,a);e?l[S](e):o(V.FailedMonitorAjaxDur,null,{requestSentTime:n.requestSentTime,responseFinishedTime:n.responseFinishedTime})},function(e){o(V.FailedMonitorAjaxGetCorrelationHeader,e,null)}))}function v(e){if(e&&e.headers)try{var t=e.headers.get(ot.requestContextHeader);return vt.getCorrelationContext(t)}catch(n){Bt(l,V.FailedMonitorAjaxGetCorrelationHeader,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{fetchDiagnosticsMessage:u(e),exception:we(n)})}}l.initialize=function(e,t,n,r){if(!l.isInitialized()){c.initialize(e,t,n,r);var a=l._getTelCtx();if(te(Gt.getDefaultConfig(),function(e,t){F[e]=a.getConfig(Gt.identifier,e,t)}),r=F.distributedTracingMode,H=F.enableRequestHeaderTracking,b=F.enableAjaxPerfTracking,D=F.maxAjaxCallsPerView,A=F.enableResponseHeaderTracking,T=r===dt.AI||r===dt.AI_AND_W3C,C=r===dt.AI_AND_W3C||r===dt.W3C,b&&(s=e.instrumentationKey||"unkwn",I=5<s.length?jt+s.substring(s.length-5)+".":jt+s+"."),!1===F.disableAjaxTracking&&Ut(l)&&!q&&(f(XMLHttpRequest,"open",{req:function(e,t,n,r){var a=e.inst,o=a[Nt];p(a,n)||!g(a,!0)||o&&o.xhrMonitoringState.openDone||(e=a,o=t,a=n,t=r,n=y&&y.telemetryTrace&&y.telemetryTrace.traceID||Ge(),r=Ge().substr(0,16),(r=new Lt(n,r,l[Pt]())).method=o,r.requestUrl=a,r.xhrMonitoringState.openDone=!0,r.requestHeaders={},r["async"]=t,e[Nt]=r,h(e))},hkErr:zt(l,V.FailedMonitorAjaxOpen,"Failed to monitor XMLHttpRequest.open, monitoring data for this ajax call may be incorrect.")}),f(XMLHttpRequest,"send",{req:function(e,t){var n=e.inst,e=n[Nt];g(n)&&!e.xhrMonitoringState.sendDone&&(m("xhr",e),e.requestSentTime=yt(),l.includeCorrelationHeaders(e,undefined,undefined,n),e.xhrMonitoringState.sendDone=!0)},hkErr:zt(l,V.FailedMonitorAjaxSend,"Failed to monitor XMLHttpRequest, monitoring data for this ajax call may be incorrect.")}),f(XMLHttpRequest,"abort",{req:function(e){var t=e.inst,e=t[Nt];g(t)&&!e.xhrMonitoringState.abortDone&&(e.aborted=1,e.xhrMonitoringState.abortDone=!0)},hkErr:zt(l,V.FailedMonitorAjaxAbort,"Failed to monitor XMLHttpRequest.abort, monitoring data for this ajax call may be incorrect.")}),H&&f(XMLHttpRequest,"setRequestHeader",{req:function(e,t,n){g(e=e.inst)&&d(t)&&(e[Nt].requestHeaders[t]=n)},hkErr:zt(l,V.FailedMonitorAjaxSetRequestHeader,"Failed to monitor XMLHttpRequest.setRequestHeader, monitoring data for this ajax call may be incorrect.")}),q=!0),(e=!(r=j())||Z(r.Request)||Z(r.Request[E])||Z(r[_t])?null:r[_t])&&(s=j(),u=e.polyfill,!1===F.disableFetchTracking?(L.push(at(s,_t,{req:function(e,t,n){var r,a;!w||p(null,t,n)||u&&q||(r=e.ctx(),a=function(e,t){var n=y&&y.telemetryTrace&&y.telemetryTrace.traceID||Ge(),r=Ge().substr(0,16);(n=new Lt(n,r,l[Pt]())).requestSentTime=yt(),e instanceof Request?n.requestUrl=e?e.url:"":n.requestUrl=e,r="GET",t&&t.method?r=t.method:e&&e instanceof Request&&(r=e.method),n.method=r;var a={};return H&&new Headers((t?t.headers:0)||e instanceof Request&&e.headers||{}).forEach(function(e,t){d(t)&&(a[t]=e)}),n.requestHeaders=a,m("fetch",n),n}(t,n),(t=l.includeCorrelationHeaders(a,t,n))!==n&&e.set(1,t),r.data=a)},rsp:function(e,t){var n=e.ctx().data;n&&(e.rslt=e.rslt.then(function(t){return x(0,(t||{}).status,t,n,function(){var n,e={statusText:t.statusText,headerMap:null,correlationContext:v(t)};return A&&(n={},t.headers.forEach(function(e,t){d(t)&&(n[t]=e)}),e.headerMap=n),e}),t})["catch"](function(e){throw x(0,0,t,n,null,e.message),e}))},hkErr:zt(l,V.FailedMonitorAjaxOpen,"Failed to monitor Window.fetch, monitoring data for this fetch call may be incorrect.")})),w=!0):u&&L.push(at(s,_t,{req:function(e,t,n){p(null,t,n)}})),u&&(s[_t].polyfill=u)),0<n.length&&n){for(var o=void 0,i=0;!o&&i<n.length;)n[i]&&n[i].identifier===wt&&(o=n[i]),i++;o&&(y=o.context)}}var s,u},l.teardown=function(){ae(L,function(e){e.rm()}),q=w=!(L=[]),l.setInitialized(!1)},l.trackDependencyData=function(e,t){l[S](e,t)},l.includeCorrelationHeaders=function(e,t,n,r){var a,o,i,s=l._currentWindowHost||M;return t?(vt.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(ot.requestIdHeader,a),H&&(e.requestHeaders[ot.requestIdHeader]=a)),(o=F.appId||y&&y.appId())&&(n.headers.set(ot.requestContextHeader,ot.requestContextAppIdFormat+o),H&&(e.requestHeaders[ot.requestContextHeader]=ot.requestContextAppIdFormat+o)),C&&(i=new Rt(e.traceID,e.spanID),n.headers.set(ot.traceParentHeader,i.toString()),H&&(e.requestHeaders[ot.traceParentHeader]=i.toString()))),n):r?(vt.canIncludeCorrelationHeader(F,e.getAbsoluteUrl(),s)&&(T&&(a="|"+e.traceID+"."+e.spanID,r.setRequestHeader(ot.requestIdHeader,a),H&&(e.requestHeaders[ot.requestIdHeader]=a)),(o=F.appId||y&&y.appId())&&(r.setRequestHeader(ot.requestContextHeader,ot.requestContextAppIdFormat+o),H&&(e.requestHeaders[ot.requestContextHeader]=ot.requestContextAppIdFormat+o)),C&&(i=new Rt(e.traceID,e.spanID),r.setRequestHeader(ot.traceParentHeader,i.toString()),H&&(e.requestHeaders[ot.traceParentHeader]=i.toString()))),r):undefined},l[S]=function(e,t,n){-1===D||r<D?(F.distributedTracingMode!==dt.W3C&&F.distributedTracingMode!==dt.AI_AND_W3C||"string"!=typeof e.id||"."===e.id[e.id.length-1]||(e.id+="."),Z(e.startTime)&&(e.startTime=new Date),n=At.create(e,It.dataType,It.envelopeType,l[Pt](),t,n),l.core.track(n)):r===D&&Vt(l,V.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=Oe,e.ajaxRecord=Lt,function(e,t,n){var r=Object.defineProperty;if(r)try{return r(e,t,n)}catch(a){}typeof n.value!==undefined&&(e[t]=n.value)}(e,"__esModule",{value:!0})};"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||{})); | ||
//# sourceMappingURL=applicationinsights-dependencies-js.min.js.map |
/* | ||
* Microsoft Application Insights XHR dependencies plugin, 2.6.2 | ||
* Microsoft Application Insights XHR dependencies plugin, 2.6.3 | ||
* Copyright (c) Microsoft and contributors. All rights reserved. | ||
@@ -4,0 +4,0 @@ * |
{ | ||
"name": "@microsoft/applicationinsights-dependencies-js", | ||
"version": "2.6.2", | ||
"version": "2.6.3", | ||
"description": "Microsoft Application Insights XHR dependencies plugin", | ||
@@ -25,7 +25,8 @@ "homepage": "https://github.com/microsoft/ApplicationInsights-JS#readme", | ||
"@microsoft/applicationinsights-rollup-plugin-uglify3-js": "1.0.0", | ||
"@microsoft/applicationinsights-rollup-es3" : "1.1.3", | ||
"@microsoft/api-extractor" : "^7.9.11", | ||
"@microsoft/applicationinsights-rollup-es3": "1.1.3", | ||
"@microsoft/api-extractor": "^7.9.11", | ||
"typescript": "2.5.3", | ||
"tslib": "^1.13.0", | ||
"grunt": "^1.3.0", | ||
"grunt-cli": "^1.3.2", | ||
"grunt-contrib-qunit": "^3.1.0", | ||
@@ -45,8 +46,8 @@ "grunt-run": "^0.8.1", | ||
"dependencies": { | ||
"@microsoft/dynamicproto-js": "^1.1.2", | ||
"@microsoft/applicationinsights-shims" : "2.0.0", | ||
"@microsoft/applicationinsights-core-js": "2.6.2", | ||
"@microsoft/applicationinsights-common": "2.6.2" | ||
"@microsoft/dynamicproto-js": "^1.1.4", | ||
"@microsoft/applicationinsights-shims": "2.0.0", | ||
"@microsoft/applicationinsights-core-js": "2.6.3", | ||
"@microsoft/applicationinsights-common": "2.6.3" | ||
}, | ||
"license": "MIT" | ||
} |
@@ -13,3 +13,3 @@ // Copyright (c) Microsoft Corporation. All rights reserved. | ||
getLocation, getGlobal, strUndefined, strPrototype, IInstrumentCallDetails, InstrumentFunc, InstrumentProto, getPerformance, | ||
IInstrumentHooksCallbacks, IInstrumentHook, objForEachKey, generateW3CId, getIEVersion, dumpObj | ||
IInstrumentHooksCallbacks, IInstrumentHook, objForEachKey, generateW3CId, getIEVersion, dumpObj,objKeys | ||
} from '@microsoft/applicationinsights-core-js'; | ||
@@ -175,3 +175,7 @@ import { ajaxRecord, IAjaxRecordResponse } from './ajaxRecord'; | ||
maxAjaxPerfLookupAttempts: 3, | ||
ajaxPerfLookupDelay: 25 | ||
ajaxPerfLookupDelay: 25, | ||
ignoreHeaders:[ | ||
"Authorization", | ||
"X-API-Key", | ||
"WWW-Authenticate"] | ||
} | ||
@@ -377,2 +381,16 @@ return config; | ||
// discard the header if it's defined as ignoreHeaders in ICorrelationConfig | ||
function _canIncludeHeaders(header: string) { | ||
let rlt = true; | ||
if (header || _config.ignoreHeaders) { | ||
arrForEach(_config.ignoreHeaders,(key => { | ||
if (key.toLowerCase() === header.toLowerCase()) { | ||
rlt = false; | ||
return -1; | ||
} | ||
})) | ||
} | ||
return rlt; | ||
} | ||
// Fetch Stuff | ||
@@ -420,3 +438,3 @@ function _instrumentFetch(): void { | ||
response.headers.forEach((value: string, name: string) => { | ||
responseHeaderMap[name] = value; | ||
if (_canIncludeHeaders(name)) { responseHeaderMap[name] = value; } | ||
}); | ||
@@ -521,3 +539,3 @@ | ||
let xhr = args.inst as XMLHttpRequestInstrumented; | ||
if (_isMonitoredXhrInstance(xhr)) { | ||
if (_isMonitoredXhrInstance(xhr) && _canIncludeHeaders(header)) { | ||
xhr[strAjaxData].requestHeaders[header] = value; | ||
@@ -683,3 +701,3 @@ } | ||
const value = parts.join(': '); | ||
responseHeaderMap[header] = value; | ||
if(_canIncludeHeaders(header)) { responseHeaderMap[header] = value; } | ||
}); | ||
@@ -839,3 +857,3 @@ | ||
headers.forEach((value, key) => { | ||
requestHeaders[key] = value; | ||
if (_canIncludeHeaders(key)) { requestHeaders[key] = value; } | ||
}); | ||
@@ -842,0 +860,0 @@ } |
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
import { DataSanitizer, dateTimeUtilsDuration, IDependencyTelemetry, urlGetAbsoluteUrl, urlGetCompleteUrl, msToTimeSpan } from '@microsoft/applicationinsights-common'; | ||
import { dataSanitizeUrl, dateTimeUtilsDuration, IDependencyTelemetry, urlGetAbsoluteUrl, urlGetCompleteUrl, msToTimeSpan } from '@microsoft/applicationinsights-common'; | ||
import { IDiagnosticLogger, objKeys, arrForEach, isNumber, isString, normalizeJsName, objForEachKey } from '@microsoft/applicationinsights-core-js'; | ||
@@ -275,3 +275,3 @@ import dynamicProto from "@microsoft/dynamicproto-js"; | ||
self.getPathName = () => { | ||
return self.requestUrl ? DataSanitizer.sanitizeUrl(_logger, urlGetCompleteUrl(self.method, self.requestUrl)) : null; | ||
return self.requestUrl ? dataSanitizeUrl(_logger, urlGetCompleteUrl(self.method, self.requestUrl)) : null; | ||
} | ||
@@ -278,0 +278,0 @@ |
@@ -8,5 +8,5 @@ // This file is read by tools that parse documentation comments conforming to the TSDoc standard. | ||
"packageName": "@microsoft/api-extractor", | ||
"packageVersion": "7.14.0" | ||
"packageVersion": "7.16.1" | ||
} | ||
] | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1864568
19
10544
+ Added@microsoft/applicationinsights-common@2.6.3(transitive)
+ Added@microsoft/applicationinsights-core-js@2.6.3(transitive)
- Removed@microsoft/applicationinsights-common@2.6.2(transitive)
- Removed@microsoft/applicationinsights-core-js@2.6.2(transitive)