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