@microsoft/applicationinsights-analytics-js
Advanced tools
Comparing version 1.0.0-beta.11 to 1.0.0-beta.12
/*! | ||
* Application Insights JavaScript SDK - Web Analytics, 1.0.0-beta.11 | ||
* Application Insights JavaScript SDK - Web Analytics, 1.0.0-beta.12 | ||
* 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=e||self).aianalytics={})}(this,function(e){"use strict";var r,t,h,n;(t=r||(r={}))[t.LocalStorage=0]="LocalStorage",t[t.SessionStorage=1]="SessionStorage",(n=h||(h={}))[n.Default=0]="Default",n[n.Required=1]="Required",n[n.Array=2]="Array",n[n.Hidden=4]="Hidden";var m,i,l=function(){function e(){}return e.isNullOrUndefined=function(e){return null==e},e.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(o,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},e}(),o=/[xy]/g;(i=m||(m={}))[i.CRITICAL=1]="CRITICAL",i[i.WARNING=2]="WARNING";var a=1,c=2,u=3,d=4,p=5,g=6,v=8,I=10,s=11,f=25,y=29,w=30,S=31,N=32,T=35,_=36,E=37,D=38,k=39,A=45,x=52,b=56,R=57,C=61,M=62,P=63,L=64,U=66,O=68,V=69,z=(function(){function e(){this.identifier="ChannelControllerPlugin",this.priority=z}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 o=this;if(this.channelQueue=new Array,n.channels)n.channels.forEach(function(e){if(e&&0<e.length){(e=e.sort(function(e,t){return e.priority-t.priority})).forEach(function(e){return e.initialize(n,i,r)});for(var t=1;t<e.length;t++)e[t-1].setNextPlugin(e[t]);o.channelQueue.push(e)}});else{for(var e=new Array,t=0;t<r.length;t++){var a=r[t];a.priority>z&&e.push(a)}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)}}}}(),200),G=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 o=0,a=r;void 0!==n[a];)o++,a=r.substring(0,s.MAX_NAME_LENGTH-3)+s.padNumber(o);r=a}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(m.WARNING,R,"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(m.WARNING,C,"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,U)},s.sanitizeMessage=function(e,t){return t&&t.length>s.MAX_MESSAGE_LENGTH&&(t=t.substring(0,s.MAX_MESSAGE_LENGTH),e.throwInternal(m.WARNING,b,"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(m.WARNING,x,"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,V).toString():t},s.sanitizeInput=function(e,t,n,i){return t&&(t=s.trim(t)).length>n&&(t=t.substring(0,n),e.throwInternal(m.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}(),q=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(m.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(m.WARNING,u,"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(m.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 n=s._getSessionStorageObject();if(null!==n)try{return n.getItem(e)}catch(e){s._canUseSessionStorage=!1,t.throwInternal(m.WARNING,c,"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(m.WARNING,d,"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(m.WARNING,g,"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(m.WARNING,O,"Cannot access document.cookie - "+s.getExceptionName(e),{exception:s.dump(e)})}}return s._canUseCookies},s.setCookie=function(e,t,n,i){var r="",o="";i&&(r=";domain="+i),s.document.location&&"https:"===s.document.location.protocol&&(o=";secure"),s.canUseCookies(e)&&(s.document.cookie=t+"="+n+r+";path=/"+o)},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(";"),o=0;o<r.length;o++){var a=r[o];if((a=s.trim(a))&&0===a.indexOf(i)){n=a.substring(i.length,r[o].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,o=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<o?o+".":"")+(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}(),B=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}(),j=function(){function e(){}return e.ParseDependencyPath=function(e,t,n,i){var r,o;if(t&&0<t.length){var a=B.parseUrl(t);if(r=a.host,null!=a.pathname)"/"!==(i=0===a.pathname.length?"/":a.pathname).charAt(0)&&(i="/"+i),o=G.sanitizeString(e,n?n+" "+i:i);else o=G.sanitizeString(e,t)}else o=r=i;return{target:r,name:o}},e}(),X=(function(){function e(){}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||l.isNullOrUndefined(e)||l.isNullOrUndefined(t)||(n=t-e),n}}(),function(e,t){return(X=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 H(e,t){function n(){this.constructor=e}X(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var W,K,F=function(e){function t(){return e.call(this)||this}return H(t,e),t}(function(){}),Q=(function(r){function e(e,t,n){var i=r.call(this)||this;return i.name=G.sanitizeString(e,n)||q.NotSpecified,i.data=t,i.time=q.toISOStringForIE8(new Date),i.aiDataContract={time:h.Required,iKey:h.Required,name:h.Required,sampleRate:function(){return 100==i.sampleRate?h.Hidden:h.Required},tags:h.Required,data:h.Required},i}H(e,r)}(function(){this.ver=1,this.sampleRate=100,this.tags={}}),function(){}),Y=function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}return H(e,t),e}(Q),J=function(o){function e(e,t,n,i){var r=o.call(this)||this;return r.aiDataContract={ver:h.Required,name:h.Required,properties:h.Default,measurements:h.Default},r.name=G.sanitizeString(e,t)||q.NotSpecified,r.properties=G.sanitizeProperties(e,n),r.measurements=G.sanitizeMeasurements(e,i),r}return H(e,o),e.envelopeType="Microsoft.ApplicationInsights.{0}.Event",e.dataType="EventData",e}(Y),$=function(){},Z=function(){this.hasFullStack=!0,this.parsedStack=[]},ee=function(a){function e(e,t,n,i,r){var o=a.call(this)||this;return o.aiDataContract={ver:h.Required,exceptions:h.Required,severityLevel:h.Default,properties:h.Default,measurements:h.Default},o.properties=G.sanitizeProperties(e,n),o.measurements=G.sanitizeMeasurements(e,i),o.exceptions=[new te(e,t)],r&&(o.severityLevel=r),o}return H(e,a),e.CreateSimpleException=function(e,t,n,i,r,o){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 H(e,t),e}(Q)),te=function(r){function e(e,t){var n=r.call(this)||this;n.aiDataContract={id:h.Default,outerId:h.Default,typeName:h.Required,message:h.Required,hasFullStack:h.Default,stack:h.Default,parsedStack:h.Array},n.typeName=G.sanitizeString(e,t.name)||q.NotSpecified,n.message=G.sanitizeMessage(e,t.message)||q.NotSpecified;var i=t.stack;return n.parsedStack=n.parseStack(i),n.stack=G.sanitizeException(e,i),n.hasFullStack=q.isArray(n.parsedStack)&&0<n.parsedStack.length,n}return H(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,o=0;o<=n.length;o++){var a=n[o];if(ne.regex.test(a)){var s=new ne(n[o],i++);r+=s.sizeInBytes,t.push(s)}}if(32768<r)for(var c=0,u=t.length-1,l=0,d=c,p=u;c<u;){if(32768<(l+=t[c].sizeInBytes+t[u].sizeInBytes)){var g=p-d+1;t.splice(d,g);break}d=c,p=u,c++,u--}}return t},e}(Z),ne=function(r){function o(e,t){var n=r.call(this)||this;n.sizeInBytes=0,n.aiDataContract={level:h.Required,method:h.Required,assembly:h.Default,fileName:h.Default,line:h.Default},n.level=t,n.method="<no_method>",n.assembly=q.trim(e);var i=e.match(o.regex);return i&&5<=i.length&&(n.method=q.trim(i[2])||n.method,n.fileName=q.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+=o.baseSize,n.sizeInBytes+=n.level.toString().length,n.sizeInBytes+=n.line.toString().length,n}return H(o,r),o.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,o.baseSize=58,o}($),ie=function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.metrics=[],e.properties={},e}return H(e,t),e}(Q);(K=W||(W={}))[K.Measurement=0]="Measurement",K[K.Aggregation=1]="Aggregation";var re,oe,ae=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.aiDataContract={name:h.Required,kind:h.Default,value:h.Required,count:h.Default,min:h.Default,max:h.Default,stdDev:h.Default},e}return H(e,t),e}(function(){this.kind=W.Measurement}),se=function(u){function e(e,t,n,i,r,o,a){var s=u.call(this)||this;s.aiDataContract={ver:h.Required,metrics:h.Required,properties:h.Default};var c=new ae;return c.count=0<i?i:void 0,c.max=isNaN(o)||null===o?void 0:o,c.min=isNaN(r)||null===r?void 0:r,c.name=G.sanitizeString(e,t)||q.NotSpecified,c.value=n,s.metrics=[c],s.properties=G.sanitizeProperties(e,a),s}return H(e,u),e.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",e.dataType="MetricData",e}(ie),ce=function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}return H(e,t),e}(Y),ue=function(c){function e(e,t,n,i,r,o,a){var s=c.call(this)||this;return s.aiDataContract={ver:h.Required,name:h.Default,url:h.Default,duration:h.Default,properties:h.Default,measurements:h.Default,id:h.Default},s.id=G.sanitizeId(e,a),s.url=G.sanitizeUrl(e,n),s.name=G.sanitizeString(e,t)||q.NotSpecified,isNaN(i)||(s.duration=q.msToTimeSpan(i)),s.properties=G.sanitizeProperties(e,r),s.measurements=G.sanitizeMeasurements(e,o),s}return H(e,c),e.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",e.dataType="PageviewData",e}(ce),le=function(p){function e(e,t,n,i,r,o,a,s,c,u){var l=p.call(this)||this;l.aiDataContract={id:h.Required,ver:h.Required,name:h.Default,resultCode:h.Default,duration:h.Default,success:h.Default,data:h.Default,target:h.Default,type:h.Default,properties:h.Default,measurements:h.Default,kind:h.Default,value:h.Default,count:h.Default,min:h.Default,max:h.Default,stdDev:h.Default,dependencyKind:h.Default,dependencySource:h.Default,commandName:h.Default,dependencyTypeName:h.Default},l.id=t,l.duration=q.msToTimeSpan(r),l.success=o,l.resultCode=a+"",l.type="Ajax",l.data=G.sanitizeUrl(e,i);var d=j.ParseDependencyPath(e,n,s,i);return l.target=d.target,l.name=d.name,l.properties=G.sanitizeProperties(e,c),l.measurements=G.sanitizeMeasurements(e,u),l}return H(e,p),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 H(e,t),e}(Q)),de=function(o){function e(e,t,n,i){var r=o.call(this)||this;return r.aiDataContract={ver:h.Required,message:h.Required,severityLevel:h.Default,properties:h.Default},t=t||q.NotSpecified,r.message=G.sanitizeMessage(e,t),r.properties=G.sanitizeProperties(e,i),n&&(r.severityLevel=n),r}return H(e,o),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 H(e,t),e}(Q)),pe=function(g){function f(e,t,n,i,r,o){var a=g.call(this)||this;a.aiDataContract={ver:h.Required,name:h.Default,url:h.Default,duration:h.Default,perfTotal:h.Default,networkConnect:h.Default,sentRequest:h.Default,receivedResponse:h.Default,domProcessing:h.Default,properties:h.Default,measurements:h.Default},a.isValid=!1;var s=f.getPerformanceTiming();if(s){var c=f.getDuration(s.navigationStart,s.loadEventEnd),u=f.getDuration(s.navigationStart,s.connectEnd),l=f.getDuration(s.requestStart,s.responseStart),d=f.getDuration(s.responseStart,s.responseEnd),p=f.getDuration(s.responseEnd,s.loadEventEnd);0==c?e.throwInternal(m.WARNING,I,"error calculating page view performance.",{total:c,network:u,request:l,response:d,dom:p}):f.shouldCollectDuration(c,u,l,d,p)?c<Math.floor(u)+Math.floor(l)+Math.floor(d)+Math.floor(p)?e.throwInternal(m.WARNING,v,"client performance math error.",{total:c,network:u,request:l,response:d,dom:p}):(a.durationMs=c,a.perfTotal=a.duration=q.msToTimeSpan(c),a.networkConnect=q.msToTimeSpan(u),a.sentRequest=q.msToTimeSpan(l),a.receivedResponse=q.msToTimeSpan(d),a.domProcessing=q.msToTimeSpan(p),a.isValid=!0):e.throwInternal(m.WARNING,A,"Invalid page load duration value. Browser perf data won't be sent.",{total:c,network:u,request:l,response:d,dom:p})}return a.url=G.sanitizeUrl(e,n),a.name=G.sanitizeString(e,t)||q.NotSpecified,a.properties=G.sanitizeProperties(e,r),a.measurements=G.sanitizeMeasurements(e,o),a}return H(f,g),f.prototype.getIsValid=function(){return this.isValid},f.prototype.getDurationMs=function(){return this.durationMs},f.getPerformanceTiming=function(){return f.isPerformanceTimingSupported()?window.performance.timing:null},f.isPerformanceTimingSupported=function(){return"undefined"!=typeof window&&window.performance&&window.performance.timing},f.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},f.getDuration=function(e,t){var n=void 0;return isNaN(e)||isNaN(t)||(n=Math.max(t-e,0)),n},f.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 o=0;o<n.length;o++)r=r||-1!==i.toLowerCase().indexOf(n[o]);if(r)return!1;for(var a=0;a<e.length;a++)if(e[a]>=f.MAX_DURATION_ALLOWED)return!1;return!0},f.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",f.dataType="PageviewPerformanceData",f.MAX_DURATION_ALLOWED=36e5,f}(function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}return H(e,t),e}(ce));!function(i){function e(e,t){var n=i.call(this)||this;return n.aiDataContract={baseType:h.Required,baseData:h.Required},n.baseType=e,n.baseData=t,n}H(e,i)}(F);(oe=re||(re={}))[oe.Verbose=0]="Verbose",oe[oe.Information=1]="Information",oe[oe.Warning=2]="Warning",oe[oe.Error=3]="Error",oe[oe.Critical=4]="Critical";var ge=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]&&!l.isNullOrUndefined(e.extensionConfig[n][t])?e.extensionConfig[n][t]:e[t],l.isNullOrUndefined(r)?i:r},e}(),fe=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"},he=function(){function e(){}return e.domain="domain",e.browser="web.browser",e.browserVer="web.browserVer",e.browserLang="web.browserLang",e.userConsent="web.userConsent",e.isManual="web.isManual",e.screenRes="web.screenRes",e}(),me=function(){function e(){}return e.localId="device.localId",e.model="device.model",e.deviceType="device.class",e}(),ve=function(){function e(){}return e.sessionId="app.sesId",e}(),Ie=function(){function e(){}return e.clientIp="ingest.clientIp",e}(),ye=function(){function e(){}return e.deviceOS="os.name",e}(),we=function(){function e(){}return e.sessionIsFirst="ai.session.isFirst",e.sessionIsNew="ai.session.isNew",e.userAccountAcquisitionDate="ai.user.accountAcquisitionDate",e.userStoreRegion="ai.user.storeRegion",e.userAnonymousUserAcquisitionDate="ai.user.anonUserAcquisitionDate",e.userAuthenticatedUserAcquisitionDate="ai.user.authUserAcquisitionDate",e.cloudName="ai.cloud.name",e.cloudRole="ai.cloud.role",e.cloudRoleVer="ai.cloud.roleVer",e.cloudRoleInstance="ai.cloud.roleInstance",e.cloudEnvironment="ai.cloud.environment",e.cloudLocation="ai.cloud.location",e.cloudDeploymentUnit="ai.cloud.deploymentUnit",e.internalNodeName="ai.internal.nodeName",e.internalSdkVersion="ai.internal.sdkVersion",e.internalAgentVersion="ai.internal.agentVersion",e.deviceOEMName="ai.device.oemName",e.deviceNetwork="ai.device.network",e.applicationVersion="ai.application.ver",e.applicationBuild="ai.application.build",e.deviceLocale="ai.device.locale",e.deviceOSVersion="ai.device.osVersion",e.locationIp="ai.location.ip",e.operationId="ai.operation.id",e.operationParentId="ai.operation.parentId",e.operationRootId="ai.operation.rootId",e.operationSyntheticSource="ai.operation.syntheticSource",e}(),Se=new fe,Ne=function(){function a(){}return a.create=function(e,t,n,i,r,o){if(n=G.sanitizeString(i,n)||q.NotSpecified,l.isNullOrUndefined(e)||l.isNullOrUndefined(t)||l.isNullOrUndefined(n))throw Error("Input doesn't contain all required fields");var a={name:n,timestamp:new Date,instrumentationKey:"",ctx:o||{},tags:[],data:{},baseType:t,baseData:e};if(!l.isNullOrUndefined(r))for(var s in r)r.hasOwnProperty(s)&&(a.data[s]=r[s]);return a},a.convertoFrom=function(e,t){var n,i={};for(var r in e.data)"baseData"!==r&&"baseType"!==r&&(i[r]=e.data[r]);switch(e.data.baseType){case le.dataType:var o=e.data.baseType;n=a.create(o,le.dataType,le.envelopeType,t,i)}return a._extractPartA(e,n),n},a._extractPartA=function(t,n){var i=[];n&&t.tags&&(n.tags||(n.tags=[]),n.ctx||(n.ctx={}),t.tags[Se.applicationVersion]&&(n.tags[we.applicationVersion]=t.tags[Se.applicationVersion],i.push(Se.applicationVersion)),t.tags[Se.applicationBuild]&&(n.tags[we.applicationBuild]=t.tags[Se.applicationBuild],i.push(Se.applicationBuild)),t.tags[Se.sessionId]&&(n.ctx[ve.sessionId]=t.tags[Se.sessionId],i.push(Se.sessionId)),t.tags[Se.sessionIsFirst]&&(n.tags[Se.sessionIsFirst]=t.tags[Se.sessionIsFirst],i.push(Se.sessionIsFirst)),t.tags[Se.deviceId]&&(n.ctx[me.localId]=t.tags[Se.deviceId],i.push(Se.deviceId)),t.tags[Se.deviceIp]&&(n.ctx[Ie.clientIp]=t.tags[Se.deviceIp],i.push(Se.deviceIp)),t.tags[Se.deviceLanguage]&&(n.ctx[he.browserLang]=t.tags[Se.deviceLanguage],i.push(Se.deviceLanguage)),t.tags[Se.deviceLocale]&&(n.tags[we.deviceLocale]=t.tags[Se.deviceLocale],i.push(Se.deviceLocale)),t.tags[Se.deviceModel]&&(n.ctx[me.model]=t.tags[Se.deviceModel],i.push(Se.deviceModel)),t.tags[Se.deviceNetwork]&&(n.ctx[we.deviceNetwork]=t.tags[Se.deviceNetwork],i.push(Se.deviceNetwork)),t.tags[Se.deviceOEMName]&&(n.ctx[we.deviceOEMName]=t.tags[Se.deviceOEMName],i.push(Se.deviceOEMName)),t.tags[Se.deviceOSVersion]&&(n.tags[we.deviceOSVersion]=t.tags[Se.deviceOSVersion],i.push(Se.deviceOSVersion)),t.tags[Se.deviceOS]&&(n.ctx[ye.deviceOS]=t.tags[Se.deviceOS],i.push(Se.deviceModel)),t.tags[Se.deviceNetwork]&&(n.ctx[we.deviceNetwork]=t.tags[Se.deviceNetwork],i.push(Se.deviceNetwork)),t.tags[Se.deviceType]&&(n.ctx[me.deviceType]=t.tags[Se.deviceType],i.push(Se.deviceType)),t.tags[Se.deviceOSVersion]&&(n.tags[we.deviceOSVersion]=t.tags[Se.deviceOSVersion],i.push(Se.deviceOSVersion)),t.tags[Se.deviceScreenResolution]&&(n.tags[he.screenRes]=t.tags[Se.deviceScreenResolution],i.push(Se.deviceScreenResolution)),t.tags.sampleRate&&(n.tags.sampleRate=t.tags.sampleRate,i.push(Se.deviceScreenResolution)),t.tags[Se.locationIp]&&(n.tags[Se.locationIp]=t.tags[Se.locationIp],i.push(Se.locationIp)),t.tags[Se.internalSdkVersion]&&(n.tags[Se.internalSdkVersion]=t.tags[Se.internalSdkVersion],i.push(Se.internalSdkVersion)),t.tags[Se.internalAgentVersion]&&(n.tags[Se.internalAgentVersion]=t.tags[Se.internalAgentVersion],i.push(Se.internalAgentVersion)),t.tags[Se.operationRootId]&&(n.tags[Se.operationRootId]=t.tags[Se.operationRootId],i.push(Se.operationRootId)),t.tags[Se.operationSyntheticSource]&&(n.tags[Se.operationSyntheticSource]=t.tags[Se.operationSyntheticSource],i.push(Se.operationSyntheticSource)),t.tags[Se.operationParentId]&&(n.tags[Se.operationParentId]=t.tags[Se.operationParentId],i.push(Se.operationParentId)),t.tags[Se.operationName]&&(n.tags[Se.operationName]=t.tags[Se.operationName],i.push(Se.operationName)),t.tags[Se.operationId]&&(n.tags[Se.operationId]=t.tags[Se.operationId],i.push(Se.operationId)),Object.keys(t.tags).forEach(function(e){i.indexOf(e)<0&&(n.tags[e]=t.tags[e])}))},a}(),Te=function(){function e(e,t,n){this.pageViewPerformanceSent=!1,this.overridePageViewDuration=!1,this.overridePageViewDuration=t,this.appInsights=e,n&&(this._channel=function(){return n.getTransmissionControls()},this._logger=n.logger)}return e.prototype.trackPageView=function(t,n){var i=this,r=t.name;(l.isNullOrUndefined(r)||"string"!=typeof r)&&(t.name=window.document&&window.document.title||"");var o=t.uri;if((l.isNullOrUndefined(o)||"string"!=typeof o)&&(t.uri=window.location&&window.location.href||""),!pe.isPerformanceTimingSupported())return this.appInsights.sendPageViewInternal(t,n),this._channel().forEach(function(e){e.forEach(function(e){return e.flush(!0)})}),void this._logger.throwInternal(m.WARNING,f,"trackPageView: navigation timing API used for calculation of page duration is not supported in this browser. This page view will be collected without duration and timing info.");var a=!1,s=void 0,c=pe.getPerformanceTiming().navigationStart;s=pe.getDuration(c,+new Date),pe.shouldCollectDuration(s)||(s=void 0);var e=void 0;l.isNullOrUndefined(n)||l.isNullOrUndefined(n.duration)||(e=n.duration),!this.overridePageViewDuration&&isNaN(e)||(isNaN(e)&&(n||(n={}),n.duration=s),this.appInsights.sendPageViewInternal(t,n),this._channel().forEach(function(e){e.forEach(function(e){return e.flush(!0)})}),a=!0);n||(n={});var u=setInterval(function(){try{if(pe.isPerformanceTimingDataReady()){clearInterval(u);var e=new pe(i._logger,r,o,null);e.getIsValid()||a?(a||(n.duration=e.getDurationMs(),i.appInsights.sendPageViewInternal(t,n)),i.pageViewPerformanceSent||(i.appInsights.sendPageViewPerformanceInternal(e,n),i.pageViewPerformanceSent=!0),i._channel().forEach(function(e){e.forEach(function(e){return e.flush(!0)})})):(n.duration=s,i.appInsights.sendPageViewInternal(t,n),i._channel().forEach(function(e){e.forEach(function(e){return e.flush(!0)})}))}else 6e4<pe.getDuration(c,+new Date)&&(clearInterval(u),a||(n.duration=6e4,i.appInsights.sendPageViewInternal(t,n),i._channel().forEach(function(e){e.forEach(function(e){return e.flush(!0)})})))}catch(e){i._logger.throwInternal(m.CRITICAL,D,"trackPageView failed on page load calculation: "+q.getExceptionName(e),{exception:q.dump(e)})}},100)},e}(),_e=function(){function u(){this.identifier="ApplicationInsightsAnalytics",this.priority=160,this._isInitialized=!1,this._trackAjaxAttempts=0,this.initialize=this._initialize.bind(this)}return u.getDefaultConfig=function(e){return e||(e={}),e.sessionRenewalMs=18e5,e.sessionExpirationMs=864e5,e.disableExceptionTracking=q.stringToBoolOrDefault(e.disableExceptionTracking),e.autoTrackPageVisitTime=q.stringToBoolOrDefault(e.autoTrackPageVisitTime),(isNaN(e.samplingPercentage)||e.samplingPercentage<=0||100<=e.samplingPercentage)&&(e.samplingPercentage=100),e.isCookieUseDisabled=q.stringToBoolOrDefault(e.isCookieUseDisabled),e.isStorageUseDisabled=q.stringToBoolOrDefault(e.isStorageUseDisabled),e.isBrowserLinkTrackingEnabled=q.stringToBoolOrDefault(e.isBrowserLinkTrackingEnabled),e},u.prototype.processTelemetry=function(e){var t=!1;try{for(var n=this._telemetryInitializers.length,i=0;i<n;++i){var r=this._telemetryInitializers[i];if(r&&!1===r.apply(null,[e])){t=!0;break}}}catch(e){t=!0,this._logger.throwInternal(m.CRITICAL,L,"One of telemetry initializers failed, telemetry item will not be sent: "+q.getExceptionName(e),{exception:q.dump(e)},!0)}t||l.isNullOrUndefined(this._nextPlugin)||this._nextPlugin.processTelemetry(e)},u.prototype.setNextPlugin=function(e){this._nextPlugin=e},u.prototype.trackEvent=function(e,t){try{var n=Ne.create(e,J.dataType,J.envelopeType,this._logger,t);this._setTelemetryNameAndIKey(n),this.core.track(n)}catch(e){this._logger.throwInternal(m.WARNING,k,"trackTrace failed, trace will not be collected: "+q.getExceptionName(e),{exception:q.dump(e)})}},u.prototype.startTrackEvent=function(e){try{this._eventTracking.start(e)}catch(e){this._logger.throwInternal(m.CRITICAL,y,"startTrackEvent failed, event will not be collected: "+q.getExceptionName(e),{exception:q.dump(e)})}},u.prototype.stopTrackEvent=function(e,t,n){try{this._eventTracking.stop(e,void 0,t)}catch(e){this._logger.throwInternal(m.CRITICAL,w,"stopTrackEvent failed, event will not be collected: "+q.getExceptionName(e),{exception:q.dump(e)})}},u.prototype.trackTrace=function(e,t){try{var n=Ne.create(e,de.dataType,de.envelopeType,this._logger,t);this._setTelemetryNameAndIKey(n),this.core.track(n)}catch(e){this._logger.throwInternal(m.WARNING,k,"trackTrace failed, trace will not be collected: "+q.getExceptionName(e),{exception:q.dump(e)})}},u.prototype.trackMetric=function(e,t){try{var n=Ne.create(e,se.dataType,se.envelopeType,this._logger,t);this._setTelemetryNameAndIKey(n),this.core.track(n)}catch(e){this._logger.throwInternal(m.CRITICAL,_,"trackMetric failed, metric will not be collected: "+q.getExceptionName(e),{exception:q.dump(e)})}},u.prototype.trackPageView=function(e,t){try{this._pageViewManager.trackPageView(e,t),this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(e.name,e.uri)}catch(e){this._logger.throwInternal(m.CRITICAL,E,"trackPageView failed, page view will not be collected: "+q.getExceptionName(e),{exception:q.dump(e)})}},u.prototype.sendPageViewInternal=function(e,t,n){var i=Ne.create(e,ue.dataType,ue.envelopeType,this._logger,t,n);this._setTelemetryNameAndIKey(i),this.core.track(i),this._trackAjaxAttempts=0},u.prototype.sendPageViewPerformanceInternal=function(e,t){var n=Ne.create(e,pe.dataType,pe.envelopeType,this._logger,t);this._setTelemetryNameAndIKey(n),this.core.track(n)},u.prototype.trackPageViewPerformance=function(e,t){var n=new pe(this.core.logger,e.name,e.url,void 0);this.sendPageViewPerformanceInternal(n,t)},u.prototype.startTrackPage=function(e){try{"string"!=typeof e&&(e=window.document&&window.document.title||""),this._pageTracking.start(e)}catch(e){this._logger.throwInternal(m.CRITICAL,S,"startTrackPage failed, page view may not be collected: "+q.getExceptionName(e),{exception:q.dump(e)})}},u.prototype.stopTrackPage=function(e,t,n){try{"string"!=typeof e&&(e=window.document&&window.document.title||""),"string"!=typeof t&&(t=window.location&&window.location.href||""),this._pageTracking.stop(e,t,n),this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(e,t)}catch(e){this._logger.throwInternal(m.CRITICAL,N,"stopTrackPage failed, page view will not be collected: "+q.getExceptionName(e),{exception:q.dump(e)})}},u.prototype.trackException=function(e,t){try{var n=Ne.create(e,ee.dataType,ee.envelopeType,this._logger,t);this._setTelemetryNameAndIKey(n),this.core.track(n)}catch(e){this._logger.throwInternal(m.CRITICAL,T,"trackException failed, exception will not be collected: "+q.getExceptionName(e),{exception:q.dump(e)})}},u.prototype._onerror=function(t){try{var e={url:t&&t.url||document.URL,lineNumber:t.lineNumber,columnNumber:t.columnNumber,message:t.message};if(q.isCrossOriginError(t.message,t.url,t.lineNumber,t.columnNumber,t.error))this._sendCORSException(e.url);else{if(!q.isError(t.error)){var n="window.onerror@"+e.url+":"+t.lineNumber+":"+(t.columnNumber||0);t.error=new Error(t.message),t.error.stack=n}this.trackException({error:t.error,severityLevel:re.Error},e)}}catch(e){var i=t.error?t.error.name+", "+t.error.message:"null";this._logger.throwInternal(m.CRITICAL,s,"_onError threw exception while logging error, error will not be collected: "+q.getExceptionName(e),{exception:q.dump(e),errorString:i})}},u.prototype.addTelemetryInitializer=function(e){this._telemetryInitializers.push(e)},u.prototype._initialize=function(e,t,n){var o=this;if(!this._isInitialized){if(l.isNullOrUndefined(t))throw Error("Error initializing");this.core=t,this._logger=t.logger,this._globalconfig={instrumentationKey:e.instrumentationKey,endpointUrl:e.endpointUrl||"https://dc.services.visualstudio.com/v2/track"},this.config=e.extensionConfig&&e.extensionConfig[this.identifier]?e.extensionConfig[this.identifier]:{};var i=u.getDefaultConfig();if(void 0!==i){for(var r in i)this.config[r]=ge.getConfig(e,r,this.identifier,i[r]);if(this._globalconfig)for(var r in i)void 0===this._globalconfig[r]&&(this._globalconfig[r]=i[r])}this.config.isCookieUseDisabled&&q.disableCookies(),this.config.isStorageUseDisabled&&q.disableStorage();var a={instrumentationKey:function(){return e.instrumentationKey},accountId:function(){return o.config.accountId||e.accountId},sessionRenewalMs:function(){return o.config.sessionRenewalMs||e.sessionRenewalMs},sessionExpirationMs:function(){return o.config.sessionExpirationMs||e.sessionExpirationMs},sampleRate:function(){return o.config.samplingPercentage||e.samplingPercentage},cookieDomain:function(){return o.config.cookieDomain||e.cookieDomain},sdkExtension:function(){return o.config.sdkExtension||e.sdkExtension},isBrowserLinkTrackingEnabled:function(){return o.config.isBrowserLinkTrackingEnabled||e.isBrowserLinkTrackingEnabled},appId:function(){return o.config.appId||e.appId}};if(this._pageViewManager=new Te(this,this.config.overridePageViewDuration,this.core),this._telemetryInitializers=[],this._addDefaultTelemetryInitializers(a),this._eventTracking=new Ee(this._logger,"trackEvent"),this._eventTracking.action=function(e,t,n,i,r){r||(r={}),r.duration=n,o.trackEvent({name:e})},this._pageTracking=new Ee(this._logger,"trackPageView"),!(this._pageTracking.action=function(e,t,n,i){var r={name:e,uri:t};l.isNullOrUndefined(i)&&(i={}),i.duration=n,o.sendPageViewInternal(r,i)})===this.config.disableExceptionTracking&&!this.config.autoExceptionInstrumented){var s=window.onerror,c=this;window.onerror=function(e,t,n,i,r){var o=s&&s(e,t,n,i,r);return!0!==o&&c._onerror({message:e,url:t,lineNumber:n,columnNumber:i,error:r}),o},this.config.autoExceptionInstrumented=!0}this._isInitialized=!0}},u.prototype._addDefaultTelemetryInitializers=function(e){if(!e.isBrowserLinkTrackingEnabled()){var i=["/browserLinkSignalR/","/__browserLink/"];this._addTelemetryInitializer(function(e){if(e.baseType===le.dataType){var t=e.baseData;if(t)for(var n=0;n<i.length;n++)if(t.absoluteUrl&&0<=t.absoluteUrl.indexOf(i[n]))return!1}return!0})}},u.prototype._addTelemetryInitializer=function(e){this._telemetryInitializers.push(e)},u.prototype._sendCORSException=function(e){var t={message:"Script error: The browser's same-origin policy prevents us from getting the details of this exception. Consider using the 'crossorigin' attribute.",url:e,lineNumber:0,columnNumber:0,error:void 0},n=Ne.create(t,ee.dataType,ee.envelopeType,this._logger,{url:e});this.core.track(n)},u.prototype._setTelemetryNameAndIKey=function(e){e.instrumentationKey=this._globalconfig.instrumentationKey;var t=this._globalconfig.instrumentationKey.replace(/-/g,"");e.name=e.name.replace("{0}",t)},u.Version="2.0.1-beta",u}(),Ee=function(){function e(e,t){this._name=t,this._events={},this._logger=e}return e.prototype.start=function(e){void 0!==this._events[e]&&this._logger.throwInternal(m.WARNING,M,"start was called more than once for this event without calling stop.",{name:this._name,key:e},!0),this._events[e]=+new Date},e.prototype.stop=function(e,t,n){var i=this._events[e];if(isNaN(i))this._logger.throwInternal(m.WARNING,P,"stop was called without a corresponding start.",{name:this._name,key:e},!0);else{var r=+new Date,o=pe.getDuration(i,r);this.action(e,t,o,n)}delete this._events[e],this._events[e]=void 0},e}();e.ApplicationInsights=_e,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).aianalytics={})}(this,function(e){"use strict";var r,t,h,n;(t=r||(r={}))[t.LocalStorage=0]="LocalStorage",t[t.SessionStorage=1]="SessionStorage",(n=h||(h={}))[n.Default=0]="Default",n[n.Required=1]="Required",n[n.Array=2]="Array",n[n.Hidden=4]="Hidden";var m,i,l=function(){function e(){}return e.isNullOrUndefined=function(e){return null==e},e.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(o,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},e}(),o=/[xy]/g;(i=m||(m={}))[i.CRITICAL=1]="CRITICAL",i[i.WARNING=2]="WARNING";var a=1,c=2,u=3,d=4,p=5,g=6,v=8,I=10,s=11,f=25,y=29,w=30,S=31,N=32,T=35,_=36,E=37,D=38,k=39,A=45,x=52,b=56,R=57,C=61,M=62,P=63,L=64,U=66,O=68,V=69,z=(function(){function e(){this.identifier="ChannelControllerPlugin",this.priority=z}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 o=this;if(this.channelQueue=new Array,n.channels)n.channels.forEach(function(e){if(e&&0<e.length){(e=e.sort(function(e,t){return e.priority-t.priority})).forEach(function(e){return e.initialize(n,i,r)});for(var t=1;t<e.length;t++)e[t-1].setNextPlugin(e[t]);o.channelQueue.push(e)}});else{for(var e=new Array,t=0;t<r.length;t++){var a=r[t];a.priority>z&&e.push(a)}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)}}}}(),200),G=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 o=0,a=r;void 0!==n[a];)o++,a=r.substring(0,s.MAX_NAME_LENGTH-3)+s.padNumber(o);r=a}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(m.WARNING,R,"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(m.WARNING,C,"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,U)},s.sanitizeMessage=function(e,t){return t&&t.length>s.MAX_MESSAGE_LENGTH&&(t=t.substring(0,s.MAX_MESSAGE_LENGTH),e.throwInternal(m.WARNING,b,"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(m.WARNING,x,"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,V).toString():t},s.sanitizeInput=function(e,t,n,i){return t&&(t=s.trim(t)).length>n&&(t=t.substring(0,n),e.throwInternal(m.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}(),q=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(m.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(m.WARNING,u,"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(m.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 n=s._getSessionStorageObject();if(null!==n)try{return n.getItem(e)}catch(e){s._canUseSessionStorage=!1,t.throwInternal(m.WARNING,c,"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(m.WARNING,d,"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(m.WARNING,g,"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(m.WARNING,O,"Cannot access document.cookie - "+s.getExceptionName(e),{exception:s.dump(e)})}}return s._canUseCookies},s.setCookie=function(e,t,n,i){var r="",o="";i&&(r=";domain="+i),s.document.location&&"https:"===s.document.location.protocol&&(o=";secure"),s.canUseCookies(e)&&(s.document.cookie=t+"="+n+r+";path=/"+o)},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(";"),o=0;o<r.length;o++){var a=r[o];if((a=s.trim(a))&&0===a.indexOf(i)){n=a.substring(i.length,r[o].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,o=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<o?o+".":"")+(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}(),B=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}(),j=function(){function e(){}return e.ParseDependencyPath=function(e,t,n,i){var r,o;if(t&&0<t.length){var a=B.parseUrl(t);if(r=a.host,null!=a.pathname)"/"!==(i=0===a.pathname.length?"/":a.pathname).charAt(0)&&(i="/"+i),o=G.sanitizeString(e,n?n+" "+i:i);else o=G.sanitizeString(e,t)}else o=r=i;return{target:r,name:o}},e}(),X=(function(){function e(){}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||l.isNullOrUndefined(e)||l.isNullOrUndefined(t)||(n=t-e),n}}(),function(e,t){return(X=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 H(e,t){function n(){this.constructor=e}X(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var W,K,F=function(e){function t(){return e.call(this)||this}return H(t,e),t}(function(){}),Q=(function(r){function e(e,t,n){var i=r.call(this)||this;return i.name=G.sanitizeString(e,n)||q.NotSpecified,i.data=t,i.time=q.toISOStringForIE8(new Date),i.aiDataContract={time:h.Required,iKey:h.Required,name:h.Required,sampleRate:function(){return 100==i.sampleRate?h.Hidden:h.Required},tags:h.Required,data:h.Required},i}H(e,r)}(function(){this.ver=1,this.sampleRate=100,this.tags={}}),function(){}),Y=function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}return H(e,t),e}(Q),J=function(o){function e(e,t,n,i){var r=o.call(this)||this;return r.aiDataContract={ver:h.Required,name:h.Required,properties:h.Default,measurements:h.Default},r.name=G.sanitizeString(e,t)||q.NotSpecified,r.properties=G.sanitizeProperties(e,n),r.measurements=G.sanitizeMeasurements(e,i),r}return H(e,o),e.envelopeType="Microsoft.ApplicationInsights.{0}.Event",e.dataType="EventData",e}(Y),$=function(){},Z=function(){this.hasFullStack=!0,this.parsedStack=[]},ee=function(a){function e(e,t,n,i,r){var o=a.call(this)||this;return o.aiDataContract={ver:h.Required,exceptions:h.Required,severityLevel:h.Default,properties:h.Default,measurements:h.Default},o.properties=G.sanitizeProperties(e,n),o.measurements=G.sanitizeMeasurements(e,i),o.exceptions=[new te(e,t)],r&&(o.severityLevel=r),o}return H(e,a),e.CreateSimpleException=function(e,t,n,i,r,o){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 H(e,t),e}(Q)),te=function(r){function e(e,t){var n=r.call(this)||this;n.aiDataContract={id:h.Default,outerId:h.Default,typeName:h.Required,message:h.Required,hasFullStack:h.Default,stack:h.Default,parsedStack:h.Array},n.typeName=G.sanitizeString(e,t.name)||q.NotSpecified,n.message=G.sanitizeMessage(e,t.message)||q.NotSpecified;var i=t.stack;return n.parsedStack=n.parseStack(i),n.stack=G.sanitizeException(e,i),n.hasFullStack=q.isArray(n.parsedStack)&&0<n.parsedStack.length,n}return H(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,o=0;o<=n.length;o++){var a=n[o];if(ne.regex.test(a)){var s=new ne(n[o],i++);r+=s.sizeInBytes,t.push(s)}}if(32768<r)for(var c=0,u=t.length-1,l=0,d=c,p=u;c<u;){if(32768<(l+=t[c].sizeInBytes+t[u].sizeInBytes)){var g=p-d+1;t.splice(d,g);break}d=c,p=u,c++,u--}}return t},e}(Z),ne=function(r){function o(e,t){var n=r.call(this)||this;n.sizeInBytes=0,n.aiDataContract={level:h.Required,method:h.Required,assembly:h.Default,fileName:h.Default,line:h.Default},n.level=t,n.method="<no_method>",n.assembly=q.trim(e);var i=e.match(o.regex);return i&&5<=i.length&&(n.method=q.trim(i[2])||n.method,n.fileName=q.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+=o.baseSize,n.sizeInBytes+=n.level.toString().length,n.sizeInBytes+=n.line.toString().length,n}return H(o,r),o.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,o.baseSize=58,o}($),ie=function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.metrics=[],e.properties={},e}return H(e,t),e}(Q);(K=W||(W={}))[K.Measurement=0]="Measurement",K[K.Aggregation=1]="Aggregation";var re,oe,ae=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.aiDataContract={name:h.Required,kind:h.Default,value:h.Required,count:h.Default,min:h.Default,max:h.Default,stdDev:h.Default},e}return H(e,t),e}(function(){this.kind=W.Measurement}),se=function(u){function e(e,t,n,i,r,o,a){var s=u.call(this)||this;s.aiDataContract={ver:h.Required,metrics:h.Required,properties:h.Default};var c=new ae;return c.count=0<i?i:void 0,c.max=isNaN(o)||null===o?void 0:o,c.min=isNaN(r)||null===r?void 0:r,c.name=G.sanitizeString(e,t)||q.NotSpecified,c.value=n,s.metrics=[c],s.properties=G.sanitizeProperties(e,a),s}return H(e,u),e.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",e.dataType="MetricData",e}(ie),ce=function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}return H(e,t),e}(Y),ue=function(c){function e(e,t,n,i,r,o,a){var s=c.call(this)||this;return s.aiDataContract={ver:h.Required,name:h.Default,url:h.Default,duration:h.Default,properties:h.Default,measurements:h.Default,id:h.Default},s.id=G.sanitizeId(e,a),s.url=G.sanitizeUrl(e,n),s.name=G.sanitizeString(e,t)||q.NotSpecified,isNaN(i)||(s.duration=q.msToTimeSpan(i)),s.properties=G.sanitizeProperties(e,r),s.measurements=G.sanitizeMeasurements(e,o),s}return H(e,c),e.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",e.dataType="PageviewData",e}(ce),le=function(p){function e(e,t,n,i,r,o,a,s,c,u){var l=p.call(this)||this;l.aiDataContract={id:h.Required,ver:h.Required,name:h.Default,resultCode:h.Default,duration:h.Default,success:h.Default,data:h.Default,target:h.Default,type:h.Default,properties:h.Default,measurements:h.Default,kind:h.Default,value:h.Default,count:h.Default,min:h.Default,max:h.Default,stdDev:h.Default,dependencyKind:h.Default,dependencySource:h.Default,commandName:h.Default,dependencyTypeName:h.Default},l.id=t,l.duration=q.msToTimeSpan(r),l.success=o,l.resultCode=a+"",l.type="Ajax",l.data=G.sanitizeUrl(e,i);var d=j.ParseDependencyPath(e,n,s,i);return l.target=d.target,l.name=d.name,l.properties=G.sanitizeProperties(e,c),l.measurements=G.sanitizeMeasurements(e,u),l}return H(e,p),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 H(e,t),e}(Q)),de=function(o){function e(e,t,n,i){var r=o.call(this)||this;return r.aiDataContract={ver:h.Required,message:h.Required,severityLevel:h.Default,properties:h.Default},t=t||q.NotSpecified,r.message=G.sanitizeMessage(e,t),r.properties=G.sanitizeProperties(e,i),n&&(r.severityLevel=n),r}return H(e,o),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 H(e,t),e}(Q)),pe=function(g){function f(e,t,n,i,r,o){var a=g.call(this)||this;a.aiDataContract={ver:h.Required,name:h.Default,url:h.Default,duration:h.Default,perfTotal:h.Default,networkConnect:h.Default,sentRequest:h.Default,receivedResponse:h.Default,domProcessing:h.Default,properties:h.Default,measurements:h.Default},a.isValid=!1;var s=f.getPerformanceTiming();if(s){var c=f.getDuration(s.navigationStart,s.loadEventEnd),u=f.getDuration(s.navigationStart,s.connectEnd),l=f.getDuration(s.requestStart,s.responseStart),d=f.getDuration(s.responseStart,s.responseEnd),p=f.getDuration(s.responseEnd,s.loadEventEnd);0==c?e.throwInternal(m.WARNING,I,"error calculating page view performance.",{total:c,network:u,request:l,response:d,dom:p}):f.shouldCollectDuration(c,u,l,d,p)?c<Math.floor(u)+Math.floor(l)+Math.floor(d)+Math.floor(p)?e.throwInternal(m.WARNING,v,"client performance math error.",{total:c,network:u,request:l,response:d,dom:p}):(a.durationMs=c,a.perfTotal=a.duration=q.msToTimeSpan(c),a.networkConnect=q.msToTimeSpan(u),a.sentRequest=q.msToTimeSpan(l),a.receivedResponse=q.msToTimeSpan(d),a.domProcessing=q.msToTimeSpan(p),a.isValid=!0):e.throwInternal(m.WARNING,A,"Invalid page load duration value. Browser perf data won't be sent.",{total:c,network:u,request:l,response:d,dom:p})}return a.url=G.sanitizeUrl(e,n),a.name=G.sanitizeString(e,t)||q.NotSpecified,a.properties=G.sanitizeProperties(e,r),a.measurements=G.sanitizeMeasurements(e,o),a}return H(f,g),f.prototype.getIsValid=function(){return this.isValid},f.prototype.getDurationMs=function(){return this.durationMs},f.getPerformanceTiming=function(){return f.isPerformanceTimingSupported()?window.performance.timing:null},f.isPerformanceTimingSupported=function(){return"undefined"!=typeof window&&window.performance&&window.performance.timing},f.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},f.getDuration=function(e,t){var n=void 0;return isNaN(e)||isNaN(t)||(n=Math.max(t-e,0)),n},f.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 o=0;o<n.length;o++)r=r||-1!==i.toLowerCase().indexOf(n[o]);if(r)return!1;for(var a=0;a<e.length;a++)if(e[a]>=f.MAX_DURATION_ALLOWED)return!1;return!0},f.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",f.dataType="PageviewPerformanceData",f.MAX_DURATION_ALLOWED=36e5,f}(function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}return H(e,t),e}(ce));!function(i){function e(e,t){var n=i.call(this)||this;return n.aiDataContract={baseType:h.Required,baseData:h.Required},n.baseType=e,n.baseData=t,n}H(e,i)}(F);(oe=re||(re={}))[oe.Verbose=0]="Verbose",oe[oe.Information=1]="Information",oe[oe.Warning=2]="Warning",oe[oe.Error=3]="Error",oe[oe.Critical=4]="Critical";var ge=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]&&!l.isNullOrUndefined(e.extensionConfig[n][t])?e.extensionConfig[n][t]:e[t],l.isNullOrUndefined(r)?i:r},e}(),fe=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"},he=function(){function e(){}return e.domain="domain",e.browser="web.browser",e.browserVer="web.browserVer",e.browserLang="web.browserLang",e.userConsent="web.userConsent",e.isManual="web.isManual",e.screenRes="web.screenRes",e}(),me=function(){function e(){}return e.localId="device.localId",e.model="device.model",e.deviceType="device.class",e}(),ve=function(){function e(){}return e.sessionId="app.sesId",e}(),Ie=function(){function e(){}return e.clientIp="ingest.clientIp",e}(),ye=function(){function e(){}return e.deviceOS="os.name",e}(),we=function(){function e(){}return e.sessionIsFirst="ai.session.isFirst",e.sessionIsNew="ai.session.isNew",e.userAccountAcquisitionDate="ai.user.accountAcquisitionDate",e.userStoreRegion="ai.user.storeRegion",e.userAnonymousUserAcquisitionDate="ai.user.anonUserAcquisitionDate",e.userAuthenticatedUserAcquisitionDate="ai.user.authUserAcquisitionDate",e.cloudName="ai.cloud.name",e.cloudRole="ai.cloud.role",e.cloudRoleVer="ai.cloud.roleVer",e.cloudRoleInstance="ai.cloud.roleInstance",e.cloudEnvironment="ai.cloud.environment",e.cloudLocation="ai.cloud.location",e.cloudDeploymentUnit="ai.cloud.deploymentUnit",e.internalNodeName="ai.internal.nodeName",e.internalSdkVersion="ai.internal.sdkVersion",e.internalAgentVersion="ai.internal.agentVersion",e.deviceOEMName="ai.device.oemName",e.deviceNetwork="ai.device.network",e.applicationVersion="ai.application.ver",e.applicationBuild="ai.application.build",e.deviceLocale="ai.device.locale",e.deviceOSVersion="ai.device.osVersion",e.locationIp="ai.location.ip",e.operationId="ai.operation.id",e.operationParentId="ai.operation.parentId",e.operationRootId="ai.operation.rootId",e.operationSyntheticSource="ai.operation.syntheticSource",e}(),Se=new fe,Ne=function(){function a(){}return a.create=function(e,t,n,i,r,o){if(n=G.sanitizeString(i,n)||q.NotSpecified,l.isNullOrUndefined(e)||l.isNullOrUndefined(t)||l.isNullOrUndefined(n))throw Error("Input doesn't contain all required fields");var a={name:n,time:(new Date).toISOString(),iKey:"",ctx:o||{},tags:[],data:{},baseType:t,baseData:e};if(!l.isNullOrUndefined(r))for(var s in r)r.hasOwnProperty(s)&&(a.data[s]=r[s]);return a},a.convertoFrom=function(e,t){var n,i={};for(var r in e.data)"baseData"!==r&&"baseType"!==r&&(i[r]=e.data[r]);switch(e.data.baseType){case le.dataType:var o=e.data.baseType;n=a.create(o,le.dataType,le.envelopeType,t,i)}return a._extractPartA(e,n),n},a._extractPartA=function(t,n){var i=[];n&&t.tags&&(n.tags||(n.tags=[]),n.ctx||(n.ctx={}),t.tags[Se.applicationVersion]&&(n.tags[we.applicationVersion]=t.tags[Se.applicationVersion],i.push(Se.applicationVersion)),t.tags[Se.applicationBuild]&&(n.tags[we.applicationBuild]=t.tags[Se.applicationBuild],i.push(Se.applicationBuild)),t.tags[Se.sessionId]&&(n.ctx[ve.sessionId]=t.tags[Se.sessionId],i.push(Se.sessionId)),t.tags[Se.sessionIsFirst]&&(n.tags[Se.sessionIsFirst]=t.tags[Se.sessionIsFirst],i.push(Se.sessionIsFirst)),t.tags[Se.deviceId]&&(n.ctx[me.localId]=t.tags[Se.deviceId],i.push(Se.deviceId)),t.tags[Se.deviceIp]&&(n.ctx[Ie.clientIp]=t.tags[Se.deviceIp],i.push(Se.deviceIp)),t.tags[Se.deviceLanguage]&&(n.ctx[he.browserLang]=t.tags[Se.deviceLanguage],i.push(Se.deviceLanguage)),t.tags[Se.deviceLocale]&&(n.tags[we.deviceLocale]=t.tags[Se.deviceLocale],i.push(Se.deviceLocale)),t.tags[Se.deviceModel]&&(n.ctx[me.model]=t.tags[Se.deviceModel],i.push(Se.deviceModel)),t.tags[Se.deviceNetwork]&&(n.ctx[we.deviceNetwork]=t.tags[Se.deviceNetwork],i.push(Se.deviceNetwork)),t.tags[Se.deviceOEMName]&&(n.ctx[we.deviceOEMName]=t.tags[Se.deviceOEMName],i.push(Se.deviceOEMName)),t.tags[Se.deviceOSVersion]&&(n.tags[we.deviceOSVersion]=t.tags[Se.deviceOSVersion],i.push(Se.deviceOSVersion)),t.tags[Se.deviceOS]&&(n.ctx[ye.deviceOS]=t.tags[Se.deviceOS],i.push(Se.deviceModel)),t.tags[Se.deviceNetwork]&&(n.ctx[we.deviceNetwork]=t.tags[Se.deviceNetwork],i.push(Se.deviceNetwork)),t.tags[Se.deviceType]&&(n.ctx[me.deviceType]=t.tags[Se.deviceType],i.push(Se.deviceType)),t.tags[Se.deviceOSVersion]&&(n.tags[we.deviceOSVersion]=t.tags[Se.deviceOSVersion],i.push(Se.deviceOSVersion)),t.tags[Se.deviceScreenResolution]&&(n.tags[he.screenRes]=t.tags[Se.deviceScreenResolution],i.push(Se.deviceScreenResolution)),t.tags.sampleRate&&(n.tags.sampleRate=t.tags.sampleRate,i.push(Se.deviceScreenResolution)),t.tags[Se.locationIp]&&(n.tags[Se.locationIp]=t.tags[Se.locationIp],i.push(Se.locationIp)),t.tags[Se.internalSdkVersion]&&(n.tags[Se.internalSdkVersion]=t.tags[Se.internalSdkVersion],i.push(Se.internalSdkVersion)),t.tags[Se.internalAgentVersion]&&(n.tags[Se.internalAgentVersion]=t.tags[Se.internalAgentVersion],i.push(Se.internalAgentVersion)),t.tags[Se.operationRootId]&&(n.tags[Se.operationRootId]=t.tags[Se.operationRootId],i.push(Se.operationRootId)),t.tags[Se.operationSyntheticSource]&&(n.tags[Se.operationSyntheticSource]=t.tags[Se.operationSyntheticSource],i.push(Se.operationSyntheticSource)),t.tags[Se.operationParentId]&&(n.tags[Se.operationParentId]=t.tags[Se.operationParentId],i.push(Se.operationParentId)),t.tags[Se.operationName]&&(n.tags[Se.operationName]=t.tags[Se.operationName],i.push(Se.operationName)),t.tags[Se.operationId]&&(n.tags[Se.operationId]=t.tags[Se.operationId],i.push(Se.operationId)),Object.keys(t.tags).forEach(function(e){i.indexOf(e)<0&&(n.tags[e]=t.tags[e])}))},a}(),Te=function(){function e(e,t,n){this.pageViewPerformanceSent=!1,this.overridePageViewDuration=!1,this.overridePageViewDuration=t,this.appInsights=e,n&&(this._channel=function(){return n.getTransmissionControls()},this._logger=n.logger)}return e.prototype.trackPageView=function(t,n){var i=this,r=t.name;(l.isNullOrUndefined(r)||"string"!=typeof r)&&(t.name=window.document&&window.document.title||"");var o=t.uri;if((l.isNullOrUndefined(o)||"string"!=typeof o)&&(t.uri=window.location&&window.location.href||""),!pe.isPerformanceTimingSupported())return this.appInsights.sendPageViewInternal(t,n),this._channel().forEach(function(e){e.forEach(function(e){return e.flush(!0)})}),void this._logger.throwInternal(m.WARNING,f,"trackPageView: navigation timing API used for calculation of page duration is not supported in this browser. This page view will be collected without duration and timing info.");var a=!1,s=void 0,c=pe.getPerformanceTiming().navigationStart;s=pe.getDuration(c,+new Date),pe.shouldCollectDuration(s)||(s=void 0);var e=void 0;l.isNullOrUndefined(n)||l.isNullOrUndefined(n.duration)||(e=n.duration),!this.overridePageViewDuration&&isNaN(e)||(isNaN(e)&&(n||(n={}),n.duration=s),this.appInsights.sendPageViewInternal(t,n),this._channel().forEach(function(e){e.forEach(function(e){return e.flush(!0)})}),a=!0);n||(n={});var u=setInterval(function(){try{if(pe.isPerformanceTimingDataReady()){clearInterval(u);var e=new pe(i._logger,r,o,null);e.getIsValid()||a?(a||(n.duration=e.getDurationMs(),i.appInsights.sendPageViewInternal(t,n)),i.pageViewPerformanceSent||(i.appInsights.sendPageViewPerformanceInternal(e,n),i.pageViewPerformanceSent=!0),i._channel().forEach(function(e){e.forEach(function(e){return e.flush(!0)})})):(n.duration=s,i.appInsights.sendPageViewInternal(t,n),i._channel().forEach(function(e){e.forEach(function(e){return e.flush(!0)})}))}else 6e4<pe.getDuration(c,+new Date)&&(clearInterval(u),a||(n.duration=6e4,i.appInsights.sendPageViewInternal(t,n),i._channel().forEach(function(e){e.forEach(function(e){return e.flush(!0)})})))}catch(e){i._logger.throwInternal(m.CRITICAL,D,"trackPageView failed on page load calculation: "+q.getExceptionName(e),{exception:q.dump(e)})}},100)},e}(),_e=function(){function u(){this.identifier="ApplicationInsightsAnalytics",this.priority=160,this._isInitialized=!1,this._trackAjaxAttempts=0,this.initialize=this._initialize.bind(this)}return u.getDefaultConfig=function(e){return e||(e={}),e.sessionRenewalMs=18e5,e.sessionExpirationMs=864e5,e.disableExceptionTracking=q.stringToBoolOrDefault(e.disableExceptionTracking),e.autoTrackPageVisitTime=q.stringToBoolOrDefault(e.autoTrackPageVisitTime),(isNaN(e.samplingPercentage)||e.samplingPercentage<=0||100<=e.samplingPercentage)&&(e.samplingPercentage=100),e.isCookieUseDisabled=q.stringToBoolOrDefault(e.isCookieUseDisabled),e.isStorageUseDisabled=q.stringToBoolOrDefault(e.isStorageUseDisabled),e.isBrowserLinkTrackingEnabled=q.stringToBoolOrDefault(e.isBrowserLinkTrackingEnabled),e},u.prototype.processTelemetry=function(e){var t=!1;try{for(var n=this._telemetryInitializers.length,i=0;i<n;++i){var r=this._telemetryInitializers[i];if(r&&!1===r.apply(null,[e])){t=!0;break}}}catch(e){t=!0,this._logger.throwInternal(m.CRITICAL,L,"One of telemetry initializers failed, telemetry item will not be sent: "+q.getExceptionName(e),{exception:q.dump(e)},!0)}t||l.isNullOrUndefined(this._nextPlugin)||this._nextPlugin.processTelemetry(e)},u.prototype.setNextPlugin=function(e){this._nextPlugin=e},u.prototype.trackEvent=function(e,t){try{var n=Ne.create(e,J.dataType,J.envelopeType,this._logger,t);this._setTelemetryNameAndIKey(n),this.core.track(n)}catch(e){this._logger.throwInternal(m.WARNING,k,"trackTrace failed, trace will not be collected: "+q.getExceptionName(e),{exception:q.dump(e)})}},u.prototype.startTrackEvent=function(e){try{this._eventTracking.start(e)}catch(e){this._logger.throwInternal(m.CRITICAL,y,"startTrackEvent failed, event will not be collected: "+q.getExceptionName(e),{exception:q.dump(e)})}},u.prototype.stopTrackEvent=function(e,t,n){try{this._eventTracking.stop(e,void 0,t)}catch(e){this._logger.throwInternal(m.CRITICAL,w,"stopTrackEvent failed, event will not be collected: "+q.getExceptionName(e),{exception:q.dump(e)})}},u.prototype.trackTrace=function(e,t){try{var n=Ne.create(e,de.dataType,de.envelopeType,this._logger,t);this._setTelemetryNameAndIKey(n),this.core.track(n)}catch(e){this._logger.throwInternal(m.WARNING,k,"trackTrace failed, trace will not be collected: "+q.getExceptionName(e),{exception:q.dump(e)})}},u.prototype.trackMetric=function(e,t){try{var n=Ne.create(e,se.dataType,se.envelopeType,this._logger,t);this._setTelemetryNameAndIKey(n),this.core.track(n)}catch(e){this._logger.throwInternal(m.CRITICAL,_,"trackMetric failed, metric will not be collected: "+q.getExceptionName(e),{exception:q.dump(e)})}},u.prototype.trackPageView=function(e,t){try{this._pageViewManager.trackPageView(e,t),this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(e.name,e.uri)}catch(e){this._logger.throwInternal(m.CRITICAL,E,"trackPageView failed, page view will not be collected: "+q.getExceptionName(e),{exception:q.dump(e)})}},u.prototype.sendPageViewInternal=function(e,t,n){var i=Ne.create(e,ue.dataType,ue.envelopeType,this._logger,t,n);this._setTelemetryNameAndIKey(i),this.core.track(i),this._trackAjaxAttempts=0},u.prototype.sendPageViewPerformanceInternal=function(e,t){var n=Ne.create(e,pe.dataType,pe.envelopeType,this._logger,t);this._setTelemetryNameAndIKey(n),this.core.track(n)},u.prototype.trackPageViewPerformance=function(e,t){var n=new pe(this.core.logger,e.name,e.url,void 0);this.sendPageViewPerformanceInternal(n,t)},u.prototype.startTrackPage=function(e){try{"string"!=typeof e&&(e=window.document&&window.document.title||""),this._pageTracking.start(e)}catch(e){this._logger.throwInternal(m.CRITICAL,S,"startTrackPage failed, page view may not be collected: "+q.getExceptionName(e),{exception:q.dump(e)})}},u.prototype.stopTrackPage=function(e,t,n){try{"string"!=typeof e&&(e=window.document&&window.document.title||""),"string"!=typeof t&&(t=window.location&&window.location.href||""),this._pageTracking.stop(e,t,n),this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(e,t)}catch(e){this._logger.throwInternal(m.CRITICAL,N,"stopTrackPage failed, page view will not be collected: "+q.getExceptionName(e),{exception:q.dump(e)})}},u.prototype.trackException=function(e,t){try{var n=Ne.create(e,ee.dataType,ee.envelopeType,this._logger,t);this._setTelemetryNameAndIKey(n),this.core.track(n)}catch(e){this._logger.throwInternal(m.CRITICAL,T,"trackException failed, exception will not be collected: "+q.getExceptionName(e),{exception:q.dump(e)})}},u.prototype._onerror=function(t){try{var e={url:t&&t.url||document.URL,lineNumber:t.lineNumber,columnNumber:t.columnNumber,message:t.message};if(q.isCrossOriginError(t.message,t.url,t.lineNumber,t.columnNumber,t.error))this._sendCORSException(e.url);else{if(!q.isError(t.error)){var n="window.onerror@"+e.url+":"+t.lineNumber+":"+(t.columnNumber||0);t.error=new Error(t.message),t.error.stack=n}this.trackException({error:t.error,severityLevel:re.Error},e)}}catch(e){var i=t.error?t.error.name+", "+t.error.message:"null";this._logger.throwInternal(m.CRITICAL,s,"_onError threw exception while logging error, error will not be collected: "+q.getExceptionName(e),{exception:q.dump(e),errorString:i})}},u.prototype.addTelemetryInitializer=function(e){this._telemetryInitializers.push(e)},u.prototype._initialize=function(e,t,n){var o=this;if(!this._isInitialized){if(l.isNullOrUndefined(t))throw Error("Error initializing");this.core=t,this._logger=t.logger,this._globalconfig={instrumentationKey:e.instrumentationKey,endpointUrl:e.endpointUrl||"https://dc.services.visualstudio.com/v2/track"},this.config=e.extensionConfig&&e.extensionConfig[this.identifier]?e.extensionConfig[this.identifier]:{};var i=u.getDefaultConfig();if(void 0!==i){for(var r in i)this.config[r]=ge.getConfig(e,r,this.identifier,i[r]);if(this._globalconfig)for(var r in i)void 0===this._globalconfig[r]&&(this._globalconfig[r]=i[r])}this.config.isCookieUseDisabled&&q.disableCookies(),this.config.isStorageUseDisabled&&q.disableStorage();var a={instrumentationKey:function(){return e.instrumentationKey},accountId:function(){return o.config.accountId||e.accountId},sessionRenewalMs:function(){return o.config.sessionRenewalMs||e.sessionRenewalMs},sessionExpirationMs:function(){return o.config.sessionExpirationMs||e.sessionExpirationMs},sampleRate:function(){return o.config.samplingPercentage||e.samplingPercentage},cookieDomain:function(){return o.config.cookieDomain||e.cookieDomain},sdkExtension:function(){return o.config.sdkExtension||e.sdkExtension},isBrowserLinkTrackingEnabled:function(){return o.config.isBrowserLinkTrackingEnabled||e.isBrowserLinkTrackingEnabled},appId:function(){return o.config.appId||e.appId}};if(this._pageViewManager=new Te(this,this.config.overridePageViewDuration,this.core),this._telemetryInitializers=[],this._addDefaultTelemetryInitializers(a),this._eventTracking=new Ee(this._logger,"trackEvent"),this._eventTracking.action=function(e,t,n,i,r){r||(r={}),r.duration=n,o.trackEvent({name:e})},this._pageTracking=new Ee(this._logger,"trackPageView"),!(this._pageTracking.action=function(e,t,n,i){var r={name:e,uri:t};l.isNullOrUndefined(i)&&(i={}),i.duration=n,o.sendPageViewInternal(r,i)})===this.config.disableExceptionTracking&&!this.config.autoExceptionInstrumented){var s=window.onerror,c=this;window.onerror=function(e,t,n,i,r){var o=s&&s(e,t,n,i,r);return!0!==o&&c._onerror({message:e,url:t,lineNumber:n,columnNumber:i,error:r}),o},this.config.autoExceptionInstrumented=!0}this._isInitialized=!0}},u.prototype._addDefaultTelemetryInitializers=function(e){if(!e.isBrowserLinkTrackingEnabled()){var i=["/browserLinkSignalR/","/__browserLink/"];this._addTelemetryInitializer(function(e){if(e.baseType===le.dataType){var t=e.baseData;if(t)for(var n=0;n<i.length;n++)if(t.absoluteUrl&&0<=t.absoluteUrl.indexOf(i[n]))return!1}return!0})}},u.prototype._addTelemetryInitializer=function(e){this._telemetryInitializers.push(e)},u.prototype._sendCORSException=function(e){var t={message:"Script error: The browser's same-origin policy prevents us from getting the details of this exception. Consider using the 'crossorigin' attribute.",url:e,lineNumber:0,columnNumber:0,error:void 0},n=Ne.create(t,ee.dataType,ee.envelopeType,this._logger,{url:e});this.core.track(n)},u.prototype._setTelemetryNameAndIKey=function(e){e.iKey=this._globalconfig.instrumentationKey;var t=this._globalconfig.instrumentationKey.replace(/-/g,"");e.name=e.name.replace("{0}",t)},u.Version="2.0.1-beta",u}(),Ee=function(){function e(e,t){this._name=t,this._events={},this._logger=e}return e.prototype.start=function(e){void 0!==this._events[e]&&this._logger.throwInternal(m.WARNING,M,"start was called more than once for this event without calling stop.",{name:this._name,key:e},!0),this._events[e]=+new Date},e.prototype.stop=function(e,t,n){var i=this._events[e];if(isNaN(i))this._logger.throwInternal(m.WARNING,P,"stop was called without a corresponding start.",{name:this._name,key:e},!0);else{var r=+new Date,o=pe.getDuration(i,r);this.action(e,t,o,n)}delete this._events[e],this._events[e]=void 0},e}();e.ApplicationInsights=_e,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=applicationinsights-analytics-js.min.js.map |
@@ -343,3 +343,3 @@ /** | ||
} | ||
measurements["duration"] = duration; // ToDo: fix once IEventTelemetry is updated | ||
measurements["duration"] = duration; // ToDo: fix once IEventTelemetry is updated | ||
_this.trackEvent({ name: name }); | ||
@@ -419,3 +419,3 @@ }; | ||
ApplicationInsights.prototype._setTelemetryNameAndIKey = function (telemetryItem) { | ||
telemetryItem.instrumentationKey = this._globalconfig.instrumentationKey; | ||
telemetryItem.iKey = this._globalconfig.instrumentationKey; | ||
var iKeyNoDashes = this._globalconfig.instrumentationKey.replace(/-/g, ""); | ||
@@ -422,0 +422,0 @@ telemetryItem.name = telemetryItem.name.replace("{0}", iKeyNoDashes); |
/*! | ||
* Application Insights JavaScript SDK - Web Analytics, 1.0.0-beta.11 | ||
* Application Insights JavaScript SDK - Web Analytics, 1.0.0-beta.12 | ||
* 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=e||self).aianalytics={})}(this,function(e){"use strict";var r,t,h,n;(t=r||(r={}))[t.LocalStorage=0]="LocalStorage",t[t.SessionStorage=1]="SessionStorage",(n=h||(h={}))[n.Default=0]="Default",n[n.Required=1]="Required",n[n.Array=2]="Array",n[n.Hidden=4]="Hidden";var m,i,l=function(){function e(){}return e.isNullOrUndefined=function(e){return null==e},e.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(o,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},e}(),o=/[xy]/g;(i=m||(m={}))[i.CRITICAL=1]="CRITICAL",i[i.WARNING=2]="WARNING";var a=1,c=2,u=3,d=4,p=5,g=6,v=8,I=10,s=11,f=25,y=29,w=30,S=31,N=32,T=35,_=36,E=37,D=38,k=39,A=45,x=52,b=56,R=57,C=61,M=62,P=63,L=64,U=66,O=68,V=69,z=(function(){function e(){this.identifier="ChannelControllerPlugin",this.priority=z}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 o=this;if(this.channelQueue=new Array,n.channels)n.channels.forEach(function(e){if(e&&0<e.length){(e=e.sort(function(e,t){return e.priority-t.priority})).forEach(function(e){return e.initialize(n,i,r)});for(var t=1;t<e.length;t++)e[t-1].setNextPlugin(e[t]);o.channelQueue.push(e)}});else{for(var e=new Array,t=0;t<r.length;t++){var a=r[t];a.priority>z&&e.push(a)}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)}}}}(),200),G=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 o=0,a=r;void 0!==n[a];)o++,a=r.substring(0,s.MAX_NAME_LENGTH-3)+s.padNumber(o);r=a}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(m.WARNING,R,"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(m.WARNING,C,"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,U)},s.sanitizeMessage=function(e,t){return t&&t.length>s.MAX_MESSAGE_LENGTH&&(t=t.substring(0,s.MAX_MESSAGE_LENGTH),e.throwInternal(m.WARNING,b,"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(m.WARNING,x,"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,V).toString():t},s.sanitizeInput=function(e,t,n,i){return t&&(t=s.trim(t)).length>n&&(t=t.substring(0,n),e.throwInternal(m.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}(),q=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(m.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(m.WARNING,u,"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(m.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 n=s._getSessionStorageObject();if(null!==n)try{return n.getItem(e)}catch(e){s._canUseSessionStorage=!1,t.throwInternal(m.WARNING,c,"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(m.WARNING,d,"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(m.WARNING,g,"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(m.WARNING,O,"Cannot access document.cookie - "+s.getExceptionName(e),{exception:s.dump(e)})}}return s._canUseCookies},s.setCookie=function(e,t,n,i){var r="",o="";i&&(r=";domain="+i),s.document.location&&"https:"===s.document.location.protocol&&(o=";secure"),s.canUseCookies(e)&&(s.document.cookie=t+"="+n+r+";path=/"+o)},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(";"),o=0;o<r.length;o++){var a=r[o];if((a=s.trim(a))&&0===a.indexOf(i)){n=a.substring(i.length,r[o].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,o=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<o?o+".":"")+(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}(),B=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}(),j=function(){function e(){}return e.ParseDependencyPath=function(e,t,n,i){var r,o;if(t&&0<t.length){var a=B.parseUrl(t);if(r=a.host,null!=a.pathname)"/"!==(i=0===a.pathname.length?"/":a.pathname).charAt(0)&&(i="/"+i),o=G.sanitizeString(e,n?n+" "+i:i);else o=G.sanitizeString(e,t)}else o=r=i;return{target:r,name:o}},e}(),X=(function(){function e(){}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||l.isNullOrUndefined(e)||l.isNullOrUndefined(t)||(n=t-e),n}}(),function(e,t){return(X=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 H(e,t){function n(){this.constructor=e}X(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var W,K,F=function(e){function t(){return e.call(this)||this}return H(t,e),t}(function(){}),Q=(function(r){function e(e,t,n){var i=r.call(this)||this;return i.name=G.sanitizeString(e,n)||q.NotSpecified,i.data=t,i.time=q.toISOStringForIE8(new Date),i.aiDataContract={time:h.Required,iKey:h.Required,name:h.Required,sampleRate:function(){return 100==i.sampleRate?h.Hidden:h.Required},tags:h.Required,data:h.Required},i}H(e,r)}(function(){this.ver=1,this.sampleRate=100,this.tags={}}),function(){}),Y=function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}return H(e,t),e}(Q),J=function(o){function e(e,t,n,i){var r=o.call(this)||this;return r.aiDataContract={ver:h.Required,name:h.Required,properties:h.Default,measurements:h.Default},r.name=G.sanitizeString(e,t)||q.NotSpecified,r.properties=G.sanitizeProperties(e,n),r.measurements=G.sanitizeMeasurements(e,i),r}return H(e,o),e.envelopeType="Microsoft.ApplicationInsights.{0}.Event",e.dataType="EventData",e}(Y),$=function(){},Z=function(){this.hasFullStack=!0,this.parsedStack=[]},ee=function(a){function e(e,t,n,i,r){var o=a.call(this)||this;return o.aiDataContract={ver:h.Required,exceptions:h.Required,severityLevel:h.Default,properties:h.Default,measurements:h.Default},o.properties=G.sanitizeProperties(e,n),o.measurements=G.sanitizeMeasurements(e,i),o.exceptions=[new te(e,t)],r&&(o.severityLevel=r),o}return H(e,a),e.CreateSimpleException=function(e,t,n,i,r,o){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 H(e,t),e}(Q)),te=function(r){function e(e,t){var n=r.call(this)||this;n.aiDataContract={id:h.Default,outerId:h.Default,typeName:h.Required,message:h.Required,hasFullStack:h.Default,stack:h.Default,parsedStack:h.Array},n.typeName=G.sanitizeString(e,t.name)||q.NotSpecified,n.message=G.sanitizeMessage(e,t.message)||q.NotSpecified;var i=t.stack;return n.parsedStack=n.parseStack(i),n.stack=G.sanitizeException(e,i),n.hasFullStack=q.isArray(n.parsedStack)&&0<n.parsedStack.length,n}return H(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,o=0;o<=n.length;o++){var a=n[o];if(ne.regex.test(a)){var s=new ne(n[o],i++);r+=s.sizeInBytes,t.push(s)}}if(32768<r)for(var c=0,u=t.length-1,l=0,d=c,p=u;c<u;){if(32768<(l+=t[c].sizeInBytes+t[u].sizeInBytes)){var g=p-d+1;t.splice(d,g);break}d=c,p=u,c++,u--}}return t},e}(Z),ne=function(r){function o(e,t){var n=r.call(this)||this;n.sizeInBytes=0,n.aiDataContract={level:h.Required,method:h.Required,assembly:h.Default,fileName:h.Default,line:h.Default},n.level=t,n.method="<no_method>",n.assembly=q.trim(e);var i=e.match(o.regex);return i&&5<=i.length&&(n.method=q.trim(i[2])||n.method,n.fileName=q.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+=o.baseSize,n.sizeInBytes+=n.level.toString().length,n.sizeInBytes+=n.line.toString().length,n}return H(o,r),o.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,o.baseSize=58,o}($),ie=function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.metrics=[],e.properties={},e}return H(e,t),e}(Q);(K=W||(W={}))[K.Measurement=0]="Measurement",K[K.Aggregation=1]="Aggregation";var re,oe,ae=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.aiDataContract={name:h.Required,kind:h.Default,value:h.Required,count:h.Default,min:h.Default,max:h.Default,stdDev:h.Default},e}return H(e,t),e}(function(){this.kind=W.Measurement}),se=function(u){function e(e,t,n,i,r,o,a){var s=u.call(this)||this;s.aiDataContract={ver:h.Required,metrics:h.Required,properties:h.Default};var c=new ae;return c.count=0<i?i:void 0,c.max=isNaN(o)||null===o?void 0:o,c.min=isNaN(r)||null===r?void 0:r,c.name=G.sanitizeString(e,t)||q.NotSpecified,c.value=n,s.metrics=[c],s.properties=G.sanitizeProperties(e,a),s}return H(e,u),e.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",e.dataType="MetricData",e}(ie),ce=function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}return H(e,t),e}(Y),ue=function(c){function e(e,t,n,i,r,o,a){var s=c.call(this)||this;return s.aiDataContract={ver:h.Required,name:h.Default,url:h.Default,duration:h.Default,properties:h.Default,measurements:h.Default,id:h.Default},s.id=G.sanitizeId(e,a),s.url=G.sanitizeUrl(e,n),s.name=G.sanitizeString(e,t)||q.NotSpecified,isNaN(i)||(s.duration=q.msToTimeSpan(i)),s.properties=G.sanitizeProperties(e,r),s.measurements=G.sanitizeMeasurements(e,o),s}return H(e,c),e.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",e.dataType="PageviewData",e}(ce),le=function(p){function e(e,t,n,i,r,o,a,s,c,u){var l=p.call(this)||this;l.aiDataContract={id:h.Required,ver:h.Required,name:h.Default,resultCode:h.Default,duration:h.Default,success:h.Default,data:h.Default,target:h.Default,type:h.Default,properties:h.Default,measurements:h.Default,kind:h.Default,value:h.Default,count:h.Default,min:h.Default,max:h.Default,stdDev:h.Default,dependencyKind:h.Default,dependencySource:h.Default,commandName:h.Default,dependencyTypeName:h.Default},l.id=t,l.duration=q.msToTimeSpan(r),l.success=o,l.resultCode=a+"",l.type="Ajax",l.data=G.sanitizeUrl(e,i);var d=j.ParseDependencyPath(e,n,s,i);return l.target=d.target,l.name=d.name,l.properties=G.sanitizeProperties(e,c),l.measurements=G.sanitizeMeasurements(e,u),l}return H(e,p),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 H(e,t),e}(Q)),de=function(o){function e(e,t,n,i){var r=o.call(this)||this;return r.aiDataContract={ver:h.Required,message:h.Required,severityLevel:h.Default,properties:h.Default},t=t||q.NotSpecified,r.message=G.sanitizeMessage(e,t),r.properties=G.sanitizeProperties(e,i),n&&(r.severityLevel=n),r}return H(e,o),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 H(e,t),e}(Q)),pe=function(g){function f(e,t,n,i,r,o){var a=g.call(this)||this;a.aiDataContract={ver:h.Required,name:h.Default,url:h.Default,duration:h.Default,perfTotal:h.Default,networkConnect:h.Default,sentRequest:h.Default,receivedResponse:h.Default,domProcessing:h.Default,properties:h.Default,measurements:h.Default},a.isValid=!1;var s=f.getPerformanceTiming();if(s){var c=f.getDuration(s.navigationStart,s.loadEventEnd),u=f.getDuration(s.navigationStart,s.connectEnd),l=f.getDuration(s.requestStart,s.responseStart),d=f.getDuration(s.responseStart,s.responseEnd),p=f.getDuration(s.responseEnd,s.loadEventEnd);0==c?e.throwInternal(m.WARNING,I,"error calculating page view performance.",{total:c,network:u,request:l,response:d,dom:p}):f.shouldCollectDuration(c,u,l,d,p)?c<Math.floor(u)+Math.floor(l)+Math.floor(d)+Math.floor(p)?e.throwInternal(m.WARNING,v,"client performance math error.",{total:c,network:u,request:l,response:d,dom:p}):(a.durationMs=c,a.perfTotal=a.duration=q.msToTimeSpan(c),a.networkConnect=q.msToTimeSpan(u),a.sentRequest=q.msToTimeSpan(l),a.receivedResponse=q.msToTimeSpan(d),a.domProcessing=q.msToTimeSpan(p),a.isValid=!0):e.throwInternal(m.WARNING,A,"Invalid page load duration value. Browser perf data won't be sent.",{total:c,network:u,request:l,response:d,dom:p})}return a.url=G.sanitizeUrl(e,n),a.name=G.sanitizeString(e,t)||q.NotSpecified,a.properties=G.sanitizeProperties(e,r),a.measurements=G.sanitizeMeasurements(e,o),a}return H(f,g),f.prototype.getIsValid=function(){return this.isValid},f.prototype.getDurationMs=function(){return this.durationMs},f.getPerformanceTiming=function(){return f.isPerformanceTimingSupported()?window.performance.timing:null},f.isPerformanceTimingSupported=function(){return"undefined"!=typeof window&&window.performance&&window.performance.timing},f.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},f.getDuration=function(e,t){var n=void 0;return isNaN(e)||isNaN(t)||(n=Math.max(t-e,0)),n},f.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 o=0;o<n.length;o++)r=r||-1!==i.toLowerCase().indexOf(n[o]);if(r)return!1;for(var a=0;a<e.length;a++)if(e[a]>=f.MAX_DURATION_ALLOWED)return!1;return!0},f.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",f.dataType="PageviewPerformanceData",f.MAX_DURATION_ALLOWED=36e5,f}(function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}return H(e,t),e}(ce));!function(i){function e(e,t){var n=i.call(this)||this;return n.aiDataContract={baseType:h.Required,baseData:h.Required},n.baseType=e,n.baseData=t,n}H(e,i)}(F);(oe=re||(re={}))[oe.Verbose=0]="Verbose",oe[oe.Information=1]="Information",oe[oe.Warning=2]="Warning",oe[oe.Error=3]="Error",oe[oe.Critical=4]="Critical";var ge=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]&&!l.isNullOrUndefined(e.extensionConfig[n][t])?e.extensionConfig[n][t]:e[t],l.isNullOrUndefined(r)?i:r},e}(),fe=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"},he=function(){function e(){}return e.domain="domain",e.browser="web.browser",e.browserVer="web.browserVer",e.browserLang="web.browserLang",e.userConsent="web.userConsent",e.isManual="web.isManual",e.screenRes="web.screenRes",e}(),me=function(){function e(){}return e.localId="device.localId",e.model="device.model",e.deviceType="device.class",e}(),ve=function(){function e(){}return e.sessionId="app.sesId",e}(),Ie=function(){function e(){}return e.clientIp="ingest.clientIp",e}(),ye=function(){function e(){}return e.deviceOS="os.name",e}(),we=function(){function e(){}return e.sessionIsFirst="ai.session.isFirst",e.sessionIsNew="ai.session.isNew",e.userAccountAcquisitionDate="ai.user.accountAcquisitionDate",e.userStoreRegion="ai.user.storeRegion",e.userAnonymousUserAcquisitionDate="ai.user.anonUserAcquisitionDate",e.userAuthenticatedUserAcquisitionDate="ai.user.authUserAcquisitionDate",e.cloudName="ai.cloud.name",e.cloudRole="ai.cloud.role",e.cloudRoleVer="ai.cloud.roleVer",e.cloudRoleInstance="ai.cloud.roleInstance",e.cloudEnvironment="ai.cloud.environment",e.cloudLocation="ai.cloud.location",e.cloudDeploymentUnit="ai.cloud.deploymentUnit",e.internalNodeName="ai.internal.nodeName",e.internalSdkVersion="ai.internal.sdkVersion",e.internalAgentVersion="ai.internal.agentVersion",e.deviceOEMName="ai.device.oemName",e.deviceNetwork="ai.device.network",e.applicationVersion="ai.application.ver",e.applicationBuild="ai.application.build",e.deviceLocale="ai.device.locale",e.deviceOSVersion="ai.device.osVersion",e.locationIp="ai.location.ip",e.operationId="ai.operation.id",e.operationParentId="ai.operation.parentId",e.operationRootId="ai.operation.rootId",e.operationSyntheticSource="ai.operation.syntheticSource",e}(),Se=new fe,Ne=function(){function a(){}return a.create=function(e,t,n,i,r,o){if(n=G.sanitizeString(i,n)||q.NotSpecified,l.isNullOrUndefined(e)||l.isNullOrUndefined(t)||l.isNullOrUndefined(n))throw Error("Input doesn't contain all required fields");var a={name:n,timestamp:new Date,instrumentationKey:"",ctx:o||{},tags:[],data:{},baseType:t,baseData:e};if(!l.isNullOrUndefined(r))for(var s in r)r.hasOwnProperty(s)&&(a.data[s]=r[s]);return a},a.convertoFrom=function(e,t){var n,i={};for(var r in e.data)"baseData"!==r&&"baseType"!==r&&(i[r]=e.data[r]);switch(e.data.baseType){case le.dataType:var o=e.data.baseType;n=a.create(o,le.dataType,le.envelopeType,t,i)}return a._extractPartA(e,n),n},a._extractPartA=function(t,n){var i=[];n&&t.tags&&(n.tags||(n.tags=[]),n.ctx||(n.ctx={}),t.tags[Se.applicationVersion]&&(n.tags[we.applicationVersion]=t.tags[Se.applicationVersion],i.push(Se.applicationVersion)),t.tags[Se.applicationBuild]&&(n.tags[we.applicationBuild]=t.tags[Se.applicationBuild],i.push(Se.applicationBuild)),t.tags[Se.sessionId]&&(n.ctx[ve.sessionId]=t.tags[Se.sessionId],i.push(Se.sessionId)),t.tags[Se.sessionIsFirst]&&(n.tags[Se.sessionIsFirst]=t.tags[Se.sessionIsFirst],i.push(Se.sessionIsFirst)),t.tags[Se.deviceId]&&(n.ctx[me.localId]=t.tags[Se.deviceId],i.push(Se.deviceId)),t.tags[Se.deviceIp]&&(n.ctx[Ie.clientIp]=t.tags[Se.deviceIp],i.push(Se.deviceIp)),t.tags[Se.deviceLanguage]&&(n.ctx[he.browserLang]=t.tags[Se.deviceLanguage],i.push(Se.deviceLanguage)),t.tags[Se.deviceLocale]&&(n.tags[we.deviceLocale]=t.tags[Se.deviceLocale],i.push(Se.deviceLocale)),t.tags[Se.deviceModel]&&(n.ctx[me.model]=t.tags[Se.deviceModel],i.push(Se.deviceModel)),t.tags[Se.deviceNetwork]&&(n.ctx[we.deviceNetwork]=t.tags[Se.deviceNetwork],i.push(Se.deviceNetwork)),t.tags[Se.deviceOEMName]&&(n.ctx[we.deviceOEMName]=t.tags[Se.deviceOEMName],i.push(Se.deviceOEMName)),t.tags[Se.deviceOSVersion]&&(n.tags[we.deviceOSVersion]=t.tags[Se.deviceOSVersion],i.push(Se.deviceOSVersion)),t.tags[Se.deviceOS]&&(n.ctx[ye.deviceOS]=t.tags[Se.deviceOS],i.push(Se.deviceModel)),t.tags[Se.deviceNetwork]&&(n.ctx[we.deviceNetwork]=t.tags[Se.deviceNetwork],i.push(Se.deviceNetwork)),t.tags[Se.deviceType]&&(n.ctx[me.deviceType]=t.tags[Se.deviceType],i.push(Se.deviceType)),t.tags[Se.deviceOSVersion]&&(n.tags[we.deviceOSVersion]=t.tags[Se.deviceOSVersion],i.push(Se.deviceOSVersion)),t.tags[Se.deviceScreenResolution]&&(n.tags[he.screenRes]=t.tags[Se.deviceScreenResolution],i.push(Se.deviceScreenResolution)),t.tags.sampleRate&&(n.tags.sampleRate=t.tags.sampleRate,i.push(Se.deviceScreenResolution)),t.tags[Se.locationIp]&&(n.tags[Se.locationIp]=t.tags[Se.locationIp],i.push(Se.locationIp)),t.tags[Se.internalSdkVersion]&&(n.tags[Se.internalSdkVersion]=t.tags[Se.internalSdkVersion],i.push(Se.internalSdkVersion)),t.tags[Se.internalAgentVersion]&&(n.tags[Se.internalAgentVersion]=t.tags[Se.internalAgentVersion],i.push(Se.internalAgentVersion)),t.tags[Se.operationRootId]&&(n.tags[Se.operationRootId]=t.tags[Se.operationRootId],i.push(Se.operationRootId)),t.tags[Se.operationSyntheticSource]&&(n.tags[Se.operationSyntheticSource]=t.tags[Se.operationSyntheticSource],i.push(Se.operationSyntheticSource)),t.tags[Se.operationParentId]&&(n.tags[Se.operationParentId]=t.tags[Se.operationParentId],i.push(Se.operationParentId)),t.tags[Se.operationName]&&(n.tags[Se.operationName]=t.tags[Se.operationName],i.push(Se.operationName)),t.tags[Se.operationId]&&(n.tags[Se.operationId]=t.tags[Se.operationId],i.push(Se.operationId)),Object.keys(t.tags).forEach(function(e){i.indexOf(e)<0&&(n.tags[e]=t.tags[e])}))},a}(),Te=function(){function e(e,t,n){this.pageViewPerformanceSent=!1,this.overridePageViewDuration=!1,this.overridePageViewDuration=t,this.appInsights=e,n&&(this._channel=function(){return n.getTransmissionControls()},this._logger=n.logger)}return e.prototype.trackPageView=function(t,n){var i=this,r=t.name;(l.isNullOrUndefined(r)||"string"!=typeof r)&&(t.name=window.document&&window.document.title||"");var o=t.uri;if((l.isNullOrUndefined(o)||"string"!=typeof o)&&(t.uri=window.location&&window.location.href||""),!pe.isPerformanceTimingSupported())return this.appInsights.sendPageViewInternal(t,n),this._channel().forEach(function(e){e.forEach(function(e){return e.flush(!0)})}),void this._logger.throwInternal(m.WARNING,f,"trackPageView: navigation timing API used for calculation of page duration is not supported in this browser. This page view will be collected without duration and timing info.");var a=!1,s=void 0,c=pe.getPerformanceTiming().navigationStart;s=pe.getDuration(c,+new Date),pe.shouldCollectDuration(s)||(s=void 0);var e=void 0;l.isNullOrUndefined(n)||l.isNullOrUndefined(n.duration)||(e=n.duration),!this.overridePageViewDuration&&isNaN(e)||(isNaN(e)&&(n||(n={}),n.duration=s),this.appInsights.sendPageViewInternal(t,n),this._channel().forEach(function(e){e.forEach(function(e){return e.flush(!0)})}),a=!0);n||(n={});var u=setInterval(function(){try{if(pe.isPerformanceTimingDataReady()){clearInterval(u);var e=new pe(i._logger,r,o,null);e.getIsValid()||a?(a||(n.duration=e.getDurationMs(),i.appInsights.sendPageViewInternal(t,n)),i.pageViewPerformanceSent||(i.appInsights.sendPageViewPerformanceInternal(e,n),i.pageViewPerformanceSent=!0),i._channel().forEach(function(e){e.forEach(function(e){return e.flush(!0)})})):(n.duration=s,i.appInsights.sendPageViewInternal(t,n),i._channel().forEach(function(e){e.forEach(function(e){return e.flush(!0)})}))}else 6e4<pe.getDuration(c,+new Date)&&(clearInterval(u),a||(n.duration=6e4,i.appInsights.sendPageViewInternal(t,n),i._channel().forEach(function(e){e.forEach(function(e){return e.flush(!0)})})))}catch(e){i._logger.throwInternal(m.CRITICAL,D,"trackPageView failed on page load calculation: "+q.getExceptionName(e),{exception:q.dump(e)})}},100)},e}(),_e=function(){function u(){this.identifier="ApplicationInsightsAnalytics",this.priority=160,this._isInitialized=!1,this._trackAjaxAttempts=0,this.initialize=this._initialize.bind(this)}return u.getDefaultConfig=function(e){return e||(e={}),e.sessionRenewalMs=18e5,e.sessionExpirationMs=864e5,e.disableExceptionTracking=q.stringToBoolOrDefault(e.disableExceptionTracking),e.autoTrackPageVisitTime=q.stringToBoolOrDefault(e.autoTrackPageVisitTime),(isNaN(e.samplingPercentage)||e.samplingPercentage<=0||100<=e.samplingPercentage)&&(e.samplingPercentage=100),e.isCookieUseDisabled=q.stringToBoolOrDefault(e.isCookieUseDisabled),e.isStorageUseDisabled=q.stringToBoolOrDefault(e.isStorageUseDisabled),e.isBrowserLinkTrackingEnabled=q.stringToBoolOrDefault(e.isBrowserLinkTrackingEnabled),e},u.prototype.processTelemetry=function(e){var t=!1;try{for(var n=this._telemetryInitializers.length,i=0;i<n;++i){var r=this._telemetryInitializers[i];if(r&&!1===r.apply(null,[e])){t=!0;break}}}catch(e){t=!0,this._logger.throwInternal(m.CRITICAL,L,"One of telemetry initializers failed, telemetry item will not be sent: "+q.getExceptionName(e),{exception:q.dump(e)},!0)}t||l.isNullOrUndefined(this._nextPlugin)||this._nextPlugin.processTelemetry(e)},u.prototype.setNextPlugin=function(e){this._nextPlugin=e},u.prototype.trackEvent=function(e,t){try{var n=Ne.create(e,J.dataType,J.envelopeType,this._logger,t);this._setTelemetryNameAndIKey(n),this.core.track(n)}catch(e){this._logger.throwInternal(m.WARNING,k,"trackTrace failed, trace will not be collected: "+q.getExceptionName(e),{exception:q.dump(e)})}},u.prototype.startTrackEvent=function(e){try{this._eventTracking.start(e)}catch(e){this._logger.throwInternal(m.CRITICAL,y,"startTrackEvent failed, event will not be collected: "+q.getExceptionName(e),{exception:q.dump(e)})}},u.prototype.stopTrackEvent=function(e,t,n){try{this._eventTracking.stop(e,void 0,t)}catch(e){this._logger.throwInternal(m.CRITICAL,w,"stopTrackEvent failed, event will not be collected: "+q.getExceptionName(e),{exception:q.dump(e)})}},u.prototype.trackTrace=function(e,t){try{var n=Ne.create(e,de.dataType,de.envelopeType,this._logger,t);this._setTelemetryNameAndIKey(n),this.core.track(n)}catch(e){this._logger.throwInternal(m.WARNING,k,"trackTrace failed, trace will not be collected: "+q.getExceptionName(e),{exception:q.dump(e)})}},u.prototype.trackMetric=function(e,t){try{var n=Ne.create(e,se.dataType,se.envelopeType,this._logger,t);this._setTelemetryNameAndIKey(n),this.core.track(n)}catch(e){this._logger.throwInternal(m.CRITICAL,_,"trackMetric failed, metric will not be collected: "+q.getExceptionName(e),{exception:q.dump(e)})}},u.prototype.trackPageView=function(e,t){try{this._pageViewManager.trackPageView(e,t),this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(e.name,e.uri)}catch(e){this._logger.throwInternal(m.CRITICAL,E,"trackPageView failed, page view will not be collected: "+q.getExceptionName(e),{exception:q.dump(e)})}},u.prototype.sendPageViewInternal=function(e,t,n){var i=Ne.create(e,ue.dataType,ue.envelopeType,this._logger,t,n);this._setTelemetryNameAndIKey(i),this.core.track(i),this._trackAjaxAttempts=0},u.prototype.sendPageViewPerformanceInternal=function(e,t){var n=Ne.create(e,pe.dataType,pe.envelopeType,this._logger,t);this._setTelemetryNameAndIKey(n),this.core.track(n)},u.prototype.trackPageViewPerformance=function(e,t){var n=new pe(this.core.logger,e.name,e.url,void 0);this.sendPageViewPerformanceInternal(n,t)},u.prototype.startTrackPage=function(e){try{"string"!=typeof e&&(e=window.document&&window.document.title||""),this._pageTracking.start(e)}catch(e){this._logger.throwInternal(m.CRITICAL,S,"startTrackPage failed, page view may not be collected: "+q.getExceptionName(e),{exception:q.dump(e)})}},u.prototype.stopTrackPage=function(e,t,n){try{"string"!=typeof e&&(e=window.document&&window.document.title||""),"string"!=typeof t&&(t=window.location&&window.location.href||""),this._pageTracking.stop(e,t,n),this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(e,t)}catch(e){this._logger.throwInternal(m.CRITICAL,N,"stopTrackPage failed, page view will not be collected: "+q.getExceptionName(e),{exception:q.dump(e)})}},u.prototype.trackException=function(e,t){try{var n=Ne.create(e,ee.dataType,ee.envelopeType,this._logger,t);this._setTelemetryNameAndIKey(n),this.core.track(n)}catch(e){this._logger.throwInternal(m.CRITICAL,T,"trackException failed, exception will not be collected: "+q.getExceptionName(e),{exception:q.dump(e)})}},u.prototype._onerror=function(t){try{var e={url:t&&t.url||document.URL,lineNumber:t.lineNumber,columnNumber:t.columnNumber,message:t.message};if(q.isCrossOriginError(t.message,t.url,t.lineNumber,t.columnNumber,t.error))this._sendCORSException(e.url);else{if(!q.isError(t.error)){var n="window.onerror@"+e.url+":"+t.lineNumber+":"+(t.columnNumber||0);t.error=new Error(t.message),t.error.stack=n}this.trackException({error:t.error,severityLevel:re.Error},e)}}catch(e){var i=t.error?t.error.name+", "+t.error.message:"null";this._logger.throwInternal(m.CRITICAL,s,"_onError threw exception while logging error, error will not be collected: "+q.getExceptionName(e),{exception:q.dump(e),errorString:i})}},u.prototype.addTelemetryInitializer=function(e){this._telemetryInitializers.push(e)},u.prototype._initialize=function(e,t,n){var o=this;if(!this._isInitialized){if(l.isNullOrUndefined(t))throw Error("Error initializing");this.core=t,this._logger=t.logger,this._globalconfig={instrumentationKey:e.instrumentationKey,endpointUrl:e.endpointUrl||"https://dc.services.visualstudio.com/v2/track"},this.config=e.extensionConfig&&e.extensionConfig[this.identifier]?e.extensionConfig[this.identifier]:{};var i=u.getDefaultConfig();if(void 0!==i){for(var r in i)this.config[r]=ge.getConfig(e,r,this.identifier,i[r]);if(this._globalconfig)for(var r in i)void 0===this._globalconfig[r]&&(this._globalconfig[r]=i[r])}this.config.isCookieUseDisabled&&q.disableCookies(),this.config.isStorageUseDisabled&&q.disableStorage();var a={instrumentationKey:function(){return e.instrumentationKey},accountId:function(){return o.config.accountId||e.accountId},sessionRenewalMs:function(){return o.config.sessionRenewalMs||e.sessionRenewalMs},sessionExpirationMs:function(){return o.config.sessionExpirationMs||e.sessionExpirationMs},sampleRate:function(){return o.config.samplingPercentage||e.samplingPercentage},cookieDomain:function(){return o.config.cookieDomain||e.cookieDomain},sdkExtension:function(){return o.config.sdkExtension||e.sdkExtension},isBrowserLinkTrackingEnabled:function(){return o.config.isBrowserLinkTrackingEnabled||e.isBrowserLinkTrackingEnabled},appId:function(){return o.config.appId||e.appId}};if(this._pageViewManager=new Te(this,this.config.overridePageViewDuration,this.core),this._telemetryInitializers=[],this._addDefaultTelemetryInitializers(a),this._eventTracking=new Ee(this._logger,"trackEvent"),this._eventTracking.action=function(e,t,n,i,r){r||(r={}),r.duration=n,o.trackEvent({name:e})},this._pageTracking=new Ee(this._logger,"trackPageView"),!(this._pageTracking.action=function(e,t,n,i){var r={name:e,uri:t};l.isNullOrUndefined(i)&&(i={}),i.duration=n,o.sendPageViewInternal(r,i)})===this.config.disableExceptionTracking&&!this.config.autoExceptionInstrumented){var s=window.onerror,c=this;window.onerror=function(e,t,n,i,r){var o=s&&s(e,t,n,i,r);return!0!==o&&c._onerror({message:e,url:t,lineNumber:n,columnNumber:i,error:r}),o},this.config.autoExceptionInstrumented=!0}this._isInitialized=!0}},u.prototype._addDefaultTelemetryInitializers=function(e){if(!e.isBrowserLinkTrackingEnabled()){var i=["/browserLinkSignalR/","/__browserLink/"];this._addTelemetryInitializer(function(e){if(e.baseType===le.dataType){var t=e.baseData;if(t)for(var n=0;n<i.length;n++)if(t.absoluteUrl&&0<=t.absoluteUrl.indexOf(i[n]))return!1}return!0})}},u.prototype._addTelemetryInitializer=function(e){this._telemetryInitializers.push(e)},u.prototype._sendCORSException=function(e){var t={message:"Script error: The browser's same-origin policy prevents us from getting the details of this exception. Consider using the 'crossorigin' attribute.",url:e,lineNumber:0,columnNumber:0,error:void 0},n=Ne.create(t,ee.dataType,ee.envelopeType,this._logger,{url:e});this.core.track(n)},u.prototype._setTelemetryNameAndIKey=function(e){e.instrumentationKey=this._globalconfig.instrumentationKey;var t=this._globalconfig.instrumentationKey.replace(/-/g,"");e.name=e.name.replace("{0}",t)},u.Version="2.0.1-beta",u}(),Ee=function(){function e(e,t){this._name=t,this._events={},this._logger=e}return e.prototype.start=function(e){void 0!==this._events[e]&&this._logger.throwInternal(m.WARNING,M,"start was called more than once for this event without calling stop.",{name:this._name,key:e},!0),this._events[e]=+new Date},e.prototype.stop=function(e,t,n){var i=this._events[e];if(isNaN(i))this._logger.throwInternal(m.WARNING,P,"stop was called without a corresponding start.",{name:this._name,key:e},!0);else{var r=+new Date,o=pe.getDuration(i,r);this.action(e,t,o,n)}delete this._events[e],this._events[e]=void 0},e}();e.ApplicationInsights=_e,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).aianalytics={})}(this,function(e){"use strict";var r,t,h,n;(t=r||(r={}))[t.LocalStorage=0]="LocalStorage",t[t.SessionStorage=1]="SessionStorage",(n=h||(h={}))[n.Default=0]="Default",n[n.Required=1]="Required",n[n.Array=2]="Array",n[n.Hidden=4]="Hidden";var m,i,l=function(){function e(){}return e.isNullOrUndefined=function(e){return null==e},e.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(o,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},e}(),o=/[xy]/g;(i=m||(m={}))[i.CRITICAL=1]="CRITICAL",i[i.WARNING=2]="WARNING";var a=1,c=2,u=3,d=4,p=5,g=6,v=8,I=10,s=11,f=25,y=29,w=30,S=31,N=32,T=35,_=36,E=37,D=38,k=39,A=45,x=52,b=56,R=57,C=61,M=62,P=63,L=64,U=66,O=68,V=69,z=(function(){function e(){this.identifier="ChannelControllerPlugin",this.priority=z}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 o=this;if(this.channelQueue=new Array,n.channels)n.channels.forEach(function(e){if(e&&0<e.length){(e=e.sort(function(e,t){return e.priority-t.priority})).forEach(function(e){return e.initialize(n,i,r)});for(var t=1;t<e.length;t++)e[t-1].setNextPlugin(e[t]);o.channelQueue.push(e)}});else{for(var e=new Array,t=0;t<r.length;t++){var a=r[t];a.priority>z&&e.push(a)}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)}}}}(),200),G=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 o=0,a=r;void 0!==n[a];)o++,a=r.substring(0,s.MAX_NAME_LENGTH-3)+s.padNumber(o);r=a}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(m.WARNING,R,"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(m.WARNING,C,"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,U)},s.sanitizeMessage=function(e,t){return t&&t.length>s.MAX_MESSAGE_LENGTH&&(t=t.substring(0,s.MAX_MESSAGE_LENGTH),e.throwInternal(m.WARNING,b,"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(m.WARNING,x,"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,V).toString():t},s.sanitizeInput=function(e,t,n,i){return t&&(t=s.trim(t)).length>n&&(t=t.substring(0,n),e.throwInternal(m.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}(),q=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(m.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(m.WARNING,u,"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(m.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 n=s._getSessionStorageObject();if(null!==n)try{return n.getItem(e)}catch(e){s._canUseSessionStorage=!1,t.throwInternal(m.WARNING,c,"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(m.WARNING,d,"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(m.WARNING,g,"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(m.WARNING,O,"Cannot access document.cookie - "+s.getExceptionName(e),{exception:s.dump(e)})}}return s._canUseCookies},s.setCookie=function(e,t,n,i){var r="",o="";i&&(r=";domain="+i),s.document.location&&"https:"===s.document.location.protocol&&(o=";secure"),s.canUseCookies(e)&&(s.document.cookie=t+"="+n+r+";path=/"+o)},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(";"),o=0;o<r.length;o++){var a=r[o];if((a=s.trim(a))&&0===a.indexOf(i)){n=a.substring(i.length,r[o].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,o=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<o?o+".":"")+(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}(),B=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}(),j=function(){function e(){}return e.ParseDependencyPath=function(e,t,n,i){var r,o;if(t&&0<t.length){var a=B.parseUrl(t);if(r=a.host,null!=a.pathname)"/"!==(i=0===a.pathname.length?"/":a.pathname).charAt(0)&&(i="/"+i),o=G.sanitizeString(e,n?n+" "+i:i);else o=G.sanitizeString(e,t)}else o=r=i;return{target:r,name:o}},e}(),X=(function(){function e(){}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||l.isNullOrUndefined(e)||l.isNullOrUndefined(t)||(n=t-e),n}}(),function(e,t){return(X=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 H(e,t){function n(){this.constructor=e}X(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var W,K,F=function(e){function t(){return e.call(this)||this}return H(t,e),t}(function(){}),Q=(function(r){function e(e,t,n){var i=r.call(this)||this;return i.name=G.sanitizeString(e,n)||q.NotSpecified,i.data=t,i.time=q.toISOStringForIE8(new Date),i.aiDataContract={time:h.Required,iKey:h.Required,name:h.Required,sampleRate:function(){return 100==i.sampleRate?h.Hidden:h.Required},tags:h.Required,data:h.Required},i}H(e,r)}(function(){this.ver=1,this.sampleRate=100,this.tags={}}),function(){}),Y=function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}return H(e,t),e}(Q),J=function(o){function e(e,t,n,i){var r=o.call(this)||this;return r.aiDataContract={ver:h.Required,name:h.Required,properties:h.Default,measurements:h.Default},r.name=G.sanitizeString(e,t)||q.NotSpecified,r.properties=G.sanitizeProperties(e,n),r.measurements=G.sanitizeMeasurements(e,i),r}return H(e,o),e.envelopeType="Microsoft.ApplicationInsights.{0}.Event",e.dataType="EventData",e}(Y),$=function(){},Z=function(){this.hasFullStack=!0,this.parsedStack=[]},ee=function(a){function e(e,t,n,i,r){var o=a.call(this)||this;return o.aiDataContract={ver:h.Required,exceptions:h.Required,severityLevel:h.Default,properties:h.Default,measurements:h.Default},o.properties=G.sanitizeProperties(e,n),o.measurements=G.sanitizeMeasurements(e,i),o.exceptions=[new te(e,t)],r&&(o.severityLevel=r),o}return H(e,a),e.CreateSimpleException=function(e,t,n,i,r,o){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 H(e,t),e}(Q)),te=function(r){function e(e,t){var n=r.call(this)||this;n.aiDataContract={id:h.Default,outerId:h.Default,typeName:h.Required,message:h.Required,hasFullStack:h.Default,stack:h.Default,parsedStack:h.Array},n.typeName=G.sanitizeString(e,t.name)||q.NotSpecified,n.message=G.sanitizeMessage(e,t.message)||q.NotSpecified;var i=t.stack;return n.parsedStack=n.parseStack(i),n.stack=G.sanitizeException(e,i),n.hasFullStack=q.isArray(n.parsedStack)&&0<n.parsedStack.length,n}return H(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,o=0;o<=n.length;o++){var a=n[o];if(ne.regex.test(a)){var s=new ne(n[o],i++);r+=s.sizeInBytes,t.push(s)}}if(32768<r)for(var c=0,u=t.length-1,l=0,d=c,p=u;c<u;){if(32768<(l+=t[c].sizeInBytes+t[u].sizeInBytes)){var g=p-d+1;t.splice(d,g);break}d=c,p=u,c++,u--}}return t},e}(Z),ne=function(r){function o(e,t){var n=r.call(this)||this;n.sizeInBytes=0,n.aiDataContract={level:h.Required,method:h.Required,assembly:h.Default,fileName:h.Default,line:h.Default},n.level=t,n.method="<no_method>",n.assembly=q.trim(e);var i=e.match(o.regex);return i&&5<=i.length&&(n.method=q.trim(i[2])||n.method,n.fileName=q.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+=o.baseSize,n.sizeInBytes+=n.level.toString().length,n.sizeInBytes+=n.line.toString().length,n}return H(o,r),o.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,o.baseSize=58,o}($),ie=function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.metrics=[],e.properties={},e}return H(e,t),e}(Q);(K=W||(W={}))[K.Measurement=0]="Measurement",K[K.Aggregation=1]="Aggregation";var re,oe,ae=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.aiDataContract={name:h.Required,kind:h.Default,value:h.Required,count:h.Default,min:h.Default,max:h.Default,stdDev:h.Default},e}return H(e,t),e}(function(){this.kind=W.Measurement}),se=function(u){function e(e,t,n,i,r,o,a){var s=u.call(this)||this;s.aiDataContract={ver:h.Required,metrics:h.Required,properties:h.Default};var c=new ae;return c.count=0<i?i:void 0,c.max=isNaN(o)||null===o?void 0:o,c.min=isNaN(r)||null===r?void 0:r,c.name=G.sanitizeString(e,t)||q.NotSpecified,c.value=n,s.metrics=[c],s.properties=G.sanitizeProperties(e,a),s}return H(e,u),e.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",e.dataType="MetricData",e}(ie),ce=function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}return H(e,t),e}(Y),ue=function(c){function e(e,t,n,i,r,o,a){var s=c.call(this)||this;return s.aiDataContract={ver:h.Required,name:h.Default,url:h.Default,duration:h.Default,properties:h.Default,measurements:h.Default,id:h.Default},s.id=G.sanitizeId(e,a),s.url=G.sanitizeUrl(e,n),s.name=G.sanitizeString(e,t)||q.NotSpecified,isNaN(i)||(s.duration=q.msToTimeSpan(i)),s.properties=G.sanitizeProperties(e,r),s.measurements=G.sanitizeMeasurements(e,o),s}return H(e,c),e.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",e.dataType="PageviewData",e}(ce),le=function(p){function e(e,t,n,i,r,o,a,s,c,u){var l=p.call(this)||this;l.aiDataContract={id:h.Required,ver:h.Required,name:h.Default,resultCode:h.Default,duration:h.Default,success:h.Default,data:h.Default,target:h.Default,type:h.Default,properties:h.Default,measurements:h.Default,kind:h.Default,value:h.Default,count:h.Default,min:h.Default,max:h.Default,stdDev:h.Default,dependencyKind:h.Default,dependencySource:h.Default,commandName:h.Default,dependencyTypeName:h.Default},l.id=t,l.duration=q.msToTimeSpan(r),l.success=o,l.resultCode=a+"",l.type="Ajax",l.data=G.sanitizeUrl(e,i);var d=j.ParseDependencyPath(e,n,s,i);return l.target=d.target,l.name=d.name,l.properties=G.sanitizeProperties(e,c),l.measurements=G.sanitizeMeasurements(e,u),l}return H(e,p),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 H(e,t),e}(Q)),de=function(o){function e(e,t,n,i){var r=o.call(this)||this;return r.aiDataContract={ver:h.Required,message:h.Required,severityLevel:h.Default,properties:h.Default},t=t||q.NotSpecified,r.message=G.sanitizeMessage(e,t),r.properties=G.sanitizeProperties(e,i),n&&(r.severityLevel=n),r}return H(e,o),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 H(e,t),e}(Q)),pe=function(g){function f(e,t,n,i,r,o){var a=g.call(this)||this;a.aiDataContract={ver:h.Required,name:h.Default,url:h.Default,duration:h.Default,perfTotal:h.Default,networkConnect:h.Default,sentRequest:h.Default,receivedResponse:h.Default,domProcessing:h.Default,properties:h.Default,measurements:h.Default},a.isValid=!1;var s=f.getPerformanceTiming();if(s){var c=f.getDuration(s.navigationStart,s.loadEventEnd),u=f.getDuration(s.navigationStart,s.connectEnd),l=f.getDuration(s.requestStart,s.responseStart),d=f.getDuration(s.responseStart,s.responseEnd),p=f.getDuration(s.responseEnd,s.loadEventEnd);0==c?e.throwInternal(m.WARNING,I,"error calculating page view performance.",{total:c,network:u,request:l,response:d,dom:p}):f.shouldCollectDuration(c,u,l,d,p)?c<Math.floor(u)+Math.floor(l)+Math.floor(d)+Math.floor(p)?e.throwInternal(m.WARNING,v,"client performance math error.",{total:c,network:u,request:l,response:d,dom:p}):(a.durationMs=c,a.perfTotal=a.duration=q.msToTimeSpan(c),a.networkConnect=q.msToTimeSpan(u),a.sentRequest=q.msToTimeSpan(l),a.receivedResponse=q.msToTimeSpan(d),a.domProcessing=q.msToTimeSpan(p),a.isValid=!0):e.throwInternal(m.WARNING,A,"Invalid page load duration value. Browser perf data won't be sent.",{total:c,network:u,request:l,response:d,dom:p})}return a.url=G.sanitizeUrl(e,n),a.name=G.sanitizeString(e,t)||q.NotSpecified,a.properties=G.sanitizeProperties(e,r),a.measurements=G.sanitizeMeasurements(e,o),a}return H(f,g),f.prototype.getIsValid=function(){return this.isValid},f.prototype.getDurationMs=function(){return this.durationMs},f.getPerformanceTiming=function(){return f.isPerformanceTimingSupported()?window.performance.timing:null},f.isPerformanceTimingSupported=function(){return"undefined"!=typeof window&&window.performance&&window.performance.timing},f.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},f.getDuration=function(e,t){var n=void 0;return isNaN(e)||isNaN(t)||(n=Math.max(t-e,0)),n},f.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 o=0;o<n.length;o++)r=r||-1!==i.toLowerCase().indexOf(n[o]);if(r)return!1;for(var a=0;a<e.length;a++)if(e[a]>=f.MAX_DURATION_ALLOWED)return!1;return!0},f.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",f.dataType="PageviewPerformanceData",f.MAX_DURATION_ALLOWED=36e5,f}(function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}return H(e,t),e}(ce));!function(i){function e(e,t){var n=i.call(this)||this;return n.aiDataContract={baseType:h.Required,baseData:h.Required},n.baseType=e,n.baseData=t,n}H(e,i)}(F);(oe=re||(re={}))[oe.Verbose=0]="Verbose",oe[oe.Information=1]="Information",oe[oe.Warning=2]="Warning",oe[oe.Error=3]="Error",oe[oe.Critical=4]="Critical";var ge=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]&&!l.isNullOrUndefined(e.extensionConfig[n][t])?e.extensionConfig[n][t]:e[t],l.isNullOrUndefined(r)?i:r},e}(),fe=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"},he=function(){function e(){}return e.domain="domain",e.browser="web.browser",e.browserVer="web.browserVer",e.browserLang="web.browserLang",e.userConsent="web.userConsent",e.isManual="web.isManual",e.screenRes="web.screenRes",e}(),me=function(){function e(){}return e.localId="device.localId",e.model="device.model",e.deviceType="device.class",e}(),ve=function(){function e(){}return e.sessionId="app.sesId",e}(),Ie=function(){function e(){}return e.clientIp="ingest.clientIp",e}(),ye=function(){function e(){}return e.deviceOS="os.name",e}(),we=function(){function e(){}return e.sessionIsFirst="ai.session.isFirst",e.sessionIsNew="ai.session.isNew",e.userAccountAcquisitionDate="ai.user.accountAcquisitionDate",e.userStoreRegion="ai.user.storeRegion",e.userAnonymousUserAcquisitionDate="ai.user.anonUserAcquisitionDate",e.userAuthenticatedUserAcquisitionDate="ai.user.authUserAcquisitionDate",e.cloudName="ai.cloud.name",e.cloudRole="ai.cloud.role",e.cloudRoleVer="ai.cloud.roleVer",e.cloudRoleInstance="ai.cloud.roleInstance",e.cloudEnvironment="ai.cloud.environment",e.cloudLocation="ai.cloud.location",e.cloudDeploymentUnit="ai.cloud.deploymentUnit",e.internalNodeName="ai.internal.nodeName",e.internalSdkVersion="ai.internal.sdkVersion",e.internalAgentVersion="ai.internal.agentVersion",e.deviceOEMName="ai.device.oemName",e.deviceNetwork="ai.device.network",e.applicationVersion="ai.application.ver",e.applicationBuild="ai.application.build",e.deviceLocale="ai.device.locale",e.deviceOSVersion="ai.device.osVersion",e.locationIp="ai.location.ip",e.operationId="ai.operation.id",e.operationParentId="ai.operation.parentId",e.operationRootId="ai.operation.rootId",e.operationSyntheticSource="ai.operation.syntheticSource",e}(),Se=new fe,Ne=function(){function a(){}return a.create=function(e,t,n,i,r,o){if(n=G.sanitizeString(i,n)||q.NotSpecified,l.isNullOrUndefined(e)||l.isNullOrUndefined(t)||l.isNullOrUndefined(n))throw Error("Input doesn't contain all required fields");var a={name:n,time:(new Date).toISOString(),iKey:"",ctx:o||{},tags:[],data:{},baseType:t,baseData:e};if(!l.isNullOrUndefined(r))for(var s in r)r.hasOwnProperty(s)&&(a.data[s]=r[s]);return a},a.convertoFrom=function(e,t){var n,i={};for(var r in e.data)"baseData"!==r&&"baseType"!==r&&(i[r]=e.data[r]);switch(e.data.baseType){case le.dataType:var o=e.data.baseType;n=a.create(o,le.dataType,le.envelopeType,t,i)}return a._extractPartA(e,n),n},a._extractPartA=function(t,n){var i=[];n&&t.tags&&(n.tags||(n.tags=[]),n.ctx||(n.ctx={}),t.tags[Se.applicationVersion]&&(n.tags[we.applicationVersion]=t.tags[Se.applicationVersion],i.push(Se.applicationVersion)),t.tags[Se.applicationBuild]&&(n.tags[we.applicationBuild]=t.tags[Se.applicationBuild],i.push(Se.applicationBuild)),t.tags[Se.sessionId]&&(n.ctx[ve.sessionId]=t.tags[Se.sessionId],i.push(Se.sessionId)),t.tags[Se.sessionIsFirst]&&(n.tags[Se.sessionIsFirst]=t.tags[Se.sessionIsFirst],i.push(Se.sessionIsFirst)),t.tags[Se.deviceId]&&(n.ctx[me.localId]=t.tags[Se.deviceId],i.push(Se.deviceId)),t.tags[Se.deviceIp]&&(n.ctx[Ie.clientIp]=t.tags[Se.deviceIp],i.push(Se.deviceIp)),t.tags[Se.deviceLanguage]&&(n.ctx[he.browserLang]=t.tags[Se.deviceLanguage],i.push(Se.deviceLanguage)),t.tags[Se.deviceLocale]&&(n.tags[we.deviceLocale]=t.tags[Se.deviceLocale],i.push(Se.deviceLocale)),t.tags[Se.deviceModel]&&(n.ctx[me.model]=t.tags[Se.deviceModel],i.push(Se.deviceModel)),t.tags[Se.deviceNetwork]&&(n.ctx[we.deviceNetwork]=t.tags[Se.deviceNetwork],i.push(Se.deviceNetwork)),t.tags[Se.deviceOEMName]&&(n.ctx[we.deviceOEMName]=t.tags[Se.deviceOEMName],i.push(Se.deviceOEMName)),t.tags[Se.deviceOSVersion]&&(n.tags[we.deviceOSVersion]=t.tags[Se.deviceOSVersion],i.push(Se.deviceOSVersion)),t.tags[Se.deviceOS]&&(n.ctx[ye.deviceOS]=t.tags[Se.deviceOS],i.push(Se.deviceModel)),t.tags[Se.deviceNetwork]&&(n.ctx[we.deviceNetwork]=t.tags[Se.deviceNetwork],i.push(Se.deviceNetwork)),t.tags[Se.deviceType]&&(n.ctx[me.deviceType]=t.tags[Se.deviceType],i.push(Se.deviceType)),t.tags[Se.deviceOSVersion]&&(n.tags[we.deviceOSVersion]=t.tags[Se.deviceOSVersion],i.push(Se.deviceOSVersion)),t.tags[Se.deviceScreenResolution]&&(n.tags[he.screenRes]=t.tags[Se.deviceScreenResolution],i.push(Se.deviceScreenResolution)),t.tags.sampleRate&&(n.tags.sampleRate=t.tags.sampleRate,i.push(Se.deviceScreenResolution)),t.tags[Se.locationIp]&&(n.tags[Se.locationIp]=t.tags[Se.locationIp],i.push(Se.locationIp)),t.tags[Se.internalSdkVersion]&&(n.tags[Se.internalSdkVersion]=t.tags[Se.internalSdkVersion],i.push(Se.internalSdkVersion)),t.tags[Se.internalAgentVersion]&&(n.tags[Se.internalAgentVersion]=t.tags[Se.internalAgentVersion],i.push(Se.internalAgentVersion)),t.tags[Se.operationRootId]&&(n.tags[Se.operationRootId]=t.tags[Se.operationRootId],i.push(Se.operationRootId)),t.tags[Se.operationSyntheticSource]&&(n.tags[Se.operationSyntheticSource]=t.tags[Se.operationSyntheticSource],i.push(Se.operationSyntheticSource)),t.tags[Se.operationParentId]&&(n.tags[Se.operationParentId]=t.tags[Se.operationParentId],i.push(Se.operationParentId)),t.tags[Se.operationName]&&(n.tags[Se.operationName]=t.tags[Se.operationName],i.push(Se.operationName)),t.tags[Se.operationId]&&(n.tags[Se.operationId]=t.tags[Se.operationId],i.push(Se.operationId)),Object.keys(t.tags).forEach(function(e){i.indexOf(e)<0&&(n.tags[e]=t.tags[e])}))},a}(),Te=function(){function e(e,t,n){this.pageViewPerformanceSent=!1,this.overridePageViewDuration=!1,this.overridePageViewDuration=t,this.appInsights=e,n&&(this._channel=function(){return n.getTransmissionControls()},this._logger=n.logger)}return e.prototype.trackPageView=function(t,n){var i=this,r=t.name;(l.isNullOrUndefined(r)||"string"!=typeof r)&&(t.name=window.document&&window.document.title||"");var o=t.uri;if((l.isNullOrUndefined(o)||"string"!=typeof o)&&(t.uri=window.location&&window.location.href||""),!pe.isPerformanceTimingSupported())return this.appInsights.sendPageViewInternal(t,n),this._channel().forEach(function(e){e.forEach(function(e){return e.flush(!0)})}),void this._logger.throwInternal(m.WARNING,f,"trackPageView: navigation timing API used for calculation of page duration is not supported in this browser. This page view will be collected without duration and timing info.");var a=!1,s=void 0,c=pe.getPerformanceTiming().navigationStart;s=pe.getDuration(c,+new Date),pe.shouldCollectDuration(s)||(s=void 0);var e=void 0;l.isNullOrUndefined(n)||l.isNullOrUndefined(n.duration)||(e=n.duration),!this.overridePageViewDuration&&isNaN(e)||(isNaN(e)&&(n||(n={}),n.duration=s),this.appInsights.sendPageViewInternal(t,n),this._channel().forEach(function(e){e.forEach(function(e){return e.flush(!0)})}),a=!0);n||(n={});var u=setInterval(function(){try{if(pe.isPerformanceTimingDataReady()){clearInterval(u);var e=new pe(i._logger,r,o,null);e.getIsValid()||a?(a||(n.duration=e.getDurationMs(),i.appInsights.sendPageViewInternal(t,n)),i.pageViewPerformanceSent||(i.appInsights.sendPageViewPerformanceInternal(e,n),i.pageViewPerformanceSent=!0),i._channel().forEach(function(e){e.forEach(function(e){return e.flush(!0)})})):(n.duration=s,i.appInsights.sendPageViewInternal(t,n),i._channel().forEach(function(e){e.forEach(function(e){return e.flush(!0)})}))}else 6e4<pe.getDuration(c,+new Date)&&(clearInterval(u),a||(n.duration=6e4,i.appInsights.sendPageViewInternal(t,n),i._channel().forEach(function(e){e.forEach(function(e){return e.flush(!0)})})))}catch(e){i._logger.throwInternal(m.CRITICAL,D,"trackPageView failed on page load calculation: "+q.getExceptionName(e),{exception:q.dump(e)})}},100)},e}(),_e=function(){function u(){this.identifier="ApplicationInsightsAnalytics",this.priority=160,this._isInitialized=!1,this._trackAjaxAttempts=0,this.initialize=this._initialize.bind(this)}return u.getDefaultConfig=function(e){return e||(e={}),e.sessionRenewalMs=18e5,e.sessionExpirationMs=864e5,e.disableExceptionTracking=q.stringToBoolOrDefault(e.disableExceptionTracking),e.autoTrackPageVisitTime=q.stringToBoolOrDefault(e.autoTrackPageVisitTime),(isNaN(e.samplingPercentage)||e.samplingPercentage<=0||100<=e.samplingPercentage)&&(e.samplingPercentage=100),e.isCookieUseDisabled=q.stringToBoolOrDefault(e.isCookieUseDisabled),e.isStorageUseDisabled=q.stringToBoolOrDefault(e.isStorageUseDisabled),e.isBrowserLinkTrackingEnabled=q.stringToBoolOrDefault(e.isBrowserLinkTrackingEnabled),e},u.prototype.processTelemetry=function(e){var t=!1;try{for(var n=this._telemetryInitializers.length,i=0;i<n;++i){var r=this._telemetryInitializers[i];if(r&&!1===r.apply(null,[e])){t=!0;break}}}catch(e){t=!0,this._logger.throwInternal(m.CRITICAL,L,"One of telemetry initializers failed, telemetry item will not be sent: "+q.getExceptionName(e),{exception:q.dump(e)},!0)}t||l.isNullOrUndefined(this._nextPlugin)||this._nextPlugin.processTelemetry(e)},u.prototype.setNextPlugin=function(e){this._nextPlugin=e},u.prototype.trackEvent=function(e,t){try{var n=Ne.create(e,J.dataType,J.envelopeType,this._logger,t);this._setTelemetryNameAndIKey(n),this.core.track(n)}catch(e){this._logger.throwInternal(m.WARNING,k,"trackTrace failed, trace will not be collected: "+q.getExceptionName(e),{exception:q.dump(e)})}},u.prototype.startTrackEvent=function(e){try{this._eventTracking.start(e)}catch(e){this._logger.throwInternal(m.CRITICAL,y,"startTrackEvent failed, event will not be collected: "+q.getExceptionName(e),{exception:q.dump(e)})}},u.prototype.stopTrackEvent=function(e,t,n){try{this._eventTracking.stop(e,void 0,t)}catch(e){this._logger.throwInternal(m.CRITICAL,w,"stopTrackEvent failed, event will not be collected: "+q.getExceptionName(e),{exception:q.dump(e)})}},u.prototype.trackTrace=function(e,t){try{var n=Ne.create(e,de.dataType,de.envelopeType,this._logger,t);this._setTelemetryNameAndIKey(n),this.core.track(n)}catch(e){this._logger.throwInternal(m.WARNING,k,"trackTrace failed, trace will not be collected: "+q.getExceptionName(e),{exception:q.dump(e)})}},u.prototype.trackMetric=function(e,t){try{var n=Ne.create(e,se.dataType,se.envelopeType,this._logger,t);this._setTelemetryNameAndIKey(n),this.core.track(n)}catch(e){this._logger.throwInternal(m.CRITICAL,_,"trackMetric failed, metric will not be collected: "+q.getExceptionName(e),{exception:q.dump(e)})}},u.prototype.trackPageView=function(e,t){try{this._pageViewManager.trackPageView(e,t),this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(e.name,e.uri)}catch(e){this._logger.throwInternal(m.CRITICAL,E,"trackPageView failed, page view will not be collected: "+q.getExceptionName(e),{exception:q.dump(e)})}},u.prototype.sendPageViewInternal=function(e,t,n){var i=Ne.create(e,ue.dataType,ue.envelopeType,this._logger,t,n);this._setTelemetryNameAndIKey(i),this.core.track(i),this._trackAjaxAttempts=0},u.prototype.sendPageViewPerformanceInternal=function(e,t){var n=Ne.create(e,pe.dataType,pe.envelopeType,this._logger,t);this._setTelemetryNameAndIKey(n),this.core.track(n)},u.prototype.trackPageViewPerformance=function(e,t){var n=new pe(this.core.logger,e.name,e.url,void 0);this.sendPageViewPerformanceInternal(n,t)},u.prototype.startTrackPage=function(e){try{"string"!=typeof e&&(e=window.document&&window.document.title||""),this._pageTracking.start(e)}catch(e){this._logger.throwInternal(m.CRITICAL,S,"startTrackPage failed, page view may not be collected: "+q.getExceptionName(e),{exception:q.dump(e)})}},u.prototype.stopTrackPage=function(e,t,n){try{"string"!=typeof e&&(e=window.document&&window.document.title||""),"string"!=typeof t&&(t=window.location&&window.location.href||""),this._pageTracking.stop(e,t,n),this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(e,t)}catch(e){this._logger.throwInternal(m.CRITICAL,N,"stopTrackPage failed, page view will not be collected: "+q.getExceptionName(e),{exception:q.dump(e)})}},u.prototype.trackException=function(e,t){try{var n=Ne.create(e,ee.dataType,ee.envelopeType,this._logger,t);this._setTelemetryNameAndIKey(n),this.core.track(n)}catch(e){this._logger.throwInternal(m.CRITICAL,T,"trackException failed, exception will not be collected: "+q.getExceptionName(e),{exception:q.dump(e)})}},u.prototype._onerror=function(t){try{var e={url:t&&t.url||document.URL,lineNumber:t.lineNumber,columnNumber:t.columnNumber,message:t.message};if(q.isCrossOriginError(t.message,t.url,t.lineNumber,t.columnNumber,t.error))this._sendCORSException(e.url);else{if(!q.isError(t.error)){var n="window.onerror@"+e.url+":"+t.lineNumber+":"+(t.columnNumber||0);t.error=new Error(t.message),t.error.stack=n}this.trackException({error:t.error,severityLevel:re.Error},e)}}catch(e){var i=t.error?t.error.name+", "+t.error.message:"null";this._logger.throwInternal(m.CRITICAL,s,"_onError threw exception while logging error, error will not be collected: "+q.getExceptionName(e),{exception:q.dump(e),errorString:i})}},u.prototype.addTelemetryInitializer=function(e){this._telemetryInitializers.push(e)},u.prototype._initialize=function(e,t,n){var o=this;if(!this._isInitialized){if(l.isNullOrUndefined(t))throw Error("Error initializing");this.core=t,this._logger=t.logger,this._globalconfig={instrumentationKey:e.instrumentationKey,endpointUrl:e.endpointUrl||"https://dc.services.visualstudio.com/v2/track"},this.config=e.extensionConfig&&e.extensionConfig[this.identifier]?e.extensionConfig[this.identifier]:{};var i=u.getDefaultConfig();if(void 0!==i){for(var r in i)this.config[r]=ge.getConfig(e,r,this.identifier,i[r]);if(this._globalconfig)for(var r in i)void 0===this._globalconfig[r]&&(this._globalconfig[r]=i[r])}this.config.isCookieUseDisabled&&q.disableCookies(),this.config.isStorageUseDisabled&&q.disableStorage();var a={instrumentationKey:function(){return e.instrumentationKey},accountId:function(){return o.config.accountId||e.accountId},sessionRenewalMs:function(){return o.config.sessionRenewalMs||e.sessionRenewalMs},sessionExpirationMs:function(){return o.config.sessionExpirationMs||e.sessionExpirationMs},sampleRate:function(){return o.config.samplingPercentage||e.samplingPercentage},cookieDomain:function(){return o.config.cookieDomain||e.cookieDomain},sdkExtension:function(){return o.config.sdkExtension||e.sdkExtension},isBrowserLinkTrackingEnabled:function(){return o.config.isBrowserLinkTrackingEnabled||e.isBrowserLinkTrackingEnabled},appId:function(){return o.config.appId||e.appId}};if(this._pageViewManager=new Te(this,this.config.overridePageViewDuration,this.core),this._telemetryInitializers=[],this._addDefaultTelemetryInitializers(a),this._eventTracking=new Ee(this._logger,"trackEvent"),this._eventTracking.action=function(e,t,n,i,r){r||(r={}),r.duration=n,o.trackEvent({name:e})},this._pageTracking=new Ee(this._logger,"trackPageView"),!(this._pageTracking.action=function(e,t,n,i){var r={name:e,uri:t};l.isNullOrUndefined(i)&&(i={}),i.duration=n,o.sendPageViewInternal(r,i)})===this.config.disableExceptionTracking&&!this.config.autoExceptionInstrumented){var s=window.onerror,c=this;window.onerror=function(e,t,n,i,r){var o=s&&s(e,t,n,i,r);return!0!==o&&c._onerror({message:e,url:t,lineNumber:n,columnNumber:i,error:r}),o},this.config.autoExceptionInstrumented=!0}this._isInitialized=!0}},u.prototype._addDefaultTelemetryInitializers=function(e){if(!e.isBrowserLinkTrackingEnabled()){var i=["/browserLinkSignalR/","/__browserLink/"];this._addTelemetryInitializer(function(e){if(e.baseType===le.dataType){var t=e.baseData;if(t)for(var n=0;n<i.length;n++)if(t.absoluteUrl&&0<=t.absoluteUrl.indexOf(i[n]))return!1}return!0})}},u.prototype._addTelemetryInitializer=function(e){this._telemetryInitializers.push(e)},u.prototype._sendCORSException=function(e){var t={message:"Script error: The browser's same-origin policy prevents us from getting the details of this exception. Consider using the 'crossorigin' attribute.",url:e,lineNumber:0,columnNumber:0,error:void 0},n=Ne.create(t,ee.dataType,ee.envelopeType,this._logger,{url:e});this.core.track(n)},u.prototype._setTelemetryNameAndIKey=function(e){e.iKey=this._globalconfig.instrumentationKey;var t=this._globalconfig.instrumentationKey.replace(/-/g,"");e.name=e.name.replace("{0}",t)},u.Version="2.0.1-beta",u}(),Ee=function(){function e(e,t){this._name=t,this._events={},this._logger=e}return e.prototype.start=function(e){void 0!==this._events[e]&&this._logger.throwInternal(m.WARNING,M,"start was called more than once for this event without calling stop.",{name:this._name,key:e},!0),this._events[e]=+new Date},e.prototype.stop=function(e,t,n){var i=this._events[e];if(isNaN(i))this._logger.throwInternal(m.WARNING,P,"stop was called without a corresponding start.",{name:this._name,key:e},!0);else{var r=+new Date,o=pe.getDuration(i,r);this.action(e,t,o,n)}delete this._events[e],this._events[e]=void 0},e}();e.ApplicationInsights=_e,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=applicationinsights-analytics-js.min.js.map |
{ | ||
"name": "@microsoft/applicationinsights-analytics-js", | ||
"version": "1.0.0-beta.11", | ||
"version": "1.0.0-beta.12", | ||
"description": "Microsoft Application Insights Javascript SDK apis", | ||
@@ -26,6 +26,6 @@ "main": "dist/applicationinsights-analytics-js.js", | ||
"dependencies": { | ||
"@microsoft/applicationinsights-core-js": "^1.0.0-beta.3", | ||
"@microsoft/applicationinsights-common": "^1.0.0-beta.13" | ||
"@microsoft/applicationinsights-core-js": "^1.0.0-beta.5", | ||
"@microsoft/applicationinsights-common": "^1.0.0-beta.14" | ||
}, | ||
"license": "MIT" | ||
} |
@@ -7,11 +7,8 @@ /** | ||
import { | ||
IConfig, | ||
Util, PageViewPerformance, | ||
IAppInsights, | ||
PageView, IEnvelope, RemoteDependencyData, Event, IEventTelemetry, | ||
IConfig, Util, PageViewPerformance, IAppInsights, PageView, RemoteDependencyData, Event, IEventTelemetry, | ||
TelemetryItemCreator, Data, Metric, Exception, SeverityLevel, Trace, IDependencyTelemetry, | ||
IExceptionTelemetry, ITraceTelemetry, IMetricTelemetry, IAutoExceptionTelemetry, | ||
IPageViewTelemetryInternal, IPageViewTelemetry, IPageViewPerformanceTelemetry, | ||
ConfigurationManager | ||
IPageViewTelemetryInternal, IPageViewTelemetry, IPageViewPerformanceTelemetry, ConfigurationManager | ||
} from "@microsoft/applicationinsights-common"; | ||
import { | ||
@@ -489,3 +486,3 @@ IPlugin, IConfiguration, IAppInsightsCore, | ||
this._eventTracking = new Timing(this._logger, "trackEvent"); | ||
this._eventTracking.action = | ||
this._eventTracking.action = | ||
(name?: string, url?: string, duration?: number, properties?: Object, measurements?: Object) => { | ||
@@ -496,3 +493,3 @@ if (!measurements) { | ||
measurements["duration"] = duration ; // ToDo: fix once IEventTelemetry is updated | ||
measurements["duration"] = duration ; // ToDo: fix once IEventTelemetry is updated | ||
this.trackEvent(<IEventTelemetry>{ name: name }); | ||
@@ -590,3 +587,3 @@ } | ||
private _setTelemetryNameAndIKey(telemetryItem: ITelemetryItem): void { | ||
telemetryItem.instrumentationKey = this._globalconfig.instrumentationKey; | ||
telemetryItem.iKey = this._globalconfig.instrumentationKey; | ||
@@ -593,0 +590,0 @@ var iKeyNoDashes = this._globalconfig.instrumentationKey.replace(/-/g, ""); |
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 too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1400310
7178