@microsoft/applicationinsights-properties-js 2.8.4-nightly.2205-08 → 2.8.4

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.
Files changed (39) hide show
  1. package/browser/applicationinsights-properties-js.integrity.json +9 -9
  2. package/browser/applicationinsights-properties-js.js +571 -499
  3. package/browser/applicationinsights-properties-js.js.map +1 -1
  4. package/browser/applicationinsights-properties-js.min.js +2 -2
  5. package/browser/applicationinsights-properties-js.min.js.map +1 -1
  6. package/dist/applicationinsights-properties-js.api.json +45 -1
  7. package/dist/applicationinsights-properties-js.api.md +4 -1
  8. package/dist/applicationinsights-properties-js.d.ts +4 -2
  9. package/dist/applicationinsights-properties-js.js +571 -499
  10. package/dist/applicationinsights-properties-js.js.map +1 -1
  11. package/dist/applicationinsights-properties-js.min.js +2 -2
  12. package/dist/applicationinsights-properties-js.min.js.map +1 -1
  13. package/dist/applicationinsights-properties-js.rollup.d.ts +4 -2
  14. package/dist-esm/Context/Application.js +1 -1
  15. package/dist-esm/Context/Device.js +1 -1
  16. package/dist-esm/Context/Internal.js +2 -2
  17. package/dist-esm/Context/Internal.js.map +1 -1
  18. package/dist-esm/Context/Location.js +1 -1
  19. package/dist-esm/Context/Session.js +5 -5
  20. package/dist-esm/Context/Session.js.map +1 -1
  21. package/dist-esm/Context/TelemetryTrace.js +3 -4
  22. package/dist-esm/Context/TelemetryTrace.js.map +1 -1
  23. package/dist-esm/Context/User.js +2 -2
  24. package/dist-esm/Context/User.js.map +1 -1
  25. package/dist-esm/Interfaces/IPropTelemetryContext.js +1 -1
  26. package/dist-esm/Interfaces/ITelemetryConfig.js +1 -1
  27. package/dist-esm/PropertiesPlugin.js +30 -8
  28. package/dist-esm/PropertiesPlugin.js.map +1 -1
  29. package/dist-esm/TelemetryContext.js +11 -3
  30. package/dist-esm/TelemetryContext.js.map +1 -1
  31. package/dist-esm/applicationinsights-properties-js.js +1 -1
  32. package/package.json +58 -61
  33. package/src/Context/Internal.ts +1 -1
  34. package/src/Context/TelemetryTrace.ts +3 -3
  35. package/src/PropertiesPlugin.ts +33 -7
  36. package/src/TelemetryContext.ts +12 -3
  37. package/types/Context/TelemetryTrace.d.ts +1 -0
  38. package/types/TelemetryContext.d.ts +2 -2
  39. package/types/tsdoc-metadata.json +1 -1
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * Application Insights JavaScript SDK - Properties Plugin, 2.8.4-nightly.2205-08
2
+ * Application Insights JavaScript SDK - Properties Plugin, 2.8.4
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
- var e=this,n=function(e){"use strict";var E="function",a="object",V="undefined",o="prototype",R="hasOwnProperty",t=Object,n=t[o],j=t.create,r=t.defineProperty,q=n[R],B=null;function K(e){return void 0===e&&(e=!0),B&&e||(typeof globalThis!==V&&globalThis&&(B=globalThis),typeof self!==V&&self&&(B=self),typeof window!==V&&window&&(B=window),typeof global!==V&&global&&(B=global)),B}function F(e){throw new TypeError(e)}(K()||{}).Symbol,(K()||{}).Reflect;var z=function(e,n){return(z=t.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)n[R](t)&&(e[t]=n[t])})(e,n)};function W(e,n){function t(){this.constructor=e}typeof n!==E&&null!==n&&F("Class extends value "+n+" is not a constructor or null"),z(e,n),e[o]=null===n?function(e){if(j)return j(e);if(null==e)return{};var n=typeof e;function t(){}return n!==a&&n!==E&&F("Object prototype may only be an Object:"+e),t[o]=e,new t}(n):(t[o]=n[o],new t)}var J="constructor",p="prototype",$="function",G="_dynInstFuncs",H="_isDynProxy",X="_dynClass",Y="_dynInstChk",Z=Y,Q="_dfOpts",ee="_unknown_",ne="__proto__",te="_dyn"+ne,oe="_dynInstProto",re="useBaseInst",ie="setInstFuncs",ae=Object,ue=ae.getPrototypeOf,ce=ae.getOwnPropertyNames,se=0;function v(e,n){return e&&ae[p].hasOwnProperty.call(e,n)}function le(e){return e&&(e===ae[p]||e===Array[p])}function fe(e){return le(e)||e===Function[p]}function h(e){if(e){if(ue)return ue(e);var n=e[ne]||e[p]||(e[J]?e[J][p]:null),t=e[te]||n;v(e,te)||(delete e[oe],t=e[te]=e[oe]||e[te],e[oe]=n)}return t}function de(e,n){var t=[];if(ce)t=ce(e);else for(var o in e)"string"==typeof o&&v(e,o)&&t.push(o);if(t&&0<t.length)for(var r=0;r<t.length;r++)n(t[r])}function ge(e,n,t){return n!==J&&typeof e[n]===$&&(t||v(e,n))}function pe(e){throw new TypeError("DynamicProto: "+e)}function ve(e,n){for(var t=e.length-1;0<=t;t--)if(e[t]===n)return 1}function he(e,n){return v(e,p)?e.name||n||ee:((e||{})[J]||{}).name||n||ee}function y(e,o,n,t){v(e,p)||pe("theClass is an invalid class definition.");var r,i,a,u,c,s,l=e[p],f=(function(e){if(!ue)return 1;for(var n=[],t=h(o);t&&!fe(t)&&!ve(n,t);){if(t===e)return 1;n.push(t),t=h(t)}}(l)||pe("["+he(e)+"] is not in class hierarchy of ["+he(o)+"]"),null),e=(v(l,X)?f=l[X]:(f="_dynCls$"+he(e,"_")+"$"+se,se++,l[X]=f),y[Q]),d=!!e[re],g=(d&&t&&t[re]!==undefined&&(d=!!t[re]),i={},de(r=o,function(e){!i[e]&&ge(r,e,!1)&&(i[e]=r[e])}),i),d=(n(o,function(e,n,t,i){function o(e,n,t){var o,r=n[t];return r[H]&&i&&!1!==(o=e[G]||{})[Z]&&(r=(o[n[X]]||{})[t]||r),function(){return r.apply(e,arguments)}}for(var r={},a=(de(t,function(e){r[e]=o(n,t,e)}),h(e)),u=[];a&&!fe(a)&&!ve(u,a);)de(a,function(e){!r[e]&&ge(a,e,!ue)&&(r[e]=o(n,a,e))}),u.push(a),a=h(a);return r}(l,o,g,d)),!!ue&&!!e[ie]);a=l,n=f,u=o,c=g,e=!1!==(d=d&&t?!!t[ie]:d),le(a)||(l=u[G]=u[G]||{},s=l[n]=l[n]||{},!1!==l[Z]&&(l[Z]=!!e),de(u,function(e){var t,o,r;ge(u,e,!1)&&u[e]!==c[e]&&(s[e]=u[e],delete u[e],v(a,e)&&(!a[e]||a[e][H])||(a[e]=(t=a,o=e,(r=function(){var e,n;return(function(e,n,t,o){var r=null;if(e&&v(t,X)){var i=e[G]||{};if((r=(i[t[X]]||{})[n])||pe("Missing ["+n+"] "+$),!r[Y]&&!1!==i[Z]){for(var a=!v(e,n),u=h(e),c=[];a&&u&&!fe(u)&&!ve(c,u);){var s=u[n];if(s){a=s===o;break}c.push(u),u=h(u)}try{a&&(e[n]=r),r[Y]=1}catch(l){i[Z]=!1}}}return r}(this,o,t,r)||(typeof(n=(n=t[e=o])===r?h(t)[e]:n)!==$&&pe("["+e+"] is not a "+$),n)).apply(this,arguments)})[H]=1,r)))}))}y[Q]={setInstFuncs:!0,useBaseInst:!0};var g="",ye="isInitialized",me="teardown",xe="core",Ce="update",we="disabled",Ie="_doTeardown",Se="toISOString",be="endsWith",Ne="trim",i="toString",ke="constructor",_e=r,Te=t.freeze,Pe=t.keys,Me=String[o],Ue=Me[Ne],De=Me[be],Ae=Date[o][Se],Me=Array.isArray,Le=n[i],Oe=q[i],Ee=Oe.call(t),Ve=/-([a-z])/g,Re=/([^\w\d_$])/g,je=/^(\d+[\w\d_$])/,qe=Object.getPrototypeOf;function m(e){return e===undefined||typeof e===V}function x(e){return null===e||m(e)}function Be(e){return!x(e)}function Ke(e){return!(!e||typeof e!==a)}function C(e){return!(!e||typeof e!==E)}function Fe(e){var n=e;return e&&S(e)?(n=(n=e.replace(Ve,function(e,n){return n.toUpperCase()})).replace(Re,"_")).replace(je,function(e,n){return"_"+n}):n}function f(e,n){if(e)for(var t in e)q.call(e,t)&&n.call(e,t,e[t])}function w(e,n){return!(!e||!n||!~e.indexOf(n))}var I=Me||function(e){return!(!e||"[object Array]"!==Le.call(e))};function S(e){return"string"==typeof e}function ze(e){return e&&"object"==typeof e&&(!(e=(qe||function(e){if(e){if(qe)return qe(e);e=e.__proto__||e[o]||e[ke];if(e)return e}return null})(e))||typeof(e=e[ke]&&q.call(e,ke)?e[ke]:e)===E&&Oe.call(e)===Ee)}function We(e,n,t){var o=e.length;try{for(var r=0;r<o&&!(r in e&&-1===n.call(t||e,e[r],r,e));r++);}catch(i){}}function b(e){return e&&(Ue&&e[Ne]?e[Ne]():e.replace?e.replace(/^\s+|\s+$/g,""):e)}var Je=!{toString:null}.propertyIsEnumerable("toString"),$e=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Ge=Te||function(e){return e};function He(){var e=Date;return e.now?e.now():(new e).getTime()}function Xe(e){return e&&"[object Error]"===Le.call(e)?e.name:g}function N(e,n,t,o,r){var i=t;!e||(i=e[n])===t||r&&!r(i)||o&&!o(t)||(e[n]=i=t)}function d(e,n,t){var o;return e?!(o=e[n])&&x(o)&&(o=m(t)?{}:t,e[n]=o):o=m(t)?{}:t,o}function Ye(e){return!!e}function Ze(e){var t={};return f(e,function(e,n){t[e]=n,t[n]=e}),e=t,Te&&f(e,function(e,n){(I(n)||Ke(n))&&Te(n)}),Ge(e)}var Qe="window",en="navigator",nn="location",tn="JSON",on="crypto",rn="msCrypto",an="msie",un="trident/",cn=null,sn=null,ln=!1;function s(e){var n=K();return n&&n[e]?n[e]:e===Qe&&fn()?window:null}function fn(){return typeof window===a&&window}function dn(){return typeof navigator===a&&navigator?navigator:s(en)}function gn(e){if(e&&ln){e=s("__mockLocation");if(e)return e}return typeof location===a&&location?location:s(nn)}function pn(){return typeof JSON===a&&JSON||null!==s(tn)}function vn(){return pn()?JSON||s(tn):null}function hn(){var e=dn();return!e||e.userAgent===sn&&null!==cn||(e=((sn=e.userAgent)||g).toLowerCase(),cn=w(e,an)||w(e,un)),cn}function k(e){var n=Object[o].toString.call(e),t=g;return"[object Error]"===n?t="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":pn()&&(t=vn().stringify(e)),n+t}var yn=null;function mn(e){return e?'"'+e.replace(/\"/g,g)+'"':g}function xn(e,n){var t,o=typeof console!==V?console:s("console");o&&(t="log",C(o[t=o[e]?e:t])&&o[t](n))}wn.dataType="MessageData";var Cn=wn;function wn(e,n,t,o){void 0===t&&(t=!1),this.messageId=e,this.message=(t?"AI: ":"AI (Internal): ")+e;t=g,pn()&&(t=vn().stringify(o)),e=(n?" message:"+mn(n):g)+(o?" props:"+mn(t):g);this.message+=e}function In(e,n){return(e||{}).logger||new Sn(n)}var Sn=function eo(r){this.identifier="DiagnosticLogger",this.queue=[];var u=0,c={};y(eo,this,function(i){function e(e,n){e=r[e];return x(e)?n:e}function a(e,n){var t,o=(t=(t=yn)||!0===r.disableDbgExt?t:yn||(o=s("Microsoft"),yn=o?o.ApplicationInsights:yn))?t.ChromeDbgExt:null;o&&o.diagLog&&o.diagLog(e,n)}x(r)&&(r={}),i.consoleLoggingLevel=function(){return e("loggingLevelConsole",0)},i.telemetryLoggingLevel=function(){return e("loggingLevelTelemetry",1)},i.maxInternalMessageLimit=function(){return e("maxMessageLimit",25)},i.enableDebugExceptions=function(){return e("enableDebugExceptions",!1)},i.throwInternal=function(e,n,t,o,r){n=new Cn(n,t,r=void 0!==r&&r,o);if(i.enableDebugExceptions())throw k(n);t=1===e?"errorToConsole":"warnToConsole";m(n.message)?a("throw"+(1===e?"Critical":"Warning"),n):(o=i.consoleLoggingLevel(),r?(r=+n.messageId,!c[r]&&e<=o&&(i[t](n.message),c[r]=!0)):e<=o&&i[t](n.message),i.logInternalMessage(e,n))},i.warnToConsole=function(e){xn("warn",e),a("warning",e)},i.errorToConsole=function(e){xn("error",e),a("error",e)},i.resetInternalMessageCount=function(){u=0,c={}},i.logInternalMessage=function(e,n){var t,o;u>=i.maxInternalMessageLimit()||(o=!0,t="AITR_"+n.messageId,c[t]?o=!1:c[t]=!0,o&&(e<=i.telemetryLoggingLevel()&&(i.queue.push(n),u++,a(1===e?"error":"warn",n)),u===i.maxInternalMessageLimit()&&(o=new Cn(23,t="Internal events throttle limit per PageView reached for this app.",!1),i.queue.push(o),1===e?i.errorToConsole(t):i.warnToConsole(t))))}})};function _(e,n,t,o,r,i){void 0===i&&(i=!1),(e||new Sn).throwInternal(n,t,o,r,i)}u.ParentContextKey="parent",u.ChildrenContextKey="childEvts";var bn=u;function u(e,r,n){var o,i=this,a=!1;i.start=He(),i.name=e,i.isAsync=n,i.isChildEvt=function(){return!1},C(r)&&(a=function(e){if(_e)try{var n={enumerable:!0,configurable:!0,get:function(){return!o&&C(r)&&(o=r(),r=null),o}};return _e(e,"payload",n),!0}catch(t){}return!1}(i)),i.getCtx=function(e){return e?(e===u.ParentContextKey||e===u.ChildrenContextKey?i:i.ctx||{})[e]:null},i.setCtx=function(e,n){e&&(e===u.ParentContextKey?(i[e]||(i.isChildEvt=function(){return!0}),i[e]=n):e===u.ChildrenContextKey?i[e]=n:(i.ctx=i.ctx||{})[e]=n)},i.complete=function(){var e=0,n=i.getCtx(u.ChildrenContextKey);if(I(n))for(var t=0;t<n.length;t++){var o=n[t];o&&(e+=o.time)}i.time=He()-i.start,i.exTime=i.time-e,i.complete=function(){},!a&&C(r)&&(i.payload=r())}}var Nn="CoreUtils.doPerf";function kn(e,n,t,o,r){if(e)if(e=C(e.getPerfMgr)?e.getPerfMgr():e){var i,a=void 0,u=e.getCtx(Nn);try{if(a=e.create(n(),o,r))return u&&a.setCtx&&(a.setCtx(bn.ParentContextKey,u),u.getCtx&&u.setCtx&&((i=u.getCtx(bn.ChildrenContextKey))||(i=[],u.setCtx(bn.ChildrenContextKey,i)),i.push(a))),e.setCtx(Nn,a),t(a)}catch(c){a&&a.setCtx&&a.setCtx("exception",c)}finally{a&&e.fire(a),e.setCtx(Nn,u)}}t()}var _n=4294967296,c=4294967295,Tn=!1,Pn=123456789,Mn=987654321;function Un(e){var n,t=0,o=s(on)||s(rn);if(0===(t=o&&o.getRandomValues?o.getRandomValues(new Uint32Array(1))[0]&c:t)&&hn()){if(!Tn)try{var r=2147483647&He();(n=(Math.random()*_n^r)+r)<0&&(n>>>=0),Pn=123456789+n&c,Mn=987654321-n&c,Tn=!0}catch(i){}o=((Mn=36969*(65535&Mn)+(Mn>>16)&c)<<16)+(65535&(Pn=18e3*(65535&Pn)+(Pn>>16)&c))>>>0&c|0,t=(o>>>=0)&c}return 0===t&&(t=Math.floor(_n*Math.random()|0)),e||(t>>>=0),t}function Dn(e){void 0===e&&(e=22);for(var n=Un()>>>0,t=0,o=g;o.length<e;)o+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[0|63&n]||"",n>>>=6,5==++t&&(n=(Un()<<2&4294967295|3&n)>>>0,t=0);return o}var An=r,n="2.8.4-nightly.2205-08",i="."+Dn(6);function Ln(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType}var On,En=On={id:Fe("_aiData-plugin."+n+0+((M=void 0!==M&&M)?"."+n:"")+i),accept:Ln,get:function(e,n,t,o){var r=e[On.id];return r?r[Fe(n)]:(o&&((r=function(e,n){var t=n[e.id];if(!t){t={};try{Ln(n)&&!function(e,n,t){if(An)try{return An(e,n,{value:t,enumerable:!1,configurable:!0}),1}catch(o){}}(n,e.id,t)&&(n[e.id]=t)}catch(o){}}return t}(On,e))[Fe(n)]=t),t)},kill:function(e,n){if(e&&e[n])try{delete e[n]}catch(t){}}};function Vn(e){return En.get(e,"state",{},!0)}var Rn="TelemetryPluginChain",jn="_hasRun",qn="_getTelCtx",Bn=0;function Kn(e,a,t,n){var o=null,r=[],i=(null!==n&&(o=n?function(e,n,t){for(;e;){if(e.getPlugin()===t)return e;e=e.getNext()}return zn([t],n.config||{},n)}(e,t,n):e),{_next:function(){var e,n=o;return o=n?n.getNext():null,n||(e=r)&&0<e.length&&(We(e,function(e){try{e.func.call(e.self,e.args)}catch(n){_(t.logger,2,73,"Unexpected Exception during onComplete - "+k(n))}}),r=[]),n},ctx:{core:function(){return t},diagLog:function(){return In(t,a)},getCfg:function(){return a},getExtCfg:u,getConfig:function(e,n,t){void 0===t&&(t=!1);var o,e=u(e,null);return e&&!x(e[n])?o=e[n]:a&&!x(a[n])&&(o=a[n]),x(o)?t:o},hasNext:function(){return!!o},getNext:function(){return o},setNext:function(e){o=e},iterate:function(e){for(;n=i._next();){var n=n.getPlugin();n&&e(n)}},onComplete:function(e,n){for(var t=[],o=2;o<arguments.length;o++)t[o-2]=arguments[o];e&&r.push({func:e,self:m(n)?i.ctx:n,args:t})}}});function u(e,n,t){var o,r,i;return void 0===n&&(n={}),void 0===t&&(t=0),(o=a&&(r=a.extensionConfig)&&e?r[e]:o)?Ke(n)&&0!==t&&(i=function d(){var e=arguments,n=e[0]||{},t=e.length,o=!1,r=1;for(0<t&&"boolean"==typeof n&&(o=n,n=e[r]||{},r++),Ke(n)||(n={});r<t;r++){var i,a,u,c,s=e[r],l=I(s),f=Ke(s);for(i in s)(l&&i in s||f&&q.call(s,i))&&(a=s[i],u=void 0,o&&a&&((u=I(a))||ze(a))&&(c=n[i],u?I(c)||(c=[]):ze(c)||(c={}),a=d(o,c,a)),a!==undefined&&(n[i]=a))}return n}(!0,n,o),a&&2===t&&f(n,function(e){var n;x(i[e])&&!x(n=a[e])&&(i[e]=n)}),o=i):o=n,o}return i}function Fn(e,t,o,n){var r=Kn(e,t,o,n),i=r.ctx;return i.processNext=function(e){var n=r._next();return n&&n.processTelemetry(e,i),!n},i.createNew=function(e,n){return Fn((e=I(e=void 0===e?null:e)?zn(e,t,o,n):e)||i.getNext(),t,o,n)},i}function zn(e,n,t,o){var r,i=null,a=!o;return I(e)&&0<e.length&&(r=null,We(e,function(e){(a=!a&&o===e||a)&&e&&C(e.processTelemetry)&&(e=Wn(e,n,t),i=i||e,r&&r._setNext(e),r=e)})),o&&!i?zn([o],n,t):i}function Wn(c,o,r){var s=null,i=C(c.processTelemetry),a=C(c.setNextPlugin),l=c?c.identifier+"-"+c.priority+"-"+Bn++:"Unknown-0-"+Bn++,u={getPlugin:function(){return c},getNext:function(){return s},processTelemetry:function(t,e){var n;f(e=e||(n=(n=c&&C(c[qn])?c[qn]():n)||Fn(u,o,r)),function(e){if(!c||!i)return!1;var n=Vn(c);return!n.teardown&&!n[we]&&(a&&c.setNextPlugin(s),c.processTelemetry(t,e),!0)},"processTelemetry",function(){return{item:t}},!t.sync)||e.processNext(t)},unload:function(o,r){f(o,function(){var e,n,t=!1;return c&&(e=Vn(c),n=c[xe]||e.core,!c||n&&n!==o[xe]()||e[me]||(e[xe]=null,e[me]=!0,e[ye]=!1,c[me]&&!0===c[me](o,r)&&(t=!0))),t},"unload",function(){},r.isAsync)||o.processNext(r)},update:function(o,r){f(o,function(){var e,n,t=!1;return c&&(e=Vn(c),n=c[xe]||e.core,!c||n&&n!==o[xe]()||e[me]||c[Ce]&&!0===c[Ce](o,r)&&(t=!0)),t},"update",function(){},!1)||o.processNext(r)},_id:l,_setNext:function(e){s=e}};function f(t,o,r,e,n){var i=!1,a=c?c.identifier:Rn,u=(u=t[jn])||(t[jn]={});return t.setNext(s),c&&kn(t[xe](),function(){return a+":"+r},function(){u[l]=!0;try{var e=s?s._id:g;e&&(u[e]=!1),i=o(t)}catch(n){e=!s||u[s._id];e&&(i=!0),s&&e||_(t.diagLog(),1,73,"Plugin ["+a+"] failed during "+r+" - "+k(n)+", run flags: "+k(u))}},e,n),i}return Ge(u)}var Jn="toGMTString",$n="toUTCString",Gn="cookie",Hn="expires",Xn="enabled",Yn="isCookieUseDisabled",Zn="disableCookiesUsage",T="_ckMgr",Qn=null,et=null,nt=null,tt=typeof document===a&&document?document:s("document"),ot={},rt={};function it(e){return!e||e.isEnabled()}function at(e,n){var t,o;return e?t=e.getCookieMgr():n&&(t=n.cookieCfg[T]||ut(n)),t||(e=(e||{}).logger,(o=ut[T]||rt[T])||(o=ut[T]=ut(n,e),rt[T]=o),t=o),t}function ut(e,r){N(t=(e=e||rt).cookieCfg=e.cookieCfg||{},"domain",e.cookieDomain,Be,x),N(t,"path",e.cookiePath||"/",null,x),x(t[Xn])&&(n=void 0,m(e[Yn])||(n=!e[Yn]),m(e[Zn])||(n=!e[Zn]),t[Xn]=n);var n,t,s=t,l=s.path||"/",f=s.domain,o=!1!==s[Xn],d={isEnabled:function(){var e=o&&ct(r),n=rt[T];return e&&n&&d!==n?it(n):e},setEnabled:function(e){o=!1!==e},set:function(e,n,t,o,r){var i,a,u,c=!1;return it(d)&&(i={},-1!=(u=(a=b(n||g)).indexOf(";"))&&(a=b(n.substring(0,u)),i=st(n.substring(1+u))),N(i,"domain",o||f,Ye,m),x(t)||(u=hn(),m(i[Hn])&&0<(n=He()+1e3*t)&&((o=new Date).setTime(n),N(i,Hn,lt(o,u?Jn:$n)||lt(o,u?Jn:$n)||g,Ye)),u||N(i,"max-age",g+t,null,m)),(n=gn())&&"https:"===n.protocol&&(N(i,"secure",null,null,m),(et=null===et?!(S(o=(dn()||{}).userAgent)&&(w(o,"CPU iPhone OS 12")||w(o,"iPad; CPU OS 12")||w(o,"Macintosh; Intel Mac OS X 10_14")&&w(o,"Version/")&&w(o,"Safari")||w(o,"Macintosh; Intel Mac OS X 10_14")&&function(e,n){var t=!1;if(!e||(t=e===n))return t;if(De)return e[be](n);var o=e,r=n,t=!1,e=o?o.length:0;if(e&&40<=e&&!(t=o===r)){for(var i=e-1,a=39;0<=a;a--){if(o[i]!=r[a])return;i--}t=!0}return t}(o,"AppleWebKit/605.1.15 (KHTML, like Gecko)")||w(o,"Chrome/5")||w(o,"Chrome/6")||w(o,"UnrealEngine")&&!w(o,"Chrome")||w(o,"UCBrowser/12")||w(o,"UCBrowser/11"))):et)&&N(i,"SameSite","None",null,m)),N(i,"path",r||l,null,m),(s.setCookie||dt)(e,ft(a,i)),c=!0),c},get:function(e){var n=g;return it(d)?(s.getCookie||function(e){var n,t=g;return tt&&(n=tt[Gn]||g,nt!==n&&(ot=st(n),nt=n),t=b(ot[e]||g)),t})(e):n},del:function(e,n){return!!it(d)&&d.purge(e,n)},purge:function(e,n){var t,o=!1;return ct(r)&&((t={}).path=n||"/",t[Hn]="Thu, 01 Jan 1970 00:00:01 GMT",n=t,hn()||(n["max-age"]="0"),(s.delCookie||dt)(e,ft(g,n)),o=!0),o}};return d[T]=d}function ct(e){if(null===Qn){Qn=!1;try{Qn=(tt||{})[Gn]!==undefined}catch(n){_(e,2,68,"Cannot access document.cookie - "+Xe(n),{exception:k(n)})}}return Qn}function st(e){var t={};return e&&e.length&&We(b(e).split(";"),function(e){var n;(e=b(e||g))&&(-1==(n=e.indexOf("="))?t[e]=null:t[b(e.substring(0,n))]=b(e.substring(1+n)))}),t}function lt(e,n){return C(e[n])?e[n]():null}function ft(e,n){var t=e||g;return f(n,function(e,n){t+="; "+e+(x(n)?g:"="+n)}),t}function dt(e,n){tt&&(tt[Gn]=e+"="+n)}function gt(){var n=[];return{add:function(e){e&&n.push(e)},run:function(t,o){We(n,function(e){try{e(t,o)}catch(n){_(t.diagLog(),2,73,"Unexpected error calling unload handler - "+k(n))}}),n=[]}}}var P="getPlugin",Me=function no(){var i,r,l,f,d,a=this;function n(e){var n,e=e=void 0===e?null:e;return e||(n=r||Fn(null,{},a.core),e=l&&l[P]?n.createNew(null,l[P]):n.createNew(null,l)),e}function c(e,n,t){e&&N(e,"extensionConfig",[],null,x),!t&&n&&(t=n.getProcessTelContext().getNext());var o=l;l&&l[P]&&(o=l[P]()),a.core=n,r=Fn(t,e,n,o)}function g(){i=!1,a.core=null,l=r=null,d=[],f=gt()}g(),y(no,a,function(s){var e,n,t,o,r;s.initialize=function(e,n,t,o){c(e,n,o),i=!0},s.teardown=function(e,n){var t,o,r,i,a=s.core;if(a&&(!e||a===e.core()))return o=!1,r=e||function c(e,t,n){var o=t.config||{},r=Kn(e,o,t,n),i=r.ctx;return i.processNext=function(e){var n=r._next();return n&&n.unload(i,e),!n},i.createNew=function(e,n){return c((e=I(e=void 0===e?null:e)?zn(e,o,t,n):e)||i.getNext(),t,n)},i}(null,a,l&&l[P]?l[P]():l),i=n||{reason:0,isAsync:!1},s[Ie]&&!0===s[Ie](r,i,u)?t=!0:u(),t;function u(){o||(o=!0,f.run(r,n),We(d,function(e){e.rm()}),d=[],!0===t&&r.processNext(i),g())}},s.update=function(e,n){var t,o,r,i=s.core;if(i&&(!e||i===e.core()))return o=!1,r=e||function u(e,t,n){var o=t.config||{},r=Kn(e,o,t,n).ctx;return r.processNext=function(n){return r.iterate(function(e){C(e.update)&&e.update(r,n)})},r.createNew=function(e,n){return u((e=I(e=void 0===e?null:e)?zn(e,o,t,n):e)||r.getNext(),t,n)},r}(null,i,l&&l[P]?l[P]():l),s._doUpdate&&!0===s._doUpdate(r,n||{reason:0},a)?t=!0:a(),t;function a(){o||(o=!0,c(r.getCfg(),r.core(),r.getNext()))}},s._addHook=function(e){e&&(I(e)?d=d.concat(e):d.push(e))},t="_addUnloadCb",n=function(){return f},(e=s)&&n&&(e[t]=(r=o=null,C(t=n)?o=t:r=t,function(){var e=arguments;if(r=o?o():r)return r.add.apply(r,e)}))}),a.diagLog=function(e){return n(e).diagLog()},a[ye]=function(){return i},a.setInitialized=function(e){i=e},a.setNextPlugin=function(e){l=e},a.processNext=function(e,n){n?n.processNext(e):l&&C(l.processTelemetry)&&l.processTelemetry(e,null)},a._getTelCtx=n};function pt(e,n,t){var o,r,i=n.length,a=(e=e,(n=n)&&150<(n=b(n.toString())).length&&(r=n.substring(0,150),_(e,2,57,"name is too long. It has been truncated to 150 characters.",{name:n},!0)),r||n);if(a.length!==i){for(var u=0,c=a;t[c]!==undefined;)u++,c=a.substring(0,147)+(o=void 0,(o="00"+u).substr(o.length-3));a=c}return a}function vt(e,n,t){var o;return void 0===t&&(t=1024),n&&(t=t||1024,(n=b(n)).toString().length>t&&(o=n.toString().substring(0,t),_(e,2,61,"string value is too long. It has been truncated to "+t+" characters.",{value:n},!0))),o||n}function ht(o,e){var r;return e&&(r={},f(e,function(e,n){if(Ke(n)&&pn())try{n=vn().stringify(n)}catch(t){_(o,2,49,"custom property is not valid",{exception:t},!0)}n=vt(o,n,8192),e=pt(o,e,r),r[e]=n}),e=r),e}function yt(e,n,t,o){var r;return n&&(n=b(n)).length>t&&(r=n.substring(0,t),_(e,2,o,"input is too long, it has been truncated to "+t+" characters.",{data:n},!0)),r||n}var mt=Ze({LocalStorage:0,SessionStorage:1}),xt=(Ze({AI:0,AI_AND_W3C:1,W3C:2}),undefined);function Ct(){return It()?wt(mt.LocalStorage):null}function wt(e){try{if(x(K()))return null;var n=(new Date).toString(),t=s(e===mt.LocalStorage?"localStorage":"sessionStorage"),o=(t.setItem(n,n),t.getItem(n)!==n);if(t.removeItem(n),!o)return t}catch(r){}return null}function It(e){return xt=e||xt===undefined?!!wt(mt.LocalStorage):xt}function St(e,n){var t=Ct();if(null!==t)try{return t.getItem(n)}catch(o){xt=!1,_(e,2,1,"Browser failed read of local storage. "+Xe(o),{exception:k(o)})}return null}function bt(e,n,t){var o=Ct();if(null!==o)try{o.setItem(n,t)}catch(r){xt=!1,_(e,2,3,"Browser failed write to local storage. "+Xe(r),{exception:k(r)})}}function Nt(e,n){var t=Ct();if(null!==t)try{t.removeItem(n)}catch(o){xt=!1,_(e,2,5,"Browser failed removal of local storage item. "+Xe(o),{exception:k(o)})}}_t.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",_t.dataType="PageviewData";var kt=_t;function _t(e,n,t,o,r,i,a){this.aiDataContract={ver:1,name:0,url:0,duration:0,properties:0,measurements:0,id:0};var u,c,s,l=this;l.ver=2,l.id=a&&yt(e,a,128,69).toString(),l.url=yt(e,t,2048,66),l.name=vt(e,n)||"not_specified",isNaN(o)||(l.duration=(t=""+Math.floor((a=Math.round(a=isNaN(a=o)||a<0?0:a))/1e3)%60,n=1===(n=""+a%1e3).length?"00"+n:2===n.length?"0"+n:n,t=t.length<2?"0"+t:t,o=(o=""+Math.floor(a/6e4)%60).length<2?"0"+o:o,(0<(u=Math.floor(a/864e5))?u+".":"")+(u=(u=""+Math.floor(a/36e5)%24).length<2?"0"+u:u)+":"+o+":"+t+"."+n)),l.properties=ht(e,r),l.measurements=(c=e,(a=i)&&(s={},f(a,function(e,n){e=pt(c,e,s),s[e]=n}),a=s),a)}function l(e){var n="ai."+e+".";return function(e){return n+e}}var Tt,Pt,r=l("application"),M=l("device"),n=l("location"),i=l("operation"),Mt=l("session"),U=l("user"),D=l("cloud"),Ut=l("internal");function Dt(){return Tt.call(this)||this}Pt={applicationVersion:r("ver"),applicationBuild:r("build"),applicationTypeId:r("typeId"),applicationId:r("applicationId"),applicationLayer:r("layer"),deviceId:M("id"),deviceIp:M("ip"),deviceLanguage:M("language"),deviceLocale:M("locale"),deviceModel:M("model"),deviceFriendlyName:M("friendlyName"),deviceNetwork:M("network"),deviceNetworkName:M("networkName"),deviceOEMName:M("oemName"),deviceOS:M("os"),deviceOSVersion:M("osVersion"),deviceRoleInstance:M("roleInstance"),deviceRoleName:M("roleName"),deviceScreenResolution:M("screenResolution"),deviceType:M("type"),deviceMachineName:M("machineName"),deviceVMName:M("vmName"),deviceBrowser:M("browser"),deviceBrowserVersion:M("browserVersion"),locationIp:n("ip"),locationCountry:n("country"),locationProvince:n("province"),locationCity:n("city"),operationId:i("id"),operationName:i("name"),operationParentId:i("parentId"),operationRootId:i("rootId"),operationSyntheticSource:i("syntheticSource"),operationCorrelationVector:i("correlationVector"),sessionId:Mt("id"),sessionIsFirst:Mt("isFirst"),sessionIsNew:Mt("isNew"),userAccountAcquisitionDate:U("accountAcquisitionDate"),userAccountId:U("accountId"),userAgent:U("userAgent"),userId:U("id"),userStoreRegion:U("storeRegion"),userAuthUserId:U("authUserId"),userAnonymousUserAcquisitionDate:U("anonUserAcquisitionDate"),userAuthenticatedUserAcquisitionDate:U("authUserAcquisitionDate"),cloudName:D("name"),cloudRole:D("role"),cloudRoleVer:D("roleVer"),cloudRoleInstance:D("roleInstance"),cloudEnvironment:D("environment"),cloudLocation:D("location"),cloudDeploymentUnit:D("deploymentUnit"),internalNodeName:Ut("nodeName"),internalSdkVersion:Ut("sdkVersion"),internalAgentVersion:Ut("agentVersion"),internalSnippet:Ut("snippet"),internalSdkSrc:Ut("sdkSrc")},W(Dt,Tt=function(){var t=this;f(Pt,function(e,n){t[e]=n})});var At="user",Lt="device",Ot="trace",Et="web",Vt="app",Rt="os",A=new Dt,jt=function(){},qt=(L.acquisitionSpan=864e5,L.renewalSpan=18e5,L.cookieUpdateInterval=6e4,L);function L(n,e){var l,f,d=In(e),g=at(e);y(L,this,function(u){C((n=n||{}).sessionExpirationMs)||(n.sessionExpirationMs=function(){return L.acquisitionSpan}),C(n.sessionRenewalMs)||(n.sessionRenewalMs=function(){return L.renewalSpan}),u.config=n;var e=u.config.sessionCookiePostfix&&u.config.sessionCookiePostfix()?u.config.sessionCookiePostfix():u.config.namePrefix&&u.config.namePrefix()?u.config.namePrefix():"";function c(e,n){var t=!1,o=", session will be reset",r=n.split("|");if(2<=r.length)try{var i=+r[1]||0,a=+r[2]||0;isNaN(i)||i<=0?_(d,2,27,"AI session acquisition date is 0"+o):isNaN(a)||a<=0?_(d,2,27,"AI session renewal date is 0"+o):r[0]&&(e.id=r[0],e.acquisitionDate=i,e.renewalDate=a,t=!0)}catch(u){_(d,1,9,"Error parsing ai_session value ["+(n||"")+"]"+o+" - "+Xe(u),{exception:k(u)})}return t}function s(e,n){var t=e.acquisitionDate,o=(e.renewalDate=n,u.config),r=o.sessionRenewalMs(),i=t+o.sessionExpirationMs()-n,e=[e.id,t,n],t=i<r?i/1e3:r/1e3,i=o.cookieDomain?o.cookieDomain():null;g.set(l(),e.join("|"),0<o.sessionExpirationMs()?t:null,i),f=n}l=function(){return"ai_session"+e},u.automaticSession=new jt,u.update=function(){var e,n,t,o=He(),r=!1,i=u.automaticSession,a=(i.id||(n=i,t=!1,(a=g.get(l()))&&C(a.split)?t=c(n,a):(a=St(d,l()))&&(t=c(n,a)),r=!(t||n.id)),u.config.sessionExpirationMs());!r&&0<a&&(t=u.config.sessionRenewalMs(),n=o-i.acquisitionDate,e=o-i.renewalDate,r=(r=(r=n<0||e<0)||a<n)||t<e),r?(a=o,t=((n=u.config||{}).getNewId?n.getNewId():null)||Dn,u.automaticSession.id=t(n.idLength?n.idLength():22),u.automaticSession.acquisitionDate=a,s(u.automaticSession,a),It()||_(d,2,0,"Browser does not support local storage. Session durations will be inaccurate.")):(!f||L.cookieUpdateInterval<o-f)&&s(i,o)},u.backup=function(){var e=u.automaticSession,n=e.id,t=e.acquisitionDate,e=e.renewalDate;bt(d,l(),[n,t,e].join("|"))}})}var Bt=function(){},Kt=function(){this.id="browser",this.deviceClass="Browser"},Ft=function(e){this.sdkVersion=(e.sdkExtension&&e.sdkExtension()?e.sdkExtension()+"_":"")+"javascript:2.8.4-nightly.2205-08"};function zt(e){return"string"==typeof e&&e&&!e.match(/,|;|=| |\|/)}O.cookieSeparator="|",O.userCookieName="ai_user",O.authUserCookieName="ai_authUser";var Wt=O;function O(a,e){this.isNewUser=!1,this.isUserCookieSet=!1;var u,c=In(e),s=at(e);y(O,this,function(o){o.config=a;var e=o.config.userCookiePostfix&&o.config.userCookiePostfix()?o.config.userCookiePostfix():"",n=(u=function(){return O.userCookieName+e},s.get(u()));function t(){var e=a||{};return((e.getNewId?e.getNewId():null)||Dn)(e.idLength?a.idLength():22)}function r(e){var n=function(e){if(e){if(Ae)return e[Se]();var n;return e&&e.getUTCFullYear?(n=function(e){e=""+e;return 1===e.length?"0"+e:e},e.getUTCFullYear()+"-"+n(1+e.getUTCMonth())+"-"+n(e.getUTCDate())+"T"+n(e.getUTCHours())+":"+n(e.getUTCMinutes())+":"+n(e.getUTCSeconds())+"."+(e.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"):void 0}}(new Date);return o.accountAcquisitionDate=n,o.isNewUser=!0,[e,n]}function i(e){o.isUserCookieSet=s.set(u(),e,31536e3)}n&&(o.isNewUser=!1,0<(n=n.split(O.cookieSeparator)).length&&(o.id=n[0],o.isUserCookieSet=!!o.id)),o.id||(o.id=t(),i(r(o.id).join(O.cookieSeparator)),n=a.namePrefix&&a.namePrefix()?a.namePrefix()+"ai_session":"ai_session",Nt(c,n)),o.accountId=a.accountId?a.accountId():undefined;var n=s.get(O.authUserCookieName);n&&((n=(n=decodeURI(n)).split(O.cookieSeparator))[0]&&(o.authenticatedId=n[0]),1<n.length&&n[1]&&(o.accountId=n[1])),o.setAuthenticatedUserContext=function(e,n,t){void 0===t&&(t=!1),!zt(e)||n&&!zt(n)?_(c,2,60,"Setting auth user context failed. User auth/account id should be of type string, and not contain commas, semi-colons, equal signs, spaces, or vertical-bars.",!0):(o.authenticatedId=e,e=o.authenticatedId,n&&(o.accountId=n,e=[o.authenticatedId,o.accountId].join(O.cookieSeparator)),t&&s.set(O.authUserCookieName,encodeURI(e)))},o.clearAuthenticatedUserContext=function(){o.authenticatedId=null,o.accountId=null,s.del(O.authUserCookieName)},o.update=function(e){o.id===e&&o.isUserCookieSet||i(r(e||t()).join(O.cookieSeparator))}})}var Jt=function(){},$t=function(e,n,t,o){var r=this,e=(r.traceID=e||function(){for(var e,n=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],t=g,o=0;o<4;o++)t+=n[15&(e=Un())]+n[e>>4&15]+n[e>>8&15]+n[e>>12&15]+n[e>>16&15]+n[e>>20&15]+n[e>>24&15]+n[e>>28&15];var r=n[8+(3&Un())|0];return t.substr(0,8)+t.substr(9,4)+"4"+t.substr(13,3)+r+t.substr(16,3)+t.substr(19,12)}(),r.parentID=n,r.name=t,gn());!t&&e&&e.pathname&&(r.name=e.pathname),r.name=vt(o,r.name)},Gt="ext",Ht="tags";function Xt(e,n){e&&e[n]&&0===function(e){var n=typeof e;if(n===E||n===a&&null!==e||F("objKeys called on non-object"),!Je&&Pe)return Pe(e);var t,o=[];for(t in e)e&&q.call(e,t)&&o.push(t);if(Je)for(var r=$e.length,i=0;i<r;i++)e&&q.call(e,$e[i])&&o.push($e[i]);return o}(e[n]).length&&delete e[n]}var Yt,Zt=function to(e,n){var o=this,t=e.logger;this.appId=function(){return null},this.getSessionId=function(){return null},y(to,this,function(r){r.application=new Bt,r.internal=new Ft(n),fn()&&(r.sessionManager=new qt(n,e),r.device=new Kt,r.location=new Jt,r.user=new Wt(n,e),r.telemetryTrace=new $t(undefined,undefined,undefined,t),r.session=new jt),r.getSessionId=function(){var e=r.session;return e&&S(e.id)?e.id:(e=(r.sessionManager||{}).automaticSession)&&S(e.id)?e.id:null},r.applySessionContext=function(e,n){N(d(e.ext,Vt),"sesId",r.getSessionId(),S)},r.applyOperatingSystemContxt=function(e,n){N(e.ext,Rt,r.os)},r.applyApplicationContext=function(e,n){var t=r.application;t&&(N(e=d(e,Ht),A.applicationVersion,t.ver,S),N(e,A.applicationBuild,t.build,S))},r.applyDeviceContext=function(e,n){var t=r.device;t&&(N(e=d(d(e,Gt),Lt),"localId",t.id,S),N(e,"ip",t.ip,S),N(e,"model",t.model,S),N(e,"deviceClass",t.deviceClass,S))},r.applyInternalContext=function(e,n){var t,o=r.internal;o&&(N(t=d(e,Ht),A.internalAgentVersion,o.agentVersion,S),N(t,A.internalSdkVersion,o.sdkVersion,S),e.baseType!==Cn.dataType&&e.baseType!==kt.dataType||(N(t,A.internalSnippet,o.snippetVer,S),N(t,A.internalSdkSrc,o.sdkSrc,S)))},r.applyLocationContext=function(e,n){var t=o.location;t&&N(d(e,Ht,[]),A.locationIp,t.ip,S)},r.applyOperationContext=function(e,n){var t=r.telemetryTrace;t&&(N(e=d(d(e,Gt),Ot,{traceID:undefined,parentID:undefined}),"traceID",t.traceID,S),N(e,"name",t.name,S),N(e,"parentID",t.parentID,S))},r.applyWebContext=function(e,n){var t=o.web;t&&N(d(e,Gt),Et,t)},r.applyUserContext=function(e,n){var t=r.user;t&&(N(d(e,Ht,[]),A.userAccountId,t.accountId,S),N(e=d(d(e,Gt),At),"id",t.id,S),N(e,"authId",t.authenticatedId,S))},r.cleanUp=function(e,n){e=e.ext;e&&(Xt(e,Lt),Xt(e,At),Xt(e,Et),Xt(e,Rt),Xt(e,Vt),Xt(e,Ot))}})},r=(W(Qt,Yt=Me),Qt.getDefaultConfig=function(){return{instrumentationKey:function(){return undefined},accountId:function(){return null},sessionRenewalMs:function(){return 18e5},samplingPercentage:function(){return 100},sessionExpirationMs:function(){return 864e5},cookieDomain:function(){return null},sdkExtension:function(){return null},isBrowserLinkTrackingEnabled:function(){return!1},appId:function(){return null},getSessionId:function(){return null},namePrefix:function(){return undefined},sessionCookiePostfix:function(){return undefined},userCookiePostfix:function(){return undefined},idLength:function(){return 22},getNewId:function(){return null}}},Qt);function Qt(){var s,l,e=Yt.call(this)||this;return e.priority=110,e.identifier="AppInsightsPropertiesPlugin",y(Qt,e,function(u,c){u.initialize=function(e,n,t,o){c.initialize(e,n,t,o);var r,i=u._getTelCtx(),a=u.identifier,e=Qt.getDefaultConfig();l=l||{},f(e,function(e,n){l[e]=function(){return i.getConfig(a,e,n())}}),u.context=new Zt(n,l),r=null,We(t,function(e){if("AppInsightsChannelPlugin"===e.identifier)return r=e,-1}),s=r,u.context.appId=function(){return s?s._appId:null},u._extConfig=l},u.processTelemetry=function(e,n){var t,o,r,i;x(e)||(n=u._getTelCtx(n),e.name===kt.envelopeType&&n.diagLog().resetInternalMessageCount(),(o=u.context||{}).session&&"string"!=typeof u.context.session.id&&o.sessionManager&&o.sessionManager.update(),(t=o.user)&&!t.isUserCookieSet&&t.update(o.user.id),o=n,d(i=e,"tags",[]),d(i,"ext",{}),(r=u.context).applySessionContext(i,o),r.applyApplicationContext(i,o),r.applyDeviceContext(i,o),r.applyOperationContext(i,o),r.applyUserContext(i,o),r.applyOperatingSystemContxt(i,o),r.applyWebContext(i,o),r.applyLocationContext(i,o),r.applyInternalContext(i,o),r.cleanUp(i,o),t&&t.isNewUser&&(t.isNewUser=!1,i=new Cn(72,(dn()||{}).userAgent||""),(n.diagLog()||new Sn).logInternalMessage(1,i)),u.processNext(e,n))}}),e}e.PropertiesPlugin=r,e.Session=jt,e.SessionManager=qt,e.TelemetryContext=Zt,e.TelemetryTrace=$t;M=e,n="__esModule",i={value:!0},Mt=Object.defineProperty;if(Mt)try{return void Mt(M,n,i)}catch(oo){}typeof i.value!==undefined&&(M[n]=i.value)};"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(((e="undefined"!=typeof globalThis?globalThis:e||self).Microsoft=e.Microsoft||{},e.Microsoft.ApplicationInsights=e.Microsoft.ApplicationInsights||{}));
5
+ var e=this,n=function(e){"use strict";var E="function",a="object",V="undefined",r="prototype",R="hasOwnProperty",t=Object,n=t[r],j=t.create,o=t.defineProperty,q=n[R],F=null;function B(e){return void 0===e&&(e=!0),F&&e||(typeof globalThis!==V&&globalThis&&(F=globalThis),typeof self!==V&&self&&(F=self),typeof window!==V&&window&&(F=window),typeof global!==V&&global&&(F=global)),F}function K(e){throw new TypeError(e)}(B()||{}).Symbol,(B()||{}).Reflect;var z=function(e,n){return(z=t.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)n[R](t)&&(e[t]=n[t])})(e,n)};function W(e,n){function t(){this.constructor=e}typeof n!==E&&null!==n&&K("Class extends value "+n+" is not a constructor or null"),z(e,n),e[r]=null===n?function(e){if(j)return j(e);if(null==e)return{};var n=typeof e;function t(){}return n!==a&&n!==E&&K("Object prototype may only be an Object:"+e),t[r]=e,new t}(n):(t[r]=n[r],new t)}var J="constructor",p="prototype",$="function",G="_dynInstFuncs",H="_isDynProxy",X="_dynClass",Y="_dynInstChk",Z=Y,Q="_dfOpts",ee="_unknown_",ne="__proto__",te="_dyn"+ne,re="_dynInstProto",oe="useBaseInst",ie="setInstFuncs",ae=Object,ue=ae.getPrototypeOf,ce=ae.getOwnPropertyNames,se=0;function v(e,n){return e&&ae[p].hasOwnProperty.call(e,n)}function le(e){return e&&(e===ae[p]||e===Array[p])}function fe(e){return le(e)||e===Function[p]}function h(e){if(e){if(ue)return ue(e);var n=e[ne]||e[p]||(e[J]?e[J][p]:null),t=e[te]||n;v(e,te)||(delete e[re],t=e[te]=e[re]||e[te],e[re]=n)}return t}function de(e,n){var t=[];if(ce)t=ce(e);else for(var r in e)"string"==typeof r&&v(e,r)&&t.push(r);if(t&&0<t.length)for(var o=0;o<t.length;o++)n(t[o])}function ge(e,n,t){return n!==J&&typeof e[n]===$&&(t||v(e,n))}function pe(e){throw new TypeError("DynamicProto: "+e)}function ve(e,n){for(var t=e.length-1;0<=t;t--)if(e[t]===n)return 1}function he(e,n){return v(e,p)?e.name||n||ee:((e||{})[J]||{}).name||n||ee}function y(e,r,n,t){v(e,p)||pe("theClass is an invalid class definition.");var o,i,a,u,c,s,l=e[p],f=(function(e){if(!ue)return 1;for(var n=[],t=h(r);t&&!fe(t)&&!ve(n,t);){if(t===e)return 1;n.push(t),t=h(t)}}(l)||pe("["+he(e)+"] is not in class hierarchy of ["+he(r)+"]"),null),e=(v(l,X)?f=l[X]:(f="_dynCls$"+he(e,"_")+"$"+se,se++,l[X]=f),y[Q]),d=!!e[oe],g=(d&&t&&t[oe]!==undefined&&(d=!!t[oe]),i={},de(o=r,function(e){!i[e]&&ge(o,e,!1)&&(i[e]=o[e])}),i),d=(n(r,function(e,n,t,i){function r(e,n,t){var r,o=n[t];return o[H]&&i&&!1!==(r=e[G]||{})[Z]&&(o=(r[n[X]]||{})[t]||o),function(){return o.apply(e,arguments)}}for(var o={},a=(de(t,function(e){o[e]=r(n,t,e)}),h(e)),u=[];a&&!fe(a)&&!ve(u,a);)de(a,function(e){!o[e]&&ge(a,e,!ue)&&(o[e]=r(n,a,e))}),u.push(a),a=h(a);return o}(l,r,g,d)),!!ue&&!!e[ie]);a=l,n=f,u=r,c=g,e=!1!==(d=d&&t?!!t[ie]:d),le(a)||(l=u[G]=u[G]||{},s=l[n]=l[n]||{},!1!==l[Z]&&(l[Z]=!!e),de(u,function(e){var t,r,o;ge(u,e,!1)&&u[e]!==c[e]&&(s[e]=u[e],delete u[e],v(a,e)&&(!a[e]||a[e][H])||(a[e]=(t=a,r=e,(o=function(){var e,n;return(function(e,n,t,r){var o=null;if(e&&v(t,X)){var i=e[G]||{};if((o=(i[t[X]]||{})[n])||pe("Missing ["+n+"] "+$),!o[Y]&&!1!==i[Z]){for(var a=!v(e,n),u=h(e),c=[];a&&u&&!fe(u)&&!ve(c,u);){var s=u[n];if(s){a=s===r;break}c.push(u),u=h(u)}try{a&&(e[n]=o),o[Y]=1}catch(l){i[Z]=!1}}}return o}(this,r,t,o)||(typeof(n=(n=t[e=r])===o?h(t)[e]:n)!==$&&pe("["+e+"] is not a "+$),n)).apply(this,arguments)})[H]=1,o)))}))}y[Q]={setInstFuncs:!0,useBaseInst:!0};var g="",ye="isInitialized",me="teardown",xe="core",Ce="update",Ie="disabled",we="_doTeardown",Se="toISOString",Ne="endsWith",be="trim",Te="toString",ke="constructor",_e=o,Pe=t.freeze,Me=t.keys,i=String[r],Ue=i[be],De=i[Ne],Ae=Date[r][Se],i=Array.isArray,Le=n[Te],Oe=q[Te],Ee=Oe.call(t),Ve=/-([a-z])/g,Re=/([^\w\d_$])/g,je=/^(\d+[\w\d_$])/,qe=Object.getPrototypeOf;function m(e){return e===undefined||typeof e===V}function x(e){return null===e||m(e)}function Fe(e){return!x(e)}function Be(e){return!(!e||typeof e!==a)}function C(e){return!(!e||typeof e!==E)}function Ke(e){var n=e;return e&&N(e)?(n=(n=e.replace(Ve,function(e,n){return n.toUpperCase()})).replace(Re,"_")).replace(je,function(e,n){return"_"+n}):n}function I(e,n){if(e)for(var t in e)q.call(e,t)&&n.call(e,t,e[t])}function w(e,n){return!(!e||!n||!~e.indexOf(n))}var S=i||function(e){return!(!e||"[object Array]"!==Le.call(e))};function N(e){return"string"==typeof e}function ze(e){return e&&"object"==typeof e&&(!(e=(qe||function(e){if(e){if(qe)return qe(e);e=e.__proto__||e[r]||e[ke];if(e)return e}return null})(e))||typeof(e=e[ke]&&q.call(e,ke)?e[ke]:e)===E&&Oe.call(e)===Ee)}function We(e,n,t){var r=e.length;try{for(var o=0;o<r&&!(o in e&&-1===n.call(t||e,e[o],o,e));o++);}catch(i){}}function b(e){return e&&(Ue&&e[be]?e[be]():e.replace?e.replace(/^\s+|\s+$/g,""):e)}var Je=!{toString:null}.propertyIsEnumerable("toString"),$e=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Ge=Pe||function(e){return e};function He(){var e=Date;return e.now?e.now():(new e).getTime()}function Xe(e){return e&&"[object Error]"===Le.call(e)?e.name:g}function T(e,n,t,r,o){var i=t;!e||(i=e[n])===t||o&&!o(i)||r&&!r(t)||(e[n]=i=t)}function k(e,n,t){var r;return e?!(r=e[n])&&x(r)&&(r=m(t)?{}:t,e[n]=r):r=m(t)?{}:t,r}function Ye(e){return!!e}function Ze(e){var t={};return I(e,function(e,n){t[e]=n,t[n]=e}),e=t,Pe&&I(e,function(e,n){(S(n)||Be(n))&&Pe(n)}),Ge(e)}var Qe="window",en="navigator",nn="location",tn="JSON",rn="crypto",on="msCrypto",an="msie",un="trident/",cn=null,sn=null,ln=!1;function s(e){var n=B();return n&&n[e]?n[e]:e===Qe&&fn()?window:null}function fn(){return typeof window===a&&window}function dn(){return typeof navigator===a&&navigator?navigator:s(en)}function gn(e){if(e&&ln){e=s("__mockLocation");if(e)return e}return typeof location===a&&location?location:s(nn)}function pn(){return typeof JSON===a&&JSON||null!==s(tn)}function vn(){return pn()?JSON||s(tn):null}function hn(){var e=dn();return!e||e.userAgent===sn&&null!==cn||(e=((sn=e.userAgent)||g).toLowerCase(),cn=w(e,an)||w(e,un)),cn}function _(e){var n=Object[r].toString.call(e),t=g;return"[object Error]"===n?t="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":pn()&&(t=vn().stringify(e)),n+t}var yn=null;function mn(e){return e?'"'+e.replace(/\"/g,g)+'"':g}function xn(e,n){var t,r=typeof console!==V?console:s("console");r&&(t="log",C(r[t=r[e]?e:t])&&r[t](n))}In.dataType="MessageData";var Cn=In;function In(e,n,t,r){void 0===t&&(t=!1),this.messageId=e,this.message=(t?"AI: ":"AI (Internal): ")+e;t=g,pn()&&(t=vn().stringify(r)),e=(n?" message:"+mn(n):g)+(r?" props:"+mn(t):g);this.message+=e}function wn(e,n){return(e||{}).logger||new Sn(n)}var Sn=function nr(o){this.identifier="DiagnosticLogger",this.queue=[];var u=0,c={};y(nr,this,function(i){function e(e,n){e=o[e];return x(e)?n:e}function a(e,n){var t,r=(t=(t=yn)||!0===o.disableDbgExt?t:yn||(r=s("Microsoft"),yn=r?r.ApplicationInsights:yn))?t.ChromeDbgExt:null;r&&r.diagLog&&r.diagLog(e,n)}x(o)&&(o={}),i.consoleLoggingLevel=function(){return e("loggingLevelConsole",0)},i.telemetryLoggingLevel=function(){return e("loggingLevelTelemetry",1)},i.maxInternalMessageLimit=function(){return e("maxMessageLimit",25)},i.enableDebugExceptions=function(){return e("enableDebugExceptions",!1)},i.throwInternal=function(e,n,t,r,o){n=new Cn(n,t,o=void 0!==o&&o,r);if(i.enableDebugExceptions())throw _(n);t=1===e?"errorToConsole":"warnToConsole";m(n.message)?a("throw"+(1===e?"Critical":"Warning"),n):(r=i.consoleLoggingLevel(),o?(o=+n.messageId,!c[o]&&e<=r&&(i[t](n.message),c[o]=!0)):e<=r&&i[t](n.message),i.logInternalMessage(e,n))},i.warnToConsole=function(e){xn("warn",e),a("warning",e)},i.errorToConsole=function(e){xn("error",e),a("error",e)},i.resetInternalMessageCount=function(){u=0,c={}},i.logInternalMessage=function(e,n){var t,r;u>=i.maxInternalMessageLimit()||(r=!0,t="AITR_"+n.messageId,c[t]?r=!1:c[t]=!0,r&&(e<=i.telemetryLoggingLevel()&&(i.queue.push(n),u++,a(1===e?"error":"warn",n)),u===i.maxInternalMessageLimit()&&(r=new Cn(23,t="Internal events throttle limit per PageView reached for this app.",!1),i.queue.push(r),1===e?i.errorToConsole(t):i.warnToConsole(t))))}})};function P(e,n,t,r,o,i){void 0===i&&(i=!1),(e||new Sn).throwInternal(n,t,r,o,i)}u.ParentContextKey="parent",u.ChildrenContextKey="childEvts";var Nn=u;function u(e,o,n){var r,i=this,a=!1;i.start=He(),i.name=e,i.isAsync=n,i.isChildEvt=function(){return!1},C(o)&&(a=function(e){if(_e)try{var n={enumerable:!0,configurable:!0,get:function(){return!r&&C(o)&&(r=o(),o=null),r}};return _e(e,"payload",n),!0}catch(t){}return!1}(i)),i.getCtx=function(e){return e?(e===u.ParentContextKey||e===u.ChildrenContextKey?i:i.ctx||{})[e]:null},i.setCtx=function(e,n){e&&(e===u.ParentContextKey?(i[e]||(i.isChildEvt=function(){return!0}),i[e]=n):e===u.ChildrenContextKey?i[e]=n:(i.ctx=i.ctx||{})[e]=n)},i.complete=function(){var e=0,n=i.getCtx(u.ChildrenContextKey);if(S(n))for(var t=0;t<n.length;t++){var r=n[t];r&&(e+=r.time)}i.time=He()-i.start,i.exTime=i.time-e,i.complete=function(){},!a&&C(o)&&(i.payload=o())}}var bn="CoreUtils.doPerf";function Tn(e,n,t,r,o){if(e)if(e=C(e.getPerfMgr)?e.getPerfMgr():e){var i,a=void 0,u=e.getCtx(bn);try{if(a=e.create(n(),r,o))return u&&a.setCtx&&(a.setCtx(Nn.ParentContextKey,u),u.getCtx&&u.setCtx&&((i=u.getCtx(Nn.ChildrenContextKey))||(i=[],u.setCtx(Nn.ChildrenContextKey,i)),i.push(a))),e.setCtx(bn,a),t(a)}catch(c){a&&a.setCtx&&a.setCtx("exception",c)}finally{a&&e.fire(a),e.setCtx(bn,u)}}t()}var kn=4294967296,c=4294967295,_n=!1,Pn=123456789,Mn=987654321;function Un(e){var n,t=0,r=s(rn)||s(on);if(0===(t=r&&r.getRandomValues?r.getRandomValues(new Uint32Array(1))[0]&c:t)&&hn()){if(!_n)try{var o=2147483647&He();(n=(Math.random()*kn^o)+o)<0&&(n>>>=0),Pn=123456789+n&c,Mn=987654321-n&c,_n=!0}catch(i){}r=((Mn=36969*(65535&Mn)+(Mn>>16)&c)<<16)+(65535&(Pn=18e3*(65535&Pn)+(Pn>>16)&c))>>>0&c|0,t=(r>>>=0)&c}return 0===t&&(t=Math.floor(kn*Math.random()|0)),e||(t>>>=0),t}function Dn(e){void 0===e&&(e=22);for(var n=Un()>>>0,t=0,r=g;r.length<e;)r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[0|63&n]||"",n>>>=6,5==++t&&(n=(Un()<<2&4294967295|3&n)>>>0,t=0);return r}var An=o,n="."+Dn(6);function Ln(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType}var On="toGMTString",En="toUTCString",Vn="cookie",Rn="expires",jn="enabled",qn="isCookieUseDisabled",Fn="disableCookiesUsage",M="_ckMgr",Bn=null,Kn=null,zn=null,Wn=typeof document===a&&document?document:s("document"),Jn={},$n={};function Gn(e){return!e||e.isEnabled()}function Hn(e,n){var t,r;return e?t=e.getCookieMgr():n&&(t=n.cookieCfg[M]||Xn(n)),t||(e=(e||{}).logger,(r=Xn[M]||$n[M])||(r=Xn[M]=Xn(n,e),$n[M]=r),t=r),t}function Xn(e,o){T(t=(e=e||$n).cookieCfg=e.cookieCfg||{},"domain",e.cookieDomain,Fe,x),T(t,"path",e.cookiePath||"/",null,x),x(t[jn])&&(n=void 0,m(e[qn])||(n=!e[qn]),m(e[Fn])||(n=!e[Fn]),t[jn]=n);var n,t,s=t,l=s.path||"/",f=s.domain,r=!1!==s[jn],d={isEnabled:function(){var e=r&&Yn(o),n=$n[M];return e&&n&&d!==n?Gn(n):e},setEnabled:function(e){r=!1!==e},set:function(e,n,t,r,o){var i,a,u,c=!1;return Gn(d)&&(i={},-1!=(u=(a=b(n||g)).indexOf(";"))&&(a=b(n.substring(0,u)),i=Zn(n.substring(1+u))),T(i,"domain",r||f,Ye,m),x(t)||(u=hn(),m(i[Rn])&&0<(n=He()+1e3*t)&&((r=new Date).setTime(n),T(i,Rn,Qn(r,u?On:En)||Qn(r,u?On:En)||g,Ye)),u||T(i,"max-age",g+t,null,m)),(n=gn())&&"https:"===n.protocol&&(T(i,"secure",null,null,m),(Kn=null===Kn?!(N(r=(dn()||{}).userAgent)&&(w(r,"CPU iPhone OS 12")||w(r,"iPad; CPU OS 12")||w(r,"Macintosh; Intel Mac OS X 10_14")&&w(r,"Version/")&&w(r,"Safari")||w(r,"Macintosh; Intel Mac OS X 10_14")&&function(e,n){var t=!1;if(!e||(t=e===n))return t;if(De)return e[Ne](n);var r=e,o=n,t=!1,e=r?r.length:0;if(e&&40<=e&&!(t=r===o)){for(var i=e-1,a=39;0<=a;a--){if(r[i]!=o[a])return;i--}t=!0}return t}(r,"AppleWebKit/605.1.15 (KHTML, like Gecko)")||w(r,"Chrome/5")||w(r,"Chrome/6")||w(r,"UnrealEngine")&&!w(r,"Chrome")||w(r,"UCBrowser/12")||w(r,"UCBrowser/11"))):Kn)&&T(i,"SameSite","None",null,m)),T(i,"path",o||l,null,m),(s.setCookie||nt)(e,et(a,i)),c=!0),c},get:function(e){var n=g;return Gn(d)?(s.getCookie||function(e){var n,t=g;return Wn&&(n=Wn[Vn]||g,zn!==n&&(Jn=Zn(n),zn=n),t=b(Jn[e]||g)),t})(e):n},del:function(e,n){return!!Gn(d)&&d.purge(e,n)},purge:function(e,n){var t,r=!1;return Yn(o)&&((t={}).path=n||"/",t[Rn]="Thu, 01 Jan 1970 00:00:01 GMT",n=t,hn()||(n["max-age"]="0"),(s.delCookie||nt)(e,et(g,n)),r=!0),r}};return d[M]=d}function Yn(e){if(null===Bn){Bn=!1;try{Bn=(Wn||{})[Vn]!==undefined}catch(n){P(e,2,68,"Cannot access document.cookie - "+Xe(n),{exception:_(n)})}}return Bn}function Zn(e){var t={};return e&&e.length&&We(b(e).split(";"),function(e){var n;(e=b(e||g))&&(-1==(n=e.indexOf("="))?t[e]=null:t[b(e.substring(0,n))]=b(e.substring(1+n)))}),t}function Qn(e,n){return C(e[n])?e[n]():null}function et(e,n){var t=e||g;return I(n,function(e,n){t+="; "+e+(x(n)?g:"="+n)}),t}function nt(e,n){Wn&&(Wn[Vn]=e+"="+n)}function tt(e,n,t){return e&&e.length===n&&e!==t&&e.match(/^[\da-f]*$/)}var rt,ot=rt={id:Ke("_aiData-plugin.2.8.40"+((f=void 0!==f&&f)?".2.8.4":"")+n),accept:Ln,get:function(e,n,t,r){var o=e[rt.id];return o?o[Ke(n)]:(r&&((o=function(e,n){var t=n[e.id];if(!t){t={};try{Ln(n)&&!function(e,n,t){if(An)try{return An(e,n,{value:t,enumerable:!1,configurable:!0}),1}catch(r){}}(n,e.id,t)&&(n[e.id]=t)}catch(r){}}return t}(rt,e))[Ke(n)]=t),t)},kill:function(e,n){if(e&&e[n])try{delete e[n]}catch(t){}}};function it(e){return ot.get(e,"state",{},!0)}var at="TelemetryPluginChain",ut="_hasRun",ct="_getTelCtx",st=0;function lt(e,a,t,n){var r=null,o=[],i=(null!==n&&(r=n?function(e,n,t){for(;e;){if(e.getPlugin()===t)return e;e=e.getNext()}return dt([t],n.config||{},n)}(e,t,n):e),{_next:function(){var e,n=r;return r=n?n.getNext():null,n||(e=o)&&0<e.length&&(We(e,function(e){try{e.func.call(e.self,e.args)}catch(n){P(t.logger,2,73,"Unexpected Exception during onComplete - "+_(n))}}),o=[]),n},ctx:{core:function(){return t},diagLog:function(){return wn(t,a)},getCfg:function(){return a},getExtCfg:u,getConfig:function(e,n,t){void 0===t&&(t=!1);var r,e=u(e,null);return e&&!x(e[n])?r=e[n]:a&&!x(a[n])&&(r=a[n]),x(r)?t:r},hasNext:function(){return!!r},getNext:function(){return r},setNext:function(e){r=e},iterate:function(e){for(;n=i._next();){var n=n.getPlugin();n&&e(n)}},onComplete:function(e,n){for(var t=[],r=2;r<arguments.length;r++)t[r-2]=arguments[r];e&&o.push({func:e,self:m(n)?i.ctx:n,args:t})}}});function u(e,n,t){var r,o,i;return void 0===n&&(n={}),void 0===t&&(t=0),(r=a&&(o=a.extensionConfig)&&e?o[e]:r)?Be(n)&&0!==t&&(i=function d(){var e=arguments,n=e[0]||{},t=e.length,r=!1,o=1;for(0<t&&"boolean"==typeof n&&(r=n,n=e[o]||{},o++),Be(n)||(n={});o<t;o++){var i,a,u,c,s=e[o],l=S(s),f=Be(s);for(i in s)(l&&i in s||f&&q.call(s,i))&&(a=s[i],u=void 0,r&&a&&((u=S(a))||ze(a))&&(c=n[i],u?S(c)||(c=[]):ze(c)||(c={}),a=d(r,c,a)),a!==undefined&&(n[i]=a))}return n}(!0,n,r),a&&2===t&&I(n,function(e){var n;x(i[e])&&!x(n=a[e])&&(i[e]=n)}),r=i):r=n,r}return i}function ft(e,t,r,n){var o=lt(e,t,r,n),i=o.ctx;return i.processNext=function(e){var n=o._next();return n&&n.processTelemetry(e,i),!n},i.createNew=function(e,n){return ft((e=S(e=void 0===e?null:e)?dt(e,t,r,n):e)||i.getNext(),t,r,n)},i}function dt(e,n,t,r){var o,i=null,a=!r;return S(e)&&0<e.length&&(o=null,We(e,function(e){(a=!a&&r===e||a)&&e&&C(e.processTelemetry)&&(e=gt(e,n,t),i=i||e,o&&o._setNext(e),o=e)})),r&&!i?dt([r],n,t):i}function gt(c,r,o){var s=null,i=C(c.processTelemetry),a=C(c.setNextPlugin),l=c?c.identifier+"-"+c.priority+"-"+st++:"Unknown-0-"+st++,u={getPlugin:function(){return c},getNext:function(){return s},processTelemetry:function(t,e){var n;f(e=e||(n=(n=c&&C(c[ct])?c[ct]():n)||ft(u,r,o)),function(e){if(!c||!i)return!1;var n=it(c);return!n.teardown&&!n[Ie]&&(a&&c.setNextPlugin(s),c.processTelemetry(t,e),!0)},"processTelemetry",function(){return{item:t}},!t.sync)||e.processNext(t)},unload:function(r,o){f(r,function(){var e,n,t=!1;return c&&(e=it(c),n=c[xe]||e.core,!c||n&&n!==r[xe]()||e[me]||(e[xe]=null,e[me]=!0,e[ye]=!1,c[me]&&!0===c[me](r,o)&&(t=!0))),t},"unload",function(){},o.isAsync)||r.processNext(o)},update:function(r,o){f(r,function(){var e,n,t=!1;return c&&(e=it(c),n=c[xe]||e.core,!c||n&&n!==r[xe]()||e[me]||c[Ce]&&!0===c[Ce](r,o)&&(t=!0)),t},"update",function(){},!1)||r.processNext(o)},_id:l,_setNext:function(e){s=e}};function f(t,r,o,e,n){var i=!1,a=c?c.identifier:at,u=(u=t[ut])||(t[ut]={});return t.setNext(s),c&&Tn(t[xe](),function(){return a+":"+o},function(){u[l]=!0;try{var e=s?s._id:g;e&&(u[e]=!1),i=r(t)}catch(n){e=!s||u[s._id];e&&(i=!0),s&&e||P(t.diagLog(),1,73,"Plugin ["+a+"] failed during "+o+" - "+_(n)+", run flags: "+_(u))}},e,n),i}return Ge(u)}function pt(){var n=[];return{add:function(e){e&&n.push(e)},run:function(t,r){We(n,function(e){try{e(t,r)}catch(n){P(t.diagLog(),2,73,"Unexpected error calling unload handler - "+_(n))}}),n=[]}}}var U="getPlugin",Te=function tr(){var i,o,l,f,d,a=this;function n(e){var n,e=e=void 0===e?null:e;return e||(n=o||ft(null,{},a.core),e=l&&l[U]?n.createNew(null,l[U]):n.createNew(null,l)),e}function c(e,n,t){e&&T(e,"extensionConfig",[],null,x),!t&&n&&(t=n.getProcessTelContext().getNext());var r=l;l&&l[U]&&(r=l[U]()),a.core=n,o=ft(t,e,n,r)}function g(){i=!1,a.core=null,l=o=null,d=[],f=pt()}g(),y(tr,a,function(s){var e,n,t,r,o;s.initialize=function(e,n,t,r){c(e,n,r),i=!0},s.teardown=function(e,n){var t,r,o,i,a=s.core;if(a&&(!e||a===e.core()))return r=!1,o=e||function c(e,t,n){var r=t.config||{},o=lt(e,r,t,n),i=o.ctx;return i.processNext=function(e){var n=o._next();return n&&n.unload(i,e),!n},i.createNew=function(e,n){return c((e=S(e=void 0===e?null:e)?dt(e,r,t,n):e)||i.getNext(),t,n)},i}(null,a,l&&l[U]?l[U]():l),i=n||{reason:0,isAsync:!1},s[we]&&!0===s[we](o,i,u)?t=!0:u(),t;function u(){r||(r=!0,f.run(o,n),We(d,function(e){e.rm()}),d=[],!0===t&&o.processNext(i),g())}},s.update=function(e,n){var t,r,o,i=s.core;if(i&&(!e||i===e.core()))return r=!1,o=e||function u(e,t,n){var r=t.config||{},o=lt(e,r,t,n).ctx;return o.processNext=function(n){return o.iterate(function(e){C(e.update)&&e.update(o,n)})},o.createNew=function(e,n){return u((e=S(e=void 0===e?null:e)?dt(e,r,t,n):e)||o.getNext(),t,n)},o}(null,i,l&&l[U]?l[U]():l),s._doUpdate&&!0===s._doUpdate(o,n||{reason:0},a)?t=!0:a(),t;function a(){r||(r=!0,c(o.getCfg(),o.core(),o.getNext()))}},s._addHook=function(e){e&&(S(e)?d=d.concat(e):d.push(e))},t="_addUnloadCb",n=function(){return f},(e=s)&&n&&(e[t]=(o=r=null,C(t=n)?r=t:o=t,function(){var e=arguments;if(o=r?r():o)return o.add.apply(o,e)}))}),a.diagLog=function(e){return n(e).diagLog()},a[ye]=function(){return i},a.setInitialized=function(e){i=e},a.setNextPlugin=function(e){l=e},a.processNext=function(e,n){n?n.processNext(e):l&&C(l.processTelemetry)&&l.processTelemetry(e,null)},a._getTelCtx=n};function vt(e,n,t){var r,o,i=n.length,a=(e=e,(n=n)&&150<(n=b(n.toString())).length&&(o=n.substring(0,150),P(e,2,57,"name is too long. It has been truncated to 150 characters.",{name:n},!0)),o||n);if(a.length!==i){for(var u=0,c=a;t[c]!==undefined;)u++,c=a.substring(0,147)+(r=void 0,(r="00"+u).substr(r.length-3));a=c}return a}function ht(e,n,t){var r;return void 0===t&&(t=1024),n&&(t=t||1024,(n=b(n)).toString().length>t&&(r=n.toString().substring(0,t),P(e,2,61,"string value is too long. It has been truncated to "+t+" characters.",{value:n},!0))),r||n}function yt(r,e){var o;return e&&(o={},I(e,function(e,n){if(Be(n)&&pn())try{n=vn().stringify(n)}catch(t){P(r,2,49,"custom property is not valid",{exception:t},!0)}n=ht(r,n,8192),e=vt(r,e,o),o[e]=n}),e=o),e}function mt(e,n,t,r){var o;return n&&(n=b(n)).length>t&&(o=n.substring(0,t),P(e,2,r,"input is too long, it has been truncated to "+t+" characters.",{data:n},!0)),o||n}var xt=Ze({LocalStorage:0,SessionStorage:1}),Ct=(Ze({AI:0,AI_AND_W3C:1,W3C:2}),undefined);function It(){return St()?wt(xt.LocalStorage):null}function wt(e){try{if(x(B()))return null;var n=(new Date).toString(),t=s(e===xt.LocalStorage?"localStorage":"sessionStorage"),r=(t.setItem(n,n),t.getItem(n)!==n);if(t.removeItem(n),!r)return t}catch(o){}return null}function St(e){return Ct=e||Ct===undefined?!!wt(xt.LocalStorage):Ct}function Nt(e,n){var t=It();if(null!==t)try{return t.getItem(n)}catch(r){Ct=!1,P(e,2,1,"Browser failed read of local storage. "+Xe(r),{exception:_(r)})}return null}function bt(e,n,t){var r=It();if(null!==r)try{r.setItem(n,t)}catch(o){Ct=!1,P(e,2,3,"Browser failed write to local storage. "+Xe(o),{exception:_(o)})}}function Tt(e,n){var t=It();if(null!==t)try{t.removeItem(n)}catch(r){Ct=!1,P(e,2,5,"Browser failed removal of local storage item. "+Xe(r),{exception:_(r)})}}_t.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",_t.dataType="PageviewData";var kt=_t;function _t(e,n,t,r,o,i,a){this.aiDataContract={ver:1,name:0,url:0,duration:0,properties:0,measurements:0,id:0};var u,c,s,l=this;l.ver=2,l.id=a&&mt(e,a,128,69).toString(),l.url=mt(e,t,2048,66),l.name=ht(e,n)||"not_specified",isNaN(r)||(l.duration=(t=""+Math.floor((a=Math.round(a=isNaN(a=r)||a<0?0:a))/1e3)%60,n=1===(n=""+a%1e3).length?"00"+n:2===n.length?"0"+n:n,t=t.length<2?"0"+t:t,r=(r=""+Math.floor(a/6e4)%60).length<2?"0"+r:r,(0<(u=Math.floor(a/864e5))?u+".":"")+(u=(u=""+Math.floor(a/36e5)%24).length<2?"0"+u:u)+":"+r+":"+t+"."+n)),l.properties=yt(e,o),l.measurements=(c=e,(a=i)&&(s={},I(a,function(e,n){e=vt(c,e,s),s[e]=n}),a=s),a)}function l(e){var n="ai."+e+".";return function(e){return n+e}}var Pt,Mt,i=l("application"),o=l("device"),f=l("location"),n=l("operation"),Ut=l("session"),d=l("user"),D=l("cloud"),Dt=l("internal");function At(){return Pt.call(this)||this}Mt={applicationVersion:i("ver"),applicationBuild:i("build"),applicationTypeId:i("typeId"),applicationId:i("applicationId"),applicationLayer:i("layer"),deviceId:o("id"),deviceIp:o("ip"),deviceLanguage:o("language"),deviceLocale:o("locale"),deviceModel:o("model"),deviceFriendlyName:o("friendlyName"),deviceNetwork:o("network"),deviceNetworkName:o("networkName"),deviceOEMName:o("oemName"),deviceOS:o("os"),deviceOSVersion:o("osVersion"),deviceRoleInstance:o("roleInstance"),deviceRoleName:o("roleName"),deviceScreenResolution:o("screenResolution"),deviceType:o("type"),deviceMachineName:o("machineName"),deviceVMName:o("vmName"),deviceBrowser:o("browser"),deviceBrowserVersion:o("browserVersion"),locationIp:f("ip"),locationCountry:f("country"),locationProvince:f("province"),locationCity:f("city"),operationId:n("id"),operationName:n("name"),operationParentId:n("parentId"),operationRootId:n("rootId"),operationSyntheticSource:n("syntheticSource"),operationCorrelationVector:n("correlationVector"),sessionId:Ut("id"),sessionIsFirst:Ut("isFirst"),sessionIsNew:Ut("isNew"),userAccountAcquisitionDate:d("accountAcquisitionDate"),userAccountId:d("accountId"),userAgent:d("userAgent"),userId:d("id"),userStoreRegion:d("storeRegion"),userAuthUserId:d("authUserId"),userAnonymousUserAcquisitionDate:d("anonUserAcquisitionDate"),userAuthenticatedUserAcquisitionDate:d("authUserAcquisitionDate"),cloudName:D("name"),cloudRole:D("role"),cloudRoleVer:D("roleVer"),cloudRoleInstance:D("roleInstance"),cloudEnvironment:D("environment"),cloudLocation:D("location"),cloudDeploymentUnit:D("deploymentUnit"),internalNodeName:Dt("nodeName"),internalSdkVersion:Dt("sdkVersion"),internalAgentVersion:Dt("agentVersion"),internalSnippet:Dt("snippet"),internalSdkSrc:Dt("sdkSrc")},W(At,Pt=function(){var t=this;I(Mt,function(e,n){t[e]=n})});var Lt="user",Ot="device",Et="trace",Vt="web",Rt="app",jt="os",A=new At,qt=function(){},Ft=(L.acquisitionSpan=864e5,L.renewalSpan=18e5,L.cookieUpdateInterval=6e4,L);function L(n,e){var l,f,d=wn(e),g=Hn(e);y(L,this,function(u){C((n=n||{}).sessionExpirationMs)||(n.sessionExpirationMs=function(){return L.acquisitionSpan}),C(n.sessionRenewalMs)||(n.sessionRenewalMs=function(){return L.renewalSpan}),u.config=n;var e=u.config.sessionCookiePostfix&&u.config.sessionCookiePostfix()?u.config.sessionCookiePostfix():u.config.namePrefix&&u.config.namePrefix()?u.config.namePrefix():"";function c(e,n){var t=!1,r=", session will be reset",o=n.split("|");if(2<=o.length)try{var i=+o[1]||0,a=+o[2]||0;isNaN(i)||i<=0?P(d,2,27,"AI session acquisition date is 0"+r):isNaN(a)||a<=0?P(d,2,27,"AI session renewal date is 0"+r):o[0]&&(e.id=o[0],e.acquisitionDate=i,e.renewalDate=a,t=!0)}catch(u){P(d,1,9,"Error parsing ai_session value ["+(n||"")+"]"+r+" - "+Xe(u),{exception:_(u)})}return t}function s(e,n){var t=e.acquisitionDate,r=(e.renewalDate=n,u.config),o=r.sessionRenewalMs(),i=t+r.sessionExpirationMs()-n,e=[e.id,t,n],t=i<o?i/1e3:o/1e3,i=r.cookieDomain?r.cookieDomain():null;g.set(l(),e.join("|"),0<r.sessionExpirationMs()?t:null,i),f=n}l=function(){return"ai_session"+e},u.automaticSession=new qt,u.update=function(){var e,n,t,r=He(),o=!1,i=u.automaticSession,a=(i.id||(n=i,t=!1,(a=g.get(l()))&&C(a.split)?t=c(n,a):(a=Nt(d,l()))&&(t=c(n,a)),o=!(t||n.id)),u.config.sessionExpirationMs());!o&&0<a&&(t=u.config.sessionRenewalMs(),n=r-i.acquisitionDate,e=r-i.renewalDate,o=(o=(o=n<0||e<0)||a<n)||t<e),o?(a=r,t=((n=u.config||{}).getNewId?n.getNewId():null)||Dn,u.automaticSession.id=t(n.idLength?n.idLength():22),u.automaticSession.acquisitionDate=a,s(u.automaticSession,a),St()||P(d,2,0,"Browser does not support local storage. Session durations will be inaccurate.")):(!f||L.cookieUpdateInterval<r-f)&&s(i,r)},u.backup=function(){var e=u.automaticSession,n=e.id,t=e.acquisitionDate,e=e.renewalDate;bt(d,l(),[n,t,e].join("|"))}})}var Bt=function(){},Kt=function(){this.id="browser",this.deviceClass="Browser"},zt=function(e){this.sdkVersion=(e.sdkExtension&&e.sdkExtension()?e.sdkExtension()+"_":"")+"javascript:2.8.4"};function Wt(e){return"string"==typeof e&&e&&!e.match(/,|;|=| |\|/)}O.cookieSeparator="|",O.userCookieName="ai_user",O.authUserCookieName="ai_authUser";var Jt=O;function O(a,e){this.isNewUser=!1,this.isUserCookieSet=!1;var u,c=wn(e),s=Hn(e);y(O,this,function(r){r.config=a;var e=r.config.userCookiePostfix&&r.config.userCookiePostfix()?r.config.userCookiePostfix():"",n=(u=function(){return O.userCookieName+e},s.get(u()));function t(){var e=a||{};return((e.getNewId?e.getNewId():null)||Dn)(e.idLength?a.idLength():22)}function o(e){var n=function(e){if(e){if(Ae)return e[Se]();var n;return e&&e.getUTCFullYear?(n=function(e){e=""+e;return 1===e.length?"0"+e:e},e.getUTCFullYear()+"-"+n(1+e.getUTCMonth())+"-"+n(e.getUTCDate())+"T"+n(e.getUTCHours())+":"+n(e.getUTCMinutes())+":"+n(e.getUTCSeconds())+"."+(e.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"):void 0}}(new Date);return r.accountAcquisitionDate=n,r.isNewUser=!0,[e,n]}function i(e){r.isUserCookieSet=s.set(u(),e,31536e3)}n&&(r.isNewUser=!1,0<(n=n.split(O.cookieSeparator)).length&&(r.id=n[0],r.isUserCookieSet=!!r.id)),r.id||(r.id=t(),i(o(r.id).join(O.cookieSeparator)),n=a.namePrefix&&a.namePrefix()?a.namePrefix()+"ai_session":"ai_session",Tt(c,n)),r.accountId=a.accountId?a.accountId():undefined;var n=s.get(O.authUserCookieName);n&&((n=(n=decodeURI(n)).split(O.cookieSeparator))[0]&&(r.authenticatedId=n[0]),1<n.length&&n[1]&&(r.accountId=n[1])),r.setAuthenticatedUserContext=function(e,n,t){void 0===t&&(t=!1),!Wt(e)||n&&!Wt(n)?P(c,2,60,"Setting auth user context failed. User auth/account id should be of type string, and not contain commas, semi-colons, equal signs, spaces, or vertical-bars.",!0):(r.authenticatedId=e,e=r.authenticatedId,n&&(r.accountId=n,e=[r.authenticatedId,r.accountId].join(O.cookieSeparator)),t&&s.set(O.authUserCookieName,encodeURI(e)))},r.clearAuthenticatedUserContext=function(){r.authenticatedId=null,r.accountId=null,s.del(O.authUserCookieName)},r.update=function(e){r.id===e&&r.isUserCookieSet||i(o(e||t()).join(O.cookieSeparator))}})}var $t=function(){},Gt=function(e,n,t,r){this.traceID=e||function(){for(var e,n=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],t=g,r=0;r<4;r++)t+=n[15&(e=Un())]+n[e>>4&15]+n[e>>8&15]+n[e>>12&15]+n[e>>16&15]+n[e>>20&15]+n[e>>24&15]+n[e>>28&15];var o=n[8+(3&Un())|0];return t.substr(0,8)+t.substr(9,4)+"4"+t.substr(13,3)+o+t.substr(16,3)+t.substr(19,12)}(),this.parentID=n;e=gn();!t&&e&&e.pathname&&(t=e.pathname),this.name=ht(r,t)},Ht="ext",Xt="tags";function Yt(e,n){e&&e[n]&&0===function(e){var n=typeof e;if(n===E||n===a&&null!==e||K("objKeys called on non-object"),!Je&&Me)return Me(e);var t,r=[];for(t in e)e&&q.call(e,t)&&r.push(t);if(Je)for(var o=$e.length,i=0;i<o;i++)e&&q.call(e,$e[i])&&r.push($e[i]);return r}(e[n]).length&&delete e[n]}var Zt,Qt=function rr(r,i,a){var u=this,c=r.logger;this.appId=function(){return null},this.getSessionId=function(){return null},y(rr,this,function(o){var e,n,t;o.application=new Bt,o.internal=new zt(i),fn()&&(o.sessionManager=new Ft(i,r),o.device=new Kt,o.location=new $t,o.user=new Jt(i,r),n=e=void 0,a&&(e=a.getTraceId(),n=a.getSpanId(),t=a.getName()),o.telemetryTrace=new Gt(e,n,t,c),o.session=new qt),o.getSessionId=function(){var e=o.session;return e&&N(e.id)?e.id:(e=(o.sessionManager||{}).automaticSession)&&N(e.id)?e.id:null},o.applySessionContext=function(e,n){T(k(e.ext,Rt),"sesId",o.getSessionId(),N)},o.applyOperatingSystemContxt=function(e,n){T(e.ext,jt,o.os)},o.applyApplicationContext=function(e,n){var t=o.application;t&&(T(e=k(e,Xt),A.applicationVersion,t.ver,N),T(e,A.applicationBuild,t.build,N))},o.applyDeviceContext=function(e,n){var t=o.device;t&&(T(e=k(k(e,Ht),Ot),"localId",t.id,N),T(e,"ip",t.ip,N),T(e,"model",t.model,N),T(e,"deviceClass",t.deviceClass,N))},o.applyInternalContext=function(e,n){var t,r=o.internal;r&&(T(t=k(e,Xt),A.internalAgentVersion,r.agentVersion,N),T(t,A.internalSdkVersion,r.sdkVersion,N),e.baseType!==Cn.dataType&&e.baseType!==kt.dataType||(T(t,A.internalSnippet,r.snippetVer,N),T(t,A.internalSdkSrc,r.sdkSrc,N)))},o.applyLocationContext=function(e,n){var t=u.location;t&&T(k(e,Xt,[]),A.locationIp,t.ip,N)},o.applyOperationContext=function(e,n){var t=o.telemetryTrace;t&&(T(e=k(k(e,Ht),Et,{traceID:undefined,parentID:undefined}),"traceID",t.traceID,N),T(e,"name",t.name,N),T(e,"parentID",t.parentID,N))},o.applyWebContext=function(e,n){var t=u.web;t&&T(k(e,Ht),Vt,t)},o.applyUserContext=function(e,n){var t=o.user;t&&(T(k(e,Xt,[]),A.userAccountId,t.accountId,N),T(e=k(k(e,Ht),Lt),"id",t.id,N),T(e,"authId",t.authenticatedId,N))},o.cleanUp=function(e,n){e=e.ext;e&&(Yt(e,Ot),Yt(e,Lt),Yt(e,Vt),Yt(e,jt),Yt(e,Rt),Yt(e,Et))}})},i=(W(er,Zt=Te),er.getDefaultConfig=function(){return{instrumentationKey:function(){return undefined},accountId:function(){return null},sessionRenewalMs:function(){return 18e5},samplingPercentage:function(){return 100},sessionExpirationMs:function(){return 864e5},cookieDomain:function(){return null},sdkExtension:function(){return null},isBrowserLinkTrackingEnabled:function(){return!1},appId:function(){return null},getSessionId:function(){return null},namePrefix:function(){return undefined},sessionCookiePostfix:function(){return undefined},userCookiePostfix:function(){return undefined},idLength:function(){return 22},getNewId:function(){return null}}},er);function er(){var l,f,d,e=Zt.call(this)||this;return e.priority=110,e.identifier="AppInsightsPropertiesPlugin",y(er,e,function(c,s){function t(){d=f=l=null}t(),c.initialize=function(e,n,t,r){s.initialize(e,n,t,r);var o,i,a=c._getTelCtx(),u=c.identifier,e=er.getDefaultConfig();l=l||{},I(e,function(e,n){l[e]=function(){return a.getConfig(u,e,n())}}),d=n.getTraceCtx(!1),c.context=new Qt(n,l,d),t=c.context.telemetryTrace,o=d,i=t||{},f={getName:function(){return i.name},setName:function(e){o&&o.setName(e),i.name=e},getTraceId:function(){return i.traceID},setTraceId:function(e){o&&o.setTraceId(e),tt(e,32,"00000000000000000000000000000000")&&(i.traceID=e)},getSpanId:function(){return i.parentID},setSpanId:function(e){o&&o.setSpanId(e),tt(e,16,"0000000000000000")&&(i.parentID=e)},getTraceFlags:function(){return i.traceFlags},setTraceFlags:function(e){o&&o.setTraceFlags(e),i.traceFlags=e}},n.setTraceCtx(f),c.context.appId=function(){var e=n.getPlugin("AppInsightsChannelPlugin");return e?e.plugin._appId:null},c._extConfig=l},c.processTelemetry=function(e,n){var t,r,o,i;x(e)||(n=c._getTelCtx(n),e.name===kt.envelopeType&&n.diagLog().resetInternalMessageCount(),(r=c.context||{}).session&&"string"!=typeof c.context.session.id&&r.sessionManager&&r.sessionManager.update(),(t=r.user)&&!t.isUserCookieSet&&t.update(r.user.id),r=n,k(i=e,"tags",[]),k(i,"ext",{}),(o=c.context).applySessionContext(i,r),o.applyApplicationContext(i,r),o.applyDeviceContext(i,r),o.applyOperationContext(i,r),o.applyUserContext(i,r),o.applyOperatingSystemContxt(i,r),o.applyWebContext(i,r),o.applyLocationContext(i,r),o.applyInternalContext(i,r),o.cleanUp(i,r),t&&t.isNewUser&&(t.isNewUser=!1,i=new Cn(72,(dn()||{}).userAgent||""),(n.diagLog()||new Sn).logInternalMessage(1,i)),c.processNext(e,n))},c._doTeardown=function(e,n){e=(e||{}).core();e&&e.getTraceCtx&&e.getTraceCtx(!1)===f&&e.setTraceCtx(d),t()}}),e}e.PropertiesPlugin=i,e.Session=qt,e.SessionManager=Ft,e.TelemetryContext=Qt,e.TelemetryTrace=Gt;o=e,f="__esModule",n={value:!0},Ut=Object.defineProperty;if(Ut)try{return void Ut(o,f,n)}catch(or){}typeof n.value!==undefined&&(o[f]=n.value)};"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(((e="undefined"!=typeof globalThis?globalThis:e||self).Microsoft=e.Microsoft||{},e.Microsoft.ApplicationInsights=e.Microsoft.ApplicationInsights||{}));
6
6
  //# sourceMappingURL=applicationinsights-properties-js.min.js.map