@microsoft/applicationinsights-web-basic 2.8.0-beta.2203-02 → 2.8.0-beta.2203-05

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * Application Insights JavaScript Web SDK - Basic, 2.8.0-beta.2203-02
2
+ * Application Insights JavaScript Web SDK - Basic, 2.8.0-beta.2203-05
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
- var e=this,n=function(T){"use strict";var b="function",w="object",_="undefined",o="prototype",N="hasOwnProperty",t=Object,A=t[o],E=t.assign,R=t.create,e=t.defineProperty,L=A[N],W=null;function G(e){return void 0===e&&(e=!0),W&&e||(typeof globalThis!==_&&globalThis&&(W=globalThis),typeof self!==_&&self&&(W=self),typeof window!==_&&window&&(W=window),typeof global!==_&&global&&(W=global)),W}function H(e){throw new TypeError(e)}function X(e){if(R)return R(e);if(null==e)return{};var n=typeof e;function t(){}return n!==w&&n!==b&&H("Object prototype may only be an Object:"+e),t[o]=e,new t}(G()||{}).Symbol,(G()||{}).Reflect;var Y=E||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var i in n=arguments[t])A[N].call(n,i)&&(e[i]=n[i]);return e},J=function(e,n){return(J=t.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)n[N](t)&&(e[t]=n[t])})(e,n)};function n(e,n){function t(){this.constructor=e}typeof n!==b&&null!==n&&H("Class extends value "+n+" is not a constructor or null"),J(e,n),e[o]=null===n?X(n):(t[o]=n[o],new t)}function Z(e,n){for(var t=0,r=n.length,i=e.length;t<r;t++,i++)e[i]=n[t];return e}var $="constructor",p="prototype",Q="function",ee="_dynInstFuncs",ne="_isDynProxy",te="_dynClass",re="_dynInstChk",ie=re,oe="_dfOpts",ae="_unknown_",se="__proto__",ue="useBaseInst",ce="setInstFuncs",le=Object,fe=le.getPrototypeOf,de=0;function ge(e,n){return e&&le[p].hasOwnProperty.call(e,n)}function pe(e){return e&&(e===le[p]||e===Array[p])}function he(e){return pe(e)||e===Function[p]}function me(e){if(e){if(fe)return fe(e);e=e[se]||e[p]||(e[$]?e[$][p]:null);if(e)return e}return null}function ve(e,n){var t=[],r=le.getOwnPropertyNames;if(r)t=r(e);else for(var i in e)"string"==typeof i&&ge(e,i)&&t.push(i);if(t&&0<t.length)for(var o=0;o<t.length;o++)n(t[o])}function ye(e,n,t){return n!==$&&typeof e[n]===Q&&(t||ge(e,n))}function Ie(e){throw new TypeError("DynamicProto: "+e)}function Ce(e,n){for(var t=e.length-1;0<=t;t--)if(e[t]===n)return 1}function Se(e,n){return ge(e,p)?e.name||n||ae:((e||{})[$]||{}).name||n||ae}function h(e,r,n,t){ge(e,p)||Ie("theClass is an invalid class definition.");var i,o,a,s,u,c,l=e[p],f=(function(e){if(fe)for(var n=[],t=me(r);t&&!he(t)&&!Ce(n,t);){if(t===e)return 1;n.push(t),t=me(t)}}(l)||Ie("["+Se(e)+"] is not in class hierarchy of ["+Se(r)+"]"),null),e=(ge(l,te)?f=l[te]:(f="_dynCls$"+Se(e,"_")+"$"+de,de++,l[te]=f),h[oe]),d=!!e[ue],g=(d&&t&&t[ue]!==undefined&&(d=!!t[ue]),o={},ve(i=r,function(e){!o[e]&&ye(i,e,!1)&&(o[e]=i[e])}),o),d=(n(r,function(e,n,t,o){function r(e,n,t){var r,i=n[t];return i[ne]&&o&&!1!==(r=e[ee]||{})[ie]&&(i=(r[n[te]]||{})[t]||i),function(){return i.apply(e,arguments)}}for(var i={},a=(ve(t,function(e){i[e]=r(n,t,e)}),me(e)),s=[];a&&!he(a)&&!Ce(s,a);)ve(a,function(e){!i[e]&&ye(a,e,!fe)&&(i[e]=r(n,a,e))}),s.push(a),a=me(a);return i}(l,r,g,d)),!!fe&&!!e[ce]);a=l,n=f,s=r,u=g,e=!1!==(d=d&&t?!!t[ce]:d),pe(a)||(l=s[ee]=s[ee]||{},c=l[n]=l[n]||{},!1!==l[ie]&&(l[ie]=!!e),ve(s,function(e){var t,r,i;ye(s,e,!1)&&s[e]!==u[e]&&(c[e]=s[e],delete s[e],ge(a,e)&&(!a[e]||a[e][ne])||(a[e]=(t=a,r=e,(i=function(){var e,n;return(function(e,n,t,r){var i=null;if(e&&ge(t,te)){var o=e[ee]||{};if((i=(o[t[te]]||{})[n])||Ie("Missing ["+n+"] "+Q),!i[re]&&!1!==o[ie]){for(var a=!ge(e,n),s=me(e),u=[];a&&s&&!he(s)&&!Ce(u,s);){var c=s[n];if(c){a=c===r;break}u.push(s),s=me(s)}try{a&&(e[n]=i),i[re]=1}catch(l){o[ie]=!1}}}return i}(this,r,t,i)||(typeof(n=(n=t[e=r])===i?me(t)[e]:n)!==Q&&Ie("["+e+"] is not a "+Q),n)).apply(this,arguments)})[ne]=1,i)))}))}h[oe]={setInstFuncs:!0,useBaseInst:!0};var M="",xe="processTelemetry",Te="priority",be="setNextPlugin",we="isInitialized",_e="teardown",Ne="core",Ae="disabled",Ee="_doTeardown",Re="processNext",Le="resume",Fe="pause",Me="NotificationListener",ke="add"+Me,De="remove"+Me,Pe="eventsSent",Be="eventsDiscarded",Oe="eventsSendRequest",Ue="perfEvent",ze="toISOString",je="endsWith",Ke="indexOf",qe="trim",Me="toString",Ve="constructor",We=e,r=t.freeze,Ge=(t.seal,t.keys),i=String[o],He=i[qe],Xe=i[je],Ye=(i.startsWith,Date[o][ze]),i=Array.isArray,Je=A[Me],Ze=L[Me],$e=Ze.call(t),Qe=/-([a-z])/g,en=/([^\w\d_$])/g,nn=/^(\d+[\w\d_$])/,tn=Object.getPrototypeOf;function F(e){return e===undefined||typeof e===_}function k(e){return null===e||F(e)}function rn(e){return!k(e)}function g(e){return!(!e||typeof e!==w)}function d(e){return!(!e||typeof e!==b)}function on(e){var n=e;return e&&m(e)?(n=(n=e.replace(Qe,function(e,n){return n.toUpperCase()})).replace(en,"_")).replace(nn,function(e,n){return"_"+n}):n}function D(e,n){if(e)for(var t in e)L.call(e,t)&&n.call(e,t,e[t])}function P(e,n){return!(!e||!n||!~e.indexOf(n))}var B=i||function(e){return!(!e||"[object Array]"!==Je.call(e))};function an(e){return!(!e||"[object Error]"!==Je.call(e))}function m(e){return"string"==typeof e}function sn(e){return"number"==typeof e}function un(e){return"boolean"==typeof e}function cn(e){return e&&"object"==typeof e&&(!(e=(tn||function(e){if(e){if(tn)return tn(e);e=e.__proto__||e[o]||e[Ve];if(e)return e}return null})(e))||typeof(e=e[Ve]&&L.call(e,Ve)?e[Ve]:e)===b&&Ze.call(e)===$e)}function ln(e){if(e){if(Ye)return e[ze]();var n;return e&&e.getUTCFullYear?(n=function(e){e=""+e;return 1===e.length?"0"+e:e},e.getUTCFullYear()+"-"+n(1+e.getUTCMonth())+"-"+n(e.getUTCDate())+"T"+n(e.getUTCHours())+":"+n(e.getUTCMinutes())+":"+n(e.getUTCSeconds())+"."+(e.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"):void 0}}function O(e,n,t){var r=e.length;try{for(var i=0;i<r&&!(i in e&&-1===n.call(t||e,e[i],i,e));i++);}catch(o){}}function fn(e,n,t){if(e){if(e[Ke])return e[Ke](n,t);var r=e.length,t=t||0;try{for(var i=Math.max(0<=t?t:r-Math.abs(t),0);i<r;i++)if(i in e&&e[i]===n)return i}catch(o){}}return-1}function dn(e,n,t){if(e){if(e.map)return e.map(n,t);var r=e.length,i=t||e,o=Array(r);try{for(var a=0;a<r;a++)a in e&&(o[a]=n.call(i,e[a],e))}catch(s){}}return o}function v(e){return e&&(He&&e[qe]?e[qe]():e.replace?e.replace(/^\s+|\s+$/g,""):e)}var gn=!{toString:null}.propertyIsEnumerable("toString"),pn=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];function hn(e){var n=typeof e;if(n===b||n===w&&null!==e||H("objKeys called on non-object"),!gn&&Ge)return Ge(e);var t,r=[];for(t in e)e&&L.call(e,t)&&r.push(t);if(gn)for(var i=pn.length,o=0;o<i;o++)e&&L.call(e,pn[o])&&r.push(pn[o]);return r}function mn(e,n,t,r){if(We)try{var i={enumerable:!0,configurable:!0};return t&&(i.get=t),r&&(i.set=r),We(e,n,i),!0}catch(o){}return!1}var vn=r||function(e){return e};function yn(){var e=Date;return e.now?e.now():(new e).getTime()}function U(e){return an(e)?e.name:M}function z(e,n,t,r,i){var o=t;!e||(o=e[n])===t||i&&!i(o)||r&&!r(t)||(e[n]=o=t)}function In(e){return!e}function Cn(e){return!!e}function j(e){throw Error(e)}function Sn(e){var t={};return D(e,function(e,n){t[e]=n,F(t[n])||j("Value: ["+n+"] already exists for "+e),t[n]=e}),vn(t)}function xn(e){return e&&E?t(E({},e)):e}var Tn="window",bn="navigator",wn="location",_n="console",Nn="JSON",An="crypto",En="msCrypto",Rn="msie",Ln="trident/",Fn="XMLHttpRequest",Mn=null,kn=null,Dn=null,Pn=null;function Bn(e,n){var t,r=!1;if(e){try{(r=n in e)||(t=e[o])&&(r=n in t)}catch(i){}if(!r)try{r=!F((new e)[n])}catch(i){}}return r}function y(e){var n=G();return n&&n[e]?n[e]:e===Tn&&On()?window:null}function On(){return typeof window===w&&window}function Un(){return On()?window:y(Tn)}function zn(){return typeof document===w&&document?document:y("document")}function jn(){return!(typeof navigator!==w||!navigator)}function Kn(){return jn()?navigator:y(bn)}function qn(){return typeof JSON===w&&JSON||null!==y(Nn)}function Vn(){return qn()?JSON||y(Nn):null}function Wn(){var e=Kn();return!e||e.userAgent===kn&&null!==Mn||(e=((kn=e.userAgent)||M).toLowerCase(),Mn=P(e,Rn)||P(e,Ln)),Mn}function K(e){var n=Object[o].toString.call(e),t=M;return"[object Error]"===n?t="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":qn()&&(t=Vn().stringify(e)),n+t}function Gn(){return Pn=null===Pn?jn()&&!!Kn().sendBeacon:Pn}function Hn(e){var n=!1;try{var n=!!y("fetch"),t=y("Request");n&&e&&t&&(n=Bn(t,"keepalive"))}catch(r){}return n}function Xn(){return Dn=null===Dn&&(Dn=typeof XDomainRequest!==_)&&Yn()?Dn&&!Bn(y(Fn),"withCredentials"):Dn}function Yn(){var e=!1;try{e=!!y(Fn)}catch(n){}return e}var Jn,Zn=["eventsSent","eventsDiscarded","eventsSendRequest","perfEvent"],$n=null;function Qn(e){var n=$n;return(n=n||!0===e.disableDbgExt?n:$n||(e=y("Microsoft"),$n=e?e.ApplicationInsights:$n))?n.ChromeDbgExt:null}function et(e){return e?'"'+e.replace(/\"/g,M)+'"':M}function nt(e,n){var t,r=typeof console!==_?console:y(_n);r&&(t="log",d(r[t=r[e]?e:t])&&r[t](n))}rt.dataType="MessageData";var tt=rt;function rt(e,n,t,r){void 0===t&&(t=!1),this.messageId=e,this.message=(t?"AI: ":"AI (Internal): ")+e;t=M,qn()&&(t=Vn().stringify(r)),e=(n?" message:"+et(n):M)+(r?" props:"+et(t):M);this.message+=e}function it(e,n){return(e||{}).logger||new ot(n)}var ot=function Wo(r){this.identifier="DiagnosticLogger",this.queue=[];var i=0,s={};h(Wo,this,function(o){function e(e,n){e=r[e];return k(e)?n:e}function a(e,n){var t=Qn(r);t&&t.diagLog&&t.diagLog(e,n)}k(r)&&(r={}),o.consoleLoggingLevel=function(){return e("loggingLevelConsole",0)},o.telemetryLoggingLevel=function(){return e("loggingLevelTelemetry",1)},o.maxInternalMessageLimit=function(){return e("maxMessageLimit",25)},o.enableDebugExceptions=function(){return e("enableDebugExceptions",!1)},o.throwInternal=function(e,n,t,r,i){n=new tt(n,t,i=void 0!==i&&i,r);if(o.enableDebugExceptions())throw n;t=1===e?"errorToConsole":"warnToConsole";F(n.message)?a("throw"+(1===e?"Critical":"Warning"),n):(r=o.consoleLoggingLevel(),i?(i=+n.messageId,!s[i]&&e<=r&&(o[t](n.message),s[i]=!0)):e<=r&&o[t](n.message),o.logInternalMessage(e,n))},o.warnToConsole=function(e){nt("warn",e),a("warning",e)},o.errorToConsole=function(e){nt("error",e),a("error",e)},o.resetInternalMessageCount=function(){i=0,s={}},o.logInternalMessage=function(e,n){var t,r;i>=o.maxInternalMessageLimit()||(r=!0,t="AITR_"+n.messageId,s[t]?r=!1:s[t]=!0,r&&(e<=o.telemetryLoggingLevel()&&(o.queue.push(n),i++,a(1===e?"error":"warn",n)),i===o.maxInternalMessageLimit()&&(r=new tt(23,t="Internal events throttle limit per PageView reached for this app.",!1),o.queue.push(r),1===e?o.errorToConsole(t):o.warnToConsole(t))))}})},at=(st.ParentContextKey="parent",st.ChildrenContextKey="childEvts",st);function st(e,i,n){var t,o=this,a=!1;o.start=yn(),o.name=e,o.isAsync=n,o.isChildEvt=function(){return!1},d(i)&&(a=mn(o,"payload",function(){return!t&&d(i)&&(t=i(),i=null),t})),o.getCtx=function(e){return e?(e===st.ParentContextKey||e===st.ChildrenContextKey?o:o.ctx||{})[e]:null},o.setCtx=function(e,n){e&&(e===st.ParentContextKey?(o[e]||(o.isChildEvt=function(){return!0}),o[e]=n):e===st.ChildrenContextKey?o[e]=n:(o.ctx=o.ctx||{})[e]=n)},o.complete=function(){var e=0,n=o.getCtx(st.ChildrenContextKey);if(B(n))for(var t=0;t<n.length;t++){var r=n[t];r&&(e+=r.time)}o.time=yn()-o.start,o.exTime=o.time-e,o.complete=function(){},!a&&d(i)&&(o.payload=i())}}var ut=function Go(n){this.ctx={},h(Go,this,function(t){t.create=function(e,n,t){return new at(e,n,t)},t.fire=function(e){e&&(e.complete(),n&&d(n.perfEvent)&&n.perfEvent(e))},t.setCtx=function(e,n){e&&((t.ctx=t.ctx||{})[e]=n)},t.getCtx=function(e){return(t.ctx||{})[e]}})},ct="CoreUtils.doPerf";function lt(e,n,t,r,i){if(e)if(e=d(e.getPerfMgr)?e.getPerfMgr():e){var o,a=void 0,s=e.getCtx(ct);try{if(a=e.create(n(),r,i))return s&&a.setCtx&&(a.setCtx(at.ParentContextKey,s),s.getCtx&&s.setCtx&&((o=s.getCtx(at.ChildrenContextKey))||(o=[],s.setCtx(at.ChildrenContextKey,o)),o.push(a))),e.setCtx(ct,a),t(a)}catch(u){a&&a.setCtx&&a.setCtx("exception",u)}finally{a&&e.fire(a),e.setCtx(ct,s)}}t()}var ft=4294967296,dt=4294967295,gt=!1,pt=123456789,ht=987654321;function mt(e){e<0&&(e>>>=0),pt=123456789+e&dt,ht=987654321-e&dt,gt=!0}function vt(){try{var e=2147483647&yn();mt((Math.random()*ft^e)+e)}catch(n){}}function yt(e){return 0<e?Math.floor(It()/dt*(e+1))>>>0:0}function It(e){var n=0,t=y(An)||y(En);return 0===(n=t&&t.getRandomValues?t.getRandomValues(new Uint32Array(1))[0]&dt:n)&&Wn()&&(gt||vt(),n=Ct()&dt),0===n&&(n=Math.floor(ft*Math.random()|0)),e||(n>>>=0),n}function Ct(e){var n=((ht=36969*(65535&ht)+(ht>>16)&dt)<<16)+(65535&(pt=18e3*(65535&pt)+(pt>>16)&dt))>>>0&dt|0;return e||(n>>>=0),n}function St(e){void 0===e&&(e=22);for(var n=It()>>>0,t=0,r=M;r.length<e;)r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[0|63&n]||"",n>>>=6,5==++t&&(n=(It()<<2&4294967295|3&n)>>>0,t=0);return r}var xt=e,Tt="2.7.3",bt="."+St(6),wt=0;function _t(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType}function Nt(e,n){return on(e+wt+++((n=void 0!==n&&n)?"."+Tt:"")+bt)}function At(e){var o={id:Nt("_aiData-"+(e||"")+"."+Tt),accept:_t,get:function(e,n,t,r){var i=e[o.id];return i?i[on(n)]:(r&&((i=function(e,n){var t=n[e.id];if(!t){t={};try{_t(n)&&!function(e,n,t){if(xt)try{return xt(e,n,{value:t,enumerable:!1,configurable:!0}),1}catch(r){}}(n,e.id,t)&&(n[e.id]=t)}catch(r){}}return t}(o,e))[on(n)]=t),t)},kill:function(e,n){if(e&&e[n])try{delete e[n]}catch(t){}}};return o}var Et=At("plugin");function Rt(e){return Et.get(e,"state",{},!0)}function Lt(t,r){for(var i,e=[],n=null,o=t.getNext();o;){var a=o.getPlugin();a&&(n&&d(n[be])&&d(a[xe])&&n[be](a),(d(a[we])?a[we]():(i=Rt(a))[we])||e.push(a),n=a,o=o.getNext())}O(e,function(e){var n=t.core();e.initialize(t.getCfg(),n,r,t.getNext()),i=Rt(e),e[Ne]||i[Ne]||(i[Ne]=n),i[we]=!0,delete i[_e]})}function Ft(e){return e.sort(function(e,n){var t=0,r=d(n[xe]);return d(e[xe])?t=r?e[Te]-n[Te]:1:r&&(t=-1),t})}var Mt="TelemetryPluginChain",kt="_hasRun",Dt="_getTelCtx",Pt=0;function Bt(e,a,t,n){var r=n?function(e,n,t,r){for(;e;){if(e.getPlugin()===r)return e;e=e.getNext()}return Ut([r],n,t)}(e,a,t,n):e,i=[],o={_next:function(){var e,n=r;return r=n?n.getNext():null,n||(e=i)&&0<e.length&&(O(e,function(e){try{e.func.call(e.self,e.args)}catch(n){t.logger.throwInternal(2,73,"Unexpected Exception during onComplete - "+K(n))}}),i=[]),n},ctx:{core:function(){return t},diagLog:function(){return it(t,a)},getCfg:function(){return a},getExtCfg:s,getConfig:function(e,n,t){void 0===t&&(t=!1);var r,e=s(e,null);return e&&!k(e[n])?r=e[n]:a&&!k(a[n])&&(r=a[n]),k(r)?t:r},hasNext:function(){return!!r},getNext:function(){return r},setNext:function(e){r=e},iterate:function(e){for(;n=o._next();){var n=n.getPlugin();n&&e(n)}},onComplete:function(e,n){for(var t=[],r=2;r<arguments.length;r++)t[r-2]=arguments[r];e&&i.push({func:e,self:F(n)?o.ctx:n,args:t})}}};function s(e,n,t){var r,i,o;return void 0===n&&(n={}),void 0===t&&(t=0),(r=a&&(i=a.extensionConfig)&&e?i[e]:r)?g(n)&&0!==t&&(o=function d(){var e=arguments,n=e[0]||{},t=e.length,r=!1,i=1;for(0<t&&un(n)&&(r=n,n=e[i]||{},i++),g(n)||(n={});i<t;i++){var o,a,s,u,c=e[i],l=B(c),f=g(c);for(o in c)(l&&o in c||f&&L.call(c,o))&&(a=c[o],s=void 0,r&&a&&((s=B(a))||cn(a))&&(u=n[o],s?B(u)||(u=[]):cn(u)||(u={}),a=d(r,u,a)),a!==undefined&&(n[o]=a))}return n}(!0,n,r),a&&2===t&&D(n,function(e){var n;k(o[e])&&!k(n=a[e])&&(o[e]=n)})):r=n,r}return o}function Ot(e,t,r,n){var i=Bt(e,t,r,n),o=i.ctx;return o.processNext=function(e){var n=i._next();return n&&n.processTelemetry(e,o),!n},o.createNew=function(e,n){return Ot((e=B(e=void 0===e?null:e)?Ut(e,t,r,n):e)||o.getNext(),t,r,n)},o}function Ut(e,n,t,r){var i,o=null,a=!r;return B(e)&&0<e.length&&(i=null,O(e,function(e){(a=!a&&r===e||a)&&e&&d(e.processTelemetry)&&(e=zt(e,n,t),o=o||e,i&&i._setNext(e),i=e)})),r&&!o?Ut([r],n,t):o}function zt(u,r,i){var c=null,o=d(u.processTelemetry),a=d(u.setNextPlugin),l=u?u.identifier+"-"+u.priority+"-"+Pt++:"Unknown-0-"+Pt++,s={getPlugin:function(){return u},getNext:function(){return c},processTelemetry:function(t,e){var n;f(e=e||(n=(n=u&&d(u[Dt])?u[Dt]():n)||Ot(s,r,i)),function(e){if(!u||!o)return!1;var n=Rt(u);return!n[_e]&&!n[Ae]&&(a&&u.setNextPlugin(c),u.processTelemetry(t,e),!0)},"processTelemetry",function(){return{item:t}},!t.sync)||e.processNext(t)},unload:function(r,i){f(r,function(){var e,n,t=!1;return u&&(e=Rt(u),n=u[Ne]||e.core,!u||n&&n!==r[Ne]()||e[_e]||(e[Ne]=null,e[_e]=!0,e[we]=!1,u[_e]&&!0===u[_e](r,i)&&(t=!0))),t},"unload",function(){},i.isAsync)||r.processNext(i)},_id:l,_setNext:function(e){c=e}};function f(t,r,i,e,n){var o=!1,a=u?u.identifier:Mt,s=(s=t[kt])||(t[kt]={});return t.setNext(c),u&&lt(t[Ne](),function(){return a+":"+i},function(){s[l]=!0;try{var e=c?c._id:M;e&&(s[e]=!1),o=r(t)}catch(n){e=!c||s[c._id];e&&(o=!0),c&&e||t.diagLog().throwInternal(1,73,"Plugin ["+u.identifier+"] failed during "+i+" - "+K(n)+", run flags: "+K(s))}},e,n),o}return vn(s)}var jt="toGMTString",Kt="toUTCString",qt="cookie",Vt="expires",Wt="enabled",Gt="isCookieUseDisabled",Ht="disableCookiesUsage",Xt="_ckMgr",Yt=null,Jt=null,Zt=null,$t=zn(),Qt={},er={};function nr(e){return!e||e.isEnabled()}function tr(e,i){z(t=(e=e||er).cookieCfg=e.cookieCfg||{},"domain",e.cookieDomain,rn,k),z(t,"path",e.cookiePath||"/",null,k),k(t[Wt])&&(n=void 0,F(e[Gt])||(n=!e[Gt]),F(e[Ht])||(n=!e[Ht]),t[Wt]=n);var n,t,c=t,l=c.path||"/",f=c.domain,r=!1!==c[Wt],d={isEnabled:function(){var e=r&&rr(i),n=er[Xt];return e&&n&&d!==n?nr(n):e},setEnabled:function(e){r=!1!==e},set:function(e,n,t,r,i){var o,a,s,u=!1;return nr(d)&&(o={},-1!=(s=(a=v(n||M)).indexOf(";"))&&(a=v(n.substring(0,s)),o=ir(n.substring(1+s))),z(o,"domain",r||f,Cn,F),k(t)||(s=Wn(),F(o[Vt])&&0<(n=yn()+1e3*t)&&((r=new Date).setTime(n),z(o,Vt,or(r,s?jt:Kt)||or(r,s?jt:Kt)||M,Cn)),s||z(o,"max-age",M+t,null,F)),(n=typeof location===w&&location?location:y(wn))&&"https:"===n.protocol&&(z(o,"secure",null,null,F),(Jt=null===Jt?!(m(r=(Kn()||{}).userAgent)&&(P(r,"CPU iPhone OS 12")||P(r,"iPad; CPU OS 12")||P(r,"Macintosh; Intel Mac OS X 10_14")&&P(r,"Version/")&&P(r,"Safari")||P(r,"Macintosh; Intel Mac OS X 10_14")&&function(e,n){var t=!1;if(!e||(t=e===n))return t;if(Xe)return e[je](n);var r=e,i=n,t=!1,e=r?r.length:0;if(e&&40<=e&&!(t=r===i)){for(var o=e-1,a=39;0<=a;a--){if(r[o]!=i[a])return;o--}t=!0}return t}(r,"AppleWebKit/605.1.15 (KHTML, like Gecko)")||P(r,"Chrome/5")||P(r,"Chrome/6")||P(r,"UnrealEngine")&&!P(r,"Chrome")||P(r,"UCBrowser/12")||P(r,"UCBrowser/11"))):Jt)&&z(o,"SameSite","None",null,F)),z(o,"path",i||l,null,F),(c.setCookie||sr)(e,ar(a,o)),u=!0),u},get:function(e){var n=M;return nr(d)?(c.getCookie||function(e){var n,t=M;return $t&&(n=$t[qt]||M,Zt!==n&&(Qt=ir(n),Zt=n),t=v(Qt[e]||M)),t})(e):n},del:function(e,n){return!!nr(d)&&d.purge(e,n)},purge:function(e,n){var t,r=!1;return rr(i)&&((t={}).path=n||"/",t[Vt]="Thu, 01 Jan 1970 00:00:01 GMT",n=t,Wn()||(n["max-age"]="0"),(c.delCookie||sr)(e,ar(M,n)),r=!0),r}};return d[Xt]=d}function rr(e){if(null===Yt){Yt=!1;try{Yt=($t||{})[qt]!==undefined}catch(n){e&&e.throwInternal(2,68,"Cannot access document.cookie - "+U(n),{exception:K(n)})}}return Yt}function ir(e){var t={};return e&&e.length&&O(v(e).split(";"),function(e){var n;(e=v(e||M))&&(-1==(n=e.indexOf("="))?t[e]=null:t[v(e.substring(0,n))]=v(e.substring(1+n)))}),t}function or(e,n){return d(e[n])?e[n]():null}function ar(e,n){var t=e||M;return D(n,function(e,n){t+="; "+e+(k(n)?M:"="+n)}),t}function sr(e,n){$t&&($t[qt]=e+"="+n)}var ur="extensionConfig",cr=500,lr="Channel has invalid priority - ";function fr(e,n,t,r){n&&B(n)&&0<n.length&&(O(n=n.sort(function(e,n){return e.priority-n.priority}),function(e){e.priority<cr&&j(lr+e.identifier)}),e.push({queue:vn(n),chain:Ut(n,t,r)}))}var dr,gr="getPlugin",Me=function Ho(){var o,a,c,l,s=this;function n(e){var n,e=e=void 0===e?null:e;return e||(n=a||Ot(null,{},s.core),e=c&&c[gr]?n.createNew(null,c[gr]):n.createNew(null,c)),e}function f(){o=!1,s.core=null,c=a=null,l=[]}f(),h(Ho,s,function(u){u.initialize=function(e,n,t,r){e&&z(e,ur,[],null,k),!r&&n&&(r=n.getProcessTelContext().getNext());var i=c;c&&c[gr]&&(i=c[gr]()),s.core=n,a=Ot(r,e,n,i),o=!0},u.teardown=function(e,n){var t,r,i,o;if(u.core&&(!e||u.core===e.core()))return r=!1,i=e||function s(e,t,r,n){var i=Bt(e,t,r,n),o=i.ctx;return o.processNext=function(e){var n=i._next();return n&&n.unload(o,e),!n},o.createNew=function(e,n){return s((e=B(e=void 0===e?null:e)?Ut(e,t,r,n):e)||o.getNext(),t,r,n)},o}(null,{},u.core,c&&c[gr]?c[gr]():c),o=n||{reason:0,isAsync:!1},u[Ee]&&!0===u[Ee](i,o,a)?t=!0:a(),t;function a(){r||(r=!0,O(l,function(e){e.rm()}),l=[],!0===t&&i.processNext(o),f())}},u._addHook=function(e){e&&(B(e)?l=l.concat(e):l.push(e))}}),s.diagLog=function(e){return n(e).diagLog()},s[we]=function(){return o},s.setInitialized=function(e){o=e},s[be]=function(e){c=e},s.processNext=function(e,n){n?n.processNext(e):c&&d(c.processTelemetry)&&c.processTelemetry(e,null)},s._getTelCtx=n},pr=(n(hr,dr=Me),hr);function hr(){var n,u,e=dr.call(this)||this;function t(){n=0,u=[]}return e.identifier="TelemetryInitializerPlugin",e.priority=199,t(),h(hr,e,function(s,e){s.addTelemetryInitializer=function(e){var t={id:n++,fn:e};return u.push(t),{remove:function(){O(u,function(e,n){if(e.id===t.id)return u.splice(n,1),-1})}}},s.processTelemetry=function(e,n){for(var t=!1,r=u.length,i=0;i<r;++i){var o=u[i];if(o)try{if(!1===o.fn.call(null,e)){t=!0;break}}catch(a){n.diagLog().throwInternal(1,64,"One of telemetry initializers failed, telemetry item will not be sent: "+U(a),{exception:K(a)},!0)}}t||s.processNext(e,n)},s[Ee]=function(){t()}}),e}var mr="_notificationManager";function vr(e,n){return new ut(n)}function yr(e,t,r,i){O(e,function(e){if(e&&e[t])if(r)setTimeout(function(){return i(e)},0);else try{i(e)}catch(n){}})}var Ir,Cr=function Xo(e){this.listeners=[];var t=!!(e||{}).perfEvtsSendAll;h(Xo,this,function(r){r[ke]=function(e){r.listeners.push(e)},r[De]=function(e){for(var n=fn(r.listeners,e);-1<n;)r.listeners.splice(n,1),n=fn(r.listeners,e)},r[Pe]=function(n){yr(r.listeners,Pe,!0,function(e){e[Pe](n)})},r[Be]=function(n,t){yr(r.listeners,Be,!0,function(e){e[Be](n,t)})},r[Oe]=function(n,t){yr(r.listeners,Oe,t,function(e){e[Oe](n,t)})},r[Ue]=function(n){!n||!t&&n.isChildEvt()||yr(r.listeners,Ue,!1,function(e){n.isAsync?setTimeout(function(){return e[Ue](n)},0):e[Ue](n)})}})},Sr=(n(xr,Ir=function Yo(){var x,t,T,r,b,i,w,_,N,A,E,R,u,c,l,L,f=0;h(Yo,this,function(C){var o,a,e,s;function S(){return Ot((w||(~(e=(N||[]).slice()).indexOf(u)||e.push(u),w=Ut(Ft(e),C.config,C)),w),C.config,C);var e}function n(){var e=C.logger?C.logger.queue:[];e&&(O(e,function(e){e={name:c||"InternalMessageId: "+e.messageId,iKey:C.config.instrumentationKey,time:ln(new Date),baseType:tt.dataType,baseData:{message:e.message}};C.track(e)}),e.length=0)}x=!1,C.logger=new ot({loggingLevelConsole:1}),C.config=null,C._extensions=[],u=new pr,t=[],c=R=A=_=N=w=i=b=r=T=null,l=Nt("AIBaseCore",!0),C.isInitialized=function(){return x},C.initialize=function(e,n,t,r){C.isInitialized()&&j("Core should not be initialized more than once"),e&&!k(e.instrumentationKey)||j("Please provide instrumentation key"),T=r,C[mr]=r,C.config=e||{};var i,o,a,s,u,c,l,f,d,g,p,h,m=e,m=(!0===m.disableDbgExt&&L&&(T[De](L),L=null),T&&!L&&!0!==m.disableDbgExt&&(L=function(e){if(!Jn){Jn={};for(var n=0;n<Zn.length;n++)Jn[Zn[n]]=function(n,t){return function(){var e=Qn(t);e&&(e=e.listener)&&e[n]&&e[n].apply(e,arguments)}}(Zn[n],e)}return Jn}(m),T[ke](L)),e),m=(!m.enablePerfMgr&&b&&(b=null),m.enablePerfMgr&&z(C.config,"createPerfMgr",vr),e.extensions=k(e.extensions)?[]:e.extensions,e?!(v=e[ur])&&k(v)&&(v=F(a)?{}:a,e[ur]=v):v=F(a)?{}:a,v.NotificationManager=r,t&&(C.logger=t),(_=[]).push.apply(_,Z(Z([],n),e.extensions)),E=(e||{}).channels,e),v=(i=C.logger,o=cr,s=[],u={},O(a=_,function(e){(k(e)||k(e.initialize))&&j("Plugins must provide initialize method");var n=e.priority,t=e.identifier;e&&n&&(k(u[n])?u[n]=t:i.warnToConsole("Two extensions have same priority #"+n+" - "+u[n]+", "+t)),(!n||n<o)&&s.push(e)}),{all:a,core:s}),r=(N=v.core,w=null,v.all);function y(){return Ot(null,l.config,l,null)}function I(e,n,t,r){var i=e?e.length+1:1;function o(){0==--i&&(r&&r(),r=null)}0<i&&O(e,function(e){e&&0<e.queue.length?(e=e.chain,(e=n.createNew(e)).onComplete(o),t(e)):i--}),o()}R=vn((t=r,d=m,g=C,h=[],E&&O(E,function(e){return fr(h,e,d,g)}),t&&(p=[],O(t,function(e){e.priority>cr&&p.push(e)}),fr(h,p,d,g)),h)),A?(-1!=(n=r.indexOf(A))&&r.splice(n,1),-1!=(n=N.indexOf(A))&&N.splice(n,1),A._setQueue(R)):(c=R,l=C,f=!1,(e={identifier:"ChannelControllerPlugin",priority:cr,initialize:function(n,t,r,e){f=!0,O(c,function(e){e&&0<e.queue.length&&Lt(Ot(e.chain,n,t),r)})},isInitialized:function(){return f},processTelemetry:function(n,e){I(c,e||y(),function(e){e[Re](n)},function(){e[Re](n)})}})[Fe]=function(){I(c,y(),function(e){e.iterate(function(e){e[Fe]&&e[Fe]()})},null)},e[Le]=function(){I(c,y(),function(e){e.iterate(function(e){e[Le]&&e[Le]()})},null)},e[_e]=function(e,n){var t=n||{reason:0,isAsync:!1};return I(c,e,function(e){e[Re](t)},function(){e[Re](t),f=!1}),!0},e.getChannel=function(n){var t=null;return c&&0<c.length&&O(c,function(e){if(e&&0<e.queue.length&&(O(e.queue,function(e){if(e.identifier===n)return t=e,-1}),t))return-1}),t},e.flush=function(t,e,r,i){var o=1,n=!1,a=null;function s(){o--,n&&0===o&&(a&&(clearTimeout(a),a=null),e&&e(n),e=null)}i=i||5e3,I(c,y(),function(e){e.iterate(function(e){var n;e.flush&&(o++,n=!1,e.flush(t,function(){n=!0,s()},r)||n||(t&&null==a?a=setTimeout(function(){a=null,s()},i):s()))})},function(){n=!0,s()})},e._setQueue=function(e){c=e},A=e),r.push(A),N.push(A),C._extensions=Ft(r),A.initialize(m,C,r),Lt(S(),r),C._extensions=vn(Ft(N||[])).slice(),0===C.getTransmissionControls().length&&j("No channels available"),x=!0,C.releaseQueue()},C.getTransmissionControls=function(){var n=[];return O(R,function(e){n.push(e.queue)}),vn(n)},C.track=function(e){z(e,"iKey",C.config.instrumentationKey,null,In),z(e,"time",ln(new Date),null,In),z(e,"ver","4.0",null,k),C.isInitialized()?S().processNext(e):t.push(e)},C.getProcessTelContext=S,C.getNotifyMgr=function(){var e;return T||(T=X(((e={})[ke]=function(e){},e[De]=function(e){},e[Pe]=function(e){},e[Be]=function(e,n){},e[Oe]=function(e,n){},e)),C[mr]=T),T},C.addNotificationListener=function(e){T&&T.addNotificationListener(e)},C.removeNotificationListener=function(e){T&&T.removeNotificationListener(e)},C.getCookieMgr=function(){return i=i||tr(C.config,C.logger)},C.setCookieMgr=function(e){i=e},C.getPerfMgr=function(){return r||b||C.config&&C.config.enablePerfMgr&&d(C.config.createPerfMgr)&&(b=C.config.createPerfMgr(C,C.getNotifyMgr())),r||b||null},C.setPerfMgr=function(e){r=e},C.eventCnt=function(){return t.length},C.releaseQueue=function(){var e;x&&0<t.length&&(e=t,t=[],O(e,function(e){S().processNext(e)}))},C.pollInternalLogs=function(e){c=e;e=C.config.diagnosticLogInterval;return e&&0<e||(e=1e4),f&&clearInterval(f),f=setInterval(function(){n()},e)},C.stopPollingInternalLogs=function(){f&&(clearInterval(f),f=0,n())},a=function(){return u},e=["addTelemetryInitializer"],void 0===s&&(s=!0),(o=C)&&a&&g(o)&&B(e)&&O(e,function(e){var n,t,r,i;m(e)&&(void 0===(n=s)&&(n=!0),o&&e&&a&&(n||F(o[e]))&&(o[e]=(t=e,i=r=null,d(n=a)?r=n:i=n,function(){var e=arguments;if(i=r?r():i)return i[t].apply(i,e)})))}),C.getPlugin=function(n){var t=null;return O(C._extensions,function(e){if(e.identifier===n&&e!==A&&e!==u)return t=e,-1}),(t=!t&&A?A.getChannel(n):t)?{plugin:t,setEnabled:function(e){Rt(t)[Ae]=!e},isEnabled:function(){var e=Rt(t);return!e[_e]&&!e[Ae]}}:null},C.evtNamespace=function(){return l}})}),xr);function xr(){var e=Ir.call(this)||this;return h(xr,e,function(t,i){function n(e){var n=t.getNotifyMgr();n&&n.eventsDiscarded([e],2)}t.initialize=function(e,n,t,r){i.initialize(e,n,t||new ot(e),r||new Cr(e))},t.track=function(e){lt(t.getPerfMgr(),function(){return"AppInsightsCore:track"},function(){if(null===e&&(n(e),j("Invalid telemetry item")),k(e.name))throw n(e),Error("telemetry name required");i.track(e)},function(){return{item:e}},!e.sync)}}),e}var Tr="on",br="attachEvent",wr="addEventListener",_r="events",Nr=(Nt("aiEvtPageHide"),Nt("aiEvtPageShow"),1),Ar=At("events"),Er=/^([^.]*)(?:\.(.+)|)/;function Rr(e){return e&&e.replace?e.replace(/^\s*\.*|\.*\s*$/g,""):e}function Lr(e,n,t,r,i){void 0===i&&(i=!1);var o,a,s,u,c,l,f,d,g=!1;if(e)try{c=n,(l=r)&&(f="",B(l)?(f="",O(l,function(e){(e=Rr(e))&&("."!==e[0]&&(e="."+e),f+=e)})):f=Rr(l),f&&(c=(c||"")+(f="."!==f[0]?"."+f:f)));var p,h={type:(d=Er.exec(c)||[])[1],ns:(d[2]||"").split(".").sort().join(".")},m=h,v=t,y=i,I=!1;(u=e)&&m&&m.type&&v&&(u[wr]?(u[wr](m.type,v,y),I=!0):u[br]&&(u[br](Tr+m.type,v),I=!0)),(g=I)&&Ar.accept(e)&&(p={guid:Nr++,evtName:h,handler:t,capture:i},o=h.type,((s=Ar.get(e,_r,{},a=void 0===a||a))[o]||(s[o]=[])).push(p))}catch(C){}return g}function Fr(e,n,t,r){return Lr(e,n,t,null,r=void 0!==r&&r)}var Mr,kr=null,Dr={_canUseCookies:undefined,isTypeof:function(e,n){return typeof e===n},isUndefined:F,isNullOrUndefined:k,hasOwnProperty:function(e,n){return!(!e||!L.call(e,n))},isFunction:d,isObject:g,isDate:function(e){return!(!e||"[object Date]"!==Je.call(e))},isArray:B,isError:an,isString:m,isNumber:sn,isBoolean:un,toISOString:ln,arrForEach:O,arrIndexOf:fn,arrMap:dn,arrReduce:function(e,n,t){var r;if(e){if(e.reduce)return e.reduce(n,t);var i=e.length,o=0;if(3<=arguments.length)r=t;else{for(;o<i&&!(o in e);)o++;r=e[o++]}for(;o<i;)o in e&&(r=n(r,e[o],o,e)),o++}return r},strTrim:v,objCreate:X,objKeys:hn,objDefineAccessors:mn,addEventHandler:function(e,n,t){var r=!1,i=Un(),i=(i&&(r=Lr(i,e,n,t),r=Lr(i.body,e,n,t)||r),zn());return i&&Lr(i,e,n,t)||r},dateNow:yn,isIE:Wn,disableCookies:function(){var e,n;(e=tr[Xt]||er[Xt])||(e=tr[Xt]=tr(void 0,void 0),er[Xt]=e),e=e,n=Dr._canUseCookies,null===kr&&(kr=[],Mr=n,mn(Dr,"_canUseCookies",function(){return Mr},function(n){Mr=n,O(kr,function(e){e.setEnabled(n)})})),-1===fn(kr,e)&&kr.push(e),un(n)&&e.setEnabled(n),un(Mr)&&e.setEnabled(Mr),e.setEnabled(!1)},newGuid:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(Pr,function(e){var n=0|yt(15);return("x"===e?n:3&n|8).toString(16)})},perfNow:function(){var e=y("performance");return e&&e.now?e.now():yn()},newId:St,randomValue:yt,random32:It,mwcRandomSeed:function(e){e?mt(e):vt()},mwcRandom32:Ct,generateW3CId:function(){for(var e,n=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],t=M,r=0;r<4;r++)t+=n[15&(e=It())]+n[e>>4&15]+n[e>>8&15]+n[e>>12&15]+n[e>>16&15]+n[e>>20&15]+n[e>>24&15]+n[e>>28&15];var i=n[8+(3&It())|0];return t.substr(0,8)+t.substr(9,4)+"4"+t.substr(13,3)+i+t.substr(16,3)+t.substr(19,12)}},Pr=/[xy]/g,q=Sn({CRITICAL:1,WARNING:2}),V=Sn({BrowserDoesNotSupportLocalStorage:0,BrowserCannotReadLocalStorage:1,BrowserCannotReadSessionStorage:2,BrowserCannotWriteLocalStorage:3,BrowserCannotWriteSessionStorage:4,BrowserFailedRemovalFromLocalStorage:5,BrowserFailedRemovalFromSessionStorage:6,CannotSendEmptyTelemetry:7,ClientPerformanceMathError:8,ErrorParsingAISessionCookie:9,ErrorPVCalc:10,ExceptionWhileLoggingError:11,FailedAddingTelemetryToBuffer:12,FailedMonitorAjaxAbort:13,FailedMonitorAjaxDur:14,FailedMonitorAjaxOpen:15,FailedMonitorAjaxRSC:16,FailedMonitorAjaxSend:17,FailedMonitorAjaxGetCorrelationHeader:18,FailedToAddHandlerForOnBeforeUnload:19,FailedToSendQueuedTelemetry:20,FailedToReportDataLoss:21,FlushFailed:22,MessageLimitPerPVExceeded:23,MissingRequiredFieldSpecification:24,NavigationTimingNotSupported:25,OnError:26,SessionRenewalDateIsZero:27,SenderNotInitialized:28,StartTrackEventFailed:29,StopTrackEventFailed:30,StartTrackFailed:31,StopTrackFailed:32,TelemetrySampledAndNotSent:33,TrackEventFailed:34,TrackExceptionFailed:35,TrackMetricFailed:36,TrackPVFailed:37,TrackPVFailedCalc:38,TrackTraceFailed:39,TransmissionFailed:40,FailedToSetStorageBuffer:41,FailedToRestoreStorageBuffer:42,InvalidBackendResponse:43,FailedToFixDepricatedValues:44,InvalidDurationValue:45,TelemetryEnvelopeInvalid:46,CreateEnvelopeError:47,CannotSerializeObject:48,CannotSerializeObjectNonSerializable:49,CircularReferenceDetected:50,ClearAuthContextFailed:51,ExceptionTruncated:52,IllegalCharsInName:53,ItemNotInArray:54,MaxAjaxPerPVExceeded:55,MessageTruncated:56,NameTooLong:57,SampleRateOutOfRange:58,SetAuthContextFailed:59,SetAuthContextFailedAccountName:60,StringValueTooLong:61,StartCalledMoreThanOnce:62,StopCalledWithoutStart:63,TelemetryInitializerFailed:64,TrackArgumentsNotSpecified:65,UrlTooLong:66,SessionStorageBufferFull:67,CannotAccessCookie:68,IdTooLong:69,InvalidEvent:70,FailedMonitorAjaxSetRequestHeader:71,SendBrowserInfoOnUserInit:72,PluginException:73,NotificationException:74,SnippetScriptLoadFailure:99,InvalidInstrumentationKey:100,CannotParseAiBlobValue:101,InvalidContentBlob:102,TrackPageActionEventFailed:103,FailedAddingCustomDefinedRequestContext:104,InMemoryStorageBufferFull:105});function Br(e,n,t){var r,i,o=n.length,a=(e=e,(n=n)&&150<(n=v(n.toString())).length&&(i=n.substring(0,150),e&&e.throwInternal(2,V.NameTooLong,"name is too long. It has been truncated to 150 characters.",{name:n},!0)),i||n);if(a.length!==o){for(var s=0,u=a;t[u]!==undefined;)s++,u=a.substring(0,147)+(r=void 0,(r="00"+s).substr(r.length-3));a=u}return a}function I(e,n,t){var r;return void 0===t&&(t=1024),n&&(t=t||1024,(n=v(n)).toString().length>t&&(r=n.toString().substring(0,t),e&&e.throwInternal(2,V.StringValueTooLong,"string value is too long. It has been truncated to "+t+" characters.",{value:n},!0))),r||n}function Or(e,n){return Kr(e,n,2048,V.UrlTooLong)}function Ur(e,n){var t;return n&&32768<n.length&&(t=n.substring(0,32768),e&&e.throwInternal(2,V.MessageTruncated,"message is too long, it has been truncated to 32768 characters.",{message:n},!0)),t||n}function zr(r,e){var i;return e&&(i={},D(e,function(e,n){if(g(n)&&qn())try{n=Vn().stringify(n)}catch(t){r&&r.throwInternal(2,V.CannotSerializeObjectNonSerializable,"custom property is not valid",{exception:t},!0)}n=I(r,n,8192),e=Br(r,e,i),i[e]=n}),e=i),e}function jr(t,e){var r;return e&&(r={},D(e,function(e,n){e=Br(t,e,r),r[e]=n}),e=r),e}function Kr(e,n,t,r){var i;return n&&(n=v(n)).length>t&&(i=n.substring(0,t),e&&e.throwInternal(2,r,"input is too long, it has been truncated to "+t+" characters.",{data:n},!0)),i||n}var qr="";function Vr(e){var n=qr+Math.floor((e=Math.round(e=isNaN(e)||e<0?0:e))/1e3)%60,t=qr+Math.floor(e/6e4)%60,r=qr+Math.floor(e/36e5)%24,i=Math.floor(e/864e5),e=1===(e=qr+e%1e3).length?"00"+e:2===e.length?"0"+e:e,n=n.length<2?"0"+n:n,t=t.length<2?"0"+t:t,r=r.length<2?"0"+r:r;return(0<i?i+".":qr)+r+":"+t+":"+n+"."+e}var Wr="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",Gr="sampleRate",Hr="ProcessLegacy",Xr="http.method",Yr="not_specified",Jr=Sn({LocalStorage:0,SessionStorage:1}),Zr=(Sn({AI:0,AI_AND_W3C:1,W3C:2}),undefined);function $r(e){try{if(k(G()))return null;var n=new Date,t=y(e===Jr.LocalStorage?"localStorage":"sessionStorage"),r=(t.setItem(n.toString(),n.toString()),t.getItem(n.toString())!==n.toString());if(t.removeItem(n.toString()),!r)return t}catch(i){}return null}function Qr(){return ei()?$r(Jr.SessionStorage):null}function ei(){return Zr=Zr===undefined?!!$r(Jr.SessionStorage):Zr}function ni(e,n){var t=Qr();if(null!==t)try{return t.getItem(n)}catch(r){Zr=!1,e.throwInternal(2,V.BrowserCannotReadSessionStorage,"Browser failed read of session storage. "+U(r),{exception:K(r)})}return null}function ti(e,n,t){var r=Qr();if(null!==r)try{r.setItem(n,t)}catch(i){Zr=!1,e.throwInternal(2,V.BrowserCannotWriteSessionStorage,"Browser failed write to session storage. "+U(i),{exception:K(i)})}}var ri=zn()||{},ii=0,oi=[null,null,null,null,null];var ai=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"];function si(e){return~ai.indexOf(e.toLowerCase())}n(ci,ui=function(){});var ui,i=ci;function ci(){return ui.call(this)||this}n(di,li=function(){this.ver=1,this.sampleRate=100,this.tags={}});var li,fi=di;function di(e,n,t){var r=li.call(this)||this;return r.name=I(e,t)||Yr,r.data=n,r.time=ln(new Date),r.aiDataContract={time:1,iKey:1,name:1,sampleRate:function(){return 100===r.sampleRate?4:1},tags:1,data:1},r}var gi,r=function(){this.ver=2,this.properties={},this.measurements={}},pi=(n(hi,gi=r),hi.envelopeType="Microsoft.ApplicationInsights.{0}.Event",hi.dataType="EventData",hi);function hi(e,n,t,r){var i=gi.call(this)||this;return i.aiDataContract={ver:1,name:1,properties:0,measurements:0},i.name=I(e,n)||Yr,i.properties=zr(e,t),i.measurements=jr(e,r),i}var mi="error",u="stack",vi="stackDetails",yi="errorSrc",Ii="message",Ci="description";function Si(e,n){var t=e;return t&&!m(t)&&(JSON&&JSON.stringify?(t=JSON.stringify(e),!n||t&&"{}"!==t||(t=d(e.toString)?e.toString():""+e)):t=e+" - (Missing JSON.stringify)"),t||""}function xi(e,n){var t=e;return e&&((t=t&&!m(t)&&(e[Ii]||e[Ci])||t)&&!m(t)&&(t=Si(t,!0)),e.filename&&(t=t+" @"+(e.filename||"")+":"+(e.lineno||"?")+":"+(e.colno||"?"))),(n&&"String"!==n&&"Object"!==n&&"Error"!==n&&!~(t||"").indexOf(n)?n+": "+t:t)||""}function Ti(e){return e&&e.src&&m(e.src)&&e.obj&&B(e.obj)}function bi(e){var e=e||"",n=(e=m(e)?e:m(e[u])?e[u]:""+e).split("\n");return{src:e,obj:n}}function wi(e){var n,t=null;if(e)try{e[u]?t=bi(e[u]):e[mi]&&e[mi][u]?t=bi(e[mi][u]):e.exception&&e.exception[u]?t=bi(e.exception[u]):Ti(e)?t=e:Ti(e[vi])?t=e[vi]:window&&window.opera&&e[Ii]?t=function(e){for(var n=[],t=e.split("\n"),r=0;r<t.length;r++){var i=t[r];t[r+1]&&(i+="@"+t[r+1],r++),n.push(i)}return{src:e,obj:n}}(e.message):m(e)?t=bi(e):(n=e[Ii]||e[Ci]||"",m(e[yi])&&(n&&(n+="\n"),n+=" from "+e[yi]),n&&(t=bi(n)))}catch(r){t=bi(r)}return t||{src:"",obj:null}}function _i(e){var n="";if(e&&!(n=e.typeName||e.name||""))try{var t=/function (.{1,200})\(/.exec(e.constructor.toString()),n=t&&1<t.length?t[1]:""}catch(r){}return n}function Ni(e){if(e)try{var n,t;if(!m(e))return n=_i(e),(t=Si(e,!1))&&"{}"!==t||(e[mi]&&(n=_i(e=e[mi])),t=Si(e,!0)),t.indexOf(n)&&"String"!==n?n+":"+t:t}catch(r){}return""+(e||"")}n(a,Ai=function(){this.ver=2,this.exceptions=[],this.properties={},this.measurements={}}),a.CreateAutoException=function(e,n,t,r,i,o,a,s){var u=_i(i||o||e);return{message:xi(e,u),url:n,lineNumber:t,columnNumber:r,error:Ni(i||o||e),evt:Ni(o||e),typeName:u,stackDetails:wi(a||i||o),errorSrc:s}},a.CreateFromInterface=function(n,e,t,r){var i=e.exceptions&&dn(e.exceptions,function(e){return Li.CreateFromInterface(n,e)});return new a(n,Y(Y({},e),{exceptions:i}),t,r)},a.prototype.toInterface=function(){var e=this,n=e.exceptions,t=e.properties,r=e.measurements,i=e.severityLevel,o=e.problemGroup,a=e.id,e=e.isManual;return{ver:"4.0",exceptions:n instanceof Array&&dn(n,function(e){return e.toInterface()})||undefined,severityLevel:i,properties:t,measurements:r,problemGroup:o,id:a,isManual:e}},a.CreateSimpleException=function(e,n,t,r,i,o){return{exceptions:[{hasFullStack:!0,message:e,stack:i,typeName:n}]}},a.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",a.dataType="ExceptionData",a.formatError=Ni;var Ai,Ei=a;function a(e,n,t,r,i,o){var a=Ai.call(this)||this;return a.aiDataContract={ver:1,exceptions:1,severityLevel:0,properties:0,measurements:0},function(e){try{if(g(e))return"ver"in e&&"exceptions"in e&&"properties"in e}catch(n){}}(n)?(a.exceptions=n.exceptions,a.properties=n.properties,a.measurements=n.measurements,n.severityLevel&&(a.severityLevel=n.severityLevel),n.id&&(a.id=n.id),n.problemGroup&&(a.problemGroup=n.problemGroup),a.ver=2,k(n.isManual)||(a.isManual=n.isManual)):(a.exceptions=[new Li(e,n,t=t||{})],a.properties=zr(e,t),a.measurements=jr(e,r),i&&(a.severityLevel=i),o&&(a.id=o)),a}n(Fi,Ri=function(){this.hasFullStack=!0,this.parsedStack=[]}),Fi.prototype.toInterface=function(){var e=this.parsedStack instanceof Array&&dn(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[u],parsedStack:e||undefined}},Fi.CreateFromInterface=function(e,n){var t=n.parsedStack instanceof Array&&dn(n.parsedStack,function(e){return Di.CreateFromInterface(e)})||n.parsedStack;return new Fi(e,Y(Y({},n),{parsedStack:t}))};var Ri,Li=Fi;function Fi(e,n,t){var c,r,i,o,a,s=Ri.call(this)||this;return s.aiDataContract={id:0,outerId:0,typeName:1,message:1,hasFullStack:0,stack:0,parsedStack:2},function(e){try{if(g(e))return"hasFullStack"in e&&"typeName"in e}catch(n){}}(n)?(s.typeName=n.typeName,s.message=n.message,s[u]=n[u],s.parsedStack=n.parsedStack,s.hasFullStack=n.hasFullStack):(r=(o=n)&&o.evt,an(o)||(o=o[mi]||r||o),s.typeName=I(e,_i(o))||Yr,s.message=Ur(e,xi(n||o,s.typeName))||Yr,c=n[vi]||wi(n),s.parsedStack=function(){var e=c.obj;if(e&&0<e.length){var n=[],t=0,r=0;if(O(e,function(e){var e=e.toString();Di.regex.test(e)&&(e=new Di(e,t++),r+=e.sizeInBytes,n.push(e))}),32768<r)for(var i=0,o=n.length-1,a=0,s=i,u=o;i<o;){if(32768<(a+=n[i].sizeInBytes+n[o].sizeInBytes)){n.splice(s,u-s+1);break}s=i,u=o,i++,o--}}return n}(),s[u]=(r=e,a="",(o=c)&&(o.obj?O(o.obj,function(e){a+=e+"\n"}):a=o.src||""),(n=a)&&32768<(e=""+n).length&&(i=e.substring(0,32768),r&&r.throwInternal(2,V.ExceptionTruncated,"exception is too long, it has been truncated to 32768 characters.",{exception:n},!0)),i||n),s.hasFullStack=B(s.parsedStack)&&0<s.parsedStack.length,t&&(t.typeName=t.typeName||s.typeName)),s}n(Pi,Mi=function(){}),Pi.CreateFromInterface=function(e){return new Pi(e,null)},Pi.prototype.toInterface=function(){return{level:this.level,method:this.method,assembly:this.assembly,fileName:this.fileName,line:this.line}},Pi.regex=/^([\s]+at)?[\s]{0,50}([^\@\()]+?)[\s]{0,50}(\@|\()([^\(\n]+):([0-9]+):([0-9]+)(\)?)$/,Pi.baseSize=58;var Mi,ki,Di=Pi;function Pi(e,n){var t,r=Mi.call(this)||this;return r.sizeInBytes=0,r.aiDataContract={level:1,method:1,assembly:0,fileName:0,line:0},"string"==typeof e?(t=e,r.level=n,r.method="<no_method>",r.assembly=v(t),r.fileName="",r.line=0,(n=t.match(Pi.regex))&&5<=n.length&&(r.method=v(n[2])||r.method,r.fileName=v(n[4]),r.line=parseInt(n[5])||0)):(r.level=e.level,r.method=e.method,r.assembly=e.assembly,r.fileName=e.fileName,r.line=e.line,r.sizeInBytes=0),r.sizeInBytes+=r.method.length,r.sizeInBytes+=r.fileName.length,r.sizeInBytes+=r.assembly.length,r.sizeInBytes+=Pi.baseSize,r.sizeInBytes+=r.level.toString().length,r.sizeInBytes+=r.line.toString().length,r}ki=0,n(Ui,Bi=function(){this.kind=ki});var Bi,Oi=Ui;function Ui(){var e=null!==Bi&&Bi.apply(this,arguments)||this;return e.aiDataContract={name:1,kind:0,value:1,count:0,min:0,max:0,stdDev:0},e}n(Ki,zi=function(){this.ver=2,this.metrics=[],this.properties={},this.measurements={}}),Ki.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",Ki.dataType="MetricData";var zi,ji=Ki;function Ki(e,n,t,r,i,o,a,s,u){var c=zi.call(this)||this,l=(c.aiDataContract={ver:1,metrics:1,properties:0},new Oi);return l.count=0<r?r:undefined,l.max=isNaN(o)||null===o?undefined:o,l.min=isNaN(i)||null===i?undefined:i,l.name=I(e,n)||Yr,l.value=t,l.stdDev=isNaN(a)||null===a?undefined:a,c.metrics=[l],c.properties=zr(e,s),c.measurements=jr(e,u),c}n(Vi,qi=r);var qi,e=Vi;function Vi(){var e=qi.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}n(Hi,Wi=e),Hi.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",Hi.dataType="PageviewData";var Wi,Gi=Hi;function Hi(e,n,t,r,i,o,a){var s=Wi.call(this)||this;return s.aiDataContract={ver:1,name:0,url:0,duration:0,properties:0,measurements:0,id:0},s.id=a&&Kr(e,a,128,V.IdTooLong).toString(),s.url=Or(e,t),s.name=I(e,n)||Yr,isNaN(r)||(s.duration=Vr(r)),s.properties=zr(e,i),s.measurements=jr(e,o),s}n(Ji,Xi=function(){this.ver=2,this.success=!0,this.properties={},this.measurements={}}),Ji.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",Ji.dataType="RemoteDependencyData";var Xi,Yi=Ji;function Ji(e,n,t,r,i,o,a,s,u,c,l,f){void 0===u&&(u="Ajax");var d,g,p,h=Xi.call(this)||this,t=(h.aiDataContract={id:1,ver:1,name:0,resultCode:0,duration:0,success:0,data:0,target:0,type:0,properties:0,measurements:0,kind:0,value:0,count:0,min:0,max:0,stdDev:0,dependencyKind:0,dependencySource:0,commandName:0,dependencyTypeName:0},h.id=n,h.duration=Vr(i),h.success=o,h.resultCode=a+"",h.type=I(e,u),n=e,i=s,u=a=o=r,a=(s=t)&&0<s.length?(d=s,p=(t=oi)[g=ii],ri.createElement?t[g]||(p=t[g]=ri.createElement("a")):p={host:function(){e=null,d&&null!=(t=d.match(/(\w*):\/\/(.[^/:]+)(\:[\d]+)?/i))&&2<t.length&&m(t[2])&&0<t[2].length&&(e=t[2]||"",2<t.length&&(n=(t[1]||"").toLowerCase(),t=t[3]||"",e+=t="http"==n&&":80"===t||"https"==n&&":443"===t?"":t));var e,n=e||"";if(n){var t=n.match(/(www[0-9]?\.)?(.[^/:]+)(\:[\d]+)?/i);if(null!=t&&3<t.length&&m(t[2])&&0<t[2].length)return t[2]+(t[3]||"")}return n}()},p.href=d,++g>=t.length&&(g=0),ii=g,g=(t=p).host,a||(null!=t.pathname?("/"!=((p=0===t.pathname.length?"/":t.pathname)[0]||"")&&(p="/"+p),u=t.pathname,I(n,i?i+" "+p:p)):I(n,s))):g=o,{target:g,name:a,data:u});return h.data=Or(e,r)||t.data,h.target=I(e,t.target),c&&(h.target="".concat(h.target," | ").concat(c)),h.name=I(e,t.name),h.properties=zr(e,l),h.measurements=jr(e,f),h}n(eo,Zi=function(){this.ver=2,this.properties={},this.measurements={}}),eo.envelopeType="Microsoft.ApplicationInsights.{0}.Message",eo.dataType="MessageData";var Zi,$i,Qi=eo;function eo(e,n,t,r,i){var o=Zi.call(this)||this;return o.aiDataContract={ver:1,message:1,severityLevel:0,properties:0},o.message=Ur(e,n=n||Yr),o.properties=zr(e,r),o.measurements=jr(e,i),t&&(o.severityLevel=t),o}function no(){var e=$i.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}n(no,$i=e),n(io,to=no),io.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",io.dataType="PageviewPerformanceData";var to,ro=io;function io(e,n,t,r,i,o,a){var s=to.call(this)||this;return s.aiDataContract={ver:1,name:0,url:0,duration:0,perfTotal:0,networkConnect:0,sentRequest:0,receivedResponse:0,domProcessing:0,properties:0,measurements:0},s.url=Or(e,t),s.name=I(e,n)||Yr,s.properties=zr(e,i),s.measurements=jr(e,o),a&&(s.domProcessing=a.domProcessing,s.duration=a.duration,s.networkConnect=a.networkConnect,s.perfTotal=a.perfTotal,s.receivedResponse=a.receivedResponse,s.sentRequest=a.sentRequest),s}n(so,oo=i);var oo,ao=so;function so(e,n){var t=oo.call(this)||this;return t.aiDataContract={baseType:1,baseData:1},t.baseType=e,t.baseData=n,t}function uo(e){var n="ai."+e+".";return function(e){return n+e}}T.SeverityLevel=void 0,(r=T.SeverityLevel||(T.SeverityLevel={}))[r.Verbose=0]="Verbose",r[r.Information=1]="Information",r[r.Warning=2]="Warning",r[r.Error=3]="Error",r[r.Critical=4]="Critical";var co,lo,e=uo("application"),i=uo("device"),r=uo("location"),fo=uo("operation"),go=uo("session"),s=uo("user"),c=uo("cloud"),po=uo("internal"),ho=(lo={applicationVersion:e("ver"),applicationBuild:e("build"),applicationTypeId:e("typeId"),applicationId:e("applicationId"),applicationLayer:e("layer"),deviceId:i("id"),deviceIp:i("ip"),deviceLanguage:i("language"),deviceLocale:i("locale"),deviceModel:i("model"),deviceFriendlyName:i("friendlyName"),deviceNetwork:i("network"),deviceNetworkName:i("networkName"),deviceOEMName:i("oemName"),deviceOS:i("os"),deviceOSVersion:i("osVersion"),deviceRoleInstance:i("roleInstance"),deviceRoleName:i("roleName"),deviceScreenResolution:i("screenResolution"),deviceType:i("type"),deviceMachineName:i("machineName"),deviceVMName:i("vmName"),deviceBrowser:i("browser"),deviceBrowserVersion:i("browserVersion"),locationIp:r("ip"),locationCountry:r("country"),locationProvince:r("province"),locationCity:r("city"),operationId:fo("id"),operationName:fo("name"),operationParentId:fo("parentId"),operationRootId:fo("rootId"),operationSyntheticSource:fo("syntheticSource"),operationCorrelationVector:fo("correlationVector"),sessionId:go("id"),sessionIsFirst:go("isFirst"),sessionIsNew:go("isNew"),userAccountAcquisitionDate:s("accountAcquisitionDate"),userAccountId:s("accountId"),userAgent:s("userAgent"),userId:s("id"),userStoreRegion:s("storeRegion"),userAuthUserId:s("authUserId"),userAnonymousUserAcquisitionDate:s("anonUserAcquisitionDate"),userAuthenticatedUserAcquisitionDate:s("authUserAcquisitionDate"),cloudName:c("name"),cloudRole:c("role"),cloudRoleVer:c("roleVer"),cloudRoleInstance:c("roleInstance"),cloudEnvironment:c("environment"),cloudLocation:c("location"),cloudDeploymentUnit:c("deploymentUnit"),internalNodeName:po("nodeName"),internalSdkVersion:po("sdkVersion"),internalAgentVersion:po("agentVersion"),internalSnippet:po("snippet"),internalSdkSrc:po("sdkSrc")},n(mo,co=function(){var t=this;D(lo,function(e,n){t[e]=n})}),mo);function mo(){return co.call(this)||this}var vo,f=new ho,e=function Jo(t,r){var i=[],o=!1;this._get=function(){return i},this._set=function(e){return i=e},h(Jo,this,function(n){n.enqueue=function(e){n.count()>=r.eventsLimitInMem()?o||(t.throwInternal(q.WARNING,V.InMemoryStorageBufferFull,"Maximum in-memory buffer size reached: "+n.count(),!0),o=!0):i.push(e)},n.count=function(){return i.length},n.size=function(){for(var e=i.length,n=0;n<i.length;n++)e+=i[n].length;return r.emitLineDelimitedJson()||(e+=2),e},n.clear=function(){o=!(i=[])},n.getItems=function(){return i.slice(0)},n.batchPayloads=function(e){return e&&0<e.length?r.emitLineDelimitedJson()?e.join("\n"):"["+e.join(",")+"]":null}})},yo=(n(Io,vo=e),Io);function Io(e,n){e=vo.call(this,e,n)||this;return h(Io,e,function(e,n){e.markAsSent=function(e){n.clear()},e.clearSent=function(e){}}),e}n(l,Co=e),l.BUFFER_KEY="AI_buffer",l.SENT_BUFFER_KEY="AI_sentBuffer",l.MAX_BUFFER_SIZE=2e3;var Co,So=l;function l(s,u){var e=Co.call(this,s,u)||this,c=!1;return h(l,e,function(t,n){var e=o(l.BUFFER_KEY),r=o(l.SENT_BUFFER_KEY),r=t._set(e.concat(r));function i(n,e){var t=[];return O(e,function(e){d(e)||-1!==fn(n,e)||t.push(e)}),t}function o(e){try{var e=u.namePrefix&&u.namePrefix()?u.namePrefix()+"_"+e:e,n=ni(s,e);if(n){var t=Vn().parse(n);if((t=m(t)?Vn().parse(t):t)&&B(t))return t}}catch(r){s.throwInternal(q.CRITICAL,V.FailedToRestoreStorageBuffer," storage key: "+e+", "+U(r),{exception:K(r)})}return[]}function a(e,n){try{var e=u.namePrefix&&u.namePrefix()?u.namePrefix()+"_"+e:e,t=JSON.stringify(n);ti(s,e,t)}catch(r){ti(s,e,JSON.stringify([])),s.throwInternal(q.WARNING,V.FailedToSetStorageBuffer," storage key: "+e+", "+U(r)+". Buffer cleared",{exception:K(r)})}}r.length>l.MAX_BUFFER_SIZE&&(r.length=l.MAX_BUFFER_SIZE),a(l.SENT_BUFFER_KEY,[]),a(l.BUFFER_KEY,r),t.enqueue=function(e){t.count()>=l.MAX_BUFFER_SIZE?c||(s.throwInternal(q.WARNING,V.SessionStorageBufferFull,"Maximum buffer size reached: "+t.count(),!0),c=!0):(n.enqueue(e),a(l.BUFFER_KEY,t._get()))},t.clear=function(){n.clear(),a(l.BUFFER_KEY,t._get()),a(l.SENT_BUFFER_KEY,[]),c=!1},t.markAsSent=function(e){a(l.BUFFER_KEY,t._set(i(e,t._get())));var n=o(l.SENT_BUFFER_KEY);n instanceof Array&&e instanceof Array&&((n=n.concat(e)).length>l.MAX_BUFFER_SIZE&&(s.throwInternal(q.CRITICAL,V.SessionStorageBufferFull,"Sent buffer reached its maximum size: "+n.length,!0),n.length=l.MAX_BUFFER_SIZE),a(l.SENT_BUFFER_KEY,n))},t.clearSent=function(e){e=i(e,o(l.SENT_BUFFER_KEY));a(l.SENT_BUFFER_KEY,e)}}),e}var xo="baseType",C="baseData",S="properties",To="true";function x(e,n,t){z(e,n,t,Cn)}function bo(e,t,r){k(e)||D(e,function(e,n){sn(n)?r[e]=n:m(n)?t[e]=n:qn()&&(t[e]=Vn().stringify(n))})}function wo(t,r){k(t)||D(t,function(e,n){t[e]=n||r})}function _o(e,n,t,r){for(var r=new fi(e,r,n),n=(x(r,"sampleRate",t[Gr]),(t[C]||{}).startTime&&(r.time=ln(t[C].startTime)),r.iKey=t.iKey,t.iKey.replace(/-/g,"")),n=(r.name=r.name.replace("{0}",n),e),e=t,i=r,o=i.tags=i.tags||{},a=e.ext=e.ext||{},s=e.tags=e.tags||[],u=a.user,u=(u&&(x(o,f.userAuthUserId,u.authId),x(o,f.userId,u.id||u.localId)),a.app),u=(u&&x(o,f.sessionId,u.sesId),a.device),u=(u&&(x(o,f.deviceId,u.id||u.localId),x(o,f.deviceType,u.deviceClass),x(o,f.deviceIp,u.ip),x(o,f.deviceModel,u.model),x(o,f.deviceType,u.deviceType)),e.ext.web),e=(u&&(x(o,f.deviceLanguage,u.browserLang),x(o,f.deviceBrowserVersion,u.browserVer),x(o,f.deviceBrowser,u.browser),x(e=(e=(e=i.data=i.data||{})[C]=e[C]||{})[S]=e[S]||{},"domain",u.domain),x(e,"isManual",u.isManual?To:null),x(e,"screenRes",u.screenRes),x(e,"userConsent",u.userConsent?To:null)),a.os),u=(e&&x(o,f.deviceOS,e.name),a.trace),c=(u&&(x(o,f.operationParentId,u.parentID),x(o,f.operationName,I(n,u.name)),x(o,f.operationId,u.traceID)),{}),l=s.length-1;0<=l;l--)D(s[l],function(e,n){c[e]=n}),s.splice(l,1);D(s,function(e,n){c[e]=n});e=Y(Y({},o),c);return e[f.internalSdkVersion]||(e[f.internalSdkVersion]="javascript:".concat(Ao.Version)),i.tags=xn(e),t.tags=t.tags||[],xn(r)}function No(e,n){k(n[C])&&e.throwInternal(q.CRITICAL,V.TelemetryEnvelopeInvalid,"telemetryItem.baseData cannot be null.")}var Ao={Version:"2.8.0-beta.2203-02"};function Eo(e,n,t){No(e,n);var r={},i={},t=(n[xo]!==pi.dataType&&(r.baseTypeSource=n[xo]),n[xo]===pi.dataType?(r=n[C][S]||{},i=n[C].measurements||{}):n[C]&&bo(n[C],r,i),bo(n.data,r,i),k(t)||wo(r,t),n[C].name),t=new pi(e,t,r,i),r=new ao(pi.dataType,t);return _o(e,pi.envelopeType,n,r)}var Ro=function Zo(f){h(Zo,this,function(e){function c(a,s){var e="__aiCircularRefCheck",u={};if(!a)return f.throwInternal(q.CRITICAL,V.CannotSerializeObject,"cannot serialize object because it is null or undefined",{name:s},!0),u;if(a[e])return f.throwInternal(q.WARNING,V.CircularReferenceDetected,"Circular reference detected while serializing object",{name:s},!0),u;if(a.aiDataContract)return a[e]=!0,D(a.aiDataContract,function(e,n){var t=d(n)?1&n():1&n,r=d(n)?4&n():4&n,n=2&n,i=a[e]!==undefined,o=g(a[e])&&null!==a[e];!t||i||n?r||(t=o?(n?l:c)(a[e],e):a[e])!==undefined&&(u[e]=t):f.throwInternal(q.CRITICAL,V.MissingRequiredFieldSpecification,"Missing required field specification. The field is required but not present on source",{field:e,name:s})}),delete a[e],u;if("measurements"===s)u=t(a,"number",s);else if("properties"===s)u=t(a,"string",s);else if("tags"===s)u=t(a,"string",s);else if(B(a))u=l(a,s);else{f.throwInternal(q.WARNING,V.CannotSerializeObjectNonSerializable,"Attempting to serialize an object which does not implement ISerializable",{name:s},!0);try{Vn().stringify(a),u=a}catch(n){f.throwInternal(q.CRITICAL,V.CannotSerializeObject,n&&d(n.toString)?n.toString():"Error serializing object",null,!0)}}return u}function l(e,n){if(e)if(B(e))for(var t=[],r=0;r<e.length;r++){var i=c(e[r],n+"["+r+"]");t.push(i)}else f.throwInternal(q.CRITICAL,V.ItemNotInArray,"This field was specified as an array in the contract but the item is not an array.\r\n",{name:n},!0);return t}function t(e,t,r){var i;return e&&(i={},D(e,function(e,n){"string"===t?n===undefined?i[e]="undefined":null===n?i[e]="null":n.toString?i[e]=n.toString():i[e]="invalid field: toString() is not defined.":"number"===t?n===undefined?i[e]="undefined":i[e]=null===n?"null":isNaN(n=parseFloat(n))?"NaN":n:(i[e]="invalid field: "+r+" is of unknown type.",f.throwInternal(q.CRITICAL,i[e],null,!0))})),i}e.serialize=function(e){e=c(e,"root");try{return Vn().stringify(e)}catch(n){f.throwInternal(q.CRITICAL,V.CannotSerializeObject,n&&d(n.toString)?n.toString():"Error serializing object",null,!0)}}})};function Lo(){var a=Un(),s=zn(),u=!1,c=!0;h(Lo,this,function(e){try{var n,t;a&&Fr(a,"online",r)&&(Fr(a,"offline",i),u=!0),s&&!F((n=s.body||s).ononline)&&(n.ononline=r,n.onoffline=i,u=!0),u&&(t=Kn())&&!k(t.onLine)&&(c=t.onLine)}catch(o){u=!1}function r(){c=!0}function i(){c=!1}e.isListening=u,e.isOnline=function(){var e=!0,n=Kn();return u?e=c:n&&!k(n.onLine)&&(e=n.onLine),e},e.isOffline=function(){return!e.isOnline()}})}var Fo=Lo.Offline=new Lo,Mo=(ko.prototype.getHashCodeScore=function(e){return this.getHashCode(e)/ko.INT_MAX_VALUE*100},ko.prototype.getHashCode=function(e){if(""===e)return 0;for(;e.length<8;)e=e.concat(e);for(var n=5381,t=0;t<e.length;++t)n=(n<<5)+n+e.charCodeAt(t),n&=n;return Math.abs(n)},ko.INT_MAX_VALUE=2147483647,ko);function ko(){}var Do=function(){var n=new Mo,t=new ho;this.getSamplingScore=function(e){return e.tags&&e.tags[t.userId]?n.getHashCodeScore(e.tags[t.userId]):e.ext&&e.ext.user&&e.ext.user.id?n.getHashCodeScore(e.ext.user.id):e.tags&&e.tags[t.operationId]?n.getHashCodeScore(e.tags[t.operationId]):e.ext&&e.ext.telemetryTrace&&e.ext.telemetryTrace.traceID?n.getHashCodeScore(e.ext.telemetryTrace.traceID):100*Math.random()}},Po=(Bo.prototype.isSampledIn=function(e){var n=this.sampleRate;return null===n||n===undefined||100<=n||e.baseType===ji.dataType||this.samplingScoreGenerator.getSamplingScore(e)<n},Bo);function Bo(e,n){this.INT_MAX_VALUE=2147483647;n=n||it(null);(100<e||e<0)&&(n.throwInternal(q.WARNING,V.SampleRateOutOfRange,"Sampling rate is out of range (0..100). Sampling will be disabled, you may be sending too much data which may affect your AI service level.",{samplingRate:e},!0),e=100),this.sampleRate=e,this.samplingScoreGenerator=new Do}function Oo(e){try{return e.responseText}catch(n){}return null}function Uo(){return{endpointUrl:function(){return"https://dc.services.visualstudio.com/v2/track"},emitLineDelimitedJson:function(){return!1},maxBatchInterval:function(){return 15e3},maxBatchSizeInBytes:function(){return 102400},disableTelemetry:function(){return!1},enableSessionStorageBuffer:function(){return!0},isRetryDisabled:function(){return!1},isBeaconApiDisabled:function(){return!0},disableXhr:function(){return!1},onunloadDisableFetch:function(){return!1},onunloadDisableBeacon:function(){return!1},instrumentationKey:function(){return undefined},namePrefix:function(){return undefined},samplingPercentage:function(){return 100},customHeaders:function(){return undefined},convertUndefined:function(){return undefined},eventsLimitInMem:function(){return 1e4}}}(i={})[pi.dataType]=Eo,i[Qi.dataType]=function(e,n,t){No(e,n);var r=n[C].message,i=n[C].severityLevel,o=n[C][S]||{},a=n[C].measurements||{},t=(bo(n.data,o,a),k(t)||wo(o,t),new Qi(e,r,i,o,a)),r=new ao(Qi.dataType,t);return _o(e,Qi.envelopeType,n,r)},i[Gi.dataType]=function(e,n,t){No(e,n);var r,i="duration",o=n[C],i=(k(o)||k(o[S])||k(o[S][i])?k(n.data)||k(n.data[i])||(r=n.data[i],delete n.data[i]):(r=o[S][i],delete o[S][i]),n[C]),o=(((n.ext||{}).trace||{}).traceID&&(a=n.ext.trace.traceID),i.id||a),a=i.name,s=i.uri,u=i[S]||{},c=i.measurements||{},i=(k(i.refUri)||(u.refUri=i.refUri),k(i.pageType)||(u.pageType=i.pageType),k(i.isLoggedIn)||(u.isLoggedIn=i.isLoggedIn.toString()),k(i[S])||D(i[S],function(e,n){u[e]=n}),bo(n.data,u,c),k(t)||wo(u,t),new Gi(e,a,s,r,u,c,o)),t=new ao(Gi.dataType,i);return _o(e,Gi.envelopeType,n,t)},i[ro.dataType]=function(e,n,t){No(e,n);var r=n[C],i=r.name,o=r.uri||r.url,a=r[S]||{},s=r.measurements||{},t=(bo(n.data,a,s),k(t)||wo(a,t),new ro(e,i,o,undefined,a,s,r)),i=new ao(ro.dataType,t);return _o(e,ro.envelopeType,n,i)},i[Ei.dataType]=function(e,n,t){No(e,n);var r=n[C].measurements||{},i=n[C][S]||{},t=(bo(n.data,i,r),k(t)||wo(i,t),n[C]),t=Ei.CreateFromInterface(e,t,i,r),i=new ao(Ei.dataType,t);return _o(e,Ei.envelopeType,n,i)},i[ji.dataType]=function(e,n,t){No(e,n);var r=n[C],i=r[S]||{},o=r.measurements||{},t=(bo(n.data,i,o),k(t)||wo(i,t),new ji(e,r.name,r.average,r.sampleCount,r.min,r.max,r.stdDev,i,o)),r=new ao(ji.dataType,t);return _o(e,ji.envelopeType,n,r)},i[Yi.dataType]=function(e,n,t){No(e,n);var r=n[C].measurements||{},i=n[C][S]||{},t=(bo(n.data,i,r),k(t)||wo(i,t),n[C]);if(k(t))return e.warnToConsole("Invalid input for dependency data"),null;var o=t[S]&&t[S][Xr]?t[S][Xr]:"GET",o=new Yi(e,t.id,t.target,t.name,t.duration,t.success,t.responseCode,o,t.type,t.correlationContext,i,r),t=new ao(Yi.dataType,o);return _o(e,Yi.envelopeType,n,t)};var zo,jo=i,Ko=(n(qo,zo=Me),qo.constructEnvelope=function(e,n,t,r){e=n===e.iKey||k(n)?e:Y(Y({},e),{iKey:n});return(jo[e.baseType]||Eo)(t,e,r)},qo);function qo(){var T,b,t,w,_,N,A,E=zo.call(this)||this,R=(E.priority=1001,!(E.identifier="AppInsightsChannelPlugin")),L={},F=0;return E._senderConfig=Uo(),h(qo,E,function(c,a){function l(e,n,t,r,i,o){var a=null;c._appId||(a=p(o))&&a.appId&&(c._appId=a.appId),(e<200||300<=e)&&0!==e?(301!==e&&307!==e&&308!==e||s(t))&&!c._senderConfig.isRetryDisabled()&&y(e)?(h(n),c.diagLog().throwInternal(q.WARNING,V.TransmissionFailed,". Response code "+e+". Will retry to send "+n.length+" items.")):c._onError(n,i):Fo.isOffline()?c._senderConfig.isRetryDisabled()||(h(n,10),c.diagLog().throwInternal(q.WARNING,V.TransmissionFailed,". Offline - Response Code: ".concat(e,". Offline status: ").concat(Fo.isOffline(),". Will retry to send ").concat(n.length," items."))):(s(t),206===e?(a=a||p(o))&&!c._senderConfig.isRetryDisabled()?c._onPartialSuccess(n,a):c._onError(n,i):(T=0,c._onSuccess(n,r)))}function s(e){return!(10<=_)&&!k(e)&&""!==e&&e!==c._senderConfig.endpointUrl()&&(c._senderConfig.endpointUrl=function(){return e},++_,1)}function n(e,n){A?A(e,!1):u(e)}function o(e){var n=Kn(),t=c._buffer,r=c._senderConfig.endpointUrl(),i=c._buffer.batchPayloads(e),i=new Blob([i],{type:"text/plain;charset=UTF-8"}),r=n.sendBeacon(r,i);return r&&(t.markAsSent(e),c._onSuccess(e,e.length)),r}function u(e,n){if(B(e)&&0<e.length&&!o(e)){for(var t=[],r=0;r<e.length;r++){var i=e[r];o([i])||t.push(i)}0<t.length&&(N(t,!0),c.diagLog().throwInternal(q.WARNING,V.TransmissionFailed,". Failed to send telemetry with Beacon API, retried with normal sender."))}}function f(n,e){var t=new XMLHttpRequest,r=c._senderConfig.endpointUrl();try{t[Wr]=!0}catch(i){}t.open("POST",r,e),t.setRequestHeader("Content-type","application/json"),si(r)&&t.setRequestHeader("Sdk-Context","appId"),O(hn(L),function(e){t.setRequestHeader(e,L[e])}),t.onreadystatechange=function(){return c._xhrReadyStateChange(t,n,n.length)},t.onerror=function(e){return c._onError(n,I(t),e)};e=c._buffer.batchPayloads(n);t.send(e),c._buffer.markAsSent(n)}function d(e,n){if(B(e)){for(var t=e.length,r=0;r<e.length;r++)t+=e[r].length;F+t<=65e3?i(e,!1):Gn()?u(e):(N&&N(e,!0),c.diagLog().throwInternal(q.WARNING,V.TransmissionFailed,". Failed to send telemetry with Beacon API, retried with xhrSender."))}}function g(e,n){i(e,!0)}function i(t,r){var e=c._senderConfig.endpointUrl(),n=c._buffer.batchPayloads(t),i=new Blob([n],{type:"application/json"}),o=new Headers,a=n.length,n=!1,s=!1,e=(si(e)&&o.append("Sdk-Context","appId"),O(hn(L),function(e){o.append(e,L[e])}),(i={method:"POST",headers:o,body:i})[Wr]=!0,r||(n=i.keepalive=!0,F+=a),new Request(e,i));try{e[Wr]=!0}catch(u){}c._buffer.markAsSent(t);try{fetch(e).then(function(n){r||(F-=a,a=0),s||(s=!0,n.ok?n.text().then(function(e){l(n.status,t,n.url,t.length,n.statusText,e)}):c._onError(t,n.statusText))})["catch"](function(e){r||(F-=a,a=0),s||(s=!0,c._onError(t,e.message))})}catch(u){s||c._onError(t,K(u))}n&&!s&&(s=!0,c._onSuccess(t,t.length))}function p(e){try{if(e&&""!==e){var n=Vn().parse(e);if(n&&n.itemsReceived&&n.itemsReceived>=n.itemsAccepted&&n.itemsReceived-n.itemsAccepted===n.errors.length)return n}}catch(t){c.diagLog().throwInternal(q.CRITICAL,V.InvalidBackendResponse,"Cannot parse the response. "+U(t),{response:e})}return null}function h(e,n){if(void 0===n&&(n=1),e&&0!==e.length){var t=c._buffer;t.clearSent(e),T++;for(var r=0,i=e;r<i.length;r++){var o=i[r];t.enqueue(o)}n=T<=1?10:(e=1+Math.floor((Math.pow(2,T)-1)/2*Math.random()*10),Math.max(Math.min(e*=n,3600),10)),e=yn()+1e3*n;b=e,m()}}function m(){var e;t||R||(e=b?Math.max(0,b-yn()):0,e=Math.max(c._senderConfig.maxBatchInterval(),e),t=setTimeout(function(){t=null,c.triggerSend(!0,null,1)},e))}function v(){clearTimeout(t),b=t=null}function y(e){return 408===e||429===e||500===e||503===e}function I(e,n){return e?"XMLHttpRequest,Status:"+e.status+",Response:"+Oo(e)||e.response||"":n}function C(n,e){var t=c._buffer,r=Un(),i=new XDomainRequest,r=(i.onload=function(){return c._xdrOnLoad(i,n)},i.onerror=function(e){return c._onError(n,S(i),e)},r&&r.location&&r.location.protocol||"");if(c._senderConfig.endpointUrl().lastIndexOf(r,0))return c.diagLog().throwInternal(q.WARNING,V.TransmissionFailed,". Cannot send XDomain request. The endpoint URL protocol doesn't match the hosting page protocol."),void t.clear();r=c._senderConfig.endpointUrl().replace(/^(https?:)/,""),i.open("POST",r),r=t.batchPayloads(n);i.send(r),t.markAsSent(n)}function S(e,n){return e?"XDomainRequest,Response:"+Oo(e)||"":n}function x(e,n){var t="getNotifyMgr",t=c.core[t]?c.core[t]():c.core._notificationManager;if(t&&t.eventsSendRequest)try{t.eventsSendRequest(e,n)}catch(r){c.diagLog().throwInternal(q.CRITICAL,V.NotificationException,"send request notification failed: "+U(r),{exception:K(r)})}}c.pause=function(){v(),R=!0},c.resume=function(){R&&(R=!1,b=null,c._buffer.size()>c._senderConfig.maxBatchSizeInBytes()&&c.triggerSend(!0,null,10),m())},c.flush=function(e,n,t){if(void 0===e&&(e=!0),!R){v();try{c.triggerSend(e,null,t||1)}catch(r){c.diagLog().throwInternal(q.CRITICAL,V.FlushFailed,"flush failed, telemetry will not be collected: "+U(r),{exception:K(r)})}}},c.onunloadFlush=function(){if(!R)if(!1!==c._senderConfig.onunloadDisableBeacon()&&!1!==c._senderConfig.isBeaconApiDisabled()||!Gn())c.flush();else try{c.triggerSend(!0,n,2)}catch(e){c.diagLog().throwInternal(q.CRITICAL,V.FailedToSendQueuedTelemetry,"failed to flush with beacon sender on page unload, telemetry will not be collected: "+U(e),{exception:K(e)})}},c.teardown=function(){j("Method not implemented.")},c.addHeader=function(e,n){L[e]=n},c.initialize=function(e,n,t,r){a.initialize(e,n,t,r);var i=c._getTelCtx(),o=c.identifier,t=(w=new Ro(n.logger),b=null,T=0,c._sender=null,_=0,c.diagLog()),r=(D(Uo(),function(e,n){c._senderConfig[e]=function(){return i.getConfig(o,e,n())}}),c._buffer=new(c._senderConfig.enableSessionStorageBuffer()&&ei()?So:yo)(t,c._senderConfig),c._sample=new Po(c._senderConfig.samplingPercentage(),t),!k(e.disableInstrumentationKeyValidation)&&e.disableInstrumentationKeyValidation||/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/.test(e.instrumentationKey)||t.throwInternal(q.CRITICAL,V.InvalidInstrumentationKey,"Invalid Instrumentation key "+e.instrumentationKey),!si(c._senderConfig.endpointUrl())&&c._senderConfig.customHeaders()&&0<c._senderConfig.customHeaders().length&&O(c._senderConfig.customHeaders(),function(e){E.addHeader(e.header,e.value)}),c._senderConfig),n=null;!r.disableXhr()&&Xn()?n=C:!r.disableXhr()&&Yn()&&(n=f),!n&&Hn()&&(n=g),N=n||f,!r.isBeaconApiDisabled()&&Gn()&&(n=u),c._sender=n||f,A=!r.onunloadDisableFetch()&&Hn(!0)?d:Gn()?u:!r.disableXhr()&&Xn()?C:!r.disableXhr()&&Yn()?f:N},c.processTelemetry=function(e,t){t=c._getTelCtx(t);try{if(c._senderConfig.disableTelemetry())return;if(!e)return void t.diagLog().throwInternal(q.CRITICAL,V.CannotSendEmptyTelemetry,"Cannot send empty telemetry");if(e.baseData&&!e.baseType)return void t.diagLog().throwInternal(q.CRITICAL,V.InvalidEvent,"Cannot send telemetry without baseData and baseType");if(e.baseType||(e.baseType="EventData"),!c._sender)return void t.diagLog().throwInternal(q.CRITICAL,V.SenderNotInitialized,"Sender was not initialized");if(!c._sample.isSampledIn(e))return void t.diagLog().throwInternal(q.WARNING,V.TelemetrySampledAndNotSent,"Telemetry item was sampled out and not sent",{SampleRate:c._sample.sampleRate});e[Gr]=c._sample.sampleRate;var n=c._senderConfig.convertUndefined()||undefined,r=e.iKey||c._senderConfig.instrumentationKey(),i=qo.constructEnvelope(e,r,t.diagLog(),n);if(!i)return void t.diagLog().throwInternal(q.CRITICAL,V.CreateEnvelopeError,"Unable to create an AppInsights envelope");var o=!1;if(e.tags&&e.tags[Hr]&&(O(e.tags[Hr],function(e){try{e&&!1===e(i)&&(o=!0,t.diagLog().warnToConsole("Telemetry processor check returns false"))}catch(n){t.diagLog().throwInternal(q.CRITICAL,V.TelemetryInitializerFailed,"One of telemetry initializers failed, telemetry item will not be sent: "+U(n),{exception:K(n)},!0)}}),delete e.tags[Hr]),o)return;var a=w.serialize(i),s=c._buffer;s.size()+a.length>c._senderConfig.maxBatchSizeInBytes()&&c.triggerSend(!0,null,10),s.enqueue(a),m()}catch(u){t.diagLog().throwInternal(q.WARNING,V.FailedAddingTelemetryToBuffer,"Failed adding telemetry to the sender's buffer, some telemetry will be lost: "+U(u),{exception:K(u)})}c.processNext(e,t)},c._xhrReadyStateChange=function(e,n,t){4===e.readyState&&l(e.status,n,e.responseURL,t,I(e),Oo(e)||e.response)},c.triggerSend=function(e,n,t){if(void 0===e&&(e=!0),!R)try{var r,i=c._buffer;c._senderConfig.disableTelemetry()?i.clear():0<i.count()&&(r=i.getItems(),x(t||0,e),n?n.call(E,r,e):c._sender(r,e)),v()}catch(o){i=function(e){var n=((e=(e=void 0===e?null:e)?e:(n=Kn()||{})?(n.userAgent||M).toLowerCase():M)||M).toLowerCase();if(P(n,Rn))return e=zn()||{},Math.max(parseInt(n.split(Rn)[1]),e.documentMode||0);if(P(n,Ln)){e=parseInt(n.split(Ln)[1]);if(e)return e+4}return null}();(!i||9<i)&&c.diagLog().throwInternal(q.CRITICAL,V.TransmissionFailed,"Telemetry transmission failed, some telemetry will be lost: "+U(o),{exception:K(o)})}},c._onError=function(e,n,t){c.diagLog().throwInternal(q.WARNING,V.OnError,"Failed to send telemetry.",{message:n}),c._buffer.clearSent(e)},c._onPartialSuccess=function(e,n){for(var t=[],r=[],i=0,o=n.errors.reverse();i<o.length;i++){var a=o[i],s=e.splice(a.index,1)[0];(y(a.statusCode)?r:t).push(s)}0<e.length&&c._onSuccess(e,n.itemsAccepted),0<t.length&&c._onError(t,I(null,["partial success",n.itemsAccepted,"of",n.itemsReceived].join(" "))),0<r.length&&(h(r),c.diagLog().throwInternal(q.WARNING,V.TransmissionFailed,"Partial success. Delivered: "+e.length+", Failed: "+t.length+". Will retry to send "+r.length+" our of "+n.itemsReceived+" items"))},c._onSuccess=function(e,n){c._buffer.clearSent(e)},c._xdrOnLoad=function(e,n){var t=Oo(e);!e||t+""!="200"&&""!==t?(t=p(t))&&t.itemsReceived&&t.itemsReceived>t.itemsAccepted&&!c._senderConfig.isRetryDisabled()?c._onPartialSuccess(n,t):c._onError(n,S(e)):(T=0,c._onSuccess(n,0))}}),E}Vo.prototype.initialize=function(){this.core=new Sr;var e=[],n=new Ko;e.push(n),this.core.initialize(this.config,e),n.initialize(this.config,this.core,e),this.pollInternalLogs()},Vo.prototype.track=function(e){this.core.track(e)},Vo.prototype.flush=function(n){void 0===n&&(n=!0),O(this.core.getTransmissionControls(),function(e){O(e,function(e){n?e.flush():e.triggerSend(n,null,1)})})},Vo.prototype.pollInternalLogs=function(){this.core.pollInternalLogs()},Vo.prototype.stopPollingInternalLogs=function(){this.core.stopPollingInternalLogs()},Vo.prototype.getSKUDefaults=function(){this.config.diagnosticLogInterval=this.config.diagnosticLogInterval&&0<this.config.diagnosticLogInterval?this.config.diagnosticLogInterval:1e4};r=Vo;function Vo(e){(k(e)||k(e.instrumentationKey))&&j("Invalid input configuration"),this.config=e,this.getSKUDefaults(),this.initialize()}T.AppInsightsCore=Sr,T.ApplicationInsights=r,T.CoreUtils=Dr,T.Sender=Ko;fo=T,go="__esModule",s={value:!0},c=Object.defineProperty;if(c)try{return void c(fo,go,s)}catch($o){}typeof s.value!==undefined&&(fo[go]=s.value)};"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(((e="undefined"!=typeof globalThis?globalThis:e||self).Microsoft=e.Microsoft||{},e.Microsoft.ApplicationInsights=e.Microsoft.ApplicationInsights||{}));
5
+ var e=this,n=function(C){"use strict";var S="function",x="object",T="undefined",o="prototype",b="hasOwnProperty",t=Object,w=t[o],_=t.assign,N=t.create,e=t.defineProperty,A=w[b],E=null;function R(e){return void 0===e&&(e=!0),E&&e||(typeof globalThis!==T&&globalThis&&(E=globalThis),typeof self!==T&&self&&(E=self),typeof window!==T&&window&&(E=window),typeof global!==T&&global&&(E=global)),E}function L(e){throw new TypeError(e)}function X(e){if(N)return N(e);if(null==e)return{};var n=typeof e;function t(){}return n!==x&&n!==S&&L("Object prototype may only be an Object:"+e),t[o]=e,new t}(R()||{}).Symbol,(R()||{}).Reflect;var Y=_||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var i in n=arguments[t])w[b].call(n,i)&&(e[i]=n[i]);return e},J=function(e,n){return(J=t.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)n[b](t)&&(e[t]=n[t])})(e,n)};function n(e,n){function t(){this.constructor=e}typeof n!==S&&null!==n&&L("Class extends value "+n+" is not a constructor or null"),J(e,n),e[o]=null===n?X(n):(t[o]=n[o],new t)}function Z(e,n){for(var t=0,r=n.length,i=e.length;t<r;t++,i++)e[i]=n[t];return e}var $="constructor",p="prototype",Q="function",ee="_dynInstFuncs",ne="_isDynProxy",te="_dynClass",re="_dynInstChk",ie=re,oe="_dfOpts",ae="_unknown_",se="__proto__",ue="useBaseInst",ce="setInstFuncs",le=Object,fe=le.getPrototypeOf,de=0;function ge(e,n){return e&&le[p].hasOwnProperty.call(e,n)}function pe(e){return e&&(e===le[p]||e===Array[p])}function ve(e){return pe(e)||e===Function[p]}function he(e){if(e){if(fe)return fe(e);e=e[se]||e[p]||(e[$]?e[$][p]:null);if(e)return e}return null}function me(e,n){var t=[],r=le.getOwnPropertyNames;if(r)t=r(e);else for(var i in e)"string"==typeof i&&ge(e,i)&&t.push(i);if(t&&0<t.length)for(var o=0;o<t.length;o++)n(t[o])}function ye(e,n,t){return n!==$&&typeof e[n]===Q&&(t||ge(e,n))}function Ie(e){throw new TypeError("DynamicProto: "+e)}function Ce(e,n){for(var t=e.length-1;0<=t;t--)if(e[t]===n)return 1}function Se(e,n){return ge(e,p)?e.name||n||ae:((e||{})[$]||{}).name||n||ae}function m(e,r,n,t){ge(e,p)||Ie("theClass is an invalid class definition.");var i,o,a,s,u,c,l=e[p],f=(function(e){if(fe)for(var n=[],t=he(r);t&&!ve(t)&&!Ce(n,t);){if(t===e)return 1;n.push(t),t=he(t)}}(l)||Ie("["+Se(e)+"] is not in class hierarchy of ["+Se(r)+"]"),null),e=(ge(l,te)?f=l[te]:(f="_dynCls$"+Se(e,"_")+"$"+de,de++,l[te]=f),m[oe]),d=!!e[ue],g=(d&&t&&t[ue]!==undefined&&(d=!!t[ue]),o={},me(i=r,function(e){!o[e]&&ye(i,e,!1)&&(o[e]=i[e])}),o),d=(n(r,function(e,n,t,o){function r(e,n,t){var r,i=n[t];return i[ne]&&o&&!1!==(r=e[ee]||{})[ie]&&(i=(r[n[te]]||{})[t]||i),function(){return i.apply(e,arguments)}}for(var i={},a=(me(t,function(e){i[e]=r(n,t,e)}),he(e)),s=[];a&&!ve(a)&&!Ce(s,a);)me(a,function(e){!i[e]&&ye(a,e,!fe)&&(i[e]=r(n,a,e))}),s.push(a),a=he(a);return i}(l,r,g,d)),!!fe&&!!e[ce]);a=l,n=f,s=r,u=g,e=!1!==(d=d&&t?!!t[ce]:d),pe(a)||(l=s[ee]=s[ee]||{},c=l[n]=l[n]||{},!1!==l[ie]&&(l[ie]=!!e),me(s,function(e){var t,r,i;ye(s,e,!1)&&s[e]!==u[e]&&(c[e]=s[e],delete s[e],ge(a,e)&&(!a[e]||a[e][ne])||(a[e]=(t=a,r=e,(i=function(){var e,n;return(function(e,n,t,r){var i=null;if(e&&ge(t,te)){var o=e[ee]||{};if((i=(o[t[te]]||{})[n])||Ie("Missing ["+n+"] "+Q),!i[re]&&!1!==o[ie]){for(var a=!ge(e,n),s=he(e),u=[];a&&s&&!ve(s)&&!Ce(u,s);){var c=s[n];if(c){a=c===r;break}u.push(s),s=he(s)}try{a&&(e[n]=i),i[re]=1}catch(l){o[ie]=!1}}}return i}(this,r,t,i)||(typeof(n=(n=t[e=r])===i?he(t)[e]:n)!==Q&&Ie("["+e+"] is not a "+Q),n)).apply(this,arguments)})[ne]=1,i)))}))}m[oe]={setInstFuncs:!0,useBaseInst:!0};var D="",xe="processTelemetry",Te="priority",be="setNextPlugin",we="isInitialized",_e="teardown",Ne="core",Ae="update",Ee="disabled",Re="_doTeardown",Le="processNext",Fe="resume",Me="pause",ke="NotificationListener",De="add"+ke,Pe="remove"+ke,Be="eventsSent",Ue="eventsDiscarded",Oe="eventsSendRequest",ze="perfEvent",je="toISOString",Ke="endsWith",qe="indexOf",Ve="trim",ke="toString",We="constructor",He=e,r=t.freeze,Ge=(t.seal,t.keys),i=String[o],Xe=i[Ve],Ye=i[Ke],Je=(i.startsWith,Date[o][je]),i=Array.isArray,Ze=w[ke],$e=A[ke],Qe=$e.call(t),en=/-([a-z])/g,nn=/([^\w\d_$])/g,tn=/^(\d+[\w\d_$])/,rn=Object.getPrototypeOf;function P(e){return e===undefined||typeof e===T}function B(e){return null===e||P(e)}function on(e){return!B(e)}function an(e){return!(!e||typeof e!==x)}function F(e){return!(!e||typeof e!==S)}function sn(e){var n=e;return e&&M(e)?(n=(n=e.replace(en,function(e,n){return n.toUpperCase()})).replace(nn,"_")).replace(tn,function(e,n){return"_"+n}):n}function U(e,n){if(e)for(var t in e)A.call(e,t)&&n.call(e,t,e[t])}function O(e,n){return!(!e||!n||!~e.indexOf(n))}var z=i||function(e){return!(!e||"[object Array]"!==Ze.call(e))};function un(e){return!(!e||"[object Error]"!==Ze.call(e))}function M(e){return"string"==typeof e}function cn(e){return"number"==typeof e}function ln(e){return"boolean"==typeof e}function fn(e){return e&&"object"==typeof e&&(!(e=(rn||function(e){if(e){if(rn)return rn(e);e=e.__proto__||e[o]||e[We];if(e)return e}return null})(e))||typeof(e=e[We]&&A.call(e,We)?e[We]:e)===S&&$e.call(e)===Qe)}function dn(e){if(e){if(Je)return e[je]();var n;return e&&e.getUTCFullYear?(n=function(e){e=""+e;return 1===e.length?"0"+e:e},e.getUTCFullYear()+"-"+n(1+e.getUTCMonth())+"-"+n(e.getUTCDate())+"T"+n(e.getUTCHours())+":"+n(e.getUTCMinutes())+":"+n(e.getUTCSeconds())+"."+(e.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"):void 0}}function j(e,n,t){var r=e.length;try{for(var i=0;i<r&&!(i in e&&-1===n.call(t||e,e[i],i,e));i++);}catch(o){}}function gn(e,n,t){if(e){if(e[qe])return e[qe](n,t);var r=e.length,t=t||0;try{for(var i=Math.max(0<=t?t:r-Math.abs(t),0);i<r;i++)if(i in e&&e[i]===n)return i}catch(o){}}return-1}function pn(e,n,t){if(e){if(e.map)return e.map(n,t);var r=e.length,i=t||e,o=Array(r);try{for(var a=0;a<r;a++)a in e&&(o[a]=n.call(i,e[a],e))}catch(s){}}return o}function g(e){return e&&(Xe&&e[Ve]?e[Ve]():e.replace?e.replace(/^\s+|\s+$/g,""):e)}var vn=!{toString:null}.propertyIsEnumerable("toString"),hn=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];function mn(e){var n=typeof e;if(n===S||n===x&&null!==e||L("objKeys called on non-object"),!vn&&Ge)return Ge(e);var t,r=[];for(t in e)e&&A.call(e,t)&&r.push(t);if(vn)for(var i=hn.length,o=0;o<i;o++)e&&A.call(e,hn[o])&&r.push(hn[o]);return r}function yn(e,n,t,r){if(He)try{var i={enumerable:!0,configurable:!0};return t&&(i.get=t),r&&(i.set=r),He(e,n,i),!0}catch(o){}return!1}var In=r||function(e){return e};function Cn(){var e=Date;return e.now?e.now():(new e).getTime()}function K(e){return un(e)?e.name:D}function k(e,n,t,r,i){var o=t;!e||(o=e[n])===t||i&&!i(o)||r&&!r(t)||(e[n]=o=t)}function Sn(e){return!e}function xn(e){return!!e}function q(e){throw Error(e)}function Tn(e,n,t,r,i){var o,a,s;void 0===i&&(i=!0),e&&n&&t&&(i||P(e[n]))&&(e[n]=(o=r,s=a=null,F(i=t)?a=i:s=i,function(){var e=arguments;if(s=a?a():s)return s[o].apply(s,e)}))}function bn(e){var t={};return U(e,function(e,n){t[e]=n,P(t[n])||q("["+n+"] exists for "+e),t[n]=e}),In(t)}function wn(e){return e&&_?t(_({},e)):e}var _n="window",Nn="navigator",An="location",En="console",Rn="JSON",Ln="crypto",Fn="msCrypto",Mn="msie",kn="trident/",Dn="XMLHttpRequest",Pn=null,Bn=null,Un=null,On=null;function zn(e,n){var t,r=!1;if(e){try{(r=n in e)||(t=e[o])&&(r=n in t)}catch(i){}if(!r)try{r=!P((new e)[n])}catch(i){}}return r}function v(e){var n=R();return n&&n[e]?n[e]:e===_n&&jn()?window:null}function jn(){return typeof window===x&&window}function Kn(){return jn()?window:v(_n)}function qn(){return typeof document===x&&document?document:v("document")}function Vn(){return!(typeof navigator!==x||!navigator)}function Wn(){return Vn()?navigator:v(Nn)}function Hn(){return typeof JSON===x&&JSON||null!==v(Rn)}function Gn(){return Hn()?JSON||v(Rn):null}function Xn(){var e=Wn();return!e||e.userAgent===Bn&&null!==Pn||(e=((Bn=e.userAgent)||D).toLowerCase(),Pn=O(e,Mn)||O(e,kn)),Pn}function V(e){var n=Object[o].toString.call(e),t=D;return"[object Error]"===n?t="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":Hn()&&(t=Gn().stringify(e)),n+t}function Yn(){return On=null===On?Vn()&&!!Wn().sendBeacon:On}function Jn(e){var n=!1;try{var n=!!v("fetch"),t=v("Request");n&&e&&t&&(n=zn(t,"keepalive"))}catch(r){}return n}function Zn(){return Un=null===Un&&(Un=typeof XDomainRequest!==T)&&$n()?Un&&!zn(v(Dn),"withCredentials"):Un}function $n(){var e=!1;try{e=!!v(Dn)}catch(n){}return e}var Qn,et=["eventsSent","eventsDiscarded","eventsSendRequest","perfEvent"],nt=null;function tt(e){var n=nt;return(n=n||!0===e.disableDbgExt?n:nt||(e=v("Microsoft"),nt=e?e.ApplicationInsights:nt))?n.ChromeDbgExt:null}function rt(e){return e?'"'+e.replace(/\"/g,D)+'"':D}function it(e,n){var t,r=typeof console!==T?console:v(En);r&&(t="log",F(r[t=r[e]?e:t])&&r[t](n))}at.dataType="MessageData";var ot=at;function at(e,n,t,r){void 0===t&&(t=!1),this.messageId=e,this.message=(t?"AI: ":"AI (Internal): ")+e;t=D,Hn()&&(t=Gn().stringify(r)),e=(n?" message:"+rt(n):D)+(r?" props:"+rt(t):D);this.message+=e}function st(e,n){return(e||{}).logger||new ut(n)}var ut=function oa(r){this.identifier="DiagnosticLogger",this.queue=[];var i=0,s={};m(oa,this,function(o){function e(e,n){e=r[e];return B(e)?n:e}function a(e,n){var t=tt(r);t&&t.diagLog&&t.diagLog(e,n)}B(r)&&(r={}),o.consoleLoggingLevel=function(){return e("loggingLevelConsole",0)},o.telemetryLoggingLevel=function(){return e("loggingLevelTelemetry",1)},o.maxInternalMessageLimit=function(){return e("maxMessageLimit",25)},o.enableDebugExceptions=function(){return e("enableDebugExceptions",!1)},o.throwInternal=function(e,n,t,r,i){n=new ot(n,t,i=void 0!==i&&i,r);if(o.enableDebugExceptions())throw n;t=1===e?"errorToConsole":"warnToConsole";P(n.message)?a("throw"+(1===e?"Critical":"Warning"),n):(r=o.consoleLoggingLevel(),i?(i=+n.messageId,!s[i]&&e<=r&&(o[t](n.message),s[i]=!0)):e<=r&&o[t](n.message),o.logInternalMessage(e,n))},o.warnToConsole=function(e){it("warn",e),a("warning",e)},o.errorToConsole=function(e){it("error",e),a("error",e)},o.resetInternalMessageCount=function(){i=0,s={}},o.logInternalMessage=function(e,n){var t,r;i>=o.maxInternalMessageLimit()||(r=!0,t="AITR_"+n.messageId,s[t]?r=!1:s[t]=!0,r&&(e<=o.telemetryLoggingLevel()&&(o.queue.push(n),i++,a(1===e?"error":"warn",n)),i===o.maxInternalMessageLimit()&&(r=new ot(23,t="Internal events throttle limit per PageView reached for this app.",!1),o.queue.push(r),1===e?o.errorToConsole(t):o.warnToConsole(t))))}})};function W(e,n,t,r,i,o){void 0===o&&(o=!1),(e||new ut).throwInternal(n,t,r,i,o)}lt.ParentContextKey="parent",lt.ChildrenContextKey="childEvts";var ct=lt;function lt(e,i,n){var t,o=this,a=!1;o.start=Cn(),o.name=e,o.isAsync=n,o.isChildEvt=function(){return!1},F(i)&&(a=yn(o,"payload",function(){return!t&&F(i)&&(t=i(),i=null),t})),o.getCtx=function(e){return e?(e===lt.ParentContextKey||e===lt.ChildrenContextKey?o:o.ctx||{})[e]:null},o.setCtx=function(e,n){e&&(e===lt.ParentContextKey?(o[e]||(o.isChildEvt=function(){return!0}),o[e]=n):e===lt.ChildrenContextKey?o[e]=n:(o.ctx=o.ctx||{})[e]=n)},o.complete=function(){var e=0,n=o.getCtx(lt.ChildrenContextKey);if(z(n))for(var t=0;t<n.length;t++){var r=n[t];r&&(e+=r.time)}o.time=Cn()-o.start,o.exTime=o.time-e,o.complete=function(){},!a&&F(i)&&(o.payload=i())}}var ft=function aa(n){this.ctx={},m(aa,this,function(t){t.create=function(e,n,t){return new ct(e,n,t)},t.fire=function(e){e&&(e.complete(),n&&F(n.perfEvent)&&n.perfEvent(e))},t.setCtx=function(e,n){e&&((t.ctx=t.ctx||{})[e]=n)},t.getCtx=function(e){return(t.ctx||{})[e]}})},dt="CoreUtils.doPerf";function gt(e,n,t,r,i){if(e)if(e=F(e.getPerfMgr)?e.getPerfMgr():e){var o,a=void 0,s=e.getCtx(dt);try{if(a=e.create(n(),r,i))return s&&a.setCtx&&(a.setCtx(ct.ParentContextKey,s),s.getCtx&&s.setCtx&&((o=s.getCtx(ct.ChildrenContextKey))||(o=[],s.setCtx(ct.ChildrenContextKey,o)),o.push(a))),e.setCtx(dt,a),t(a)}catch(u){a&&a.setCtx&&a.setCtx("exception",u)}finally{a&&e.fire(a),e.setCtx(dt,s)}}t()}var pt=4294967296,vt=4294967295,ht=!1,mt=123456789,yt=987654321;function It(e){e<0&&(e>>>=0),mt=123456789+e&vt,yt=987654321-e&vt,ht=!0}function Ct(){try{var e=2147483647&Cn();It((Math.random()*pt^e)+e)}catch(n){}}function St(e){return 0<e?Math.floor(xt()/vt*(e+1))>>>0:0}function xt(e){var n=0,t=v(Ln)||v(Fn);return 0===(n=t&&t.getRandomValues?t.getRandomValues(new Uint32Array(1))[0]&vt:n)&&Xn()&&(ht||Ct(),n=Tt()&vt),0===n&&(n=Math.floor(pt*Math.random()|0)),e||(n>>>=0),n}function Tt(e){var n=((yt=36969*(65535&yt)+(yt>>16)&vt)<<16)+(65535&(mt=18e3*(65535&mt)+(mt>>16)&vt))>>>0&vt|0;return e||(n>>>=0),n}function bt(e){void 0===e&&(e=22);for(var n=xt()>>>0,t=0,r=D;r.length<e;)r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[0|63&n]||"",n>>>=6,5==++t&&(n=(xt()<<2&4294967295|3&n)>>>0,t=0);return r}var wt=e,_t="2.7.3",Nt="."+bt(6),At=0;function Et(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType}function Rt(e,n){return sn(e+At+++((n=void 0!==n&&n)?"."+_t:"")+Nt)}function Lt(e){var o={id:Rt("_aiData-"+(e||"")+"."+_t),accept:Et,get:function(e,n,t,r){var i=e[o.id];return i?i[sn(n)]:(r&&((i=function(e,n){var t=n[e.id];if(!t){t={};try{Et(n)&&!function(e,n,t){if(wt)try{return wt(e,n,{value:t,enumerable:!1,configurable:!0}),1}catch(r){}}(n,e.id,t)&&(n[e.id]=t)}catch(r){}}return t}(o,e))[sn(n)]=t),t)},kill:function(e,n){if(e&&e[n])try{delete e[n]}catch(t){}}};return o}var Ft=Lt("plugin");function Mt(e){return Ft.get(e,"state",{},!0)}function kt(t,r){for(var i,e=[],n=null,o=t.getNext();o;){var a=o.getPlugin();a&&(n&&F(n[be])&&F(a[xe])&&n[be](a),(F(a[we])?a[we]():(i=Mt(a))[we])||e.push(a),n=a,o=o.getNext())}j(e,function(e){var n=t.core();e.initialize(t.getCfg(),n,r,t.getNext()),i=Mt(e),e[Ne]||i[Ne]||(i[Ne]=n),i[we]=!0,delete i[_e]})}function Dt(e){return e.sort(function(e,n){var t=0,r=F(n[xe]);return F(e[xe])?t=r?e[Te]-n[Te]:1:r&&(t=-1),t})}var Pt="TelemetryPluginChain",Bt="_hasRun",Ut="_getTelCtx",Ot=0;function zt(e,a,t,n){var r=null,i=[],o=(null!==n&&(r=n?function(e,n,t,r){for(;e;){if(e.getPlugin()===r)return e;e=e.getNext()}return Vt([r],n,t)}(e,a,t,n):e),{_next:function(){var e,n=r;return r=n?n.getNext():null,n||(e=i)&&0<e.length&&(j(e,function(e){try{e.func.call(e.self,e.args)}catch(n){W(t.logger,2,73,"Unexpected Exception during onComplete - "+V(n))}}),i=[]),n},ctx:{core:function(){return t},diagLog:function(){return st(t,a)},getCfg:function(){return a},getExtCfg:s,getConfig:function(e,n,t){void 0===t&&(t=!1);var r,e=s(e,null);return e&&!B(e[n])?r=e[n]:a&&!B(a[n])&&(r=a[n]),B(r)?t:r},hasNext:function(){return!!r},getNext:function(){return r},setNext:function(e){r=e},iterate:function(e){for(;n=o._next();){var n=n.getPlugin();n&&e(n)}},onComplete:function(e,n){for(var t=[],r=2;r<arguments.length;r++)t[r-2]=arguments[r];e&&i.push({func:e,self:P(n)?o.ctx:n,args:t})}}});function s(e,n,t){var r,i,o;return void 0===n&&(n={}),void 0===t&&(t=0),(r=a&&(i=a.extensionConfig)&&e?i[e]:r)?an(n)&&0!==t&&(o=function d(){var e=arguments,n=e[0]||{},t=e.length,r=!1,i=1;for(0<t&&ln(n)&&(r=n,n=e[i]||{},i++),an(n)||(n={});i<t;i++){var o,a,s,u,c=e[i],l=z(c),f=an(c);for(o in c)(l&&o in c||f&&A.call(c,o))&&(a=c[o],s=void 0,r&&a&&((s=z(a))||fn(a))&&(u=n[o],s?z(u)||(u=[]):fn(u)||(u={}),a=d(r,u,a)),a!==undefined&&(n[o]=a))}return n}(!0,n,r),a&&2===t&&U(n,function(e){var n;B(o[e])&&!B(n=a[e])&&(o[e]=n)})):r=n,r}return o}function jt(e,t,r,n){var i=zt(e,t,r,n),o=i.ctx;return o.processNext=function(e){var n=i._next();return n&&n.processTelemetry(e,o),!n},o.createNew=function(e,n){return jt((e=z(e=void 0===e?null:e)?Vt(e,t,r,n):e)||o.getNext(),t,r,n)},o}function Kt(e,t,r,n){var i=zt(e,t,r,n),o=i.ctx;return o.processNext=function(e){var n=i._next();return n&&n.unload(o,e),!n},o.createNew=function(e,n){return Kt((e=z(e=void 0===e?null:e)?Vt(e,t,r,n):e)||o.getNext(),t,r,n)},o}function qt(e,t,r,n){var i=zt(e,t,r,n).ctx;return i.processNext=function(n){return i.iterate(function(e){F(e[Ae])&&e[Ae](i,n)})},i.createNew=function(e,n){return qt((e=z(e=void 0===e?null:e)?Vt(e,t,r,n):e)||i.getNext(),t,r,n)},i}function Vt(e,n,t,r){var i,o=null,a=!r;return z(e)&&0<e.length&&(i=null,j(e,function(e){(a=!a&&r===e||a)&&e&&F(e.processTelemetry)&&(e=Wt(e,n,t),o=o||e,i&&i._setNext(e),i=e)})),r&&!o?Vt([r],n,t):o}function Wt(u,r,i){var c=null,o=F(u.processTelemetry),a=F(u.setNextPlugin),l=u?u.identifier+"-"+u.priority+"-"+Ot++:"Unknown-0-"+Ot++,s={getPlugin:function(){return u},getNext:function(){return c},processTelemetry:function(t,e){var n;f(e=e||(n=(n=u&&F(u[Ut])?u[Ut]():n)||jt(s,r,i)),function(e){if(!u||!o)return!1;var n=Mt(u);return!n[_e]&&!n[Ee]&&(a&&u.setNextPlugin(c),u.processTelemetry(t,e),!0)},"processTelemetry",function(){return{item:t}},!t.sync)||e.processNext(t)},unload:function(r,i){f(r,function(){var e,n,t=!1;return u&&(e=Mt(u),n=u[Ne]||e.core,!u||n&&n!==r[Ne]()||e[_e]||(e[Ne]=null,e[_e]=!0,e[we]=!1,u[_e]&&!0===u[_e](r,i)&&(t=!0))),t},"unload",function(){},i.isAsync)||r.processNext(i)},update:function(r,i){f(r,function(){var e,n,t=!1;return u&&(e=Mt(u),n=u[Ne]||e.core,!u||n&&n!==r[Ne]()||e[_e]||u[Ae]&&!0===u[Ae](r,i)&&(t=!0)),t},"update",function(){},!1)||r.processNext(i)},_id:l,_setNext:function(e){c=e}};function f(t,r,i,e,n){var o=!1,a=u?u.identifier:Pt,s=(s=t[Bt])||(t[Bt]={});return t.setNext(c),u&&gt(t[Ne](),function(){return a+":"+i},function(){s[l]=!0;try{var e=c?c._id:D;e&&(s[e]=!1),o=r(t)}catch(n){e=!c||s[c._id];e&&(o=!0),c&&e||W(t.diagLog(),1,73,"Plugin ["+u.identifier+"] failed during "+i+" - "+V(n)+", run flags: "+V(s))}},e,n),o}return In(s)}var Ht="toGMTString",Gt="toUTCString",Xt="cookie",Yt="expires",Jt="enabled",Zt="isCookieUseDisabled",$t="disableCookiesUsage",Qt="_ckMgr",er=null,nr=null,tr=null,rr=qn(),ir={},or={};function ar(e){return!e||e.isEnabled()}function sr(e,i){k(t=(e=e||or).cookieCfg=e.cookieCfg||{},"domain",e.cookieDomain,on,B),k(t,"path",e.cookiePath||"/",null,B),B(t[Jt])&&(n=void 0,P(e[Zt])||(n=!e[Zt]),P(e[$t])||(n=!e[$t]),t[Jt]=n);var n,t,c=t,l=c.path||"/",f=c.domain,r=!1!==c[Jt],d={isEnabled:function(){var e=r&&ur(i),n=or[Qt];return e&&n&&d!==n?ar(n):e},setEnabled:function(e){r=!1!==e},set:function(e,n,t,r,i){var o,a,s,u=!1;return ar(d)&&(o={},-1!=(s=(a=g(n||D)).indexOf(";"))&&(a=g(n.substring(0,s)),o=cr(n.substring(1+s))),k(o,"domain",r||f,xn,P),B(t)||(s=Xn(),P(o[Yt])&&0<(n=Cn()+1e3*t)&&((r=new Date).setTime(n),k(o,Yt,lr(r,s?Ht:Gt)||lr(r,s?Ht:Gt)||D,xn)),s||k(o,"max-age",D+t,null,P)),(n=typeof location===x&&location?location:v(An))&&"https:"===n.protocol&&(k(o,"secure",null,null,P),(nr=null===nr?!(M(r=(Wn()||{}).userAgent)&&(O(r,"CPU iPhone OS 12")||O(r,"iPad; CPU OS 12")||O(r,"Macintosh; Intel Mac OS X 10_14")&&O(r,"Version/")&&O(r,"Safari")||O(r,"Macintosh; Intel Mac OS X 10_14")&&function(e,n){var t=!1;if(!e||(t=e===n))return t;if(Ye)return e[Ke](n);var r=e,i=n,t=!1,e=r?r.length:0;if(e&&40<=e&&!(t=r===i)){for(var o=e-1,a=39;0<=a;a--){if(r[o]!=i[a])return;o--}t=!0}return t}(r,"AppleWebKit/605.1.15 (KHTML, like Gecko)")||O(r,"Chrome/5")||O(r,"Chrome/6")||O(r,"UnrealEngine")&&!O(r,"Chrome")||O(r,"UCBrowser/12")||O(r,"UCBrowser/11"))):nr)&&k(o,"SameSite","None",null,P)),k(o,"path",i||l,null,P),(c.setCookie||dr)(e,fr(a,o)),u=!0),u},get:function(e){var n=D;return ar(d)?(c.getCookie||function(e){var n,t=D;return rr&&(n=rr[Xt]||D,tr!==n&&(ir=cr(n),tr=n),t=g(ir[e]||D)),t})(e):n},del:function(e,n){return!!ar(d)&&d.purge(e,n)},purge:function(e,n){var t,r=!1;return ur(i)&&((t={}).path=n||"/",t[Yt]="Thu, 01 Jan 1970 00:00:01 GMT",n=t,Xn()||(n["max-age"]="0"),(c.delCookie||dr)(e,fr(D,n)),r=!0),r}};return d[Qt]=d}function ur(e){if(null===er){er=!1;try{er=(rr||{})[Xt]!==undefined}catch(n){W(e,2,68,"Cannot access document.cookie - "+K(n),{exception:V(n)})}}return er}function cr(e){var t={};return e&&e.length&&j(g(e).split(";"),function(e){var n;(e=g(e||D))&&(-1==(n=e.indexOf("="))?t[e]=null:t[g(e.substring(0,n))]=g(e.substring(1+n)))}),t}function lr(e,n){return F(e[n])?e[n]():null}function fr(e,n){var t=e||D;return U(n,function(e,n){t+="; "+e+(B(n)?D:"="+n)}),t}function dr(e,n){rr&&(rr[Xt]=e+"="+n)}var gr="extensionConfig",pr=500,vr="Channel has invalid priority - ";function hr(e,n,t,r){n&&z(n)&&0<n.length&&(j(n=n.sort(function(e,n){return e.priority-n.priority}),function(e){e.priority<pr&&q(vr+e.identifier)}),e.push({queue:In(n),chain:Vt(n,t,r)}))}function mr(){var n=[];return{add:function(e){e&&n.push(e)},run:function(t,r){j(n,function(e){try{e(t,r)}catch(n){W(t.diagLog(),2,73,"Unexpected error calling unload handler - "+V(n))}}),n=[]}}}var yr,Ir="getPlugin",ke=function sa(){var i,o,u,c,l,a=this;function n(e){var n,e=e=void 0===e?null:e;return e||(n=o||jt(null,{},a.core),e=u&&u[Ir]?n.createNew(null,u[Ir]):n.createNew(null,u)),e}function f(e,n,t){e&&k(e,gr,[],null,B),!t&&n&&(t=n.getProcessTelContext().getNext());var r=u;u&&u[Ir]&&(r=u[Ir]()),a.core=n,o=jt(t,e,n,r)}function d(){i=!1,a.core=null,u=o=null,l=[],c=mr()}d(),m(sa,a,function(s){s.initialize=function(e,n,t,r){f(e,n,r),i=!0},s.teardown=function(e,n){var t,r,i,o;if(s.core&&(!e||s.core===e.core()))return r=!1,i=e||Kt(null,{},s.core,u&&u[Ir]?u[Ir]():u),o=n||{reason:0,isAsync:!1},s[Re]&&!0===s[Re](i,o,a)?t=!0:a(),t;function a(){r||(r=!0,c.run(i,n),j(l,function(e){e.rm()}),l=[],!0===t&&i.processNext(o),d())}},s.update=function(e,n){var t,r,i;if(s.core&&(!e||s.core===e.core()))return r=!1,i=e||qt(null,{},s.core,u&&u[Ir]?u[Ir]():u),s._doUpdate&&!0===s._doUpdate(i,n||{reason:0},o)?t=!0:o(),t;function o(){r||(r=!0,f(i.getCfg(),i.core(),i.getNext()))}},s._addHook=function(e){e&&(z(e)?l=l.concat(e):l.push(e))},Tn(s,"_addUnloadCb",function(){return c},"add")}),a.diagLog=function(e){return n(e).diagLog()},a[we]=function(){return i},a.setInitialized=function(e){i=e},a[be]=function(e){u=e},a.processNext=function(e,n){n?n.processNext(e):u&&F(u.processTelemetry)&&u.processTelemetry(e,null)},a._getTelCtx=n},Cr=(n(Sr,yr=ke),Sr);function Sr(){var n,u,e=yr.call(this)||this;function t(){n=0,u=[]}return e.identifier="TelemetryInitializerPlugin",e.priority=199,t(),m(Sr,e,function(s,e){s.addTelemetryInitializer=function(e){var t={id:n++,fn:e};return u.push(t),{remove:function(){j(u,function(e,n){if(e.id===t.id)return u.splice(n,1),-1})}}},s.processTelemetry=function(e,n){for(var t=!1,r=u.length,i=0;i<r;++i){var o=u[i];if(o)try{if(!1===o.fn.call(null,e)){t=!0;break}}catch(a){W(n.diagLog(),1,64,"One of telemetry initializers failed, telemetry item will not be sent: "+K(a),{exception:V(a)},!0)}}t||s.processNext(e,n)},s[Re]=function(){t()}}),e}var xr="Plugins must provide initialize method",Tr="_notificationManager",br="SDK is still unloading...";function wr(e,n){return new ft(n)}function _r(n,e){var t=!1;return j(e,function(e){if(e===n)return t=!0,-1}),t}function Nr(e,t,r,i){j(e,function(e){if(e&&e[t])if(r)setTimeout(function(){return i(e)},0);else try{i(e)}catch(n){}})}var Ar,Er=function ua(e){this.listeners=[];var t=!!(e||{}).perfEvtsSendAll;m(ua,this,function(r){r[De]=function(e){r.listeners.push(e)},r[Pe]=function(e){for(var n=gn(r.listeners,e);-1<n;)r.listeners.splice(n,1),n=gn(r.listeners,e)},r[Be]=function(n){Nr(r.listeners,Be,!0,function(e){e[Be](n)})},r[Ue]=function(n,t){Nr(r.listeners,Ue,!0,function(e){e[Ue](n,t)})},r[Oe]=function(n,t){Nr(r.listeners,Oe,t,function(e){e[Oe](n,t)})},r[ze]=function(n){!n||!t&&n.isChildEvt()||Nr(r.listeners,ze,!1,function(e){n.isAsync?setTimeout(function(){return e[ze](n)},0):e[ze](n)})}})},Rr=(n(Lr,Ar=function ca(){var s,o,d,g,p,v,C,S,x,T,b,w,h,_,N,A,E,R,L=0;m(ca,this,function(m){var n,t,e,r;function a(){s=!1,m.logger=new ut({loggingLevelConsole:1}),m.config=null,m._extensions=[],_=new Cr,h=!(o=[]),A=Rt("AIBaseCore",!(N=w=b=T=S=x=C=v=p=g=d=null)),E=mr()}function y(){return jt(I(),m.config,m)}function u(e,n){r=m.logger,i=pr,o=[],a={},j(p=S,function(e){(B(e)||B(e.initialize))&&q(xr);var n=e.priority,t=e.identifier;e&&n&&(B(a[n])?a[n]=t:r.warnToConsole("Two extensions have same priority #"+n+" - "+a[n]+", "+t)),(!n||n<i)&&o.push(e)});var r,i,o,a,t,s,u,c,l,f,d,g,p={all:p,core:o},p=(x=p.core,C=null,p.all);function v(){return jt(null,f.config,f,null)}function h(e,n,t,r){var i=e?e.length+1:1;function o(){0==--i&&(r&&r(),r=null)}0<i&&j(e,function(e){e&&0<e.queue.length?(e=e.chain,(e=n.createNew(e)).onComplete(o),t(e)):i--}),o()}w=In((d=p,t=e,s=m,c=[],b&&j(b,function(e){return hr(c,e,t,s)}),d&&(u=[],j(d,function(e){e.priority>pr&&u.push(e)}),hr(c,u,t,s)),c)),T?(-1!=(d=p.indexOf(T))&&p.splice(d,1),-1!=(d=x.indexOf(T))&&x.splice(d,1),T._setQueue(w)):(l=w,f=m,g=!1,(d={identifier:"ChannelControllerPlugin",priority:pr,initialize:function(n,t,r,e){g=!0,j(l,function(e){e&&0<e.queue.length&&kt(jt(e.chain,n,t),r)})},isInitialized:function(){return g},processTelemetry:function(n,e){h(l,e||v(),function(e){e[Le](n)},function(){e[Le](n)})},update:function(e,n){var t=n||{reason:0};return h(l,e,function(e){e[Le](t)},function(){e[Le](t)}),!0}})[Me]=function(){h(l,v(),function(e){e.iterate(function(e){e[Me]&&e[Me]()})},null)},d[Fe]=function(){h(l,v(),function(e){e.iterate(function(e){e[Fe]&&e[Fe]()})},null)},d[_e]=function(e,n){var t=n||{reason:0,isAsync:!1};return h(l,e,function(e){e[Le](t)},function(){e[Le](t),g=!1}),!0},d.getChannel=function(n){var t=null;return l&&0<l.length&&j(l,function(e){if(e&&0<e.queue.length&&(j(e.queue,function(e){if(e.identifier===n)return t=e,-1}),t))return-1}),t},d.flush=function(t,e,r,i){var o=1,n=!1,a=null;function s(){o--,n&&0===o&&(a&&(clearTimeout(a),a=null),e&&e(n),e=null)}i=i||5e3,h(l,v(),function(e){e.iterate(function(e){var n;e.flush&&(o++,n=!1,e.flush(t,function(){n=!0,s()},r)||n||(t&&null==a?a=setTimeout(function(){a=null,s()},i):s()))})},function(){n=!0,s()})},d._setQueue=function(e){l=e},T=d),p.push(T),x.push(T),m._extensions=Dt(p),T.initialize(e,m,p),kt(y(),p),m._extensions=In(Dt(x||[])).slice(),n&&(d=n,e=qt(I(),m.config,m),m._updateHook&&!0===m._updateHook(e,d)||e.processNext(d))}function c(n){var r=null;return j(m._extensions,function(e){if(e.identifier===n&&e!==T&&e!==_)return r=e,-1}),(r=!r&&T?T.getChannel(n):r)?{plugin:r,setEnabled:function(e){Mt(r)[Ee]=!e},isEnabled:function(){var e=Mt(r);return!e[_e]&&!e[Ee]},remove:function(e,n){var t=[r];l(t,{reason:1,isAsync:e=void 0===e||e},function(e){e&&u(m.config,{reason:32,removed:t}),n&&n(e)})}}:null}function I(){var e;return C||(~(e=(x||[]).slice()).indexOf(_)||e.push(_),C=Vt(Dt(e),m.config,m)),C}function l(o,e,n){var t;o&&0<o.length?((t=Kt(Vt(o,m.config,m),m.config,m)).onComplete(function(){var r=!1,t=[],i=(j(S,function(e,n){_r(e,o)?r=!0:t.push(e)}),S=t,[]);b&&(j(b,function(e,n){var t=[];j(e,function(e){_r(e,o)?r=!0:t.push(e)}),i.push(t)}),b=i),n&&n(r)}),t.processNext(e)):n(!1)}function i(){var e=m.logger?m.logger.queue:[];e&&(j(e,function(e){e={name:N||"InternalMessageId: "+e.messageId,iKey:m.config.instrumentationKey,time:dn(new Date),baseType:ot.dataType,baseData:{message:e.message}};m.track(e)}),e.length=0)}function f(e){var n=m.logger;n?W(n,2,73,e):q(e)}a(),m.isInitialized=function(){return s},m.initialize=function(e,n,t,r){h&&q(br),m.isInitialized()&&q("Core should not be initialized more than once"),e&&!B(e.instrumentationKey)||q("Please provide instrumentation key"),d=r,m[Tr]=r,m.config=e||{};var i,o,r=e,r=(!0===r.disableDbgExt&&R&&(d[Pe](R),R=null),d&&!R&&!0!==r.disableDbgExt&&(R=function(e){if(!Qn){Qn={};for(var n=0;n<et.length;n++)Qn[et[n]]=function(n,t){return function(){var e=tt(t);e&&(e=e.listener)&&e[n]&&e[n].apply(e,arguments)}}(et[n],e)}return Qn}(r),d[De](R)),e);!r.enablePerfMgr&&p&&(p=null),r.enablePerfMgr&&k(m.config,"createPerfMgr",wr),e.extensions=B(e.extensions)?[]:e.extensions,e?!(o=e[gr])&&B(o)&&(o=P(i)?{}:i,e[gr]=o):o=P(i)?{}:i,o.NotificationManager=d,t&&(m.logger=t),(S=[]).push.apply(S,Z(Z([],n),e.extensions)),b=(e||{}).channels,u(e,null),0===m.getTransmissionControls().length&&q("No channels available"),s=!0,m.releaseQueue()},m.getTransmissionControls=function(){var n=[];return j(w,function(e){n.push(e.queue)}),In(n)},m.track=function(e){k(e,"iKey",m.config.instrumentationKey,null,Sn),k(e,"time",dn(new Date),null,Sn),k(e,"ver","4.0",null,B),!h&&m.isInitialized()?y().processNext(e):o.push(e)},m.getProcessTelContext=y,m.getNotifyMgr=function(){var e;return d||(d=X(((e={})[De]=function(e){},e[Pe]=function(e){},e[Be]=function(e){},e[Ue]=function(e,n){},e[Oe]=function(e,n){},e)),m[Tr]=d),d},m[De]=function(e){d&&d[De](e)},m[Pe]=function(e){d&&d[Pe](e)},m.getCookieMgr=function(){return v=v||sr(m.config,m.logger)},m.setCookieMgr=function(e){v=e},m.getPerfMgr=function(){return g||p||m.config&&m.config.enablePerfMgr&&F(m.config.createPerfMgr)&&(p=m.config.createPerfMgr(m,m.getNotifyMgr())),g||p||null},m.setPerfMgr=function(e){g=e},m.eventCnt=function(){return o.length},m.releaseQueue=function(){var e;s&&0<o.length&&(e=o,o=[],j(e,function(e){y().processNext(e)}))},m.pollInternalLogs=function(e){N=e;e=m.config.diagnosticLogInterval;return e&&0<e||(e=1e4),L&&clearInterval(L),L=setInterval(function(){i()},e)},m.stopPollingInternalLogs=function(){L&&(clearInterval(L),L=0,i())},t=function(){return _},e=["addTelemetryInitializer"],void 0===r&&(r=!0),(n=m)&&t&&an(n)&&z(e)&&j(e,function(e){M(e)&&Tn(n,e,t,e,r)}),m.unload=function(e,n,t){s||q("SDK is not initialized"),h&&q(br);var r={reason:50,isAsync:e=void 0===e||e,flushComplete:!1},i=Kt(I(),m.config,m);function o(e){r.flushComplete=e,h=!0,E.run(i,r),m.stopPollingInternalLogs(),i.processNext(r)}i.onComplete(function(){a(),n&&n(r)},m),T?T.flush(e,o,6,t):o(!0)},m.getPlugin=c,m.addPlugin=function(e,n,t,r){if(void 0===t&&(t=!0),!e)return r&&r(!1),void f(xr);var i=c(e.identifier);if(i&&!n)return r&&r(!1),void f("Plugin ["+e.identifier+"] is already loaded!");var o,a={reason:16};function s(){S.push(e),a.added=[e],u(m.config,a),r&&r(!0)}i?l(o=[i.plugin],{reason:2,isAsync:t},function(e){e?(a.removed=o,a.reason|=32,s()):r&&r(!1)}):s()},m.evtNamespace=function(){return A},Tn(m,"addUnloadCb",function(){return E},"add")})}),Lr);function Lr(){var e=Ar.call(this)||this;return m(Lr,e,function(t,i){function n(e){var n=t.getNotifyMgr();n&&n.eventsDiscarded([e],2)}t.initialize=function(e,n,t,r){i.initialize(e,n,t||new ut(e),r||new Er(e))},t.track=function(e){gt(t.getPerfMgr(),function(){return"AppInsightsCore:track"},function(){if(null===e&&(n(e),q("Invalid telemetry item")),B(e.name))throw n(e),Error("telemetry name required");i.track(e)},function(){return{item:e}},!e.sync)}}),e}var Fr="on",Mr="attachEvent",kr="addEventListener",Dr="detachEvent",Pr="removeEventListener",Br="events",Ur=(Rt("aiEvtPageHide"),Rt("aiEvtPageShow"),1),Or=Lt("events"),zr=/^([^.]*)(?:\.(.+)|)/;function jr(e){return e&&e.replace?e.replace(/^\s*\.*|\.*\s*$/g,""):e}function Kr(e,n){n&&(t="",z(n)?(t="",j(n,function(e){(e=jr(e))&&("."!==e[0]&&(e="."+e),t+=e)})):t=jr(n),t&&(e=(e||"")+(t="."!==t[0]?"."+t:t)));var t,n=zr.exec(e)||[];return{type:n[1],ns:(n[2]||"").split(".").sort().join(".")}}function qr(e,n,t){e=Or.get(e,Br,{},t=void 0===t||t);return e[n]||(e[n]=[])}function Vr(e,n,t,r){e&&n&&n.type&&(e[Pr]?e[Pr](n.type,t,r):e[Dr]&&e[Dr](Fr+n.type,t))}function Wr(e,n,t,r){for(var i=n.length;i--;){var o=n[i];!o||t.ns&&t.ns!==o.evtName.ns||r&&!r(o)||(Vr(e,o.evtName,o.handler,o.capture),n.splice(i,1))}}function Hr(e,n){return n?z(n)?[e].concat(n):[e,n]:e}function Gr(e,n,t,r,i){void 0===i&&(i=!1);var o,a=!1;if(e)try{var s,u=Kr(n,r),c=u,l=t,f=i,d=!1;(o=e)&&c&&c.type&&l&&(o[kr]?(o[kr](c.type,l,f),d=!0):o[Mr]&&(o[Mr](Fr+c.type,l),d=!0)),(a=d)&&Or.accept(e)&&(s={guid:Ur++,evtName:u,handler:t,capture:i},qr(e,u.type).push(s))}catch(g){}return a}var Xr,Yr=null,Jr={_canUseCookies:undefined,isTypeof:function(e,n){return typeof e===n},isUndefined:P,isNullOrUndefined:B,hasOwnProperty:function(e,n){return!(!e||!A.call(e,n))},isFunction:F,isObject:an,isDate:function(e){return!(!e||"[object Date]"!==Ze.call(e))},isArray:z,isError:un,isString:M,isNumber:cn,isBoolean:ln,toISOString:dn,arrForEach:j,arrIndexOf:gn,arrMap:pn,arrReduce:function(e,n,t){var r;if(e){if(e.reduce)return e.reduce(n,t);var i=e.length,o=0;if(3<=arguments.length)r=t;else{for(;o<i&&!(o in e);)o++;r=e[o++]}for(;o<i;)o in e&&(r=n(r,e[o],o,e)),o++}return r},strTrim:g,objCreate:X,objKeys:mn,objDefineAccessors:yn,addEventHandler:function(e,n,t){var r=!1,i=Kn(),i=(i&&(r=Gr(i,e,n,t),r=Gr(i.body,e,n,t)||r),qn());return i&&Gr(i,e,n,t)||r},dateNow:Cn,isIE:Xn,disableCookies:function(){var e,n;(e=sr[Qt]||or[Qt])||(e=sr[Qt]=sr(void 0,void 0),or[Qt]=e),e=e,n=Jr._canUseCookies,null===Yr&&(Yr=[],Xr=n,yn(Jr,"_canUseCookies",function(){return Xr},function(n){Xr=n,j(Yr,function(e){e.setEnabled(n)})})),-1===gn(Yr,e)&&Yr.push(e),ln(n)&&e.setEnabled(n),ln(Xr)&&e.setEnabled(Xr),e.setEnabled(!1)},newGuid:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(Zr,function(e){var n=0|St(15);return("x"===e?n:3&n|8).toString(16)})},perfNow:function(){var e=v("performance");return e&&e.now?e.now():Cn()},newId:bt,randomValue:St,random32:xt,mwcRandomSeed:function(e){e?It(e):Ct()},mwcRandom32:Tt,generateW3CId:function(){for(var e,n=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],t=D,r=0;r<4;r++)t+=n[15&(e=xt())]+n[e>>4&15]+n[e>>8&15]+n[e>>12&15]+n[e>>16&15]+n[e>>20&15]+n[e>>24&15]+n[e>>28&15];var i=n[8+(3&xt())|0];return t.substr(0,8)+t.substr(9,4)+"4"+t.substr(13,3)+i+t.substr(16,3)+t.substr(19,12)}},Zr=/[xy]/g,H=bn({CRITICAL:1,WARNING:2}),G=bn({BrowserDoesNotSupportLocalStorage:0,BrowserCannotReadLocalStorage:1,BrowserCannotReadSessionStorage:2,BrowserCannotWriteLocalStorage:3,BrowserCannotWriteSessionStorage:4,BrowserFailedRemovalFromLocalStorage:5,BrowserFailedRemovalFromSessionStorage:6,CannotSendEmptyTelemetry:7,ClientPerformanceMathError:8,ErrorParsingAISessionCookie:9,ErrorPVCalc:10,ExceptionWhileLoggingError:11,FailedAddingTelemetryToBuffer:12,FailedMonitorAjaxAbort:13,FailedMonitorAjaxDur:14,FailedMonitorAjaxOpen:15,FailedMonitorAjaxRSC:16,FailedMonitorAjaxSend:17,FailedMonitorAjaxGetCorrelationHeader:18,FailedToAddHandlerForOnBeforeUnload:19,FailedToSendQueuedTelemetry:20,FailedToReportDataLoss:21,FlushFailed:22,MessageLimitPerPVExceeded:23,MissingRequiredFieldSpecification:24,NavigationTimingNotSupported:25,OnError:26,SessionRenewalDateIsZero:27,SenderNotInitialized:28,StartTrackEventFailed:29,StopTrackEventFailed:30,StartTrackFailed:31,StopTrackFailed:32,TelemetrySampledAndNotSent:33,TrackEventFailed:34,TrackExceptionFailed:35,TrackMetricFailed:36,TrackPVFailed:37,TrackPVFailedCalc:38,TrackTraceFailed:39,TransmissionFailed:40,FailedToSetStorageBuffer:41,FailedToRestoreStorageBuffer:42,InvalidBackendResponse:43,FailedToFixDepricatedValues:44,InvalidDurationValue:45,TelemetryEnvelopeInvalid:46,CreateEnvelopeError:47,CannotSerializeObject:48,CannotSerializeObjectNonSerializable:49,CircularReferenceDetected:50,ClearAuthContextFailed:51,ExceptionTruncated:52,IllegalCharsInName:53,ItemNotInArray:54,MaxAjaxPerPVExceeded:55,MessageTruncated:56,NameTooLong:57,SampleRateOutOfRange:58,SetAuthContextFailed:59,SetAuthContextFailedAccountName:60,StringValueTooLong:61,StartCalledMoreThanOnce:62,StopCalledWithoutStart:63,TelemetryInitializerFailed:64,TrackArgumentsNotSpecified:65,UrlTooLong:66,SessionStorageBufferFull:67,CannotAccessCookie:68,IdTooLong:69,InvalidEvent:70,FailedMonitorAjaxSetRequestHeader:71,SendBrowserInfoOnUserInit:72,PluginException:73,NotificationException:74,SnippetScriptLoadFailure:99,InvalidInstrumentationKey:100,CannotParseAiBlobValue:101,InvalidContentBlob:102,TrackPageActionEventFailed:103,FailedAddingCustomDefinedRequestContext:104,InMemoryStorageBufferFull:105});function $r(e,n,t){var r,i,o=n.length,a=(e=e,(n=n)&&150<(n=g(n.toString())).length&&(i=n.substring(0,150),W(e,2,G.NameTooLong,"name is too long. It has been truncated to 150 characters.",{name:n},!0)),i||n);if(a.length!==o){for(var s=0,u=a;t[u]!==undefined;)s++,u=a.substring(0,147)+(r=void 0,(r="00"+s).substr(r.length-3));a=u}return a}function h(e,n,t){var r;return void 0===t&&(t=1024),n&&(t=t||1024,(n=g(n)).toString().length>t&&(r=n.toString().substring(0,t),W(e,2,G.StringValueTooLong,"string value is too long. It has been truncated to "+t+" characters.",{value:n},!0))),r||n}function Qr(e,n){return ri(e,n,2048,G.UrlTooLong)}function ei(e,n){var t;return n&&32768<n.length&&(t=n.substring(0,32768),W(e,2,G.MessageTruncated,"message is too long, it has been truncated to 32768 characters.",{message:n},!0)),t||n}function ni(r,e){var i;return e&&(i={},U(e,function(e,n){if(an(n)&&Hn())try{n=Gn().stringify(n)}catch(t){W(r,2,G.CannotSerializeObjectNonSerializable,"custom property is not valid",{exception:t},!0)}n=h(r,n,8192),e=$r(r,e,i),i[e]=n}),e=i),e}function ti(t,e){var r;return e&&(r={},U(e,function(e,n){e=$r(t,e,r),r[e]=n}),e=r),e}function ri(e,n,t,r){var i;return n&&(n=g(n)).length>t&&(i=n.substring(0,t),W(e,2,r,"input is too long, it has been truncated to "+t+" characters.",{data:n},!0)),i||n}var ii="";function oi(e){var n=ii+Math.floor((e=Math.round(e=isNaN(e)||e<0?0:e))/1e3)%60,t=ii+Math.floor(e/6e4)%60,r=ii+Math.floor(e/36e5)%24,i=Math.floor(e/864e5),e=1===(e=ii+e%1e3).length?"00"+e:2===e.length?"0"+e:e,n=n.length<2?"0"+n:n,t=t.length<2?"0"+t:t,r=r.length<2?"0"+r:r;return(0<i?i+".":ii)+r+":"+t+":"+n+"."+e}var ai="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",si="sampleRate",ui="ProcessLegacy",ci="http.method",li="not_specified",fi=bn({LocalStorage:0,SessionStorage:1}),di=(bn({AI:0,AI_AND_W3C:1,W3C:2}),undefined);function gi(e){try{if(B(R()))return null;var n=new Date,t=v(e===fi.LocalStorage?"localStorage":"sessionStorage"),r=(t.setItem(n.toString(),n.toString()),t.getItem(n.toString())!==n.toString());if(t.removeItem(n.toString()),!r)return t}catch(i){}return null}function pi(){return vi()?gi(fi.SessionStorage):null}function vi(e){return di=e||di===undefined?!!gi(fi.SessionStorage):di}function hi(e,n){var t=pi();if(null!==t)try{return t.getItem(n)}catch(r){di=!1,W(e,2,G.BrowserCannotReadSessionStorage,"Browser failed read of session storage. "+K(r),{exception:V(r)})}return null}function mi(e,n,t){var r=pi();if(null!==r)try{r.setItem(n,t)}catch(i){di=!1,W(e,2,G.BrowserCannotWriteSessionStorage,"Browser failed write to session storage. "+K(i),{exception:V(i)})}}var yi=qn()||{},Ii=0,Ci=[null,null,null,null,null];var Si=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"];function xi(e){return~Si.indexOf(e.toLowerCase())}n(bi,Ti=function(){});var Ti,i=bi;function bi(){return Ti.call(this)||this}n(Ni,wi=function(){this.ver=1,this.sampleRate=100,this.tags={}});var wi,_i=Ni;function Ni(e,n,t){var r=wi.call(this)||this;return r.name=h(e,t)||li,r.data=n,r.time=dn(new Date),r.aiDataContract={time:1,iKey:1,name:1,sampleRate:function(){return 100===r.sampleRate?4:1},tags:1,data:1},r}var Ai,r=function(){this.ver=2,this.properties={},this.measurements={}},Ei=(n(Ri,Ai=r),Ri.envelopeType="Microsoft.ApplicationInsights.{0}.Event",Ri.dataType="EventData",Ri);function Ri(e,n,t,r){var i=Ai.call(this)||this;return i.aiDataContract={ver:1,name:1,properties:0,measurements:0},i.name=h(e,n)||li,i.properties=ni(e,t),i.measurements=ti(e,r),i}var Li="error",u="stack",Fi="stackDetails",Mi="errorSrc",ki="message",Di="description";function Pi(e,n){var t=e;return t&&!M(t)&&(JSON&&JSON.stringify?(t=JSON.stringify(e),!n||t&&"{}"!==t||(t=F(e.toString)?e.toString():""+e)):t=e+" - (Missing JSON.stringify)"),t||""}function Bi(e,n){var t=e;return e&&((t=t&&!M(t)&&(e[ki]||e[Di])||t)&&!M(t)&&(t=Pi(t,!0)),e.filename&&(t=t+" @"+(e.filename||"")+":"+(e.lineno||"?")+":"+(e.colno||"?"))),(n&&"String"!==n&&"Object"!==n&&"Error"!==n&&!~(t||"").indexOf(n)?n+": "+t:t)||""}function Ui(e){return e&&e.src&&M(e.src)&&e.obj&&z(e.obj)}function Oi(e){var e=e||"",n=(e=M(e)?e:M(e[u])?e[u]:""+e).split("\n");return{src:e,obj:n}}function zi(e){var n,t=null;if(e)try{e[u]?t=Oi(e[u]):e[Li]&&e[Li][u]?t=Oi(e[Li][u]):e.exception&&e.exception[u]?t=Oi(e.exception[u]):Ui(e)?t=e:Ui(e[Fi])?t=e[Fi]:window&&window.opera&&e[ki]?t=function(e){for(var n=[],t=e.split("\n"),r=0;r<t.length;r++){var i=t[r];t[r+1]&&(i+="@"+t[r+1],r++),n.push(i)}return{src:e,obj:n}}(e.message):M(e)?t=Oi(e):(n=e[ki]||e[Di]||"",M(e[Mi])&&(n&&(n+="\n"),n+=" from "+e[Mi]),n&&(t=Oi(n)))}catch(r){t=Oi(r)}return t||{src:"",obj:null}}function ji(e){var n="";if(e&&!(n=e.typeName||e.name||""))try{var t=/function (.{1,200})\(/.exec(e.constructor.toString()),n=t&&1<t.length?t[1]:""}catch(r){}return n}function Ki(e){if(e)try{var n,t;if(!M(e))return n=ji(e),(t=Pi(e,!1))&&"{}"!==t||(e[Li]&&(n=ji(e=e[Li])),t=Pi(e,!0)),t.indexOf(n)&&"String"!==n?n+":"+t:t}catch(r){}return""+(e||"")}n(a,qi=function(){this.ver=2,this.exceptions=[],this.properties={},this.measurements={}}),a.CreateAutoException=function(e,n,t,r,i,o,a,s){var u=ji(i||o||e);return{message:Bi(e,u),url:n,lineNumber:t,columnNumber:r,error:Ki(i||o||e),evt:Ki(o||e),typeName:u,stackDetails:zi(a||i||o),errorSrc:s}},a.CreateFromInterface=function(n,e,t,r){var i=e.exceptions&&pn(e.exceptions,function(e){return Hi.CreateFromInterface(n,e)});return new a(n,Y(Y({},e),{exceptions:i}),t,r)},a.prototype.toInterface=function(){var e=this,n=e.exceptions,t=e.properties,r=e.measurements,i=e.severityLevel,o=e.problemGroup,a=e.id,e=e.isManual;return{ver:"4.0",exceptions:n instanceof Array&&pn(n,function(e){return e.toInterface()})||undefined,severityLevel:i,properties:t,measurements:r,problemGroup:o,id:a,isManual:e}},a.CreateSimpleException=function(e,n,t,r,i,o){return{exceptions:[{hasFullStack:!0,message:e,stack:i,typeName:n}]}},a.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",a.dataType="ExceptionData",a.formatError=Ki;var qi,Vi=a;function a(e,n,t,r,i,o){var a=qi.call(this)||this;return a.aiDataContract={ver:1,exceptions:1,severityLevel:0,properties:0,measurements:0},function(e){try{if(an(e))return"ver"in e&&"exceptions"in e&&"properties"in e}catch(n){}}(n)?(a.exceptions=n.exceptions,a.properties=n.properties,a.measurements=n.measurements,n.severityLevel&&(a.severityLevel=n.severityLevel),n.id&&(a.id=n.id),n.problemGroup&&(a.problemGroup=n.problemGroup),a.ver=2,B(n.isManual)||(a.isManual=n.isManual)):(a.exceptions=[new Hi(e,n,t=t||{})],a.properties=ni(e,t),a.measurements=ti(e,r),i&&(a.severityLevel=i),o&&(a.id=o)),a}n(Gi,Wi=function(){this.hasFullStack=!0,this.parsedStack=[]}),Gi.prototype.toInterface=function(){var e=this.parsedStack instanceof Array&&pn(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[u],parsedStack:e||undefined}},Gi.CreateFromInterface=function(e,n){var t=n.parsedStack instanceof Array&&pn(n.parsedStack,function(e){return Ji.CreateFromInterface(e)})||n.parsedStack;return new Gi(e,Y(Y({},n),{parsedStack:t}))};var Wi,Hi=Gi;function Gi(e,n,t){var c,r,i,o,a,s=Wi.call(this)||this;return s.aiDataContract={id:0,outerId:0,typeName:1,message:1,hasFullStack:0,stack:0,parsedStack:2},function(e){try{if(an(e))return"hasFullStack"in e&&"typeName"in e}catch(n){}}(n)?(s.typeName=n.typeName,s.message=n.message,s[u]=n[u],s.parsedStack=n.parsedStack,s.hasFullStack=n.hasFullStack):(r=(o=n)&&o.evt,un(o)||(o=o[Li]||r||o),s.typeName=h(e,ji(o))||li,s.message=ei(e,Bi(n||o,s.typeName))||li,c=n[Fi]||zi(n),s.parsedStack=function(){var e=c.obj;if(e&&0<e.length){var n=[],t=0,r=0;if(j(e,function(e){var e=e.toString();Ji.regex.test(e)&&(e=new Ji(e,t++),r+=e.sizeInBytes,n.push(e))}),32768<r)for(var i=0,o=n.length-1,a=0,s=i,u=o;i<o;){if(32768<(a+=n[i].sizeInBytes+n[o].sizeInBytes)){n.splice(s,u-s+1);break}s=i,u=o,i++,o--}}return n}(),s[u]=(r=e,a="",(o=c)&&(o.obj?j(o.obj,function(e){a+=e+"\n"}):a=o.src||""),(n=a)&&32768<(e=""+n).length&&(i=e.substring(0,32768),W(r,2,G.ExceptionTruncated,"exception is too long, it has been truncated to 32768 characters.",{exception:n},!0)),i||n),s.hasFullStack=z(s.parsedStack)&&0<s.parsedStack.length,t&&(t.typeName=t.typeName||s.typeName)),s}n(Zi,Xi=function(){}),Zi.CreateFromInterface=function(e){return new Zi(e,null)},Zi.prototype.toInterface=function(){return{level:this.level,method:this.method,assembly:this.assembly,fileName:this.fileName,line:this.line}},Zi.regex=/^([\s]+at)?[\s]{0,50}([^\@\()]+?)[\s]{0,50}(\@|\()([^\(\n]+):([0-9]+):([0-9]+)(\)?)$/,Zi.baseSize=58;var Xi,Yi,Ji=Zi;function Zi(e,n){var t,r=Xi.call(this)||this;return r.sizeInBytes=0,r.aiDataContract={level:1,method:1,assembly:0,fileName:0,line:0},"string"==typeof e?(t=e,r.level=n,r.method="<no_method>",r.assembly=g(t),r.fileName="",r.line=0,(n=t.match(Zi.regex))&&5<=n.length&&(r.method=g(n[2])||r.method,r.fileName=g(n[4]),r.line=parseInt(n[5])||0)):(r.level=e.level,r.method=e.method,r.assembly=e.assembly,r.fileName=e.fileName,r.line=e.line,r.sizeInBytes=0),r.sizeInBytes+=r.method.length,r.sizeInBytes+=r.fileName.length,r.sizeInBytes+=r.assembly.length,r.sizeInBytes+=Zi.baseSize,r.sizeInBytes+=r.level.toString().length,r.sizeInBytes+=r.line.toString().length,r}Yi=0,n(eo,$i=function(){this.kind=Yi});var $i,Qi=eo;function eo(){var e=null!==$i&&$i.apply(this,arguments)||this;return e.aiDataContract={name:1,kind:0,value:1,count:0,min:0,max:0,stdDev:0},e}n(ro,no=function(){this.ver=2,this.metrics=[],this.properties={},this.measurements={}}),ro.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",ro.dataType="MetricData";var no,to=ro;function ro(e,n,t,r,i,o,a,s,u){var c=no.call(this)||this,l=(c.aiDataContract={ver:1,metrics:1,properties:0},new Qi);return l.count=0<r?r:undefined,l.max=isNaN(o)||null===o?undefined:o,l.min=isNaN(i)||null===i?undefined:i,l.name=h(e,n)||li,l.value=t,l.stdDev=isNaN(a)||null===a?undefined:a,c.metrics=[l],c.properties=ni(e,s),c.measurements=ti(e,u),c}n(oo,io=r);var io,e=oo;function oo(){var e=io.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}n(uo,ao=e),uo.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",uo.dataType="PageviewData";var ao,so=uo;function uo(e,n,t,r,i,o,a){var s=ao.call(this)||this;return s.aiDataContract={ver:1,name:0,url:0,duration:0,properties:0,measurements:0,id:0},s.id=a&&ri(e,a,128,G.IdTooLong).toString(),s.url=Qr(e,t),s.name=h(e,n)||li,isNaN(r)||(s.duration=oi(r)),s.properties=ni(e,i),s.measurements=ti(e,o),s}n(fo,co=function(){this.ver=2,this.success=!0,this.properties={},this.measurements={}}),fo.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",fo.dataType="RemoteDependencyData";var co,lo=fo;function fo(e,n,t,r,i,o,a,s,u,c,l,f){void 0===u&&(u="Ajax");var d,g,p,v=co.call(this)||this,t=(v.aiDataContract={id:1,ver:1,name:0,resultCode:0,duration:0,success:0,data:0,target:0,type:0,properties:0,measurements:0,kind:0,value:0,count:0,min:0,max:0,stdDev:0,dependencyKind:0,dependencySource:0,commandName:0,dependencyTypeName:0},v.id=n,v.duration=oi(i),v.success=o,v.resultCode=a+"",v.type=h(e,u),n=e,i=s,u=a=o=r,a=(s=t)&&0<s.length?(d=s,p=(t=Ci)[g=Ii],yi.createElement?t[g]||(p=t[g]=yi.createElement("a")):p={host:function(){e=null,d&&null!=(t=d.match(/(\w*):\/\/(.[^/:]+)(\:[\d]+)?/i))&&2<t.length&&M(t[2])&&0<t[2].length&&(e=t[2]||"",2<t.length&&(n=(t[1]||"").toLowerCase(),t=t[3]||"",e+=t="http"==n&&":80"===t||"https"==n&&":443"===t?"":t));var e,n=e||"";if(n){var t=n.match(/(www[0-9]?\.)?(.[^/:]+)(\:[\d]+)?/i);if(null!=t&&3<t.length&&M(t[2])&&0<t[2].length)return t[2]+(t[3]||"")}return n}()},p.href=d,++g>=t.length&&(g=0),Ii=g,g=(t=p).host,a||(null!=t.pathname?("/"!=((p=0===t.pathname.length?"/":t.pathname)[0]||"")&&(p="/"+p),u=t.pathname,h(n,i?i+" "+p:p)):h(n,s))):g=o,{target:g,name:a,data:u});return v.data=Qr(e,r)||t.data,v.target=h(e,t.target),c&&(v.target="".concat(v.target," | ").concat(c)),v.name=h(e,t.name),v.properties=ni(e,l),v.measurements=ti(e,f),v}n(ho,go=function(){this.ver=2,this.properties={},this.measurements={}}),ho.envelopeType="Microsoft.ApplicationInsights.{0}.Message",ho.dataType="MessageData";var go,po,vo=ho;function ho(e,n,t,r,i){var o=go.call(this)||this;return o.aiDataContract={ver:1,message:1,severityLevel:0,properties:0},o.message=ei(e,n=n||li),o.properties=ni(e,r),o.measurements=ti(e,i),t&&(o.severityLevel=t),o}function mo(){var e=po.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}n(mo,po=e),n(Co,yo=mo),Co.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",Co.dataType="PageviewPerformanceData";var yo,Io=Co;function Co(e,n,t,r,i,o,a){var s=yo.call(this)||this;return s.aiDataContract={ver:1,name:0,url:0,duration:0,perfTotal:0,networkConnect:0,sentRequest:0,receivedResponse:0,domProcessing:0,properties:0,measurements:0},s.url=Qr(e,t),s.name=h(e,n)||li,s.properties=ni(e,i),s.measurements=ti(e,o),a&&(s.domProcessing=a.domProcessing,s.duration=a.duration,s.networkConnect=a.networkConnect,s.perfTotal=a.perfTotal,s.receivedResponse=a.receivedResponse,s.sentRequest=a.sentRequest),s}n(To,So=i);var So,xo=To;function To(e,n){var t=So.call(this)||this;return t.aiDataContract={baseType:1,baseData:1},t.baseType=e,t.baseData=n,t}function bo(e){var n="ai."+e+".";return function(e){return n+e}}C.SeverityLevel=void 0,(r=C.SeverityLevel||(C.SeverityLevel={}))[r.Verbose=0]="Verbose",r[r.Information=1]="Information",r[r.Warning=2]="Warning",r[r.Error=3]="Error",r[r.Critical=4]="Critical";var wo,_o,e=bo("application"),i=bo("device"),r=bo("location"),No=bo("operation"),Ao=bo("session"),s=bo("user"),c=bo("cloud"),Eo=bo("internal"),Ro=(_o={applicationVersion:e("ver"),applicationBuild:e("build"),applicationTypeId:e("typeId"),applicationId:e("applicationId"),applicationLayer:e("layer"),deviceId:i("id"),deviceIp:i("ip"),deviceLanguage:i("language"),deviceLocale:i("locale"),deviceModel:i("model"),deviceFriendlyName:i("friendlyName"),deviceNetwork:i("network"),deviceNetworkName:i("networkName"),deviceOEMName:i("oemName"),deviceOS:i("os"),deviceOSVersion:i("osVersion"),deviceRoleInstance:i("roleInstance"),deviceRoleName:i("roleName"),deviceScreenResolution:i("screenResolution"),deviceType:i("type"),deviceMachineName:i("machineName"),deviceVMName:i("vmName"),deviceBrowser:i("browser"),deviceBrowserVersion:i("browserVersion"),locationIp:r("ip"),locationCountry:r("country"),locationProvince:r("province"),locationCity:r("city"),operationId:No("id"),operationName:No("name"),operationParentId:No("parentId"),operationRootId:No("rootId"),operationSyntheticSource:No("syntheticSource"),operationCorrelationVector:No("correlationVector"),sessionId:Ao("id"),sessionIsFirst:Ao("isFirst"),sessionIsNew:Ao("isNew"),userAccountAcquisitionDate:s("accountAcquisitionDate"),userAccountId:s("accountId"),userAgent:s("userAgent"),userId:s("id"),userStoreRegion:s("storeRegion"),userAuthUserId:s("authUserId"),userAnonymousUserAcquisitionDate:s("anonUserAcquisitionDate"),userAuthenticatedUserAcquisitionDate:s("authUserAcquisitionDate"),cloudName:c("name"),cloudRole:c("role"),cloudRoleVer:c("roleVer"),cloudRoleInstance:c("roleInstance"),cloudEnvironment:c("environment"),cloudLocation:c("location"),cloudDeploymentUnit:c("deploymentUnit"),internalNodeName:Eo("nodeName"),internalSdkVersion:Eo("sdkVersion"),internalAgentVersion:Eo("agentVersion"),internalSnippet:Eo("snippet"),internalSdkSrc:Eo("sdkSrc")},n(Lo,wo=function(){var t=this;U(_o,function(e,n){t[e]=n})}),Lo);function Lo(){return wo.call(this)||this}var Fo,f=new Ro,e=function la(t,r){var i=[],o=!1;this._get=function(){return i},this._set=function(e){return i=e},m(la,this,function(n){n.enqueue=function(e){n.count()>=r.eventsLimitInMem()?o||(t.throwInternal(H.WARNING,G.InMemoryStorageBufferFull,"Maximum in-memory buffer size reached: "+n.count(),!0),o=!0):i.push(e)},n.count=function(){return i.length},n.size=function(){for(var e=i.length,n=0;n<i.length;n++)e+=i[n].length;return r.emitLineDelimitedJson()||(e+=2),e},n.clear=function(){o=!(i=[])},n.getItems=function(){return i.slice(0)},n.batchPayloads=function(e){return e&&0<e.length?r.emitLineDelimitedJson()?e.join("\n"):"["+e.join(",")+"]":null}})},Mo=(n(ko,Fo=e),ko);function ko(e,n){e=Fo.call(this,e,n)||this;return m(ko,e,function(e,n){e.markAsSent=function(e){n.clear()},e.clearSent=function(e){}}),e}n(l,Do=e),l.BUFFER_KEY="AI_buffer",l.SENT_BUFFER_KEY="AI_sentBuffer",l.MAX_BUFFER_SIZE=2e3;var Do,Po=l;function l(s,u){var e=Do.call(this,s,u)||this,c=!1;return m(l,e,function(t,n){var e=o(l.BUFFER_KEY),r=o(l.SENT_BUFFER_KEY),r=t._set(e.concat(r));function i(n,e){var t=[];return j(e,function(e){F(e)||-1!==gn(n,e)||t.push(e)}),t}function o(e){try{var e=u.namePrefix&&u.namePrefix()?u.namePrefix()+"_"+e:e,n=hi(s,e);if(n){var t=Gn().parse(n);if((t=M(t)?Gn().parse(t):t)&&z(t))return t}}catch(r){s.throwInternal(H.CRITICAL,G.FailedToRestoreStorageBuffer," storage key: "+e+", "+K(r),{exception:V(r)})}return[]}function a(e,n){try{var e=u.namePrefix&&u.namePrefix()?u.namePrefix()+"_"+e:e,t=JSON.stringify(n);mi(s,e,t)}catch(r){mi(s,e,JSON.stringify([])),s.throwInternal(H.WARNING,G.FailedToSetStorageBuffer," storage key: "+e+", "+K(r)+". Buffer cleared",{exception:V(r)})}}r.length>l.MAX_BUFFER_SIZE&&(r.length=l.MAX_BUFFER_SIZE),a(l.SENT_BUFFER_KEY,[]),a(l.BUFFER_KEY,r),t.enqueue=function(e){t.count()>=l.MAX_BUFFER_SIZE?c||(s.throwInternal(H.WARNING,G.SessionStorageBufferFull,"Maximum buffer size reached: "+t.count(),!0),c=!0):(n.enqueue(e),a(l.BUFFER_KEY,t._get()))},t.clear=function(){n.clear(),a(l.BUFFER_KEY,t._get()),a(l.SENT_BUFFER_KEY,[]),c=!1},t.markAsSent=function(e){a(l.BUFFER_KEY,t._set(i(e,t._get())));var n=o(l.SENT_BUFFER_KEY);n instanceof Array&&e instanceof Array&&((n=n.concat(e)).length>l.MAX_BUFFER_SIZE&&(s.throwInternal(H.CRITICAL,G.SessionStorageBufferFull,"Sent buffer reached its maximum size: "+n.length,!0),n.length=l.MAX_BUFFER_SIZE),a(l.SENT_BUFFER_KEY,n))},t.clearSent=function(e){e=i(e,o(l.SENT_BUFFER_KEY));a(l.SENT_BUFFER_KEY,e)}}),e}var Bo="baseType",d="baseData",y="properties",Uo="true";function I(e,n,t){k(e,n,t,xn)}function Oo(e,t,r){B(e)||U(e,function(e,n){cn(n)?r[e]=n:M(n)?t[e]=n:Hn()&&(t[e]=Gn().stringify(n))})}function zo(t,r){B(t)||U(t,function(e,n){t[e]=n||r})}function jo(e,n,t,r){for(var r=new _i(e,r,n),n=(I(r,"sampleRate",t[si]),(t[d]||{}).startTime&&(r.time=dn(t[d].startTime)),r.iKey=t.iKey,t.iKey.replace(/-/g,"")),n=(r.name=r.name.replace("{0}",n),e),e=t,i=r,o=i.tags=i.tags||{},a=e.ext=e.ext||{},s=e.tags=e.tags||[],u=a.user,u=(u&&(I(o,f.userAuthUserId,u.authId),I(o,f.userId,u.id||u.localId)),a.app),u=(u&&I(o,f.sessionId,u.sesId),a.device),u=(u&&(I(o,f.deviceId,u.id||u.localId),I(o,f.deviceType,u.deviceClass),I(o,f.deviceIp,u.ip),I(o,f.deviceModel,u.model),I(o,f.deviceType,u.deviceType)),e.ext.web),e=(u&&(I(o,f.deviceLanguage,u.browserLang),I(o,f.deviceBrowserVersion,u.browserVer),I(o,f.deviceBrowser,u.browser),I(e=(e=(e=i.data=i.data||{})[d]=e[d]||{})[y]=e[y]||{},"domain",u.domain),I(e,"isManual",u.isManual?Uo:null),I(e,"screenRes",u.screenRes),I(e,"userConsent",u.userConsent?Uo:null)),a.os),u=(e&&I(o,f.deviceOS,e.name),a.trace),c=(u&&(I(o,f.operationParentId,u.parentID),I(o,f.operationName,h(n,u.name)),I(o,f.operationId,u.traceID)),{}),l=s.length-1;0<=l;l--)U(s[l],function(e,n){c[e]=n}),s.splice(l,1);U(s,function(e,n){c[e]=n});e=Y(Y({},o),c);return e[f.internalSdkVersion]||(e[f.internalSdkVersion]="javascript:".concat(qo.Version)),i.tags=wn(e),t.tags=t.tags||[],wn(r)}function Ko(e,n){B(n[d])&&e.throwInternal(H.CRITICAL,G.TelemetryEnvelopeInvalid,"telemetryItem.baseData cannot be null.")}var qo={Version:"2.8.0-beta.2203-05"};function Vo(e,n,t){Ko(e,n);var r={},i={},t=(n[Bo]!==Ei.dataType&&(r.baseTypeSource=n[Bo]),n[Bo]===Ei.dataType?(r=n[d][y]||{},i=n[d].measurements||{}):n[d]&&Oo(n[d],r,i),Oo(n.data,r,i),B(t)||zo(r,t),n[d].name),t=new Ei(e,t,r,i),r=new xo(Ei.dataType,t);return jo(e,Ei.envelopeType,n,r)}var Wo=function fa(f){m(fa,this,function(e){function c(a,s){var e="__aiCircularRefCheck",u={};if(!a)return f.throwInternal(H.CRITICAL,G.CannotSerializeObject,"cannot serialize object because it is null or undefined",{name:s},!0),u;if(a[e])return f.throwInternal(H.WARNING,G.CircularReferenceDetected,"Circular reference detected while serializing object",{name:s},!0),u;if(a.aiDataContract)return a[e]=!0,U(a.aiDataContract,function(e,n){var t=F(n)?1&n():1&n,r=F(n)?4&n():4&n,n=2&n,i=a[e]!==undefined,o=an(a[e])&&null!==a[e];!t||i||n?r||(t=o?(n?l:c)(a[e],e):a[e])!==undefined&&(u[e]=t):f.throwInternal(H.CRITICAL,G.MissingRequiredFieldSpecification,"Missing required field specification. The field is required but not present on source",{field:e,name:s})}),delete a[e],u;if("measurements"===s)u=t(a,"number",s);else if("properties"===s)u=t(a,"string",s);else if("tags"===s)u=t(a,"string",s);else if(z(a))u=l(a,s);else{f.throwInternal(H.WARNING,G.CannotSerializeObjectNonSerializable,"Attempting to serialize an object which does not implement ISerializable",{name:s},!0);try{Gn().stringify(a),u=a}catch(n){f.throwInternal(H.CRITICAL,G.CannotSerializeObject,n&&F(n.toString)?n.toString():"Error serializing object",null,!0)}}return u}function l(e,n){if(e)if(z(e))for(var t=[],r=0;r<e.length;r++){var i=c(e[r],n+"["+r+"]");t.push(i)}else f.throwInternal(H.CRITICAL,G.ItemNotInArray,"This field was specified as an array in the contract but the item is not an array.\r\n",{name:n},!0);return t}function t(e,t,r){var i;return e&&(i={},U(e,function(e,n){"string"===t?n===undefined?i[e]="undefined":null===n?i[e]="null":n.toString?i[e]=n.toString():i[e]="invalid field: toString() is not defined.":"number"===t?n===undefined?i[e]="undefined":i[e]=null===n?"null":isNaN(n=parseFloat(n))?"NaN":n:(i[e]="invalid field: "+r+" is of unknown type.",f.throwInternal(H.CRITICAL,i[e],null,!0))})),i}e.serialize=function(e){e=c(e,"root");try{return Gn().stringify(e)}catch(n){f.throwInternal(H.CRITICAL,G.CannotSerializeObject,n&&F(n.toString)?n.toString():"Error serializing object",null,!0)}}})};function Ho(e,n){var t,r,i=void 0;if(void 0===i&&(i=!1),e)try{var o=Kr(null,n),a=!1,s=e,u=function(e){return!(!o.ns&&null!==e.handler)&&(a=!0)};(t=o).type?Wr(s,qr(s,t.type),t,u):(U(r=Or.get(s,Br,{}),function(e,n){Wr(s,n,t,u)}),0===mn(r).length&&Or.kill(s,Br)),a||Vr(e,o,null,i)}catch(c){}}Xo.prototype.getHashCodeScore=function(e){return this.getHashCode(e)/Xo.INT_MAX_VALUE*100},Xo.prototype.getHashCode=function(e){if(""===e)return 0;for(;e.length<8;)e=e.concat(e);for(var n=5381,t=0;t<e.length;++t)n=(n<<5)+n+e.charCodeAt(t),n&=n;return Math.abs(n)},Xo.INT_MAX_VALUE=2147483647;var Go=Xo;function Xo(){}var Yo=function(){var n=new Go,t=new Ro;this.getSamplingScore=function(e){return e.tags&&e.tags[t.userId]?n.getHashCodeScore(e.tags[t.userId]):e.ext&&e.ext.user&&e.ext.user.id?n.getHashCodeScore(e.ext.user.id):e.tags&&e.tags[t.operationId]?n.getHashCodeScore(e.tags[t.operationId]):e.ext&&e.ext.telemetryTrace&&e.ext.telemetryTrace.traceID?n.getHashCodeScore(e.ext.telemetryTrace.traceID):100*Math.random()}},Jo=(Zo.prototype.isSampledIn=function(e){var n=this.sampleRate;return null===n||n===undefined||100<=n||e.baseType===to.dataType||this.samplingScoreGenerator.getSamplingScore(e)<n},Zo);function Zo(e,n){this.INT_MAX_VALUE=2147483647;n=n||st(null);(100<e||e<0)&&(n.throwInternal(H.WARNING,G.SampleRateOutOfRange,"Sampling rate is out of range (0..100). Sampling will be disabled, you may be sending too much data which may affect your AI service level.",{samplingRate:e},!0),e=100),this.sampleRate=e,this.samplingScoreGenerator=new Yo}function $o(e){try{return e.responseText}catch(n){}return null}function Qo(){return{endpointUrl:function(){return"https://dc.services.visualstudio.com/v2/track"},emitLineDelimitedJson:function(){return!1},maxBatchInterval:function(){return 15e3},maxBatchSizeInBytes:function(){return 102400},disableTelemetry:function(){return!1},enableSessionStorageBuffer:function(){return!0},isRetryDisabled:function(){return!1},isBeaconApiDisabled:function(){return!0},disableXhr:function(){return!1},onunloadDisableFetch:function(){return!1},onunloadDisableBeacon:function(){return!1},instrumentationKey:function(){return undefined},namePrefix:function(){return undefined},samplingPercentage:function(){return 100},customHeaders:function(){return undefined},convertUndefined:function(){return undefined},eventsLimitInMem:function(){return 1e4}}}(i={})[Ei.dataType]=Vo,i[vo.dataType]=function(e,n,t){Ko(e,n);var r=n[d].message,i=n[d].severityLevel,o=n[d][y]||{},a=n[d].measurements||{},t=(Oo(n.data,o,a),B(t)||zo(o,t),new vo(e,r,i,o,a)),r=new xo(vo.dataType,t);return jo(e,vo.envelopeType,n,r)},i[so.dataType]=function(e,n,t){Ko(e,n);var r,i="duration",o=n[d],i=(B(o)||B(o[y])||B(o[y][i])?B(n.data)||B(n.data[i])||(r=n.data[i],delete n.data[i]):(r=o[y][i],delete o[y][i]),n[d]),o=(((n.ext||{}).trace||{}).traceID&&(a=n.ext.trace.traceID),i.id||a),a=i.name,s=i.uri,u=i[y]||{},c=i.measurements||{},i=(B(i.refUri)||(u.refUri=i.refUri),B(i.pageType)||(u.pageType=i.pageType),B(i.isLoggedIn)||(u.isLoggedIn=i.isLoggedIn.toString()),B(i[y])||U(i[y],function(e,n){u[e]=n}),Oo(n.data,u,c),B(t)||zo(u,t),new so(e,a,s,r,u,c,o)),t=new xo(so.dataType,i);return jo(e,so.envelopeType,n,t)},i[Io.dataType]=function(e,n,t){Ko(e,n);var r=n[d],i=r.name,o=r.uri||r.url,a=r[y]||{},s=r.measurements||{},t=(Oo(n.data,a,s),B(t)||zo(a,t),new Io(e,i,o,undefined,a,s,r)),i=new xo(Io.dataType,t);return jo(e,Io.envelopeType,n,i)},i[Vi.dataType]=function(e,n,t){Ko(e,n);var r=n[d].measurements||{},i=n[d][y]||{},t=(Oo(n.data,i,r),B(t)||zo(i,t),n[d]),t=Vi.CreateFromInterface(e,t,i,r),i=new xo(Vi.dataType,t);return jo(e,Vi.envelopeType,n,i)},i[to.dataType]=function(e,n,t){Ko(e,n);var r=n[d],i=r[y]||{},o=r.measurements||{},t=(Oo(n.data,i,o),B(t)||zo(i,t),new to(e,r.name,r.average,r.sampleCount,r.min,r.max,r.stdDev,i,o)),r=new xo(to.dataType,t);return jo(e,to.envelopeType,n,r)},i[lo.dataType]=function(e,n,t){Ko(e,n);var r=n[d].measurements||{},i=n[d][y]||{},t=(Oo(n.data,i,r),B(t)||zo(i,t),n[d]);if(B(t))return e.warnToConsole("Invalid input for dependency data"),null;var o=t[y]&&t[y][ci]?t[y][ci]:"GET",o=new lo(e,t.id,t.target,t.name,t.duration,t.success,t.responseCode,o,t.type,t.correlationContext,i,r),t=new xo(lo.dataType,o);return jo(e,lo.envelopeType,n,t)};var ea,na=i,ta=(n(ra,ea=ke),ra.constructEnvelope=function(e,n,t,r){e=n===e.iKey||B(n)?e:Y(Y({},e),{iKey:n});return(na[e.baseType]||Vo)(t,e,r)},ra);function ra(){var T,b,w,r,_,N,A,E,R,L,F,M=ea.call(this)||this,k=(M.priority=1001,M.identifier="AppInsightsChannelPlugin",M._senderConfig=Qo(),0);return m(ra,M,function(c,a){function l(e,n,t,r,i,o){var a=null;c._appId||(a=p(o))&&a.appId&&(c._appId=a.appId),(e<200||300<=e)&&0!==e?(301!==e&&307!==e&&308!==e||s(t))&&!c._senderConfig.isRetryDisabled()&&y(e)?(v(n),W(c.diagLog(),H.WARNING,G.TransmissionFailed,". Response code "+e+". Will retry to send "+n.length+" items.")):c._onError(n,i):L&&!L.isOnline()?c._senderConfig.isRetryDisabled()||(v(n,10),W(c.diagLog(),H.WARNING,G.TransmissionFailed,". Offline - Response Code: ".concat(e,". Offline status: ").concat(!L.isOnline(),". Will retry to send ").concat(n.length," items."))):(s(t),206===e?(a=a||p(o))&&!c._senderConfig.isRetryDisabled()?c._onPartialSuccess(n,a):c._onError(n,i):(T=0,c._onSuccess(n,r)))}function s(e){return!(10<=N)&&!B(e)&&""!==e&&e!==c._senderConfig.endpointUrl()&&(c._senderConfig.endpointUrl=function(){return e},++N,1)}function n(e,n){R?R(e,!1):u(e)}function o(e){var n=Wn(),t=c._buffer,r=c._senderConfig.endpointUrl(),i=c._buffer.batchPayloads(e),i=new Blob([i],{type:"text/plain;charset=UTF-8"}),r=n.sendBeacon(r,i);return r&&(t.markAsSent(e),c._onSuccess(e,e.length)),r}function u(e,n){if(z(e)&&0<e.length&&!o(e)){for(var t=[],r=0;r<e.length;r++){var i=e[r];o([i])||t.push(i)}0<t.length&&(E&&E(t,!0),W(c.diagLog(),H.WARNING,G.TransmissionFailed,". Failed to send telemetry with Beacon API, retried with normal sender."))}}function f(n,e){var t=new XMLHttpRequest,r=c._senderConfig.endpointUrl();try{t[ai]=!0}catch(i){}t.open("POST",r,e),t.setRequestHeader("Content-type","application/json"),xi(r)&&t.setRequestHeader("Sdk-Context","appId"),j(mn(A),function(e){t.setRequestHeader(e,A[e])}),t.onreadystatechange=function(){return c._xhrReadyStateChange(t,n,n.length)},t.onerror=function(e){return c._onError(n,I(t),e)};e=c._buffer.batchPayloads(n);t.send(e),c._buffer.markAsSent(n)}function d(e,n){if(z(e)){for(var t=e.length,r=0;r<e.length;r++)t+=e[r].length;k+t<=65e3?i(e,!1):Yn()?u(e):(E&&E(e,!0),W(c.diagLog(),H.WARNING,G.TransmissionFailed,". Failed to send telemetry with Beacon API, retried with xhrSender."))}}function g(e,n){i(e,!0)}function i(t,r){var e=c._senderConfig.endpointUrl(),n=c._buffer.batchPayloads(t),i=new Blob([n],{type:"application/json"}),o=new Headers,a=n.length,n=!1,s=!1,e=(xi(e)&&o.append("Sdk-Context","appId"),j(mn(A),function(e){o.append(e,A[e])}),(i={method:"POST",headers:o,body:i})[ai]=!0,r||(n=i.keepalive=!0,k+=a),new Request(e,i));try{e[ai]=!0}catch(u){}c._buffer.markAsSent(t);try{fetch(e).then(function(n){r||(k-=a,a=0),s||(s=!0,n.ok?n.text().then(function(e){l(n.status,t,n.url,t.length,n.statusText,e)}):c._onError(t,n.statusText))})["catch"](function(e){r||(k-=a,a=0),s||(s=!0,c._onError(t,e.message))})}catch(u){s||c._onError(t,V(u))}n&&!s&&(s=!0,c._onSuccess(t,t.length))}function p(e){try{if(e&&""!==e){var n=Gn().parse(e);if(n&&n.itemsReceived&&n.itemsReceived>=n.itemsAccepted&&n.itemsReceived-n.itemsAccepted===n.errors.length)return n}}catch(t){W(c.diagLog(),H.CRITICAL,G.InvalidBackendResponse,"Cannot parse the response. "+K(t),{response:e})}return null}function v(e,n){if(void 0===n&&(n=1),e&&0!==e.length){var t=c._buffer;t.clearSent(e),T++;for(var r=0,i=e;r<i.length;r++){var o=i[r];t.enqueue(o)}n=T<=1?10:(e=1+Math.floor((Math.pow(2,T)-1)/2*Math.random()*10),Math.max(Math.min(e*=n,3600),10)),e=Cn()+1e3*n;b=e,h()}}function h(){var e;r||w||(e=b?Math.max(0,b-Cn()):0,e=Math.max(c._senderConfig.maxBatchInterval(),e),r=setTimeout(function(){r=null,c.triggerSend(!0,null,1)},e))}function m(){clearTimeout(r),b=r=null}function y(e){return 408===e||429===e||500===e||503===e}function I(e,n){return e?"XMLHttpRequest,Status:"+e.status+",Response:"+$o(e)||e.response||"":n}function C(n,e){var t=c._buffer,r=Kn(),i=new XDomainRequest,r=(i.onload=function(){return c._xdrOnLoad(i,n)},i.onerror=function(e){return c._onError(n,S(i),e)},r&&r.location&&r.location.protocol||"");if(c._senderConfig.endpointUrl().lastIndexOf(r,0))return W(c.diagLog(),H.WARNING,G.TransmissionFailed,". Cannot send XDomain request. The endpoint URL protocol doesn't match the hosting page protocol."),void t.clear();r=c._senderConfig.endpointUrl().replace(/^(https?:)/,""),i.open("POST",r),r=t.batchPayloads(n);i.send(r),t.markAsSent(n)}function S(e,n){return e?"XDomainRequest,Response:"+$o(e)||"":n}function x(e,n){var t="getNotifyMgr",t=c.core[t]?c.core[t]():c.core._notificationManager;if(t&&t.eventsSendRequest)try{t.eventsSendRequest(e,n)}catch(r){W(c.diagLog(),H.CRITICAL,G.NotificationException,"send request notification failed: "+K(r),{exception:V(r)})}}function t(){c._sender=null,c._buffer=null,c._appId=null,c._sample=null,w=!(A={}),k=N=T=0,F=R=E=_=r=b=L=null}t(),c.pause=function(){m(),w=!0},c.resume=function(){w&&(w=!1,b=null,c._buffer.size()>c._senderConfig.maxBatchSizeInBytes()&&c.triggerSend(!0,null,10),h())},c.flush=function(e,n,t){if(void 0===e&&(e=!0),!w){m();try{c.triggerSend(e,null,t||1)}catch(r){W(c.diagLog(),H.CRITICAL,G.FlushFailed,"flush failed, telemetry will not be collected: "+K(r),{exception:V(r)})}}},c.onunloadFlush=function(){if(!w)if(!1!==c._senderConfig.onunloadDisableBeacon()&&!1!==c._senderConfig.isBeaconApiDisabled()||!Yn())c.flush();else try{c.triggerSend(!0,n,2)}catch(e){W(c.diagLog(),H.CRITICAL,G.FailedToSendQueuedTelemetry,"failed to flush with beacon sender on page unload, telemetry will not be collected: "+K(e),{exception:V(e)})}},c.addHeader=function(e,n){A[e]=n},c.initialize=function(e,n,t,r){a.initialize(e,n,t,r);var i=c._getTelCtx(),o=c.identifier,t=(_=new Wo(n.logger),b=null,T=0,c._sender=null,N=0,c.diagLog()),r=(F=Hr(Rt("Sender"),n.evtNamespace&&n.evtNamespace()),L=function(e){var n,t=qn(),r=Wn(),i=!1,o=!0,a=Hr(Rt("OfflineListener"),e);try{s(Kn())&&(i=!0),(i=!!(t&&(n=t.body||t).ononline&&s(n))||i)&&r&&!B(r.onLine)&&(o=r.onLine)}catch(l){i=!1}function s(e){var n=!1;return e&&(n=Gr(e,"online",u,a))&&Gr(e,"offline",c,a),n}function u(){o=!0}function c(){o=!1}return{isOnline:function(){var e=!0;return i?e=o:r&&!B(r.onLine)&&(e=r.onLine),e},isListening:function(){return i},unload:function(){var e=Kn();e&&i&&(Ho(e,a),t&&!P((e=t.body||t).ononline)&&Ho(e,a),i=!1)}}}(F),U(Qo(),function(e,n){c._senderConfig[e]=function(){return i.getConfig(o,e,n())}}),c._buffer=new(c._senderConfig.enableSessionStorageBuffer()&&vi()?Po:Mo)(t,c._senderConfig),c._sample=new Jo(c._senderConfig.samplingPercentage(),t),!B(e.disableInstrumentationKeyValidation)&&e.disableInstrumentationKeyValidation||/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/.test(e.instrumentationKey)||W(t,H.CRITICAL,G.InvalidInstrumentationKey,"Invalid Instrumentation key "+e.instrumentationKey),!xi(c._senderConfig.endpointUrl())&&c._senderConfig.customHeaders()&&0<c._senderConfig.customHeaders().length&&j(c._senderConfig.customHeaders(),function(e){M.addHeader(e.header,e.value)}),c._senderConfig),n=null;!r.disableXhr()&&Zn()?n=C:!r.disableXhr()&&$n()&&(n=f),!n&&Jn()&&(n=g),E=n||f,!r.isBeaconApiDisabled()&&Yn()&&(n=u),c._sender=n||f,R=!r.onunloadDisableFetch()&&Jn(!0)?d:Yn()?u:!r.disableXhr()&&Zn()?C:!r.disableXhr()&&$n()?f:E},c.processTelemetry=function(e,t){t=c._getTelCtx(t);try{if(c._senderConfig.disableTelemetry())return;if(!e)return void W(t.diagLog(),H.CRITICAL,G.CannotSendEmptyTelemetry,"Cannot send empty telemetry");if(e.baseData&&!e.baseType)return void W(t.diagLog(),H.CRITICAL,G.InvalidEvent,"Cannot send telemetry without baseData and baseType");if(e.baseType||(e.baseType="EventData"),!c._sender)return void W(t.diagLog(),H.CRITICAL,G.SenderNotInitialized,"Sender was not initialized");if(!c._sample.isSampledIn(e))return void W(t.diagLog(),H.WARNING,G.TelemetrySampledAndNotSent,"Telemetry item was sampled out and not sent",{SampleRate:c._sample.sampleRate});e[si]=c._sample.sampleRate;var n=c._senderConfig.convertUndefined()||undefined,r=e.iKey||c._senderConfig.instrumentationKey(),i=ra.constructEnvelope(e,r,t.diagLog(),n);if(!i)return void W(t.diagLog(),H.CRITICAL,G.CreateEnvelopeError,"Unable to create an AppInsights envelope");var o=!1;if(e.tags&&e.tags[ui]&&(j(e.tags[ui],function(e){try{e&&!1===e(i)&&(o=!0,t.diagLog().warnToConsole("Telemetry processor check returns false"))}catch(n){W(t.diagLog(),H.CRITICAL,G.TelemetryInitializerFailed,"One of telemetry initializers failed, telemetry item will not be sent: "+K(n),{exception:V(n)},!0)}}),delete e.tags[ui]),o)return;var a=_.serialize(i),s=c._buffer;s.size()+a.length>c._senderConfig.maxBatchSizeInBytes()&&c.triggerSend(!0,null,10),s.enqueue(a),h()}catch(u){W(t.diagLog(),H.WARNING,G.FailedAddingTelemetryToBuffer,"Failed adding telemetry to the sender's buffer, some telemetry will be lost: "+K(u),{exception:V(u)})}c.processNext(e,t)},c._xhrReadyStateChange=function(e,n,t){4===e.readyState&&l(e.status,n,e.responseURL,t,I(e),$o(e)||e.response)},c.triggerSend=function(e,n,t){if(void 0===e&&(e=!0),!w)try{var r,i=c._buffer;c._senderConfig.disableTelemetry()?i.clear():0<i.count()&&(r=i.getItems(),x(t||0,e),n?n.call(M,r,e):c._sender(r,e)),m()}catch(o){i=function(e){var n=((e=(e=void 0===e?null:e)?e:(n=Wn()||{})?(n.userAgent||D).toLowerCase():D)||D).toLowerCase();if(O(n,Mn))return e=qn()||{},Math.max(parseInt(n.split(Mn)[1]),e.documentMode||0);if(O(n,kn)){e=parseInt(n.split(kn)[1]);if(e)return e+4}return null}();(!i||9<i)&&W(c.diagLog(),H.CRITICAL,G.TransmissionFailed,"Telemetry transmission failed, some telemetry will be lost: "+K(o),{exception:V(o)})}},c._doTeardown=function(e,n){c.onunloadFlush(),L.unload(),t()},c._onError=function(e,n,t){W(c.diagLog(),H.WARNING,G.OnError,"Failed to send telemetry.",{message:n}),c._buffer.clearSent(e)},c._onPartialSuccess=function(e,n){for(var t=[],r=[],i=0,o=n.errors.reverse();i<o.length;i++){var a=o[i],s=e.splice(a.index,1)[0];(y(a.statusCode)?r:t).push(s)}0<e.length&&c._onSuccess(e,n.itemsAccepted),0<t.length&&c._onError(t,I(null,["partial success",n.itemsAccepted,"of",n.itemsReceived].join(" "))),0<r.length&&(v(r),W(c.diagLog(),H.WARNING,G.TransmissionFailed,"Partial success. Delivered: "+e.length+", Failed: "+t.length+". Will retry to send "+r.length+" our of "+n.itemsReceived+" items"))},c._onSuccess=function(e,n){c._buffer.clearSent(e)},c._xdrOnLoad=function(e,n){var t=$o(e);!e||t+""!="200"&&""!==t?(t=p(t))&&t.itemsReceived&&t.itemsReceived>t.itemsAccepted&&!c._senderConfig.isRetryDisabled()?c._onPartialSuccess(n,t):c._onError(n,S(e)):(T=0,c._onSuccess(n,0))}}),M}ia.prototype.initialize=function(){this.core=new Rr;var e=[],n=new ta;e.push(n),this.core.initialize(this.config,e),n.initialize(this.config,this.core,e),this.pollInternalLogs()},ia.prototype.track=function(e){this.core.track(e)},ia.prototype.flush=function(n){void 0===n&&(n=!0),j(this.core.getTransmissionControls(),function(e){j(e,function(e){n?e.flush():e.triggerSend(n,null,1)})})},ia.prototype.pollInternalLogs=function(){this.core.pollInternalLogs()},ia.prototype.stopPollingInternalLogs=function(){this.core.stopPollingInternalLogs()},ia.prototype.getSKUDefaults=function(){this.config.diagnosticLogInterval=this.config.diagnosticLogInterval&&0<this.config.diagnosticLogInterval?this.config.diagnosticLogInterval:1e4};r=ia;function ia(e){(B(e)||B(e.instrumentationKey))&&q("Invalid input configuration"),this.config=e,this.getSKUDefaults(),this.initialize()}C.AppInsightsCore=Rr,C.ApplicationInsights=r,C.CoreUtils=Jr,C.Sender=ta;No=C,Ao="__esModule",s={value:!0},c=Object.defineProperty;if(c)try{return void c(No,Ao,s)}catch(da){}typeof s.value!==undefined&&(No[Ao]=s.value)};"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(((e="undefined"!=typeof globalThis?globalThis:e||self).Microsoft=e.Microsoft||{},e.Microsoft.ApplicationInsights=e.Microsoft.ApplicationInsights||{}));
6
6
  //# sourceMappingURL=aib.2.min.js.map