@microsoft/applicationinsights-clickanalytics-js 2.7.4-nightly.2202-01 → 2.8.0-nightly.2202-06

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/browser/{ai.clck.2.7.4-nightly.2202-01.cjs.js → ai.clck.2.8.0-nightly.2202-06.cjs.js} +15 -15
  2. package/browser/ai.clck.2.8.0-nightly.2202-06.cjs.js.map +1 -0
  3. package/browser/ai.clck.2.8.0-nightly.2202-06.cjs.min.js +6 -0
  4. package/browser/ai.clck.2.8.0-nightly.2202-06.cjs.min.js.map +1 -0
  5. package/browser/{ai.clck.2.7.4-nightly.2202-01.gbl.js → ai.clck.2.8.0-nightly.2202-06.gbl.js} +15 -15
  6. package/browser/ai.clck.2.8.0-nightly.2202-06.gbl.js.map +1 -0
  7. package/browser/ai.clck.2.8.0-nightly.2202-06.gbl.min.js +6 -0
  8. package/browser/ai.clck.2.8.0-nightly.2202-06.gbl.min.js.map +1 -0
  9. package/browser/ai.clck.2.8.0-nightly.2202-06.integrity.json +66 -0
  10. package/browser/{ai.clck.2.7.4-nightly.2202-01.js → ai.clck.2.8.0-nightly.2202-06.js} +15 -15
  11. package/browser/ai.clck.2.8.0-nightly.2202-06.js.map +1 -0
  12. package/browser/ai.clck.2.8.0-nightly.2202-06.min.js +6 -0
  13. package/browser/ai.clck.2.8.0-nightly.2202-06.min.js.map +1 -0
  14. package/browser/ai.clck.2.cjs.js +14 -14
  15. package/browser/ai.clck.2.cjs.js.map +1 -1
  16. package/browser/ai.clck.2.cjs.min.js +2 -2
  17. package/browser/ai.clck.2.cjs.min.js.map +1 -1
  18. package/browser/ai.clck.2.gbl.js +14 -14
  19. package/browser/ai.clck.2.gbl.js.map +1 -1
  20. package/browser/ai.clck.2.gbl.min.js +2 -2
  21. package/browser/ai.clck.2.gbl.min.js.map +1 -1
  22. package/browser/ai.clck.2.js +14 -14
  23. package/browser/ai.clck.2.js.map +1 -1
  24. package/browser/ai.clck.2.min.js +2 -2
  25. package/browser/ai.clck.2.min.js.map +1 -1
  26. package/dist/applicationinsights-clickanalytics-js.d.ts +1 -1
  27. package/dist/applicationinsights-clickanalytics-js.js +14 -14
  28. package/dist/applicationinsights-clickanalytics-js.js.map +1 -1
  29. package/dist/applicationinsights-clickanalytics-js.min.js +2 -2
  30. package/dist/applicationinsights-clickanalytics-js.min.js.map +1 -1
  31. package/dist/applicationinsights-clickanalytics-js.rollup.d.ts +1 -1
  32. package/dist-esm/Behaviours.js +1 -1
  33. package/dist-esm/ClickAnalyticsPlugin.js +2 -2
  34. package/dist-esm/ClickAnalyticsPlugin.js.map +1 -1
  35. package/dist-esm/DataCollector.js +1 -1
  36. package/dist-esm/Enums.js +1 -1
  37. package/dist-esm/Interfaces/Datamodel.js +1 -1
  38. package/dist-esm/applicationinsights-clickanalytics-js.js +1 -1
  39. package/dist-esm/common/Utils.js +1 -1
  40. package/dist-esm/events/PageAction.js +1 -1
  41. package/dist-esm/events/WebEvent.js +1 -1
  42. package/dist-esm/handlers/AutoCaptureHandler.js +1 -1
  43. package/dist-esm/handlers/DomContentHandler.js +1 -1
  44. package/package.json +4 -4
  45. package/src/ClickAnalyticsPlugin.ts +1 -1
  46. package/browser/ai.clck.2.7.4-nightly.2202-01.cjs.js.map +0 -1
  47. package/browser/ai.clck.2.7.4-nightly.2202-01.cjs.min.js +0 -6
  48. package/browser/ai.clck.2.7.4-nightly.2202-01.cjs.min.js.map +0 -1
  49. package/browser/ai.clck.2.7.4-nightly.2202-01.gbl.js.map +0 -1
  50. package/browser/ai.clck.2.7.4-nightly.2202-01.gbl.min.js +0 -6
  51. package/browser/ai.clck.2.7.4-nightly.2202-01.gbl.min.js.map +0 -1
  52. package/browser/ai.clck.2.7.4-nightly.2202-01.integrity.json +0 -66
  53. package/browser/ai.clck.2.7.4-nightly.2202-01.js.map +0 -1
  54. package/browser/ai.clck.2.7.4-nightly.2202-01.min.js +0 -6
  55. package/browser/ai.clck.2.7.4-nightly.2202-01.min.js.map +0 -1
@@ -0,0 +1,6 @@
1
+ /*!
2
+ * Application Insights JavaScript SDK - Click Analytics, 2.8.0-nightly.2202-06
3
+ * Copyright (c) Microsoft and contributors. All rights reserved.
4
+ */
5
+ this.Microsoft=this.Microsoft||{},function(t){"use strict";var a="function",i="object",r="undefined",o="prototype",c="hasOwnProperty",n=Object,v=n[o],m=n.assign,T=n.create,C=n.defineProperty,y=v[c],_=null;function I(t){return void 0===t&&(t=!0),_&&t||(typeof globalThis!==r&&globalThis&&(_=globalThis),typeof self!==r&&self&&(_=self),typeof window!==r&&window&&(_=window),typeof global!==r&&global&&(_=global)),_}function b(t){throw new TypeError(t)}(I()||{}).Symbol,(I()||{}).Reflect;var m=m||function(t){for(var e,n=1,a=arguments.length;n<a;n++)for(var i in e=arguments[n])v[c].call(e,i)&&(t[i]=e[i]);return t},x=function(t,e){return(x=n.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e[c](n)&&(t[n]=e[n])})(t,e)};function A(t,e){function n(){this.constructor=t}typeof e!==a&&null!==e&&b("Class extends value "+e+" is not a constructor or null"),x(t,e),t[o]=null===e?function(t){if(T)return T(t);if(null==t)return{};var e=typeof t;function n(){}return e!==i&&e!==a&&b("Object prototype may only be an Object:"+t),n[o]=t,new n}(e):(n[o]=e[o],new n)}var P="constructor",d="prototype",N="function",D="_dynInstFuncs",E="_isDynProxy",k="_dynClass",w="_dynInstChk",S=w,M="_dfOpts",L="_unknown_",O="__proto__",F="useBaseInst",B="setInstFuncs",R=Object,U=R.getPrototypeOf,V=0;function h(t,e){return t&&R[d].hasOwnProperty.call(t,e)}function j(t){return t&&(t===R[d]||t===Array[d])}function H(t){return j(t)||t===Function[d]}function K(t){if(t){if(U)return U(t);t=t[O]||t[d]||(t[P]?t[P][d]:null);if(t)return t}return null}function q(t,e){var n=[],a=R.getOwnPropertyNames;if(a)n=a(t);else for(var i in t)"string"==typeof i&&h(t,i)&&n.push(i);if(n&&0<n.length)for(var r=0;r<n.length;r++)e(n[r])}function z(t,e,n){return e!==P&&typeof t[e]===N&&(n||h(t,e))}function W(t){throw new TypeError("DynamicProto: "+t)}function G(t,e){for(var n=t.length-1;0<=n;n--)if(t[n]===e)return 1}function J(t,e){return h(t,d)?t.name||e||L:((t||{})[P]||{}).name||e||L}function X(t,a,e,n){h(t,d)||W("theClass is an invalid class definition.");var u,i,r,o,f,g,s=t[d],c=(function(t){if(U)for(var e=[],n=K(a);n&&!H(n)&&!G(e,n);){if(n===t)return 1;e.push(n),n=K(n)}}(s)||W("["+J(t)+"] is not in class hierarchy of ["+J(a)+"]"),null),t=(h(s,k)?c=s[k]:(c="_dynCls$"+J(t,"_")+"$"+V,V++,s[k]=c),X[M]),l=!!t[F],p=(l&&n&&n[F]!==undefined&&(l=!!n[F]),i={},q(u=a,function(t){!i[t]&&z(u,t,!1)&&(i[t]=u[t])}),i),l=(e(a,function(t,e,n,r){function a(t,e,n){var a,i=e[n];return i[E]&&r&&!1!==(a=t[D]||{})[S]&&(i=(a[e[k]]||{})[n]||i),function(){return i.apply(t,arguments)}}for(var i={},o=(q(n,function(t){i[t]=a(e,n,t)}),K(t)),s=[];o&&!H(o)&&!G(s,o);)q(o,function(t){!i[t]&&z(o,t,!U)&&(i[t]=a(e,o,t))}),s.push(o),o=K(o);return i}(s,a,p,l)),!!U&&!!t[B]);r=s,e=c,o=a,f=p,t=!1!==(l=l&&n?!!n[B]:l),j(r)||(s=o[D]=o[D]||{},g=s[e]=s[e]||{},!1!==s[S]&&(s[S]=!!t),q(o,function(t){var n,a,i;z(o,t,!1)&&o[t]!==f[t]&&(g[t]=o[t],delete o[t],h(r,t)&&(!r[t]||r[t][E])||(r[t]=(n=r,a=t,(i=function(){var t,e;return(function(t,e,n,u){var a=null;if(t&&h(n,k)){var i=t[D]||{};if((a=(i[n[k]]||{})[e])||W("Missing ["+e+"] "+N),!a[w]&&!1!==i[S]){for(var r=!h(t,e),o=K(t),s=[];r&&o&&!H(o)&&!G(s,o);){var c=o[e];if(c){r=c===u;break}s.push(o),o=K(o)}try{r&&(t[e]=a),a[w]=1}catch(l){i[S]=!1}}}return a}(this,a,n,i)||(typeof(e=(e=n[t=a])===i?K(n)[t]:e)!==N&&W("["+t+"] is not a "+N),e)).apply(this,arguments)})[E]=1,i)))}))}X[M]={setInstFuncs:!0,useBaseInst:!0};var l={CRITICAL:1,1:"CRITICAL",WARNING:2,2:"WARNING"},Y={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},$="attachEvent",Q="addEventListener",Z="toString",tt=C,C=Array.isArray,et=v[Z];function nt(t){return t===undefined||typeof t===r}function g(t){return null===t||nt(t)}function f(t){return!(!t||typeof t!==a)}function at(t,e,n,a){void 0===a&&(a=!1);var i=!1;if(!g(t))try{g(t[Q])?g(t[$])||(t[$]("on"+e,n),i=!0):(t[Q](e,n,a),i=!0)}catch(r){}return i}y[Z].call(n);var it=C||function(t){return!(!t||"[object Array]"!==et.call(t))};function rt(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 ot(){var t=Date;return t.now?t.now():(new t).getTime()}var st="window",ct="JSON";function u(t){var e=I();return e&&e[t]?e[t]:t===st&&lt()?window:null}function lt(){return!(typeof window!==i||!window)}function ut(){return lt()?window:u(st)}function ft(){return typeof document===i&&document?document:u("document")}function gt(){return typeof location===i&&location?location:u("location")}function pt(){return typeof JSON===i&&JSON||null!==u(ct)}function dt(){return pt()?JSON||u(ct):null}function ht(t){var e=Object[o].toString.call(t),n="";return"[object Error]"===e?n="{ stack: '"+t.stack+"', message: '"+t.message+"', name: '"+t.name+"'":pt()&&(n=dt().stringify(t)),e+n}var vt=null;function mt(t){return t?'"'+t.replace(/\"/g,"")+'"':""}function Tt(t,e){var n,a=typeof console!==r?console:u("console");a&&(n="log",f(a[n=a[t]?t:n])&&a[n](e))}yt.dataType="MessageData";var Ct=yt;function yt(t,e,n,a){void 0===n&&(n=!1),this.messageId=t,this.message=(n?"AI: ":"AI (Internal): ")+t;n="",pt()&&(n=dt().stringify(a)),t=(e?" message:"+mt(e):"")+(a?" props:"+mt(n):"");this.message+=t}var _t=function Jt(i){this.identifier="DiagnosticLogger",this.queue=[];var s=0,c={};X(Jt,this,function(r){function t(t,e){t=i[t];return g(t)?e:t}function o(t,e){var n,a=(n=(n=vt)||!0===i.disableDbgExt?n:vt||(a=u("Microsoft"),vt=a?a.ApplicationInsights:vt))?n.ChromeDbgExt:null;a&&a.diagLog&&a.diagLog(t,e)}g(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 Ct(e,n,i=void 0!==i&&i,a);if(r.enableDebugExceptions())throw e;n=t===l.CRITICAL?"errorToConsole":"warnToConsole";nt(e.message)?o("throw"+(t===l.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){Tt("warn",t),o("warning",t)},r.errorToConsole=function(t){Tt("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===l.CRITICAL?"error":"warn",e)),s===r.maxInternalMessageLimit()&&(a=new Ct(Y.MessageLimitPerPVExceeded,n="Internal events throttle limit per PageView reached for this app.",!1),r.queue.push(a),t===l.CRITICAL?r.errorToConsole(n):r.warnToConsole(n))))}})},It=(s.ParentContextKey="parent",s.ChildrenContextKey="childEvts",s);function s(t,i,e){var a,r=this,o=!1;r.start=ot(),r.name=t,r.isAsync=e,r.isChildEvt=function(){return!1},f(i)&&(o=function(t){if(tt)try{var e={enumerable:!0,configurable:!0,get:function(){return!a&&f(i)&&(a=i(),i=null),a}};return tt(t,"payload",e),!0}catch(n){}return!1}(r)),r.getCtx=function(t){return t?(t===s.ParentContextKey||t===s.ChildrenContextKey?r:r.ctx||{})[t]:null},r.setCtx=function(t,e){t&&(t===s.ParentContextKey?(r[t]||(r.isChildEvt=function(){return!0}),r[t]=e):t===s.ChildrenContextKey?r[t]=e:(r.ctx=r.ctx||{})[t]=e)},r.complete=function(){var t=0,e=r.getCtx(s.ChildrenContextKey);if(it(e))for(var n=0;n<e.length;n++){var a=e[n];a&&(t+=a.time)}r.time=ot()-r.start,r.exTime=r.time-t,r.complete=function(){},!o&&f(i)&&(r.payload=i())}}var bt="CoreUtils.doPerf";function xt(t,e,n,a,i){if(t)if(t=f(t.getPerfMgr)?t.getPerfMgr():t){var r,o=void 0,s=t.getCtx(bt);try{if(o=t.create(e(),a,i))return s&&o.setCtx&&(o.setCtx(It.ParentContextKey,s),s.getCtx&&s.setCtx&&((r=s.getCtx(It.ChildrenContextKey))||(r=[],s.setCtx(It.ChildrenContextKey,r)),r.push(o))),t.setCtx(bt,o),n(o)}catch(c){o&&o.setCtx&&o.setCtx("exception",c)}finally{o&&t.fire(o),t.setCtx(bt,s)}}return n()}var At=function(i,e){var r=this,o=null,s=f(i.processTelemetry),c=f(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";xt(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(l.CRITICAL,Y.PluginException,"Plugin ["+i.identifier+"] failed during processTelemetry - "+ht(e)),o&&!t&&o.processTelemetry(n,a)}}else o&&(r._hasRun=!0,o.processTelemetry(n,a))},function(){return{item:n}},!n.sync)}};function Pt(t,e){var n=[];if(t&&0<t.length)for(var a=null,i=0;i<t.length;i++){var r=t[i];r&&f(r.processTelemetry)&&(r=new At(r,e),n.push(r),a&&a.setNext(r),a=r)}return 0<n.length?n[0]:null}var Nt=function Xt(t,i,n,e){var a,r,o,s,c=this,l=null;null!==e&&(t&&f(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),Pt(a,e)}(t,c,e||t.getPlugin()):e?(a=c,o=t,s=!1,(r=e)&&t&&(o=[],rt(t,function(t){!s&&t!==r||(s=!0,o.push(t))})),r&&!s&&(o=o||[]).push(r),l=Pt(o,a)):nt(e)&&(l=Pt(t,c))),c.core=function(){return n},c.diagLog=function(){return(n||{}).logger||new _t(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){void 0===n&&(n=!1);var a,t=c.getExtCfg(t,null);return t&&!g(t[e])?a=t[e]:i&&!g(i[e])&&(a=i[e]),g(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 Xt((t=void 0===t?null:t)||l,i,n,e)}},Dt="getPlugin",Z=(Et.prototype.initialize=function(t,e,n,a){this._baseTelInit(t,e,n,a)},Et);function Et(){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&&f(u.processTelemetry)&&u.processTelemetry(t,null)},s._getTelCtx=function(t){var e,t=t=void 0===t?null:t;return t||(e=l||new Nt(null,{},s.core),t=u&&u[Dt]?e.createNew(null,u[Dt]):e.createNew(null,u)),t},s._baseTelInit=function(t,e,n,a){t&&(o="extensionConfig",r=i=[],!t||(r=t[o])!==i&&g(r)&&(t[o]=r=i)),!a&&e&&(a=e.getProcessTelContext().getNext());var i,r,o=u;u&&u[Dt]&&(o=u[Dt]()),s.core=e,l=new Nt(a,t,e,o),c=!0}}var kt="not_specified",wt=m(m({},Y),{CannotParseAiBlobValue:101,InvalidContentBlob:102,TrackPageActionEventFailed:103});function St(t){for(var e in t)p(t[e])&&("{}"!==JSON.stringify(t[e])||"callback"===e)||delete t[e]}function p(t){return!(g(t)||""===t)}function Mt(t,e){return p(t.getAttribute(e))}function Lt(t,e,n){var a=t;if(a){for(;!e(a,n);)if(!(a=a.parentNode)||!a.getAttribute)return null;return a}}function Ot(t){return"A"===t.nodeName}function Ft(){var t={},e=!1,n=0,l=arguments.length,a=Object.prototype,i=arguments;for("[object Boolean]"===a.toString.call(i[0])&&(e=i[0],n++);n<l;n++){r=void 0;var r,o,s,c=i[n];for(r in c)s=r,(o=c)&&y.call(o,s)&&(e&&"[object Object]"===a.toString.call(c[r])?t[r]=Ft(!0,t[r],c[r]):t[r]=c[r])}return t}var Bt={BUTTON:!0,CHECKBOX:!0,RADIO:!0,RESET:!0,SUBMIT:!0};function Rt(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={}}Rt.prototype.setBasicProperties=function(t,e){var n;p(t.name)||(t.pageName=(n=this._config,e&&e.pageName?e.pageName:n.callback&&f(n.callback.pageName)?n.callback.pageName():n.coreData&&n.coreData.pageName?n.coreData.pageName:(e=ft())&&e.title||"")),!p(t.uri)&&lt&&(t.uri=(n=this._config,e=gt(),n.coreData&&n.coreData.requestUri&&""!==n.coreData.requestUri?n.coreData.requestUri:e?e.protocol+"//"+(e.hostname||e.host)+(p(e.port)?":"+e.port:"")+e.pathname:null))},Rt.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"),p(e.pageType)&&(t.pageType=e.pageType),p(this._pageTypeMetaTag)&&!p(t.pageType)&&(t.pageType=this._pageTypeMetaTag)},Rt.prototype._setPageTags=function(t,e){if(this._pageTagsCallback&&(this._pageTags=Ft(!0,this._pageTags,this._pageTagsCallback())),p(e.pageTags)&&(this._pageTags=Ft(!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},Rt.prototype._getBehavior=function(t){var e;return t&&p(t.behavior)?e=t.behavior:p(this._behaviorMetaTag)&&(e=this._behaviorMetaTag),this._getValidBehavior(e)},Rt.prototype._getValidBehavior=function(t){return this._config.behaviorValidator(t)},Rt.prototype._getMetaData=function(t,e,n){return e&&e[n]?e[n]:t?t[n]:""},A(jt,Ut=Rt),jt.prototype.trackPageAction=function(t,e){var n,a=this,i={name:"Microsoft.ApplicationInsights.{0}.Event",baseType:"EventData",ext:{web:{}},data:{},baseData:{}};if(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){var r=e;if(r)for(var o in r)y.call(r,o)&&(n=o,o=r[o],i.data[n]||a._populateEventDataIfPresent(i.data,n,o))}this._clickAnalyticsPlugin.core.track(i)},jt.prototype.capturePageAction=function(t,e,n,a){e=p(e)?e:{};var i,r={name:""},n=p(n)?n:{},o=(this.setCommonProperties(r,e),r.behavior=this._getBehavior(e),{});a&&(r.behavior=this._config.defaultRightClickBhvr),t&&(r.targetUri=function(e){var t="";switch(e.tagName){case"A":case"AREA":t=e.href||"";break;case"IMG":t=function(){if(e){var t=Lt(e,Ot);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&&Bt[n.toUpperCase()]&&(n=gt()||{},t=e.form?e.form.action||n.pathname||"":n.pathname||"")}return t}(t),(o=this._contentHandler.getElementContent(t)).bhvr&&!p(e.behavior)&&(a="bhvr",(t=o)&&t[a]&&(i=t[a],delete t[a]),a=i,r.behavior=this._getValidBehavior(a)),p(o.id)||p(o.contentName)||this._traceLogger.throwInternal(l.WARNING,wt.InvalidContentBlob,"Missing attributes id or contentName in click event. Click event information will still be collected!")),r.name=o.id||o.contentName||kt,r.parentId=o.parentid||o.parentName||kt,p(e.actionType)&&(r.actionType=e.actionType),p(e.clickCoordinateX)&&p(e.clickCoordinateY)&&(r.clickCoordinates=e.clickCoordinateX+"X"+e.clickCoordinateY),this._sanitizePageActionEventContent(o),r.content="["+JSON.stringify(Ft(o,e&&e.contentTags?e.contentTags:{}))+"]",r.timeToAction=this._getTimeToClick(),r.refUri=p(e.refUri)?e.refUri:this._config.coreData.referrerUri,this._isUndefinedEvent(r)||this.trackPageAction(r,n)},jt.prototype._getTimeToClick=function(){var t=u("performance");if(t&&t.timing){t=t.timing.navigationStart;if(t&&0!==t)return(new Date).getTime()-t}return-1},jt.prototype._populateEventDataIfPresent=function(t,e,n){p(n)&&(t[e]=n)},jt.prototype._sanitizePageActionEventContent=function(t){t&&(delete t.id,delete t.parentid,delete t.parentname,this._config&&this._config.dataTags&&p(this._config.dataTags.parentDataTag)&&delete t[this._config.dataTags.parentDataTag])},jt.prototype._isUndefinedEvent=function(t){return!(!this._config.dropInvalidEvents||t.name!==kt||t.parentId!==kt||"[{}]"!==t.content)};var Ut,Vt=jt;function jt(){return null!==Ut&&Ut.apply(this,arguments)||this}var Ht={BUTTON:!0,CHECKBOX:!0,RADIO:!0,RESET:!0,SUBMIT:!0},Kt=(qt.prototype.click=function(){var e=this,t=ut(),n=ft();t?(at(t,~navigator.appVersion.indexOf("MSIE")?"click":"mousedown",function(t){e._processClick(t)}),at(t,"keyup",function(t){e._processClick(t)})):n&&(at(n,"click",function(t){e._processClick(t)}),at(n,"keyup",function(t){e._processClick(t)}))},qt.prototype.capturePageAction=function(t,e,n,a){p(Lt(t,Mt,this._config.dataTags.customDataPrefix+this._config.dataTags.dntDataTag))||this._pageAction.capturePageAction(t,e,n,a)},qt.prototype._processClick=function(t){var e={A:!0,BUTTON:!0,AREA:!0,INPUT:!0},n=ut();if(t=g(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&&!Ht[a.type.toUpperCase()]||this.capturePageAction(a,i,{},r);break}a=a.parentElement||a.parentNode}}},qt);function qt(t,e,n,a){this._analyticsPlugin=t,this._config=e,this._pageAction=n,this._traceLogger=a}e.prototype.getMetadata=function(){return p(this._config.dataTags.metaDataPrefix)?this._getMetaDataFromDOM(this._config.dataTags.captureAllMetaDataContent,this._config.dataTags.metaDataPrefix,!1):this._getMetaDataFromDOM(this._config.dataTags.captureAllMetaDataContent,"",!1)},e.prototype.getElementContent=function(t){if(!t)return{};var e,n,a={},i=this._config.dataTags.customDataPrefix,r=i+this._config.dataTags.aiBlobAttributeTag;if(p(this._config.dataTags.parentDataTag)&&(n=i+this._config.dataTags.parentDataTag),this._isTracked(t,i,r))a=Ft(a,this._populateElementContentwithDataTag(t,i,n,r));else if(e=t.getAttribute(r))try{a=JSON.parse(e)}catch(o){this._traceLogger.throwInternal(l.CRITICAL,wt.CannotParseAiBlobValue,"Can not parse "+e)}else a=Ft(a,this._populateElementContent(t,i,n,r));return St(a),n?Ft(a,this._getParentDetails(t,a,i,r)):a},e.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)},e.prototype._walkUpDomChainCaptureData=function(t,e,n,u,f){for(var a=t,i=!1,r=!1;!g(a)&&!g(a.attributes);){for(var o=a.attributes,s=0;s<o.length;s++){var c,l=o[s];l.name.indexOf(n)||(l.name.indexOf(u)||(i=!0),l.name.indexOf(f)&&(c=l.name.replace(n,""),r&&"id"===c||p(e[c])||(e[c]=l.value)))}if(i)break;r=!0,a=a.parentNode}},e.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 p(n)&&this._walkUpDomChainCaptureData(t,i,e,n,a),i.id||i.contentName||this._traceLogger.throwInternal(l.WARNING,wt.InvalidContentBlob,"Invalid content blob. Missing required attributes (id, contentName. Content information will still be collected!"),i},e.prototype._populateElementContentwithDataTag=function(t,e,n,a){var i={};if(!t)return i;var r=this._getHtmlIdAndContentName(t);return p(n)?this._walkUpDomChainCaptureData(t,i,e,n,a):this._captureElementContentWithDataTag(t,i,e),this._config.dataTags.useDefaultContentNameOrId&&(p(i.id)||(i.id=r.id||""),i.contentName=r.contentName||""),i.id||i.contentName||this._traceLogger.throwInternal(l.WARNING,wt.InvalidContentBlob,"Invalid content blob. Missing required attributes (id, contentName. Content information will still be collected!"),i},e.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},e.prototype._getDefaultContentName=function(t,e){if(!1===e||!t.tagName)return"";var n,a=ft()||{};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)},e.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},e.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},e.prototype._getParentDetails=function(t,e,n,a){var i=e.parentid,e=e.parentname;return i||e||!t?{}:this._populateParentInfo(t,n,a)},e.prototype._populateParentInfo=function(t,e,n){var a,i={},r=Lt(t.parentElement,this._isTracked,e);if(r){var n=r.getAttribute(n)||t[n];if(n){try{var o=JSON.parse(n)}catch(s){this._traceLogger.throwInternal(l.CRITICAL,wt.CannotParseAiBlobValue,"Can not parse "+n)}o&&(a=o.id)}else a=r.getAttribute(e+"id")}return a?i.parentid=a:(n=this._getHtmlIdAndContentName(t.parentElement),i.parentid=n.id,i.parentname=n.contentName),i};var zt=e;function e(t,e){this._config=t,this._traceLogger=e}A(Gt,Wt=Z),Gt.prototype.initialize=function(t,e,n,a){if(g(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},i=[];for(e in a)"object"==typeof a[e]&&i.push(e);if(t){var r,o,s=t,c=i;for(r in St(s),c)c.hasOwnProperty(r)&&("object"==typeof s[o=c[r]]?St(s[o]):delete s[o]);return p(t.dataTags)&&(t.dataTags.customDataPrefix=p((n=t).dataTags.customDataPrefix)&&!n.dataTags.customDataPrefix.indexOf("data-")?t.dataTags.customDataPrefix:"data-"),Ft(!0,a,t)}}(t.extensionConfig[this.identifier]),Wt.prototype.initialize.call(this,t,e,n,a),this._contentHandler=this._contentHandler||new zt(this._config,this.diagLog());var i,t=this._contentHandler.getMetadata();this.pageAction=new Vt(this,this._config,this._contentHandler,this._config.callback.pageActionPageTags,t,this.diagLog()),this._autoCaptureHandler=this._autoCaptureHandler||new Kt(this,this._config,this.pageAction,this.diagLog()),this._config.autoCapture&&this._autoCaptureHandler.click(),rt(n,function(t){"AppInsightsPropertiesPlugin"===t.identifier&&(i=t)}),i&&i.context&&i.context.internal&&i.context.internal.sdkVersion&&(i.context.internal.sdkVersion+="_ClickPlugin"+Gt.Version)},Gt.prototype.processTelemetry=function(t,e){this.processNext(t,e)},Gt.prototype.trackPageAction=function(t,e){try{this.pageAction.trackPageAction(t,e)}catch(n){this.diagLog().throwInternal(l.CRITICAL,wt.TrackPageActionEventFailed,"trackPageAction failed, page action event will not be collected: "+((t=n)&&"[object Error]"===et.call(t)?t.name:""),{exception:ht(n)})}},Gt.Version="2.8.0-nightly.2202-06";var Wt,C=Gt;function Gt(){var t=null!==Wt&&Wt.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 rt(t,function(t){if(t===e)return n=t,-1}),n||""}},t.ClickAnalyticsPlugin=C;m=t,Z="__esModule",C={value:!0},t=Object.defineProperty;if(t)try{return t(m,Z,C)}catch(Yt){}typeof C.value!==undefined&&(m[Z]=C.value)}(this.Microsoft.ApplicationInsights=this.Microsoft.ApplicationInsights||{});
6
+ //# sourceMappingURL=ai.clck.2.8.0-nightly.2202-06.gbl.min.js.map