@microsoft/applicationinsights-clickanalytics-js 2.7.3-nightly.2112-07 → 2.7.3-nightly.2112-08
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.7.3-nightly.2112-07.cjs.js → ai.clck.2.7.3-nightly.2112-08.cjs.js} +3 -3
- package/browser/ai.clck.2.7.3-nightly.2112-08.cjs.js.map +1 -0
- package/browser/{ai.clck.2.7.3-nightly.2112-07.cjs.min.js → ai.clck.2.7.3-nightly.2112-08.cjs.min.js} +3 -3
- package/browser/ai.clck.2.7.3-nightly.2112-08.cjs.min.js.map +1 -0
- package/browser/{ai.clck.2.7.3-nightly.2112-07.gbl.js → ai.clck.2.7.3-nightly.2112-08.gbl.js} +3 -3
- package/browser/ai.clck.2.7.3-nightly.2112-08.gbl.js.map +1 -0
- package/browser/{ai.clck.2.7.3-nightly.2112-07.gbl.min.js → ai.clck.2.7.3-nightly.2112-08.gbl.min.js} +3 -3
- package/browser/ai.clck.2.7.3-nightly.2112-08.gbl.min.js.map +1 -0
- package/browser/ai.clck.2.7.3-nightly.2112-08.integrity.json +66 -0
- package/browser/{ai.clck.2.7.3-nightly.2112-07.js → ai.clck.2.7.3-nightly.2112-08.js} +3 -3
- package/browser/ai.clck.2.7.3-nightly.2112-08.js.map +1 -0
- package/browser/{ai.clck.2.7.3-nightly.2112-07.min.js → ai.clck.2.7.3-nightly.2112-08.min.js} +3 -3
- package/browser/ai.clck.2.7.3-nightly.2112-08.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.7.3-nightly.2112-07.cjs.js.map +0 -1
- package/browser/ai.clck.2.7.3-nightly.2112-07.cjs.min.js.map +0 -1
- package/browser/ai.clck.2.7.3-nightly.2112-07.gbl.js.map +0 -1
- package/browser/ai.clck.2.7.3-nightly.2112-07.gbl.min.js.map +0 -1
- package/browser/ai.clck.2.7.3-nightly.2112-07.integrity.json +0 -66
- package/browser/ai.clck.2.7.3-nightly.2112-07.js.map +0 -1
- package/browser/ai.clck.2.7.3-nightly.2112-07.min.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Application Insights JavaScript SDK - Click Analytics, 2.7.3-nightly.2112-
|
|
2
|
+
* Application Insights JavaScript SDK - Click Analytics, 2.7.3-nightly.2112-08
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
|
-
var t=this,e=function(t){"use strict";var a="function",i="object",r="undefined",o="prototype",s="hasOwnProperty",n=Object,c=n[o],e=n.assign,l=n.create,u=n.defineProperty,f=c[s];function g(){return typeof globalThis!==r&&globalThis?globalThis:typeof self!==r&&self?self:typeof window!==r&&window?window:typeof global!==r&&global?global:null}function p(t){throw new TypeError(t)}(g()||{}).Symbol,(g()||{}).Reflect;var e=e||function(t){for(var e,n=1,a=arguments.length;n<a;n++)for(var i in e=arguments[n])c[s].call(e,i)&&(t[i]=e[i]);return t},d=function(t,e){return(d=n.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e[s](n)&&(t[n]=e[n])})(t,e)};function h(t,e){function n(){this.constructor=t}typeof e!==a&&null!==e&&p("Class extends value "+e+" is not a constructor or null"),d(t,e),t[o]=null===e?function(t){if(l)return l(t);if(null==t)return{};var e=typeof t;function n(){}return e!==i&&e!==a&&p("Object prototype may only be an Object:"+t),n[o]=t,new n}(e):(n[o]=e[o],new n)}var v="constructor",m="prototype",T="function",C="_dynInstFuncs",y="_isDynProxy",_="_dynClass",I="_dynInstChk",b=I,x="_dfOpts",A="_unknown_",P="__proto__",N="useBaseInst",D="setInstFuncs",E=Object,k=E.getPrototypeOf,w=0;function S(t,e){return t&&E[m].hasOwnProperty.call(t,e)}function M(t){return t&&(t===E[m]||t===Array[m])}function L(t){return M(t)||t===Function[m]}function O(t){if(t){if(k)return k(t);t=t[P]||t[m]||(t[v]?t[v][m]:null);if(t)return t}return null}function F(t,e){var n=[],a=E.getOwnPropertyNames;if(a)n=a(t);else for(var i in t)"string"==typeof i&&S(t,i)&&n.push(i);if(n&&0<n.length)for(var r=0;r<n.length;r++)e(n[r])}function B(t,e,n){return e!==v&&typeof t[e]===T&&(n||S(t,e))}function R(t){throw new TypeError("DynamicProto: "+t)}function U(t,e){for(var n=t.length-1;0<=n;n--)if(t[n]===e)return 1}function V(t,e){return S(t,m)?t.name||e||A:((t||{})[v]||{}).name||e||A}function j(t,a,e,n){S(t,m)||R("theClass is an invalid class definition.");var i=t[m];!function(t){if(k)for(var e=[],n=O(a);n&&!L(n)&&!U(e,n);){if(n===t)return 1;e.push(n),n=O(n)}}(i)&&R("["+V(t)+"] is not in class hierarchy of ["+V(a)+"]");var r=null;S(i,_)?r=i[_]:(r="_dynCls$"+V(t,"_")+"$"+w,w++,i[_]=r);var o=j[x],s=!!o[N];s&&n&&n[N]!==undefined&&(s=!!n[N]);var c,l,t=(l={},F(c=a,function(t){!l[t]&&B(c,t,!1)&&(l[t]=c[t])}),l);e(a,function(t,e,n,r){function a(t,e,n){var a,i=e[n];return i[y]&&r&&!1!==(a=t[C]||{})[b]&&(i=(a[e[_]]||{})[n]||i),function(){return i.apply(t,arguments)}}var i={};F(n,function(t){i[t]=a(e,n,t)});for(var o=O(t),s=[];o&&!L(o)&&!U(s,o);)F(o,function(t){!i[t]&&B(o,t,!k)&&(i[t]=a(e,o,t))}),s.push(o),o=O(o);return i}(i,a,t,s));var u,f,g,p,o=!!k&&!!o[D];u=i,r=r,f=a,g=t,n=!1!==(o=o&&n?!!n[D]:o),M(u)||(o=f[C]=f[C]||{},p=o[r]=o[r]||{},!1!==o[b]&&(o[b]=!!n),F(f,function(t){var n,a,i;B(f,t,!1)&&f[t]!==g[t]&&(p[t]=f[t],delete f[t],S(u,t)&&(!u[t]||u[t][y])||(u[t]=(n=u,a=t,(i=function(){var t,e;return(function(t,e,n,a){var i=null;if(t&&S(n,_)){var r=t[C]||{};if((i=(r[n[_]]||{})[e])||R("Missing ["+e+"] "+T),!i[I]&&!1!==r[b]){for(var o=!S(t,e),s=O(t),c=[];o&&s&&!L(s)&&!U(c,s);){var l=s[e];if(l){o=l===a;break}c.push(s),s=O(s)}try{o&&(t[e]=i),i[I]=1}catch(u){r[b]=!1}}}return i}(this,a,n,i)||(typeof(e=(e=n[t=a])===i?O(n)[t]:e)!==T&&R("["+t+"] is not a "+T),e)).apply(this,arguments)})[y]=1,i)))}))}j[x]={setInstFuncs:!0,useBaseInst:!0};var H={CRITICAL:1,1:"CRITICAL",WARNING:2,2:"WARNING"},K={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},q="attachEvent",z="addEventListener",W=u;function G(t){return c.toString.call(t)}function J(t){return t===undefined||typeof t===r}function X(t){return null===t||J(t)}function Y(t){return typeof t===a}function $(t,e,n,a){void 0===a&&(a=!1);var i=!1;if(!X(t))try{X(t[z])?X(t[q])||(t[q]("on"+e,n),i=!0):(t[z](e,n,a),i=!0)}catch(r){}return i}function Q(t,e,n){var a=t.length;try{for(var i=0;i<a&&!(i in t&&-1===e.call(n||t,t[i],i,t));i++);}catch(r){}}function Z(){var t=Date;return t.now?t.now():(new t).getTime()}var tt="window",et="JSON";function nt(t){var e=g();return e&&e[t]?e[t]:t===tt&&at()?window:null}function at(){return!(typeof window!==i||!window)}function it(){return at()?window:nt(tt)}function rt(){return typeof document===i&&document?document:nt("document")}function ot(){return typeof location===i&&location?location:nt("location")}function st(){return typeof JSON===i&&JSON||null!==nt(et)}function ct(){return st()?JSON||nt(et):null}function lt(t){var e=Object[o].toString.call(t),n="";return"[object Error]"===e?n="{ stack: '"+t.stack+"', message: '"+t.message+"', name: '"+t.name+"'":st()&&(n=ct().stringify(t)),e+n}var ut=null;function ft(t){return t?'"'+t.replace(/\"/g,"")+'"':""}function gt(t,e){var n,a=typeof console!==r?console:nt("console");a&&(n="log",Y(a[n=a[t]?t:n])&&a[n](e))}var pt=(dt.dataType="MessageData",dt);function dt(t,e,n,a){void 0===n&&(n=!1),this.messageId=t,this.message=(n?"AI: ":"AI (Internal): ")+t;t="";st()&&(t=ct().stringify(a));t=(e?" message:"+ft(e):"")+(a?" props:"+ft(t):"");this.message+=t}var ht=function Wt(i){this.identifier="DiagnosticLogger",this.queue=[];var s=0,c={};j(Wt,this,function(r){function t(t,e){t=i[t];return X(t)?e:t}function o(t,e){var n,a=(a=(a=ut)||!0===i.disableDbgExt?a:ut||(n=nt("Microsoft"),ut=n?n.ApplicationInsights:ut))?a.ChromeDbgExt:null;a&&a.diagLog&&a.diagLog(t,e)}X(i)&&(i={}),r.consoleLoggingLevel=function(){return t("loggingLevelConsole",0)},r.telemetryLoggingLevel=function(){return t("loggingLevelTelemetry",1)},r.maxInternalMessageLimit=function(){return t("maxMessageLimit",25)},r.enableDebugExceptions=function(){return t("enableDebugExceptions",!1)},r.throwInternal=function(t,e,n,a,i){e=new pt(e,n,i=void 0!==i&&i,a);if(r.enableDebugExceptions())throw e;n=t===H.CRITICAL?"errorToConsole":"warnToConsole";J(e.message)?o("throw"+(t===H.CRITICAL?"Critical":"Warning"),e):(a=r.consoleLoggingLevel(),i?(i=+e.messageId,!c[i]&&t<=a&&(r[n](e.message),c[i]=!0)):t<=a&&r[n](e.message),r.logInternalMessage(t,e))},r.warnToConsole=function(t){gt("warn",t),o("warning",t)},r.errorToConsole=function(t){gt("error",t),o("error",t)},r.resetInternalMessageCount=function(){s=0,c={}},r.logInternalMessage=function(t,e){var n,a;s>=r.maxInternalMessageLimit()||(a=!0,n="AITR_"+e.messageId,c[n]?a=!1:c[n]=!0,a&&(t<=r.telemetryLoggingLevel()&&(r.queue.push(e),s++,o(t===H.CRITICAL?"error":"warn",e)),s===r.maxInternalMessageLimit()&&(e=new pt(K.MessageLimitPerPVExceeded,a="Internal events throttle limit per PageView reached for this app.",!1),r.queue.push(e),t===H.CRITICAL?r.errorToConsole(a):r.warnToConsole(a))))}})},vt=(mt.ParentContextKey="parent",mt.ChildrenContextKey="childEvts",mt);function mt(t,i,e){var a,r=this,o=!1;r.start=Z(),r.name=t,r.isAsync=e,r.isChildEvt=function(){return!1},Y(i)&&(o=function(t){if(W)try{var e={enumerable:!0,configurable:!0,get:function(){return!a&&Y(i)&&(a=i(),i=null),a}};return W(t,"payload",e),!0}catch(n){}return!1}(r)),r.getCtx=function(t){return t?(t===mt.ParentContextKey||t===mt.ChildrenContextKey?r:r.ctx||{})[t]:null},r.setCtx=function(t,e){t&&(t===mt.ParentContextKey?(r[t]||(r.isChildEvt=function(){return!0}),r[t]=e):t===mt.ChildrenContextKey?r[t]=e:(r.ctx=r.ctx||{})[t]=e)},r.complete=function(){var t=0,e=r.getCtx(mt.ChildrenContextKey);if("[object Array]"===G(e))for(var n=0;n<e.length;n++){var a=e[n];a&&(t+=a.time)}r.time=Z()-r.start,r.exTime=r.time-t,r.complete=function(){},!o&&Y(i)&&(r.payload=i())}}var Tt="CoreUtils.doPerf";function Ct(t,e,n,a,i){if(t){var r=t;if(r=Y(r.getPerfMgr)?r.getPerfMgr():r){var o,s=void 0,t=r.getCtx(Tt);try{if(s=r.create(e(),a,i))return t&&s.setCtx&&(s.setCtx(vt.ParentContextKey,t),t.getCtx&&t.setCtx&&((o=t.getCtx(vt.ChildrenContextKey))||(o=[],t.setCtx(vt.ChildrenContextKey,o)),o.push(s))),r.setCtx(Tt,s),n(s)}catch(c){s&&s.setCtx&&s.setCtx("exception",c)}finally{s&&r.fire(s),r.setCtx(Tt,t)}}}return n()}var yt=function(i,e){var r=this,o=null,s=Y(i.processTelemetry),c=Y(i.setNextPlugin);r._hasRun=!1,r.getPlugin=function(){return i},r.getNext=function(){return o},r.setNext=function(t){o=t},r.processTelemetry=function(n,a){a=a||e;var t=i?i.identifier:"TelemetryPluginChain";Ct(a?a.core():null,function(){return t+":processTelemetry"},function(){if(i&&s){r._hasRun=!0;try{a.setNext(o),c&&i.setNextPlugin(o),o&&(o._hasRun=!1),i.processTelemetry(n,a)}catch(e){var t=o&&o._hasRun;o&&t||a.diagLog().throwInternal(H.CRITICAL,K.PluginException,"Plugin ["+i.identifier+"] failed during processTelemetry - "+lt(e)),o&&!t&&o.processTelemetry(n,a)}}else o&&(r._hasRun=!0,o.processTelemetry(n,a))},function(){return{item:n}},!n.sync)}};function _t(t,e){var n=[];if(t&&0<t.length)for(var a=null,i=0;i<t.length;i++){var r=t[i];r&&Y(r.processTelemetry)&&(r=new yt(r,e),n.push(r),a&&a.setNext(r),a=r)}return 0<n.length?n[0]:null}var It=function Gt(t,i,n,e){var a,r,o,s,c=this,l=null;null!==e&&(t&&Y(t.getPlugin)?l=function(t,e,n){var a=[],i=!n;if(t)for(;t;){var r=t.getPlugin();!i&&r!==n||(i=!0,a.push(r)),t=t.getNext()}return i||a.push(n),_t(a,e)}(t,c,e||t.getPlugin()):e?(a=c,o=t,s=!1,(r=e)&&t&&(o=[],Q(t,function(t){!s&&t!==r||(s=!0,o.push(t))})),r&&!s&&(o=o||[]).push(r),l=_t(o,a)):J(e)&&(l=_t(t,c))),c.core=function(){return n},c.diagLog=function(){return(n||{}).logger||new ht(i)},c.getCfg=function(){return i},c.getExtCfg=function(t,e){var n,a;return void 0===e&&(e={}),!i||(a=i.extensionConfig)&&t&&(n=a[t]),n||e},c.getConfig=function(t,e,n){var a;void 0===n&&(n=!1);t=c.getExtCfg(t,null);return t&&!X(t[e])?a=t[e]:i&&!X(i[e])&&(a=i[e]),X(a)?n:a},c.hasNext=function(){return null!=l},c.getNext=function(){return l},c.setNext=function(t){l=t},c.processNext=function(t){var e=l;e&&(l=e.getNext(),e.processTelemetry(t,c))},c.createNew=function(t,e){return new Gt((t=void 0===t?null:t)||l,i,n,e)}},bt="getPlugin",u=(xt.prototype.initialize=function(t,e,n,a){this._baseTelInit(t,e,n,a)},xt);function xt(){var s=this,c=!1,l=null,u=null;s.core=null,s.diagLog=function(t){return s._getTelCtx(t).diagLog()},s.isInitialized=function(){return c},s.setInitialized=function(t){c=t},s.setNextPlugin=function(t){u=t},s.processNext=function(t,e){e?e.processNext(t):u&&Y(u.processTelemetry)&&u.processTelemetry(t,null)},s._getTelCtx=function(t){var e=t=void 0===t?null:t;return e||(t=l||new It(null,{},s.core),e=u&&u[bt]?t.createNew(null,u[bt]):t.createNew(null,u)),e},s._baseTelInit=function(t,e,n,a){var i,r;t&&(i="extensionConfig",o=r=[],!t||(o=t[i])!==r&&X(o)&&(t[i]=o=r)),!a&&e&&(a=e.getProcessTelContext().getNext());var o=u;u&&u[bt]&&(o=u[bt]()),s.core=e,l=new It(a,t,e,o),c=!0}}var At="not_specified",Pt=e(e({},K),{CannotParseAiBlobValue:101,InvalidContentBlob:102,TrackPageActionEventFailed:103});function Nt(t){for(var e in t)Dt(t[e])&&("{}"!==JSON.stringify(t[e])||"callback"===e)||delete t[e]}function Dt(t){return!(X(t)||""===t)}function Et(t,e){return Dt(t.getAttribute(e))}function kt(t,e,n){var a=t;if(a){for(;!e(a,n);)if(!(a=a.parentNode)||!a.getAttribute)return null;return a}}function wt(t){return"A"===t.nodeName}function St(){var i={},r=!1,t=0,e=arguments.length,o=Object.prototype,n=arguments;for("[object Boolean]"===o.toString.call(n[0])&&(r=n[0],t++);t<e;t++)!function(t){for(var e in t)a=e,(n=t)&&f.call(n,a)&&(r&&"[object Object]"===o.toString.call(t[e])?i[e]=St(!0,i[e],t[e]):i[e]=t[e]);var n,a}(n[t]);return i}function Mt(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},i=[];for(e in a)"object"==typeof a[e]&&i.push(e);if(t)return function(t,e){for(var n in Nt(t),e)e.hasOwnProperty(n)&&("object"==typeof t[n=e[n]]?Nt(t[n]):delete t[n])}(t,i),Dt(t.dataTags)&&(t.dataTags.customDataPrefix=Dt((n=t).dataTags.customDataPrefix)&&!n.dataTags.customDataPrefix.indexOf("data-")?t.dataTags.customDataPrefix:"data-"),St(!0,a,t)}var Lt={BUTTON:!0,CHECKBOX:!0,RADIO:!0,RESET:!0,SUBMIT:!0},e=(Ot.prototype.setBasicProperties=function(t,e){var n;Dt(t.name)||(t.pageName=function(t){if(e&&e.pageName)return e.pageName;if(t.callback&&Y(t.callback.pageName))return t.callback.pageName();if(t.coreData&&t.coreData.pageName)return t.coreData.pageName;t=rt();return t&&t.title||""}(this._config)),!Dt(t.uri)&&at&&(t.uri=(n=this._config,t=ot(),n.coreData&&n.coreData.requestUri&&""!==n.coreData.requestUri?n.coreData.requestUri:t?t.protocol+"//"+(t.hostname||t.host)+(Dt(t.port)?":"+t.port:"")+t.pathname:null))},Ot.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"),Dt(e.pageType)&&(t.pageType=e.pageType),Dt(this._pageTypeMetaTag)&&!Dt(t.pageType)&&(t.pageType=this._pageTypeMetaTag)},Ot.prototype._setPageTags=function(t,e){if(this._pageTagsCallback&&(this._pageTags=St(!0,this._pageTags,this._pageTagsCallback())),Dt(e.pageTags)&&(this._pageTags=St(!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},Ot.prototype._getBehavior=function(t){var e;return t&&Dt(t.behavior)?e=t.behavior:Dt(this._behaviorMetaTag)&&(e=this._behaviorMetaTag),this._getValidBehavior(e)},Ot.prototype._getValidBehavior=function(t){return this._config.behaviorValidator(t)},Ot.prototype._getMetaData=function(t,e,n){return e&&e[n]?e[n]:t?t[n]:""},Ot);function Ot(t,e,n,a,i,r){this._clickAnalyticsPlugin=t,this._config=e,this._contentHandler=n,this._pageTagsCallback=a,this._metaTags=i,this._traceLogger=r,this._pageTags={}}var Ft,Bt=(h(Rt,Ft=e),Rt.prototype.trackPageAction=function(t,e){var a=this,i={name:"Microsoft.ApplicationInsights.{0}.Event",baseType:"EventData",ext:{web:{}},data:{},baseData:{}};this._populateEventDataIfPresent(i.baseData,"name",t.name),this._populateEventDataIfPresent(i.data,"baseTypeSource","ClickEvent"),this._populateEventDataIfPresent(i.data,"uri",t.uri),this._populateEventDataIfPresent(i.data,"pageType",t.pageType),this._populateEventDataIfPresent(i.data,"properties",t.properties),this._populateEventDataIfPresent(i.data,"actionType",t.actionType),this._populateEventDataIfPresent(i.data,"behavior",t.behavior),this._populateEventDataIfPresent(i.data,"clickCoordinates",t.clickCoordinates),this._populateEventDataIfPresent(i.data,"content",t.content),this._populateEventDataIfPresent(i.data,"targetUri",t.targetUri),this._populateEventDataIfPresent(i.data,"timeToAction",t.timeToAction),this._populateEventDataIfPresent(i.data,"refUri",t.refUri),this._populateEventDataIfPresent(i.data,"pageName",t.pageName),this._populateEventDataIfPresent(i.data,"parentId",t.parentId),e&&function(t){if(t)for(var e in t)f.call(t,e)&&(n=e,e=t[e],i.data[n]||a._populateEventDataIfPresent(i.data,n,e));var n}(e),this._clickAnalyticsPlugin.core.track(i)},Rt.prototype.capturePageAction=function(t,e,n,a){e=Dt(e)?e:{};var i={name:""},r=Dt(n)?n:{};this.setCommonProperties(i,e),i.behavior=this._getBehavior(e);var o,n={};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=kt(e,wt);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&&Lt[n.toUpperCase()]&&(n=ot()||{},t=e.form?e.form.action||n.pathname||"":n.pathname||"")}return t}(t),(n=this._contentHandler.getElementContent(t)).bhvr&&!Dt(e.behavior)&&(a="bhvr",(t=n)&&t[a]&&(o=t[a],delete t[a]),o=o,i.behavior=this._getValidBehavior(o)),Dt(n.id)||Dt(n.contentName)||this._traceLogger.throwInternal(H.WARNING,Pt.InvalidContentBlob,"Missing attributes id or contentName in click event. Click event information will still be collected!")),i.name=n.id||n.contentName||At,i.parentId=n.parentid||n.parentName||At,Dt(e.actionType)&&(i.actionType=e.actionType),Dt(e.clickCoordinateX)&&Dt(e.clickCoordinateY)&&(i.clickCoordinates=e.clickCoordinateX+"X"+e.clickCoordinateY),this._sanitizePageActionEventContent(n),i.content="["+JSON.stringify(St(n,e&&e.contentTags?e.contentTags:{}))+"]",i.timeToAction=this._getTimeToClick(),i.refUri=Dt(e.refUri)?e.refUri:this._config.coreData.referrerUri,this._isUndefinedEvent(i)||this.trackPageAction(i,r)},Rt.prototype._getTimeToClick=function(){var t=nt("performance");if(t&&t.timing){t=t.timing.navigationStart;if(t&&0!==t)return(new Date).getTime()-t}return-1},Rt.prototype._populateEventDataIfPresent=function(t,e,n){Dt(n)&&(t[e]=n)},Rt.prototype._sanitizePageActionEventContent=function(t){t&&(delete t.id,delete t.parentid,delete t.parentname,this._config&&this._config.dataTags&&Dt(this._config.dataTags.parentDataTag)&&delete t[this._config.dataTags.parentDataTag])},Rt.prototype._isUndefinedEvent=function(t){return!(!this._config.dropInvalidEvents||t.name!==At||t.parentId!==At||"[{}]"!==t.content)},Rt);function Rt(){return null!==Ft&&Ft.apply(this,arguments)||this}var Ut={BUTTON:!0,CHECKBOX:!0,RADIO:!0,RESET:!0,SUBMIT:!0},Vt=(jt.prototype.click=function(){var e=this,t=it(),n=rt();t?($(t,~navigator.appVersion.indexOf("MSIE")?"click":"mousedown",function(t){e._processClick(t)}),$(t,"keyup",function(t){e._processClick(t)})):n&&($(n,"click",function(t){e._processClick(t)}),$(n,"keyup",function(t){e._processClick(t)}))},jt.prototype.capturePageAction=function(t,e,n,a){Dt(kt(t,Et,this._config.dataTags.customDataPrefix+this._config.dataTags.dntDataTag))||this._pageAction.capturePageAction(t,e,n,a)},jt.prototype._processClick=function(t){var e={A:!0,BUTTON:!0,AREA:!0,INPUT:!0},n=it();if(t=X(t)&&n?n.event:t){var a=t.srcElement||t.target,i={clickCoordinateX:t.pageX,clickCoordinateY:t.pageY},r=function(t){try{if("which"in t)return 3===t.which;if("button"in t)return 2===t.button}catch(e){}}(t);if(r)i.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))i.actionType="CL";else if(function(t){try{if("keyCode"in t)return 13===t.keyCode}catch(e){}}(t))i.actionType="KE";else if(function(t){try{if("keyCode"in t)return 32===t.keyCode}catch(e){}}(t))i.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;i.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&&!Ut[a.type.toUpperCase()]||this.capturePageAction(a,i,{},r);break}a=a.parentElement||a.parentNode}}},jt);function jt(t,e,n,a){this._analyticsPlugin=t,this._config=e,this._pageAction=n,this._traceLogger=a}var Ht=(Kt.prototype.getMetadata=function(){return Dt(this._config.dataTags.metaDataPrefix)?this._getMetaDataFromDOM(this._config.dataTags.captureAllMetaDataContent,this._config.dataTags.metaDataPrefix,!1):this._getMetaDataFromDOM(this._config.dataTags.captureAllMetaDataContent,"",!1)},Kt.prototype.getElementContent=function(t){if(!t)return{};var e,n,a={},i=this._config.dataTags.customDataPrefix,r=i+this._config.dataTags.aiBlobAttributeTag;if(Dt(this._config.dataTags.parentDataTag)&&(n=i+this._config.dataTags.parentDataTag),this._isTracked(t,i,r))a=St(a,this._populateElementContentwithDataTag(t,i,n,r));else if(e=t.getAttribute(r))try{a=JSON.parse(e)}catch(o){this._traceLogger.throwInternal(H.CRITICAL,Pt.CannotParseAiBlobValue,"Can not parse "+e)}else a=St(a,this._populateElementContent(t,i,n,r));return Nt(a),n?St(a,this._getParentDetails(t,a,i,r)):a},Kt.prototype._captureElementContentWithDataTag=function(t,e,n){for(var a,i=0;i<t.attributes.length;i++)(a=t.attributes[i]).name.indexOf(n)||(e[a.name.replace(n,"")]=a.value)},Kt.prototype._walkUpDomChainCaptureData=function(t,e,n,a,i){for(var r=t,o=!1,s=!1;!X(r)&&!X(r.attributes);){for(var c=r.attributes,l=0;l<c.length;l++){var u,f=c[l];f.name.indexOf(n)||(f.name.indexOf(a)||(o=!0),f.name.indexOf(i)&&(u=f.name.replace(n,""),s&&"id"===u||Dt(e[u])||(e[u]=f.value)))}if(o)break;s=!0,r=r.parentNode}},Kt.prototype._populateElementContent=function(t,e,n,a){var i={};if(!t)return i;var r=this._getHtmlIdAndContentName(t),i={id:r.id||"",contentName:r.contentName||""};return Dt(n)&&this._walkUpDomChainCaptureData(t,i,e,n,a),i.id||i.contentName||this._traceLogger.throwInternal(H.WARNING,Pt.InvalidContentBlob,"Invalid content blob. Missing required attributes (id, contentName. Content information will still be collected!"),i},Kt.prototype._populateElementContentwithDataTag=function(t,e,n,a){var i={};if(!t)return i;var r=this._getHtmlIdAndContentName(t);return Dt(n)?this._walkUpDomChainCaptureData(t,i,e,n,a):this._captureElementContentWithDataTag(t,i,e),this._config.dataTags.useDefaultContentNameOrId&&(Dt(i.id)||(i.id=r.id||""),i.contentName=r.contentName||""),i.id||i.contentName||this._traceLogger.throwInternal(H.WARNING,Pt.InvalidContentBlob,"Invalid content blob. Missing required attributes (id, contentName. Content information will still be collected!"),i},Kt.prototype._getMetaDataFromDOM=function(t,e,n){for(var a={},i=document.querySelectorAll("meta"),r=0;r<i.length;r++){var o=i[r];o.name&&(!t&&o.name.indexOf(e)||(a[n?o.name.replace(e,""):o.name]=o.content))}return a},Kt.prototype._getDefaultContentName=function(t,e){if(!1===e||!t.tagName)return"";var n,a=rt()||{};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)},Kt.prototype._isTracked=function(t,e,n){for(var a=t.attributes,i=!1,r=0;r<a.length;r++){var o=a[r].name;if(o===n)return!1;o.indexOf(e)||(i=!0)}return i},Kt.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},Kt.prototype._getParentDetails=function(t,e,n,a){var i=e.parentid,e=e.parentname;return i||e||!t?{}:this._populateParentInfo(t,n,a)},Kt.prototype._populateParentInfo=function(t,e,n){var a,i={},r=kt(t.parentElement,this._isTracked,e);if(r){n=r.getAttribute(n)||t[n];if(n){try{var o=JSON.parse(n)}catch(s){this._traceLogger.throwInternal(H.CRITICAL,Pt.CannotParseAiBlobValue,"Can not parse "+n)}o&&(a=o.id)}else a=r.getAttribute(e+"id")}return a?i.parentid=a:(t=this._getHtmlIdAndContentName(t.parentElement),i.parentid=t.id,i.parentname=t.contentName),i},Kt);function Kt(t,e){this._config=t,this._traceLogger=e}var qt,u=(h(zt,qt=u),zt.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=Mt(t.extensionConfig[this.identifier]),qt.prototype.initialize.call(this,t,e,n,a),this._contentHandler=this._contentHandler||new Ht(this._config,this.diagLog());var i,a=this._contentHandler.getMetadata();this.pageAction=new Bt(this,this._config,this._contentHandler,this._config.callback.pageActionPageTags,a,this.diagLog()),this._autoCaptureHandler=this._autoCaptureHandler||new Vt(this,this._config,this.pageAction,this.diagLog()),this._config.autoCapture&&this._autoCaptureHandler.click(),Q(n,function(t){"AppInsightsPropertiesPlugin"===t.identifier&&(i=t)}),i&&i.context&&i.context.internal&&i.context.internal.sdkVersion&&(i.context.internal.sdkVersion+="_ClickPlugin"+zt.Version)},zt.prototype.processTelemetry=function(t,e){this.processNext(t,e)},zt.prototype.trackPageAction=function(t,e){try{this.pageAction.trackPageAction(t,e)}catch(n){this.diagLog().throwInternal(H.CRITICAL,Pt.TrackPageActionEventFailed,"trackPageAction failed, page action event will not be collected: "+("[object Error]"===G(e=n)?e.name:""),{exception:lt(n)})}},zt.Version="2.7.3-nightly.2112-07",zt);function zt(){var t=null!==qt&&qt.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 Q(t,function(t){if(t===e)return n=t,-1}),n||""}},t.ClickAnalyticsPlugin=u,function(t,e,n){var a=Object.defineProperty;if(a)try{return a(t,e,n)}catch(i){}typeof n.value!==undefined&&(t[e]=n.value)}(t,"__esModule",{value:!0})};"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 a="function",i="object",r="undefined",o="prototype",s="hasOwnProperty",n=Object,c=n[o],e=n.assign,l=n.create,u=n.defineProperty,f=c[s];function g(){return typeof globalThis!==r&&globalThis?globalThis:typeof self!==r&&self?self:typeof window!==r&&window?window:typeof global!==r&&global?global:null}function p(t){throw new TypeError(t)}(g()||{}).Symbol,(g()||{}).Reflect;var e=e||function(t){for(var e,n=1,a=arguments.length;n<a;n++)for(var i in e=arguments[n])c[s].call(e,i)&&(t[i]=e[i]);return t},d=function(t,e){return(d=n.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e[s](n)&&(t[n]=e[n])})(t,e)};function h(t,e){function n(){this.constructor=t}typeof e!==a&&null!==e&&p("Class extends value "+e+" is not a constructor or null"),d(t,e),t[o]=null===e?function(t){if(l)return l(t);if(null==t)return{};var e=typeof t;function n(){}return e!==i&&e!==a&&p("Object prototype may only be an Object:"+t),n[o]=t,new n}(e):(n[o]=e[o],new n)}var v="constructor",m="prototype",T="function",C="_dynInstFuncs",y="_isDynProxy",_="_dynClass",I="_dynInstChk",b=I,x="_dfOpts",A="_unknown_",P="__proto__",N="useBaseInst",D="setInstFuncs",E=Object,k=E.getPrototypeOf,w=0;function S(t,e){return t&&E[m].hasOwnProperty.call(t,e)}function M(t){return t&&(t===E[m]||t===Array[m])}function L(t){return M(t)||t===Function[m]}function O(t){if(t){if(k)return k(t);t=t[P]||t[m]||(t[v]?t[v][m]:null);if(t)return t}return null}function F(t,e){var n=[],a=E.getOwnPropertyNames;if(a)n=a(t);else for(var i in t)"string"==typeof i&&S(t,i)&&n.push(i);if(n&&0<n.length)for(var r=0;r<n.length;r++)e(n[r])}function B(t,e,n){return e!==v&&typeof t[e]===T&&(n||S(t,e))}function R(t){throw new TypeError("DynamicProto: "+t)}function U(t,e){for(var n=t.length-1;0<=n;n--)if(t[n]===e)return 1}function V(t,e){return S(t,m)?t.name||e||A:((t||{})[v]||{}).name||e||A}function j(t,a,e,n){S(t,m)||R("theClass is an invalid class definition.");var i=t[m];!function(t){if(k)for(var e=[],n=O(a);n&&!L(n)&&!U(e,n);){if(n===t)return 1;e.push(n),n=O(n)}}(i)&&R("["+V(t)+"] is not in class hierarchy of ["+V(a)+"]");var r=null;S(i,_)?r=i[_]:(r="_dynCls$"+V(t,"_")+"$"+w,w++,i[_]=r);var o=j[x],s=!!o[N];s&&n&&n[N]!==undefined&&(s=!!n[N]);var c,l,t=(l={},F(c=a,function(t){!l[t]&&B(c,t,!1)&&(l[t]=c[t])}),l);e(a,function(t,e,n,r){function a(t,e,n){var a,i=e[n];return i[y]&&r&&!1!==(a=t[C]||{})[b]&&(i=(a[e[_]]||{})[n]||i),function(){return i.apply(t,arguments)}}var i={};F(n,function(t){i[t]=a(e,n,t)});for(var o=O(t),s=[];o&&!L(o)&&!U(s,o);)F(o,function(t){!i[t]&&B(o,t,!k)&&(i[t]=a(e,o,t))}),s.push(o),o=O(o);return i}(i,a,t,s));var u,f,g,p,o=!!k&&!!o[D];u=i,r=r,f=a,g=t,n=!1!==(o=o&&n?!!n[D]:o),M(u)||(o=f[C]=f[C]||{},p=o[r]=o[r]||{},!1!==o[b]&&(o[b]=!!n),F(f,function(t){var n,a,i;B(f,t,!1)&&f[t]!==g[t]&&(p[t]=f[t],delete f[t],S(u,t)&&(!u[t]||u[t][y])||(u[t]=(n=u,a=t,(i=function(){var t,e;return(function(t,e,n,a){var i=null;if(t&&S(n,_)){var r=t[C]||{};if((i=(r[n[_]]||{})[e])||R("Missing ["+e+"] "+T),!i[I]&&!1!==r[b]){for(var o=!S(t,e),s=O(t),c=[];o&&s&&!L(s)&&!U(c,s);){var l=s[e];if(l){o=l===a;break}c.push(s),s=O(s)}try{o&&(t[e]=i),i[I]=1}catch(u){r[b]=!1}}}return i}(this,a,n,i)||(typeof(e=(e=n[t=a])===i?O(n)[t]:e)!==T&&R("["+t+"] is not a "+T),e)).apply(this,arguments)})[y]=1,i)))}))}j[x]={setInstFuncs:!0,useBaseInst:!0};var H={CRITICAL:1,1:"CRITICAL",WARNING:2,2:"WARNING"},K={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},q="attachEvent",z="addEventListener",W=u;function G(t){return c.toString.call(t)}function J(t){return t===undefined||typeof t===r}function X(t){return null===t||J(t)}function Y(t){return typeof t===a}function $(t,e,n,a){void 0===a&&(a=!1);var i=!1;if(!X(t))try{X(t[z])?X(t[q])||(t[q]("on"+e,n),i=!0):(t[z](e,n,a),i=!0)}catch(r){}return i}function Q(t,e,n){var a=t.length;try{for(var i=0;i<a&&!(i in t&&-1===e.call(n||t,t[i],i,t));i++);}catch(r){}}function Z(){var t=Date;return t.now?t.now():(new t).getTime()}var tt="window",et="JSON";function nt(t){var e=g();return e&&e[t]?e[t]:t===tt&&at()?window:null}function at(){return!(typeof window!==i||!window)}function it(){return at()?window:nt(tt)}function rt(){return typeof document===i&&document?document:nt("document")}function ot(){return typeof location===i&&location?location:nt("location")}function st(){return typeof JSON===i&&JSON||null!==nt(et)}function ct(){return st()?JSON||nt(et):null}function lt(t){var e=Object[o].toString.call(t),n="";return"[object Error]"===e?n="{ stack: '"+t.stack+"', message: '"+t.message+"', name: '"+t.name+"'":st()&&(n=ct().stringify(t)),e+n}var ut=null;function ft(t){return t?'"'+t.replace(/\"/g,"")+'"':""}function gt(t,e){var n,a=typeof console!==r?console:nt("console");a&&(n="log",Y(a[n=a[t]?t:n])&&a[n](e))}var pt=(dt.dataType="MessageData",dt);function dt(t,e,n,a){void 0===n&&(n=!1),this.messageId=t,this.message=(n?"AI: ":"AI (Internal): ")+t;t="";st()&&(t=ct().stringify(a));t=(e?" message:"+ft(e):"")+(a?" props:"+ft(t):"");this.message+=t}var ht=function Wt(i){this.identifier="DiagnosticLogger",this.queue=[];var s=0,c={};j(Wt,this,function(r){function t(t,e){t=i[t];return X(t)?e:t}function o(t,e){var n,a=(a=(a=ut)||!0===i.disableDbgExt?a:ut||(n=nt("Microsoft"),ut=n?n.ApplicationInsights:ut))?a.ChromeDbgExt:null;a&&a.diagLog&&a.diagLog(t,e)}X(i)&&(i={}),r.consoleLoggingLevel=function(){return t("loggingLevelConsole",0)},r.telemetryLoggingLevel=function(){return t("loggingLevelTelemetry",1)},r.maxInternalMessageLimit=function(){return t("maxMessageLimit",25)},r.enableDebugExceptions=function(){return t("enableDebugExceptions",!1)},r.throwInternal=function(t,e,n,a,i){e=new pt(e,n,i=void 0!==i&&i,a);if(r.enableDebugExceptions())throw e;n=t===H.CRITICAL?"errorToConsole":"warnToConsole";J(e.message)?o("throw"+(t===H.CRITICAL?"Critical":"Warning"),e):(a=r.consoleLoggingLevel(),i?(i=+e.messageId,!c[i]&&t<=a&&(r[n](e.message),c[i]=!0)):t<=a&&r[n](e.message),r.logInternalMessage(t,e))},r.warnToConsole=function(t){gt("warn",t),o("warning",t)},r.errorToConsole=function(t){gt("error",t),o("error",t)},r.resetInternalMessageCount=function(){s=0,c={}},r.logInternalMessage=function(t,e){var n,a;s>=r.maxInternalMessageLimit()||(a=!0,n="AITR_"+e.messageId,c[n]?a=!1:c[n]=!0,a&&(t<=r.telemetryLoggingLevel()&&(r.queue.push(e),s++,o(t===H.CRITICAL?"error":"warn",e)),s===r.maxInternalMessageLimit()&&(e=new pt(K.MessageLimitPerPVExceeded,a="Internal events throttle limit per PageView reached for this app.",!1),r.queue.push(e),t===H.CRITICAL?r.errorToConsole(a):r.warnToConsole(a))))}})},vt=(mt.ParentContextKey="parent",mt.ChildrenContextKey="childEvts",mt);function mt(t,i,e){var a,r=this,o=!1;r.start=Z(),r.name=t,r.isAsync=e,r.isChildEvt=function(){return!1},Y(i)&&(o=function(t){if(W)try{var e={enumerable:!0,configurable:!0,get:function(){return!a&&Y(i)&&(a=i(),i=null),a}};return W(t,"payload",e),!0}catch(n){}return!1}(r)),r.getCtx=function(t){return t?(t===mt.ParentContextKey||t===mt.ChildrenContextKey?r:r.ctx||{})[t]:null},r.setCtx=function(t,e){t&&(t===mt.ParentContextKey?(r[t]||(r.isChildEvt=function(){return!0}),r[t]=e):t===mt.ChildrenContextKey?r[t]=e:(r.ctx=r.ctx||{})[t]=e)},r.complete=function(){var t=0,e=r.getCtx(mt.ChildrenContextKey);if("[object Array]"===G(e))for(var n=0;n<e.length;n++){var a=e[n];a&&(t+=a.time)}r.time=Z()-r.start,r.exTime=r.time-t,r.complete=function(){},!o&&Y(i)&&(r.payload=i())}}var Tt="CoreUtils.doPerf";function Ct(t,e,n,a,i){if(t){var r=t;if(r=Y(r.getPerfMgr)?r.getPerfMgr():r){var o,s=void 0,t=r.getCtx(Tt);try{if(s=r.create(e(),a,i))return t&&s.setCtx&&(s.setCtx(vt.ParentContextKey,t),t.getCtx&&t.setCtx&&((o=t.getCtx(vt.ChildrenContextKey))||(o=[],t.setCtx(vt.ChildrenContextKey,o)),o.push(s))),r.setCtx(Tt,s),n(s)}catch(c){s&&s.setCtx&&s.setCtx("exception",c)}finally{s&&r.fire(s),r.setCtx(Tt,t)}}}return n()}var yt=function(i,e){var r=this,o=null,s=Y(i.processTelemetry),c=Y(i.setNextPlugin);r._hasRun=!1,r.getPlugin=function(){return i},r.getNext=function(){return o},r.setNext=function(t){o=t},r.processTelemetry=function(n,a){a=a||e;var t=i?i.identifier:"TelemetryPluginChain";Ct(a?a.core():null,function(){return t+":processTelemetry"},function(){if(i&&s){r._hasRun=!0;try{a.setNext(o),c&&i.setNextPlugin(o),o&&(o._hasRun=!1),i.processTelemetry(n,a)}catch(e){var t=o&&o._hasRun;o&&t||a.diagLog().throwInternal(H.CRITICAL,K.PluginException,"Plugin ["+i.identifier+"] failed during processTelemetry - "+lt(e)),o&&!t&&o.processTelemetry(n,a)}}else o&&(r._hasRun=!0,o.processTelemetry(n,a))},function(){return{item:n}},!n.sync)}};function _t(t,e){var n=[];if(t&&0<t.length)for(var a=null,i=0;i<t.length;i++){var r=t[i];r&&Y(r.processTelemetry)&&(r=new yt(r,e),n.push(r),a&&a.setNext(r),a=r)}return 0<n.length?n[0]:null}var It=function Gt(t,i,n,e){var a,r,o,s,c=this,l=null;null!==e&&(t&&Y(t.getPlugin)?l=function(t,e,n){var a=[],i=!n;if(t)for(;t;){var r=t.getPlugin();!i&&r!==n||(i=!0,a.push(r)),t=t.getNext()}return i||a.push(n),_t(a,e)}(t,c,e||t.getPlugin()):e?(a=c,o=t,s=!1,(r=e)&&t&&(o=[],Q(t,function(t){!s&&t!==r||(s=!0,o.push(t))})),r&&!s&&(o=o||[]).push(r),l=_t(o,a)):J(e)&&(l=_t(t,c))),c.core=function(){return n},c.diagLog=function(){return(n||{}).logger||new ht(i)},c.getCfg=function(){return i},c.getExtCfg=function(t,e){var n,a;return void 0===e&&(e={}),!i||(a=i.extensionConfig)&&t&&(n=a[t]),n||e},c.getConfig=function(t,e,n){var a;void 0===n&&(n=!1);t=c.getExtCfg(t,null);return t&&!X(t[e])?a=t[e]:i&&!X(i[e])&&(a=i[e]),X(a)?n:a},c.hasNext=function(){return null!=l},c.getNext=function(){return l},c.setNext=function(t){l=t},c.processNext=function(t){var e=l;e&&(l=e.getNext(),e.processTelemetry(t,c))},c.createNew=function(t,e){return new Gt((t=void 0===t?null:t)||l,i,n,e)}},bt="getPlugin",u=(xt.prototype.initialize=function(t,e,n,a){this._baseTelInit(t,e,n,a)},xt);function xt(){var s=this,c=!1,l=null,u=null;s.core=null,s.diagLog=function(t){return s._getTelCtx(t).diagLog()},s.isInitialized=function(){return c},s.setInitialized=function(t){c=t},s.setNextPlugin=function(t){u=t},s.processNext=function(t,e){e?e.processNext(t):u&&Y(u.processTelemetry)&&u.processTelemetry(t,null)},s._getTelCtx=function(t){var e=t=void 0===t?null:t;return e||(t=l||new It(null,{},s.core),e=u&&u[bt]?t.createNew(null,u[bt]):t.createNew(null,u)),e},s._baseTelInit=function(t,e,n,a){var i,r;t&&(i="extensionConfig",o=r=[],!t||(o=t[i])!==r&&X(o)&&(t[i]=o=r)),!a&&e&&(a=e.getProcessTelContext().getNext());var o=u;u&&u[bt]&&(o=u[bt]()),s.core=e,l=new It(a,t,e,o),c=!0}}var At="not_specified",Pt=e(e({},K),{CannotParseAiBlobValue:101,InvalidContentBlob:102,TrackPageActionEventFailed:103});function Nt(t){for(var e in t)Dt(t[e])&&("{}"!==JSON.stringify(t[e])||"callback"===e)||delete t[e]}function Dt(t){return!(X(t)||""===t)}function Et(t,e){return Dt(t.getAttribute(e))}function kt(t,e,n){var a=t;if(a){for(;!e(a,n);)if(!(a=a.parentNode)||!a.getAttribute)return null;return a}}function wt(t){return"A"===t.nodeName}function St(){var i={},r=!1,t=0,e=arguments.length,o=Object.prototype,n=arguments;for("[object Boolean]"===o.toString.call(n[0])&&(r=n[0],t++);t<e;t++)!function(t){for(var e in t)a=e,(n=t)&&f.call(n,a)&&(r&&"[object Object]"===o.toString.call(t[e])?i[e]=St(!0,i[e],t[e]):i[e]=t[e]);var n,a}(n[t]);return i}function Mt(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},i=[];for(e in a)"object"==typeof a[e]&&i.push(e);if(t)return function(t,e){for(var n in Nt(t),e)e.hasOwnProperty(n)&&("object"==typeof t[n=e[n]]?Nt(t[n]):delete t[n])}(t,i),Dt(t.dataTags)&&(t.dataTags.customDataPrefix=Dt((n=t).dataTags.customDataPrefix)&&!n.dataTags.customDataPrefix.indexOf("data-")?t.dataTags.customDataPrefix:"data-"),St(!0,a,t)}var Lt={BUTTON:!0,CHECKBOX:!0,RADIO:!0,RESET:!0,SUBMIT:!0},e=(Ot.prototype.setBasicProperties=function(t,e){var n;Dt(t.name)||(t.pageName=function(t){if(e&&e.pageName)return e.pageName;if(t.callback&&Y(t.callback.pageName))return t.callback.pageName();if(t.coreData&&t.coreData.pageName)return t.coreData.pageName;t=rt();return t&&t.title||""}(this._config)),!Dt(t.uri)&&at&&(t.uri=(n=this._config,t=ot(),n.coreData&&n.coreData.requestUri&&""!==n.coreData.requestUri?n.coreData.requestUri:t?t.protocol+"//"+(t.hostname||t.host)+(Dt(t.port)?":"+t.port:"")+t.pathname:null))},Ot.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"),Dt(e.pageType)&&(t.pageType=e.pageType),Dt(this._pageTypeMetaTag)&&!Dt(t.pageType)&&(t.pageType=this._pageTypeMetaTag)},Ot.prototype._setPageTags=function(t,e){if(this._pageTagsCallback&&(this._pageTags=St(!0,this._pageTags,this._pageTagsCallback())),Dt(e.pageTags)&&(this._pageTags=St(!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},Ot.prototype._getBehavior=function(t){var e;return t&&Dt(t.behavior)?e=t.behavior:Dt(this._behaviorMetaTag)&&(e=this._behaviorMetaTag),this._getValidBehavior(e)},Ot.prototype._getValidBehavior=function(t){return this._config.behaviorValidator(t)},Ot.prototype._getMetaData=function(t,e,n){return e&&e[n]?e[n]:t?t[n]:""},Ot);function Ot(t,e,n,a,i,r){this._clickAnalyticsPlugin=t,this._config=e,this._contentHandler=n,this._pageTagsCallback=a,this._metaTags=i,this._traceLogger=r,this._pageTags={}}var Ft,Bt=(h(Rt,Ft=e),Rt.prototype.trackPageAction=function(t,e){var a=this,i={name:"Microsoft.ApplicationInsights.{0}.Event",baseType:"EventData",ext:{web:{}},data:{},baseData:{}};this._populateEventDataIfPresent(i.baseData,"name",t.name),this._populateEventDataIfPresent(i.data,"baseTypeSource","ClickEvent"),this._populateEventDataIfPresent(i.data,"uri",t.uri),this._populateEventDataIfPresent(i.data,"pageType",t.pageType),this._populateEventDataIfPresent(i.data,"properties",t.properties),this._populateEventDataIfPresent(i.data,"actionType",t.actionType),this._populateEventDataIfPresent(i.data,"behavior",t.behavior),this._populateEventDataIfPresent(i.data,"clickCoordinates",t.clickCoordinates),this._populateEventDataIfPresent(i.data,"content",t.content),this._populateEventDataIfPresent(i.data,"targetUri",t.targetUri),this._populateEventDataIfPresent(i.data,"timeToAction",t.timeToAction),this._populateEventDataIfPresent(i.data,"refUri",t.refUri),this._populateEventDataIfPresent(i.data,"pageName",t.pageName),this._populateEventDataIfPresent(i.data,"parentId",t.parentId),e&&function(t){if(t)for(var e in t)f.call(t,e)&&(n=e,e=t[e],i.data[n]||a._populateEventDataIfPresent(i.data,n,e));var n}(e),this._clickAnalyticsPlugin.core.track(i)},Rt.prototype.capturePageAction=function(t,e,n,a){e=Dt(e)?e:{};var i={name:""},r=Dt(n)?n:{};this.setCommonProperties(i,e),i.behavior=this._getBehavior(e);var o,n={};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=kt(e,wt);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&&Lt[n.toUpperCase()]&&(n=ot()||{},t=e.form?e.form.action||n.pathname||"":n.pathname||"")}return t}(t),(n=this._contentHandler.getElementContent(t)).bhvr&&!Dt(e.behavior)&&(a="bhvr",(t=n)&&t[a]&&(o=t[a],delete t[a]),o=o,i.behavior=this._getValidBehavior(o)),Dt(n.id)||Dt(n.contentName)||this._traceLogger.throwInternal(H.WARNING,Pt.InvalidContentBlob,"Missing attributes id or contentName in click event. Click event information will still be collected!")),i.name=n.id||n.contentName||At,i.parentId=n.parentid||n.parentName||At,Dt(e.actionType)&&(i.actionType=e.actionType),Dt(e.clickCoordinateX)&&Dt(e.clickCoordinateY)&&(i.clickCoordinates=e.clickCoordinateX+"X"+e.clickCoordinateY),this._sanitizePageActionEventContent(n),i.content="["+JSON.stringify(St(n,e&&e.contentTags?e.contentTags:{}))+"]",i.timeToAction=this._getTimeToClick(),i.refUri=Dt(e.refUri)?e.refUri:this._config.coreData.referrerUri,this._isUndefinedEvent(i)||this.trackPageAction(i,r)},Rt.prototype._getTimeToClick=function(){var t=nt("performance");if(t&&t.timing){t=t.timing.navigationStart;if(t&&0!==t)return(new Date).getTime()-t}return-1},Rt.prototype._populateEventDataIfPresent=function(t,e,n){Dt(n)&&(t[e]=n)},Rt.prototype._sanitizePageActionEventContent=function(t){t&&(delete t.id,delete t.parentid,delete t.parentname,this._config&&this._config.dataTags&&Dt(this._config.dataTags.parentDataTag)&&delete t[this._config.dataTags.parentDataTag])},Rt.prototype._isUndefinedEvent=function(t){return!(!this._config.dropInvalidEvents||t.name!==At||t.parentId!==At||"[{}]"!==t.content)},Rt);function Rt(){return null!==Ft&&Ft.apply(this,arguments)||this}var Ut={BUTTON:!0,CHECKBOX:!0,RADIO:!0,RESET:!0,SUBMIT:!0},Vt=(jt.prototype.click=function(){var e=this,t=it(),n=rt();t?($(t,~navigator.appVersion.indexOf("MSIE")?"click":"mousedown",function(t){e._processClick(t)}),$(t,"keyup",function(t){e._processClick(t)})):n&&($(n,"click",function(t){e._processClick(t)}),$(n,"keyup",function(t){e._processClick(t)}))},jt.prototype.capturePageAction=function(t,e,n,a){Dt(kt(t,Et,this._config.dataTags.customDataPrefix+this._config.dataTags.dntDataTag))||this._pageAction.capturePageAction(t,e,n,a)},jt.prototype._processClick=function(t){var e={A:!0,BUTTON:!0,AREA:!0,INPUT:!0},n=it();if(t=X(t)&&n?n.event:t){var a=t.srcElement||t.target,i={clickCoordinateX:t.pageX,clickCoordinateY:t.pageY},r=function(t){try{if("which"in t)return 3===t.which;if("button"in t)return 2===t.button}catch(e){}}(t);if(r)i.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))i.actionType="CL";else if(function(t){try{if("keyCode"in t)return 13===t.keyCode}catch(e){}}(t))i.actionType="KE";else if(function(t){try{if("keyCode"in t)return 32===t.keyCode}catch(e){}}(t))i.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;i.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&&!Ut[a.type.toUpperCase()]||this.capturePageAction(a,i,{},r);break}a=a.parentElement||a.parentNode}}},jt);function jt(t,e,n,a){this._analyticsPlugin=t,this._config=e,this._pageAction=n,this._traceLogger=a}var Ht=(Kt.prototype.getMetadata=function(){return Dt(this._config.dataTags.metaDataPrefix)?this._getMetaDataFromDOM(this._config.dataTags.captureAllMetaDataContent,this._config.dataTags.metaDataPrefix,!1):this._getMetaDataFromDOM(this._config.dataTags.captureAllMetaDataContent,"",!1)},Kt.prototype.getElementContent=function(t){if(!t)return{};var e,n,a={},i=this._config.dataTags.customDataPrefix,r=i+this._config.dataTags.aiBlobAttributeTag;if(Dt(this._config.dataTags.parentDataTag)&&(n=i+this._config.dataTags.parentDataTag),this._isTracked(t,i,r))a=St(a,this._populateElementContentwithDataTag(t,i,n,r));else if(e=t.getAttribute(r))try{a=JSON.parse(e)}catch(o){this._traceLogger.throwInternal(H.CRITICAL,Pt.CannotParseAiBlobValue,"Can not parse "+e)}else a=St(a,this._populateElementContent(t,i,n,r));return Nt(a),n?St(a,this._getParentDetails(t,a,i,r)):a},Kt.prototype._captureElementContentWithDataTag=function(t,e,n){for(var a,i=0;i<t.attributes.length;i++)(a=t.attributes[i]).name.indexOf(n)||(e[a.name.replace(n,"")]=a.value)},Kt.prototype._walkUpDomChainCaptureData=function(t,e,n,a,i){for(var r=t,o=!1,s=!1;!X(r)&&!X(r.attributes);){for(var c=r.attributes,l=0;l<c.length;l++){var u,f=c[l];f.name.indexOf(n)||(f.name.indexOf(a)||(o=!0),f.name.indexOf(i)&&(u=f.name.replace(n,""),s&&"id"===u||Dt(e[u])||(e[u]=f.value)))}if(o)break;s=!0,r=r.parentNode}},Kt.prototype._populateElementContent=function(t,e,n,a){var i={};if(!t)return i;var r=this._getHtmlIdAndContentName(t),i={id:r.id||"",contentName:r.contentName||""};return Dt(n)&&this._walkUpDomChainCaptureData(t,i,e,n,a),i.id||i.contentName||this._traceLogger.throwInternal(H.WARNING,Pt.InvalidContentBlob,"Invalid content blob. Missing required attributes (id, contentName. Content information will still be collected!"),i},Kt.prototype._populateElementContentwithDataTag=function(t,e,n,a){var i={};if(!t)return i;var r=this._getHtmlIdAndContentName(t);return Dt(n)?this._walkUpDomChainCaptureData(t,i,e,n,a):this._captureElementContentWithDataTag(t,i,e),this._config.dataTags.useDefaultContentNameOrId&&(Dt(i.id)||(i.id=r.id||""),i.contentName=r.contentName||""),i.id||i.contentName||this._traceLogger.throwInternal(H.WARNING,Pt.InvalidContentBlob,"Invalid content blob. Missing required attributes (id, contentName. Content information will still be collected!"),i},Kt.prototype._getMetaDataFromDOM=function(t,e,n){for(var a={},i=document.querySelectorAll("meta"),r=0;r<i.length;r++){var o=i[r];o.name&&(!t&&o.name.indexOf(e)||(a[n?o.name.replace(e,""):o.name]=o.content))}return a},Kt.prototype._getDefaultContentName=function(t,e){if(!1===e||!t.tagName)return"";var n,a=rt()||{};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)},Kt.prototype._isTracked=function(t,e,n){for(var a=t.attributes,i=!1,r=0;r<a.length;r++){var o=a[r].name;if(o===n)return!1;o.indexOf(e)||(i=!0)}return i},Kt.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},Kt.prototype._getParentDetails=function(t,e,n,a){var i=e.parentid,e=e.parentname;return i||e||!t?{}:this._populateParentInfo(t,n,a)},Kt.prototype._populateParentInfo=function(t,e,n){var a,i={},r=kt(t.parentElement,this._isTracked,e);if(r){n=r.getAttribute(n)||t[n];if(n){try{var o=JSON.parse(n)}catch(s){this._traceLogger.throwInternal(H.CRITICAL,Pt.CannotParseAiBlobValue,"Can not parse "+n)}o&&(a=o.id)}else a=r.getAttribute(e+"id")}return a?i.parentid=a:(t=this._getHtmlIdAndContentName(t.parentElement),i.parentid=t.id,i.parentname=t.contentName),i},Kt);function Kt(t,e){this._config=t,this._traceLogger=e}var qt,u=(h(zt,qt=u),zt.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=Mt(t.extensionConfig[this.identifier]),qt.prototype.initialize.call(this,t,e,n,a),this._contentHandler=this._contentHandler||new Ht(this._config,this.diagLog());var i,a=this._contentHandler.getMetadata();this.pageAction=new Bt(this,this._config,this._contentHandler,this._config.callback.pageActionPageTags,a,this.diagLog()),this._autoCaptureHandler=this._autoCaptureHandler||new Vt(this,this._config,this.pageAction,this.diagLog()),this._config.autoCapture&&this._autoCaptureHandler.click(),Q(n,function(t){"AppInsightsPropertiesPlugin"===t.identifier&&(i=t)}),i&&i.context&&i.context.internal&&i.context.internal.sdkVersion&&(i.context.internal.sdkVersion+="_ClickPlugin"+zt.Version)},zt.prototype.processTelemetry=function(t,e){this.processNext(t,e)},zt.prototype.trackPageAction=function(t,e){try{this.pageAction.trackPageAction(t,e)}catch(n){this.diagLog().throwInternal(H.CRITICAL,Pt.TrackPageActionEventFailed,"trackPageAction failed, page action event will not be collected: "+("[object Error]"===G(e=n)?e.name:""),{exception:lt(n)})}},zt.Version="2.7.3-nightly.2112-08",zt);function zt(){var t=null!==qt&&qt.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 Q(t,function(t){if(t===e)return n=t,-1}),n||""}},t.ClickAnalyticsPlugin=u,function(t,e,n){var a=Object.defineProperty;if(a)try{return a(t,e,n)}catch(i){}typeof n.value!==undefined&&(t[e]=n.value)}(t,"__esModule",{value:!0})};"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=applicationinsights-clickanalytics-js.min.js.map
|