Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Socket
Sign inDemoInstall

@microsoft/applicationinsights-common

Package Overview
Dependencies
Maintainers
2
Versions
572
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@microsoft/applicationinsights-common - npm Package Compare versions

Comparing version 2.5.11 to 2.6.0

dist-esm/DomHelperFuncs.js

4

browser/applicationinsights-common.min.js
/*!
* Application Insights JavaScript SDK - Common, 2.5.11
* Application Insights JavaScript SDK - Common, 2.6.0
* Copyright (c) Microsoft and contributors. All rights reserved.
*/
var e=this,t=function(p){"use strict";var i="function",r="object",t="undefined",o="prototype",a="hasOwnProperty";function e(){return typeof globalThis!==t&&globalThis?globalThis:typeof self!==t&&self?self:typeof window!==t&&window?window:typeof global!==t&&global?global:null}function s(e){var t=Object.create;if(t)return t(e);if(null==e)return{};if((t=typeof e)!==r&&t!==i)throw new TypeError("Object prototype may only be an Object:"+e);function n(){}return n[o]=e,new n}var u,l=function(e,t){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t[a](n)&&(e[n]=t[n])})(e,t)};nn=function(e,t){function n(){this.constructor=e}l(e,t),e[o]=null===t?s(t):(n[o]=t[o],new n)},(Zt=on=e()||{}).__assign||(Zt.__assign=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object[o][a].call(t,r)&&(e[r]=t[r]);return e}),Zt.__extends||(Zt.__extends=nn),__assign=__assign||on.__assign,__extends=__extends||on.__extends,(hn=u={})[hn.LocalStorage=0]="LocalStorage",hn[hn.SessionStorage=1]="SessionStorage",(zn=p.FieldType||(p.FieldType={}))[zn.Default=0]="Default",zn[zn.Required=1]="Required",zn[zn.Array=2]="Array",zn[zn.Hidden=4]="Hidden",(Tn=p.DistributedTracingModes||(p.DistributedTracingModes={}))[Tn.AI=0]="AI",Tn[Tn.AI_AND_W3C=1]="AI_AND_W3C",Tn[Tn.W3C=2]="W3C";var c={Unknown:0,NonRetryableStatus:1,InvalidEvent:2,SizeLimitExceeded:3,KillSwitch:4,QueueFull:5},d=t,f=r,g=o,n="window",h="console",v="JSON",m=e;function y(e){var t=m();return t&&t[e]?t[e]:e===n&&S()?window:null}function S(){return typeof window===f&&window}function x(){return S()?window:y(n)}function T(){return typeof document===f&&document?document:y("document")}function C(){return typeof navigator===f&&navigator?navigator:y("navigator")}function I(){return y("performance")}function N(){return typeof JSON===f&&JSON||null!==y(v)}function _(){return N()?JSON||y(v):null}var E="attachEvent",w="addEventListener",F="detachEvent",A="removeEventListener",D=4294967296,b=4294967295,L=null,M=!1,R=123456789,O=987654321;function P(e){e<0&&(e>>>=0),R=123456789+e&b,O=987654321-e&b,M=!0}function k(){P(Math.random()*D^(new Date).getTime())}function U(e,t){return typeof e===t}function z(e){return U(e,t)||e===undefined}function q(e){return z(e)||null===e}function j(e,t){return e&&Object[o].hasOwnProperty.call(e,t)}function G(e){return U(e,r)}function B(e){return U(e,i)}function H(e,t,n,i){void 0===i&&(i=!1);var r=!1;if(!q(e))try{q(e[w])?q(e[E])||(e[E]("on"+t,n),r=!0):(e[w](t,n,i),r=!0)}catch(o){}return r}function V(e,t,n,i){if(void 0===i&&(i=!1),!q(e))try{q(e[A])?q(e[F])||e[F]("on"+t,n):e[A](t,n,i)}catch(r){}}function K(e,t){if(e&&G(e))for(var n in e)j(e,n)&&t.call(e,n,e[n])}var W=(X.isDate=function(e){return"[object Date]"===Object[o].toString.call(e)},X.isArray=function(e){return"[object Array]"===Object[o].toString.call(e)},X.isError=function(e){return"[object Error]"===Object[o].toString.call(e)},X.isString=function(e){return U(e,"string")},X.isNumber=function(e){return U(e,"number")},X.isBoolean=function(e){return U(e,"boolean")},X.disableCookies=function(){X._canUseCookies=!1},X.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(J,function(e){var t=0|X.randomValue(15);return("x"===e?t:3&t|8).toString(16)})},X.toISOString=function(e){if(X.isDate(e)){var t=function(e){return 1===(e+="").length&&(e="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"}},X.arrForEach=function(e,t,n){for(var i=e.length,r=0;r<i;r++)r in e&&t.call(n||e,e[r],r,e)},X.arrIndexOf=function(e,t,n){for(var i=e.length,r=Math.max(0<=(n=n||0)?n:i-Math.abs(n),0);r<i;r++)if(r in e&&e[r]===t)return r;return-1},X.arrMap=function(e,t,n){for(var i=e.length,r=n||e,o=Array(i),a=0;a<i;a++)a in e&&(o[a]=t.call(r,e[a],e));return o},X.arrReduce=function(e,t,n){var i,r=e.length,o=0;if(3<=arguments.length)i=n;else{for(;o<r&&!(o in e);)o++;i=e[o++]}for(;o<r;)o in e&&(i=t(i,e[o],o,e)),o++;return i},X.strTrim=function(e){return X.isString(e)?e.replace(/^\s+|\s+$/g,""):e},X.objKeys=function(e){var t=!{toString:null}.propertyIsEnumerable("toString");if(!(B(e)||G(e)&&null!==e))throw new TypeError("objKeys called on non-object");var n,i=[];for(n in e)j(e,n)&&i.push(n);if(t)for(var r=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],o=r.length,a=0;a<o;a++)j(e,r[a])&&i.push(r[a]);return i},X.addEventHandler=function(e,t){var n=!1,i=x();return i&&(n=H(i,e,t),n=H(i.body,e,t)||n),(i=T())&&(n=Y.Attach(i,e,t)||n),n},X.dateNow=function(){var e=Date;return e.now?e.now():(new e).getTime()},X.perfNow=function(){var e=I();return e&&e.now?e.now():X.dateNow()},X.newId=function(e){void 0===e&&(e=22);for(var t=X.random32()>>>0,n=0,i="";i.length<e;)i+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[0|63&t],t>>>=6,5==++n&&(t=(X.random32()<<2&4294967295|3&t)>>>0,n=0);return i},X.isIE=function(){var e;return null===L&&(e=((C()||{}).userAgent||"").toLowerCase(),L=!!~e.indexOf("msie")||!!~e.indexOf("trident/")),L},X.randomValue=function(e){return 0<e?Math.floor(X.random32()/b*(e+1))>>>0:0},X.random32=function(e){var t=(t=y("crypto")||y("msCrypto"))&&t.getRandomValues?t.getRandomValues(new Uint32Array(1))[0]&b:X.isIE()?(M||k(),X.mwcRandom32()&b):Math.floor(D*Math.random()|0);return e||(t>>>=0),t},X.mwcRandomSeed=function(e){e?P(e):k()},X.mwcRandom32=function(e){var t=((O=36969*(65535&O)+(O>>16)&b)<<16)+(65535&(R=18e3*(65535&R)+(R>>16)&b))>>>0&b|0;return e||(t>>>=0),t},X.generateW3CId=function(){for(var e,t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],n="",i=0;i<4;i++)n+=t[15&(e=X.random32())]+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 r=t[8+(3&X.random32())|0];return n.substr(0,8)+n.substr(9,4)+"4"+n.substr(13,3)+r+n.substr(16,3)+n.substr(19,12)},X.isTypeof=U,X.isUndefined=z,X.isNullOrUndefined=q,X.hasOwnProperty=j,X.isFunction=B,X.isObject=G,X.objCreate=s,X.objDefineAccessors=function(e,t,n,i){var r=Object.defineProperty;if(r)try{var o={enumerable:!0,configurable:!0};return n&&(o.get=n),i&&(o.set=i),r(e,t,o),!0}catch(a){}return!1},X);function X(){}var Q,J=/[xy]/g,Y=($.Attach=H,$.AttachEvent=H,$.Detach=V,$.DetachEvent=V,$);function $(){}(Nn=Q=Q||{})[Nn.CRITICAL=1]="CRITICAL",Nn[Nn.WARNING=2]="WARNING";var Z={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},ee="constructor",te="prototype",ne="function",ie="_dynInstFuncs",re="_isDynProxy",oe="_dynClass",ae="_dynCls$",se="_dynInstChk",ue=se,le="_dfOpts",ce="_unknown_",de="__proto__",fe="useBaseInst",pe="setInstFuncs",ge=Object.getPrototypeOf,he=0;function ve(e,t){return e&&Object[te].hasOwnProperty.call(e,t)}function me(e){return typeof e===ne}function ye(e){return e&&(e===Object[te]||e===Array[te])}function Se(e){return ye(e)||e===Function[te]}function xe(e){if(e){if(ge)return ge(e);if(e=e[de]||e[te]||e[ee])return e}return null}function Te(e,t,n){return t!==ee&&me(e[t])&&(n||ve(e,t))}function Ce(e){throw new TypeError("DynamicProto: "+e)}function Ie(e,t){for(var n=e.length-1;0<=n;n--)if(e[n]===t)return 1}function Ne(e,t){return ve(e,te)?e.name||t||ce:((e||{})[ee]||{}).name||t||ce}function _e(e,n,t,i){ve(e,te)||Ce("theClass is an invalid class definition.");var r=e[te];!function(e){for(var t=xe(n);t&&!Se(t);){if(t===e)return 1;t=xe(t)}}(r)&&Ce("["+Ne(e)+"] is not in class hierarchy of ["+Ne(n)+"]");var o=null;ve(r,oe)?o=r[oe]:(o=ae+Ne(e,"_")+"$"+he,he++,r[oe]=o);var a=_e[le],s=!!a[fe];s&&i&&i[fe]!==undefined&&(s=!!i[fe]),t(n,function(e,t,n,o){function i(e,t,n){var i,r=t[u];return r[re]&&o&&!1!==(i=e[ie]||{})[ue]&&(r=(i[t[oe]]||{})[n]||r),function(){return r.apply(e,arguments)}}var r={};for(u in n)r[u]=i(t,n,u);for(var a=xe(e),s=[];a&&!Se(a)&&!Ie(s,a);){for(var u in a)!r[u]&&Te(a,u,!ge)&&(r[u]=i(t,a,u));s.push(a),a=xe(a)}return r}(r,n,e=function(e){var t,n={};for(t in e)!n[t]&&Te(e,t,!1)&&(n[t]=e[t]);return n}(n),s)),(a=!!ge&&!!a[pe])&&i&&(a=!!i[pe]),function(e,t,n,i,r){if(!ye(e)){var o,a=n[ie]=n[ie]||{},s=a[t]=a[t]||{};for(o in!1!==a[ue]&&(a[ue]=!!r),n)Te(n,o,!1)&&n[o]!==i[o]&&(s[o]=n[o],delete n[o],ve(e,o)&&(!e[o]||e[o][re])||(e[o]=function(n,i){var r=function(){var e,t;return(function(e,t,n,i){var r=null;if(e&&ve(n,oe)){var o=e[ie]||{};if((r=(o[n[oe]]||{})[t])||Ce("Missing ["+t+"] "+ne),!r[se]&&!1!==o[ue]){for(var a=!ve(e,t),s=xe(e),u=[];a&&s&&!Se(s)&&!Ie(u,s);){var l=s[t];if(l){a=l===i;break}u.push(s),s=xe(s)}try{a&&(e[t]=r),r[se]=1}catch(c){o[ue]=!1}}}return r}(this,i,n,r)||((t=n[e=i])===r&&(t=xe(n)[e]),me(t)||Ce("["+e+"] is not a "+ne),t)).apply(this,arguments)};return r[re]=1,r}(e,o)))}}(r,o,n,e,!1!==a)}_e[le]={setInstFuncs:!0,useBaseInst:!0};var Ee="AITR_";function we(e){return e?'"'+e.replace(/\"/g,"")+'"':""}var Fe=(Ae.dataType="MessageData",Ae);function Ae(e,t,n,i){void 0===n&&(n=!1),this.messageId=e,this.message=(n?"AI: ":"AI (Internal): ")+e,e="",N()&&(e=_().stringify(i)),e=(t?" message:"+we(t):"")+(i?" props:"+we(e):""),this.message+=e}var De=(be.prototype.enableDebugExceptions=function(){return!1},be.prototype.consoleLoggingLevel=function(){return 0},be.prototype.telemetryLoggingLevel=function(){return 1},be.prototype.maxInternalMessageLimit=function(){return 25},be.prototype.throwInternal=function(e,t,n,i,r){void 0===r&&(r=!1)},be.prototype.warnToConsole=function(e){},be.prototype.resetInternalMessageCount=function(){},be.prototype.logInternalMessage=function(e,t){},be);function be(r){this.identifier="DiagnosticLogger",this.queue=[];var s=0,u={};_e(be,this,function(o){var n=W.isNullOrUndefined,a=W.isUndefined,i=W.isFunction;function e(e,t){return e=r[e],n(e)?t:e}n(r)&&(r={}),o.consoleLoggingLevel=function(){return e("loggingLevelConsole",0)},o.telemetryLoggingLevel=function(){return e("loggingLevelTelemetry",1)},o.maxInternalMessageLimit=function(){return e("maxMessageLimit",25)},o.enableDebugExceptions=function(){return e("enableDebugExceptions",!1)},o.throwInternal=function(e,t,n,i,r){if(void 0===r&&(r=!1),i=new Fe(t,n,r,i),o.enableDebugExceptions())throw i;!a(i)&&i&&(a(i.message)||(r?(r=+i.messageId,!u[r]&&o.consoleLoggingLevel()>=Q.WARNING&&(o.warnToConsole(i.message),u[r]=!0)):o.consoleLoggingLevel()>=Q.WARNING&&o.warnToConsole(i.message),o.logInternalMessage(e,i)))},o.warnToConsole=function(e){var t,n=typeof console!==d?console:y(h);n&&(t="log",n.warn&&(t="warn"),i(n[t])&&n[t](e))},o.resetInternalMessageCount=function(){s=0,u={}},o.logInternalMessage=function(e,t){var n,i;s>=o.maxInternalMessageLimit()||(n=!0,i=Ee+t.messageId,u[i]?n=!1:u[i]=!0,n&&(e<=o.telemetryLoggingLevel()&&(o.queue.push(t),s++),s===o.maxInternalMessageLimit()&&(e="Internal events throttle limit per PageView reached for this app.",t=new Fe(Z.MessageLimitPerPVExceeded,e,!1),o.queue.push(t),o.warnToConsole(e))))}})}var Le="ctx",Me=(Re.ParentContextKey="parent",Re.ChildrenContextKey="childEvts",Re);function Re(e,r,t){var n,o=this,a=!1;o.start=W.dateNow(),o.name=e,o.isAsync=t,o.isChildEvt=function(){return!1},W.isFunction(r)&&(a=W.objDefineAccessors(o,"payload",function(){return!n&&W.isFunction(r)&&(n=r(),r=null),n})),o.getCtx=function(e){return e?(e===Re.ParentContextKey||e===Re.ChildrenContextKey?o:o[Le]||{})[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[Le]=o[Le]||{})[e]=t)},o.complete=function(){var e=0,t=o.getCtx(Re.ChildrenContextKey);if(W.isArray(t))for(var n=0;n<t.length;n++){var i=t[n];i&&(e+=i.time)}o.time=W.dateNow()-o.start,o.exTime=o.time-e,o.complete=function(){},!a&&W.isFunction(r)&&(o.payload=r())}}var Oe=(Pe.prototype.create=function(e,t,n){return null},Pe.prototype.fire=function(e){},Pe.prototype.setCtx=function(e,t){},Pe.prototype.getCtx=function(e){},Pe);function Pe(t){this.ctx={},_e(Pe,this,function(n){n.create=function(e,t,n){return new Me(e,t,n)},n.fire=function(e){e&&(e.complete(),t&&t.perfEvent(e))},n.setCtx=function(e,t){e&&((n[Le]=n[Le]||{})[e]=t)},n.getCtx=function(e){return(n[Le]||{})[e]}})}var ke="CoreUtils.doPerf";function Ue(e,t,n,i,r){if(e){var o=e;if(o&&W.isFunction(o.getPerfMgr)&&(o=o.getPerfMgr()),o){var a,s=void 0,u=o.getCtx(ke);try{if(s=o.create(t(),i,r))return u&&s.setCtx&&(s.setCtx(Me.ParentContextKey,u),u.getCtx&&u.setCtx&&((a=u.getCtx(Me.ChildrenContextKey))||(a=[],u.setCtx(Me.ChildrenContextKey,a)),a.push(s))),o.setCtx(ke,s),n(s)}catch(l){s&&s.setCtx&&s.setCtx("exception",l)}finally{s&&o.fire(s),o.setCtx(ke,u)}}}return n()}var ze=W.isFunction,qe=function(r,t){var o=this,a=null,s=ze(r.processTelemetry),u=ze(r.setNextPlugin);o._hasRun=!1,o.getPlugin=function(){return r},o.getNext=function(){return a},o.setNext=function(e){a=e},o.processTelemetry=function(n,i){i=i||t;var e=r?r.identifier:"TelemetryPluginChain";Ue(i?i.core():null,function(){return e+":processTelemetry"},function(){if(r&&s){o._hasRun=!0;try{i.setNext(a),u&&r.setNextPlugin(a),a&&(a._hasRun=!1),r.processTelemetry(n,i)}catch(t){var e=a&&a._hasRun;a&&e||i.diagLog().throwInternal(Q.CRITICAL,Z.PluginException,"Plugin ["+r.identifier+"] failed during processTelemetry - "+t),a&&!e&&a.processTelemetry(n,i)}}else a&&(o._hasRun=!0,a.processTelemetry(n,i))},function(){return{item:n}},!n.sync)}},je=W.isNullOrUndefined;function Ge(e,t){var n=[];if(e&&0<e.length)for(var i=null,r=0;r<e.length;r++){var o=e[r];o&&W.isFunction(o.processTelemetry)&&(o=new qe(o,t),n.push(o),i&&i.setNext(o),i=o)}return 0<n.length?n[0]:null}var Be=function Kn(e,r,n,t){var i,o,a,s,u=this,l=null;null!==t&&(e&&W.isFunction(e.getPlugin)?l=function(e,t,n){var i=[],r=!n;if(e)for(;e;){var o=e.getPlugin();!r&&o!==n||(r=!0,i.push(o)),e=e.getNext()}return r||i.push(n),Ge(i,t)}(e,u,t||e.getPlugin()):t?(i=u,a=e,s=!1,(o=t)&&e&&(a=[],W.arrForEach(e,function(e){!s&&e!==o||(s=!0,a.push(e))})),o&&!s&&(a=a||[]).push(o),l=Ge(a,i)):W.isUndefined(t)&&(l=Ge(e,u))),u.core=function(){return n},u.diagLog=function(){return(n||{}).logger||new De(r||{})},u.getCfg=function(){return r},u.getExtCfg=function(e,t){var n,i;return void 0===t&&(t={}),!r||(i=r.extensionConfig)&&e&&(n=i[e]),n||t},u.getConfig=function(e,t,n){var i;return void 0===n&&(n=!1),(e=u.getExtCfg(e,null))&&!je(e[t])?i=e[t]:r&&!je(r[t])&&(i=r[t]),je(i)?n:i},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 void 0===e&&(e=null),new Kn(e||l,r,n,t)}},He=W.isFunction,Ve="getPlugin",Ke=(We.prototype.initialize=function(e,t,n,i){this._baseTelInit(e,t,n,i)},We);function We(){var o=this,a=!1,s=null,u=null;o.core=null,o.diagLog=function(e){return o._getTelCtx(e).diagLog()},o.isInitialized=function(){return a},o.setInitialized=function(e){a=e},o.setNextPlugin=function(e){u=e},o.processNext=function(e,t){t?t.processNext(e):u&&He(u.processTelemetry)&&u.processTelemetry(e,null)},o._getTelCtx=function(e){void 0===e&&(e=null);var t=e;return t||(e=s||new Be(null,{},o.core),t=u&&u[Ve]?e.createNew(null,u[Ve]):e.createNew(null,u)),t},o._baseTelInit=function(e,t,n,i){e&&(e.extensionConfig=e.extensionConfig||[]),!i&&t&&(i=t.getProcessTelContext().getNext());var r=u;u&&u[Ve]&&(r=u[Ve]()),o.core=t,s=new Be(i,e,t,r),a=!0}}var Xe=W.isFunction,Qe="processTelemetry",Je="priority",Ye="setNextPlugin",$e="isInitialized";function Ze(t,n){for(var e=[],i=null,r=t.getNext();r;){var o=r.getPlugin();o&&(i&&Xe(i[Ye])&&Xe(o[Qe])&&i[Ye](o),Xe(o[$e])&&o[$e]()||e.push(o),i=o,r=r.getNext())}W.arrForEach(e,function(e){e.initialize(t.getCfg(),t.core(),n,t.getNext())})}function et(e){return e.sort(function(e,t){var n=0,i=Xe(t[Qe]);return Xe(e[Qe])?n=i?e[Je]-t[Je]:1:i&&(n=-1),n})}var tt,nt=500,it="Channel has invalid priority",rt=W.objDefineAccessors,ot=(tt=Ke,__extends(at,tt),at.prototype.processTelemetry=function(e,t){},at.prototype.getChannelControls=function(){return null},at.prototype.initialize=function(e,t,n){},at._staticInit=(rt(at.prototype,"ChannelControls",at.prototype.getChannelControls),void rt(at.prototype,"channelQueue",at.prototype.getChannelControls)),at);function at(){var i=tt.call(this)||this;i.identifier="ChannelControllerPlugin",i.priority=nt;var u,l=W.arrForEach;function c(e){e&&0<e.length&&(e=e.sort(function(e,t){return e.priority-t.priority}),l(e,function(e){if(e.priority<nt)throw Error(it+e.identifier)}),u.push(e))}return _e(at,i,function(a,s){a.setNextPlugin=function(e){},a.processTelemetry=function(t,n){u&&l(u,function(e){0<e.length&&i._getTelCtx(n).createNew(e).processNext(t)})},a.getChannelControls=function(){return u},a.initialize=function(t,n,i){var e,r,o;a.isInitialized()||(s.initialize(t,n,i),t.isCookieUseDisabled&&W.disableCookies(),r=i,u=[],(e=(t||{}).channels)&&l(e,c),r&&(o=[],l(r,function(e){e.priority>nt&&o.push(e)}),c(o)),l(u,function(e){return Ze(new Be(e,t,n),i)}))}}),i}var st="Extensions must provide callback to initialize",ut=W.arrForEach,lt=W.isNullOrUndefined,ct="_notificationManager",dt=(ft.prototype.initialize=function(e,t,n,i){},ft.prototype.getTransmissionControls=function(){return null},ft.prototype.track=function(e){},ft.prototype.getProcessTelContext=function(){return null},ft.prototype.getNotifyMgr=function(){return null},ft.prototype.getPerfMgr=function(){return null},ft.prototype.setPerfMgr=function(e){},ft.prototype.eventCnt=function(){return 0},ft.prototype.releaseQueue=function(){},ft);function ft(){var t,s,u,n,l=!1;_e(ft,this,function(a){a._extensions=[],s=new ot,a.logger=W.objCreate({throwInternal:function(e,t,n,i,r){void 0===r&&(r=!1)},warnToConsole:function(e){},resetInternalMessageCount:function(){}}),t=[],a.isInitialized=function(){return l},a.initialize=function(e,t,i,n){if(a.isInitialized())throw Error("Core should not be initialized more than once");if(!e||lt(e.instrumentationKey))throw Error("Please provide instrumentation key");u=n,a[ct]=n,a.config=e||{},e.extensions=lt(e.extensions)?[]:e.extensions,(e.extensionConfig=lt(e.extensionConfig)?{}:e.extensionConfig).NotificationManager=n,i&&(a.logger=i),(n=[]).push.apply(n,t.concat(e.extensions)),n=et(n);var r=[],o={};if(ut(n,function(e){if(lt(e)||lt(e.initialize))throw Error(st);var t=e.priority,n=e.identifier;e&&t&&(lt(o[t])?o[t]=n:i.warnToConsole("Two extensions have same priority #"+t+" - "+o[t]+", "+n)),(!t||t<s.priority)&&r.push(e)}),n.push(s),r.push(s),n=et(n),a._extensions=n,Ze(new Be([s],e,a),n),Ze(new Be(r,e,a),n),a._extensions=r,0===a.getTransmissionControls().length)throw Error("No channels available");l=!0,a.releaseQueue()},a.getTransmissionControls=function(){return s.getChannelControls()},a.track=function(e){e.iKey||(e.iKey=a.config.instrumentationKey),e.time||(e.time=W.toISOString(new Date)),lt(e.ver)&&(e.ver="4.0"),a.isInitialized()?a.getProcessTelContext().processNext(e):t.push(e)},a.getProcessTelContext=function(){var e=a._extensions,t=e;return e&&0!==e.length||(t=[s]),new Be(t,a.config,a)},a.getNotifyMgr=function(){return u||(u=W.objCreate({addNotificationListener:function(e){},removeNotificationListener:function(e){},eventsSent:function(e){},eventsDiscarded:function(e,t){},eventsSendRequest:function(e,t){}}),a[ct]=u),u},a.getPerfMgr=function(){return n||a.config&&a.config.enablePerfMgr&&(n=new Oe(a.getNotifyMgr())),n},a.setPerfMgr=function(e){n=e},a.eventCnt=function(){return t.length},a.releaseQueue=function(){0<t.length&&(ut(t,function(e){a.getProcessTelContext().processNext(e)}),t=[])}})}var pt,gt=(ht.prototype.addNotificationListener=function(e){},ht.prototype.removeNotificationListener=function(e){},ht.prototype.eventsSent=function(e){},ht.prototype.eventsDiscarded=function(e,t){},ht.prototype.eventsSendRequest=function(e,t){},ht);function ht(e){this.listeners=[];var o=W.arrForEach,t=!!(e||{}).perfEvtsSendAll;_e(ht,this,function(r){r.addNotificationListener=function(e){r.listeners.push(e)},r.removeNotificationListener=function(e){for(var t=W.arrIndexOf(r.listeners,e);-1<t;)r.listeners.splice(t,1),t=W.arrIndexOf(r.listeners,e)},r.eventsSent=function(t){o(r.listeners,function(e){e&&e.eventsSent&&setTimeout(function(){return e.eventsSent(t)},0)})},r.eventsDiscarded=function(t,n){o(r.listeners,function(e){e&&e.eventsDiscarded&&setTimeout(function(){return e.eventsDiscarded(t,n)},0)})},r.eventsSendRequest=function(n,i){o(r.listeners,function(e){if(e&&e.eventsSendRequest)if(i)setTimeout(function(){return e.eventsSendRequest(n,i)},0);else try{e.eventsSendRequest(n,i)}catch(t){}})},r.perfEvent=function(n){n&&(!t&&n.isChildEvt()||o(r.listeners,function(e){if(e&&e.perfEvent)if(n.isAsync)setTimeout(function(){return e.perfEvent(n)},0);else try{e.perfEvent(n)}catch(t){}}))}})}function vt(){var e=pt.call(this)||this;return _e(vt,e,function(n,r){function t(e){var t=n.getNotifyMgr();t&&t.eventsDiscarded([e],c.InvalidEvent)}n.initialize=function(e,t,n,i){r.initialize(e,t,n||new De(e),i||new gt(e))},n.track=function(e){Ue(n.getPerfMgr(),function(){return"AppInsightsCore:track"},function(){if(null===e)throw t(e),Error("Invalid telemetry item");!function(e){if(W.isNullOrUndefined(e.name))throw t(e),Error("telemetry name required")}(e),r.track(e)},function(){return{item:e}},!e.sync)},n.addNotificationListener=function(e){var t=n.getNotifyMgr();t&&t.addNotificationListener(e)},n.removeNotificationListener=function(e){var t=n.getNotifyMgr();t&&t.removeNotificationListener(e)},n.pollInternalLogs=function(t){var e=n.config.diagnosticLogInterval;return e&&0<e||(e=1e4),setInterval(function(){var e=n.logger?n.logger.queue:[];W.arrForEach(e,function(e){e={name:t||"InternalMessageId: "+e.messageId,iKey:n.config.instrumentationKey,time:W.toISOString(new Date),baseType:Fe.dataType,baseData:{message:e.message}},n.track(e)}),e.length=0},e)}}),e}pt=dt,__extends(vt,pt),vt.prototype.initialize=function(e,t,n,i){},vt.prototype.track=function(e){},vt.prototype.addNotificationListener=function(e){},vt.prototype.removeNotificationListener=function(e){},vt.prototype.pollInternalLogs=function(e){return 0};var mt=(yt.requestContextHeader="Request-Context",yt.requestContextTargetKey="appId",yt.requestContextAppIdFormat="appId=cid-v1:",yt.requestIdHeader="Request-Id",yt.traceParentHeader="traceparent",yt.sdkContextHeader="Sdk-Context",yt.sdkContextHeaderAppIdRequest="appId",yt.requestContextHeaderLowerCase="request-context",yt);function yt(){}var St=(xt.sanitizeKeyAndAddUniqueness=function(e,t,n){var i=t.length,r=xt.sanitizeKey(e,t);if(r.length!==i){for(var o=0,a=r;n[a]!==undefined;)o++,a=r.substring(0,xt.MAX_NAME_LENGTH-3)+xt.padNumber(o);r=a}return r},xt.sanitizeKey=function(e,t){var n;return t&&(t=xt.trim(t.toString())).length>xt.MAX_NAME_LENGTH&&(n=t.substring(0,xt.MAX_NAME_LENGTH),e.throwInternal(Q.WARNING,Z.NameTooLong,"name is too long. It has been truncated to "+xt.MAX_NAME_LENGTH+" characters.",{name:t},!0)),n||t},xt.sanitizeString=function(e,t,n){var i;return void 0===n&&(n=xt.MAX_STRING_LENGTH),t&&(n=n||xt.MAX_STRING_LENGTH,(t=xt.trim(t)).toString().length>n&&(i=t.toString().substring(0,n),e.throwInternal(Q.WARNING,Z.StringValueTooLong,"string value is too long. It has been truncated to "+n+" characters.",{value:t},!0))),i||t},xt.sanitizeUrl=function(e,t){return xt.sanitizeInput(e,t,xt.MAX_URL_LENGTH,Z.UrlTooLong)},xt.sanitizeMessage=function(e,t){var n;return t&&t.length>xt.MAX_MESSAGE_LENGTH&&(n=t.substring(0,xt.MAX_MESSAGE_LENGTH),e.throwInternal(Q.WARNING,Z.MessageTruncated,"message is too long, it has been truncated to "+xt.MAX_MESSAGE_LENGTH+" characters.",{message:t},!0)),n||t},xt.sanitizeException=function(e,t){var n;return t&&t.length>xt.MAX_EXCEPTION_LENGTH&&(n=t.substring(0,xt.MAX_EXCEPTION_LENGTH),e.throwInternal(Q.WARNING,Z.ExceptionTruncated,"exception is too long, it has been truncated to "+xt.MAX_EXCEPTION_LENGTH+" characters.",{exception:t},!0)),n||t},xt.sanitizeProperties=function(i,e){var r;return e&&(r={},K(e,function(e,t){if(W.isObject(t)&&N())try{t=_().stringify(t)}catch(n){i.throwInternal(Q.WARNING,Z.CannotSerializeObjectNonSerializable,"custom property is not valid",{exception:n},!0)}t=xt.sanitizeString(i,t,xt.MAX_PROPERTY_LENGTH),e=xt.sanitizeKeyAndAddUniqueness(i,e,r),r[e]=t}),e=r),e},xt.sanitizeMeasurements=function(n,e){var i;return e&&(i={},K(e,function(e,t){e=xt.sanitizeKeyAndAddUniqueness(n,e,i),i[e]=t}),e=i),e},xt.sanitizeId=function(e,t){return t&&xt.sanitizeInput(e,t,xt.MAX_ID_LENGTH,Z.IdTooLong).toString()},xt.sanitizeInput=function(e,t,n,i){var r;return t&&(t=xt.trim(t)).length>n&&(r=t.substring(0,n),e.throwInternal(Q.WARNING,i,"input is too long, it has been truncated to "+n+" characters.",{data:t},!0)),r||t},xt.padNumber=function(e){return(e="00"+e).substr(e.length-3)},xt.trim=function(e){return W.isString(e)?e.replace(/^\s+|\s+$/g,""):e},xt.MAX_NAME_LENGTH=150,xt.MAX_ID_LENGTH=128,xt.MAX_PROPERTY_LENGTH=8192,xt.MAX_STRING_LENGTH=1024,xt.MAX_URL_LENGTH=2048,xt.MAX_MESSAGE_LENGTH=32768,xt.MAX_EXCEPTION_LENGTH=32768,xt);function xt(){}var Tt=C(),Ct=W.isString,It=null,Nt=(_t.createDomEvent=function(e){var t,n=null;return W.isFunction(Event)?n=new Event(e):(t=T())&&t.createEvent&&(n=t.createEvent("Event")).initEvent(e,!0,!0),n},_t.disableStorage=function(){_t._canUseLocalStorage=!1,_t._canUseSessionStorage=!1},_t._getLocalStorageObject=function(){return _t.canUseLocalStorage()?_t._getVerifiedStorageObject(u.LocalStorage):null},_t._getVerifiedStorageObject=function(e){var t,n,i=null;try{if(W.isNullOrUndefined(m()))return null;n=new Date,(i=y(e===u.LocalStorage?"localStorage":"sessionStorage")).setItem(n.toString(),n.toString()),t=i.getItem(n.toString())!==n.toString(),i.removeItem(n.toString()),t&&(i=null)}catch(r){i=null}return i},_t.isInternalApplicationInsightsEndpoint=function(e){return!!~_t._internalEndpoints.indexOf(e.toLowerCase())},_t.canUseLocalStorage=function(){return _t._canUseLocalStorage===undefined&&(_t._canUseLocalStorage=!!_t._getVerifiedStorageObject(u.LocalStorage)),_t._canUseLocalStorage},_t.getStorage=function(e,t){var n=_t._getLocalStorageObject();if(null!==n)try{return n.getItem(t)}catch(i){_t._canUseLocalStorage=!1,e.throwInternal(Q.WARNING,Z.BrowserCannotReadLocalStorage,"Browser failed read of local storage. "+_t.getExceptionName(i),{exception:_t.dump(i)})}return null},_t.setStorage=function(e,t,n){var i=_t._getLocalStorageObject();if(null!==i)try{return i.setItem(t,n),!0}catch(r){_t._canUseLocalStorage=!1,e.throwInternal(Q.WARNING,Z.BrowserCannotWriteLocalStorage,"Browser failed write to local storage. "+_t.getExceptionName(r),{exception:_t.dump(r)})}return!1},_t.removeStorage=function(e,t){var n=_t._getLocalStorageObject();if(null!==n)try{return n.removeItem(t),!0}catch(i){_t._canUseLocalStorage=!1,e.throwInternal(Q.WARNING,Z.BrowserFailedRemovalFromLocalStorage,"Browser failed removal of local storage item. "+_t.getExceptionName(i),{exception:_t.dump(i)})}return!1},_t._getSessionStorageObject=function(){return _t.canUseSessionStorage()?_t._getVerifiedStorageObject(u.SessionStorage):null},_t.canUseSessionStorage=function(){return _t._canUseSessionStorage===undefined&&(_t._canUseSessionStorage=!!_t._getVerifiedStorageObject(u.SessionStorage)),_t._canUseSessionStorage},_t.getSessionStorageKeys=function(){var t=[];return _t.canUseSessionStorage()&&K(y("sessionStorage"),function(e){t.push(e)}),t},_t.getSessionStorage=function(e,t){var n=_t._getSessionStorageObject();if(null!==n)try{return n.getItem(t)}catch(i){_t._canUseSessionStorage=!1,e.throwInternal(Q.WARNING,Z.BrowserCannotReadSessionStorage,"Browser failed read of session storage. "+_t.getExceptionName(i),{exception:_t.dump(i)})}return null},_t.setSessionStorage=function(e,t,n){var i=_t._getSessionStorageObject();if(null!==i)try{return i.setItem(t,n),!0}catch(r){_t._canUseSessionStorage=!1,e.throwInternal(Q.WARNING,Z.BrowserCannotWriteSessionStorage,"Browser failed write to session storage. "+_t.getExceptionName(r),{exception:_t.dump(r)})}return!1},_t.removeSessionStorage=function(e,t){var n=_t._getSessionStorageObject();if(null!==n)try{return n.removeItem(t),!0}catch(i){_t._canUseSessionStorage=!1,e.throwInternal(Q.WARNING,Z.BrowserFailedRemovalFromSessionStorage,"Browser failed removal of session storage item. "+_t.getExceptionName(i),{exception:_t.dump(i)})}return!1},_t.disableCookies=function(){W.disableCookies()},_t.canUseCookies=function(e){if(W._canUseCookies===undefined){W._canUseCookies=!1;try{W._canUseCookies=_t.document.cookie!==undefined}catch(t){e.throwInternal(Q.WARNING,Z.CannotAccessCookie,"Cannot access document.cookie - "+_t.getExceptionName(t),{exception:_t.dump(t)})}}return W._canUseCookies},_t.disallowsSameSiteNone=function(e){return!(!Ct(e)||!~e.indexOf("CPU iPhone OS 12")&&!~e.indexOf("iPad; CPU OS 12")&&!(~e.indexOf("Macintosh; Intel Mac OS X 10_14")&&~e.indexOf("Version/")&&~e.indexOf("Safari"))&&(!~e.indexOf("Macintosh; Intel Mac OS X 10_14")||(n=(t=e.length)-40,"AppleWebKit/605.1.15 (KHTML, like Gecko)"!=e.substring(0<=n?n:0,t)))&&!~e.indexOf("Chrome/5")&&!~e.indexOf("Chrome/6")&&(!~e.indexOf("UnrealEngine")||~e.indexOf("Chrome"))&&!~e.indexOf("UCBrowser/12")&&!~e.indexOf("UCBrowser/11"));var t,n},_t.setCookie=function(e,t,n,i){var r;_t.canUseCookies(e)&&(e=r="",i&&(r=";domain="+i),(i=typeof location===f&&location?location:y("location"))&&"https:"===i.protocol&&(e=";secure",null===It&&(It=_t.disallowsSameSiteNone((C()||{}).userAgent)),It||(n+=";SameSite=None")),_t.document.cookie=t+"="+n+r+";path=/"+e)},_t.stringToBoolOrDefault=function(e,t){return void 0===t&&(t=!1),e===undefined||null===e?t:"true"==e.toString().toLowerCase()},_t.getCookie=function(e,t){if(_t.canUseCookies(e)){var n="";if(t&&t.length)for(var i=t+"=",r=_t.document.cookie.split(";"),o=0;o<r.length;o++){var a=r[o];if((a=_t.trim(a))&&!a.indexOf(i)){n=a.substring(i.length,r[o].length);break}}return n}},_t.deleteCookie=function(e,t){_t.canUseCookies(e)&&(_t.document.cookie=t+"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;")},_t.random32=function(){return W.random32(!0)},_t.getIEVersion=function(e){return void 0===e&&(e=null),~(e=e?e.toLowerCase():Tt?(Tt.userAgent||"").toLowerCase():"").indexOf("msie")?parseInt(e.split("msie")[1]):e.indexOf("trident/")&&(e=parseInt(e.split("trident/")[1]))?e+4:null},_t.msToTimeSpan=function(e){(isNaN(e)||e<0)&&(e=0);var t=""+(e=Math.round(e))%1e3,n=""+Math.floor(e/1e3)%60,i=""+Math.floor(e/6e4)%60,r=""+Math.floor(e/36e5)%24,e=Math.floor(e/864e5),t=1===t.length?"00"+t:2===t.length?"0"+t:t,n=n.length<2?"0"+n:n,i=i.length<2?"0"+i:i;return(0<e?e+".":"")+(r=r.length<2?"0"+r:r)+":"+i+":"+n+"."+t},_t.isCrossOriginError=function(e,t,n,i,r){return("Script error."===e||"Script error"===e)&&!r},_t.dump=function(e){var t=Object[g].toString.call(e),n="";return"[object Error]"===t?n="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":N()&&(n=_().stringify(e)),t+n},_t.getExceptionName=function(e){return"[object Error]"===Object[g].toString.call(e)?e.name:""},_t.addEventHandler=function(e,t){return Y.Attach(x(),e,t)},_t.IsBeaconApiSupported=function(){return"sendBeacon"in Tt&&Tt.sendBeacon},_t.getExtension=function(e,t){for(var n=null,i=0;!n&&i<e.length;)e[i]&&e[i].identifier===t&&(n=e[i]),i++;return n},_t.document=T()||{},_t._canUseLocalStorage=undefined,_t._canUseSessionStorage=undefined,_t._internalEndpoints=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],_t.NotSpecified="not_specified",_t.trim=W.strTrim,_t.newId=W.newId,_t.generateW3CId=W.generateW3CId,_t.isArray=W.isArray,_t.isError=W.isError,_t.isDate=W.isDate,_t.toISOStringForIE8=W.toISOString,_t);function _t(){}var Et=(wt.parseUrl=function(e){var t=wt._htmlAnchorIdx,n=wt._htmlAnchorElement,i=n[t];return wt.document.createElement?n[t]||(i=n[t]=wt.document.createElement("a")):i={host:wt.parseHost(e,!0)},i.href=e,++t>=n.length&&(t=0),wt._htmlAnchorIdx=t,i},wt.getAbsoluteUrl=function(e){var t;return(e=wt.parseUrl(e))&&(t=e.href),t},wt.getPathName=function(e){var t;return(e=wt.parseUrl(e))&&(t=e.pathname),t},wt.getCompleteUrl=function(e,t){return e?e.toUpperCase()+" "+t:t},wt.parseHost=function(e,t){return(e=wt.parseFullHost(e,t))&&null!=(t=e.match(/(www[0-9]?\.)?(.[^/:]+)(\:[\d]+)?/i))&&3<t.length&&Ct(t[2])&&0<t[2].length?t[2]+(t[3]||""):e},wt.parseFullHost=function(e,t){var n=null;return!e||null!=(e=e.match(/(\w*):\/\/(.[^/:]+)(\:[\d]+)?/i))&&2<e.length&&Ct(e[2])&&0<e[2].length&&(n=e[2]||"",t&&2<e.length&&(t=(e[1]||"").toLowerCase(),e=e[3]||"",("http"==t&&":80"===e||"https"==t&&":443"===e)&&(e=""),n+=e)),n},wt.document=T()||{},wt._htmlAnchorIdx=0,wt._htmlAnchorElement=[null,null,null,null,null],wt);function wt(){}var Ft=(At.canIncludeCorrelationHeader=function(e,t,n){if(!t||e&&e.disableCorrelationHeaders)return!1;if(e&&e.correlationHeaderExcludePatterns)for(var i=0;i<e.correlationHeaderExcludePatterns.length;i++)if(e.correlationHeaderExcludePatterns[i].test(t))return!1;var r,o=Et.parseUrl(t).host.toLowerCase();if(o&&(~o.indexOf(":443")||~o.indexOf(":80"))&&(o=(Et.parseFullHost(t,!0)||"").toLowerCase()),!(e&&e.enableCorsCorrelation||o===n))return!1;if((n=e&&e.correlationHeaderDomains)&&(W.arrForEach(n,function(e){e=RegExp(e.toLowerCase().replace(/\./g,".").replace(/\*/g,".*")),r=r||e.test(o)}),!r))return!1;var a=e&&e.correlationHeaderExcludedDomains;if(!a||0===a.length)return!0;for(i=0;i<a.length;i++)if(RegExp(a[i].toLowerCase().replace(/\./g,".").replace(/\*/g,".*")).test(o))return!1;return o&&0<o.length},At.getCorrelationContext=function(e){if((e=e&&At.getCorrelationContextValue(e,mt.requestContextTargetKey))&&e!==At.correlationIdPrefix)return e},At.getCorrelationContextValue=function(e,t){if(e)for(var n=e.split(","),i=0;i<n.length;++i){var r=n[i].split("=");if(2===r.length&&r[0]===t)return r[1]}},At.correlationIdPrefix="cid-v1:",At);function At(){}var Dt=(bt.ParseDependencyPath=function(e,t,n,i){var r,o,a,s=i,u=i,s=t&&0<t.length?(a=(r=Et.parseUrl(t)).host,s||(null!=r.pathname?("/"!=(o=0===r.pathname.length?"/":r.pathname)[0]&&(o="/"+o),u=r.pathname,St.sanitizeString(e,n?n+" "+o:o)):St.sanitizeString(e,t))):a=i;return{target:a,name:s,data:u}},bt);function bt(){}var Lt=(Mt.Now=function(){var e=I();return e&&e.now&&e.timing&&0<(e=e.now()+e.timing.navigationStart)?e:(new Date).getTime()},Mt.GetDuration=function(e,t){var n=null;return 0===e||0===t||W.isNullOrUndefined(e)||W.isNullOrUndefined(t)||(n=t-e),n},Mt);function Mt(){}var Rt="https://dc.services.visualstudio.com",Ot=(Pt.parse=function(e){if(!e)return{};var t=e.split(Pt._FIELDS_SEPARATOR),e=W.arrReduce(t,function(e,t){var n=t.split(Pt._FIELD_KEY_VALUE_SEPARATOR);return 2===n.length&&(t=n[0].toLowerCase(),n=n[1],e[t]=n),e},{});return 0<W.objKeys(e).length&&(e.endpointsuffix&&(t=e.location?e.location+".":"",e.ingestionendpoint=e.ingestionendpoint||"https://"+t+"dc."+e.endpointsuffix),e.ingestionendpoint=e.ingestionendpoint||Rt),e},Pt._FIELDS_SEPARATOR=";",Pt._FIELD_KEY_VALUE_SEPARATOR="=",Pt);function Pt(){}var kt,Ut=function(){},zt=(kt=Ut,__extends(qt,kt),qt);function qt(){return kt.call(this)||this}var jt,Gt=(jt=function(){this.ver=1,this.sampleRate=100,this.tags={}},__extends(Bt,jt),Bt);function Bt(e,t,n){var i=jt.call(this)||this;return i.name=St.sanitizeString(e,n)||Nt.NotSpecified,i.data=t,i.time=W.toISOString(new Date),i.aiDataContract={time:p.FieldType.Required,iKey:p.FieldType.Required,name:p.FieldType.Required,sampleRate:function(){return 100===i.sampleRate?p.FieldType.Hidden:p.FieldType.Required},tags:p.FieldType.Required,data:p.FieldType.Required},i}var Ht,Vt=function(){},Kt=(Ht=Vt,__extends(Wt,Ht),Wt);function Wt(){var e=Ht.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var Xt,Qt=(Xt=Kt,__extends(Jt,Xt),Jt.envelopeType="Microsoft.ApplicationInsights.{0}.Event",Jt.dataType="EventData",Jt);function Jt(e,t,n,i){var r=Xt.call(this)||this;return r.aiDataContract={ver:p.FieldType.Required,name:p.FieldType.Required,properties:p.FieldType.Default,measurements:p.FieldType.Default},r.name=St.sanitizeString(e,t)||Nt.NotSpecified,r.properties=St.sanitizeProperties(e,n),r.measurements=St.sanitizeMeasurements(e,i),r}var Yt,$t=function(){},Zt=(Yt=Vt,__extends(en,Yt),en);function en(){var e=Yt.call(this)||this;return e.ver=2,e.exceptions=[],e.properties={},e.measurements={},e}var tn,nn=function(){this.hasFullStack=!0,this.parsedStack=[]},rn="error",on=(tn=Zt,__extends(an,tn),an.CreateFromInterface=function(t,e,n,i){var r=e.exceptions&&W.arrMap(e.exceptions,function(e){return un.CreateFromInterface(t,e)});return new an(t,__assign({},e,{exceptions:r}),n,i)},an.prototype.toInterface=function(){var e=this.exceptions,t=this.properties,n=this.measurements,i=this.severityLevel,r=(this.ver,this.problemGroup),o=this.id,a=this.isManual;return{ver:"4.0",exceptions:e instanceof Array&&W.arrMap(e,function(e){return e.toInterface()})||undefined,severityLevel:i,properties:t,measurements:n,problemGroup:r,id:o,isManual:a}},an.CreateSimpleException=function(e,t,n,i,r,o){return{exceptions:[{hasFullStack:!0,message:e,stack:r,typeName:t}]}},an.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",an.dataType="ExceptionData",an);function an(e,t,n,i,r,o){var a,s=tn.call(this)||this;return s.aiDataContract={ver:p.FieldType.Required,exceptions:p.FieldType.Required,severityLevel:p.FieldType.Default,properties:p.FieldType.Default,measurements:p.FieldType.Default},"ver"in(a=t)&&"exceptions"in a&&"properties"in a?(s.exceptions=t.exceptions,s.properties=t.properties,s.measurements=t.measurements,t.severityLevel&&(s.severityLevel=t.severityLevel),t.id&&(s.id=t.id),t.problemGroup&&(s.problemGroup=t.problemGroup),s.ver=2,W.isNullOrUndefined(t.isManual)||(s.isManual=t.isManual)):(s.exceptions=[new un(e,t)],s.properties=St.sanitizeProperties(e,n)||{},s.measurements=St.sanitizeMeasurements(e,i),r&&(s.severityLevel=r),o&&(s.id=o)),s}var sn,un=(sn=nn,__extends(ln,sn),ln.prototype.toInterface=function(){var e=this.parsedStack instanceof Array&&W.arrMap(this.parsedStack,function(e){return e.toInterface()});return{id:this.id,outerId:this.outerId,typeName:this.typeName,message:this.message,hasFullStack:this.hasFullStack,stack:this.stack,parsedStack:e||undefined}},ln.CreateFromInterface=function(e,t){var n=t.parsedStack instanceof Array&&W.arrMap(t.parsedStack,function(e){return dn.CreateFromInterface(e)})||t.parsedStack;return new ln(e,__assign({},t,{parsedStack:n}))},ln.parseStack=function(e){if(W.isString(e)){for(var t=e.split("\n"),n=[],i=0,r=0,o=0;o<=t.length;o++){var a=t[o];dn.regex.test(a)&&(r+=(a=new dn(t[o],i++)).sizeInBytes,n.push(a))}if(32768<r)for(var s=0,u=n.length-1,l=0,c=s,d=u;s<u;){if(32768<(l+=n[s].sizeInBytes+n[u].sizeInBytes)){var f=d-c+1;n.splice(c,f);break}c=s,d=u,s++,u--}}return n},ln);function ln(e,t){var n,i=sn.call(this)||this;return i.aiDataContract={id:p.FieldType.Default,outerId:p.FieldType.Default,typeName:p.FieldType.Required,message:p.FieldType.Required,hasFullStack:p.FieldType.Default,stack:p.FieldType.Default,parsedStack:p.FieldType.Array},"hasFullStack"in(n=t)&&"typeName"in n?(i.typeName=t.typeName,i.message=t.message,i.stack=t.stack,i.parsedStack=t.parsedStack,i.hasFullStack=t.hasFullStack):(n=t,Nt.isError(n)||(n=n[rn]||n.evt||n),i.typeName=St.sanitizeString(e,function(e){var t="";if(e&&!(t=e.typeName||e.name||""))try{var n=/function (.{1,})\(/.exec(e.constructor.toString()),t=n&&1<n.length?n[1]:""}catch(i){}return t}(n))||Nt.NotSpecified,i.message=St.sanitizeMessage(e,t.message)||Nt.NotSpecified,t=t.stack,i.parsedStack=ln.parseStack(t),i.stack=St.sanitizeException(e,t),i.hasFullStack=Nt.isArray(i.parsedStack)&&0<i.parsedStack.length),i}var cn,dn=(cn=$t,__extends(fn,cn),fn.CreateFromInterface=function(e){return new fn(e,null)},fn.prototype.toInterface=function(){return{level:this.level,method:this.method,assembly:this.assembly,fileName:this.fileName,line:this.line}},fn.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,fn.baseSize=58,fn);function fn(e,t){var n,i=cn.call(this)||this;return i.sizeInBytes=0,i.aiDataContract={level:p.FieldType.Required,method:p.FieldType.Required,assembly:p.FieldType.Default,fileName:p.FieldType.Default,line:p.FieldType.Default},"string"==typeof e?(n=e,i.level=t,i.method="<no_method>",i.assembly=Nt.trim(n),i.fileName="",i.line=0,(n=n.match(fn.regex))&&5<=n.length&&(i.method=Nt.trim(n[2])||i.method,i.fileName=Nt.trim(n[4]),i.line=parseInt(n[5])||0)):(i.level=e.level,i.method=e.method,i.assembly=e.assembly,i.fileName=e.fileName,i.line=e.line,i.sizeInBytes=0),i.sizeInBytes+=i.method.length,i.sizeInBytes+=i.fileName.length,i.sizeInBytes+=i.assembly.length,i.sizeInBytes+=fn.baseSize,i.sizeInBytes+=i.level.toString().length,i.sizeInBytes+=i.line.toString().length,i}var pn,gn,hn=(pn=Vt,__extends(vn,pn),vn);function vn(){var e=pn.call(this)||this;return e.ver=2,e.metrics=[],e.properties={},e.measurements={},e}(zn=gn={})[zn.Measurement=0]="Measurement",zn[zn.Aggregation=1]="Aggregation";var mn,yn=(mn=function(){this.kind=gn.Measurement},__extends(Sn,mn),Sn);function Sn(){var e=mn.apply(this,arguments)||this;return e.aiDataContract={name:p.FieldType.Required,kind:p.FieldType.Default,value:p.FieldType.Required,count:p.FieldType.Default,min:p.FieldType.Default,max:p.FieldType.Default,stdDev:p.FieldType.Default},e}var xn,Tn=(xn=hn,__extends(Cn,xn),Cn.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",Cn.dataType="MetricData",Cn);function Cn(e,t,n,i,r,o,a,s){var u=xn.call(this)||this;u.aiDataContract={ver:p.FieldType.Required,metrics:p.FieldType.Required,properties:p.FieldType.Default};var l=new yn;return l.count=0<i?i:undefined,l.max=isNaN(o)||null===o?undefined:o,l.min=isNaN(r)||null===r?undefined:r,l.name=St.sanitizeString(e,t)||Nt.NotSpecified,l.value=n,u.metrics=[l],u.properties=St.sanitizeProperties(e,a),u.measurements=St.sanitizeMeasurements(e,s),u}var In,Nn=(In=Kt,__extends(_n,In),_n);function _n(){var e=In.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var En,Ke=(En=Nn,__extends(wn,En),wn.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",wn.dataType="PageviewData",wn);function wn(e,t,n,i,r,o,a){var s=En.call(this)||this;return s.aiDataContract={ver:p.FieldType.Required,name:p.FieldType.Default,url:p.FieldType.Default,duration:p.FieldType.Default,properties:p.FieldType.Default,measurements:p.FieldType.Default,id:p.FieldType.Default},s.id=St.sanitizeId(e,a),s.url=St.sanitizeUrl(e,n),s.name=St.sanitizeString(e,t)||Nt.NotSpecified,isNaN(i)||(s.duration=Nt.msToTimeSpan(i)),s.properties=St.sanitizeProperties(e,r),s.measurements=St.sanitizeMeasurements(e,o),s}var Fn,rt=(Fn=Vt,__extends(An,Fn),An);function An(){var e=Fn.call(this)||this;return e.ver=2,e.success=!0,e.properties={},e.measurements={},e}var Dn,dt=(Dn=rt,__extends(bn,Dn),bn.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",bn.dataType="RemoteDependencyData",bn);function bn(e,t,n,i,r,o,a,s,u,l,c,d){void 0===u&&(u="Ajax");var f=Dn.call(this)||this;return f.aiDataContract={id:p.FieldType.Required,ver:p.FieldType.Required,name:p.FieldType.Default,resultCode:p.FieldType.Default,duration:p.FieldType.Default,success:p.FieldType.Default,data:p.FieldType.Default,target:p.FieldType.Default,type:p.FieldType.Default,properties:p.FieldType.Default,measurements:p.FieldType.Default,kind:p.FieldType.Default,value:p.FieldType.Default,count:p.FieldType.Default,min:p.FieldType.Default,max:p.FieldType.Default,stdDev:p.FieldType.Default,dependencyKind:p.FieldType.Default,dependencySource:p.FieldType.Default,commandName:p.FieldType.Default,dependencyTypeName:p.FieldType.Default},f.id=t,f.duration=Nt.msToTimeSpan(r),f.success=o,f.resultCode=a+"",f.type=St.sanitizeString(e,u),s=Dt.ParseDependencyPath(e,n,s,i),f.data=St.sanitizeUrl(e,i)||s.data,f.target=St.sanitizeString(e,s.target),l&&(f.target=f.target+" | "+l),f.name=St.sanitizeString(e,s.name),f.properties=St.sanitizeProperties(e,c),f.measurements=St.sanitizeMeasurements(e,d),f}var Ln,Zt=(Ln=Vt,__extends(Mn,Ln),Mn);function Mn(){var e=Ln.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var Rn,nn=(Rn=Zt,__extends(On,Rn),On.envelopeType="Microsoft.ApplicationInsights.{0}.Message",On.dataType="MessageData",On);function On(e,t,n,i,r){var o=Rn.call(this)||this;return o.aiDataContract={ver:p.FieldType.Required,message:p.FieldType.Required,severityLevel:p.FieldType.Default,properties:p.FieldType.Default},t=t||Nt.NotSpecified,o.message=St.sanitizeMessage(e,t),o.properties=St.sanitizeProperties(e,i),o.measurements=St.sanitizeMeasurements(e,r),n&&(o.severityLevel=n),o}var Pn,$t=(Pn=Nn,__extends(kn,Pn),kn);function kn(){var e=Pn.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var Un,zn=(Un=$t,__extends(qn,Un),qn.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",qn.dataType="PageviewPerformanceData",qn);function qn(e,t,n,i,r,o,a){var s=Un.call(this)||this;return s.aiDataContract={ver:p.FieldType.Required,name:p.FieldType.Default,url:p.FieldType.Default,duration:p.FieldType.Default,perfTotal:p.FieldType.Default,networkConnect:p.FieldType.Default,sentRequest:p.FieldType.Default,receivedResponse:p.FieldType.Default,domProcessing:p.FieldType.Default,properties:p.FieldType.Default,measurements:p.FieldType.Default},s.url=St.sanitizeUrl(e,n),s.name=St.sanitizeString(e,t)||Nt.NotSpecified,s.properties=St.sanitizeProperties(e,r),s.measurements=St.sanitizeMeasurements(e,o),a&&(s.domProcessing=a.domProcessing,s.duration=a.duration,s.networkConnect=a.networkConnect,s.perfTotal=a.perfTotal,s.receivedResponse=a.receivedResponse,s.sentRequest=a.sentRequest),s}var jn,hn=(jn=zt,__extends(Gn,jn),Gn);function Gn(e,t){var n=jn.call(this)||this;return n.aiDataContract={baseType:p.FieldType.Required,baseData:p.FieldType.Required},n.baseType=e,n.baseData=t,n}function Bn(){}function Hn(){}function Vn(){}(Kt=p.SeverityLevel||(p.SeverityLevel={}))[Kt.Verbose=0]="Verbose",Kt[Kt.Information=1]="Information",Kt[Kt.Warning=2]="Warning",Kt[Kt.Error=3]="Error",Kt[Kt.Critical=4]="Critical",Bn.getConfig=function(e,t,n,i){return void 0===i&&(i=!1),t=(n&&e.extensionConfig&&e.extensionConfig[n]&&!W.isNullOrUndefined(e.extensionConfig[n][t])?e.extensionConfig[n]:e)[t],W.isNullOrUndefined(t)?i:t},rt=Bn,Vt=function(){this.applicationVersion="ai.application.ver",this.applicationBuild="ai.application.build",this.applicationTypeId="ai.application.typeId",this.applicationId="ai.application.applicationId",this.applicationLayer="ai.application.layer",this.deviceId="ai.device.id",this.deviceIp="ai.device.ip",this.deviceLanguage="ai.device.language",this.deviceLocale="ai.device.locale",this.deviceModel="ai.device.model",this.deviceFriendlyName="ai.device.friendlyName",this.deviceNetwork="ai.device.network",this.deviceNetworkName="ai.device.networkName",this.deviceOEMName="ai.device.oemName",this.deviceOS="ai.device.os",this.deviceOSVersion="ai.device.osVersion",this.deviceRoleInstance="ai.device.roleInstance",this.deviceRoleName="ai.device.roleName",this.deviceScreenResolution="ai.device.screenResolution",this.deviceType="ai.device.type",this.deviceMachineName="ai.device.machineName",this.deviceVMName="ai.device.vmName",this.deviceBrowser="ai.device.browser",this.deviceBrowserVersion="ai.device.browserVersion",this.locationIp="ai.location.ip",this.locationCountry="ai.location.country",this.locationProvince="ai.location.province",this.locationCity="ai.location.city",this.operationId="ai.operation.id",this.operationName="ai.operation.name",this.operationParentId="ai.operation.parentId",this.operationRootId="ai.operation.rootId",this.operationSyntheticSource="ai.operation.syntheticSource",this.operationCorrelationVector="ai.operation.correlationVector",this.sessionId="ai.session.id",this.sessionIsFirst="ai.session.isFirst",this.sessionIsNew="ai.session.isNew",this.userAccountAcquisitionDate="ai.user.accountAcquisitionDate",this.userAccountId="ai.user.accountId",this.userAgent="ai.user.userAgent",this.userId="ai.user.id",this.userStoreRegion="ai.user.storeRegion",this.userAuthUserId="ai.user.authUserId",this.userAnonymousUserAcquisitionDate="ai.user.anonUserAcquisitionDate",this.userAuthenticatedUserAcquisitionDate="ai.user.authUserAcquisitionDate",this.cloudName="ai.cloud.name",this.cloudRole="ai.cloud.role",this.cloudRoleVer="ai.cloud.roleVer",this.cloudRoleInstance="ai.cloud.roleInstance",this.cloudEnvironment="ai.cloud.environment",this.cloudLocation="ai.cloud.location",this.cloudDeploymentUnit="ai.cloud.deploymentUnit",this.internalNodeName="ai.internal.nodeName",this.internalSdkVersion="ai.internal.sdkVersion",this.internalAgentVersion="ai.internal.agentVersion",this.internalSnippet="ai.internal.snippet",this.internalSdkSrc="ai.internal.sdkSrc"},Hn.create=function(e,t,n,i,r,o){if(n=St.sanitizeString(i,n)||Nt.NotSpecified,W.isNullOrUndefined(e)||W.isNullOrUndefined(t)||W.isNullOrUndefined(n))throw Error("Input doesn't contain all required fields");var a={name:n,time:W.toISOString(new Date),iKey:"",ext:o||{},tags:[],data:{},baseType:t,baseData:e};return W.isNullOrUndefined(r)||K(r,function(e,t){a.data[e]=t}),a},Zt=Hn,Vn.UserExt="user",Vn.DeviceExt="device",Vn.TraceExt="trace",Vn.WebExt="web",Vn.AppExt="app",Vn.OSExt="os",Vn.SessionExt="ses",Vn.SDKExt="sdk",$t=Vn,Kt=new Vt,p.PropertiesPluginIdentifier="AppInsightsPropertiesPlugin",p.BreezeChannelIdentifier="AppInsightsChannelPlugin",p.AnalyticsPluginIdentifier="ApplicationInsightsAnalytics",p.Util=Nt,p.CorrelationIdHelper=Ft,p.UrlHelper=Et,p.DateTimeUtils=Lt,p.ConnectionStringParser=Ot,p.RequestHeaders=mt,p.DisabledPropertyName="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",p.ProcessLegacy="ProcessLegacy",p.SampleRate="sampleRate",p.HttpMethod="http.method",p.DEFAULT_BREEZE_ENDPOINT=Rt,p.AIData=zt,p.AIBase=Ut,p.Envelope=Gt,p.Event=Qt,p.Exception=on,p.Metric=Tn,p.PageView=Ke,p.PageViewData=Nn,p.RemoteDependencyData=dt,p.Trace=nn,p.PageViewPerformance=zn,p.Data=hn,p.ConfigurationManager=rt,p.ContextTagKeys=Vt,p.DataSanitizer=St,p.TelemetryItemCreator=Zt,p.CtxTagKeys=Kt,p.Extensions=$t,function(e,t,n){var i=Object.defineProperty;if(i)try{return i(e,t,n)}catch(r){}typeof n.value!==undefined&&(e[t]=n.value)}(p,"__esModule",{value:!0})};"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e.Microsoft=e.Microsoft||{},e.Microsoft.ApplicationInsights=e.Microsoft.ApplicationInsights||{}));
var e=this,t=function(m){"use strict";var o="function",s="object",t="undefined",a="prototype",l="hasOwnProperty";function e(){return typeof globalThis!==t&&globalThis?globalThis:typeof self!==t&&self?self:typeof window!==t&&window?window:typeof global!==t&&global?global:null}function r(e){var t=Object.create;if(t)return t(e);if(null==e)return{};if((t=typeof e)!==s&&t!==o)throw new TypeError("Object prototype may only be an Object:"+e);function n(){}return n[a]=e,new n}var u,i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t[l](n)&&(e[n]=t[n])})(e,t)},n=function(e,t){function n(){this.constructor=e}i(e,t),e[a]=null===t?r(t):(n[a]=t[a],new n)};(Ln=On=e()||{}).__assign||(Ln.__assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object[a][l].call(t,i)&&(e[i]=t[i]);return e}),Ln.__extends||(Ln.__extends=n),__assign=__assign||On.__assign,__extends=__extends||On.__extends,(Hn=u=u||{})[Hn.CRITICAL=1]="CRITICAL",Hn[Hn.WARNING=2]="WARNING";var c={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},d="attachEvent",p="addEventListener",f="detachEvent",g="removeEventListener",v=(Wn=Object)[a],h=v.hasOwnProperty,y=Wn.defineProperty;function S(e){return v.toString.call(e)}function T(e){return e===undefined||typeof e===t}function I(e){return null===e||T(e)}function x(e){return!I(e)}function C(e){return typeof e===s}function F(e){return typeof e===o}function N(e,t,n,r){void 0===r&&(r=!1);var i=!1;if(!I(e))try{I(e[p])?I(e[d])||(e[d]("on"+t,n),i=!0):(e[p](t,n,r),i=!0)}catch(a){}return i}function A(e,t,n,r){if(void 0===r&&(r=!1),!I(e))try{I(e[g])?I(e[f])||e[f]("on"+t,n):e[g](t,n,r)}catch(i){}}function E(e,t){if(e)for(var n in e)h.call(e,n)&&t.call(e,n,e[n])}function D(e,t){return!(!e||!t||!~e.indexOf(t))}function w(e){return"[object Date]"===S(e)}function _(e){return"[object Array]"===S(e)}function b(e){return"[object Error]"===S(e)}function M(e){return"string"==typeof e}function R(e){return"boolean"==typeof e}function k(e){if(w(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"}}function L(e,t,n){for(var r=e.length,i=0;i<r&&!(i in e&&-1===t.call(n||e,e[i],i,e));i++);}function P(e,t,n){for(var r=e.length,i=Math.max(0<=(n=n||0)?n:r-Math.abs(n),0);i<r;i++)if(i in e&&e[i]===t)return i;return-1}function z(e,t,n){for(var r=e.length,i=n||e,a=Array(r),o=0;o<r;o++)o in e&&(a[o]=t.call(i,e[o],e));return a}function G(e,t,n){var r,i=e.length,a=0;if(3<=arguments.length)r=n;else{for(;a<i&&!(a in e);)a++;r=e[a++]}for(;a<i;)a in e&&(r=t(r,e[a],a,e)),a++;return r}function U(e){return"string"!=typeof e?e:e.replace(/^\s+|\s+$/g,"")}var O=!{toString:null}.propertyIsEnumerable("toString"),B=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];function q(e){var t=typeof e;if(t!==o&&(t!==s||null===e))throw new TypeError("objKeys called on non-object");var n,r=[];for(n in e)e&&h.call(e,n)&&r.push(n);if(O)for(var i=B.length,a=0;a<i;a++)e&&h.call(e,B[a])&&r.push(B[a]);return r}function H(e,t,n,r){if(y)try{var i={enumerable:!0,configurable:!0};return n&&(i.get=n),r&&(i.set=r),y(e,t,i),!0}catch(a){}return!1}function V(){var e=Date;return e.now?e.now():(new e).getTime()}function j(e){return b(e)?e.name:""}function W(e,t,n,r,i){var a=n;return e&&((a=e[t])===n||i&&!i(a)||r&&!r(n)||(e[t]=a=n)),a}function X(e){return!!e}var K=s,J="window",Y="document",Z="navigator",$="location",Q="performance",ee="JSON",te="crypto",ne="msCrypto",re="msie",ie="trident/",ae=null,oe=null,se=e;function le(e){var t=se();return t&&t[e]?t[e]:e===J&&ue()?window:null}function ue(){return typeof window===K&&window}function ce(){return typeof document===K&&document?document:le(Y)}function de(){return typeof navigator===K&&navigator?navigator:le(Z)}function pe(){return le(Q)}function fe(){return typeof JSON===K&&JSON||null!==le(ee)}function ge(){return fe()?JSON||le(ee):null}function me(){var e=de();return!e||e.userAgent===oe&&null!==ae||(e=((oe=e.userAgent)||"").toLowerCase(),ae=D(e,re)||D(e,ie)),ae}function ve(e){var t=Object[a].toString.call(e),n="";return"[object Error]"===t?n="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":fe()&&(n=ge().stringify(e)),t+n}var he="toGMTString",ye="toUTCString",Se="cookie",Te="expires",Ie="enabled",xe="isCookieUseDisabled",Ce="disableCookiesUsage",Fe="_ckMgr",Ne="",Ae=null,Ee=null,De=null,we=ce(),_e={},be={};function Me(e){return!e||e.isEnabled()}function Re(e,r){var t,n,l=(W(n=(t=e||be).cookieCfg=t.cookieCfg||{},"domain",t.cookieDomain,x,I),W(n,"path",t.cookiePath||"/",null,I),I(n[Ie])&&(e=void 0,T(t[xe])||(e=!t[xe]),T(t[Ce])||(e=!t[Ce]),n[Ie]=e),n),u=l.path||"/",c=l.domain,i=!1!==l[Ie],d={isEnabled:function(){var e=i&&ke(r),t=be[Fe];return e&&t&&d!==t?Me(t):e},setEnabled:function(e){i=!1!==e},set:function(e,t,n,r,i){var a,o,s;Me(d)&&(a={},-1!=(s=(o=U(t||Ne)).indexOf(";"))&&(o=U(t.substring(0,s)),a=Le(t.substring(1+s))),W(a,"domain",r||c,X,T),I(n)||(t=me(),!T(a[Te])||0<(s=V()+1e3*n)&&((r=new Date).setTime(s),W(a,Te,Pe(r,t?he:ye)||Pe(r,t?he:ye)||Ne,X)),t||W(a,"max-age",Ne+n,null,T)),(n=typeof location===K&&location?location:le($))&&"https:"===n.protocol&&(W(a,"secure",null,null,T),(Ee=null===Ee?!Ue((de()||{}).userAgent):Ee)&&W(a,"SameSite","None",null,T)),W(a,"path",i||u,null,T),(l.setCookie||Ge)(e,ze(o,a)))},get:function(e){var t=Ne;return Me(d)?(l.getCookie||function(e){var t,n=Ne;return we&&(t=we[Se]||Ne,De!==t&&(_e=Le(t),De=t),n=U(_e[e]||Ne)),n})(e):t},del:function(e,t){Me(d)&&d.purge(e,t)},purge:function(e,t){var n;ke(r)&&((n={}).path=t||"/",n[Te]="Thu, 01 Jan 1970 00:00:01 GMT",me()||(n["max-age"]="0"),(l.delCookie||Ge)(e,ze(Ne,n)))}};return d[Fe]=d}function ke(e){if(null===Ae){Ae=!1;try{Ae=(we||{})[Se]!==undefined}catch(t){e&&e.throwInternal(u.WARNING,c.CannotAccessCookie,"Cannot access document.cookie - "+j(t),{exception:ve(t)})}}return Ae}function Le(e){var n={};return e&&e.length&&L(U(e).split(";"),function(e){var t;(e=U(e||Ne))&&(-1==(t=e.indexOf("="))?n[e]=null:n[U(e.substring(0,t))]=U(e.substring(1+t)))}),n}function Pe(e,t){return F(e[t])?e[t]():null}function ze(e,t){var n=e||Ne;return E(t,function(e,t){n+="; "+e+(I(t)?Ne:"="+t)}),n}function Ge(e,t){we&&(we[Se]=e+"="+t)}function Ue(e){return!(!M(e)||!D(e,"CPU iPhone OS 12")&&!D(e,"iPad; CPU OS 12")&&!(D(e,"Macintosh; Intel Mac OS X 10_14")&&D(e,"Version/")&&D(e,"Safari"))&&(!D(e,"Macintosh; Intel Mac OS X 10_14")||!function(e,t){if(e){var n=e.length;if(e===t)return 1;if(40<=n){for(var r=n-1,i=39;0<=i;i--){if(e[r]!=t[i])return;r--}return 1}}}(e,"AppleWebKit/605.1.15 (KHTML, like Gecko)"))&&!D(e,"Chrome/5")&&!D(e,"Chrome/6")&&(!D(e,"UnrealEngine")||D(e,"Chrome"))&&!D(e,"UCBrowser/12")&&!D(e,"UCBrowser/11"))}var Oe=4294967296,Be=4294967295,qe=!1,He=123456789,Ve=987654321;function je(e){e<0&&(e>>>=0),He=123456789+e&Be,Ve=987654321-e&Be,qe=!0}function We(){try{var e=2147483647&V();je((Math.random()*Oe^e)+e)}catch(t){}}function Xe(e){return 0<e?Math.floor(Ke()/Be*(e+1))>>>0:0}function Ke(e){var t=(t=le(te)||le(ne))&&t.getRandomValues?t.getRandomValues(new Uint32Array(1))[0]&Be:me()?(qe||We(),Je()&Be):Math.floor(Oe*Math.random()|0);return e||(t>>>=0),t}function Je(e){var t=((Ve=36969*(65535&Ve)+(Ve>>16)&Be)<<16)+(65535&(He=18e3*(65535&He)+(He>>16)&Be))>>>0&Be|0;return e||(t>>>=0),t}var Ye,Ze=null;function $e(e){void 0===e&&(e=22);for(var t=Ke()>>>0,n=0,r="";r.length<e;)r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[0|63&t]||"",t>>>=6,5==++n&&(t=(Ke()<<2&4294967295|3&t)>>>0,n=0);return r}function Qe(){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=Ke())]+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 i=t[8+(3&Ke())|0];return n.substr(0,8)+n.substr(9,4)+"4"+n.substr(13,3)+i+n.substr(16,3)+n.substr(19,12)}var et={_canUseCookies:undefined,isTypeof:function(e,t){return typeof e===t},isUndefined:T,isNullOrUndefined:I,hasOwnProperty:function(e,t){return e&&h.call(e,t)},isFunction:F,isObject:C,isDate:w,isArray:_,isError:b,isString:M,isNumber:function(e){return"number"==typeof e},isBoolean:R,toISOString:k,arrForEach:L,arrIndexOf:P,arrMap:z,arrReduce:G,strTrim:U,objCreate:r,objKeys:q,objDefineAccessors:H,addEventHandler:function(e,t){var n=!1,r=ue()?window:le(J);return r&&(n=N(r,e,t),n=N(r.body,e,t)||n),(r=ce())&&nt.Attach(r,e,t)||n},dateNow:V,isIE:me,disableCookies:it,newGuid:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(tt,function(e){var t=0|Xe(15);return("x"===e?t:3&t|8).toString(16)})},perfNow:function(){var e=pe();return e&&e.now?e.now():V()},newId:$e,randomValue:Xe,random32:Ke,mwcRandomSeed:function(e){e?je(e):We()},mwcRandom32:Je,generateW3CId:Qe},tt=/[xy]/g,nt={Attach:N,AttachEvent:N,Detach:A,DetachEvent:A};function rt(e,t){var n,e=(n=e,e=t,(t=Re[Fe]||be[Fe])||(t=Re[Fe]=Re(n,e),be[Fe]=t),t),t=et._canUseCookies;return null===Ze&&(Ze=[],Ye=t,H(et,"_canUseCookies",function(){return Ye},function(t){Ye=t,L(Ze,function(e){e.setEnabled(t)})})),-1===P(Ze,e)&&Ze.push(e),R(t)&&e.setEnabled(t),R(Ye)&&e.setEnabled(Ye),e}function it(){rt().setEnabled(!1)}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=(st.sanitizeKeyAndAddUniqueness=function(e,t,n){var r=t.length,i=st.sanitizeKey(e,t);if(i.length!==r){for(var a=0,o=i;n[o]!==undefined;)a++,o=i.substring(0,st.MAX_NAME_LENGTH-3)+st.padNumber(a);i=o}return i},st.sanitizeKey=function(e,t){var n;return t&&(t=st.trim(t.toString())).length>st.MAX_NAME_LENGTH&&(n=t.substring(0,st.MAX_NAME_LENGTH),e.throwInternal(u.WARNING,c.NameTooLong,"name is too long. It has been truncated to "+st.MAX_NAME_LENGTH+" characters.",{name:t},!0)),n||t},st.sanitizeString=function(e,t,n){var r;return void 0===n&&(n=st.MAX_STRING_LENGTH),t&&(n=n||st.MAX_STRING_LENGTH,(t=st.trim(t)).toString().length>n&&(r=t.toString().substring(0,n),e.throwInternal(u.WARNING,c.StringValueTooLong,"string value is too long. It has been truncated to "+n+" characters.",{value:t},!0))),r||t},st.sanitizeUrl=function(e,t){return st.sanitizeInput(e,t,st.MAX_URL_LENGTH,c.UrlTooLong)},st.sanitizeMessage=function(e,t){var n;return t&&t.length>st.MAX_MESSAGE_LENGTH&&(n=t.substring(0,st.MAX_MESSAGE_LENGTH),e.throwInternal(u.WARNING,c.MessageTruncated,"message is too long, it has been truncated to "+st.MAX_MESSAGE_LENGTH+" characters.",{message:t},!0)),n||t},st.sanitizeException=function(e,t){var n;return t&&t.length>st.MAX_EXCEPTION_LENGTH&&(n=t.substring(0,st.MAX_EXCEPTION_LENGTH),e.throwInternal(u.WARNING,c.ExceptionTruncated,"exception is too long, it has been truncated to "+st.MAX_EXCEPTION_LENGTH+" characters.",{exception:t},!0)),n||t},st.sanitizeProperties=function(r,e){var i;return e&&(i={},E(e,function(e,t){if(C(t)&&fe())try{t=ge().stringify(t)}catch(n){r.throwInternal(u.WARNING,c.CannotSerializeObjectNonSerializable,"custom property is not valid",{exception:n},!0)}t=st.sanitizeString(r,t,st.MAX_PROPERTY_LENGTH),e=st.sanitizeKeyAndAddUniqueness(r,e,i),i[e]=t}),e=i),e},st.sanitizeMeasurements=function(n,e){var r;return e&&(r={},E(e,function(e,t){e=st.sanitizeKeyAndAddUniqueness(n,e,r),r[e]=t}),e=r),e},st.sanitizeId=function(e,t){return t&&st.sanitizeInput(e,t,st.MAX_ID_LENGTH,c.IdTooLong).toString()},st.sanitizeInput=function(e,t,n,r){var i;return t&&(t=st.trim(t)).length>n&&(i=t.substring(0,n),e.throwInternal(u.WARNING,r,"input is too long, it has been truncated to "+n+" characters.",{data:t},!0)),i||t},st.padNumber=function(e){return(e="00"+e).substr(e.length-3)},st.trim=function(e){return M(e)?e.replace(/^\s+|\s+$/g,""):e},st.MAX_NAME_LENGTH=150,st.MAX_ID_LENGTH=128,st.MAX_PROPERTY_LENGTH=8192,st.MAX_STRING_LENGTH=1024,st.MAX_URL_LENGTH=2048,st.MAX_MESSAGE_LENGTH=32768,st.MAX_EXCEPTION_LENGTH=32768,st);function st(){}function lt(e){var t,n=null;return F(Event)?n=new Event(e):(t=ce())&&t.createEvent&&(n=t.createEvent("Event")).initEvent(e,!0,!0),n}function ut(e,t){return void 0===t&&(t=!1),e===undefined||null===e?t:"true"==e.toString().toLowerCase()}function ct(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,i=""+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+".":"")+(i=i.length<2?"0"+i:i)+":"+r+":"+n+"."+t}function dt(){var e=de();return"sendBeacon"in e&&e.sendBeacon}function pt(e,t){var n=null;return L(e,function(e){if(e.identifier===t)return n=e,-1}),n}function ft(e,t,n,r,i){return!i&&M(e)&&("Script error."===e||"Script error"===e)}var gt,mt="https://dc.services.visualstudio.com",vt="not_specified";(nr=gt=gt||{})[nr.LocalStorage=0]="LocalStorage",nr[nr.SessionStorage=1]="SessionStorage",m.FieldType=void 0,(Kn=m.FieldType||(m.FieldType={}))[Kn.Default=0]="Default",Kn[Kn.Required=1]="Required",Kn[Kn.Array=2]="Array",Kn[Kn.Hidden=4]="Hidden",m.DistributedTracingModes=void 0,(Qn=m.DistributedTracingModes||(m.DistributedTracingModes={}))[Qn.AI=0]="AI",Qn[Qn.AI_AND_W3C=1]="AI_AND_W3C",Qn[Qn.W3C=2]="W3C";var ht=undefined,yt=undefined;function St(){return Ct()?Tt(gt.LocalStorage):null}function Tt(e){try{if(I(se()))return null;var t=new Date,n=le(e===gt.LocalStorage?"localStorage":"sessionStorage");n.setItem(t.toString(),t.toString());var r=n.getItem(t.toString())!==t.toString();if(n.removeItem(t.toString()),!r)return n}catch(i){}return null}function It(){return Et()?Tt(gt.SessionStorage):null}function xt(){yt=ht=!1}function Ct(){return ht=ht===undefined?!!Tt(gt.LocalStorage):ht}function Ft(e,t){var n=St();if(null!==n)try{return n.getItem(t)}catch(r){ht=!1,e.throwInternal(u.WARNING,c.BrowserCannotReadLocalStorage,"Browser failed read of local storage. "+j(r),{exception:ve(r)})}return null}function Nt(e,t,n){var r=St();if(null!==r)try{return r.setItem(t,n),!0}catch(i){ht=!1,e.throwInternal(u.WARNING,c.BrowserCannotWriteLocalStorage,"Browser failed write to local storage. "+j(i),{exception:ve(i)})}return!1}function At(e,t){var n=St();if(null!==n)try{return n.removeItem(t),!0}catch(r){ht=!1,e.throwInternal(u.WARNING,c.BrowserFailedRemovalFromLocalStorage,"Browser failed removal of local storage item. "+j(r),{exception:ve(r)})}return!1}function Et(){return yt=yt===undefined?!!Tt(gt.SessionStorage):yt}function Dt(){var t=[];return Et()&&E(le("sessionStorage"),function(e){t.push(e)}),t}function wt(e,t){var n=It();if(null!==n)try{return n.getItem(t)}catch(r){yt=!1,e.throwInternal(u.WARNING,c.BrowserCannotReadSessionStorage,"Browser failed read of session storage. "+j(r),{exception:ve(r)})}return null}function _t(e,t,n){var r=It();if(null!==r)try{return r.setItem(t,n),!0}catch(i){yt=!1,e.throwInternal(u.WARNING,c.BrowserCannotWriteSessionStorage,"Browser failed write to session storage. "+j(i),{exception:ve(i)})}return!1}function bt(e,t){var n=It();if(null!==n)try{return n.removeItem(t),!0}catch(r){yt=!1,e.throwInternal(u.WARNING,c.BrowserFailedRemovalFromSessionStorage,"Browser failed removal of session storage item. "+j(r),{exception:ve(r)})}return!1}var Mt=ce()||{},Rt=0,kt=[null,null,null,null,null];function Lt(e){var t=Rt,n=kt,r=n[t];return Mt.createElement?n[t]||(r=n[t]=Mt.createElement("a")):r={host:Ut(e,!0)},r.href=e,++t>=n.length&&(t=0),Rt=t,r}function Pt(e){return(e=Lt(e))?e.href:void 0}function zt(e){return(e=Lt(e))?e.pathname:void 0}function Gt(e,t){return e?e.toUpperCase()+" "+t:t}function Ut(e,t){return(e=Ot(e,t))&&null!=(t=e.match(/(www[0-9]?\.)?(.[^/:]+)(\:[\d]+)?/i))&&3<t.length&&M(t[2])&&0<t[2].length?t[2]+(t[3]||""):e}function Ot(e,t){var n=null;return!e||null!=(e=e.match(/(\w*):\/\/(.[^/:]+)(\:[\d]+)?/i))&&2<e.length&&M(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 Bt=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"];function qt(e){return!!~Bt.indexOf(e.toLowerCase())}var Ht={NotSpecified:vt,createDomEvent:lt,disableStorage:xt,isInternalApplicationInsightsEndpoint:qt,canUseLocalStorage:Ct,getStorage:Ft,setStorage:Nt,removeStorage:At,canUseSessionStorage:Et,getSessionStorageKeys:Dt,getSessionStorage:wt,setSessionStorage:_t,removeSessionStorage:bt,disableCookies:it,canUseCookies:function(e){return rt(null,e).isEnabled()},disallowsSameSiteNone:Ue,setCookie:function(e,t,n,r){rt(null,e).set(t,n,null,r)},stringToBoolOrDefault:ut,getCookie:function(e,t){return rt(null,e).get(t)},deleteCookie:function(e,t){return rt(null,e).del(t)},trim:U,newId:$e,random32:function(){return Ke(!0)},generateW3CId:Qe,isArray:_,isError:b,isDate:w,toISOStringForIE8:k,getIEVersion:function(e){var t=(e=void 0===e?null:e)?e.toLowerCase():"";return D(t=e?t:(e=de()||{})?(e.userAgent||"").toLowerCase():"",re)?parseInt(t.split(re)[1]):D(t,ie)&&(t=parseInt(t.split(ie)[1]))?t+4:null},msToTimeSpan:ct,isCrossOriginError:ft,dump:ve,getExceptionName:j,addEventHandler:N,IsBeaconApiSupported:dt,getExtension:pt},Vt={parseUrl:Lt,getAbsoluteUrl:Pt,getPathName:zt,getCompleteUrl:Gt,parseHost:Ut,parseFullHost:Ot},jt={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 i,a=Lt(t).host.toLowerCase();if(a&&(~a.indexOf(":443")||~a.indexOf(":80"))&&(a=(Ot(t,!0)||"").toLowerCase()),!(e&&e.enableCorsCorrelation||a===n))return!1;if((n=e&&e.correlationHeaderDomains)&&(L(n,function(e){e=RegExp(e.toLowerCase().replace(/\./g,".").replace(/\*/g,".*")),i=i||e.test(a)}),!i))return!1;var o=e&&e.correlationHeaderExcludedDomains;if(!o||0===o.length)return!0;for(r=0;r<o.length;r++)if(RegExp(o[r].toLowerCase().replace(/\./g,".").replace(/\*/g,".*")).test(a))return!1;return a&&0<a.length},getCorrelationContext:function(e){if((e=e&&jt.getCorrelationContextValue(e,at.requestContextTargetKey))&&e!==jt.correlationIdPrefix)return e},getCorrelationContextValue:function(e,t){if(e)for(var n=e.split(","),r=0;r<n.length;++r){var i=n[r].split("=");if(2===i.length&&i[0]===t)return i[1]}}};function Wt(){var e=pe();return e&&e.now&&e.timing&&0<(e=e.now()+e.timing.navigationStart)?e:V()}function Xt(e,t){return 0===e||0===t||I(e)||I(t)?null:t-e}var Kt={Now:Wt,GetDuration:Xt};function Jt(e){if(!e)return{};var t=G(e.split(";"),function(e,t){var n=t.split("=");return 2===n.length&&(t=n[0].toLowerCase(),n=n[1],e[t]=n),e},{});return 0<q(t).length&&(t.endpointsuffix&&(e=t.location?t.location+".":"",t.ingestionendpoint=t.ingestionendpoint||"https://"+e+"dc."+t.endpointsuffix),t.ingestionendpoint=t.ingestionendpoint||mt),t}var Yt,Zt={parse:Jt},$t=function(){},Qt=(Yt=$t,__extends(en,Yt),en);function en(){return Yt.call(this)||this}var tn,nn=(tn=function(){this.ver=1,this.sampleRate=100,this.tags={}},__extends(rn,tn),rn);function rn(e,t,n){var r=tn.call(this)||this;return r.name=ot.sanitizeString(e,n)||vt,r.data=t,r.time=k(new Date),r.aiDataContract={time:m.FieldType.Required,iKey:m.FieldType.Required,name:m.FieldType.Required,sampleRate:function(){return 100===r.sampleRate?m.FieldType.Hidden:m.FieldType.Required},tags:m.FieldType.Required,data:m.FieldType.Required},r}var an,on=(an=tr=function(){this.ver=2,this.properties={},this.measurements={}},__extends(sn,an),sn.envelopeType="Microsoft.ApplicationInsights.{0}.Event",sn.dataType="EventData",sn);function sn(e,t,n,r){var i=an.call(this)||this;return i.aiDataContract={ver:m.FieldType.Required,name:m.FieldType.Required,properties:m.FieldType.Default,measurements:m.FieldType.Default},i.name=ot.sanitizeString(e,t)||vt,i.properties=ot.sanitizeProperties(e,n),i.measurements=ot.sanitizeMeasurements(e,r),i}var ln,un=function(){},cn=function(){this.hasFullStack=!0,this.parsedStack=[]},dn="error",pn=(ln=function(){this.ver=2,this.exceptions=[],this.properties={},this.measurements={}},__extends(fn,ln),fn.CreateFromInterface=function(t,e,n,r){var i=e.exceptions&&z(e.exceptions,function(e){return mn.CreateFromInterface(t,e)});return new fn(t,__assign({},e,{exceptions:i}),n,r)},fn.prototype.toInterface=function(){var e=this.exceptions,t=this.properties,n=this.measurements,r=this.severityLevel;this.ver;var i=this.problemGroup,a=this.id,o=this.isManual;return{ver:"4.0",exceptions:e instanceof Array&&z(e,function(e){return e.toInterface()})||undefined,severityLevel:r,properties:t,measurements:n,problemGroup:i,id:a,isManual:o}},fn.CreateSimpleException=function(e,t,n,r,i,a){return{exceptions:[{hasFullStack:!0,message:e,stack:i,typeName:t}]}},fn.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",fn.dataType="ExceptionData",fn);function fn(e,t,n,r,i,a){var o,s=ln.call(this)||this;return s.aiDataContract={ver:m.FieldType.Required,exceptions:m.FieldType.Required,severityLevel:m.FieldType.Default,properties:m.FieldType.Default,measurements:m.FieldType.Default},"ver"in(o=t)&&"exceptions"in o&&"properties"in o?(s.exceptions=t.exceptions,s.properties=t.properties,s.measurements=t.measurements,t.severityLevel&&(s.severityLevel=t.severityLevel),t.id&&(s.id=t.id),t.problemGroup&&(s.problemGroup=t.problemGroup),s.ver=2,I(t.isManual)||(s.isManual=t.isManual)):(s.exceptions=[new mn(e,t)],s.properties=ot.sanitizeProperties(e,n)||{},s.measurements=ot.sanitizeMeasurements(e,r),i&&(s.severityLevel=i),a&&(s.id=a)),s}var gn,mn=(gn=cn,__extends(vn,gn),vn.prototype.toInterface=function(){var e=this.parsedStack instanceof Array&&z(this.parsedStack,function(e){return e.toInterface()});return{id:this.id,outerId:this.outerId,typeName:this.typeName,message:this.message,hasFullStack:this.hasFullStack,stack:this.stack,parsedStack:e||undefined}},vn.CreateFromInterface=function(e,t){var n=t.parsedStack instanceof Array&&z(t.parsedStack,function(e){return yn.CreateFromInterface(e)})||t.parsedStack;return new vn(e,__assign({},t,{parsedStack:n}))},vn.parseStack=function(e){if(M(e)){for(var t=e.split("\n"),n=[],r=0,i=0,a=0;a<=t.length;a++){var o=t[a];yn.regex.test(o)&&(i+=(o=new yn(t[a],r++)).sizeInBytes,n.push(o))}if(32768<i)for(var s=0,l=n.length-1,u=0,c=s,d=l;s<l;){if(32768<(u+=n[s].sizeInBytes+n[l].sizeInBytes)){n.splice(c,d-c+1);break}c=s,d=l,s++,l--}}return n},vn);function vn(e,t){var n,r=gn.call(this)||this;return r.aiDataContract={id:m.FieldType.Default,outerId:m.FieldType.Default,typeName:m.FieldType.Required,message:m.FieldType.Required,hasFullStack:m.FieldType.Default,stack:m.FieldType.Default,parsedStack:m.FieldType.Array},"hasFullStack"in(n=t)&&"typeName"in n?(r.typeName=t.typeName,r.message=t.message,r.stack=t.stack,r.parsedStack=t.parsedStack,r.hasFullStack=t.hasFullStack):(b(n=t)||(n=n[dn]||n.evt||n),r.typeName=ot.sanitizeString(e,function(e){var t="";if(e&&!(t=e.typeName||e.name||""))try{var n=/function (.{1,})\(/.exec(e.constructor.toString()),t=n&&1<n.length?n[1]:""}catch(r){}return t}(n))||vt,r.message=ot.sanitizeMessage(e,t.message)||vt,t=t.stack,r.parsedStack=vn.parseStack(t),r.stack=ot.sanitizeException(e,t),r.hasFullStack=_(r.parsedStack)&&0<r.parsedStack.length),r}var hn,yn=(hn=un,__extends(Sn,hn),Sn.CreateFromInterface=function(e){return new Sn(e,null)},Sn.prototype.toInterface=function(){return{level:this.level,method:this.method,assembly:this.assembly,fileName:this.fileName,line:this.line}},Sn.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,Sn.baseSize=58,Sn);function Sn(e,t){var n,r=hn.call(this)||this;return r.sizeInBytes=0,r.aiDataContract={level:m.FieldType.Required,method:m.FieldType.Required,assembly:m.FieldType.Default,fileName:m.FieldType.Default,line:m.FieldType.Default},"string"==typeof e?(n=e,r.level=t,r.method="<no_method>",r.assembly=U(n),r.fileName="",r.line=0,(n=n.match(Sn.regex))&&5<=n.length&&(r.method=U(n[2])||r.method,r.fileName=U(n[4]),r.line=parseInt(n[5])||0)):(r.level=e.level,r.method=e.method,r.assembly=e.assembly,r.fileName=e.fileName,r.line=e.line,r.sizeInBytes=0),r.sizeInBytes+=r.method.length,r.sizeInBytes+=r.fileName.length,r.sizeInBytes+=r.assembly.length,r.sizeInBytes+=Sn.baseSize,r.sizeInBytes+=r.level.toString().length,r.sizeInBytes+=r.line.toString().length,r}var Tn,In=function(){this.ver=2,this.metrics=[],this.properties={},this.measurements={}};(er=Tn={})[er.Measurement=0]="Measurement",er[er.Aggregation=1]="Aggregation";var xn,Cn=(xn=function(){this.kind=Tn.Measurement},__extends(Fn,xn),Fn);function Fn(){var e=xn.apply(this,arguments)||this;return e.aiDataContract={name:m.FieldType.Required,kind:m.FieldType.Default,value:m.FieldType.Required,count:m.FieldType.Default,min:m.FieldType.Default,max:m.FieldType.Default,stdDev:m.FieldType.Default},e}var Nn,An=(Nn=In,__extends(En,Nn),En.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",En.dataType="MetricData",En);function En(e,t,n,r,i,a,o,s){var l=Nn.call(this)||this;l.aiDataContract={ver:m.FieldType.Required,metrics:m.FieldType.Required,properties:m.FieldType.Default};var u=new Cn;return u.count=0<r?r:undefined,u.max=isNaN(a)||null===a?undefined:a,u.min=isNaN(i)||null===i?undefined:i,u.name=ot.sanitizeString(e,t)||vt,u.value=n,l.metrics=[u],l.properties=ot.sanitizeProperties(e,o),l.measurements=ot.sanitizeMeasurements(e,s),l}var Dn,wn=(Dn=tr,__extends(_n,Dn),_n);function _n(){var e=Dn.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var bn,Mn=(bn=wn,__extends(Rn,bn),Rn.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",Rn.dataType="PageviewData",Rn);function Rn(e,t,n,r,i,a,o){var s=bn.call(this)||this;return s.aiDataContract={ver:m.FieldType.Required,name:m.FieldType.Default,url:m.FieldType.Default,duration:m.FieldType.Default,properties:m.FieldType.Default,measurements:m.FieldType.Default,id:m.FieldType.Default},s.id=ot.sanitizeId(e,o),s.url=ot.sanitizeUrl(e,n),s.name=ot.sanitizeString(e,t)||vt,isNaN(r)||(s.duration=ct(r)),s.properties=ot.sanitizeProperties(e,i),s.measurements=ot.sanitizeMeasurements(e,a),s}var kn,Ln=(kn=function(){this.ver=2,this.success=!0,this.properties={},this.measurements={}},__extends(Pn,kn),Pn.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",Pn.dataType="RemoteDependencyData",Pn);function Pn(e,t,n,r,i,a,o,s,l,u,c,d){void 0===l&&(l="Ajax");var p=kn.call(this)||this;p.aiDataContract={id:m.FieldType.Required,ver:m.FieldType.Required,name:m.FieldType.Default,resultCode:m.FieldType.Default,duration:m.FieldType.Default,success:m.FieldType.Default,data:m.FieldType.Default,target:m.FieldType.Default,type:m.FieldType.Default,properties:m.FieldType.Default,measurements:m.FieldType.Default,kind:m.FieldType.Default,value:m.FieldType.Default,count:m.FieldType.Default,min:m.FieldType.Default,max:m.FieldType.Default,stdDev:m.FieldType.Default,dependencyKind:m.FieldType.Default,dependencySource:m.FieldType.Default,commandName:m.FieldType.Default,dependencyTypeName:m.FieldType.Default},p.id=t,p.duration=ct(i),p.success=a,p.resultCode=o+"",p.type=ot.sanitizeString(e,l);var f,g,o=(f=e,t=s,o=a=i=r,a=(l=n)&&0<l.length?(g=(s=Lt(l)).host,a||(null!=s.pathname?("/"!=((n=0===s.pathname.length?"/":s.pathname)[0]||"")&&(n="/"+n),o=s.pathname,ot.sanitizeString(f,t?t+" "+n:n)):ot.sanitizeString(f,l))):g=i,{target:g,name:a,data:o});return p.data=ot.sanitizeUrl(e,r)||o.data,p.target=ot.sanitizeString(e,o.target),u&&(p.target=p.target+" | "+u),p.name=ot.sanitizeString(e,o.name),p.properties=ot.sanitizeProperties(e,c),p.measurements=ot.sanitizeMeasurements(e,d),p}var zn,n=(zn=function(){this.ver=2,this.properties={},this.measurements={}},__extends(Gn,zn),Gn.envelopeType="Microsoft.ApplicationInsights.{0}.Message",Gn.dataType="MessageData",Gn);function Gn(e,t,n,r,i){var a=zn.call(this)||this;return a.aiDataContract={ver:m.FieldType.Required,message:m.FieldType.Required,severityLevel:m.FieldType.Default,properties:m.FieldType.Default},a.message=ot.sanitizeMessage(e,t=t||vt),a.properties=ot.sanitizeProperties(e,r),a.measurements=ot.sanitizeMeasurements(e,i),n&&(a.severityLevel=n),a}var Un,On=(Un=wn,__extends(Bn,Un),Bn);function Bn(){var e=Un.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var qn,Hn=(qn=On,__extends(Vn,qn),Vn.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",Vn.dataType="PageviewPerformanceData",Vn);function Vn(e,t,n,r,i,a,o){var s=qn.call(this)||this;return s.aiDataContract={ver:m.FieldType.Required,name:m.FieldType.Default,url:m.FieldType.Default,duration:m.FieldType.Default,perfTotal:m.FieldType.Default,networkConnect:m.FieldType.Default,sentRequest:m.FieldType.Default,receivedResponse:m.FieldType.Default,domProcessing:m.FieldType.Default,properties:m.FieldType.Default,measurements:m.FieldType.Default},s.url=ot.sanitizeUrl(e,n),s.name=ot.sanitizeString(e,t)||vt,s.properties=ot.sanitizeProperties(e,i),s.measurements=ot.sanitizeMeasurements(e,a),o&&(s.domProcessing=o.domProcessing,s.duration=o.duration,s.networkConnect=o.networkConnect,s.perfTotal=o.perfTotal,s.receivedResponse=o.receivedResponse,s.sentRequest=o.sentRequest),s}var jn,Wn=(jn=Qt,__extends(Xn,jn),Xn);function Xn(e,t){var n=jn.call(this)||this;return n.aiDataContract={baseType:m.FieldType.Required,baseData:m.FieldType.Required},n.baseType=e,n.baseData=t,n}m.SeverityLevel=void 0,(nr=m.SeverityLevel||(m.SeverityLevel={}))[nr.Verbose=0]="Verbose",nr[nr.Information=1]="Information",nr[nr.Warning=2]="Warning",nr[nr.Error=3]="Error",nr[nr.Critical=4]="Critical";var Kn=(Jn.getConfig=function(e,t,n,r){return void 0===r&&(r=!1),t=(n&&e.extensionConfig&&e.extensionConfig[n]&&!I(e.extensionConfig[n][t])?e.extensionConfig[n]:e)[t],I(t)?r:t},Jn);function Jn(){}function Yn(e){var t="ai."+e+".";return function(e){return t+e}}var Zn,$n,Qn=Yn("application"),cn=Yn("device"),un=Yn("location"),er=Yn("operation"),In=Yn("session"),tr=Yn("user"),On=Yn("cloud"),nr=Yn("internal"),tr=($n={applicationVersion:Qn("ver"),applicationBuild:Qn("build"),applicationTypeId:Qn("typeId"),applicationId:Qn("applicationId"),applicationLayer:Qn("layer"),deviceId:cn("id"),deviceIp:cn("ip"),deviceLanguage:cn("language"),deviceLocale:cn("locale"),deviceModel:cn("model"),deviceFriendlyName:cn("friendlyName"),deviceNetwork:cn("network"),deviceNetworkName:cn("networkName"),deviceOEMName:cn("oemName"),deviceOS:cn("os"),deviceOSVersion:cn("osVersion"),deviceRoleInstance:cn("roleInstance"),deviceRoleName:cn("roleName"),deviceScreenResolution:cn("screenResolution"),deviceType:cn("type"),deviceMachineName:cn("machineName"),deviceVMName:cn("vmName"),deviceBrowser:cn("browser"),deviceBrowserVersion:cn("browserVersion"),locationIp:un("ip"),locationCountry:un("country"),locationProvince:un("province"),locationCity:un("city"),operationId:er("id"),operationName:er("name"),operationParentId:er("parentId"),operationRootId:er("rootId"),operationSyntheticSource:er("syntheticSource"),operationCorrelationVector:er("correlationVector"),sessionId:In("id"),sessionIsFirst:In("isFirst"),sessionIsNew:In("isNew"),userAccountAcquisitionDate:tr("accountAcquisitionDate"),userAccountId:tr("accountId"),userAgent:tr("userAgent"),userId:tr("id"),userStoreRegion:tr("storeRegion"),userAuthUserId:tr("authUserId"),userAnonymousUserAcquisitionDate:tr("anonUserAcquisitionDate"),userAuthenticatedUserAcquisitionDate:tr("authUserAcquisitionDate"),cloudName:On("name"),cloudRole:On("role"),cloudRoleVer:On("roleVer"),cloudRoleInstance:On("roleInstance"),cloudEnvironment:On("environment"),cloudLocation:On("location"),cloudDeploymentUnit:On("deploymentUnit"),internalNodeName:nr("nodeName"),internalSdkVersion:nr("sdkVersion"),internalAgentVersion:nr("agentVersion"),internalSnippet:nr("snippet"),internalSdkSrc:nr("sdkSrc")},Zn=function(){var n=this;E($n,function(e,t){n[e]=t})},__extends(rr,Zn),rr);function rr(){return Zn.call(this)||this}function ir(){}ir.create=function(e,t,n,r,i,a){if(n=ot.sanitizeString(r,n)||vt,I(e)||I(t)||I(n))throw Error("Input doesn't contain all required fields");var o={name:n,time:k(new Date),iKey:"",ext:a||{},tags:[],data:{},baseType:t,baseData:e};return I(i)||E(i,function(e,t){o.data[e]=t}),o},On=ir,nr=new tr,m.AIBase=$t,m.AIData=Qt,m.AnalyticsPluginIdentifier="ApplicationInsightsAnalytics",m.BreezeChannelIdentifier="AppInsightsChannelPlugin",m.ConfigurationManager=Kn,m.ConnectionStringParser=Zt,m.ContextTagKeys=tr,m.CorrelationIdHelper=jt,m.CtxTagKeys=nr,m.DEFAULT_BREEZE_ENDPOINT=mt,m.Data=Wn,m.DataSanitizer=ot,m.DateTimeUtils=Kt,m.DisabledPropertyName="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",m.Envelope=nn,m.Event=on,m.Exception=pn,m.Extensions={UserExt:"user",DeviceExt:"device",TraceExt:"trace",WebExt:"web",AppExt:"app",OSExt:"os",SessionExt:"ses",SDKExt:"sdk"},m.HttpMethod="http.method",m.Metric=An,m.PageView=Mn,m.PageViewData=wn,m.PageViewPerformance=Hn,m.ProcessLegacy="ProcessLegacy",m.PropertiesPluginIdentifier="AppInsightsPropertiesPlugin",m.RemoteDependencyData=Ln,m.RequestHeaders=at,m.SampleRate="sampleRate",m.TelemetryItemCreator=On,m.Trace=n,m.UrlHelper=Vt,m.Util=Ht,m.createDomEvent=lt,m.dateTimeUtilsDuration=Xt,m.dateTimeUtilsNow=Wt,m.getExtensionByName=pt,m.isBeaconApiSupported=dt,m.isCrossOriginError=ft,m.isInternalApplicationInsightsEndpoint=qt,m.msToTimeSpan=ct,m.parseConnectionString=Jt,m.strNotSpecified=vt,m.stringToBoolOrDefault=ut,m.urlGetAbsoluteUrl=Pt,m.urlGetCompleteUrl=Gt,m.urlGetPathName=zt,m.urlParseFullHost=Ot,m.urlParseHost=Ut,m.urlParseUrl=Lt,m.utlCanUseLocalStorage=Ct,m.utlCanUseSessionStorage=Et,m.utlDisableStorage=xt,m.utlGetLocalStorage=Ft,m.utlGetSessionStorage=wt,m.utlGetSessionStorageKeys=Dt,m.utlRemoveSessionStorage=bt,m.utlRemoveStorage=At,m.utlSetLocalStorage=Nt,m.utlSetSessionStorage=_t,function(e,t,n){var r=Object.defineProperty;if(r)try{return r(e,t,n)}catch(i){}typeof n.value!==undefined&&(e[t]=n.value)}(m,"__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-common.min.js.map
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
import '@microsoft/applicationinsights-shims';
export { Util, CorrelationIdHelper, UrlHelper, DateTimeUtils } from './Util';
export { ConnectionStringParser } from './ConnectionStringParser';
export { Util, CorrelationIdHelper, DateTimeUtils, dateTimeUtilsNow, dateTimeUtilsDuration, UrlHelper, isInternalApplicationInsightsEndpoint } from './Util';
export { parseConnectionString, ConnectionStringParser } from './ConnectionStringParser';
export { FieldType } from './Enums';
export { RequestHeaders } from './RequestResponseHeaders';
export { DisabledPropertyName, ProcessLegacy, SampleRate, HttpMethod, DEFAULT_BREEZE_ENDPOINT } from './Constants';
export { DisabledPropertyName, ProcessLegacy, SampleRate, HttpMethod, DEFAULT_BREEZE_ENDPOINT, strNotSpecified } from './Constants';
export { Data as AIData } from './Interfaces/Contracts/Generated/Data';

@@ -28,2 +28,6 @@ export { Base as AIBase } from './Interfaces/Contracts/Generated/Base';

export { DistributedTracingModes } from './Enums';
export { stringToBoolOrDefault, msToTimeSpan, isBeaconApiSupported, getExtensionByName, isCrossOriginError } from './HelperFuncs';
export { createDomEvent } from './DomHelperFuncs';
export { utlDisableStorage, utlCanUseLocalStorage, utlGetLocalStorage, utlSetLocalStorage, utlRemoveStorage, utlCanUseSessionStorage, utlGetSessionStorageKeys, utlGetSessionStorage, utlSetSessionStorage, utlRemoveSessionStorage } from './StorageHelperFuncs';
export { urlParseUrl, urlGetAbsoluteUrl, urlGetPathName, urlGetCompleteUrl, urlParseHost, urlParseFullHost } from './UrlHelperFuncs';
export var PropertiesPluginIdentifier = "AppInsightsPropertiesPlugin";

@@ -30,0 +34,0 @@ export var BreezeChannelIdentifier = "AppInsightsChannelPlugin";

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
import { DEFAULT_BREEZE_ENDPOINT } from "./Constants";
import { CoreUtils } from "@microsoft/applicationinsights-core-js";
var ConnectionStringParser = /** @class */ (function () {
function ConnectionStringParser() {
import { arrReduce, objKeys } from "@microsoft/applicationinsights-core-js";
var _FIELDS_SEPARATOR = ";";
var _FIELD_KEY_VALUE_SEPARATOR = "=";
export function parseConnectionString(connectionString) {
if (!connectionString) {
return {};
}
ConnectionStringParser.parse = function (connectionString) {
if (!connectionString) {
return {};
var kvPairs = connectionString.split(_FIELDS_SEPARATOR);
var result = arrReduce(kvPairs, function (fields, kv) {
var kvParts = kv.split(_FIELD_KEY_VALUE_SEPARATOR);
if (kvParts.length === 2) {
var key = kvParts[0].toLowerCase();
var value = kvParts[1];
fields[key] = value;
}
var kvPairs = connectionString.split(ConnectionStringParser._FIELDS_SEPARATOR);
var result = CoreUtils.arrReduce(kvPairs, function (fields, kv) {
var kvParts = kv.split(ConnectionStringParser._FIELD_KEY_VALUE_SEPARATOR);
if (kvParts.length === 2) {
var key = kvParts[0].toLowerCase();
var value = kvParts[1];
fields[key] = value;
}
return fields;
}, {});
if (CoreUtils.objKeys(result).length > 0) {
// this is a valid connection string, so parse the results
if (result.endpointsuffix) {
// use endpoint suffix where overrides are not provided
var locationPrefix = result.location ? result.location + "." : "";
result.ingestionendpoint = result.ingestionendpoint || ("https://" + locationPrefix + "dc." + result.endpointsuffix);
}
// apply the default endpoints
result.ingestionendpoint = result.ingestionendpoint || DEFAULT_BREEZE_ENDPOINT;
return fields;
}, {});
if (objKeys(result).length > 0) {
// this is a valid connection string, so parse the results
if (result.endpointsuffix) {
// use endpoint suffix where overrides are not provided
var locationPrefix = result.location ? result.location + "." : "";
result.ingestionendpoint = result.ingestionendpoint || ("https://" + locationPrefix + "dc." + result.endpointsuffix);
}
return result;
};
ConnectionStringParser._FIELDS_SEPARATOR = ";";
ConnectionStringParser._FIELD_KEY_VALUE_SEPARATOR = "=";
return ConnectionStringParser;
}());
export { ConnectionStringParser };
// apply the default endpoints
result.ingestionendpoint = result.ingestionendpoint || DEFAULT_BREEZE_ENDPOINT;
}
return result;
}
export var ConnectionStringParser = {
parse: parseConnectionString
};
//# sourceMappingURL=ConnectionStringParser.js.map

@@ -15,2 +15,3 @@ // Copyright (c) Microsoft Corporation. All rights reserved.

export var DEFAULT_BREEZE_ENDPOINT = "https://dc.services.visualstudio.com";
export var strNotSpecified = "not_specified";
//# sourceMappingURL=Constants.js.map

@@ -1,5 +0,1 @@

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// THIS FILE WAS AUTOGENERATED
import { Domain } from './Domain';
"use strict";

@@ -9,14 +5,20 @@ /**

*/
var AvailabilityData = /** @class */ (function (_super) {
__extends(AvailabilityData, _super);
var AvailabilityData = /** @class */ (function () {
function AvailabilityData() {
var _this = _super.call(this) || this;
_this.ver = 2;
_this.properties = {};
_this.measurements = {};
return _this;
/**
* Schema version
*/
this.ver = 2;
/**
* Collection of custom properties.
*/
this.properties = {};
/**
* Collection of custom measurements.
*/
this.measurements = {};
}
return AvailabilityData;
}(Domain));
}());
export { AvailabilityData };
//# sourceMappingURL=AvailabilityData.js.map
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// THIS FILE WAS AUTOGENERATED
var ContextTagKeys = /** @class */ (function () {
import { createClassFromInterface } from "@microsoft/applicationinsights-core-js";
function _aiNameFunc(baseName) {
var aiName = "ai." + baseName + ".";
return function (name) {
return aiName + name;
};
}
var _aiApplication = _aiNameFunc("application");
var _aiDevice = _aiNameFunc("device");
var _aiLocation = _aiNameFunc("location");
var _aiOperation = _aiNameFunc("operation");
var _aiSession = _aiNameFunc("session");
var _aiUser = _aiNameFunc("user");
var _aiCloud = _aiNameFunc("cloud");
var _aiInternal = _aiNameFunc("internal");
var ContextTagKeys = /** @class */ (function (_super) {
__extends(ContextTagKeys, _super);
function ContextTagKeys() {
this.applicationVersion = "ai.application.ver";
this.applicationBuild = "ai.application.build";
this.applicationTypeId = "ai.application.typeId";
this.applicationId = "ai.application.applicationId";
this.applicationLayer = "ai.application.layer";
this.deviceId = "ai.device.id";
this.deviceIp = "ai.device.ip";
this.deviceLanguage = "ai.device.language";
this.deviceLocale = "ai.device.locale";
this.deviceModel = "ai.device.model";
this.deviceFriendlyName = "ai.device.friendlyName";
this.deviceNetwork = "ai.device.network";
this.deviceNetworkName = "ai.device.networkName";
this.deviceOEMName = "ai.device.oemName";
this.deviceOS = "ai.device.os";
this.deviceOSVersion = "ai.device.osVersion";
this.deviceRoleInstance = "ai.device.roleInstance";
this.deviceRoleName = "ai.device.roleName";
this.deviceScreenResolution = "ai.device.screenResolution";
this.deviceType = "ai.device.type";
this.deviceMachineName = "ai.device.machineName";
this.deviceVMName = "ai.device.vmName";
this.deviceBrowser = "ai.device.browser";
this.deviceBrowserVersion = "ai.device.browserVersion";
this.locationIp = "ai.location.ip";
this.locationCountry = "ai.location.country";
this.locationProvince = "ai.location.province";
this.locationCity = "ai.location.city";
this.operationId = "ai.operation.id";
this.operationName = "ai.operation.name";
this.operationParentId = "ai.operation.parentId";
this.operationRootId = "ai.operation.rootId";
this.operationSyntheticSource = "ai.operation.syntheticSource";
this.operationCorrelationVector = "ai.operation.correlationVector";
this.sessionId = "ai.session.id";
this.sessionIsFirst = "ai.session.isFirst";
this.sessionIsNew = "ai.session.isNew";
this.userAccountAcquisitionDate = "ai.user.accountAcquisitionDate";
this.userAccountId = "ai.user.accountId";
this.userAgent = "ai.user.userAgent";
this.userId = "ai.user.id";
this.userStoreRegion = "ai.user.storeRegion";
this.userAuthUserId = "ai.user.authUserId";
this.userAnonymousUserAcquisitionDate = "ai.user.anonUserAcquisitionDate";
this.userAuthenticatedUserAcquisitionDate = "ai.user.authUserAcquisitionDate";
this.cloudName = "ai.cloud.name";
this.cloudRole = "ai.cloud.role";
this.cloudRoleVer = "ai.cloud.roleVer";
this.cloudRoleInstance = "ai.cloud.roleInstance";
this.cloudEnvironment = "ai.cloud.environment";
this.cloudLocation = "ai.cloud.location";
this.cloudDeploymentUnit = "ai.cloud.deploymentUnit";
this.internalNodeName = "ai.internal.nodeName";
this.internalSdkVersion = "ai.internal.sdkVersion";
this.internalAgentVersion = "ai.internal.agentVersion";
this.internalSnippet = "ai.internal.snippet";
this.internalSdkSrc = "ai.internal.sdkSrc";
return _super.call(this) || this;
}
return ContextTagKeys;
}());
}(createClassFromInterface({
applicationVersion: _aiApplication("ver"),
applicationBuild: _aiApplication("build"),
applicationTypeId: _aiApplication("typeId"),
applicationId: _aiApplication("applicationId"),
applicationLayer: _aiApplication("layer"),
deviceId: _aiDevice("id"),
deviceIp: _aiDevice("ip"),
deviceLanguage: _aiDevice("language"),
deviceLocale: _aiDevice("locale"),
deviceModel: _aiDevice("model"),
deviceFriendlyName: _aiDevice("friendlyName"),
deviceNetwork: _aiDevice("network"),
deviceNetworkName: _aiDevice("networkName"),
deviceOEMName: _aiDevice("oemName"),
deviceOS: _aiDevice("os"),
deviceOSVersion: _aiDevice("osVersion"),
deviceRoleInstance: _aiDevice("roleInstance"),
deviceRoleName: _aiDevice("roleName"),
deviceScreenResolution: _aiDevice("screenResolution"),
deviceType: _aiDevice("type"),
deviceMachineName: _aiDevice("machineName"),
deviceVMName: _aiDevice("vmName"),
deviceBrowser: _aiDevice("browser"),
deviceBrowserVersion: _aiDevice("browserVersion"),
locationIp: _aiLocation("ip"),
locationCountry: _aiLocation("country"),
locationProvince: _aiLocation("province"),
locationCity: _aiLocation("city"),
operationId: _aiOperation("id"),
operationName: _aiOperation("name"),
operationParentId: _aiOperation("parentId"),
operationRootId: _aiOperation("rootId"),
operationSyntheticSource: _aiOperation("syntheticSource"),
operationCorrelationVector: _aiOperation("correlationVector"),
sessionId: _aiSession("id"),
sessionIsFirst: _aiSession("isFirst"),
sessionIsNew: _aiSession("isNew"),
userAccountAcquisitionDate: _aiUser("accountAcquisitionDate"),
userAccountId: _aiUser("accountId"),
userAgent: _aiUser("userAgent"),
userId: _aiUser("id"),
userStoreRegion: _aiUser("storeRegion"),
userAuthUserId: _aiUser("authUserId"),
userAnonymousUserAcquisitionDate: _aiUser("anonUserAcquisitionDate"),
userAuthenticatedUserAcquisitionDate: _aiUser("authUserAcquisitionDate"),
cloudName: _aiCloud("name"),
cloudRole: _aiCloud("role"),
cloudRoleVer: _aiCloud("roleVer"),
cloudRoleInstance: _aiCloud("roleInstance"),
cloudEnvironment: _aiCloud("environment"),
cloudLocation: _aiCloud("location"),
cloudDeploymentUnit: _aiCloud("deploymentUnit"),
internalNodeName: _aiInternal("nodeName"),
internalSdkVersion: _aiInternal("sdkVersion"),
internalAgentVersion: _aiInternal("agentVersion"),
internalSnippet: _aiInternal("snippet"),
internalSdkSrc: _aiInternal("sdkSrc")
})));
export { ContextTagKeys };
//# sourceMappingURL=ContextTagKeys.js.map
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// THIS FILE WAS AUTOGENERATED
import { DataPointType } from './DataPointType';

@@ -10,2 +9,5 @@ /**

function DataPoint() {
/**
* Metric type. Single measurement or the aggregated value.
*/
this.kind = DataPointType.Measurement;

@@ -12,0 +14,0 @@ }

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// THIS FILE WAS AUTOGENERATED
/**
* The abstract common base of all domains.
*/
var Domain = /** @class */ (function () {
function Domain() {
}
return Domain;
}());
export { Domain };
//# sourceMappingURL=Domain.js.map

@@ -8,4 +8,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved.

function Envelope() {
/**
* Envelope version. For internal use only. By assigning this the default, it will not be serialized within the payload unless changed to a value other than #1.
*/
this.ver = 1;
/**
* Sampling rate used in application. This telemetry item represents 1 / sampleRate actual telemetry items.
*/
this.sampleRate = 100.0;
/**
* Key/value collection of context properties. See ContextTagKeys for information on available properties.
*/
this.tags = {};

@@ -12,0 +21,0 @@ }

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// THIS FILE WAS AUTOGENERATED
import { Domain } from './Domain';
/**
* Instances of Event represent structured event records that can be grouped and searched by their properties. Event data item also creates a metric of event count by name.
*/
var EventData = /** @class */ (function (_super) {
__extends(EventData, _super);
var EventData = /** @class */ (function () {
function EventData() {
var _this = _super.call(this) || this;
_this.ver = 2;
_this.properties = {};
_this.measurements = {};
return _this;
/**
* Schema version
*/
this.ver = 2;
/**
* Collection of custom properties.
*/
this.properties = {};
/**
* Collection of custom measurements.
*/
this.measurements = {};
}
return EventData;
}(Domain));
}());
export { EventData };
//# sourceMappingURL=EventData.js.map
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
import { Domain } from './Domain';
/**
* An instance of Exception represents a handled or unhandled exception that occurred during execution of the monitored application.
*/
var ExceptionData = /** @class */ (function (_super) {
__extends(ExceptionData, _super);
var ExceptionData = /** @class */ (function () {
function ExceptionData() {
var _this = _super.call(this) || this;
_this.ver = 2;
_this.exceptions = [];
_this.properties = {};
_this.measurements = {};
return _this;
/**
* Schema version
*/
this.ver = 2;
/**
* Exception chain - list of inner exceptions.
*/
this.exceptions = [];
/**
* Collection of custom properties.
*/
this.properties = {};
/**
* Collection of custom measurements.
*/
this.measurements = {};
}
return ExceptionData;
}(Domain));
}());
export { ExceptionData };
//# sourceMappingURL=ExceptionData.js.map

@@ -8,3 +8,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved.

function ExceptionDetails() {
/**
* Indicates if full exception stack is provided in the exception. The stack may be trimmed, such as in the case of a StackOverflow exception.
*/
this.hasFullStack = true;
/**
* List of stack frames. Either stack or parsedStack should have a value.
*/
this.parsedStack = [];

@@ -11,0 +17,0 @@ }

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// THIS FILE WAS AUTOGENERATED
import { Domain } from './Domain';
/**
* Instances of Message represent printf-like trace statements that are text-searched. Log4Net, NLog and other text-based log file entries are translated into intances of this type. The message does not have measurements.
*/
var MessageData = /** @class */ (function (_super) {
__extends(MessageData, _super);
var MessageData = /** @class */ (function () {
function MessageData() {
var _this = _super.call(this) || this;
_this.ver = 2;
_this.properties = {};
_this.measurements = {};
return _this;
/**
* Schema version
*/
this.ver = 2;
/**
* Collection of custom properties.
*/
this.properties = {};
/**
* Collection of custom measurements.
*/
this.measurements = {};
}
return MessageData;
}(Domain));
}());
export { MessageData };
//# sourceMappingURL=MessageData.js.map
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// THIS FILE WAS AUTOGENERATED
import { Domain } from './Domain';
/**
* An instance of the Metric item is a list of measurements (single data points) and/or aggregations.
*/
var MetricData = /** @class */ (function (_super) {
__extends(MetricData, _super);
var MetricData = /** @class */ (function () {
function MetricData() {
var _this = _super.call(this) || this;
_this.ver = 2;
_this.metrics = [];
_this.properties = {};
_this.measurements = {};
return _this;
/**
* Schema version
*/
this.ver = 2;
/**
* List of metrics. Only one metric in the list is currently supported by Application Insights storage. If multiple data points were sent only the first one will be used.
*/
this.metrics = [];
/**
* Collection of custom properties.
*/
this.properties = {};
/**
* Collection of custom measurements.
*/
this.measurements = {};
}
return MetricData;
}(Domain));
}());
export { MetricData };
//# sourceMappingURL=MetricData.js.map

@@ -12,4 +12,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved.

var _this = _super.call(this) || this;
/**
* Schema version
*/
_this.ver = 2;
/**
* Collection of custom properties.
*/
_this.properties = {};
/**
* Collection of custom measurements.
*/
_this.measurements = {};

@@ -16,0 +25,0 @@ return _this;

@@ -12,4 +12,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved.

var _this = _super.call(this) || this;
/**
* Schema version
*/
_this.ver = 2;
/**
* Collection of custom properties.
*/
_this.properties = {};
/**
* Collection of custom measurements.
*/
_this.measurements = {};

@@ -16,0 +25,0 @@ return _this;

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// THIS FILE WAS AUTOGENERATED
import { Domain } from './Domain';
/**
* An instance of Remote Dependency represents an interaction of the monitored component with a remote component/service like SQL or an HTTP endpoint.
*/
var RemoteDependencyData = /** @class */ (function (_super) {
__extends(RemoteDependencyData, _super);
var RemoteDependencyData = /** @class */ (function () {
function RemoteDependencyData() {
var _this = _super.call(this) || this;
_this.ver = 2;
_this.success = true;
_this.properties = {};
_this.measurements = {};
return _this;
/**
* Schema version
*/
this.ver = 2;
/**
* Indication of successful or unsuccessful call.
*/
this.success = true;
/**
* Collection of custom properties.
*/
this.properties = {};
/**
* Collection of custom measurements.
*/
this.measurements = {};
}
return RemoteDependencyData;
}(Domain));
}());
export { RemoteDependencyData };
//# sourceMappingURL=RemoteDependencyData.js.map
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// THIS FILE WAS AUTOGENERATED
import { Domain } from './Domain';
/**
* An instance of Request represents completion of an external request to the application to do work and contains a summary of that request execution and the results.
*/
var RequestData = /** @class */ (function (_super) {
__extends(RequestData, _super);
var RequestData = /** @class */ (function () {
function RequestData() {
var _this = _super.call(this) || this;
_this.ver = 2;
_this.properties = {};
_this.measurements = {};
return _this;
/**
* Schema version
*/
this.ver = 2;
/**
* Collection of custom properties.
*/
this.properties = {};
/**
* Collection of custom measurements.
*/
this.measurements = {};
}
return RequestData;
}(Domain));
}());
export { RequestData };
//# sourceMappingURL=RequestData.js.map
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
import { CoreUtils } from '@microsoft/applicationinsights-core-js';
import { isNullOrUndefined } from '@microsoft/applicationinsights-core-js';
var ConfigurationManager = /** @class */ (function () {

@@ -10,3 +10,3 @@ function ConfigurationManager() {

var configValue;
if (identifier && config.extensionConfig && config.extensionConfig[identifier] && !CoreUtils.isNullOrUndefined(config.extensionConfig[identifier][field])) {
if (identifier && config.extensionConfig && config.extensionConfig[identifier] && !isNullOrUndefined(config.extensionConfig[identifier][field])) {
configValue = config.extensionConfig[identifier][field];

@@ -17,3 +17,3 @@ }

}
return !CoreUtils.isNullOrUndefined(configValue) ? configValue : defaultValue;
return !isNullOrUndefined(configValue) ? configValue : defaultValue;
};

@@ -20,0 +20,0 @@ return ConfigurationManager;

import { ContextTagKeys } from "./Contracts/Generated/ContextTagKeys";
var Extensions = /** @class */ (function () {
function Extensions() {
}
Extensions.UserExt = "user";
Extensions.DeviceExt = "device";
Extensions.TraceExt = "trace";
Extensions.WebExt = "web";
Extensions.AppExt = "app";
Extensions.OSExt = "os";
Extensions.SessionExt = "ses";
Extensions.SDKExt = "sdk";
return Extensions;
}());
export { Extensions };
export var Extensions = {
UserExt: "user",
DeviceExt: "device",
TraceExt: "trace",
WebExt: "web",
AppExt: "app",
OSExt: "os",
SessionExt: "ses",
SDKExt: "sdk"
};
export var CtxTagKeys = new ContextTagKeys();
//# sourceMappingURL=PartAExtensions.js.map
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
var RequestHeaders = /** @class */ (function () {
function RequestHeaders() {
}
/**
* Request-Context header
*/
RequestHeaders.requestContextHeader = "Request-Context";
/**
* Target instrumentation header that is added to the response and retrieved by the
* calling application when processing incoming responses.
*/
RequestHeaders.requestContextTargetKey = "appId";
/**
* Request-Context appId format
*/
RequestHeaders.requestContextAppIdFormat = "appId=cid-v1:";
/**
* Request-Id header
*/
RequestHeaders.requestIdHeader = "Request-Id";
/**
* W3C distributed tracing protocol header
*/
RequestHeaders.traceParentHeader = "traceparent";
/**
* Sdk-Context header
* If this header passed with appId in content then appId will be returned back by the backend.
*/
RequestHeaders.sdkContextHeader = "Sdk-Context";
/**
* String to pass in header for requesting appId back from the backend.
*/
RequestHeaders.sdkContextHeaderAppIdRequest = "appId";
RequestHeaders.requestContextHeaderLowerCase = "request-context";
return RequestHeaders;
}());
export { RequestHeaders };
export var RequestHeaders = {
requestContextHeader: "Request-Context",
requestContextTargetKey: "appId",
requestContextAppIdFormat: "appId=cid-v1:",
requestIdHeader: "Request-Id",
traceParentHeader: "traceparent",
traceStateHeader: "tracestate",
sdkContextHeader: "Sdk-Context",
sdkContextHeaderAppIdRequest: "appId",
requestContextHeaderLowerCase: "request-context"
};
//# sourceMappingURL=RequestResponseHeaders.js.map
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
import { LoggingSeverity, _InternalMessageId, CoreUtils, hasJSON, getJSON, objForEachKey } from '@microsoft/applicationinsights-core-js';
import { LoggingSeverity, _InternalMessageId, hasJSON, getJSON, objForEachKey, isObject, isString } from '@microsoft/applicationinsights-core-js';
var DataSanitizer = /** @class */ (function () {

@@ -75,3 +75,3 @@ function DataSanitizer() {

objForEachKey(properties, function (prop, value) {
if (CoreUtils.isObject(value) && hasJSON()) {
if (isObject(value) && hasJSON()) {
// Stringify any part C properties

@@ -126,3 +126,3 @@ try {

DataSanitizer.trim = function (str) {
if (!CoreUtils.isString(str)) {
if (!isString(str)) {
return str;

@@ -129,0 +129,0 @@ }

@@ -6,4 +6,4 @@ // Copyright (c) Microsoft Corporation. All rights reserved.

import { FieldType } from '../../Enums';
import { Util } from '../../Util';
import { CoreUtils } from '@microsoft/applicationinsights-core-js';
import { toISOString } from '@microsoft/applicationinsights-core-js';
import { strNotSpecified } from '../../Constants';
var Envelope = /** @class */ (function (_super) {

@@ -16,5 +16,5 @@ __extends(Envelope, _super);

var _this = _super.call(this) || this;
_this.name = DataSanitizer.sanitizeString(logger, name) || Util.NotSpecified;
_this.name = DataSanitizer.sanitizeString(logger, name) || strNotSpecified;
_this.data = data;
_this.time = CoreUtils.toISOString(new Date());
_this.time = toISOString(new Date());
_this.aiDataContract = {

@@ -21,0 +21,0 @@ time: FieldType.Required,

@@ -6,3 +6,3 @@ // Copyright (c) Microsoft Corporation. All rights reserved.

import { FieldType } from '../Enums';
import { Util } from '../Util';
import { strNotSpecified } from '../Constants';
var Event = /** @class */ (function (_super) {

@@ -21,3 +21,3 @@ __extends(Event, _super);

};
_this.name = DataSanitizer.sanitizeString(logger, name) || Util.NotSpecified;
_this.name = DataSanitizer.sanitizeString(logger, name) || strNotSpecified;
_this.properties = DataSanitizer.sanitizeProperties(logger, properties);

@@ -24,0 +24,0 @@ _this.measurements = DataSanitizer.sanitizeMeasurements(logger, measurements);

@@ -8,4 +8,4 @@ // Copyright (c) Microsoft Corporation. All rights reserved.

import { FieldType } from '../Enums';
import { Util } from '../Util';
import { CoreUtils } from '@microsoft/applicationinsights-core-js';
import { isNullOrUndefined, arrMap, isString, strTrim, isArray, isError } from '@microsoft/applicationinsights-core-js';
import { strNotSpecified } from '../Constants';
var strError = "error";

@@ -76,3 +76,3 @@ function _isExceptionDetailsInternal(value) {

_this.ver = 2; // TODO: handle the CS"4.0" ==> breeze 2 conversion in a better way
if (!CoreUtils.isNullOrUndefined(exception.isManual)) {
if (!isNullOrUndefined(exception.isManual)) {
_this.isManual = exception.isManual;

@@ -85,3 +85,3 @@ }

var exceptions = exception.exceptions
&& CoreUtils.arrMap(exception.exceptions, function (ex) { return _ExceptionDetails.CreateFromInterface(logger, ex); });
&& arrMap(exception.exceptions, function (ex) { return _ExceptionDetails.CreateFromInterface(logger, ex); });
var exceptionData = new Exception(logger, __assign({}, exception, { exceptions: exceptions }), properties, measurements);

@@ -93,3 +93,3 @@ return exceptionData;

var exceptionDetailsInterface = exceptions instanceof Array
&& CoreUtils.arrMap(exceptions, function (exception) { return exception.toInterface(); })
&& arrMap(exceptions, function (exception) { return exception.toInterface(); })
|| undefined;

@@ -142,11 +142,11 @@ return {

var error = exception;
if (!Util.isError(error)) {
if (!isError(error)) {
error = error[strError] || error.evt || error;
}
_this.typeName = DataSanitizer.sanitizeString(logger, _getErrorType(error)) || Util.NotSpecified;
_this.message = DataSanitizer.sanitizeMessage(logger, exception.message) || Util.NotSpecified;
_this.typeName = DataSanitizer.sanitizeString(logger, _getErrorType(error)) || strNotSpecified;
_this.message = DataSanitizer.sanitizeMessage(logger, exception.message) || strNotSpecified;
var stack = exception.stack;
_this.parsedStack = _ExceptionDetails.parseStack(stack);
_this.stack = DataSanitizer.sanitizeException(logger, stack);
_this.hasFullStack = Util.isArray(_this.parsedStack) && _this.parsedStack.length > 0;
_this.hasFullStack = isArray(_this.parsedStack) && _this.parsedStack.length > 0;
}

@@ -164,3 +164,3 @@ else {

var parsedStack = this.parsedStack instanceof Array
&& CoreUtils.arrMap(this.parsedStack, function (frame) { return frame.toInterface(); });
&& arrMap(this.parsedStack, function (frame) { return frame.toInterface(); });
var exceptionDetailsInterface = {

@@ -179,3 +179,3 @@ id: this.id,

var parsedStack = (exception.parsedStack instanceof Array
&& CoreUtils.arrMap(exception.parsedStack, function (frame) { return _StackFrame.CreateFromInterface(frame); }))
&& arrMap(exception.parsedStack, function (frame) { return _StackFrame.CreateFromInterface(frame); }))
|| exception.parsedStack;

@@ -187,3 +187,3 @@ var exceptionDetails = new _ExceptionDetails(logger, __assign({}, exception, { parsedStack: parsedStack }));

var parsedStack;
if (CoreUtils.isString(stack)) {
if (isString(stack)) {
var frames_1 = stack.split('\n');

@@ -246,3 +246,3 @@ parsedStack = [];

};
// Not converting this to CoreUtils.isString() as typescript uses this logic to "understand" the different
// Not converting this to isString() as typescript uses this logic to "understand" the different
// types for the 2 different code paths

@@ -253,3 +253,3 @@ if (typeof sourceFrame === "string") {

_this.method = "<no_method>";
_this.assembly = Util.trim(frame);
_this.assembly = strTrim(frame);
_this.fileName = "";

@@ -259,4 +259,4 @@ _this.line = 0;

if (matches && matches.length >= 5) {
_this.method = Util.trim(matches[2]) || _this.method;
_this.fileName = Util.trim(matches[4]);
_this.method = strTrim(matches[2]) || _this.method;
_this.fileName = strTrim(matches[4]);
_this.line = parseInt(matches[5]) || 0;

@@ -263,0 +263,0 @@ }

@@ -7,3 +7,3 @@ // Copyright (c) Microsoft Corporation. All rights reserved.

import { DataPoint } from './Common/DataPoint';
import { Util } from '../Util';
import { strNotSpecified } from '../Constants';
var Metric = /** @class */ (function (_super) {

@@ -25,3 +25,3 @@ __extends(Metric, _super);

dataPoint.min = isNaN(min) || min === null ? undefined : min;
dataPoint.name = DataSanitizer.sanitizeString(logger, name) || Util.NotSpecified;
dataPoint.name = DataSanitizer.sanitizeString(logger, name) || strNotSpecified;
dataPoint.value = value;

@@ -28,0 +28,0 @@ _this.metrics = [dataPoint];

@@ -6,3 +6,4 @@ // Copyright (c) Microsoft Corporation. All rights reserved.

import { FieldType } from '../Enums';
import { Util } from '../Util';
import { msToTimeSpan } from '../HelperFuncs';
import { strNotSpecified } from '../Constants';
var PageView = /** @class */ (function (_super) {

@@ -26,5 +27,5 @@ __extends(PageView, _super);

_this.url = DataSanitizer.sanitizeUrl(logger, url);
_this.name = DataSanitizer.sanitizeString(logger, name) || Util.NotSpecified;
_this.name = DataSanitizer.sanitizeString(logger, name) || strNotSpecified;
if (!isNaN(durationMs)) {
_this.duration = Util.msToTimeSpan(durationMs);
_this.duration = msToTimeSpan(durationMs);
}

@@ -31,0 +32,0 @@ _this.properties = DataSanitizer.sanitizeProperties(logger, properties);

@@ -6,3 +6,3 @@ // Copyright (c) Microsoft Corporation. All rights reserved.

import { DataSanitizer } from './Common/DataSanitizer';
import { Util } from '../Util';
import { strNotSpecified } from '../Constants';
var PageViewPerformance = /** @class */ (function (_super) {

@@ -29,3 +29,3 @@ __extends(PageViewPerformance, _super);

_this.url = DataSanitizer.sanitizeUrl(logger, url);
_this.name = DataSanitizer.sanitizeString(logger, name) || Util.NotSpecified;
_this.name = DataSanitizer.sanitizeString(logger, name) || strNotSpecified;
_this.properties = DataSanitizer.sanitizeProperties(logger, properties);

@@ -32,0 +32,0 @@ _this.measurements = DataSanitizer.sanitizeMeasurements(logger, measurements);

@@ -5,4 +5,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved.

import { FieldType } from '../Enums';
import { Util, AjaxHelper } from '../Util';
import { AjaxHelperParseDependencyPath } from '../Util';
import { RemoteDependencyData as GeneratedRemoteDependencyData } from '../Interfaces/Contracts/Generated/RemoteDependencyData';
import { msToTimeSpan } from '../HelperFuncs';
var RemoteDependencyData = /** @class */ (function (_super) {

@@ -40,7 +41,7 @@ __extends(RemoteDependencyData, _super);

_this.id = id;
_this.duration = Util.msToTimeSpan(value);
_this.duration = msToTimeSpan(value);
_this.success = success;
_this.resultCode = resultCode + "";
_this.type = DataSanitizer.sanitizeString(logger, requestAPI);
var dependencyFields = AjaxHelper.ParseDependencyPath(logger, absoluteUrl, method, commandName);
var dependencyFields = AjaxHelperParseDependencyPath(logger, absoluteUrl, method, commandName);
_this.data = DataSanitizer.sanitizeUrl(logger, commandName) || dependencyFields.data; // get a value from hosturl if commandName not available

@@ -47,0 +48,0 @@ _this.target = DataSanitizer.sanitizeString(logger, dependencyFields.target);

@@ -6,3 +6,3 @@ // Copyright (c) Microsoft Corporation. All rights reserved.

import { FieldType } from '../Enums';
import { Util } from '../Util';
import { strNotSpecified } from '../Constants';
var Trace = /** @class */ (function (_super) {

@@ -21,3 +21,3 @@ __extends(Trace, _super);

};
message = message || Util.NotSpecified;
message = message || strNotSpecified;
_this.message = DataSanitizer.sanitizeMessage(logger, message);

@@ -24,0 +24,0 @@ _this.properties = DataSanitizer.sanitizeProperties(logger, properties);

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
import { Util } from "./Util";
import { DataSanitizer } from "./Telemetry/Common/DataSanitizer";
import { CoreUtils, objForEachKey } from "@microsoft/applicationinsights-core-js";
import { objForEachKey, isNullOrUndefined, toISOString } from "@microsoft/applicationinsights-core-js";
import { strNotSpecified } from "./Constants";
var TelemetryItemCreator = /** @class */ (function () {

@@ -19,6 +19,6 @@ function TelemetryItemCreator() {

TelemetryItemCreator.create = function (item, baseType, envelopeName, logger, customProperties, systemProperties) {
envelopeName = DataSanitizer.sanitizeString(logger, envelopeName) || Util.NotSpecified;
if (CoreUtils.isNullOrUndefined(item) ||
CoreUtils.isNullOrUndefined(baseType) ||
CoreUtils.isNullOrUndefined(envelopeName)) {
envelopeName = DataSanitizer.sanitizeString(logger, envelopeName) || strNotSpecified;
if (isNullOrUndefined(item) ||
isNullOrUndefined(baseType) ||
isNullOrUndefined(envelopeName)) {
throw Error("Input doesn't contain all required fields");

@@ -28,3 +28,3 @@ }

name: envelopeName,
time: CoreUtils.toISOString(new Date()),
time: toISOString(new Date()),
iKey: "",

@@ -38,3 +38,3 @@ ext: systemProperties ? systemProperties : {},

// Part C
if (!CoreUtils.isNullOrUndefined(customProperties)) {
if (!isNullOrUndefined(customProperties)) {
objForEachKey(customProperties, function (prop, value) {

@@ -41,0 +41,0 @@ telemetryItem.data[prop] = value;

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
import { StorageType } from "./Enums";
import { CoreUtils, EventHelper, _InternalMessageId, LoggingSeverity, getGlobal, getGlobalInst, getWindow, getDocument, getNavigator, getPerformance, getLocation, hasJSON, getJSON, strPrototype, objForEachKey } from "@microsoft/applicationinsights-core-js";
import { getPerformance, getExceptionName as coreGetExceptionName, dumpObj, isNullOrUndefined, strTrim, random32, isArray, isError, isDate, newId, generateW3CId, toISOString, arrForEach, getIEVersion, attachEvent, dateNow, uaDisallowsSameSiteNone, disableCookies as coreDisableCookies, canUseCookies as coreCanUseCookies, getCookie as coreGetCookie, setCookie as coreSetCookie, deleteCookie as coreDeleteCookie } from "@microsoft/applicationinsights-core-js";
import { RequestHeaders } from "./RequestResponseHeaders";
import { DataSanitizer } from "./Telemetry/Common/DataSanitizer";
var _navigator = getNavigator();
var _isString = CoreUtils.isString;
var _uaDisallowsSameSiteNone = null;
function _endsWith(value, search) {
var len = value.length;
var start = len - search.length;
return value.substring(start >= 0 ? start : 0, len) === search;
import { createDomEvent } from './DomHelperFuncs';
import { stringToBoolOrDefault, msToTimeSpan, isBeaconApiSupported, isCrossOriginError, getExtensionByName } from "./HelperFuncs";
import { strNotSpecified } from "./Constants";
import { utlCanUseLocalStorage, utlCanUseSessionStorage, utlDisableStorage, utlGetSessionStorage, utlGetSessionStorageKeys, utlGetLocalStorage, utlRemoveSessionStorage, utlRemoveStorage, utlSetSessionStorage, utlSetLocalStorage } from "./StorageHelperFuncs";
import { urlGetAbsoluteUrl, urlGetCompleteUrl, urlGetPathName, urlParseFullHost, urlParseHost, urlParseUrl } from "./UrlHelperFuncs";
// listing only non-geo specific locations
var _internalEndpoints = [
"https://dc.services.visualstudio.com/v2/track",
"https://breeze.aimon.applicationinsights.io/v2/track",
"https://dc-int.services.visualstudio.com/v2/track"
];
export function isInternalApplicationInsightsEndpoint(endpointUrl) {
return _internalEndpoints.indexOf(endpointUrl.toLowerCase()) !== -1;
}
var Util = /** @class */ (function () {
function Util() {
}
Util.createDomEvent = function (eventName) {
var event = null;
if (CoreUtils.isFunction(Event)) {
event = new Event(eventName);
}
else {
var doc = getDocument();
if (doc && doc.createEvent) {
event = doc.createEvent("Event");
event.initEvent(eventName, true, true);
}
}
return event;
};
/*
* Force the SDK not to use local and session storage
*/
Util.disableStorage = function () {
Util._canUseLocalStorage = false;
Util._canUseSessionStorage = false;
};
export var Util = {
NotSpecified: strNotSpecified,
createDomEvent: createDomEvent,
disableStorage: utlDisableStorage,
isInternalApplicationInsightsEndpoint: isInternalApplicationInsightsEndpoint,
canUseLocalStorage: utlCanUseLocalStorage,
getStorage: utlGetLocalStorage,
setStorage: utlSetLocalStorage,
removeStorage: utlRemoveStorage,
canUseSessionStorage: utlCanUseSessionStorage,
getSessionStorageKeys: utlGetSessionStorageKeys,
getSessionStorage: utlGetSessionStorage,
setSessionStorage: utlSetSessionStorage,
removeSessionStorage: utlRemoveSessionStorage,
disableCookies: coreDisableCookies,
canUseCookies: coreCanUseCookies,
disallowsSameSiteNone: uaDisallowsSameSiteNone,
setCookie: coreSetCookie,
stringToBoolOrDefault: stringToBoolOrDefault,
getCookie: coreGetCookie,
deleteCookie: coreDeleteCookie,
trim: strTrim,
newId: newId,
random32: function () {
return random32(true);
},
generateW3CId: generateW3CId,
isArray: isArray,
isError: isError,
isDate: isDate,
toISOStringForIE8: toISOString,
getIEVersion: getIEVersion,
msToTimeSpan: msToTimeSpan,
isCrossOriginError: isCrossOriginError,
dump: dumpObj,
getExceptionName: coreGetExceptionName,
addEventHandler: attachEvent,
IsBeaconApiSupported: isBeaconApiSupported,
getExtension: getExtensionByName
};
;
export var UrlHelper = {
parseUrl: urlParseUrl,
getAbsoluteUrl: urlGetAbsoluteUrl,
getPathName: urlGetPathName,
getCompleteUrl: urlGetCompleteUrl,
parseHost: urlParseHost,
parseFullHost: urlParseFullHost
};
export var CorrelationIdHelper = {
correlationIdPrefix: "cid-v1:",
/**
* Gets the localStorage object if available
* @return {Storage} - Returns the storage object if available else returns null
*/
Util._getLocalStorageObject = function () {
if (Util.canUseLocalStorage()) {
return Util._getVerifiedStorageObject(StorageType.LocalStorage);
}
return null;
};
/**
* Tests storage object (localStorage or sessionStorage) to verify that it is usable
* More details here: https://mathiasbynens.be/notes/localstorage-pattern
* @param storageType Type of storage
* @return {Storage} Returns storage object verified that it is usable
*/
Util._getVerifiedStorageObject = function (storageType) {
var storage = null;
var fail;
var uid;
try {
if (CoreUtils.isNullOrUndefined(getGlobal())) {
return null;
}
uid = new Date;
storage = storageType === StorageType.LocalStorage ? getGlobalInst("localStorage") : getGlobalInst("sessionStorage");
storage.setItem(uid.toString(), uid.toString());
fail = storage.getItem(uid.toString()) !== uid.toString();
storage.removeItem(uid.toString());
if (fail) {
storage = null;
}
}
catch (exception) {
storage = null;
}
return storage;
};
/**
* Checks if endpoint URL is application insights internal injestion service URL.
*
* @param endpointUrl Endpoint URL to check.
* @returns {boolean} True if if endpoint URL is application insights internal injestion service URL.
*/
Util.isInternalApplicationInsightsEndpoint = function (endpointUrl) {
return Util._internalEndpoints.indexOf(endpointUrl.toLowerCase()) !== -1;
};
/**
* Check if the browser supports local storage.
*
* @returns {boolean} True if local storage is supported.
*/
Util.canUseLocalStorage = function () {
if (Util._canUseLocalStorage === undefined) {
Util._canUseLocalStorage = !!Util._getVerifiedStorageObject(StorageType.LocalStorage);
}
return Util._canUseLocalStorage;
};
/**
* Get an object from the browser's local storage
*
* @param {string} name - the name of the object to get from storage
* @returns {string} The contents of the storage object with the given name. Null if storage is not supported.
*/
Util.getStorage = function (logger, name) {
var storage = Util._getLocalStorageObject();
if (storage !== null) {
try {
return storage.getItem(name);
}
catch (e) {
Util._canUseLocalStorage = false;
logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.BrowserCannotReadLocalStorage, "Browser failed read of local storage. " + Util.getExceptionName(e), { exception: Util.dump(e) });
}
}
return null;
};
/**
* Set the contents of an object in the browser's local storage
*
* @param {string} name - the name of the object to set in storage
* @param {string} data - the contents of the object to set in storage
* @returns {boolean} True if the storage object could be written.
*/
Util.setStorage = function (logger, name, data) {
var storage = Util._getLocalStorageObject();
if (storage !== null) {
try {
storage.setItem(name, data);
return true;
}
catch (e) {
Util._canUseLocalStorage = false;
logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.BrowserCannotWriteLocalStorage, "Browser failed write to local storage. " + Util.getExceptionName(e), { exception: Util.dump(e) });
}
}
return false;
};
/**
* Remove an object from the browser's local storage
*
* @param {string} name - the name of the object to remove from storage
* @returns {boolean} True if the storage object could be removed.
*/
Util.removeStorage = function (logger, name) {
var storage = Util._getLocalStorageObject();
if (storage !== null) {
try {
storage.removeItem(name);
return true;
}
catch (e) {
Util._canUseLocalStorage = false;
logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.BrowserFailedRemovalFromLocalStorage, "Browser failed removal of local storage item. " + Util.getExceptionName(e), { exception: Util.dump(e) });
}
}
return false;
};
/**
* Gets the sessionStorage object if available
* @return {Storage} - Returns the storage object if available else returns null
*/
Util._getSessionStorageObject = function () {
if (Util.canUseSessionStorage()) {
return Util._getVerifiedStorageObject(StorageType.SessionStorage);
}
return null;
};
/**
* Check if the browser supports session storage.
*
* @returns {boolean} True if session storage is supported.
*/
Util.canUseSessionStorage = function () {
if (Util._canUseSessionStorage === undefined) {
Util._canUseSessionStorage = !!Util._getVerifiedStorageObject(StorageType.SessionStorage);
}
return Util._canUseSessionStorage;
};
/**
* Gets the list of session storage keys
*
* @returns {string[]} List of session storage keys
*/
Util.getSessionStorageKeys = function () {
var keys = [];
if (Util.canUseSessionStorage()) {
objForEachKey(getGlobalInst("sessionStorage"), function (key) {
keys.push(key);
});
}
return keys;
};
/**
* Get an object from the browser's session storage
*
* @param {string} name - the name of the object to get from storage
* @returns {string} The contents of the storage object with the given name. Null if storage is not supported.
*/
Util.getSessionStorage = function (logger, name) {
var storage = Util._getSessionStorageObject();
if (storage !== null) {
try {
return storage.getItem(name);
}
catch (e) {
Util._canUseSessionStorage = false;
logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.BrowserCannotReadSessionStorage, "Browser failed read of session storage. " + Util.getExceptionName(e), { exception: Util.dump(e) });
}
}
return null;
};
/**
* Set the contents of an object in the browser's session storage
*
* @param {string} name - the name of the object to set in storage
* @param {string} data - the contents of the object to set in storage
* @returns {boolean} True if the storage object could be written.
*/
Util.setSessionStorage = function (logger, name, data) {
var storage = Util._getSessionStorageObject();
if (storage !== null) {
try {
storage.setItem(name, data);
return true;
}
catch (e) {
Util._canUseSessionStorage = false;
logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.BrowserCannotWriteSessionStorage, "Browser failed write to session storage. " + Util.getExceptionName(e), { exception: Util.dump(e) });
}
}
return false;
};
/**
* Remove an object from the browser's session storage
*
* @param {string} name - the name of the object to remove from storage
* @returns {boolean} True if the storage object could be removed.
*/
Util.removeSessionStorage = function (logger, name) {
var storage = Util._getSessionStorageObject();
if (storage !== null) {
try {
storage.removeItem(name);
return true;
}
catch (e) {
Util._canUseSessionStorage = false;
logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.BrowserFailedRemovalFromSessionStorage, "Browser failed removal of session storage item. " + Util.getExceptionName(e), { exception: Util.dump(e) });
}
}
return false;
};
/*
* Force the SDK not to store and read any data from cookies
*/
Util.disableCookies = function () {
CoreUtils.disableCookies();
};
/*
* helper method to tell if document.cookie object is available
*/
Util.canUseCookies = function (logger) {
if (CoreUtils._canUseCookies === undefined) {
CoreUtils._canUseCookies = false;
try {
CoreUtils._canUseCookies = Util.document.cookie !== undefined;
}
catch (e) {
logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.CannotAccessCookie, "Cannot access document.cookie - " + Util.getExceptionName(e), { exception: Util.dump(e) });
}
;
}
return CoreUtils._canUseCookies;
};
Util.disallowsSameSiteNone = function (userAgent) {
if (!_isString(userAgent)) {
return false;
}
// Cover all iOS based browsers here. This includes:
// - Safari on iOS 12 for iPhone, iPod Touch, iPad
// - WkWebview on iOS 12 for iPhone, iPod Touch, iPad
// - Chrome on iOS 12 for iPhone, iPod Touch, iPad
// All of which are broken by SameSite=None, because they use the iOS networking stack
if (userAgent.indexOf("CPU iPhone OS 12") !== -1 || userAgent.indexOf("iPad; CPU OS 12") !== -1) {
return true;
}
// Cover Mac OS X based browsers that use the Mac OS networking stack. This includes:
// - Safari on Mac OS X
// This does not include:
// - Internal browser on Mac OS X
// - Chrome on Mac OS X
// - Chromium on Mac OS X
// Because they do not use the Mac OS networking stack.
if (userAgent.indexOf("Macintosh; Intel Mac OS X 10_14") !== -1 && userAgent.indexOf("Version/") !== -1 && userAgent.indexOf("Safari") !== -1) {
return true;
}
// Cover Mac OS X internal browsers that use the Mac OS networking stack. This includes:
// - Internal browser on Mac OS X
// This does not include:
// - Safari on Mac OS X
// - Chrome on Mac OS X
// - Chromium on Mac OS X
// Because they do not use the Mac OS networking stack.
if (userAgent.indexOf("Macintosh; Intel Mac OS X 10_14") !== -1 && _endsWith(userAgent, "AppleWebKit/605.1.15 (KHTML, like Gecko)")) {
return true;
}
// Cover Chrome 50-69, because some versions are broken by SameSite=None, and none in this range require it.
// Note: this covers some pre-Chromium Edge versions, but pre-Chromim Edge does not require SameSite=None, so this is fine.
// Note: this regex applies to Windows, Mac OS X, and Linux, deliberately.
if (userAgent.indexOf("Chrome/5") !== -1 || userAgent.indexOf("Chrome/6") !== -1) {
return true;
}
// Unreal Engine runs Chromium 59, but does not advertise as Chrome until 4.23. Treat versions of Unreal
// that don't specify their Chrome version as lacking support for SameSite=None.
if (userAgent.indexOf("UnrealEngine") !== -1 && userAgent.indexOf("Chrome") === -1) {
return true;
}
// UCBrowser < 12.13.2 ignores Set-Cookie headers with SameSite=None
// NB: this rule isn't complete - you need regex to make a complete rule.
// See: https://www.chromium.org/updates/same-site/incompatible-clients
if (userAgent.indexOf("UCBrowser/12") !== -1 || userAgent.indexOf("UCBrowser/11") !== -1) {
return true;
}
return false;
};
/**
* helper method to set userId and sessionId cookie
*/
Util.setCookie = function (logger, name, value, domain) {
if (Util.canUseCookies(logger)) {
var domainAttrib = "";
var secureAttrib = "";
if (domain) {
domainAttrib = ";domain=" + domain;
}
var location_1 = getLocation();
if (location_1 && location_1.protocol === "https:") {
secureAttrib = ";secure";
if (_uaDisallowsSameSiteNone === null) {
_uaDisallowsSameSiteNone = Util.disallowsSameSiteNone((getNavigator() || {}).userAgent);
}
if (!_uaDisallowsSameSiteNone) {
value = value + ";SameSite=None"; // SameSite can only be set on secure pages
}
}
Util.document.cookie = name + "=" + value + domainAttrib + ";path=/" + secureAttrib;
}
};
Util.stringToBoolOrDefault = function (str, defaultValue) {
if (defaultValue === void 0) { defaultValue = false; }
if (str === undefined || str === null) {
return defaultValue;
}
return str.toString().toLowerCase() === "true";
};
/**
* helper method to access userId and sessionId cookie
*/
Util.getCookie = function (logger, name) {
if (!Util.canUseCookies(logger)) {
return;
}
var value = "";
if (name && name.length) {
var cookieName = name + "=";
var cookies = Util.document.cookie.split(";");
for (var i = 0; i < cookies.length; i++) {
var cookie = cookies[i];
cookie = Util.trim(cookie);
if (cookie && cookie.indexOf(cookieName) === 0) {
value = cookie.substring(cookieName.length, cookies[i].length);
break;
}
}
}
return value;
};
/**
* Deletes a cookie by setting it's expiration time in the past.
* @param name - The name of the cookie to delete.
*/
Util.deleteCookie = function (logger, name) {
if (Util.canUseCookies(logger)) {
// Setting the expiration date in the past immediately removes the cookie
Util.document.cookie = name + "=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;";
}
};
/**
* generate a random 32bit number (-0x80000000..0x7FFFFFFF).
*/
Util.random32 = function () {
return CoreUtils.random32(true);
};
/**
* Gets IE version returning the document emulation mode if we are running on IE, or null otherwise
*/
Util.getIEVersion = function (userAgentStr) {
if (userAgentStr === void 0) { userAgentStr = null; }
var myNav = userAgentStr ? userAgentStr.toLowerCase() : (_navigator ? (_navigator.userAgent || "").toLowerCase() : "");
if (myNav.indexOf("msie") !== -1) {
return parseInt(myNav.split("msie")[1]);
}
else if (myNav.indexOf("trident/")) {
var tridentVer = parseInt(myNav.split("trident/")[1]);
if (tridentVer) {
return tridentVer + 4;
}
}
return null;
};
/**
* Convert ms to c# time span format
*/
Util.msToTimeSpan = function (totalms) {
if (isNaN(totalms) || totalms < 0) {
totalms = 0;
}
totalms = Math.round(totalms);
var ms = "" + totalms % 1000;
var sec = "" + Math.floor(totalms / 1000) % 60;
var min = "" + Math.floor(totalms / (1000 * 60)) % 60;
var hour = "" + Math.floor(totalms / (1000 * 60 * 60)) % 24;
var days = Math.floor(totalms / (1000 * 60 * 60 * 24));
ms = ms.length === 1 ? "00" + ms : ms.length === 2 ? "0" + ms : ms;
sec = sec.length < 2 ? "0" + sec : sec;
min = min.length < 2 ? "0" + min : min;
hour = hour.length < 2 ? "0" + hour : hour;
return (days > 0 ? days + "." : "") + hour + ":" + min + ":" + sec + "." + ms;
};
/**
* Checks if error has no meaningful data inside. Ususally such errors are received by window.onerror when error
* happens in a script from other domain (cross origin, CORS).
*/
Util.isCrossOriginError = function (message, url, lineNumber, columnNumber, error) {
return (message === "Script error." || message === "Script error") && !error;
};
/**
* Returns string representation of an object suitable for diagnostics logging.
*/
Util.dump = function (object) {
var objectTypeDump = Object[strPrototype].toString.call(object);
var propertyValueDump = "";
if (objectTypeDump === "[object Error]") {
propertyValueDump = "{ stack: '" + object.stack + "', message: '" + object.message + "', name: '" + object.name + "'";
}
else if (hasJSON()) {
propertyValueDump = getJSON().stringify(object);
}
return objectTypeDump + propertyValueDump;
};
/**
* Returns the name of object if it's an Error. Otherwise, returns empty string.
*/
Util.getExceptionName = function (object) {
var objectTypeDump = Object[strPrototype].toString.call(object);
if (objectTypeDump === "[object Error]") {
return object.name;
}
return "";
};
/**
* Adds an event handler for the specified event to the window
* @param eventName {string} - The name of the event
* @param callback {any} - The callback function that needs to be executed for the given event
* @return {boolean} - true if the handler was successfully added
*/
Util.addEventHandler = function (eventName, callback) {
return EventHelper.Attach(getWindow(), eventName, callback);
};
/**
* Tells if a browser supports a Beacon API
*/
Util.IsBeaconApiSupported = function () {
return ('sendBeacon' in _navigator && _navigator.sendBeacon);
};
Util.getExtension = function (extensions, identifier) {
var extension = null;
var extIx = 0;
while (!extension && extIx < extensions.length) {
if (extensions[extIx] && extensions[extIx].identifier === identifier) {
extension = extensions[extIx];
}
extIx++;
}
return extension;
};
Util.document = getDocument() || {};
Util._canUseLocalStorage = undefined;
Util._canUseSessionStorage = undefined;
// listing only non-geo specific locations
Util._internalEndpoints = [
"https://dc.services.visualstudio.com/v2/track",
"https://breeze.aimon.applicationinsights.io/v2/track",
"https://dc-int.services.visualstudio.com/v2/track"
];
Util.NotSpecified = "not_specified";
/**
* helper method to trim strings (IE8 does not implement String.prototype.trim)
*/
Util.trim = CoreUtils.strTrim;
/**
* generate random id string
*/
Util.newId = CoreUtils.newId;
/**
* generate W3C trace id
*/
Util.generateW3CId = CoreUtils.generateW3CId;
/**
* Check if an object is of type Array
*/
Util.isArray = CoreUtils.isArray;
/**
* Check if an object is of type Error
*/
Util.isError = CoreUtils.isError;
/**
* Check if an object is of type Date
*/
Util.isDate = CoreUtils.isDate;
// Keeping this name for backward compatibility (for now)
Util.toISOStringForIE8 = CoreUtils.toISOString;
return Util;
}());
export { Util };
var UrlHelper = /** @class */ (function () {
function UrlHelper() {
}
UrlHelper.parseUrl = function (url) {
var anchorIdx = UrlHelper._htmlAnchorIdx;
var anchorCache = UrlHelper._htmlAnchorElement;
var tempAnchor = anchorCache[anchorIdx];
if (!UrlHelper.document.createElement) {
// Always create the temp instance if createElement is not available
tempAnchor = { host: UrlHelper.parseHost(url, true) };
}
else if (!anchorCache[anchorIdx]) {
// Create and cache the unattached anchor instance
tempAnchor = anchorCache[anchorIdx] = UrlHelper.document.createElement('a');
}
tempAnchor.href = url;
// Move the cache index forward
anchorIdx++;
if (anchorIdx >= anchorCache.length) {
anchorIdx = 0;
}
UrlHelper._htmlAnchorIdx = anchorIdx;
return tempAnchor;
};
UrlHelper.getAbsoluteUrl = function (url) {
var result;
var a = UrlHelper.parseUrl(url);
if (a) {
result = a.href;
}
return result;
};
UrlHelper.getPathName = function (url) {
var result;
var a = UrlHelper.parseUrl(url);
if (a) {
result = a.pathname;
}
return result;
};
UrlHelper.getCompleteUrl = function (method, absoluteUrl) {
if (method) {
return method.toUpperCase() + " " + absoluteUrl;
}
else {
return absoluteUrl;
}
};
// Fallback method to grab host from url if document.createElement method is not available
UrlHelper.parseHost = function (url, inclPort) {
var fullHost = UrlHelper.parseFullHost(url, inclPort);
if (fullHost) {
var match = fullHost.match(/(www[0-9]?\.)?(.[^/:]+)(\:[\d]+)?/i);
if (match != null && match.length > 3 && _isString(match[2]) && match[2].length > 0) {
return match[2] + (match[3] || "");
}
}
return fullHost;
};
/**
* Get the full host from the url, optionally including the port
*/
UrlHelper.parseFullHost = function (url, inclPort) {
var result = null;
if (url) {
var match = url.match(/(\w*):\/\/(.[^/:]+)(\:[\d]+)?/i);
if (match != null && match.length > 2 && _isString(match[2]) && match[2].length > 0) {
result = match[2] || "";
if (inclPort && match.length > 2) {
var protocol = (match[1] || "").toLowerCase();
var port = match[3] || "";
// IE includes the standard port so pass it off if it's the same as the protocol
if (protocol === "http" && port === ":80") {
port = "";
}
else if (protocol === "https" && port === ":443") {
port = "";
}
result += port;
}
}
}
return result;
};
UrlHelper.document = getDocument() || {};
UrlHelper._htmlAnchorIdx = 0;
// Use an array of temporary values as it's possible for multiple calls to parseUrl() will be called with different URLs
// Using a cache size of 5 for now as it current depth usage is at least 2, so adding a minor buffer to handle future updates
UrlHelper._htmlAnchorElement = [null, null, null, null, null];
return UrlHelper;
}());
export { UrlHelper };
var CorrelationIdHelper = /** @class */ (function () {
function CorrelationIdHelper() {
}
/**
* Checks if a request url is not on a excluded domain list and if it is safe to add correlation headers.

@@ -627,3 +78,3 @@ * Headers are always included if the current domain matches the request domain. If they do not match (CORS),

*/
CorrelationIdHelper.canIncludeCorrelationHeader = function (config, requestUrl, currentHost) {
canIncludeCorrelationHeader: function (config, requestUrl, currentHost) {
if (!requestUrl || (config && config.disableCorrelationHeaders)) {

@@ -639,7 +90,7 @@ return false;

}
var requestHost = UrlHelper.parseUrl(requestUrl).host.toLowerCase();
var requestHost = urlParseUrl(requestUrl).host.toLowerCase();
if (requestHost && (requestHost.indexOf(":443") !== -1 || requestHost.indexOf(":80") !== -1)) {
// [Bug #1260] IE can include the port even for http and https URLs so if present
// try and parse it to remove if it matches the default protocol port
requestHost = (UrlHelper.parseFullHost(requestUrl, true) || "").toLowerCase();
requestHost = (urlParseFullHost(requestUrl, true) || "").toLowerCase();
}

@@ -652,3 +103,3 @@ if ((!config || !config.enableCorsCorrelation) && requestHost !== currentHost) {

var matchExists_1;
CoreUtils.arrForEach(includedDomains, function (domain) {
arrForEach(includedDomains, function (domain) {
var regex = new RegExp(domain.toLowerCase().replace(/\./g, "\.").replace(/\*/g, ".*"));

@@ -674,7 +125,7 @@ matchExists_1 = matchExists_1 || regex.test(requestHost);

return requestHost && requestHost.length > 0;
};
},
/**
* Combines target appId and target role name from response header.
*/
CorrelationIdHelper.getCorrelationContext = function (responseHeader) {
getCorrelationContext: function (responseHeader) {
if (responseHeader) {

@@ -686,7 +137,7 @@ var correlationId = CorrelationIdHelper.getCorrelationContextValue(responseHeader, RequestHeaders.requestContextTargetKey);

}
};
},
/**
* Gets key from correlation response header
*/
CorrelationIdHelper.getCorrelationContextValue = function (responseHeader, key) {
getCorrelationContextValue: function (responseHeader, key) {
if (responseHeader) {

@@ -701,76 +152,59 @@ var keyValues = responseHeader.split(",");

}
};
CorrelationIdHelper.correlationIdPrefix = "cid-v1:";
return CorrelationIdHelper;
}());
export { CorrelationIdHelper };
var AjaxHelper = /** @class */ (function () {
function AjaxHelper() {
}
AjaxHelper.ParseDependencyPath = function (logger, absoluteUrl, method, commandName) {
var target, name = commandName, data = commandName;
if (absoluteUrl && absoluteUrl.length > 0) {
var parsedUrl = UrlHelper.parseUrl(absoluteUrl);
target = parsedUrl.host;
if (!name) {
if (parsedUrl.pathname != null) {
var pathName = (parsedUrl.pathname.length === 0) ? "/" : parsedUrl.pathname;
if (pathName.charAt(0) !== '/') {
pathName = "/" + pathName;
}
data = parsedUrl.pathname;
name = DataSanitizer.sanitizeString(logger, method ? method + " " + pathName : pathName);
};
export function AjaxHelperParseDependencyPath(logger, absoluteUrl, method, commandName) {
var target, name = commandName, data = commandName;
if (absoluteUrl && absoluteUrl.length > 0) {
var parsedUrl = urlParseUrl(absoluteUrl);
target = parsedUrl.host;
if (!name) {
if (parsedUrl.pathname != null) {
var pathName = (parsedUrl.pathname.length === 0) ? "/" : parsedUrl.pathname;
if (pathName.charAt(0) !== '/') {
pathName = "/" + pathName;
}
else {
name = DataSanitizer.sanitizeString(logger, absoluteUrl);
}
data = parsedUrl.pathname;
name = DataSanitizer.sanitizeString(logger, method ? method + " " + pathName : pathName);
}
else {
name = DataSanitizer.sanitizeString(logger, absoluteUrl);
}
}
else {
target = commandName;
name = commandName;
}
else {
target = commandName;
name = commandName;
}
return {
target: target,
name: name,
data: data
};
}
export function dateTimeUtilsNow() {
// returns the window or webworker performance object
var perf = getPerformance();
if (perf && perf.now && perf.timing) {
var now = perf.now() + perf.timing.navigationStart;
// Known issue with IE where this calculation can be negative, so if it is then ignore and fallback
if (now > 0) {
return now;
}
return {
target: target,
name: name,
data: data
};
};
return AjaxHelper;
}());
export { AjaxHelper };
}
return dateNow();
}
export function dateTimeUtilsDuration(start, end) {
var result = null;
if (start !== 0 && end !== 0 && !isNullOrUndefined(start) && !isNullOrUndefined(end)) {
result = end - start;
}
return result;
}
/**
* A utility class that helps getting time related parameters
*/
var DateTimeUtils = /** @class */ (function () {
function DateTimeUtils() {
}
/**
* Get the number of milliseconds since 1970/01/01 in local timezone
*/
DateTimeUtils.Now = function () {
// returns the window or webworker performance object
var perf = getPerformance();
if (perf && perf.now && perf.timing) {
var now = perf.now() + perf.timing.navigationStart;
// Known issue with IE where this calculation can be negative, so if it is then ignore and fallback
if (now > 0) {
return now;
}
}
return new Date().getTime();
};
/**
* Gets duration between two timestamps
*/
DateTimeUtils.GetDuration = function (start, end) {
var result = null;
if (start !== 0 && end !== 0 && !CoreUtils.isNullOrUndefined(start) && !CoreUtils.isNullOrUndefined(end)) {
result = end - start;
}
return result;
};
return DateTimeUtils;
}());
export { DateTimeUtils };
export var DateTimeUtils = {
Now: dateTimeUtilsNow,
GetDuration: dateTimeUtilsDuration
};
//# sourceMappingURL=Util.js.map
/*!
* Application Insights JavaScript SDK - Common, 2.5.11
* Application Insights JavaScript SDK - Common, 2.6.0
* Copyright (c) Microsoft and contributors. All rights reserved.
*/
var e=this,t=function(p){"use strict";var i="function",r="object",t="undefined",o="prototype",a="hasOwnProperty";function e(){return typeof globalThis!==t&&globalThis?globalThis:typeof self!==t&&self?self:typeof window!==t&&window?window:typeof global!==t&&global?global:null}function s(e){var t=Object.create;if(t)return t(e);if(null==e)return{};if((t=typeof e)!==r&&t!==i)throw new TypeError("Object prototype may only be an Object:"+e);function n(){}return n[o]=e,new n}var u,l=function(e,t){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t[a](n)&&(e[n]=t[n])})(e,t)};nn=function(e,t){function n(){this.constructor=e}l(e,t),e[o]=null===t?s(t):(n[o]=t[o],new n)},(Zt=on=e()||{}).__assign||(Zt.__assign=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object[o][a].call(t,r)&&(e[r]=t[r]);return e}),Zt.__extends||(Zt.__extends=nn),__assign=__assign||on.__assign,__extends=__extends||on.__extends,(hn=u={})[hn.LocalStorage=0]="LocalStorage",hn[hn.SessionStorage=1]="SessionStorage",(zn=p.FieldType||(p.FieldType={}))[zn.Default=0]="Default",zn[zn.Required=1]="Required",zn[zn.Array=2]="Array",zn[zn.Hidden=4]="Hidden",(Tn=p.DistributedTracingModes||(p.DistributedTracingModes={}))[Tn.AI=0]="AI",Tn[Tn.AI_AND_W3C=1]="AI_AND_W3C",Tn[Tn.W3C=2]="W3C";var c={Unknown:0,NonRetryableStatus:1,InvalidEvent:2,SizeLimitExceeded:3,KillSwitch:4,QueueFull:5},d=t,f=r,g=o,n="window",h="console",v="JSON",m=e;function y(e){var t=m();return t&&t[e]?t[e]:e===n&&S()?window:null}function S(){return typeof window===f&&window}function x(){return S()?window:y(n)}function T(){return typeof document===f&&document?document:y("document")}function C(){return typeof navigator===f&&navigator?navigator:y("navigator")}function I(){return y("performance")}function N(){return typeof JSON===f&&JSON||null!==y(v)}function _(){return N()?JSON||y(v):null}var E="attachEvent",w="addEventListener",F="detachEvent",A="removeEventListener",D=4294967296,b=4294967295,L=null,M=!1,R=123456789,O=987654321;function P(e){e<0&&(e>>>=0),R=123456789+e&b,O=987654321-e&b,M=!0}function k(){P(Math.random()*D^(new Date).getTime())}function U(e,t){return typeof e===t}function z(e){return U(e,t)||e===undefined}function q(e){return z(e)||null===e}function j(e,t){return e&&Object[o].hasOwnProperty.call(e,t)}function G(e){return U(e,r)}function B(e){return U(e,i)}function H(e,t,n,i){void 0===i&&(i=!1);var r=!1;if(!q(e))try{q(e[w])?q(e[E])||(e[E]("on"+t,n),r=!0):(e[w](t,n,i),r=!0)}catch(o){}return r}function V(e,t,n,i){if(void 0===i&&(i=!1),!q(e))try{q(e[A])?q(e[F])||e[F]("on"+t,n):e[A](t,n,i)}catch(r){}}function K(e,t){if(e&&G(e))for(var n in e)j(e,n)&&t.call(e,n,e[n])}var W=(X.isDate=function(e){return"[object Date]"===Object[o].toString.call(e)},X.isArray=function(e){return"[object Array]"===Object[o].toString.call(e)},X.isError=function(e){return"[object Error]"===Object[o].toString.call(e)},X.isString=function(e){return U(e,"string")},X.isNumber=function(e){return U(e,"number")},X.isBoolean=function(e){return U(e,"boolean")},X.disableCookies=function(){X._canUseCookies=!1},X.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(J,function(e){var t=0|X.randomValue(15);return("x"===e?t:3&t|8).toString(16)})},X.toISOString=function(e){if(X.isDate(e)){var t=function(e){return 1===(e+="").length&&(e="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"}},X.arrForEach=function(e,t,n){for(var i=e.length,r=0;r<i;r++)r in e&&t.call(n||e,e[r],r,e)},X.arrIndexOf=function(e,t,n){for(var i=e.length,r=Math.max(0<=(n=n||0)?n:i-Math.abs(n),0);r<i;r++)if(r in e&&e[r]===t)return r;return-1},X.arrMap=function(e,t,n){for(var i=e.length,r=n||e,o=Array(i),a=0;a<i;a++)a in e&&(o[a]=t.call(r,e[a],e));return o},X.arrReduce=function(e,t,n){var i,r=e.length,o=0;if(3<=arguments.length)i=n;else{for(;o<r&&!(o in e);)o++;i=e[o++]}for(;o<r;)o in e&&(i=t(i,e[o],o,e)),o++;return i},X.strTrim=function(e){return X.isString(e)?e.replace(/^\s+|\s+$/g,""):e},X.objKeys=function(e){var t=!{toString:null}.propertyIsEnumerable("toString");if(!(B(e)||G(e)&&null!==e))throw new TypeError("objKeys called on non-object");var n,i=[];for(n in e)j(e,n)&&i.push(n);if(t)for(var r=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],o=r.length,a=0;a<o;a++)j(e,r[a])&&i.push(r[a]);return i},X.addEventHandler=function(e,t){var n=!1,i=x();return i&&(n=H(i,e,t),n=H(i.body,e,t)||n),(i=T())&&(n=Y.Attach(i,e,t)||n),n},X.dateNow=function(){var e=Date;return e.now?e.now():(new e).getTime()},X.perfNow=function(){var e=I();return e&&e.now?e.now():X.dateNow()},X.newId=function(e){void 0===e&&(e=22);for(var t=X.random32()>>>0,n=0,i="";i.length<e;)i+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[0|63&t],t>>>=6,5==++n&&(t=(X.random32()<<2&4294967295|3&t)>>>0,n=0);return i},X.isIE=function(){var e;return null===L&&(e=((C()||{}).userAgent||"").toLowerCase(),L=!!~e.indexOf("msie")||!!~e.indexOf("trident/")),L},X.randomValue=function(e){return 0<e?Math.floor(X.random32()/b*(e+1))>>>0:0},X.random32=function(e){var t=(t=y("crypto")||y("msCrypto"))&&t.getRandomValues?t.getRandomValues(new Uint32Array(1))[0]&b:X.isIE()?(M||k(),X.mwcRandom32()&b):Math.floor(D*Math.random()|0);return e||(t>>>=0),t},X.mwcRandomSeed=function(e){e?P(e):k()},X.mwcRandom32=function(e){var t=((O=36969*(65535&O)+(O>>16)&b)<<16)+(65535&(R=18e3*(65535&R)+(R>>16)&b))>>>0&b|0;return e||(t>>>=0),t},X.generateW3CId=function(){for(var e,t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],n="",i=0;i<4;i++)n+=t[15&(e=X.random32())]+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 r=t[8+(3&X.random32())|0];return n.substr(0,8)+n.substr(9,4)+"4"+n.substr(13,3)+r+n.substr(16,3)+n.substr(19,12)},X.isTypeof=U,X.isUndefined=z,X.isNullOrUndefined=q,X.hasOwnProperty=j,X.isFunction=B,X.isObject=G,X.objCreate=s,X.objDefineAccessors=function(e,t,n,i){var r=Object.defineProperty;if(r)try{var o={enumerable:!0,configurable:!0};return n&&(o.get=n),i&&(o.set=i),r(e,t,o),!0}catch(a){}return!1},X);function X(){}var Q,J=/[xy]/g,Y=($.Attach=H,$.AttachEvent=H,$.Detach=V,$.DetachEvent=V,$);function $(){}(Nn=Q=Q||{})[Nn.CRITICAL=1]="CRITICAL",Nn[Nn.WARNING=2]="WARNING";var Z={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},ee="constructor",te="prototype",ne="function",ie="_dynInstFuncs",re="_isDynProxy",oe="_dynClass",ae="_dynCls$",se="_dynInstChk",ue=se,le="_dfOpts",ce="_unknown_",de="__proto__",fe="useBaseInst",pe="setInstFuncs",ge=Object.getPrototypeOf,he=0;function ve(e,t){return e&&Object[te].hasOwnProperty.call(e,t)}function me(e){return typeof e===ne}function ye(e){return e&&(e===Object[te]||e===Array[te])}function Se(e){return ye(e)||e===Function[te]}function xe(e){if(e){if(ge)return ge(e);if(e=e[de]||e[te]||e[ee])return e}return null}function Te(e,t,n){return t!==ee&&me(e[t])&&(n||ve(e,t))}function Ce(e){throw new TypeError("DynamicProto: "+e)}function Ie(e,t){for(var n=e.length-1;0<=n;n--)if(e[n]===t)return 1}function Ne(e,t){return ve(e,te)?e.name||t||ce:((e||{})[ee]||{}).name||t||ce}function _e(e,n,t,i){ve(e,te)||Ce("theClass is an invalid class definition.");var r=e[te];!function(e){for(var t=xe(n);t&&!Se(t);){if(t===e)return 1;t=xe(t)}}(r)&&Ce("["+Ne(e)+"] is not in class hierarchy of ["+Ne(n)+"]");var o=null;ve(r,oe)?o=r[oe]:(o=ae+Ne(e,"_")+"$"+he,he++,r[oe]=o);var a=_e[le],s=!!a[fe];s&&i&&i[fe]!==undefined&&(s=!!i[fe]),t(n,function(e,t,n,o){function i(e,t,n){var i,r=t[u];return r[re]&&o&&!1!==(i=e[ie]||{})[ue]&&(r=(i[t[oe]]||{})[n]||r),function(){return r.apply(e,arguments)}}var r={};for(u in n)r[u]=i(t,n,u);for(var a=xe(e),s=[];a&&!Se(a)&&!Ie(s,a);){for(var u in a)!r[u]&&Te(a,u,!ge)&&(r[u]=i(t,a,u));s.push(a),a=xe(a)}return r}(r,n,e=function(e){var t,n={};for(t in e)!n[t]&&Te(e,t,!1)&&(n[t]=e[t]);return n}(n),s)),(a=!!ge&&!!a[pe])&&i&&(a=!!i[pe]),function(e,t,n,i,r){if(!ye(e)){var o,a=n[ie]=n[ie]||{},s=a[t]=a[t]||{};for(o in!1!==a[ue]&&(a[ue]=!!r),n)Te(n,o,!1)&&n[o]!==i[o]&&(s[o]=n[o],delete n[o],ve(e,o)&&(!e[o]||e[o][re])||(e[o]=function(n,i){var r=function(){var e,t;return(function(e,t,n,i){var r=null;if(e&&ve(n,oe)){var o=e[ie]||{};if((r=(o[n[oe]]||{})[t])||Ce("Missing ["+t+"] "+ne),!r[se]&&!1!==o[ue]){for(var a=!ve(e,t),s=xe(e),u=[];a&&s&&!Se(s)&&!Ie(u,s);){var l=s[t];if(l){a=l===i;break}u.push(s),s=xe(s)}try{a&&(e[t]=r),r[se]=1}catch(c){o[ue]=!1}}}return r}(this,i,n,r)||((t=n[e=i])===r&&(t=xe(n)[e]),me(t)||Ce("["+e+"] is not a "+ne),t)).apply(this,arguments)};return r[re]=1,r}(e,o)))}}(r,o,n,e,!1!==a)}_e[le]={setInstFuncs:!0,useBaseInst:!0};var Ee="AITR_";function we(e){return e?'"'+e.replace(/\"/g,"")+'"':""}var Fe=(Ae.dataType="MessageData",Ae);function Ae(e,t,n,i){void 0===n&&(n=!1),this.messageId=e,this.message=(n?"AI: ":"AI (Internal): ")+e,e="",N()&&(e=_().stringify(i)),e=(t?" message:"+we(t):"")+(i?" props:"+we(e):""),this.message+=e}var De=(be.prototype.enableDebugExceptions=function(){return!1},be.prototype.consoleLoggingLevel=function(){return 0},be.prototype.telemetryLoggingLevel=function(){return 1},be.prototype.maxInternalMessageLimit=function(){return 25},be.prototype.throwInternal=function(e,t,n,i,r){void 0===r&&(r=!1)},be.prototype.warnToConsole=function(e){},be.prototype.resetInternalMessageCount=function(){},be.prototype.logInternalMessage=function(e,t){},be);function be(r){this.identifier="DiagnosticLogger",this.queue=[];var s=0,u={};_e(be,this,function(o){var n=W.isNullOrUndefined,a=W.isUndefined,i=W.isFunction;function e(e,t){return e=r[e],n(e)?t:e}n(r)&&(r={}),o.consoleLoggingLevel=function(){return e("loggingLevelConsole",0)},o.telemetryLoggingLevel=function(){return e("loggingLevelTelemetry",1)},o.maxInternalMessageLimit=function(){return e("maxMessageLimit",25)},o.enableDebugExceptions=function(){return e("enableDebugExceptions",!1)},o.throwInternal=function(e,t,n,i,r){if(void 0===r&&(r=!1),i=new Fe(t,n,r,i),o.enableDebugExceptions())throw i;!a(i)&&i&&(a(i.message)||(r?(r=+i.messageId,!u[r]&&o.consoleLoggingLevel()>=Q.WARNING&&(o.warnToConsole(i.message),u[r]=!0)):o.consoleLoggingLevel()>=Q.WARNING&&o.warnToConsole(i.message),o.logInternalMessage(e,i)))},o.warnToConsole=function(e){var t,n=typeof console!==d?console:y(h);n&&(t="log",n.warn&&(t="warn"),i(n[t])&&n[t](e))},o.resetInternalMessageCount=function(){s=0,u={}},o.logInternalMessage=function(e,t){var n,i;s>=o.maxInternalMessageLimit()||(n=!0,i=Ee+t.messageId,u[i]?n=!1:u[i]=!0,n&&(e<=o.telemetryLoggingLevel()&&(o.queue.push(t),s++),s===o.maxInternalMessageLimit()&&(e="Internal events throttle limit per PageView reached for this app.",t=new Fe(Z.MessageLimitPerPVExceeded,e,!1),o.queue.push(t),o.warnToConsole(e))))}})}var Le="ctx",Me=(Re.ParentContextKey="parent",Re.ChildrenContextKey="childEvts",Re);function Re(e,r,t){var n,o=this,a=!1;o.start=W.dateNow(),o.name=e,o.isAsync=t,o.isChildEvt=function(){return!1},W.isFunction(r)&&(a=W.objDefineAccessors(o,"payload",function(){return!n&&W.isFunction(r)&&(n=r(),r=null),n})),o.getCtx=function(e){return e?(e===Re.ParentContextKey||e===Re.ChildrenContextKey?o:o[Le]||{})[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[Le]=o[Le]||{})[e]=t)},o.complete=function(){var e=0,t=o.getCtx(Re.ChildrenContextKey);if(W.isArray(t))for(var n=0;n<t.length;n++){var i=t[n];i&&(e+=i.time)}o.time=W.dateNow()-o.start,o.exTime=o.time-e,o.complete=function(){},!a&&W.isFunction(r)&&(o.payload=r())}}var Oe=(Pe.prototype.create=function(e,t,n){return null},Pe.prototype.fire=function(e){},Pe.prototype.setCtx=function(e,t){},Pe.prototype.getCtx=function(e){},Pe);function Pe(t){this.ctx={},_e(Pe,this,function(n){n.create=function(e,t,n){return new Me(e,t,n)},n.fire=function(e){e&&(e.complete(),t&&t.perfEvent(e))},n.setCtx=function(e,t){e&&((n[Le]=n[Le]||{})[e]=t)},n.getCtx=function(e){return(n[Le]||{})[e]}})}var ke="CoreUtils.doPerf";function Ue(e,t,n,i,r){if(e){var o=e;if(o&&W.isFunction(o.getPerfMgr)&&(o=o.getPerfMgr()),o){var a,s=void 0,u=o.getCtx(ke);try{if(s=o.create(t(),i,r))return u&&s.setCtx&&(s.setCtx(Me.ParentContextKey,u),u.getCtx&&u.setCtx&&((a=u.getCtx(Me.ChildrenContextKey))||(a=[],u.setCtx(Me.ChildrenContextKey,a)),a.push(s))),o.setCtx(ke,s),n(s)}catch(l){s&&s.setCtx&&s.setCtx("exception",l)}finally{s&&o.fire(s),o.setCtx(ke,u)}}}return n()}var ze=W.isFunction,qe=function(r,t){var o=this,a=null,s=ze(r.processTelemetry),u=ze(r.setNextPlugin);o._hasRun=!1,o.getPlugin=function(){return r},o.getNext=function(){return a},o.setNext=function(e){a=e},o.processTelemetry=function(n,i){i=i||t;var e=r?r.identifier:"TelemetryPluginChain";Ue(i?i.core():null,function(){return e+":processTelemetry"},function(){if(r&&s){o._hasRun=!0;try{i.setNext(a),u&&r.setNextPlugin(a),a&&(a._hasRun=!1),r.processTelemetry(n,i)}catch(t){var e=a&&a._hasRun;a&&e||i.diagLog().throwInternal(Q.CRITICAL,Z.PluginException,"Plugin ["+r.identifier+"] failed during processTelemetry - "+t),a&&!e&&a.processTelemetry(n,i)}}else a&&(o._hasRun=!0,a.processTelemetry(n,i))},function(){return{item:n}},!n.sync)}},je=W.isNullOrUndefined;function Ge(e,t){var n=[];if(e&&0<e.length)for(var i=null,r=0;r<e.length;r++){var o=e[r];o&&W.isFunction(o.processTelemetry)&&(o=new qe(o,t),n.push(o),i&&i.setNext(o),i=o)}return 0<n.length?n[0]:null}var Be=function Kn(e,r,n,t){var i,o,a,s,u=this,l=null;null!==t&&(e&&W.isFunction(e.getPlugin)?l=function(e,t,n){var i=[],r=!n;if(e)for(;e;){var o=e.getPlugin();!r&&o!==n||(r=!0,i.push(o)),e=e.getNext()}return r||i.push(n),Ge(i,t)}(e,u,t||e.getPlugin()):t?(i=u,a=e,s=!1,(o=t)&&e&&(a=[],W.arrForEach(e,function(e){!s&&e!==o||(s=!0,a.push(e))})),o&&!s&&(a=a||[]).push(o),l=Ge(a,i)):W.isUndefined(t)&&(l=Ge(e,u))),u.core=function(){return n},u.diagLog=function(){return(n||{}).logger||new De(r||{})},u.getCfg=function(){return r},u.getExtCfg=function(e,t){var n,i;return void 0===t&&(t={}),!r||(i=r.extensionConfig)&&e&&(n=i[e]),n||t},u.getConfig=function(e,t,n){var i;return void 0===n&&(n=!1),(e=u.getExtCfg(e,null))&&!je(e[t])?i=e[t]:r&&!je(r[t])&&(i=r[t]),je(i)?n:i},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 void 0===e&&(e=null),new Kn(e||l,r,n,t)}},He=W.isFunction,Ve="getPlugin",Ke=(We.prototype.initialize=function(e,t,n,i){this._baseTelInit(e,t,n,i)},We);function We(){var o=this,a=!1,s=null,u=null;o.core=null,o.diagLog=function(e){return o._getTelCtx(e).diagLog()},o.isInitialized=function(){return a},o.setInitialized=function(e){a=e},o.setNextPlugin=function(e){u=e},o.processNext=function(e,t){t?t.processNext(e):u&&He(u.processTelemetry)&&u.processTelemetry(e,null)},o._getTelCtx=function(e){void 0===e&&(e=null);var t=e;return t||(e=s||new Be(null,{},o.core),t=u&&u[Ve]?e.createNew(null,u[Ve]):e.createNew(null,u)),t},o._baseTelInit=function(e,t,n,i){e&&(e.extensionConfig=e.extensionConfig||[]),!i&&t&&(i=t.getProcessTelContext().getNext());var r=u;u&&u[Ve]&&(r=u[Ve]()),o.core=t,s=new Be(i,e,t,r),a=!0}}var Xe=W.isFunction,Qe="processTelemetry",Je="priority",Ye="setNextPlugin",$e="isInitialized";function Ze(t,n){for(var e=[],i=null,r=t.getNext();r;){var o=r.getPlugin();o&&(i&&Xe(i[Ye])&&Xe(o[Qe])&&i[Ye](o),Xe(o[$e])&&o[$e]()||e.push(o),i=o,r=r.getNext())}W.arrForEach(e,function(e){e.initialize(t.getCfg(),t.core(),n,t.getNext())})}function et(e){return e.sort(function(e,t){var n=0,i=Xe(t[Qe]);return Xe(e[Qe])?n=i?e[Je]-t[Je]:1:i&&(n=-1),n})}var tt,nt=500,it="Channel has invalid priority",rt=W.objDefineAccessors,ot=(tt=Ke,__extends(at,tt),at.prototype.processTelemetry=function(e,t){},at.prototype.getChannelControls=function(){return null},at.prototype.initialize=function(e,t,n){},at._staticInit=(rt(at.prototype,"ChannelControls",at.prototype.getChannelControls),void rt(at.prototype,"channelQueue",at.prototype.getChannelControls)),at);function at(){var i=tt.call(this)||this;i.identifier="ChannelControllerPlugin",i.priority=nt;var u,l=W.arrForEach;function c(e){e&&0<e.length&&(e=e.sort(function(e,t){return e.priority-t.priority}),l(e,function(e){if(e.priority<nt)throw Error(it+e.identifier)}),u.push(e))}return _e(at,i,function(a,s){a.setNextPlugin=function(e){},a.processTelemetry=function(t,n){u&&l(u,function(e){0<e.length&&i._getTelCtx(n).createNew(e).processNext(t)})},a.getChannelControls=function(){return u},a.initialize=function(t,n,i){var e,r,o;a.isInitialized()||(s.initialize(t,n,i),t.isCookieUseDisabled&&W.disableCookies(),r=i,u=[],(e=(t||{}).channels)&&l(e,c),r&&(o=[],l(r,function(e){e.priority>nt&&o.push(e)}),c(o)),l(u,function(e){return Ze(new Be(e,t,n),i)}))}}),i}var st="Extensions must provide callback to initialize",ut=W.arrForEach,lt=W.isNullOrUndefined,ct="_notificationManager",dt=(ft.prototype.initialize=function(e,t,n,i){},ft.prototype.getTransmissionControls=function(){return null},ft.prototype.track=function(e){},ft.prototype.getProcessTelContext=function(){return null},ft.prototype.getNotifyMgr=function(){return null},ft.prototype.getPerfMgr=function(){return null},ft.prototype.setPerfMgr=function(e){},ft.prototype.eventCnt=function(){return 0},ft.prototype.releaseQueue=function(){},ft);function ft(){var t,s,u,n,l=!1;_e(ft,this,function(a){a._extensions=[],s=new ot,a.logger=W.objCreate({throwInternal:function(e,t,n,i,r){void 0===r&&(r=!1)},warnToConsole:function(e){},resetInternalMessageCount:function(){}}),t=[],a.isInitialized=function(){return l},a.initialize=function(e,t,i,n){if(a.isInitialized())throw Error("Core should not be initialized more than once");if(!e||lt(e.instrumentationKey))throw Error("Please provide instrumentation key");u=n,a[ct]=n,a.config=e||{},e.extensions=lt(e.extensions)?[]:e.extensions,(e.extensionConfig=lt(e.extensionConfig)?{}:e.extensionConfig).NotificationManager=n,i&&(a.logger=i),(n=[]).push.apply(n,t.concat(e.extensions)),n=et(n);var r=[],o={};if(ut(n,function(e){if(lt(e)||lt(e.initialize))throw Error(st);var t=e.priority,n=e.identifier;e&&t&&(lt(o[t])?o[t]=n:i.warnToConsole("Two extensions have same priority #"+t+" - "+o[t]+", "+n)),(!t||t<s.priority)&&r.push(e)}),n.push(s),r.push(s),n=et(n),a._extensions=n,Ze(new Be([s],e,a),n),Ze(new Be(r,e,a),n),a._extensions=r,0===a.getTransmissionControls().length)throw Error("No channels available");l=!0,a.releaseQueue()},a.getTransmissionControls=function(){return s.getChannelControls()},a.track=function(e){e.iKey||(e.iKey=a.config.instrumentationKey),e.time||(e.time=W.toISOString(new Date)),lt(e.ver)&&(e.ver="4.0"),a.isInitialized()?a.getProcessTelContext().processNext(e):t.push(e)},a.getProcessTelContext=function(){var e=a._extensions,t=e;return e&&0!==e.length||(t=[s]),new Be(t,a.config,a)},a.getNotifyMgr=function(){return u||(u=W.objCreate({addNotificationListener:function(e){},removeNotificationListener:function(e){},eventsSent:function(e){},eventsDiscarded:function(e,t){},eventsSendRequest:function(e,t){}}),a[ct]=u),u},a.getPerfMgr=function(){return n||a.config&&a.config.enablePerfMgr&&(n=new Oe(a.getNotifyMgr())),n},a.setPerfMgr=function(e){n=e},a.eventCnt=function(){return t.length},a.releaseQueue=function(){0<t.length&&(ut(t,function(e){a.getProcessTelContext().processNext(e)}),t=[])}})}var pt,gt=(ht.prototype.addNotificationListener=function(e){},ht.prototype.removeNotificationListener=function(e){},ht.prototype.eventsSent=function(e){},ht.prototype.eventsDiscarded=function(e,t){},ht.prototype.eventsSendRequest=function(e,t){},ht);function ht(e){this.listeners=[];var o=W.arrForEach,t=!!(e||{}).perfEvtsSendAll;_e(ht,this,function(r){r.addNotificationListener=function(e){r.listeners.push(e)},r.removeNotificationListener=function(e){for(var t=W.arrIndexOf(r.listeners,e);-1<t;)r.listeners.splice(t,1),t=W.arrIndexOf(r.listeners,e)},r.eventsSent=function(t){o(r.listeners,function(e){e&&e.eventsSent&&setTimeout(function(){return e.eventsSent(t)},0)})},r.eventsDiscarded=function(t,n){o(r.listeners,function(e){e&&e.eventsDiscarded&&setTimeout(function(){return e.eventsDiscarded(t,n)},0)})},r.eventsSendRequest=function(n,i){o(r.listeners,function(e){if(e&&e.eventsSendRequest)if(i)setTimeout(function(){return e.eventsSendRequest(n,i)},0);else try{e.eventsSendRequest(n,i)}catch(t){}})},r.perfEvent=function(n){n&&(!t&&n.isChildEvt()||o(r.listeners,function(e){if(e&&e.perfEvent)if(n.isAsync)setTimeout(function(){return e.perfEvent(n)},0);else try{e.perfEvent(n)}catch(t){}}))}})}function vt(){var e=pt.call(this)||this;return _e(vt,e,function(n,r){function t(e){var t=n.getNotifyMgr();t&&t.eventsDiscarded([e],c.InvalidEvent)}n.initialize=function(e,t,n,i){r.initialize(e,t,n||new De(e),i||new gt(e))},n.track=function(e){Ue(n.getPerfMgr(),function(){return"AppInsightsCore:track"},function(){if(null===e)throw t(e),Error("Invalid telemetry item");!function(e){if(W.isNullOrUndefined(e.name))throw t(e),Error("telemetry name required")}(e),r.track(e)},function(){return{item:e}},!e.sync)},n.addNotificationListener=function(e){var t=n.getNotifyMgr();t&&t.addNotificationListener(e)},n.removeNotificationListener=function(e){var t=n.getNotifyMgr();t&&t.removeNotificationListener(e)},n.pollInternalLogs=function(t){var e=n.config.diagnosticLogInterval;return e&&0<e||(e=1e4),setInterval(function(){var e=n.logger?n.logger.queue:[];W.arrForEach(e,function(e){e={name:t||"InternalMessageId: "+e.messageId,iKey:n.config.instrumentationKey,time:W.toISOString(new Date),baseType:Fe.dataType,baseData:{message:e.message}},n.track(e)}),e.length=0},e)}}),e}pt=dt,__extends(vt,pt),vt.prototype.initialize=function(e,t,n,i){},vt.prototype.track=function(e){},vt.prototype.addNotificationListener=function(e){},vt.prototype.removeNotificationListener=function(e){},vt.prototype.pollInternalLogs=function(e){return 0};var mt=(yt.requestContextHeader="Request-Context",yt.requestContextTargetKey="appId",yt.requestContextAppIdFormat="appId=cid-v1:",yt.requestIdHeader="Request-Id",yt.traceParentHeader="traceparent",yt.sdkContextHeader="Sdk-Context",yt.sdkContextHeaderAppIdRequest="appId",yt.requestContextHeaderLowerCase="request-context",yt);function yt(){}var St=(xt.sanitizeKeyAndAddUniqueness=function(e,t,n){var i=t.length,r=xt.sanitizeKey(e,t);if(r.length!==i){for(var o=0,a=r;n[a]!==undefined;)o++,a=r.substring(0,xt.MAX_NAME_LENGTH-3)+xt.padNumber(o);r=a}return r},xt.sanitizeKey=function(e,t){var n;return t&&(t=xt.trim(t.toString())).length>xt.MAX_NAME_LENGTH&&(n=t.substring(0,xt.MAX_NAME_LENGTH),e.throwInternal(Q.WARNING,Z.NameTooLong,"name is too long. It has been truncated to "+xt.MAX_NAME_LENGTH+" characters.",{name:t},!0)),n||t},xt.sanitizeString=function(e,t,n){var i;return void 0===n&&(n=xt.MAX_STRING_LENGTH),t&&(n=n||xt.MAX_STRING_LENGTH,(t=xt.trim(t)).toString().length>n&&(i=t.toString().substring(0,n),e.throwInternal(Q.WARNING,Z.StringValueTooLong,"string value is too long. It has been truncated to "+n+" characters.",{value:t},!0))),i||t},xt.sanitizeUrl=function(e,t){return xt.sanitizeInput(e,t,xt.MAX_URL_LENGTH,Z.UrlTooLong)},xt.sanitizeMessage=function(e,t){var n;return t&&t.length>xt.MAX_MESSAGE_LENGTH&&(n=t.substring(0,xt.MAX_MESSAGE_LENGTH),e.throwInternal(Q.WARNING,Z.MessageTruncated,"message is too long, it has been truncated to "+xt.MAX_MESSAGE_LENGTH+" characters.",{message:t},!0)),n||t},xt.sanitizeException=function(e,t){var n;return t&&t.length>xt.MAX_EXCEPTION_LENGTH&&(n=t.substring(0,xt.MAX_EXCEPTION_LENGTH),e.throwInternal(Q.WARNING,Z.ExceptionTruncated,"exception is too long, it has been truncated to "+xt.MAX_EXCEPTION_LENGTH+" characters.",{exception:t},!0)),n||t},xt.sanitizeProperties=function(i,e){var r;return e&&(r={},K(e,function(e,t){if(W.isObject(t)&&N())try{t=_().stringify(t)}catch(n){i.throwInternal(Q.WARNING,Z.CannotSerializeObjectNonSerializable,"custom property is not valid",{exception:n},!0)}t=xt.sanitizeString(i,t,xt.MAX_PROPERTY_LENGTH),e=xt.sanitizeKeyAndAddUniqueness(i,e,r),r[e]=t}),e=r),e},xt.sanitizeMeasurements=function(n,e){var i;return e&&(i={},K(e,function(e,t){e=xt.sanitizeKeyAndAddUniqueness(n,e,i),i[e]=t}),e=i),e},xt.sanitizeId=function(e,t){return t&&xt.sanitizeInput(e,t,xt.MAX_ID_LENGTH,Z.IdTooLong).toString()},xt.sanitizeInput=function(e,t,n,i){var r;return t&&(t=xt.trim(t)).length>n&&(r=t.substring(0,n),e.throwInternal(Q.WARNING,i,"input is too long, it has been truncated to "+n+" characters.",{data:t},!0)),r||t},xt.padNumber=function(e){return(e="00"+e).substr(e.length-3)},xt.trim=function(e){return W.isString(e)?e.replace(/^\s+|\s+$/g,""):e},xt.MAX_NAME_LENGTH=150,xt.MAX_ID_LENGTH=128,xt.MAX_PROPERTY_LENGTH=8192,xt.MAX_STRING_LENGTH=1024,xt.MAX_URL_LENGTH=2048,xt.MAX_MESSAGE_LENGTH=32768,xt.MAX_EXCEPTION_LENGTH=32768,xt);function xt(){}var Tt=C(),Ct=W.isString,It=null,Nt=(_t.createDomEvent=function(e){var t,n=null;return W.isFunction(Event)?n=new Event(e):(t=T())&&t.createEvent&&(n=t.createEvent("Event")).initEvent(e,!0,!0),n},_t.disableStorage=function(){_t._canUseLocalStorage=!1,_t._canUseSessionStorage=!1},_t._getLocalStorageObject=function(){return _t.canUseLocalStorage()?_t._getVerifiedStorageObject(u.LocalStorage):null},_t._getVerifiedStorageObject=function(e){var t,n,i=null;try{if(W.isNullOrUndefined(m()))return null;n=new Date,(i=y(e===u.LocalStorage?"localStorage":"sessionStorage")).setItem(n.toString(),n.toString()),t=i.getItem(n.toString())!==n.toString(),i.removeItem(n.toString()),t&&(i=null)}catch(r){i=null}return i},_t.isInternalApplicationInsightsEndpoint=function(e){return!!~_t._internalEndpoints.indexOf(e.toLowerCase())},_t.canUseLocalStorage=function(){return _t._canUseLocalStorage===undefined&&(_t._canUseLocalStorage=!!_t._getVerifiedStorageObject(u.LocalStorage)),_t._canUseLocalStorage},_t.getStorage=function(e,t){var n=_t._getLocalStorageObject();if(null!==n)try{return n.getItem(t)}catch(i){_t._canUseLocalStorage=!1,e.throwInternal(Q.WARNING,Z.BrowserCannotReadLocalStorage,"Browser failed read of local storage. "+_t.getExceptionName(i),{exception:_t.dump(i)})}return null},_t.setStorage=function(e,t,n){var i=_t._getLocalStorageObject();if(null!==i)try{return i.setItem(t,n),!0}catch(r){_t._canUseLocalStorage=!1,e.throwInternal(Q.WARNING,Z.BrowserCannotWriteLocalStorage,"Browser failed write to local storage. "+_t.getExceptionName(r),{exception:_t.dump(r)})}return!1},_t.removeStorage=function(e,t){var n=_t._getLocalStorageObject();if(null!==n)try{return n.removeItem(t),!0}catch(i){_t._canUseLocalStorage=!1,e.throwInternal(Q.WARNING,Z.BrowserFailedRemovalFromLocalStorage,"Browser failed removal of local storage item. "+_t.getExceptionName(i),{exception:_t.dump(i)})}return!1},_t._getSessionStorageObject=function(){return _t.canUseSessionStorage()?_t._getVerifiedStorageObject(u.SessionStorage):null},_t.canUseSessionStorage=function(){return _t._canUseSessionStorage===undefined&&(_t._canUseSessionStorage=!!_t._getVerifiedStorageObject(u.SessionStorage)),_t._canUseSessionStorage},_t.getSessionStorageKeys=function(){var t=[];return _t.canUseSessionStorage()&&K(y("sessionStorage"),function(e){t.push(e)}),t},_t.getSessionStorage=function(e,t){var n=_t._getSessionStorageObject();if(null!==n)try{return n.getItem(t)}catch(i){_t._canUseSessionStorage=!1,e.throwInternal(Q.WARNING,Z.BrowserCannotReadSessionStorage,"Browser failed read of session storage. "+_t.getExceptionName(i),{exception:_t.dump(i)})}return null},_t.setSessionStorage=function(e,t,n){var i=_t._getSessionStorageObject();if(null!==i)try{return i.setItem(t,n),!0}catch(r){_t._canUseSessionStorage=!1,e.throwInternal(Q.WARNING,Z.BrowserCannotWriteSessionStorage,"Browser failed write to session storage. "+_t.getExceptionName(r),{exception:_t.dump(r)})}return!1},_t.removeSessionStorage=function(e,t){var n=_t._getSessionStorageObject();if(null!==n)try{return n.removeItem(t),!0}catch(i){_t._canUseSessionStorage=!1,e.throwInternal(Q.WARNING,Z.BrowserFailedRemovalFromSessionStorage,"Browser failed removal of session storage item. "+_t.getExceptionName(i),{exception:_t.dump(i)})}return!1},_t.disableCookies=function(){W.disableCookies()},_t.canUseCookies=function(e){if(W._canUseCookies===undefined){W._canUseCookies=!1;try{W._canUseCookies=_t.document.cookie!==undefined}catch(t){e.throwInternal(Q.WARNING,Z.CannotAccessCookie,"Cannot access document.cookie - "+_t.getExceptionName(t),{exception:_t.dump(t)})}}return W._canUseCookies},_t.disallowsSameSiteNone=function(e){return!(!Ct(e)||!~e.indexOf("CPU iPhone OS 12")&&!~e.indexOf("iPad; CPU OS 12")&&!(~e.indexOf("Macintosh; Intel Mac OS X 10_14")&&~e.indexOf("Version/")&&~e.indexOf("Safari"))&&(!~e.indexOf("Macintosh; Intel Mac OS X 10_14")||(n=(t=e.length)-40,"AppleWebKit/605.1.15 (KHTML, like Gecko)"!=e.substring(0<=n?n:0,t)))&&!~e.indexOf("Chrome/5")&&!~e.indexOf("Chrome/6")&&(!~e.indexOf("UnrealEngine")||~e.indexOf("Chrome"))&&!~e.indexOf("UCBrowser/12")&&!~e.indexOf("UCBrowser/11"));var t,n},_t.setCookie=function(e,t,n,i){var r;_t.canUseCookies(e)&&(e=r="",i&&(r=";domain="+i),(i=typeof location===f&&location?location:y("location"))&&"https:"===i.protocol&&(e=";secure",null===It&&(It=_t.disallowsSameSiteNone((C()||{}).userAgent)),It||(n+=";SameSite=None")),_t.document.cookie=t+"="+n+r+";path=/"+e)},_t.stringToBoolOrDefault=function(e,t){return void 0===t&&(t=!1),e===undefined||null===e?t:"true"==e.toString().toLowerCase()},_t.getCookie=function(e,t){if(_t.canUseCookies(e)){var n="";if(t&&t.length)for(var i=t+"=",r=_t.document.cookie.split(";"),o=0;o<r.length;o++){var a=r[o];if((a=_t.trim(a))&&!a.indexOf(i)){n=a.substring(i.length,r[o].length);break}}return n}},_t.deleteCookie=function(e,t){_t.canUseCookies(e)&&(_t.document.cookie=t+"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;")},_t.random32=function(){return W.random32(!0)},_t.getIEVersion=function(e){return void 0===e&&(e=null),~(e=e?e.toLowerCase():Tt?(Tt.userAgent||"").toLowerCase():"").indexOf("msie")?parseInt(e.split("msie")[1]):e.indexOf("trident/")&&(e=parseInt(e.split("trident/")[1]))?e+4:null},_t.msToTimeSpan=function(e){(isNaN(e)||e<0)&&(e=0);var t=""+(e=Math.round(e))%1e3,n=""+Math.floor(e/1e3)%60,i=""+Math.floor(e/6e4)%60,r=""+Math.floor(e/36e5)%24,e=Math.floor(e/864e5),t=1===t.length?"00"+t:2===t.length?"0"+t:t,n=n.length<2?"0"+n:n,i=i.length<2?"0"+i:i;return(0<e?e+".":"")+(r=r.length<2?"0"+r:r)+":"+i+":"+n+"."+t},_t.isCrossOriginError=function(e,t,n,i,r){return("Script error."===e||"Script error"===e)&&!r},_t.dump=function(e){var t=Object[g].toString.call(e),n="";return"[object Error]"===t?n="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":N()&&(n=_().stringify(e)),t+n},_t.getExceptionName=function(e){return"[object Error]"===Object[g].toString.call(e)?e.name:""},_t.addEventHandler=function(e,t){return Y.Attach(x(),e,t)},_t.IsBeaconApiSupported=function(){return"sendBeacon"in Tt&&Tt.sendBeacon},_t.getExtension=function(e,t){for(var n=null,i=0;!n&&i<e.length;)e[i]&&e[i].identifier===t&&(n=e[i]),i++;return n},_t.document=T()||{},_t._canUseLocalStorage=undefined,_t._canUseSessionStorage=undefined,_t._internalEndpoints=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],_t.NotSpecified="not_specified",_t.trim=W.strTrim,_t.newId=W.newId,_t.generateW3CId=W.generateW3CId,_t.isArray=W.isArray,_t.isError=W.isError,_t.isDate=W.isDate,_t.toISOStringForIE8=W.toISOString,_t);function _t(){}var Et=(wt.parseUrl=function(e){var t=wt._htmlAnchorIdx,n=wt._htmlAnchorElement,i=n[t];return wt.document.createElement?n[t]||(i=n[t]=wt.document.createElement("a")):i={host:wt.parseHost(e,!0)},i.href=e,++t>=n.length&&(t=0),wt._htmlAnchorIdx=t,i},wt.getAbsoluteUrl=function(e){var t;return(e=wt.parseUrl(e))&&(t=e.href),t},wt.getPathName=function(e){var t;return(e=wt.parseUrl(e))&&(t=e.pathname),t},wt.getCompleteUrl=function(e,t){return e?e.toUpperCase()+" "+t:t},wt.parseHost=function(e,t){return(e=wt.parseFullHost(e,t))&&null!=(t=e.match(/(www[0-9]?\.)?(.[^/:]+)(\:[\d]+)?/i))&&3<t.length&&Ct(t[2])&&0<t[2].length?t[2]+(t[3]||""):e},wt.parseFullHost=function(e,t){var n=null;return!e||null!=(e=e.match(/(\w*):\/\/(.[^/:]+)(\:[\d]+)?/i))&&2<e.length&&Ct(e[2])&&0<e[2].length&&(n=e[2]||"",t&&2<e.length&&(t=(e[1]||"").toLowerCase(),e=e[3]||"",("http"==t&&":80"===e||"https"==t&&":443"===e)&&(e=""),n+=e)),n},wt.document=T()||{},wt._htmlAnchorIdx=0,wt._htmlAnchorElement=[null,null,null,null,null],wt);function wt(){}var Ft=(At.canIncludeCorrelationHeader=function(e,t,n){if(!t||e&&e.disableCorrelationHeaders)return!1;if(e&&e.correlationHeaderExcludePatterns)for(var i=0;i<e.correlationHeaderExcludePatterns.length;i++)if(e.correlationHeaderExcludePatterns[i].test(t))return!1;var r,o=Et.parseUrl(t).host.toLowerCase();if(o&&(~o.indexOf(":443")||~o.indexOf(":80"))&&(o=(Et.parseFullHost(t,!0)||"").toLowerCase()),!(e&&e.enableCorsCorrelation||o===n))return!1;if((n=e&&e.correlationHeaderDomains)&&(W.arrForEach(n,function(e){e=RegExp(e.toLowerCase().replace(/\./g,".").replace(/\*/g,".*")),r=r||e.test(o)}),!r))return!1;var a=e&&e.correlationHeaderExcludedDomains;if(!a||0===a.length)return!0;for(i=0;i<a.length;i++)if(RegExp(a[i].toLowerCase().replace(/\./g,".").replace(/\*/g,".*")).test(o))return!1;return o&&0<o.length},At.getCorrelationContext=function(e){if((e=e&&At.getCorrelationContextValue(e,mt.requestContextTargetKey))&&e!==At.correlationIdPrefix)return e},At.getCorrelationContextValue=function(e,t){if(e)for(var n=e.split(","),i=0;i<n.length;++i){var r=n[i].split("=");if(2===r.length&&r[0]===t)return r[1]}},At.correlationIdPrefix="cid-v1:",At);function At(){}var Dt=(bt.ParseDependencyPath=function(e,t,n,i){var r,o,a,s=i,u=i,s=t&&0<t.length?(a=(r=Et.parseUrl(t)).host,s||(null!=r.pathname?("/"!=(o=0===r.pathname.length?"/":r.pathname)[0]&&(o="/"+o),u=r.pathname,St.sanitizeString(e,n?n+" "+o:o)):St.sanitizeString(e,t))):a=i;return{target:a,name:s,data:u}},bt);function bt(){}var Lt=(Mt.Now=function(){var e=I();return e&&e.now&&e.timing&&0<(e=e.now()+e.timing.navigationStart)?e:(new Date).getTime()},Mt.GetDuration=function(e,t){var n=null;return 0===e||0===t||W.isNullOrUndefined(e)||W.isNullOrUndefined(t)||(n=t-e),n},Mt);function Mt(){}var Rt="https://dc.services.visualstudio.com",Ot=(Pt.parse=function(e){if(!e)return{};var t=e.split(Pt._FIELDS_SEPARATOR),e=W.arrReduce(t,function(e,t){var n=t.split(Pt._FIELD_KEY_VALUE_SEPARATOR);return 2===n.length&&(t=n[0].toLowerCase(),n=n[1],e[t]=n),e},{});return 0<W.objKeys(e).length&&(e.endpointsuffix&&(t=e.location?e.location+".":"",e.ingestionendpoint=e.ingestionendpoint||"https://"+t+"dc."+e.endpointsuffix),e.ingestionendpoint=e.ingestionendpoint||Rt),e},Pt._FIELDS_SEPARATOR=";",Pt._FIELD_KEY_VALUE_SEPARATOR="=",Pt);function Pt(){}var kt,Ut=function(){},zt=(kt=Ut,__extends(qt,kt),qt);function qt(){return kt.call(this)||this}var jt,Gt=(jt=function(){this.ver=1,this.sampleRate=100,this.tags={}},__extends(Bt,jt),Bt);function Bt(e,t,n){var i=jt.call(this)||this;return i.name=St.sanitizeString(e,n)||Nt.NotSpecified,i.data=t,i.time=W.toISOString(new Date),i.aiDataContract={time:p.FieldType.Required,iKey:p.FieldType.Required,name:p.FieldType.Required,sampleRate:function(){return 100===i.sampleRate?p.FieldType.Hidden:p.FieldType.Required},tags:p.FieldType.Required,data:p.FieldType.Required},i}var Ht,Vt=function(){},Kt=(Ht=Vt,__extends(Wt,Ht),Wt);function Wt(){var e=Ht.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var Xt,Qt=(Xt=Kt,__extends(Jt,Xt),Jt.envelopeType="Microsoft.ApplicationInsights.{0}.Event",Jt.dataType="EventData",Jt);function Jt(e,t,n,i){var r=Xt.call(this)||this;return r.aiDataContract={ver:p.FieldType.Required,name:p.FieldType.Required,properties:p.FieldType.Default,measurements:p.FieldType.Default},r.name=St.sanitizeString(e,t)||Nt.NotSpecified,r.properties=St.sanitizeProperties(e,n),r.measurements=St.sanitizeMeasurements(e,i),r}var Yt,$t=function(){},Zt=(Yt=Vt,__extends(en,Yt),en);function en(){var e=Yt.call(this)||this;return e.ver=2,e.exceptions=[],e.properties={},e.measurements={},e}var tn,nn=function(){this.hasFullStack=!0,this.parsedStack=[]},rn="error",on=(tn=Zt,__extends(an,tn),an.CreateFromInterface=function(t,e,n,i){var r=e.exceptions&&W.arrMap(e.exceptions,function(e){return un.CreateFromInterface(t,e)});return new an(t,__assign({},e,{exceptions:r}),n,i)},an.prototype.toInterface=function(){var e=this.exceptions,t=this.properties,n=this.measurements,i=this.severityLevel,r=(this.ver,this.problemGroup),o=this.id,a=this.isManual;return{ver:"4.0",exceptions:e instanceof Array&&W.arrMap(e,function(e){return e.toInterface()})||undefined,severityLevel:i,properties:t,measurements:n,problemGroup:r,id:o,isManual:a}},an.CreateSimpleException=function(e,t,n,i,r,o){return{exceptions:[{hasFullStack:!0,message:e,stack:r,typeName:t}]}},an.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",an.dataType="ExceptionData",an);function an(e,t,n,i,r,o){var a,s=tn.call(this)||this;return s.aiDataContract={ver:p.FieldType.Required,exceptions:p.FieldType.Required,severityLevel:p.FieldType.Default,properties:p.FieldType.Default,measurements:p.FieldType.Default},"ver"in(a=t)&&"exceptions"in a&&"properties"in a?(s.exceptions=t.exceptions,s.properties=t.properties,s.measurements=t.measurements,t.severityLevel&&(s.severityLevel=t.severityLevel),t.id&&(s.id=t.id),t.problemGroup&&(s.problemGroup=t.problemGroup),s.ver=2,W.isNullOrUndefined(t.isManual)||(s.isManual=t.isManual)):(s.exceptions=[new un(e,t)],s.properties=St.sanitizeProperties(e,n)||{},s.measurements=St.sanitizeMeasurements(e,i),r&&(s.severityLevel=r),o&&(s.id=o)),s}var sn,un=(sn=nn,__extends(ln,sn),ln.prototype.toInterface=function(){var e=this.parsedStack instanceof Array&&W.arrMap(this.parsedStack,function(e){return e.toInterface()});return{id:this.id,outerId:this.outerId,typeName:this.typeName,message:this.message,hasFullStack:this.hasFullStack,stack:this.stack,parsedStack:e||undefined}},ln.CreateFromInterface=function(e,t){var n=t.parsedStack instanceof Array&&W.arrMap(t.parsedStack,function(e){return dn.CreateFromInterface(e)})||t.parsedStack;return new ln(e,__assign({},t,{parsedStack:n}))},ln.parseStack=function(e){if(W.isString(e)){for(var t=e.split("\n"),n=[],i=0,r=0,o=0;o<=t.length;o++){var a=t[o];dn.regex.test(a)&&(r+=(a=new dn(t[o],i++)).sizeInBytes,n.push(a))}if(32768<r)for(var s=0,u=n.length-1,l=0,c=s,d=u;s<u;){if(32768<(l+=n[s].sizeInBytes+n[u].sizeInBytes)){var f=d-c+1;n.splice(c,f);break}c=s,d=u,s++,u--}}return n},ln);function ln(e,t){var n,i=sn.call(this)||this;return i.aiDataContract={id:p.FieldType.Default,outerId:p.FieldType.Default,typeName:p.FieldType.Required,message:p.FieldType.Required,hasFullStack:p.FieldType.Default,stack:p.FieldType.Default,parsedStack:p.FieldType.Array},"hasFullStack"in(n=t)&&"typeName"in n?(i.typeName=t.typeName,i.message=t.message,i.stack=t.stack,i.parsedStack=t.parsedStack,i.hasFullStack=t.hasFullStack):(n=t,Nt.isError(n)||(n=n[rn]||n.evt||n),i.typeName=St.sanitizeString(e,function(e){var t="";if(e&&!(t=e.typeName||e.name||""))try{var n=/function (.{1,})\(/.exec(e.constructor.toString()),t=n&&1<n.length?n[1]:""}catch(i){}return t}(n))||Nt.NotSpecified,i.message=St.sanitizeMessage(e,t.message)||Nt.NotSpecified,t=t.stack,i.parsedStack=ln.parseStack(t),i.stack=St.sanitizeException(e,t),i.hasFullStack=Nt.isArray(i.parsedStack)&&0<i.parsedStack.length),i}var cn,dn=(cn=$t,__extends(fn,cn),fn.CreateFromInterface=function(e){return new fn(e,null)},fn.prototype.toInterface=function(){return{level:this.level,method:this.method,assembly:this.assembly,fileName:this.fileName,line:this.line}},fn.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,fn.baseSize=58,fn);function fn(e,t){var n,i=cn.call(this)||this;return i.sizeInBytes=0,i.aiDataContract={level:p.FieldType.Required,method:p.FieldType.Required,assembly:p.FieldType.Default,fileName:p.FieldType.Default,line:p.FieldType.Default},"string"==typeof e?(n=e,i.level=t,i.method="<no_method>",i.assembly=Nt.trim(n),i.fileName="",i.line=0,(n=n.match(fn.regex))&&5<=n.length&&(i.method=Nt.trim(n[2])||i.method,i.fileName=Nt.trim(n[4]),i.line=parseInt(n[5])||0)):(i.level=e.level,i.method=e.method,i.assembly=e.assembly,i.fileName=e.fileName,i.line=e.line,i.sizeInBytes=0),i.sizeInBytes+=i.method.length,i.sizeInBytes+=i.fileName.length,i.sizeInBytes+=i.assembly.length,i.sizeInBytes+=fn.baseSize,i.sizeInBytes+=i.level.toString().length,i.sizeInBytes+=i.line.toString().length,i}var pn,gn,hn=(pn=Vt,__extends(vn,pn),vn);function vn(){var e=pn.call(this)||this;return e.ver=2,e.metrics=[],e.properties={},e.measurements={},e}(zn=gn={})[zn.Measurement=0]="Measurement",zn[zn.Aggregation=1]="Aggregation";var mn,yn=(mn=function(){this.kind=gn.Measurement},__extends(Sn,mn),Sn);function Sn(){var e=mn.apply(this,arguments)||this;return e.aiDataContract={name:p.FieldType.Required,kind:p.FieldType.Default,value:p.FieldType.Required,count:p.FieldType.Default,min:p.FieldType.Default,max:p.FieldType.Default,stdDev:p.FieldType.Default},e}var xn,Tn=(xn=hn,__extends(Cn,xn),Cn.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",Cn.dataType="MetricData",Cn);function Cn(e,t,n,i,r,o,a,s){var u=xn.call(this)||this;u.aiDataContract={ver:p.FieldType.Required,metrics:p.FieldType.Required,properties:p.FieldType.Default};var l=new yn;return l.count=0<i?i:undefined,l.max=isNaN(o)||null===o?undefined:o,l.min=isNaN(r)||null===r?undefined:r,l.name=St.sanitizeString(e,t)||Nt.NotSpecified,l.value=n,u.metrics=[l],u.properties=St.sanitizeProperties(e,a),u.measurements=St.sanitizeMeasurements(e,s),u}var In,Nn=(In=Kt,__extends(_n,In),_n);function _n(){var e=In.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var En,Ke=(En=Nn,__extends(wn,En),wn.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",wn.dataType="PageviewData",wn);function wn(e,t,n,i,r,o,a){var s=En.call(this)||this;return s.aiDataContract={ver:p.FieldType.Required,name:p.FieldType.Default,url:p.FieldType.Default,duration:p.FieldType.Default,properties:p.FieldType.Default,measurements:p.FieldType.Default,id:p.FieldType.Default},s.id=St.sanitizeId(e,a),s.url=St.sanitizeUrl(e,n),s.name=St.sanitizeString(e,t)||Nt.NotSpecified,isNaN(i)||(s.duration=Nt.msToTimeSpan(i)),s.properties=St.sanitizeProperties(e,r),s.measurements=St.sanitizeMeasurements(e,o),s}var Fn,rt=(Fn=Vt,__extends(An,Fn),An);function An(){var e=Fn.call(this)||this;return e.ver=2,e.success=!0,e.properties={},e.measurements={},e}var Dn,dt=(Dn=rt,__extends(bn,Dn),bn.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",bn.dataType="RemoteDependencyData",bn);function bn(e,t,n,i,r,o,a,s,u,l,c,d){void 0===u&&(u="Ajax");var f=Dn.call(this)||this;return f.aiDataContract={id:p.FieldType.Required,ver:p.FieldType.Required,name:p.FieldType.Default,resultCode:p.FieldType.Default,duration:p.FieldType.Default,success:p.FieldType.Default,data:p.FieldType.Default,target:p.FieldType.Default,type:p.FieldType.Default,properties:p.FieldType.Default,measurements:p.FieldType.Default,kind:p.FieldType.Default,value:p.FieldType.Default,count:p.FieldType.Default,min:p.FieldType.Default,max:p.FieldType.Default,stdDev:p.FieldType.Default,dependencyKind:p.FieldType.Default,dependencySource:p.FieldType.Default,commandName:p.FieldType.Default,dependencyTypeName:p.FieldType.Default},f.id=t,f.duration=Nt.msToTimeSpan(r),f.success=o,f.resultCode=a+"",f.type=St.sanitizeString(e,u),s=Dt.ParseDependencyPath(e,n,s,i),f.data=St.sanitizeUrl(e,i)||s.data,f.target=St.sanitizeString(e,s.target),l&&(f.target=f.target+" | "+l),f.name=St.sanitizeString(e,s.name),f.properties=St.sanitizeProperties(e,c),f.measurements=St.sanitizeMeasurements(e,d),f}var Ln,Zt=(Ln=Vt,__extends(Mn,Ln),Mn);function Mn(){var e=Ln.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var Rn,nn=(Rn=Zt,__extends(On,Rn),On.envelopeType="Microsoft.ApplicationInsights.{0}.Message",On.dataType="MessageData",On);function On(e,t,n,i,r){var o=Rn.call(this)||this;return o.aiDataContract={ver:p.FieldType.Required,message:p.FieldType.Required,severityLevel:p.FieldType.Default,properties:p.FieldType.Default},t=t||Nt.NotSpecified,o.message=St.sanitizeMessage(e,t),o.properties=St.sanitizeProperties(e,i),o.measurements=St.sanitizeMeasurements(e,r),n&&(o.severityLevel=n),o}var Pn,$t=(Pn=Nn,__extends(kn,Pn),kn);function kn(){var e=Pn.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var Un,zn=(Un=$t,__extends(qn,Un),qn.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",qn.dataType="PageviewPerformanceData",qn);function qn(e,t,n,i,r,o,a){var s=Un.call(this)||this;return s.aiDataContract={ver:p.FieldType.Required,name:p.FieldType.Default,url:p.FieldType.Default,duration:p.FieldType.Default,perfTotal:p.FieldType.Default,networkConnect:p.FieldType.Default,sentRequest:p.FieldType.Default,receivedResponse:p.FieldType.Default,domProcessing:p.FieldType.Default,properties:p.FieldType.Default,measurements:p.FieldType.Default},s.url=St.sanitizeUrl(e,n),s.name=St.sanitizeString(e,t)||Nt.NotSpecified,s.properties=St.sanitizeProperties(e,r),s.measurements=St.sanitizeMeasurements(e,o),a&&(s.domProcessing=a.domProcessing,s.duration=a.duration,s.networkConnect=a.networkConnect,s.perfTotal=a.perfTotal,s.receivedResponse=a.receivedResponse,s.sentRequest=a.sentRequest),s}var jn,hn=(jn=zt,__extends(Gn,jn),Gn);function Gn(e,t){var n=jn.call(this)||this;return n.aiDataContract={baseType:p.FieldType.Required,baseData:p.FieldType.Required},n.baseType=e,n.baseData=t,n}function Bn(){}function Hn(){}function Vn(){}(Kt=p.SeverityLevel||(p.SeverityLevel={}))[Kt.Verbose=0]="Verbose",Kt[Kt.Information=1]="Information",Kt[Kt.Warning=2]="Warning",Kt[Kt.Error=3]="Error",Kt[Kt.Critical=4]="Critical",Bn.getConfig=function(e,t,n,i){return void 0===i&&(i=!1),t=(n&&e.extensionConfig&&e.extensionConfig[n]&&!W.isNullOrUndefined(e.extensionConfig[n][t])?e.extensionConfig[n]:e)[t],W.isNullOrUndefined(t)?i:t},rt=Bn,Vt=function(){this.applicationVersion="ai.application.ver",this.applicationBuild="ai.application.build",this.applicationTypeId="ai.application.typeId",this.applicationId="ai.application.applicationId",this.applicationLayer="ai.application.layer",this.deviceId="ai.device.id",this.deviceIp="ai.device.ip",this.deviceLanguage="ai.device.language",this.deviceLocale="ai.device.locale",this.deviceModel="ai.device.model",this.deviceFriendlyName="ai.device.friendlyName",this.deviceNetwork="ai.device.network",this.deviceNetworkName="ai.device.networkName",this.deviceOEMName="ai.device.oemName",this.deviceOS="ai.device.os",this.deviceOSVersion="ai.device.osVersion",this.deviceRoleInstance="ai.device.roleInstance",this.deviceRoleName="ai.device.roleName",this.deviceScreenResolution="ai.device.screenResolution",this.deviceType="ai.device.type",this.deviceMachineName="ai.device.machineName",this.deviceVMName="ai.device.vmName",this.deviceBrowser="ai.device.browser",this.deviceBrowserVersion="ai.device.browserVersion",this.locationIp="ai.location.ip",this.locationCountry="ai.location.country",this.locationProvince="ai.location.province",this.locationCity="ai.location.city",this.operationId="ai.operation.id",this.operationName="ai.operation.name",this.operationParentId="ai.operation.parentId",this.operationRootId="ai.operation.rootId",this.operationSyntheticSource="ai.operation.syntheticSource",this.operationCorrelationVector="ai.operation.correlationVector",this.sessionId="ai.session.id",this.sessionIsFirst="ai.session.isFirst",this.sessionIsNew="ai.session.isNew",this.userAccountAcquisitionDate="ai.user.accountAcquisitionDate",this.userAccountId="ai.user.accountId",this.userAgent="ai.user.userAgent",this.userId="ai.user.id",this.userStoreRegion="ai.user.storeRegion",this.userAuthUserId="ai.user.authUserId",this.userAnonymousUserAcquisitionDate="ai.user.anonUserAcquisitionDate",this.userAuthenticatedUserAcquisitionDate="ai.user.authUserAcquisitionDate",this.cloudName="ai.cloud.name",this.cloudRole="ai.cloud.role",this.cloudRoleVer="ai.cloud.roleVer",this.cloudRoleInstance="ai.cloud.roleInstance",this.cloudEnvironment="ai.cloud.environment",this.cloudLocation="ai.cloud.location",this.cloudDeploymentUnit="ai.cloud.deploymentUnit",this.internalNodeName="ai.internal.nodeName",this.internalSdkVersion="ai.internal.sdkVersion",this.internalAgentVersion="ai.internal.agentVersion",this.internalSnippet="ai.internal.snippet",this.internalSdkSrc="ai.internal.sdkSrc"},Hn.create=function(e,t,n,i,r,o){if(n=St.sanitizeString(i,n)||Nt.NotSpecified,W.isNullOrUndefined(e)||W.isNullOrUndefined(t)||W.isNullOrUndefined(n))throw Error("Input doesn't contain all required fields");var a={name:n,time:W.toISOString(new Date),iKey:"",ext:o||{},tags:[],data:{},baseType:t,baseData:e};return W.isNullOrUndefined(r)||K(r,function(e,t){a.data[e]=t}),a},Zt=Hn,Vn.UserExt="user",Vn.DeviceExt="device",Vn.TraceExt="trace",Vn.WebExt="web",Vn.AppExt="app",Vn.OSExt="os",Vn.SessionExt="ses",Vn.SDKExt="sdk",$t=Vn,Kt=new Vt,p.PropertiesPluginIdentifier="AppInsightsPropertiesPlugin",p.BreezeChannelIdentifier="AppInsightsChannelPlugin",p.AnalyticsPluginIdentifier="ApplicationInsightsAnalytics",p.Util=Nt,p.CorrelationIdHelper=Ft,p.UrlHelper=Et,p.DateTimeUtils=Lt,p.ConnectionStringParser=Ot,p.RequestHeaders=mt,p.DisabledPropertyName="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",p.ProcessLegacy="ProcessLegacy",p.SampleRate="sampleRate",p.HttpMethod="http.method",p.DEFAULT_BREEZE_ENDPOINT=Rt,p.AIData=zt,p.AIBase=Ut,p.Envelope=Gt,p.Event=Qt,p.Exception=on,p.Metric=Tn,p.PageView=Ke,p.PageViewData=Nn,p.RemoteDependencyData=dt,p.Trace=nn,p.PageViewPerformance=zn,p.Data=hn,p.ConfigurationManager=rt,p.ContextTagKeys=Vt,p.DataSanitizer=St,p.TelemetryItemCreator=Zt,p.CtxTagKeys=Kt,p.Extensions=$t,function(e,t,n){var i=Object.defineProperty;if(i)try{return i(e,t,n)}catch(r){}typeof n.value!==undefined&&(e[t]=n.value)}(p,"__esModule",{value:!0})};"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e.Microsoft=e.Microsoft||{},e.Microsoft.ApplicationInsights=e.Microsoft.ApplicationInsights||{}));
var e=this,t=function(m){"use strict";var o="function",s="object",t="undefined",a="prototype",l="hasOwnProperty";function e(){return typeof globalThis!==t&&globalThis?globalThis:typeof self!==t&&self?self:typeof window!==t&&window?window:typeof global!==t&&global?global:null}function r(e){var t=Object.create;if(t)return t(e);if(null==e)return{};if((t=typeof e)!==s&&t!==o)throw new TypeError("Object prototype may only be an Object:"+e);function n(){}return n[a]=e,new n}var u,i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t[l](n)&&(e[n]=t[n])})(e,t)},n=function(e,t){function n(){this.constructor=e}i(e,t),e[a]=null===t?r(t):(n[a]=t[a],new n)};(Ln=On=e()||{}).__assign||(Ln.__assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object[a][l].call(t,i)&&(e[i]=t[i]);return e}),Ln.__extends||(Ln.__extends=n),__assign=__assign||On.__assign,__extends=__extends||On.__extends,(Hn=u=u||{})[Hn.CRITICAL=1]="CRITICAL",Hn[Hn.WARNING=2]="WARNING";var c={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},d="attachEvent",p="addEventListener",f="detachEvent",g="removeEventListener",v=(Wn=Object)[a],h=v.hasOwnProperty,y=Wn.defineProperty;function S(e){return v.toString.call(e)}function T(e){return e===undefined||typeof e===t}function I(e){return null===e||T(e)}function x(e){return!I(e)}function C(e){return typeof e===s}function F(e){return typeof e===o}function N(e,t,n,r){void 0===r&&(r=!1);var i=!1;if(!I(e))try{I(e[p])?I(e[d])||(e[d]("on"+t,n),i=!0):(e[p](t,n,r),i=!0)}catch(a){}return i}function A(e,t,n,r){if(void 0===r&&(r=!1),!I(e))try{I(e[g])?I(e[f])||e[f]("on"+t,n):e[g](t,n,r)}catch(i){}}function E(e,t){if(e)for(var n in e)h.call(e,n)&&t.call(e,n,e[n])}function D(e,t){return!(!e||!t||!~e.indexOf(t))}function w(e){return"[object Date]"===S(e)}function _(e){return"[object Array]"===S(e)}function b(e){return"[object Error]"===S(e)}function M(e){return"string"==typeof e}function R(e){return"boolean"==typeof e}function k(e){if(w(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"}}function L(e,t,n){for(var r=e.length,i=0;i<r&&!(i in e&&-1===t.call(n||e,e[i],i,e));i++);}function P(e,t,n){for(var r=e.length,i=Math.max(0<=(n=n||0)?n:r-Math.abs(n),0);i<r;i++)if(i in e&&e[i]===t)return i;return-1}function z(e,t,n){for(var r=e.length,i=n||e,a=Array(r),o=0;o<r;o++)o in e&&(a[o]=t.call(i,e[o],e));return a}function G(e,t,n){var r,i=e.length,a=0;if(3<=arguments.length)r=n;else{for(;a<i&&!(a in e);)a++;r=e[a++]}for(;a<i;)a in e&&(r=t(r,e[a],a,e)),a++;return r}function U(e){return"string"!=typeof e?e:e.replace(/^\s+|\s+$/g,"")}var O=!{toString:null}.propertyIsEnumerable("toString"),B=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];function q(e){var t=typeof e;if(t!==o&&(t!==s||null===e))throw new TypeError("objKeys called on non-object");var n,r=[];for(n in e)e&&h.call(e,n)&&r.push(n);if(O)for(var i=B.length,a=0;a<i;a++)e&&h.call(e,B[a])&&r.push(B[a]);return r}function H(e,t,n,r){if(y)try{var i={enumerable:!0,configurable:!0};return n&&(i.get=n),r&&(i.set=r),y(e,t,i),!0}catch(a){}return!1}function V(){var e=Date;return e.now?e.now():(new e).getTime()}function j(e){return b(e)?e.name:""}function W(e,t,n,r,i){var a=n;return e&&((a=e[t])===n||i&&!i(a)||r&&!r(n)||(e[t]=a=n)),a}function X(e){return!!e}var K=s,J="window",Y="document",Z="navigator",$="location",Q="performance",ee="JSON",te="crypto",ne="msCrypto",re="msie",ie="trident/",ae=null,oe=null,se=e;function le(e){var t=se();return t&&t[e]?t[e]:e===J&&ue()?window:null}function ue(){return typeof window===K&&window}function ce(){return typeof document===K&&document?document:le(Y)}function de(){return typeof navigator===K&&navigator?navigator:le(Z)}function pe(){return le(Q)}function fe(){return typeof JSON===K&&JSON||null!==le(ee)}function ge(){return fe()?JSON||le(ee):null}function me(){var e=de();return!e||e.userAgent===oe&&null!==ae||(e=((oe=e.userAgent)||"").toLowerCase(),ae=D(e,re)||D(e,ie)),ae}function ve(e){var t=Object[a].toString.call(e),n="";return"[object Error]"===t?n="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":fe()&&(n=ge().stringify(e)),t+n}var he="toGMTString",ye="toUTCString",Se="cookie",Te="expires",Ie="enabled",xe="isCookieUseDisabled",Ce="disableCookiesUsage",Fe="_ckMgr",Ne="",Ae=null,Ee=null,De=null,we=ce(),_e={},be={};function Me(e){return!e||e.isEnabled()}function Re(e,r){var t,n,l=(W(n=(t=e||be).cookieCfg=t.cookieCfg||{},"domain",t.cookieDomain,x,I),W(n,"path",t.cookiePath||"/",null,I),I(n[Ie])&&(e=void 0,T(t[xe])||(e=!t[xe]),T(t[Ce])||(e=!t[Ce]),n[Ie]=e),n),u=l.path||"/",c=l.domain,i=!1!==l[Ie],d={isEnabled:function(){var e=i&&ke(r),t=be[Fe];return e&&t&&d!==t?Me(t):e},setEnabled:function(e){i=!1!==e},set:function(e,t,n,r,i){var a,o,s;Me(d)&&(a={},-1!=(s=(o=U(t||Ne)).indexOf(";"))&&(o=U(t.substring(0,s)),a=Le(t.substring(1+s))),W(a,"domain",r||c,X,T),I(n)||(t=me(),!T(a[Te])||0<(s=V()+1e3*n)&&((r=new Date).setTime(s),W(a,Te,Pe(r,t?he:ye)||Pe(r,t?he:ye)||Ne,X)),t||W(a,"max-age",Ne+n,null,T)),(n=typeof location===K&&location?location:le($))&&"https:"===n.protocol&&(W(a,"secure",null,null,T),(Ee=null===Ee?!Ue((de()||{}).userAgent):Ee)&&W(a,"SameSite","None",null,T)),W(a,"path",i||u,null,T),(l.setCookie||Ge)(e,ze(o,a)))},get:function(e){var t=Ne;return Me(d)?(l.getCookie||function(e){var t,n=Ne;return we&&(t=we[Se]||Ne,De!==t&&(_e=Le(t),De=t),n=U(_e[e]||Ne)),n})(e):t},del:function(e,t){Me(d)&&d.purge(e,t)},purge:function(e,t){var n;ke(r)&&((n={}).path=t||"/",n[Te]="Thu, 01 Jan 1970 00:00:01 GMT",me()||(n["max-age"]="0"),(l.delCookie||Ge)(e,ze(Ne,n)))}};return d[Fe]=d}function ke(e){if(null===Ae){Ae=!1;try{Ae=(we||{})[Se]!==undefined}catch(t){e&&e.throwInternal(u.WARNING,c.CannotAccessCookie,"Cannot access document.cookie - "+j(t),{exception:ve(t)})}}return Ae}function Le(e){var n={};return e&&e.length&&L(U(e).split(";"),function(e){var t;(e=U(e||Ne))&&(-1==(t=e.indexOf("="))?n[e]=null:n[U(e.substring(0,t))]=U(e.substring(1+t)))}),n}function Pe(e,t){return F(e[t])?e[t]():null}function ze(e,t){var n=e||Ne;return E(t,function(e,t){n+="; "+e+(I(t)?Ne:"="+t)}),n}function Ge(e,t){we&&(we[Se]=e+"="+t)}function Ue(e){return!(!M(e)||!D(e,"CPU iPhone OS 12")&&!D(e,"iPad; CPU OS 12")&&!(D(e,"Macintosh; Intel Mac OS X 10_14")&&D(e,"Version/")&&D(e,"Safari"))&&(!D(e,"Macintosh; Intel Mac OS X 10_14")||!function(e,t){if(e){var n=e.length;if(e===t)return 1;if(40<=n){for(var r=n-1,i=39;0<=i;i--){if(e[r]!=t[i])return;r--}return 1}}}(e,"AppleWebKit/605.1.15 (KHTML, like Gecko)"))&&!D(e,"Chrome/5")&&!D(e,"Chrome/6")&&(!D(e,"UnrealEngine")||D(e,"Chrome"))&&!D(e,"UCBrowser/12")&&!D(e,"UCBrowser/11"))}var Oe=4294967296,Be=4294967295,qe=!1,He=123456789,Ve=987654321;function je(e){e<0&&(e>>>=0),He=123456789+e&Be,Ve=987654321-e&Be,qe=!0}function We(){try{var e=2147483647&V();je((Math.random()*Oe^e)+e)}catch(t){}}function Xe(e){return 0<e?Math.floor(Ke()/Be*(e+1))>>>0:0}function Ke(e){var t=(t=le(te)||le(ne))&&t.getRandomValues?t.getRandomValues(new Uint32Array(1))[0]&Be:me()?(qe||We(),Je()&Be):Math.floor(Oe*Math.random()|0);return e||(t>>>=0),t}function Je(e){var t=((Ve=36969*(65535&Ve)+(Ve>>16)&Be)<<16)+(65535&(He=18e3*(65535&He)+(He>>16)&Be))>>>0&Be|0;return e||(t>>>=0),t}var Ye,Ze=null;function $e(e){void 0===e&&(e=22);for(var t=Ke()>>>0,n=0,r="";r.length<e;)r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[0|63&t]||"",t>>>=6,5==++n&&(t=(Ke()<<2&4294967295|3&t)>>>0,n=0);return r}function Qe(){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=Ke())]+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 i=t[8+(3&Ke())|0];return n.substr(0,8)+n.substr(9,4)+"4"+n.substr(13,3)+i+n.substr(16,3)+n.substr(19,12)}var et={_canUseCookies:undefined,isTypeof:function(e,t){return typeof e===t},isUndefined:T,isNullOrUndefined:I,hasOwnProperty:function(e,t){return e&&h.call(e,t)},isFunction:F,isObject:C,isDate:w,isArray:_,isError:b,isString:M,isNumber:function(e){return"number"==typeof e},isBoolean:R,toISOString:k,arrForEach:L,arrIndexOf:P,arrMap:z,arrReduce:G,strTrim:U,objCreate:r,objKeys:q,objDefineAccessors:H,addEventHandler:function(e,t){var n=!1,r=ue()?window:le(J);return r&&(n=N(r,e,t),n=N(r.body,e,t)||n),(r=ce())&&nt.Attach(r,e,t)||n},dateNow:V,isIE:me,disableCookies:it,newGuid:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(tt,function(e){var t=0|Xe(15);return("x"===e?t:3&t|8).toString(16)})},perfNow:function(){var e=pe();return e&&e.now?e.now():V()},newId:$e,randomValue:Xe,random32:Ke,mwcRandomSeed:function(e){e?je(e):We()},mwcRandom32:Je,generateW3CId:Qe},tt=/[xy]/g,nt={Attach:N,AttachEvent:N,Detach:A,DetachEvent:A};function rt(e,t){var n,e=(n=e,e=t,(t=Re[Fe]||be[Fe])||(t=Re[Fe]=Re(n,e),be[Fe]=t),t),t=et._canUseCookies;return null===Ze&&(Ze=[],Ye=t,H(et,"_canUseCookies",function(){return Ye},function(t){Ye=t,L(Ze,function(e){e.setEnabled(t)})})),-1===P(Ze,e)&&Ze.push(e),R(t)&&e.setEnabled(t),R(Ye)&&e.setEnabled(Ye),e}function it(){rt().setEnabled(!1)}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=(st.sanitizeKeyAndAddUniqueness=function(e,t,n){var r=t.length,i=st.sanitizeKey(e,t);if(i.length!==r){for(var a=0,o=i;n[o]!==undefined;)a++,o=i.substring(0,st.MAX_NAME_LENGTH-3)+st.padNumber(a);i=o}return i},st.sanitizeKey=function(e,t){var n;return t&&(t=st.trim(t.toString())).length>st.MAX_NAME_LENGTH&&(n=t.substring(0,st.MAX_NAME_LENGTH),e.throwInternal(u.WARNING,c.NameTooLong,"name is too long. It has been truncated to "+st.MAX_NAME_LENGTH+" characters.",{name:t},!0)),n||t},st.sanitizeString=function(e,t,n){var r;return void 0===n&&(n=st.MAX_STRING_LENGTH),t&&(n=n||st.MAX_STRING_LENGTH,(t=st.trim(t)).toString().length>n&&(r=t.toString().substring(0,n),e.throwInternal(u.WARNING,c.StringValueTooLong,"string value is too long. It has been truncated to "+n+" characters.",{value:t},!0))),r||t},st.sanitizeUrl=function(e,t){return st.sanitizeInput(e,t,st.MAX_URL_LENGTH,c.UrlTooLong)},st.sanitizeMessage=function(e,t){var n;return t&&t.length>st.MAX_MESSAGE_LENGTH&&(n=t.substring(0,st.MAX_MESSAGE_LENGTH),e.throwInternal(u.WARNING,c.MessageTruncated,"message is too long, it has been truncated to "+st.MAX_MESSAGE_LENGTH+" characters.",{message:t},!0)),n||t},st.sanitizeException=function(e,t){var n;return t&&t.length>st.MAX_EXCEPTION_LENGTH&&(n=t.substring(0,st.MAX_EXCEPTION_LENGTH),e.throwInternal(u.WARNING,c.ExceptionTruncated,"exception is too long, it has been truncated to "+st.MAX_EXCEPTION_LENGTH+" characters.",{exception:t},!0)),n||t},st.sanitizeProperties=function(r,e){var i;return e&&(i={},E(e,function(e,t){if(C(t)&&fe())try{t=ge().stringify(t)}catch(n){r.throwInternal(u.WARNING,c.CannotSerializeObjectNonSerializable,"custom property is not valid",{exception:n},!0)}t=st.sanitizeString(r,t,st.MAX_PROPERTY_LENGTH),e=st.sanitizeKeyAndAddUniqueness(r,e,i),i[e]=t}),e=i),e},st.sanitizeMeasurements=function(n,e){var r;return e&&(r={},E(e,function(e,t){e=st.sanitizeKeyAndAddUniqueness(n,e,r),r[e]=t}),e=r),e},st.sanitizeId=function(e,t){return t&&st.sanitizeInput(e,t,st.MAX_ID_LENGTH,c.IdTooLong).toString()},st.sanitizeInput=function(e,t,n,r){var i;return t&&(t=st.trim(t)).length>n&&(i=t.substring(0,n),e.throwInternal(u.WARNING,r,"input is too long, it has been truncated to "+n+" characters.",{data:t},!0)),i||t},st.padNumber=function(e){return(e="00"+e).substr(e.length-3)},st.trim=function(e){return M(e)?e.replace(/^\s+|\s+$/g,""):e},st.MAX_NAME_LENGTH=150,st.MAX_ID_LENGTH=128,st.MAX_PROPERTY_LENGTH=8192,st.MAX_STRING_LENGTH=1024,st.MAX_URL_LENGTH=2048,st.MAX_MESSAGE_LENGTH=32768,st.MAX_EXCEPTION_LENGTH=32768,st);function st(){}function lt(e){var t,n=null;return F(Event)?n=new Event(e):(t=ce())&&t.createEvent&&(n=t.createEvent("Event")).initEvent(e,!0,!0),n}function ut(e,t){return void 0===t&&(t=!1),e===undefined||null===e?t:"true"==e.toString().toLowerCase()}function ct(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,i=""+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+".":"")+(i=i.length<2?"0"+i:i)+":"+r+":"+n+"."+t}function dt(){var e=de();return"sendBeacon"in e&&e.sendBeacon}function pt(e,t){var n=null;return L(e,function(e){if(e.identifier===t)return n=e,-1}),n}function ft(e,t,n,r,i){return!i&&M(e)&&("Script error."===e||"Script error"===e)}var gt,mt="https://dc.services.visualstudio.com",vt="not_specified";(nr=gt=gt||{})[nr.LocalStorage=0]="LocalStorage",nr[nr.SessionStorage=1]="SessionStorage",m.FieldType=void 0,(Kn=m.FieldType||(m.FieldType={}))[Kn.Default=0]="Default",Kn[Kn.Required=1]="Required",Kn[Kn.Array=2]="Array",Kn[Kn.Hidden=4]="Hidden",m.DistributedTracingModes=void 0,(Qn=m.DistributedTracingModes||(m.DistributedTracingModes={}))[Qn.AI=0]="AI",Qn[Qn.AI_AND_W3C=1]="AI_AND_W3C",Qn[Qn.W3C=2]="W3C";var ht=undefined,yt=undefined;function St(){return Ct()?Tt(gt.LocalStorage):null}function Tt(e){try{if(I(se()))return null;var t=new Date,n=le(e===gt.LocalStorage?"localStorage":"sessionStorage");n.setItem(t.toString(),t.toString());var r=n.getItem(t.toString())!==t.toString();if(n.removeItem(t.toString()),!r)return n}catch(i){}return null}function It(){return Et()?Tt(gt.SessionStorage):null}function xt(){yt=ht=!1}function Ct(){return ht=ht===undefined?!!Tt(gt.LocalStorage):ht}function Ft(e,t){var n=St();if(null!==n)try{return n.getItem(t)}catch(r){ht=!1,e.throwInternal(u.WARNING,c.BrowserCannotReadLocalStorage,"Browser failed read of local storage. "+j(r),{exception:ve(r)})}return null}function Nt(e,t,n){var r=St();if(null!==r)try{return r.setItem(t,n),!0}catch(i){ht=!1,e.throwInternal(u.WARNING,c.BrowserCannotWriteLocalStorage,"Browser failed write to local storage. "+j(i),{exception:ve(i)})}return!1}function At(e,t){var n=St();if(null!==n)try{return n.removeItem(t),!0}catch(r){ht=!1,e.throwInternal(u.WARNING,c.BrowserFailedRemovalFromLocalStorage,"Browser failed removal of local storage item. "+j(r),{exception:ve(r)})}return!1}function Et(){return yt=yt===undefined?!!Tt(gt.SessionStorage):yt}function Dt(){var t=[];return Et()&&E(le("sessionStorage"),function(e){t.push(e)}),t}function wt(e,t){var n=It();if(null!==n)try{return n.getItem(t)}catch(r){yt=!1,e.throwInternal(u.WARNING,c.BrowserCannotReadSessionStorage,"Browser failed read of session storage. "+j(r),{exception:ve(r)})}return null}function _t(e,t,n){var r=It();if(null!==r)try{return r.setItem(t,n),!0}catch(i){yt=!1,e.throwInternal(u.WARNING,c.BrowserCannotWriteSessionStorage,"Browser failed write to session storage. "+j(i),{exception:ve(i)})}return!1}function bt(e,t){var n=It();if(null!==n)try{return n.removeItem(t),!0}catch(r){yt=!1,e.throwInternal(u.WARNING,c.BrowserFailedRemovalFromSessionStorage,"Browser failed removal of session storage item. "+j(r),{exception:ve(r)})}return!1}var Mt=ce()||{},Rt=0,kt=[null,null,null,null,null];function Lt(e){var t=Rt,n=kt,r=n[t];return Mt.createElement?n[t]||(r=n[t]=Mt.createElement("a")):r={host:Ut(e,!0)},r.href=e,++t>=n.length&&(t=0),Rt=t,r}function Pt(e){return(e=Lt(e))?e.href:void 0}function zt(e){return(e=Lt(e))?e.pathname:void 0}function Gt(e,t){return e?e.toUpperCase()+" "+t:t}function Ut(e,t){return(e=Ot(e,t))&&null!=(t=e.match(/(www[0-9]?\.)?(.[^/:]+)(\:[\d]+)?/i))&&3<t.length&&M(t[2])&&0<t[2].length?t[2]+(t[3]||""):e}function Ot(e,t){var n=null;return!e||null!=(e=e.match(/(\w*):\/\/(.[^/:]+)(\:[\d]+)?/i))&&2<e.length&&M(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 Bt=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"];function qt(e){return!!~Bt.indexOf(e.toLowerCase())}var Ht={NotSpecified:vt,createDomEvent:lt,disableStorage:xt,isInternalApplicationInsightsEndpoint:qt,canUseLocalStorage:Ct,getStorage:Ft,setStorage:Nt,removeStorage:At,canUseSessionStorage:Et,getSessionStorageKeys:Dt,getSessionStorage:wt,setSessionStorage:_t,removeSessionStorage:bt,disableCookies:it,canUseCookies:function(e){return rt(null,e).isEnabled()},disallowsSameSiteNone:Ue,setCookie:function(e,t,n,r){rt(null,e).set(t,n,null,r)},stringToBoolOrDefault:ut,getCookie:function(e,t){return rt(null,e).get(t)},deleteCookie:function(e,t){return rt(null,e).del(t)},trim:U,newId:$e,random32:function(){return Ke(!0)},generateW3CId:Qe,isArray:_,isError:b,isDate:w,toISOStringForIE8:k,getIEVersion:function(e){var t=(e=void 0===e?null:e)?e.toLowerCase():"";return D(t=e?t:(e=de()||{})?(e.userAgent||"").toLowerCase():"",re)?parseInt(t.split(re)[1]):D(t,ie)&&(t=parseInt(t.split(ie)[1]))?t+4:null},msToTimeSpan:ct,isCrossOriginError:ft,dump:ve,getExceptionName:j,addEventHandler:N,IsBeaconApiSupported:dt,getExtension:pt},Vt={parseUrl:Lt,getAbsoluteUrl:Pt,getPathName:zt,getCompleteUrl:Gt,parseHost:Ut,parseFullHost:Ot},jt={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 i,a=Lt(t).host.toLowerCase();if(a&&(~a.indexOf(":443")||~a.indexOf(":80"))&&(a=(Ot(t,!0)||"").toLowerCase()),!(e&&e.enableCorsCorrelation||a===n))return!1;if((n=e&&e.correlationHeaderDomains)&&(L(n,function(e){e=RegExp(e.toLowerCase().replace(/\./g,".").replace(/\*/g,".*")),i=i||e.test(a)}),!i))return!1;var o=e&&e.correlationHeaderExcludedDomains;if(!o||0===o.length)return!0;for(r=0;r<o.length;r++)if(RegExp(o[r].toLowerCase().replace(/\./g,".").replace(/\*/g,".*")).test(a))return!1;return a&&0<a.length},getCorrelationContext:function(e){if((e=e&&jt.getCorrelationContextValue(e,at.requestContextTargetKey))&&e!==jt.correlationIdPrefix)return e},getCorrelationContextValue:function(e,t){if(e)for(var n=e.split(","),r=0;r<n.length;++r){var i=n[r].split("=");if(2===i.length&&i[0]===t)return i[1]}}};function Wt(){var e=pe();return e&&e.now&&e.timing&&0<(e=e.now()+e.timing.navigationStart)?e:V()}function Xt(e,t){return 0===e||0===t||I(e)||I(t)?null:t-e}var Kt={Now:Wt,GetDuration:Xt};function Jt(e){if(!e)return{};var t=G(e.split(";"),function(e,t){var n=t.split("=");return 2===n.length&&(t=n[0].toLowerCase(),n=n[1],e[t]=n),e},{});return 0<q(t).length&&(t.endpointsuffix&&(e=t.location?t.location+".":"",t.ingestionendpoint=t.ingestionendpoint||"https://"+e+"dc."+t.endpointsuffix),t.ingestionendpoint=t.ingestionendpoint||mt),t}var Yt,Zt={parse:Jt},$t=function(){},Qt=(Yt=$t,__extends(en,Yt),en);function en(){return Yt.call(this)||this}var tn,nn=(tn=function(){this.ver=1,this.sampleRate=100,this.tags={}},__extends(rn,tn),rn);function rn(e,t,n){var r=tn.call(this)||this;return r.name=ot.sanitizeString(e,n)||vt,r.data=t,r.time=k(new Date),r.aiDataContract={time:m.FieldType.Required,iKey:m.FieldType.Required,name:m.FieldType.Required,sampleRate:function(){return 100===r.sampleRate?m.FieldType.Hidden:m.FieldType.Required},tags:m.FieldType.Required,data:m.FieldType.Required},r}var an,on=(an=tr=function(){this.ver=2,this.properties={},this.measurements={}},__extends(sn,an),sn.envelopeType="Microsoft.ApplicationInsights.{0}.Event",sn.dataType="EventData",sn);function sn(e,t,n,r){var i=an.call(this)||this;return i.aiDataContract={ver:m.FieldType.Required,name:m.FieldType.Required,properties:m.FieldType.Default,measurements:m.FieldType.Default},i.name=ot.sanitizeString(e,t)||vt,i.properties=ot.sanitizeProperties(e,n),i.measurements=ot.sanitizeMeasurements(e,r),i}var ln,un=function(){},cn=function(){this.hasFullStack=!0,this.parsedStack=[]},dn="error",pn=(ln=function(){this.ver=2,this.exceptions=[],this.properties={},this.measurements={}},__extends(fn,ln),fn.CreateFromInterface=function(t,e,n,r){var i=e.exceptions&&z(e.exceptions,function(e){return mn.CreateFromInterface(t,e)});return new fn(t,__assign({},e,{exceptions:i}),n,r)},fn.prototype.toInterface=function(){var e=this.exceptions,t=this.properties,n=this.measurements,r=this.severityLevel;this.ver;var i=this.problemGroup,a=this.id,o=this.isManual;return{ver:"4.0",exceptions:e instanceof Array&&z(e,function(e){return e.toInterface()})||undefined,severityLevel:r,properties:t,measurements:n,problemGroup:i,id:a,isManual:o}},fn.CreateSimpleException=function(e,t,n,r,i,a){return{exceptions:[{hasFullStack:!0,message:e,stack:i,typeName:t}]}},fn.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",fn.dataType="ExceptionData",fn);function fn(e,t,n,r,i,a){var o,s=ln.call(this)||this;return s.aiDataContract={ver:m.FieldType.Required,exceptions:m.FieldType.Required,severityLevel:m.FieldType.Default,properties:m.FieldType.Default,measurements:m.FieldType.Default},"ver"in(o=t)&&"exceptions"in o&&"properties"in o?(s.exceptions=t.exceptions,s.properties=t.properties,s.measurements=t.measurements,t.severityLevel&&(s.severityLevel=t.severityLevel),t.id&&(s.id=t.id),t.problemGroup&&(s.problemGroup=t.problemGroup),s.ver=2,I(t.isManual)||(s.isManual=t.isManual)):(s.exceptions=[new mn(e,t)],s.properties=ot.sanitizeProperties(e,n)||{},s.measurements=ot.sanitizeMeasurements(e,r),i&&(s.severityLevel=i),a&&(s.id=a)),s}var gn,mn=(gn=cn,__extends(vn,gn),vn.prototype.toInterface=function(){var e=this.parsedStack instanceof Array&&z(this.parsedStack,function(e){return e.toInterface()});return{id:this.id,outerId:this.outerId,typeName:this.typeName,message:this.message,hasFullStack:this.hasFullStack,stack:this.stack,parsedStack:e||undefined}},vn.CreateFromInterface=function(e,t){var n=t.parsedStack instanceof Array&&z(t.parsedStack,function(e){return yn.CreateFromInterface(e)})||t.parsedStack;return new vn(e,__assign({},t,{parsedStack:n}))},vn.parseStack=function(e){if(M(e)){for(var t=e.split("\n"),n=[],r=0,i=0,a=0;a<=t.length;a++){var o=t[a];yn.regex.test(o)&&(i+=(o=new yn(t[a],r++)).sizeInBytes,n.push(o))}if(32768<i)for(var s=0,l=n.length-1,u=0,c=s,d=l;s<l;){if(32768<(u+=n[s].sizeInBytes+n[l].sizeInBytes)){n.splice(c,d-c+1);break}c=s,d=l,s++,l--}}return n},vn);function vn(e,t){var n,r=gn.call(this)||this;return r.aiDataContract={id:m.FieldType.Default,outerId:m.FieldType.Default,typeName:m.FieldType.Required,message:m.FieldType.Required,hasFullStack:m.FieldType.Default,stack:m.FieldType.Default,parsedStack:m.FieldType.Array},"hasFullStack"in(n=t)&&"typeName"in n?(r.typeName=t.typeName,r.message=t.message,r.stack=t.stack,r.parsedStack=t.parsedStack,r.hasFullStack=t.hasFullStack):(b(n=t)||(n=n[dn]||n.evt||n),r.typeName=ot.sanitizeString(e,function(e){var t="";if(e&&!(t=e.typeName||e.name||""))try{var n=/function (.{1,})\(/.exec(e.constructor.toString()),t=n&&1<n.length?n[1]:""}catch(r){}return t}(n))||vt,r.message=ot.sanitizeMessage(e,t.message)||vt,t=t.stack,r.parsedStack=vn.parseStack(t),r.stack=ot.sanitizeException(e,t),r.hasFullStack=_(r.parsedStack)&&0<r.parsedStack.length),r}var hn,yn=(hn=un,__extends(Sn,hn),Sn.CreateFromInterface=function(e){return new Sn(e,null)},Sn.prototype.toInterface=function(){return{level:this.level,method:this.method,assembly:this.assembly,fileName:this.fileName,line:this.line}},Sn.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,Sn.baseSize=58,Sn);function Sn(e,t){var n,r=hn.call(this)||this;return r.sizeInBytes=0,r.aiDataContract={level:m.FieldType.Required,method:m.FieldType.Required,assembly:m.FieldType.Default,fileName:m.FieldType.Default,line:m.FieldType.Default},"string"==typeof e?(n=e,r.level=t,r.method="<no_method>",r.assembly=U(n),r.fileName="",r.line=0,(n=n.match(Sn.regex))&&5<=n.length&&(r.method=U(n[2])||r.method,r.fileName=U(n[4]),r.line=parseInt(n[5])||0)):(r.level=e.level,r.method=e.method,r.assembly=e.assembly,r.fileName=e.fileName,r.line=e.line,r.sizeInBytes=0),r.sizeInBytes+=r.method.length,r.sizeInBytes+=r.fileName.length,r.sizeInBytes+=r.assembly.length,r.sizeInBytes+=Sn.baseSize,r.sizeInBytes+=r.level.toString().length,r.sizeInBytes+=r.line.toString().length,r}var Tn,In=function(){this.ver=2,this.metrics=[],this.properties={},this.measurements={}};(er=Tn={})[er.Measurement=0]="Measurement",er[er.Aggregation=1]="Aggregation";var xn,Cn=(xn=function(){this.kind=Tn.Measurement},__extends(Fn,xn),Fn);function Fn(){var e=xn.apply(this,arguments)||this;return e.aiDataContract={name:m.FieldType.Required,kind:m.FieldType.Default,value:m.FieldType.Required,count:m.FieldType.Default,min:m.FieldType.Default,max:m.FieldType.Default,stdDev:m.FieldType.Default},e}var Nn,An=(Nn=In,__extends(En,Nn),En.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",En.dataType="MetricData",En);function En(e,t,n,r,i,a,o,s){var l=Nn.call(this)||this;l.aiDataContract={ver:m.FieldType.Required,metrics:m.FieldType.Required,properties:m.FieldType.Default};var u=new Cn;return u.count=0<r?r:undefined,u.max=isNaN(a)||null===a?undefined:a,u.min=isNaN(i)||null===i?undefined:i,u.name=ot.sanitizeString(e,t)||vt,u.value=n,l.metrics=[u],l.properties=ot.sanitizeProperties(e,o),l.measurements=ot.sanitizeMeasurements(e,s),l}var Dn,wn=(Dn=tr,__extends(_n,Dn),_n);function _n(){var e=Dn.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var bn,Mn=(bn=wn,__extends(Rn,bn),Rn.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",Rn.dataType="PageviewData",Rn);function Rn(e,t,n,r,i,a,o){var s=bn.call(this)||this;return s.aiDataContract={ver:m.FieldType.Required,name:m.FieldType.Default,url:m.FieldType.Default,duration:m.FieldType.Default,properties:m.FieldType.Default,measurements:m.FieldType.Default,id:m.FieldType.Default},s.id=ot.sanitizeId(e,o),s.url=ot.sanitizeUrl(e,n),s.name=ot.sanitizeString(e,t)||vt,isNaN(r)||(s.duration=ct(r)),s.properties=ot.sanitizeProperties(e,i),s.measurements=ot.sanitizeMeasurements(e,a),s}var kn,Ln=(kn=function(){this.ver=2,this.success=!0,this.properties={},this.measurements={}},__extends(Pn,kn),Pn.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",Pn.dataType="RemoteDependencyData",Pn);function Pn(e,t,n,r,i,a,o,s,l,u,c,d){void 0===l&&(l="Ajax");var p=kn.call(this)||this;p.aiDataContract={id:m.FieldType.Required,ver:m.FieldType.Required,name:m.FieldType.Default,resultCode:m.FieldType.Default,duration:m.FieldType.Default,success:m.FieldType.Default,data:m.FieldType.Default,target:m.FieldType.Default,type:m.FieldType.Default,properties:m.FieldType.Default,measurements:m.FieldType.Default,kind:m.FieldType.Default,value:m.FieldType.Default,count:m.FieldType.Default,min:m.FieldType.Default,max:m.FieldType.Default,stdDev:m.FieldType.Default,dependencyKind:m.FieldType.Default,dependencySource:m.FieldType.Default,commandName:m.FieldType.Default,dependencyTypeName:m.FieldType.Default},p.id=t,p.duration=ct(i),p.success=a,p.resultCode=o+"",p.type=ot.sanitizeString(e,l);var f,g,o=(f=e,t=s,o=a=i=r,a=(l=n)&&0<l.length?(g=(s=Lt(l)).host,a||(null!=s.pathname?("/"!=((n=0===s.pathname.length?"/":s.pathname)[0]||"")&&(n="/"+n),o=s.pathname,ot.sanitizeString(f,t?t+" "+n:n)):ot.sanitizeString(f,l))):g=i,{target:g,name:a,data:o});return p.data=ot.sanitizeUrl(e,r)||o.data,p.target=ot.sanitizeString(e,o.target),u&&(p.target=p.target+" | "+u),p.name=ot.sanitizeString(e,o.name),p.properties=ot.sanitizeProperties(e,c),p.measurements=ot.sanitizeMeasurements(e,d),p}var zn,n=(zn=function(){this.ver=2,this.properties={},this.measurements={}},__extends(Gn,zn),Gn.envelopeType="Microsoft.ApplicationInsights.{0}.Message",Gn.dataType="MessageData",Gn);function Gn(e,t,n,r,i){var a=zn.call(this)||this;return a.aiDataContract={ver:m.FieldType.Required,message:m.FieldType.Required,severityLevel:m.FieldType.Default,properties:m.FieldType.Default},a.message=ot.sanitizeMessage(e,t=t||vt),a.properties=ot.sanitizeProperties(e,r),a.measurements=ot.sanitizeMeasurements(e,i),n&&(a.severityLevel=n),a}var Un,On=(Un=wn,__extends(Bn,Un),Bn);function Bn(){var e=Un.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var qn,Hn=(qn=On,__extends(Vn,qn),Vn.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",Vn.dataType="PageviewPerformanceData",Vn);function Vn(e,t,n,r,i,a,o){var s=qn.call(this)||this;return s.aiDataContract={ver:m.FieldType.Required,name:m.FieldType.Default,url:m.FieldType.Default,duration:m.FieldType.Default,perfTotal:m.FieldType.Default,networkConnect:m.FieldType.Default,sentRequest:m.FieldType.Default,receivedResponse:m.FieldType.Default,domProcessing:m.FieldType.Default,properties:m.FieldType.Default,measurements:m.FieldType.Default},s.url=ot.sanitizeUrl(e,n),s.name=ot.sanitizeString(e,t)||vt,s.properties=ot.sanitizeProperties(e,i),s.measurements=ot.sanitizeMeasurements(e,a),o&&(s.domProcessing=o.domProcessing,s.duration=o.duration,s.networkConnect=o.networkConnect,s.perfTotal=o.perfTotal,s.receivedResponse=o.receivedResponse,s.sentRequest=o.sentRequest),s}var jn,Wn=(jn=Qt,__extends(Xn,jn),Xn);function Xn(e,t){var n=jn.call(this)||this;return n.aiDataContract={baseType:m.FieldType.Required,baseData:m.FieldType.Required},n.baseType=e,n.baseData=t,n}m.SeverityLevel=void 0,(nr=m.SeverityLevel||(m.SeverityLevel={}))[nr.Verbose=0]="Verbose",nr[nr.Information=1]="Information",nr[nr.Warning=2]="Warning",nr[nr.Error=3]="Error",nr[nr.Critical=4]="Critical";var Kn=(Jn.getConfig=function(e,t,n,r){return void 0===r&&(r=!1),t=(n&&e.extensionConfig&&e.extensionConfig[n]&&!I(e.extensionConfig[n][t])?e.extensionConfig[n]:e)[t],I(t)?r:t},Jn);function Jn(){}function Yn(e){var t="ai."+e+".";return function(e){return t+e}}var Zn,$n,Qn=Yn("application"),cn=Yn("device"),un=Yn("location"),er=Yn("operation"),In=Yn("session"),tr=Yn("user"),On=Yn("cloud"),nr=Yn("internal"),tr=($n={applicationVersion:Qn("ver"),applicationBuild:Qn("build"),applicationTypeId:Qn("typeId"),applicationId:Qn("applicationId"),applicationLayer:Qn("layer"),deviceId:cn("id"),deviceIp:cn("ip"),deviceLanguage:cn("language"),deviceLocale:cn("locale"),deviceModel:cn("model"),deviceFriendlyName:cn("friendlyName"),deviceNetwork:cn("network"),deviceNetworkName:cn("networkName"),deviceOEMName:cn("oemName"),deviceOS:cn("os"),deviceOSVersion:cn("osVersion"),deviceRoleInstance:cn("roleInstance"),deviceRoleName:cn("roleName"),deviceScreenResolution:cn("screenResolution"),deviceType:cn("type"),deviceMachineName:cn("machineName"),deviceVMName:cn("vmName"),deviceBrowser:cn("browser"),deviceBrowserVersion:cn("browserVersion"),locationIp:un("ip"),locationCountry:un("country"),locationProvince:un("province"),locationCity:un("city"),operationId:er("id"),operationName:er("name"),operationParentId:er("parentId"),operationRootId:er("rootId"),operationSyntheticSource:er("syntheticSource"),operationCorrelationVector:er("correlationVector"),sessionId:In("id"),sessionIsFirst:In("isFirst"),sessionIsNew:In("isNew"),userAccountAcquisitionDate:tr("accountAcquisitionDate"),userAccountId:tr("accountId"),userAgent:tr("userAgent"),userId:tr("id"),userStoreRegion:tr("storeRegion"),userAuthUserId:tr("authUserId"),userAnonymousUserAcquisitionDate:tr("anonUserAcquisitionDate"),userAuthenticatedUserAcquisitionDate:tr("authUserAcquisitionDate"),cloudName:On("name"),cloudRole:On("role"),cloudRoleVer:On("roleVer"),cloudRoleInstance:On("roleInstance"),cloudEnvironment:On("environment"),cloudLocation:On("location"),cloudDeploymentUnit:On("deploymentUnit"),internalNodeName:nr("nodeName"),internalSdkVersion:nr("sdkVersion"),internalAgentVersion:nr("agentVersion"),internalSnippet:nr("snippet"),internalSdkSrc:nr("sdkSrc")},Zn=function(){var n=this;E($n,function(e,t){n[e]=t})},__extends(rr,Zn),rr);function rr(){return Zn.call(this)||this}function ir(){}ir.create=function(e,t,n,r,i,a){if(n=ot.sanitizeString(r,n)||vt,I(e)||I(t)||I(n))throw Error("Input doesn't contain all required fields");var o={name:n,time:k(new Date),iKey:"",ext:a||{},tags:[],data:{},baseType:t,baseData:e};return I(i)||E(i,function(e,t){o.data[e]=t}),o},On=ir,nr=new tr,m.AIBase=$t,m.AIData=Qt,m.AnalyticsPluginIdentifier="ApplicationInsightsAnalytics",m.BreezeChannelIdentifier="AppInsightsChannelPlugin",m.ConfigurationManager=Kn,m.ConnectionStringParser=Zt,m.ContextTagKeys=tr,m.CorrelationIdHelper=jt,m.CtxTagKeys=nr,m.DEFAULT_BREEZE_ENDPOINT=mt,m.Data=Wn,m.DataSanitizer=ot,m.DateTimeUtils=Kt,m.DisabledPropertyName="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",m.Envelope=nn,m.Event=on,m.Exception=pn,m.Extensions={UserExt:"user",DeviceExt:"device",TraceExt:"trace",WebExt:"web",AppExt:"app",OSExt:"os",SessionExt:"ses",SDKExt:"sdk"},m.HttpMethod="http.method",m.Metric=An,m.PageView=Mn,m.PageViewData=wn,m.PageViewPerformance=Hn,m.ProcessLegacy="ProcessLegacy",m.PropertiesPluginIdentifier="AppInsightsPropertiesPlugin",m.RemoteDependencyData=Ln,m.RequestHeaders=at,m.SampleRate="sampleRate",m.TelemetryItemCreator=On,m.Trace=n,m.UrlHelper=Vt,m.Util=Ht,m.createDomEvent=lt,m.dateTimeUtilsDuration=Xt,m.dateTimeUtilsNow=Wt,m.getExtensionByName=pt,m.isBeaconApiSupported=dt,m.isCrossOriginError=ft,m.isInternalApplicationInsightsEndpoint=qt,m.msToTimeSpan=ct,m.parseConnectionString=Jt,m.strNotSpecified=vt,m.stringToBoolOrDefault=ut,m.urlGetAbsoluteUrl=Pt,m.urlGetCompleteUrl=Gt,m.urlGetPathName=zt,m.urlParseFullHost=Ot,m.urlParseHost=Ut,m.urlParseUrl=Lt,m.utlCanUseLocalStorage=Ct,m.utlCanUseSessionStorage=Et,m.utlDisableStorage=xt,m.utlGetLocalStorage=Ft,m.utlGetSessionStorage=wt,m.utlGetSessionStorageKeys=Dt,m.utlRemoveSessionStorage=bt,m.utlRemoveStorage=At,m.utlSetLocalStorage=Nt,m.utlSetSessionStorage=_t,function(e,t,n){var r=Object.defineProperty;if(r)try{return r(e,t,n)}catch(i){}typeof n.value!==undefined&&(e[t]=n.value)}(m,"__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-common.min.js.map
{
"name": "@microsoft/applicationinsights-common",
"version": "2.5.11",
"version": "2.6.0",
"description": "Microsoft Application Insights Common JavaScript Library",
"homepage": "https://github.com/microsoft/ApplicationInsights-JS#readme",
"author": "Microsoft Application Insights Team",
"main": "./dist/applicationinsights-common.js",

@@ -14,28 +16,31 @@ "module": "./dist-esm/applicationinsights-common.js",

"scripts": {
"build": "npm run build:esm && npm run build:browser",
"build": "npm run build:esm && npm run build:browser && npm run dtsgen",
"build:esm": "grunt common",
"build:browser": "rollup -c",
"test": "grunt commontest",
"lint": "tslint -p tsconfig.json"
"lint": "tslint -p tsconfig.json",
"dtsgen": "api-extractor run --local && node ../../scripts/dtsgen.js \"Microsoft Application Insights Common JavaScript Library\""
},
"devDependencies": {
"@microsoft/applicationinsights-rollup-plugin-uglify3-js": "1.0.0",
"@microsoft/applicationinsights-rollup-es3" : "1.1.3",
"grunt": "1.0.1",
"@microsoft/api-extractor" : "^7.9.11",
"grunt": "^1.3.0",
"grunt-contrib-qunit": "^3.1.0",
"grunt-contrib-uglify": "3.1.0",
"grunt-ts": "^6.0.0-beta.15",
"grunt-tslint": "^5.0.2",
"rollup-plugin-node-resolve": "^3.4.0",
"rollup-plugin-replace": "^2.1.0",
"rollup-plugin-uglify": "^6.0.0",
"grunt-ts": "^6.0.0-beta.22",
"@rollup/plugin-commonjs": "^15.1.0",
"@rollup/plugin-node-resolve": "^9.0.0",
"@rollup/plugin-replace": "^2.3.3",
"rollup-plugin-cleanup": "3.2.1",
"rollup": "^2.32.0",
"typescript": "2.5.3",
"tslint": "^5.19.0",
"tslint-config-prettier": "^1.18.0",
"rollup": "^0.66.0"
"tslint-config-prettier": "^1.18.0"
},
"dependencies": {
"@microsoft/applicationinsights-shims" : "1.0.3",
"@microsoft/applicationinsights-core-js": "2.5.11"
"@microsoft/applicationinsights-core-js": "2.6.0",
"@microsoft/dynamicproto-js": "^1.1.1"
},
"license": "MIT"
}

@@ -5,7 +5,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved.

import '@microsoft/applicationinsights-shims';
export { Util, CorrelationIdHelper, UrlHelper, DateTimeUtils } from './Util';
export { ConnectionStringParser } from './ConnectionStringParser';
export {
IUtil, Util, ICorrelationIdHelper, CorrelationIdHelper,
IDateTimeUtils, DateTimeUtils, dateTimeUtilsNow, dateTimeUtilsDuration,
IUrlHelper, UrlHelper, isInternalApplicationInsightsEndpoint
} from './Util';
export { parseConnectionString, ConnectionStringParser } from './ConnectionStringParser';
export { FieldType } from './Enums';
export { RequestHeaders } from './RequestResponseHeaders';
export { DisabledPropertyName, ProcessLegacy, SampleRate, HttpMethod, DEFAULT_BREEZE_ENDPOINT } from './Constants';
export { IRequestHeaders, RequestHeaders } from './RequestResponseHeaders';
export { DisabledPropertyName, ProcessLegacy, SampleRate, HttpMethod, DEFAULT_BREEZE_ENDPOINT, strNotSpecified } from './Constants';
export { Data as AIData } from './Interfaces/Contracts/Generated/Data';

@@ -35,3 +39,3 @@ export { Base as AIBase } from './Interfaces/Contracts/Generated/Base';

export { IChannelControlsAI } from './Interfaces/IChannelControlsAI';
export { ContextTagKeys } from './Interfaces/Contracts/Generated/ContextTagKeys';
export { IContextTagKeys, ContextTagKeys } from './Interfaces/Contracts/Generated/ContextTagKeys';
export { DataSanitizer } from './Telemetry/Common/DataSanitizer';

@@ -55,4 +59,11 @@ export { TelemetryItemCreator } from './TelemetryItemCreator';

export { DistributedTracingModes } from './Enums';
export { stringToBoolOrDefault, msToTimeSpan, isBeaconApiSupported, getExtensionByName, isCrossOriginError } from './HelperFuncs';
export { createDomEvent } from './DomHelperFuncs';
export {
utlDisableStorage, utlCanUseLocalStorage, utlGetLocalStorage, utlSetLocalStorage, utlRemoveStorage,
utlCanUseSessionStorage, utlGetSessionStorageKeys, utlGetSessionStorage, utlSetSessionStorage, utlRemoveSessionStorage
} from './StorageHelperFuncs';
export { urlParseUrl, urlGetAbsoluteUrl, urlGetPathName, urlGetCompleteUrl, urlParseHost, urlParseFullHost } from './UrlHelperFuncs';
export const PropertiesPluginIdentifier = "AppInsightsPropertiesPlugin";
export const BreezeChannelIdentifier = "AppInsightsChannelPlugin";
export const AnalyticsPluginIdentifier = "ApplicationInsightsAnalytics";

@@ -8,41 +8,43 @@ // Copyright (c) Microsoft Corporation. All rights reserved.

import { DEFAULT_BREEZE_ENDPOINT } from "./Constants";
import { CoreUtils } from "@microsoft/applicationinsights-core-js";
import { arrReduce, objKeys } from "@microsoft/applicationinsights-core-js";
export class ConnectionStringParser {
private static _FIELDS_SEPARATOR = ";";
private static _FIELD_KEY_VALUE_SEPARATOR = "=";
const _FIELDS_SEPARATOR = ";";
const _FIELD_KEY_VALUE_SEPARATOR = "=";
public static parse(connectionString?: string): ConnectionString {
if (!connectionString) {
return {};
}
export function parseConnectionString(connectionString?: string): ConnectionString {
if (!connectionString) {
return {};
}
const kvPairs = connectionString.split(ConnectionStringParser._FIELDS_SEPARATOR);
const kvPairs = connectionString.split(_FIELDS_SEPARATOR);
const result: ConnectionString = CoreUtils.arrReduce(kvPairs, (fields: ConnectionString, kv: string) => {
const kvParts = kv.split(ConnectionStringParser._FIELD_KEY_VALUE_SEPARATOR);
const result: ConnectionString = arrReduce(kvPairs, (fields: ConnectionString, kv: string) => {
const kvParts = kv.split(_FIELD_KEY_VALUE_SEPARATOR);
if (kvParts.length === 2) { // only save fields with valid formats
const key = kvParts[0].toLowerCase() as ConnectionStringKey;
const value = kvParts[1];
fields[key] = value as string;
}
return fields;
}, {});
if (kvParts.length === 2) { // only save fields with valid formats
const key = kvParts[0].toLowerCase() as ConnectionStringKey;
const value = kvParts[1];
fields[key] = value as string;
}
return fields;
}, {});
if (CoreUtils.objKeys(result).length > 0) {
// this is a valid connection string, so parse the results
if (objKeys(result).length > 0) {
// this is a valid connection string, so parse the results
if (result.endpointsuffix) {
// use endpoint suffix where overrides are not provided
const locationPrefix = result.location ? result.location + "." : "";
result.ingestionendpoint = result.ingestionendpoint || ("https://" + locationPrefix + "dc." + result.endpointsuffix);
}
// apply the default endpoints
result.ingestionendpoint = result.ingestionendpoint || DEFAULT_BREEZE_ENDPOINT;
if (result.endpointsuffix) {
// use endpoint suffix where overrides are not provided
const locationPrefix = result.location ? result.location + "." : "";
result.ingestionendpoint = result.ingestionendpoint || ("https://" + locationPrefix + "dc." + result.endpointsuffix);
}
return result;
// apply the default endpoints
result.ingestionendpoint = result.ingestionendpoint || DEFAULT_BREEZE_ENDPOINT;
}
return result;
}
export const ConnectionStringParser = {
parse: parseConnectionString
};

@@ -15,2 +15,3 @@ // Copyright (c) Microsoft Corporation. All rights reserved.

export const HttpMethod = "http.method";
export const DEFAULT_BREEZE_ENDPOINT = "https://dc.services.visualstudio.com";
export const DEFAULT_BREEZE_ENDPOINT = "https://dc.services.visualstudio.com";
export const strNotSpecified = "not_specified";

@@ -14,2 +14,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved.

agentVersion: string;
/**
* The Snippet version used to initialize the sdk instance, this will contain either
* undefined/null - Snippet not used
* '-' - Version and legacy mode not determined
* # - Version # of the snippet
* #.l - Version # in legacy mode
* .l - No defined version, but used legacy mode initialization
*/
snippetVer: string;
/**
* Identifies the source of the sdk script
*/
sdkSrc: string;
}

@@ -19,2 +19,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved.

traceState?: ITraceState;
/**
* Name
*/
name?: string;
}

@@ -21,0 +26,0 @@

@@ -34,7 +34,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved.

localId: string;
/**
* A flag indicating whether this represents a new user
*/
isNewUser?: boolean;
}
export interface IUserContext {
export interface IUserContext extends IUser {
setAuthenticatedUserContext(authenticatedUserId: string, accountId?: string, storeInCookie?: boolean): void;
clearAuthenticatedUserContext(): void;
}

@@ -11,3 +11,3 @@ // Copyright (c) Microsoft Corporation. All rights reserved.

*/
export class AvailabilityData extends Domain {
export class AvailabilityData implements Domain {

@@ -17,3 +17,3 @@ /**

*/
public ver: number;
public ver: number = 2;

@@ -53,3 +53,3 @@ /**

*/
public properties: any;
public properties: any = {};

@@ -59,11 +59,3 @@ /**

*/
public measurements: any;
constructor() {
super();
this.ver = 2;
this.properties = {};
this.measurements = {};
}
public measurements: any = {};
}
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// THIS FILE WAS AUTOGENERATED
export class ContextTagKeys {
import { createClassFromInterface } from "@microsoft/applicationinsights-core-js";
function _aiNameFunc(baseName: string) {
let aiName = "ai." + baseName + ".";
return function(name: string) {
return aiName + name;
}
}
let _aiApplication = _aiNameFunc("application");
let _aiDevice = _aiNameFunc("device");
let _aiLocation = _aiNameFunc("location");
let _aiOperation = _aiNameFunc("operation");
let _aiSession = _aiNameFunc("session");
let _aiUser = _aiNameFunc("user");
let _aiCloud = _aiNameFunc("cloud");
let _aiInternal = _aiNameFunc("internal");
export interface IContextTagKeys {
/**
* Application version. Information in the application context fields is always about the application that is sending the telemetry.
*/
public applicationVersion: string;
readonly applicationVersion: string;

@@ -15,3 +32,3 @@ /**

*/
public applicationBuild: string;
readonly applicationBuild: string;

@@ -21,3 +38,3 @@ /**

*/
public applicationTypeId: string;
readonly applicationTypeId: string;

@@ -27,3 +44,3 @@ /**

*/
public applicationId: string;
readonly applicationId: string;

@@ -33,3 +50,3 @@ /**

*/
public applicationLayer: string;
readonly applicationLayer: string;

@@ -39,5 +56,5 @@ /**

*/
public deviceId: string;
public deviceIp: string;
public deviceLanguage: string;
readonly deviceId: string;
readonly deviceIp: string;
readonly deviceLanguage: string;

@@ -47,3 +64,3 @@ /**

*/
public deviceLocale: string;
readonly deviceLocale: string;

@@ -53,6 +70,6 @@ /**

*/
public deviceModel: string;
public deviceFriendlyName: string;
public deviceNetwork: string;
public deviceNetworkName: string;
readonly deviceModel: string;
readonly deviceFriendlyName: string;
readonly deviceNetwork: string;
readonly deviceNetworkName: string;

@@ -62,4 +79,4 @@ /**

*/
public deviceOEMName: string;
public deviceOS: string;
readonly deviceOEMName: string;
readonly deviceOS: string;

@@ -69,3 +86,3 @@ /**

*/
public deviceOSVersion: string;
readonly deviceOSVersion: string;

@@ -75,3 +92,3 @@ /**

*/
public deviceRoleInstance: string;
readonly deviceRoleInstance: string;

@@ -81,4 +98,4 @@ /**

*/
public deviceRoleName: string;
public deviceScreenResolution: string;
readonly deviceRoleName: string;
readonly deviceScreenResolution: string;

@@ -88,6 +105,6 @@ /**

*/
public deviceType: string;
public deviceMachineName: string;
public deviceVMName: string;
public deviceBrowser: string;
readonly deviceType: string;
readonly deviceMachineName: string;
readonly deviceVMName: string;
readonly deviceBrowser: string;

@@ -97,3 +114,3 @@ /**

*/
public deviceBrowserVersion: string;
readonly deviceBrowserVersion: string;

@@ -103,3 +120,3 @@ /**

*/
public locationIp: string;
readonly locationIp: string;

@@ -109,3 +126,3 @@ /**

*/
public locationCountry: string;
readonly locationCountry: string;

@@ -115,3 +132,3 @@ /**

*/
public locationProvince: string;
readonly locationProvince: string;

@@ -121,3 +138,3 @@ /**

*/
public locationCity: string;
readonly locationCity: string;

@@ -127,3 +144,3 @@ /**

*/
public operationId: string;
readonly operationId: string;

@@ -133,3 +150,3 @@ /**

*/
public operationName: string;
readonly operationName: string;

@@ -139,4 +156,4 @@ /**

*/
public operationParentId: string;
public operationRootId: string;
readonly operationParentId: string;
readonly operationRootId: string;

@@ -146,3 +163,3 @@ /**

*/
public operationSyntheticSource: string;
readonly operationSyntheticSource: string;

@@ -152,3 +169,3 @@ /**

*/
public operationCorrelationVector: string;
readonly operationCorrelationVector: string;

@@ -158,3 +175,3 @@ /**

*/
public sessionId: string;
readonly sessionId: string;

@@ -164,5 +181,5 @@ /**

*/
public sessionIsFirst: string;
public sessionIsNew: string;
public userAccountAcquisitionDate: string;
readonly sessionIsFirst: string;
readonly sessionIsNew: string;
readonly userAccountAcquisitionDate: string;

@@ -172,3 +189,3 @@ /**

*/
public userAccountId: string;
readonly userAccountId: string;

@@ -178,3 +195,3 @@ /**

*/
public userAgent: string;
readonly userAgent: string;

@@ -184,3 +201,3 @@ /**

*/
public userId: string;
readonly userId: string;

@@ -190,3 +207,3 @@ /**

*/
public userStoreRegion: string;
readonly userStoreRegion: string;

@@ -196,6 +213,6 @@ /**

*/
public userAuthUserId: string;
public userAnonymousUserAcquisitionDate: string;
public userAuthenticatedUserAcquisitionDate: string;
public cloudName: string;
readonly userAuthUserId: string;
readonly userAnonymousUserAcquisitionDate: string;
readonly userAuthenticatedUserAcquisitionDate: string;
readonly cloudName: string;

@@ -205,4 +222,4 @@ /**

*/
public cloudRole: string;
public cloudRoleVer: string;
readonly cloudRole: string;
readonly cloudRoleVer: string;

@@ -212,6 +229,6 @@ /**

*/
public cloudRoleInstance: string;
public cloudEnvironment: string;
public cloudLocation: string;
public cloudDeploymentUnit: string;
readonly cloudRoleInstance: string;
readonly cloudEnvironment: string;
readonly cloudLocation: string;
readonly cloudDeploymentUnit: string;

@@ -221,3 +238,3 @@ /**

*/
public internalSdkVersion: string;
readonly internalSdkVersion: string;

@@ -227,3 +244,3 @@ /**

*/
public internalAgentVersion: string;
readonly internalAgentVersion: string;

@@ -233,3 +250,3 @@ /**

*/
public internalNodeName: string;
readonly internalNodeName: string;

@@ -239,3 +256,3 @@ /**

*/
public internalSnippet: string;
readonly internalSnippet: string;

@@ -245,65 +262,74 @@ /**

*/
public internalSdkSrc: string;
readonly internalSdkSrc: string;
}
constructor() {
this.applicationVersion = "ai.application.ver";
this.applicationBuild = "ai.application.build";
this.applicationTypeId = "ai.application.typeId";
this.applicationId = "ai.application.applicationId";
this.applicationLayer = "ai.application.layer";
this.deviceId = "ai.device.id";
this.deviceIp = "ai.device.ip";
this.deviceLanguage = "ai.device.language";
this.deviceLocale = "ai.device.locale";
this.deviceModel = "ai.device.model";
this.deviceFriendlyName = "ai.device.friendlyName";
this.deviceNetwork = "ai.device.network";
this.deviceNetworkName = "ai.device.networkName";
this.deviceOEMName = "ai.device.oemName";
this.deviceOS = "ai.device.os";
this.deviceOSVersion = "ai.device.osVersion";
this.deviceRoleInstance = "ai.device.roleInstance";
this.deviceRoleName = "ai.device.roleName";
this.deviceScreenResolution = "ai.device.screenResolution";
this.deviceType = "ai.device.type";
this.deviceMachineName = "ai.device.machineName";
this.deviceVMName = "ai.device.vmName";
this.deviceBrowser = "ai.device.browser";
this.deviceBrowserVersion = "ai.device.browserVersion";
this.locationIp = "ai.location.ip";
this.locationCountry = "ai.location.country";
this.locationProvince = "ai.location.province";
this.locationCity = "ai.location.city";
this.operationId = "ai.operation.id";
this.operationName = "ai.operation.name";
this.operationParentId = "ai.operation.parentId";
this.operationRootId = "ai.operation.rootId";
this.operationSyntheticSource = "ai.operation.syntheticSource";
this.operationCorrelationVector = "ai.operation.correlationVector";
export class ContextTagKeys extends createClassFromInterface<IContextTagKeys>({
applicationVersion: _aiApplication("ver"),
applicationBuild: _aiApplication("build"),
applicationTypeId: _aiApplication("typeId"),
applicationId: _aiApplication("applicationId"),
applicationLayer: _aiApplication("layer"),
deviceId: _aiDevice("id"),
deviceIp: _aiDevice("ip"),
deviceLanguage: _aiDevice("language"),
deviceLocale: _aiDevice("locale"),
deviceModel: _aiDevice("model"),
deviceFriendlyName: _aiDevice("friendlyName"),
deviceNetwork: _aiDevice("network"),
deviceNetworkName: _aiDevice("networkName"),
deviceOEMName: _aiDevice("oemName"),
deviceOS: _aiDevice("os"),
deviceOSVersion: _aiDevice("osVersion"),
deviceRoleInstance: _aiDevice("roleInstance"),
deviceRoleName: _aiDevice("roleName"),
deviceScreenResolution: _aiDevice("screenResolution"),
deviceType: _aiDevice("type"),
deviceMachineName: _aiDevice("machineName"),
deviceVMName: _aiDevice("vmName"),
deviceBrowser: _aiDevice("browser"),
deviceBrowserVersion: _aiDevice("browserVersion"),
locationIp: _aiLocation("ip"),
locationCountry: _aiLocation("country"),
locationProvince: _aiLocation("province"),
locationCity: _aiLocation("city"),
operationId: _aiOperation("id"),
operationName: _aiOperation("name"),
operationParentId: _aiOperation("parentId"),
operationRootId: _aiOperation("rootId"),
operationSyntheticSource: _aiOperation("syntheticSource"),
operationCorrelationVector: _aiOperation("correlationVector"),
sessionId: _aiSession("id"),
sessionIsFirst: _aiSession("isFirst"),
sessionIsNew: _aiSession("isNew"),
this.sessionId = "ai.session.id";
this.sessionIsFirst = "ai.session.isFirst";
this.sessionIsNew = "ai.session.isNew";
this.userAccountAcquisitionDate = "ai.user.accountAcquisitionDate";
this.userAccountId = "ai.user.accountId";
this.userAgent = "ai.user.userAgent";
this.userId = "ai.user.id";
this.userStoreRegion = "ai.user.storeRegion";
this.userAuthUserId = "ai.user.authUserId";
this.userAnonymousUserAcquisitionDate = "ai.user.anonUserAcquisitionDate";
this.userAuthenticatedUserAcquisitionDate = "ai.user.authUserAcquisitionDate";
userAccountAcquisitionDate: _aiUser("accountAcquisitionDate"),
userAccountId: _aiUser("accountId"),
userAgent: _aiUser("userAgent"),
userId: _aiUser("id"),
userStoreRegion: _aiUser("storeRegion"),
userAuthUserId: _aiUser("authUserId"),
userAnonymousUserAcquisitionDate: _aiUser("anonUserAcquisitionDate"),
userAuthenticatedUserAcquisitionDate: _aiUser("authUserAcquisitionDate"),
this.cloudName = "ai.cloud.name";
this.cloudRole = "ai.cloud.role";
this.cloudRoleVer = "ai.cloud.roleVer";
this.cloudRoleInstance = "ai.cloud.roleInstance";
this.cloudEnvironment = "ai.cloud.environment";
this.cloudLocation = "ai.cloud.location";
this.cloudDeploymentUnit = "ai.cloud.deploymentUnit";
this.internalNodeName = "ai.internal.nodeName";
this.internalSdkVersion = "ai.internal.sdkVersion";
this.internalAgentVersion = "ai.internal.agentVersion";
this.internalSnippet = "ai.internal.snippet";
this.internalSdkSrc = "ai.internal.sdkSrc";
cloudName: _aiCloud("name"),
cloudRole: _aiCloud("role"),
cloudRoleVer: _aiCloud("roleVer"),
cloudRoleInstance: _aiCloud("roleInstance"),
cloudEnvironment: _aiCloud("environment"),
cloudLocation: _aiCloud("location"),
cloudDeploymentUnit: _aiCloud("deploymentUnit"),
internalNodeName: _aiInternal("nodeName"),
internalSdkVersion: _aiInternal("sdkVersion"),
internalAgentVersion: _aiInternal("agentVersion"),
internalSnippet: _aiInternal("snippet"),
internalSdkSrc: _aiInternal("sdkSrc")
}) {
constructor() {
super();
}
}
}
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// THIS FILE WAS AUTOGENERATED
import { DataPointType } from './DataPointType';

@@ -20,3 +18,3 @@

*/
public kind: DataPointType;
public kind: DataPointType = DataPointType.Measurement;

@@ -47,6 +45,2 @@ /**

public stdDev: number;
constructor() {
this.kind = DataPointType.Measurement;
}
}

@@ -9,6 +9,3 @@ // Copyright (c) Microsoft Corporation. All rights reserved.

*/
export class Domain {
constructor() {
}
export interface Domain {
}
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// THIS FILE WAS AUTOGENERATED
import { Base } from './Base';

@@ -15,3 +14,3 @@

*/
public ver: number;
public ver: number = 1;

@@ -31,3 +30,3 @@ /**

*/
public sampleRate: number;
public sampleRate: number = 100.0;

@@ -47,3 +46,3 @@ /**

*/
public tags: any;
public tags: any = {};

@@ -54,8 +53,2 @@ /**

public data: Base;
constructor() {
this.ver = 1;
this.sampleRate = 100.0;
this.tags = {};
}
}
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// THIS FILE WAS AUTOGENERATED
import { Domain } from './Domain';

@@ -10,3 +9,3 @@

*/
export class EventData extends Domain {
export class EventData implements Domain {

@@ -16,3 +15,3 @@ /**

*/
public ver: number;
public ver: number = 2;

@@ -27,3 +26,3 @@ /**

*/
public properties: any;
public properties: any = {};

@@ -33,11 +32,6 @@ /**

*/
public measurements: any;
public measurements: any = {};
constructor() {
super();
this.ver = 2;
this.properties = {};
this.measurements = {};
}
}
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// THIS FILE WAS AUTOGENERATED
import { ExceptionDetails } from './ExceptionDetails';

@@ -12,3 +11,3 @@ import { Domain } from './Domain';

*/
export class ExceptionData extends Domain {
export class ExceptionData implements Domain {

@@ -18,3 +17,3 @@ /**

*/
public ver: number;
public ver: number = 2;

@@ -24,3 +23,3 @@ /**

*/
public exceptions: ExceptionDetails[];
public exceptions: ExceptionDetails[] = [];

@@ -35,3 +34,3 @@ /**

*/
public properties: any;
public properties: any = {};

@@ -41,12 +40,6 @@ /**

*/
public measurements: any;
public measurements: any = {};
constructor() {
super();
this.ver = 2;
this.exceptions = [];
this.properties = {};
this.measurements = {};
}
}

@@ -35,3 +35,3 @@ // Copyright (c) Microsoft Corporation. All rights reserved.

*/
public hasFullStack: boolean;
public hasFullStack: boolean = true;

@@ -46,8 +46,3 @@ /**

*/
public parsedStack: StackFrame[];
constructor() {
this.hasFullStack = true;
this.parsedStack = [];
}
public parsedStack: StackFrame[] = [];
}
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// THIS FILE WAS AUTOGENERATED
import { Domain } from './Domain';

@@ -11,3 +10,3 @@ import { SeverityLevel } from './SeverityLevel';

*/
export class MessageData extends Domain {
export class MessageData implements Domain {

@@ -17,3 +16,3 @@ /**

*/
public ver: number;
public ver: number = 2;

@@ -33,3 +32,3 @@ /**

*/
public properties: any;
public properties: any = {};

@@ -39,11 +38,6 @@ /**

*/
public measurements: any;
public measurements: any = {};
constructor() {
super();
this.ver = 2;
this.properties = {};
this.measurements = {};
}
}
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// THIS FILE WAS AUTOGENERATED
import { Domain } from './Domain';

@@ -11,3 +10,3 @@ import { DataPoint } from './DataPoint';

*/
export class MetricData extends Domain {
export class MetricData implements Domain {

@@ -17,3 +16,3 @@ /**

*/
public ver: number;
public ver: number = 2;

@@ -23,3 +22,3 @@ /**

*/
public metrics: DataPoint[];
public metrics: DataPoint[] = [];

@@ -29,3 +28,3 @@ /**

*/
public properties: any;
public properties: any = {};

@@ -35,12 +34,6 @@ /**

*/
public measurements: any;
public measurements: any = {};
constructor() {
super();
this.ver = 2;
this.metrics = [];
this.properties = {};
this.measurements = {};
}
}

@@ -15,3 +15,3 @@ // Copyright (c) Microsoft Corporation. All rights reserved.

*/
public ver: number;
public ver: number = 2;

@@ -41,3 +41,3 @@ /**

*/
public properties: any;
public properties: any = {};

@@ -47,11 +47,7 @@ /**

*/
public measurements: any;
public measurements: any = {};
constructor() {
super();
this.ver = 2;
this.properties = {};
this.measurements = {};
}
}

@@ -15,3 +15,3 @@ // Copyright (c) Microsoft Corporation. All rights reserved.

*/
public ver: number;
public ver: number = 2;

@@ -61,3 +61,3 @@ /**

*/
public properties: any;
public properties: any = {};

@@ -67,11 +67,7 @@ /**

*/
public measurements: any;
public measurements: any = {};
constructor() {
super();
this.ver = 2;
this.properties = {};
this.measurements = {};
}
}
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// THIS FILE WAS AUTOGENERATED
import { Domain } from './Domain';

@@ -10,3 +9,3 @@

*/
export class RemoteDependencyData extends Domain {
export class RemoteDependencyData implements Domain {

@@ -16,3 +15,3 @@ /**

*/
public ver: number;
public ver: number = 2;

@@ -40,5 +39,5 @@ /**

/**
* Indication of successfull or unsuccessfull call.
* Indication of successful or unsuccessful call.
*/
public success: boolean;
public success: boolean = true;

@@ -63,3 +62,3 @@ /**

*/
public properties: any;
public properties: any = {};

@@ -69,12 +68,6 @@ /**

*/
public measurements: any;
public measurements: any = {};
constructor() {
super();
this.ver = 2;
this.success = true;
this.properties = {};
this.measurements = {};
}
}
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// THIS FILE WAS AUTOGENERATED
import { Domain } from './Domain';

@@ -10,3 +9,3 @@

*/
export class RequestData extends Domain {
export class RequestData implements Domain {

@@ -16,3 +15,3 @@ /**

*/
public ver: number;
public ver: number = 2;

@@ -35,3 +34,3 @@ /**

/**
* Indication of successfull or unsuccessfull call.
* Indication of successful or unsuccessful call.
*/

@@ -48,3 +47,3 @@ public success: boolean;

*/
public properties: any;
public properties: any = {};

@@ -54,11 +53,3 @@ /**

*/
public measurements: any;
constructor() {
super();
this.ver = 2;
this.properties = {};
this.measurements = {};
}
public measurements: any = {};
}

@@ -34,5 +34,2 @@ // Copyright (c) Microsoft Corporation. All rights reserved.

public line: number;
constructor() {
}
}
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
import { IConfiguration, CoreUtils } from '@microsoft/applicationinsights-core-js';
import { IConfiguration, ICookieMgrConfig, isNullOrUndefined } from '@microsoft/applicationinsights-core-js';
import { DistributedTracingModes } from '../Enums';

@@ -158,3 +158,3 @@

* @memberof IConfig
* @defaultValue AI
* @defaultValue AI_AND_W3C
*/

@@ -193,3 +193,5 @@ distributedTracingMode?: DistributedTracingModes;

/**
* @description If true, the SDK will not store or read any data from cookies. Default is false.
* @deprecated Use either disableCookiesUsage or specify a cookieMgrCfg with the enabled value set.
* If true, the SDK will not store or read any data from cookies. Default is false. As this field is being deprecated, when both
* isCookieUseDisabled and disableCookiesUsage are used disableCookiesUsage will take precedent.
* @type {boolean}

@@ -202,2 +204,11 @@ * @memberof IConfig

/**
* If true, the SDK will not store or read any data from cookies. Default is false.
* If you have also specified a cookieMgrCfg then enabled property (if specified) will take precedent over this value.
* @type {boolean}
* @memberof IConfig
* @defaultValue false
*/
disableCookiesUsage?: boolean;
/**
* @description Custom cookie domain. This is helpful if you want to share Application Insights cookies across subdomains.

@@ -210,2 +221,17 @@ * @type {string}

/**
* @description Custom cookie path. This is helpful if you want to share Application Insights cookies behind an application gateway.
* @type {string}
* @memberof IConfig
* @defaultValue ""
*/
cookiePath?: string;
/**
* [Optional] A Cookie Manager configuration which includes hooks to allow interception of the get, set and delete cookie
* operations. If this configuration is specified any specified enabled and domain properties will take precedence over the
* cookieDomain and disableCookiesUsage values.
*/
cookieMgrCfg?: ICookieMgrConfig;
/**

@@ -376,3 +402,3 @@ * Default false. If false, retry on 206 (partial success), 408 (timeout), 429 (too many requests), 500 (internal server error), 503 (service unavailable), and 0 (offline, only if detected)

let configValue;
if (identifier && config.extensionConfig && config.extensionConfig[identifier] && !CoreUtils.isNullOrUndefined(config.extensionConfig[identifier][field])) {
if (identifier && config.extensionConfig && config.extensionConfig[identifier] && !isNullOrUndefined(config.extensionConfig[identifier][field])) {
configValue = config.extensionConfig[identifier][field];

@@ -383,4 +409,4 @@ } else {

return !CoreUtils.isNullOrUndefined(configValue) ? configValue : defaultValue;
return !isNullOrUndefined(configValue) ? configValue : defaultValue;
}
}

@@ -8,5 +8,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved.

import { ILocation } from './Context/ILocation';
import { IUser } from './Context/IUser';
import { IUserContext } from './Context/IUser';
import { ISession } from './Context/ISession';
import { ITelemetryTrace } from './Context/ITelemetryTrace';
import { IOperatingSystem } from './Context/IOperatingSystem';
import { IWeb } from './Context/IWeb';

@@ -42,3 +44,3 @@ export interface ITelemetryContext {

*/
user: IUser;
user: IUserContext;

@@ -51,2 +53,12 @@ /**

/**
* The object describing os details tracked by this object.
*/
os?: IOperatingSystem;
/**
* The object describing we details tracked by this object.
*/
web?: IWeb;
/**
* application id obtained from breeze responses. Is used if appId is not specified by root config

@@ -53,0 +65,0 @@ */

import { ContextTagKeys } from "./Contracts/Generated/ContextTagKeys";
export class Extensions {
public static UserExt = "user";
public static DeviceExt = "device";
public static TraceExt = "trace";
public static WebExt = "web";
public static AppExt = "app";
public static OSExt = "os";
public static SessionExt = "ses";
public static SDKExt = "sdk";
}
export const Extensions = {
UserExt: "user",
DeviceExt: "device",
TraceExt: "trace",
WebExt: "web",
AppExt: "app",
OSExt: "os",
SessionExt: "ses",
SDKExt: "sdk"
};
export let CtxTagKeys = new ContextTagKeys();
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
export class RequestHeaders {
export interface IRequestHeaders {
/**
* Request-Context header
*/
public static requestContextHeader = "Request-Context";
requestContextHeader: string,

@@ -14,3 +14,3 @@ /**

*/
public static requestContextTargetKey = "appId";
requestContextTargetKey: string,

@@ -20,3 +20,3 @@ /**

*/
public static requestContextAppIdFormat = "appId=cid-v1:";
requestContextAppIdFormat: string,

@@ -26,3 +26,3 @@ /**

*/
public static requestIdHeader = "Request-Id";
requestIdHeader: string,

@@ -32,3 +32,3 @@ /**

*/
public static traceParentHeader = "traceparent";
traceParentHeader: string,

@@ -38,3 +38,3 @@ /**

*/
public static traceStateHeader: "tracestate"; // currently not used
traceStateHeader: string, // currently not used

@@ -45,3 +45,3 @@ /**

*/
public static sdkContextHeader = "Sdk-Context";
sdkContextHeader: string,

@@ -51,5 +51,17 @@ /**

*/
public static sdkContextHeaderAppIdRequest = "appId";
sdkContextHeaderAppIdRequest: string,
public static requestContextHeaderLowerCase = "request-context";
}
requestContextHeaderLowerCase: string
}
export const RequestHeaders: IRequestHeaders = {
requestContextHeader: "Request-Context",
requestContextTargetKey: "appId",
requestContextAppIdFormat: "appId=cid-v1:",
requestIdHeader: "Request-Id",
traceParentHeader: "traceparent",
traceStateHeader: "tracestate", // currently not used
sdkContextHeader: "Sdk-Context",
sdkContextHeaderAppIdRequest: "appId",
requestContextHeaderLowerCase: "request-context"
};
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
import { IDiagnosticLogger, LoggingSeverity, _InternalMessageId, CoreUtils, hasJSON, getJSON, objForEachKey } from '@microsoft/applicationinsights-core-js';
import { IDiagnosticLogger, LoggingSeverity, _InternalMessageId, hasJSON, getJSON, objForEachKey, isObject, isString } from '@microsoft/applicationinsights-core-js';

@@ -136,3 +136,3 @@ export class DataSanitizer {

objForEachKey(properties, (prop, value) => {
if (CoreUtils.isObject(value) && hasJSON()) {
if (isObject(value) && hasJSON()) {
// Stringify any part C properties

@@ -200,5 +200,5 @@ try {

public static trim(str: any): string {
if (!CoreUtils.isString(str)) { return str; }
if (!isString(str)) { return str; }
return str.replace(/^\s+|\s+$/g, "");
}
}

@@ -9,4 +9,4 @@ // Copyright (c) Microsoft Corporation. All rights reserved.

import { FieldType } from '../../Enums';
import { Util } from '../../Util';
import { IDiagnosticLogger, CoreUtils } from '@microsoft/applicationinsights-core-js';
import { IDiagnosticLogger, toISOString } from '@microsoft/applicationinsights-core-js';
import { strNotSpecified } from '../../Constants';

@@ -26,5 +26,5 @@ export class Envelope extends AIEnvelope implements IEnvelope {

this.name = DataSanitizer.sanitizeString(logger, name) || Util.NotSpecified;
this.name = DataSanitizer.sanitizeString(logger, name) || strNotSpecified;
this.data = data;
this.time = CoreUtils.toISOString(new Date());
this.time = toISOString(new Date());

@@ -31,0 +31,0 @@ this.aiDataContract = {

@@ -9,3 +9,3 @@ // Copyright (c) Microsoft Corporation. All rights reserved.

import { FieldType } from '../Enums';
import { Util } from '../Util';
import { strNotSpecified } from '../Constants';

@@ -31,3 +31,3 @@ export class Event extends EventData implements ISerializable {

this.name = DataSanitizer.sanitizeString(logger, name) || Util.NotSpecified;
this.name = DataSanitizer.sanitizeString(logger, name) || strNotSpecified;
this.properties = DataSanitizer.sanitizeProperties(logger, properties);

@@ -34,0 +34,0 @@ this.measurements = DataSanitizer.sanitizeMeasurements(logger, measurements);

@@ -11,5 +11,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved.

import { SeverityLevel } from '../Interfaces/Contracts/Generated/SeverityLevel';
import { Util } from '../Util';
import { IDiagnosticLogger, CoreUtils } from '@microsoft/applicationinsights-core-js';
import { IDiagnosticLogger, isNullOrUndefined, arrMap, isString, strTrim, isArray, isError } from '@microsoft/applicationinsights-core-js';
import { IExceptionInternal, IExceptionDetailsInternal, IExceptionStackFrameInternal } from '../Interfaces/IExceptionTelemetry';
import { strNotSpecified } from '../Constants';

@@ -84,3 +84,3 @@ const strError = "error";

this.ver = 2; // TODO: handle the CS"4.0" ==> breeze 2 conversion in a better way
if (!CoreUtils.isNullOrUndefined(exception.isManual)) { this.isManual = exception.isManual; }
if (!isNullOrUndefined(exception.isManual)) { this.isManual = exception.isManual; }
}

@@ -91,3 +91,3 @@ }

const exceptions: _ExceptionDetails[] = exception.exceptions
&& CoreUtils.arrMap(exception.exceptions, (ex: IExceptionDetailsInternal) => _ExceptionDetails.CreateFromInterface(logger, ex));
&& arrMap(exception.exceptions, (ex: IExceptionDetailsInternal) => _ExceptionDetails.CreateFromInterface(logger, ex));
const exceptionData = new Exception(logger, {...exception, exceptions}, properties, measurements);

@@ -101,3 +101,3 @@ return exceptionData;

const exceptionDetailsInterface = exceptions instanceof Array
&& CoreUtils.arrMap(exceptions, (exception: _ExceptionDetails) => exception.toInterface())
&& arrMap(exceptions, (exception: _ExceptionDetails) => exception.toInterface())
|| undefined;

@@ -153,12 +153,12 @@

let error = exception as any;
if (!Util.isError(error)) {
if (!isError(error)) {
error = error[strError] || error.evt || error;
}
this.typeName = DataSanitizer.sanitizeString(logger, _getErrorType(error)) || Util.NotSpecified;
this.message = DataSanitizer.sanitizeMessage(logger, exception.message) || Util.NotSpecified;
this.typeName = DataSanitizer.sanitizeString(logger, _getErrorType(error)) || strNotSpecified;
this.message = DataSanitizer.sanitizeMessage(logger, exception.message) || strNotSpecified;
const stack = exception.stack;
this.parsedStack = _ExceptionDetails.parseStack(stack);
this.stack = DataSanitizer.sanitizeException(logger, stack);
this.hasFullStack = Util.isArray(this.parsedStack) && this.parsedStack.length > 0;
this.hasFullStack = isArray(this.parsedStack) && this.parsedStack.length > 0;
} else {

@@ -175,3 +175,3 @@ this.typeName = exception.typeName;

const parsedStack = this.parsedStack instanceof Array
&& CoreUtils.arrMap(this.parsedStack, (frame: _StackFrame) => frame.toInterface());
&& arrMap(this.parsedStack, (frame: _StackFrame) => frame.toInterface());

@@ -193,3 +193,3 @@ const exceptionDetailsInterface: IExceptionDetailsInternal = {

const parsedStack = (exception.parsedStack instanceof Array
&&CoreUtils.arrMap(exception.parsedStack, frame => _StackFrame.CreateFromInterface(frame)))
&& arrMap(exception.parsedStack, frame => _StackFrame.CreateFromInterface(frame)))
|| exception.parsedStack;

@@ -204,3 +204,3 @@

let parsedStack: _StackFrame[];
if (CoreUtils.isString(stack)) {
if (isString(stack)) {
const frames = stack.split('\n');

@@ -277,3 +277,3 @@ parsedStack = [];

// Not converting this to CoreUtils.isString() as typescript uses this logic to "understand" the different
// Not converting this to isString() as typescript uses this logic to "understand" the different
// types for the 2 different code paths

@@ -284,3 +284,3 @@ if (typeof sourceFrame === "string") {

this.method = "<no_method>";
this.assembly = Util.trim(frame);
this.assembly = strTrim(frame);
this.fileName = "";

@@ -290,4 +290,4 @@ this.line = 0;

if (matches && matches.length >= 5) {
this.method = Util.trim(matches[2]) || this.method;
this.fileName = Util.trim(matches[4]);
this.method = strTrim(matches[2]) || this.method;
this.fileName = strTrim(matches[4]);
this.line = parseInt(matches[5]) || 0;

@@ -294,0 +294,0 @@ }

@@ -9,4 +9,4 @@ // Copyright (c) Microsoft Corporation. All rights reserved.

import { DataPoint } from './Common/DataPoint';
import { Util } from '../Util';
import { IDiagnosticLogger } from '@microsoft/applicationinsights-core-js';
import { strNotSpecified } from '../Constants';

@@ -34,3 +34,3 @@ export class Metric extends MetricData implements ISerializable {

dataPoint.min = isNaN(min) || min === null ? undefined : min;
dataPoint.name = DataSanitizer.sanitizeString(logger, name) || Util.NotSpecified;
dataPoint.name = DataSanitizer.sanitizeString(logger, name) || strNotSpecified;
dataPoint.value = value;

@@ -37,0 +37,0 @@

@@ -8,4 +8,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved.

import { FieldType } from '../Enums';
import { Util } from '../Util';
import { IDiagnosticLogger } from '@microsoft/applicationinsights-core-js';
import { msToTimeSpan } from '../HelperFuncs';
import { strNotSpecified } from '../Constants';

@@ -35,5 +36,5 @@ export class PageView extends PageViewData implements ISerializable {

this.url = DataSanitizer.sanitizeUrl(logger, url);
this.name = DataSanitizer.sanitizeString(logger, name) || Util.NotSpecified;
this.name = DataSanitizer.sanitizeString(logger, name) || strNotSpecified;
if (!isNaN(durationMs)) {
this.duration = Util.msToTimeSpan(durationMs);
this.duration = msToTimeSpan(durationMs);
}

@@ -40,0 +41,0 @@ this.properties = DataSanitizer.sanitizeProperties(logger, properties);

@@ -8,5 +8,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved.

import { DataSanitizer } from './Common/DataSanitizer';
import { Util } from '../Util';
import { IDiagnosticLogger, _InternalMessageId, LoggingSeverity } from '@microsoft/applicationinsights-core-js';
import { IPageViewPerformanceTelemetry } from '../Interfaces/IPageViewPerformanceTelemetry';
import { strNotSpecified } from '../Constants';

@@ -39,3 +39,3 @@

this.url = DataSanitizer.sanitizeUrl(logger, url);
this.name = DataSanitizer.sanitizeString(logger, name) || Util.NotSpecified;
this.name = DataSanitizer.sanitizeString(logger, name) || strNotSpecified;

@@ -42,0 +42,0 @@ this.properties = DataSanitizer.sanitizeProperties(logger, properties);

@@ -7,5 +7,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved.

import { ISerializable } from '../Interfaces/Telemetry/ISerializable';
import { Util, AjaxHelper} from '../Util';
import { AjaxHelperParseDependencyPath} from '../Util';
import { RemoteDependencyData as GeneratedRemoteDependencyData } from '../Interfaces/Contracts/Generated/RemoteDependencyData';
import { IDiagnosticLogger } from '@microsoft/applicationinsights-core-js';
import { msToTimeSpan } from '../HelperFuncs';

@@ -50,3 +51,3 @@ export class RemoteDependencyData extends GeneratedRemoteDependencyData implements ISerializable {

this.duration = Util.msToTimeSpan(value);
this.duration = msToTimeSpan(value);
this.success = success;

@@ -57,3 +58,3 @@ this.resultCode = resultCode + "";

const dependencyFields = AjaxHelper.ParseDependencyPath(logger, absoluteUrl, method, commandName);
const dependencyFields = AjaxHelperParseDependencyPath(logger, absoluteUrl, method, commandName);
this.data = DataSanitizer.sanitizeUrl(logger, commandName) || dependencyFields.data; // get a value from hosturl if commandName not available

@@ -60,0 +61,0 @@ this.target = DataSanitizer.sanitizeString(logger, dependencyFields.target);

@@ -9,4 +9,4 @@ // Copyright (c) Microsoft Corporation. All rights reserved.

import { SeverityLevel } from '../Interfaces/Contracts/Generated/SeverityLevel';
import { Util } from '../Util';
import { IDiagnosticLogger } from '@microsoft/applicationinsights-core-js';
import { strNotSpecified } from '../Constants';

@@ -30,3 +30,3 @@ export class Trace extends MessageData implements ISerializable {

super();
message = message || Util.NotSpecified;
message = message || strNotSpecified;
this.message = DataSanitizer.sanitizeMessage(logger, message);

@@ -33,0 +33,0 @@ this.properties = DataSanitizer.sanitizeProperties(logger, properties);

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
import { Util } from "./Util";
import { DataSanitizer } from "./Telemetry/Common/DataSanitizer";
import { ITelemetryItem, CoreUtils, IDiagnosticLogger, objForEachKey } from "@microsoft/applicationinsights-core-js";
import { ITelemetryItem, IDiagnosticLogger, objForEachKey, isNullOrUndefined, toISOString } from "@microsoft/applicationinsights-core-js";
import { strNotSpecified } from "./Constants";

@@ -27,7 +27,7 @@ export class TelemetryItemCreator {

envelopeName = DataSanitizer.sanitizeString(logger, envelopeName) || Util.NotSpecified;
envelopeName = DataSanitizer.sanitizeString(logger, envelopeName) || strNotSpecified;
if (CoreUtils.isNullOrUndefined(item) ||
CoreUtils.isNullOrUndefined(baseType) ||
CoreUtils.isNullOrUndefined(envelopeName)) {
if (isNullOrUndefined(item) ||
isNullOrUndefined(baseType) ||
isNullOrUndefined(envelopeName)) {
throw Error("Input doesn't contain all required fields");

@@ -38,3 +38,3 @@ }

name: envelopeName,
time: CoreUtils.toISOString(new Date()),
time: toISOString(new Date()),
iKey: "", // this will be set in TelemetryContext

@@ -50,3 +50,3 @@ ext: systemProperties ? systemProperties : {}, // part A

// Part C
if (!CoreUtils.isNullOrUndefined(customProperties)) {
if (!isNullOrUndefined(customProperties)) {
objForEachKey(customProperties, (prop, value) => {

@@ -53,0 +53,0 @@ telemetryItem.data[prop] = value;

@@ -6,6 +6,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved.

import {
CoreUtils, EventHelper, _InternalMessageId, LoggingSeverity, IDiagnosticLogger, IPlugin, getCrypto, getMsCrypto,
getGlobal, getGlobalInst, getWindow, getDocument, getNavigator, getPerformance, getLocation, hasJSON, getJSON,
strPrototype,
objForEachKey
_InternalMessageId, LoggingSeverity, IDiagnosticLogger, IPlugin,
getGlobal, getGlobalInst, getDocument, getNavigator, getPerformance,
getExceptionName as coreGetExceptionName, dumpObj, objForEachKey,
isString, isNullOrUndefined, strTrim, random32, isArray, isError, isDate,
newId, generateW3CId, toISOString, arrForEach, getIEVersion, attachEvent,
dateNow, uaDisallowsSameSiteNone, disableCookies as coreDisableCookies,
canUseCookies as coreCanUseCookies, getCookie as coreGetCookie,
setCookie as coreSetCookie, deleteCookie as coreDeleteCookie
} from "@microsoft/applicationinsights-core-js";

@@ -15,91 +19,30 @@ import { RequestHeaders } from "./RequestResponseHeaders";

import { ICorrelationConfig } from "./Interfaces/ICorrelationConfig";
import { createDomEvent } from './DomHelperFuncs';
import { stringToBoolOrDefault, msToTimeSpan, isBeaconApiSupported, isCrossOriginError, getExtensionByName } from "./HelperFuncs";
import { strNotSpecified } from "./Constants";
import { utlCanUseLocalStorage, utlCanUseSessionStorage, utlDisableStorage, utlGetSessionStorage, utlGetSessionStorageKeys, utlGetLocalStorage, utlRemoveSessionStorage, utlRemoveStorage, utlSetSessionStorage, utlSetLocalStorage } from "./StorageHelperFuncs";
import { urlGetAbsoluteUrl, urlGetCompleteUrl, urlGetPathName, urlParseFullHost, urlParseHost, urlParseUrl } from "./UrlHelperFuncs";
let _navigator = getNavigator();
let _isString = CoreUtils.isString;
let _uaDisallowsSameSiteNone: boolean = null;
// listing only non-geo specific locations
const _internalEndpoints: string[] = [
"https://dc.services.visualstudio.com/v2/track",
"https://breeze.aimon.applicationinsights.io/v2/track",
"https://dc-int.services.visualstudio.com/v2/track"
];
function _endsWith(value: string, search: string) {
let len = value.length;
let start = len - search.length;
return value.substring(start >= 0 ? start : 0, len) === search;
export function isInternalApplicationInsightsEndpoint(endpointUrl: string): boolean {
return _internalEndpoints.indexOf(endpointUrl.toLowerCase()) !== -1;
}
export class Util {
private static document: any = getDocument() || {};
private static _canUseLocalStorage: boolean = undefined;
private static _canUseSessionStorage: boolean = undefined;
// listing only non-geo specific locations
private static _internalEndpoints: string[] = [
"https://dc.services.visualstudio.com/v2/track",
"https://breeze.aimon.applicationinsights.io/v2/track",
"https://dc-int.services.visualstudio.com/v2/track"
];
public static NotSpecified = "not_specified";
export interface IUtil {
NotSpecified: string,
public static createDomEvent(eventName: string): Event {
let event: Event = null;
createDomEvent: (eventName: string) => Event,
if (CoreUtils.isFunction(Event)) { // Use Event constructor when available
event = new Event(eventName);
} else { // Event has no constructor in IE
let doc = getDocument();
if (doc && doc.createEvent) {
event = doc.createEvent("Event");
event.initEvent(eventName, true, true);
}
}
return event;
}
/*
* Force the SDK not to use local and session storage
*/
public static disableStorage() {
Util._canUseLocalStorage = false;
Util._canUseSessionStorage = false;
}
disableStorage: () => void,
/**
* Gets the localStorage object if available
* @return {Storage} - Returns the storage object if available else returns null
*/
private static _getLocalStorageObject(): Storage {
if (Util.canUseLocalStorage()) {
return Util._getVerifiedStorageObject(StorageType.LocalStorage);
}
return null;
}
/**
* Tests storage object (localStorage or sessionStorage) to verify that it is usable
* More details here: https://mathiasbynens.be/notes/localstorage-pattern
* @param storageType Type of storage
* @return {Storage} Returns storage object verified that it is usable
*/
private static _getVerifiedStorageObject(storageType: StorageType): Storage {
let storage: Storage = null;
let fail: boolean;
let uid: Date;
try {
if (CoreUtils.isNullOrUndefined(getGlobal())) {
return null;
}
uid = new Date;
storage = storageType === StorageType.LocalStorage ? getGlobalInst("localStorage") : getGlobalInst("sessionStorage");
storage.setItem(uid.toString(), uid.toString());
fail = storage.getItem(uid.toString()) !== uid.toString();
storage.removeItem(uid.toString());
if (fail) {
storage = null;
}
} catch (exception) {
storage = null;
}
return storage;
}
/**
* Checks if endpoint URL is application insights internal injestion service URL.

@@ -110,5 +53,3 @@ *

*/
public static isInternalApplicationInsightsEndpoint(endpointUrl: string): boolean {
return Util._internalEndpoints.indexOf(endpointUrl.toLowerCase()) !== -1;
}
isInternalApplicationInsightsEndpoint: (endpointUrl: string) => boolean,

@@ -120,10 +61,4 @@ /**

*/
public static canUseLocalStorage(): boolean {
if (Util._canUseLocalStorage === undefined) {
Util._canUseLocalStorage = !!Util._getVerifiedStorageObject(StorageType.LocalStorage);
}
canUseLocalStorage: () => boolean,
return Util._canUseLocalStorage;
}
/**

@@ -135,20 +70,4 @@ * Get an object from the browser's local storage

*/
public static getStorage(logger: IDiagnosticLogger, name: string): string {
const storage = Util._getLocalStorageObject();
if (storage !== null) {
try {
return storage.getItem(name);
} catch (e) {
Util._canUseLocalStorage = false;
getStorage: (logger: IDiagnosticLogger, name: string) => string,
logger.throwInternal(
LoggingSeverity.WARNING,
_InternalMessageId.BrowserCannotReadLocalStorage,
"Browser failed read of local storage. " + Util.getExceptionName(e),
{ exception: Util.dump(e) });
}
}
return null;
}
/**

@@ -161,21 +80,4 @@ * Set the contents of an object in the browser's local storage

*/
public static setStorage(logger: IDiagnosticLogger, name: string, data: string): boolean {
const storage = Util._getLocalStorageObject();
if (storage !== null) {
try {
storage.setItem(name, data);
return true;
} catch (e) {
Util._canUseLocalStorage = false;
setStorage: (logger: IDiagnosticLogger, name: string, data: string) => boolean,
logger.throwInternal(
LoggingSeverity.WARNING,
_InternalMessageId.BrowserCannotWriteLocalStorage,
"Browser failed write to local storage. " + Util.getExceptionName(e),
{ exception: Util.dump(e) });
}
}
return false;
}
/**

@@ -187,34 +89,5 @@ * Remove an object from the browser's local storage

*/
public static removeStorage(logger: IDiagnosticLogger, name: string): boolean {
const storage = Util._getLocalStorageObject();
if (storage !== null) {
try {
storage.removeItem(name);
return true;
} catch (e) {
Util._canUseLocalStorage = false;
removeStorage: (logger: IDiagnosticLogger, name: string) => boolean,
logger.throwInternal(
LoggingSeverity.WARNING,
_InternalMessageId.BrowserFailedRemovalFromLocalStorage,
"Browser failed removal of local storage item. " + Util.getExceptionName(e),
{ exception: Util.dump(e) });
}
}
return false;
}
/**
* Gets the sessionStorage object if available
* @return {Storage} - Returns the storage object if available else returns null
*/
private static _getSessionStorageObject(): Storage {
if (Util.canUseSessionStorage()) {
return Util._getVerifiedStorageObject(StorageType.SessionStorage);
}
return null;
}
/**
* Check if the browser supports session storage.

@@ -224,10 +97,4 @@ *

*/
public static canUseSessionStorage(): boolean {
if (Util._canUseSessionStorage === undefined) {
Util._canUseSessionStorage = !!Util._getVerifiedStorageObject(StorageType.SessionStorage);
}
canUseSessionStorage: () => boolean,
return Util._canUseSessionStorage;
}
/**

@@ -238,14 +105,4 @@ * Gets the list of session storage keys

*/
public static getSessionStorageKeys(): string[] {
const keys: string[] = [];
getSessionStorageKeys: () => string[],
if (Util.canUseSessionStorage()) {
objForEachKey(getGlobalInst<any>("sessionStorage"), (key) => {
keys.push(key);
});
}
return keys;
}
/**

@@ -257,20 +114,4 @@ * Get an object from the browser's session storage

*/
public static getSessionStorage(logger: IDiagnosticLogger, name: string): string {
const storage = Util._getSessionStorageObject();
if (storage !== null) {
try {
return storage.getItem(name);
} catch (e) {
Util._canUseSessionStorage = false;
getSessionStorage: (logger: IDiagnosticLogger, name: string) => string,
logger.throwInternal(
LoggingSeverity.WARNING,
_InternalMessageId.BrowserCannotReadSessionStorage,
"Browser failed read of session storage. " + Util.getExceptionName(e),
{ exception: Util.dump(e) });
}
}
return null;
}
/**

@@ -283,21 +124,4 @@ * Set the contents of an object in the browser's session storage

*/
public static setSessionStorage(logger: IDiagnosticLogger, name: string, data: string): boolean {
const storage = Util._getSessionStorageObject();
if (storage !== null) {
try {
storage.setItem(name, data);
return true;
} catch (e) {
Util._canUseSessionStorage = false;
setSessionStorage: (logger: IDiagnosticLogger, name: string, data: string) => boolean,
logger.throwInternal(
LoggingSeverity.WARNING,
_InternalMessageId.BrowserCannotWriteSessionStorage,
"Browser failed write to session storage. " + Util.getExceptionName(e),
{ exception: Util.dump(e) });
}
}
return false;
}
/**

@@ -309,179 +133,38 @@ * Remove an object from the browser's session storage

*/
public static removeSessionStorage(logger: IDiagnosticLogger, name: string): boolean {
const storage = Util._getSessionStorageObject();
if (storage !== null) {
try {
storage.removeItem(name);
return true;
} catch (e) {
Util._canUseSessionStorage = false;
removeSessionStorage: (logger: IDiagnosticLogger, name: string) => boolean,
logger.throwInternal(
LoggingSeverity.WARNING,
_InternalMessageId.BrowserFailedRemovalFromSessionStorage,
"Browser failed removal of session storage item. " + Util.getExceptionName(e),
{ exception: Util.dump(e) });
}
}
return false;
}
/*
* Force the SDK not to store and read any data from cookies
/**
* @deprecated - Use the core.getCookieMgr().disable()
* Force the SDK not to store and read any data from cookies.
*/
public static disableCookies() {
CoreUtils.disableCookies();
}
disableCookies: () => void,
/*
* helper method to tell if document.cookie object is available
/**
* @deprecated - Use the core.getCookieMgr().isEnabled()
* Helper method to tell if document.cookie object is available and whether it can be used.
*/
public static canUseCookies(logger: IDiagnosticLogger): any {
if (CoreUtils._canUseCookies === undefined) {
CoreUtils._canUseCookies = false;
canUseCookies: (logger: IDiagnosticLogger) => any,
try {
CoreUtils._canUseCookies = Util.document.cookie !== undefined;
} catch (e) {
logger.throwInternal(
LoggingSeverity.WARNING,
_InternalMessageId.CannotAccessCookie,
"Cannot access document.cookie - " + Util.getExceptionName(e),
{ exception: Util.dump(e) });
};
}
disallowsSameSiteNone: (userAgent: string) => boolean,
return CoreUtils._canUseCookies;
}
public static disallowsSameSiteNone(userAgent: string) {
if (!_isString(userAgent)) {
return false;
}
// Cover all iOS based browsers here. This includes:
// - Safari on iOS 12 for iPhone, iPod Touch, iPad
// - WkWebview on iOS 12 for iPhone, iPod Touch, iPad
// - Chrome on iOS 12 for iPhone, iPod Touch, iPad
// All of which are broken by SameSite=None, because they use the iOS networking stack
if (userAgent.indexOf("CPU iPhone OS 12") !== -1 || userAgent.indexOf("iPad; CPU OS 12") !== -1) {
return true;
}
// Cover Mac OS X based browsers that use the Mac OS networking stack. This includes:
// - Safari on Mac OS X
// This does not include:
// - Internal browser on Mac OS X
// - Chrome on Mac OS X
// - Chromium on Mac OS X
// Because they do not use the Mac OS networking stack.
if (userAgent.indexOf("Macintosh; Intel Mac OS X 10_14") !== -1 && userAgent.indexOf("Version/") !== -1 && userAgent.indexOf("Safari") !== -1) {
return true;
}
// Cover Mac OS X internal browsers that use the Mac OS networking stack. This includes:
// - Internal browser on Mac OS X
// This does not include:
// - Safari on Mac OS X
// - Chrome on Mac OS X
// - Chromium on Mac OS X
// Because they do not use the Mac OS networking stack.
if (userAgent.indexOf("Macintosh; Intel Mac OS X 10_14") !== -1 && _endsWith(userAgent, "AppleWebKit/605.1.15 (KHTML, like Gecko)")) {
return true;
}
// Cover Chrome 50-69, because some versions are broken by SameSite=None, and none in this range require it.
// Note: this covers some pre-Chromium Edge versions, but pre-Chromim Edge does not require SameSite=None, so this is fine.
// Note: this regex applies to Windows, Mac OS X, and Linux, deliberately.
if (userAgent.indexOf("Chrome/5") !== -1 || userAgent.indexOf("Chrome/6") !== -1) {
return true;
}
// Unreal Engine runs Chromium 59, but does not advertise as Chrome until 4.23. Treat versions of Unreal
// that don't specify their Chrome version as lacking support for SameSite=None.
if (userAgent.indexOf("UnrealEngine") !== -1 && userAgent.indexOf("Chrome") === -1) {
return true;
}
// UCBrowser < 12.13.2 ignores Set-Cookie headers with SameSite=None
// NB: this rule isn't complete - you need regex to make a complete rule.
// See: https://www.chromium.org/updates/same-site/incompatible-clients
if (userAgent.indexOf("UCBrowser/12") !== -1 || userAgent.indexOf("UCBrowser/11") !== -1) {
return true;
}
return false;
}
/**
* @deprecated - Use the core.getCookieMgr().set()
* helper method to set userId and sessionId cookie
*/
public static setCookie(logger: IDiagnosticLogger, name: string, value: string, domain?: string) {
if (Util.canUseCookies(logger)) {
let domainAttrib = "";
let secureAttrib = "";
setCookie: (logger: IDiagnosticLogger, name: string, value: string, domain?: string) => void,
if (domain) {
domainAttrib = ";domain=" + domain;
}
stringToBoolOrDefault: (str: any, defaultValue?: boolean) => boolean,
let location = getLocation();
if (location && location.protocol === "https:") {
secureAttrib = ";secure";
if (_uaDisallowsSameSiteNone === null) {
_uaDisallowsSameSiteNone = Util.disallowsSameSiteNone((getNavigator() || {} as Navigator).userAgent);
}
if (!_uaDisallowsSameSiteNone) {
value = value + ";SameSite=None"; // SameSite can only be set on secure pages
}
}
Util.document.cookie = name + "=" + value + domainAttrib + ";path=/" + secureAttrib;
}
}
public static stringToBoolOrDefault(str: any, defaultValue = false): boolean {
if (str === undefined || str === null) {
return defaultValue;
}
return str.toString().toLowerCase() === "true";
}
/**
* @deprecated - Use the core.getCookieMgr().get()
* helper method to access userId and sessionId cookie
*/
public static getCookie(logger: IDiagnosticLogger, name: string) {
if (!Util.canUseCookies(logger)) {
return;
}
getCookie: (logger: IDiagnosticLogger, name: string) => string,
let value = "";
if (name && name.length) {
const cookieName = name + "=";
const cookies = Util.document.cookie.split(";");
for (let i = 0; i < cookies.length; i++) {
let cookie = cookies[i];
cookie = Util.trim(cookie);
if (cookie && cookie.indexOf(cookieName) === 0) {
value = cookie.substring(cookieName.length, cookies[i].length);
break;
}
}
}
return value;
}
/**
* @deprecated - Use the core.getCookieMgr().del()
* Deletes a cookie by setting it's expiration time in the past.
* @param name - The name of the cookie to delete.
*/
public static deleteCookie(logger: IDiagnosticLogger, name: string) {
if (Util.canUseCookies(logger)) {
// Setting the expiration date in the past immediately removes the cookie
Util.document.cookie = name + "=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;";
}
}
deleteCookie: (logger: IDiagnosticLogger, name: string) => void,

@@ -491,3 +174,3 @@ /**

*/
public static trim = CoreUtils.strTrim;
trim: (str: any) => string,

@@ -497,3 +180,3 @@ /**

*/
public static newId = CoreUtils.newId;
newId: () => string,

@@ -503,5 +186,3 @@ /**

*/
public static random32() {
return CoreUtils.random32(true);
}
random32: () => number,

@@ -511,3 +192,3 @@ /**

*/
public static generateW3CId = CoreUtils.generateW3CId;
generateW3CId: () => string,

@@ -517,3 +198,3 @@ /**

*/
public static isArray = CoreUtils.isArray;
isArray: (obj: any) => boolean,

@@ -523,3 +204,3 @@ /**

*/
public static isError = CoreUtils.isError;
isError: (obj: any) => obj is Error,

@@ -529,6 +210,6 @@ /**

*/
public static isDate = CoreUtils.isDate;
isDate: (obj: any) => obj is Date,
// Keeping this name for backward compatibility (for now)
public static toISOStringForIE8 = CoreUtils.toISOString;
toISOStringForIE8: (date: Date) => string,

@@ -538,40 +219,9 @@ /**

*/
public static getIEVersion(userAgentStr: string = null): number {
const myNav = userAgentStr ? userAgentStr.toLowerCase() : (_navigator ? (_navigator.userAgent || "").toLowerCase() : "");
if (myNav.indexOf("msie") !== -1) {
return parseInt(myNav.split("msie")[1]);
} else if (myNav.indexOf("trident/")) {
let tridentVer = parseInt(myNav.split("trident/")[1]);
if (tridentVer) {
return tridentVer + 4;
}
}
getIEVersion: (userAgentStr?: string) => number,
return null;
}
/**
* Convert ms to c# time span format
*/
public static msToTimeSpan(totalms: number): string {
if (isNaN(totalms) || totalms < 0) {
totalms = 0;
}
msToTimeSpan: (totalms: number) => string,
totalms = Math.round(totalms);
let ms = "" + totalms % 1000;
let sec = "" + Math.floor(totalms / 1000) % 60;
let min = "" + Math.floor(totalms / (1000 * 60)) % 60;
let hour = "" + Math.floor(totalms / (1000 * 60 * 60)) % 24;
const days = Math.floor(totalms / (1000 * 60 * 60 * 24));
ms = ms.length === 1 ? "00" + ms : ms.length === 2 ? "0" + ms : ms;
sec = sec.length < 2 ? "0" + sec : sec;
min = min.length < 2 ? "0" + min : min;
hour = hour.length < 2 ? "0" + hour : hour;
return (days > 0 ? days + "." : "") + hour + ":" + min + ":" + sec + "." + ms;
}
/**

@@ -581,5 +231,3 @@ * Checks if error has no meaningful data inside. Ususally such errors are received by window.onerror when error

*/
public static isCrossOriginError(message: string, url: string, lineNumber: number, columnNumber: number, error: Error): boolean {
return (message === "Script error." || message === "Script error") && !error;
}
isCrossOriginError: (message: string|Event, url: string, lineNumber: number, columnNumber: number, error: Error) => boolean,

@@ -589,24 +237,8 @@ /**

*/
public static dump(object: any): string {
const objectTypeDump: string = Object[strPrototype].toString.call(object);
let propertyValueDump: string = "";
if (objectTypeDump === "[object Error]") {
propertyValueDump = "{ stack: '" + object.stack + "', message: '" + object.message + "', name: '" + object.name + "'";
} else if (hasJSON()) {
propertyValueDump = getJSON().stringify(object);
}
dump: (object: any) => string,
return objectTypeDump + propertyValueDump;
}
/**
* Returns the name of object if it's an Error. Otherwise, returns empty string.
*/
public static getExceptionName(object: any): string {
const objectTypeDump: string = Object[strPrototype].toString.call(object);
if (objectTypeDump === "[object Error]") {
return object.name;
}
return "";
}
getExceptionName: (object: any) => string,

@@ -619,5 +251,3 @@ /**

*/
public static addEventHandler(eventName: string, callback: any): boolean {
return EventHelper.Attach(getWindow(), eventName, callback);
}
addEventHandler: (obj: any, eventNameWithoutOn: string, handlerRef: any, useCapture: boolean) => boolean,

@@ -627,125 +257,98 @@ /**

*/
public static IsBeaconApiSupported(): boolean {
return ('sendBeacon' in _navigator && (_navigator as any).sendBeacon);
}
IsBeaconApiSupported: () => boolean,
public static getExtension(extensions: IPlugin[], identifier: string) {
let extension = null;
let extIx = 0;
while (!extension && extIx < extensions.length) {
if (extensions[extIx] && extensions[extIx].identifier === identifier) {
extension = extensions[extIx];
}
extIx++;
}
return extension;
}
getExtension: (extensions: IPlugin[], identifier: string) => IPlugin | null
}
export class UrlHelper {
private static document: any = getDocument() || {};
export const Util: IUtil = {
NotSpecified: strNotSpecified,
createDomEvent: createDomEvent,
disableStorage: utlDisableStorage,
isInternalApplicationInsightsEndpoint: isInternalApplicationInsightsEndpoint,
canUseLocalStorage: utlCanUseLocalStorage,
getStorage: utlGetLocalStorage,
setStorage: utlSetLocalStorage,
removeStorage: utlRemoveStorage,
canUseSessionStorage: utlCanUseSessionStorage,
getSessionStorageKeys: utlGetSessionStorageKeys,
getSessionStorage: utlGetSessionStorage,
setSessionStorage: utlSetSessionStorage,
removeSessionStorage: utlRemoveSessionStorage,
disableCookies: coreDisableCookies,
canUseCookies: coreCanUseCookies,
disallowsSameSiteNone: uaDisallowsSameSiteNone,
setCookie: coreSetCookie,
stringToBoolOrDefault: stringToBoolOrDefault,
getCookie: coreGetCookie,
deleteCookie: coreDeleteCookie,
trim: strTrim,
newId: newId,
random32: function() {
return random32(true);
},
generateW3CId: generateW3CId,
isArray: isArray,
isError: isError,
isDate: isDate,
toISOStringForIE8: toISOString,
getIEVersion: getIEVersion,
msToTimeSpan: msToTimeSpan,
isCrossOriginError: isCrossOriginError,
dump: dumpObj,
getExceptionName: coreGetExceptionName,
addEventHandler: attachEvent,
IsBeaconApiSupported: isBeaconApiSupported,
getExtension: getExtensionByName
};
private static _htmlAnchorIdx: number = 0;
// Use an array of temporary values as it's possible for multiple calls to parseUrl() will be called with different URLs
// Using a cache size of 5 for now as it current depth usage is at least 2, so adding a minor buffer to handle future updates
private static _htmlAnchorElement: HTMLAnchorElement[] = [null, null, null, null, null];
export interface IUrlHelper {
public static parseUrl(url: string): HTMLAnchorElement {
let anchorIdx = UrlHelper._htmlAnchorIdx;
let anchorCache = UrlHelper._htmlAnchorElement;
let tempAnchor = anchorCache[anchorIdx];
if (!UrlHelper.document.createElement) {
// Always create the temp instance if createElement is not available
tempAnchor = { host: UrlHelper.parseHost(url, true) } as HTMLAnchorElement;
} else if (!anchorCache[anchorIdx]) {
// Create and cache the unattached anchor instance
tempAnchor = anchorCache[anchorIdx] = UrlHelper.document.createElement('a');
}
parseUrl: (url: string) => HTMLAnchorElement,
getAbsoluteUrl: (url: string) => string,
getPathName: (url: string) => string,
getCompleteUrl: (method: string, absoluteUrl: string) => string,
tempAnchor.href = url;
// Fallback method to grab host from url if document.createElement method is not available
parseHost: (url: string, inclPort?: boolean) => string,
// Move the cache index forward
anchorIdx++;
if (anchorIdx >= anchorCache.length) {
anchorIdx = 0;
}
/**
* Get the full host from the url, optionally including the port
*/
parseFullHost: (url: string, inclPort?: boolean) => string
};
UrlHelper._htmlAnchorIdx = anchorIdx;
export const UrlHelper: IUrlHelper = {
parseUrl: urlParseUrl,
getAbsoluteUrl: urlGetAbsoluteUrl,
getPathName: urlGetPathName,
getCompleteUrl: urlGetCompleteUrl,
parseHost: urlParseHost,
parseFullHost: urlParseFullHost
};
return tempAnchor;
}
export interface ICorrelationIdHelper {
correlationIdPrefix: string;
public static getAbsoluteUrl(url: string): string {
let result: string;
const a = UrlHelper.parseUrl(url);
if (a) {
result = a.href;
}
/**
* Checks if a request url is not on a excluded domain list and if it is safe to add correlation headers.
* Headers are always included if the current domain matches the request domain. If they do not match (CORS),
* they are regex-ed across correlationHeaderDomains and correlationHeaderExcludedDomains to determine if headers are included.
* Some environments don't give information on currentHost via window.location.host (e.g. Cordova). In these cases, the user must
* manually supply domains to include correlation headers on. Else, no headers will be included at all.
*/
canIncludeCorrelationHeader(config: ICorrelationConfig, requestUrl: string, currentHost?: string): boolean;
return result;
}
/**
* Combines target appId and target role name from response header.
*/
getCorrelationContext(responseHeader: string): string | undefined;
public static getPathName(url: string): string {
let result: string;
const a = UrlHelper.parseUrl(url);
if (a) {
result = a.pathname;
}
return result;
}
public static getCompleteUrl(method: string, absoluteUrl: string) {
if (method) {
return method.toUpperCase() + " " + absoluteUrl;
} else {
return absoluteUrl;
}
}
// Fallback method to grab host from url if document.createElement method is not available
public static parseHost(url: string, inclPort?: boolean) {
let fullHost = UrlHelper.parseFullHost(url, inclPort);
if (fullHost) {
const match = fullHost.match(/(www[0-9]?\.)?(.[^/:]+)(\:[\d]+)?/i);
if (match != null && match.length > 3 && _isString(match[2]) && match[2].length > 0) {
return match[2] + (match[3] || "");
}
}
return fullHost;
}
/**
* Get the full host from the url, optionally including the port
* Gets key from correlation response header
*/
public static parseFullHost(url: string, inclPort?: boolean) {
let result = null;
if (url) {
const match = url.match(/(\w*):\/\/(.[^/:]+)(\:[\d]+)?/i);
if (match != null && match.length > 2 && _isString(match[2]) && match[2].length > 0) {
result = match[2] || "";
if (inclPort && match.length > 2) {
const protocol = (match[1] || "").toLowerCase();
let port = match[3] || "";
// IE includes the standard port so pass it off if it's the same as the protocol
if (protocol === "http" && port === ":80") {
port = "";
} else if (protocol === "https" && port === ":443") {
port = "";
}
result += port;
}
}
}
return result;
}
getCorrelationContextValue(responseHeader: string, key: string): string | undefined;
}
export class CorrelationIdHelper {
public static correlationIdPrefix = "cid-v1:";
export const CorrelationIdHelper: ICorrelationIdHelper = {
correlationIdPrefix: "cid-v1:",

@@ -759,3 +362,3 @@ /**

*/
public static canIncludeCorrelationHeader(config: ICorrelationConfig, requestUrl: string, currentHost?: string) {
canIncludeCorrelationHeader: function(config: ICorrelationConfig, requestUrl: string, currentHost?: string) {
if (!requestUrl || (config && config.disableCorrelationHeaders)) {

@@ -773,7 +376,7 @@ return false;

let requestHost = UrlHelper.parseUrl(requestUrl).host.toLowerCase();
let requestHost = urlParseUrl(requestUrl).host.toLowerCase();
if (requestHost && (requestHost.indexOf(":443") !== -1 || requestHost.indexOf(":80") !== -1)) {
// [Bug #1260] IE can include the port even for http and https URLs so if present
// try and parse it to remove if it matches the default protocol port
requestHost = (UrlHelper.parseFullHost(requestUrl, true) || "").toLowerCase();
requestHost = (urlParseFullHost(requestUrl, true) || "").toLowerCase();
}

@@ -788,3 +391,3 @@

let matchExists: boolean;
CoreUtils.arrForEach(includedDomains, (domain) => {
arrForEach(includedDomains, (domain) => {
const regex = new RegExp(domain.toLowerCase().replace(/\./g, "\.").replace(/\*/g, ".*"));

@@ -814,3 +417,3 @@ matchExists = matchExists || regex.test(requestHost);

return requestHost && requestHost.length > 0;
}
},

@@ -820,3 +423,3 @@ /**

*/
public static getCorrelationContext(responseHeader: string) {
getCorrelationContext: function(responseHeader: string) {
if (responseHeader) {

@@ -828,3 +431,3 @@ const correlationId = CorrelationIdHelper.getCorrelationContextValue(responseHeader, RequestHeaders.requestContextTargetKey);

}
}
},

@@ -834,3 +437,3 @@ /**

*/
public static getCorrelationContextValue(responseHeader: string, key: string) {
getCorrelationContextValue: function(responseHeader: string, key: string) {
if (responseHeader) {

@@ -846,68 +449,75 @@ const keyValues = responseHeader.split(",");

}
}
};
export class AjaxHelper {
public static ParseDependencyPath(logger: IDiagnosticLogger, absoluteUrl: string, method: string, commandName: string) {
let target, name = commandName, data = commandName;
export function AjaxHelperParseDependencyPath(logger: IDiagnosticLogger, absoluteUrl: string, method: string, commandName: string) {
let target, name = commandName, data = commandName;
if (absoluteUrl && absoluteUrl.length > 0) {
const parsedUrl: HTMLAnchorElement = UrlHelper.parseUrl(absoluteUrl)
target = parsedUrl.host;
if (!name) {
if (parsedUrl.pathname != null) {
let pathName: string = (parsedUrl.pathname.length === 0) ? "/" : parsedUrl.pathname;
if (pathName.charAt(0) !== '/') {
pathName = "/" + pathName;
}
data = parsedUrl.pathname;
name = DataSanitizer.sanitizeString(logger, method ? method + " " + pathName : pathName);
} else {
name = DataSanitizer.sanitizeString(logger, absoluteUrl);
if (absoluteUrl && absoluteUrl.length > 0) {
const parsedUrl: HTMLAnchorElement = urlParseUrl(absoluteUrl)
target = parsedUrl.host;
if (!name) {
if (parsedUrl.pathname != null) {
let pathName: string = (parsedUrl.pathname.length === 0) ? "/" : parsedUrl.pathname;
if (pathName.charAt(0) !== '/') {
pathName = "/" + pathName;
}
data = parsedUrl.pathname;
name = DataSanitizer.sanitizeString(logger, method ? method + " " + pathName : pathName);
} else {
name = DataSanitizer.sanitizeString(logger, absoluteUrl);
}
} else {
target = commandName;
name = commandName;
}
} else {
target = commandName;
name = commandName;
}
return {
target,
name,
data
};
return {
target,
name,
data
};
}
export function dateTimeUtilsNow() {
// returns the window or webworker performance object
let perf = getPerformance();
if (perf && perf.now && perf.timing) {
let now = perf.now() + perf.timing.navigationStart;
// Known issue with IE where this calculation can be negative, so if it is then ignore and fallback
if (now > 0) {
return now;
}
}
return dateNow();
}
/**
* A utility class that helps getting time related parameters
*/
export class DateTimeUtils {
export function dateTimeUtilsDuration(start: number, end: number): number {
let result = null;
if (start !== 0 && end !== 0 && !isNullOrUndefined(start) && !isNullOrUndefined(end)) {
result = end - start;
}
return result;
}
export interface IDateTimeUtils {
/**
* Get the number of milliseconds since 1970/01/01 in local timezone
*/
public static Now = () => {
// returns the window or webworker performance object
let perf = getPerformance();
if (perf && perf.now && perf.timing) {
let now = perf.now() + perf.timing.navigationStart;
// Known issue with IE where this calculation can be negative, so if it is then ignore and fallback
if (now > 0) {
return now;
}
}
Now: () => number;
return new Date().getTime();
};
/**
* Gets duration between two timestamps
*/
public static GetDuration = (start: number, end: number): number => {
let result = null;
if (start !== 0 && end !== 0 && !CoreUtils.isNullOrUndefined(start) && !CoreUtils.isNullOrUndefined(end)) {
result = end - start;
}
GetDuration: (start: number, end: number) => number;
}
return result;
}
}
/**
* A utility class that helps getting time related parameters
*/
export const DateTimeUtils: IDateTimeUtils = {
Now: dateTimeUtilsNow,
GetDuration: dateTimeUtilsDuration
};
import '@microsoft/applicationinsights-shims';
export { Util, CorrelationIdHelper, UrlHelper, DateTimeUtils } from './Util';
export { ConnectionStringParser } from './ConnectionStringParser';
export { IUtil, Util, ICorrelationIdHelper, CorrelationIdHelper, IDateTimeUtils, DateTimeUtils, dateTimeUtilsNow, dateTimeUtilsDuration, IUrlHelper, UrlHelper, isInternalApplicationInsightsEndpoint } from './Util';
export { parseConnectionString, ConnectionStringParser } from './ConnectionStringParser';
export { FieldType } from './Enums';
export { RequestHeaders } from './RequestResponseHeaders';
export { DisabledPropertyName, ProcessLegacy, SampleRate, HttpMethod, DEFAULT_BREEZE_ENDPOINT } from './Constants';
export { IRequestHeaders, RequestHeaders } from './RequestResponseHeaders';
export { DisabledPropertyName, ProcessLegacy, SampleRate, HttpMethod, DEFAULT_BREEZE_ENDPOINT, strNotSpecified } from './Constants';
export { Data as AIData } from './Interfaces/Contracts/Generated/Data';

@@ -31,3 +31,3 @@ export { Base as AIBase } from './Interfaces/Contracts/Generated/Base';

export { IChannelControlsAI } from './Interfaces/IChannelControlsAI';
export { ContextTagKeys } from './Interfaces/Contracts/Generated/ContextTagKeys';
export { IContextTagKeys, ContextTagKeys } from './Interfaces/Contracts/Generated/ContextTagKeys';
export { DataSanitizer } from './Telemetry/Common/DataSanitizer';

@@ -51,4 +51,8 @@ export { TelemetryItemCreator } from './TelemetryItemCreator';

export { DistributedTracingModes } from './Enums';
export { stringToBoolOrDefault, msToTimeSpan, isBeaconApiSupported, getExtensionByName, isCrossOriginError } from './HelperFuncs';
export { createDomEvent } from './DomHelperFuncs';
export { utlDisableStorage, utlCanUseLocalStorage, utlGetLocalStorage, utlSetLocalStorage, utlRemoveStorage, utlCanUseSessionStorage, utlGetSessionStorageKeys, utlGetSessionStorage, utlSetSessionStorage, utlRemoveSessionStorage } from './StorageHelperFuncs';
export { urlParseUrl, urlGetAbsoluteUrl, urlGetPathName, urlGetCompleteUrl, urlParseHost, urlParseFullHost } from './UrlHelperFuncs';
export declare const PropertiesPluginIdentifier = "AppInsightsPropertiesPlugin";
export declare const BreezeChannelIdentifier = "AppInsightsChannelPlugin";
export declare const AnalyticsPluginIdentifier = "ApplicationInsightsAnalytics";
import { ConnectionString } from "./Interfaces/ConnectionString";
export declare class ConnectionStringParser {
private static _FIELDS_SEPARATOR;
private static _FIELD_KEY_VALUE_SEPARATOR;
static parse(connectionString?: string): ConnectionString;
}
export declare function parseConnectionString(connectionString?: string): ConnectionString;
export declare const ConnectionStringParser: {
parse: (connectionString?: string) => ConnectionString;
};

@@ -13,1 +13,2 @@ /**

export declare const DEFAULT_BREEZE_ENDPOINT = "https://dc.services.visualstudio.com";
export declare const strNotSpecified = "not_specified";

@@ -10,2 +10,15 @@ export interface IInternal {

agentVersion: string;
/**
* The Snippet version used to initialize the sdk instance, this will contain either
* undefined/null - Snippet not used
* '-' - Version and legacy mode not determined
* # - Version # of the snippet
* #.l - Version # in legacy mode
* .l - No defined version, but used legacy mode initialization
*/
snippetVer: string;
/**
* Identifies the source of the sdk script
*/
sdkSrc: string;
}

@@ -14,4 +14,8 @@ export interface ITelemetryTrace {

traceState?: ITraceState;
/**
* Name
*/
name?: string;
}
export interface ITraceState {
}

@@ -26,6 +26,10 @@ export interface IUser {

localId: string;
/**
* A flag indicating whether this represents a new user
*/
isNewUser?: boolean;
}
export interface IUserContext {
export interface IUserContext extends IUser {
setAuthenticatedUserContext(authenticatedUserId: string, accountId?: string, storeInCookie?: boolean): void;
clearAuthenticatedUserContext(): void;
}

@@ -5,3 +5,3 @@ import { Domain } from './Domain';

*/
export declare class AvailabilityData extends Domain {
export declare class AvailabilityData implements Domain {
/**

@@ -43,3 +43,2 @@ * Schema version

measurements: any;
constructor();
}

@@ -1,171 +0,174 @@

export declare class ContextTagKeys {
export interface IContextTagKeys {
/**
* Application version. Information in the application context fields is always about the application that is sending the telemetry.
*/
applicationVersion: string;
readonly applicationVersion: string;
/**
* Application build.
*/
applicationBuild: string;
readonly applicationBuild: string;
/**
* Application type id.
*/
applicationTypeId: string;
readonly applicationTypeId: string;
/**
* Application id.
*/
applicationId: string;
readonly applicationId: string;
/**
* Application layer.
*/
applicationLayer: string;
readonly applicationLayer: string;
/**
* Unique client device id. Computer name in most cases.
*/
deviceId: string;
deviceIp: string;
deviceLanguage: string;
readonly deviceId: string;
readonly deviceIp: string;
readonly deviceLanguage: string;
/**
* Device locale using <language>-<REGION> pattern, following RFC 5646. Example 'en-US'.
*/
deviceLocale: string;
readonly deviceLocale: string;
/**
* Model of the device the end user of the application is using. Used for client scenarios. If this field is empty then it is derived from the user agent.
*/
deviceModel: string;
deviceFriendlyName: string;
deviceNetwork: string;
deviceNetworkName: string;
readonly deviceModel: string;
readonly deviceFriendlyName: string;
readonly deviceNetwork: string;
readonly deviceNetworkName: string;
/**
* Client device OEM name taken from the browser.
*/
deviceOEMName: string;
deviceOS: string;
readonly deviceOEMName: string;
readonly deviceOS: string;
/**
* Operating system name and version of the device the end user of the application is using. If this field is empty then it is derived from the user agent. Example 'Windows 10 Pro 10.0.10586.0'
*/
deviceOSVersion: string;
readonly deviceOSVersion: string;
/**
* Name of the instance where application is running. Computer name for on-premisis, instance name for Azure.
*/
deviceRoleInstance: string;
readonly deviceRoleInstance: string;
/**
* Name of the role application is part of. Maps directly to the role name in azure.
*/
deviceRoleName: string;
deviceScreenResolution: string;
readonly deviceRoleName: string;
readonly deviceScreenResolution: string;
/**
* The type of the device the end user of the application is using. Used primarily to distinguish JavaScript telemetry from server side telemetry. Examples: 'PC', 'Phone', 'Browser'. 'PC' is the default value.
*/
deviceType: string;
deviceMachineName: string;
deviceVMName: string;
deviceBrowser: string;
readonly deviceType: string;
readonly deviceMachineName: string;
readonly deviceVMName: string;
readonly deviceBrowser: string;
/**
* The browser name and version as reported by the browser.
*/
deviceBrowserVersion: string;
readonly deviceBrowserVersion: string;
/**
* The IP address of the client device. IPv4 and IPv6 are supported. Information in the location context fields is always about the end user. When telemetry is sent from a service, the location context is about the user that initiated the operation in the service.
*/
locationIp: string;
readonly locationIp: string;
/**
* The country of the client device. If any of Country, Province, or City is specified, those values will be preferred over geolocation of the IP address field. Information in the location context fields is always about the end user. When telemetry is sent from a service, the location context is about the user that initiated the operation in the service.
*/
locationCountry: string;
readonly locationCountry: string;
/**
* The province/state of the client device. If any of Country, Province, or City is specified, those values will be preferred over geolocation of the IP address field. Information in the location context fields is always about the end user. When telemetry is sent from a service, the location context is about the user that initiated the operation in the service.
*/
locationProvince: string;
readonly locationProvince: string;
/**
* The city of the client device. If any of Country, Province, or City is specified, those values will be preferred over geolocation of the IP address field. Information in the location context fields is always about the end user. When telemetry is sent from a service, the location context is about the user that initiated the operation in the service.
*/
locationCity: string;
readonly locationCity: string;
/**
* A unique identifier for the operation instance. The operation.id is created by either a request or a page view. All other telemetry sets this to the value for the containing request or page view. Operation.id is used for finding all the telemetry items for a specific operation instance.
*/
operationId: string;
readonly operationId: string;
/**
* The name (group) of the operation. The operation.name is created by either a request or a page view. All other telemetry items set this to the value for the containing request or page view. Operation.name is used for finding all the telemetry items for a group of operations (i.e. 'GET Home/Index').
*/
operationName: string;
readonly operationName: string;
/**
* The unique identifier of the telemetry item's immediate parent.
*/
operationParentId: string;
operationRootId: string;
readonly operationParentId: string;
readonly operationRootId: string;
/**
* Name of synthetic source. Some telemetry from the application may represent a synthetic traffic. It may be web crawler indexing the web site, site availability tests or traces from diagnostic libraries like Application Insights SDK itself.
*/
operationSyntheticSource: string;
readonly operationSyntheticSource: string;
/**
* The correlation vector is a light weight vector clock which can be used to identify and order related events across clients and services.
*/
operationCorrelationVector: string;
readonly operationCorrelationVector: string;
/**
* Session ID - the instance of the user's interaction with the app. Information in the session context fields is always about the end user. When telemetry is sent from a service, the session context is about the user that initiated the operation in the service.
*/
sessionId: string;
readonly sessionId: string;
/**
* Boolean value indicating whether the session identified by ai.session.id is first for the user or not.
*/
sessionIsFirst: string;
sessionIsNew: string;
userAccountAcquisitionDate: string;
readonly sessionIsFirst: string;
readonly sessionIsNew: string;
readonly userAccountAcquisitionDate: string;
/**
* In multi-tenant applications this is the account ID or name which the user is acting with. Examples may be subscription ID for Azure portal or blog name blogging platform.
*/
userAccountId: string;
readonly userAccountId: string;
/**
* The browser's user agent string as reported by the browser. This property will be used to extract informaiton regarding the customer's browser but will not be stored. Use custom properties to store the original user agent.
*/
userAgent: string;
readonly userAgent: string;
/**
* Anonymous user id. Represents the end user of the application. When telemetry is sent from a service, the user context is about the user that initiated the operation in the service.
*/
userId: string;
readonly userId: string;
/**
* Store region for UWP applications.
*/
userStoreRegion: string;
readonly userStoreRegion: string;
/**
* Authenticated user id. The opposite of ai.user.id, this represents the user with a friendly name. Since it's PII information it is not collected by default by most SDKs.
*/
userAuthUserId: string;
userAnonymousUserAcquisitionDate: string;
userAuthenticatedUserAcquisitionDate: string;
cloudName: string;
readonly userAuthUserId: string;
readonly userAnonymousUserAcquisitionDate: string;
readonly userAuthenticatedUserAcquisitionDate: string;
readonly cloudName: string;
/**
* Name of the role the application is a part of. Maps directly to the role name in azure.
*/
cloudRole: string;
cloudRoleVer: string;
readonly cloudRole: string;
readonly cloudRoleVer: string;
/**
* Name of the instance where the application is running. Computer name for on-premisis, instance name for Azure.
*/
cloudRoleInstance: string;
cloudEnvironment: string;
cloudLocation: string;
cloudDeploymentUnit: string;
readonly cloudRoleInstance: string;
readonly cloudEnvironment: string;
readonly cloudLocation: string;
readonly cloudDeploymentUnit: string;
/**
* SDK version. See https://github.com/microsoft/ApplicationInsights-Home/blob/master/SDK-AUTHORING.md#sdk-version-specification for information.
*/
internalSdkVersion: string;
readonly internalSdkVersion: string;
/**
* Agent version. Used to indicate the version of StatusMonitor installed on the computer if it is used for data collection.
*/
internalAgentVersion: string;
readonly internalAgentVersion: string;
/**
* This is the node name used for billing purposes. Use it to override the standard detection of nodes.
*/
internalNodeName: string;
readonly internalNodeName: string;
/**
* This identifies the version of the snippet that was used to initialize the SDK
*/
internalSnippet: string;
readonly internalSnippet: string;
/**
* This identifies the source of the Sdk script (used to identify whether the SDK was loaded via the CDN)
*/
internalSdkSrc: string;
readonly internalSdkSrc: string;
}
declare const ContextTagKeys_base: new () => IContextTagKeys;
export declare class ContextTagKeys extends ContextTagKeys_base {
constructor();
}

@@ -34,3 +34,2 @@ import { DataPointType } from './DataPointType';

stdDev: number;
constructor();
}
/**
* The abstract common base of all domains.
*/
export declare class Domain {
constructor();
export interface Domain {
}

@@ -38,3 +38,2 @@ import { Base } from './Base';

data: Base;
constructor();
}

@@ -5,3 +5,3 @@ import { Domain } from './Domain';

*/
export declare class EventData extends Domain {
export declare class EventData implements Domain {
/**

@@ -8,0 +8,0 @@ * Schema version

@@ -7,3 +7,3 @@ import { ExceptionDetails } from './ExceptionDetails';

*/
export declare class ExceptionData extends Domain {
export declare class ExceptionData implements Domain {
/**

@@ -10,0 +10,0 @@ * Schema version

@@ -34,3 +34,2 @@ import { StackFrame } from './StackFrame';

parsedStack: StackFrame[];
constructor();
}

@@ -6,3 +6,3 @@ import { Domain } from './Domain';

*/
export declare class MessageData extends Domain {
export declare class MessageData implements Domain {
/**

@@ -9,0 +9,0 @@ * Schema version

@@ -6,3 +6,3 @@ import { Domain } from './Domain';

*/
export declare class MetricData extends Domain {
export declare class MetricData implements Domain {
/**

@@ -9,0 +9,0 @@ * Schema version

@@ -5,3 +5,3 @@ import { Domain } from './Domain';

*/
export declare class RemoteDependencyData extends Domain {
export declare class RemoteDependencyData implements Domain {
/**

@@ -28,3 +28,3 @@ * Schema version

/**
* Indication of successfull or unsuccessfull call.
* Indication of successful or unsuccessful call.
*/

@@ -31,0 +31,0 @@ success: boolean;

@@ -5,3 +5,3 @@ import { Domain } from './Domain';

*/
export declare class RequestData extends Domain {
export declare class RequestData implements Domain {
/**

@@ -24,3 +24,3 @@ * Schema version

/**
* Indication of successfull or unsuccessfull call.
* Indication of successful or unsuccessful call.
*/

@@ -40,3 +40,2 @@ success: boolean;

measurements: any;
constructor();
}

@@ -25,3 +25,2 @@ /**

line: number;
constructor();
}

@@ -1,2 +0,2 @@

import { IConfiguration } from '@microsoft/applicationinsights-core-js';
import { IConfiguration, ICookieMgrConfig } from '@microsoft/applicationinsights-core-js';
import { DistributedTracingModes } from '../Enums';

@@ -136,3 +136,3 @@ /**

* @memberof IConfig
* @defaultValue AI
* @defaultValue AI_AND_W3C
*/

@@ -166,3 +166,5 @@ distributedTracingMode?: DistributedTracingModes;

/**
* @description If true, the SDK will not store or read any data from cookies. Default is false.
* @deprecated Use either disableCookiesUsage or specify a cookieMgrCfg with the enabled value set.
* If true, the SDK will not store or read any data from cookies. Default is false. As this field is being deprecated, when both
* isCookieUseDisabled and disableCookiesUsage are used disableCookiesUsage will take precedent.
* @type {boolean}

@@ -174,2 +176,10 @@ * @memberof IConfig

/**
* If true, the SDK will not store or read any data from cookies. Default is false.
* If you have also specified a cookieMgrCfg then enabled property (if specified) will take precedent over this value.
* @type {boolean}
* @memberof IConfig
* @defaultValue false
*/
disableCookiesUsage?: boolean;
/**
* @description Custom cookie domain. This is helpful if you want to share Application Insights cookies across subdomains.

@@ -182,2 +192,15 @@ * @type {string}

/**
* @description Custom cookie path. This is helpful if you want to share Application Insights cookies behind an application gateway.
* @type {string}
* @memberof IConfig
* @defaultValue ""
*/
cookiePath?: string;
/**
* [Optional] A Cookie Manager configuration which includes hooks to allow interception of the get, set and delete cookie
* operations. If this configuration is specified any specified enabled and domain properties will take precedence over the
* cookieDomain and disableCookiesUsage values.
*/
cookieMgrCfg?: ICookieMgrConfig;
/**
* Default false. If false, retry on 206 (partial success), 408 (timeout), 429 (too many requests), 500 (internal server error), 503 (service unavailable), and 0 (offline, only if detected)

@@ -184,0 +207,0 @@ * @description

@@ -5,5 +5,7 @@ import { IApplication } from './Context/IApplication';

import { ILocation } from './Context/ILocation';
import { IUser } from './Context/IUser';
import { IUserContext } from './Context/IUser';
import { ISession } from './Context/ISession';
import { ITelemetryTrace } from './Context/ITelemetryTrace';
import { IOperatingSystem } from './Context/IOperatingSystem';
import { IWeb } from './Context/IWeb';
export interface ITelemetryContext {

@@ -33,3 +35,3 @@ /**

*/
user: IUser;
user: IUserContext;
/**

@@ -40,2 +42,10 @@ * The object describing a session tracked by this object.

/**
* The object describing os details tracked by this object.
*/
os?: IOperatingSystem;
/**
* The object describing we details tracked by this object.
*/
web?: IWeb;
/**
* application id obtained from breeze responses. Is used if appId is not specified by root config

@@ -42,0 +52,0 @@ */

import { ContextTagKeys } from "./Contracts/Generated/ContextTagKeys";
export declare class Extensions {
static UserExt: string;
static DeviceExt: string;
static TraceExt: string;
static WebExt: string;
static AppExt: string;
static OSExt: string;
static SessionExt: string;
static SDKExt: string;
}
export declare const Extensions: {
UserExt: string;
DeviceExt: string;
TraceExt: string;
WebExt: string;
AppExt: string;
OSExt: string;
SessionExt: string;
SDKExt: string;
};
export declare let CtxTagKeys: ContextTagKeys;

@@ -1,6 +0,6 @@

export declare class RequestHeaders {
export interface IRequestHeaders {
/**
* Request-Context header
*/
static requestContextHeader: string;
requestContextHeader: string;
/**

@@ -10,19 +10,19 @@ * Target instrumentation header that is added to the response and retrieved by the

*/
static requestContextTargetKey: string;
requestContextTargetKey: string;
/**
* Request-Context appId format
*/
static requestContextAppIdFormat: string;
requestContextAppIdFormat: string;
/**
* Request-Id header
*/
static requestIdHeader: string;
requestIdHeader: string;
/**
* W3C distributed tracing protocol header
*/
static traceParentHeader: string;
traceParentHeader: string;
/**
* W3C distributed tracing protocol state header
*/
static traceStateHeader: "tracestate";
traceStateHeader: string;
/**

@@ -32,8 +32,9 @@ * Sdk-Context header

*/
static sdkContextHeader: string;
sdkContextHeader: string;
/**
* String to pass in header for requesting appId back from the backend.
*/
static sdkContextHeaderAppIdRequest: string;
static requestContextHeaderLowerCase: string;
sdkContextHeaderAppIdRequest: string;
requestContextHeaderLowerCase: string;
}
export declare const RequestHeaders: IRequestHeaders;

@@ -1,24 +0,9 @@

import { CoreUtils, IDiagnosticLogger, IPlugin } from "@microsoft/applicationinsights-core-js";
import { IDiagnosticLogger, IPlugin } from "@microsoft/applicationinsights-core-js";
import { ICorrelationConfig } from "./Interfaces/ICorrelationConfig";
export declare class Util {
private static document;
private static _canUseLocalStorage;
private static _canUseSessionStorage;
private static _internalEndpoints;
static NotSpecified: string;
static createDomEvent(eventName: string): Event;
static disableStorage(): void;
export declare function isInternalApplicationInsightsEndpoint(endpointUrl: string): boolean;
export interface IUtil {
NotSpecified: string;
createDomEvent: (eventName: string) => Event;
disableStorage: () => void;
/**
* Gets the localStorage object if available
* @return {Storage} - Returns the storage object if available else returns null
*/
private static _getLocalStorageObject();
/**
* Tests storage object (localStorage or sessionStorage) to verify that it is usable
* More details here: https://mathiasbynens.be/notes/localstorage-pattern
* @param storageType Type of storage
* @return {Storage} Returns storage object verified that it is usable
*/
private static _getVerifiedStorageObject(storageType);
/**
* Checks if endpoint URL is application insights internal injestion service URL.

@@ -29,3 +14,3 @@ *

*/
static isInternalApplicationInsightsEndpoint(endpointUrl: string): boolean;
isInternalApplicationInsightsEndpoint: (endpointUrl: string) => boolean;
/**

@@ -36,3 +21,3 @@ * Check if the browser supports local storage.

*/
static canUseLocalStorage(): boolean;
canUseLocalStorage: () => boolean;
/**

@@ -44,3 +29,3 @@ * Get an object from the browser's local storage

*/
static getStorage(logger: IDiagnosticLogger, name: string): string;
getStorage: (logger: IDiagnosticLogger, name: string) => string;
/**

@@ -53,3 +38,3 @@ * Set the contents of an object in the browser's local storage

*/
static setStorage(logger: IDiagnosticLogger, name: string, data: string): boolean;
setStorage: (logger: IDiagnosticLogger, name: string, data: string) => boolean;
/**

@@ -61,9 +46,4 @@ * Remove an object from the browser's local storage

*/
static removeStorage(logger: IDiagnosticLogger, name: string): boolean;
removeStorage: (logger: IDiagnosticLogger, name: string) => boolean;
/**
* Gets the sessionStorage object if available
* @return {Storage} - Returns the storage object if available else returns null
*/
private static _getSessionStorageObject();
/**
* Check if the browser supports session storage.

@@ -73,3 +53,3 @@ *

*/
static canUseSessionStorage(): boolean;
canUseSessionStorage: () => boolean;
/**

@@ -80,3 +60,3 @@ * Gets the list of session storage keys

*/
static getSessionStorageKeys(): string[];
getSessionStorageKeys: () => string[];
/**

@@ -88,3 +68,3 @@ * Get an object from the browser's session storage

*/
static getSessionStorage(logger: IDiagnosticLogger, name: string): string;
getSessionStorage: (logger: IDiagnosticLogger, name: string) => string;
/**

@@ -97,3 +77,3 @@ * Set the contents of an object in the browser's session storage

*/
static setSessionStorage(logger: IDiagnosticLogger, name: string, data: string): boolean;
setSessionStorage: (logger: IDiagnosticLogger, name: string, data: string) => boolean;
/**

@@ -105,57 +85,68 @@ * Remove an object from the browser's session storage

*/
static removeSessionStorage(logger: IDiagnosticLogger, name: string): boolean;
static disableCookies(): void;
static canUseCookies(logger: IDiagnosticLogger): any;
static disallowsSameSiteNone(userAgent: string): boolean;
removeSessionStorage: (logger: IDiagnosticLogger, name: string) => boolean;
/**
* @deprecated - Use the core.getCookieMgr().disable()
* Force the SDK not to store and read any data from cookies.
*/
disableCookies: () => void;
/**
* @deprecated - Use the core.getCookieMgr().isEnabled()
* Helper method to tell if document.cookie object is available and whether it can be used.
*/
canUseCookies: (logger: IDiagnosticLogger) => any;
disallowsSameSiteNone: (userAgent: string) => boolean;
/**
* @deprecated - Use the core.getCookieMgr().set()
* helper method to set userId and sessionId cookie
*/
static setCookie(logger: IDiagnosticLogger, name: string, value: string, domain?: string): void;
static stringToBoolOrDefault(str: any, defaultValue?: boolean): boolean;
setCookie: (logger: IDiagnosticLogger, name: string, value: string, domain?: string) => void;
stringToBoolOrDefault: (str: any, defaultValue?: boolean) => boolean;
/**
* @deprecated - Use the core.getCookieMgr().get()
* helper method to access userId and sessionId cookie
*/
static getCookie(logger: IDiagnosticLogger, name: string): string;
getCookie: (logger: IDiagnosticLogger, name: string) => string;
/**
* @deprecated - Use the core.getCookieMgr().del()
* Deletes a cookie by setting it's expiration time in the past.
* @param name - The name of the cookie to delete.
*/
static deleteCookie(logger: IDiagnosticLogger, name: string): void;
deleteCookie: (logger: IDiagnosticLogger, name: string) => void;
/**
* helper method to trim strings (IE8 does not implement String.prototype.trim)
*/
static trim: typeof CoreUtils.strTrim;
trim: (str: any) => string;
/**
* generate random id string
*/
static newId: typeof CoreUtils.newId;
newId: () => string;
/**
* generate a random 32bit number (-0x80000000..0x7FFFFFFF).
*/
static random32(): number;
random32: () => number;
/**
* generate W3C trace id
*/
static generateW3CId: typeof CoreUtils.generateW3CId;
generateW3CId: () => string;
/**
* Check if an object is of type Array
*/
static isArray: typeof CoreUtils.isArray;
isArray: (obj: any) => boolean;
/**
* Check if an object is of type Error
*/
static isError: typeof CoreUtils.isError;
isError: (obj: any) => obj is Error;
/**
* Check if an object is of type Date
*/
static isDate: typeof CoreUtils.isDate;
static toISOStringForIE8: typeof CoreUtils.toISOString;
isDate: (obj: any) => obj is Date;
toISOStringForIE8: (date: Date) => string;
/**
* Gets IE version returning the document emulation mode if we are running on IE, or null otherwise
*/
static getIEVersion(userAgentStr?: string): number;
getIEVersion: (userAgentStr?: string) => number;
/**
* Convert ms to c# time span format
*/
static msToTimeSpan(totalms: number): string;
msToTimeSpan: (totalms: number) => string;
/**

@@ -165,11 +156,11 @@ * Checks if error has no meaningful data inside. Ususally such errors are received by window.onerror when error

*/
static isCrossOriginError(message: string, url: string, lineNumber: number, columnNumber: number, error: Error): boolean;
isCrossOriginError: (message: string | Event, url: string, lineNumber: number, columnNumber: number, error: Error) => boolean;
/**
* Returns string representation of an object suitable for diagnostics logging.
*/
static dump(object: any): string;
dump: (object: any) => string;
/**
* Returns the name of object if it's an Error. Otherwise, returns empty string.
*/
static getExceptionName(object: any): string;
getExceptionName: (object: any) => string;
/**

@@ -181,25 +172,24 @@ * Adds an event handler for the specified event to the window

*/
static addEventHandler(eventName: string, callback: any): boolean;
addEventHandler: (obj: any, eventNameWithoutOn: string, handlerRef: any, useCapture: boolean) => boolean;
/**
* Tells if a browser supports a Beacon API
*/
static IsBeaconApiSupported(): boolean;
static getExtension(extensions: IPlugin[], identifier: string): IPlugin;
IsBeaconApiSupported: () => boolean;
getExtension: (extensions: IPlugin[], identifier: string) => IPlugin | null;
}
export declare class UrlHelper {
private static document;
private static _htmlAnchorIdx;
private static _htmlAnchorElement;
static parseUrl(url: string): HTMLAnchorElement;
static getAbsoluteUrl(url: string): string;
static getPathName(url: string): string;
static getCompleteUrl(method: string, absoluteUrl: string): string;
static parseHost(url: string, inclPort?: boolean): string;
export declare const Util: IUtil;
export interface IUrlHelper {
parseUrl: (url: string) => HTMLAnchorElement;
getAbsoluteUrl: (url: string) => string;
getPathName: (url: string) => string;
getCompleteUrl: (method: string, absoluteUrl: string) => string;
parseHost: (url: string, inclPort?: boolean) => string;
/**
* Get the full host from the url, optionally including the port
*/
static parseFullHost(url: string, inclPort?: boolean): string;
parseFullHost: (url: string, inclPort?: boolean) => string;
}
export declare class CorrelationIdHelper {
static correlationIdPrefix: string;
export declare const UrlHelper: IUrlHelper;
export interface ICorrelationIdHelper {
correlationIdPrefix: string;
/**

@@ -212,31 +202,33 @@ * Checks if a request url is not on a excluded domain list and if it is safe to add correlation headers.

*/
static canIncludeCorrelationHeader(config: ICorrelationConfig, requestUrl: string, currentHost?: string): boolean;
canIncludeCorrelationHeader(config: ICorrelationConfig, requestUrl: string, currentHost?: string): boolean;
/**
* Combines target appId and target role name from response header.
*/
static getCorrelationContext(responseHeader: string): string;
getCorrelationContext(responseHeader: string): string | undefined;
/**
* Gets key from correlation response header
*/
static getCorrelationContextValue(responseHeader: string, key: string): string;
getCorrelationContextValue(responseHeader: string, key: string): string | undefined;
}
export declare class AjaxHelper {
static ParseDependencyPath(logger: IDiagnosticLogger, absoluteUrl: string, method: string, commandName: string): {
target: string;
name: string;
data: string;
};
}
/**
* A utility class that helps getting time related parameters
*/
export declare class DateTimeUtils {
export declare const CorrelationIdHelper: ICorrelationIdHelper;
export declare function AjaxHelperParseDependencyPath(logger: IDiagnosticLogger, absoluteUrl: string, method: string, commandName: string): {
target: string;
name: string;
data: string;
};
export declare function dateTimeUtilsNow(): number;
export declare function dateTimeUtilsDuration(start: number, end: number): number;
export interface IDateTimeUtils {
/**
* Get the number of milliseconds since 1970/01/01 in local timezone
*/
static Now: () => number;
Now: () => number;
/**
* Gets duration between two timestamps
*/
static GetDuration: (start: number, end: number) => number;
GetDuration: (start: number, end: number) => number;
}
/**
* A utility class that helps getting time related parameters
*/
export declare const DateTimeUtils: IDateTimeUtils;

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 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 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 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 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 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 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 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 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 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc