@microsoft/applicationinsights-react-js 3.3.0-beta.2202-06 → 3.3.0-beta.2203-02
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.
- package/browser/applicationinsights-react-js.js +573 -293
- package/browser/applicationinsights-react-js.js.map +1 -1
- package/browser/applicationinsights-react-js.min.js +2 -2
- package/browser/applicationinsights-react-js.min.js.map +1 -1
- package/dist/applicationinsights-react-js.d.ts +1 -1
- package/dist/applicationinsights-react-js.js +573 -293
- package/dist/applicationinsights-react-js.js.map +1 -1
- package/dist/applicationinsights-react-js.min.js +2 -2
- package/dist/applicationinsights-react-js.min.js.map +1 -1
- package/dist/applicationinsights-react-js.rollup.d.ts +1 -1
- package/dist-esm/AppInsightsContext.js +1 -1
- package/dist-esm/AppInsightsErrorBoundary.js +1 -1
- package/dist-esm/Interfaces/IReactExtensionConfig.js +1 -1
- package/dist-esm/ReactPlugin.js +1 -1
- package/dist-esm/applicationinsights-react-js.js +1 -1
- package/dist-esm/useTrackEvent.js +1 -1
- package/dist-esm/useTrackMetric.js +1 -1
- package/dist-esm/withAITracking.js +1 -1
- package/package.json +3 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Application Insights JavaScript SDK - React Plugin, 3.3.0-beta.
|
|
2
|
+
* Application Insights JavaScript SDK - React Plugin, 3.3.0-beta.2203-02
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
|
-
var t=this,e=function(n,a){"use strict";function r(t){return t&&"object"==typeof t&&"default"in t?t:{"default":t}}function i(o){if(o&&o.__esModule)return o;var t,a=(t=Object.create)?t(null):{};return o&&Object.keys(o).forEach(function(t){if("default"!==t){var e=(e=Object.getOwnPropertyDescriptor)?e(o,t):undefined,n=a,r=t,e=e.get?e:{enumerable:!0,get:function(){return o[t]}},i=Object.defineProperty;if(i)try{return void i(n,r,e)}catch(o){}e&&typeof e.value!==undefined&&(n[r]=e.value)}var e}),a["default"]=o,a}var u=i(a),o=r(a),l="function",x="object",s="undefined",c="prototype",f="hasOwnProperty",d=Object,I=d[c],t=d.assign,A=d.create,w=d.defineProperty,_=I[f],S=null;function b(t){return void 0===t&&(t=!0),S&&t||(typeof globalThis!==s&&globalThis&&(S=globalThis),typeof self!==s&&self&&(S=self),typeof window!==s&&window&&(S=window),typeof global!==s&&global&&(S=global)),S}function k(t){throw new TypeError(t)}function E(t){if(A)return A(t);if(null==t)return{};var e=typeof t;function n(){}return e!==x&&e!==l&&k("Object prototype may only be an Object:"+t),n[c]=t,new n}(b()||{}).Symbol,(b()||{}).Reflect;var P=t||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])I[f].call(e,i)&&(t[i]=e[i]);return t},M=function(t,e){return(M=d.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e[f](n)&&(t[n]=e[n])})(t,e)};function L(t,e){function n(){this.constructor=t}typeof e!==l&&null!==e&&k("Class extends value "+e+" is not a constructor or null"),M(t,e),t[c]=null===e?E(e):(n[c]=e[c],new n)}var F="constructor",N="prototype",R="function",O="_dynInstFuncs",j="_isDynProxy",D="_dynClass",U="_dynInstChk",B=U,V="_dfOpts",z="_unknown_",K="__proto__",W="useBaseInst",H="setInstFuncs",G=Object,q=G.getPrototypeOf,J=0;function X(t,e){return t&&G[N].hasOwnProperty.call(t,e)}function Y(t){return t&&(t===G[N]||t===Array[N])}function Z(t){return Y(t)||t===Function[N]}function $(t){if(t){if(q)return q(t);t=t[K]||t[N]||(t[F]?t[F][N]:null);if(t)return t}return null}function Q(t,e){var n=[],r=G.getOwnPropertyNames;if(r)n=r(t);else for(var i in t)"string"==typeof i&&X(t,i)&&n.push(i);if(n&&0<n.length)for(var o=0;o<n.length;o++)e(n[o])}function tt(t,e,n){return e!==F&&typeof t[e]===R&&(n||X(t,e))}function et(t){throw new TypeError("DynamicProto: "+t)}function nt(t,e){for(var n=t.length-1;0<=n;n--)if(t[n]===e)return 1}function rt(t,e){return X(t,N)?t.name||e||z:((t||{})[F]||{}).name||e||z}function it(t,r,e,n){X(t,N)||et("theClass is an invalid class definition.");var c,i,o,a,f,d,u=t[N],l=(function(t){if(q)for(var e=[],n=$(r);n&&!Z(n)&&!nt(e,n);){if(n===t)return 1;e.push(n),n=$(n)}}(u)||et("["+rt(t)+"] is not in class hierarchy of ["+rt(r)+"]"),null),t=(X(u,D)?l=u[D]:(l="_dynCls$"+rt(t,"_")+"$"+J,J++,u[D]=l),it[V]),s=!!t[W],p=(s&&n&&n[W]!==undefined&&(s=!!n[W]),i={},Q(c=r,function(t){!i[t]&&tt(c,t,!1)&&(i[t]=c[t])}),i),s=(e(r,function(t,e,n,o){function r(t,e,n){var r,i=e[n];return i[j]&&o&&!1!==(r=t[O]||{})[B]&&(i=(r[e[D]]||{})[n]||i),function(){return i.apply(t,arguments)}}for(var i={},a=(Q(n,function(t){i[t]=r(e,n,t)}),$(t)),u=[];a&&!Z(a)&&!nt(u,a);)Q(a,function(t){!i[t]&&tt(a,t,!q)&&(i[t]=r(e,a,t))}),u.push(a),a=$(a);return i}(u,r,p,s)),!!q&&!!t[H]);o=u,e=l,a=r,f=p,t=!1!==(s=s&&n?!!n[H]:s),Y(o)||(u=a[O]=a[O]||{},d=u[e]=u[e]||{},!1!==u[B]&&(u[B]=!!t),Q(a,function(t){var n,r,i;tt(a,t,!1)&&a[t]!==f[t]&&(d[t]=a[t],delete a[t],X(o,t)&&(!o[t]||o[t][j])||(o[t]=(n=o,r=t,(i=function(){var t,e;return(function(t,e,n,c){var r=null;if(t&&X(n,D)){var i=t[O]||{};if((r=(i[n[D]]||{})[e])||et("Missing ["+e+"] "+R),!r[U]&&!1!==i[B]){for(var o=!X(t,e),a=$(t),u=[];o&&a&&!Z(a)&&!nt(u,a);){var l=a[e];if(l){o=l===c;break}u.push(a),a=$(a)}try{o&&(t[e]=r),r[U]=1}catch(s){i[B]=!1}}}return r}(this,r,n,i)||(typeof(e=(e=n[t=r])===i?$(n)[t]:e)!==R&&et("["+t+"] is not a "+R),e)).apply(this,arguments)})[j]=1,i)))}))}it[V]={setInstFuncs:!0,useBaseInst:!0},(t=g=g||{})[t.CRITICAL=1]="CRITICAL",t[t.WARNING=2]="WARNING";var g,ot={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},at="attachEvent",ut="addEventListener",lt="toISOString",st="endsWith",ct="indexOf",ft="trim",t="toString",dt="constructor",pt=w,w=d.freeze,gt=d.keys,mt=String[c],vt=mt[ft],ht=mt[st],yt=Date[c][lt],mt=Array.isArray,Ct=I[t],Tt=_[t],xt=Tt.call(d),It=Object.getPrototypeOf;function p(t){return t===undefined||typeof t===s}function m(t){return null===t||p(t)}function At(t){return!m(t)}function wt(t){return!(!t||typeof t!==x)}function v(t){return!(!t||typeof t!==l)}function _t(t,e,n,r){void 0===r&&(r=!1);var i=!1;if(!m(t))try{m(t[ut])?m(t[at])||(t[at]("on"+e,n),i=!0):(t[ut](e,n,r),i=!0)}catch(o){}return i}function St(t,e){if(t)for(var n in t)_.call(t,n)&&e.call(t,n,t[n])}function h(t,e){return!(!t||!e||!~t.indexOf(e))}var bt=mt||function(t){return!(!t||"[object Array]"!==Ct.call(t))};function kt(t){return!(!t||"[object Error]"!==Ct.call(t))}function Et(t){return"string"==typeof t}function Pt(t){return"boolean"==typeof t}function Mt(t){return t&&"object"==typeof t&&(!(t=(It||function(t){if(t){if(It)return It(t);t=t.__proto__||t[c]||t[dt];if(t)return t}return null})(t))||typeof(t=t[dt]&&_.call(t,dt)?t[dt]:t)===l&&Tt.call(t)===xt)}function Lt(t,e,n){var r=t.length;try{for(var i=0;i<r&&!(i in t&&-1===e.call(n||t,t[i],i,t));i++);}catch(o){}}function Ft(t,e,n){if(t){if(t[ct])return t[ct](e,n);var r=t.length,n=n||0;try{for(var i=Math.max(0<=n?n:r-Math.abs(n),0);i<r;i++)if(i in t&&t[i]===e)return i}catch(o){}}return-1}function Nt(t){return t&&(vt&&t[ft]?t[ft]():t.replace?t.replace(/^\s+|\s+$/g,""):t)}var Rt=!{toString:null}.propertyIsEnumerable("toString"),Ot=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];function jt(t,e,n,r){if(pt)try{var i={enumerable:!0,configurable:!0};return n&&(i.get=n),r&&(i.set=r),pt(t,e,i),!0}catch(o){}return!1}var Dt=w||function(t){return t};function y(){var t=Date;return t.now?t.now():(new t).getTime()}function Ut(t,e,n,r,i){var o=n;return t&&((o=t[e])===n||i&&!i(o)||r&&!r(n)||(t[e]=o=n)),o}function Bt(t){return!!t}var Vt="window",zt="navigator",Kt="location",Wt="JSON",Ht="crypto",Gt="msCrypto",qt="msie",Jt="trident/",Xt=null,Yt=null;function C(t){var e=b();return e&&e[t]?e[t]:t===Vt&&Zt()?window:null}function Zt(){return typeof window===x&&window}function $t(){return typeof document===x&&document?document:C("document")}function Qt(){return typeof navigator===x&&navigator?navigator:C(zt)}function te(){return typeof JSON===x&&JSON||null!==C(Wt)}function ee(){return te()?JSON||C(Wt):null}function ne(){var t=Qt();return!t||t.userAgent===Yt&&null!==Xt||(t=((Yt=t.userAgent)||"").toLowerCase(),Xt=h(t,qt)||h(t,Jt)),Xt}function re(t){var e=Object[c].toString.call(t),n="";return"[object Error]"===e?n="{ stack: '"+t.stack+"', message: '"+t.message+"', name: '"+t.name+"'":te()&&(n=ee().stringify(t)),e+n}var ie=null;function oe(t){return t?'"'+t.replace(/\"/g,"")+'"':""}function ae(t,e){var n,r=typeof console!==s?console:C("console");r&&(n="log",v(r[n=r[t]?t:n])&&r[n](e))}le.dataType="MessageData";var ue=le;function le(t,e,n,r){void 0===n&&(n=!1),this.messageId=t,this.message=(n?"AI: ":"AI (Internal): ")+t;n="",te()&&(n=ee().stringify(r)),t=(e?" message:"+oe(e):"")+(r?" props:"+oe(n):"");this.message+=t}var se=function cn(i){this.identifier="DiagnosticLogger",this.queue=[];var u=0,l={};it(cn,this,function(o){function t(t,e){t=i[t];return m(t)?e:t}function a(t,e){var n,r=(n=(n=ie)||!0===i.disableDbgExt?n:ie||(r=C("Microsoft"),ie=r?r.ApplicationInsights:ie))?n.ChromeDbgExt:null;r&&r.diagLog&&r.diagLog(t,e)}m(i)&&(i={}),o.consoleLoggingLevel=function(){return t("loggingLevelConsole",0)},o.telemetryLoggingLevel=function(){return t("loggingLevelTelemetry",1)},o.maxInternalMessageLimit=function(){return t("maxMessageLimit",25)},o.enableDebugExceptions=function(){return t("enableDebugExceptions",!1)},o.throwInternal=function(t,e,n,r,i){e=new ue(e,n,i=void 0!==i&&i,r);if(o.enableDebugExceptions())throw e;n=t===g.CRITICAL?"errorToConsole":"warnToConsole";p(e.message)?a("throw"+(t===g.CRITICAL?"Critical":"Warning"),e):(r=o.consoleLoggingLevel(),i?(i=+e.messageId,!l[i]&&t<=r&&(o[n](e.message),l[i]=!0)):t<=r&&o[n](e.message),o.logInternalMessage(t,e))},o.warnToConsole=function(t){ae("warn",t),a("warning",t)},o.errorToConsole=function(t){ae("error",t),a("error",t)},o.resetInternalMessageCount=function(){u=0,l={}},o.logInternalMessage=function(t,e){var n,r;u>=o.maxInternalMessageLimit()||(r=!0,n="AITR_"+e.messageId,l[n]?r=!1:l[n]=!0,r&&(t<=o.telemetryLoggingLevel()&&(o.queue.push(e),u++,a(t===g.CRITICAL?"error":"warn",e)),u===o.maxInternalMessageLimit()&&(r=new ue(ot.MessageLimitPerPVExceeded,n="Internal events throttle limit per PageView reached for this app.",!1),o.queue.push(r),t===g.CRITICAL?o.errorToConsole(n):o.warnToConsole(n))))}})},ce=(fe.ParentContextKey="parent",fe.ChildrenContextKey="childEvts",fe);function fe(t,i,e){var n,o=this,a=!1;o.start=y(),o.name=t,o.isAsync=e,o.isChildEvt=function(){return!1},v(i)&&(a=jt(o,"payload",function(){return!n&&v(i)&&(n=i(),i=null),n})),o.getCtx=function(t){return t?(t===fe.ParentContextKey||t===fe.ChildrenContextKey?o:o.ctx||{})[t]:null},o.setCtx=function(t,e){t&&(t===fe.ParentContextKey?(o[t]||(o.isChildEvt=function(){return!0}),o[t]=e):t===fe.ChildrenContextKey?o[t]=e:(o.ctx=o.ctx||{})[t]=e)},o.complete=function(){var t=0,e=o.getCtx(fe.ChildrenContextKey);if(bt(e))for(var n=0;n<e.length;n++){var r=e[n];r&&(t+=r.time)}o.time=y()-o.start,o.exTime=o.time-t,o.complete=function(){},!a&&v(i)&&(o.payload=i())}}var de="CoreUtils.doPerf";function pe(t,e,n,r,i){if(t)if(t=v(t.getPerfMgr)?t.getPerfMgr():t){var o,a=void 0,u=t.getCtx(de);try{if(a=t.create(e(),r,i))return u&&a.setCtx&&(a.setCtx(ce.ParentContextKey,u),u.getCtx&&u.setCtx&&((o=u.getCtx(ce.ChildrenContextKey))||(o=[],u.setCtx(ce.ChildrenContextKey,o)),o.push(a))),t.setCtx(de,a),n(a)}catch(l){a&&a.setCtx&&a.setCtx("exception",l)}finally{a&&t.fire(a),t.setCtx(de,u)}}return n()}var ge="TelemetryPluginChain",me="_hasRun",ve="_getTelCtx",he=0;function ye(t,a,n,e){var r=null,i=null,r=e?function(t,e,n,r){for(;t;){if(t.getPlugin()===r)return t;t=t.getNext()}return Ce([r],e,n)}(t,a,n,e):t,o={core:function(){return n},diagLog:function(){return(n||{}).logger||new se(a)},getCfg:function(){return a},getExtCfg:u,getConfig:function(t,e,n){void 0===n&&(n=!1);var r,t=u(t,null);return t&&!m(t[e])?r=t[e]:a&&!m(a[e])&&(r=a[e]),m(r)?n:r},hasNext:function(){return null!=r},getNext:function(){return r},setNext:function(t){r=t},processNext:function(e){l(function(t){t.processTelemetry(e,o)})},iterate:function(e){for(;r;)l(function(t){t=t.getPlugin();t&&e(t)})},createNew:function(t,e){return ye((t=bt(t=void 0===t?null:t)?Ce(t,a,n,e):t)||r,a,n,e)},onComplete:function(t){i=t}};function u(t,e,n){var r,i,o;return void 0===e&&(e={}),void 0===n&&(n=0),!a||(i=a.extensionConfig)&&t&&(r=i[t]),r?wt(e)&&0!==n&&(o=function d(){var t=arguments,e=t[0]||{},n=t.length,r=!1,i=1;for(0<n&&Pt(e)&&(r=e,e=t[i]||{},i++),wt(e)||(e={});i<n;i++){var o,a,u,l,s=t[i],c=bt(s),f=wt(s);for(o in s)(c&&o in s||f&&_.call(s,o))&&(a=s[o],u=void 0,r&&a&&((u=bt(a))||Mt(a))&&(l=e[o],u?bt(l)||(l=[]):Mt(l)||(l={}),a=d(r,l,a)),a!==undefined&&(e[o]=a))}return e}(!0,e,r),a&&2===n&&St(e,function(t){var e;m(o[t])&&(m(e=a[t])||(o[t]=e))})):r=e,r}function l(t){var e=r;e?(r=e.getNext(),t(e)):i&&(i(),i=null)}return o}function Ce(t,e,n,r){var i,o=null,a=!r;return bt(t)&&0<t.length&&(i=null,Lt(t,function(t){(a=!a&&r===t||a)&&t&&v(t.processTelemetry)&&(t=Te(t,e,n),o=o||t,i&&i._setNext(t),i=t)})),r&&!o?Ce([r],e,n):o}function Te(l,s,c){var f=null,n=v(l.processTelemetry),r=v(l.setNextPlugin),d=l?l.identifier+"-"+l.priority+"-"+he++:"Unknown-0-"+he++,p={getPlugin:function(){return l},getNext:function(){return f},processTelemetry:function(e,t){i(t,function(t){return!!n&&(r&&l.setNextPlugin(f),l.processTelemetry(e,t),!0)},function(t){f.processTelemetry(e,t)},"processTelemetry",function(){return{item:e}},!e.sync)},_id:d,_setNext:function(t){f=t}};function i(r,i,o,a,t,e){r=(r=r||(l&&v(l[ve])?l[ve]():r))||ye(p,s,c);var n=l?l.identifier:ge,u=(u=r[me])||(r[me]={});pe(r.core(),function(){return n+":"+a},function(){var t=!(u[d]=!0);if(r.setNext(f),l)try{var e=f?f._id:"";e&&(u[e]=!1),t=i(r)}catch(n){e=!f||u[f._id];e&&(t=!0),f&&e||r.diagLog().throwInternal(g.CRITICAL,ot.PluginException,"Plugin ["+l.identifier+"] failed during "+a+" - "+re(n)+", run flags: "+re(u))}f&&!t&&o(r)},t,e)}return Dt(p)}var xe="toGMTString",Ie="toUTCString",Ae="cookie",we="expires",_e="enabled",Se="isCookieUseDisabled",be="disableCookiesUsage",ke="_ckMgr",T="",Ee=null,Pe=null,Me=null,Le=$t(),Fe={},Ne={};function Re(t,e){var n=je[ke]||Ne[ke];return n||(n=je[ke]=je(t,e),Ne[ke]=n),n}function Oe(t){return!t||t.isEnabled()}function je(t,i){Ut(n=(t=t||Ne).cookieCfg=t.cookieCfg||{},"domain",t.cookieDomain,At,m),Ut(n,"path",t.cookiePath||"/",null,m),m(n[_e])&&(e=void 0,p(t[Se])||(e=!t[Se]),p(t[be])||(e=!t[be]),n[_e]=e);var e,n,s=n,c=s.path||"/",f=s.domain,r=!1!==s[_e],d={isEnabled:function(){var t=r&&De(i),e=Ne[ke];return t&&e&&d!==e?Oe(e):t},setEnabled:function(t){r=!1!==t},set:function(t,e,n,r,i){var o,a,u,l=!1;return Oe(d)&&(o={},-1!=(u=(a=Nt(e||T)).indexOf(";"))&&(a=Nt(e.substring(0,u)),o=Ue(e.substring(1+u))),Ut(o,"domain",r||f,Bt,p),m(n)||(u=ne(),!p(o[we])||0<(e=y()+1e3*n)&&((r=new Date).setTime(e),Ut(o,we,Be(r,u?xe:Ie)||Be(r,u?xe:Ie)||T,Bt)),u||Ut(o,"max-age",T+n,null,p)),(e=typeof location===x&&location?location:C(Kt))&&"https:"===e.protocol&&(Ut(o,"secure",null,null,p),(Pe=null===Pe?!(Et(r=(Qt()||{}).userAgent)&&(h(r,"CPU iPhone OS 12")||h(r,"iPad; CPU OS 12")||h(r,"Macintosh; Intel Mac OS X 10_14")&&h(r,"Version/")&&h(r,"Safari")||h(r,"Macintosh; Intel Mac OS X 10_14")&&function(t,e){var n=!1;if(!t||(n=t===e))return n;if(ht)return t[st](e);var r=t,i=e,n=!1,t=r?r.length:0;if(t&&40<=t&&!(n=r===i)){for(var o=t-1,a=39;0<=a;a--){if(r[o]!=i[a])return;o--}n=!0}return n}(r,"AppleWebKit/605.1.15 (KHTML, like Gecko)")||h(r,"Chrome/5")||h(r,"Chrome/6")||h(r,"UnrealEngine")&&!h(r,"Chrome")||h(r,"UCBrowser/12")||h(r,"UCBrowser/11"))):Pe)&&Ut(o,"SameSite","None",null,p)),Ut(o,"path",i||c,null,p),(s.setCookie||ze)(t,Ve(a,o)),l=!0),l},get:function(t){var e=T;return Oe(d)?(s.getCookie||function(t){var e,n=T;return Le&&(e=Le[Ae]||T,Me!==e&&(Fe=Ue(e),Me=e),n=Nt(Fe[t]||T)),n})(t):e},del:function(t,e){return!!Oe(d)&&d.purge(t,e)},purge:function(t,e){var n,r=!1;return De(i)&&((n={}).path=e||"/",n[we]="Thu, 01 Jan 1970 00:00:01 GMT",e=n,ne()||(e["max-age"]="0"),(s.delCookie||ze)(t,Ve(T,e)),r=!0),r}};return d[ke]=d}function De(t){if(null===Ee){Ee=!1;try{Ee=(Le||{})[Ae]!==undefined}catch(n){t&&t.throwInternal(g.WARNING,ot.CannotAccessCookie,"Cannot access document.cookie - "+(kt(e=n)?e.name:""),{exception:re(n)})}}var e;return Ee}function Ue(t){var n={};return t&&t.length&&Lt(Nt(t).split(";"),function(t){var e;(t=Nt(t||T))&&(-1==(e=t.indexOf("="))?n[t]=null:n[Nt(t.substring(0,e))]=Nt(t.substring(1+e)))}),n}function Be(t,e){return v(t[e])?t[e]():null}function Ve(t,e){var n=t||T;return St(e,function(t,e){n+="; "+t+(m(e)?T:"="+e)}),n}function ze(t,e){Le&&(Le[Ae]=t+"="+e)}var Ke="getPlugin",We=4294967296,He=4294967295,Ge=!1,qe=123456789,Je=987654321;function Xe(t){t<0&&(t>>>=0),qe=123456789+t&He,Je=987654321-t&He,Ge=!0}function Ye(){try{var t=2147483647&y();Xe((Math.random()*We^t)+t)}catch(e){}}function Ze(t){return 0<t?Math.floor($e()/He*(t+1))>>>0:0}function $e(t){var e=0,n=C(Ht)||C(Gt);return 0===(e=n&&n.getRandomValues?n.getRandomValues(new Uint32Array(1))[0]&He:e)&&ne()&&(Ge||Ye(),e=Qe()&He),0===e&&(e=Math.floor(We*Math.random()|0)),t||(e>>>=0),e}function Qe(t){var e=((Je=36969*(65535&Je)+(Je>>16)&He)<<16)+(65535&(qe=18e3*(65535&qe)+(qe>>16)&He))>>>0&He|0;return t||(e>>>=0),e}var tn,en,nn=null,rn={_canUseCookies:undefined,isTypeof:function(t,e){return typeof t===e},isUndefined:p,isNullOrUndefined:m,hasOwnProperty:function(t,e){return!(!t||!_.call(t,e))},isFunction:v,isObject:wt,isDate:function(t){return!(!t||"[object Date]"!==Ct.call(t))},isArray:bt,isError:kt,isString:Et,isNumber:function(t){return"number"==typeof t},isBoolean:Pt,toISOString:function(t){if(t){if(yt)return t[lt]();var e;return t&&t.getUTCFullYear?(e=function(t){t=""+t;return 1===t.length?"0"+t:t},t.getUTCFullYear()+"-"+e(1+t.getUTCMonth())+"-"+e(t.getUTCDate())+"T"+e(t.getUTCHours())+":"+e(t.getUTCMinutes())+":"+e(t.getUTCSeconds())+"."+(""+(t.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"):void 0}},arrForEach:Lt,arrIndexOf:Ft,arrMap:function(t,e,n){if(t){if(t.map)return t.map(e,n);var r=t.length,i=n||t,o=Array(r);try{for(var a=0;a<r;a++)a in t&&(o[a]=e.call(i,t[a],t))}catch(u){}}return o},arrReduce:function(t,e,n){var r;if(t){if(t.reduce)return t.reduce(e,n);var i=t.length,o=0;if(3<=arguments.length)r=n;else{for(;o<i&&!(o in t);)o++;r=t[o++]}for(;o<i;)o in t&&(r=e(r,t[o],o,t)),o++}return r},strTrim:Nt,objCreate:E,objKeys:function(t){var e=typeof t;if(e===l||e===x&&null!==t||k("objKeys called on non-object"),!Rt&>)return gt(t);var n,r=[];for(n in t)t&&_.call(t,n)&&r.push(n);if(Rt)for(var i=Ot.length,o=0;o<i;o++)t&&_.call(t,Ot[o])&&r.push(Ot[o]);return r},objDefineAccessors:jt,addEventHandler:function(t,e){var n=!1,r=Zt()?window:C(Vt),r=(r&&(n=_t(r,t,e),n=_t(r.body,t,e)||n),$t());return r&&_t(r,t,e)||n},dateNow:y,isIE:ne,disableCookies:function(){var t=Re(void 0,void 0),e=rn._canUseCookies;null===nn&&(nn=[],tn=e,jt(rn,"_canUseCookies",function(){return tn},function(e){tn=e,Lt(nn,function(t){t.setEnabled(e)})})),-1===Ft(nn,t)&&nn.push(t),Pt(e)&&t.setEnabled(e),Pt(tn)&&t.setEnabled(tn),t.setEnabled(!1)},newGuid:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(on,function(t){var e=0|Ze(15);return("x"===t?e:3&e|8).toString(16)})},perfNow:function(){var t=C("performance");return t&&t.now?t.now():y()},newId:function(t){void 0===t&&(t=22);for(var e=$e()>>>0,n=0,r="";r.length<t;)r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[0|63&e]||"",e>>>=6,5==++n&&(e=($e()<<2&4294967295|3&e)>>>0,n=0);return r},randomValue:Ze,random32:$e,mwcRandomSeed:function(t){t?Xe(t):Ye()},mwcRandom32:Qe,generateW3CId:function(){for(var t,e=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],n="",r=0;r<4;r++)n+=e[15&(t=$e())]+e[t>>4&15]+e[t>>8&15]+e[t>>12&15]+e[t>>16&15]+e[t>>20&15]+e[t>>24&15]+e[t>>28&15];var i=e[8+(3&$e())|0];return n.substr(0,8)+n.substr(9,4)+"4"+n.substr(13,3)+i+n.substr(16,3)+n.substr(19,12)}},on=/[xy]/g;function e(){var t=null!==en&&en.apply(this,arguments)||this;return t.priority=185,t.identifier="ReactPlugin",t}L(e,en=function fn(){var o,a,u,e,l=this;function n(t){var e,t=t=void 0===t?null:t;return t||(e=a||ye(null,{},l.core),t=u&&u[Ke]?e.createNew(null,u[Ke]):e.createNew(null,u)),t}o=!1,l.core=null,u=a=null,e=[],it(fn,l,function(t){t.initialize=function(t,e,n,r){t&&Ut(t,"extensionConfig",[],null,m),!r&&e&&(r=e.getProcessTelContext().getNext());var i=u;u&&u[Ke]&&(i=u[Ke]()),l.core=e,a=ye(r,t,e,i),o=!0},t._addHook=function(t){t&&(bt(t)?e=e.concat(t):e.push(t))}}),l.diagLog=function(t){return n(t).diagLog()},l.isInitialized=function(){return o},l.setInitialized=function(t){o=t},l.setNextPlugin=function(t){u=t},l.processNext=function(t,e){e?e.processNext(t):u&&v(u.processTelemetry)&&u.processTelemetry(t,null)},l._getTelCtx=n}),e.prototype.initialize=function(t,e,n,r){var i=this;en.prototype.initialize.call(this,t,e,n,r),this._extensionConfig=t.extensionConfig&&t.extensionConfig[this.identifier]?t.extensionConfig[this.identifier]:{history:null},Lt(n,function(t){"ApplicationInsightsAnalytics"===t.identifier&&(i._analyticsPlugin=t)}),this._extensionConfig.history&&(this.addHistoryListener(this._extensionConfig.history),e={uri:this._extensionConfig.history.location.pathname},this.trackPageView(e))},e.prototype.getCookieMgr=function(){return(e=(t=this.core)?t.getCookieMgr():e)||Re(void 0,(t||{}).logger);var t,e},e.prototype.getAppInsights=function(){return this._analyticsPlugin},e.prototype.processTelemetry=function(t,e){this.processNext(t,e)},e.prototype.trackMetric=function(t,e){this._analyticsPlugin?this._analyticsPlugin.trackMetric(t,e):this.diagLog().throwInternal(g.CRITICAL,ot.TelemetryInitializerFailed,"Analytics plugin is not available, React plugin telemetry will not be sent: ")},e.prototype.trackPageView=function(t){this._analyticsPlugin?this._analyticsPlugin.trackPageView(t):this.diagLog().throwInternal(g.CRITICAL,ot.TelemetryInitializerFailed,"Analytics plugin is not available, React plugin telemetry will not be sent: ")},e.prototype.trackEvent=function(t,e){this._analyticsPlugin?this._analyticsPlugin.trackEvent(t,e):this.diagLog().throwInternal(g.CRITICAL,ot.TelemetryInitializerFailed,"Analytics plugin is not available, React plugin telemetry will not be sent: ")},e.prototype.trackException=function(t,e){this._analyticsPlugin?this._analyticsPlugin.trackException(t,e):this.diagLog().throwInternal(g.CRITICAL,ot.TelemetryInitializerFailed,"Analytics plugin is not available, React plugin telemetry will not be sent: ")},e.prototype.trackTrace=function(t,e){this._analyticsPlugin?this._analyticsPlugin.trackTrace(t,e):this.diagLog().throwInternal(g.CRITICAL,ot.TelemetryInitializerFailed,"Analytics plugin is not available, React plugin telemetry will not be sent: ")},e.prototype.addHistoryListener=function(t){var n=this;t.listen(function(t){var e="location"in t?t.location:t;setTimeout(function(){var t={uri:e.pathname};n.trackPageView(t)},500)})};var an,un,t=e;function ln(){var t=null!==an&&an.apply(this,arguments)||this;return t.state={hasError:!1},t}un=3,L(ln,an=o["default"].Component),ln.prototype.componentDidCatch=function(t,e){this.setState({hasError:!0}),this.props.appInsights.trackException({error:t,exception:t,severityLevel:un,properties:e})},ln.prototype.render=function(){var t;return this.state.hasError?(t=this.props.onError,o["default"].createElement(t)):this.props.children};var mt=ln,sn=a.createContext(undefined),w=(n.AppInsightsContext=sn,n.AppInsightsErrorBoundary=mt,n.ReactPlugin=t,n.useAppInsightsContext=function(){return a.useContext(sn)},n.useTrackEvent=function(t,e,n,r){void 0===r&&(r=!0);var n=a.useState(n),i=n[0],n=n[1],o=a.useRef(r);return a.useEffect(function(){o.current?o.current=!1:t.trackEvent({name:e},i)},[t,i,e]),n},n.useTrackMetric=function(n,r){var i=a.useRef({hookTimestamp:y(),firstActiveTimestamp:0,totalIdleTime:0,lastActiveTimestamp:0,idleStartTimestamp:0,idleCount:0,idleTimeout:5e3}),t=a.useRef();return t.current=function(){var t=i.current;0<t.lastActiveTimestamp&&0===t.idleStartTimestamp&&y()-t.lastActiveTimestamp>=t.idleTimeout&&(t.idleStartTimestamp=y(),t.idleCount++)},a.useEffect(function(){var e=setInterval(t.current,100);return function(){clearInterval(e);var t=i.current;if(0===t.hookTimestamp)throw Error("useAppInsights:unload hook: hookTimestamp is not initialized.");0!==t.firstActiveTimestamp&&(t=t,t=(y()-t.firstActiveTimestamp-t.totalIdleTime-t.idleCount*t.idleTimeout)/1e3,n.trackMetric({average:t,name:"React Component Engaged Time (seconds)",sampleCount:1},{"Component Name":r}))}},[]),function(){var t,e=i.current;0===e.firstActiveTimestamp?(e.firstActiveTimestamp=y(),e.lastActiveTimestamp=e.firstActiveTimestamp):e.lastActiveTimestamp=y(),0<e.idleStartTimestamp&&(t=e.lastActiveTimestamp-e.idleStartTimestamp,e.totalIdleTime+=t,e.idleStartTimestamp=0)}},n.withAITracking=function(n,t,r,e){return r!==undefined&&null!==r&&"string"==typeof r||(r=t.prototype&&t.prototype.constructor&&t.prototype.constructor.name||"Unknown"),e!==undefined&&null!==e&&"string"==typeof e||(e=""),L(i,o=u.Component),i.prototype.componentDidMount=function(){var t=this;this._mountTimestamp=rn.dateNow(),this._firstActiveTimestamp=0,this._totalIdleTime=0,this._lastActiveTimestamp=0,this._idleStartTimestamp=0,this._idleCount=0,this._intervalId=setInterval(function(){0<t._lastActiveTimestamp&&0===t._idleStartTimestamp&&rn.dateNow()-t._lastActiveTimestamp>=t._idleTimeout&&(t._idleStartTimestamp=rn.dateNow(),t._idleCount++)},100)},i.prototype.componentWillUnmount=function(){if(0===this._mountTimestamp)throw Error("withAITracking:componentWillUnmount: mountTimestamp is not initialized.");var t,e;this._intervalId&&clearInterval(this._intervalId),0!==this._firstActiveTimestamp&&(t=this.getEngagementTimeSeconds(),e={"Component Name":r},n.trackMetric({average:t,name:"React Component Engaged Time (seconds)",sampleCount:1},e))},i.prototype.render=function(){return u.createElement("div",{onKeyDown:this.trackActivity,onMouseMove:this.trackActivity,onScroll:this.trackActivity,onMouseDown:this.trackActivity,onTouchStart:this.trackActivity,onTouchMove:this.trackActivity,className:e},u.createElement(t,P({},this.props)))},i.prototype.getEngagementTimeSeconds=function(){return(rn.dateNow()-this._firstActiveTimestamp-this._totalIdleTime-this._idleCount*this._idleTimeout)/1e3},i;function i(){var n=null!==o&&o.apply(this,arguments)||this;return n._mountTimestamp=0,n._firstActiveTimestamp=0,n._idleStartTimestamp=0,n._lastActiveTimestamp=0,n._totalIdleTime=0,n._idleCount=0,n._idleTimeout=5e3,n.trackActivity=function(t){var e;0===n._firstActiveTimestamp?(n._firstActiveTimestamp=rn.dateNow(),n._lastActiveTimestamp=n._firstActiveTimestamp):n._lastActiveTimestamp=rn.dateNow(),0<n._idleStartTimestamp&&(e=n._lastActiveTimestamp-n._idleStartTimestamp,n._totalIdleTime+=e,n._idleStartTimestamp=0)},n}var o},n),mt="__esModule",t={value:!0},n=Object.defineProperty;if(n)try{return void n(w,mt,t)}catch(dn){}typeof t.value!==undefined&&(w[mt]=t.value)};"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).Microsoft=t.Microsoft||{},t.Microsoft.ApplicationInsights=t.Microsoft.ApplicationInsights||{}),t.React);
|
|
5
|
+
var t=this,e=function(t,a){"use strict";function R(t){return t&&"object"==typeof t&&"default"in t?t:{"default":t}}function j(o){if(o&&o.__esModule)return o;var t,a=(t=Object.create)?t(null):{};return o&&Object.keys(o).forEach(function(t){if("default"!==t){var e=(e=Object.getOwnPropertyDescriptor)?e(o,t):undefined,n=a,r=t,e=e.get?e:{enumerable:!0,get:function(){return o[t]}},i=Object.defineProperty;if(i)try{return void i(n,r,e)}catch(o){}e&&typeof e.value!==undefined&&(n[r]=e.value)}var e}),a["default"]=o,a}var D=j(a),U=R(a),u="function",p="object",i="undefined",r="prototype",B="hasOwnProperty",n=Object,z=n[r],e=n.assign,V=n.create,K=n.defineProperty,g=z[B],o=null;function W(t){return void 0===t&&(t=!0),o&&t||(typeof globalThis!==i&&globalThis&&(o=globalThis),typeof self!==i&&self&&(o=self),typeof window!==i&&window&&(o=window),typeof global!==i&&global&&(o=global)),o}function H(t){throw new TypeError(t)}function q(t){if(V)return V(t);if(null==t)return{};var e=typeof t;function n(){}return e!==p&&e!==u&&H("Object prototype may only be an Object:"+t),n[r]=t,new n}(W()||{}).Symbol,(W()||{}).Reflect;var G=e||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])z[B].call(e,i)&&(t[i]=e[i]);return t},J=function(t,e){return(J=n.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e[B](n)&&(t[n]=e[n])})(t,e)};function $(t,e){function n(){this.constructor=t}typeof e!==u&&null!==e&&H("Class extends value "+e+" is not a constructor or null"),J(t,e),t[r]=null===e?q(e):(n[r]=e[r],new n)}var X="constructor",m="prototype",Y="function",Z="_dynInstFuncs",Q="_isDynProxy",v="_dynClass",tt="_dynInstChk",h=tt,et="_dfOpts",nt="_unknown_",rt="__proto__",it="useBaseInst",ot="setInstFuncs",at=Object,y=at.getPrototypeOf,ut=0;function T(t,e){return t&&at[m].hasOwnProperty.call(t,e)}function lt(t){return t&&(t===at[m]||t===Array[m])}function ct(t){return lt(t)||t===Function[m]}function x(t){if(t){if(y)return y(t);t=t[rt]||t[m]||(t[X]?t[X][m]:null);if(t)return t}return null}function st(t,e){var n=[],r=at.getOwnPropertyNames;if(r)n=r(t);else for(var i in t)"string"==typeof i&&T(t,i)&&n.push(i);if(n&&0<n.length)for(var o=0;o<n.length;o++)e(n[o])}function ft(t,e,n){return e!==X&&typeof t[e]===Y&&(n||T(t,e))}function dt(t){throw new TypeError("DynamicProto: "+t)}function pt(t,e){for(var n=t.length-1;0<=n;n--)if(t[n]===e)return 1}function gt(t,e){return T(t,m)?t.name||e||nt:((t||{})[X]||{}).name||e||nt}function mt(t,r,e,n){T(t,m)||dt("theClass is an invalid class definition.");var i,o,a,u,l,c,s=t[m],f=(function(t){if(y)for(var e=[],n=x(r);n&&!ct(n)&&!pt(e,n);){if(n===t)return 1;e.push(n),n=x(n)}}(s)||dt("["+gt(t)+"] is not in class hierarchy of ["+gt(r)+"]"),null),t=(T(s,v)?f=s[v]:(f="_dynCls$"+gt(t,"_")+"$"+ut,ut++,s[v]=f),mt[et]),d=!!t[it],p=(d&&n&&n[it]!==undefined&&(d=!!n[it]),o={},st(i=r,function(t){!o[t]&&ft(i,t,!1)&&(o[t]=i[t])}),o),d=(e(r,function(t,e,n,o){function r(t,e,n){var r,i=e[n];return i[Q]&&o&&!1!==(r=t[Z]||{})[h]&&(i=(r[e[v]]||{})[n]||i),function(){return i.apply(t,arguments)}}for(var i={},a=(st(n,function(t){i[t]=r(e,n,t)}),x(t)),u=[];a&&!ct(a)&&!pt(u,a);)st(a,function(t){!i[t]&&ft(a,t,!y)&&(i[t]=r(e,a,t))}),u.push(a),a=x(a);return i}(s,r,p,d)),!!y&&!!t[ot]);a=s,e=f,u=r,l=p,t=!1!==(d=d&&n?!!n[ot]:d),lt(a)||(s=u[Z]=u[Z]||{},c=s[e]=s[e]||{},!1!==s[h]&&(s[h]=!!t),st(u,function(t){var n,r,i;ft(u,t,!1)&&u[t]!==l[t]&&(c[t]=u[t],delete u[t],T(a,t)&&(!a[t]||a[t][Q])||(a[t]=(n=a,r=t,(i=function(){var t,e;return(function(t,e,n,r){var i=null;if(t&&T(n,v)){var o=t[Z]||{};if((i=(o[n[v]]||{})[e])||dt("Missing ["+e+"] "+Y),!i[tt]&&!1!==o[h]){for(var a=!T(t,e),u=x(t),l=[];a&&u&&!ct(u)&&!pt(l,u);){var c=u[e];if(c){a=c===r;break}l.push(u),u=x(u)}try{a&&(t[e]=i),i[tt]=1}catch(s){o[h]=!1}}}return i}(this,r,n,i)||(typeof(e=(e=n[t=r])===i?x(n)[t]:e)!==Y&&dt("["+t+"] is not a "+Y),e)).apply(this,arguments)})[Q]=1,i)))}))}mt[et]={setInstFuncs:!0,useBaseInst:!0};var C="",vt="isInitialized",d="teardown",ht="core",yt="disabled",Tt="_doTeardown",xt="toISOString",Ct="endsWith",wt="indexOf",_t="trim",e="toString",It="constructor",At=K,bt=n.freeze,St=n.keys,l=String[r],Et=l[_t],kt=l[Ct],Pt=Date[r][xt],l=Array.isArray,Mt=z[e],Nt=g[e],Ft=Nt.call(n),Lt=/-([a-z])/g,Ot=/([^\w\d_$])/g,Rt=/^(\d+[\w\d_$])/,jt=Object.getPrototypeOf;function w(t){return t===undefined||typeof t===i}function _(t){return null===t||w(t)}function Dt(t){return!_(t)}function Ut(t){return!(!t||typeof t!==p)}function I(t){return!(!t||typeof t!==u)}function Bt(t){var e=t;return t&&Kt(t)?(e=(e=t.replace(Lt,function(t,e){return e.toUpperCase()})).replace(Ot,"_")).replace(Rt,function(t,e){return"_"+e}):e}function zt(t,e){if(t)for(var n in t)g.call(t,n)&&e.call(t,n,t[n])}function A(t,e){return!(!t||!e||!~t.indexOf(e))}var b=l||function(t){return!(!t||"[object Array]"!==Mt.call(t))};function Vt(t){return!(!t||"[object Error]"!==Mt.call(t))}function Kt(t){return"string"==typeof t}function Wt(t){return"boolean"==typeof t}function Ht(t){return t&&"object"==typeof t&&(!(t=(jt||function(t){if(t){if(jt)return jt(t);t=t.__proto__||t[r]||t[It];if(t)return t}return null})(t))||typeof(t=t[It]&&g.call(t,It)?t[It]:t)===u&&Nt.call(t)===Ft)}function S(t,e,n){var r=t.length;try{for(var i=0;i<r&&!(i in t&&-1===e.call(n||t,t[i],i,t));i++);}catch(o){}}function qt(t,e,n){if(t){if(t[wt])return t[wt](e,n);var r=t.length,n=n||0;try{for(var i=Math.max(0<=n?n:r-Math.abs(n),0);i<r;i++)if(i in t&&t[i]===e)return i}catch(o){}}return-1}function E(t){return t&&(Et&&t[_t]?t[_t]():t.replace?t.replace(/^\s+|\s+$/g,""):t)}var Gt=!{toString:null}.propertyIsEnumerable("toString"),Jt=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];function $t(t,e,n,r){if(At)try{var i={enumerable:!0,configurable:!0};return n&&(i.get=n),r&&(i.set=r),At(t,e,i),!0}catch(o){}return!1}var Xt=bt||function(t){return t};function k(){var t=Date;return t.now?t.now():(new t).getTime()}function P(t,e,n,r,i){var o=n;!t||(o=t[e])===n||i&&!i(o)||r&&!r(n)||(t[e]=o=n)}function Yt(t){return!!t}function Zt(t){var n={};return zt(t,function(t,e){if(n[t]=e,!w(n[e]))throw Error("Value: ["+e+"] already exists for "+t);n[e]=t}),Xt(n)}var Qt="window",te="navigator",ee="location",ne="JSON",re="crypto",ie="msCrypto",oe="msie",ae="trident/",ue=null,le=null;function M(t){var e=W();return e&&e[t]?e[t]:t===Qt&&ce()?window:null}function ce(){return typeof window===p&&window}function se(){return typeof document===p&&document?document:M("document")}function fe(){return typeof navigator===p&&navigator?navigator:M(te)}function de(){return typeof JSON===p&&JSON||null!==M(ne)}function pe(){return de()?JSON||M(ne):null}function ge(){var t=fe();return!t||t.userAgent===le&&null!==ue||(t=((le=t.userAgent)||C).toLowerCase(),ue=A(t,oe)||A(t,ae)),ue}function me(t){var e=Object[r].toString.call(t),n=C;return"[object Error]"===e?n="{ stack: '"+t.stack+"', message: '"+t.message+"', name: '"+t.name+"'":de()&&(n=pe().stringify(t)),e+n}var ve=null;function he(t){return t?'"'+t.replace(/\"/g,C)+'"':C}function ye(t,e){var n,r=typeof console!==i?console:M("console");r&&(n="log",I(r[n=r[t]?t:n])&&r[n](e))}xe.dataType="MessageData";var Te=xe;function xe(t,e,n,r){void 0===n&&(n=!1),this.messageId=t,this.message=(n?"AI: ":"AI (Internal): ")+t;n=C,de()&&(n=pe().stringify(r)),t=(e?" message:"+he(e):C)+(r?" props:"+he(n):C);this.message+=t}var Ce=function Rn(i){this.identifier="DiagnosticLogger",this.queue=[];var u=0,l={};mt(Rn,this,function(o){function t(t,e){t=i[t];return _(t)?e:t}function a(t,e){var n,r=(n=(n=ve)||!0===i.disableDbgExt?n:ve||(r=M("Microsoft"),ve=r?r.ApplicationInsights:ve))?n.ChromeDbgExt:null;r&&r.diagLog&&r.diagLog(t,e)}_(i)&&(i={}),o.consoleLoggingLevel=function(){return t("loggingLevelConsole",0)},o.telemetryLoggingLevel=function(){return t("loggingLevelTelemetry",1)},o.maxInternalMessageLimit=function(){return t("maxMessageLimit",25)},o.enableDebugExceptions=function(){return t("enableDebugExceptions",!1)},o.throwInternal=function(t,e,n,r,i){e=new Te(e,n,i=void 0!==i&&i,r);if(o.enableDebugExceptions())throw e;n=1===t?"errorToConsole":"warnToConsole";w(e.message)?a("throw"+(1===t?"Critical":"Warning"),e):(r=o.consoleLoggingLevel(),i?(i=+e.messageId,!l[i]&&t<=r&&(o[n](e.message),l[i]=!0)):t<=r&&o[n](e.message),o.logInternalMessage(t,e))},o.warnToConsole=function(t){ye("warn",t),a("warning",t)},o.errorToConsole=function(t){ye("error",t),a("error",t)},o.resetInternalMessageCount=function(){u=0,l={}},o.logInternalMessage=function(t,e){var n,r;u>=o.maxInternalMessageLimit()||(r=!0,n="AITR_"+e.messageId,l[n]?r=!1:l[n]=!0,r&&(t<=o.telemetryLoggingLevel()&&(o.queue.push(e),u++,a(1===t?"error":"warn",e)),u===o.maxInternalMessageLimit()&&(r=new Te(23,n="Internal events throttle limit per PageView reached for this app.",!1),o.queue.push(r),1===t?o.errorToConsole(n):o.warnToConsole(n))))}})},we=(c.ParentContextKey="parent",c.ChildrenContextKey="childEvts",c);function c(t,i,e){var n,o=this,a=!1;o.start=k(),o.name=t,o.isAsync=e,o.isChildEvt=function(){return!1},I(i)&&(a=$t(o,"payload",function(){return!n&&I(i)&&(n=i(),i=null),n})),o.getCtx=function(t){return t?(t===c.ParentContextKey||t===c.ChildrenContextKey?o:o.ctx||{})[t]:null},o.setCtx=function(t,e){t&&(t===c.ParentContextKey?(o[t]||(o.isChildEvt=function(){return!0}),o[t]=e):t===c.ChildrenContextKey?o[t]=e:(o.ctx=o.ctx||{})[t]=e)},o.complete=function(){var t=0,e=o.getCtx(c.ChildrenContextKey);if(b(e))for(var n=0;n<e.length;n++){var r=e[n];r&&(t+=r.time)}o.time=k()-o.start,o.exTime=o.time-t,o.complete=function(){},!a&&I(i)&&(o.payload=i())}}var _e="CoreUtils.doPerf";function Ie(t,e,n,r,i){if(t)if(t=I(t.getPerfMgr)?t.getPerfMgr():t){var o,a=void 0,u=t.getCtx(_e);try{if(a=t.create(e(),r,i))return u&&a.setCtx&&(a.setCtx(we.ParentContextKey,u),u.getCtx&&u.setCtx&&((o=u.getCtx(we.ChildrenContextKey))||(o=[],u.setCtx(we.ChildrenContextKey,o)),o.push(a))),t.setCtx(_e,a),n(a)}catch(l){a&&a.setCtx&&a.setCtx("exception",l)}finally{a&&t.fire(a),t.setCtx(_e,u)}}n()}var Ae=4294967296,s=4294967295,be=!1,Se=123456789,Ee=987654321;function ke(t){t<0&&(t>>>=0),Se=123456789+t&s,Ee=987654321-t&s,be=!0}function Pe(){try{var t=2147483647&k();ke((Math.random()*Ae^t)+t)}catch(e){}}function Me(t){return 0<t?Math.floor(f()/s*(t+1))>>>0:0}function f(t){var e=0,n=M(re)||M(ie);return 0===(e=n&&n.getRandomValues?n.getRandomValues(new Uint32Array(1))[0]&s:e)&&ge()&&(be||Pe(),e=Ne()&s),0===e&&(e=Math.floor(Ae*Math.random()|0)),t||(e>>>=0),e}function Ne(t){var e=((Ee=36969*(65535&Ee)+(Ee>>16)&s)<<16)+(65535&(Se=18e3*(65535&Se)+(Se>>16)&s))>>>0&s|0;return t||(e>>>=0),e}function Fe(t){void 0===t&&(t=22);for(var e=f()>>>0,n=0,r=C;r.length<t;)r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[0|63&e]||"",e>>>=6,5==++n&&(e=(f()<<2&4294967295|3&e)>>>0,n=0);return r}var Le=K,Oe="2.7.3",Re="."+Fe(6),je=0;function De(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType}function Ue(t,e){return Bt(t+je+++((e=void 0!==e&&e)?"."+Oe:"")+Re)}function Be(t){var o={id:Ue("_aiData-"+(t||"")+"."+Oe),accept:De,get:function(t,e,n,r){var i=t[o.id];return i?i[Bt(e)]:(r&&((i=function(t,e){var n=e[t.id];if(!n){n={};try{De(e)&&!function(t,e,n){if(Le)try{return Le(t,e,{value:n,enumerable:!1,configurable:!0}),1}catch(r){}}(e,t.id,n)&&(e[t.id]=n)}catch(r){}}return n}(o,t))[Bt(e)]=n),n)},kill:function(t,e){if(t&&t[e])try{delete t[e]}catch(n){}}};return o}var ze=Be("plugin");function Ve(t){return ze.get(t,"state",{},!0)}var Ke="TelemetryPluginChain",We="_hasRun",He="_getTelCtx",qe=0;function Ge(t,a,n,e){var r=e?function(t,e,n,r){for(;t;){if(t.getPlugin()===r)return t;t=t.getNext()}return $e([r],e,n)}(t,a,n,e):t,i=[],o={_next:function(){var t,e=r;return r=e?e.getNext():null,e||(t=i)&&0<t.length&&(S(t,function(t){try{t.func.call(t.self,t.args)}catch(e){n.logger.throwInternal(2,73,"Unexpected Exception during onComplete - "+me(e))}}),i=[]),e},ctx:{core:function(){return n},diagLog:function(){return(n||{}).logger||new Ce(a)},getCfg:function(){return a},getExtCfg:u,getConfig:function(t,e,n){void 0===n&&(n=!1);var r,t=u(t,null);return t&&!_(t[e])?r=t[e]:a&&!_(a[e])&&(r=a[e]),_(r)?n:r},hasNext:function(){return!!r},getNext:function(){return r},setNext:function(t){r=t},iterate:function(t){for(;e=o._next();){var e=e.getPlugin();e&&t(e)}},onComplete:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];t&&i.push({func:t,self:w(e)?o.ctx:e,args:n})}}};function u(t,e,n){var r,i,o;return void 0===e&&(e={}),void 0===n&&(n=0),(r=a&&(i=a.extensionConfig)&&t?i[t]:r)?Ut(e)&&0!==n&&(o=function d(){var t=arguments,e=t[0]||{},n=t.length,r=!1,i=1;for(0<n&&Wt(e)&&(r=e,e=t[i]||{},i++),Ut(e)||(e={});i<n;i++){var o,a,u,l,c=t[i],s=b(c),f=Ut(c);for(o in c)(s&&o in c||f&&g.call(c,o))&&(a=c[o],u=void 0,r&&a&&((u=b(a))||Ht(a))&&(l=e[o],u?b(l)||(l=[]):Ht(l)||(l={}),a=d(r,l,a)),a!==undefined&&(e[o]=a))}return e}(!0,e,r),a&&2===n&&zt(e,function(t){var e;_(o[t])&&!_(e=a[t])&&(o[t]=e)})):r=e,r}return o}function Je(t,n,r,e){var i=Ge(t,n,r,e),o=i.ctx;return o.processNext=function(t){var e=i._next();return e&&e.processTelemetry(t,o),!e},o.createNew=function(t,e){return Je((t=b(t=void 0===t?null:t)?$e(t,n,r,e):t)||o.getNext(),n,r,e)},o}function $e(t,e,n,r){var i,o=null,a=!r;return b(t)&&0<t.length&&(i=null,S(t,function(t){(a=!a&&r===t||a)&&t&&I(t.processTelemetry)&&(t=Xe(t,e,n),o=o||t,i&&i._setNext(t),i=t)})),r&&!o?$e([r],e,n):o}function Xe(l,r,i){var c=null,o=I(l.processTelemetry),a=I(l.setNextPlugin),s=l?l.identifier+"-"+l.priority+"-"+qe++:"Unknown-0-"+qe++,u={getPlugin:function(){return l},getNext:function(){return c},processTelemetry:function(n,t){var e;f(t=t||(e=(e=l&&I(l[He])?l[He]():e)||Je(u,r,i)),function(t){if(!l||!o)return!1;var e=Ve(l);return!e[d]&&!e[yt]&&(a&&l.setNextPlugin(c),l.processTelemetry(n,t),!0)},"processTelemetry",function(){return{item:n}},!n.sync)||t.processNext(n)},unload:function(r,i){f(r,function(){var t,e,n=!1;return l&&(t=Ve(l),e=l[ht]||t.core,!l||e&&e!==r[ht]()||t[d]||(t[ht]=null,t[d]=!0,t[vt]=!1,l[d]&&!0===l[d](r,i)&&(n=!0))),n},"unload",function(){},i.isAsync)||r.processNext(i)},_id:s,_setNext:function(t){c=t}};function f(n,r,i,t,e){var o=!1,a=l?l.identifier:Ke,u=(u=n[We])||(n[We]={});return n.setNext(c),l&&Ie(n[ht](),function(){return a+":"+i},function(){u[s]=!0;try{var t=c?c._id:C;t&&(u[t]=!1),o=r(n)}catch(e){t=!c||u[c._id];t&&(o=!0),c&&t||n.diagLog().throwInternal(1,73,"Plugin ["+l.identifier+"] failed during "+i+" - "+me(e)+", run flags: "+me(u))}},t,e),o}return Xt(u)}var Ye="toGMTString",Ze="toUTCString",Qe="cookie",tn="expires",en="enabled",nn="isCookieUseDisabled",rn="disableCookiesUsage",N="_ckMgr",on=null,an=null,un=null,ln=se(),cn={},sn={};function fn(t,e){var n=pn[N]||sn[N];return n||(n=pn[N]=pn(t,e),sn[N]=n),n}function dn(t){return!t||t.isEnabled()}function pn(t,i){P(n=(t=t||sn).cookieCfg=t.cookieCfg||{},"domain",t.cookieDomain,Dt,_),P(n,"path",t.cookiePath||"/",null,_),_(n[en])&&(e=void 0,w(t[nn])||(e=!t[nn]),w(t[rn])||(e=!t[rn]),n[en]=e);var e,n,c=n,s=c.path||"/",f=c.domain,r=!1!==c[en],d={isEnabled:function(){var t=r&&gn(i),e=sn[N];return t&&e&&d!==e?dn(e):t},setEnabled:function(t){r=!1!==t},set:function(t,e,n,r,i){var o,a,u,l=!1;return dn(d)&&(o={},-1!=(u=(a=E(e||C)).indexOf(";"))&&(a=E(e.substring(0,u)),o=mn(e.substring(1+u))),P(o,"domain",r||f,Yt,w),_(n)||(u=ge(),w(o[tn])&&0<(e=k()+1e3*n)&&((r=new Date).setTime(e),P(o,tn,vn(r,u?Ye:Ze)||vn(r,u?Ye:Ze)||C,Yt)),u||P(o,"max-age",C+n,null,w)),(e=typeof location===p&&location?location:M(ee))&&"https:"===e.protocol&&(P(o,"secure",null,null,w),(an=null===an?!(Kt(r=(fe()||{}).userAgent)&&(A(r,"CPU iPhone OS 12")||A(r,"iPad; CPU OS 12")||A(r,"Macintosh; Intel Mac OS X 10_14")&&A(r,"Version/")&&A(r,"Safari")||A(r,"Macintosh; Intel Mac OS X 10_14")&&function(t,e){var n=!1;if(!t||(n=t===e))return n;if(kt)return t[Ct](e);var r=t,i=e,n=!1,t=r?r.length:0;if(t&&40<=t&&!(n=r===i)){for(var o=t-1,a=39;0<=a;a--){if(r[o]!=i[a])return;o--}n=!0}return n}(r,"AppleWebKit/605.1.15 (KHTML, like Gecko)")||A(r,"Chrome/5")||A(r,"Chrome/6")||A(r,"UnrealEngine")&&!A(r,"Chrome")||A(r,"UCBrowser/12")||A(r,"UCBrowser/11"))):an)&&P(o,"SameSite","None",null,w)),P(o,"path",i||s,null,w),(c.setCookie||yn)(t,hn(a,o)),l=!0),l},get:function(t){var e=C;return dn(d)?(c.getCookie||function(t){var e,n=C;return ln&&(e=ln[Qe]||C,un!==e&&(cn=mn(e),un=e),n=E(cn[t]||C)),n})(t):e},del:function(t,e){return!!dn(d)&&d.purge(t,e)},purge:function(t,e){var n,r=!1;return gn(i)&&((n={}).path=e||"/",n[tn]="Thu, 01 Jan 1970 00:00:01 GMT",e=n,ge()||(e["max-age"]="0"),(c.delCookie||yn)(t,hn(C,e)),r=!0),r}};return d[N]=d}function gn(t){if(null===on){on=!1;try{on=(ln||{})[Qe]!==undefined}catch(n){t&&t.throwInternal(2,68,"Cannot access document.cookie - "+(Vt(e=n)?e.name:C),{exception:me(n)})}}var e;return on}function mn(t){var n={};return t&&t.length&&S(E(t).split(";"),function(t){var e;(t=E(t||C))&&(-1==(e=t.indexOf("="))?n[t]=null:n[E(t.substring(0,e))]=E(t.substring(1+e)))}),n}function vn(t,e){return I(t[e])?t[e]():null}function hn(t,e){var n=t||C;return zt(e,function(t,e){n+="; "+t+(_(e)?C:"="+e)}),n}function yn(t,e){ln&&(ln[Qe]=t+"="+e)}var F="getPlugin",e=function jn(){var o,a,c,s,u=this;function e(t){var e,t=t=void 0===t?null:t;return t||(e=a||Je(null,{},u.core),t=c&&c[F]?e.createNew(null,c[F]):e.createNew(null,c)),t}function f(){o=!1,u.core=null,c=a=null,s=[]}f(),mt(jn,u,function(l){l.initialize=function(t,e,n,r){t&&P(t,"extensionConfig",[],null,_),!r&&e&&(r=e.getProcessTelContext().getNext());var i=c;c&&c[F]&&(i=c[F]()),u.core=e,a=Je(r,t,e,i),o=!0},l.teardown=function(t,e){var n,r,i,o;if(l.core&&(!t||l.core===t.core()))return r=!1,i=t||function u(t,n,r,e){var i=Ge(t,n,r,e),o=i.ctx;return o.processNext=function(t){var e=i._next();return e&&e.unload(o,t),!e},o.createNew=function(t,e){return u((t=b(t=void 0===t?null:t)?$e(t,n,r,e):t)||o.getNext(),n,r,e)},o}(null,{},l.core,c&&c[F]?c[F]():c),o=e||{reason:0,isAsync:!1},l[Tt]&&!0===l[Tt](i,o,a)?n=!0:a(),n;function a(){r||(r=!0,S(s,function(t){t.rm()}),s=[],!0===n&&i.processNext(o),f())}},l._addHook=function(t){t&&(b(t)?s=s.concat(t):s.push(t))}}),u.diagLog=function(t){return e(t).diagLog()},u[vt]=function(){return o},u.setInitialized=function(t){o=t},u.setNextPlugin=function(t){c=t},u.processNext=function(t,e){e?e.processNext(t):c&&I(c.processTelemetry)&&c.processTelemetry(t,null)},u._getTelCtx=e},Tn="attachEvent",xn="addEventListener",Cn=(Ue("aiEvtPageHide"),Ue("aiEvtPageShow"),1),wn=Be("events"),_n=/^([^.]*)(?:\.(.+)|)/;function In(t){return t&&t.replace?t.replace(/^\s*\.*|\.*\s*$/g,""):t}function An(t,e,n,r,i){void 0===i&&(i=!1);var o,a,u,l,c,s,f,d,p=!1;if(t)try{c=e,(s=r)&&(f="",b(s)?(f="",S(s,function(t){(t=In(t))&&("."!==t[0]&&(t="."+t),f+=t)})):f=In(s),f&&(c=(c||"")+(f="."!==f[0]?"."+f:f)));var g,m={type:(d=_n.exec(c)||[])[1],ns:(d[2]||"").split(".").sort().join(".")},v=m,h=n,y=i,T=!1;(l=t)&&v&&v.type&&h&&(l[xn]?(l[xn](v.type,h,y),T=!0):l[Tn]&&(l[Tn]("on"+v.type,h),T=!0)),(p=T)&&wn.accept(t)&&(g={guid:Cn++,evtName:m,handler:n,capture:i},o=m.type,((u=wn.get(t,"events",{},a=void 0===a||a))[o]||(u[o]=[])).push(g))}catch(x){}return p}var bn,Sn,En=null,L={_canUseCookies:undefined,isTypeof:function(t,e){return typeof t===e},isUndefined:w,isNullOrUndefined:_,hasOwnProperty:function(t,e){return!(!t||!g.call(t,e))},isFunction:I,isObject:Ut,isDate:function(t){return!(!t||"[object Date]"!==Mt.call(t))},isArray:b,isError:Vt,isString:Kt,isNumber:function(t){return"number"==typeof t},isBoolean:Wt,toISOString:function(t){if(t){if(Pt)return t[xt]();var e;return t&&t.getUTCFullYear?(e=function(t){t=""+t;return 1===t.length?"0"+t:t},t.getUTCFullYear()+"-"+e(1+t.getUTCMonth())+"-"+e(t.getUTCDate())+"T"+e(t.getUTCHours())+":"+e(t.getUTCMinutes())+":"+e(t.getUTCSeconds())+"."+(t.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"):void 0}},arrForEach:S,arrIndexOf:qt,arrMap:function(t,e,n){if(t){if(t.map)return t.map(e,n);var r=t.length,i=n||t,o=Array(r);try{for(var a=0;a<r;a++)a in t&&(o[a]=e.call(i,t[a],t))}catch(u){}}return o},arrReduce:function(t,e,n){var r;if(t){if(t.reduce)return t.reduce(e,n);var i=t.length,o=0;if(3<=arguments.length)r=n;else{for(;o<i&&!(o in t);)o++;r=t[o++]}for(;o<i;)o in t&&(r=e(r,t[o],o,t)),o++}return r},strTrim:E,objCreate:q,objKeys:function(t){var e=typeof t;if(e===u||e===p&&null!==t||H("objKeys called on non-object"),!Gt&&St)return St(t);var n,r=[];for(n in t)t&&g.call(t,n)&&r.push(n);if(Gt)for(var i=Jt.length,o=0;o<i;o++)t&&g.call(t,Jt[o])&&r.push(Jt[o]);return r},objDefineAccessors:$t,addEventHandler:function(t,e,n){var r=!1,i=ce()?window:M(Qt),i=(i&&(r=An(i,t,e,n),r=An(i.body,t,e,n)||r),se());return i&&An(i,t,e,n)||r},dateNow:k,isIE:ge,disableCookies:function(){var t=fn(void 0,void 0),e=L._canUseCookies;null===En&&(En=[],bn=e,$t(L,"_canUseCookies",function(){return bn},function(e){bn=e,S(En,function(t){t.setEnabled(e)})})),-1===qt(En,t)&&En.push(t),Wt(e)&&t.setEnabled(e),Wt(bn)&&t.setEnabled(bn),t.setEnabled(!1)},newGuid:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(kn,function(t){var e=0|Me(15);return("x"===t?e:3&e|8).toString(16)})},perfNow:function(){var t=M("performance");return t&&t.now?t.now():k()},newId:Fe,randomValue:Me,random32:f,mwcRandomSeed:function(t){t?ke(t):Pe()},mwcRandom32:Ne,generateW3CId:function(){for(var t,e=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],n=C,r=0;r<4;r++)n+=e[15&(t=f())]+e[t>>4&15]+e[t>>8&15]+e[t>>12&15]+e[t>>16&15]+e[t>>20&15]+e[t>>24&15]+e[t>>28&15];var i=e[8+(3&f())|0];return n.substr(0,8)+n.substr(9,4)+"4"+n.substr(13,3)+i+n.substr(16,3)+n.substr(19,12)}},kn=/[xy]/g,Pn=Zt({CRITICAL:1,WARNING:2}),Mn=Zt({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 O(){var t=null!==Sn&&Sn.apply(this,arguments)||this;return t.priority=185,t.identifier="ReactPlugin",t}$(O,Sn=e),O.prototype.initialize=function(t,e,n,r){var i=this;Sn.prototype.initialize.call(this,t,e,n,r),this._extensionConfig=t.extensionConfig&&t.extensionConfig[this.identifier]?t.extensionConfig[this.identifier]:{history:null},S(n,function(t){"ApplicationInsightsAnalytics"===t.identifier&&(i._analyticsPlugin=t)}),this._extensionConfig.history&&(this.addHistoryListener(this._extensionConfig.history),e={uri:this._extensionConfig.history.location.pathname},this.trackPageView(e))},O.prototype.getCookieMgr=function(){return(e=(t=this.core)?t.getCookieMgr():e)||fn(void 0,(t||{}).logger);var t,e},O.prototype.getAppInsights=function(){return this._analyticsPlugin},O.prototype.processTelemetry=function(t,e){this.processNext(t,e)},O.prototype.trackMetric=function(t,e){this._analyticsPlugin?this._analyticsPlugin.trackMetric(t,e):this.diagLog().throwInternal(Pn.CRITICAL,Mn.TelemetryInitializerFailed,"Analytics plugin is not available, React plugin telemetry will not be sent: ")},O.prototype.trackPageView=function(t){this._analyticsPlugin?this._analyticsPlugin.trackPageView(t):this.diagLog().throwInternal(Pn.CRITICAL,Mn.TelemetryInitializerFailed,"Analytics plugin is not available, React plugin telemetry will not be sent: ")},O.prototype.trackEvent=function(t,e){this._analyticsPlugin?this._analyticsPlugin.trackEvent(t,e):this.diagLog().throwInternal(Pn.CRITICAL,Mn.TelemetryInitializerFailed,"Analytics plugin is not available, React plugin telemetry will not be sent: ")},O.prototype.trackException=function(t,e){this._analyticsPlugin?this._analyticsPlugin.trackException(t,e):this.diagLog().throwInternal(Pn.CRITICAL,Mn.TelemetryInitializerFailed,"Analytics plugin is not available, React plugin telemetry will not be sent: ")},O.prototype.trackTrace=function(t,e){this._analyticsPlugin?this._analyticsPlugin.trackTrace(t,e):this.diagLog().throwInternal(Pn.CRITICAL,Mn.TelemetryInitializerFailed,"Analytics plugin is not available, React plugin telemetry will not be sent: ")},O.prototype.addHistoryListener=function(t){var n=this;t.listen(function(t){var e="location"in t?t.location:t;setTimeout(function(){var t={uri:e.pathname};n.trackPageView(t)},500)})};var Nn,Fn,l=O;function Ln(){var t=null!==Nn&&Nn.apply(this,arguments)||this;return t.state={hasError:!1},t}Fn=3,$(Ln,Nn=U["default"].Component),Ln.prototype.componentDidCatch=function(t,e){this.setState({hasError:!0}),this.props.appInsights.trackException({error:t,exception:t,severityLevel:Fn,properties:e})},Ln.prototype.render=function(){var t;return this.state.hasError?(t=this.props.onError,U["default"].createElement(t)):this.props.children};var bt=Ln,On=a.createContext(undefined),K=(t.AppInsightsContext=On,t.AppInsightsErrorBoundary=bt,t.ReactPlugin=l,t.useAppInsightsContext=function(){return a.useContext(On)},t.useTrackEvent=function(t,e,n,r){void 0===r&&(r=!0);var n=a.useState(n),i=n[0],n=n[1],o=a.useRef(r);return a.useEffect(function(){o.current?o.current=!1:t.trackEvent({name:e},i)},[t,i,e]),n},t.useTrackMetric=function(n,r){var i=a.useRef({hookTimestamp:k(),firstActiveTimestamp:0,totalIdleTime:0,lastActiveTimestamp:0,idleStartTimestamp:0,idleCount:0,idleTimeout:5e3}),t=a.useRef();return t.current=function(){var t=i.current;0<t.lastActiveTimestamp&&0===t.idleStartTimestamp&&k()-t.lastActiveTimestamp>=t.idleTimeout&&(t.idleStartTimestamp=k(),t.idleCount++)},a.useEffect(function(){var e=setInterval(t.current,100);return function(){clearInterval(e);var t=i.current;if(0===t.hookTimestamp)throw Error("useAppInsights:unload hook: hookTimestamp is not initialized.");0!==t.firstActiveTimestamp&&(t=t,t=(k()-t.firstActiveTimestamp-t.totalIdleTime-t.idleCount*t.idleTimeout)/1e3,n.trackMetric({average:t,name:"React Component Engaged Time (seconds)",sampleCount:1},{"Component Name":r}))}},[]),function(){var t,e=i.current;0===e.firstActiveTimestamp?(e.firstActiveTimestamp=k(),e.lastActiveTimestamp=e.firstActiveTimestamp):e.lastActiveTimestamp=k(),0<e.idleStartTimestamp&&(t=e.lastActiveTimestamp-e.idleStartTimestamp,e.totalIdleTime+=t,e.idleStartTimestamp=0)}},t.withAITracking=function(n,t,r,e){return r!==undefined&&null!==r&&"string"==typeof r||(r=t.prototype&&t.prototype.constructor&&t.prototype.constructor.name||"Unknown"),e!==undefined&&null!==e&&"string"==typeof e||(e=""),$(i,o=D.Component),i.prototype.componentDidMount=function(){var t=this;this._mountTimestamp=L.dateNow(),this._firstActiveTimestamp=0,this._totalIdleTime=0,this._lastActiveTimestamp=0,this._idleStartTimestamp=0,this._idleCount=0,this._intervalId=setInterval(function(){0<t._lastActiveTimestamp&&0===t._idleStartTimestamp&&L.dateNow()-t._lastActiveTimestamp>=t._idleTimeout&&(t._idleStartTimestamp=L.dateNow(),t._idleCount++)},100)},i.prototype.componentWillUnmount=function(){if(0===this._mountTimestamp)throw Error("withAITracking:componentWillUnmount: mountTimestamp is not initialized.");var t,e;this._intervalId&&clearInterval(this._intervalId),0!==this._firstActiveTimestamp&&(t=this.getEngagementTimeSeconds(),e={"Component Name":r},n.trackMetric({average:t,name:"React Component Engaged Time (seconds)",sampleCount:1},e))},i.prototype.render=function(){return D.createElement("div",{onKeyDown:this.trackActivity,onMouseMove:this.trackActivity,onScroll:this.trackActivity,onMouseDown:this.trackActivity,onTouchStart:this.trackActivity,onTouchMove:this.trackActivity,className:e},D.createElement(t,G({},this.props)))},i.prototype.getEngagementTimeSeconds=function(){return(L.dateNow()-this._firstActiveTimestamp-this._totalIdleTime-this._idleCount*this._idleTimeout)/1e3},i;function i(){var n=null!==o&&o.apply(this,arguments)||this;return n._mountTimestamp=0,n._firstActiveTimestamp=0,n._idleStartTimestamp=0,n._lastActiveTimestamp=0,n._totalIdleTime=0,n._idleCount=0,n._idleTimeout=5e3,n.trackActivity=function(t){var e;0===n._firstActiveTimestamp?(n._firstActiveTimestamp=L.dateNow(),n._lastActiveTimestamp=n._firstActiveTimestamp):n._lastActiveTimestamp=L.dateNow(),0<n._idleStartTimestamp&&(e=n._lastActiveTimestamp-n._idleStartTimestamp,n._totalIdleTime+=e,n._idleStartTimestamp=0)},n}var o},t),e="__esModule",bt={value:!0},l=Object.defineProperty;if(l)try{return void l(K,e,bt)}catch(Dn){}typeof bt.value!==undefined&&(K[e]=bt.value)};"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).Microsoft=t.Microsoft||{},t.Microsoft.ApplicationInsights=t.Microsoft.ApplicationInsights||{}),t.React);
|
|
6
6
|
//# sourceMappingURL=applicationinsights-react-js.min.js.map
|