@microsoft/applicationinsights-clickanalytics-js 2.8.0-beta.2203-06 → 2.8.0-beta.2203-07
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/{ai.clck.2.8.0-beta.2203-06.cjs.js → ai.clck.2.8.0-beta.2203-07.cjs.js} +3 -3
- package/browser/ai.clck.2.8.0-beta.2203-07.cjs.js.map +1 -0
- package/browser/{ai.clck.2.8.0-beta.2203-06.cjs.min.js → ai.clck.2.8.0-beta.2203-07.cjs.min.js} +3 -3
- package/browser/{ai.clck.2.8.0-beta.2203-06.cjs.min.js.map → ai.clck.2.8.0-beta.2203-07.cjs.min.js.map} +1 -1
- package/browser/{ai.clck.2.8.0-beta.2203-06.gbl.js → ai.clck.2.8.0-beta.2203-07.gbl.js} +3 -3
- package/browser/ai.clck.2.8.0-beta.2203-07.gbl.js.map +1 -0
- package/browser/{ai.clck.2.8.0-beta.2203-06.gbl.min.js → ai.clck.2.8.0-beta.2203-07.gbl.min.js} +3 -3
- package/browser/ai.clck.2.8.0-beta.2203-07.gbl.min.js.map +1 -0
- package/browser/ai.clck.2.8.0-beta.2203-07.integrity.json +66 -0
- package/browser/{ai.clck.2.8.0-beta.2203-06.js → ai.clck.2.8.0-beta.2203-07.js} +3 -3
- package/browser/ai.clck.2.8.0-beta.2203-07.js.map +1 -0
- package/browser/{ai.clck.2.8.0-beta.2203-06.min.js → ai.clck.2.8.0-beta.2203-07.min.js} +3 -3
- package/browser/ai.clck.2.8.0-beta.2203-07.min.js.map +1 -0
- package/browser/ai.clck.2.cjs.js +2 -2
- package/browser/ai.clck.2.cjs.js.map +1 -1
- package/browser/ai.clck.2.cjs.min.js +2 -2
- package/browser/ai.clck.2.cjs.min.js.map +1 -1
- package/browser/ai.clck.2.gbl.js +2 -2
- package/browser/ai.clck.2.gbl.js.map +1 -1
- package/browser/ai.clck.2.gbl.min.js +2 -2
- package/browser/ai.clck.2.gbl.min.js.map +1 -1
- package/browser/ai.clck.2.js +2 -2
- package/browser/ai.clck.2.js.map +1 -1
- package/browser/ai.clck.2.min.js +2 -2
- package/browser/ai.clck.2.min.js.map +1 -1
- package/dist/applicationinsights-clickanalytics-js.d.ts +1 -1
- package/dist/applicationinsights-clickanalytics-js.js +2 -2
- package/dist/applicationinsights-clickanalytics-js.js.map +1 -1
- package/dist/applicationinsights-clickanalytics-js.min.js +2 -2
- package/dist/applicationinsights-clickanalytics-js.min.js.map +1 -1
- package/dist/applicationinsights-clickanalytics-js.rollup.d.ts +1 -1
- package/dist-esm/Behaviours.js +1 -1
- package/dist-esm/ClickAnalyticsPlugin.js +2 -2
- package/dist-esm/ClickAnalyticsPlugin.js.map +1 -1
- package/dist-esm/DataCollector.js +1 -1
- package/dist-esm/Enums.js +1 -1
- package/dist-esm/Interfaces/Datamodel.js +1 -1
- package/dist-esm/applicationinsights-clickanalytics-js.js +1 -1
- package/dist-esm/common/Utils.js +1 -1
- package/dist-esm/events/PageAction.js +1 -1
- package/dist-esm/events/WebEvent.js +1 -1
- package/dist-esm/handlers/AutoCaptureHandler.js +1 -1
- package/dist-esm/handlers/DomContentHandler.js +1 -1
- package/package.json +4 -4
- package/src/ClickAnalyticsPlugin.ts +1 -1
- package/browser/ai.clck.2.8.0-beta.2203-06.cjs.js.map +0 -1
- package/browser/ai.clck.2.8.0-beta.2203-06.gbl.js.map +0 -1
- package/browser/ai.clck.2.8.0-beta.2203-06.gbl.min.js.map +0 -1
- package/browser/ai.clck.2.8.0-beta.2203-06.integrity.json +0 -66
- package/browser/ai.clck.2.8.0-beta.2203-06.js.map +0 -1
- package/browser/ai.clck.2.8.0-beta.2203-06.min.js.map +0 -1
package/browser/ai.clck.2.min.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Application Insights JavaScript SDK - Click Analytics, 2.8.0-beta.2203-
|
|
2
|
+
* Application Insights JavaScript SDK - Click Analytics, 2.8.0-beta.2203-07
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
|
-
var t=this,e=function(t){"use strict";var F="function",o="object",r="undefined",a="prototype",B="hasOwnProperty",n=Object,U=n[a],e=n.assign,R=n.create,i=n.defineProperty,p=U[B],c=null;function j(t){return void 0===t&&(t=!0),c&&t||(typeof globalThis!==r&&globalThis&&(c=globalThis),typeof self!==r&&self&&(c=self),typeof window!==r&&window&&(c=window),typeof global!==r&&global&&(c=global)),c}function V(t){throw new TypeError(t)}(j()||{}).Symbol,(j()||{}).Reflect;var e=e||function(t){for(var e,n=1,a=arguments.length;n<a;n++)for(var r in e=arguments[n])U[B].call(e,r)&&(t[r]=e[r]);return t},H=function(t,e){return(H=n.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e[B](n)&&(t[n]=e[n])})(t,e)};function z(t,e){function n(){this.constructor=t}typeof e!==F&&null!==e&&V("Class extends value "+e+" is not a constructor or null"),H(t,e),t[a]=null===e?function(t){if(R)return R(t);if(null==t)return{};var e=typeof t;function n(){}return e!==o&&e!==F&&V("Object prototype may only be an Object:"+t),n[a]=t,new n}(e):(n[a]=e[a],new n)}var K="constructor",d="prototype",q="function",W="_dynInstFuncs",J="_isDynProxy",h="_dynClass",G="_dynInstChk",v=G,X="_dfOpts",Y="_unknown_",$="__proto__",Q="useBaseInst",Z="setInstFuncs",tt=Object,m=tt.getPrototypeOf,et=0;function y(t,e){return t&&tt[d].hasOwnProperty.call(t,e)}function nt(t){return t&&(t===tt[d]||t===Array[d])}function at(t){return nt(t)||t===Function[d]}function T(t){if(t){if(m)return m(t);t=t[$]||t[d]||(t[K]?t[K][d]:null);if(t)return t}return null}function rt(t,e){var n=[],a=tt.getOwnPropertyNames;if(a)n=a(t);else for(var r in t)"string"==typeof r&&y(t,r)&&n.push(r);if(n&&0<n.length)for(var i=0;i<n.length;i++)e(n[i])}function it(t,e,n){return e!==K&&typeof t[e]===q&&(n||y(t,e))}function ot(t){throw new TypeError("DynamicProto: "+t)}function ct(t,e){for(var n=t.length-1;0<=n;n--)if(t[n]===e)return 1}function ut(t,e){return y(t,d)?t.name||e||Y:((t||{})[K]||{}).name||e||Y}function st(t,a,e,n){y(t,d)||ot("theClass is an invalid class definition.");var r,i,o,c,u,s,l=t[d],f=(function(t){if(m)for(var e=[],n=T(a);n&&!at(n)&&!ct(e,n);){if(n===t)return 1;e.push(n),n=T(n)}}(l)||ot("["+ut(t)+"] is not in class hierarchy of ["+ut(a)+"]"),null),t=(y(l,h)?f=l[h]:(f="_dynCls$"+ut(t,"_")+"$"+et,et++,l[h]=f),st[X]),g=!!t[Q],p=(g&&n&&n[Q]!==undefined&&(g=!!n[Q]),i={},rt(r=a,function(t){!i[t]&&it(r,t,!1)&&(i[t]=r[t])}),i),g=(e(a,function(t,e,n,i){function a(t,e,n){var a,r=e[n];return r[J]&&i&&!1!==(a=t[W]||{})[v]&&(r=(a[e[h]]||{})[n]||r),function(){return r.apply(t,arguments)}}for(var r={},o=(rt(n,function(t){r[t]=a(e,n,t)}),T(t)),c=[];o&&!at(o)&&!ct(c,o);)rt(o,function(t){!r[t]&&it(o,t,!m)&&(r[t]=a(e,o,t))}),c.push(o),o=T(o);return r}(l,a,p,g)),!!m&&!!t[Z]);o=l,e=f,c=a,u=p,t=!1!==(g=g&&n?!!n[Z]:g),nt(o)||(l=c[W]=c[W]||{},s=l[e]=l[e]||{},!1!==l[v]&&(l[v]=!!t),rt(c,function(t){var n,a,r;it(c,t,!1)&&c[t]!==u[t]&&(s[t]=c[t],delete c[t],y(o,t)&&(!o[t]||o[t][J])||(o[t]=(n=o,a=t,(r=function(){var t,e;return(function(t,e,n,a){var r=null;if(t&&y(n,h)){var i=t[W]||{};if((r=(i[n[h]]||{})[e])||ot("Missing ["+e+"] "+q),!r[G]&&!1!==i[v]){for(var o=!y(t,e),c=T(t),u=[];o&&c&&!at(c)&&!ct(u,c);){var s=c[e];if(s){o=s===a;break}u.push(c),c=T(c)}try{o&&(t[e]=r),r[G]=1}catch(l){i[v]=!1}}}return r}(this,a,n,r)||(typeof(e=(e=n[t=a])===r?T(n)[t]:e)!==q&&ot("["+t+"] is not a "+q),e)).apply(this,arguments)})[J]=1,r)))}))}st[X]={setInstFuncs:!0,useBaseInst:!0};var g="",lt="isInitialized",_="teardown",C="core",ft="update",gt="disabled",pt="_doTeardown",u="toString",dt="constructor",ht=i,vt=n.freeze,s=Array.isArray,mt=U[u],yt=p[u],Tt=yt.call(n),_t=/-([a-z])/g,Ct=/([^\w\d_$])/g,xt=/^(\d+[\w\d_$])/,bt=Object.getPrototypeOf;function It(t){return t===undefined||typeof t===r}function x(t){return null===t||It(t)}function Nt(t){return!(!t||typeof t!==o)}function b(t){return!(!t||typeof t!==F)}function At(t){var e=t;return t&&"string"==typeof t?(e=(e=t.replace(_t,function(t,e){return e.toUpperCase()})).replace(Ct,"_")).replace(xt,function(t,e){return"_"+e}):e}function Pt(t,e){if(t)for(var n in t)p.call(t,n)&&e.call(t,n,t[n])}function wt(t,e){return!(!t||!e||!~t.indexOf(e))}var I=s||function(t){return!(!t||"[object Array]"!==mt.call(t))};function Dt(t){return t&&"object"==typeof t&&(!(t=(bt||function(t){if(t){if(bt)return bt(t);t=t.__proto__||t[a]||t[dt];if(t)return t}return null})(t))||typeof(t=t[dt]&&p.call(t,dt)?t[dt]:t)===F&&yt.call(t)===Tt)}function N(t,e,n){var a=t.length;try{for(var r=0;r<a&&!(r in t&&-1===e.call(n||t,t[r],r,t));r++);}catch(i){}}var kt=vt||function(t){return t};function Et(){var t=Date;return t.now?t.now():(new t).getTime()}function St(t){var n={};return Pt(t,function(t,e){if(n[t]=e,!It(n[e]))throw Error("["+e+"] exists for "+t);n[e]=t}),kt(n)}var Mt="window",Ot="console",Lt="JSON",Ft=null,Bt=null;function l(t){var e=j();return e&&e[t]?e[t]:t===Mt&&Ut()?window:null}function Ut(){return!(typeof window!==o||!window)}function Rt(){return Ut()?window:l(Mt)}function jt(){return typeof document===o&&document?document:l("document")}function Vt(){return typeof location===o&&location?location:l("location")}function Ht(){return typeof JSON===o&&JSON||null!==l(Lt)}function zt(){return Ht()?JSON||l(Lt):null}function Kt(t){var e=Object[a].toString.call(t),n=g;return"[object Error]"===e?n="{ stack: '"+t.stack+"', message: '"+t.message+"', name: '"+t.name+"'":Ht()&&(n=zt().stringify(t)),e+n}var qt=null;function Wt(t){return t?'"'+t.replace(/\"/g,g)+'"':g}function Jt(t,e){var n,a=typeof console!==r?console:l(Ot);a&&(n="log",b(a[n=a[t]?t:n])&&a[n](e))}Xt.dataType="MessageData";var Gt=Xt;function Xt(t,e,n,a){void 0===n&&(n=!1),this.messageId=t,this.message=(n?"AI: ":"AI (Internal): ")+t;n=g,Ht()&&(n=zt().stringify(a)),t=(e?" message:"+Wt(e):g)+(a?" props:"+Wt(n):g);this.message+=t}var Yt=function Ke(r){this.identifier="DiagnosticLogger",this.queue=[];var c=0,u={};st(Ke,this,function(i){function t(t,e){t=r[t];return x(t)?e:t}function o(t,e){var n,a=(n=(n=qt)||!0===r.disableDbgExt?n:qt||(a=l("Microsoft"),qt=a?a.ApplicationInsights:qt))?n.ChromeDbgExt:null;a&&a.diagLog&&a.diagLog(t,e)}x(r)&&(r={}),i.consoleLoggingLevel=function(){return t("loggingLevelConsole",0)},i.telemetryLoggingLevel=function(){return t("loggingLevelTelemetry",1)},i.maxInternalMessageLimit=function(){return t("maxMessageLimit",25)},i.enableDebugExceptions=function(){return t("enableDebugExceptions",!1)},i.throwInternal=function(t,e,n,a,r){e=new Gt(e,n,r=void 0!==r&&r,a);if(i.enableDebugExceptions())throw e;n=1===t?"errorToConsole":"warnToConsole";It(e.message)?o("throw"+(1===t?"Critical":"Warning"),e):(a=i.consoleLoggingLevel(),r?(r=+e.messageId,!u[r]&&t<=a&&(i[n](e.message),u[r]=!0)):t<=a&&i[n](e.message),i.logInternalMessage(t,e))},i.warnToConsole=function(t){Jt("warn",t),o("warning",t)},i.errorToConsole=function(t){Jt("error",t),o("error",t)},i.resetInternalMessageCount=function(){c=0,u={}},i.logInternalMessage=function(t,e){var n,a;c>=i.maxInternalMessageLimit()||(a=!0,n="AITR_"+e.messageId,u[n]?a=!1:u[n]=!0,a&&(t<=i.telemetryLoggingLevel()&&(i.queue.push(e),c++,o(1===t?"error":"warn",e)),c===i.maxInternalMessageLimit()&&(a=new Gt(23,n="Internal events throttle limit per PageView reached for this app.",!1),i.queue.push(a),1===t?i.errorToConsole(n):i.warnToConsole(n))))}})};function $t(t,e,n,a,r,i){void 0===i&&(i=!1),(t||new Yt).throwInternal(e,n,a,r,i)}f.ParentContextKey="parent",f.ChildrenContextKey="childEvts";var Qt=f;function f(t,r,e){var a,i=this,o=!1;i.start=Et(),i.name=t,i.isAsync=e,i.isChildEvt=function(){return!1},b(r)&&(o=function(t){if(ht)try{var e={enumerable:!0,configurable:!0,get:function(){return!a&&b(r)&&(a=r(),r=null),a}};return ht(t,"payload",e),!0}catch(n){}return!1}(i)),i.getCtx=function(t){return t?(t===f.ParentContextKey||t===f.ChildrenContextKey?i:i.ctx||{})[t]:null},i.setCtx=function(t,e){t&&(t===f.ParentContextKey?(i[t]||(i.isChildEvt=function(){return!0}),i[t]=e):t===f.ChildrenContextKey?i[t]=e:(i.ctx=i.ctx||{})[t]=e)},i.complete=function(){var t=0,e=i.getCtx(f.ChildrenContextKey);if(I(e))for(var n=0;n<e.length;n++){var a=e[n];a&&(t+=a.time)}i.time=Et()-i.start,i.exTime=i.time-t,i.complete=function(){},!o&&b(r)&&(i.payload=r())}}var Zt="CoreUtils.doPerf";function te(t,e,n,a,r){if(t)if(t=b(t.getPerfMgr)?t.getPerfMgr():t){var i,o=void 0,c=t.getCtx(Zt);try{if(o=t.create(e(),a,r))return c&&o.setCtx&&(o.setCtx(Qt.ParentContextKey,c),c.getCtx&&c.setCtx&&((i=c.getCtx(Qt.ChildrenContextKey))||(i=[],c.setCtx(Qt.ChildrenContextKey,i)),i.push(o))),t.setCtx(Zt,o),n(o)}catch(u){o&&o.setCtx&&o.setCtx("exception",u)}finally{o&&t.fire(o),t.setCtx(Zt,c)}}n()}var ee=4294967296,A=4294967295,ne=!1,ae=123456789,re=987654321;function ie(t){var e,n=0,a=l("crypto")||l("msCrypto");if(0===(n=a&&a.getRandomValues?a.getRandomValues(new Uint32Array(1))[0]&A:n)&&(!(a=typeof navigator===o&&navigator?navigator:l("navigator"))||a.userAgent===Bt&&null!==Ft||(a=((Bt=a.userAgent)||g).toLowerCase(),Ft=wt(a,"msie")||wt(a,"trident/")),Ft)){if(!ne)try{var r=2147483647&Et();(e=(Math.random()*ee^r)+r)<0&&(e>>>=0),ae=123456789+e&A,re=987654321-e&A,ne=!0}catch(i){}a=((re=36969*(65535&re)+(re>>16)&A)<<16)+(65535&(ae=18e3*(65535&ae)+(ae>>16)&A))>>>0&A|0,n=(a>>>=0)&A}return 0===n&&(n=Math.floor(ee*Math.random()|0)),t||(n>>>=0),n}var oe=i,ce="2.7.3",ue="."+function(t){void 0===t&&(t=22);for(var e=ie()>>>0,n=0,a=g;a.length<t;)a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[0|63&e]||"",e>>>=6,5==++n&&(e=(ie()<<2&4294967295|3&e)>>>0,n=0);return a}(6),se=0;function le(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType}function fe(t,e){return At(t+se+++((e=void 0!==e&&e)?"."+ce:"")+ue)}function ge(t){var i={id:fe("_aiData-"+(t||"")+"."+ce),accept:le,get:function(t,e,n,a){var r=t[i.id];return r?r[At(e)]:(a&&((r=function(t,e){var n=e[t.id];if(!n){n={};try{le(e)&&!function(t,e,n){if(oe)try{return oe(t,e,{value:n,enumerable:!1,configurable:!0}),1}catch(a){}}(e,t.id,n)&&(e[t.id]=n)}catch(a){}}return n}(i,t))[At(e)]=n),n)},kill:function(t,e){if(t&&t[e])try{delete t[e]}catch(n){}}};return i}var pe=ge("plugin");function de(t){return pe.get(t,"state",{},!0)}var he="TelemetryPluginChain",ve="_hasRun",me="_getTelCtx",ye=0;function Te(t,o,n,e){var a=null,r=[],i=(null!==e&&(a=e?function(t,e,n,a){for(;t;){if(t.getPlugin()===a)return t;t=t.getNext()}return Ce([a],e,n)}(t,o,n,e):t),{_next:function(){var t,e=a;return a=e?e.getNext():null,e||(t=r)&&0<t.length&&(N(t,function(t){try{t.func.call(t.self,t.args)}catch(e){$t(n.logger,2,73,"Unexpected Exception during onComplete - "+Kt(e))}}),r=[]),e},ctx:{core:function(){return n},diagLog:function(){return(n||{}).logger||new Yt(o)},getCfg:function(){return o},getExtCfg:c,getConfig:function(t,e,n){void 0===n&&(n=!1);var a,t=c(t,null);return t&&!x(t[e])?a=t[e]:o&&!x(o[e])&&(a=o[e]),x(a)?n:a},hasNext:function(){return!!a},getNext:function(){return a},setNext:function(t){a=t},iterate:function(t){for(;e=i._next();){var e=e.getPlugin();e&&t(e)}},onComplete:function(t,e){for(var n=[],a=2;a<arguments.length;a++)n[a-2]=arguments[a];t&&r.push({func:t,self:It(e)?i.ctx:e,args:n})}}});function c(t,e,n){var a,r,i;return void 0===e&&(e={}),void 0===n&&(n=0),(a=o&&(r=o.extensionConfig)&&t?r[t]:a)?Nt(e)&&0!==n&&(i=function g(){var t=arguments,e=t[0]||{},n=t.length,a=!1,r=1;for(0<n&&"boolean"==typeof e&&(a=e,e=t[r]||{},r++),Nt(e)||(e={});r<n;r++){var i,o,c,u,s=t[r],l=I(s),f=Nt(s);for(i in s)(l&&i in s||f&&p.call(s,i))&&(o=s[i],c=void 0,a&&o&&((c=I(o))||Dt(o))&&(u=e[i],c?I(u)||(u=[]):Dt(u)||(u={}),o=g(a,u,o)),o!==undefined&&(e[i]=o))}return e}(!0,e,a),o&&2===n&&Pt(e,function(t){var e;x(i[t])&&!x(e=o[t])&&(i[t]=e)})):a=e,a}return i}function _e(t,n,a,e){var r=Te(t,n,a,e),i=r.ctx;return i.processNext=function(t){var e=r._next();return e&&e.processTelemetry(t,i),!e},i.createNew=function(t,e){return _e((t=I(t=void 0===t?null:t)?Ce(t,n,a,e):t)||i.getNext(),n,a,e)},i}function Ce(t,e,n,a){var r,i=null,o=!a;return I(t)&&0<t.length&&(r=null,N(t,function(t){(o=!o&&a===t||o)&&t&&b(t.processTelemetry)&&(t=xe(t,e,n),i=i||t,r&&r._setNext(t),r=t)})),a&&!i?Ce([a],e,n):i}function xe(u,a,r){var s=null,i=b(u.processTelemetry),o=b(u.setNextPlugin),l=u?u.identifier+"-"+u.priority+"-"+ye++:"Unknown-0-"+ye++,c={getPlugin:function(){return u},getNext:function(){return s},processTelemetry:function(n,t){var e;f(t=t||(e=(e=u&&b(u[me])?u[me]():e)||_e(c,a,r)),function(t){if(!u||!i)return!1;var e=de(u);return!e[_]&&!e[gt]&&(o&&u.setNextPlugin(s),u.processTelemetry(n,t),!0)},"processTelemetry",function(){return{item:n}},!n.sync)||t.processNext(n)},unload:function(a,r){f(a,function(){var t,e,n=!1;return u&&(t=de(u),e=u[C]||t.core,!u||e&&e!==a[C]()||t[_]||(t[C]=null,t[_]=!0,t[lt]=!1,u[_]&&!0===u[_](a,r)&&(n=!0))),n},"unload",function(){},r.isAsync)||a.processNext(r)},update:function(a,r){f(a,function(){var t,e,n=!1;return u&&(t=de(u),e=u[C]||t.core,!u||e&&e!==a[C]()||t[_]||u[ft]&&!0===u[ft](a,r)&&(n=!0)),n},"update",function(){},!1)||a.processNext(r)},_id:l,_setNext:function(t){s=t}};function f(n,a,r,t,e){var i=!1,o=u?u.identifier:he,c=(c=n[ve])||(n[ve]={});return n.setNext(s),u&&te(n[C](),function(){return o+":"+r},function(){c[l]=!0;try{var t=s?s._id:g;t&&(c[t]=!1),i=a(n)}catch(e){t=!s||c[s._id];t&&(i=!0),s&&t||$t(n.diagLog(),1,73,"Plugin ["+u.identifier+"] failed during "+r+" - "+Kt(e)+", run flags: "+Kt(c))}},t,e),i}return kt(c)}function be(){var e=[];return{add:function(t){t&&e.push(t)},run:function(n,a){N(e,function(t){try{t(n,a)}catch(e){$t(n.diagLog(),2,73,"Unexpected error calling unload handler - "+Kt(e))}}),e=[]}}}var P="getPlugin",u=function qe(){var i,o,s,l,f,c=this;function e(t){var e,t=t=void 0===t?null:t;return t||(e=o||_e(null,{},c.core),t=s&&s[P]?e.createNew(null,s[P]):e.createNew(null,s)),t}function g(t,e,n){t&&(i="extensionConfig",r=a=[],t&&(r=t[i])!==a&&x(r)&&(t[i]=r=a)),!n&&e&&(n=e.getProcessTelContext().getNext());var a,r,i=s;s&&s[P]&&(i=s[P]()),c.core=e,o=_e(n,t,e,i)}function p(){i=!1,c.core=null,s=o=null,f=[],l=be()}p(),st(qe,c,function(u){var t,e,n,a,r;u.initialize=function(t,e,n,a){g(t,e,a),i=!0},u.teardown=function(t,e){var n,a,r,i;if(u.core&&(!t||u.core===t.core()))return a=!1,r=t||function c(t,n,a,e){var r=Te(t,n,a,e),i=r.ctx;return i.processNext=function(t){var e=r._next();return e&&e.unload(i,t),!e},i.createNew=function(t,e){return c((t=I(t=void 0===t?null:t)?Ce(t,n,a,e):t)||i.getNext(),n,a,e)},i}(null,{},u.core,s&&s[P]?s[P]():s),i=e||{reason:0,isAsync:!1},u[pt]&&!0===u[pt](r,i,o)?n=!0:o(),n;function o(){a||(a=!0,l.run(r,e),N(f,function(t){t.rm()}),f=[],!0===n&&r.processNext(i),p())}},u.update=function(t,e){var n,a,r;if(u.core&&(!t||u.core===t.core()))return a=!1,r=t||function o(t,n,a,e){var r=Te(t,n,a,e).ctx;return r.processNext=function(e){return r.iterate(function(t){b(t[ft])&&t[ft](r,e)})},r.createNew=function(t,e){return o((t=I(t=void 0===t?null:t)?Ce(t,n,a,e):t)||r.getNext(),n,a,e)},r}(null,{},u.core,s&&s[P]?s[P]():s),u._doUpdate&&!0===u._doUpdate(r,e||{reason:0},i)?n=!0:i(),n;function i(){a||(a=!0,g(r.getCfg(),r.core(),r.getNext()))}},u._addHook=function(t){t&&(I(t)?f=f.concat(t):f.push(t))},t="_addUnloadCb",e=function(){return l},void 0===n&&(n=!0),u&&e&&(n||It(u[t]))&&(u[t]=(r=a=null,b(n=e)?a=n:r=n,function(){var t=arguments;if(r=a?a():r)return r.add.apply(r,t)}))}),c.diagLog=function(t){return e(t).diagLog()},c[lt]=function(){return i},c.setInitialized=function(t){i=t},c.setNextPlugin=function(t){s=t},c.processNext=function(t,e){e?e.processNext(t):s&&b(s.processTelemetry)&&s.processTelemetry(t,null)},c._getTelCtx=e},Ie="attachEvent",Ne="addEventListener",Ae=(fe("aiEvtPageHide"),fe("aiEvtPageShow"),1),Pe=ge("events"),we=/^([^.]*)(?:\.(.+)|)/;function De(t){return t&&t.replace?t.replace(/^\s*\.*|\.*\s*$/g,""):t}function ke(t,e,n,a){var r,i,o,c,u,s,l,a=a=void 0!==a&&a;if(void 0===a&&(a=!1),t)try{u=e,null&&(s="",I(null)?(s="",N(null,function(t){(t=De(t))&&("."!==t[0]&&(t="."+t),s+=t)})):s=null,s&&(u=(u||"")+(s="."!==s[0]?"."+s:s)));var f,g={type:(l=we.exec(u)||[])[1],ns:(l[2]||"").split(".").sort().join(".")},p=g,d=n,h=a,v=!1;(c=t)&&p&&p.type&&d&&(c[Ne]?(c[Ne](p.type,d,h),v=!0):c[Ie]&&(c[Ie]("on"+p.type,d),v=!0)),v&&Pe.accept(t)&&(f={guid:Ae++,evtName:g,handler:n,capture:a},r=g.type,((o=Pe.get(t,"events",{},i=void 0===i||i))[r]||(o[r]=[])).push(f))}catch(m){}}var w=St({CRITICAL:1,WARNING:2}),s=St({BrowserDoesNotSupportLocalStorage:0,BrowserCannotReadLocalStorage:1,BrowserCannotReadSessionStorage:2,BrowserCannotWriteLocalStorage:3,BrowserCannotWriteSessionStorage:4,BrowserFailedRemovalFromLocalStorage:5,BrowserFailedRemovalFromSessionStorage:6,CannotSendEmptyTelemetry:7,ClientPerformanceMathError:8,ErrorParsingAISessionCookie:9,ErrorPVCalc:10,ExceptionWhileLoggingError:11,FailedAddingTelemetryToBuffer:12,FailedMonitorAjaxAbort:13,FailedMonitorAjaxDur:14,FailedMonitorAjaxOpen:15,FailedMonitorAjaxRSC:16,FailedMonitorAjaxSend:17,FailedMonitorAjaxGetCorrelationHeader:18,FailedToAddHandlerForOnBeforeUnload:19,FailedToSendQueuedTelemetry:20,FailedToReportDataLoss:21,FlushFailed:22,MessageLimitPerPVExceeded:23,MissingRequiredFieldSpecification:24,NavigationTimingNotSupported:25,OnError:26,SessionRenewalDateIsZero:27,SenderNotInitialized:28,StartTrackEventFailed:29,StopTrackEventFailed:30,StartTrackFailed:31,StopTrackFailed:32,TelemetrySampledAndNotSent:33,TrackEventFailed:34,TrackExceptionFailed:35,TrackMetricFailed:36,TrackPVFailed:37,TrackPVFailedCalc:38,TrackTraceFailed:39,TransmissionFailed:40,FailedToSetStorageBuffer:41,FailedToRestoreStorageBuffer:42,InvalidBackendResponse:43,FailedToFixDepricatedValues:44,InvalidDurationValue:45,TelemetryEnvelopeInvalid:46,CreateEnvelopeError:47,CannotSerializeObject:48,CannotSerializeObjectNonSerializable:49,CircularReferenceDetected:50,ClearAuthContextFailed:51,ExceptionTruncated:52,IllegalCharsInName:53,ItemNotInArray:54,MaxAjaxPerPVExceeded:55,MessageTruncated:56,NameTooLong:57,SampleRateOutOfRange:58,SetAuthContextFailed:59,SetAuthContextFailedAccountName:60,StringValueTooLong:61,StartCalledMoreThanOnce:62,StopCalledWithoutStart:63,TelemetryInitializerFailed:64,TrackArgumentsNotSpecified:65,UrlTooLong:66,SessionStorageBufferFull:67,CannotAccessCookie:68,IdTooLong:69,InvalidEvent:70,FailedMonitorAjaxSetRequestHeader:71,SendBrowserInfoOnUserInit:72,PluginException:73,NotificationException:74,SnippetScriptLoadFailure:99,InvalidInstrumentationKey:100,CannotParseAiBlobValue:101,InvalidContentBlob:102,TrackPageActionEventFailed:103,FailedAddingCustomDefinedRequestContext:104,InMemoryStorageBufferFull:105}),Ee="not_specified",D=e(e({},s),{CannotParseAiBlobValue:101,InvalidContentBlob:102,TrackPageActionEventFailed:103});function Se(t){for(var e in t)k(t[e])&&("{}"!==JSON.stringify(t[e])||"callback"===e)||delete t[e]}function k(t){return!(x(t)||""===t)}function Me(t,e){return k(t.getAttribute(e))}function Oe(t,e,n){var a=t;if(a){for(;!e(a,n);)if(!(a=a.parentNode)||!a.getAttribute)return null;return a}}function Le(t){return"A"===t.nodeName}function E(){var t={},e=!1,n=0,a=arguments.length,r=Object.prototype,i=arguments;for("[object Boolean]"===r.toString.call(i[0])&&(e=i[0],n++);n<a;n++){o=void 0;var o,c,u,s=i[n];for(o in s)u=o,(c=s)&&p.call(c,u)&&(e&&"[object Object]"===r.toString.call(s[o])?t[o]=E(!0,t[o],s[o]):t[o]=s[o])}return t}var Fe={BUTTON:!0,CHECKBOX:!0,RADIO:!0,RESET:!0,SUBMIT:!0};function S(t,e,n,a,r,i){this._clickAnalyticsPlugin=t,this._config=e,this._contentHandler=n,this._pageTagsCallback=a,this._metaTags=r,this._traceLogger=i,this._pageTags={}}S.prototype.setBasicProperties=function(t,e){var n;k(t.name)||(t.pageName=(n=this._config,e&&e.pageName?e.pageName:n.callback&&b(n.callback.pageName)?n.callback.pageName():n.coreData&&n.coreData.pageName?n.coreData.pageName:(e=jt())&&e.title||"")),!k(t.uri)&&Ut&&(t.uri=(n=this._config,e=Vt(),n.coreData&&n.coreData.requestUri&&""!==n.coreData.requestUri?n.coreData.requestUri:e?e.protocol+"//"+(e.hostname||e.host)+(k(e.port)?":"+e.port:"")+e.pathname:null))},S.prototype.setCommonProperties=function(t,e){this.setBasicProperties(t,e),this._setPageTags(t,e),this._pageTypeMetaTag=this._getMetaData(this._metaTags,this._config.coreData,"pageType"),this._behaviorMetaTag=this._getMetaData(this._metaTags,this._config.coreData,"behavior"),k(e.pageType)&&(t.pageType=e.pageType),k(this._pageTypeMetaTag)&&!k(t.pageType)&&(t.pageType=this._pageTypeMetaTag)},S.prototype._setPageTags=function(t,e){if(this._pageTagsCallback&&(this._pageTags=E(!0,this._pageTags,this._pageTagsCallback())),k(e.pageTags)&&(this._pageTags=E(!0,this._pageTags,e.pageTags)),this._metaTags)for(var n in this._pageTags.metaTags={},this._metaTags)"behavior"!=n&&"market"!=n&&"pageType"!=n&&(this._pageTags.metaTags[n]=this._metaTags[n]);t.properties=t.properties||{},t.properties.pageTags=this._pageTags},S.prototype._getBehavior=function(t){var e;return t&&k(t.behavior)?e=t.behavior:k(this._behaviorMetaTag)&&(e=this._behaviorMetaTag),this._getValidBehavior(e)},S.prototype._getValidBehavior=function(t){return this._config.behaviorValidator(t)},S.prototype._getMetaData=function(t,e,n){return e&&e[n]?e[n]:t?t[n]:""},z(M,Be=S),M.prototype.trackPageAction=function(t,e){var n=this,a={name:"Microsoft.ApplicationInsights.{0}.Event",baseType:"EventData",ext:{web:{}},data:{},baseData:{}};this._populateEventDataIfPresent(a.baseData,"name",t.name),this._populateEventDataIfPresent(a.data,"baseTypeSource","ClickEvent"),this._populateEventDataIfPresent(a.data,"uri",t.uri),this._populateEventDataIfPresent(a.data,"pageType",t.pageType),this._populateEventDataIfPresent(a.data,"properties",t.properties),this._populateEventDataIfPresent(a.data,"actionType",t.actionType),this._populateEventDataIfPresent(a.data,"behavior",t.behavior),this._populateEventDataIfPresent(a.data,"clickCoordinates",t.clickCoordinates),this._populateEventDataIfPresent(a.data,"content",t.content),this._populateEventDataIfPresent(a.data,"targetUri",t.targetUri),this._populateEventDataIfPresent(a.data,"timeToAction",t.timeToAction),this._populateEventDataIfPresent(a.data,"refUri",t.refUri),this._populateEventDataIfPresent(a.data,"pageName",t.pageName),this._populateEventDataIfPresent(a.data,"parentId",t.parentId),e&&Pt(e,function(t,e){a.data[t]||n._populateEventDataIfPresent(a.data,t,e)}),this._clickAnalyticsPlugin.core.track(a)},M.prototype.capturePageAction=function(t,e,n,a){e=k(e)?e:{};var r,i={name:""},n=k(n)?n:{},o=(this.setCommonProperties(i,e),i.behavior=this._getBehavior(e),{});a&&(i.behavior=this._config.defaultRightClickBhvr),t&&(i.targetUri=function(e){var t="";switch(e.tagName){case"A":case"AREA":t=e.href||"";break;case"IMG":t=function(){if(e){var t=Oe(e,Le);if(1===t.length){t=t[0];if(t.href)return t.href;if(t.src)return t.src}}return""}();break;case"INPUT":var n=e.type;n&&Fe[n.toUpperCase()]&&(n=Vt()||{},t=e.form?e.form.action||n.pathname||"":n.pathname||"")}return t}(t),(o=this._contentHandler.getElementContent(t)).bhvr&&!k(e.behavior)&&(a="bhvr",(t=o)&&t[a]&&(r=t[a],delete t[a]),a=r,i.behavior=this._getValidBehavior(a)),k(o.id)||k(o.contentName)||this._traceLogger.throwInternal(w.WARNING,D.InvalidContentBlob,"Missing attributes id or contentName in click event. Click event information will still be collected!")),i.name=o.id||o.contentName||Ee,i.parentId=o.parentid||o.parentName||Ee,k(e.actionType)&&(i.actionType=e.actionType),k(e.clickCoordinateX)&&k(e.clickCoordinateY)&&(i.clickCoordinates=e.clickCoordinateX+"X"+e.clickCoordinateY),this._sanitizePageActionEventContent(o),i.content="["+JSON.stringify(E(o,e&&e.contentTags?e.contentTags:{}))+"]",i.timeToAction=this._getTimeToClick(),i.refUri=k(e.refUri)?e.refUri:this._config.coreData.referrerUri,this._isUndefinedEvent(i)||this.trackPageAction(i,n)},M.prototype._getTimeToClick=function(){var t=l("performance");if(t&&t.timing){t=t.timing.navigationStart;if(t&&0!==t)return(new Date).getTime()-t}return-1},M.prototype._populateEventDataIfPresent=function(t,e,n){k(n)&&(t[e]=n)},M.prototype._sanitizePageActionEventContent=function(t){t&&(delete t.id,delete t.parentid,delete t.parentname,this._config&&this._config.dataTags&&k(this._config.dataTags.parentDataTag)&&delete t[this._config.dataTags.parentDataTag])},M.prototype._isUndefinedEvent=function(t){return!(!this._config.dropInvalidEvents||t.name!==Ee||t.parentId!==Ee||"[{}]"!==t.content)};var Be,Ue=M;function M(){return null!==Be&&Be.apply(this,arguments)||this}var Re={BUTTON:!0,CHECKBOX:!0,RADIO:!0,RESET:!0,SUBMIT:!0},je=(Ve.prototype.click=function(){var e=this,t=Rt(),n=jt();t?(ke(t,~navigator.appVersion.indexOf("MSIE")?"click":"mousedown",function(t){e._processClick(t)}),ke(t,"keyup",function(t){e._processClick(t)})):n&&(ke(n,"click",function(t){e._processClick(t)}),ke(n,"keyup",function(t){e._processClick(t)}))},Ve.prototype.capturePageAction=function(t,e,n,a){k(Oe(t,Me,this._config.dataTags.customDataPrefix+this._config.dataTags.dntDataTag))||this._pageAction.capturePageAction(t,e,n,a)},Ve.prototype._processClick=function(t){var e={A:!0,BUTTON:!0,AREA:!0,INPUT:!0},n=Rt();if(t=x(t)&&n?n.event:t){var a=t.srcElement||t.target,r={clickCoordinateX:t.pageX,clickCoordinateY:t.pageY},i=function(t){try{if("which"in t)return 3===t.which;if("button"in t)return 2===t.button}catch(e){}}(t);if(i)r.actionType="CR";else if(function(t){try{if("which"in t)return 1===t.which;if("button"in t)return 1===t.button}catch(e){}}(t))r.actionType="CL";else if(function(t){try{if("keyCode"in t)return 13===t.keyCode}catch(e){}}(t))r.actionType="KE";else if(function(t){try{if("keyCode"in t)return 32===t.keyCode}catch(e){}}(t))r.actionType="KS";else{if(!function(t){try{if("which"in t)return 2===t.which;if("button"in t)return 4===t.button}catch(e){}}(t))return;r.actionType="CM"}for(;a&&a.tagName;){var o=(a=a.control&&e[a.control.tagName.toUpperCase()]?a.control:a).tagName.toUpperCase();if(e[o]){"INPUT"==o&&!Re[a.type.toUpperCase()]||this.capturePageAction(a,r,{},i);break}a=a.parentElement||a.parentNode}}},Ve);function Ve(t,e,n,a){this._analyticsPlugin=t,this._config=e,this._pageAction=n,this._traceLogger=a}O.prototype.getMetadata=function(){return k(this._config.dataTags.metaDataPrefix)?this._getMetaDataFromDOM(this._config.dataTags.captureAllMetaDataContent,this._config.dataTags.metaDataPrefix,!1):this._getMetaDataFromDOM(this._config.dataTags.captureAllMetaDataContent,"",!1)},O.prototype.getElementContent=function(t){if(!t)return{};var e,n,a={},r=this._config.dataTags.customDataPrefix,i=r+this._config.dataTags.aiBlobAttributeTag;if(k(this._config.dataTags.parentDataTag)&&(n=r+this._config.dataTags.parentDataTag),this._isTracked(t,r,i))a=E(a,this._populateElementContentwithDataTag(t,r,n,i));else if(e=t.getAttribute(i))try{a=JSON.parse(e)}catch(o){this._traceLogger.throwInternal(w.CRITICAL,D.CannotParseAiBlobValue,"Can not parse "+e)}else a=E(a,this._populateElementContent(t,r,n,i));return Se(a),n?E(a,this._getParentDetails(t,a,r,i)):a},O.prototype._captureElementContentWithDataTag=function(t,e,n){for(var a,r=0;r<t.attributes.length;r++)(a=t.attributes[r]).name.indexOf(n)||(e[a.name.replace(n,"")]=a.value)},O.prototype._walkUpDomChainCaptureData=function(t,e,n,a,r){for(var i=t,o=!1,c=!1;!x(i)&&!x(i.attributes);){for(var u=i.attributes,s=0;s<u.length;s++){var l,f=u[s];f.name.indexOf(n)||(f.name.indexOf(a)||(o=!0),f.name.indexOf(r)&&(l=f.name.replace(n,""),c&&"id"===l||k(e[l])||(e[l]=f.value)))}if(o)break;c=!0,i=i.parentNode}},O.prototype._populateElementContent=function(t,e,n,a){var r={};if(!t)return r;var i=this._getHtmlIdAndContentName(t),r={id:i.id||"",contentName:i.contentName||""};return k(n)&&this._walkUpDomChainCaptureData(t,r,e,n,a),r.id||r.contentName||this._traceLogger.throwInternal(w.WARNING,D.InvalidContentBlob,"Invalid content blob. Missing required attributes (id, contentName. Content information will still be collected!"),r},O.prototype._populateElementContentwithDataTag=function(t,e,n,a){var r={};if(!t)return r;var i=this._getHtmlIdAndContentName(t);return k(n)?this._walkUpDomChainCaptureData(t,r,e,n,a):this._captureElementContentWithDataTag(t,r,e),this._config.dataTags.useDefaultContentNameOrId&&(k(r.id)||(r.id=i.id||""),r.contentName=i.contentName||""),r.id||r.contentName||this._traceLogger.throwInternal(w.WARNING,D.InvalidContentBlob,"Invalid content blob. Missing required attributes (id, contentName. Content information will still be collected!"),r},O.prototype._getMetaDataFromDOM=function(t,e,n){for(var a={},r=document.querySelectorAll("meta"),i=0;i<r.length;i++){var o=r[i];!o.name||!t&&o.name.indexOf(e)||(a[n?o.name.replace(e,""):o.name]=o.content)}return a},O.prototype._getDefaultContentName=function(t,e){if(!1===e||!t.tagName)return"";var n,a=jt()||{};switch(t.tagName){case"A":n=a.all?t.innerText||t.innerHTML:t.text||t.innerHTML;break;case"IMG":case"AREA":n=t.alt;break;default:n=t.value||t.name||t.alt||t.innerText||t.id}return n.substring(0,200)},O.prototype._isTracked=function(t,e,n){for(var a=t.attributes,r=!1,i=0;i<a.length;i++){var o=a[i].name;if(o===n)return!1;o.indexOf(e)||(r=!0)}return r},O.prototype._getHtmlIdAndContentName=function(t){var e,n,a={};return t&&this._config.dataTags.useDefaultContentNameOrId&&(e=this._config.callback.contentName?this._config.callback.contentName(t,this._config.dataTags.useDefaultContentNameOrId):"",n=this._getDefaultContentName(t,this._config.dataTags.useDefaultContentNameOrId),a={id:t.id,contentName:e||n||t.getAttribute("alt")}),a},O.prototype._getParentDetails=function(t,e,n,a){var r=e.parentid,e=e.parentname;return r||e||!t?{}:this._populateParentInfo(t,n,a)},O.prototype._populateParentInfo=function(t,e,n){var a,r={},i=Oe(t.parentElement,this._isTracked,e);if(i){var n=i.getAttribute(n)||t[n];if(n){try{var o=JSON.parse(n)}catch(c){this._traceLogger.throwInternal(w.CRITICAL,D.CannotParseAiBlobValue,"Can not parse "+n)}o&&(a=o.id)}else a=i.getAttribute(e+"id")}return a?r.parentid=a:(n=this._getHtmlIdAndContentName(t.parentElement),r.parentid=n.id,r.parentname=n.contentName),r};var He=O;function O(t,e){this._config=t,this._traceLogger=e}z(L,ze=u),L.prototype.initialize=function(t,e,n,a){if(x(e))throw Error("Error initializing");t.extensionConfig=t.extensionConfig||[],t.extensionConfig[this.identifier]=t.extensionConfig[this.identifier]||{},this._config=function(t){var e,n,a={autoCapture:!0,callback:{pageActionPageTags:null},pageTags:{},coreData:{referrerUri:document.referrer,requestUri:"",pageName:"",pageType:""},dataTags:{useDefaultContentNameOrId:!1,aiBlobAttributeTag:"ai-blob",customDataPrefix:"data-",captureAllMetaDataContent:!1,dntDataTag:"ai-dnt"},behaviorValidator:function(t){return t||""},defaultRightClickBhvr:"",dropInvalidEvents:!1},r=[];for(e in a)"object"==typeof a[e]&&r.push(e);if(t){var i,o,c=t,u=r;for(i in Se(c),u)u.hasOwnProperty(i)&&("object"==typeof c[o=u[i]]?Se(c[o]):delete c[o]);return k(t.dataTags)&&(t.dataTags.customDataPrefix=k((n=t).dataTags.customDataPrefix)&&!n.dataTags.customDataPrefix.indexOf("data-")?t.dataTags.customDataPrefix:"data-"),E(!0,a,t)}}(t.extensionConfig[this.identifier]),ze.prototype.initialize.call(this,t,e,n,a),this._contentHandler=this._contentHandler||new He(this._config,this.diagLog());var r,t=this._contentHandler.getMetadata();this.pageAction=new Ue(this,this._config,this._contentHandler,this._config.callback.pageActionPageTags,t,this.diagLog()),this._autoCaptureHandler=this._autoCaptureHandler||new je(this,this._config,this.pageAction,this.diagLog()),this._config.autoCapture&&this._autoCaptureHandler.click(),N(n,function(t){"AppInsightsPropertiesPlugin"===t.identifier&&(r=t)}),r&&r.context&&r.context.internal&&r.context.internal.sdkVersion&&(r.context.internal.sdkVersion+="_ClickPlugin"+L.Version)},L.prototype.processTelemetry=function(t,e){this.processNext(t,e)},L.prototype.trackPageAction=function(t,e){try{this.pageAction.trackPageAction(t,e)}catch(n){this.diagLog().throwInternal(w.CRITICAL,D.TrackPageActionEventFailed,"trackPageAction failed, page action event will not be collected: "+((t=n)&&"[object Error]"===mt.call(t)?t.name:g),{exception:Kt(n)})}},L.Version="2.8.0-beta.2203-06";var ze,vt=L;function L(){var t=null!==ze&&ze.apply(this,arguments)||this;return t.identifier="ClickAnalyticsPlugin",t.priority=181,t}t.BehaviorEnumValidator=function(e){return function(t){return e[t]||""}},t.BehaviorMapValidator=function(e){return function(t){return e[t]||""}},t.BehaviorValueValidator=function(t){return function(e){var n;return N(t,function(t){if(t===e)return n=t,-1}),n||""}},t.ClickAnalyticsPlugin=vt;i=t,s="__esModule",e={value:!0},u=Object.defineProperty;if(u)try{return void u(i,s,e)}catch(We){}typeof e.value!==undefined&&(i[s]=e.value)};"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).Microsoft=t.Microsoft||{},t.Microsoft.ApplicationInsights=t.Microsoft.ApplicationInsights||{}));
|
|
5
|
+
var t=this,e=function(t){"use strict";var F="function",o="object",r="undefined",a="prototype",B="hasOwnProperty",n=Object,U=n[a],e=n.assign,R=n.create,i=n.defineProperty,p=U[B],c=null;function j(t){return void 0===t&&(t=!0),c&&t||(typeof globalThis!==r&&globalThis&&(c=globalThis),typeof self!==r&&self&&(c=self),typeof window!==r&&window&&(c=window),typeof global!==r&&global&&(c=global)),c}function V(t){throw new TypeError(t)}(j()||{}).Symbol,(j()||{}).Reflect;var e=e||function(t){for(var e,n=1,a=arguments.length;n<a;n++)for(var r in e=arguments[n])U[B].call(e,r)&&(t[r]=e[r]);return t},H=function(t,e){return(H=n.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e[B](n)&&(t[n]=e[n])})(t,e)};function z(t,e){function n(){this.constructor=t}typeof e!==F&&null!==e&&V("Class extends value "+e+" is not a constructor or null"),H(t,e),t[a]=null===e?function(t){if(R)return R(t);if(null==t)return{};var e=typeof t;function n(){}return e!==o&&e!==F&&V("Object prototype may only be an Object:"+t),n[a]=t,new n}(e):(n[a]=e[a],new n)}var K="constructor",d="prototype",q="function",W="_dynInstFuncs",J="_isDynProxy",h="_dynClass",G="_dynInstChk",v=G,X="_dfOpts",Y="_unknown_",$="__proto__",Q="useBaseInst",Z="setInstFuncs",tt=Object,m=tt.getPrototypeOf,et=0;function y(t,e){return t&&tt[d].hasOwnProperty.call(t,e)}function nt(t){return t&&(t===tt[d]||t===Array[d])}function at(t){return nt(t)||t===Function[d]}function T(t){if(t){if(m)return m(t);t=t[$]||t[d]||(t[K]?t[K][d]:null);if(t)return t}return null}function rt(t,e){var n=[],a=tt.getOwnPropertyNames;if(a)n=a(t);else for(var r in t)"string"==typeof r&&y(t,r)&&n.push(r);if(n&&0<n.length)for(var i=0;i<n.length;i++)e(n[i])}function it(t,e,n){return e!==K&&typeof t[e]===q&&(n||y(t,e))}function ot(t){throw new TypeError("DynamicProto: "+t)}function ct(t,e){for(var n=t.length-1;0<=n;n--)if(t[n]===e)return 1}function ut(t,e){return y(t,d)?t.name||e||Y:((t||{})[K]||{}).name||e||Y}function st(t,a,e,n){y(t,d)||ot("theClass is an invalid class definition.");var r,i,o,c,u,s,l=t[d],f=(function(t){if(m)for(var e=[],n=T(a);n&&!at(n)&&!ct(e,n);){if(n===t)return 1;e.push(n),n=T(n)}}(l)||ot("["+ut(t)+"] is not in class hierarchy of ["+ut(a)+"]"),null),t=(y(l,h)?f=l[h]:(f="_dynCls$"+ut(t,"_")+"$"+et,et++,l[h]=f),st[X]),g=!!t[Q],p=(g&&n&&n[Q]!==undefined&&(g=!!n[Q]),i={},rt(r=a,function(t){!i[t]&&it(r,t,!1)&&(i[t]=r[t])}),i),g=(e(a,function(t,e,n,i){function a(t,e,n){var a,r=e[n];return r[J]&&i&&!1!==(a=t[W]||{})[v]&&(r=(a[e[h]]||{})[n]||r),function(){return r.apply(t,arguments)}}for(var r={},o=(rt(n,function(t){r[t]=a(e,n,t)}),T(t)),c=[];o&&!at(o)&&!ct(c,o);)rt(o,function(t){!r[t]&&it(o,t,!m)&&(r[t]=a(e,o,t))}),c.push(o),o=T(o);return r}(l,a,p,g)),!!m&&!!t[Z]);o=l,e=f,c=a,u=p,t=!1!==(g=g&&n?!!n[Z]:g),nt(o)||(l=c[W]=c[W]||{},s=l[e]=l[e]||{},!1!==l[v]&&(l[v]=!!t),rt(c,function(t){var n,a,r;it(c,t,!1)&&c[t]!==u[t]&&(s[t]=c[t],delete c[t],y(o,t)&&(!o[t]||o[t][J])||(o[t]=(n=o,a=t,(r=function(){var t,e;return(function(t,e,n,a){var r=null;if(t&&y(n,h)){var i=t[W]||{};if((r=(i[n[h]]||{})[e])||ot("Missing ["+e+"] "+q),!r[G]&&!1!==i[v]){for(var o=!y(t,e),c=T(t),u=[];o&&c&&!at(c)&&!ct(u,c);){var s=c[e];if(s){o=s===a;break}u.push(c),c=T(c)}try{o&&(t[e]=r),r[G]=1}catch(l){i[v]=!1}}}return r}(this,a,n,r)||(typeof(e=(e=n[t=a])===r?T(n)[t]:e)!==q&&ot("["+t+"] is not a "+q),e)).apply(this,arguments)})[J]=1,r)))}))}st[X]={setInstFuncs:!0,useBaseInst:!0};var g="",lt="isInitialized",_="teardown",C="core",ft="update",gt="disabled",pt="_doTeardown",u="toString",dt="constructor",ht=i,vt=n.freeze,s=Array.isArray,mt=U[u],yt=p[u],Tt=yt.call(n),_t=/-([a-z])/g,Ct=/([^\w\d_$])/g,xt=/^(\d+[\w\d_$])/,bt=Object.getPrototypeOf;function It(t){return t===undefined||typeof t===r}function x(t){return null===t||It(t)}function Nt(t){return!(!t||typeof t!==o)}function b(t){return!(!t||typeof t!==F)}function At(t){var e=t;return t&&"string"==typeof t?(e=(e=t.replace(_t,function(t,e){return e.toUpperCase()})).replace(Ct,"_")).replace(xt,function(t,e){return"_"+e}):e}function Pt(t,e){if(t)for(var n in t)p.call(t,n)&&e.call(t,n,t[n])}function wt(t,e){return!(!t||!e||!~t.indexOf(e))}var I=s||function(t){return!(!t||"[object Array]"!==mt.call(t))};function Dt(t){return t&&"object"==typeof t&&(!(t=(bt||function(t){if(t){if(bt)return bt(t);t=t.__proto__||t[a]||t[dt];if(t)return t}return null})(t))||typeof(t=t[dt]&&p.call(t,dt)?t[dt]:t)===F&&yt.call(t)===Tt)}function N(t,e,n){var a=t.length;try{for(var r=0;r<a&&!(r in t&&-1===e.call(n||t,t[r],r,t));r++);}catch(i){}}var kt=vt||function(t){return t};function Et(){var t=Date;return t.now?t.now():(new t).getTime()}function St(t){var n={};return Pt(t,function(t,e){if(n[t]=e,!It(n[e]))throw Error("["+e+"] exists for "+t);n[e]=t}),kt(n)}var Mt="window",Ot="console",Lt="JSON",Ft=null,Bt=null;function l(t){var e=j();return e&&e[t]?e[t]:t===Mt&&Ut()?window:null}function Ut(){return!(typeof window!==o||!window)}function Rt(){return Ut()?window:l(Mt)}function jt(){return typeof document===o&&document?document:l("document")}function Vt(){return typeof location===o&&location?location:l("location")}function Ht(){return typeof JSON===o&&JSON||null!==l(Lt)}function zt(){return Ht()?JSON||l(Lt):null}function Kt(t){var e=Object[a].toString.call(t),n=g;return"[object Error]"===e?n="{ stack: '"+t.stack+"', message: '"+t.message+"', name: '"+t.name+"'":Ht()&&(n=zt().stringify(t)),e+n}var qt=null;function Wt(t){return t?'"'+t.replace(/\"/g,g)+'"':g}function Jt(t,e){var n,a=typeof console!==r?console:l(Ot);a&&(n="log",b(a[n=a[t]?t:n])&&a[n](e))}Xt.dataType="MessageData";var Gt=Xt;function Xt(t,e,n,a){void 0===n&&(n=!1),this.messageId=t,this.message=(n?"AI: ":"AI (Internal): ")+t;n=g,Ht()&&(n=zt().stringify(a)),t=(e?" message:"+Wt(e):g)+(a?" props:"+Wt(n):g);this.message+=t}var Yt=function Ke(r){this.identifier="DiagnosticLogger",this.queue=[];var c=0,u={};st(Ke,this,function(i){function t(t,e){t=r[t];return x(t)?e:t}function o(t,e){var n,a=(n=(n=qt)||!0===r.disableDbgExt?n:qt||(a=l("Microsoft"),qt=a?a.ApplicationInsights:qt))?n.ChromeDbgExt:null;a&&a.diagLog&&a.diagLog(t,e)}x(r)&&(r={}),i.consoleLoggingLevel=function(){return t("loggingLevelConsole",0)},i.telemetryLoggingLevel=function(){return t("loggingLevelTelemetry",1)},i.maxInternalMessageLimit=function(){return t("maxMessageLimit",25)},i.enableDebugExceptions=function(){return t("enableDebugExceptions",!1)},i.throwInternal=function(t,e,n,a,r){e=new Gt(e,n,r=void 0!==r&&r,a);if(i.enableDebugExceptions())throw e;n=1===t?"errorToConsole":"warnToConsole";It(e.message)?o("throw"+(1===t?"Critical":"Warning"),e):(a=i.consoleLoggingLevel(),r?(r=+e.messageId,!u[r]&&t<=a&&(i[n](e.message),u[r]=!0)):t<=a&&i[n](e.message),i.logInternalMessage(t,e))},i.warnToConsole=function(t){Jt("warn",t),o("warning",t)},i.errorToConsole=function(t){Jt("error",t),o("error",t)},i.resetInternalMessageCount=function(){c=0,u={}},i.logInternalMessage=function(t,e){var n,a;c>=i.maxInternalMessageLimit()||(a=!0,n="AITR_"+e.messageId,u[n]?a=!1:u[n]=!0,a&&(t<=i.telemetryLoggingLevel()&&(i.queue.push(e),c++,o(1===t?"error":"warn",e)),c===i.maxInternalMessageLimit()&&(a=new Gt(23,n="Internal events throttle limit per PageView reached for this app.",!1),i.queue.push(a),1===t?i.errorToConsole(n):i.warnToConsole(n))))}})};function $t(t,e,n,a,r,i){void 0===i&&(i=!1),(t||new Yt).throwInternal(e,n,a,r,i)}f.ParentContextKey="parent",f.ChildrenContextKey="childEvts";var Qt=f;function f(t,r,e){var a,i=this,o=!1;i.start=Et(),i.name=t,i.isAsync=e,i.isChildEvt=function(){return!1},b(r)&&(o=function(t){if(ht)try{var e={enumerable:!0,configurable:!0,get:function(){return!a&&b(r)&&(a=r(),r=null),a}};return ht(t,"payload",e),!0}catch(n){}return!1}(i)),i.getCtx=function(t){return t?(t===f.ParentContextKey||t===f.ChildrenContextKey?i:i.ctx||{})[t]:null},i.setCtx=function(t,e){t&&(t===f.ParentContextKey?(i[t]||(i.isChildEvt=function(){return!0}),i[t]=e):t===f.ChildrenContextKey?i[t]=e:(i.ctx=i.ctx||{})[t]=e)},i.complete=function(){var t=0,e=i.getCtx(f.ChildrenContextKey);if(I(e))for(var n=0;n<e.length;n++){var a=e[n];a&&(t+=a.time)}i.time=Et()-i.start,i.exTime=i.time-t,i.complete=function(){},!o&&b(r)&&(i.payload=r())}}var Zt="CoreUtils.doPerf";function te(t,e,n,a,r){if(t)if(t=b(t.getPerfMgr)?t.getPerfMgr():t){var i,o=void 0,c=t.getCtx(Zt);try{if(o=t.create(e(),a,r))return c&&o.setCtx&&(o.setCtx(Qt.ParentContextKey,c),c.getCtx&&c.setCtx&&((i=c.getCtx(Qt.ChildrenContextKey))||(i=[],c.setCtx(Qt.ChildrenContextKey,i)),i.push(o))),t.setCtx(Zt,o),n(o)}catch(u){o&&o.setCtx&&o.setCtx("exception",u)}finally{o&&t.fire(o),t.setCtx(Zt,c)}}n()}var ee=4294967296,A=4294967295,ne=!1,ae=123456789,re=987654321;function ie(t){var e,n=0,a=l("crypto")||l("msCrypto");if(0===(n=a&&a.getRandomValues?a.getRandomValues(new Uint32Array(1))[0]&A:n)&&(!(a=typeof navigator===o&&navigator?navigator:l("navigator"))||a.userAgent===Bt&&null!==Ft||(a=((Bt=a.userAgent)||g).toLowerCase(),Ft=wt(a,"msie")||wt(a,"trident/")),Ft)){if(!ne)try{var r=2147483647&Et();(e=(Math.random()*ee^r)+r)<0&&(e>>>=0),ae=123456789+e&A,re=987654321-e&A,ne=!0}catch(i){}a=((re=36969*(65535&re)+(re>>16)&A)<<16)+(65535&(ae=18e3*(65535&ae)+(ae>>16)&A))>>>0&A|0,n=(a>>>=0)&A}return 0===n&&(n=Math.floor(ee*Math.random()|0)),t||(n>>>=0),n}var oe=i,ce="2.7.3",ue="."+function(t){void 0===t&&(t=22);for(var e=ie()>>>0,n=0,a=g;a.length<t;)a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[0|63&e]||"",e>>>=6,5==++n&&(e=(ie()<<2&4294967295|3&e)>>>0,n=0);return a}(6),se=0;function le(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType}function fe(t,e){return At(t+se+++((e=void 0!==e&&e)?"."+ce:"")+ue)}function ge(t){var i={id:fe("_aiData-"+(t||"")+"."+ce),accept:le,get:function(t,e,n,a){var r=t[i.id];return r?r[At(e)]:(a&&((r=function(t,e){var n=e[t.id];if(!n){n={};try{le(e)&&!function(t,e,n){if(oe)try{return oe(t,e,{value:n,enumerable:!1,configurable:!0}),1}catch(a){}}(e,t.id,n)&&(e[t.id]=n)}catch(a){}}return n}(i,t))[At(e)]=n),n)},kill:function(t,e){if(t&&t[e])try{delete t[e]}catch(n){}}};return i}var pe=ge("plugin");function de(t){return pe.get(t,"state",{},!0)}var he="TelemetryPluginChain",ve="_hasRun",me="_getTelCtx",ye=0;function Te(t,o,n,e){var a=null,r=[],i=(null!==e&&(a=e?function(t,e,n,a){for(;t;){if(t.getPlugin()===a)return t;t=t.getNext()}return Ce([a],e,n)}(t,o,n,e):t),{_next:function(){var t,e=a;return a=e?e.getNext():null,e||(t=r)&&0<t.length&&(N(t,function(t){try{t.func.call(t.self,t.args)}catch(e){$t(n.logger,2,73,"Unexpected Exception during onComplete - "+Kt(e))}}),r=[]),e},ctx:{core:function(){return n},diagLog:function(){return(n||{}).logger||new Yt(o)},getCfg:function(){return o},getExtCfg:c,getConfig:function(t,e,n){void 0===n&&(n=!1);var a,t=c(t,null);return t&&!x(t[e])?a=t[e]:o&&!x(o[e])&&(a=o[e]),x(a)?n:a},hasNext:function(){return!!a},getNext:function(){return a},setNext:function(t){a=t},iterate:function(t){for(;e=i._next();){var e=e.getPlugin();e&&t(e)}},onComplete:function(t,e){for(var n=[],a=2;a<arguments.length;a++)n[a-2]=arguments[a];t&&r.push({func:t,self:It(e)?i.ctx:e,args:n})}}});function c(t,e,n){var a,r,i;return void 0===e&&(e={}),void 0===n&&(n=0),(a=o&&(r=o.extensionConfig)&&t?r[t]:a)?Nt(e)&&0!==n&&(i=function g(){var t=arguments,e=t[0]||{},n=t.length,a=!1,r=1;for(0<n&&"boolean"==typeof e&&(a=e,e=t[r]||{},r++),Nt(e)||(e={});r<n;r++){var i,o,c,u,s=t[r],l=I(s),f=Nt(s);for(i in s)(l&&i in s||f&&p.call(s,i))&&(o=s[i],c=void 0,a&&o&&((c=I(o))||Dt(o))&&(u=e[i],c?I(u)||(u=[]):Dt(u)||(u={}),o=g(a,u,o)),o!==undefined&&(e[i]=o))}return e}(!0,e,a),o&&2===n&&Pt(e,function(t){var e;x(i[t])&&!x(e=o[t])&&(i[t]=e)})):a=e,a}return i}function _e(t,n,a,e){var r=Te(t,n,a,e),i=r.ctx;return i.processNext=function(t){var e=r._next();return e&&e.processTelemetry(t,i),!e},i.createNew=function(t,e){return _e((t=I(t=void 0===t?null:t)?Ce(t,n,a,e):t)||i.getNext(),n,a,e)},i}function Ce(t,e,n,a){var r,i=null,o=!a;return I(t)&&0<t.length&&(r=null,N(t,function(t){(o=!o&&a===t||o)&&t&&b(t.processTelemetry)&&(t=xe(t,e,n),i=i||t,r&&r._setNext(t),r=t)})),a&&!i?Ce([a],e,n):i}function xe(u,a,r){var s=null,i=b(u.processTelemetry),o=b(u.setNextPlugin),l=u?u.identifier+"-"+u.priority+"-"+ye++:"Unknown-0-"+ye++,c={getPlugin:function(){return u},getNext:function(){return s},processTelemetry:function(n,t){var e;f(t=t||(e=(e=u&&b(u[me])?u[me]():e)||_e(c,a,r)),function(t){if(!u||!i)return!1;var e=de(u);return!e[_]&&!e[gt]&&(o&&u.setNextPlugin(s),u.processTelemetry(n,t),!0)},"processTelemetry",function(){return{item:n}},!n.sync)||t.processNext(n)},unload:function(a,r){f(a,function(){var t,e,n=!1;return u&&(t=de(u),e=u[C]||t.core,!u||e&&e!==a[C]()||t[_]||(t[C]=null,t[_]=!0,t[lt]=!1,u[_]&&!0===u[_](a,r)&&(n=!0))),n},"unload",function(){},r.isAsync)||a.processNext(r)},update:function(a,r){f(a,function(){var t,e,n=!1;return u&&(t=de(u),e=u[C]||t.core,!u||e&&e!==a[C]()||t[_]||u[ft]&&!0===u[ft](a,r)&&(n=!0)),n},"update",function(){},!1)||a.processNext(r)},_id:l,_setNext:function(t){s=t}};function f(n,a,r,t,e){var i=!1,o=u?u.identifier:he,c=(c=n[ve])||(n[ve]={});return n.setNext(s),u&&te(n[C](),function(){return o+":"+r},function(){c[l]=!0;try{var t=s?s._id:g;t&&(c[t]=!1),i=a(n)}catch(e){t=!s||c[s._id];t&&(i=!0),s&&t||$t(n.diagLog(),1,73,"Plugin ["+u.identifier+"] failed during "+r+" - "+Kt(e)+", run flags: "+Kt(c))}},t,e),i}return kt(c)}function be(){var e=[];return{add:function(t){t&&e.push(t)},run:function(n,a){N(e,function(t){try{t(n,a)}catch(e){$t(n.diagLog(),2,73,"Unexpected error calling unload handler - "+Kt(e))}}),e=[]}}}var P="getPlugin",u=function qe(){var i,o,s,l,f,c=this;function e(t){var e,t=t=void 0===t?null:t;return t||(e=o||_e(null,{},c.core),t=s&&s[P]?e.createNew(null,s[P]):e.createNew(null,s)),t}function g(t,e,n){t&&(i="extensionConfig",r=a=[],t&&(r=t[i])!==a&&x(r)&&(t[i]=r=a)),!n&&e&&(n=e.getProcessTelContext().getNext());var a,r,i=s;s&&s[P]&&(i=s[P]()),c.core=e,o=_e(n,t,e,i)}function p(){i=!1,c.core=null,s=o=null,f=[],l=be()}p(),st(qe,c,function(u){var t,e,n,a,r;u.initialize=function(t,e,n,a){g(t,e,a),i=!0},u.teardown=function(t,e){var n,a,r,i;if(u.core&&(!t||u.core===t.core()))return a=!1,r=t||function c(t,n,a,e){var r=Te(t,n,a,e),i=r.ctx;return i.processNext=function(t){var e=r._next();return e&&e.unload(i,t),!e},i.createNew=function(t,e){return c((t=I(t=void 0===t?null:t)?Ce(t,n,a,e):t)||i.getNext(),n,a,e)},i}(null,{},u.core,s&&s[P]?s[P]():s),i=e||{reason:0,isAsync:!1},u[pt]&&!0===u[pt](r,i,o)?n=!0:o(),n;function o(){a||(a=!0,l.run(r,e),N(f,function(t){t.rm()}),f=[],!0===n&&r.processNext(i),p())}},u.update=function(t,e){var n,a,r;if(u.core&&(!t||u.core===t.core()))return a=!1,r=t||function o(t,n,a,e){var r=Te(t,n,a,e).ctx;return r.processNext=function(e){return r.iterate(function(t){b(t[ft])&&t[ft](r,e)})},r.createNew=function(t,e){return o((t=I(t=void 0===t?null:t)?Ce(t,n,a,e):t)||r.getNext(),n,a,e)},r}(null,{},u.core,s&&s[P]?s[P]():s),u._doUpdate&&!0===u._doUpdate(r,e||{reason:0},i)?n=!0:i(),n;function i(){a||(a=!0,g(r.getCfg(),r.core(),r.getNext()))}},u._addHook=function(t){t&&(I(t)?f=f.concat(t):f.push(t))},t="_addUnloadCb",e=function(){return l},void 0===n&&(n=!0),u&&e&&(n||It(u[t]))&&(u[t]=(r=a=null,b(n=e)?a=n:r=n,function(){var t=arguments;if(r=a?a():r)return r.add.apply(r,t)}))}),c.diagLog=function(t){return e(t).diagLog()},c[lt]=function(){return i},c.setInitialized=function(t){i=t},c.setNextPlugin=function(t){s=t},c.processNext=function(t,e){e?e.processNext(t):s&&b(s.processTelemetry)&&s.processTelemetry(t,null)},c._getTelCtx=e},Ie="attachEvent",Ne="addEventListener",Ae=(fe("aiEvtPageHide"),fe("aiEvtPageShow"),1),Pe=ge("events"),we=/^([^.]*)(?:\.(.+)|)/;function De(t){return t&&t.replace?t.replace(/^\s*\.*|\.*\s*$/g,""):t}function ke(t,e,n,a){var r,i,o,c,u,s,l,a=a=void 0!==a&&a;if(void 0===a&&(a=!1),t)try{u=e,null&&(s="",I(null)?(s="",N(null,function(t){(t=De(t))&&("."!==t[0]&&(t="."+t),s+=t)})):s=null,s&&(u=(u||"")+(s="."!==s[0]?"."+s:s)));var f,g={type:(l=we.exec(u)||[])[1],ns:(l[2]||"").split(".").sort().join(".")},p=g,d=n,h=a,v=!1;(c=t)&&p&&p.type&&d&&(c[Ne]?(c[Ne](p.type,d,h),v=!0):c[Ie]&&(c[Ie]("on"+p.type,d),v=!0)),v&&Pe.accept(t)&&(f={guid:Ae++,evtName:g,handler:n,capture:a},r=g.type,((o=Pe.get(t,"events",{},i=void 0===i||i))[r]||(o[r]=[])).push(f))}catch(m){}}var w=St({CRITICAL:1,WARNING:2}),s=St({BrowserDoesNotSupportLocalStorage:0,BrowserCannotReadLocalStorage:1,BrowserCannotReadSessionStorage:2,BrowserCannotWriteLocalStorage:3,BrowserCannotWriteSessionStorage:4,BrowserFailedRemovalFromLocalStorage:5,BrowserFailedRemovalFromSessionStorage:6,CannotSendEmptyTelemetry:7,ClientPerformanceMathError:8,ErrorParsingAISessionCookie:9,ErrorPVCalc:10,ExceptionWhileLoggingError:11,FailedAddingTelemetryToBuffer:12,FailedMonitorAjaxAbort:13,FailedMonitorAjaxDur:14,FailedMonitorAjaxOpen:15,FailedMonitorAjaxRSC:16,FailedMonitorAjaxSend:17,FailedMonitorAjaxGetCorrelationHeader:18,FailedToAddHandlerForOnBeforeUnload:19,FailedToSendQueuedTelemetry:20,FailedToReportDataLoss:21,FlushFailed:22,MessageLimitPerPVExceeded:23,MissingRequiredFieldSpecification:24,NavigationTimingNotSupported:25,OnError:26,SessionRenewalDateIsZero:27,SenderNotInitialized:28,StartTrackEventFailed:29,StopTrackEventFailed:30,StartTrackFailed:31,StopTrackFailed:32,TelemetrySampledAndNotSent:33,TrackEventFailed:34,TrackExceptionFailed:35,TrackMetricFailed:36,TrackPVFailed:37,TrackPVFailedCalc:38,TrackTraceFailed:39,TransmissionFailed:40,FailedToSetStorageBuffer:41,FailedToRestoreStorageBuffer:42,InvalidBackendResponse:43,FailedToFixDepricatedValues:44,InvalidDurationValue:45,TelemetryEnvelopeInvalid:46,CreateEnvelopeError:47,CannotSerializeObject:48,CannotSerializeObjectNonSerializable:49,CircularReferenceDetected:50,ClearAuthContextFailed:51,ExceptionTruncated:52,IllegalCharsInName:53,ItemNotInArray:54,MaxAjaxPerPVExceeded:55,MessageTruncated:56,NameTooLong:57,SampleRateOutOfRange:58,SetAuthContextFailed:59,SetAuthContextFailedAccountName:60,StringValueTooLong:61,StartCalledMoreThanOnce:62,StopCalledWithoutStart:63,TelemetryInitializerFailed:64,TrackArgumentsNotSpecified:65,UrlTooLong:66,SessionStorageBufferFull:67,CannotAccessCookie:68,IdTooLong:69,InvalidEvent:70,FailedMonitorAjaxSetRequestHeader:71,SendBrowserInfoOnUserInit:72,PluginException:73,NotificationException:74,SnippetScriptLoadFailure:99,InvalidInstrumentationKey:100,CannotParseAiBlobValue:101,InvalidContentBlob:102,TrackPageActionEventFailed:103,FailedAddingCustomDefinedRequestContext:104,InMemoryStorageBufferFull:105}),Ee="not_specified",D=e(e({},s),{CannotParseAiBlobValue:101,InvalidContentBlob:102,TrackPageActionEventFailed:103});function Se(t){for(var e in t)k(t[e])&&("{}"!==JSON.stringify(t[e])||"callback"===e)||delete t[e]}function k(t){return!(x(t)||""===t)}function Me(t,e){return k(t.getAttribute(e))}function Oe(t,e,n){var a=t;if(a){for(;!e(a,n);)if(!(a=a.parentNode)||!a.getAttribute)return null;return a}}function Le(t){return"A"===t.nodeName}function E(){var t={},e=!1,n=0,a=arguments.length,r=Object.prototype,i=arguments;for("[object Boolean]"===r.toString.call(i[0])&&(e=i[0],n++);n<a;n++){o=void 0;var o,c,u,s=i[n];for(o in s)u=o,(c=s)&&p.call(c,u)&&(e&&"[object Object]"===r.toString.call(s[o])?t[o]=E(!0,t[o],s[o]):t[o]=s[o])}return t}var Fe={BUTTON:!0,CHECKBOX:!0,RADIO:!0,RESET:!0,SUBMIT:!0};function S(t,e,n,a,r,i){this._clickAnalyticsPlugin=t,this._config=e,this._contentHandler=n,this._pageTagsCallback=a,this._metaTags=r,this._traceLogger=i,this._pageTags={}}S.prototype.setBasicProperties=function(t,e){var n;k(t.name)||(t.pageName=(n=this._config,e&&e.pageName?e.pageName:n.callback&&b(n.callback.pageName)?n.callback.pageName():n.coreData&&n.coreData.pageName?n.coreData.pageName:(e=jt())&&e.title||"")),!k(t.uri)&&Ut&&(t.uri=(n=this._config,e=Vt(),n.coreData&&n.coreData.requestUri&&""!==n.coreData.requestUri?n.coreData.requestUri:e?e.protocol+"//"+(e.hostname||e.host)+(k(e.port)?":"+e.port:"")+e.pathname:null))},S.prototype.setCommonProperties=function(t,e){this.setBasicProperties(t,e),this._setPageTags(t,e),this._pageTypeMetaTag=this._getMetaData(this._metaTags,this._config.coreData,"pageType"),this._behaviorMetaTag=this._getMetaData(this._metaTags,this._config.coreData,"behavior"),k(e.pageType)&&(t.pageType=e.pageType),k(this._pageTypeMetaTag)&&!k(t.pageType)&&(t.pageType=this._pageTypeMetaTag)},S.prototype._setPageTags=function(t,e){if(this._pageTagsCallback&&(this._pageTags=E(!0,this._pageTags,this._pageTagsCallback())),k(e.pageTags)&&(this._pageTags=E(!0,this._pageTags,e.pageTags)),this._metaTags)for(var n in this._pageTags.metaTags={},this._metaTags)"behavior"!=n&&"market"!=n&&"pageType"!=n&&(this._pageTags.metaTags[n]=this._metaTags[n]);t.properties=t.properties||{},t.properties.pageTags=this._pageTags},S.prototype._getBehavior=function(t){var e;return t&&k(t.behavior)?e=t.behavior:k(this._behaviorMetaTag)&&(e=this._behaviorMetaTag),this._getValidBehavior(e)},S.prototype._getValidBehavior=function(t){return this._config.behaviorValidator(t)},S.prototype._getMetaData=function(t,e,n){return e&&e[n]?e[n]:t?t[n]:""},z(M,Be=S),M.prototype.trackPageAction=function(t,e){var n=this,a={name:"Microsoft.ApplicationInsights.{0}.Event",baseType:"EventData",ext:{web:{}},data:{},baseData:{}};this._populateEventDataIfPresent(a.baseData,"name",t.name),this._populateEventDataIfPresent(a.data,"baseTypeSource","ClickEvent"),this._populateEventDataIfPresent(a.data,"uri",t.uri),this._populateEventDataIfPresent(a.data,"pageType",t.pageType),this._populateEventDataIfPresent(a.data,"properties",t.properties),this._populateEventDataIfPresent(a.data,"actionType",t.actionType),this._populateEventDataIfPresent(a.data,"behavior",t.behavior),this._populateEventDataIfPresent(a.data,"clickCoordinates",t.clickCoordinates),this._populateEventDataIfPresent(a.data,"content",t.content),this._populateEventDataIfPresent(a.data,"targetUri",t.targetUri),this._populateEventDataIfPresent(a.data,"timeToAction",t.timeToAction),this._populateEventDataIfPresent(a.data,"refUri",t.refUri),this._populateEventDataIfPresent(a.data,"pageName",t.pageName),this._populateEventDataIfPresent(a.data,"parentId",t.parentId),e&&Pt(e,function(t,e){a.data[t]||n._populateEventDataIfPresent(a.data,t,e)}),this._clickAnalyticsPlugin.core.track(a)},M.prototype.capturePageAction=function(t,e,n,a){e=k(e)?e:{};var r,i={name:""},n=k(n)?n:{},o=(this.setCommonProperties(i,e),i.behavior=this._getBehavior(e),{});a&&(i.behavior=this._config.defaultRightClickBhvr),t&&(i.targetUri=function(e){var t="";switch(e.tagName){case"A":case"AREA":t=e.href||"";break;case"IMG":t=function(){if(e){var t=Oe(e,Le);if(1===t.length){t=t[0];if(t.href)return t.href;if(t.src)return t.src}}return""}();break;case"INPUT":var n=e.type;n&&Fe[n.toUpperCase()]&&(n=Vt()||{},t=e.form?e.form.action||n.pathname||"":n.pathname||"")}return t}(t),(o=this._contentHandler.getElementContent(t)).bhvr&&!k(e.behavior)&&(a="bhvr",(t=o)&&t[a]&&(r=t[a],delete t[a]),a=r,i.behavior=this._getValidBehavior(a)),k(o.id)||k(o.contentName)||this._traceLogger.throwInternal(w.WARNING,D.InvalidContentBlob,"Missing attributes id or contentName in click event. Click event information will still be collected!")),i.name=o.id||o.contentName||Ee,i.parentId=o.parentid||o.parentName||Ee,k(e.actionType)&&(i.actionType=e.actionType),k(e.clickCoordinateX)&&k(e.clickCoordinateY)&&(i.clickCoordinates=e.clickCoordinateX+"X"+e.clickCoordinateY),this._sanitizePageActionEventContent(o),i.content="["+JSON.stringify(E(o,e&&e.contentTags?e.contentTags:{}))+"]",i.timeToAction=this._getTimeToClick(),i.refUri=k(e.refUri)?e.refUri:this._config.coreData.referrerUri,this._isUndefinedEvent(i)||this.trackPageAction(i,n)},M.prototype._getTimeToClick=function(){var t=l("performance");if(t&&t.timing){t=t.timing.navigationStart;if(t&&0!==t)return(new Date).getTime()-t}return-1},M.prototype._populateEventDataIfPresent=function(t,e,n){k(n)&&(t[e]=n)},M.prototype._sanitizePageActionEventContent=function(t){t&&(delete t.id,delete t.parentid,delete t.parentname,this._config&&this._config.dataTags&&k(this._config.dataTags.parentDataTag)&&delete t[this._config.dataTags.parentDataTag])},M.prototype._isUndefinedEvent=function(t){return!(!this._config.dropInvalidEvents||t.name!==Ee||t.parentId!==Ee||"[{}]"!==t.content)};var Be,Ue=M;function M(){return null!==Be&&Be.apply(this,arguments)||this}var Re={BUTTON:!0,CHECKBOX:!0,RADIO:!0,RESET:!0,SUBMIT:!0},je=(Ve.prototype.click=function(){var e=this,t=Rt(),n=jt();t?(ke(t,~navigator.appVersion.indexOf("MSIE")?"click":"mousedown",function(t){e._processClick(t)}),ke(t,"keyup",function(t){e._processClick(t)})):n&&(ke(n,"click",function(t){e._processClick(t)}),ke(n,"keyup",function(t){e._processClick(t)}))},Ve.prototype.capturePageAction=function(t,e,n,a){k(Oe(t,Me,this._config.dataTags.customDataPrefix+this._config.dataTags.dntDataTag))||this._pageAction.capturePageAction(t,e,n,a)},Ve.prototype._processClick=function(t){var e={A:!0,BUTTON:!0,AREA:!0,INPUT:!0},n=Rt();if(t=x(t)&&n?n.event:t){var a=t.srcElement||t.target,r={clickCoordinateX:t.pageX,clickCoordinateY:t.pageY},i=function(t){try{if("which"in t)return 3===t.which;if("button"in t)return 2===t.button}catch(e){}}(t);if(i)r.actionType="CR";else if(function(t){try{if("which"in t)return 1===t.which;if("button"in t)return 1===t.button}catch(e){}}(t))r.actionType="CL";else if(function(t){try{if("keyCode"in t)return 13===t.keyCode}catch(e){}}(t))r.actionType="KE";else if(function(t){try{if("keyCode"in t)return 32===t.keyCode}catch(e){}}(t))r.actionType="KS";else{if(!function(t){try{if("which"in t)return 2===t.which;if("button"in t)return 4===t.button}catch(e){}}(t))return;r.actionType="CM"}for(;a&&a.tagName;){var o=(a=a.control&&e[a.control.tagName.toUpperCase()]?a.control:a).tagName.toUpperCase();if(e[o]){"INPUT"==o&&!Re[a.type.toUpperCase()]||this.capturePageAction(a,r,{},i);break}a=a.parentElement||a.parentNode}}},Ve);function Ve(t,e,n,a){this._analyticsPlugin=t,this._config=e,this._pageAction=n,this._traceLogger=a}O.prototype.getMetadata=function(){return k(this._config.dataTags.metaDataPrefix)?this._getMetaDataFromDOM(this._config.dataTags.captureAllMetaDataContent,this._config.dataTags.metaDataPrefix,!1):this._getMetaDataFromDOM(this._config.dataTags.captureAllMetaDataContent,"",!1)},O.prototype.getElementContent=function(t){if(!t)return{};var e,n,a={},r=this._config.dataTags.customDataPrefix,i=r+this._config.dataTags.aiBlobAttributeTag;if(k(this._config.dataTags.parentDataTag)&&(n=r+this._config.dataTags.parentDataTag),this._isTracked(t,r,i))a=E(a,this._populateElementContentwithDataTag(t,r,n,i));else if(e=t.getAttribute(i))try{a=JSON.parse(e)}catch(o){this._traceLogger.throwInternal(w.CRITICAL,D.CannotParseAiBlobValue,"Can not parse "+e)}else a=E(a,this._populateElementContent(t,r,n,i));return Se(a),n?E(a,this._getParentDetails(t,a,r,i)):a},O.prototype._captureElementContentWithDataTag=function(t,e,n){for(var a,r=0;r<t.attributes.length;r++)(a=t.attributes[r]).name.indexOf(n)||(e[a.name.replace(n,"")]=a.value)},O.prototype._walkUpDomChainCaptureData=function(t,e,n,a,r){for(var i=t,o=!1,c=!1;!x(i)&&!x(i.attributes);){for(var u=i.attributes,s=0;s<u.length;s++){var l,f=u[s];f.name.indexOf(n)||(f.name.indexOf(a)||(o=!0),f.name.indexOf(r)&&(l=f.name.replace(n,""),c&&"id"===l||k(e[l])||(e[l]=f.value)))}if(o)break;c=!0,i=i.parentNode}},O.prototype._populateElementContent=function(t,e,n,a){var r={};if(!t)return r;var i=this._getHtmlIdAndContentName(t),r={id:i.id||"",contentName:i.contentName||""};return k(n)&&this._walkUpDomChainCaptureData(t,r,e,n,a),r.id||r.contentName||this._traceLogger.throwInternal(w.WARNING,D.InvalidContentBlob,"Invalid content blob. Missing required attributes (id, contentName. Content information will still be collected!"),r},O.prototype._populateElementContentwithDataTag=function(t,e,n,a){var r={};if(!t)return r;var i=this._getHtmlIdAndContentName(t);return k(n)?this._walkUpDomChainCaptureData(t,r,e,n,a):this._captureElementContentWithDataTag(t,r,e),this._config.dataTags.useDefaultContentNameOrId&&(k(r.id)||(r.id=i.id||""),r.contentName=i.contentName||""),r.id||r.contentName||this._traceLogger.throwInternal(w.WARNING,D.InvalidContentBlob,"Invalid content blob. Missing required attributes (id, contentName. Content information will still be collected!"),r},O.prototype._getMetaDataFromDOM=function(t,e,n){for(var a={},r=document.querySelectorAll("meta"),i=0;i<r.length;i++){var o=r[i];!o.name||!t&&o.name.indexOf(e)||(a[n?o.name.replace(e,""):o.name]=o.content)}return a},O.prototype._getDefaultContentName=function(t,e){if(!1===e||!t.tagName)return"";var n,a=jt()||{};switch(t.tagName){case"A":n=a.all?t.innerText||t.innerHTML:t.text||t.innerHTML;break;case"IMG":case"AREA":n=t.alt;break;default:n=t.value||t.name||t.alt||t.innerText||t.id}return n.substring(0,200)},O.prototype._isTracked=function(t,e,n){for(var a=t.attributes,r=!1,i=0;i<a.length;i++){var o=a[i].name;if(o===n)return!1;o.indexOf(e)||(r=!0)}return r},O.prototype._getHtmlIdAndContentName=function(t){var e,n,a={};return t&&this._config.dataTags.useDefaultContentNameOrId&&(e=this._config.callback.contentName?this._config.callback.contentName(t,this._config.dataTags.useDefaultContentNameOrId):"",n=this._getDefaultContentName(t,this._config.dataTags.useDefaultContentNameOrId),a={id:t.id,contentName:e||n||t.getAttribute("alt")}),a},O.prototype._getParentDetails=function(t,e,n,a){var r=e.parentid,e=e.parentname;return r||e||!t?{}:this._populateParentInfo(t,n,a)},O.prototype._populateParentInfo=function(t,e,n){var a,r={},i=Oe(t.parentElement,this._isTracked,e);if(i){var n=i.getAttribute(n)||t[n];if(n){try{var o=JSON.parse(n)}catch(c){this._traceLogger.throwInternal(w.CRITICAL,D.CannotParseAiBlobValue,"Can not parse "+n)}o&&(a=o.id)}else a=i.getAttribute(e+"id")}return a?r.parentid=a:(n=this._getHtmlIdAndContentName(t.parentElement),r.parentid=n.id,r.parentname=n.contentName),r};var He=O;function O(t,e){this._config=t,this._traceLogger=e}z(L,ze=u),L.prototype.initialize=function(t,e,n,a){if(x(e))throw Error("Error initializing");t.extensionConfig=t.extensionConfig||[],t.extensionConfig[this.identifier]=t.extensionConfig[this.identifier]||{},this._config=function(t){var e,n,a={autoCapture:!0,callback:{pageActionPageTags:null},pageTags:{},coreData:{referrerUri:document.referrer,requestUri:"",pageName:"",pageType:""},dataTags:{useDefaultContentNameOrId:!1,aiBlobAttributeTag:"ai-blob",customDataPrefix:"data-",captureAllMetaDataContent:!1,dntDataTag:"ai-dnt"},behaviorValidator:function(t){return t||""},defaultRightClickBhvr:"",dropInvalidEvents:!1},r=[];for(e in a)"object"==typeof a[e]&&r.push(e);if(t){var i,o,c=t,u=r;for(i in Se(c),u)u.hasOwnProperty(i)&&("object"==typeof c[o=u[i]]?Se(c[o]):delete c[o]);return k(t.dataTags)&&(t.dataTags.customDataPrefix=k((n=t).dataTags.customDataPrefix)&&!n.dataTags.customDataPrefix.indexOf("data-")?t.dataTags.customDataPrefix:"data-"),E(!0,a,t)}}(t.extensionConfig[this.identifier]),ze.prototype.initialize.call(this,t,e,n,a),this._contentHandler=this._contentHandler||new He(this._config,this.diagLog());var r,t=this._contentHandler.getMetadata();this.pageAction=new Ue(this,this._config,this._contentHandler,this._config.callback.pageActionPageTags,t,this.diagLog()),this._autoCaptureHandler=this._autoCaptureHandler||new je(this,this._config,this.pageAction,this.diagLog()),this._config.autoCapture&&this._autoCaptureHandler.click(),N(n,function(t){"AppInsightsPropertiesPlugin"===t.identifier&&(r=t)}),r&&r.context&&r.context.internal&&r.context.internal.sdkVersion&&(r.context.internal.sdkVersion+="_ClickPlugin"+L.Version)},L.prototype.processTelemetry=function(t,e){this.processNext(t,e)},L.prototype.trackPageAction=function(t,e){try{this.pageAction.trackPageAction(t,e)}catch(n){this.diagLog().throwInternal(w.CRITICAL,D.TrackPageActionEventFailed,"trackPageAction failed, page action event will not be collected: "+((t=n)&&"[object Error]"===mt.call(t)?t.name:g),{exception:Kt(n)})}},L.Version="2.8.0-beta.2203-07";var ze,vt=L;function L(){var t=null!==ze&&ze.apply(this,arguments)||this;return t.identifier="ClickAnalyticsPlugin",t.priority=181,t}t.BehaviorEnumValidator=function(e){return function(t){return e[t]||""}},t.BehaviorMapValidator=function(e){return function(t){return e[t]||""}},t.BehaviorValueValidator=function(t){return function(e){var n;return N(t,function(t){if(t===e)return n=t,-1}),n||""}},t.ClickAnalyticsPlugin=vt;i=t,s="__esModule",e={value:!0},u=Object.defineProperty;if(u)try{return void u(i,s,e)}catch(We){}typeof e.value!==undefined&&(i[s]=e.value)};"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).Microsoft=t.Microsoft||{},t.Microsoft.ApplicationInsights=t.Microsoft.ApplicationInsights||{}));
|
|
6
6
|
//# sourceMappingURL=ai.clck.2.min.js.map
|