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