New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@microsoft/applicationinsights-analytics-js

Package Overview
Dependencies
Maintainers
4
Versions
605
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@microsoft/applicationinsights-analytics-js - npm Package Compare versions

Comparing version 2.5.7 to 2.5.8

4

browser/applicationinsights-analytics-js.min.js
/*!
* Application Insights JavaScript SDK - Web Analytics, 2.5.7
* Application Insights JavaScript SDK - Web Analytics, 2.5.8
* Copyright (c) Microsoft and contributors. All rights reserved.
*/
var e=this,t=function(e){"use strict";var i="function",a="object",t="undefined",o="prototype",s="hasOwnProperty";function n(){return typeof globalThis!==t&&globalThis?globalThis:typeof self!==t&&self?self:typeof window!==t&&window?window:typeof global!==t&&global?global:null}function r(e){var t=Object.create;if(t)return t(e);if(null==e)return{};var n=typeof e;if(n!=a&&n!=i)throw new TypeError("Object prototype may only be an Object:"+e);function r(){}return r[o]=e,new r}var c,u,d,l,f,g=function(e,t){return(g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t[s](n)&&(e[n]=t[n])})(e,t)},p=n()||{};__assign=p.__assign=p.__assign||Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object[o][s].call(t,i)&&(e[i]=t[i]);return e},__extends=p.__extends=p.__extends||function(e,t){function n(){this.constructor=e}g(e,t),e[o]=null===t?r(t):(n[o]=t[o],new n)},(u=c={})[u.LocalStorage=0]="LocalStorage",u[u.SessionStorage=1]="SessionStorage",(l=d=d||{})[l.Default=0]="Default",l[l.Required=1]="Required",l[l.Array=2]="Array",l[l.Hidden=4]="Hidden",(f={})[f.AI=0]="AI",f[f.AI_AND_W3C=1]="AI_AND_W3C",f[f.W3C=2]="W3C";var h=2,m=t,x=a,v=o,y="window",_="location",S="JSON",T=n;function I(e){var t=T();return t&&t[e]?t[e]:e===y&&w()?window:null}function w(){return typeof window===x&&window}function N(){return w()?window:I(y)}function E(){return typeof document===x&&document?document:I("document")}function C(){return typeof navigator===x&&navigator?navigator:I("navigator")}function b(){return typeof location===x&&location?location:I(_)}function D(){return I("performance")}function P(){return typeof JSON===x&&JSON||null!==I(S)}function k(){return P()?JSON||I(S):null}var A="constructor",L="prototype",M="function",R="_dynInstFuncs",O="_isDynProxy",U="_dynClass",z="_dynCls$",V="_unknown_",G="__proto__",j=Object.getPrototypeOf,q=0;function F(e,t){return e&&Object[L].hasOwnProperty.call(e,t)}function B(e){return typeof e===M}function K(e){return e&&(e===Object[L]||e===Array[L])}function W(e){return K(e)||e===Function[L]}function H(e){if(e){if(j)return j(e);var t=e[G]||e[L]||e[A];if(t)return t}return null}function X(e,t,n){return t!==A&&B(e[t])&&(n||F(e,t))}function J(e){throw new TypeError("DynamicProto: "+e)}function $(e,t){return F(e,L)?e.name||t||V:((e||{})[A]||{}).name||t||V}function Q(e,n,t){F(e,L)||J("theClass is an invalid class definition.");var r=e[L];!function(e){for(var t=H(n);t&&!W(t);){if(t===e)return 1;t=H(t)}}(r)&&J("["+$(e)+"] is not in class heirarchy of ["+$(n)+"]");var i=null;F(r,U)?i=r[U]:(i=z+$(e,"_")+"$"+q,q++,r[U]=i);var a=function(e){var t={};for(var n in e)!t[n]&&X(e,n,!1)&&(t[n]=e[n]);return t}(n);t(n,function(e,t,n){function r(e,t){return function(){return t.apply(e,arguments)}}var i={};for(var a in n)i[a]=r(t,n[a]);for(var o=H(e),s=[];o&&!W(o)&&!function(e,t){for(var n=e.length-1;0<=n;n--)if(e[n]===t)return 1}(s,o);){for(var a in o)!i[a]&&X(o,a,!j)&&(i[a]=r(t,o[a]));s.push(o),o=H(o)}return i}(r,n,a)),function(e,t,n,r){if(!K(e)){var i=n[R]=n[R]||{},a=i[t]=i[t]||{};for(var o in n)X(n,o,!1)&&n[o]!==r[o]&&(a[o]=n[o],delete n[o],F(e,o)&&(!e[o]||e[o][O])||(e[o]=function(n,r){var i=function(){if(this&&F(n,U)){var e=((this[R]||{})[n[U]]||{})[r];if(e)return e.apply(this,arguments);J("Missing ["+r+"] "+M)}var t=n[r];return t===i&&(t=H(n)[r]),B(t)||J("["+r+"] is not a "+M),t.apply(this,arguments)};return i[O]=1,i}(e,o)))}}(r,i,n,a)}var Y="ctx",Z=(ee.ParentContextKey="parent",ee.ChildrenContextKey="childEvts",ee);function ee(e,i,t){var n,a=this,o=!1;a.start=Date.now(),a.name=e,a.isAsync=t,a.isChildEvt=function(){return!1},de.isFunction(i)&&(o=de.objDefineAccessors(a,"payload",function(){return!n&&de.isFunction(i)&&(n=i(),i=null),n})),a.getCtx=function(e){return e?e===ee.ParentContextKey||e===ee.ChildrenContextKey?a[e]:(a[Y]||{})[e]:null},a.setCtx=function(e,t){e&&(e===ee.ParentContextKey?(a[e]||(a.isChildEvt=function(){return!0}),a[e]=t):e===ee.ChildrenContextKey?a[e]=t:(a[Y]=a[Y]||{})[e]=t)},a.complete=function(){var e=0,t=a.getCtx(ee.ChildrenContextKey);if(de.isArray(t))for(var n=0;n<t.length;n++){var r=t[n];r&&(e+=r.time)}a.time=Date.now()-a.start,a.exTime=a.time-e,a.complete=function(){},!o&&de.isFunction(i)&&(a.payload=i())}}var te=function On(t){this.ctx={},Q(On,this,function(n){n.create=function(e,t,n){return new Z(e,t,n)},n.fire=function(e){e&&e.complete(),t&&t.perfEvent(e)},n.setCtx=function(e,t){e&&((n[Y]=n[Y]||{})[e]=t)},n.getCtx=function(e){return(n[Y]||{})[e]}})},ne="attachEvent",re="addEventListener",ie="detachEvent",ae="removeEventListener";function oe(e,t){return typeof e===t}function se(e){return oe(e,t)||e===undefined}function ce(e){return se(e)||null===e}function ue(e,t){return e&&Object[o].hasOwnProperty.call(e,t)}function le(e){return oe(e,a)}function fe(e){return oe(e,i)}function ge(e,t,n,r){void 0===r&&(r=!1);var i=!1;if(!ce(e))try{ce(e[re])?ce(e[ne])||(e[ne]("on"+t,n),i=!0):(e[re](t,n,r),i=!0)}catch(a){}return i}function pe(e,t,n,r){if(void 0===r&&(r=!1),!ce(e))try{ce(e[ae])?ce(e[ie])||e[ie]("on"+t,n):e[ae](t,n,r)}catch(i){}}var de=(he.isDate=function(e){return"[object Date]"===Object[o].toString.call(e)},he.isArray=function(e){return"[object Array]"===Object[o].toString.call(e)},he.isError=function(e){return"[object Error]"===Object[o].toString.call(e)},he.isString=function(e){return oe(e,"string")},he.isNumber=function(e){return oe(e,"number")},he.isBoolean=function(e){return oe(e,"boolean")},he.disableCookies=function(){he._canUseCookies=!1},he.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(me,function(e){var t,n=0|((t=I("crypto"))?t.getRandomValues(new Uint8Array(1))[0]%16:16*Math.random());return("x"===e?n:3&n|8).toString(16)})},he.toISOString=function(e){if(he.isDate(e)){var t=function(e){var t=e+"";return 1===t.length&&(t="0"+t),t};return e.getUTCFullYear()+"-"+t(1+e.getUTCMonth())+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())+"."+((e.getUTCMilliseconds()/1e3).toFixed(3)+"").slice(2,5)+"Z"}},he.arrForEach=function(e,t,n){for(var r=e.length,i=0;i<r;i++)i in e&&t.call(n||e,e[i],i,e)},he.arrIndexOf=function(e,t,n){for(var r=e.length,i=n||0,a=Math.max(0<=i?i:r-Math.abs(i),0);a<r;a++)if(a in e&&e[a]===t)return a;return-1},he.arrMap=function(e,t,n){for(var r=e.length,i=n||e,a=Array(r),o=0;o<r;o++)o in e&&(a[o]=t.call(i,e[o],e));return a},he.arrReduce=function(e,t,n){var r,i=e.length,a=0;if(3<=arguments.length)r=n;else{for(;a<i&&!(a in e);)a++;r=e[a++]}for(;a<i;)a in e&&(r=t(r,e[a],a,e)),a++;return r},he.strTrim=function(e){return he.isString(e)?e.replace(/^\s+|\s+$/g,""):e},he.objKeys=function(e){var t=!{toString:null}.propertyIsEnumerable("toString");if(!(fe(e)||le(e)&&null!==e))throw new TypeError("objKeys called on non-object");var n=[];for(var r in e)ue(e,r)&&n.push(r);if(t)for(var i=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],a=i.length,o=0;o<a;o++)ue(e,i[o])&&n.push(i[o]);return n},he.objDefineAccessors=function(e,t,n,r){var i=Object.defineProperty;if(i)try{var a={enumerable:!0,configurable:!0};return n&&(a.get=n),r&&(a.set=r),i(e,t,a),!0}catch(o){}return!1},he.addEventHandler=function(e,t){var n=!1,r=N();r&&(n=ge(r,e,t),n=ge(r.body,e,t)||n);var i=E();return i&&(n=ve.Attach(i,e,t)||n),n},he.isTypeof=oe,he.isUndefined=se,he.isNullOrUndefined=ce,he.hasOwnProperty=ue,he.isFunction=fe,he.isObject=le,he.objCreate=r,he);function he(){}var me=/[xy]/g,ve=(ye.Attach=ge,ye.AttachEvent=ge,ye.Detach=pe,ye.DetachEvent=pe,ye);function ye(){}var xe,_e,Se="CoreUtils.doPerf";function Te(e,t,n,r,i){if(e){var a=e;if(a&&de.isFunction(a.getPerfMgr)&&(a=a.getPerfMgr()),a){var o,s=void 0,c=a.getCtx(Se);try{if(s=a.create(t(),r,i))return c&&s.setCtx&&(s.setCtx(Z.ParentContextKey,c),c.getCtx&&c.setCtx&&((o=c.getCtx(Z.ChildrenContextKey))||(o=[],c.setCtx(Z.ChildrenContextKey,o)),o.push(s))),a.setCtx(Se,s),n(s)}catch(u){s&&s.setCtx&&s.setCtx("exception",u)}finally{s&&a.fire(s),a.setCtx(Se,c)}}}return n()}(_e=xe={})[_e.CRITICAL=1]="CRITICAL",_e[_e.WARNING=2]="WARNING";function Ie(e){return e?'"'+e.replace(/\"/g,"")+'"':""}var we=(Ne.dataType="MessageData",Ne);function Ne(e,t,n,r){void 0===n&&(n=!1),this.messageId=e,this.message=(n?"AI: ":"AI (Internal): ")+e;var i="";P()&&(i=k().stringify(r));var a=(t?" message:"+Ie(t):"")+(r?" props:"+Ie(i):"");this.message+=a}var Ee=function Un(a){this.identifier="DiagnosticLogger",this.queue=[];var o=0,u={};Q(Un,this,function(s){var r=de.isNullOrUndefined,c=de.isUndefined,i=de.isFunction;function e(e,t){var n=a[e];return r(n)?t:n}r(a)&&(a={}),s.consoleLoggingLevel=function(){return e("loggingLevelConsole",0)},s.telemetryLoggingLevel=function(){return e("loggingLevelTelemetry",1)},s.maxInternalMessageLimit=function(){return e("maxMessageLimit",25)},s.enableDebugExceptions=function(){return e("enableDebugExceptions",!1)},s.throwInternal=function(e,t,n,r,i){void 0===i&&(i=!1);var a,o=new we(t,n,i,r);if(s.enableDebugExceptions())throw o;!c(o)&&o&&(c(o.message)||(i?(a=+o.messageId,!u[a]&&s.consoleLoggingLevel()>=xe.WARNING&&(s.warnToConsole(o.message),u[a]=!0)):s.consoleLoggingLevel()>=xe.WARNING&&s.warnToConsole(o.message),s.logInternalMessage(e,o)))},s.warnToConsole=function(e){var t,n=typeof console!==m?console:I("console");n&&(t="log",n.warn&&(t="warn"),i(n[t])&&n[t](e))},s.resetInternalMessageCount=function(){o=0,u={}},s.logInternalMessage=function(e,t){var n,r,i;o>=s.maxInternalMessageLimit()||(n=!0,r="AITR_"+t.messageId,u[r]?n=!1:u[r]=!0,n&&(e<=s.telemetryLoggingLevel()&&(s.queue.push(t),o++),o===s.maxInternalMessageLimit()&&(i=new we(23,"Internal events throttle limit per PageView reached for this app.",!1),s.queue.push(i),s.warnToConsole("Internal events throttle limit per PageView reached for this app."))))}})},Ce=de.isFunction,be=function(i,t){var a=this,o=null,s=Ce(i.processTelemetry),c=Ce(i.setNextPlugin);a._hasRun=!1,a.getPlugin=function(){return i},a.getNext=function(){return o},a.setNext=function(e){o=e},a.processTelemetry=function(n,r){r=r||t;var e=i?i.identifier:"TelemetryPluginChain";Te(r?r.core():null,function(){return e+":processTelemetry"},function(){if(i&&s){a._hasRun=!0;try{r.setNext(o),c&&i.setNextPlugin(o),o&&(o._hasRun=!1),i.processTelemetry(n,r)}catch(t){var e=o&&o._hasRun;o&&e||r.diagLog().throwInternal(xe.CRITICAL,73,"Plugin ["+i.identifier+"] failed during processTelemetry - "+t),o&&!e&&o.processTelemetry(n,r)}}else o&&(a._hasRun=!0,o.processTelemetry(n,r))},function(){return{item:n}},!n.sync)}},De=de.isNullOrUndefined;function Pe(e,t){var n=[];if(e&&0<e.length)for(var r=null,i=0;i<e.length;i++){var a,o=e[i];o&&de.isFunction(o.processTelemetry)&&(a=new be(o,t),n.push(a),r&&r.setNext(a),r=a)}return 0<n.length?n[0]:null}var ke=function zn(e,a,n,t){var r,i,o,s,c=this,u=null;null!==t&&(e&&de.isFunction(e.getPlugin)?u=function(e,t,n){var r=[],i=!n;if(e)for(;e;){var a=e.getPlugin();!i&&a!==n||(i=!0,r.push(a)),e=e.getNext()}return i||r.push(n),Pe(r,t)}(e,c,t||e.getPlugin()):t?(r=c,o=e,s=!1,(i=t)&&e&&(o=[],de.arrForEach(e,function(e){!s&&e!==i||(s=!0,o.push(e))})),i&&!s&&(o=o||[]).push(i),u=Pe(o,r)):de.isUndefined(t)&&(u=Pe(e,c))),c.core=function(){return n},c.diagLog=function(){return(n||{}).logger||new Ee(a||{})},c.getCfg=function(){return a},c.getExtCfg=function(e,t){var n,r;return void 0===t&&(t={}),!a||(r=a.extensionConfig)&&e&&(n=r[e]),n||t},c.getConfig=function(e,t,n){var r;void 0===n&&(n=!1);var i=c.getExtCfg(e,null);return i&&!De(i[t])?r=i[t]:a&&!De(a[t])&&(r=a[t]),De(r)?n:r},c.hasNext=function(){return null!=u},c.getNext=function(){return u},c.setNext=function(e){u=e},c.processNext=function(e){var t=u;t&&(u=t.getNext(),t.processTelemetry(e,c))},c.createNew=function(e,t){return void 0===e&&(e=null),new zn(e||u,a,n,t)}},Ae=de.isFunction,Le="getPlugin",Me=(Re.prototype.initialize=function(e,t,n,r){this._baseTelInit(e,t,n,r)},Re);function Re(){var a=this,o=!1,s=null,c=null;a.core=null,a.diagLog=function(e){return a._getTelCtx(e).diagLog()},a.isInitialized=function(){return o},a.setInitialized=function(e){o=e},a.setNextPlugin=function(e){c=e},a.processNext=function(e,t){t?t.processNext(e):c&&Ae(c.processTelemetry)&&c.processTelemetry(e,null)},a._getTelCtx=function(e){void 0===e&&(e=null);var t,n=e;return n||(t=s||new ke(null,{},a.core),n=c&&c[Le]?t.createNew(null,c[Le]):t.createNew(null,c)),n},a._baseTelInit=function(e,t,n,r){e&&(e.extensionConfig=e.extensionConfig||[]),!r&&t&&(r=t.getProcessTelContext().getNext());var i=c;c&&c[Le]&&(i=c[Le]()),a.core=t,s=new ke(r,e,t,i),o=!0}}var Oe=de.isFunction,Ue="processTelemetry",ze="priority",Ve="setNextPlugin",Ge="isInitialized";function je(t,n){for(var e=[],r=null,i=t.getNext();i;){var a=i.getPlugin();a&&(r&&Oe(r[Ve])&&Oe(a[Ue])&&r[Ve](a),Oe(a[Ge])&&a[Ge]()||e.push(a),r=a,i=i.getNext())}de.arrForEach(e,function(e){e.initialize(t.getCfg(),t.core(),n,t.getNext())})}function qe(e){return e.sort(function(e,t){var n=0,r=Oe(t[Ue]);return Oe(e[Ue])?n=r?e[ze]-t[ze]:1:r&&(n=-1),n})}var Fe,Be=500,Ke="Channel has invalid priority",We=de.objDefineAccessors,He=(Fe=Me,__extends(Xe,Fe),Xe._staticInit=(We(Xe.prototype,"ChannelControls",Xe.prototype.getChannelControls),void We(Xe.prototype,"channelQueue",Xe.prototype.getChannelControls)),Xe);function Xe(){var r=Fe.call(this)||this;r.identifier="ChannelControllerPlugin",r.priority=Be;var c,u=de.arrForEach;function l(e){e&&0<e.length&&(e=e.sort(function(e,t){return e.priority-t.priority}),u(e,function(e){if(e.priority<Be)throw Error(Ke+e.identifier)}),c.push(e))}return Q(Xe,r,function(o,s){o.setNextPlugin=function(e){},o.processTelemetry=function(t,n){c&&u(c,function(e){0<e.length&&r._getTelCtx(n).createNew(e).processNext(t)})},o.getChannelControls=function(){return c},o.initialize=function(t,n,r){var e,i,a;o.isInitialized()||(s.initialize(t,n,r),t.isCookieUseDisabled&&de.disableCookies(),i=r,c=[],(e=(t||{}).channels)&&u(e,l),i&&(a=[],u(i,function(e){e.priority>Be&&a.push(e)}),l(a)),u(c,function(e){return je(new ke(e,t,n),r)}))}}),r}var Je=de.arrForEach,$e=de.isNullOrUndefined,Qe="_notificationManager",Ye=function Vn(e){this.listeners=[];var a=de.arrForEach,t=!!(e||{}).perfEvtsSendAll;Q(Vn,this,function(i){i.addNotificationListener=function(e){i.listeners.push(e)},i.removeNotificationListener=function(e){for(var t=de.arrIndexOf(i.listeners,e);-1<t;)i.listeners.splice(t,1),t=de.arrIndexOf(i.listeners,e)},i.eventsSent=function(t){a(i.listeners,function(e){e&&e.eventsSent&&setTimeout(function(){return e.eventsSent(t)},0)})},i.eventsDiscarded=function(t,n){a(i.listeners,function(e){e&&e.eventsDiscarded&&setTimeout(function(){return e.eventsDiscarded(t,n)},0)})},i.eventsSendRequest=function(n,r){a(i.listeners,function(e){if(e&&e.eventsSendRequest)if(r)setTimeout(function(){return e.eventsSendRequest(n,r)},0);else try{e.eventsSendRequest(n,r)}catch(t){}})},i.perfEvent=function(n){n&&(!t&&n.isChildEvt()||a(i.listeners,function(e){if(e&&e.perfEvent)if(n.isAsync)setTimeout(function(){return e.perfEvent(n)},0);else try{e.perfEvent(n)}catch(t){}}))}})},Ze=function Gn(){var t,c,u,n,l=!1;Q(Gn,this,function(s){s._extensions=[],c=new He,t=[],s.isInitialized=function(){return l},s.initialize=function(e,t,r,n){if(s.isInitialized())throw Error("Core should not be initialized more than once");if(!e||$e(e.instrumentationKey))throw Error("Please provide instrumentation key");u=n,s[Qe]=n,s.config=e||{},e.extensions=$e(e.extensions)?[]:e.extensions,(e.extensionConfig=$e(e.extensionConfig)?{}:e.extensionConfig).NotificationManager=n,r=r||de.objCreate({throwInternal:function(e,t,n,r,i){void 0===i&&(i=!1)},warnToConsole:function(e){},resetInternalMessageCount:function(){}}),s.logger=r;var i=[];i.push.apply(i,t.concat(e.extensions)),i=qe(i);var a=[],o={};if(Je(i,function(e){if($e(e)||$e(e.initialize))throw Error("Extensions must provide callback to initialize");var t=e.priority,n=e.identifier;e&&t&&($e(o[t])?o[t]=n:r.warnToConsole("Two extensions have same priority #"+t+" - "+o[t]+", "+n)),(!t||t<c.priority)&&a.push(e)}),i.push(c),a.push(c),i=qe(i),s._extensions=i,je(new ke([c],e,s),i),je(new ke(a,e,s),i),s._extensions=a,0===s.getTransmissionControls().length)throw Error("No channels available");l=!0,s.releaseQueue()},s.getTransmissionControls=function(){return c.getChannelControls()},s.track=function(e){e.iKey||(e.iKey=s.config.instrumentationKey),e.time||(e.time=de.toISOString(new Date)),$e(e.ver)&&(e.ver="4.0"),s.isInitialized()?s.getProcessTelContext().processNext(e):t.push(e)},s.getProcessTelContext=function(){var e=s._extensions,t=e;return e&&0!==e.length||(t=[c]),new ke(t,s.config,s)},s.getNotifyMgr=function(){return u||(u=de.objCreate({addNotificationListener:function(e){},removeNotificationListener:function(e){},eventsSent:function(e){},eventsDiscarded:function(e,t){},eventsSendRequest:function(e,t){}}),s[Qe]=u),u},s.getPerfMgr=function(){return n||s.config&&s.config.enablePerfMgr&&(n=new te(s.getNotifyMgr())),n},s.setPerfMgr=function(e){n=e},s.eventCnt=function(){return t.length},s.releaseQueue=function(){0<t.length&&(Je(t,function(e){s.getProcessTelContext().processNext(e)}),t=[])}})};__extends(function jn(){var e=Ze.call(this)||this;return Q(jn,e,function(r,i){function t(e){var t=r.getNotifyMgr();t&&t.eventsDiscarded([e],h)}r.initialize=function(e,t,n,r){i.initialize(e,t,n||new Ee(e),r||new Ye(e))},r.track=function(e){Te(r.getPerfMgr(),function(){return"AppInsightsCore:track"},function(){if(null===e)throw t(e),Error("Invalid telemetry item");!function(e){if(de.isNullOrUndefined(e.name))throw t(e),Error("telemetry name required")}(e),i.track(e)},function(){return{item:e}},!e.sync)},r.addNotificationListener=function(e){var t=r.getNotifyMgr();t&&t.addNotificationListener(e)},r.removeNotificationListener=function(e){var t=r.getNotifyMgr();t&&t.removeNotificationListener(e)},r.pollInternalLogs=function(n){var e=r.config.diagnosticLogInterval;return e&&0<e||(e=1e4),setInterval(function(){var e=r.logger?r.logger.queue:[];de.arrForEach(e,function(e){var t={name:n||"InternalMessageId: "+e.messageId,iKey:r.config.instrumentationKey,time:de.toISOString(new Date),baseType:we.dataType,baseData:{message:e.message}};r.track(t)}),e.length=0},e)}}),e},Ze);var et=(tt.sanitizeKeyAndAddUniqueness=function(e,t,n){var r=t.length,i=tt.sanitizeKey(e,t);if(i.length!==r){for(var a=0,o=i;n[o]!==undefined;)a++,o=i.substring(0,tt.MAX_NAME_LENGTH-3)+tt.padNumber(a);i=o}return i},tt.sanitizeKey=function(e,t){var n;return t&&(t=tt.trim(t.toString())).length>tt.MAX_NAME_LENGTH&&(n=t.substring(0,tt.MAX_NAME_LENGTH),e.throwInternal(xe.WARNING,57,"name is too long. It has been truncated to "+tt.MAX_NAME_LENGTH+" characters.",{name:t},!0)),n||t},tt.sanitizeString=function(e,t,n){var r;return void 0===n&&(n=tt.MAX_STRING_LENGTH),t&&(n=n||tt.MAX_STRING_LENGTH,(t=tt.trim(t)).toString().length>n&&(r=t.toString().substring(0,n),e.throwInternal(xe.WARNING,61,"string value is too long. It has been truncated to "+n+" characters.",{value:t},!0))),r||t},tt.sanitizeUrl=function(e,t){return tt.sanitizeInput(e,t,tt.MAX_URL_LENGTH,66)},tt.sanitizeMessage=function(e,t){var n;return t&&t.length>tt.MAX_MESSAGE_LENGTH&&(n=t.substring(0,tt.MAX_MESSAGE_LENGTH),e.throwInternal(xe.WARNING,56,"message is too long, it has been truncated to "+tt.MAX_MESSAGE_LENGTH+" characters.",{message:t},!0)),n||t},tt.sanitizeException=function(e,t){var n;return t&&t.length>tt.MAX_EXCEPTION_LENGTH&&(n=t.substring(0,tt.MAX_EXCEPTION_LENGTH),e.throwInternal(xe.WARNING,52,"exception is too long, it has been truncated to "+tt.MAX_EXCEPTION_LENGTH+" characters.",{exception:t},!0)),n||t},tt.sanitizeProperties=function(e,t){if(t){var n={};for(var r in t){var i=t[r];if(de.isObject(i)&&P())try{i=k().stringify(i)}catch(a){e.throwInternal(xe.WARNING,49,"custom property is not valid",{exception:a},!0)}i=tt.sanitizeString(e,i,tt.MAX_PROPERTY_LENGTH),n[r=tt.sanitizeKeyAndAddUniqueness(e,r,n)]=i}t=n}return t},tt.sanitizeMeasurements=function(e,t){if(t){var n={};for(var r in t){var i=t[r];n[r=tt.sanitizeKeyAndAddUniqueness(e,r,n)]=i}t=n}return t},tt.sanitizeId=function(e,t){return t?tt.sanitizeInput(e,t,tt.MAX_ID_LENGTH,69).toString():t},tt.sanitizeInput=function(e,t,n,r){var i;return t&&(t=tt.trim(t)).length>n&&(i=t.substring(0,n),e.throwInternal(xe.WARNING,r,"input is too long, it has been truncated to "+n+" characters.",{data:t},!0)),i||t},tt.padNumber=function(e){var t="00"+e;return t.substr(t.length-3)},tt.trim=function(e){return de.isString(e)?e.replace(/^\s+|\s+$/g,""):e},tt.MAX_NAME_LENGTH=150,tt.MAX_ID_LENGTH=128,tt.MAX_PROPERTY_LENGTH=8192,tt.MAX_STRING_LENGTH=1024,tt.MAX_URL_LENGTH=2048,tt.MAX_MESSAGE_LENGTH=32768,tt.MAX_EXCEPTION_LENGTH=32768,tt);function tt(){}var nt=C(),rt=de.isString,it=null,at=(ot.createDomEvent=function(e){var t,n=null;return de.isFunction(Event)?n=new Event(e):(t=E())&&t.createEvent&&(n=t.createEvent("Event")).initEvent(e,!0,!0),n},ot.disableStorage=function(){ot._canUseLocalStorage=!1,ot._canUseSessionStorage=!1},ot._getLocalStorageObject=function(){return ot.canUseLocalStorage()?ot._getVerifiedStorageObject(c.LocalStorage):null},ot._getVerifiedStorageObject=function(e){var t,n,r=null;try{if(de.isNullOrUndefined(T()))return null;n=new Date,(r=I(e===c.LocalStorage?"localStorage":"sessionStorage")).setItem(n.toString(),n.toString()),t=r.getItem(n.toString())!==n.toString(),r.removeItem(n.toString()),t&&(r=null)}catch(i){r=null}return r},ot.isInternalApplicationInsightsEndpoint=function(e){return!!~ot._internalEndpoints.indexOf(e.toLowerCase())},ot.canUseLocalStorage=function(){return ot._canUseLocalStorage===undefined&&(ot._canUseLocalStorage=!!ot._getVerifiedStorageObject(c.LocalStorage)),ot._canUseLocalStorage},ot.getStorage=function(e,t){var n=ot._getLocalStorageObject();if(null!==n)try{return n.getItem(t)}catch(r){ot._canUseLocalStorage=!1,e.throwInternal(xe.WARNING,1,"Browser failed read of local storage. "+ot.getExceptionName(r),{exception:ot.dump(r)})}return null},ot.setStorage=function(e,t,n){var r=ot._getLocalStorageObject();if(null!==r)try{return r.setItem(t,n),!0}catch(i){ot._canUseLocalStorage=!1,e.throwInternal(xe.WARNING,3,"Browser failed write to local storage. "+ot.getExceptionName(i),{exception:ot.dump(i)})}return!1},ot.removeStorage=function(e,t){var n=ot._getLocalStorageObject();if(null!==n)try{return n.removeItem(t),!0}catch(r){ot._canUseLocalStorage=!1,e.throwInternal(xe.WARNING,5,"Browser failed removal of local storage item. "+ot.getExceptionName(r),{exception:ot.dump(r)})}return!1},ot._getSessionStorageObject=function(){return ot.canUseSessionStorage()?ot._getVerifiedStorageObject(c.SessionStorage):null},ot.canUseSessionStorage=function(){return ot._canUseSessionStorage===undefined&&(ot._canUseSessionStorage=!!ot._getVerifiedStorageObject(c.SessionStorage)),ot._canUseSessionStorage},ot.getSessionStorageKeys=function(){var e=[];if(ot.canUseSessionStorage())for(var t in I("sessionStorage"))e.push(t);return e},ot.getSessionStorage=function(e,t){var n=ot._getSessionStorageObject();if(null!==n)try{return n.getItem(t)}catch(r){ot._canUseSessionStorage=!1,e.throwInternal(xe.WARNING,2,"Browser failed read of session storage. "+ot.getExceptionName(r),{exception:ot.dump(r)})}return null},ot.setSessionStorage=function(e,t,n){var r=ot._getSessionStorageObject();if(null!==r)try{return r.setItem(t,n),!0}catch(i){ot._canUseSessionStorage=!1,e.throwInternal(xe.WARNING,4,"Browser failed write to session storage. "+ot.getExceptionName(i),{exception:ot.dump(i)})}return!1},ot.removeSessionStorage=function(e,t){var n=ot._getSessionStorageObject();if(null!==n)try{return n.removeItem(t),!0}catch(r){ot._canUseSessionStorage=!1,e.throwInternal(xe.WARNING,6,"Browser failed removal of session storage item. "+ot.getExceptionName(r),{exception:ot.dump(r)})}return!1},ot.disableCookies=function(){de.disableCookies()},ot.canUseCookies=function(e){if(de._canUseCookies===undefined){de._canUseCookies=!1;try{de._canUseCookies=ot.document.cookie!==undefined}catch(t){e.throwInternal(xe.WARNING,68,"Cannot access document.cookie - "+ot.getExceptionName(t),{exception:ot.dump(t)})}}return de._canUseCookies},ot.disallowsSameSiteNone=function(e){return!(!rt(e)||!~e.indexOf("CPU iPhone OS 12")&&!~e.indexOf("iPad; CPU OS 12")&&!(~e.indexOf("Macintosh; Intel Mac OS X 10_14")&&~e.indexOf("Version/")&&~e.indexOf("Safari"))&&(!~e.indexOf("Macintosh; Intel Mac OS X 10_14")||(n=(t=e.length)-40,"AppleWebKit/605.1.15 (KHTML, like Gecko)"!=e.substring(0<=n?n:0,t)))&&!~e.indexOf("Chrome/5")&&!~e.indexOf("Chrome/6")&&(!~e.indexOf("UnrealEngine")||~e.indexOf("Chrome"))&&!~e.indexOf("UCBrowser/12")&&!~e.indexOf("UCBrowser/11"));var t,n},ot.setCookie=function(e,t,n,r){var i,a,o;ot.canUseCookies(e)&&(a=i="",r&&(i=";domain="+r),(o=b())&&"https:"===o.protocol&&(a=";secure",null===it&&(it=ot.disallowsSameSiteNone((C()||{}).userAgent)),it||(n+=";SameSite=None")),ot.document.cookie=t+"="+n+i+";path=/"+a)},ot.stringToBoolOrDefault=function(e,t){return void 0===t&&(t=!1),e===undefined||null===e?t:"true"==e.toString().toLowerCase()},ot.getCookie=function(e,t){if(ot.canUseCookies(e)){var n="";if(t&&t.length)for(var r=t+"=",i=ot.document.cookie.split(";"),a=0;a<i.length;a++){var o=i[a];if((o=ot.trim(o))&&!o.indexOf(r)){n=o.substring(r.length,i[a].length);break}}return n}},ot.deleteCookie=function(e,t){ot.canUseCookies(e)&&(ot.document.cookie=t+"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;")},ot.newId=function(){for(var e="",t=1073741824*Math.random();0<t;)e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[0|t%64],t=Math.floor(t/64);return e},ot.random32=function(){return 4294967296*Math.random()|0},ot.generateW3CId=function(){for(var e,t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],n="",r=0;r<4;r++)n+=t[15&(e=ot.random32())]+t[e>>4&15]+t[e>>8&15]+t[e>>12&15]+t[e>>16&15]+t[e>>20&15]+t[e>>24&15]+t[e>>28&15];var i=t[8+4*Math.random()|0];return n.substr(0,8)+n.substr(9,4)+"4"+n.substr(13,3)+i+n.substr(16,3)+n.substr(19,12)},ot.getIEVersion=function(e){void 0===e&&(e=null);var t=e?e.toLowerCase():nt?(nt.userAgent||"").toLowerCase():"";if(~t.indexOf("msie"))return parseInt(t.split("msie")[1]);if(t.indexOf("trident/")){var n=parseInt(t.split("trident/")[1]);if(n)return n+4}return null},ot.msToTimeSpan=function(e){(isNaN(e)||e<0)&&(e=0);var t=""+(e=Math.round(e))%1e3,n=""+Math.floor(e/1e3)%60,r=""+Math.floor(e/6e4)%60,i=""+Math.floor(e/36e5)%24,a=Math.floor(e/864e5),t=1===t.length?"00"+t:2===t.length?"0"+t:t,n=n.length<2?"0"+n:n,r=r.length<2?"0"+r:r;return(0<a?a+".":"")+(i=i.length<2?"0"+i:i)+":"+r+":"+n+"."+t},ot.isCrossOriginError=function(e,t,n,r,i){return("Script error."===e||"Script error"===e)&&!i},ot.dump=function(e){var t=Object[v].toString.call(e),n="";return"[object Error]"===t?n="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":P()&&(n=k().stringify(e)),t+n},ot.getExceptionName=function(e){return"[object Error]"===Object[v].toString.call(e)?e.name:""},ot.addEventHandler=function(e,t){return ve.Attach(N(),e,t)},ot.IsBeaconApiSupported=function(){return"sendBeacon"in nt&&nt.sendBeacon},ot.getExtension=function(e,t){for(var n=null,r=0;!n&&r<e.length;)e[r]&&e[r].identifier===t&&(n=e[r]),r++;return n},ot.document=E()||{},ot._canUseLocalStorage=undefined,ot._canUseSessionStorage=undefined,ot._internalEndpoints=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],ot.NotSpecified="not_specified",ot.trim=de.strTrim,ot.isArray=de.isArray,ot.isError=de.isError,ot.isDate=de.isDate,ot.toISOStringForIE8=de.toISOString,ot);function ot(){}var st=(ct.parseUrl=function(e){var t=ct._htmlAnchorIdx,n=ct._htmlAnchorElement,r=n[t];return ct.document.createElement?n[t]||(r=n[t]=ct.document.createElement("a")):r={host:ct.parseHost(e,!0)},r.href=e,++t>=n.length&&(t=0),ct._htmlAnchorIdx=t,r},ct.getAbsoluteUrl=function(e){var t,n=ct.parseUrl(e);return n&&(t=n.href),t},ct.getPathName=function(e){var t,n=ct.parseUrl(e);return n&&(t=n.pathname),t},ct.getCompleteUrl=function(e,t){return e?e.toUpperCase()+" "+t:t},ct.parseHost=function(e,t){var n=ct.parseFullHost(e,t);if(n){var r=n.match(/(www[0-9]?\.)?(.[^/:]+)(\:[\d]+)?/i);if(null!=r&&3<r.length&&rt(r[2])&&0<r[2].length)return r[2]+(r[3]||"")}return n},ct.parseFullHost=function(e,t){var n,r,i,a=null;return!e||null!=(n=e.match(/(\w*):\/\/(.[^/:]+)(\:[\d]+)?/i))&&2<n.length&&rt(n[2])&&0<n[2].length&&(a=n[2]||"",t&&2<n.length&&(r=(n[1]||"").toLowerCase(),i=n[3]||"",("http"==r&&":80"===i||"https"==r&&":443"===i)&&(i=""),a+=i)),a},ct.document=E()||{},ct._htmlAnchorIdx=0,ct._htmlAnchorElement=[null,null,null,null,null],ct);function ct(){}var ut=(lt.ParseDependencyPath=function(e,t,n,r){var i,a,o,s=r,c=r,s=t&&0<t.length?(o=(i=st.parseUrl(t)).host,s||(null!=i.pathname?("/"!=(a=0===i.pathname.length?"/":i.pathname)[0]&&(a="/"+a),c=i.pathname,et.sanitizeString(e,n?n+" "+a:a)):et.sanitizeString(e,t))):o=r;return{target:o,name:s,data:c}},lt);function lt(){}var ft=(gt.Now=function(){var e=D();return e&&e.now&&e.timing?e.now()+e.timing.navigationStart:(new Date).getTime()},gt.GetDuration=function(e,t){var n=null;return 0===e||0===t||de.isNullOrUndefined(e)||de.isNullOrUndefined(t)||(n=t-e),n},gt);function gt(){}var pt,dt=(__extends(ht,function(){}),ht);function ht(){return this}pt=function(){this.ver=1,this.sampleRate=100,this.tags={}},__extends(function(e,t,n){var r=pt.call(this)||this;return r.name=et.sanitizeString(e,n)||at.NotSpecified,r.data=t,r.time=de.toISOString(new Date),r.aiDataContract={time:d.Required,iKey:d.Required,name:d.Required,sampleRate:function(){return 100===r.sampleRate?d.Hidden:d.Required},tags:d.Required,data:d.Required},r},pt);var mt,vt=function(){},yt=(mt=vt,__extends(xt,mt),xt);function xt(){var e=mt.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var _t,St=(_t=yt,__extends(Tt,_t),Tt.envelopeType="Microsoft.ApplicationInsights.{0}.Event",Tt.dataType="EventData",Tt);function Tt(e,t,n,r){var i=_t.call(this)||this;return i.aiDataContract={ver:d.Required,name:d.Required,properties:d.Default,measurements:d.Default},i.name=et.sanitizeString(e,t)||at.NotSpecified,i.properties=et.sanitizeProperties(e,n),i.measurements=et.sanitizeMeasurements(e,r),i}var It,wt=(It=vt,__extends(Nt,It),Nt);function Nt(){var e=It.call(this)||this;return e.ver=2,e.exceptions=[],e.properties={},e.measurements={},e}var Et,Ct="error",bt=(Et=wt,__extends(Dt,Et),Dt.CreateFromInterface=function(t,e,n,r){var i=e.exceptions&&de.arrMap(e.exceptions,function(e){return kt.CreateFromInterface(t,e)});return new Dt(t,__assign({},e,{exceptions:i}),n,r)},Dt.prototype.toInterface=function(){var e=this,t=e.exceptions,n=e.properties,r=e.measurements,i=e.severityLevel,a=(e.ver,e.problemGroup),o=e.id,s=e.isManual;return{ver:"4.0",exceptions:t instanceof Array&&de.arrMap(t,function(e){return e.toInterface()})||undefined,severityLevel:i,properties:n,measurements:r,problemGroup:a,id:o,isManual:s}},Dt.CreateSimpleException=function(e,t,n,r,i,a){return{exceptions:[{hasFullStack:!0,message:e,stack:i,typeName:t}]}},Dt.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",Dt.dataType="ExceptionData",Dt);function Dt(e,t,n,r,i,a){var o,s=Et.call(this)||this;return s.aiDataContract={ver:d.Required,exceptions:d.Required,severityLevel:d.Default,properties:d.Default,measurements:d.Default},"ver"in(o=t)&&"exceptions"in o&&"properties"in o?(s.exceptions=t.exceptions,s.properties=t.properties,s.measurements=t.measurements,t.severityLevel&&(s.severityLevel=t.severityLevel),t.id&&(s.id=t.id),t.problemGroup&&(s.problemGroup=t.problemGroup),s.ver=2,de.isNullOrUndefined(t.isManual)||(s.isManual=t.isManual)):(s.exceptions=[new kt(e,t)],s.properties=et.sanitizeProperties(e,n)||{},s.measurements=et.sanitizeMeasurements(e,r),i&&(s.severityLevel=i),a&&(s.id=a)),s}var Pt,kt=(Pt=function(){this.hasFullStack=!0,this.parsedStack=[]},__extends(At,Pt),At.prototype.toInterface=function(){var e=this.parsedStack instanceof Array&&de.arrMap(this.parsedStack,function(e){return e.toInterface()});return{id:this.id,outerId:this.outerId,typeName:this.typeName,message:this.message,hasFullStack:this.hasFullStack,stack:this.stack,parsedStack:e||undefined}},At.CreateFromInterface=function(e,t){var n=t.parsedStack instanceof Array&&de.arrMap(t.parsedStack,function(e){return Mt.CreateFromInterface(e)})||t.parsedStack;return new At(e,__assign({},t,{parsedStack:n}))},At.parseStack=function(e){if(de.isString(e)){for(var t=e.split("\n"),n=[],r=0,i=0,a=0;a<=t.length;a++){var o,s=t[a];Mt.regex.test(s)&&(i+=(o=new Mt(t[a],r++)).sizeInBytes,n.push(o))}if(32768<i)for(var c=0,u=n.length-1,l=0,f=c,g=u;c<u;){if(32768<(l+=n[c].sizeInBytes+n[u].sizeInBytes)){var p=g-f+1;n.splice(f,p);break}f=c,g=u,c++,u--}}return n},At);function At(e,t){var n,r,i=Pt.call(this)||this;return i.aiDataContract={id:d.Default,outerId:d.Default,typeName:d.Required,message:d.Required,hasFullStack:d.Default,stack:d.Default,parsedStack:d.Array},"hasFullStack"in t&&"typeName"in t?(i.typeName=t.typeName,i.message=t.message,i.stack=t.stack,i.parsedStack=t.parsedStack,i.hasFullStack=t.hasFullStack):(n=t,at.isError(n)||(n=n[Ct]||n.evt||n),i.typeName=et.sanitizeString(e,function(e){var t="";if(e&&!(t=e.typeName||e.name||""))try{var n=/function (.{1,})\(/.exec(e.constructor.toString()),t=n&&1<n.length?n[1]:""}catch(r){}return t}(n))||at.NotSpecified,i.message=et.sanitizeMessage(e,t.message)||at.NotSpecified,r=t.stack,i.parsedStack=At.parseStack(r),i.stack=et.sanitizeException(e,r),i.hasFullStack=at.isArray(i.parsedStack)&&0<i.parsedStack.length),i}var Lt,Mt=(Lt=function(){},__extends(Rt,Lt),Rt.CreateFromInterface=function(e){return new Rt(e,null)},Rt.prototype.toInterface=function(){return{level:this.level,method:this.method,assembly:this.assembly,fileName:this.fileName,line:this.line}},Rt.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,Rt.baseSize=58,Rt);function Rt(e,t){var n,r,i=Lt.call(this)||this;return i.sizeInBytes=0,i.aiDataContract={level:d.Required,method:d.Required,assembly:d.Default,fileName:d.Default,line:d.Default},"string"==typeof e?(n=e,i.level=t,i.method="<no_method>",i.assembly=at.trim(n),i.fileName="",i.line=0,(r=n.match(Rt.regex))&&5<=r.length&&(i.method=at.trim(r[2])||i.method,i.fileName=at.trim(r[4]),i.line=parseInt(r[5])||0)):(i.level=e.level,i.method=e.method,i.assembly=e.assembly,i.fileName=e.fileName,i.line=e.line,i.sizeInBytes=0),i.sizeInBytes+=i.method.length,i.sizeInBytes+=i.fileName.length,i.sizeInBytes+=i.assembly.length,i.sizeInBytes+=Rt.baseSize,i.sizeInBytes+=i.level.toString().length,i.sizeInBytes+=i.line.toString().length,i}var Ot,Ut,zt,Vt=(Ot=vt,__extends(Gt,Ot),Gt);function Gt(){var e=Ot.call(this)||this;return e.ver=2,e.metrics=[],e.properties={},e.measurements={},e}(zt=Ut={})[zt.Measurement=0]="Measurement",zt[zt.Aggregation=1]="Aggregation";var jt,qt=(jt=function(){this.kind=Ut.Measurement},__extends(Ft,jt),Ft);function Ft(){var e=jt.apply(this,arguments)||this;return e.aiDataContract={name:d.Required,kind:d.Default,value:d.Required,count:d.Default,min:d.Default,max:d.Default,stdDev:d.Default},e}var Bt,Kt=(Bt=Vt,__extends(Wt,Bt),Wt.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",Wt.dataType="MetricData",Wt);function Wt(e,t,n,r,i,a,o,s){var c=Bt.call(this)||this;c.aiDataContract={ver:d.Required,metrics:d.Required,properties:d.Default};var u=new qt;return u.count=0<r?r:undefined,u.max=isNaN(a)||null===a?undefined:a,u.min=isNaN(i)||null===i?undefined:i,u.name=et.sanitizeString(e,t)||at.NotSpecified,u.value=n,c.metrics=[u],c.properties=et.sanitizeProperties(e,o),c.measurements=et.sanitizeMeasurements(e,s),c}var Ht,Xt=(Ht=yt,__extends(Jt,Ht),Jt);function Jt(){var e=Ht.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var $t,Qt=($t=Xt,__extends(Yt,$t),Yt.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",Yt.dataType="PageviewData",Yt);function Yt(e,t,n,r,i,a,o){var s=$t.call(this)||this;return s.aiDataContract={ver:d.Required,name:d.Default,url:d.Default,duration:d.Default,properties:d.Default,measurements:d.Default,id:d.Default},s.id=et.sanitizeId(e,o),s.url=et.sanitizeUrl(e,n),s.name=et.sanitizeString(e,t)||at.NotSpecified,isNaN(r)||(s.duration=at.msToTimeSpan(r)),s.properties=et.sanitizeProperties(e,i),s.measurements=et.sanitizeMeasurements(e,a),s}var Zt,en=(Zt=vt,__extends(tn,Zt),tn);function tn(){var e=Zt.call(this)||this;return e.ver=2,e.success=!0,e.properties={},e.measurements={},e}var nn,rn=(nn=en,__extends(an,nn),an.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",an.dataType="RemoteDependencyData",an);function an(e,t,n,r,i,a,o,s,c,u,l,f){void 0===c&&(c="Ajax");var g=nn.call(this)||this;g.aiDataContract={id:d.Required,ver:d.Required,name:d.Default,resultCode:d.Default,duration:d.Default,success:d.Default,data:d.Default,target:d.Default,type:d.Default,properties:d.Default,measurements:d.Default,kind:d.Default,value:d.Default,count:d.Default,min:d.Default,max:d.Default,stdDev:d.Default,dependencyKind:d.Default,dependencySource:d.Default,commandName:d.Default,dependencyTypeName:d.Default},g.id=t,g.duration=at.msToTimeSpan(i),g.success=a,g.resultCode=o+"",g.type=et.sanitizeString(e,c);var p=ut.ParseDependencyPath(e,n,s,r);return g.data=et.sanitizeUrl(e,r)||p.data,g.target=et.sanitizeString(e,p.target),u&&(g.target=g.target+" | "+u),g.name=et.sanitizeString(e,p.name),g.properties=et.sanitizeProperties(e,l),g.measurements=et.sanitizeMeasurements(e,f),g}var on,sn=(on=vt,__extends(cn,on),cn);function cn(){var e=on.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var un,ln=(un=sn,__extends(fn,un),fn.envelopeType="Microsoft.ApplicationInsights.{0}.Message",fn.dataType="MessageData",fn);function fn(e,t,n,r,i){var a=un.call(this)||this;return a.aiDataContract={ver:d.Required,message:d.Required,severityLevel:d.Default,properties:d.Default},t=t||at.NotSpecified,a.message=et.sanitizeMessage(e,t),a.properties=et.sanitizeProperties(e,r),a.measurements=et.sanitizeMeasurements(e,i),n&&(a.severityLevel=n),a}var gn,pn=(gn=Xt,__extends(dn,gn),dn);function dn(){var e=gn.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var hn,mn,vn,yn,xn=(hn=pn,__extends(_n,hn),_n.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",_n.dataType="PageviewPerformanceData",_n);function _n(e,t,n,r,i,a,o){var s=hn.call(this)||this;return s.aiDataContract={ver:d.Required,name:d.Default,url:d.Default,duration:d.Default,perfTotal:d.Default,networkConnect:d.Default,sentRequest:d.Default,receivedResponse:d.Default,domProcessing:d.Default,properties:d.Default,measurements:d.Default},s.url=et.sanitizeUrl(e,n),s.name=et.sanitizeString(e,t)||at.NotSpecified,s.properties=et.sanitizeProperties(e,i),s.measurements=et.sanitizeMeasurements(e,a),o&&(s.domProcessing=o.domProcessing,s.duration=o.duration,s.networkConnect=o.networkConnect,s.perfTotal=o.perfTotal,s.receivedResponse=o.receivedResponse,s.sentRequest=o.sentRequest),s}mn=dt,__extends(function(e,t){var n=mn.call(this)||this;return n.aiDataContract={baseType:d.Required,baseData:d.Required},n.baseType=e,n.baseData=t,n},mn),(yn=vn={})[yn.Verbose=0]="Verbose",yn[yn.Information=1]="Information",yn[yn.Warning=2]="Warning",yn[yn.Error=3]="Error",yn[yn.Critical=4]="Critical";var Sn=(Tn.create=function(e,t,n,r,i,a){if(n=et.sanitizeString(r,n)||at.NotSpecified,de.isNullOrUndefined(e)||de.isNullOrUndefined(t)||de.isNullOrUndefined(n))throw Error("Input doesn't contain all required fields");var o={name:n,time:de.toISOString(new Date),iKey:"",ext:a||{},tags:[],data:{},baseType:t,baseData:e};if(!de.isNullOrUndefined(i))for(var s in i)i.hasOwnProperty(s)&&(o.data[s]=i[s]);return o},Tn);function Tn(){}var In=function qn(y,x,t,_){Q(qn,this,function(e){var f,g=de.arrForEach,p=de.isNullOrUndefined,d=null,h=[],m=!1;function v(){t&&g(t.getTransmissionControls(),function(e){g(e,function(e){return e.flush(!0)})})}t&&(f=t.logger),e.trackPageView=function(r,i){var e,a=r.name;!p(a)&&"string"==typeof a||(e=E(),a=r.name=e&&e.title||"");var t,o=r.uri;if(!p(o)&&"string"==typeof o||(t=b(),o=r.uri=t&&t.href||""),!_.isPerformanceTimingSupported())return y.sendPageViewInternal(r,i),v(),void f.throwInternal(xe.WARNING,25,"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 n,s,c=!1,u=_.getPerformanceTiming().navigationStart,l=ft.GetDuration(u,+new Date);_.shouldCollectDuration(l)||(l=undefined),p(i)||p(i.duration)||(n=i.duration),!x&&isNaN(n)||(isNaN(n)&&((i=i||{}).duration=l),y.sendPageViewInternal(r,i),v(),c=!0),i=i||{},s=function(){var e,t=!1;try{_.isPerformanceTimingDataReady()?(t=!0,e={name:a,uri:o},_.populatePageViewPerformanceEvent(e),e.isValid||c?(c||(i.duration=e.durationMs,y.sendPageViewInternal(r,i)),m||(y.sendPageViewPerformanceInternal(e,i),m=!0)):(i.duration=l,y.sendPageViewInternal(r,i))):6e4<ft.GetDuration(u,+new Date)&&(t=!0,c||(i.duration=6e4,y.sendPageViewInternal(r,i)))}catch(n){f.throwInternal(xe.CRITICAL,38,"trackPageView failed on page load calculation: "+at.getExceptionName(n),{exception:at.dump(n)})}return t},h.push(s),d=d||setInterval(function(){var e=h.slice(0),t=!1;h=[],g(e,function(e){e()?t=!0:h.push(e)}),0===h.length&&(clearInterval(d),d=null),t&&v()},100)}})},wn=(Nn.prototype.trackPreviousPageVisit=function(e,t){try{var n=this.restartPageVisitTimer(e,t);n&&this.pageVisitTimeTrackingHandler(n.pageName,n.pageUrl,n.pageVisitTime)}catch(r){this._logger.warnToConsole("Auto track page visit time failed, metric will not be collected: "+at.dump(r))}},Nn.prototype.restartPageVisitTimer=function(e,t){try{var n=this.stopPageVisitTimer();return this.startPageVisitTimer(e,t),n}catch(r){return this._logger.warnToConsole("Call to restart failed: "+at.dump(r)),null}},Nn.prototype.startPageVisitTimer=function(e,t){try{if(at.canUseSessionStorage()){if(null!=at.getSessionStorage(this._logger,this.prevPageVisitDataKeyName))throw Error("Cannot call startPageVisit consecutively without first calling stopPageVisit");var n=new En(e,t),r=k().stringify(n);at.setSessionStorage(this._logger,this.prevPageVisitDataKeyName,r)}}catch(i){this._logger.warnToConsole("Call to start failed: "+at.dump(i))}},Nn.prototype.stopPageVisitTimer=function(){try{if(at.canUseSessionStorage()){var e=Date.now(),t=at.getSessionStorage(this._logger,this.prevPageVisitDataKeyName);if(t&&P()){var n=k().parse(t);return n.pageVisitTime=e-n.pageVisitStartTime,at.removeSessionStorage(this._logger,this.prevPageVisitDataKeyName),n}return null}return null}catch(r){return this._logger.warnToConsole("Stop page visit timer failed: "+at.dump(r)),null}},Nn);function Nn(e,t){this.prevPageVisitDataKeyName="prevPageVisitData",this.pageVisitTimeTrackingHandler=t,this._logger=e}var En=function(e,t){this.pageVisitStartTime=Date.now(),this.pageName=e,this.pageUrl=t},Cn=(bn.prototype.populatePageViewPerformanceEvent=function(e){e.isValid=!1;var t,n,r,i,a,o=this.getPerformanceNavigationTiming(),s=this.getPerformanceTiming();(o||s)&&(a=o?(t=o.duration,n=ft.GetDuration(o.startTime,o.connectEnd),r=ft.GetDuration(o.requestStart,o.responseStart),i=ft.GetDuration(o.responseStart,o.responseEnd),ft.GetDuration(o.responseEnd,o.loadEventEnd)):(t=ft.GetDuration(s.navigationStart,s.loadEventEnd),n=ft.GetDuration(s.navigationStart,s.connectEnd),r=ft.GetDuration(s.requestStart,s.responseStart),i=ft.GetDuration(s.responseStart,s.responseEnd),ft.GetDuration(s.responseEnd,s.loadEventEnd)),0===t?this._logger.throwInternal(xe.WARNING,10,"error calculating page view performance.",{total:t,network:n,request:r,response:i,dom:a}):this.shouldCollectDuration(t,n,r,i,a)?t<Math.floor(n)+Math.floor(r)+Math.floor(i)+Math.floor(a)?this._logger.throwInternal(xe.WARNING,8,"client performance math error.",{total:t,network:n,request:r,response:i,dom:a}):(e.durationMs=t,e.perfTotal=e.duration=at.msToTimeSpan(t),e.networkConnect=at.msToTimeSpan(n),e.sentRequest=at.msToTimeSpan(r),e.receivedResponse=at.msToTimeSpan(i),e.domProcessing=at.msToTimeSpan(a),e.isValid=!0):this._logger.throwInternal(xe.WARNING,45,"Invalid page load duration value. Browser perf data won't be sent.",{total:t,network:n,request:r,response:i,dom:a}))},bn.prototype.getPerformanceTiming=function(){return this.isPerformanceTimingSupported()?D().timing:null},bn.prototype.getPerformanceNavigationTiming=function(){return this.isPerformanceNavigationTimingSupported()?D().getEntriesByType("navigation")[0]:null},bn.prototype.isPerformanceNavigationTimingSupported=function(){var e=D();return e&&e.getEntriesByType&&0<e.getEntriesByType("navigation").length},bn.prototype.isPerformanceTimingSupported=function(){var e=D();return e&&e.timing},bn.prototype.isPerformanceTimingDataReady=function(){var e=D(),t=e?e.timing:0;return t&&0<t.domainLookupStart&&0<t.navigationStart&&0<t.responseStart&&0<t.requestStart&&0<t.loadEventEnd&&0<t.responseEnd&&0<t.connectEnd&&0<t.domLoading},bn.prototype.shouldCollectDuration=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=["googlebot","adsbot-google","apis-google","mediapartners-google"],r=(C()||{}).userAgent,i=!1;if(r)for(var a=0;a<n.length;a++)i=i||!!~r.toLowerCase().indexOf(n[a]);if(i)return!1;for(a=0;a<e.length;a++)if(e[a]>=this.MAX_DURATION_ALLOWED)return!1;return!0},bn);function bn(e){this.MAX_DURATION_ALLOWED=36e5,e&&(this._logger=e.logger)}var Dn="duration";function Pn(e,t){e&&e.dispatchEvent&&t&&e.dispatchEvent(t)}var kn,An=(kn=Me,__extends(Ln,kn),Ln.getDefaultConfig=function(e){return(e=e||{}).sessionRenewalMs=18e5,e.sessionExpirationMs=864e5,e.disableExceptionTracking=at.stringToBoolOrDefault(e.disableExceptionTracking),e.autoTrackPageVisitTime=at.stringToBoolOrDefault(e.autoTrackPageVisitTime),e.overridePageViewDuration=at.stringToBoolOrDefault(e.overridePageViewDuration),e.enableUnhandledPromiseRejectionTracking=at.stringToBoolOrDefault(e.enableUnhandledPromiseRejectionTracking),(isNaN(e.samplingPercentage)||e.samplingPercentage<=0||100<=e.samplingPercentage)&&(e.samplingPercentage=100),e.isCookieUseDisabled=at.stringToBoolOrDefault(e.isCookieUseDisabled),e.isStorageUseDisabled=at.stringToBoolOrDefault(e.isStorageUseDisabled),e.isBrowserLinkTrackingEnabled=at.stringToBoolOrDefault(e.isBrowserLinkTrackingEnabled),e.enableAutoRouteTracking=at.stringToBoolOrDefault(e.enableAutoRouteTracking),e.namePrefix=e.namePrefix||"",e},Ln.prototype.processTelemetry=function(a,o){var s=this;Te(this.core,function(){return s.identifier+":processTelemetry"},function(){var e=!1,t=s._telemetryInitializers.length;o=s._getTelCtx(o);for(var n=0;n<t;++n){var r=s._telemetryInitializers[n];if(r)try{if(!1===r.call(null,a)){e=!0;break}}catch(i){o.diagLog().throwInternal(xe.CRITICAL,64,"One of telemetry initializers failed, telemetry item will not be sent: "+at.getExceptionName(i),{exception:at.dump(i)},!0)}}e||s.processNext(a,o)},function(){return{item:a}},!a.sync)},Ln.prototype.trackEvent=function(e,t){try{var n=Sn.create(e,St.dataType,St.envelopeType,this.diagLog(),t);this.core.track(n)}catch(r){this.diagLog().throwInternal(xe.WARNING,39,"trackTrace failed, trace will not be collected: "+at.getExceptionName(r),{exception:at.dump(r)})}},Ln.prototype.startTrackEvent=function(e){try{this._eventTracking.start(e)}catch(t){this.diagLog().throwInternal(xe.CRITICAL,29,"startTrackEvent failed, event will not be collected: "+at.getExceptionName(t),{exception:at.dump(t)})}},Ln.prototype.stopTrackEvent=function(e,t,n){try{this._eventTracking.stop(e,undefined,t)}catch(r){this.diagLog().throwInternal(xe.CRITICAL,30,"stopTrackEvent failed, event will not be collected: "+at.getExceptionName(r),{exception:at.dump(r)})}},Ln.prototype.trackTrace=function(e,t){try{var n=Sn.create(e,ln.dataType,ln.envelopeType,this.diagLog(),t);this.core.track(n)}catch(r){this.diagLog().throwInternal(xe.WARNING,39,"trackTrace failed, trace will not be collected: "+at.getExceptionName(r),{exception:at.dump(r)})}},Ln.prototype.trackMetric=function(e,t){try{var n=Sn.create(e,Kt.dataType,Kt.envelopeType,this.diagLog(),t);this.core.track(n)}catch(r){this.diagLog().throwInternal(xe.CRITICAL,36,"trackMetric failed, metric will not be collected: "+at.getExceptionName(r),{exception:at.dump(r)})}},Ln.prototype.trackPageView=function(e,t){try{var n=e||{};this._pageViewManager.trackPageView(n,__assign({},n.properties,n.measurements,t)),this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(n.name,n.uri)}catch(r){this.diagLog().throwInternal(xe.CRITICAL,37,"trackPageView failed, page view will not be collected: "+at.getExceptionName(r),{exception:at.dump(r)})}},Ln.prototype.sendPageViewInternal=function(e,t,n){var r=E();r&&(e.refUri=e.refUri===undefined?r.referrer:e.refUri);var i=Sn.create(e,Qt.dataType,Qt.envelopeType,this.diagLog(),t,n);this.core.track(i),this._trackAjaxAttempts=0},Ln.prototype.sendPageViewPerformanceInternal=function(e,t,n){var r=Sn.create(e,xn.dataType,xn.envelopeType,this.diagLog(),t,n);this.core.track(r)},Ln.prototype.trackPageViewPerformance=function(e,t){try{this._pageViewPerformanceManager.populatePageViewPerformanceEvent(e),this.sendPageViewPerformanceInternal(e,t)}catch(n){this.diagLog().throwInternal(xe.CRITICAL,37,"trackPageViewPerformance failed, page view will not be collected: "+at.getExceptionName(n),{exception:at.dump(n)})}},Ln.prototype.startTrackPage=function(e){try{var t;"string"!=typeof e&&(e=(t=E())&&t.title||""),this._pageTracking.start(e)}catch(n){this.diagLog().throwInternal(xe.CRITICAL,31,"startTrackPage failed, page view may not be collected: "+at.getExceptionName(n),{exception:at.dump(n)})}},Ln.prototype.stopTrackPage=function(e,t,n,r){try{var i,a;"string"!=typeof e&&(e=(i=E())&&i.title||""),"string"!=typeof t&&(t=(a=b())&&a.href||""),this._pageTracking.stop(e,t,n,r),this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(e,t)}catch(o){this.diagLog().throwInternal(xe.CRITICAL,32,"stopTrackPage failed, page view will not be collected: "+at.getExceptionName(o),{exception:at.dump(o)})}},Ln.prototype.sendExceptionInternal=function(e,t,n){var r=new bt(this.diagLog(),e.exception||Error(at.NotSpecified),e.properties,e.measurements,e.severityLevel,e.id).toInterface(),i=Sn.create(r,bt.dataType,bt.envelopeType,this.diagLog(),t,n);this.core.track(i)},Ln.prototype.trackException=function(e,t){try{this.sendExceptionInternal(e,t)}catch(n){this.diagLog().throwInternal(xe.CRITICAL,35,"trackException failed, exception will not be collected: "+at.getExceptionName(n),{exception:at.dump(n)})}},Ln.prototype._onerror=function(e){try{var t,n={url:e&&e.url||(E()||{}).URL,lineNumber:e.lineNumber,columnNumber:e.columnNumber,message:e.message};at.isCrossOriginError(e.message,e.url,e.lineNumber,e.columnNumber,e.error)?this._sendCORSException(n.url):(at.isError(e.error)||(t="window.onerror@"+n.url+":"+e.lineNumber+":"+(e.columnNumber||0),e.error=Error(e.message),e.error.stack=t),this.trackException({exception:e.error,severityLevel:vn.Error},n))}catch(i){var r=e.error?e.error.name+", "+e.error.message:"null";this.diagLog().throwInternal(xe.CRITICAL,11,"_onError threw exception while logging error, error will not be collected: "+at.getExceptionName(i),{exception:at.dump(i),errorString:r})}},Ln.prototype.addTelemetryInitializer=function(e){this._telemetryInitializers.push(e)},Ln.prototype.initialize=function(e,t,n,r){var o=this;if(!this.isInitialized()){if(de.isNullOrUndefined(t))throw Error("Error initializing");kn.prototype.initialize.call(this,e,t,n,r),this.setInitialized(!1);var i=this._getTelCtx(),a=this.identifier;this._globalconfig={instrumentationKey:e.instrumentationKey,endpointUrl:e.endpointUrl||"https://dc.services.visualstudio.com/v2/track"},this.config=i.getExtCfg(a);var s=Ln.getDefaultConfig();if(s!==undefined){for(var c in s)this.config[c]=i.getConfig(a,c,s[c]);if(this._globalconfig)for(var c in s)this._globalconfig[c]===undefined&&(this._globalconfig[c]=s[c])}this.config.isCookieUseDisabled&&at.disableCookies(),this.config.isStorageUseDisabled&&at.disableStorage();var u={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}};this._pageViewPerformanceManager=new Cn(this.core),this._pageViewManager=new In(this,this.config.overridePageViewDuration,this.core,this._pageViewPerformanceManager),this._pageVisitTimeManager=new wn(this.diagLog(),function(e,t,n){return o.trackPageVisitTime(e,t,n)}),this._telemetryInitializers=this._telemetryInitializers||[],this._addDefaultTelemetryInitializers(u),this._eventTracking=new Mn(this.diagLog(),"trackEvent"),this._eventTracking.action=function(e,t,n,r){(r=r||{})[Dn]=n.toString(),o.trackEvent({name:e,properties:r})},this._pageTracking=new Mn(this.diagLog(),"trackPageView"),this._pageTracking.action=function(e,t,n,r,i){de.isNullOrUndefined(r)&&(r={}),r[Dn]=n.toString();var a={name:e,uri:t,properties:r,measurements:i};o.sendPageViewInternal(a,r)};var l,f,g,p,d,h=N(),m=typeof history===x&&history?history:I("history"),v=b(),y=this;!1===this.config.disableExceptionTracking&&!this.config.autoExceptionInstrumented&&h&&(l=h.onerror,h.onerror=function(e,t,n,r,i){var a=l&&l(e,t,n,r,i);return!0!==a&&y._onerror({message:e,url:t,lineNumber:n,columnNumber:r,error:i}),a},this.config.autoExceptionInstrumented=!0),!1===this.config.disableExceptionTracking&&!0===this.config.enableUnhandledPromiseRejectionTracking&&!this.config.autoUnhandledPromiseInstrumented&&h&&(f=h.onunhandledrejection,h.onunhandledrejection=function(e){var t=f&&f.call(h,e);return!0!==t&&y._onerror({message:e.reason.toString(),error:e.reason instanceof Error?e.reason:Error(e.reason.toString()),url:v?v.href:"",lineNumber:0,columnNumber:0}),t},this.config.autoUnhandledPromiseInstrumented=!0),!0===this.config.enableAutoRouteTracking&&m&&de.isFunction(m.pushState)&&de.isFunction(m.replaceState)&&h&&"undefined"!=typeof Event&&(g=this,de.arrForEach(n,function(e){"AppInsightsPropertiesPlugin"===e.identifier&&(o._properties=e)}),m.pushState=(d=m.pushState,function(){var e=d.apply(this,arguments);return Pn(h,at.createDomEvent(g.config.namePrefix+"pushState")),Pn(h,at.createDomEvent(g.config.namePrefix+"locationchange")),e}),m.replaceState=(p=m.replaceState,function(){var e=p.apply(this,arguments);return Pn(h,at.createDomEvent(g.config.namePrefix+"replaceState")),Pn(h,at.createDomEvent(g.config.namePrefix+"locationchange")),e}),h.addEventListener&&(h.addEventListener(g.config.namePrefix+"popstate",function(){Pn(h,at.createDomEvent(g.config.namePrefix+"locationchange"))}),h.addEventListener(g.config.namePrefix+"locationchange",function(){g._properties&&g._properties.context&&g._properties.context.telemetryTrace&&(g._properties.context.telemetryTrace.traceID=at.generateW3CId(),g._properties.context.telemetryTrace.name=v&&v.pathname||"_unknown_"),o._currUri&&(o._prevUri=o._currUri),o._currUri=v&&v.href||"",setTimeout((function(e){g.trackPageView({refUri:e,properties:{duration:0}})}).bind(o,o._prevUri),g.autoRoutePVDelay)}))),this.setInitialized(!0)}},Ln.prototype.trackPageVisitTime=function(e,t,n){var r={PageName:e,PageUrl:t};this.trackMetric({name:"PageVisitTime",average:n,max:n,min:n,sampleCount:1},r)},Ln.prototype._addDefaultTelemetryInitializers=function(e){var r;e.isBrowserLinkTrackingEnabled()||(r=["/browserLinkSignalR/","/__browserLink/"],this._addTelemetryInitializer(function(e){if(e.baseType===rn.dataType){var t=e.baseData;if(t)for(var n=0;n<r.length;n++)if(t.target&&~t.target.indexOf(r[n]))return!1}return!0}))},Ln.prototype._addTelemetryInitializer=function(e){this._telemetryInitializers.push(e)},Ln.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:undefined},n=Sn.create(t,bt.dataType,bt.envelopeType,this.diagLog(),{url:e});this.core.track(n)},Ln.Version="2.5.7",Ln);function Ln(){var e=kn.call(this)||this;e.identifier="ApplicationInsightsAnalytics",e.priority=180,e.autoRoutePVDelay=500,e._trackAjaxAttempts=0;var t=b();return e._prevUri=t&&t.href||"",e}var Mn=(Rn.prototype.start=function(e){"undefined"!=typeof this._events[e]&&this._logger.throwInternal(xe.WARNING,62,"start was called more than once for this event without calling stop.",{name:this._name,key:e},!0),this._events[e]=+new Date},Rn.prototype.stop=function(e,t,n,r){var i,a,o=this._events[e];isNaN(o)?this._logger.throwInternal(xe.WARNING,63,"stop was called without a corresponding start.",{name:this._name,key:e},!0):(i=+new Date,a=ft.GetDuration(o,i),this.action(e,t,a,n,r)),delete this._events[e],this._events[e]=undefined},Rn);function Rn(e,t){this._name=t,this._events={},this._logger=e}e.ApplicationInsights=An,function(e,t,n){var r=Object.defineProperty;if(r)try{return r(e,t,n)}catch(i){}typeof n.value!==undefined&&(e[t]=n.value)}(e,"__esModule",{value:!0})};"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e.Microsoft=e.Microsoft||{},e.Microsoft.ApplicationInsights=e.Microsoft.ApplicationInsights||{}));
var e=this,t=function(e){"use strict";var i="function",a="object",t="undefined",o="prototype",s="hasOwnProperty";function n(){return typeof globalThis!==t&&globalThis?globalThis:typeof self!==t&&self?self:typeof window!==t&&window?window:typeof global!==t&&global?global:null}function r(e){var t=Object.create;if(t)return t(e);if(null==e)return{};var n=typeof e;if(n!=a&&n!=i)throw new TypeError("Object prototype may only be an Object:"+e);function r(){}return r[o]=e,new r}var c,u,d,l,f,g=function(e,t){return(g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t[s](n)&&(e[n]=t[n])})(e,t)},p=n()||{};__assign=p.__assign=p.__assign||Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object[o][s].call(t,i)&&(e[i]=t[i]);return e},__extends=p.__extends=p.__extends||function(e,t){function n(){this.constructor=e}g(e,t),e[o]=null===t?r(t):(n[o]=t[o],new n)},(u=c={})[u.LocalStorage=0]="LocalStorage",u[u.SessionStorage=1]="SessionStorage",(l=d=d||{})[l.Default=0]="Default",l[l.Required=1]="Required",l[l.Array=2]="Array",l[l.Hidden=4]="Hidden",(f={})[f.AI=0]="AI",f[f.AI_AND_W3C=1]="AI_AND_W3C",f[f.W3C=2]="W3C";var h=2,m=t,x=a,v=o,y="window",_="location",S="JSON",T=n;function w(e){var t=T();return t&&t[e]?t[e]:e===y&&I()?window:null}function I(){return typeof window===x&&window}function N(){return I()?window:w(y)}function E(){return typeof document===x&&document?document:w("document")}function C(){return typeof navigator===x&&navigator?navigator:w("navigator")}function b(){return typeof location===x&&location?location:w(_)}function D(){return w("performance")}function P(){return typeof JSON===x&&JSON||null!==w(S)}function k(){return P()?JSON||w(S):null}var A="attachEvent",L="addEventListener",M="detachEvent",R="removeEventListener";function O(e,t){return typeof e===t}function U(e){return O(e,t)||e===undefined}function z(e){return U(e)||null===e}function V(e,t){return e&&Object[o].hasOwnProperty.call(e,t)}function G(e){return O(e,a)}function j(e){return O(e,i)}function q(e,t,n,r){void 0===r&&(r=!1);var i=!1;if(!z(e))try{z(e[L])?z(e[A])||(e[A]("on"+t,n),i=!0):(e[L](t,n,r),i=!0)}catch(a){}return i}function F(e,t,n,r){if(void 0===r&&(r=!1),!z(e))try{z(e[R])?z(e[M])||e[M]("on"+t,n):e[R](t,n,r)}catch(i){}}var B=(K.isDate=function(e){return"[object Date]"===Object[o].toString.call(e)},K.isArray=function(e){return"[object Array]"===Object[o].toString.call(e)},K.isError=function(e){return"[object Error]"===Object[o].toString.call(e)},K.isString=function(e){return O(e,"string")},K.isNumber=function(e){return O(e,"number")},K.isBoolean=function(e){return O(e,"boolean")},K.disableCookies=function(){K._canUseCookies=!1},K.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(X,function(e){var t,n=0|((t=w("crypto"))?t.getRandomValues(new Uint8Array(1))[0]%16:16*Math.random());return("x"===e?n:3&n|8).toString(16)})},K.toISOString=function(e){if(K.isDate(e)){var t=function(e){var t=e+"";return 1===t.length&&(t="0"+t),t};return e.getUTCFullYear()+"-"+t(1+e.getUTCMonth())+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())+"."+((e.getUTCMilliseconds()/1e3).toFixed(3)+"").slice(2,5)+"Z"}},K.arrForEach=function(e,t,n){for(var r=e.length,i=0;i<r;i++)i in e&&t.call(n||e,e[i],i,e)},K.arrIndexOf=function(e,t,n){for(var r=e.length,i=n||0,a=Math.max(0<=i?i:r-Math.abs(i),0);a<r;a++)if(a in e&&e[a]===t)return a;return-1},K.arrMap=function(e,t,n){for(var r=e.length,i=n||e,a=Array(r),o=0;o<r;o++)o in e&&(a[o]=t.call(i,e[o],e));return a},K.arrReduce=function(e,t,n){var r,i=e.length,a=0;if(3<=arguments.length)r=n;else{for(;a<i&&!(a in e);)a++;r=e[a++]}for(;a<i;)a in e&&(r=t(r,e[a],a,e)),a++;return r},K.strTrim=function(e){return K.isString(e)?e.replace(/^\s+|\s+$/g,""):e},K.objKeys=function(e){var t=!{toString:null}.propertyIsEnumerable("toString");if(!(j(e)||G(e)&&null!==e))throw new TypeError("objKeys called on non-object");var n=[];for(var r in e)V(e,r)&&n.push(r);if(t)for(var i=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],a=i.length,o=0;o<a;o++)V(e,i[o])&&n.push(i[o]);return n},K.objDefineAccessors=function(e,t,n,r){var i=Object.defineProperty;if(i)try{var a={enumerable:!0,configurable:!0};return n&&(a.get=n),r&&(a.set=r),i(e,t,a),!0}catch(o){}return!1},K.addEventHandler=function(e,t){var n=!1,r=N();r&&(n=q(r,e,t),n=q(r.body,e,t)||n);var i=E();return i&&(n=J.Attach(i,e,t)||n),n},K.dateNow=function(){var e=Date;return e.now?e.now():(new e).getTime()},K.perfNow=function(){var e=D();return e&&e.now?e.now():K.dateNow()},K.isTypeof=O,K.isUndefined=U,K.isNullOrUndefined=z,K.hasOwnProperty=V,K.isFunction=j,K.isObject=G,K.objCreate=r,K);function K(){}var W,H,X=/[xy]/g,J=($.Attach=q,$.AttachEvent=q,$.Detach=F,$.DetachEvent=F,$);function $(){}(H=W={})[H.CRITICAL=1]="CRITICAL",H[H.WARNING=2]="WARNING";var Q="constructor",Y="prototype",Z="function",ee="_dynInstFuncs",te="_isDynProxy",ne="_dynClass",re="_dynCls$",ie="_unknown_",ae="__proto__",oe=Object.getPrototypeOf,se=0;function ce(e,t){return e&&Object[Y].hasOwnProperty.call(e,t)}function ue(e){return typeof e===Z}function le(e){return e&&(e===Object[Y]||e===Array[Y])}function fe(e){return le(e)||e===Function[Y]}function ge(e){if(e){if(oe)return oe(e);var t=e[ae]||e[Y]||e[Q];if(t)return t}return null}function pe(e,t,n){return t!==Q&&ue(e[t])&&(n||ce(e,t))}function de(e){throw new TypeError("DynamicProto: "+e)}function he(e,t){return ce(e,Y)?e.name||t||ie:((e||{})[Q]||{}).name||t||ie}function me(e,n,t){ce(e,Y)||de("theClass is an invalid class definition.");var r=e[Y];!function(e){for(var t=ge(n);t&&!fe(t);){if(t===e)return 1;t=ge(t)}}(r)&&de("["+he(e)+"] is not in class heirarchy of ["+he(n)+"]");var i=null;ce(r,ne)?i=r[ne]:(i=re+he(e,"_")+"$"+se,se++,r[ne]=i);var a=function(e){var t={};for(var n in e)!t[n]&&pe(e,n,!1)&&(t[n]=e[n]);return t}(n);t(n,function(e,t,n){function r(e,t){return function(){return t.apply(e,arguments)}}var i={};for(var a in n)i[a]=r(t,n[a]);for(var o=ge(e),s=[];o&&!fe(o)&&!function(e,t){for(var n=e.length-1;0<=n;n--)if(e[n]===t)return 1}(s,o);){for(var a in o)!i[a]&&pe(o,a,!oe)&&(i[a]=r(t,o[a]));s.push(o),o=ge(o)}return i}(r,n,a)),function(e,t,n,r){if(!le(e)){var i=n[ee]=n[ee]||{},a=i[t]=i[t]||{};for(var o in n)pe(n,o,!1)&&n[o]!==r[o]&&(a[o]=n[o],delete n[o],ce(e,o)&&(!e[o]||e[o][te])||(e[o]=function(n,r){var i=function(){if(this&&ce(n,ne)){var e=((this[ee]||{})[n[ne]]||{})[r];if(e)return e.apply(this,arguments);de("Missing ["+r+"] "+Z)}var t=n[r];return t===i&&(t=ge(n)[r]),ue(t)||de("["+r+"] is not a "+Z),t.apply(this,arguments)};return i[te]=1,i}(e,o)))}}(r,i,n,a)}function ve(e){return e?'"'+e.replace(/\"/g,"")+'"':""}var ye=(xe.dataType="MessageData",xe);function xe(e,t,n,r){void 0===n&&(n=!1),this.messageId=e,this.message=(n?"AI: ":"AI (Internal): ")+e;var i="";P()&&(i=k().stringify(r));var a=(t?" message:"+ve(t):"")+(r?" props:"+ve(i):"");this.message+=a}var _e=function On(a){this.identifier="DiagnosticLogger",this.queue=[];var o=0,u={};me(On,this,function(s){var r=B.isNullOrUndefined,c=B.isUndefined,i=B.isFunction;function e(e,t){var n=a[e];return r(n)?t:n}r(a)&&(a={}),s.consoleLoggingLevel=function(){return e("loggingLevelConsole",0)},s.telemetryLoggingLevel=function(){return e("loggingLevelTelemetry",1)},s.maxInternalMessageLimit=function(){return e("maxMessageLimit",25)},s.enableDebugExceptions=function(){return e("enableDebugExceptions",!1)},s.throwInternal=function(e,t,n,r,i){void 0===i&&(i=!1);var a,o=new ye(t,n,i,r);if(s.enableDebugExceptions())throw o;!c(o)&&o&&(c(o.message)||(i?(a=+o.messageId,!u[a]&&s.consoleLoggingLevel()>=W.WARNING&&(s.warnToConsole(o.message),u[a]=!0)):s.consoleLoggingLevel()>=W.WARNING&&s.warnToConsole(o.message),s.logInternalMessage(e,o)))},s.warnToConsole=function(e){var t,n=typeof console!==m?console:w("console");n&&(t="log",n.warn&&(t="warn"),i(n[t])&&n[t](e))},s.resetInternalMessageCount=function(){o=0,u={}},s.logInternalMessage=function(e,t){var n,r,i;o>=s.maxInternalMessageLimit()||(n=!0,r="AITR_"+t.messageId,u[r]?n=!1:u[r]=!0,n&&(e<=s.telemetryLoggingLevel()&&(s.queue.push(t),o++),o===s.maxInternalMessageLimit()&&(i=new ye(23,"Internal events throttle limit per PageView reached for this app.",!1),s.queue.push(i),s.warnToConsole("Internal events throttle limit per PageView reached for this app."))))}})},Se="ctx",Te=(we.ParentContextKey="parent",we.ChildrenContextKey="childEvts",we);function we(e,i,t){var n,a=this,o=!1;a.start=B.dateNow(),a.name=e,a.isAsync=t,a.isChildEvt=function(){return!1},B.isFunction(i)&&(o=B.objDefineAccessors(a,"payload",function(){return!n&&B.isFunction(i)&&(n=i(),i=null),n})),a.getCtx=function(e){return e?e===we.ParentContextKey||e===we.ChildrenContextKey?a[e]:(a[Se]||{})[e]:null},a.setCtx=function(e,t){e&&(e===we.ParentContextKey?(a[e]||(a.isChildEvt=function(){return!0}),a[e]=t):e===we.ChildrenContextKey?a[e]=t:(a[Se]=a[Se]||{})[e]=t)},a.complete=function(){var e=0,t=a.getCtx(we.ChildrenContextKey);if(B.isArray(t))for(var n=0;n<t.length;n++){var r=t[n];r&&(e+=r.time)}a.time=B.dateNow()-a.start,a.exTime=a.time-e,a.complete=function(){},!o&&B.isFunction(i)&&(a.payload=i())}}var Ie=function Un(t){this.ctx={},me(Un,this,function(n){n.create=function(e,t,n){return new Te(e,t,n)},n.fire=function(e){e&&(e.complete(),t&&t.perfEvent(e))},n.setCtx=function(e,t){e&&((n[Se]=n[Se]||{})[e]=t)},n.getCtx=function(e){return(n[Se]||{})[e]}})},Ne="CoreUtils.doPerf";function Ee(e,t,n,r,i){if(e){var a=e;if(a&&B.isFunction(a.getPerfMgr)&&(a=a.getPerfMgr()),a){var o,s=void 0,c=a.getCtx(Ne);try{if(s=a.create(t(),r,i))return c&&s.setCtx&&(s.setCtx(Te.ParentContextKey,c),c.getCtx&&c.setCtx&&((o=c.getCtx(Te.ChildrenContextKey))||(o=[],c.setCtx(Te.ChildrenContextKey,o)),o.push(s))),a.setCtx(Ne,s),n(s)}catch(u){s&&s.setCtx&&s.setCtx("exception",u)}finally{s&&a.fire(s),a.setCtx(Ne,c)}}}return n()}var Ce=B.isFunction,be=function(i,t){var a=this,o=null,s=Ce(i.processTelemetry),c=Ce(i.setNextPlugin);a._hasRun=!1,a.getPlugin=function(){return i},a.getNext=function(){return o},a.setNext=function(e){o=e},a.processTelemetry=function(n,r){r=r||t;var e=i?i.identifier:"TelemetryPluginChain";Ee(r?r.core():null,function(){return e+":processTelemetry"},function(){if(i&&s){a._hasRun=!0;try{r.setNext(o),c&&i.setNextPlugin(o),o&&(o._hasRun=!1),i.processTelemetry(n,r)}catch(t){var e=o&&o._hasRun;o&&e||r.diagLog().throwInternal(W.CRITICAL,73,"Plugin ["+i.identifier+"] failed during processTelemetry - "+t),o&&!e&&o.processTelemetry(n,r)}}else o&&(a._hasRun=!0,o.processTelemetry(n,r))},function(){return{item:n}},!n.sync)}},De=B.isNullOrUndefined;function Pe(e,t){var n=[];if(e&&0<e.length)for(var r=null,i=0;i<e.length;i++){var a,o=e[i];o&&B.isFunction(o.processTelemetry)&&(a=new be(o,t),n.push(a),r&&r.setNext(a),r=a)}return 0<n.length?n[0]:null}var ke=function zn(e,a,n,t){var r,i,o,s,c=this,u=null;null!==t&&(e&&B.isFunction(e.getPlugin)?u=function(e,t,n){var r=[],i=!n;if(e)for(;e;){var a=e.getPlugin();!i&&a!==n||(i=!0,r.push(a)),e=e.getNext()}return i||r.push(n),Pe(r,t)}(e,c,t||e.getPlugin()):t?(r=c,o=e,s=!1,(i=t)&&e&&(o=[],B.arrForEach(e,function(e){!s&&e!==i||(s=!0,o.push(e))})),i&&!s&&(o=o||[]).push(i),u=Pe(o,r)):B.isUndefined(t)&&(u=Pe(e,c))),c.core=function(){return n},c.diagLog=function(){return(n||{}).logger||new _e(a||{})},c.getCfg=function(){return a},c.getExtCfg=function(e,t){var n,r;return void 0===t&&(t={}),!a||(r=a.extensionConfig)&&e&&(n=r[e]),n||t},c.getConfig=function(e,t,n){var r;void 0===n&&(n=!1);var i=c.getExtCfg(e,null);return i&&!De(i[t])?r=i[t]:a&&!De(a[t])&&(r=a[t]),De(r)?n:r},c.hasNext=function(){return null!=u},c.getNext=function(){return u},c.setNext=function(e){u=e},c.processNext=function(e){var t=u;t&&(u=t.getNext(),t.processTelemetry(e,c))},c.createNew=function(e,t){return void 0===e&&(e=null),new zn(e||u,a,n,t)}},Ae=B.isFunction,Le="getPlugin",Me=(Re.prototype.initialize=function(e,t,n,r){this._baseTelInit(e,t,n,r)},Re);function Re(){var a=this,o=!1,s=null,c=null;a.core=null,a.diagLog=function(e){return a._getTelCtx(e).diagLog()},a.isInitialized=function(){return o},a.setInitialized=function(e){o=e},a.setNextPlugin=function(e){c=e},a.processNext=function(e,t){t?t.processNext(e):c&&Ae(c.processTelemetry)&&c.processTelemetry(e,null)},a._getTelCtx=function(e){void 0===e&&(e=null);var t,n=e;return n||(t=s||new ke(null,{},a.core),n=c&&c[Le]?t.createNew(null,c[Le]):t.createNew(null,c)),n},a._baseTelInit=function(e,t,n,r){e&&(e.extensionConfig=e.extensionConfig||[]),!r&&t&&(r=t.getProcessTelContext().getNext());var i=c;c&&c[Le]&&(i=c[Le]()),a.core=t,s=new ke(r,e,t,i),o=!0}}var Oe=B.isFunction,Ue="processTelemetry",ze="priority",Ve="setNextPlugin",Ge="isInitialized";function je(t,n){for(var e=[],r=null,i=t.getNext();i;){var a=i.getPlugin();a&&(r&&Oe(r[Ve])&&Oe(a[Ue])&&r[Ve](a),Oe(a[Ge])&&a[Ge]()||e.push(a),r=a,i=i.getNext())}B.arrForEach(e,function(e){e.initialize(t.getCfg(),t.core(),n,t.getNext())})}function qe(e){return e.sort(function(e,t){var n=0,r=Oe(t[Ue]);return Oe(e[Ue])?n=r?e[ze]-t[ze]:1:r&&(n=-1),n})}var Fe,Be=500,Ke="Channel has invalid priority",We=B.objDefineAccessors,He=(Fe=Me,__extends(Xe,Fe),Xe._staticInit=(We(Xe.prototype,"ChannelControls",Xe.prototype.getChannelControls),void We(Xe.prototype,"channelQueue",Xe.prototype.getChannelControls)),Xe);function Xe(){var r=Fe.call(this)||this;r.identifier="ChannelControllerPlugin",r.priority=Be;var c,u=B.arrForEach;function l(e){e&&0<e.length&&(e=e.sort(function(e,t){return e.priority-t.priority}),u(e,function(e){if(e.priority<Be)throw Error(Ke+e.identifier)}),c.push(e))}return me(Xe,r,function(o,s){o.setNextPlugin=function(e){},o.processTelemetry=function(t,n){c&&u(c,function(e){0<e.length&&r._getTelCtx(n).createNew(e).processNext(t)})},o.getChannelControls=function(){return c},o.initialize=function(t,n,r){var e,i,a;o.isInitialized()||(s.initialize(t,n,r),t.isCookieUseDisabled&&B.disableCookies(),i=r,c=[],(e=(t||{}).channels)&&u(e,l),i&&(a=[],u(i,function(e){e.priority>Be&&a.push(e)}),l(a)),u(c,function(e){return je(new ke(e,t,n),r)}))}}),r}var Je=B.arrForEach,$e=B.isNullOrUndefined,Qe="_notificationManager",Ye=function Vn(e){this.listeners=[];var a=B.arrForEach,t=!!(e||{}).perfEvtsSendAll;me(Vn,this,function(i){i.addNotificationListener=function(e){i.listeners.push(e)},i.removeNotificationListener=function(e){for(var t=B.arrIndexOf(i.listeners,e);-1<t;)i.listeners.splice(t,1),t=B.arrIndexOf(i.listeners,e)},i.eventsSent=function(t){a(i.listeners,function(e){e&&e.eventsSent&&setTimeout(function(){return e.eventsSent(t)},0)})},i.eventsDiscarded=function(t,n){a(i.listeners,function(e){e&&e.eventsDiscarded&&setTimeout(function(){return e.eventsDiscarded(t,n)},0)})},i.eventsSendRequest=function(n,r){a(i.listeners,function(e){if(e&&e.eventsSendRequest)if(r)setTimeout(function(){return e.eventsSendRequest(n,r)},0);else try{e.eventsSendRequest(n,r)}catch(t){}})},i.perfEvent=function(n){n&&(!t&&n.isChildEvt()||a(i.listeners,function(e){if(e&&e.perfEvent)if(n.isAsync)setTimeout(function(){return e.perfEvent(n)},0);else try{e.perfEvent(n)}catch(t){}}))}})},Ze=function Gn(){var t,c,u,n,l=!1;me(Gn,this,function(s){s._extensions=[],c=new He,t=[],s.isInitialized=function(){return l},s.initialize=function(e,t,r,n){if(s.isInitialized())throw Error("Core should not be initialized more than once");if(!e||$e(e.instrumentationKey))throw Error("Please provide instrumentation key");u=n,s[Qe]=n,s.config=e||{},e.extensions=$e(e.extensions)?[]:e.extensions,(e.extensionConfig=$e(e.extensionConfig)?{}:e.extensionConfig).NotificationManager=n,r=r||B.objCreate({throwInternal:function(e,t,n,r,i){void 0===i&&(i=!1)},warnToConsole:function(e){},resetInternalMessageCount:function(){}}),s.logger=r;var i=[];i.push.apply(i,t.concat(e.extensions)),i=qe(i);var a=[],o={};if(Je(i,function(e){if($e(e)||$e(e.initialize))throw Error("Extensions must provide callback to initialize");var t=e.priority,n=e.identifier;e&&t&&($e(o[t])?o[t]=n:r.warnToConsole("Two extensions have same priority #"+t+" - "+o[t]+", "+n)),(!t||t<c.priority)&&a.push(e)}),i.push(c),a.push(c),i=qe(i),s._extensions=i,je(new ke([c],e,s),i),je(new ke(a,e,s),i),s._extensions=a,0===s.getTransmissionControls().length)throw Error("No channels available");l=!0,s.releaseQueue()},s.getTransmissionControls=function(){return c.getChannelControls()},s.track=function(e){e.iKey||(e.iKey=s.config.instrumentationKey),e.time||(e.time=B.toISOString(new Date)),$e(e.ver)&&(e.ver="4.0"),s.isInitialized()?s.getProcessTelContext().processNext(e):t.push(e)},s.getProcessTelContext=function(){var e=s._extensions,t=e;return e&&0!==e.length||(t=[c]),new ke(t,s.config,s)},s.getNotifyMgr=function(){return u||(u=B.objCreate({addNotificationListener:function(e){},removeNotificationListener:function(e){},eventsSent:function(e){},eventsDiscarded:function(e,t){},eventsSendRequest:function(e,t){}}),s[Qe]=u),u},s.getPerfMgr=function(){return n||s.config&&s.config.enablePerfMgr&&(n=new Ie(s.getNotifyMgr())),n},s.setPerfMgr=function(e){n=e},s.eventCnt=function(){return t.length},s.releaseQueue=function(){0<t.length&&(Je(t,function(e){s.getProcessTelContext().processNext(e)}),t=[])}})};__extends(function jn(){var e=Ze.call(this)||this;return me(jn,e,function(r,i){function t(e){var t=r.getNotifyMgr();t&&t.eventsDiscarded([e],h)}r.initialize=function(e,t,n,r){i.initialize(e,t,n||new _e(e),r||new Ye(e))},r.track=function(e){Ee(r.getPerfMgr(),function(){return"AppInsightsCore:track"},function(){if(null===e)throw t(e),Error("Invalid telemetry item");!function(e){if(B.isNullOrUndefined(e.name))throw t(e),Error("telemetry name required")}(e),i.track(e)},function(){return{item:e}},!e.sync)},r.addNotificationListener=function(e){var t=r.getNotifyMgr();t&&t.addNotificationListener(e)},r.removeNotificationListener=function(e){var t=r.getNotifyMgr();t&&t.removeNotificationListener(e)},r.pollInternalLogs=function(n){var e=r.config.diagnosticLogInterval;return e&&0<e||(e=1e4),setInterval(function(){var e=r.logger?r.logger.queue:[];B.arrForEach(e,function(e){var t={name:n||"InternalMessageId: "+e.messageId,iKey:r.config.instrumentationKey,time:B.toISOString(new Date),baseType:ye.dataType,baseData:{message:e.message}};r.track(t)}),e.length=0},e)}}),e},Ze);var et=(tt.sanitizeKeyAndAddUniqueness=function(e,t,n){var r=t.length,i=tt.sanitizeKey(e,t);if(i.length!==r){for(var a=0,o=i;n[o]!==undefined;)a++,o=i.substring(0,tt.MAX_NAME_LENGTH-3)+tt.padNumber(a);i=o}return i},tt.sanitizeKey=function(e,t){var n;return t&&(t=tt.trim(t.toString())).length>tt.MAX_NAME_LENGTH&&(n=t.substring(0,tt.MAX_NAME_LENGTH),e.throwInternal(W.WARNING,57,"name is too long. It has been truncated to "+tt.MAX_NAME_LENGTH+" characters.",{name:t},!0)),n||t},tt.sanitizeString=function(e,t,n){var r;return void 0===n&&(n=tt.MAX_STRING_LENGTH),t&&(n=n||tt.MAX_STRING_LENGTH,(t=tt.trim(t)).toString().length>n&&(r=t.toString().substring(0,n),e.throwInternal(W.WARNING,61,"string value is too long. It has been truncated to "+n+" characters.",{value:t},!0))),r||t},tt.sanitizeUrl=function(e,t){return tt.sanitizeInput(e,t,tt.MAX_URL_LENGTH,66)},tt.sanitizeMessage=function(e,t){var n;return t&&t.length>tt.MAX_MESSAGE_LENGTH&&(n=t.substring(0,tt.MAX_MESSAGE_LENGTH),e.throwInternal(W.WARNING,56,"message is too long, it has been truncated to "+tt.MAX_MESSAGE_LENGTH+" characters.",{message:t},!0)),n||t},tt.sanitizeException=function(e,t){var n;return t&&t.length>tt.MAX_EXCEPTION_LENGTH&&(n=t.substring(0,tt.MAX_EXCEPTION_LENGTH),e.throwInternal(W.WARNING,52,"exception is too long, it has been truncated to "+tt.MAX_EXCEPTION_LENGTH+" characters.",{exception:t},!0)),n||t},tt.sanitizeProperties=function(e,t){if(t){var n={};for(var r in t){var i=t[r];if(B.isObject(i)&&P())try{i=k().stringify(i)}catch(a){e.throwInternal(W.WARNING,49,"custom property is not valid",{exception:a},!0)}i=tt.sanitizeString(e,i,tt.MAX_PROPERTY_LENGTH),n[r=tt.sanitizeKeyAndAddUniqueness(e,r,n)]=i}t=n}return t},tt.sanitizeMeasurements=function(e,t){if(t){var n={};for(var r in t){var i=t[r];n[r=tt.sanitizeKeyAndAddUniqueness(e,r,n)]=i}t=n}return t},tt.sanitizeId=function(e,t){return t?tt.sanitizeInput(e,t,tt.MAX_ID_LENGTH,69).toString():t},tt.sanitizeInput=function(e,t,n,r){var i;return t&&(t=tt.trim(t)).length>n&&(i=t.substring(0,n),e.throwInternal(W.WARNING,r,"input is too long, it has been truncated to "+n+" characters.",{data:t},!0)),i||t},tt.padNumber=function(e){var t="00"+e;return t.substr(t.length-3)},tt.trim=function(e){return B.isString(e)?e.replace(/^\s+|\s+$/g,""):e},tt.MAX_NAME_LENGTH=150,tt.MAX_ID_LENGTH=128,tt.MAX_PROPERTY_LENGTH=8192,tt.MAX_STRING_LENGTH=1024,tt.MAX_URL_LENGTH=2048,tt.MAX_MESSAGE_LENGTH=32768,tt.MAX_EXCEPTION_LENGTH=32768,tt);function tt(){}var nt=C(),rt=B.isString,it=null,at=(ot.createDomEvent=function(e){var t,n=null;return B.isFunction(Event)?n=new Event(e):(t=E())&&t.createEvent&&(n=t.createEvent("Event")).initEvent(e,!0,!0),n},ot.disableStorage=function(){ot._canUseLocalStorage=!1,ot._canUseSessionStorage=!1},ot._getLocalStorageObject=function(){return ot.canUseLocalStorage()?ot._getVerifiedStorageObject(c.LocalStorage):null},ot._getVerifiedStorageObject=function(e){var t,n,r=null;try{if(B.isNullOrUndefined(T()))return null;n=new Date,(r=w(e===c.LocalStorage?"localStorage":"sessionStorage")).setItem(n.toString(),n.toString()),t=r.getItem(n.toString())!==n.toString(),r.removeItem(n.toString()),t&&(r=null)}catch(i){r=null}return r},ot.isInternalApplicationInsightsEndpoint=function(e){return!!~ot._internalEndpoints.indexOf(e.toLowerCase())},ot.canUseLocalStorage=function(){return ot._canUseLocalStorage===undefined&&(ot._canUseLocalStorage=!!ot._getVerifiedStorageObject(c.LocalStorage)),ot._canUseLocalStorage},ot.getStorage=function(e,t){var n=ot._getLocalStorageObject();if(null!==n)try{return n.getItem(t)}catch(r){ot._canUseLocalStorage=!1,e.throwInternal(W.WARNING,1,"Browser failed read of local storage. "+ot.getExceptionName(r),{exception:ot.dump(r)})}return null},ot.setStorage=function(e,t,n){var r=ot._getLocalStorageObject();if(null!==r)try{return r.setItem(t,n),!0}catch(i){ot._canUseLocalStorage=!1,e.throwInternal(W.WARNING,3,"Browser failed write to local storage. "+ot.getExceptionName(i),{exception:ot.dump(i)})}return!1},ot.removeStorage=function(e,t){var n=ot._getLocalStorageObject();if(null!==n)try{return n.removeItem(t),!0}catch(r){ot._canUseLocalStorage=!1,e.throwInternal(W.WARNING,5,"Browser failed removal of local storage item. "+ot.getExceptionName(r),{exception:ot.dump(r)})}return!1},ot._getSessionStorageObject=function(){return ot.canUseSessionStorage()?ot._getVerifiedStorageObject(c.SessionStorage):null},ot.canUseSessionStorage=function(){return ot._canUseSessionStorage===undefined&&(ot._canUseSessionStorage=!!ot._getVerifiedStorageObject(c.SessionStorage)),ot._canUseSessionStorage},ot.getSessionStorageKeys=function(){var e=[];if(ot.canUseSessionStorage())for(var t in w("sessionStorage"))e.push(t);return e},ot.getSessionStorage=function(e,t){var n=ot._getSessionStorageObject();if(null!==n)try{return n.getItem(t)}catch(r){ot._canUseSessionStorage=!1,e.throwInternal(W.WARNING,2,"Browser failed read of session storage. "+ot.getExceptionName(r),{exception:ot.dump(r)})}return null},ot.setSessionStorage=function(e,t,n){var r=ot._getSessionStorageObject();if(null!==r)try{return r.setItem(t,n),!0}catch(i){ot._canUseSessionStorage=!1,e.throwInternal(W.WARNING,4,"Browser failed write to session storage. "+ot.getExceptionName(i),{exception:ot.dump(i)})}return!1},ot.removeSessionStorage=function(e,t){var n=ot._getSessionStorageObject();if(null!==n)try{return n.removeItem(t),!0}catch(r){ot._canUseSessionStorage=!1,e.throwInternal(W.WARNING,6,"Browser failed removal of session storage item. "+ot.getExceptionName(r),{exception:ot.dump(r)})}return!1},ot.disableCookies=function(){B.disableCookies()},ot.canUseCookies=function(e){if(B._canUseCookies===undefined){B._canUseCookies=!1;try{B._canUseCookies=ot.document.cookie!==undefined}catch(t){e.throwInternal(W.WARNING,68,"Cannot access document.cookie - "+ot.getExceptionName(t),{exception:ot.dump(t)})}}return B._canUseCookies},ot.disallowsSameSiteNone=function(e){return!(!rt(e)||!~e.indexOf("CPU iPhone OS 12")&&!~e.indexOf("iPad; CPU OS 12")&&!(~e.indexOf("Macintosh; Intel Mac OS X 10_14")&&~e.indexOf("Version/")&&~e.indexOf("Safari"))&&(!~e.indexOf("Macintosh; Intel Mac OS X 10_14")||(n=(t=e.length)-40,"AppleWebKit/605.1.15 (KHTML, like Gecko)"!=e.substring(0<=n?n:0,t)))&&!~e.indexOf("Chrome/5")&&!~e.indexOf("Chrome/6")&&(!~e.indexOf("UnrealEngine")||~e.indexOf("Chrome"))&&!~e.indexOf("UCBrowser/12")&&!~e.indexOf("UCBrowser/11"));var t,n},ot.setCookie=function(e,t,n,r){var i,a,o;ot.canUseCookies(e)&&(a=i="",r&&(i=";domain="+r),(o=b())&&"https:"===o.protocol&&(a=";secure",null===it&&(it=ot.disallowsSameSiteNone((C()||{}).userAgent)),it||(n+=";SameSite=None")),ot.document.cookie=t+"="+n+i+";path=/"+a)},ot.stringToBoolOrDefault=function(e,t){return void 0===t&&(t=!1),e===undefined||null===e?t:"true"==e.toString().toLowerCase()},ot.getCookie=function(e,t){if(ot.canUseCookies(e)){var n="";if(t&&t.length)for(var r=t+"=",i=ot.document.cookie.split(";"),a=0;a<i.length;a++){var o=i[a];if((o=ot.trim(o))&&!o.indexOf(r)){n=o.substring(r.length,i[a].length);break}}return n}},ot.deleteCookie=function(e,t){ot.canUseCookies(e)&&(ot.document.cookie=t+"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;")},ot.newId=function(){for(var e="",t=1073741824*Math.random();0<t;)e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[0|t%64],t=Math.floor(t/64);return e},ot.random32=function(){return 4294967296*Math.random()|0},ot.generateW3CId=function(){for(var e,t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],n="",r=0;r<4;r++)n+=t[15&(e=ot.random32())]+t[e>>4&15]+t[e>>8&15]+t[e>>12&15]+t[e>>16&15]+t[e>>20&15]+t[e>>24&15]+t[e>>28&15];var i=t[8+4*Math.random()|0];return n.substr(0,8)+n.substr(9,4)+"4"+n.substr(13,3)+i+n.substr(16,3)+n.substr(19,12)},ot.getIEVersion=function(e){void 0===e&&(e=null);var t=e?e.toLowerCase():nt?(nt.userAgent||"").toLowerCase():"";if(~t.indexOf("msie"))return parseInt(t.split("msie")[1]);if(t.indexOf("trident/")){var n=parseInt(t.split("trident/")[1]);if(n)return n+4}return null},ot.msToTimeSpan=function(e){(isNaN(e)||e<0)&&(e=0);var t=""+(e=Math.round(e))%1e3,n=""+Math.floor(e/1e3)%60,r=""+Math.floor(e/6e4)%60,i=""+Math.floor(e/36e5)%24,a=Math.floor(e/864e5),t=1===t.length?"00"+t:2===t.length?"0"+t:t,n=n.length<2?"0"+n:n,r=r.length<2?"0"+r:r;return(0<a?a+".":"")+(i=i.length<2?"0"+i:i)+":"+r+":"+n+"."+t},ot.isCrossOriginError=function(e,t,n,r,i){return("Script error."===e||"Script error"===e)&&!i},ot.dump=function(e){var t=Object[v].toString.call(e),n="";return"[object Error]"===t?n="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":P()&&(n=k().stringify(e)),t+n},ot.getExceptionName=function(e){return"[object Error]"===Object[v].toString.call(e)?e.name:""},ot.addEventHandler=function(e,t){return J.Attach(N(),e,t)},ot.IsBeaconApiSupported=function(){return"sendBeacon"in nt&&nt.sendBeacon},ot.getExtension=function(e,t){for(var n=null,r=0;!n&&r<e.length;)e[r]&&e[r].identifier===t&&(n=e[r]),r++;return n},ot.document=E()||{},ot._canUseLocalStorage=undefined,ot._canUseSessionStorage=undefined,ot._internalEndpoints=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],ot.NotSpecified="not_specified",ot.trim=B.strTrim,ot.isArray=B.isArray,ot.isError=B.isError,ot.isDate=B.isDate,ot.toISOStringForIE8=B.toISOString,ot);function ot(){}var st=(ct.parseUrl=function(e){var t=ct._htmlAnchorIdx,n=ct._htmlAnchorElement,r=n[t];return ct.document.createElement?n[t]||(r=n[t]=ct.document.createElement("a")):r={host:ct.parseHost(e,!0)},r.href=e,++t>=n.length&&(t=0),ct._htmlAnchorIdx=t,r},ct.getAbsoluteUrl=function(e){var t,n=ct.parseUrl(e);return n&&(t=n.href),t},ct.getPathName=function(e){var t,n=ct.parseUrl(e);return n&&(t=n.pathname),t},ct.getCompleteUrl=function(e,t){return e?e.toUpperCase()+" "+t:t},ct.parseHost=function(e,t){var n=ct.parseFullHost(e,t);if(n){var r=n.match(/(www[0-9]?\.)?(.[^/:]+)(\:[\d]+)?/i);if(null!=r&&3<r.length&&rt(r[2])&&0<r[2].length)return r[2]+(r[3]||"")}return n},ct.parseFullHost=function(e,t){var n,r,i,a=null;return!e||null!=(n=e.match(/(\w*):\/\/(.[^/:]+)(\:[\d]+)?/i))&&2<n.length&&rt(n[2])&&0<n[2].length&&(a=n[2]||"",t&&2<n.length&&(r=(n[1]||"").toLowerCase(),i=n[3]||"",("http"==r&&":80"===i||"https"==r&&":443"===i)&&(i=""),a+=i)),a},ct.document=E()||{},ct._htmlAnchorIdx=0,ct._htmlAnchorElement=[null,null,null,null,null],ct);function ct(){}var ut=(lt.ParseDependencyPath=function(e,t,n,r){var i,a,o,s=r,c=r,s=t&&0<t.length?(o=(i=st.parseUrl(t)).host,s||(null!=i.pathname?("/"!=(a=0===i.pathname.length?"/":i.pathname)[0]&&(a="/"+a),c=i.pathname,et.sanitizeString(e,n?n+" "+a:a)):et.sanitizeString(e,t))):o=r;return{target:o,name:s,data:c}},lt);function lt(){}var ft=(gt.Now=function(){var e=D();return e&&e.now&&e.timing?e.now()+e.timing.navigationStart:(new Date).getTime()},gt.GetDuration=function(e,t){var n=null;return 0===e||0===t||B.isNullOrUndefined(e)||B.isNullOrUndefined(t)||(n=t-e),n},gt);function gt(){}var pt,dt=(__extends(ht,function(){}),ht);function ht(){return this}pt=function(){this.ver=1,this.sampleRate=100,this.tags={}},__extends(function(e,t,n){var r=pt.call(this)||this;return r.name=et.sanitizeString(e,n)||at.NotSpecified,r.data=t,r.time=B.toISOString(new Date),r.aiDataContract={time:d.Required,iKey:d.Required,name:d.Required,sampleRate:function(){return 100===r.sampleRate?d.Hidden:d.Required},tags:d.Required,data:d.Required},r},pt);var mt,vt=function(){},yt=(mt=vt,__extends(xt,mt),xt);function xt(){var e=mt.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var _t,St=(_t=yt,__extends(Tt,_t),Tt.envelopeType="Microsoft.ApplicationInsights.{0}.Event",Tt.dataType="EventData",Tt);function Tt(e,t,n,r){var i=_t.call(this)||this;return i.aiDataContract={ver:d.Required,name:d.Required,properties:d.Default,measurements:d.Default},i.name=et.sanitizeString(e,t)||at.NotSpecified,i.properties=et.sanitizeProperties(e,n),i.measurements=et.sanitizeMeasurements(e,r),i}var wt,It=(wt=vt,__extends(Nt,wt),Nt);function Nt(){var e=wt.call(this)||this;return e.ver=2,e.exceptions=[],e.properties={},e.measurements={},e}var Et,Ct="error",bt=(Et=It,__extends(Dt,Et),Dt.CreateFromInterface=function(t,e,n,r){var i=e.exceptions&&B.arrMap(e.exceptions,function(e){return kt.CreateFromInterface(t,e)});return new Dt(t,__assign({},e,{exceptions:i}),n,r)},Dt.prototype.toInterface=function(){var e=this,t=e.exceptions,n=e.properties,r=e.measurements,i=e.severityLevel,a=(e.ver,e.problemGroup),o=e.id,s=e.isManual;return{ver:"4.0",exceptions:t instanceof Array&&B.arrMap(t,function(e){return e.toInterface()})||undefined,severityLevel:i,properties:n,measurements:r,problemGroup:a,id:o,isManual:s}},Dt.CreateSimpleException=function(e,t,n,r,i,a){return{exceptions:[{hasFullStack:!0,message:e,stack:i,typeName:t}]}},Dt.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",Dt.dataType="ExceptionData",Dt);function Dt(e,t,n,r,i,a){var o,s=Et.call(this)||this;return s.aiDataContract={ver:d.Required,exceptions:d.Required,severityLevel:d.Default,properties:d.Default,measurements:d.Default},"ver"in(o=t)&&"exceptions"in o&&"properties"in o?(s.exceptions=t.exceptions,s.properties=t.properties,s.measurements=t.measurements,t.severityLevel&&(s.severityLevel=t.severityLevel),t.id&&(s.id=t.id),t.problemGroup&&(s.problemGroup=t.problemGroup),s.ver=2,B.isNullOrUndefined(t.isManual)||(s.isManual=t.isManual)):(s.exceptions=[new kt(e,t)],s.properties=et.sanitizeProperties(e,n)||{},s.measurements=et.sanitizeMeasurements(e,r),i&&(s.severityLevel=i),a&&(s.id=a)),s}var Pt,kt=(Pt=function(){this.hasFullStack=!0,this.parsedStack=[]},__extends(At,Pt),At.prototype.toInterface=function(){var e=this.parsedStack instanceof Array&&B.arrMap(this.parsedStack,function(e){return e.toInterface()});return{id:this.id,outerId:this.outerId,typeName:this.typeName,message:this.message,hasFullStack:this.hasFullStack,stack:this.stack,parsedStack:e||undefined}},At.CreateFromInterface=function(e,t){var n=t.parsedStack instanceof Array&&B.arrMap(t.parsedStack,function(e){return Mt.CreateFromInterface(e)})||t.parsedStack;return new At(e,__assign({},t,{parsedStack:n}))},At.parseStack=function(e){if(B.isString(e)){for(var t=e.split("\n"),n=[],r=0,i=0,a=0;a<=t.length;a++){var o,s=t[a];Mt.regex.test(s)&&(i+=(o=new Mt(t[a],r++)).sizeInBytes,n.push(o))}if(32768<i)for(var c=0,u=n.length-1,l=0,f=c,g=u;c<u;){if(32768<(l+=n[c].sizeInBytes+n[u].sizeInBytes)){var p=g-f+1;n.splice(f,p);break}f=c,g=u,c++,u--}}return n},At);function At(e,t){var n,r,i=Pt.call(this)||this;return i.aiDataContract={id:d.Default,outerId:d.Default,typeName:d.Required,message:d.Required,hasFullStack:d.Default,stack:d.Default,parsedStack:d.Array},"hasFullStack"in t&&"typeName"in t?(i.typeName=t.typeName,i.message=t.message,i.stack=t.stack,i.parsedStack=t.parsedStack,i.hasFullStack=t.hasFullStack):(n=t,at.isError(n)||(n=n[Ct]||n.evt||n),i.typeName=et.sanitizeString(e,function(e){var t="";if(e&&!(t=e.typeName||e.name||""))try{var n=/function (.{1,})\(/.exec(e.constructor.toString()),t=n&&1<n.length?n[1]:""}catch(r){}return t}(n))||at.NotSpecified,i.message=et.sanitizeMessage(e,t.message)||at.NotSpecified,r=t.stack,i.parsedStack=At.parseStack(r),i.stack=et.sanitizeException(e,r),i.hasFullStack=at.isArray(i.parsedStack)&&0<i.parsedStack.length),i}var Lt,Mt=(Lt=function(){},__extends(Rt,Lt),Rt.CreateFromInterface=function(e){return new Rt(e,null)},Rt.prototype.toInterface=function(){return{level:this.level,method:this.method,assembly:this.assembly,fileName:this.fileName,line:this.line}},Rt.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,Rt.baseSize=58,Rt);function Rt(e,t){var n,r,i=Lt.call(this)||this;return i.sizeInBytes=0,i.aiDataContract={level:d.Required,method:d.Required,assembly:d.Default,fileName:d.Default,line:d.Default},"string"==typeof e?(n=e,i.level=t,i.method="<no_method>",i.assembly=at.trim(n),i.fileName="",i.line=0,(r=n.match(Rt.regex))&&5<=r.length&&(i.method=at.trim(r[2])||i.method,i.fileName=at.trim(r[4]),i.line=parseInt(r[5])||0)):(i.level=e.level,i.method=e.method,i.assembly=e.assembly,i.fileName=e.fileName,i.line=e.line,i.sizeInBytes=0),i.sizeInBytes+=i.method.length,i.sizeInBytes+=i.fileName.length,i.sizeInBytes+=i.assembly.length,i.sizeInBytes+=Rt.baseSize,i.sizeInBytes+=i.level.toString().length,i.sizeInBytes+=i.line.toString().length,i}var Ot,Ut,zt,Vt=(Ot=vt,__extends(Gt,Ot),Gt);function Gt(){var e=Ot.call(this)||this;return e.ver=2,e.metrics=[],e.properties={},e.measurements={},e}(zt=Ut={})[zt.Measurement=0]="Measurement",zt[zt.Aggregation=1]="Aggregation";var jt,qt=(jt=function(){this.kind=Ut.Measurement},__extends(Ft,jt),Ft);function Ft(){var e=jt.apply(this,arguments)||this;return e.aiDataContract={name:d.Required,kind:d.Default,value:d.Required,count:d.Default,min:d.Default,max:d.Default,stdDev:d.Default},e}var Bt,Kt=(Bt=Vt,__extends(Wt,Bt),Wt.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",Wt.dataType="MetricData",Wt);function Wt(e,t,n,r,i,a,o,s){var c=Bt.call(this)||this;c.aiDataContract={ver:d.Required,metrics:d.Required,properties:d.Default};var u=new qt;return u.count=0<r?r:undefined,u.max=isNaN(a)||null===a?undefined:a,u.min=isNaN(i)||null===i?undefined:i,u.name=et.sanitizeString(e,t)||at.NotSpecified,u.value=n,c.metrics=[u],c.properties=et.sanitizeProperties(e,o),c.measurements=et.sanitizeMeasurements(e,s),c}var Ht,Xt=(Ht=yt,__extends(Jt,Ht),Jt);function Jt(){var e=Ht.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var $t,Qt=($t=Xt,__extends(Yt,$t),Yt.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",Yt.dataType="PageviewData",Yt);function Yt(e,t,n,r,i,a,o){var s=$t.call(this)||this;return s.aiDataContract={ver:d.Required,name:d.Default,url:d.Default,duration:d.Default,properties:d.Default,measurements:d.Default,id:d.Default},s.id=et.sanitizeId(e,o),s.url=et.sanitizeUrl(e,n),s.name=et.sanitizeString(e,t)||at.NotSpecified,isNaN(r)||(s.duration=at.msToTimeSpan(r)),s.properties=et.sanitizeProperties(e,i),s.measurements=et.sanitizeMeasurements(e,a),s}var Zt,en=(Zt=vt,__extends(tn,Zt),tn);function tn(){var e=Zt.call(this)||this;return e.ver=2,e.success=!0,e.properties={},e.measurements={},e}var nn,rn=(nn=en,__extends(an,nn),an.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",an.dataType="RemoteDependencyData",an);function an(e,t,n,r,i,a,o,s,c,u,l,f){void 0===c&&(c="Ajax");var g=nn.call(this)||this;g.aiDataContract={id:d.Required,ver:d.Required,name:d.Default,resultCode:d.Default,duration:d.Default,success:d.Default,data:d.Default,target:d.Default,type:d.Default,properties:d.Default,measurements:d.Default,kind:d.Default,value:d.Default,count:d.Default,min:d.Default,max:d.Default,stdDev:d.Default,dependencyKind:d.Default,dependencySource:d.Default,commandName:d.Default,dependencyTypeName:d.Default},g.id=t,g.duration=at.msToTimeSpan(i),g.success=a,g.resultCode=o+"",g.type=et.sanitizeString(e,c);var p=ut.ParseDependencyPath(e,n,s,r);return g.data=et.sanitizeUrl(e,r)||p.data,g.target=et.sanitizeString(e,p.target),u&&(g.target=g.target+" | "+u),g.name=et.sanitizeString(e,p.name),g.properties=et.sanitizeProperties(e,l),g.measurements=et.sanitizeMeasurements(e,f),g}var on,sn=(on=vt,__extends(cn,on),cn);function cn(){var e=on.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var un,ln=(un=sn,__extends(fn,un),fn.envelopeType="Microsoft.ApplicationInsights.{0}.Message",fn.dataType="MessageData",fn);function fn(e,t,n,r,i){var a=un.call(this)||this;return a.aiDataContract={ver:d.Required,message:d.Required,severityLevel:d.Default,properties:d.Default},t=t||at.NotSpecified,a.message=et.sanitizeMessage(e,t),a.properties=et.sanitizeProperties(e,r),a.measurements=et.sanitizeMeasurements(e,i),n&&(a.severityLevel=n),a}var gn,pn=(gn=Xt,__extends(dn,gn),dn);function dn(){var e=gn.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var hn,mn,vn,yn,xn=(hn=pn,__extends(_n,hn),_n.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",_n.dataType="PageviewPerformanceData",_n);function _n(e,t,n,r,i,a,o){var s=hn.call(this)||this;return s.aiDataContract={ver:d.Required,name:d.Default,url:d.Default,duration:d.Default,perfTotal:d.Default,networkConnect:d.Default,sentRequest:d.Default,receivedResponse:d.Default,domProcessing:d.Default,properties:d.Default,measurements:d.Default},s.url=et.sanitizeUrl(e,n),s.name=et.sanitizeString(e,t)||at.NotSpecified,s.properties=et.sanitizeProperties(e,i),s.measurements=et.sanitizeMeasurements(e,a),o&&(s.domProcessing=o.domProcessing,s.duration=o.duration,s.networkConnect=o.networkConnect,s.perfTotal=o.perfTotal,s.receivedResponse=o.receivedResponse,s.sentRequest=o.sentRequest),s}mn=dt,__extends(function(e,t){var n=mn.call(this)||this;return n.aiDataContract={baseType:d.Required,baseData:d.Required},n.baseType=e,n.baseData=t,n},mn),(yn=vn={})[yn.Verbose=0]="Verbose",yn[yn.Information=1]="Information",yn[yn.Warning=2]="Warning",yn[yn.Error=3]="Error",yn[yn.Critical=4]="Critical";var Sn=(Tn.create=function(e,t,n,r,i,a){if(n=et.sanitizeString(r,n)||at.NotSpecified,B.isNullOrUndefined(e)||B.isNullOrUndefined(t)||B.isNullOrUndefined(n))throw Error("Input doesn't contain all required fields");var o={name:n,time:B.toISOString(new Date),iKey:"",ext:a||{},tags:[],data:{},baseType:t,baseData:e};if(!B.isNullOrUndefined(i))for(var s in i)i.hasOwnProperty(s)&&(o.data[s]=i[s]);return o},Tn);function Tn(){}var wn=function qn(y,x,t,_){me(qn,this,function(e){var f,g=B.arrForEach,p=B.isNullOrUndefined,d=null,h=[],m=!1;function v(){t&&g(t.getTransmissionControls(),function(e){g(e,function(e){return e.flush(!0)})})}t&&(f=t.logger),e.trackPageView=function(r,i){var e,a=r.name;!p(a)&&"string"==typeof a||(e=E(),a=r.name=e&&e.title||"");var t,o=r.uri;if(!p(o)&&"string"==typeof o||(t=b(),o=r.uri=t&&t.href||""),!_.isPerformanceTimingSupported())return y.sendPageViewInternal(r,i),v(),void f.throwInternal(W.WARNING,25,"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 n,s,c=!1,u=_.getPerformanceTiming().navigationStart,l=ft.GetDuration(u,+new Date);_.shouldCollectDuration(l)||(l=undefined),p(i)||p(i.duration)||(n=i.duration),!x&&isNaN(n)||(isNaN(n)&&((i=i||{}).duration=l),y.sendPageViewInternal(r,i),v(),c=!0),i=i||{},s=function(){var e,t=!1;try{_.isPerformanceTimingDataReady()?(t=!0,e={name:a,uri:o},_.populatePageViewPerformanceEvent(e),e.isValid||c?(c||(i.duration=e.durationMs,y.sendPageViewInternal(r,i)),m||(y.sendPageViewPerformanceInternal(e,i),m=!0)):(i.duration=l,y.sendPageViewInternal(r,i))):6e4<ft.GetDuration(u,+new Date)&&(t=!0,c||(i.duration=6e4,y.sendPageViewInternal(r,i)))}catch(n){f.throwInternal(W.CRITICAL,38,"trackPageView failed on page load calculation: "+at.getExceptionName(n),{exception:at.dump(n)})}return t},h.push(s),d=d||setInterval(function(){var e=h.slice(0),t=!1;h=[],g(e,function(e){e()?t=!0:h.push(e)}),0===h.length&&(clearInterval(d),d=null),t&&v()},100)}})},In=(Nn.prototype.trackPreviousPageVisit=function(e,t){try{var n=this.restartPageVisitTimer(e,t);n&&this.pageVisitTimeTrackingHandler(n.pageName,n.pageUrl,n.pageVisitTime)}catch(r){this._logger.warnToConsole("Auto track page visit time failed, metric will not be collected: "+at.dump(r))}},Nn.prototype.restartPageVisitTimer=function(e,t){try{var n=this.stopPageVisitTimer();return this.startPageVisitTimer(e,t),n}catch(r){return this._logger.warnToConsole("Call to restart failed: "+at.dump(r)),null}},Nn.prototype.startPageVisitTimer=function(e,t){try{if(at.canUseSessionStorage()){if(null!=at.getSessionStorage(this._logger,this.prevPageVisitDataKeyName))throw Error("Cannot call startPageVisit consecutively without first calling stopPageVisit");var n=new En(e,t),r=k().stringify(n);at.setSessionStorage(this._logger,this.prevPageVisitDataKeyName,r)}}catch(i){this._logger.warnToConsole("Call to start failed: "+at.dump(i))}},Nn.prototype.stopPageVisitTimer=function(){try{if(at.canUseSessionStorage()){var e=B.dateNow(),t=at.getSessionStorage(this._logger,this.prevPageVisitDataKeyName);if(t&&P()){var n=k().parse(t);return n.pageVisitTime=e-n.pageVisitStartTime,at.removeSessionStorage(this._logger,this.prevPageVisitDataKeyName),n}return null}return null}catch(r){return this._logger.warnToConsole("Stop page visit timer failed: "+at.dump(r)),null}},Nn);function Nn(e,t){this.prevPageVisitDataKeyName="prevPageVisitData",this.pageVisitTimeTrackingHandler=t,this._logger=e}var En=function(e,t){this.pageVisitStartTime=B.dateNow(),this.pageName=e,this.pageUrl=t},Cn=(bn.prototype.populatePageViewPerformanceEvent=function(e){e.isValid=!1;var t,n,r,i,a,o=this.getPerformanceNavigationTiming(),s=this.getPerformanceTiming();(o||s)&&(a=o?(t=o.duration,n=ft.GetDuration(o.startTime,o.connectEnd),r=ft.GetDuration(o.requestStart,o.responseStart),i=ft.GetDuration(o.responseStart,o.responseEnd),ft.GetDuration(o.responseEnd,o.loadEventEnd)):(t=ft.GetDuration(s.navigationStart,s.loadEventEnd),n=ft.GetDuration(s.navigationStart,s.connectEnd),r=ft.GetDuration(s.requestStart,s.responseStart),i=ft.GetDuration(s.responseStart,s.responseEnd),ft.GetDuration(s.responseEnd,s.loadEventEnd)),0===t?this._logger.throwInternal(W.WARNING,10,"error calculating page view performance.",{total:t,network:n,request:r,response:i,dom:a}):this.shouldCollectDuration(t,n,r,i,a)?t<Math.floor(n)+Math.floor(r)+Math.floor(i)+Math.floor(a)?this._logger.throwInternal(W.WARNING,8,"client performance math error.",{total:t,network:n,request:r,response:i,dom:a}):(e.durationMs=t,e.perfTotal=e.duration=at.msToTimeSpan(t),e.networkConnect=at.msToTimeSpan(n),e.sentRequest=at.msToTimeSpan(r),e.receivedResponse=at.msToTimeSpan(i),e.domProcessing=at.msToTimeSpan(a),e.isValid=!0):this._logger.throwInternal(W.WARNING,45,"Invalid page load duration value. Browser perf data won't be sent.",{total:t,network:n,request:r,response:i,dom:a}))},bn.prototype.getPerformanceTiming=function(){return this.isPerformanceTimingSupported()?D().timing:null},bn.prototype.getPerformanceNavigationTiming=function(){return this.isPerformanceNavigationTimingSupported()?D().getEntriesByType("navigation")[0]:null},bn.prototype.isPerformanceNavigationTimingSupported=function(){var e=D();return e&&e.getEntriesByType&&0<e.getEntriesByType("navigation").length},bn.prototype.isPerformanceTimingSupported=function(){var e=D();return e&&e.timing},bn.prototype.isPerformanceTimingDataReady=function(){var e=D(),t=e?e.timing:0;return t&&0<t.domainLookupStart&&0<t.navigationStart&&0<t.responseStart&&0<t.requestStart&&0<t.loadEventEnd&&0<t.responseEnd&&0<t.connectEnd&&0<t.domLoading},bn.prototype.shouldCollectDuration=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=["googlebot","adsbot-google","apis-google","mediapartners-google"],r=(C()||{}).userAgent,i=!1;if(r)for(var a=0;a<n.length;a++)i=i||!!~r.toLowerCase().indexOf(n[a]);if(i)return!1;for(a=0;a<e.length;a++)if(e[a]>=this.MAX_DURATION_ALLOWED)return!1;return!0},bn);function bn(e){this.MAX_DURATION_ALLOWED=36e5,e&&(this._logger=e.logger)}var Dn="duration";function Pn(e,t){e&&e.dispatchEvent&&t&&e.dispatchEvent(t)}var kn,An=(kn=Me,__extends(Ln,kn),Ln.getDefaultConfig=function(e){return(e=e||{}).sessionRenewalMs=18e5,e.sessionExpirationMs=864e5,e.disableExceptionTracking=at.stringToBoolOrDefault(e.disableExceptionTracking),e.autoTrackPageVisitTime=at.stringToBoolOrDefault(e.autoTrackPageVisitTime),e.overridePageViewDuration=at.stringToBoolOrDefault(e.overridePageViewDuration),e.enableUnhandledPromiseRejectionTracking=at.stringToBoolOrDefault(e.enableUnhandledPromiseRejectionTracking),(isNaN(e.samplingPercentage)||e.samplingPercentage<=0||100<=e.samplingPercentage)&&(e.samplingPercentage=100),e.isCookieUseDisabled=at.stringToBoolOrDefault(e.isCookieUseDisabled),e.isStorageUseDisabled=at.stringToBoolOrDefault(e.isStorageUseDisabled),e.isBrowserLinkTrackingEnabled=at.stringToBoolOrDefault(e.isBrowserLinkTrackingEnabled),e.enableAutoRouteTracking=at.stringToBoolOrDefault(e.enableAutoRouteTracking),e.namePrefix=e.namePrefix||"",e},Ln.prototype.processTelemetry=function(a,o){var s=this;Ee(this.core,function(){return s.identifier+":processTelemetry"},function(){var e=!1,t=s._telemetryInitializers.length;o=s._getTelCtx(o);for(var n=0;n<t;++n){var r=s._telemetryInitializers[n];if(r)try{if(!1===r.call(null,a)){e=!0;break}}catch(i){o.diagLog().throwInternal(W.CRITICAL,64,"One of telemetry initializers failed, telemetry item will not be sent: "+at.getExceptionName(i),{exception:at.dump(i)},!0)}}e||s.processNext(a,o)},function(){return{item:a}},!a.sync)},Ln.prototype.trackEvent=function(e,t){try{var n=Sn.create(e,St.dataType,St.envelopeType,this.diagLog(),t);this.core.track(n)}catch(r){this.diagLog().throwInternal(W.WARNING,39,"trackTrace failed, trace will not be collected: "+at.getExceptionName(r),{exception:at.dump(r)})}},Ln.prototype.startTrackEvent=function(e){try{this._eventTracking.start(e)}catch(t){this.diagLog().throwInternal(W.CRITICAL,29,"startTrackEvent failed, event will not be collected: "+at.getExceptionName(t),{exception:at.dump(t)})}},Ln.prototype.stopTrackEvent=function(e,t,n){try{this._eventTracking.stop(e,undefined,t)}catch(r){this.diagLog().throwInternal(W.CRITICAL,30,"stopTrackEvent failed, event will not be collected: "+at.getExceptionName(r),{exception:at.dump(r)})}},Ln.prototype.trackTrace=function(e,t){try{var n=Sn.create(e,ln.dataType,ln.envelopeType,this.diagLog(),t);this.core.track(n)}catch(r){this.diagLog().throwInternal(W.WARNING,39,"trackTrace failed, trace will not be collected: "+at.getExceptionName(r),{exception:at.dump(r)})}},Ln.prototype.trackMetric=function(e,t){try{var n=Sn.create(e,Kt.dataType,Kt.envelopeType,this.diagLog(),t);this.core.track(n)}catch(r){this.diagLog().throwInternal(W.CRITICAL,36,"trackMetric failed, metric will not be collected: "+at.getExceptionName(r),{exception:at.dump(r)})}},Ln.prototype.trackPageView=function(e,t){try{var n=e||{};this._pageViewManager.trackPageView(n,__assign({},n.properties,n.measurements,t)),this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(n.name,n.uri)}catch(r){this.diagLog().throwInternal(W.CRITICAL,37,"trackPageView failed, page view will not be collected: "+at.getExceptionName(r),{exception:at.dump(r)})}},Ln.prototype.sendPageViewInternal=function(e,t,n){var r=E();r&&(e.refUri=e.refUri===undefined?r.referrer:e.refUri);var i=Sn.create(e,Qt.dataType,Qt.envelopeType,this.diagLog(),t,n);this.core.track(i),this._trackAjaxAttempts=0},Ln.prototype.sendPageViewPerformanceInternal=function(e,t,n){var r=Sn.create(e,xn.dataType,xn.envelopeType,this.diagLog(),t,n);this.core.track(r)},Ln.prototype.trackPageViewPerformance=function(e,t){try{this._pageViewPerformanceManager.populatePageViewPerformanceEvent(e),this.sendPageViewPerformanceInternal(e,t)}catch(n){this.diagLog().throwInternal(W.CRITICAL,37,"trackPageViewPerformance failed, page view will not be collected: "+at.getExceptionName(n),{exception:at.dump(n)})}},Ln.prototype.startTrackPage=function(e){try{var t;"string"!=typeof e&&(e=(t=E())&&t.title||""),this._pageTracking.start(e)}catch(n){this.diagLog().throwInternal(W.CRITICAL,31,"startTrackPage failed, page view may not be collected: "+at.getExceptionName(n),{exception:at.dump(n)})}},Ln.prototype.stopTrackPage=function(e,t,n,r){try{var i,a;"string"!=typeof e&&(e=(i=E())&&i.title||""),"string"!=typeof t&&(t=(a=b())&&a.href||""),this._pageTracking.stop(e,t,n,r),this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(e,t)}catch(o){this.diagLog().throwInternal(W.CRITICAL,32,"stopTrackPage failed, page view will not be collected: "+at.getExceptionName(o),{exception:at.dump(o)})}},Ln.prototype.sendExceptionInternal=function(e,t,n){var r=new bt(this.diagLog(),e.exception||Error(at.NotSpecified),e.properties,e.measurements,e.severityLevel,e.id).toInterface(),i=Sn.create(r,bt.dataType,bt.envelopeType,this.diagLog(),t,n);this.core.track(i)},Ln.prototype.trackException=function(e,t){try{this.sendExceptionInternal(e,t)}catch(n){this.diagLog().throwInternal(W.CRITICAL,35,"trackException failed, exception will not be collected: "+at.getExceptionName(n),{exception:at.dump(n)})}},Ln.prototype._onerror=function(e){try{var t,n={url:e&&e.url||(E()||{}).URL,lineNumber:e.lineNumber,columnNumber:e.columnNumber,message:e.message};at.isCrossOriginError(e.message,e.url,e.lineNumber,e.columnNumber,e.error)?this._sendCORSException(n.url):(at.isError(e.error)||(t="window.onerror@"+n.url+":"+e.lineNumber+":"+(e.columnNumber||0),e.error=Error(e.message),e.error.stack=t),this.trackException({exception:e.error,severityLevel:vn.Error},n))}catch(i){var r=e.error?e.error.name+", "+e.error.message:"null";this.diagLog().throwInternal(W.CRITICAL,11,"_onError threw exception while logging error, error will not be collected: "+at.getExceptionName(i),{exception:at.dump(i),errorString:r})}},Ln.prototype.addTelemetryInitializer=function(e){this._telemetryInitializers.push(e)},Ln.prototype.initialize=function(e,t,n,r){var o=this;if(!this.isInitialized()){if(B.isNullOrUndefined(t))throw Error("Error initializing");kn.prototype.initialize.call(this,e,t,n,r),this.setInitialized(!1);var i=this._getTelCtx(),a=this.identifier;this._globalconfig={instrumentationKey:e.instrumentationKey,endpointUrl:e.endpointUrl||"https://dc.services.visualstudio.com/v2/track"},this.config=i.getExtCfg(a);var s=Ln.getDefaultConfig();if(s!==undefined){for(var c in s)this.config[c]=i.getConfig(a,c,s[c]);if(this._globalconfig)for(var c in s)this._globalconfig[c]===undefined&&(this._globalconfig[c]=s[c])}this.config.isCookieUseDisabled&&at.disableCookies(),this.config.isStorageUseDisabled&&at.disableStorage();var u={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}};this._pageViewPerformanceManager=new Cn(this.core),this._pageViewManager=new wn(this,this.config.overridePageViewDuration,this.core,this._pageViewPerformanceManager),this._pageVisitTimeManager=new In(this.diagLog(),function(e,t,n){return o.trackPageVisitTime(e,t,n)}),this._telemetryInitializers=this._telemetryInitializers||[],this._addDefaultTelemetryInitializers(u),this._eventTracking=new Mn(this.diagLog(),"trackEvent"),this._eventTracking.action=function(e,t,n,r){(r=r||{})[Dn]=n.toString(),o.trackEvent({name:e,properties:r})},this._pageTracking=new Mn(this.diagLog(),"trackPageView"),this._pageTracking.action=function(e,t,n,r,i){B.isNullOrUndefined(r)&&(r={}),r[Dn]=n.toString();var a={name:e,uri:t,properties:r,measurements:i};o.sendPageViewInternal(a,r)};var l,f,g,p,d,h=N(),m=typeof history===x&&history?history:w("history"),v=b(),y=this;!1===this.config.disableExceptionTracking&&!this.config.autoExceptionInstrumented&&h&&(l=h.onerror,h.onerror=function(e,t,n,r,i){var a=l&&l(e,t,n,r,i);return!0!==a&&y._onerror({message:e,url:t,lineNumber:n,columnNumber:r,error:i}),a},this.config.autoExceptionInstrumented=!0),!1===this.config.disableExceptionTracking&&!0===this.config.enableUnhandledPromiseRejectionTracking&&!this.config.autoUnhandledPromiseInstrumented&&h&&(f=h.onunhandledrejection,h.onunhandledrejection=function(e){var t=f&&f.call(h,e);return!0!==t&&y._onerror({message:e.reason.toString(),error:e.reason instanceof Error?e.reason:Error(e.reason.toString()),url:v?v.href:"",lineNumber:0,columnNumber:0}),t},this.config.autoUnhandledPromiseInstrumented=!0),!0===this.config.enableAutoRouteTracking&&m&&B.isFunction(m.pushState)&&B.isFunction(m.replaceState)&&h&&"undefined"!=typeof Event&&(g=this,B.arrForEach(n,function(e){"AppInsightsPropertiesPlugin"===e.identifier&&(o._properties=e)}),m.pushState=(d=m.pushState,function(){var e=d.apply(this,arguments);return Pn(h,at.createDomEvent(g.config.namePrefix+"pushState")),Pn(h,at.createDomEvent(g.config.namePrefix+"locationchange")),e}),m.replaceState=(p=m.replaceState,function(){var e=p.apply(this,arguments);return Pn(h,at.createDomEvent(g.config.namePrefix+"replaceState")),Pn(h,at.createDomEvent(g.config.namePrefix+"locationchange")),e}),h.addEventListener&&(h.addEventListener(g.config.namePrefix+"popstate",function(){Pn(h,at.createDomEvent(g.config.namePrefix+"locationchange"))}),h.addEventListener(g.config.namePrefix+"locationchange",function(){g._properties&&g._properties.context&&g._properties.context.telemetryTrace&&(g._properties.context.telemetryTrace.traceID=at.generateW3CId(),g._properties.context.telemetryTrace.name=v&&v.pathname||"_unknown_"),o._currUri&&(o._prevUri=o._currUri),o._currUri=v&&v.href||"",setTimeout((function(e){g.trackPageView({refUri:e,properties:{duration:0}})}).bind(o,o._prevUri),g.autoRoutePVDelay)}))),this.setInitialized(!0)}},Ln.prototype.trackPageVisitTime=function(e,t,n){var r={PageName:e,PageUrl:t};this.trackMetric({name:"PageVisitTime",average:n,max:n,min:n,sampleCount:1},r)},Ln.prototype._addDefaultTelemetryInitializers=function(e){var r;e.isBrowserLinkTrackingEnabled()||(r=["/browserLinkSignalR/","/__browserLink/"],this._addTelemetryInitializer(function(e){if(e.baseType===rn.dataType){var t=e.baseData;if(t)for(var n=0;n<r.length;n++)if(t.target&&~t.target.indexOf(r[n]))return!1}return!0}))},Ln.prototype._addTelemetryInitializer=function(e){this._telemetryInitializers.push(e)},Ln.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:undefined},n=Sn.create(t,bt.dataType,bt.envelopeType,this.diagLog(),{url:e});this.core.track(n)},Ln.Version="2.5.8",Ln);function Ln(){var e=kn.call(this)||this;e.identifier="ApplicationInsightsAnalytics",e.priority=180,e.autoRoutePVDelay=500,e._trackAjaxAttempts=0;var t=b();return e._prevUri=t&&t.href||"",e}var Mn=(Rn.prototype.start=function(e){"undefined"!=typeof this._events[e]&&this._logger.throwInternal(W.WARNING,62,"start was called more than once for this event without calling stop.",{name:this._name,key:e},!0),this._events[e]=+new Date},Rn.prototype.stop=function(e,t,n,r){var i,a,o=this._events[e];isNaN(o)?this._logger.throwInternal(W.WARNING,63,"stop was called without a corresponding start.",{name:this._name,key:e},!0):(i=+new Date,a=ft.GetDuration(o,i),this.action(e,t,a,n,r)),delete this._events[e],this._events[e]=undefined},Rn);function Rn(e,t){this._name=t,this._events={},this._logger=e}e.ApplicationInsights=An,function(e,t,n){var r=Object.defineProperty;if(r)try{return r(e,t,n)}catch(i){}typeof n.value!==undefined&&(e[t]=n.value)}(e,"__esModule",{value:!0})};"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e.Microsoft=e.Microsoft||{},e.Microsoft.ApplicationInsights=e.Microsoft.ApplicationInsights||{}));
//# sourceMappingURL=applicationinsights-analytics-js.min.js.map
/*!
* Application Insights JavaScript SDK - Web Analytics, 2.5.7
* Application Insights JavaScript SDK - Web Analytics, 2.5.8
* Copyright (c) Microsoft and contributors. All rights reserved.

@@ -4,0 +4,0 @@ */

/*!
* Application Insights JavaScript SDK - Web Analytics, 2.5.7
* Application Insights JavaScript SDK - Web Analytics, 2.5.8
* Copyright (c) Microsoft and contributors. All rights reserved.

@@ -4,0 +4,0 @@ */

/*!
* Application Insights JavaScript SDK - Web Analytics, 2.5.7
* Application Insights JavaScript SDK - Web Analytics, 2.5.8
* Copyright (c) Microsoft and contributors. All rights reserved.

@@ -546,3 +546,3 @@ */

};
ApplicationInsights.Version = "2.5.7"; // Not currently used anywhere
ApplicationInsights.Version = "2.5.8"; // Not currently used anywhere
return ApplicationInsights;

@@ -549,0 +549,0 @@ }(BaseTelemetryPlugin));

/*!
* Application Insights JavaScript SDK - Web Analytics, 2.5.7
* Application Insights JavaScript SDK - Web Analytics, 2.5.8
* Copyright (c) Microsoft and contributors. All rights reserved.

@@ -4,0 +4,0 @@ */

/*!
* Application Insights JavaScript SDK - Web Analytics, 2.5.7
* Application Insights JavaScript SDK - Web Analytics, 2.5.8
* Copyright (c) Microsoft and contributors. All rights reserved.

@@ -4,0 +4,0 @@ */

/*!
* Application Insights JavaScript SDK - Web Analytics, 2.5.7
* Application Insights JavaScript SDK - Web Analytics, 2.5.8
* Copyright (c) Microsoft and contributors. All rights reserved.

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

import { Util } from '@microsoft/applicationinsights-common';
import { hasJSON, getJSON } from '@microsoft/applicationinsights-core-js';
import { hasJSON, getJSON, CoreUtils } from '@microsoft/applicationinsights-core-js';
/**

@@ -87,3 +87,3 @@ * Used to track page visit durations

// Define end time of page's visit
var pageVisitEndTime = Date.now();
var pageVisitEndTime = CoreUtils.dateNow();
// Try to retrieve page name and start time from session storage

@@ -116,3 +116,3 @@ var pageVisitDataJsonStr = Util.getSessionStorage(this._logger, this.prevPageVisitDataKeyName);

function PageVisitData(pageName, pageUrl) {
this.pageVisitStartTime = Date.now();
this.pageVisitStartTime = CoreUtils.dateNow();
this.pageName = pageName;

@@ -119,0 +119,0 @@ this.pageUrl = pageUrl;

/*!
* Application Insights JavaScript SDK - Web Analytics, 2.5.7
* Application Insights JavaScript SDK - Web Analytics, 2.5.8
* Copyright (c) Microsoft and contributors. All rights reserved.
*/
var e=this,t=function(e){"use strict";var i="function",a="object",t="undefined",o="prototype",s="hasOwnProperty";function n(){return typeof globalThis!==t&&globalThis?globalThis:typeof self!==t&&self?self:typeof window!==t&&window?window:typeof global!==t&&global?global:null}function r(e){var t=Object.create;if(t)return t(e);if(null==e)return{};var n=typeof e;if(n!=a&&n!=i)throw new TypeError("Object prototype may only be an Object:"+e);function r(){}return r[o]=e,new r}var c,u,d,l,f,g=function(e,t){return(g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t[s](n)&&(e[n]=t[n])})(e,t)},p=n()||{};__assign=p.__assign=p.__assign||Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object[o][s].call(t,i)&&(e[i]=t[i]);return e},__extends=p.__extends=p.__extends||function(e,t){function n(){this.constructor=e}g(e,t),e[o]=null===t?r(t):(n[o]=t[o],new n)},(u=c={})[u.LocalStorage=0]="LocalStorage",u[u.SessionStorage=1]="SessionStorage",(l=d=d||{})[l.Default=0]="Default",l[l.Required=1]="Required",l[l.Array=2]="Array",l[l.Hidden=4]="Hidden",(f={})[f.AI=0]="AI",f[f.AI_AND_W3C=1]="AI_AND_W3C",f[f.W3C=2]="W3C";var h=2,m=t,x=a,v=o,y="window",_="location",S="JSON",T=n;function I(e){var t=T();return t&&t[e]?t[e]:e===y&&w()?window:null}function w(){return typeof window===x&&window}function N(){return w()?window:I(y)}function E(){return typeof document===x&&document?document:I("document")}function C(){return typeof navigator===x&&navigator?navigator:I("navigator")}function b(){return typeof location===x&&location?location:I(_)}function D(){return I("performance")}function P(){return typeof JSON===x&&JSON||null!==I(S)}function k(){return P()?JSON||I(S):null}var A="constructor",L="prototype",M="function",R="_dynInstFuncs",O="_isDynProxy",U="_dynClass",z="_dynCls$",V="_unknown_",G="__proto__",j=Object.getPrototypeOf,q=0;function F(e,t){return e&&Object[L].hasOwnProperty.call(e,t)}function B(e){return typeof e===M}function K(e){return e&&(e===Object[L]||e===Array[L])}function W(e){return K(e)||e===Function[L]}function H(e){if(e){if(j)return j(e);var t=e[G]||e[L]||e[A];if(t)return t}return null}function X(e,t,n){return t!==A&&B(e[t])&&(n||F(e,t))}function J(e){throw new TypeError("DynamicProto: "+e)}function $(e,t){return F(e,L)?e.name||t||V:((e||{})[A]||{}).name||t||V}function Q(e,n,t){F(e,L)||J("theClass is an invalid class definition.");var r=e[L];!function(e){for(var t=H(n);t&&!W(t);){if(t===e)return 1;t=H(t)}}(r)&&J("["+$(e)+"] is not in class heirarchy of ["+$(n)+"]");var i=null;F(r,U)?i=r[U]:(i=z+$(e,"_")+"$"+q,q++,r[U]=i);var a=function(e){var t={};for(var n in e)!t[n]&&X(e,n,!1)&&(t[n]=e[n]);return t}(n);t(n,function(e,t,n){function r(e,t){return function(){return t.apply(e,arguments)}}var i={};for(var a in n)i[a]=r(t,n[a]);for(var o=H(e),s=[];o&&!W(o)&&!function(e,t){for(var n=e.length-1;0<=n;n--)if(e[n]===t)return 1}(s,o);){for(var a in o)!i[a]&&X(o,a,!j)&&(i[a]=r(t,o[a]));s.push(o),o=H(o)}return i}(r,n,a)),function(e,t,n,r){if(!K(e)){var i=n[R]=n[R]||{},a=i[t]=i[t]||{};for(var o in n)X(n,o,!1)&&n[o]!==r[o]&&(a[o]=n[o],delete n[o],F(e,o)&&(!e[o]||e[o][O])||(e[o]=function(n,r){var i=function(){if(this&&F(n,U)){var e=((this[R]||{})[n[U]]||{})[r];if(e)return e.apply(this,arguments);J("Missing ["+r+"] "+M)}var t=n[r];return t===i&&(t=H(n)[r]),B(t)||J("["+r+"] is not a "+M),t.apply(this,arguments)};return i[O]=1,i}(e,o)))}}(r,i,n,a)}var Y="ctx",Z=(ee.ParentContextKey="parent",ee.ChildrenContextKey="childEvts",ee);function ee(e,i,t){var n,a=this,o=!1;a.start=Date.now(),a.name=e,a.isAsync=t,a.isChildEvt=function(){return!1},de.isFunction(i)&&(o=de.objDefineAccessors(a,"payload",function(){return!n&&de.isFunction(i)&&(n=i(),i=null),n})),a.getCtx=function(e){return e?e===ee.ParentContextKey||e===ee.ChildrenContextKey?a[e]:(a[Y]||{})[e]:null},a.setCtx=function(e,t){e&&(e===ee.ParentContextKey?(a[e]||(a.isChildEvt=function(){return!0}),a[e]=t):e===ee.ChildrenContextKey?a[e]=t:(a[Y]=a[Y]||{})[e]=t)},a.complete=function(){var e=0,t=a.getCtx(ee.ChildrenContextKey);if(de.isArray(t))for(var n=0;n<t.length;n++){var r=t[n];r&&(e+=r.time)}a.time=Date.now()-a.start,a.exTime=a.time-e,a.complete=function(){},!o&&de.isFunction(i)&&(a.payload=i())}}var te=function On(t){this.ctx={},Q(On,this,function(n){n.create=function(e,t,n){return new Z(e,t,n)},n.fire=function(e){e&&e.complete(),t&&t.perfEvent(e)},n.setCtx=function(e,t){e&&((n[Y]=n[Y]||{})[e]=t)},n.getCtx=function(e){return(n[Y]||{})[e]}})},ne="attachEvent",re="addEventListener",ie="detachEvent",ae="removeEventListener";function oe(e,t){return typeof e===t}function se(e){return oe(e,t)||e===undefined}function ce(e){return se(e)||null===e}function ue(e,t){return e&&Object[o].hasOwnProperty.call(e,t)}function le(e){return oe(e,a)}function fe(e){return oe(e,i)}function ge(e,t,n,r){void 0===r&&(r=!1);var i=!1;if(!ce(e))try{ce(e[re])?ce(e[ne])||(e[ne]("on"+t,n),i=!0):(e[re](t,n,r),i=!0)}catch(a){}return i}function pe(e,t,n,r){if(void 0===r&&(r=!1),!ce(e))try{ce(e[ae])?ce(e[ie])||e[ie]("on"+t,n):e[ae](t,n,r)}catch(i){}}var de=(he.isDate=function(e){return"[object Date]"===Object[o].toString.call(e)},he.isArray=function(e){return"[object Array]"===Object[o].toString.call(e)},he.isError=function(e){return"[object Error]"===Object[o].toString.call(e)},he.isString=function(e){return oe(e,"string")},he.isNumber=function(e){return oe(e,"number")},he.isBoolean=function(e){return oe(e,"boolean")},he.disableCookies=function(){he._canUseCookies=!1},he.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(me,function(e){var t,n=0|((t=I("crypto"))?t.getRandomValues(new Uint8Array(1))[0]%16:16*Math.random());return("x"===e?n:3&n|8).toString(16)})},he.toISOString=function(e){if(he.isDate(e)){var t=function(e){var t=e+"";return 1===t.length&&(t="0"+t),t};return e.getUTCFullYear()+"-"+t(1+e.getUTCMonth())+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())+"."+((e.getUTCMilliseconds()/1e3).toFixed(3)+"").slice(2,5)+"Z"}},he.arrForEach=function(e,t,n){for(var r=e.length,i=0;i<r;i++)i in e&&t.call(n||e,e[i],i,e)},he.arrIndexOf=function(e,t,n){for(var r=e.length,i=n||0,a=Math.max(0<=i?i:r-Math.abs(i),0);a<r;a++)if(a in e&&e[a]===t)return a;return-1},he.arrMap=function(e,t,n){for(var r=e.length,i=n||e,a=Array(r),o=0;o<r;o++)o in e&&(a[o]=t.call(i,e[o],e));return a},he.arrReduce=function(e,t,n){var r,i=e.length,a=0;if(3<=arguments.length)r=n;else{for(;a<i&&!(a in e);)a++;r=e[a++]}for(;a<i;)a in e&&(r=t(r,e[a],a,e)),a++;return r},he.strTrim=function(e){return he.isString(e)?e.replace(/^\s+|\s+$/g,""):e},he.objKeys=function(e){var t=!{toString:null}.propertyIsEnumerable("toString");if(!(fe(e)||le(e)&&null!==e))throw new TypeError("objKeys called on non-object");var n=[];for(var r in e)ue(e,r)&&n.push(r);if(t)for(var i=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],a=i.length,o=0;o<a;o++)ue(e,i[o])&&n.push(i[o]);return n},he.objDefineAccessors=function(e,t,n,r){var i=Object.defineProperty;if(i)try{var a={enumerable:!0,configurable:!0};return n&&(a.get=n),r&&(a.set=r),i(e,t,a),!0}catch(o){}return!1},he.addEventHandler=function(e,t){var n=!1,r=N();r&&(n=ge(r,e,t),n=ge(r.body,e,t)||n);var i=E();return i&&(n=ve.Attach(i,e,t)||n),n},he.isTypeof=oe,he.isUndefined=se,he.isNullOrUndefined=ce,he.hasOwnProperty=ue,he.isFunction=fe,he.isObject=le,he.objCreate=r,he);function he(){}var me=/[xy]/g,ve=(ye.Attach=ge,ye.AttachEvent=ge,ye.Detach=pe,ye.DetachEvent=pe,ye);function ye(){}var xe,_e,Se="CoreUtils.doPerf";function Te(e,t,n,r,i){if(e){var a=e;if(a&&de.isFunction(a.getPerfMgr)&&(a=a.getPerfMgr()),a){var o,s=void 0,c=a.getCtx(Se);try{if(s=a.create(t(),r,i))return c&&s.setCtx&&(s.setCtx(Z.ParentContextKey,c),c.getCtx&&c.setCtx&&((o=c.getCtx(Z.ChildrenContextKey))||(o=[],c.setCtx(Z.ChildrenContextKey,o)),o.push(s))),a.setCtx(Se,s),n(s)}catch(u){s&&s.setCtx&&s.setCtx("exception",u)}finally{s&&a.fire(s),a.setCtx(Se,c)}}}return n()}(_e=xe={})[_e.CRITICAL=1]="CRITICAL",_e[_e.WARNING=2]="WARNING";function Ie(e){return e?'"'+e.replace(/\"/g,"")+'"':""}var we=(Ne.dataType="MessageData",Ne);function Ne(e,t,n,r){void 0===n&&(n=!1),this.messageId=e,this.message=(n?"AI: ":"AI (Internal): ")+e;var i="";P()&&(i=k().stringify(r));var a=(t?" message:"+Ie(t):"")+(r?" props:"+Ie(i):"");this.message+=a}var Ee=function Un(a){this.identifier="DiagnosticLogger",this.queue=[];var o=0,u={};Q(Un,this,function(s){var r=de.isNullOrUndefined,c=de.isUndefined,i=de.isFunction;function e(e,t){var n=a[e];return r(n)?t:n}r(a)&&(a={}),s.consoleLoggingLevel=function(){return e("loggingLevelConsole",0)},s.telemetryLoggingLevel=function(){return e("loggingLevelTelemetry",1)},s.maxInternalMessageLimit=function(){return e("maxMessageLimit",25)},s.enableDebugExceptions=function(){return e("enableDebugExceptions",!1)},s.throwInternal=function(e,t,n,r,i){void 0===i&&(i=!1);var a,o=new we(t,n,i,r);if(s.enableDebugExceptions())throw o;!c(o)&&o&&(c(o.message)||(i?(a=+o.messageId,!u[a]&&s.consoleLoggingLevel()>=xe.WARNING&&(s.warnToConsole(o.message),u[a]=!0)):s.consoleLoggingLevel()>=xe.WARNING&&s.warnToConsole(o.message),s.logInternalMessage(e,o)))},s.warnToConsole=function(e){var t,n=typeof console!==m?console:I("console");n&&(t="log",n.warn&&(t="warn"),i(n[t])&&n[t](e))},s.resetInternalMessageCount=function(){o=0,u={}},s.logInternalMessage=function(e,t){var n,r,i;o>=s.maxInternalMessageLimit()||(n=!0,r="AITR_"+t.messageId,u[r]?n=!1:u[r]=!0,n&&(e<=s.telemetryLoggingLevel()&&(s.queue.push(t),o++),o===s.maxInternalMessageLimit()&&(i=new we(23,"Internal events throttle limit per PageView reached for this app.",!1),s.queue.push(i),s.warnToConsole("Internal events throttle limit per PageView reached for this app."))))}})},Ce=de.isFunction,be=function(i,t){var a=this,o=null,s=Ce(i.processTelemetry),c=Ce(i.setNextPlugin);a._hasRun=!1,a.getPlugin=function(){return i},a.getNext=function(){return o},a.setNext=function(e){o=e},a.processTelemetry=function(n,r){r=r||t;var e=i?i.identifier:"TelemetryPluginChain";Te(r?r.core():null,function(){return e+":processTelemetry"},function(){if(i&&s){a._hasRun=!0;try{r.setNext(o),c&&i.setNextPlugin(o),o&&(o._hasRun=!1),i.processTelemetry(n,r)}catch(t){var e=o&&o._hasRun;o&&e||r.diagLog().throwInternal(xe.CRITICAL,73,"Plugin ["+i.identifier+"] failed during processTelemetry - "+t),o&&!e&&o.processTelemetry(n,r)}}else o&&(a._hasRun=!0,o.processTelemetry(n,r))},function(){return{item:n}},!n.sync)}},De=de.isNullOrUndefined;function Pe(e,t){var n=[];if(e&&0<e.length)for(var r=null,i=0;i<e.length;i++){var a,o=e[i];o&&de.isFunction(o.processTelemetry)&&(a=new be(o,t),n.push(a),r&&r.setNext(a),r=a)}return 0<n.length?n[0]:null}var ke=function zn(e,a,n,t){var r,i,o,s,c=this,u=null;null!==t&&(e&&de.isFunction(e.getPlugin)?u=function(e,t,n){var r=[],i=!n;if(e)for(;e;){var a=e.getPlugin();!i&&a!==n||(i=!0,r.push(a)),e=e.getNext()}return i||r.push(n),Pe(r,t)}(e,c,t||e.getPlugin()):t?(r=c,o=e,s=!1,(i=t)&&e&&(o=[],de.arrForEach(e,function(e){!s&&e!==i||(s=!0,o.push(e))})),i&&!s&&(o=o||[]).push(i),u=Pe(o,r)):de.isUndefined(t)&&(u=Pe(e,c))),c.core=function(){return n},c.diagLog=function(){return(n||{}).logger||new Ee(a||{})},c.getCfg=function(){return a},c.getExtCfg=function(e,t){var n,r;return void 0===t&&(t={}),!a||(r=a.extensionConfig)&&e&&(n=r[e]),n||t},c.getConfig=function(e,t,n){var r;void 0===n&&(n=!1);var i=c.getExtCfg(e,null);return i&&!De(i[t])?r=i[t]:a&&!De(a[t])&&(r=a[t]),De(r)?n:r},c.hasNext=function(){return null!=u},c.getNext=function(){return u},c.setNext=function(e){u=e},c.processNext=function(e){var t=u;t&&(u=t.getNext(),t.processTelemetry(e,c))},c.createNew=function(e,t){return void 0===e&&(e=null),new zn(e||u,a,n,t)}},Ae=de.isFunction,Le="getPlugin",Me=(Re.prototype.initialize=function(e,t,n,r){this._baseTelInit(e,t,n,r)},Re);function Re(){var a=this,o=!1,s=null,c=null;a.core=null,a.diagLog=function(e){return a._getTelCtx(e).diagLog()},a.isInitialized=function(){return o},a.setInitialized=function(e){o=e},a.setNextPlugin=function(e){c=e},a.processNext=function(e,t){t?t.processNext(e):c&&Ae(c.processTelemetry)&&c.processTelemetry(e,null)},a._getTelCtx=function(e){void 0===e&&(e=null);var t,n=e;return n||(t=s||new ke(null,{},a.core),n=c&&c[Le]?t.createNew(null,c[Le]):t.createNew(null,c)),n},a._baseTelInit=function(e,t,n,r){e&&(e.extensionConfig=e.extensionConfig||[]),!r&&t&&(r=t.getProcessTelContext().getNext());var i=c;c&&c[Le]&&(i=c[Le]()),a.core=t,s=new ke(r,e,t,i),o=!0}}var Oe=de.isFunction,Ue="processTelemetry",ze="priority",Ve="setNextPlugin",Ge="isInitialized";function je(t,n){for(var e=[],r=null,i=t.getNext();i;){var a=i.getPlugin();a&&(r&&Oe(r[Ve])&&Oe(a[Ue])&&r[Ve](a),Oe(a[Ge])&&a[Ge]()||e.push(a),r=a,i=i.getNext())}de.arrForEach(e,function(e){e.initialize(t.getCfg(),t.core(),n,t.getNext())})}function qe(e){return e.sort(function(e,t){var n=0,r=Oe(t[Ue]);return Oe(e[Ue])?n=r?e[ze]-t[ze]:1:r&&(n=-1),n})}var Fe,Be=500,Ke="Channel has invalid priority",We=de.objDefineAccessors,He=(Fe=Me,__extends(Xe,Fe),Xe._staticInit=(We(Xe.prototype,"ChannelControls",Xe.prototype.getChannelControls),void We(Xe.prototype,"channelQueue",Xe.prototype.getChannelControls)),Xe);function Xe(){var r=Fe.call(this)||this;r.identifier="ChannelControllerPlugin",r.priority=Be;var c,u=de.arrForEach;function l(e){e&&0<e.length&&(e=e.sort(function(e,t){return e.priority-t.priority}),u(e,function(e){if(e.priority<Be)throw Error(Ke+e.identifier)}),c.push(e))}return Q(Xe,r,function(o,s){o.setNextPlugin=function(e){},o.processTelemetry=function(t,n){c&&u(c,function(e){0<e.length&&r._getTelCtx(n).createNew(e).processNext(t)})},o.getChannelControls=function(){return c},o.initialize=function(t,n,r){var e,i,a;o.isInitialized()||(s.initialize(t,n,r),t.isCookieUseDisabled&&de.disableCookies(),i=r,c=[],(e=(t||{}).channels)&&u(e,l),i&&(a=[],u(i,function(e){e.priority>Be&&a.push(e)}),l(a)),u(c,function(e){return je(new ke(e,t,n),r)}))}}),r}var Je=de.arrForEach,$e=de.isNullOrUndefined,Qe="_notificationManager",Ye=function Vn(e){this.listeners=[];var a=de.arrForEach,t=!!(e||{}).perfEvtsSendAll;Q(Vn,this,function(i){i.addNotificationListener=function(e){i.listeners.push(e)},i.removeNotificationListener=function(e){for(var t=de.arrIndexOf(i.listeners,e);-1<t;)i.listeners.splice(t,1),t=de.arrIndexOf(i.listeners,e)},i.eventsSent=function(t){a(i.listeners,function(e){e&&e.eventsSent&&setTimeout(function(){return e.eventsSent(t)},0)})},i.eventsDiscarded=function(t,n){a(i.listeners,function(e){e&&e.eventsDiscarded&&setTimeout(function(){return e.eventsDiscarded(t,n)},0)})},i.eventsSendRequest=function(n,r){a(i.listeners,function(e){if(e&&e.eventsSendRequest)if(r)setTimeout(function(){return e.eventsSendRequest(n,r)},0);else try{e.eventsSendRequest(n,r)}catch(t){}})},i.perfEvent=function(n){n&&(!t&&n.isChildEvt()||a(i.listeners,function(e){if(e&&e.perfEvent)if(n.isAsync)setTimeout(function(){return e.perfEvent(n)},0);else try{e.perfEvent(n)}catch(t){}}))}})},Ze=function Gn(){var t,c,u,n,l=!1;Q(Gn,this,function(s){s._extensions=[],c=new He,t=[],s.isInitialized=function(){return l},s.initialize=function(e,t,r,n){if(s.isInitialized())throw Error("Core should not be initialized more than once");if(!e||$e(e.instrumentationKey))throw Error("Please provide instrumentation key");u=n,s[Qe]=n,s.config=e||{},e.extensions=$e(e.extensions)?[]:e.extensions,(e.extensionConfig=$e(e.extensionConfig)?{}:e.extensionConfig).NotificationManager=n,r=r||de.objCreate({throwInternal:function(e,t,n,r,i){void 0===i&&(i=!1)},warnToConsole:function(e){},resetInternalMessageCount:function(){}}),s.logger=r;var i=[];i.push.apply(i,t.concat(e.extensions)),i=qe(i);var a=[],o={};if(Je(i,function(e){if($e(e)||$e(e.initialize))throw Error("Extensions must provide callback to initialize");var t=e.priority,n=e.identifier;e&&t&&($e(o[t])?o[t]=n:r.warnToConsole("Two extensions have same priority #"+t+" - "+o[t]+", "+n)),(!t||t<c.priority)&&a.push(e)}),i.push(c),a.push(c),i=qe(i),s._extensions=i,je(new ke([c],e,s),i),je(new ke(a,e,s),i),s._extensions=a,0===s.getTransmissionControls().length)throw Error("No channels available");l=!0,s.releaseQueue()},s.getTransmissionControls=function(){return c.getChannelControls()},s.track=function(e){e.iKey||(e.iKey=s.config.instrumentationKey),e.time||(e.time=de.toISOString(new Date)),$e(e.ver)&&(e.ver="4.0"),s.isInitialized()?s.getProcessTelContext().processNext(e):t.push(e)},s.getProcessTelContext=function(){var e=s._extensions,t=e;return e&&0!==e.length||(t=[c]),new ke(t,s.config,s)},s.getNotifyMgr=function(){return u||(u=de.objCreate({addNotificationListener:function(e){},removeNotificationListener:function(e){},eventsSent:function(e){},eventsDiscarded:function(e,t){},eventsSendRequest:function(e,t){}}),s[Qe]=u),u},s.getPerfMgr=function(){return n||s.config&&s.config.enablePerfMgr&&(n=new te(s.getNotifyMgr())),n},s.setPerfMgr=function(e){n=e},s.eventCnt=function(){return t.length},s.releaseQueue=function(){0<t.length&&(Je(t,function(e){s.getProcessTelContext().processNext(e)}),t=[])}})};__extends(function jn(){var e=Ze.call(this)||this;return Q(jn,e,function(r,i){function t(e){var t=r.getNotifyMgr();t&&t.eventsDiscarded([e],h)}r.initialize=function(e,t,n,r){i.initialize(e,t,n||new Ee(e),r||new Ye(e))},r.track=function(e){Te(r.getPerfMgr(),function(){return"AppInsightsCore:track"},function(){if(null===e)throw t(e),Error("Invalid telemetry item");!function(e){if(de.isNullOrUndefined(e.name))throw t(e),Error("telemetry name required")}(e),i.track(e)},function(){return{item:e}},!e.sync)},r.addNotificationListener=function(e){var t=r.getNotifyMgr();t&&t.addNotificationListener(e)},r.removeNotificationListener=function(e){var t=r.getNotifyMgr();t&&t.removeNotificationListener(e)},r.pollInternalLogs=function(n){var e=r.config.diagnosticLogInterval;return e&&0<e||(e=1e4),setInterval(function(){var e=r.logger?r.logger.queue:[];de.arrForEach(e,function(e){var t={name:n||"InternalMessageId: "+e.messageId,iKey:r.config.instrumentationKey,time:de.toISOString(new Date),baseType:we.dataType,baseData:{message:e.message}};r.track(t)}),e.length=0},e)}}),e},Ze);var et=(tt.sanitizeKeyAndAddUniqueness=function(e,t,n){var r=t.length,i=tt.sanitizeKey(e,t);if(i.length!==r){for(var a=0,o=i;n[o]!==undefined;)a++,o=i.substring(0,tt.MAX_NAME_LENGTH-3)+tt.padNumber(a);i=o}return i},tt.sanitizeKey=function(e,t){var n;return t&&(t=tt.trim(t.toString())).length>tt.MAX_NAME_LENGTH&&(n=t.substring(0,tt.MAX_NAME_LENGTH),e.throwInternal(xe.WARNING,57,"name is too long. It has been truncated to "+tt.MAX_NAME_LENGTH+" characters.",{name:t},!0)),n||t},tt.sanitizeString=function(e,t,n){var r;return void 0===n&&(n=tt.MAX_STRING_LENGTH),t&&(n=n||tt.MAX_STRING_LENGTH,(t=tt.trim(t)).toString().length>n&&(r=t.toString().substring(0,n),e.throwInternal(xe.WARNING,61,"string value is too long. It has been truncated to "+n+" characters.",{value:t},!0))),r||t},tt.sanitizeUrl=function(e,t){return tt.sanitizeInput(e,t,tt.MAX_URL_LENGTH,66)},tt.sanitizeMessage=function(e,t){var n;return t&&t.length>tt.MAX_MESSAGE_LENGTH&&(n=t.substring(0,tt.MAX_MESSAGE_LENGTH),e.throwInternal(xe.WARNING,56,"message is too long, it has been truncated to "+tt.MAX_MESSAGE_LENGTH+" characters.",{message:t},!0)),n||t},tt.sanitizeException=function(e,t){var n;return t&&t.length>tt.MAX_EXCEPTION_LENGTH&&(n=t.substring(0,tt.MAX_EXCEPTION_LENGTH),e.throwInternal(xe.WARNING,52,"exception is too long, it has been truncated to "+tt.MAX_EXCEPTION_LENGTH+" characters.",{exception:t},!0)),n||t},tt.sanitizeProperties=function(e,t){if(t){var n={};for(var r in t){var i=t[r];if(de.isObject(i)&&P())try{i=k().stringify(i)}catch(a){e.throwInternal(xe.WARNING,49,"custom property is not valid",{exception:a},!0)}i=tt.sanitizeString(e,i,tt.MAX_PROPERTY_LENGTH),n[r=tt.sanitizeKeyAndAddUniqueness(e,r,n)]=i}t=n}return t},tt.sanitizeMeasurements=function(e,t){if(t){var n={};for(var r in t){var i=t[r];n[r=tt.sanitizeKeyAndAddUniqueness(e,r,n)]=i}t=n}return t},tt.sanitizeId=function(e,t){return t?tt.sanitizeInput(e,t,tt.MAX_ID_LENGTH,69).toString():t},tt.sanitizeInput=function(e,t,n,r){var i;return t&&(t=tt.trim(t)).length>n&&(i=t.substring(0,n),e.throwInternal(xe.WARNING,r,"input is too long, it has been truncated to "+n+" characters.",{data:t},!0)),i||t},tt.padNumber=function(e){var t="00"+e;return t.substr(t.length-3)},tt.trim=function(e){return de.isString(e)?e.replace(/^\s+|\s+$/g,""):e},tt.MAX_NAME_LENGTH=150,tt.MAX_ID_LENGTH=128,tt.MAX_PROPERTY_LENGTH=8192,tt.MAX_STRING_LENGTH=1024,tt.MAX_URL_LENGTH=2048,tt.MAX_MESSAGE_LENGTH=32768,tt.MAX_EXCEPTION_LENGTH=32768,tt);function tt(){}var nt=C(),rt=de.isString,it=null,at=(ot.createDomEvent=function(e){var t,n=null;return de.isFunction(Event)?n=new Event(e):(t=E())&&t.createEvent&&(n=t.createEvent("Event")).initEvent(e,!0,!0),n},ot.disableStorage=function(){ot._canUseLocalStorage=!1,ot._canUseSessionStorage=!1},ot._getLocalStorageObject=function(){return ot.canUseLocalStorage()?ot._getVerifiedStorageObject(c.LocalStorage):null},ot._getVerifiedStorageObject=function(e){var t,n,r=null;try{if(de.isNullOrUndefined(T()))return null;n=new Date,(r=I(e===c.LocalStorage?"localStorage":"sessionStorage")).setItem(n.toString(),n.toString()),t=r.getItem(n.toString())!==n.toString(),r.removeItem(n.toString()),t&&(r=null)}catch(i){r=null}return r},ot.isInternalApplicationInsightsEndpoint=function(e){return!!~ot._internalEndpoints.indexOf(e.toLowerCase())},ot.canUseLocalStorage=function(){return ot._canUseLocalStorage===undefined&&(ot._canUseLocalStorage=!!ot._getVerifiedStorageObject(c.LocalStorage)),ot._canUseLocalStorage},ot.getStorage=function(e,t){var n=ot._getLocalStorageObject();if(null!==n)try{return n.getItem(t)}catch(r){ot._canUseLocalStorage=!1,e.throwInternal(xe.WARNING,1,"Browser failed read of local storage. "+ot.getExceptionName(r),{exception:ot.dump(r)})}return null},ot.setStorage=function(e,t,n){var r=ot._getLocalStorageObject();if(null!==r)try{return r.setItem(t,n),!0}catch(i){ot._canUseLocalStorage=!1,e.throwInternal(xe.WARNING,3,"Browser failed write to local storage. "+ot.getExceptionName(i),{exception:ot.dump(i)})}return!1},ot.removeStorage=function(e,t){var n=ot._getLocalStorageObject();if(null!==n)try{return n.removeItem(t),!0}catch(r){ot._canUseLocalStorage=!1,e.throwInternal(xe.WARNING,5,"Browser failed removal of local storage item. "+ot.getExceptionName(r),{exception:ot.dump(r)})}return!1},ot._getSessionStorageObject=function(){return ot.canUseSessionStorage()?ot._getVerifiedStorageObject(c.SessionStorage):null},ot.canUseSessionStorage=function(){return ot._canUseSessionStorage===undefined&&(ot._canUseSessionStorage=!!ot._getVerifiedStorageObject(c.SessionStorage)),ot._canUseSessionStorage},ot.getSessionStorageKeys=function(){var e=[];if(ot.canUseSessionStorage())for(var t in I("sessionStorage"))e.push(t);return e},ot.getSessionStorage=function(e,t){var n=ot._getSessionStorageObject();if(null!==n)try{return n.getItem(t)}catch(r){ot._canUseSessionStorage=!1,e.throwInternal(xe.WARNING,2,"Browser failed read of session storage. "+ot.getExceptionName(r),{exception:ot.dump(r)})}return null},ot.setSessionStorage=function(e,t,n){var r=ot._getSessionStorageObject();if(null!==r)try{return r.setItem(t,n),!0}catch(i){ot._canUseSessionStorage=!1,e.throwInternal(xe.WARNING,4,"Browser failed write to session storage. "+ot.getExceptionName(i),{exception:ot.dump(i)})}return!1},ot.removeSessionStorage=function(e,t){var n=ot._getSessionStorageObject();if(null!==n)try{return n.removeItem(t),!0}catch(r){ot._canUseSessionStorage=!1,e.throwInternal(xe.WARNING,6,"Browser failed removal of session storage item. "+ot.getExceptionName(r),{exception:ot.dump(r)})}return!1},ot.disableCookies=function(){de.disableCookies()},ot.canUseCookies=function(e){if(de._canUseCookies===undefined){de._canUseCookies=!1;try{de._canUseCookies=ot.document.cookie!==undefined}catch(t){e.throwInternal(xe.WARNING,68,"Cannot access document.cookie - "+ot.getExceptionName(t),{exception:ot.dump(t)})}}return de._canUseCookies},ot.disallowsSameSiteNone=function(e){return!(!rt(e)||!~e.indexOf("CPU iPhone OS 12")&&!~e.indexOf("iPad; CPU OS 12")&&!(~e.indexOf("Macintosh; Intel Mac OS X 10_14")&&~e.indexOf("Version/")&&~e.indexOf("Safari"))&&(!~e.indexOf("Macintosh; Intel Mac OS X 10_14")||(n=(t=e.length)-40,"AppleWebKit/605.1.15 (KHTML, like Gecko)"!=e.substring(0<=n?n:0,t)))&&!~e.indexOf("Chrome/5")&&!~e.indexOf("Chrome/6")&&(!~e.indexOf("UnrealEngine")||~e.indexOf("Chrome"))&&!~e.indexOf("UCBrowser/12")&&!~e.indexOf("UCBrowser/11"));var t,n},ot.setCookie=function(e,t,n,r){var i,a,o;ot.canUseCookies(e)&&(a=i="",r&&(i=";domain="+r),(o=b())&&"https:"===o.protocol&&(a=";secure",null===it&&(it=ot.disallowsSameSiteNone((C()||{}).userAgent)),it||(n+=";SameSite=None")),ot.document.cookie=t+"="+n+i+";path=/"+a)},ot.stringToBoolOrDefault=function(e,t){return void 0===t&&(t=!1),e===undefined||null===e?t:"true"==e.toString().toLowerCase()},ot.getCookie=function(e,t){if(ot.canUseCookies(e)){var n="";if(t&&t.length)for(var r=t+"=",i=ot.document.cookie.split(";"),a=0;a<i.length;a++){var o=i[a];if((o=ot.trim(o))&&!o.indexOf(r)){n=o.substring(r.length,i[a].length);break}}return n}},ot.deleteCookie=function(e,t){ot.canUseCookies(e)&&(ot.document.cookie=t+"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;")},ot.newId=function(){for(var e="",t=1073741824*Math.random();0<t;)e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[0|t%64],t=Math.floor(t/64);return e},ot.random32=function(){return 4294967296*Math.random()|0},ot.generateW3CId=function(){for(var e,t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],n="",r=0;r<4;r++)n+=t[15&(e=ot.random32())]+t[e>>4&15]+t[e>>8&15]+t[e>>12&15]+t[e>>16&15]+t[e>>20&15]+t[e>>24&15]+t[e>>28&15];var i=t[8+4*Math.random()|0];return n.substr(0,8)+n.substr(9,4)+"4"+n.substr(13,3)+i+n.substr(16,3)+n.substr(19,12)},ot.getIEVersion=function(e){void 0===e&&(e=null);var t=e?e.toLowerCase():nt?(nt.userAgent||"").toLowerCase():"";if(~t.indexOf("msie"))return parseInt(t.split("msie")[1]);if(t.indexOf("trident/")){var n=parseInt(t.split("trident/")[1]);if(n)return n+4}return null},ot.msToTimeSpan=function(e){(isNaN(e)||e<0)&&(e=0);var t=""+(e=Math.round(e))%1e3,n=""+Math.floor(e/1e3)%60,r=""+Math.floor(e/6e4)%60,i=""+Math.floor(e/36e5)%24,a=Math.floor(e/864e5),t=1===t.length?"00"+t:2===t.length?"0"+t:t,n=n.length<2?"0"+n:n,r=r.length<2?"0"+r:r;return(0<a?a+".":"")+(i=i.length<2?"0"+i:i)+":"+r+":"+n+"."+t},ot.isCrossOriginError=function(e,t,n,r,i){return("Script error."===e||"Script error"===e)&&!i},ot.dump=function(e){var t=Object[v].toString.call(e),n="";return"[object Error]"===t?n="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":P()&&(n=k().stringify(e)),t+n},ot.getExceptionName=function(e){return"[object Error]"===Object[v].toString.call(e)?e.name:""},ot.addEventHandler=function(e,t){return ve.Attach(N(),e,t)},ot.IsBeaconApiSupported=function(){return"sendBeacon"in nt&&nt.sendBeacon},ot.getExtension=function(e,t){for(var n=null,r=0;!n&&r<e.length;)e[r]&&e[r].identifier===t&&(n=e[r]),r++;return n},ot.document=E()||{},ot._canUseLocalStorage=undefined,ot._canUseSessionStorage=undefined,ot._internalEndpoints=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],ot.NotSpecified="not_specified",ot.trim=de.strTrim,ot.isArray=de.isArray,ot.isError=de.isError,ot.isDate=de.isDate,ot.toISOStringForIE8=de.toISOString,ot);function ot(){}var st=(ct.parseUrl=function(e){var t=ct._htmlAnchorIdx,n=ct._htmlAnchorElement,r=n[t];return ct.document.createElement?n[t]||(r=n[t]=ct.document.createElement("a")):r={host:ct.parseHost(e,!0)},r.href=e,++t>=n.length&&(t=0),ct._htmlAnchorIdx=t,r},ct.getAbsoluteUrl=function(e){var t,n=ct.parseUrl(e);return n&&(t=n.href),t},ct.getPathName=function(e){var t,n=ct.parseUrl(e);return n&&(t=n.pathname),t},ct.getCompleteUrl=function(e,t){return e?e.toUpperCase()+" "+t:t},ct.parseHost=function(e,t){var n=ct.parseFullHost(e,t);if(n){var r=n.match(/(www[0-9]?\.)?(.[^/:]+)(\:[\d]+)?/i);if(null!=r&&3<r.length&&rt(r[2])&&0<r[2].length)return r[2]+(r[3]||"")}return n},ct.parseFullHost=function(e,t){var n,r,i,a=null;return!e||null!=(n=e.match(/(\w*):\/\/(.[^/:]+)(\:[\d]+)?/i))&&2<n.length&&rt(n[2])&&0<n[2].length&&(a=n[2]||"",t&&2<n.length&&(r=(n[1]||"").toLowerCase(),i=n[3]||"",("http"==r&&":80"===i||"https"==r&&":443"===i)&&(i=""),a+=i)),a},ct.document=E()||{},ct._htmlAnchorIdx=0,ct._htmlAnchorElement=[null,null,null,null,null],ct);function ct(){}var ut=(lt.ParseDependencyPath=function(e,t,n,r){var i,a,o,s=r,c=r,s=t&&0<t.length?(o=(i=st.parseUrl(t)).host,s||(null!=i.pathname?("/"!=(a=0===i.pathname.length?"/":i.pathname)[0]&&(a="/"+a),c=i.pathname,et.sanitizeString(e,n?n+" "+a:a)):et.sanitizeString(e,t))):o=r;return{target:o,name:s,data:c}},lt);function lt(){}var ft=(gt.Now=function(){var e=D();return e&&e.now&&e.timing?e.now()+e.timing.navigationStart:(new Date).getTime()},gt.GetDuration=function(e,t){var n=null;return 0===e||0===t||de.isNullOrUndefined(e)||de.isNullOrUndefined(t)||(n=t-e),n},gt);function gt(){}var pt,dt=(__extends(ht,function(){}),ht);function ht(){return this}pt=function(){this.ver=1,this.sampleRate=100,this.tags={}},__extends(function(e,t,n){var r=pt.call(this)||this;return r.name=et.sanitizeString(e,n)||at.NotSpecified,r.data=t,r.time=de.toISOString(new Date),r.aiDataContract={time:d.Required,iKey:d.Required,name:d.Required,sampleRate:function(){return 100===r.sampleRate?d.Hidden:d.Required},tags:d.Required,data:d.Required},r},pt);var mt,vt=function(){},yt=(mt=vt,__extends(xt,mt),xt);function xt(){var e=mt.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var _t,St=(_t=yt,__extends(Tt,_t),Tt.envelopeType="Microsoft.ApplicationInsights.{0}.Event",Tt.dataType="EventData",Tt);function Tt(e,t,n,r){var i=_t.call(this)||this;return i.aiDataContract={ver:d.Required,name:d.Required,properties:d.Default,measurements:d.Default},i.name=et.sanitizeString(e,t)||at.NotSpecified,i.properties=et.sanitizeProperties(e,n),i.measurements=et.sanitizeMeasurements(e,r),i}var It,wt=(It=vt,__extends(Nt,It),Nt);function Nt(){var e=It.call(this)||this;return e.ver=2,e.exceptions=[],e.properties={},e.measurements={},e}var Et,Ct="error",bt=(Et=wt,__extends(Dt,Et),Dt.CreateFromInterface=function(t,e,n,r){var i=e.exceptions&&de.arrMap(e.exceptions,function(e){return kt.CreateFromInterface(t,e)});return new Dt(t,__assign({},e,{exceptions:i}),n,r)},Dt.prototype.toInterface=function(){var e=this,t=e.exceptions,n=e.properties,r=e.measurements,i=e.severityLevel,a=(e.ver,e.problemGroup),o=e.id,s=e.isManual;return{ver:"4.0",exceptions:t instanceof Array&&de.arrMap(t,function(e){return e.toInterface()})||undefined,severityLevel:i,properties:n,measurements:r,problemGroup:a,id:o,isManual:s}},Dt.CreateSimpleException=function(e,t,n,r,i,a){return{exceptions:[{hasFullStack:!0,message:e,stack:i,typeName:t}]}},Dt.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",Dt.dataType="ExceptionData",Dt);function Dt(e,t,n,r,i,a){var o,s=Et.call(this)||this;return s.aiDataContract={ver:d.Required,exceptions:d.Required,severityLevel:d.Default,properties:d.Default,measurements:d.Default},"ver"in(o=t)&&"exceptions"in o&&"properties"in o?(s.exceptions=t.exceptions,s.properties=t.properties,s.measurements=t.measurements,t.severityLevel&&(s.severityLevel=t.severityLevel),t.id&&(s.id=t.id),t.problemGroup&&(s.problemGroup=t.problemGroup),s.ver=2,de.isNullOrUndefined(t.isManual)||(s.isManual=t.isManual)):(s.exceptions=[new kt(e,t)],s.properties=et.sanitizeProperties(e,n)||{},s.measurements=et.sanitizeMeasurements(e,r),i&&(s.severityLevel=i),a&&(s.id=a)),s}var Pt,kt=(Pt=function(){this.hasFullStack=!0,this.parsedStack=[]},__extends(At,Pt),At.prototype.toInterface=function(){var e=this.parsedStack instanceof Array&&de.arrMap(this.parsedStack,function(e){return e.toInterface()});return{id:this.id,outerId:this.outerId,typeName:this.typeName,message:this.message,hasFullStack:this.hasFullStack,stack:this.stack,parsedStack:e||undefined}},At.CreateFromInterface=function(e,t){var n=t.parsedStack instanceof Array&&de.arrMap(t.parsedStack,function(e){return Mt.CreateFromInterface(e)})||t.parsedStack;return new At(e,__assign({},t,{parsedStack:n}))},At.parseStack=function(e){if(de.isString(e)){for(var t=e.split("\n"),n=[],r=0,i=0,a=0;a<=t.length;a++){var o,s=t[a];Mt.regex.test(s)&&(i+=(o=new Mt(t[a],r++)).sizeInBytes,n.push(o))}if(32768<i)for(var c=0,u=n.length-1,l=0,f=c,g=u;c<u;){if(32768<(l+=n[c].sizeInBytes+n[u].sizeInBytes)){var p=g-f+1;n.splice(f,p);break}f=c,g=u,c++,u--}}return n},At);function At(e,t){var n,r,i=Pt.call(this)||this;return i.aiDataContract={id:d.Default,outerId:d.Default,typeName:d.Required,message:d.Required,hasFullStack:d.Default,stack:d.Default,parsedStack:d.Array},"hasFullStack"in t&&"typeName"in t?(i.typeName=t.typeName,i.message=t.message,i.stack=t.stack,i.parsedStack=t.parsedStack,i.hasFullStack=t.hasFullStack):(n=t,at.isError(n)||(n=n[Ct]||n.evt||n),i.typeName=et.sanitizeString(e,function(e){var t="";if(e&&!(t=e.typeName||e.name||""))try{var n=/function (.{1,})\(/.exec(e.constructor.toString()),t=n&&1<n.length?n[1]:""}catch(r){}return t}(n))||at.NotSpecified,i.message=et.sanitizeMessage(e,t.message)||at.NotSpecified,r=t.stack,i.parsedStack=At.parseStack(r),i.stack=et.sanitizeException(e,r),i.hasFullStack=at.isArray(i.parsedStack)&&0<i.parsedStack.length),i}var Lt,Mt=(Lt=function(){},__extends(Rt,Lt),Rt.CreateFromInterface=function(e){return new Rt(e,null)},Rt.prototype.toInterface=function(){return{level:this.level,method:this.method,assembly:this.assembly,fileName:this.fileName,line:this.line}},Rt.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,Rt.baseSize=58,Rt);function Rt(e,t){var n,r,i=Lt.call(this)||this;return i.sizeInBytes=0,i.aiDataContract={level:d.Required,method:d.Required,assembly:d.Default,fileName:d.Default,line:d.Default},"string"==typeof e?(n=e,i.level=t,i.method="<no_method>",i.assembly=at.trim(n),i.fileName="",i.line=0,(r=n.match(Rt.regex))&&5<=r.length&&(i.method=at.trim(r[2])||i.method,i.fileName=at.trim(r[4]),i.line=parseInt(r[5])||0)):(i.level=e.level,i.method=e.method,i.assembly=e.assembly,i.fileName=e.fileName,i.line=e.line,i.sizeInBytes=0),i.sizeInBytes+=i.method.length,i.sizeInBytes+=i.fileName.length,i.sizeInBytes+=i.assembly.length,i.sizeInBytes+=Rt.baseSize,i.sizeInBytes+=i.level.toString().length,i.sizeInBytes+=i.line.toString().length,i}var Ot,Ut,zt,Vt=(Ot=vt,__extends(Gt,Ot),Gt);function Gt(){var e=Ot.call(this)||this;return e.ver=2,e.metrics=[],e.properties={},e.measurements={},e}(zt=Ut={})[zt.Measurement=0]="Measurement",zt[zt.Aggregation=1]="Aggregation";var jt,qt=(jt=function(){this.kind=Ut.Measurement},__extends(Ft,jt),Ft);function Ft(){var e=jt.apply(this,arguments)||this;return e.aiDataContract={name:d.Required,kind:d.Default,value:d.Required,count:d.Default,min:d.Default,max:d.Default,stdDev:d.Default},e}var Bt,Kt=(Bt=Vt,__extends(Wt,Bt),Wt.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",Wt.dataType="MetricData",Wt);function Wt(e,t,n,r,i,a,o,s){var c=Bt.call(this)||this;c.aiDataContract={ver:d.Required,metrics:d.Required,properties:d.Default};var u=new qt;return u.count=0<r?r:undefined,u.max=isNaN(a)||null===a?undefined:a,u.min=isNaN(i)||null===i?undefined:i,u.name=et.sanitizeString(e,t)||at.NotSpecified,u.value=n,c.metrics=[u],c.properties=et.sanitizeProperties(e,o),c.measurements=et.sanitizeMeasurements(e,s),c}var Ht,Xt=(Ht=yt,__extends(Jt,Ht),Jt);function Jt(){var e=Ht.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var $t,Qt=($t=Xt,__extends(Yt,$t),Yt.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",Yt.dataType="PageviewData",Yt);function Yt(e,t,n,r,i,a,o){var s=$t.call(this)||this;return s.aiDataContract={ver:d.Required,name:d.Default,url:d.Default,duration:d.Default,properties:d.Default,measurements:d.Default,id:d.Default},s.id=et.sanitizeId(e,o),s.url=et.sanitizeUrl(e,n),s.name=et.sanitizeString(e,t)||at.NotSpecified,isNaN(r)||(s.duration=at.msToTimeSpan(r)),s.properties=et.sanitizeProperties(e,i),s.measurements=et.sanitizeMeasurements(e,a),s}var Zt,en=(Zt=vt,__extends(tn,Zt),tn);function tn(){var e=Zt.call(this)||this;return e.ver=2,e.success=!0,e.properties={},e.measurements={},e}var nn,rn=(nn=en,__extends(an,nn),an.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",an.dataType="RemoteDependencyData",an);function an(e,t,n,r,i,a,o,s,c,u,l,f){void 0===c&&(c="Ajax");var g=nn.call(this)||this;g.aiDataContract={id:d.Required,ver:d.Required,name:d.Default,resultCode:d.Default,duration:d.Default,success:d.Default,data:d.Default,target:d.Default,type:d.Default,properties:d.Default,measurements:d.Default,kind:d.Default,value:d.Default,count:d.Default,min:d.Default,max:d.Default,stdDev:d.Default,dependencyKind:d.Default,dependencySource:d.Default,commandName:d.Default,dependencyTypeName:d.Default},g.id=t,g.duration=at.msToTimeSpan(i),g.success=a,g.resultCode=o+"",g.type=et.sanitizeString(e,c);var p=ut.ParseDependencyPath(e,n,s,r);return g.data=et.sanitizeUrl(e,r)||p.data,g.target=et.sanitizeString(e,p.target),u&&(g.target=g.target+" | "+u),g.name=et.sanitizeString(e,p.name),g.properties=et.sanitizeProperties(e,l),g.measurements=et.sanitizeMeasurements(e,f),g}var on,sn=(on=vt,__extends(cn,on),cn);function cn(){var e=on.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var un,ln=(un=sn,__extends(fn,un),fn.envelopeType="Microsoft.ApplicationInsights.{0}.Message",fn.dataType="MessageData",fn);function fn(e,t,n,r,i){var a=un.call(this)||this;return a.aiDataContract={ver:d.Required,message:d.Required,severityLevel:d.Default,properties:d.Default},t=t||at.NotSpecified,a.message=et.sanitizeMessage(e,t),a.properties=et.sanitizeProperties(e,r),a.measurements=et.sanitizeMeasurements(e,i),n&&(a.severityLevel=n),a}var gn,pn=(gn=Xt,__extends(dn,gn),dn);function dn(){var e=gn.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var hn,mn,vn,yn,xn=(hn=pn,__extends(_n,hn),_n.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",_n.dataType="PageviewPerformanceData",_n);function _n(e,t,n,r,i,a,o){var s=hn.call(this)||this;return s.aiDataContract={ver:d.Required,name:d.Default,url:d.Default,duration:d.Default,perfTotal:d.Default,networkConnect:d.Default,sentRequest:d.Default,receivedResponse:d.Default,domProcessing:d.Default,properties:d.Default,measurements:d.Default},s.url=et.sanitizeUrl(e,n),s.name=et.sanitizeString(e,t)||at.NotSpecified,s.properties=et.sanitizeProperties(e,i),s.measurements=et.sanitizeMeasurements(e,a),o&&(s.domProcessing=o.domProcessing,s.duration=o.duration,s.networkConnect=o.networkConnect,s.perfTotal=o.perfTotal,s.receivedResponse=o.receivedResponse,s.sentRequest=o.sentRequest),s}mn=dt,__extends(function(e,t){var n=mn.call(this)||this;return n.aiDataContract={baseType:d.Required,baseData:d.Required},n.baseType=e,n.baseData=t,n},mn),(yn=vn={})[yn.Verbose=0]="Verbose",yn[yn.Information=1]="Information",yn[yn.Warning=2]="Warning",yn[yn.Error=3]="Error",yn[yn.Critical=4]="Critical";var Sn=(Tn.create=function(e,t,n,r,i,a){if(n=et.sanitizeString(r,n)||at.NotSpecified,de.isNullOrUndefined(e)||de.isNullOrUndefined(t)||de.isNullOrUndefined(n))throw Error("Input doesn't contain all required fields");var o={name:n,time:de.toISOString(new Date),iKey:"",ext:a||{},tags:[],data:{},baseType:t,baseData:e};if(!de.isNullOrUndefined(i))for(var s in i)i.hasOwnProperty(s)&&(o.data[s]=i[s]);return o},Tn);function Tn(){}var In=function qn(y,x,t,_){Q(qn,this,function(e){var f,g=de.arrForEach,p=de.isNullOrUndefined,d=null,h=[],m=!1;function v(){t&&g(t.getTransmissionControls(),function(e){g(e,function(e){return e.flush(!0)})})}t&&(f=t.logger),e.trackPageView=function(r,i){var e,a=r.name;!p(a)&&"string"==typeof a||(e=E(),a=r.name=e&&e.title||"");var t,o=r.uri;if(!p(o)&&"string"==typeof o||(t=b(),o=r.uri=t&&t.href||""),!_.isPerformanceTimingSupported())return y.sendPageViewInternal(r,i),v(),void f.throwInternal(xe.WARNING,25,"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 n,s,c=!1,u=_.getPerformanceTiming().navigationStart,l=ft.GetDuration(u,+new Date);_.shouldCollectDuration(l)||(l=undefined),p(i)||p(i.duration)||(n=i.duration),!x&&isNaN(n)||(isNaN(n)&&((i=i||{}).duration=l),y.sendPageViewInternal(r,i),v(),c=!0),i=i||{},s=function(){var e,t=!1;try{_.isPerformanceTimingDataReady()?(t=!0,e={name:a,uri:o},_.populatePageViewPerformanceEvent(e),e.isValid||c?(c||(i.duration=e.durationMs,y.sendPageViewInternal(r,i)),m||(y.sendPageViewPerformanceInternal(e,i),m=!0)):(i.duration=l,y.sendPageViewInternal(r,i))):6e4<ft.GetDuration(u,+new Date)&&(t=!0,c||(i.duration=6e4,y.sendPageViewInternal(r,i)))}catch(n){f.throwInternal(xe.CRITICAL,38,"trackPageView failed on page load calculation: "+at.getExceptionName(n),{exception:at.dump(n)})}return t},h.push(s),d=d||setInterval(function(){var e=h.slice(0),t=!1;h=[],g(e,function(e){e()?t=!0:h.push(e)}),0===h.length&&(clearInterval(d),d=null),t&&v()},100)}})},wn=(Nn.prototype.trackPreviousPageVisit=function(e,t){try{var n=this.restartPageVisitTimer(e,t);n&&this.pageVisitTimeTrackingHandler(n.pageName,n.pageUrl,n.pageVisitTime)}catch(r){this._logger.warnToConsole("Auto track page visit time failed, metric will not be collected: "+at.dump(r))}},Nn.prototype.restartPageVisitTimer=function(e,t){try{var n=this.stopPageVisitTimer();return this.startPageVisitTimer(e,t),n}catch(r){return this._logger.warnToConsole("Call to restart failed: "+at.dump(r)),null}},Nn.prototype.startPageVisitTimer=function(e,t){try{if(at.canUseSessionStorage()){if(null!=at.getSessionStorage(this._logger,this.prevPageVisitDataKeyName))throw Error("Cannot call startPageVisit consecutively without first calling stopPageVisit");var n=new En(e,t),r=k().stringify(n);at.setSessionStorage(this._logger,this.prevPageVisitDataKeyName,r)}}catch(i){this._logger.warnToConsole("Call to start failed: "+at.dump(i))}},Nn.prototype.stopPageVisitTimer=function(){try{if(at.canUseSessionStorage()){var e=Date.now(),t=at.getSessionStorage(this._logger,this.prevPageVisitDataKeyName);if(t&&P()){var n=k().parse(t);return n.pageVisitTime=e-n.pageVisitStartTime,at.removeSessionStorage(this._logger,this.prevPageVisitDataKeyName),n}return null}return null}catch(r){return this._logger.warnToConsole("Stop page visit timer failed: "+at.dump(r)),null}},Nn);function Nn(e,t){this.prevPageVisitDataKeyName="prevPageVisitData",this.pageVisitTimeTrackingHandler=t,this._logger=e}var En=function(e,t){this.pageVisitStartTime=Date.now(),this.pageName=e,this.pageUrl=t},Cn=(bn.prototype.populatePageViewPerformanceEvent=function(e){e.isValid=!1;var t,n,r,i,a,o=this.getPerformanceNavigationTiming(),s=this.getPerformanceTiming();(o||s)&&(a=o?(t=o.duration,n=ft.GetDuration(o.startTime,o.connectEnd),r=ft.GetDuration(o.requestStart,o.responseStart),i=ft.GetDuration(o.responseStart,o.responseEnd),ft.GetDuration(o.responseEnd,o.loadEventEnd)):(t=ft.GetDuration(s.navigationStart,s.loadEventEnd),n=ft.GetDuration(s.navigationStart,s.connectEnd),r=ft.GetDuration(s.requestStart,s.responseStart),i=ft.GetDuration(s.responseStart,s.responseEnd),ft.GetDuration(s.responseEnd,s.loadEventEnd)),0===t?this._logger.throwInternal(xe.WARNING,10,"error calculating page view performance.",{total:t,network:n,request:r,response:i,dom:a}):this.shouldCollectDuration(t,n,r,i,a)?t<Math.floor(n)+Math.floor(r)+Math.floor(i)+Math.floor(a)?this._logger.throwInternal(xe.WARNING,8,"client performance math error.",{total:t,network:n,request:r,response:i,dom:a}):(e.durationMs=t,e.perfTotal=e.duration=at.msToTimeSpan(t),e.networkConnect=at.msToTimeSpan(n),e.sentRequest=at.msToTimeSpan(r),e.receivedResponse=at.msToTimeSpan(i),e.domProcessing=at.msToTimeSpan(a),e.isValid=!0):this._logger.throwInternal(xe.WARNING,45,"Invalid page load duration value. Browser perf data won't be sent.",{total:t,network:n,request:r,response:i,dom:a}))},bn.prototype.getPerformanceTiming=function(){return this.isPerformanceTimingSupported()?D().timing:null},bn.prototype.getPerformanceNavigationTiming=function(){return this.isPerformanceNavigationTimingSupported()?D().getEntriesByType("navigation")[0]:null},bn.prototype.isPerformanceNavigationTimingSupported=function(){var e=D();return e&&e.getEntriesByType&&0<e.getEntriesByType("navigation").length},bn.prototype.isPerformanceTimingSupported=function(){var e=D();return e&&e.timing},bn.prototype.isPerformanceTimingDataReady=function(){var e=D(),t=e?e.timing:0;return t&&0<t.domainLookupStart&&0<t.navigationStart&&0<t.responseStart&&0<t.requestStart&&0<t.loadEventEnd&&0<t.responseEnd&&0<t.connectEnd&&0<t.domLoading},bn.prototype.shouldCollectDuration=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=["googlebot","adsbot-google","apis-google","mediapartners-google"],r=(C()||{}).userAgent,i=!1;if(r)for(var a=0;a<n.length;a++)i=i||!!~r.toLowerCase().indexOf(n[a]);if(i)return!1;for(a=0;a<e.length;a++)if(e[a]>=this.MAX_DURATION_ALLOWED)return!1;return!0},bn);function bn(e){this.MAX_DURATION_ALLOWED=36e5,e&&(this._logger=e.logger)}var Dn="duration";function Pn(e,t){e&&e.dispatchEvent&&t&&e.dispatchEvent(t)}var kn,An=(kn=Me,__extends(Ln,kn),Ln.getDefaultConfig=function(e){return(e=e||{}).sessionRenewalMs=18e5,e.sessionExpirationMs=864e5,e.disableExceptionTracking=at.stringToBoolOrDefault(e.disableExceptionTracking),e.autoTrackPageVisitTime=at.stringToBoolOrDefault(e.autoTrackPageVisitTime),e.overridePageViewDuration=at.stringToBoolOrDefault(e.overridePageViewDuration),e.enableUnhandledPromiseRejectionTracking=at.stringToBoolOrDefault(e.enableUnhandledPromiseRejectionTracking),(isNaN(e.samplingPercentage)||e.samplingPercentage<=0||100<=e.samplingPercentage)&&(e.samplingPercentage=100),e.isCookieUseDisabled=at.stringToBoolOrDefault(e.isCookieUseDisabled),e.isStorageUseDisabled=at.stringToBoolOrDefault(e.isStorageUseDisabled),e.isBrowserLinkTrackingEnabled=at.stringToBoolOrDefault(e.isBrowserLinkTrackingEnabled),e.enableAutoRouteTracking=at.stringToBoolOrDefault(e.enableAutoRouteTracking),e.namePrefix=e.namePrefix||"",e},Ln.prototype.processTelemetry=function(a,o){var s=this;Te(this.core,function(){return s.identifier+":processTelemetry"},function(){var e=!1,t=s._telemetryInitializers.length;o=s._getTelCtx(o);for(var n=0;n<t;++n){var r=s._telemetryInitializers[n];if(r)try{if(!1===r.call(null,a)){e=!0;break}}catch(i){o.diagLog().throwInternal(xe.CRITICAL,64,"One of telemetry initializers failed, telemetry item will not be sent: "+at.getExceptionName(i),{exception:at.dump(i)},!0)}}e||s.processNext(a,o)},function(){return{item:a}},!a.sync)},Ln.prototype.trackEvent=function(e,t){try{var n=Sn.create(e,St.dataType,St.envelopeType,this.diagLog(),t);this.core.track(n)}catch(r){this.diagLog().throwInternal(xe.WARNING,39,"trackTrace failed, trace will not be collected: "+at.getExceptionName(r),{exception:at.dump(r)})}},Ln.prototype.startTrackEvent=function(e){try{this._eventTracking.start(e)}catch(t){this.diagLog().throwInternal(xe.CRITICAL,29,"startTrackEvent failed, event will not be collected: "+at.getExceptionName(t),{exception:at.dump(t)})}},Ln.prototype.stopTrackEvent=function(e,t,n){try{this._eventTracking.stop(e,undefined,t)}catch(r){this.diagLog().throwInternal(xe.CRITICAL,30,"stopTrackEvent failed, event will not be collected: "+at.getExceptionName(r),{exception:at.dump(r)})}},Ln.prototype.trackTrace=function(e,t){try{var n=Sn.create(e,ln.dataType,ln.envelopeType,this.diagLog(),t);this.core.track(n)}catch(r){this.diagLog().throwInternal(xe.WARNING,39,"trackTrace failed, trace will not be collected: "+at.getExceptionName(r),{exception:at.dump(r)})}},Ln.prototype.trackMetric=function(e,t){try{var n=Sn.create(e,Kt.dataType,Kt.envelopeType,this.diagLog(),t);this.core.track(n)}catch(r){this.diagLog().throwInternal(xe.CRITICAL,36,"trackMetric failed, metric will not be collected: "+at.getExceptionName(r),{exception:at.dump(r)})}},Ln.prototype.trackPageView=function(e,t){try{var n=e||{};this._pageViewManager.trackPageView(n,__assign({},n.properties,n.measurements,t)),this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(n.name,n.uri)}catch(r){this.diagLog().throwInternal(xe.CRITICAL,37,"trackPageView failed, page view will not be collected: "+at.getExceptionName(r),{exception:at.dump(r)})}},Ln.prototype.sendPageViewInternal=function(e,t,n){var r=E();r&&(e.refUri=e.refUri===undefined?r.referrer:e.refUri);var i=Sn.create(e,Qt.dataType,Qt.envelopeType,this.diagLog(),t,n);this.core.track(i),this._trackAjaxAttempts=0},Ln.prototype.sendPageViewPerformanceInternal=function(e,t,n){var r=Sn.create(e,xn.dataType,xn.envelopeType,this.diagLog(),t,n);this.core.track(r)},Ln.prototype.trackPageViewPerformance=function(e,t){try{this._pageViewPerformanceManager.populatePageViewPerformanceEvent(e),this.sendPageViewPerformanceInternal(e,t)}catch(n){this.diagLog().throwInternal(xe.CRITICAL,37,"trackPageViewPerformance failed, page view will not be collected: "+at.getExceptionName(n),{exception:at.dump(n)})}},Ln.prototype.startTrackPage=function(e){try{var t;"string"!=typeof e&&(e=(t=E())&&t.title||""),this._pageTracking.start(e)}catch(n){this.diagLog().throwInternal(xe.CRITICAL,31,"startTrackPage failed, page view may not be collected: "+at.getExceptionName(n),{exception:at.dump(n)})}},Ln.prototype.stopTrackPage=function(e,t,n,r){try{var i,a;"string"!=typeof e&&(e=(i=E())&&i.title||""),"string"!=typeof t&&(t=(a=b())&&a.href||""),this._pageTracking.stop(e,t,n,r),this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(e,t)}catch(o){this.diagLog().throwInternal(xe.CRITICAL,32,"stopTrackPage failed, page view will not be collected: "+at.getExceptionName(o),{exception:at.dump(o)})}},Ln.prototype.sendExceptionInternal=function(e,t,n){var r=new bt(this.diagLog(),e.exception||Error(at.NotSpecified),e.properties,e.measurements,e.severityLevel,e.id).toInterface(),i=Sn.create(r,bt.dataType,bt.envelopeType,this.diagLog(),t,n);this.core.track(i)},Ln.prototype.trackException=function(e,t){try{this.sendExceptionInternal(e,t)}catch(n){this.diagLog().throwInternal(xe.CRITICAL,35,"trackException failed, exception will not be collected: "+at.getExceptionName(n),{exception:at.dump(n)})}},Ln.prototype._onerror=function(e){try{var t,n={url:e&&e.url||(E()||{}).URL,lineNumber:e.lineNumber,columnNumber:e.columnNumber,message:e.message};at.isCrossOriginError(e.message,e.url,e.lineNumber,e.columnNumber,e.error)?this._sendCORSException(n.url):(at.isError(e.error)||(t="window.onerror@"+n.url+":"+e.lineNumber+":"+(e.columnNumber||0),e.error=Error(e.message),e.error.stack=t),this.trackException({exception:e.error,severityLevel:vn.Error},n))}catch(i){var r=e.error?e.error.name+", "+e.error.message:"null";this.diagLog().throwInternal(xe.CRITICAL,11,"_onError threw exception while logging error, error will not be collected: "+at.getExceptionName(i),{exception:at.dump(i),errorString:r})}},Ln.prototype.addTelemetryInitializer=function(e){this._telemetryInitializers.push(e)},Ln.prototype.initialize=function(e,t,n,r){var o=this;if(!this.isInitialized()){if(de.isNullOrUndefined(t))throw Error("Error initializing");kn.prototype.initialize.call(this,e,t,n,r),this.setInitialized(!1);var i=this._getTelCtx(),a=this.identifier;this._globalconfig={instrumentationKey:e.instrumentationKey,endpointUrl:e.endpointUrl||"https://dc.services.visualstudio.com/v2/track"},this.config=i.getExtCfg(a);var s=Ln.getDefaultConfig();if(s!==undefined){for(var c in s)this.config[c]=i.getConfig(a,c,s[c]);if(this._globalconfig)for(var c in s)this._globalconfig[c]===undefined&&(this._globalconfig[c]=s[c])}this.config.isCookieUseDisabled&&at.disableCookies(),this.config.isStorageUseDisabled&&at.disableStorage();var u={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}};this._pageViewPerformanceManager=new Cn(this.core),this._pageViewManager=new In(this,this.config.overridePageViewDuration,this.core,this._pageViewPerformanceManager),this._pageVisitTimeManager=new wn(this.diagLog(),function(e,t,n){return o.trackPageVisitTime(e,t,n)}),this._telemetryInitializers=this._telemetryInitializers||[],this._addDefaultTelemetryInitializers(u),this._eventTracking=new Mn(this.diagLog(),"trackEvent"),this._eventTracking.action=function(e,t,n,r){(r=r||{})[Dn]=n.toString(),o.trackEvent({name:e,properties:r})},this._pageTracking=new Mn(this.diagLog(),"trackPageView"),this._pageTracking.action=function(e,t,n,r,i){de.isNullOrUndefined(r)&&(r={}),r[Dn]=n.toString();var a={name:e,uri:t,properties:r,measurements:i};o.sendPageViewInternal(a,r)};var l,f,g,p,d,h=N(),m=typeof history===x&&history?history:I("history"),v=b(),y=this;!1===this.config.disableExceptionTracking&&!this.config.autoExceptionInstrumented&&h&&(l=h.onerror,h.onerror=function(e,t,n,r,i){var a=l&&l(e,t,n,r,i);return!0!==a&&y._onerror({message:e,url:t,lineNumber:n,columnNumber:r,error:i}),a},this.config.autoExceptionInstrumented=!0),!1===this.config.disableExceptionTracking&&!0===this.config.enableUnhandledPromiseRejectionTracking&&!this.config.autoUnhandledPromiseInstrumented&&h&&(f=h.onunhandledrejection,h.onunhandledrejection=function(e){var t=f&&f.call(h,e);return!0!==t&&y._onerror({message:e.reason.toString(),error:e.reason instanceof Error?e.reason:Error(e.reason.toString()),url:v?v.href:"",lineNumber:0,columnNumber:0}),t},this.config.autoUnhandledPromiseInstrumented=!0),!0===this.config.enableAutoRouteTracking&&m&&de.isFunction(m.pushState)&&de.isFunction(m.replaceState)&&h&&"undefined"!=typeof Event&&(g=this,de.arrForEach(n,function(e){"AppInsightsPropertiesPlugin"===e.identifier&&(o._properties=e)}),m.pushState=(d=m.pushState,function(){var e=d.apply(this,arguments);return Pn(h,at.createDomEvent(g.config.namePrefix+"pushState")),Pn(h,at.createDomEvent(g.config.namePrefix+"locationchange")),e}),m.replaceState=(p=m.replaceState,function(){var e=p.apply(this,arguments);return Pn(h,at.createDomEvent(g.config.namePrefix+"replaceState")),Pn(h,at.createDomEvent(g.config.namePrefix+"locationchange")),e}),h.addEventListener&&(h.addEventListener(g.config.namePrefix+"popstate",function(){Pn(h,at.createDomEvent(g.config.namePrefix+"locationchange"))}),h.addEventListener(g.config.namePrefix+"locationchange",function(){g._properties&&g._properties.context&&g._properties.context.telemetryTrace&&(g._properties.context.telemetryTrace.traceID=at.generateW3CId(),g._properties.context.telemetryTrace.name=v&&v.pathname||"_unknown_"),o._currUri&&(o._prevUri=o._currUri),o._currUri=v&&v.href||"",setTimeout((function(e){g.trackPageView({refUri:e,properties:{duration:0}})}).bind(o,o._prevUri),g.autoRoutePVDelay)}))),this.setInitialized(!0)}},Ln.prototype.trackPageVisitTime=function(e,t,n){var r={PageName:e,PageUrl:t};this.trackMetric({name:"PageVisitTime",average:n,max:n,min:n,sampleCount:1},r)},Ln.prototype._addDefaultTelemetryInitializers=function(e){var r;e.isBrowserLinkTrackingEnabled()||(r=["/browserLinkSignalR/","/__browserLink/"],this._addTelemetryInitializer(function(e){if(e.baseType===rn.dataType){var t=e.baseData;if(t)for(var n=0;n<r.length;n++)if(t.target&&~t.target.indexOf(r[n]))return!1}return!0}))},Ln.prototype._addTelemetryInitializer=function(e){this._telemetryInitializers.push(e)},Ln.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:undefined},n=Sn.create(t,bt.dataType,bt.envelopeType,this.diagLog(),{url:e});this.core.track(n)},Ln.Version="2.5.7",Ln);function Ln(){var e=kn.call(this)||this;e.identifier="ApplicationInsightsAnalytics",e.priority=180,e.autoRoutePVDelay=500,e._trackAjaxAttempts=0;var t=b();return e._prevUri=t&&t.href||"",e}var Mn=(Rn.prototype.start=function(e){"undefined"!=typeof this._events[e]&&this._logger.throwInternal(xe.WARNING,62,"start was called more than once for this event without calling stop.",{name:this._name,key:e},!0),this._events[e]=+new Date},Rn.prototype.stop=function(e,t,n,r){var i,a,o=this._events[e];isNaN(o)?this._logger.throwInternal(xe.WARNING,63,"stop was called without a corresponding start.",{name:this._name,key:e},!0):(i=+new Date,a=ft.GetDuration(o,i),this.action(e,t,a,n,r)),delete this._events[e],this._events[e]=undefined},Rn);function Rn(e,t){this._name=t,this._events={},this._logger=e}e.ApplicationInsights=An,function(e,t,n){var r=Object.defineProperty;if(r)try{return r(e,t,n)}catch(i){}typeof n.value!==undefined&&(e[t]=n.value)}(e,"__esModule",{value:!0})};"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e.Microsoft=e.Microsoft||{},e.Microsoft.ApplicationInsights=e.Microsoft.ApplicationInsights||{}));
var e=this,t=function(e){"use strict";var i="function",a="object",t="undefined",o="prototype",s="hasOwnProperty";function n(){return typeof globalThis!==t&&globalThis?globalThis:typeof self!==t&&self?self:typeof window!==t&&window?window:typeof global!==t&&global?global:null}function r(e){var t=Object.create;if(t)return t(e);if(null==e)return{};var n=typeof e;if(n!=a&&n!=i)throw new TypeError("Object prototype may only be an Object:"+e);function r(){}return r[o]=e,new r}var c,u,d,l,f,g=function(e,t){return(g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t[s](n)&&(e[n]=t[n])})(e,t)},p=n()||{};__assign=p.__assign=p.__assign||Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object[o][s].call(t,i)&&(e[i]=t[i]);return e},__extends=p.__extends=p.__extends||function(e,t){function n(){this.constructor=e}g(e,t),e[o]=null===t?r(t):(n[o]=t[o],new n)},(u=c={})[u.LocalStorage=0]="LocalStorage",u[u.SessionStorage=1]="SessionStorage",(l=d=d||{})[l.Default=0]="Default",l[l.Required=1]="Required",l[l.Array=2]="Array",l[l.Hidden=4]="Hidden",(f={})[f.AI=0]="AI",f[f.AI_AND_W3C=1]="AI_AND_W3C",f[f.W3C=2]="W3C";var h=2,m=t,x=a,v=o,y="window",_="location",S="JSON",T=n;function w(e){var t=T();return t&&t[e]?t[e]:e===y&&I()?window:null}function I(){return typeof window===x&&window}function N(){return I()?window:w(y)}function E(){return typeof document===x&&document?document:w("document")}function C(){return typeof navigator===x&&navigator?navigator:w("navigator")}function b(){return typeof location===x&&location?location:w(_)}function D(){return w("performance")}function P(){return typeof JSON===x&&JSON||null!==w(S)}function k(){return P()?JSON||w(S):null}var A="attachEvent",L="addEventListener",M="detachEvent",R="removeEventListener";function O(e,t){return typeof e===t}function U(e){return O(e,t)||e===undefined}function z(e){return U(e)||null===e}function V(e,t){return e&&Object[o].hasOwnProperty.call(e,t)}function G(e){return O(e,a)}function j(e){return O(e,i)}function q(e,t,n,r){void 0===r&&(r=!1);var i=!1;if(!z(e))try{z(e[L])?z(e[A])||(e[A]("on"+t,n),i=!0):(e[L](t,n,r),i=!0)}catch(a){}return i}function F(e,t,n,r){if(void 0===r&&(r=!1),!z(e))try{z(e[R])?z(e[M])||e[M]("on"+t,n):e[R](t,n,r)}catch(i){}}var B=(K.isDate=function(e){return"[object Date]"===Object[o].toString.call(e)},K.isArray=function(e){return"[object Array]"===Object[o].toString.call(e)},K.isError=function(e){return"[object Error]"===Object[o].toString.call(e)},K.isString=function(e){return O(e,"string")},K.isNumber=function(e){return O(e,"number")},K.isBoolean=function(e){return O(e,"boolean")},K.disableCookies=function(){K._canUseCookies=!1},K.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(X,function(e){var t,n=0|((t=w("crypto"))?t.getRandomValues(new Uint8Array(1))[0]%16:16*Math.random());return("x"===e?n:3&n|8).toString(16)})},K.toISOString=function(e){if(K.isDate(e)){var t=function(e){var t=e+"";return 1===t.length&&(t="0"+t),t};return e.getUTCFullYear()+"-"+t(1+e.getUTCMonth())+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())+"."+((e.getUTCMilliseconds()/1e3).toFixed(3)+"").slice(2,5)+"Z"}},K.arrForEach=function(e,t,n){for(var r=e.length,i=0;i<r;i++)i in e&&t.call(n||e,e[i],i,e)},K.arrIndexOf=function(e,t,n){for(var r=e.length,i=n||0,a=Math.max(0<=i?i:r-Math.abs(i),0);a<r;a++)if(a in e&&e[a]===t)return a;return-1},K.arrMap=function(e,t,n){for(var r=e.length,i=n||e,a=Array(r),o=0;o<r;o++)o in e&&(a[o]=t.call(i,e[o],e));return a},K.arrReduce=function(e,t,n){var r,i=e.length,a=0;if(3<=arguments.length)r=n;else{for(;a<i&&!(a in e);)a++;r=e[a++]}for(;a<i;)a in e&&(r=t(r,e[a],a,e)),a++;return r},K.strTrim=function(e){return K.isString(e)?e.replace(/^\s+|\s+$/g,""):e},K.objKeys=function(e){var t=!{toString:null}.propertyIsEnumerable("toString");if(!(j(e)||G(e)&&null!==e))throw new TypeError("objKeys called on non-object");var n=[];for(var r in e)V(e,r)&&n.push(r);if(t)for(var i=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],a=i.length,o=0;o<a;o++)V(e,i[o])&&n.push(i[o]);return n},K.objDefineAccessors=function(e,t,n,r){var i=Object.defineProperty;if(i)try{var a={enumerable:!0,configurable:!0};return n&&(a.get=n),r&&(a.set=r),i(e,t,a),!0}catch(o){}return!1},K.addEventHandler=function(e,t){var n=!1,r=N();r&&(n=q(r,e,t),n=q(r.body,e,t)||n);var i=E();return i&&(n=J.Attach(i,e,t)||n),n},K.dateNow=function(){var e=Date;return e.now?e.now():(new e).getTime()},K.perfNow=function(){var e=D();return e&&e.now?e.now():K.dateNow()},K.isTypeof=O,K.isUndefined=U,K.isNullOrUndefined=z,K.hasOwnProperty=V,K.isFunction=j,K.isObject=G,K.objCreate=r,K);function K(){}var W,H,X=/[xy]/g,J=($.Attach=q,$.AttachEvent=q,$.Detach=F,$.DetachEvent=F,$);function $(){}(H=W={})[H.CRITICAL=1]="CRITICAL",H[H.WARNING=2]="WARNING";var Q="constructor",Y="prototype",Z="function",ee="_dynInstFuncs",te="_isDynProxy",ne="_dynClass",re="_dynCls$",ie="_unknown_",ae="__proto__",oe=Object.getPrototypeOf,se=0;function ce(e,t){return e&&Object[Y].hasOwnProperty.call(e,t)}function ue(e){return typeof e===Z}function le(e){return e&&(e===Object[Y]||e===Array[Y])}function fe(e){return le(e)||e===Function[Y]}function ge(e){if(e){if(oe)return oe(e);var t=e[ae]||e[Y]||e[Q];if(t)return t}return null}function pe(e,t,n){return t!==Q&&ue(e[t])&&(n||ce(e,t))}function de(e){throw new TypeError("DynamicProto: "+e)}function he(e,t){return ce(e,Y)?e.name||t||ie:((e||{})[Q]||{}).name||t||ie}function me(e,n,t){ce(e,Y)||de("theClass is an invalid class definition.");var r=e[Y];!function(e){for(var t=ge(n);t&&!fe(t);){if(t===e)return 1;t=ge(t)}}(r)&&de("["+he(e)+"] is not in class heirarchy of ["+he(n)+"]");var i=null;ce(r,ne)?i=r[ne]:(i=re+he(e,"_")+"$"+se,se++,r[ne]=i);var a=function(e){var t={};for(var n in e)!t[n]&&pe(e,n,!1)&&(t[n]=e[n]);return t}(n);t(n,function(e,t,n){function r(e,t){return function(){return t.apply(e,arguments)}}var i={};for(var a in n)i[a]=r(t,n[a]);for(var o=ge(e),s=[];o&&!fe(o)&&!function(e,t){for(var n=e.length-1;0<=n;n--)if(e[n]===t)return 1}(s,o);){for(var a in o)!i[a]&&pe(o,a,!oe)&&(i[a]=r(t,o[a]));s.push(o),o=ge(o)}return i}(r,n,a)),function(e,t,n,r){if(!le(e)){var i=n[ee]=n[ee]||{},a=i[t]=i[t]||{};for(var o in n)pe(n,o,!1)&&n[o]!==r[o]&&(a[o]=n[o],delete n[o],ce(e,o)&&(!e[o]||e[o][te])||(e[o]=function(n,r){var i=function(){if(this&&ce(n,ne)){var e=((this[ee]||{})[n[ne]]||{})[r];if(e)return e.apply(this,arguments);de("Missing ["+r+"] "+Z)}var t=n[r];return t===i&&(t=ge(n)[r]),ue(t)||de("["+r+"] is not a "+Z),t.apply(this,arguments)};return i[te]=1,i}(e,o)))}}(r,i,n,a)}function ve(e){return e?'"'+e.replace(/\"/g,"")+'"':""}var ye=(xe.dataType="MessageData",xe);function xe(e,t,n,r){void 0===n&&(n=!1),this.messageId=e,this.message=(n?"AI: ":"AI (Internal): ")+e;var i="";P()&&(i=k().stringify(r));var a=(t?" message:"+ve(t):"")+(r?" props:"+ve(i):"");this.message+=a}var _e=function On(a){this.identifier="DiagnosticLogger",this.queue=[];var o=0,u={};me(On,this,function(s){var r=B.isNullOrUndefined,c=B.isUndefined,i=B.isFunction;function e(e,t){var n=a[e];return r(n)?t:n}r(a)&&(a={}),s.consoleLoggingLevel=function(){return e("loggingLevelConsole",0)},s.telemetryLoggingLevel=function(){return e("loggingLevelTelemetry",1)},s.maxInternalMessageLimit=function(){return e("maxMessageLimit",25)},s.enableDebugExceptions=function(){return e("enableDebugExceptions",!1)},s.throwInternal=function(e,t,n,r,i){void 0===i&&(i=!1);var a,o=new ye(t,n,i,r);if(s.enableDebugExceptions())throw o;!c(o)&&o&&(c(o.message)||(i?(a=+o.messageId,!u[a]&&s.consoleLoggingLevel()>=W.WARNING&&(s.warnToConsole(o.message),u[a]=!0)):s.consoleLoggingLevel()>=W.WARNING&&s.warnToConsole(o.message),s.logInternalMessage(e,o)))},s.warnToConsole=function(e){var t,n=typeof console!==m?console:w("console");n&&(t="log",n.warn&&(t="warn"),i(n[t])&&n[t](e))},s.resetInternalMessageCount=function(){o=0,u={}},s.logInternalMessage=function(e,t){var n,r,i;o>=s.maxInternalMessageLimit()||(n=!0,r="AITR_"+t.messageId,u[r]?n=!1:u[r]=!0,n&&(e<=s.telemetryLoggingLevel()&&(s.queue.push(t),o++),o===s.maxInternalMessageLimit()&&(i=new ye(23,"Internal events throttle limit per PageView reached for this app.",!1),s.queue.push(i),s.warnToConsole("Internal events throttle limit per PageView reached for this app."))))}})},Se="ctx",Te=(we.ParentContextKey="parent",we.ChildrenContextKey="childEvts",we);function we(e,i,t){var n,a=this,o=!1;a.start=B.dateNow(),a.name=e,a.isAsync=t,a.isChildEvt=function(){return!1},B.isFunction(i)&&(o=B.objDefineAccessors(a,"payload",function(){return!n&&B.isFunction(i)&&(n=i(),i=null),n})),a.getCtx=function(e){return e?e===we.ParentContextKey||e===we.ChildrenContextKey?a[e]:(a[Se]||{})[e]:null},a.setCtx=function(e,t){e&&(e===we.ParentContextKey?(a[e]||(a.isChildEvt=function(){return!0}),a[e]=t):e===we.ChildrenContextKey?a[e]=t:(a[Se]=a[Se]||{})[e]=t)},a.complete=function(){var e=0,t=a.getCtx(we.ChildrenContextKey);if(B.isArray(t))for(var n=0;n<t.length;n++){var r=t[n];r&&(e+=r.time)}a.time=B.dateNow()-a.start,a.exTime=a.time-e,a.complete=function(){},!o&&B.isFunction(i)&&(a.payload=i())}}var Ie=function Un(t){this.ctx={},me(Un,this,function(n){n.create=function(e,t,n){return new Te(e,t,n)},n.fire=function(e){e&&(e.complete(),t&&t.perfEvent(e))},n.setCtx=function(e,t){e&&((n[Se]=n[Se]||{})[e]=t)},n.getCtx=function(e){return(n[Se]||{})[e]}})},Ne="CoreUtils.doPerf";function Ee(e,t,n,r,i){if(e){var a=e;if(a&&B.isFunction(a.getPerfMgr)&&(a=a.getPerfMgr()),a){var o,s=void 0,c=a.getCtx(Ne);try{if(s=a.create(t(),r,i))return c&&s.setCtx&&(s.setCtx(Te.ParentContextKey,c),c.getCtx&&c.setCtx&&((o=c.getCtx(Te.ChildrenContextKey))||(o=[],c.setCtx(Te.ChildrenContextKey,o)),o.push(s))),a.setCtx(Ne,s),n(s)}catch(u){s&&s.setCtx&&s.setCtx("exception",u)}finally{s&&a.fire(s),a.setCtx(Ne,c)}}}return n()}var Ce=B.isFunction,be=function(i,t){var a=this,o=null,s=Ce(i.processTelemetry),c=Ce(i.setNextPlugin);a._hasRun=!1,a.getPlugin=function(){return i},a.getNext=function(){return o},a.setNext=function(e){o=e},a.processTelemetry=function(n,r){r=r||t;var e=i?i.identifier:"TelemetryPluginChain";Ee(r?r.core():null,function(){return e+":processTelemetry"},function(){if(i&&s){a._hasRun=!0;try{r.setNext(o),c&&i.setNextPlugin(o),o&&(o._hasRun=!1),i.processTelemetry(n,r)}catch(t){var e=o&&o._hasRun;o&&e||r.diagLog().throwInternal(W.CRITICAL,73,"Plugin ["+i.identifier+"] failed during processTelemetry - "+t),o&&!e&&o.processTelemetry(n,r)}}else o&&(a._hasRun=!0,o.processTelemetry(n,r))},function(){return{item:n}},!n.sync)}},De=B.isNullOrUndefined;function Pe(e,t){var n=[];if(e&&0<e.length)for(var r=null,i=0;i<e.length;i++){var a,o=e[i];o&&B.isFunction(o.processTelemetry)&&(a=new be(o,t),n.push(a),r&&r.setNext(a),r=a)}return 0<n.length?n[0]:null}var ke=function zn(e,a,n,t){var r,i,o,s,c=this,u=null;null!==t&&(e&&B.isFunction(e.getPlugin)?u=function(e,t,n){var r=[],i=!n;if(e)for(;e;){var a=e.getPlugin();!i&&a!==n||(i=!0,r.push(a)),e=e.getNext()}return i||r.push(n),Pe(r,t)}(e,c,t||e.getPlugin()):t?(r=c,o=e,s=!1,(i=t)&&e&&(o=[],B.arrForEach(e,function(e){!s&&e!==i||(s=!0,o.push(e))})),i&&!s&&(o=o||[]).push(i),u=Pe(o,r)):B.isUndefined(t)&&(u=Pe(e,c))),c.core=function(){return n},c.diagLog=function(){return(n||{}).logger||new _e(a||{})},c.getCfg=function(){return a},c.getExtCfg=function(e,t){var n,r;return void 0===t&&(t={}),!a||(r=a.extensionConfig)&&e&&(n=r[e]),n||t},c.getConfig=function(e,t,n){var r;void 0===n&&(n=!1);var i=c.getExtCfg(e,null);return i&&!De(i[t])?r=i[t]:a&&!De(a[t])&&(r=a[t]),De(r)?n:r},c.hasNext=function(){return null!=u},c.getNext=function(){return u},c.setNext=function(e){u=e},c.processNext=function(e){var t=u;t&&(u=t.getNext(),t.processTelemetry(e,c))},c.createNew=function(e,t){return void 0===e&&(e=null),new zn(e||u,a,n,t)}},Ae=B.isFunction,Le="getPlugin",Me=(Re.prototype.initialize=function(e,t,n,r){this._baseTelInit(e,t,n,r)},Re);function Re(){var a=this,o=!1,s=null,c=null;a.core=null,a.diagLog=function(e){return a._getTelCtx(e).diagLog()},a.isInitialized=function(){return o},a.setInitialized=function(e){o=e},a.setNextPlugin=function(e){c=e},a.processNext=function(e,t){t?t.processNext(e):c&&Ae(c.processTelemetry)&&c.processTelemetry(e,null)},a._getTelCtx=function(e){void 0===e&&(e=null);var t,n=e;return n||(t=s||new ke(null,{},a.core),n=c&&c[Le]?t.createNew(null,c[Le]):t.createNew(null,c)),n},a._baseTelInit=function(e,t,n,r){e&&(e.extensionConfig=e.extensionConfig||[]),!r&&t&&(r=t.getProcessTelContext().getNext());var i=c;c&&c[Le]&&(i=c[Le]()),a.core=t,s=new ke(r,e,t,i),o=!0}}var Oe=B.isFunction,Ue="processTelemetry",ze="priority",Ve="setNextPlugin",Ge="isInitialized";function je(t,n){for(var e=[],r=null,i=t.getNext();i;){var a=i.getPlugin();a&&(r&&Oe(r[Ve])&&Oe(a[Ue])&&r[Ve](a),Oe(a[Ge])&&a[Ge]()||e.push(a),r=a,i=i.getNext())}B.arrForEach(e,function(e){e.initialize(t.getCfg(),t.core(),n,t.getNext())})}function qe(e){return e.sort(function(e,t){var n=0,r=Oe(t[Ue]);return Oe(e[Ue])?n=r?e[ze]-t[ze]:1:r&&(n=-1),n})}var Fe,Be=500,Ke="Channel has invalid priority",We=B.objDefineAccessors,He=(Fe=Me,__extends(Xe,Fe),Xe._staticInit=(We(Xe.prototype,"ChannelControls",Xe.prototype.getChannelControls),void We(Xe.prototype,"channelQueue",Xe.prototype.getChannelControls)),Xe);function Xe(){var r=Fe.call(this)||this;r.identifier="ChannelControllerPlugin",r.priority=Be;var c,u=B.arrForEach;function l(e){e&&0<e.length&&(e=e.sort(function(e,t){return e.priority-t.priority}),u(e,function(e){if(e.priority<Be)throw Error(Ke+e.identifier)}),c.push(e))}return me(Xe,r,function(o,s){o.setNextPlugin=function(e){},o.processTelemetry=function(t,n){c&&u(c,function(e){0<e.length&&r._getTelCtx(n).createNew(e).processNext(t)})},o.getChannelControls=function(){return c},o.initialize=function(t,n,r){var e,i,a;o.isInitialized()||(s.initialize(t,n,r),t.isCookieUseDisabled&&B.disableCookies(),i=r,c=[],(e=(t||{}).channels)&&u(e,l),i&&(a=[],u(i,function(e){e.priority>Be&&a.push(e)}),l(a)),u(c,function(e){return je(new ke(e,t,n),r)}))}}),r}var Je=B.arrForEach,$e=B.isNullOrUndefined,Qe="_notificationManager",Ye=function Vn(e){this.listeners=[];var a=B.arrForEach,t=!!(e||{}).perfEvtsSendAll;me(Vn,this,function(i){i.addNotificationListener=function(e){i.listeners.push(e)},i.removeNotificationListener=function(e){for(var t=B.arrIndexOf(i.listeners,e);-1<t;)i.listeners.splice(t,1),t=B.arrIndexOf(i.listeners,e)},i.eventsSent=function(t){a(i.listeners,function(e){e&&e.eventsSent&&setTimeout(function(){return e.eventsSent(t)},0)})},i.eventsDiscarded=function(t,n){a(i.listeners,function(e){e&&e.eventsDiscarded&&setTimeout(function(){return e.eventsDiscarded(t,n)},0)})},i.eventsSendRequest=function(n,r){a(i.listeners,function(e){if(e&&e.eventsSendRequest)if(r)setTimeout(function(){return e.eventsSendRequest(n,r)},0);else try{e.eventsSendRequest(n,r)}catch(t){}})},i.perfEvent=function(n){n&&(!t&&n.isChildEvt()||a(i.listeners,function(e){if(e&&e.perfEvent)if(n.isAsync)setTimeout(function(){return e.perfEvent(n)},0);else try{e.perfEvent(n)}catch(t){}}))}})},Ze=function Gn(){var t,c,u,n,l=!1;me(Gn,this,function(s){s._extensions=[],c=new He,t=[],s.isInitialized=function(){return l},s.initialize=function(e,t,r,n){if(s.isInitialized())throw Error("Core should not be initialized more than once");if(!e||$e(e.instrumentationKey))throw Error("Please provide instrumentation key");u=n,s[Qe]=n,s.config=e||{},e.extensions=$e(e.extensions)?[]:e.extensions,(e.extensionConfig=$e(e.extensionConfig)?{}:e.extensionConfig).NotificationManager=n,r=r||B.objCreate({throwInternal:function(e,t,n,r,i){void 0===i&&(i=!1)},warnToConsole:function(e){},resetInternalMessageCount:function(){}}),s.logger=r;var i=[];i.push.apply(i,t.concat(e.extensions)),i=qe(i);var a=[],o={};if(Je(i,function(e){if($e(e)||$e(e.initialize))throw Error("Extensions must provide callback to initialize");var t=e.priority,n=e.identifier;e&&t&&($e(o[t])?o[t]=n:r.warnToConsole("Two extensions have same priority #"+t+" - "+o[t]+", "+n)),(!t||t<c.priority)&&a.push(e)}),i.push(c),a.push(c),i=qe(i),s._extensions=i,je(new ke([c],e,s),i),je(new ke(a,e,s),i),s._extensions=a,0===s.getTransmissionControls().length)throw Error("No channels available");l=!0,s.releaseQueue()},s.getTransmissionControls=function(){return c.getChannelControls()},s.track=function(e){e.iKey||(e.iKey=s.config.instrumentationKey),e.time||(e.time=B.toISOString(new Date)),$e(e.ver)&&(e.ver="4.0"),s.isInitialized()?s.getProcessTelContext().processNext(e):t.push(e)},s.getProcessTelContext=function(){var e=s._extensions,t=e;return e&&0!==e.length||(t=[c]),new ke(t,s.config,s)},s.getNotifyMgr=function(){return u||(u=B.objCreate({addNotificationListener:function(e){},removeNotificationListener:function(e){},eventsSent:function(e){},eventsDiscarded:function(e,t){},eventsSendRequest:function(e,t){}}),s[Qe]=u),u},s.getPerfMgr=function(){return n||s.config&&s.config.enablePerfMgr&&(n=new Ie(s.getNotifyMgr())),n},s.setPerfMgr=function(e){n=e},s.eventCnt=function(){return t.length},s.releaseQueue=function(){0<t.length&&(Je(t,function(e){s.getProcessTelContext().processNext(e)}),t=[])}})};__extends(function jn(){var e=Ze.call(this)||this;return me(jn,e,function(r,i){function t(e){var t=r.getNotifyMgr();t&&t.eventsDiscarded([e],h)}r.initialize=function(e,t,n,r){i.initialize(e,t,n||new _e(e),r||new Ye(e))},r.track=function(e){Ee(r.getPerfMgr(),function(){return"AppInsightsCore:track"},function(){if(null===e)throw t(e),Error("Invalid telemetry item");!function(e){if(B.isNullOrUndefined(e.name))throw t(e),Error("telemetry name required")}(e),i.track(e)},function(){return{item:e}},!e.sync)},r.addNotificationListener=function(e){var t=r.getNotifyMgr();t&&t.addNotificationListener(e)},r.removeNotificationListener=function(e){var t=r.getNotifyMgr();t&&t.removeNotificationListener(e)},r.pollInternalLogs=function(n){var e=r.config.diagnosticLogInterval;return e&&0<e||(e=1e4),setInterval(function(){var e=r.logger?r.logger.queue:[];B.arrForEach(e,function(e){var t={name:n||"InternalMessageId: "+e.messageId,iKey:r.config.instrumentationKey,time:B.toISOString(new Date),baseType:ye.dataType,baseData:{message:e.message}};r.track(t)}),e.length=0},e)}}),e},Ze);var et=(tt.sanitizeKeyAndAddUniqueness=function(e,t,n){var r=t.length,i=tt.sanitizeKey(e,t);if(i.length!==r){for(var a=0,o=i;n[o]!==undefined;)a++,o=i.substring(0,tt.MAX_NAME_LENGTH-3)+tt.padNumber(a);i=o}return i},tt.sanitizeKey=function(e,t){var n;return t&&(t=tt.trim(t.toString())).length>tt.MAX_NAME_LENGTH&&(n=t.substring(0,tt.MAX_NAME_LENGTH),e.throwInternal(W.WARNING,57,"name is too long. It has been truncated to "+tt.MAX_NAME_LENGTH+" characters.",{name:t},!0)),n||t},tt.sanitizeString=function(e,t,n){var r;return void 0===n&&(n=tt.MAX_STRING_LENGTH),t&&(n=n||tt.MAX_STRING_LENGTH,(t=tt.trim(t)).toString().length>n&&(r=t.toString().substring(0,n),e.throwInternal(W.WARNING,61,"string value is too long. It has been truncated to "+n+" characters.",{value:t},!0))),r||t},tt.sanitizeUrl=function(e,t){return tt.sanitizeInput(e,t,tt.MAX_URL_LENGTH,66)},tt.sanitizeMessage=function(e,t){var n;return t&&t.length>tt.MAX_MESSAGE_LENGTH&&(n=t.substring(0,tt.MAX_MESSAGE_LENGTH),e.throwInternal(W.WARNING,56,"message is too long, it has been truncated to "+tt.MAX_MESSAGE_LENGTH+" characters.",{message:t},!0)),n||t},tt.sanitizeException=function(e,t){var n;return t&&t.length>tt.MAX_EXCEPTION_LENGTH&&(n=t.substring(0,tt.MAX_EXCEPTION_LENGTH),e.throwInternal(W.WARNING,52,"exception is too long, it has been truncated to "+tt.MAX_EXCEPTION_LENGTH+" characters.",{exception:t},!0)),n||t},tt.sanitizeProperties=function(e,t){if(t){var n={};for(var r in t){var i=t[r];if(B.isObject(i)&&P())try{i=k().stringify(i)}catch(a){e.throwInternal(W.WARNING,49,"custom property is not valid",{exception:a},!0)}i=tt.sanitizeString(e,i,tt.MAX_PROPERTY_LENGTH),n[r=tt.sanitizeKeyAndAddUniqueness(e,r,n)]=i}t=n}return t},tt.sanitizeMeasurements=function(e,t){if(t){var n={};for(var r in t){var i=t[r];n[r=tt.sanitizeKeyAndAddUniqueness(e,r,n)]=i}t=n}return t},tt.sanitizeId=function(e,t){return t?tt.sanitizeInput(e,t,tt.MAX_ID_LENGTH,69).toString():t},tt.sanitizeInput=function(e,t,n,r){var i;return t&&(t=tt.trim(t)).length>n&&(i=t.substring(0,n),e.throwInternal(W.WARNING,r,"input is too long, it has been truncated to "+n+" characters.",{data:t},!0)),i||t},tt.padNumber=function(e){var t="00"+e;return t.substr(t.length-3)},tt.trim=function(e){return B.isString(e)?e.replace(/^\s+|\s+$/g,""):e},tt.MAX_NAME_LENGTH=150,tt.MAX_ID_LENGTH=128,tt.MAX_PROPERTY_LENGTH=8192,tt.MAX_STRING_LENGTH=1024,tt.MAX_URL_LENGTH=2048,tt.MAX_MESSAGE_LENGTH=32768,tt.MAX_EXCEPTION_LENGTH=32768,tt);function tt(){}var nt=C(),rt=B.isString,it=null,at=(ot.createDomEvent=function(e){var t,n=null;return B.isFunction(Event)?n=new Event(e):(t=E())&&t.createEvent&&(n=t.createEvent("Event")).initEvent(e,!0,!0),n},ot.disableStorage=function(){ot._canUseLocalStorage=!1,ot._canUseSessionStorage=!1},ot._getLocalStorageObject=function(){return ot.canUseLocalStorage()?ot._getVerifiedStorageObject(c.LocalStorage):null},ot._getVerifiedStorageObject=function(e){var t,n,r=null;try{if(B.isNullOrUndefined(T()))return null;n=new Date,(r=w(e===c.LocalStorage?"localStorage":"sessionStorage")).setItem(n.toString(),n.toString()),t=r.getItem(n.toString())!==n.toString(),r.removeItem(n.toString()),t&&(r=null)}catch(i){r=null}return r},ot.isInternalApplicationInsightsEndpoint=function(e){return!!~ot._internalEndpoints.indexOf(e.toLowerCase())},ot.canUseLocalStorage=function(){return ot._canUseLocalStorage===undefined&&(ot._canUseLocalStorage=!!ot._getVerifiedStorageObject(c.LocalStorage)),ot._canUseLocalStorage},ot.getStorage=function(e,t){var n=ot._getLocalStorageObject();if(null!==n)try{return n.getItem(t)}catch(r){ot._canUseLocalStorage=!1,e.throwInternal(W.WARNING,1,"Browser failed read of local storage. "+ot.getExceptionName(r),{exception:ot.dump(r)})}return null},ot.setStorage=function(e,t,n){var r=ot._getLocalStorageObject();if(null!==r)try{return r.setItem(t,n),!0}catch(i){ot._canUseLocalStorage=!1,e.throwInternal(W.WARNING,3,"Browser failed write to local storage. "+ot.getExceptionName(i),{exception:ot.dump(i)})}return!1},ot.removeStorage=function(e,t){var n=ot._getLocalStorageObject();if(null!==n)try{return n.removeItem(t),!0}catch(r){ot._canUseLocalStorage=!1,e.throwInternal(W.WARNING,5,"Browser failed removal of local storage item. "+ot.getExceptionName(r),{exception:ot.dump(r)})}return!1},ot._getSessionStorageObject=function(){return ot.canUseSessionStorage()?ot._getVerifiedStorageObject(c.SessionStorage):null},ot.canUseSessionStorage=function(){return ot._canUseSessionStorage===undefined&&(ot._canUseSessionStorage=!!ot._getVerifiedStorageObject(c.SessionStorage)),ot._canUseSessionStorage},ot.getSessionStorageKeys=function(){var e=[];if(ot.canUseSessionStorage())for(var t in w("sessionStorage"))e.push(t);return e},ot.getSessionStorage=function(e,t){var n=ot._getSessionStorageObject();if(null!==n)try{return n.getItem(t)}catch(r){ot._canUseSessionStorage=!1,e.throwInternal(W.WARNING,2,"Browser failed read of session storage. "+ot.getExceptionName(r),{exception:ot.dump(r)})}return null},ot.setSessionStorage=function(e,t,n){var r=ot._getSessionStorageObject();if(null!==r)try{return r.setItem(t,n),!0}catch(i){ot._canUseSessionStorage=!1,e.throwInternal(W.WARNING,4,"Browser failed write to session storage. "+ot.getExceptionName(i),{exception:ot.dump(i)})}return!1},ot.removeSessionStorage=function(e,t){var n=ot._getSessionStorageObject();if(null!==n)try{return n.removeItem(t),!0}catch(r){ot._canUseSessionStorage=!1,e.throwInternal(W.WARNING,6,"Browser failed removal of session storage item. "+ot.getExceptionName(r),{exception:ot.dump(r)})}return!1},ot.disableCookies=function(){B.disableCookies()},ot.canUseCookies=function(e){if(B._canUseCookies===undefined){B._canUseCookies=!1;try{B._canUseCookies=ot.document.cookie!==undefined}catch(t){e.throwInternal(W.WARNING,68,"Cannot access document.cookie - "+ot.getExceptionName(t),{exception:ot.dump(t)})}}return B._canUseCookies},ot.disallowsSameSiteNone=function(e){return!(!rt(e)||!~e.indexOf("CPU iPhone OS 12")&&!~e.indexOf("iPad; CPU OS 12")&&!(~e.indexOf("Macintosh; Intel Mac OS X 10_14")&&~e.indexOf("Version/")&&~e.indexOf("Safari"))&&(!~e.indexOf("Macintosh; Intel Mac OS X 10_14")||(n=(t=e.length)-40,"AppleWebKit/605.1.15 (KHTML, like Gecko)"!=e.substring(0<=n?n:0,t)))&&!~e.indexOf("Chrome/5")&&!~e.indexOf("Chrome/6")&&(!~e.indexOf("UnrealEngine")||~e.indexOf("Chrome"))&&!~e.indexOf("UCBrowser/12")&&!~e.indexOf("UCBrowser/11"));var t,n},ot.setCookie=function(e,t,n,r){var i,a,o;ot.canUseCookies(e)&&(a=i="",r&&(i=";domain="+r),(o=b())&&"https:"===o.protocol&&(a=";secure",null===it&&(it=ot.disallowsSameSiteNone((C()||{}).userAgent)),it||(n+=";SameSite=None")),ot.document.cookie=t+"="+n+i+";path=/"+a)},ot.stringToBoolOrDefault=function(e,t){return void 0===t&&(t=!1),e===undefined||null===e?t:"true"==e.toString().toLowerCase()},ot.getCookie=function(e,t){if(ot.canUseCookies(e)){var n="";if(t&&t.length)for(var r=t+"=",i=ot.document.cookie.split(";"),a=0;a<i.length;a++){var o=i[a];if((o=ot.trim(o))&&!o.indexOf(r)){n=o.substring(r.length,i[a].length);break}}return n}},ot.deleteCookie=function(e,t){ot.canUseCookies(e)&&(ot.document.cookie=t+"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;")},ot.newId=function(){for(var e="",t=1073741824*Math.random();0<t;)e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[0|t%64],t=Math.floor(t/64);return e},ot.random32=function(){return 4294967296*Math.random()|0},ot.generateW3CId=function(){for(var e,t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],n="",r=0;r<4;r++)n+=t[15&(e=ot.random32())]+t[e>>4&15]+t[e>>8&15]+t[e>>12&15]+t[e>>16&15]+t[e>>20&15]+t[e>>24&15]+t[e>>28&15];var i=t[8+4*Math.random()|0];return n.substr(0,8)+n.substr(9,4)+"4"+n.substr(13,3)+i+n.substr(16,3)+n.substr(19,12)},ot.getIEVersion=function(e){void 0===e&&(e=null);var t=e?e.toLowerCase():nt?(nt.userAgent||"").toLowerCase():"";if(~t.indexOf("msie"))return parseInt(t.split("msie")[1]);if(t.indexOf("trident/")){var n=parseInt(t.split("trident/")[1]);if(n)return n+4}return null},ot.msToTimeSpan=function(e){(isNaN(e)||e<0)&&(e=0);var t=""+(e=Math.round(e))%1e3,n=""+Math.floor(e/1e3)%60,r=""+Math.floor(e/6e4)%60,i=""+Math.floor(e/36e5)%24,a=Math.floor(e/864e5),t=1===t.length?"00"+t:2===t.length?"0"+t:t,n=n.length<2?"0"+n:n,r=r.length<2?"0"+r:r;return(0<a?a+".":"")+(i=i.length<2?"0"+i:i)+":"+r+":"+n+"."+t},ot.isCrossOriginError=function(e,t,n,r,i){return("Script error."===e||"Script error"===e)&&!i},ot.dump=function(e){var t=Object[v].toString.call(e),n="";return"[object Error]"===t?n="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":P()&&(n=k().stringify(e)),t+n},ot.getExceptionName=function(e){return"[object Error]"===Object[v].toString.call(e)?e.name:""},ot.addEventHandler=function(e,t){return J.Attach(N(),e,t)},ot.IsBeaconApiSupported=function(){return"sendBeacon"in nt&&nt.sendBeacon},ot.getExtension=function(e,t){for(var n=null,r=0;!n&&r<e.length;)e[r]&&e[r].identifier===t&&(n=e[r]),r++;return n},ot.document=E()||{},ot._canUseLocalStorage=undefined,ot._canUseSessionStorage=undefined,ot._internalEndpoints=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],ot.NotSpecified="not_specified",ot.trim=B.strTrim,ot.isArray=B.isArray,ot.isError=B.isError,ot.isDate=B.isDate,ot.toISOStringForIE8=B.toISOString,ot);function ot(){}var st=(ct.parseUrl=function(e){var t=ct._htmlAnchorIdx,n=ct._htmlAnchorElement,r=n[t];return ct.document.createElement?n[t]||(r=n[t]=ct.document.createElement("a")):r={host:ct.parseHost(e,!0)},r.href=e,++t>=n.length&&(t=0),ct._htmlAnchorIdx=t,r},ct.getAbsoluteUrl=function(e){var t,n=ct.parseUrl(e);return n&&(t=n.href),t},ct.getPathName=function(e){var t,n=ct.parseUrl(e);return n&&(t=n.pathname),t},ct.getCompleteUrl=function(e,t){return e?e.toUpperCase()+" "+t:t},ct.parseHost=function(e,t){var n=ct.parseFullHost(e,t);if(n){var r=n.match(/(www[0-9]?\.)?(.[^/:]+)(\:[\d]+)?/i);if(null!=r&&3<r.length&&rt(r[2])&&0<r[2].length)return r[2]+(r[3]||"")}return n},ct.parseFullHost=function(e,t){var n,r,i,a=null;return!e||null!=(n=e.match(/(\w*):\/\/(.[^/:]+)(\:[\d]+)?/i))&&2<n.length&&rt(n[2])&&0<n[2].length&&(a=n[2]||"",t&&2<n.length&&(r=(n[1]||"").toLowerCase(),i=n[3]||"",("http"==r&&":80"===i||"https"==r&&":443"===i)&&(i=""),a+=i)),a},ct.document=E()||{},ct._htmlAnchorIdx=0,ct._htmlAnchorElement=[null,null,null,null,null],ct);function ct(){}var ut=(lt.ParseDependencyPath=function(e,t,n,r){var i,a,o,s=r,c=r,s=t&&0<t.length?(o=(i=st.parseUrl(t)).host,s||(null!=i.pathname?("/"!=(a=0===i.pathname.length?"/":i.pathname)[0]&&(a="/"+a),c=i.pathname,et.sanitizeString(e,n?n+" "+a:a)):et.sanitizeString(e,t))):o=r;return{target:o,name:s,data:c}},lt);function lt(){}var ft=(gt.Now=function(){var e=D();return e&&e.now&&e.timing?e.now()+e.timing.navigationStart:(new Date).getTime()},gt.GetDuration=function(e,t){var n=null;return 0===e||0===t||B.isNullOrUndefined(e)||B.isNullOrUndefined(t)||(n=t-e),n},gt);function gt(){}var pt,dt=(__extends(ht,function(){}),ht);function ht(){return this}pt=function(){this.ver=1,this.sampleRate=100,this.tags={}},__extends(function(e,t,n){var r=pt.call(this)||this;return r.name=et.sanitizeString(e,n)||at.NotSpecified,r.data=t,r.time=B.toISOString(new Date),r.aiDataContract={time:d.Required,iKey:d.Required,name:d.Required,sampleRate:function(){return 100===r.sampleRate?d.Hidden:d.Required},tags:d.Required,data:d.Required},r},pt);var mt,vt=function(){},yt=(mt=vt,__extends(xt,mt),xt);function xt(){var e=mt.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var _t,St=(_t=yt,__extends(Tt,_t),Tt.envelopeType="Microsoft.ApplicationInsights.{0}.Event",Tt.dataType="EventData",Tt);function Tt(e,t,n,r){var i=_t.call(this)||this;return i.aiDataContract={ver:d.Required,name:d.Required,properties:d.Default,measurements:d.Default},i.name=et.sanitizeString(e,t)||at.NotSpecified,i.properties=et.sanitizeProperties(e,n),i.measurements=et.sanitizeMeasurements(e,r),i}var wt,It=(wt=vt,__extends(Nt,wt),Nt);function Nt(){var e=wt.call(this)||this;return e.ver=2,e.exceptions=[],e.properties={},e.measurements={},e}var Et,Ct="error",bt=(Et=It,__extends(Dt,Et),Dt.CreateFromInterface=function(t,e,n,r){var i=e.exceptions&&B.arrMap(e.exceptions,function(e){return kt.CreateFromInterface(t,e)});return new Dt(t,__assign({},e,{exceptions:i}),n,r)},Dt.prototype.toInterface=function(){var e=this,t=e.exceptions,n=e.properties,r=e.measurements,i=e.severityLevel,a=(e.ver,e.problemGroup),o=e.id,s=e.isManual;return{ver:"4.0",exceptions:t instanceof Array&&B.arrMap(t,function(e){return e.toInterface()})||undefined,severityLevel:i,properties:n,measurements:r,problemGroup:a,id:o,isManual:s}},Dt.CreateSimpleException=function(e,t,n,r,i,a){return{exceptions:[{hasFullStack:!0,message:e,stack:i,typeName:t}]}},Dt.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",Dt.dataType="ExceptionData",Dt);function Dt(e,t,n,r,i,a){var o,s=Et.call(this)||this;return s.aiDataContract={ver:d.Required,exceptions:d.Required,severityLevel:d.Default,properties:d.Default,measurements:d.Default},"ver"in(o=t)&&"exceptions"in o&&"properties"in o?(s.exceptions=t.exceptions,s.properties=t.properties,s.measurements=t.measurements,t.severityLevel&&(s.severityLevel=t.severityLevel),t.id&&(s.id=t.id),t.problemGroup&&(s.problemGroup=t.problemGroup),s.ver=2,B.isNullOrUndefined(t.isManual)||(s.isManual=t.isManual)):(s.exceptions=[new kt(e,t)],s.properties=et.sanitizeProperties(e,n)||{},s.measurements=et.sanitizeMeasurements(e,r),i&&(s.severityLevel=i),a&&(s.id=a)),s}var Pt,kt=(Pt=function(){this.hasFullStack=!0,this.parsedStack=[]},__extends(At,Pt),At.prototype.toInterface=function(){var e=this.parsedStack instanceof Array&&B.arrMap(this.parsedStack,function(e){return e.toInterface()});return{id:this.id,outerId:this.outerId,typeName:this.typeName,message:this.message,hasFullStack:this.hasFullStack,stack:this.stack,parsedStack:e||undefined}},At.CreateFromInterface=function(e,t){var n=t.parsedStack instanceof Array&&B.arrMap(t.parsedStack,function(e){return Mt.CreateFromInterface(e)})||t.parsedStack;return new At(e,__assign({},t,{parsedStack:n}))},At.parseStack=function(e){if(B.isString(e)){for(var t=e.split("\n"),n=[],r=0,i=0,a=0;a<=t.length;a++){var o,s=t[a];Mt.regex.test(s)&&(i+=(o=new Mt(t[a],r++)).sizeInBytes,n.push(o))}if(32768<i)for(var c=0,u=n.length-1,l=0,f=c,g=u;c<u;){if(32768<(l+=n[c].sizeInBytes+n[u].sizeInBytes)){var p=g-f+1;n.splice(f,p);break}f=c,g=u,c++,u--}}return n},At);function At(e,t){var n,r,i=Pt.call(this)||this;return i.aiDataContract={id:d.Default,outerId:d.Default,typeName:d.Required,message:d.Required,hasFullStack:d.Default,stack:d.Default,parsedStack:d.Array},"hasFullStack"in t&&"typeName"in t?(i.typeName=t.typeName,i.message=t.message,i.stack=t.stack,i.parsedStack=t.parsedStack,i.hasFullStack=t.hasFullStack):(n=t,at.isError(n)||(n=n[Ct]||n.evt||n),i.typeName=et.sanitizeString(e,function(e){var t="";if(e&&!(t=e.typeName||e.name||""))try{var n=/function (.{1,})\(/.exec(e.constructor.toString()),t=n&&1<n.length?n[1]:""}catch(r){}return t}(n))||at.NotSpecified,i.message=et.sanitizeMessage(e,t.message)||at.NotSpecified,r=t.stack,i.parsedStack=At.parseStack(r),i.stack=et.sanitizeException(e,r),i.hasFullStack=at.isArray(i.parsedStack)&&0<i.parsedStack.length),i}var Lt,Mt=(Lt=function(){},__extends(Rt,Lt),Rt.CreateFromInterface=function(e){return new Rt(e,null)},Rt.prototype.toInterface=function(){return{level:this.level,method:this.method,assembly:this.assembly,fileName:this.fileName,line:this.line}},Rt.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,Rt.baseSize=58,Rt);function Rt(e,t){var n,r,i=Lt.call(this)||this;return i.sizeInBytes=0,i.aiDataContract={level:d.Required,method:d.Required,assembly:d.Default,fileName:d.Default,line:d.Default},"string"==typeof e?(n=e,i.level=t,i.method="<no_method>",i.assembly=at.trim(n),i.fileName="",i.line=0,(r=n.match(Rt.regex))&&5<=r.length&&(i.method=at.trim(r[2])||i.method,i.fileName=at.trim(r[4]),i.line=parseInt(r[5])||0)):(i.level=e.level,i.method=e.method,i.assembly=e.assembly,i.fileName=e.fileName,i.line=e.line,i.sizeInBytes=0),i.sizeInBytes+=i.method.length,i.sizeInBytes+=i.fileName.length,i.sizeInBytes+=i.assembly.length,i.sizeInBytes+=Rt.baseSize,i.sizeInBytes+=i.level.toString().length,i.sizeInBytes+=i.line.toString().length,i}var Ot,Ut,zt,Vt=(Ot=vt,__extends(Gt,Ot),Gt);function Gt(){var e=Ot.call(this)||this;return e.ver=2,e.metrics=[],e.properties={},e.measurements={},e}(zt=Ut={})[zt.Measurement=0]="Measurement",zt[zt.Aggregation=1]="Aggregation";var jt,qt=(jt=function(){this.kind=Ut.Measurement},__extends(Ft,jt),Ft);function Ft(){var e=jt.apply(this,arguments)||this;return e.aiDataContract={name:d.Required,kind:d.Default,value:d.Required,count:d.Default,min:d.Default,max:d.Default,stdDev:d.Default},e}var Bt,Kt=(Bt=Vt,__extends(Wt,Bt),Wt.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",Wt.dataType="MetricData",Wt);function Wt(e,t,n,r,i,a,o,s){var c=Bt.call(this)||this;c.aiDataContract={ver:d.Required,metrics:d.Required,properties:d.Default};var u=new qt;return u.count=0<r?r:undefined,u.max=isNaN(a)||null===a?undefined:a,u.min=isNaN(i)||null===i?undefined:i,u.name=et.sanitizeString(e,t)||at.NotSpecified,u.value=n,c.metrics=[u],c.properties=et.sanitizeProperties(e,o),c.measurements=et.sanitizeMeasurements(e,s),c}var Ht,Xt=(Ht=yt,__extends(Jt,Ht),Jt);function Jt(){var e=Ht.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var $t,Qt=($t=Xt,__extends(Yt,$t),Yt.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",Yt.dataType="PageviewData",Yt);function Yt(e,t,n,r,i,a,o){var s=$t.call(this)||this;return s.aiDataContract={ver:d.Required,name:d.Default,url:d.Default,duration:d.Default,properties:d.Default,measurements:d.Default,id:d.Default},s.id=et.sanitizeId(e,o),s.url=et.sanitizeUrl(e,n),s.name=et.sanitizeString(e,t)||at.NotSpecified,isNaN(r)||(s.duration=at.msToTimeSpan(r)),s.properties=et.sanitizeProperties(e,i),s.measurements=et.sanitizeMeasurements(e,a),s}var Zt,en=(Zt=vt,__extends(tn,Zt),tn);function tn(){var e=Zt.call(this)||this;return e.ver=2,e.success=!0,e.properties={},e.measurements={},e}var nn,rn=(nn=en,__extends(an,nn),an.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",an.dataType="RemoteDependencyData",an);function an(e,t,n,r,i,a,o,s,c,u,l,f){void 0===c&&(c="Ajax");var g=nn.call(this)||this;g.aiDataContract={id:d.Required,ver:d.Required,name:d.Default,resultCode:d.Default,duration:d.Default,success:d.Default,data:d.Default,target:d.Default,type:d.Default,properties:d.Default,measurements:d.Default,kind:d.Default,value:d.Default,count:d.Default,min:d.Default,max:d.Default,stdDev:d.Default,dependencyKind:d.Default,dependencySource:d.Default,commandName:d.Default,dependencyTypeName:d.Default},g.id=t,g.duration=at.msToTimeSpan(i),g.success=a,g.resultCode=o+"",g.type=et.sanitizeString(e,c);var p=ut.ParseDependencyPath(e,n,s,r);return g.data=et.sanitizeUrl(e,r)||p.data,g.target=et.sanitizeString(e,p.target),u&&(g.target=g.target+" | "+u),g.name=et.sanitizeString(e,p.name),g.properties=et.sanitizeProperties(e,l),g.measurements=et.sanitizeMeasurements(e,f),g}var on,sn=(on=vt,__extends(cn,on),cn);function cn(){var e=on.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var un,ln=(un=sn,__extends(fn,un),fn.envelopeType="Microsoft.ApplicationInsights.{0}.Message",fn.dataType="MessageData",fn);function fn(e,t,n,r,i){var a=un.call(this)||this;return a.aiDataContract={ver:d.Required,message:d.Required,severityLevel:d.Default,properties:d.Default},t=t||at.NotSpecified,a.message=et.sanitizeMessage(e,t),a.properties=et.sanitizeProperties(e,r),a.measurements=et.sanitizeMeasurements(e,i),n&&(a.severityLevel=n),a}var gn,pn=(gn=Xt,__extends(dn,gn),dn);function dn(){var e=gn.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}var hn,mn,vn,yn,xn=(hn=pn,__extends(_n,hn),_n.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",_n.dataType="PageviewPerformanceData",_n);function _n(e,t,n,r,i,a,o){var s=hn.call(this)||this;return s.aiDataContract={ver:d.Required,name:d.Default,url:d.Default,duration:d.Default,perfTotal:d.Default,networkConnect:d.Default,sentRequest:d.Default,receivedResponse:d.Default,domProcessing:d.Default,properties:d.Default,measurements:d.Default},s.url=et.sanitizeUrl(e,n),s.name=et.sanitizeString(e,t)||at.NotSpecified,s.properties=et.sanitizeProperties(e,i),s.measurements=et.sanitizeMeasurements(e,a),o&&(s.domProcessing=o.domProcessing,s.duration=o.duration,s.networkConnect=o.networkConnect,s.perfTotal=o.perfTotal,s.receivedResponse=o.receivedResponse,s.sentRequest=o.sentRequest),s}mn=dt,__extends(function(e,t){var n=mn.call(this)||this;return n.aiDataContract={baseType:d.Required,baseData:d.Required},n.baseType=e,n.baseData=t,n},mn),(yn=vn={})[yn.Verbose=0]="Verbose",yn[yn.Information=1]="Information",yn[yn.Warning=2]="Warning",yn[yn.Error=3]="Error",yn[yn.Critical=4]="Critical";var Sn=(Tn.create=function(e,t,n,r,i,a){if(n=et.sanitizeString(r,n)||at.NotSpecified,B.isNullOrUndefined(e)||B.isNullOrUndefined(t)||B.isNullOrUndefined(n))throw Error("Input doesn't contain all required fields");var o={name:n,time:B.toISOString(new Date),iKey:"",ext:a||{},tags:[],data:{},baseType:t,baseData:e};if(!B.isNullOrUndefined(i))for(var s in i)i.hasOwnProperty(s)&&(o.data[s]=i[s]);return o},Tn);function Tn(){}var wn=function qn(y,x,t,_){me(qn,this,function(e){var f,g=B.arrForEach,p=B.isNullOrUndefined,d=null,h=[],m=!1;function v(){t&&g(t.getTransmissionControls(),function(e){g(e,function(e){return e.flush(!0)})})}t&&(f=t.logger),e.trackPageView=function(r,i){var e,a=r.name;!p(a)&&"string"==typeof a||(e=E(),a=r.name=e&&e.title||"");var t,o=r.uri;if(!p(o)&&"string"==typeof o||(t=b(),o=r.uri=t&&t.href||""),!_.isPerformanceTimingSupported())return y.sendPageViewInternal(r,i),v(),void f.throwInternal(W.WARNING,25,"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 n,s,c=!1,u=_.getPerformanceTiming().navigationStart,l=ft.GetDuration(u,+new Date);_.shouldCollectDuration(l)||(l=undefined),p(i)||p(i.duration)||(n=i.duration),!x&&isNaN(n)||(isNaN(n)&&((i=i||{}).duration=l),y.sendPageViewInternal(r,i),v(),c=!0),i=i||{},s=function(){var e,t=!1;try{_.isPerformanceTimingDataReady()?(t=!0,e={name:a,uri:o},_.populatePageViewPerformanceEvent(e),e.isValid||c?(c||(i.duration=e.durationMs,y.sendPageViewInternal(r,i)),m||(y.sendPageViewPerformanceInternal(e,i),m=!0)):(i.duration=l,y.sendPageViewInternal(r,i))):6e4<ft.GetDuration(u,+new Date)&&(t=!0,c||(i.duration=6e4,y.sendPageViewInternal(r,i)))}catch(n){f.throwInternal(W.CRITICAL,38,"trackPageView failed on page load calculation: "+at.getExceptionName(n),{exception:at.dump(n)})}return t},h.push(s),d=d||setInterval(function(){var e=h.slice(0),t=!1;h=[],g(e,function(e){e()?t=!0:h.push(e)}),0===h.length&&(clearInterval(d),d=null),t&&v()},100)}})},In=(Nn.prototype.trackPreviousPageVisit=function(e,t){try{var n=this.restartPageVisitTimer(e,t);n&&this.pageVisitTimeTrackingHandler(n.pageName,n.pageUrl,n.pageVisitTime)}catch(r){this._logger.warnToConsole("Auto track page visit time failed, metric will not be collected: "+at.dump(r))}},Nn.prototype.restartPageVisitTimer=function(e,t){try{var n=this.stopPageVisitTimer();return this.startPageVisitTimer(e,t),n}catch(r){return this._logger.warnToConsole("Call to restart failed: "+at.dump(r)),null}},Nn.prototype.startPageVisitTimer=function(e,t){try{if(at.canUseSessionStorage()){if(null!=at.getSessionStorage(this._logger,this.prevPageVisitDataKeyName))throw Error("Cannot call startPageVisit consecutively without first calling stopPageVisit");var n=new En(e,t),r=k().stringify(n);at.setSessionStorage(this._logger,this.prevPageVisitDataKeyName,r)}}catch(i){this._logger.warnToConsole("Call to start failed: "+at.dump(i))}},Nn.prototype.stopPageVisitTimer=function(){try{if(at.canUseSessionStorage()){var e=B.dateNow(),t=at.getSessionStorage(this._logger,this.prevPageVisitDataKeyName);if(t&&P()){var n=k().parse(t);return n.pageVisitTime=e-n.pageVisitStartTime,at.removeSessionStorage(this._logger,this.prevPageVisitDataKeyName),n}return null}return null}catch(r){return this._logger.warnToConsole("Stop page visit timer failed: "+at.dump(r)),null}},Nn);function Nn(e,t){this.prevPageVisitDataKeyName="prevPageVisitData",this.pageVisitTimeTrackingHandler=t,this._logger=e}var En=function(e,t){this.pageVisitStartTime=B.dateNow(),this.pageName=e,this.pageUrl=t},Cn=(bn.prototype.populatePageViewPerformanceEvent=function(e){e.isValid=!1;var t,n,r,i,a,o=this.getPerformanceNavigationTiming(),s=this.getPerformanceTiming();(o||s)&&(a=o?(t=o.duration,n=ft.GetDuration(o.startTime,o.connectEnd),r=ft.GetDuration(o.requestStart,o.responseStart),i=ft.GetDuration(o.responseStart,o.responseEnd),ft.GetDuration(o.responseEnd,o.loadEventEnd)):(t=ft.GetDuration(s.navigationStart,s.loadEventEnd),n=ft.GetDuration(s.navigationStart,s.connectEnd),r=ft.GetDuration(s.requestStart,s.responseStart),i=ft.GetDuration(s.responseStart,s.responseEnd),ft.GetDuration(s.responseEnd,s.loadEventEnd)),0===t?this._logger.throwInternal(W.WARNING,10,"error calculating page view performance.",{total:t,network:n,request:r,response:i,dom:a}):this.shouldCollectDuration(t,n,r,i,a)?t<Math.floor(n)+Math.floor(r)+Math.floor(i)+Math.floor(a)?this._logger.throwInternal(W.WARNING,8,"client performance math error.",{total:t,network:n,request:r,response:i,dom:a}):(e.durationMs=t,e.perfTotal=e.duration=at.msToTimeSpan(t),e.networkConnect=at.msToTimeSpan(n),e.sentRequest=at.msToTimeSpan(r),e.receivedResponse=at.msToTimeSpan(i),e.domProcessing=at.msToTimeSpan(a),e.isValid=!0):this._logger.throwInternal(W.WARNING,45,"Invalid page load duration value. Browser perf data won't be sent.",{total:t,network:n,request:r,response:i,dom:a}))},bn.prototype.getPerformanceTiming=function(){return this.isPerformanceTimingSupported()?D().timing:null},bn.prototype.getPerformanceNavigationTiming=function(){return this.isPerformanceNavigationTimingSupported()?D().getEntriesByType("navigation")[0]:null},bn.prototype.isPerformanceNavigationTimingSupported=function(){var e=D();return e&&e.getEntriesByType&&0<e.getEntriesByType("navigation").length},bn.prototype.isPerformanceTimingSupported=function(){var e=D();return e&&e.timing},bn.prototype.isPerformanceTimingDataReady=function(){var e=D(),t=e?e.timing:0;return t&&0<t.domainLookupStart&&0<t.navigationStart&&0<t.responseStart&&0<t.requestStart&&0<t.loadEventEnd&&0<t.responseEnd&&0<t.connectEnd&&0<t.domLoading},bn.prototype.shouldCollectDuration=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=["googlebot","adsbot-google","apis-google","mediapartners-google"],r=(C()||{}).userAgent,i=!1;if(r)for(var a=0;a<n.length;a++)i=i||!!~r.toLowerCase().indexOf(n[a]);if(i)return!1;for(a=0;a<e.length;a++)if(e[a]>=this.MAX_DURATION_ALLOWED)return!1;return!0},bn);function bn(e){this.MAX_DURATION_ALLOWED=36e5,e&&(this._logger=e.logger)}var Dn="duration";function Pn(e,t){e&&e.dispatchEvent&&t&&e.dispatchEvent(t)}var kn,An=(kn=Me,__extends(Ln,kn),Ln.getDefaultConfig=function(e){return(e=e||{}).sessionRenewalMs=18e5,e.sessionExpirationMs=864e5,e.disableExceptionTracking=at.stringToBoolOrDefault(e.disableExceptionTracking),e.autoTrackPageVisitTime=at.stringToBoolOrDefault(e.autoTrackPageVisitTime),e.overridePageViewDuration=at.stringToBoolOrDefault(e.overridePageViewDuration),e.enableUnhandledPromiseRejectionTracking=at.stringToBoolOrDefault(e.enableUnhandledPromiseRejectionTracking),(isNaN(e.samplingPercentage)||e.samplingPercentage<=0||100<=e.samplingPercentage)&&(e.samplingPercentage=100),e.isCookieUseDisabled=at.stringToBoolOrDefault(e.isCookieUseDisabled),e.isStorageUseDisabled=at.stringToBoolOrDefault(e.isStorageUseDisabled),e.isBrowserLinkTrackingEnabled=at.stringToBoolOrDefault(e.isBrowserLinkTrackingEnabled),e.enableAutoRouteTracking=at.stringToBoolOrDefault(e.enableAutoRouteTracking),e.namePrefix=e.namePrefix||"",e},Ln.prototype.processTelemetry=function(a,o){var s=this;Ee(this.core,function(){return s.identifier+":processTelemetry"},function(){var e=!1,t=s._telemetryInitializers.length;o=s._getTelCtx(o);for(var n=0;n<t;++n){var r=s._telemetryInitializers[n];if(r)try{if(!1===r.call(null,a)){e=!0;break}}catch(i){o.diagLog().throwInternal(W.CRITICAL,64,"One of telemetry initializers failed, telemetry item will not be sent: "+at.getExceptionName(i),{exception:at.dump(i)},!0)}}e||s.processNext(a,o)},function(){return{item:a}},!a.sync)},Ln.prototype.trackEvent=function(e,t){try{var n=Sn.create(e,St.dataType,St.envelopeType,this.diagLog(),t);this.core.track(n)}catch(r){this.diagLog().throwInternal(W.WARNING,39,"trackTrace failed, trace will not be collected: "+at.getExceptionName(r),{exception:at.dump(r)})}},Ln.prototype.startTrackEvent=function(e){try{this._eventTracking.start(e)}catch(t){this.diagLog().throwInternal(W.CRITICAL,29,"startTrackEvent failed, event will not be collected: "+at.getExceptionName(t),{exception:at.dump(t)})}},Ln.prototype.stopTrackEvent=function(e,t,n){try{this._eventTracking.stop(e,undefined,t)}catch(r){this.diagLog().throwInternal(W.CRITICAL,30,"stopTrackEvent failed, event will not be collected: "+at.getExceptionName(r),{exception:at.dump(r)})}},Ln.prototype.trackTrace=function(e,t){try{var n=Sn.create(e,ln.dataType,ln.envelopeType,this.diagLog(),t);this.core.track(n)}catch(r){this.diagLog().throwInternal(W.WARNING,39,"trackTrace failed, trace will not be collected: "+at.getExceptionName(r),{exception:at.dump(r)})}},Ln.prototype.trackMetric=function(e,t){try{var n=Sn.create(e,Kt.dataType,Kt.envelopeType,this.diagLog(),t);this.core.track(n)}catch(r){this.diagLog().throwInternal(W.CRITICAL,36,"trackMetric failed, metric will not be collected: "+at.getExceptionName(r),{exception:at.dump(r)})}},Ln.prototype.trackPageView=function(e,t){try{var n=e||{};this._pageViewManager.trackPageView(n,__assign({},n.properties,n.measurements,t)),this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(n.name,n.uri)}catch(r){this.diagLog().throwInternal(W.CRITICAL,37,"trackPageView failed, page view will not be collected: "+at.getExceptionName(r),{exception:at.dump(r)})}},Ln.prototype.sendPageViewInternal=function(e,t,n){var r=E();r&&(e.refUri=e.refUri===undefined?r.referrer:e.refUri);var i=Sn.create(e,Qt.dataType,Qt.envelopeType,this.diagLog(),t,n);this.core.track(i),this._trackAjaxAttempts=0},Ln.prototype.sendPageViewPerformanceInternal=function(e,t,n){var r=Sn.create(e,xn.dataType,xn.envelopeType,this.diagLog(),t,n);this.core.track(r)},Ln.prototype.trackPageViewPerformance=function(e,t){try{this._pageViewPerformanceManager.populatePageViewPerformanceEvent(e),this.sendPageViewPerformanceInternal(e,t)}catch(n){this.diagLog().throwInternal(W.CRITICAL,37,"trackPageViewPerformance failed, page view will not be collected: "+at.getExceptionName(n),{exception:at.dump(n)})}},Ln.prototype.startTrackPage=function(e){try{var t;"string"!=typeof e&&(e=(t=E())&&t.title||""),this._pageTracking.start(e)}catch(n){this.diagLog().throwInternal(W.CRITICAL,31,"startTrackPage failed, page view may not be collected: "+at.getExceptionName(n),{exception:at.dump(n)})}},Ln.prototype.stopTrackPage=function(e,t,n,r){try{var i,a;"string"!=typeof e&&(e=(i=E())&&i.title||""),"string"!=typeof t&&(t=(a=b())&&a.href||""),this._pageTracking.stop(e,t,n,r),this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(e,t)}catch(o){this.diagLog().throwInternal(W.CRITICAL,32,"stopTrackPage failed, page view will not be collected: "+at.getExceptionName(o),{exception:at.dump(o)})}},Ln.prototype.sendExceptionInternal=function(e,t,n){var r=new bt(this.diagLog(),e.exception||Error(at.NotSpecified),e.properties,e.measurements,e.severityLevel,e.id).toInterface(),i=Sn.create(r,bt.dataType,bt.envelopeType,this.diagLog(),t,n);this.core.track(i)},Ln.prototype.trackException=function(e,t){try{this.sendExceptionInternal(e,t)}catch(n){this.diagLog().throwInternal(W.CRITICAL,35,"trackException failed, exception will not be collected: "+at.getExceptionName(n),{exception:at.dump(n)})}},Ln.prototype._onerror=function(e){try{var t,n={url:e&&e.url||(E()||{}).URL,lineNumber:e.lineNumber,columnNumber:e.columnNumber,message:e.message};at.isCrossOriginError(e.message,e.url,e.lineNumber,e.columnNumber,e.error)?this._sendCORSException(n.url):(at.isError(e.error)||(t="window.onerror@"+n.url+":"+e.lineNumber+":"+(e.columnNumber||0),e.error=Error(e.message),e.error.stack=t),this.trackException({exception:e.error,severityLevel:vn.Error},n))}catch(i){var r=e.error?e.error.name+", "+e.error.message:"null";this.diagLog().throwInternal(W.CRITICAL,11,"_onError threw exception while logging error, error will not be collected: "+at.getExceptionName(i),{exception:at.dump(i),errorString:r})}},Ln.prototype.addTelemetryInitializer=function(e){this._telemetryInitializers.push(e)},Ln.prototype.initialize=function(e,t,n,r){var o=this;if(!this.isInitialized()){if(B.isNullOrUndefined(t))throw Error("Error initializing");kn.prototype.initialize.call(this,e,t,n,r),this.setInitialized(!1);var i=this._getTelCtx(),a=this.identifier;this._globalconfig={instrumentationKey:e.instrumentationKey,endpointUrl:e.endpointUrl||"https://dc.services.visualstudio.com/v2/track"},this.config=i.getExtCfg(a);var s=Ln.getDefaultConfig();if(s!==undefined){for(var c in s)this.config[c]=i.getConfig(a,c,s[c]);if(this._globalconfig)for(var c in s)this._globalconfig[c]===undefined&&(this._globalconfig[c]=s[c])}this.config.isCookieUseDisabled&&at.disableCookies(),this.config.isStorageUseDisabled&&at.disableStorage();var u={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}};this._pageViewPerformanceManager=new Cn(this.core),this._pageViewManager=new wn(this,this.config.overridePageViewDuration,this.core,this._pageViewPerformanceManager),this._pageVisitTimeManager=new In(this.diagLog(),function(e,t,n){return o.trackPageVisitTime(e,t,n)}),this._telemetryInitializers=this._telemetryInitializers||[],this._addDefaultTelemetryInitializers(u),this._eventTracking=new Mn(this.diagLog(),"trackEvent"),this._eventTracking.action=function(e,t,n,r){(r=r||{})[Dn]=n.toString(),o.trackEvent({name:e,properties:r})},this._pageTracking=new Mn(this.diagLog(),"trackPageView"),this._pageTracking.action=function(e,t,n,r,i){B.isNullOrUndefined(r)&&(r={}),r[Dn]=n.toString();var a={name:e,uri:t,properties:r,measurements:i};o.sendPageViewInternal(a,r)};var l,f,g,p,d,h=N(),m=typeof history===x&&history?history:w("history"),v=b(),y=this;!1===this.config.disableExceptionTracking&&!this.config.autoExceptionInstrumented&&h&&(l=h.onerror,h.onerror=function(e,t,n,r,i){var a=l&&l(e,t,n,r,i);return!0!==a&&y._onerror({message:e,url:t,lineNumber:n,columnNumber:r,error:i}),a},this.config.autoExceptionInstrumented=!0),!1===this.config.disableExceptionTracking&&!0===this.config.enableUnhandledPromiseRejectionTracking&&!this.config.autoUnhandledPromiseInstrumented&&h&&(f=h.onunhandledrejection,h.onunhandledrejection=function(e){var t=f&&f.call(h,e);return!0!==t&&y._onerror({message:e.reason.toString(),error:e.reason instanceof Error?e.reason:Error(e.reason.toString()),url:v?v.href:"",lineNumber:0,columnNumber:0}),t},this.config.autoUnhandledPromiseInstrumented=!0),!0===this.config.enableAutoRouteTracking&&m&&B.isFunction(m.pushState)&&B.isFunction(m.replaceState)&&h&&"undefined"!=typeof Event&&(g=this,B.arrForEach(n,function(e){"AppInsightsPropertiesPlugin"===e.identifier&&(o._properties=e)}),m.pushState=(d=m.pushState,function(){var e=d.apply(this,arguments);return Pn(h,at.createDomEvent(g.config.namePrefix+"pushState")),Pn(h,at.createDomEvent(g.config.namePrefix+"locationchange")),e}),m.replaceState=(p=m.replaceState,function(){var e=p.apply(this,arguments);return Pn(h,at.createDomEvent(g.config.namePrefix+"replaceState")),Pn(h,at.createDomEvent(g.config.namePrefix+"locationchange")),e}),h.addEventListener&&(h.addEventListener(g.config.namePrefix+"popstate",function(){Pn(h,at.createDomEvent(g.config.namePrefix+"locationchange"))}),h.addEventListener(g.config.namePrefix+"locationchange",function(){g._properties&&g._properties.context&&g._properties.context.telemetryTrace&&(g._properties.context.telemetryTrace.traceID=at.generateW3CId(),g._properties.context.telemetryTrace.name=v&&v.pathname||"_unknown_"),o._currUri&&(o._prevUri=o._currUri),o._currUri=v&&v.href||"",setTimeout((function(e){g.trackPageView({refUri:e,properties:{duration:0}})}).bind(o,o._prevUri),g.autoRoutePVDelay)}))),this.setInitialized(!0)}},Ln.prototype.trackPageVisitTime=function(e,t,n){var r={PageName:e,PageUrl:t};this.trackMetric({name:"PageVisitTime",average:n,max:n,min:n,sampleCount:1},r)},Ln.prototype._addDefaultTelemetryInitializers=function(e){var r;e.isBrowserLinkTrackingEnabled()||(r=["/browserLinkSignalR/","/__browserLink/"],this._addTelemetryInitializer(function(e){if(e.baseType===rn.dataType){var t=e.baseData;if(t)for(var n=0;n<r.length;n++)if(t.target&&~t.target.indexOf(r[n]))return!1}return!0}))},Ln.prototype._addTelemetryInitializer=function(e){this._telemetryInitializers.push(e)},Ln.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:undefined},n=Sn.create(t,bt.dataType,bt.envelopeType,this.diagLog(),{url:e});this.core.track(n)},Ln.Version="2.5.8",Ln);function Ln(){var e=kn.call(this)||this;e.identifier="ApplicationInsightsAnalytics",e.priority=180,e.autoRoutePVDelay=500,e._trackAjaxAttempts=0;var t=b();return e._prevUri=t&&t.href||"",e}var Mn=(Rn.prototype.start=function(e){"undefined"!=typeof this._events[e]&&this._logger.throwInternal(W.WARNING,62,"start was called more than once for this event without calling stop.",{name:this._name,key:e},!0),this._events[e]=+new Date},Rn.prototype.stop=function(e,t,n,r){var i,a,o=this._events[e];isNaN(o)?this._logger.throwInternal(W.WARNING,63,"stop was called without a corresponding start.",{name:this._name,key:e},!0):(i=+new Date,a=ft.GetDuration(o,i),this.action(e,t,a,n,r)),delete this._events[e],this._events[e]=undefined},Rn);function Rn(e,t){this._name=t,this._events={},this._logger=e}e.ApplicationInsights=An,function(e,t,n){var r=Object.defineProperty;if(r)try{return r(e,t,n)}catch(i){}typeof n.value!==undefined&&(e[t]=n.value)}(e,"__esModule",{value:!0})};"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e.Microsoft=e.Microsoft||{},e.Microsoft.ApplicationInsights=e.Microsoft.ApplicationInsights||{}));
//# sourceMappingURL=applicationinsights-analytics-js.min.js.map
{
"name": "@microsoft/applicationinsights-analytics-js",
"version": "2.5.7",
"version": "2.5.8",
"description": "Microsoft Application Insights Javascript SDK apis",

@@ -21,4 +21,4 @@ "main": "dist/applicationinsights-analytics-js.js",

"devDependencies": {
"@microsoft/applicationinsights-rollup-es3" : "1.1.2",
"@microsoft/applicationinsights-properties-js": "2.5.7",
"@microsoft/applicationinsights-rollup-es3" : "1.1.3",
"@microsoft/applicationinsights-properties-js": "2.5.8",
"typescript": "2.5.3",

@@ -40,6 +40,6 @@ "globby": "^11.0.0",

"@microsoft/applicationinsights-shims" : "1.0.1",
"@microsoft/applicationinsights-core-js": "2.5.7",
"@microsoft/applicationinsights-common": "2.5.7"
"@microsoft/applicationinsights-core-js": "2.5.8",
"@microsoft/applicationinsights-common": "2.5.8"
},
"license": "MIT"
}

@@ -39,3 +39,3 @@ /**

export class ApplicationInsights extends BaseTelemetryPlugin implements IAppInsights, IAppInsightsInternal {
public static Version = "2.5.7"; // Not currently used anywhere
public static Version = "2.5.8"; // Not currently used anywhere

@@ -42,0 +42,0 @@ public static getDefaultConfig(config?: IConfig): IConfig {

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

import { Util } from '@microsoft/applicationinsights-common';
import { IDiagnosticLogger, hasJSON, getJSON } from '@microsoft/applicationinsights-core-js';
import { IDiagnosticLogger, hasJSON, getJSON, CoreUtils } from '@microsoft/applicationinsights-core-js';

@@ -95,3 +95,3 @@ /**

// Define end time of page's visit
const pageVisitEndTime = Date.now();
const pageVisitEndTime = CoreUtils.dateNow();

@@ -132,3 +132,3 @@ // Try to retrieve page name and start time from session storage

constructor(pageName: string, pageUrl: string) {
this.pageVisitStartTime = Date.now();
this.pageVisitStartTime = CoreUtils.dateNow();
this.pageName = pageName;

@@ -135,0 +135,0 @@ this.pageUrl = pageUrl;

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc