Socket
Socket
Sign inDemoInstall

@microsoft/applicationinsights-common

Package Overview
Dependencies
Maintainers
5
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.0.0-beta.2 to 2.0.0-beta.3

4

browser/applicationinsights-common.min.js
/*!
* Application Insights JavaScript SDK - Common, 2.0.0-beta.2
* Application Insights JavaScript SDK - Common, 2.0.0-beta.3
* Copyright (c) Microsoft and contributors. All rights reserved.
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e.Microsoft=e.Microsoft||{},e.Microsoft.ApplicationInsights={}))}(this,function(m){"use strict";var r,e,t;(e=r||(r={}))[e.LocalStorage=0]="LocalStorage",e[e.SessionStorage=1]="SessionStorage",(t=m.FieldType||(m.FieldType={}))[t.Default=0]="Default",t[t.Required=1]="Required",t[t.Array=2]="Array",t[t.Hidden=4]="Hidden";var h,n,u=function(){function e(){}return e.isNullOrUndefined=function(e){return null==e},e.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(i,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},e}(),i=/[xy]/g;(n=h||(h={}))[n.CRITICAL=1]="CRITICAL",n[n.WARNING=2]="WARNING";var a=1,o=2,c=3,l=4,d=5,p=6,v=8,y=10,S=45,f=52,g=56,T=57,N=61,I=66,D=68,w=69,E=(function(){function e(){this.identifier="ChannelControllerPlugin",this.priority=E}e.prototype.processTelemetry=function(t){this.channelQueue.forEach(function(e){0<e.length&&e[0].processTelemetry(t)})},Object.defineProperty(e.prototype,"ChannelControls",{get:function(){return this.channelQueue},enumerable:!0,configurable:!0}),e.prototype.initialize=function(n,i,r){var a=this;if(this.channelQueue=new Array,n.channels){var o=void 0;n.channels.forEach(function(e){if(e&&0<e.length){if((e=e.sort(function(e,t){return e.priority-t.priority})).forEach(function(e){e.priority<E&&(o=e.identifier),e.initialize(n,i,r)}),o)throw Error(A+o);for(var t=1;t<e.length;t++)e[t-1].setNextPlugin(e[t]);a.channelQueue.push(e)}})}for(var e=new Array,t=0;t<r.length;t++){var s=r[t];s.priority>E&&e.push(s)}if(0<e.length){(e=e.sort(function(e,t){return e.priority-t.priority})).forEach(function(e){return e.initialize(n,i,r)});for(t=1;t<e.length;t++)e[t-1].setNextPlugin(e[t]);this.channelQueue.push(e)}}}(),500),A="Channel has invalid priority",s=function(){function e(){}return e.requestContextHeader="Request-Context",e.requestContextTargetKey="appId",e.requestContextAppIdFormat="appId=cid-v1:",e.requestIdHeader="Request-Id",e.sdkContextHeader="Sdk-Context",e.sdkContextHeaderAppIdRequest="appId",e.requestContextHeaderLowerCase="request-context",e}(),x=function(){function s(){}return s.sanitizeKeyAndAddUniqueness=function(e,t,n){var i=t.length,r=s.sanitizeKey(e,t);if(r.length!==i){for(var a=0,o=r;void 0!==n[o];)a++,o=r.substring(0,s.MAX_NAME_LENGTH-3)+s.padNumber(a);r=o}return r},s.sanitizeKey=function(e,t){return t&&(t=s.trim(t.toString())).length>s.MAX_NAME_LENGTH&&(t=t.substring(0,s.MAX_NAME_LENGTH),e.throwInternal(h.WARNING,T,"name is too long. It has been truncated to "+s.MAX_NAME_LENGTH+" characters.",{name:t},!0)),t},s.sanitizeString=function(e,t,n){return void 0===n&&(n=s.MAX_STRING_LENGTH),t&&(n=n||s.MAX_STRING_LENGTH,(t=s.trim(t)).toString().length>n&&(t=t.toString().substring(0,n),e.throwInternal(h.WARNING,N,"string value is too long. It has been truncated to "+n+" characters.",{value:t},!0))),t},s.sanitizeUrl=function(e,t){return s.sanitizeInput(e,t,s.MAX_URL_LENGTH,I)},s.sanitizeMessage=function(e,t){return t&&t.length>s.MAX_MESSAGE_LENGTH&&(t=t.substring(0,s.MAX_MESSAGE_LENGTH),e.throwInternal(h.WARNING,g,"message is too long, it has been truncated to "+s.MAX_MESSAGE_LENGTH+" characters.",{message:t},!0)),t},s.sanitizeException=function(e,t){return t&&t.length>s.MAX_EXCEPTION_LENGTH&&(t=t.substring(0,s.MAX_EXCEPTION_LENGTH),e.throwInternal(h.WARNING,f,"exception is too long, it has been truncated to "+s.MAX_EXCEPTION_LENGTH+" characters.",{exception:t},!0)),t},s.sanitizeProperties=function(e,t){if(t){var n={};for(var i in t){var r=s.sanitizeString(e,t[i],s.MAX_PROPERTY_LENGTH);n[i=s.sanitizeKeyAndAddUniqueness(e,i,n)]=r}t=n}return t},s.sanitizeMeasurements=function(e,t){if(t){var n={};for(var i in t){var r=t[i];n[i=s.sanitizeKeyAndAddUniqueness(e,i,n)]=r}t=n}return t},s.sanitizeId=function(e,t){return t?s.sanitizeInput(e,t,s.MAX_ID_LENGTH,w).toString():t},s.sanitizeInput=function(e,t,n,i){return t&&(t=s.trim(t)).length>n&&(t=t.substring(0,n),e.throwInternal(h.WARNING,i,"input is too long, it has been truncated to "+n+" characters.",{data:t},!0)),t},s.padNumber=function(e){var t="00"+e;return t.substr(t.length-3)},s.trim=function(e){return"string"!=typeof e?e:e.replace(/^\s+|\s+$/g,"")},s.MAX_NAME_LENGTH=150,s.MAX_ID_LENGTH=128,s.MAX_PROPERTY_LENGTH=8192,s.MAX_STRING_LENGTH=1024,s.MAX_URL_LENGTH=2048,s.MAX_MESSAGE_LENGTH=32768,s.MAX_EXCEPTION_LENGTH=32768,s}(),C=function(){function s(){}return s.disableStorage=function(){s._canUseLocalStorage=!1,s._canUseSessionStorage=!1},s._getLocalStorageObject=function(){return s.canUseLocalStorage()?s._getVerifiedStorageObject(r.LocalStorage):null},s._getVerifiedStorageObject=function(e){var t,n,i=null;try{if("undefined"==typeof window)return null;n=new Date,(i=e===r.LocalStorage?window.localStorage:window.sessionStorage).setItem(n,n),t=i.getItem(n)!=n,i.removeItem(n),t&&(i=null)}catch(e){i=null}return i},s.isInternalApplicationInsightsEndpoint=function(e){return-1!==s._internalEndpoints.indexOf(e.toLowerCase())},s.canUseLocalStorage=function(){return void 0===s._canUseLocalStorage&&(s._canUseLocalStorage=!!s._getVerifiedStorageObject(r.LocalStorage)),s._canUseLocalStorage},s.getStorage=function(t,e){var n=s._getLocalStorageObject();if(null!==n)try{return n.getItem(e)}catch(e){s._canUseLocalStorage=!1,t.throwInternal(h.WARNING,a,"Browser failed read of local storage. "+s.getExceptionName(e),{exception:s.dump(e)})}return null},s.setStorage=function(t,e,n){var i=s._getLocalStorageObject();if(null!==i)try{return i.setItem(e,n),!0}catch(e){s._canUseLocalStorage=!1,t.throwInternal(h.WARNING,c,"Browser failed write to local storage. "+s.getExceptionName(e),{exception:s.dump(e)})}return!1},s.removeStorage=function(t,e){var n=s._getLocalStorageObject();if(null!==n)try{return n.removeItem(e),!0}catch(e){s._canUseLocalStorage=!1,t.throwInternal(h.WARNING,d,"Browser failed removal of local storage item. "+s.getExceptionName(e),{exception:s.dump(e)})}return!1},s._getSessionStorageObject=function(){return s.canUseSessionStorage()?s._getVerifiedStorageObject(r.SessionStorage):null},s.canUseSessionStorage=function(){return void 0===s._canUseSessionStorage&&(s._canUseSessionStorage=!!s._getVerifiedStorageObject(r.SessionStorage)),s._canUseSessionStorage},s.getSessionStorageKeys=function(){var e=[];if(s.canUseSessionStorage())for(var t in window.sessionStorage)e.push(t);return e},s.getSessionStorage=function(t,e){var n=s._getSessionStorageObject();if(null!==n)try{return n.getItem(e)}catch(e){s._canUseSessionStorage=!1,t.throwInternal(h.WARNING,o,"Browser failed read of session storage. "+s.getExceptionName(e),{exception:s.dump(e)})}return null},s.setSessionStorage=function(t,e,n){var i=s._getSessionStorageObject();if(null!==i)try{return i.setItem(e,n),!0}catch(e){s._canUseSessionStorage=!1,t.throwInternal(h.WARNING,l,"Browser failed write to session storage. "+s.getExceptionName(e),{exception:s.dump(e)})}return!1},s.removeSessionStorage=function(t,e){var n=s._getSessionStorageObject();if(null!==n)try{return n.removeItem(e),!0}catch(e){s._canUseSessionStorage=!1,t.throwInternal(h.WARNING,p,"Browser failed removal of session storage item. "+s.getExceptionName(e),{exception:s.dump(e)})}return!1},s.disableCookies=function(){s._canUseCookies=!1},s.canUseCookies=function(t){if(void 0===s._canUseCookies){s._canUseCookies=!1;try{s._canUseCookies=void 0!==s.document.cookie}catch(e){t.throwInternal(h.WARNING,D,"Cannot access document.cookie - "+s.getExceptionName(e),{exception:s.dump(e)})}}return s._canUseCookies},s.setCookie=function(e,t,n,i){var r="",a="";i&&(r=";domain="+i),s.document.location&&"https:"===s.document.location.protocol&&(a=";secure"),s.canUseCookies(e)&&(s.document.cookie=t+"="+n+r+";path=/"+a)},s.stringToBoolOrDefault=function(e,t){return void 0===t&&(t=!1),null==e?t:"true"===e.toString().toLowerCase()},s.getCookie=function(e,t){if(s.canUseCookies(e)){var n="";if(t&&t.length)for(var i=t+"=",r=s.document.cookie.split(";"),a=0;a<r.length;a++){var o=r[a];if((o=s.trim(o))&&0===o.indexOf(i)){n=o.substring(i.length,r[a].length);break}}return n}},s.deleteCookie=function(e,t){s.canUseCookies(e)&&(s.document.cookie=t+"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;")},s.trim=function(e){return"string"!=typeof e?e:e.replace(/^\s+|\s+$/g,"")},s.newId=function(){for(var e="",t=1073741824*Math.random();0<t;){e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t%64),t=Math.floor(t/64)}return e},s.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},s.isError=function(e){return"[object Error]"===Object.prototype.toString.call(e)},s.isDate=function(e){return"[object Date]"===Object.prototype.toString.call(e)},s.toISOStringForIE8=function(e){if(s.isDate(e)){if(Date.prototype.toISOString)return e.toISOString();var t=function(e){var t=String(e);return 1===t.length&&(t="0"+t),t};return e.getUTCFullYear()+"-"+t(e.getUTCMonth()+1)+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())+"."+String((e.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"}},s.getIEVersion=function(e){void 0===e&&(e=null);var t=e?e.toLowerCase():navigator.userAgent.toLowerCase();return-1!=t.indexOf("msie")?parseInt(t.split("msie")[1]):null},s.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,a=Math.floor(e/864e5);return 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,(0<a?a+".":"")+(r=r.length<2?"0"+r:r)+":"+i+":"+n+"."+t},s.isCrossOriginError=function(e,t,n,i,r){return("Script error."===e||"Script error"===e)&&!r},s.dump=function(e){var t=Object.prototype.toString.call(e),n=JSON.stringify(e);return"[object Error]"===t&&(n="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'"),t+n},s.getExceptionName=function(e){return"[object Error]"===Object.prototype.toString.call(e)?e.name:""},s.addEventHandler=function(e,t){if("undefined"==typeof window||!window||"string"!=typeof e||"function"!=typeof t)return!1;var n="on"+e;if(window.addEventListener)window.addEventListener(e,t,!1);else{if(!window.attachEvent)return!1;window.attachEvent(n,t)}return!0},s.IsBeaconApiSupported=function(){return"sendBeacon"in navigator&&navigator.sendBeacon},s.document="undefined"!=typeof document?document:{},s._canUseCookies=void 0,s._canUseLocalStorage=void 0,s._canUseSessionStorage=void 0,s._internalEndpoints=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],s.NotSpecified="not_specified",s}(),_=function(){function i(){}return i.parseUrl=function(e){return i.htmlAnchorElement||(i.htmlAnchorElement=i.document.createElement?i.document.createElement("a"):{}),i.htmlAnchorElement.href=e,i.htmlAnchorElement},i.getAbsoluteUrl=function(e){var t,n=i.parseUrl(e);return n&&(t=n.href),t},i.getPathName=function(e){var t,n=i.parseUrl(e);return n&&(t=n.pathname),t},i.getCompleteUrl=function(e,t){return e?e.toUpperCase()+" "+t:t},i.document="undefined"!=typeof document?document:{},i}(),F=function(){function n(){}return n.canIncludeCorrelationHeader=function(e,t,n){if(e&&e.disableCorrelationHeaders)return!1;if(!t)return!1;var i=_.parseUrl(t).host.toLowerCase();if(!(e&&e.enableCorsCorrelation||i===n))return!1;var r=e&&e.correlationHeaderExcludedDomains;if(!r||0==r.length)return!0;for(var a=0;a<r.length;a++){if(new RegExp(r[a].toLowerCase().replace(/\./g,".").replace(/\*/g,".*")).test(i))return!1}return!0},n.getCorrelationContext=function(e){if(e){var t=n.getCorrelationContextValue(e,s.requestContextTargetKey);if(t&&t!==n.correlationIdPrefix)return t}},n.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]}},n.correlationIdPrefix="cid-v1:",n}(),M=function(){function e(){}return e.ParseDependencyPath=function(e,t,n,i){var r,a=i,o=i;if(t&&0<t.length){var s=_.parseUrl(t);if(r=s.host,!a)if(null!=s.pathname){var u=0===s.pathname.length?"/":s.pathname;"/"!==u.charAt(0)&&(u="/"+u),o=s.pathname,a=x.sanitizeString(e,n?n+" "+u:u)}else a=x.sanitizeString(e,t)}else a=r=i;return{target:r,name:a,data:o}},e}(),R=function(){function e(){}return e.Now="undefined"==typeof window?function(){return(new Date).getTime()}:window.performance&&window.performance.now&&window.performance.timing?function(){return window.performance.now()+window.performance.timing.navigationStart}:function(){return(new Date).getTime()},e.GetDuration=function(e,t){var n=null;return 0===e||0===t||u.isNullOrUndefined(e)||u.isNullOrUndefined(t)||(n=t-e),n},e}(),U=function(e,t){return(U=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function b(e,t){function n(){this.constructor=e}U(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var L,z,k=function(){},O=function(e){function t(){return e.call(this)||this}return b(t,e),t}(k),P=function(r){function e(e,t,n){var i=r.call(this)||this;return i.name=x.sanitizeString(e,n)||C.NotSpecified,i.data=t,i.time=C.toISOStringForIE8(new Date),i.aiDataContract={time:m.FieldType.Required,iKey:m.FieldType.Required,name:m.FieldType.Required,sampleRate:function(){return 100==i.sampleRate?m.FieldType.Hidden:m.FieldType.Required},tags:m.FieldType.Required,data:m.FieldType.Required},i}return b(e,r),e}(function(){this.ver=1,this.sampleRate=100,this.tags={}}),q=function(){},G=function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}return b(e,t),e}(q),H=function(a){function e(e,t,n,i){var r=a.call(this)||this;return r.aiDataContract={ver:m.FieldType.Required,name:m.FieldType.Required,properties:m.FieldType.Default,measurements:m.FieldType.Default},r.name=x.sanitizeString(e,t)||C.NotSpecified,r.properties=x.sanitizeProperties(e,n),r.measurements=x.sanitizeMeasurements(e,i),r}return b(e,a),e.envelopeType="Microsoft.ApplicationInsights.{0}.Event",e.dataType="EventData",e}(G),V=function(){},j=function(){this.hasFullStack=!0,this.parsedStack=[]},X=function(o){function e(e,t,n,i,r){var a=o.call(this)||this;return a.aiDataContract={ver:m.FieldType.Required,exceptions:m.FieldType.Required,severityLevel:m.FieldType.Default,properties:m.FieldType.Default,measurements:m.FieldType.Default},a.properties=x.sanitizeProperties(e,n),a.measurements=x.sanitizeMeasurements(e,i),a.exceptions=[new B(e,t)],r&&(a.severityLevel=r),a}return b(e,o),e.CreateSimpleException=function(e,t,n,i,r,a){return{exceptions:[{hasFullStack:!0,message:e,stack:r,typeName:t}]}},e.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",e.dataType="ExceptionData",e}(function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.exceptions=[],e.properties={},e.measurements={},e}return b(e,t),e}(q)),B=function(r){function e(e,t){var n=r.call(this)||this;n.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},n.typeName=x.sanitizeString(e,t.name)||C.NotSpecified,n.message=x.sanitizeMessage(e,t.message)||C.NotSpecified;var i=t.stack;return n.parsedStack=n.parseStack(i),n.stack=x.sanitizeException(e,i),n.hasFullStack=C.isArray(n.parsedStack)&&0<n.parsedStack.length,n}return b(e,r),e.prototype.parseStack=function(e){var t=void 0;if("string"==typeof e){var n=e.split("\n");t=[];for(var i=0,r=0,a=0;a<=n.length;a++){var o=n[a];if(W.regex.test(o)){var s=new W(n[a],i++);r+=s.sizeInBytes,t.push(s)}}if(32768<r)for(var u=0,c=t.length-1,l=0,d=u,p=c;u<c;){if(32768<(l+=t[u].sizeInBytes+t[c].sizeInBytes)){var f=p-d+1;t.splice(d,f);break}d=u,p=c,u++,c--}}return t},e}(j),W=function(r){function a(e,t){var n=r.call(this)||this;n.sizeInBytes=0,n.aiDataContract={level:m.FieldType.Required,method:m.FieldType.Required,assembly:m.FieldType.Default,fileName:m.FieldType.Default,line:m.FieldType.Default},n.level=t,n.method="<no_method>",n.assembly=C.trim(e);var i=e.match(a.regex);return i&&5<=i.length&&(n.method=C.trim(i[2])||n.method,n.fileName=C.trim(i[4]),n.line=parseInt(i[5])||0),n.sizeInBytes+=n.method.length,n.sizeInBytes+=n.fileName.length,n.sizeInBytes+=n.assembly.length,n.sizeInBytes+=a.baseSize,n.sizeInBytes+=n.level.toString().length,n.sizeInBytes+=n.line.toString().length,n}return b(a,r),a.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,a.baseSize=58,a}(V),K=function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.metrics=[],e.properties={},e}return b(e,t),e}(q);(z=L||(L={}))[z.Measurement=0]="Measurement",z[z.Aggregation=1]="Aggregation";var Q,Y=function(t){function e(){var e=null!==t&&t.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}return b(e,t),e}(function(){this.kind=L.Measurement}),J=function(c){function e(e,t,n,i,r,a,o){var s=c.call(this)||this;s.aiDataContract={ver:m.FieldType.Required,metrics:m.FieldType.Required,properties:m.FieldType.Default};var u=new Y;return u.count=0<i?i:void 0,u.max=isNaN(a)||null===a?void 0:a,u.min=isNaN(r)||null===r?void 0:r,u.name=x.sanitizeString(e,t)||C.NotSpecified,u.value=n,s.metrics=[u],s.properties=x.sanitizeProperties(e,o),s}return b(e,c),e.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",e.dataType="MetricData",e}(K),$=function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}return b(e,t),e}(G),Z=function(u){function e(e,t,n,i,r,a,o){var s=u.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=x.sanitizeId(e,o),s.url=x.sanitizeUrl(e,n),s.name=x.sanitizeString(e,t)||C.NotSpecified,isNaN(i)||(s.duration=C.msToTimeSpan(i)),s.properties=x.sanitizeProperties(e,r),s.measurements=x.sanitizeMeasurements(e,a),s}return b(e,u),e.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",e.dataType="PageviewData",e}($),ee=function(f){function e(e,t,n,i,r,a,o,s,u,c,l){void 0===u&&(u="Ajax");var d=f.call(this)||this;d.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},d.id=t,d.duration=C.msToTimeSpan(r),d.success=a,d.resultCode=o+"",d.type=x.sanitizeString(e,u);var p=M.ParseDependencyPath(e,n,s,i);return d.data=x.sanitizeUrl(e,i)||p.data,d.target=p.target,d.name=p.name,d.properties=x.sanitizeProperties(e,c),d.measurements=x.sanitizeMeasurements(e,l),d}return b(e,f),e.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",e.dataType="RemoteDependencyData",e}(function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.success=!0,e.properties={},e.measurements={},e}return b(e,t),e}(q)),te=function(a){function e(e,t,n,i){var r=a.call(this)||this;return r.aiDataContract={ver:m.FieldType.Required,message:m.FieldType.Required,severityLevel:m.FieldType.Default,properties:m.FieldType.Default},t=t||C.NotSpecified,r.message=x.sanitizeMessage(e,t),r.properties=x.sanitizeProperties(e,i),n&&(r.severityLevel=n),r}return b(e,a),e.envelopeType="Microsoft.ApplicationInsights.{0}.Message",e.dataType="MessageData",e}(function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e}return b(e,t),e}(q)),ne=function(f){function g(e,t,n,i,r,a){var o=f.call(this)||this;o.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},o.isValid=!1;var s=g.getPerformanceTiming();if(s){var u=g.getDuration(s.navigationStart,s.loadEventEnd),c=g.getDuration(s.navigationStart,s.connectEnd),l=g.getDuration(s.requestStart,s.responseStart),d=g.getDuration(s.responseStart,s.responseEnd),p=g.getDuration(s.responseEnd,s.loadEventEnd);0==u?e.throwInternal(h.WARNING,y,"error calculating page view performance.",{total:u,network:c,request:l,response:d,dom:p}):g.shouldCollectDuration(u,c,l,d,p)?u<Math.floor(c)+Math.floor(l)+Math.floor(d)+Math.floor(p)?e.throwInternal(h.WARNING,v,"client performance math error.",{total:u,network:c,request:l,response:d,dom:p}):(o.durationMs=u,o.perfTotal=o.duration=C.msToTimeSpan(u),o.networkConnect=C.msToTimeSpan(c),o.sentRequest=C.msToTimeSpan(l),o.receivedResponse=C.msToTimeSpan(d),o.domProcessing=C.msToTimeSpan(p),o.isValid=!0):e.throwInternal(h.WARNING,S,"Invalid page load duration value. Browser perf data won't be sent.",{total:u,network:c,request:l,response:d,dom:p})}return o.url=x.sanitizeUrl(e,n),o.name=x.sanitizeString(e,t)||C.NotSpecified,o.properties=x.sanitizeProperties(e,r),o.measurements=x.sanitizeMeasurements(e,a),o}return b(g,f),g.prototype.getIsValid=function(){return this.isValid},g.prototype.getDurationMs=function(){return this.durationMs},g.getPerformanceTiming=function(){return g.isPerformanceTimingSupported()?window.performance.timing:null},g.isPerformanceTimingSupported=function(){return"undefined"!=typeof window&&window.performance&&window.performance.timing},g.isPerformanceTimingDataReady=function(){var e=window.performance.timing;return 0<e.domainLookupStart&&0<e.navigationStart&&0<e.responseStart&&0<e.requestStart&&0<e.loadEventEnd&&0<e.responseEnd&&0<e.connectEnd&&0<e.domLoading},g.getDuration=function(e,t){var n=void 0;return isNaN(e)||isNaN(t)||(n=Math.max(t-e,0)),n},g.shouldCollectDuration=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=["googlebot","adsbot-google","apis-google","mediapartners-google"],i=navigator.userAgent,r=!1;if(i)for(var a=0;a<n.length;a++)r=r||-1!==i.toLowerCase().indexOf(n[a]);if(r)return!1;for(var o=0;o<e.length;o++)if(e[o]>=g.MAX_DURATION_ALLOWED)return!1;return!0},g.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",g.dataType="PageviewPerformanceData",g.MAX_DURATION_ALLOWED=36e5,g}(function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}return b(e,t),e}($)),ie=function(i){function e(e,t){var n=i.call(this)||this;return n.aiDataContract={baseType:m.FieldType.Required,baseData:m.FieldType.Required},n.baseType=e,n.baseData=t,n}return b(e,i),e}(O);(Q=m.SeverityLevel||(m.SeverityLevel={}))[Q.Verbose=0]="Verbose",Q[Q.Information=1]="Information",Q[Q.Warning=2]="Warning",Q[Q.Error=3]="Error",Q[Q.Critical=4]="Critical";var re=function(){function e(){}return e.getConfig=function(e,t,n,i){var r;return void 0===i&&(i=!1),r=n&&e.extensionConfig&&e.extensionConfig[n]&&!u.isNullOrUndefined(e.extensionConfig[n][t])?e.extensionConfig[n][t]:e[t],u.isNullOrUndefined(r)?i:r},e}(),ae=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"},oe=function(){function e(){}return e.create=function(e,t,n,i,r,a){if(n=x.sanitizeString(i,n)||C.NotSpecified,u.isNullOrUndefined(e)||u.isNullOrUndefined(t)||u.isNullOrUndefined(n))throw Error("Input doesn't contain all required fields");var o={name:n,time:(new Date).toISOString(),iKey:"",ext:a||{},tags:[],data:{},baseType:t,baseData:e};if(!u.isNullOrUndefined(r))for(var s in r)r.hasOwnProperty(s)&&(o.data[s]=r[s]);return o},e}(),se=function(){function e(){}return e.UserExt="user",e.DeviceExt="device",e.TraceExt="trace",e.WebExt="web",e.AppExt="app",e.OSExt="os",e.SessionExt="ses",e.SDKExt="sdk",e}(),ue=function(){function e(){}return e.libVer="libVer",e}(),ce=new ae;m.PropertiesPluginIdentifier="AppInsightsPropertiesPlugin",m.Util=C,m.CorrelationIdHelper=F,m.UrlHelper=_,m.DateTimeUtils=R,m.RequestHeaders=s,m.DisabledPropertyName="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",m.ProcessLegacy="ProcessLegacy",m.SampleRate="sampleRate",m.HttpMethod="http.method",m.AIData=O,m.AIBase=k,m.Envelope=P,m.Event=H,m.Exception=X,m.Metric=J,m.PageView=Z,m.PageViewData=$,m.RemoteDependencyData=ee,m.Trace=te,m.PageViewPerformance=ne,m.Data=ie,m.ConfigurationManager=re,m.ContextTagKeys=ae,m.DataSanitizer=x,m.TelemetryItemCreator=oe,m.CtxTagKeys=ce,m.Extensions=se,m.SDKExtensionKeys=ue,Object.defineProperty(m,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e.Microsoft=e.Microsoft||{},e.Microsoft.ApplicationInsights={}))}(this,function(g){"use strict";var r,e,t;(e=r||(r={}))[e.LocalStorage=0]="LocalStorage",e[e.SessionStorage=1]="SessionStorage",(t=g.FieldType||(g.FieldType={}))[t.Default=0]="Default",t[t.Required=1]="Required",t[t.Array=2]="Array",t[t.Hidden=4]="Hidden";var a,i,u=function(){function e(){}return e.isNullOrUndefined=function(e){return null==e},e.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(n,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},e}(),n=/[xy]/g;(i=a||(a={}))[i.CRITICAL=1]="CRITICAL",i[i.WARNING=2]="WARNING";var o=1,c=2,l=3,d=4,p=5,f=6,h=52,m=56,y=57,v=61,S=66,T=68,N=69,I=(function(){function e(){this.identifier="ChannelControllerPlugin",this.priority=I}e.prototype.processTelemetry=function(t){this.channelQueue.forEach(function(e){0<e.length&&e[0].processTelemetry(t)})},Object.defineProperty(e.prototype,"ChannelControls",{get:function(){return this.channelQueue},enumerable:!0,configurable:!0}),e.prototype.initialize=function(i,n,r){var a=this;if(this.channelQueue=new Array,i.channels){var o=void 0;i.channels.forEach(function(e){if(e&&0<e.length){if((e=e.sort(function(e,t){return e.priority-t.priority})).forEach(function(e){e.priority<I&&(o=e.identifier),e.initialize(i,n,r)}),o)throw Error(D+o);for(var t=1;t<e.length;t++)e[t-1].setNextPlugin(e[t]);a.channelQueue.push(e)}})}for(var e=new Array,t=0;t<r.length;t++){var s=r[t];s.priority>I&&e.push(s)}if(0<e.length){(e=e.sort(function(e,t){return e.priority-t.priority})).forEach(function(e){return e.initialize(i,n,r)});for(t=1;t<e.length;t++)e[t-1].setNextPlugin(e[t]);this.channelQueue.push(e)}}}(),500),D="Channel has invalid priority",s=function(){function e(){}return e.requestContextHeader="Request-Context",e.requestContextTargetKey="appId",e.requestContextAppIdFormat="appId=cid-v1:",e.requestIdHeader="Request-Id",e.sdkContextHeader="Sdk-Context",e.sdkContextHeaderAppIdRequest="appId",e.requestContextHeaderLowerCase="request-context",e}(),x=function(){function s(){}return s.sanitizeKeyAndAddUniqueness=function(e,t,i){var n=t.length,r=s.sanitizeKey(e,t);if(r.length!==n){for(var a=0,o=r;void 0!==i[o];)a++,o=r.substring(0,s.MAX_NAME_LENGTH-3)+s.padNumber(a);r=o}return r},s.sanitizeKey=function(e,t){return t&&(t=s.trim(t.toString())).length>s.MAX_NAME_LENGTH&&(t=t.substring(0,s.MAX_NAME_LENGTH),e.throwInternal(a.WARNING,y,"name is too long. It has been truncated to "+s.MAX_NAME_LENGTH+" characters.",{name:t},!0)),t},s.sanitizeString=function(e,t,i){return void 0===i&&(i=s.MAX_STRING_LENGTH),t&&(i=i||s.MAX_STRING_LENGTH,(t=s.trim(t)).toString().length>i&&(t=t.toString().substring(0,i),e.throwInternal(a.WARNING,v,"string value is too long. It has been truncated to "+i+" characters.",{value:t},!0))),t},s.sanitizeUrl=function(e,t){return s.sanitizeInput(e,t,s.MAX_URL_LENGTH,S)},s.sanitizeMessage=function(e,t){return t&&t.length>s.MAX_MESSAGE_LENGTH&&(t=t.substring(0,s.MAX_MESSAGE_LENGTH),e.throwInternal(a.WARNING,m,"message is too long, it has been truncated to "+s.MAX_MESSAGE_LENGTH+" characters.",{message:t},!0)),t},s.sanitizeException=function(e,t){return t&&t.length>s.MAX_EXCEPTION_LENGTH&&(t=t.substring(0,s.MAX_EXCEPTION_LENGTH),e.throwInternal(a.WARNING,h,"exception is too long, it has been truncated to "+s.MAX_EXCEPTION_LENGTH+" characters.",{exception:t},!0)),t},s.sanitizeProperties=function(e,t){if(t){var i={};for(var n in t){var r=s.sanitizeString(e,t[n],s.MAX_PROPERTY_LENGTH);i[n=s.sanitizeKeyAndAddUniqueness(e,n,i)]=r}t=i}return t},s.sanitizeMeasurements=function(e,t){if(t){var i={};for(var n in t){var r=t[n];i[n=s.sanitizeKeyAndAddUniqueness(e,n,i)]=r}t=i}return t},s.sanitizeId=function(e,t){return t?s.sanitizeInput(e,t,s.MAX_ID_LENGTH,N).toString():t},s.sanitizeInput=function(e,t,i,n){return t&&(t=s.trim(t)).length>i&&(t=t.substring(0,i),e.throwInternal(a.WARNING,n,"input is too long, it has been truncated to "+i+" characters.",{data:t},!0)),t},s.padNumber=function(e){var t="00"+e;return t.substr(t.length-3)},s.trim=function(e){return"string"!=typeof e?e:e.replace(/^\s+|\s+$/g,"")},s.MAX_NAME_LENGTH=150,s.MAX_ID_LENGTH=128,s.MAX_PROPERTY_LENGTH=8192,s.MAX_STRING_LENGTH=1024,s.MAX_URL_LENGTH=2048,s.MAX_MESSAGE_LENGTH=32768,s.MAX_EXCEPTION_LENGTH=32768,s}(),E=function(){function s(){}return s.disableStorage=function(){s._canUseLocalStorage=!1,s._canUseSessionStorage=!1},s._getLocalStorageObject=function(){return s.canUseLocalStorage()?s._getVerifiedStorageObject(r.LocalStorage):null},s._getVerifiedStorageObject=function(e){var t,i,n=null;try{if("undefined"==typeof window)return null;i=new Date,(n=e===r.LocalStorage?window.localStorage:window.sessionStorage).setItem(i,i),t=n.getItem(i)!=i,n.removeItem(i),t&&(n=null)}catch(e){n=null}return n},s.isInternalApplicationInsightsEndpoint=function(e){return-1!==s._internalEndpoints.indexOf(e.toLowerCase())},s.canUseLocalStorage=function(){return void 0===s._canUseLocalStorage&&(s._canUseLocalStorage=!!s._getVerifiedStorageObject(r.LocalStorage)),s._canUseLocalStorage},s.getStorage=function(t,e){var i=s._getLocalStorageObject();if(null!==i)try{return i.getItem(e)}catch(e){s._canUseLocalStorage=!1,t.throwInternal(a.WARNING,o,"Browser failed read of local storage. "+s.getExceptionName(e),{exception:s.dump(e)})}return null},s.setStorage=function(t,e,i){var n=s._getLocalStorageObject();if(null!==n)try{return n.setItem(e,i),!0}catch(e){s._canUseLocalStorage=!1,t.throwInternal(a.WARNING,l,"Browser failed write to local storage. "+s.getExceptionName(e),{exception:s.dump(e)})}return!1},s.removeStorage=function(t,e){var i=s._getLocalStorageObject();if(null!==i)try{return i.removeItem(e),!0}catch(e){s._canUseLocalStorage=!1,t.throwInternal(a.WARNING,p,"Browser failed removal of local storage item. "+s.getExceptionName(e),{exception:s.dump(e)})}return!1},s._getSessionStorageObject=function(){return s.canUseSessionStorage()?s._getVerifiedStorageObject(r.SessionStorage):null},s.canUseSessionStorage=function(){return void 0===s._canUseSessionStorage&&(s._canUseSessionStorage=!!s._getVerifiedStorageObject(r.SessionStorage)),s._canUseSessionStorage},s.getSessionStorageKeys=function(){var e=[];if(s.canUseSessionStorage())for(var t in window.sessionStorage)e.push(t);return e},s.getSessionStorage=function(t,e){var i=s._getSessionStorageObject();if(null!==i)try{return i.getItem(e)}catch(e){s._canUseSessionStorage=!1,t.throwInternal(a.WARNING,c,"Browser failed read of session storage. "+s.getExceptionName(e),{exception:s.dump(e)})}return null},s.setSessionStorage=function(t,e,i){var n=s._getSessionStorageObject();if(null!==n)try{return n.setItem(e,i),!0}catch(e){s._canUseSessionStorage=!1,t.throwInternal(a.WARNING,d,"Browser failed write to session storage. "+s.getExceptionName(e),{exception:s.dump(e)})}return!1},s.removeSessionStorage=function(t,e){var i=s._getSessionStorageObject();if(null!==i)try{return i.removeItem(e),!0}catch(e){s._canUseSessionStorage=!1,t.throwInternal(a.WARNING,f,"Browser failed removal of session storage item. "+s.getExceptionName(e),{exception:s.dump(e)})}return!1},s.disableCookies=function(){s._canUseCookies=!1},s.canUseCookies=function(t){if(void 0===s._canUseCookies){s._canUseCookies=!1;try{s._canUseCookies=void 0!==s.document.cookie}catch(e){t.throwInternal(a.WARNING,T,"Cannot access document.cookie - "+s.getExceptionName(e),{exception:s.dump(e)})}}return s._canUseCookies},s.setCookie=function(e,t,i,n){var r="",a="";n&&(r=";domain="+n),s.document.location&&"https:"===s.document.location.protocol&&(a=";secure"),s.canUseCookies(e)&&(s.document.cookie=t+"="+i+r+";path=/"+a)},s.stringToBoolOrDefault=function(e,t){return void 0===t&&(t=!1),null==e?t:"true"===e.toString().toLowerCase()},s.getCookie=function(e,t){if(s.canUseCookies(e)){var i="";if(t&&t.length)for(var n=t+"=",r=s.document.cookie.split(";"),a=0;a<r.length;a++){var o=r[a];if((o=s.trim(o))&&0===o.indexOf(n)){i=o.substring(n.length,r[a].length);break}}return i}},s.deleteCookie=function(e,t){s.canUseCookies(e)&&(s.document.cookie=t+"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;")},s.trim=function(e){return"string"!=typeof e?e:e.replace(/^\s+|\s+$/g,"")},s.newId=function(){for(var e="",t=1073741824*Math.random();0<t;){e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t%64),t=Math.floor(t/64)}return e},s.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},s.isError=function(e){return"[object Error]"===Object.prototype.toString.call(e)},s.isDate=function(e){return"[object Date]"===Object.prototype.toString.call(e)},s.toISOStringForIE8=function(e){if(s.isDate(e)){if(Date.prototype.toISOString)return e.toISOString();var t=function(e){var t=String(e);return 1===t.length&&(t="0"+t),t};return e.getUTCFullYear()+"-"+t(e.getUTCMonth()+1)+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())+"."+String((e.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"}},s.getIEVersion=function(e){void 0===e&&(e=null);var t=e?e.toLowerCase():navigator.userAgent.toLowerCase();return-1!=t.indexOf("msie")?parseInt(t.split("msie")[1]):null},s.msToTimeSpan=function(e){(isNaN(e)||e<0)&&(e=0);var t=""+(e=Math.round(e))%1e3,i=""+Math.floor(e/1e3)%60,n=""+Math.floor(e/6e4)%60,r=""+Math.floor(e/36e5)%24,a=Math.floor(e/864e5);return t=1===t.length?"00"+t:2===t.length?"0"+t:t,i=i.length<2?"0"+i:i,n=n.length<2?"0"+n:n,(0<a?a+".":"")+(r=r.length<2?"0"+r:r)+":"+n+":"+i+"."+t},s.isCrossOriginError=function(e,t,i,n,r){return("Script error."===e||"Script error"===e)&&!r},s.dump=function(e){var t=Object.prototype.toString.call(e),i=JSON.stringify(e);return"[object Error]"===t&&(i="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'"),t+i},s.getExceptionName=function(e){return"[object Error]"===Object.prototype.toString.call(e)?e.name:""},s.addEventHandler=function(e,t){if("undefined"==typeof window||!window||"string"!=typeof e||"function"!=typeof t)return!1;var i="on"+e;if(window.addEventListener)window.addEventListener(e,t,!1);else{if(!window.attachEvent)return!1;window.attachEvent(i,t)}return!0},s.IsBeaconApiSupported=function(){return"sendBeacon"in navigator&&navigator.sendBeacon},s.document="undefined"!=typeof document?document:{},s._canUseCookies=void 0,s._canUseLocalStorage=void 0,s._canUseSessionStorage=void 0,s._internalEndpoints=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],s.NotSpecified="not_specified",s}(),A=function(){function n(){}return n.parseUrl=function(e){return n.htmlAnchorElement||(n.htmlAnchorElement=n.document.createElement?n.document.createElement("a"):{}),n.htmlAnchorElement.href=e,n.htmlAnchorElement},n.getAbsoluteUrl=function(e){var t,i=n.parseUrl(e);return i&&(t=i.href),t},n.getPathName=function(e){var t,i=n.parseUrl(e);return i&&(t=i.pathname),t},n.getCompleteUrl=function(e,t){return e?e.toUpperCase()+" "+t:t},n.document="undefined"!=typeof document?document:{},n}(),w=function(){function i(){}return i.canIncludeCorrelationHeader=function(e,t,i){if(e&&e.disableCorrelationHeaders)return!1;if(!t)return!1;var n=A.parseUrl(t).host.toLowerCase();if(!(e&&e.enableCorsCorrelation||n===i))return!1;var r=e&&e.correlationHeaderExcludedDomains;if(!r||0==r.length)return!0;for(var a=0;a<r.length;a++){if(new RegExp(r[a].toLowerCase().replace(/\./g,".").replace(/\*/g,".*")).test(n))return!1}return!0},i.getCorrelationContext=function(e){if(e){var t=i.getCorrelationContextValue(e,s.requestContextTargetKey);if(t&&t!==i.correlationIdPrefix)return t}},i.getCorrelationContextValue=function(e,t){if(e)for(var i=e.split(","),n=0;n<i.length;++n){var r=i[n].split("=");if(2==r.length&&r[0]==t)return r[1]}},i.correlationIdPrefix="cid-v1:",i}(),F=function(){function e(){}return e.ParseDependencyPath=function(e,t,i,n){var r,a=n,o=n;if(t&&0<t.length){var s=A.parseUrl(t);if(r=s.host,!a)if(null!=s.pathname){var u=0===s.pathname.length?"/":s.pathname;"/"!==u.charAt(0)&&(u="/"+u),o=s.pathname,a=x.sanitizeString(e,i?i+" "+u:u)}else a=x.sanitizeString(e,t)}else a=r=n;return{target:r,name:a,data:o}},e}(),C=function(){function e(){}return e.Now="undefined"==typeof window?function(){return(new Date).getTime()}:window.performance&&window.performance.now&&window.performance.timing?function(){return window.performance.now()+window.performance.timing.navigationStart}:function(){return(new Date).getTime()},e.GetDuration=function(e,t){var i=null;return 0===e||0===t||u.isNullOrUndefined(e)||u.isNullOrUndefined(t)||(i=t-e),i},e}(),_=function(e,t){return(_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(e,t)};function M(e,t){function i(){this.constructor=e}_(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}var R,U,b=function(){},L=function(e){function t(){return e.call(this)||this}return M(t,e),t}(b),z=function(r){function e(e,t,i){var n=r.call(this)||this;return n.name=x.sanitizeString(e,i)||E.NotSpecified,n.data=t,n.time=E.toISOStringForIE8(new Date),n.aiDataContract={time:g.FieldType.Required,iKey:g.FieldType.Required,name:g.FieldType.Required,sampleRate:function(){return 100==n.sampleRate?g.FieldType.Hidden:g.FieldType.Required},tags:g.FieldType.Required,data:g.FieldType.Required},n}return M(e,r),e}(function(){this.ver=1,this.sampleRate=100,this.tags={}}),k=function(){},O=function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}return M(e,t),e}(k),P=function(a){function e(e,t,i,n){var r=a.call(this)||this;return r.aiDataContract={ver:g.FieldType.Required,name:g.FieldType.Required,properties:g.FieldType.Default,measurements:g.FieldType.Default},r.name=x.sanitizeString(e,t)||E.NotSpecified,r.properties=x.sanitizeProperties(e,i),r.measurements=x.sanitizeMeasurements(e,n),r}return M(e,a),e.envelopeType="Microsoft.ApplicationInsights.{0}.Event",e.dataType="EventData",e}(O),q=function(){},G=function(){this.hasFullStack=!0,this.parsedStack=[]},H=function(o){function e(e,t,i,n,r){var a=o.call(this)||this;return a.aiDataContract={ver:g.FieldType.Required,exceptions:g.FieldType.Required,severityLevel:g.FieldType.Default,properties:g.FieldType.Default,measurements:g.FieldType.Default},a.properties=x.sanitizeProperties(e,i),a.measurements=x.sanitizeMeasurements(e,n),a.exceptions=[new j(e,t)],r&&(a.severityLevel=r),a}return M(e,o),e.CreateSimpleException=function(e,t,i,n,r,a){return{exceptions:[{hasFullStack:!0,message:e,stack:r,typeName:t}]}},e.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",e.dataType="ExceptionData",e}(function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.exceptions=[],e.properties={},e.measurements={},e}return M(e,t),e}(k)),j=function(r){function e(e,t){var i=r.call(this)||this;i.aiDataContract={id:g.FieldType.Default,outerId:g.FieldType.Default,typeName:g.FieldType.Required,message:g.FieldType.Required,hasFullStack:g.FieldType.Default,stack:g.FieldType.Default,parsedStack:g.FieldType.Array},i.typeName=x.sanitizeString(e,t.name)||E.NotSpecified,i.message=x.sanitizeMessage(e,t.message)||E.NotSpecified;var n=t.stack;return i.parsedStack=i.parseStack(n),i.stack=x.sanitizeException(e,n),i.hasFullStack=E.isArray(i.parsedStack)&&0<i.parsedStack.length,i}return M(e,r),e.prototype.parseStack=function(e){var t=void 0;if("string"==typeof e){var i=e.split("\n");t=[];for(var n=0,r=0,a=0;a<=i.length;a++){var o=i[a];if(V.regex.test(o)){var s=new V(i[a],n++);r+=s.sizeInBytes,t.push(s)}}if(32768<r)for(var u=0,c=t.length-1,l=0,d=u,p=c;u<c;){if(32768<(l+=t[u].sizeInBytes+t[c].sizeInBytes)){var f=p-d+1;t.splice(d,f);break}d=u,p=c,u++,c--}}return t},e}(G),V=function(r){function a(e,t){var i=r.call(this)||this;i.sizeInBytes=0,i.aiDataContract={level:g.FieldType.Required,method:g.FieldType.Required,assembly:g.FieldType.Default,fileName:g.FieldType.Default,line:g.FieldType.Default},i.level=t,i.method="<no_method>",i.assembly=E.trim(e);var n=e.match(a.regex);return n&&5<=n.length&&(i.method=E.trim(n[2])||i.method,i.fileName=E.trim(n[4]),i.line=parseInt(n[5])||0),i.sizeInBytes+=i.method.length,i.sizeInBytes+=i.fileName.length,i.sizeInBytes+=i.assembly.length,i.sizeInBytes+=a.baseSize,i.sizeInBytes+=i.level.toString().length,i.sizeInBytes+=i.line.toString().length,i}return M(a,r),a.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,a.baseSize=58,a}(q),X=function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.metrics=[],e.properties={},e}return M(e,t),e}(k);(U=R||(R={}))[U.Measurement=0]="Measurement",U[U.Aggregation=1]="Aggregation";var B,W=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.aiDataContract={name:g.FieldType.Required,kind:g.FieldType.Default,value:g.FieldType.Required,count:g.FieldType.Default,min:g.FieldType.Default,max:g.FieldType.Default,stdDev:g.FieldType.Default},e}return M(e,t),e}(function(){this.kind=R.Measurement}),K=function(c){function e(e,t,i,n,r,a,o){var s=c.call(this)||this;s.aiDataContract={ver:g.FieldType.Required,metrics:g.FieldType.Required,properties:g.FieldType.Default};var u=new W;return u.count=0<n?n:void 0,u.max=isNaN(a)||null===a?void 0:a,u.min=isNaN(r)||null===r?void 0:r,u.name=x.sanitizeString(e,t)||E.NotSpecified,u.value=i,s.metrics=[u],s.properties=x.sanitizeProperties(e,o),s}return M(e,c),e.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",e.dataType="MetricData",e}(X),Q=function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}return M(e,t),e}(O),Y=function(u){function e(e,t,i,n,r,a,o){var s=u.call(this)||this;return s.aiDataContract={ver:g.FieldType.Required,name:g.FieldType.Default,url:g.FieldType.Default,duration:g.FieldType.Default,properties:g.FieldType.Default,measurements:g.FieldType.Default,id:g.FieldType.Default},s.id=x.sanitizeId(e,o),s.url=x.sanitizeUrl(e,i),s.name=x.sanitizeString(e,t)||E.NotSpecified,isNaN(n)||(s.duration=E.msToTimeSpan(n)),s.properties=x.sanitizeProperties(e,r),s.measurements=x.sanitizeMeasurements(e,a),s}return M(e,u),e.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",e.dataType="PageviewData",e}(Q),J=function(f){function e(e,t,i,n,r,a,o,s,u,c,l){void 0===u&&(u="Ajax");var d=f.call(this)||this;d.aiDataContract={id:g.FieldType.Required,ver:g.FieldType.Required,name:g.FieldType.Default,resultCode:g.FieldType.Default,duration:g.FieldType.Default,success:g.FieldType.Default,data:g.FieldType.Default,target:g.FieldType.Default,type:g.FieldType.Default,properties:g.FieldType.Default,measurements:g.FieldType.Default,kind:g.FieldType.Default,value:g.FieldType.Default,count:g.FieldType.Default,min:g.FieldType.Default,max:g.FieldType.Default,stdDev:g.FieldType.Default,dependencyKind:g.FieldType.Default,dependencySource:g.FieldType.Default,commandName:g.FieldType.Default,dependencyTypeName:g.FieldType.Default},d.id=t,d.duration=E.msToTimeSpan(r),d.success=a,d.resultCode=o+"",d.type=x.sanitizeString(e,u);var p=F.ParseDependencyPath(e,i,s,n);return d.data=x.sanitizeUrl(e,n)||p.data,d.target=p.target,d.name=p.name,d.properties=x.sanitizeProperties(e,c),d.measurements=x.sanitizeMeasurements(e,l),d}return M(e,f),e.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",e.dataType="RemoteDependencyData",e}(function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.success=!0,e.properties={},e.measurements={},e}return M(e,t),e}(k)),$=function(a){function e(e,t,i,n){var r=a.call(this)||this;return r.aiDataContract={ver:g.FieldType.Required,message:g.FieldType.Required,severityLevel:g.FieldType.Default,properties:g.FieldType.Default},t=t||E.NotSpecified,r.message=x.sanitizeMessage(e,t),r.properties=x.sanitizeProperties(e,n),i&&(r.severityLevel=i),r}return M(e,a),e.envelopeType="Microsoft.ApplicationInsights.{0}.Message",e.dataType="MessageData",e}(function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e}return M(e,t),e}(k)),Z=function(s){function e(e,t,i,n,r,a){var o=s.call(this)||this;return o.aiDataContract={ver:g.FieldType.Required,name:g.FieldType.Default,url:g.FieldType.Default,duration:g.FieldType.Default,perfTotal:g.FieldType.Default,networkConnect:g.FieldType.Default,sentRequest:g.FieldType.Default,receivedResponse:g.FieldType.Default,domProcessing:g.FieldType.Default,properties:g.FieldType.Default,measurements:g.FieldType.Default},o.url=x.sanitizeUrl(e,i),o.name=x.sanitizeString(e,t)||E.NotSpecified,o.properties=x.sanitizeProperties(e,r),o.measurements=x.sanitizeMeasurements(e,a),o}return M(e,s),e.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",e.dataType="PageviewPerformanceData",e}(function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}return M(e,t),e}(Q)),ee=function(n){function e(e,t){var i=n.call(this)||this;return i.aiDataContract={baseType:g.FieldType.Required,baseData:g.FieldType.Required},i.baseType=e,i.baseData=t,i}return M(e,n),e}(L);(B=g.SeverityLevel||(g.SeverityLevel={}))[B.Verbose=0]="Verbose",B[B.Information=1]="Information",B[B.Warning=2]="Warning",B[B.Error=3]="Error",B[B.Critical=4]="Critical";var te=function(){function e(){}return e.getConfig=function(e,t,i,n){var r;return void 0===n&&(n=!1),r=i&&e.extensionConfig&&e.extensionConfig[i]&&!u.isNullOrUndefined(e.extensionConfig[i][t])?e.extensionConfig[i][t]:e[t],u.isNullOrUndefined(r)?n:r},e}(),ie=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"},ne=function(){function e(){}return e.create=function(e,t,i,n,r,a){if(i=x.sanitizeString(n,i)||E.NotSpecified,u.isNullOrUndefined(e)||u.isNullOrUndefined(t)||u.isNullOrUndefined(i))throw Error("Input doesn't contain all required fields");var o={name:i,time:(new Date).toISOString(),iKey:"",ext:a||{},tags:[],data:{},baseType:t,baseData:e};if(!u.isNullOrUndefined(r))for(var s in r)r.hasOwnProperty(s)&&(o.data[s]=r[s]);return o},e}(),re=function(){function e(){}return e.UserExt="user",e.DeviceExt="device",e.TraceExt="trace",e.WebExt="web",e.AppExt="app",e.OSExt="os",e.SessionExt="ses",e.SDKExt="sdk",e}(),ae=function(){function e(){}return e.libVer="libVer",e}(),oe=new ie;g.PropertiesPluginIdentifier="AppInsightsPropertiesPlugin",g.Util=E,g.CorrelationIdHelper=w,g.UrlHelper=A,g.DateTimeUtils=C,g.RequestHeaders=s,g.DisabledPropertyName="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",g.ProcessLegacy="ProcessLegacy",g.SampleRate="sampleRate",g.HttpMethod="http.method",g.AIData=L,g.AIBase=b,g.Envelope=z,g.Event=P,g.Exception=H,g.Metric=K,g.PageView=Y,g.PageViewData=Q,g.RemoteDependencyData=J,g.Trace=$,g.PageViewPerformance=Z,g.Data=ee,g.ConfigurationManager=te,g.ContextTagKeys=ie,g.DataSanitizer=x,g.TelemetryItemCreator=ne,g.CtxTagKeys=oe,g.Extensions=re,g.SDKExtensionKeys=ae,Object.defineProperty(g,"__esModule",{value:!0})});
//# sourceMappingURL=applicationinsights-common.min.js.map

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

import { Util } from '../Util';
import { _InternalMessageId, LoggingSeverity } from '@microsoft/applicationinsights-core-js';
var PageViewPerformance = /** @class */ (function (_super) {

@@ -30,44 +29,2 @@ tslib_1.__extends(PageViewPerformance, _super);

};
_this.isValid = false;
/*
* http://www.w3.org/TR/navigation-timing/#processing-model
* |-navigationStart
* | |-connectEnd
* | ||-requestStart
* | || |-responseStart
* | || | |-responseEnd
* | || | |
* | || | | |-loadEventEnd
* |---network---||---request---|---response---|---dom---|
* |--------------------------total----------------------|
*/
var timing = PageViewPerformance.getPerformanceTiming();
if (timing) {
var total = PageViewPerformance.getDuration(timing.navigationStart, timing.loadEventEnd);
var network = PageViewPerformance.getDuration(timing.navigationStart, timing.connectEnd);
var request = PageViewPerformance.getDuration(timing.requestStart, timing.responseStart);
var response = PageViewPerformance.getDuration(timing.responseStart, timing.responseEnd);
var dom = PageViewPerformance.getDuration(timing.responseEnd, timing.loadEventEnd);
if (total == 0) {
logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.ErrorPVCalc, "error calculating page view performance.", { total: total, network: network, request: request, response: response, dom: dom });
}
else if (!PageViewPerformance.shouldCollectDuration(total, network, request, response, dom)) {
logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.InvalidDurationValue, "Invalid page load duration value. Browser perf data won't be sent.", { total: total, network: network, request: request, response: response, dom: dom });
}
else if (total < Math.floor(network) + Math.floor(request) + Math.floor(response) + Math.floor(dom)) {
// some browsers may report individual components incorrectly so that the sum of the parts will be bigger than total PLT
// in this case, don't report client performance from this page
logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.ClientPerformanceMathError, "client performance math error.", { total: total, network: network, request: request, response: response, dom: dom });
}
else {
_this.durationMs = total;
// convert to timespans
_this.perfTotal = _this.duration = Util.msToTimeSpan(total);
_this.networkConnect = Util.msToTimeSpan(network);
_this.sentRequest = Util.msToTimeSpan(request);
_this.receivedResponse = Util.msToTimeSpan(response);
_this.domProcessing = Util.msToTimeSpan(dom);
_this.isValid = true;
}
}
_this.url = DataSanitizer.sanitizeUrl(logger, url);

@@ -79,82 +36,4 @@ _this.name = DataSanitizer.sanitizeString(logger, name) || Util.NotSpecified;

}
/**
* Indicates whether this instance of PageViewPerformance is valid and should be sent
*/
PageViewPerformance.prototype.getIsValid = function () {
return this.isValid;
};
/**
* Gets the total duration (PLT) in milliseconds. Check getIsValid() before using this method.
*/
PageViewPerformance.prototype.getDurationMs = function () {
return this.durationMs;
};
PageViewPerformance.getPerformanceTiming = function () {
if (PageViewPerformance.isPerformanceTimingSupported()) {
return window.performance.timing;
}
return null;
};
/**
* Returns true is window performance timing API is supported, false otherwise.
*/
PageViewPerformance.isPerformanceTimingSupported = function () {
return typeof window != "undefined" && window.performance && window.performance.timing;
};
/**
* As page loads different parts of performance timing numbers get set. When all of them are set we can report it.
* Returns true if ready, false otherwise.
*/
PageViewPerformance.isPerformanceTimingDataReady = function () {
var timing = window.performance.timing;
return timing.domainLookupStart > 0
&& timing.navigationStart > 0
&& timing.responseStart > 0
&& timing.requestStart > 0
&& timing.loadEventEnd > 0
&& timing.responseEnd > 0
&& timing.connectEnd > 0
&& timing.domLoading > 0;
};
PageViewPerformance.getDuration = function (start, end) {
var duration = undefined;
if (!(isNaN(start) || isNaN(end))) {
duration = Math.max(end - start, 0);
}
return duration;
};
/**
* This method tells if given durations should be excluded from collection.
*/
PageViewPerformance.shouldCollectDuration = function () {
var durations = [];
for (var _i = 0; _i < arguments.length; _i++) {
durations[_i] = arguments[_i];
}
// a full list of Google crawlers user agent strings - https://support.google.com/webmasters/answer/1061943?hl=en
var botAgentNames = ['googlebot', 'adsbot-google', 'apis-google', 'mediapartners-google'];
var userAgent = navigator.userAgent;
var isGoogleBot = false;
if (userAgent) {
for (var i_1 = 0; i_1 < botAgentNames.length; i_1++) {
isGoogleBot = isGoogleBot || userAgent.toLowerCase().indexOf(botAgentNames[i_1]) !== -1;
}
}
if (isGoogleBot) {
// Don't report durations for GoogleBot, it is returning invalid values in performance.timing API.
return false;
}
else {
// for other page views, don't report if it's outside of a reasonable range
for (var i = 0; i < durations.length; i++) {
if (durations[i] >= PageViewPerformance.MAX_DURATION_ALLOWED) {
return false;
}
}
}
return true;
};
PageViewPerformance.envelopeType = "Microsoft.ApplicationInsights.{0}.PageviewPerformance";
PageViewPerformance.dataType = "PageviewPerformanceData";
PageViewPerformance.MAX_DURATION_ALLOWED = 3600000; // 1h
return PageViewPerformance;

@@ -161,0 +40,0 @@ }(PageViewPerfData));

/*!
* Application Insights JavaScript SDK - Common, 2.0.0-beta.2
* Application Insights JavaScript SDK - Common, 2.0.0-beta.3
* Copyright (c) Microsoft and contributors. All rights reserved.
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e.Microsoft=e.Microsoft||{},e.Microsoft.ApplicationInsights={}))}(this,function(m){"use strict";var r,e,t;(e=r||(r={}))[e.LocalStorage=0]="LocalStorage",e[e.SessionStorage=1]="SessionStorage",(t=m.FieldType||(m.FieldType={}))[t.Default=0]="Default",t[t.Required=1]="Required",t[t.Array=2]="Array",t[t.Hidden=4]="Hidden";var h,n,u=function(){function e(){}return e.isNullOrUndefined=function(e){return null==e},e.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(i,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},e}(),i=/[xy]/g;(n=h||(h={}))[n.CRITICAL=1]="CRITICAL",n[n.WARNING=2]="WARNING";var a=1,o=2,c=3,l=4,d=5,p=6,v=8,y=10,S=45,f=52,g=56,T=57,N=61,I=66,D=68,w=69,E=(function(){function e(){this.identifier="ChannelControllerPlugin",this.priority=E}e.prototype.processTelemetry=function(t){this.channelQueue.forEach(function(e){0<e.length&&e[0].processTelemetry(t)})},Object.defineProperty(e.prototype,"ChannelControls",{get:function(){return this.channelQueue},enumerable:!0,configurable:!0}),e.prototype.initialize=function(n,i,r){var a=this;if(this.channelQueue=new Array,n.channels){var o=void 0;n.channels.forEach(function(e){if(e&&0<e.length){if((e=e.sort(function(e,t){return e.priority-t.priority})).forEach(function(e){e.priority<E&&(o=e.identifier),e.initialize(n,i,r)}),o)throw Error(A+o);for(var t=1;t<e.length;t++)e[t-1].setNextPlugin(e[t]);a.channelQueue.push(e)}})}for(var e=new Array,t=0;t<r.length;t++){var s=r[t];s.priority>E&&e.push(s)}if(0<e.length){(e=e.sort(function(e,t){return e.priority-t.priority})).forEach(function(e){return e.initialize(n,i,r)});for(t=1;t<e.length;t++)e[t-1].setNextPlugin(e[t]);this.channelQueue.push(e)}}}(),500),A="Channel has invalid priority",s=function(){function e(){}return e.requestContextHeader="Request-Context",e.requestContextTargetKey="appId",e.requestContextAppIdFormat="appId=cid-v1:",e.requestIdHeader="Request-Id",e.sdkContextHeader="Sdk-Context",e.sdkContextHeaderAppIdRequest="appId",e.requestContextHeaderLowerCase="request-context",e}(),x=function(){function s(){}return s.sanitizeKeyAndAddUniqueness=function(e,t,n){var i=t.length,r=s.sanitizeKey(e,t);if(r.length!==i){for(var a=0,o=r;void 0!==n[o];)a++,o=r.substring(0,s.MAX_NAME_LENGTH-3)+s.padNumber(a);r=o}return r},s.sanitizeKey=function(e,t){return t&&(t=s.trim(t.toString())).length>s.MAX_NAME_LENGTH&&(t=t.substring(0,s.MAX_NAME_LENGTH),e.throwInternal(h.WARNING,T,"name is too long. It has been truncated to "+s.MAX_NAME_LENGTH+" characters.",{name:t},!0)),t},s.sanitizeString=function(e,t,n){return void 0===n&&(n=s.MAX_STRING_LENGTH),t&&(n=n||s.MAX_STRING_LENGTH,(t=s.trim(t)).toString().length>n&&(t=t.toString().substring(0,n),e.throwInternal(h.WARNING,N,"string value is too long. It has been truncated to "+n+" characters.",{value:t},!0))),t},s.sanitizeUrl=function(e,t){return s.sanitizeInput(e,t,s.MAX_URL_LENGTH,I)},s.sanitizeMessage=function(e,t){return t&&t.length>s.MAX_MESSAGE_LENGTH&&(t=t.substring(0,s.MAX_MESSAGE_LENGTH),e.throwInternal(h.WARNING,g,"message is too long, it has been truncated to "+s.MAX_MESSAGE_LENGTH+" characters.",{message:t},!0)),t},s.sanitizeException=function(e,t){return t&&t.length>s.MAX_EXCEPTION_LENGTH&&(t=t.substring(0,s.MAX_EXCEPTION_LENGTH),e.throwInternal(h.WARNING,f,"exception is too long, it has been truncated to "+s.MAX_EXCEPTION_LENGTH+" characters.",{exception:t},!0)),t},s.sanitizeProperties=function(e,t){if(t){var n={};for(var i in t){var r=s.sanitizeString(e,t[i],s.MAX_PROPERTY_LENGTH);n[i=s.sanitizeKeyAndAddUniqueness(e,i,n)]=r}t=n}return t},s.sanitizeMeasurements=function(e,t){if(t){var n={};for(var i in t){var r=t[i];n[i=s.sanitizeKeyAndAddUniqueness(e,i,n)]=r}t=n}return t},s.sanitizeId=function(e,t){return t?s.sanitizeInput(e,t,s.MAX_ID_LENGTH,w).toString():t},s.sanitizeInput=function(e,t,n,i){return t&&(t=s.trim(t)).length>n&&(t=t.substring(0,n),e.throwInternal(h.WARNING,i,"input is too long, it has been truncated to "+n+" characters.",{data:t},!0)),t},s.padNumber=function(e){var t="00"+e;return t.substr(t.length-3)},s.trim=function(e){return"string"!=typeof e?e:e.replace(/^\s+|\s+$/g,"")},s.MAX_NAME_LENGTH=150,s.MAX_ID_LENGTH=128,s.MAX_PROPERTY_LENGTH=8192,s.MAX_STRING_LENGTH=1024,s.MAX_URL_LENGTH=2048,s.MAX_MESSAGE_LENGTH=32768,s.MAX_EXCEPTION_LENGTH=32768,s}(),C=function(){function s(){}return s.disableStorage=function(){s._canUseLocalStorage=!1,s._canUseSessionStorage=!1},s._getLocalStorageObject=function(){return s.canUseLocalStorage()?s._getVerifiedStorageObject(r.LocalStorage):null},s._getVerifiedStorageObject=function(e){var t,n,i=null;try{if("undefined"==typeof window)return null;n=new Date,(i=e===r.LocalStorage?window.localStorage:window.sessionStorage).setItem(n,n),t=i.getItem(n)!=n,i.removeItem(n),t&&(i=null)}catch(e){i=null}return i},s.isInternalApplicationInsightsEndpoint=function(e){return-1!==s._internalEndpoints.indexOf(e.toLowerCase())},s.canUseLocalStorage=function(){return void 0===s._canUseLocalStorage&&(s._canUseLocalStorage=!!s._getVerifiedStorageObject(r.LocalStorage)),s._canUseLocalStorage},s.getStorage=function(t,e){var n=s._getLocalStorageObject();if(null!==n)try{return n.getItem(e)}catch(e){s._canUseLocalStorage=!1,t.throwInternal(h.WARNING,a,"Browser failed read of local storage. "+s.getExceptionName(e),{exception:s.dump(e)})}return null},s.setStorage=function(t,e,n){var i=s._getLocalStorageObject();if(null!==i)try{return i.setItem(e,n),!0}catch(e){s._canUseLocalStorage=!1,t.throwInternal(h.WARNING,c,"Browser failed write to local storage. "+s.getExceptionName(e),{exception:s.dump(e)})}return!1},s.removeStorage=function(t,e){var n=s._getLocalStorageObject();if(null!==n)try{return n.removeItem(e),!0}catch(e){s._canUseLocalStorage=!1,t.throwInternal(h.WARNING,d,"Browser failed removal of local storage item. "+s.getExceptionName(e),{exception:s.dump(e)})}return!1},s._getSessionStorageObject=function(){return s.canUseSessionStorage()?s._getVerifiedStorageObject(r.SessionStorage):null},s.canUseSessionStorage=function(){return void 0===s._canUseSessionStorage&&(s._canUseSessionStorage=!!s._getVerifiedStorageObject(r.SessionStorage)),s._canUseSessionStorage},s.getSessionStorageKeys=function(){var e=[];if(s.canUseSessionStorage())for(var t in window.sessionStorage)e.push(t);return e},s.getSessionStorage=function(t,e){var n=s._getSessionStorageObject();if(null!==n)try{return n.getItem(e)}catch(e){s._canUseSessionStorage=!1,t.throwInternal(h.WARNING,o,"Browser failed read of session storage. "+s.getExceptionName(e),{exception:s.dump(e)})}return null},s.setSessionStorage=function(t,e,n){var i=s._getSessionStorageObject();if(null!==i)try{return i.setItem(e,n),!0}catch(e){s._canUseSessionStorage=!1,t.throwInternal(h.WARNING,l,"Browser failed write to session storage. "+s.getExceptionName(e),{exception:s.dump(e)})}return!1},s.removeSessionStorage=function(t,e){var n=s._getSessionStorageObject();if(null!==n)try{return n.removeItem(e),!0}catch(e){s._canUseSessionStorage=!1,t.throwInternal(h.WARNING,p,"Browser failed removal of session storage item. "+s.getExceptionName(e),{exception:s.dump(e)})}return!1},s.disableCookies=function(){s._canUseCookies=!1},s.canUseCookies=function(t){if(void 0===s._canUseCookies){s._canUseCookies=!1;try{s._canUseCookies=void 0!==s.document.cookie}catch(e){t.throwInternal(h.WARNING,D,"Cannot access document.cookie - "+s.getExceptionName(e),{exception:s.dump(e)})}}return s._canUseCookies},s.setCookie=function(e,t,n,i){var r="",a="";i&&(r=";domain="+i),s.document.location&&"https:"===s.document.location.protocol&&(a=";secure"),s.canUseCookies(e)&&(s.document.cookie=t+"="+n+r+";path=/"+a)},s.stringToBoolOrDefault=function(e,t){return void 0===t&&(t=!1),null==e?t:"true"===e.toString().toLowerCase()},s.getCookie=function(e,t){if(s.canUseCookies(e)){var n="";if(t&&t.length)for(var i=t+"=",r=s.document.cookie.split(";"),a=0;a<r.length;a++){var o=r[a];if((o=s.trim(o))&&0===o.indexOf(i)){n=o.substring(i.length,r[a].length);break}}return n}},s.deleteCookie=function(e,t){s.canUseCookies(e)&&(s.document.cookie=t+"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;")},s.trim=function(e){return"string"!=typeof e?e:e.replace(/^\s+|\s+$/g,"")},s.newId=function(){for(var e="",t=1073741824*Math.random();0<t;){e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t%64),t=Math.floor(t/64)}return e},s.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},s.isError=function(e){return"[object Error]"===Object.prototype.toString.call(e)},s.isDate=function(e){return"[object Date]"===Object.prototype.toString.call(e)},s.toISOStringForIE8=function(e){if(s.isDate(e)){if(Date.prototype.toISOString)return e.toISOString();var t=function(e){var t=String(e);return 1===t.length&&(t="0"+t),t};return e.getUTCFullYear()+"-"+t(e.getUTCMonth()+1)+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())+"."+String((e.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"}},s.getIEVersion=function(e){void 0===e&&(e=null);var t=e?e.toLowerCase():navigator.userAgent.toLowerCase();return-1!=t.indexOf("msie")?parseInt(t.split("msie")[1]):null},s.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,a=Math.floor(e/864e5);return 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,(0<a?a+".":"")+(r=r.length<2?"0"+r:r)+":"+i+":"+n+"."+t},s.isCrossOriginError=function(e,t,n,i,r){return("Script error."===e||"Script error"===e)&&!r},s.dump=function(e){var t=Object.prototype.toString.call(e),n=JSON.stringify(e);return"[object Error]"===t&&(n="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'"),t+n},s.getExceptionName=function(e){return"[object Error]"===Object.prototype.toString.call(e)?e.name:""},s.addEventHandler=function(e,t){if("undefined"==typeof window||!window||"string"!=typeof e||"function"!=typeof t)return!1;var n="on"+e;if(window.addEventListener)window.addEventListener(e,t,!1);else{if(!window.attachEvent)return!1;window.attachEvent(n,t)}return!0},s.IsBeaconApiSupported=function(){return"sendBeacon"in navigator&&navigator.sendBeacon},s.document="undefined"!=typeof document?document:{},s._canUseCookies=void 0,s._canUseLocalStorage=void 0,s._canUseSessionStorage=void 0,s._internalEndpoints=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],s.NotSpecified="not_specified",s}(),_=function(){function i(){}return i.parseUrl=function(e){return i.htmlAnchorElement||(i.htmlAnchorElement=i.document.createElement?i.document.createElement("a"):{}),i.htmlAnchorElement.href=e,i.htmlAnchorElement},i.getAbsoluteUrl=function(e){var t,n=i.parseUrl(e);return n&&(t=n.href),t},i.getPathName=function(e){var t,n=i.parseUrl(e);return n&&(t=n.pathname),t},i.getCompleteUrl=function(e,t){return e?e.toUpperCase()+" "+t:t},i.document="undefined"!=typeof document?document:{},i}(),F=function(){function n(){}return n.canIncludeCorrelationHeader=function(e,t,n){if(e&&e.disableCorrelationHeaders)return!1;if(!t)return!1;var i=_.parseUrl(t).host.toLowerCase();if(!(e&&e.enableCorsCorrelation||i===n))return!1;var r=e&&e.correlationHeaderExcludedDomains;if(!r||0==r.length)return!0;for(var a=0;a<r.length;a++){if(new RegExp(r[a].toLowerCase().replace(/\./g,".").replace(/\*/g,".*")).test(i))return!1}return!0},n.getCorrelationContext=function(e){if(e){var t=n.getCorrelationContextValue(e,s.requestContextTargetKey);if(t&&t!==n.correlationIdPrefix)return t}},n.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]}},n.correlationIdPrefix="cid-v1:",n}(),M=function(){function e(){}return e.ParseDependencyPath=function(e,t,n,i){var r,a=i,o=i;if(t&&0<t.length){var s=_.parseUrl(t);if(r=s.host,!a)if(null!=s.pathname){var u=0===s.pathname.length?"/":s.pathname;"/"!==u.charAt(0)&&(u="/"+u),o=s.pathname,a=x.sanitizeString(e,n?n+" "+u:u)}else a=x.sanitizeString(e,t)}else a=r=i;return{target:r,name:a,data:o}},e}(),R=function(){function e(){}return e.Now="undefined"==typeof window?function(){return(new Date).getTime()}:window.performance&&window.performance.now&&window.performance.timing?function(){return window.performance.now()+window.performance.timing.navigationStart}:function(){return(new Date).getTime()},e.GetDuration=function(e,t){var n=null;return 0===e||0===t||u.isNullOrUndefined(e)||u.isNullOrUndefined(t)||(n=t-e),n},e}(),U=function(e,t){return(U=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function b(e,t){function n(){this.constructor=e}U(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var L,z,k=function(){},O=function(e){function t(){return e.call(this)||this}return b(t,e),t}(k),P=function(r){function e(e,t,n){var i=r.call(this)||this;return i.name=x.sanitizeString(e,n)||C.NotSpecified,i.data=t,i.time=C.toISOStringForIE8(new Date),i.aiDataContract={time:m.FieldType.Required,iKey:m.FieldType.Required,name:m.FieldType.Required,sampleRate:function(){return 100==i.sampleRate?m.FieldType.Hidden:m.FieldType.Required},tags:m.FieldType.Required,data:m.FieldType.Required},i}return b(e,r),e}(function(){this.ver=1,this.sampleRate=100,this.tags={}}),q=function(){},G=function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}return b(e,t),e}(q),H=function(a){function e(e,t,n,i){var r=a.call(this)||this;return r.aiDataContract={ver:m.FieldType.Required,name:m.FieldType.Required,properties:m.FieldType.Default,measurements:m.FieldType.Default},r.name=x.sanitizeString(e,t)||C.NotSpecified,r.properties=x.sanitizeProperties(e,n),r.measurements=x.sanitizeMeasurements(e,i),r}return b(e,a),e.envelopeType="Microsoft.ApplicationInsights.{0}.Event",e.dataType="EventData",e}(G),V=function(){},j=function(){this.hasFullStack=!0,this.parsedStack=[]},X=function(o){function e(e,t,n,i,r){var a=o.call(this)||this;return a.aiDataContract={ver:m.FieldType.Required,exceptions:m.FieldType.Required,severityLevel:m.FieldType.Default,properties:m.FieldType.Default,measurements:m.FieldType.Default},a.properties=x.sanitizeProperties(e,n),a.measurements=x.sanitizeMeasurements(e,i),a.exceptions=[new B(e,t)],r&&(a.severityLevel=r),a}return b(e,o),e.CreateSimpleException=function(e,t,n,i,r,a){return{exceptions:[{hasFullStack:!0,message:e,stack:r,typeName:t}]}},e.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",e.dataType="ExceptionData",e}(function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.exceptions=[],e.properties={},e.measurements={},e}return b(e,t),e}(q)),B=function(r){function e(e,t){var n=r.call(this)||this;n.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},n.typeName=x.sanitizeString(e,t.name)||C.NotSpecified,n.message=x.sanitizeMessage(e,t.message)||C.NotSpecified;var i=t.stack;return n.parsedStack=n.parseStack(i),n.stack=x.sanitizeException(e,i),n.hasFullStack=C.isArray(n.parsedStack)&&0<n.parsedStack.length,n}return b(e,r),e.prototype.parseStack=function(e){var t=void 0;if("string"==typeof e){var n=e.split("\n");t=[];for(var i=0,r=0,a=0;a<=n.length;a++){var o=n[a];if(W.regex.test(o)){var s=new W(n[a],i++);r+=s.sizeInBytes,t.push(s)}}if(32768<r)for(var u=0,c=t.length-1,l=0,d=u,p=c;u<c;){if(32768<(l+=t[u].sizeInBytes+t[c].sizeInBytes)){var f=p-d+1;t.splice(d,f);break}d=u,p=c,u++,c--}}return t},e}(j),W=function(r){function a(e,t){var n=r.call(this)||this;n.sizeInBytes=0,n.aiDataContract={level:m.FieldType.Required,method:m.FieldType.Required,assembly:m.FieldType.Default,fileName:m.FieldType.Default,line:m.FieldType.Default},n.level=t,n.method="<no_method>",n.assembly=C.trim(e);var i=e.match(a.regex);return i&&5<=i.length&&(n.method=C.trim(i[2])||n.method,n.fileName=C.trim(i[4]),n.line=parseInt(i[5])||0),n.sizeInBytes+=n.method.length,n.sizeInBytes+=n.fileName.length,n.sizeInBytes+=n.assembly.length,n.sizeInBytes+=a.baseSize,n.sizeInBytes+=n.level.toString().length,n.sizeInBytes+=n.line.toString().length,n}return b(a,r),a.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,a.baseSize=58,a}(V),K=function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.metrics=[],e.properties={},e}return b(e,t),e}(q);(z=L||(L={}))[z.Measurement=0]="Measurement",z[z.Aggregation=1]="Aggregation";var Q,Y=function(t){function e(){var e=null!==t&&t.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}return b(e,t),e}(function(){this.kind=L.Measurement}),J=function(c){function e(e,t,n,i,r,a,o){var s=c.call(this)||this;s.aiDataContract={ver:m.FieldType.Required,metrics:m.FieldType.Required,properties:m.FieldType.Default};var u=new Y;return u.count=0<i?i:void 0,u.max=isNaN(a)||null===a?void 0:a,u.min=isNaN(r)||null===r?void 0:r,u.name=x.sanitizeString(e,t)||C.NotSpecified,u.value=n,s.metrics=[u],s.properties=x.sanitizeProperties(e,o),s}return b(e,c),e.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",e.dataType="MetricData",e}(K),$=function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}return b(e,t),e}(G),Z=function(u){function e(e,t,n,i,r,a,o){var s=u.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=x.sanitizeId(e,o),s.url=x.sanitizeUrl(e,n),s.name=x.sanitizeString(e,t)||C.NotSpecified,isNaN(i)||(s.duration=C.msToTimeSpan(i)),s.properties=x.sanitizeProperties(e,r),s.measurements=x.sanitizeMeasurements(e,a),s}return b(e,u),e.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",e.dataType="PageviewData",e}($),ee=function(f){function e(e,t,n,i,r,a,o,s,u,c,l){void 0===u&&(u="Ajax");var d=f.call(this)||this;d.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},d.id=t,d.duration=C.msToTimeSpan(r),d.success=a,d.resultCode=o+"",d.type=x.sanitizeString(e,u);var p=M.ParseDependencyPath(e,n,s,i);return d.data=x.sanitizeUrl(e,i)||p.data,d.target=p.target,d.name=p.name,d.properties=x.sanitizeProperties(e,c),d.measurements=x.sanitizeMeasurements(e,l),d}return b(e,f),e.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",e.dataType="RemoteDependencyData",e}(function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.success=!0,e.properties={},e.measurements={},e}return b(e,t),e}(q)),te=function(a){function e(e,t,n,i){var r=a.call(this)||this;return r.aiDataContract={ver:m.FieldType.Required,message:m.FieldType.Required,severityLevel:m.FieldType.Default,properties:m.FieldType.Default},t=t||C.NotSpecified,r.message=x.sanitizeMessage(e,t),r.properties=x.sanitizeProperties(e,i),n&&(r.severityLevel=n),r}return b(e,a),e.envelopeType="Microsoft.ApplicationInsights.{0}.Message",e.dataType="MessageData",e}(function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e}return b(e,t),e}(q)),ne=function(f){function g(e,t,n,i,r,a){var o=f.call(this)||this;o.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},o.isValid=!1;var s=g.getPerformanceTiming();if(s){var u=g.getDuration(s.navigationStart,s.loadEventEnd),c=g.getDuration(s.navigationStart,s.connectEnd),l=g.getDuration(s.requestStart,s.responseStart),d=g.getDuration(s.responseStart,s.responseEnd),p=g.getDuration(s.responseEnd,s.loadEventEnd);0==u?e.throwInternal(h.WARNING,y,"error calculating page view performance.",{total:u,network:c,request:l,response:d,dom:p}):g.shouldCollectDuration(u,c,l,d,p)?u<Math.floor(c)+Math.floor(l)+Math.floor(d)+Math.floor(p)?e.throwInternal(h.WARNING,v,"client performance math error.",{total:u,network:c,request:l,response:d,dom:p}):(o.durationMs=u,o.perfTotal=o.duration=C.msToTimeSpan(u),o.networkConnect=C.msToTimeSpan(c),o.sentRequest=C.msToTimeSpan(l),o.receivedResponse=C.msToTimeSpan(d),o.domProcessing=C.msToTimeSpan(p),o.isValid=!0):e.throwInternal(h.WARNING,S,"Invalid page load duration value. Browser perf data won't be sent.",{total:u,network:c,request:l,response:d,dom:p})}return o.url=x.sanitizeUrl(e,n),o.name=x.sanitizeString(e,t)||C.NotSpecified,o.properties=x.sanitizeProperties(e,r),o.measurements=x.sanitizeMeasurements(e,a),o}return b(g,f),g.prototype.getIsValid=function(){return this.isValid},g.prototype.getDurationMs=function(){return this.durationMs},g.getPerformanceTiming=function(){return g.isPerformanceTimingSupported()?window.performance.timing:null},g.isPerformanceTimingSupported=function(){return"undefined"!=typeof window&&window.performance&&window.performance.timing},g.isPerformanceTimingDataReady=function(){var e=window.performance.timing;return 0<e.domainLookupStart&&0<e.navigationStart&&0<e.responseStart&&0<e.requestStart&&0<e.loadEventEnd&&0<e.responseEnd&&0<e.connectEnd&&0<e.domLoading},g.getDuration=function(e,t){var n=void 0;return isNaN(e)||isNaN(t)||(n=Math.max(t-e,0)),n},g.shouldCollectDuration=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=["googlebot","adsbot-google","apis-google","mediapartners-google"],i=navigator.userAgent,r=!1;if(i)for(var a=0;a<n.length;a++)r=r||-1!==i.toLowerCase().indexOf(n[a]);if(r)return!1;for(var o=0;o<e.length;o++)if(e[o]>=g.MAX_DURATION_ALLOWED)return!1;return!0},g.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",g.dataType="PageviewPerformanceData",g.MAX_DURATION_ALLOWED=36e5,g}(function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}return b(e,t),e}($)),ie=function(i){function e(e,t){var n=i.call(this)||this;return n.aiDataContract={baseType:m.FieldType.Required,baseData:m.FieldType.Required},n.baseType=e,n.baseData=t,n}return b(e,i),e}(O);(Q=m.SeverityLevel||(m.SeverityLevel={}))[Q.Verbose=0]="Verbose",Q[Q.Information=1]="Information",Q[Q.Warning=2]="Warning",Q[Q.Error=3]="Error",Q[Q.Critical=4]="Critical";var re=function(){function e(){}return e.getConfig=function(e,t,n,i){var r;return void 0===i&&(i=!1),r=n&&e.extensionConfig&&e.extensionConfig[n]&&!u.isNullOrUndefined(e.extensionConfig[n][t])?e.extensionConfig[n][t]:e[t],u.isNullOrUndefined(r)?i:r},e}(),ae=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"},oe=function(){function e(){}return e.create=function(e,t,n,i,r,a){if(n=x.sanitizeString(i,n)||C.NotSpecified,u.isNullOrUndefined(e)||u.isNullOrUndefined(t)||u.isNullOrUndefined(n))throw Error("Input doesn't contain all required fields");var o={name:n,time:(new Date).toISOString(),iKey:"",ext:a||{},tags:[],data:{},baseType:t,baseData:e};if(!u.isNullOrUndefined(r))for(var s in r)r.hasOwnProperty(s)&&(o.data[s]=r[s]);return o},e}(),se=function(){function e(){}return e.UserExt="user",e.DeviceExt="device",e.TraceExt="trace",e.WebExt="web",e.AppExt="app",e.OSExt="os",e.SessionExt="ses",e.SDKExt="sdk",e}(),ue=function(){function e(){}return e.libVer="libVer",e}(),ce=new ae;m.PropertiesPluginIdentifier="AppInsightsPropertiesPlugin",m.Util=C,m.CorrelationIdHelper=F,m.UrlHelper=_,m.DateTimeUtils=R,m.RequestHeaders=s,m.DisabledPropertyName="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",m.ProcessLegacy="ProcessLegacy",m.SampleRate="sampleRate",m.HttpMethod="http.method",m.AIData=O,m.AIBase=k,m.Envelope=P,m.Event=H,m.Exception=X,m.Metric=J,m.PageView=Z,m.PageViewData=$,m.RemoteDependencyData=ee,m.Trace=te,m.PageViewPerformance=ne,m.Data=ie,m.ConfigurationManager=re,m.ContextTagKeys=ae,m.DataSanitizer=x,m.TelemetryItemCreator=oe,m.CtxTagKeys=ce,m.Extensions=se,m.SDKExtensionKeys=ue,Object.defineProperty(m,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e.Microsoft=e.Microsoft||{},e.Microsoft.ApplicationInsights={}))}(this,function(g){"use strict";var r,e,t;(e=r||(r={}))[e.LocalStorage=0]="LocalStorage",e[e.SessionStorage=1]="SessionStorage",(t=g.FieldType||(g.FieldType={}))[t.Default=0]="Default",t[t.Required=1]="Required",t[t.Array=2]="Array",t[t.Hidden=4]="Hidden";var a,i,u=function(){function e(){}return e.isNullOrUndefined=function(e){return null==e},e.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(n,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},e}(),n=/[xy]/g;(i=a||(a={}))[i.CRITICAL=1]="CRITICAL",i[i.WARNING=2]="WARNING";var o=1,c=2,l=3,d=4,p=5,f=6,h=52,m=56,y=57,v=61,S=66,T=68,N=69,I=(function(){function e(){this.identifier="ChannelControllerPlugin",this.priority=I}e.prototype.processTelemetry=function(t){this.channelQueue.forEach(function(e){0<e.length&&e[0].processTelemetry(t)})},Object.defineProperty(e.prototype,"ChannelControls",{get:function(){return this.channelQueue},enumerable:!0,configurable:!0}),e.prototype.initialize=function(i,n,r){var a=this;if(this.channelQueue=new Array,i.channels){var o=void 0;i.channels.forEach(function(e){if(e&&0<e.length){if((e=e.sort(function(e,t){return e.priority-t.priority})).forEach(function(e){e.priority<I&&(o=e.identifier),e.initialize(i,n,r)}),o)throw Error(D+o);for(var t=1;t<e.length;t++)e[t-1].setNextPlugin(e[t]);a.channelQueue.push(e)}})}for(var e=new Array,t=0;t<r.length;t++){var s=r[t];s.priority>I&&e.push(s)}if(0<e.length){(e=e.sort(function(e,t){return e.priority-t.priority})).forEach(function(e){return e.initialize(i,n,r)});for(t=1;t<e.length;t++)e[t-1].setNextPlugin(e[t]);this.channelQueue.push(e)}}}(),500),D="Channel has invalid priority",s=function(){function e(){}return e.requestContextHeader="Request-Context",e.requestContextTargetKey="appId",e.requestContextAppIdFormat="appId=cid-v1:",e.requestIdHeader="Request-Id",e.sdkContextHeader="Sdk-Context",e.sdkContextHeaderAppIdRequest="appId",e.requestContextHeaderLowerCase="request-context",e}(),x=function(){function s(){}return s.sanitizeKeyAndAddUniqueness=function(e,t,i){var n=t.length,r=s.sanitizeKey(e,t);if(r.length!==n){for(var a=0,o=r;void 0!==i[o];)a++,o=r.substring(0,s.MAX_NAME_LENGTH-3)+s.padNumber(a);r=o}return r},s.sanitizeKey=function(e,t){return t&&(t=s.trim(t.toString())).length>s.MAX_NAME_LENGTH&&(t=t.substring(0,s.MAX_NAME_LENGTH),e.throwInternal(a.WARNING,y,"name is too long. It has been truncated to "+s.MAX_NAME_LENGTH+" characters.",{name:t},!0)),t},s.sanitizeString=function(e,t,i){return void 0===i&&(i=s.MAX_STRING_LENGTH),t&&(i=i||s.MAX_STRING_LENGTH,(t=s.trim(t)).toString().length>i&&(t=t.toString().substring(0,i),e.throwInternal(a.WARNING,v,"string value is too long. It has been truncated to "+i+" characters.",{value:t},!0))),t},s.sanitizeUrl=function(e,t){return s.sanitizeInput(e,t,s.MAX_URL_LENGTH,S)},s.sanitizeMessage=function(e,t){return t&&t.length>s.MAX_MESSAGE_LENGTH&&(t=t.substring(0,s.MAX_MESSAGE_LENGTH),e.throwInternal(a.WARNING,m,"message is too long, it has been truncated to "+s.MAX_MESSAGE_LENGTH+" characters.",{message:t},!0)),t},s.sanitizeException=function(e,t){return t&&t.length>s.MAX_EXCEPTION_LENGTH&&(t=t.substring(0,s.MAX_EXCEPTION_LENGTH),e.throwInternal(a.WARNING,h,"exception is too long, it has been truncated to "+s.MAX_EXCEPTION_LENGTH+" characters.",{exception:t},!0)),t},s.sanitizeProperties=function(e,t){if(t){var i={};for(var n in t){var r=s.sanitizeString(e,t[n],s.MAX_PROPERTY_LENGTH);i[n=s.sanitizeKeyAndAddUniqueness(e,n,i)]=r}t=i}return t},s.sanitizeMeasurements=function(e,t){if(t){var i={};for(var n in t){var r=t[n];i[n=s.sanitizeKeyAndAddUniqueness(e,n,i)]=r}t=i}return t},s.sanitizeId=function(e,t){return t?s.sanitizeInput(e,t,s.MAX_ID_LENGTH,N).toString():t},s.sanitizeInput=function(e,t,i,n){return t&&(t=s.trim(t)).length>i&&(t=t.substring(0,i),e.throwInternal(a.WARNING,n,"input is too long, it has been truncated to "+i+" characters.",{data:t},!0)),t},s.padNumber=function(e){var t="00"+e;return t.substr(t.length-3)},s.trim=function(e){return"string"!=typeof e?e:e.replace(/^\s+|\s+$/g,"")},s.MAX_NAME_LENGTH=150,s.MAX_ID_LENGTH=128,s.MAX_PROPERTY_LENGTH=8192,s.MAX_STRING_LENGTH=1024,s.MAX_URL_LENGTH=2048,s.MAX_MESSAGE_LENGTH=32768,s.MAX_EXCEPTION_LENGTH=32768,s}(),E=function(){function s(){}return s.disableStorage=function(){s._canUseLocalStorage=!1,s._canUseSessionStorage=!1},s._getLocalStorageObject=function(){return s.canUseLocalStorage()?s._getVerifiedStorageObject(r.LocalStorage):null},s._getVerifiedStorageObject=function(e){var t,i,n=null;try{if("undefined"==typeof window)return null;i=new Date,(n=e===r.LocalStorage?window.localStorage:window.sessionStorage).setItem(i,i),t=n.getItem(i)!=i,n.removeItem(i),t&&(n=null)}catch(e){n=null}return n},s.isInternalApplicationInsightsEndpoint=function(e){return-1!==s._internalEndpoints.indexOf(e.toLowerCase())},s.canUseLocalStorage=function(){return void 0===s._canUseLocalStorage&&(s._canUseLocalStorage=!!s._getVerifiedStorageObject(r.LocalStorage)),s._canUseLocalStorage},s.getStorage=function(t,e){var i=s._getLocalStorageObject();if(null!==i)try{return i.getItem(e)}catch(e){s._canUseLocalStorage=!1,t.throwInternal(a.WARNING,o,"Browser failed read of local storage. "+s.getExceptionName(e),{exception:s.dump(e)})}return null},s.setStorage=function(t,e,i){var n=s._getLocalStorageObject();if(null!==n)try{return n.setItem(e,i),!0}catch(e){s._canUseLocalStorage=!1,t.throwInternal(a.WARNING,l,"Browser failed write to local storage. "+s.getExceptionName(e),{exception:s.dump(e)})}return!1},s.removeStorage=function(t,e){var i=s._getLocalStorageObject();if(null!==i)try{return i.removeItem(e),!0}catch(e){s._canUseLocalStorage=!1,t.throwInternal(a.WARNING,p,"Browser failed removal of local storage item. "+s.getExceptionName(e),{exception:s.dump(e)})}return!1},s._getSessionStorageObject=function(){return s.canUseSessionStorage()?s._getVerifiedStorageObject(r.SessionStorage):null},s.canUseSessionStorage=function(){return void 0===s._canUseSessionStorage&&(s._canUseSessionStorage=!!s._getVerifiedStorageObject(r.SessionStorage)),s._canUseSessionStorage},s.getSessionStorageKeys=function(){var e=[];if(s.canUseSessionStorage())for(var t in window.sessionStorage)e.push(t);return e},s.getSessionStorage=function(t,e){var i=s._getSessionStorageObject();if(null!==i)try{return i.getItem(e)}catch(e){s._canUseSessionStorage=!1,t.throwInternal(a.WARNING,c,"Browser failed read of session storage. "+s.getExceptionName(e),{exception:s.dump(e)})}return null},s.setSessionStorage=function(t,e,i){var n=s._getSessionStorageObject();if(null!==n)try{return n.setItem(e,i),!0}catch(e){s._canUseSessionStorage=!1,t.throwInternal(a.WARNING,d,"Browser failed write to session storage. "+s.getExceptionName(e),{exception:s.dump(e)})}return!1},s.removeSessionStorage=function(t,e){var i=s._getSessionStorageObject();if(null!==i)try{return i.removeItem(e),!0}catch(e){s._canUseSessionStorage=!1,t.throwInternal(a.WARNING,f,"Browser failed removal of session storage item. "+s.getExceptionName(e),{exception:s.dump(e)})}return!1},s.disableCookies=function(){s._canUseCookies=!1},s.canUseCookies=function(t){if(void 0===s._canUseCookies){s._canUseCookies=!1;try{s._canUseCookies=void 0!==s.document.cookie}catch(e){t.throwInternal(a.WARNING,T,"Cannot access document.cookie - "+s.getExceptionName(e),{exception:s.dump(e)})}}return s._canUseCookies},s.setCookie=function(e,t,i,n){var r="",a="";n&&(r=";domain="+n),s.document.location&&"https:"===s.document.location.protocol&&(a=";secure"),s.canUseCookies(e)&&(s.document.cookie=t+"="+i+r+";path=/"+a)},s.stringToBoolOrDefault=function(e,t){return void 0===t&&(t=!1),null==e?t:"true"===e.toString().toLowerCase()},s.getCookie=function(e,t){if(s.canUseCookies(e)){var i="";if(t&&t.length)for(var n=t+"=",r=s.document.cookie.split(";"),a=0;a<r.length;a++){var o=r[a];if((o=s.trim(o))&&0===o.indexOf(n)){i=o.substring(n.length,r[a].length);break}}return i}},s.deleteCookie=function(e,t){s.canUseCookies(e)&&(s.document.cookie=t+"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;")},s.trim=function(e){return"string"!=typeof e?e:e.replace(/^\s+|\s+$/g,"")},s.newId=function(){for(var e="",t=1073741824*Math.random();0<t;){e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t%64),t=Math.floor(t/64)}return e},s.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},s.isError=function(e){return"[object Error]"===Object.prototype.toString.call(e)},s.isDate=function(e){return"[object Date]"===Object.prototype.toString.call(e)},s.toISOStringForIE8=function(e){if(s.isDate(e)){if(Date.prototype.toISOString)return e.toISOString();var t=function(e){var t=String(e);return 1===t.length&&(t="0"+t),t};return e.getUTCFullYear()+"-"+t(e.getUTCMonth()+1)+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())+"."+String((e.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"}},s.getIEVersion=function(e){void 0===e&&(e=null);var t=e?e.toLowerCase():navigator.userAgent.toLowerCase();return-1!=t.indexOf("msie")?parseInt(t.split("msie")[1]):null},s.msToTimeSpan=function(e){(isNaN(e)||e<0)&&(e=0);var t=""+(e=Math.round(e))%1e3,i=""+Math.floor(e/1e3)%60,n=""+Math.floor(e/6e4)%60,r=""+Math.floor(e/36e5)%24,a=Math.floor(e/864e5);return t=1===t.length?"00"+t:2===t.length?"0"+t:t,i=i.length<2?"0"+i:i,n=n.length<2?"0"+n:n,(0<a?a+".":"")+(r=r.length<2?"0"+r:r)+":"+n+":"+i+"."+t},s.isCrossOriginError=function(e,t,i,n,r){return("Script error."===e||"Script error"===e)&&!r},s.dump=function(e){var t=Object.prototype.toString.call(e),i=JSON.stringify(e);return"[object Error]"===t&&(i="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'"),t+i},s.getExceptionName=function(e){return"[object Error]"===Object.prototype.toString.call(e)?e.name:""},s.addEventHandler=function(e,t){if("undefined"==typeof window||!window||"string"!=typeof e||"function"!=typeof t)return!1;var i="on"+e;if(window.addEventListener)window.addEventListener(e,t,!1);else{if(!window.attachEvent)return!1;window.attachEvent(i,t)}return!0},s.IsBeaconApiSupported=function(){return"sendBeacon"in navigator&&navigator.sendBeacon},s.document="undefined"!=typeof document?document:{},s._canUseCookies=void 0,s._canUseLocalStorage=void 0,s._canUseSessionStorage=void 0,s._internalEndpoints=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],s.NotSpecified="not_specified",s}(),A=function(){function n(){}return n.parseUrl=function(e){return n.htmlAnchorElement||(n.htmlAnchorElement=n.document.createElement?n.document.createElement("a"):{}),n.htmlAnchorElement.href=e,n.htmlAnchorElement},n.getAbsoluteUrl=function(e){var t,i=n.parseUrl(e);return i&&(t=i.href),t},n.getPathName=function(e){var t,i=n.parseUrl(e);return i&&(t=i.pathname),t},n.getCompleteUrl=function(e,t){return e?e.toUpperCase()+" "+t:t},n.document="undefined"!=typeof document?document:{},n}(),w=function(){function i(){}return i.canIncludeCorrelationHeader=function(e,t,i){if(e&&e.disableCorrelationHeaders)return!1;if(!t)return!1;var n=A.parseUrl(t).host.toLowerCase();if(!(e&&e.enableCorsCorrelation||n===i))return!1;var r=e&&e.correlationHeaderExcludedDomains;if(!r||0==r.length)return!0;for(var a=0;a<r.length;a++){if(new RegExp(r[a].toLowerCase().replace(/\./g,".").replace(/\*/g,".*")).test(n))return!1}return!0},i.getCorrelationContext=function(e){if(e){var t=i.getCorrelationContextValue(e,s.requestContextTargetKey);if(t&&t!==i.correlationIdPrefix)return t}},i.getCorrelationContextValue=function(e,t){if(e)for(var i=e.split(","),n=0;n<i.length;++n){var r=i[n].split("=");if(2==r.length&&r[0]==t)return r[1]}},i.correlationIdPrefix="cid-v1:",i}(),F=function(){function e(){}return e.ParseDependencyPath=function(e,t,i,n){var r,a=n,o=n;if(t&&0<t.length){var s=A.parseUrl(t);if(r=s.host,!a)if(null!=s.pathname){var u=0===s.pathname.length?"/":s.pathname;"/"!==u.charAt(0)&&(u="/"+u),o=s.pathname,a=x.sanitizeString(e,i?i+" "+u:u)}else a=x.sanitizeString(e,t)}else a=r=n;return{target:r,name:a,data:o}},e}(),C=function(){function e(){}return e.Now="undefined"==typeof window?function(){return(new Date).getTime()}:window.performance&&window.performance.now&&window.performance.timing?function(){return window.performance.now()+window.performance.timing.navigationStart}:function(){return(new Date).getTime()},e.GetDuration=function(e,t){var i=null;return 0===e||0===t||u.isNullOrUndefined(e)||u.isNullOrUndefined(t)||(i=t-e),i},e}(),_=function(e,t){return(_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(e,t)};function M(e,t){function i(){this.constructor=e}_(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}var R,U,b=function(){},L=function(e){function t(){return e.call(this)||this}return M(t,e),t}(b),z=function(r){function e(e,t,i){var n=r.call(this)||this;return n.name=x.sanitizeString(e,i)||E.NotSpecified,n.data=t,n.time=E.toISOStringForIE8(new Date),n.aiDataContract={time:g.FieldType.Required,iKey:g.FieldType.Required,name:g.FieldType.Required,sampleRate:function(){return 100==n.sampleRate?g.FieldType.Hidden:g.FieldType.Required},tags:g.FieldType.Required,data:g.FieldType.Required},n}return M(e,r),e}(function(){this.ver=1,this.sampleRate=100,this.tags={}}),k=function(){},O=function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}return M(e,t),e}(k),P=function(a){function e(e,t,i,n){var r=a.call(this)||this;return r.aiDataContract={ver:g.FieldType.Required,name:g.FieldType.Required,properties:g.FieldType.Default,measurements:g.FieldType.Default},r.name=x.sanitizeString(e,t)||E.NotSpecified,r.properties=x.sanitizeProperties(e,i),r.measurements=x.sanitizeMeasurements(e,n),r}return M(e,a),e.envelopeType="Microsoft.ApplicationInsights.{0}.Event",e.dataType="EventData",e}(O),q=function(){},G=function(){this.hasFullStack=!0,this.parsedStack=[]},H=function(o){function e(e,t,i,n,r){var a=o.call(this)||this;return a.aiDataContract={ver:g.FieldType.Required,exceptions:g.FieldType.Required,severityLevel:g.FieldType.Default,properties:g.FieldType.Default,measurements:g.FieldType.Default},a.properties=x.sanitizeProperties(e,i),a.measurements=x.sanitizeMeasurements(e,n),a.exceptions=[new j(e,t)],r&&(a.severityLevel=r),a}return M(e,o),e.CreateSimpleException=function(e,t,i,n,r,a){return{exceptions:[{hasFullStack:!0,message:e,stack:r,typeName:t}]}},e.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",e.dataType="ExceptionData",e}(function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.exceptions=[],e.properties={},e.measurements={},e}return M(e,t),e}(k)),j=function(r){function e(e,t){var i=r.call(this)||this;i.aiDataContract={id:g.FieldType.Default,outerId:g.FieldType.Default,typeName:g.FieldType.Required,message:g.FieldType.Required,hasFullStack:g.FieldType.Default,stack:g.FieldType.Default,parsedStack:g.FieldType.Array},i.typeName=x.sanitizeString(e,t.name)||E.NotSpecified,i.message=x.sanitizeMessage(e,t.message)||E.NotSpecified;var n=t.stack;return i.parsedStack=i.parseStack(n),i.stack=x.sanitizeException(e,n),i.hasFullStack=E.isArray(i.parsedStack)&&0<i.parsedStack.length,i}return M(e,r),e.prototype.parseStack=function(e){var t=void 0;if("string"==typeof e){var i=e.split("\n");t=[];for(var n=0,r=0,a=0;a<=i.length;a++){var o=i[a];if(V.regex.test(o)){var s=new V(i[a],n++);r+=s.sizeInBytes,t.push(s)}}if(32768<r)for(var u=0,c=t.length-1,l=0,d=u,p=c;u<c;){if(32768<(l+=t[u].sizeInBytes+t[c].sizeInBytes)){var f=p-d+1;t.splice(d,f);break}d=u,p=c,u++,c--}}return t},e}(G),V=function(r){function a(e,t){var i=r.call(this)||this;i.sizeInBytes=0,i.aiDataContract={level:g.FieldType.Required,method:g.FieldType.Required,assembly:g.FieldType.Default,fileName:g.FieldType.Default,line:g.FieldType.Default},i.level=t,i.method="<no_method>",i.assembly=E.trim(e);var n=e.match(a.regex);return n&&5<=n.length&&(i.method=E.trim(n[2])||i.method,i.fileName=E.trim(n[4]),i.line=parseInt(n[5])||0),i.sizeInBytes+=i.method.length,i.sizeInBytes+=i.fileName.length,i.sizeInBytes+=i.assembly.length,i.sizeInBytes+=a.baseSize,i.sizeInBytes+=i.level.toString().length,i.sizeInBytes+=i.line.toString().length,i}return M(a,r),a.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,a.baseSize=58,a}(q),X=function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.metrics=[],e.properties={},e}return M(e,t),e}(k);(U=R||(R={}))[U.Measurement=0]="Measurement",U[U.Aggregation=1]="Aggregation";var B,W=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.aiDataContract={name:g.FieldType.Required,kind:g.FieldType.Default,value:g.FieldType.Required,count:g.FieldType.Default,min:g.FieldType.Default,max:g.FieldType.Default,stdDev:g.FieldType.Default},e}return M(e,t),e}(function(){this.kind=R.Measurement}),K=function(c){function e(e,t,i,n,r,a,o){var s=c.call(this)||this;s.aiDataContract={ver:g.FieldType.Required,metrics:g.FieldType.Required,properties:g.FieldType.Default};var u=new W;return u.count=0<n?n:void 0,u.max=isNaN(a)||null===a?void 0:a,u.min=isNaN(r)||null===r?void 0:r,u.name=x.sanitizeString(e,t)||E.NotSpecified,u.value=i,s.metrics=[u],s.properties=x.sanitizeProperties(e,o),s}return M(e,c),e.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",e.dataType="MetricData",e}(X),Q=function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}return M(e,t),e}(O),Y=function(u){function e(e,t,i,n,r,a,o){var s=u.call(this)||this;return s.aiDataContract={ver:g.FieldType.Required,name:g.FieldType.Default,url:g.FieldType.Default,duration:g.FieldType.Default,properties:g.FieldType.Default,measurements:g.FieldType.Default,id:g.FieldType.Default},s.id=x.sanitizeId(e,o),s.url=x.sanitizeUrl(e,i),s.name=x.sanitizeString(e,t)||E.NotSpecified,isNaN(n)||(s.duration=E.msToTimeSpan(n)),s.properties=x.sanitizeProperties(e,r),s.measurements=x.sanitizeMeasurements(e,a),s}return M(e,u),e.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",e.dataType="PageviewData",e}(Q),J=function(f){function e(e,t,i,n,r,a,o,s,u,c,l){void 0===u&&(u="Ajax");var d=f.call(this)||this;d.aiDataContract={id:g.FieldType.Required,ver:g.FieldType.Required,name:g.FieldType.Default,resultCode:g.FieldType.Default,duration:g.FieldType.Default,success:g.FieldType.Default,data:g.FieldType.Default,target:g.FieldType.Default,type:g.FieldType.Default,properties:g.FieldType.Default,measurements:g.FieldType.Default,kind:g.FieldType.Default,value:g.FieldType.Default,count:g.FieldType.Default,min:g.FieldType.Default,max:g.FieldType.Default,stdDev:g.FieldType.Default,dependencyKind:g.FieldType.Default,dependencySource:g.FieldType.Default,commandName:g.FieldType.Default,dependencyTypeName:g.FieldType.Default},d.id=t,d.duration=E.msToTimeSpan(r),d.success=a,d.resultCode=o+"",d.type=x.sanitizeString(e,u);var p=F.ParseDependencyPath(e,i,s,n);return d.data=x.sanitizeUrl(e,n)||p.data,d.target=p.target,d.name=p.name,d.properties=x.sanitizeProperties(e,c),d.measurements=x.sanitizeMeasurements(e,l),d}return M(e,f),e.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",e.dataType="RemoteDependencyData",e}(function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.success=!0,e.properties={},e.measurements={},e}return M(e,t),e}(k)),$=function(a){function e(e,t,i,n){var r=a.call(this)||this;return r.aiDataContract={ver:g.FieldType.Required,message:g.FieldType.Required,severityLevel:g.FieldType.Default,properties:g.FieldType.Default},t=t||E.NotSpecified,r.message=x.sanitizeMessage(e,t),r.properties=x.sanitizeProperties(e,n),i&&(r.severityLevel=i),r}return M(e,a),e.envelopeType="Microsoft.ApplicationInsights.{0}.Message",e.dataType="MessageData",e}(function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e}return M(e,t),e}(k)),Z=function(s){function e(e,t,i,n,r,a){var o=s.call(this)||this;return o.aiDataContract={ver:g.FieldType.Required,name:g.FieldType.Default,url:g.FieldType.Default,duration:g.FieldType.Default,perfTotal:g.FieldType.Default,networkConnect:g.FieldType.Default,sentRequest:g.FieldType.Default,receivedResponse:g.FieldType.Default,domProcessing:g.FieldType.Default,properties:g.FieldType.Default,measurements:g.FieldType.Default},o.url=x.sanitizeUrl(e,i),o.name=x.sanitizeString(e,t)||E.NotSpecified,o.properties=x.sanitizeProperties(e,r),o.measurements=x.sanitizeMeasurements(e,a),o}return M(e,s),e.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",e.dataType="PageviewPerformanceData",e}(function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}return M(e,t),e}(Q)),ee=function(n){function e(e,t){var i=n.call(this)||this;return i.aiDataContract={baseType:g.FieldType.Required,baseData:g.FieldType.Required},i.baseType=e,i.baseData=t,i}return M(e,n),e}(L);(B=g.SeverityLevel||(g.SeverityLevel={}))[B.Verbose=0]="Verbose",B[B.Information=1]="Information",B[B.Warning=2]="Warning",B[B.Error=3]="Error",B[B.Critical=4]="Critical";var te=function(){function e(){}return e.getConfig=function(e,t,i,n){var r;return void 0===n&&(n=!1),r=i&&e.extensionConfig&&e.extensionConfig[i]&&!u.isNullOrUndefined(e.extensionConfig[i][t])?e.extensionConfig[i][t]:e[t],u.isNullOrUndefined(r)?n:r},e}(),ie=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"},ne=function(){function e(){}return e.create=function(e,t,i,n,r,a){if(i=x.sanitizeString(n,i)||E.NotSpecified,u.isNullOrUndefined(e)||u.isNullOrUndefined(t)||u.isNullOrUndefined(i))throw Error("Input doesn't contain all required fields");var o={name:i,time:(new Date).toISOString(),iKey:"",ext:a||{},tags:[],data:{},baseType:t,baseData:e};if(!u.isNullOrUndefined(r))for(var s in r)r.hasOwnProperty(s)&&(o.data[s]=r[s]);return o},e}(),re=function(){function e(){}return e.UserExt="user",e.DeviceExt="device",e.TraceExt="trace",e.WebExt="web",e.AppExt="app",e.OSExt="os",e.SessionExt="ses",e.SDKExt="sdk",e}(),ae=function(){function e(){}return e.libVer="libVer",e}(),oe=new ie;g.PropertiesPluginIdentifier="AppInsightsPropertiesPlugin",g.Util=E,g.CorrelationIdHelper=w,g.UrlHelper=A,g.DateTimeUtils=C,g.RequestHeaders=s,g.DisabledPropertyName="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",g.ProcessLegacy="ProcessLegacy",g.SampleRate="sampleRate",g.HttpMethod="http.method",g.AIData=L,g.AIBase=b,g.Envelope=z,g.Event=P,g.Exception=H,g.Metric=K,g.PageView=Y,g.PageViewData=Q,g.RemoteDependencyData=J,g.Trace=$,g.PageViewPerformance=Z,g.Data=ee,g.ConfigurationManager=te,g.ContextTagKeys=ie,g.DataSanitizer=x,g.TelemetryItemCreator=ne,g.CtxTagKeys=oe,g.Extensions=re,g.SDKExtensionKeys=ae,Object.defineProperty(g,"__esModule",{value:!0})});
//# sourceMappingURL=applicationinsights-common.min.js.map
{
"name": "@microsoft/applicationinsights-common",
"version": "2.0.0-beta.2",
"version": "2.0.0-beta.3",
"description": "Microsoft Application Insights Common JavaScript Library",

@@ -33,3 +33,3 @@ "main": "./dist/applicationinsights-common.js",

"dependencies": {
"@microsoft/applicationinsights-core-js": "^2.0.0-beta.2",
"@microsoft/applicationinsights-core-js": "^2.0.0-beta.3",
"tslib": "^1.9.3"

@@ -36,0 +36,0 @@ },

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

export { IPageViewTelemetry, IPageViewTelemetryInternal } from './Interfaces/IPageViewTelemetry';
export { IPageViewPerformanceTelemetry } from './Interfaces/IPageViewPerformanceTelemetry';
export { IPageViewPerformanceTelemetry, IPageViewPerformanceTelemetryInternal } from './Interfaces/IPageViewPerformanceTelemetry';
export { Trace } from './Telemetry/Trace';

@@ -28,0 +28,0 @@ export { PageViewPerformance } from './Telemetry/PageViewPerformance';

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

*/
id: string;
id?: string;

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

*/
acquisitionDate: number;
acquisitionDate?: number;

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

*/
renewalDate: number;
renewalDate?: number;
}

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

*/
url?: string;
uri?: string;
/**
* Performance total in TimeSpan 'G' (general long) format: d:hh:mm:ss.fffffff". This is total duration in timespan format.
*/
perfTotal?: string;
/**
* Performance total in TimeSpan 'G' (general long) format: d:hh:mm:ss.fffffff". This represents the total page load time.
*/
duration?: string;
/**
* Sent request time in TimeSpan 'G' (general long) format: d:hh:mm:ss.fffffff
*/
networkConnect?: string;
/**
* Sent request time in TimeSpan 'G' (general long) format: d:hh:mm:ss.fffffff.
*/
sentRequest?: string;
/**
* Received response time in TimeSpan 'G' (general long) format: d:hh:mm:ss.fffffff.
*/
receivedResponse?: string;
/**
* DOM processing time in TimeSpan 'G' (general long) format: d:hh:mm:ss.fffffff
*/
domProcessing?: string;

@@ -26,1 +50,22 @@ /**

}
export interface IPageViewPerformanceTelemetryInternal extends IPageViewPerformanceTelemetry {
/**
* An identifier assigned to each distinct impression for the purposes of correlating with pageview.
* A new id is automatically generated on each pageview. You can manually specify this field if you
* want to use a specific value instead.
*/
id?: string;
/**
* Version of the part B schema, todo: set this value in trackpageView
*/
ver?: string;
/**
* Field indicating whether this instance of PageViewPerformance is valid and should be sent
*/
isValid?: boolean;
/**
* Duration in miliseconds
*/
durationMs?: number;
}

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

private static MAX_DURATION_ALLOWED = 3600000; // 1h
public aiDataContract = {

@@ -35,87 +33,6 @@ ver: FieldType.Required,

/**
* Field indicating whether this instance of PageViewPerformance is valid and should be sent
*/
private isValid: boolean;
/**
* Indicates whether this instance of PageViewPerformance is valid and should be sent
*/
public getIsValid() {
return this.isValid;
}
private durationMs: number;
/**
* Gets the total duration (PLT) in milliseconds. Check getIsValid() before using this method.
*/
public getDurationMs() {
return this.durationMs;
}
/**
* Constructs a new instance of the PageEventTelemetry object
*/
constructor(logger: IDiagnosticLogger, name: string, url: string, unused: number, properties?: {[key: string]: string}, measurements?: {[key: string]: number}) {
constructor(logger: IDiagnosticLogger, name: string, url: string, unused: number, properties?: { [key: string]: string }, measurements?: { [key: string]: number }) {
super();
this.isValid = false;
/*
* http://www.w3.org/TR/navigation-timing/#processing-model
* |-navigationStart
* | |-connectEnd
* | ||-requestStart
* | || |-responseStart
* | || | |-responseEnd
* | || | |
* | || | | |-loadEventEnd
* |---network---||---request---|---response---|---dom---|
* |--------------------------total----------------------|
*/
var timing = PageViewPerformance.getPerformanceTiming();
if (timing) {
var total = PageViewPerformance.getDuration(timing.navigationStart, timing.loadEventEnd);
var network = PageViewPerformance.getDuration(timing.navigationStart, timing.connectEnd);
var request = PageViewPerformance.getDuration(timing.requestStart, timing.responseStart);
var response = PageViewPerformance.getDuration(timing.responseStart, timing.responseEnd);
var dom = PageViewPerformance.getDuration(timing.responseEnd, timing.loadEventEnd);
if (total == 0) {
logger.throwInternal(
LoggingSeverity.WARNING,
_InternalMessageId.ErrorPVCalc,
"error calculating page view performance.",
{ total: total, network: network, request: request, response: response, dom: dom });
} else if (!PageViewPerformance.shouldCollectDuration(total, network, request, response, dom)) {
logger.throwInternal(
LoggingSeverity.WARNING,
_InternalMessageId.InvalidDurationValue,
"Invalid page load duration value. Browser perf data won't be sent.",
{ total: total, network: network, request: request, response: response, dom: dom });
} else if (total < Math.floor(network) + Math.floor(request) + Math.floor(response) + Math.floor(dom)) {
// some browsers may report individual components incorrectly so that the sum of the parts will be bigger than total PLT
// in this case, don't report client performance from this page
logger.throwInternal(
LoggingSeverity.WARNING,
_InternalMessageId.ClientPerformanceMathError,
"client performance math error.",
{ total: total, network: network, request: request, response: response, dom: dom });
} else {
this.durationMs = total;
// convert to timespans
this.perfTotal = this.duration = Util.msToTimeSpan(total);
this.networkConnect = Util.msToTimeSpan(network);
this.sentRequest = Util.msToTimeSpan(request);
this.receivedResponse = Util.msToTimeSpan(response);
this.domProcessing = Util.msToTimeSpan(dom);
this.isValid = true;
}
}
this.url = DataSanitizer.sanitizeUrl(logger, url);

@@ -127,73 +44,2 @@ this.name = DataSanitizer.sanitizeString(logger, name) || Util.NotSpecified;

}
public static getPerformanceTiming(): PerformanceTiming {
if (PageViewPerformance.isPerformanceTimingSupported()) {
return window.performance.timing;
}
return null;
}
/**
* Returns true is window performance timing API is supported, false otherwise.
*/
public static isPerformanceTimingSupported() {
return typeof window != "undefined" && window.performance && window.performance.timing;
}
/**
* As page loads different parts of performance timing numbers get set. When all of them are set we can report it.
* Returns true if ready, false otherwise.
*/
public static isPerformanceTimingDataReady() {
var timing = window.performance.timing;
return timing.domainLookupStart > 0
&& timing.navigationStart > 0
&& timing.responseStart > 0
&& timing.requestStart > 0
&& timing.loadEventEnd > 0
&& timing.responseEnd > 0
&& timing.connectEnd > 0
&& timing.domLoading > 0;
}
public static getDuration(start: any, end: any): number {
var duration = undefined;
if (!(isNaN(start) || isNaN(end))) {
duration = Math.max(end - start, 0);
}
return duration;
}
/**
* This method tells if given durations should be excluded from collection.
*/
public static shouldCollectDuration(...durations: number[]): boolean {
// a full list of Google crawlers user agent strings - https://support.google.com/webmasters/answer/1061943?hl=en
let botAgentNames = ['googlebot', 'adsbot-google', 'apis-google', 'mediapartners-google'];
let userAgent = navigator.userAgent;
let isGoogleBot = false;
if (userAgent) {
for (let i = 0; i < botAgentNames.length; i++) {
isGoogleBot = isGoogleBot || userAgent.toLowerCase().indexOf(botAgentNames[i]) !== -1;
}
}
if (isGoogleBot) {
// Don't report durations for GoogleBot, it is returning invalid values in performance.timing API.
return false;
} else {
// for other page views, don't report if it's outside of a reasonable range
for (var i = 0; i < durations.length; i++) {
if (durations[i] >= PageViewPerformance.MAX_DURATION_ALLOWED) {
return false;
}
}
}
return true;
}
}

@@ -22,3 +22,3 @@ export { Util, CorrelationIdHelper, UrlHelper, DateTimeUtils } from './Util';

export { IPageViewTelemetry, IPageViewTelemetryInternal } from './Interfaces/IPageViewTelemetry';
export { IPageViewPerformanceTelemetry } from './Interfaces/IPageViewPerformanceTelemetry';
export { IPageViewPerformanceTelemetry, IPageViewPerformanceTelemetryInternal } from './Interfaces/IPageViewPerformanceTelemetry';
export { Trace } from './Telemetry/Trace';

@@ -25,0 +25,0 @@ export { PageViewPerformance } from './Telemetry/PageViewPerformance';

@@ -5,3 +5,3 @@ export interface ISession {

*/
id: string;
id?: string;
/**

@@ -11,3 +11,3 @@ * The date at which this guid was genereated.

*/
acquisitionDate: number;
acquisitionDate?: number;
/**

@@ -18,3 +18,3 @@ * The date at which this session ID was last reported.

*/
renewalDate: number;
renewalDate?: number;
}

@@ -9,4 +9,28 @@ export interface IPageViewPerformanceTelemetry {

*/
url?: string;
uri?: string;
/**
* Performance total in TimeSpan 'G' (general long) format: d:hh:mm:ss.fffffff". This is total duration in timespan format.
*/
perfTotal?: string;
/**
* Performance total in TimeSpan 'G' (general long) format: d:hh:mm:ss.fffffff". This represents the total page load time.
*/
duration?: string;
/**
* Sent request time in TimeSpan 'G' (general long) format: d:hh:mm:ss.fffffff
*/
networkConnect?: string;
/**
* Sent request time in TimeSpan 'G' (general long) format: d:hh:mm:ss.fffffff.
*/
sentRequest?: string;
/**
* Received response time in TimeSpan 'G' (general long) format: d:hh:mm:ss.fffffff.
*/
receivedResponse?: string;
/**
* DOM processing time in TimeSpan 'G' (general long) format: d:hh:mm:ss.fffffff
*/
domProcessing?: string;
/**
* Property bag to contain additional custom properties (Part C)

@@ -24,1 +48,21 @@ */

}
export interface IPageViewPerformanceTelemetryInternal extends IPageViewPerformanceTelemetry {
/**
* An identifier assigned to each distinct impression for the purposes of correlating with pageview.
* A new id is automatically generated on each pageview. You can manually specify this field if you
* want to use a specific value instead.
*/
id?: string;
/**
* Version of the part B schema, todo: set this value in trackpageView
*/
ver?: string;
/**
* Field indicating whether this instance of PageViewPerformance is valid and should be sent
*/
isValid?: boolean;
/**
* Duration in miliseconds
*/
durationMs?: number;
}

@@ -8,3 +8,2 @@ import { PageViewPerfData } from '../Interfaces/Contracts/Generated/PageViewPerfData';

static dataType: string;
private static MAX_DURATION_ALLOWED;
aiDataContract: {

@@ -24,15 +23,2 @@ ver: FieldType;

/**
* Field indicating whether this instance of PageViewPerformance is valid and should be sent
*/
private isValid;
/**
* Indicates whether this instance of PageViewPerformance is valid and should be sent
*/
getIsValid(): boolean;
private durationMs;
/**
* Gets the total duration (PLT) in milliseconds. Check getIsValid() before using this method.
*/
getDurationMs(): number;
/**
* Constructs a new instance of the PageEventTelemetry object

@@ -45,17 +31,2 @@ */

});
static getPerformanceTiming(): PerformanceTiming;
/**
* Returns true is window performance timing API is supported, false otherwise.
*/
static isPerformanceTimingSupported(): PerformanceTiming;
/**
* As page loads different parts of performance timing numbers get set. When all of them are set we can report it.
* Returns true if ready, false otherwise.
*/
static isPerformanceTimingDataReady(): boolean;
static getDuration(start: any, end: any): number;
/**
* This method tells if given durations should be excluded from collection.
*/
static shouldCollectDuration(...durations: number[]): boolean;
}

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