@microsoft/applicationinsights-react-native 3.0.2 → 3.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/applicationinsights-react-native.js +7 -6
- package/browser/applicationinsights-react-native.js.map +1 -1
- package/browser/applicationinsights-react-native.min.js +2 -2
- package/browser/applicationinsights-react-native.min.js.map +1 -1
- package/dist/applicationinsights-react-native.api.json +1 -1
- package/dist/applicationinsights-react-native.d.ts +1 -1
- package/dist/applicationinsights-react-native.js +7 -6
- package/dist/applicationinsights-react-native.js.map +1 -1
- package/dist/applicationinsights-react-native.min.js +2 -2
- package/dist/applicationinsights-react-native.min.js.map +1 -1
- package/dist/applicationinsights-react-native.rollup.d.ts +1 -1
- package/dist-esm/DeviceInfo/DeviceModule.js +1 -1
- package/dist-esm/DeviceInfo/ReactNativeDeviceInfo.js +1 -1
- package/dist-esm/Interfaces/IDeviceInfoModule.js +1 -1
- package/dist-esm/Interfaces/INativeDevice.js +1 -1
- package/dist-esm/Interfaces/IReactNativePluginConfig.js +1 -1
- package/dist-esm/Interfaces/index.js +1 -1
- package/dist-esm/ReactNativePlugin.js +1 -1
- package/dist-esm/index.js +1 -1
- package/package.json +3 -3
- package/types/tsdoc-metadata.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Application Insights JavaScript SDK - React Native Plugin, 3.0.
|
|
2
|
+
* Application Insights JavaScript SDK - React Native Plugin, 3.0.3
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
|
-
var n=this,t=function(a,l){"use strict";function s(n){return n&&"object"==typeof n&&"default"in n?n:{"default":n}}var d=s(l),H="function",q="object",_="undefined",r="prototype",G="hasOwnProperty",e=Object,l=e[r],F=(e.create,e.defineProperty),J=l[G],K=null;function $(n){n=!1===(n=void 0===n||n)?null:K;return n||((n=(n=(n=typeof globalThis!==_?globalThis:n)||typeof self===_?n:self)||typeof window===_?n:window)||typeof global===_||(n=global),K=n),n}function V(n){throw new TypeError(n)}($()||{}).Symbol,($()||{}).Reflect;var B=function(n,t){return(B=e.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var e in t)t[G](e)&&(n[e]=t[e])})(n,t)},n="undefined",W="constructor",v="prototype",Q="function",X="_dynInstFuncs",Y="_isDynProxy",p="_dynClass",Z="_dynInstChk",y=Z,nn="_dfOpts",tn="_unknown_",en="__proto__",rn="_dyn"+en,t="__dynProto$Gbl",on="_dynInstProto",un="useBaseInst",cn="setInstFuncs",an=Object,h=an.getPrototypeOf,fn=an.getOwnPropertyNames,n=(i=(i=(i=(i=typeof globalThis!=n?globalThis:i)||typeof self==n?i:self)||typeof window==n?i:window)||typeof global==n?i:global)||{},ln=n[t]||(n[t]={o:((i={})[cn]=!0,i[un]=!0,i),n:1e3});function x(n,t){return n&&an[v].hasOwnProperty.call(n,t)}function sn(n){return n&&(n===an[v]||n===Array[v])}function dn(n){return sn(n)||n===Function[v]}function m(n){if(n){if(h)return h(n);var t=n[en]||n[v]||(n[W]?n[W][v]:null),e=n[rn]||t;x(n,rn)||(delete n[on],e=n[rn]=n[on]||n[rn],n[on]=t)}return e}function gn(n,t){var e=[];if(fn)e=fn(n);else for(var r in n)"string"==typeof r&&x(n,r)&&e.push(r);if(e&&0<e.length)for(var i=0;i<e.length;i++)t(e[i])}function vn(n,t,e){return t!==W&&typeof n[t]===Q&&(e||x(n,t))}function pn(n){throw new TypeError("DynamicProto: "+n)}function yn(n,t){for(var e=n.length-1;0<=e;e--)if(n[e]===t)return 1}function hn(n,t){return x(n,v)?n.name||t||tn:((n||{})[W]||{}).name||t||tn}function b(n,r,t,e){x(n,v)||pn("theClass is an invalid class definition.");var i,o,u,c,a,f,l=n[v],s=(function(n){if(!h)return 1;for(var t=[],e=m(r);e&&!dn(e)&&!yn(t,e);){if(e===n)return 1;t.push(e),e=m(e)}}(l)||pn("["+hn(n)+"] not in hierarchy of ["+hn(r)+"]"),null),n=(x(l,p)?s=l[p]:(s="_dynCls$"+hn(n,"_")+"$"+ln.n,ln.n++,l[p]=s),b[nn]),d=!!n[un],g=(d&&e&&e[un]!==undefined&&(d=!!e[un]),o={},gn(i=r,function(n){!o[n]&&vn(i,n,!1)&&(o[n]=i[n])}),o),d=(t(r,function(n,t,e,o){function r(n,t,e){var r,i=t[e];return i[Y]&&o&&!1!==(r=n[X]||{})[y]&&(i=(r[t[p]]||{})[e]||i),function(){return i.apply(n,arguments)}}for(var i={},u=(gn(e,function(n){i[n]=r(t,e,n)}),m(n)),c=[];u&&!dn(u)&&!yn(c,u);)gn(u,function(n){!i[n]&&vn(u,n,!h)&&(i[n]=r(t,u,n))}),c.push(u),u=m(u);return i}(l,r,g,d)),!!h&&!!n[cn]);u=l,t=s,c=r,a=g,n=!1!==(d=d&&e?!!e[cn]:d),sn(u)||(l=c[X]=c[X]||{},f=l[t]=l[t]||{},!1!==l[y]&&(l[y]=!!n),gn(c,function(n){var e,r,i;vn(c,n,!1)&&c[n]!==a[n]&&(f[n]=c[n],delete c[n],x(u,n)&&(!u[n]||u[n][Y])||(u[n]=(e=u,r=n,(i=function(){var n,t;return(function(n,t,e,r){var i=null;if(n&&x(e,p)){var o=n[X]||{};if((i=(o[e[p]]||{})[t])||pn("Missing ["+t+"] "+Q),!i[Z]&&!1!==o[y]){for(var u=!x(n,t),c=m(n),a=[];u&&c&&!dn(c)&&!yn(a,c);){var f=c[t];if(f){u=f===r;break}a.push(c),c=m(c)}try{u&&(n[t]=i),i[Z]=1}catch(l){o[y]=!1}}}return i}(this,r,e,i)||(typeof(t=(t=e[n=r])===i?m(e)[n]:t)!==Q&&pn("["+n+"] is not a "+Q),t)).apply(this,arguments)})[Y]=1,i)))}))}b[nn]=ln.o;var _n="name",xn="identifier",w="push",mn="isInitialized",bn="config",wn="logger",g="length",Cn="time",C="processNext",In="getPlugin",I="teardown",Tn="messageId",T="message",Pn="isAsync",Dn="_doTeardown",P="update",D="getNext",E="diagLog",En="setNextPlugin",N="createNew",Nn="userAgent",An="nodeType",Mn="replace",On="enableDebugExceptions",A="call",Un="isChildEvt",Ln="getCtx",f="setCtx",jn="complete",M="",O="core",Rn="disabled",kn="extensionConfig",U="processTelemetry",Sn="priority",zn="errorToConsole",Hn="warnToConsole",qn="getPerfMgr",t="toString",Gn="constructor",Fn=F,n=e.freeze,i=Array.isArray,Jn=l[t],Kn=J[t],$n=Kn[A](e),Vn=/-([a-z])/g,Bn=/([^\w\d_$])/g,Wn=/^(\d+[\w\d_$])/,Qn=Object.getPrototypeOf;function Xn(n){return n===undefined||typeof n===_}function L(n){return null===n||Xn(n)}function Yn(n){return!(!n||typeof n!==q)}function j(n){return!(!n||typeof n!==H)}function Zn(n){var t=n;return n&&"string"==typeof n?(t=(t=n[Mn](Vn,function(n,t){return t.toUpperCase()}))[Mn](Bn,"_"))[Mn](Wn,function(n,t){return"_"+t}):t}function nt(n,t){if(n)for(var e in n)J[A](n,e)&&t[A](n,e,n[e])}function tt(n,t){return!(!n||!t||!~n.indexOf(t))}var R=i||function(n){return!(!n||"[object Array]"!==Jn[A](n))};function et(n){return n&&"object"==typeof n&&(!(n=(Qn||function(n){if(n){if(Qn)return Qn(n);n=n.__proto__||n[r]||n[Gn];if(n)return n}return null})(n))||typeof(n=n[Gn]&&J[A](n,Gn)?n[Gn]:n)===H&&Kn[A](n)===$n)}function rt(n,t,e){var r=n[g];try{for(var i=0;i<r&&!(i in n&&-1===t[A](e||n,n[i],i,n));i++);}catch(o){}}var it=n||function(n){return n};function ot(){var n=Date;return n.now?n.now():(new n).getTime()}function ut(n,t){return L(n)?t:n}var ct="window",at="console",ft="JSON",lt=null,st=null;function k(n){var t=$();return t&&t[n]?t[n]:n===ct&&typeof window===q&&window?window:null}function dt(){return typeof JSON===q&&JSON||null!==k(ft)}function gt(){return dt()?JSON||k(ft):null}function S(n){var t=Object[r].toString[A](n),e=M;return"[object Error]"===t?e="{ stack: '"+n.stack+"', message: '"+n.message+"', name: '"+n[_n]+"'":dt()&&(e=gt().stringify(n)),t+e}var vt=null;function pt(n){return n?'"'+n[Mn](/\"/g,M)+'"':M}function yt(n,t){var e,r=typeof console!==_?console:k(at);r&&(e="log",j(r[e=r[n]?n:e])&&r[e](t))}_t.dataType="MessageData";var ht=_t;function _t(n,t,e,r){void 0===e&&(e=!1),this[Tn]=n,this[T]=(e?"AI: ":"AI (Internal): ")+n;e=M,dt()&&(e=gt().stringify(r)),n=(t?" message:"+pt(t):M)+(r?" props:"+pt(e):M);this[T]+=n}mt.__ieDyn=1;var xt=mt;function mt(i){this.identifier="DiagnosticLogger",this.queue=[];var a,f,l,s,d=0,g={};b(mt,this,function(o){var n;function u(n,t){var e,r;l<=d||(r=!0,e="AITR_"+t[Tn],g[e]?r=!1:g[e]=!0,r&&(n<=f&&(o.queue[w](t),d++,c(1===n?"error":"warn",t)),d===l&&(r=new ht(23,e="Internal events throttle limit per PageView reached for this app.",!1),o.queue[w](r),1===n?o[zn](e):o[Hn](e))))}function c(n,t){var e,r=(e=(e=vt)||!0===(i||{}).disableDbgExt?e:vt||(r=k("Microsoft"),vt=r?r.ApplicationInsights:vt))?e.ChromeDbgExt:null;r&&r[E]&&r[E](n,t)}a=ut((n=i||{}).loggingLevelConsole,0),f=ut(n.loggingLevelTelemetry,1),l=ut(n.maxMessageLimit,25),s=ut(n.enableDebug,ut(n[On],!1)),o.consoleLoggingLevel=function(){return a},o.telemetryLoggingLevel=function(){return f},o.maxInternalMessageLimit=function(){return l},o[On]=function(){return s},o.throwInternal=function(n,t,e,r,i){t=new ht(t,e,i=void 0!==i&&i,r);if(s)throw S(t);e=1===n?zn:Hn;Xn(t[T])?c("throw"+(1===n?"Critical":"Warning"),t):(i?(r=+t[Tn],!g[r]&&n<=a&&(o[e](t[T]),g[r]=!0)):n<=a&&o[e](t[T]),u(n,t))},o[Hn]=function(n){yt("warn",n),c("warning",n)},o[zn]=function(n){yt("error",n),c("error",n)},o.resetInternalMessageCount=function(){d=0,g={}},o.logInternalMessage=u})}function bt(n){return n||new xt}function wt(n,t,e,r,i,o){void 0===o&&(o=!1),bt(n).throwInternal(t,e,r,i,o)}function Ct(n,t){bt(n)[Hn](t)}var It="ParentContextKey",Tt="ChildrenContextKey",Pt=(c.ParentContextKey="parent",c.ChildrenContextKey="childEvts",c);function c(n,i,t){var r,o=this,u=!1;o.start=ot(),o[_n]=n,o[Pn]=t,o[Un]=function(){return!1},j(i)&&(u=function(n){if(Fn)try{var t={enumerable:!0,configurable:!0,get:function(){return!r&&j(i)&&(r=i(),i=null),r}};return Fn(n,"payload",t),!0}catch(e){}return!1}(o)),o[Ln]=function(n){return n?(n===c[It]||n===c[Tt]?o:o.ctx||{})[n]:null},o[f]=function(n,t){n&&(n===c[It]?(o[n]||(o[Un]=function(){return!0}),o[n]=t):n===c[Tt]?o[n]=t:(o.ctx=o.ctx||{})[n]=t)},o[jn]=function(){var n=0,t=o[Ln](c[Tt]);if(R(t))for(var e=0;e<t[g];e++){var r=t[e];r&&(n+=r[Cn])}o[Cn]=ot()-o.start,o.exTime=o[Cn]-n,o[jn]=function(){},!u&&j(i)&&(o.payload=i())}}var Dt="CoreUtils.doPerf";function Et(n,t,e,r,i){if(n)if(n=n[qn]?n[qn]():n){var o,u=void 0,c=n[Ln](Dt);try{if(u=n.create(t(),r,i))return c&&u[f]&&(u[f](Pt[It],c),c[Ln]&&c[f]&&((o=c[Ln](Pt[Tt]))||(o=[],c[f](Pt[Tt],o)),o[w](u))),n[f](Dt,u),e(u)}catch(a){u&&u[f]&&u[f]("exception",a)}finally{u&&n.fire(u),n[f](Dt,c)}}e()}var Nt=4294967296,u=4294967295,At=!1,Mt=123456789,Ot=987654321;function Ut(n){var t,e=0,r=k("crypto")||k("msCrypto");if(0===(e=r&&r.getRandomValues?r.getRandomValues(new Uint32Array(1))[0]&u:e)&&(!(r=typeof navigator===q&&navigator?navigator:k("navigator"))||r[Nn]===st&&null!==lt||(r=((st=r[Nn])||M).toLowerCase(),lt=tt(r,"msie")||tt(r,"trident/")),lt)){if(!At)try{var i=2147483647&ot();(t=(Math.random()*Nt^i)+i)<0&&(t>>>=0),Mt=123456789+t&u,Ot=987654321-t&u,At=!0}catch(o){}r=((Ot=36969*(65535&Ot)+(Ot>>16)&u)<<16)+(65535&(Mt=18e3*(65535&Mt)+(Mt>>16)&u))>>>0&u|0,e=(r>>>=0)&u}return 0===e&&(e=Math.floor(Nt*Math.random()|0)),n||(e>>>=0),e}var Lt=F,l="."+function(n){void 0===n&&(n=22);for(var t=Ut()>>>0,e=0,r=M;r[g]<n;)r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[0|63&t]||"",t>>>=6,5==++e&&(t=(Ut()<<2&4294967295|3&t)>>>0,e=0);return r}(6);function jt(n){return 1===n[An]||9===n[An]||!+n[An]}var Rt,kt=Rt={id:Zn("_aiData-plugin.2.8.120"+((o=void 0!==o&&o)?".2.8.12":M)+l),accept:jt,get:function(n,t,e,r){var i=n[Rt.id];return i?i[Zn(t)]:(r&&((i=function(n,t){var e=t[n.id];if(!e){e={};try{jt(t)&&!function(n,t,e){if(Lt)try{return Lt(n,t,{value:e,enumerable:!1,configurable:!0}),1}catch(r){}}(t,n.id,e)&&(t[n.id]=e)}catch(r){}}return e}(Rt,n))[Zn(t)]=e),e)},kill:function(n,t){if(n&&n[t])try{delete n[t]}catch(e){}}};function St(n){return kt.get(n,"state",{},!0)}var zt="TelemetryPluginChain",Ht="_hasRun",qt="_getTelCtx",Gt=0;function Ft(n,u,e,t){var r=null,i=[],o=(null!==t&&(r=t?function(n,t,e){for(;n;){if(n[In]()===e)return n;n=n[D]()}return Kt([e],t[bn]||{},t)}(n,e,t):n),{_next:function(){var n,t=r;return r=t?t[D]():null,t||(n=i)&&0<n[g]&&(rt(n,function(n){try{n.func[A](n.self,n.args)}catch(t){wt(e[wn],2,73,"Unexpected Exception during onComplete - "+S(t))}}),i=[]),t},ctx:{core:function(){return e},diagLog:function(){return(e||{})[wn]||new xt(u)},getCfg:function(){return u},getExtCfg:c,getConfig:function(n,t,e){void 0===e&&(e=!1);var r,n=c(n,null);return n&&!L(n[t])?r=n[t]:u&&!L(u[t])&&(r=u[t]),L(r)?e:r},hasNext:function(){return!!r},getNext:function(){return r},setNext:function(n){r=n},iterate:function(n){for(;t=o._next();){var t=t[In]();t&&n(t)}},onComplete:function(n,t){for(var e=[],r=2;r<arguments.length;r++)e[r-2]=arguments[r];n&&i[w]({func:n,self:Xn(t)?o.ctx:t,args:e})}}});function c(n,t,e){var r,i,o;return void 0===t&&(t={}),void 0===e&&(e=0),(r=u&&(i=u[kn])&&n?i[n]:r)?Yn(t)&&0!==e&&(o=function d(){var n=arguments,t=n[0]||{},e=n[g],r=!1,i=1;for(0<e&&"boolean"==typeof t&&(r=t,t=n[i]||{},i++),Yn(t)||(t={});i<e;i++){var o,u,c,a,f=n[i],l=R(f),s=Yn(f);for(o in f)(l&&o in f||s&&J[A](f,o))&&(u=f[o],c=void 0,r&&u&&((c=R(u))||et(u))&&(a=t[o],c?R(a)||(a=[]):et(a)||(a={}),u=d(r,a,u)),u!==undefined&&(t[o]=u))}return t}(!0,t,r),u&&2===e&&nt(t,function(n){var t;L(o[n])&&!L(t=u[n])&&(o[n]=t)}),r=o):r=t,r}return o}function Jt(n,e,r,t){var i=Ft(n,e,r,t),o=i.ctx;return o[C]=function(n){var t=i._next();return t&&t[U](n,o),!t},o[N]=function(n,t){return Jt((n=R(n=void 0===n?null:n)?Kt(n,e,r,t):n)||o[D](),e,r,t)},o}function Kt(n,t,e,r){var i,o=null,u=!r;return R(n)&&0<n[g]&&(i=null,rt(n,function(n){(u=!u&&r===n||u)&&n&&j(n[U])&&(n=$t(n,t,e),o=o||n,i&&i._setNext(n),i=n)})),r&&!o?Kt([r],t,e):o}function $t(a,r,i){var f=null,o=j(a[U]),u=j(a[En]),l=a?a[xn]+"-"+a[Sn]+"-"+Gt++:"Unknown-0-"+Gt++,c={getPlugin:function(){return a},getNext:function(){return f},processTelemetry:function(e,n){var t;s(n=n||(t=(t=a&&j(a[qt])?a[qt]():t)||Jt(c,r,i)),function(n){if(!a||!o)return!1;var t=St(a);return!t[I]&&!t[Rn]&&(u&&a[En](f),a[U](e,n),!0)},"processTelemetry",function(){return{item:e}},!e.sync)||n[C](e)},unload:function(r,i){s(r,function(){var n,t,e=!1;return a&&(n=St(a),t=a[O]||n[O],!a||t&&t!==r.core()||n[I]||(n[O]=null,n[I]=!0,n[mn]=!1,a[I]&&!0===a[I](r,i)&&(e=!0))),e},"unload",function(){},i[Pn])||r[C](i)},update:function(r,i){s(r,function(){var n,t,e=!1;return a&&(n=St(a),t=a[O]||n[O],!a||t&&t!==r.core()||n[I]||a[P]&&!0===a[P](r,i)&&(e=!0)),e},"update",function(){},!1)||r[C](i)},_id:l,_setNext:function(n){f=n}};function s(e,r,i,n,t){var o=!1,u=a?a[xn]:zt,c=(c=e[Ht])||(e[Ht]={});return e.setNext(f),a&&Et(e[O](),function(){return u+":"+i},function(){c[l]=!0;try{var n=f?f._id:M;n&&(c[n]=!1),o=r(e)}catch(t){n=!f||c[f._id];n&&(o=!0),f&&n||wt(e[E](),1,73,"Plugin ["+u+"] failed during "+i+" - "+S(t)+", run flags: "+S(c))}},n,t),o}return it(c)}function Vt(){var t=[];return{add:function(n){n&&t[w](n)},run:function(e,r){rt(t,function(n){try{n(e,r)}catch(t){wt(e[E](),2,73,"Unexpected error calling unload handler - "+S(t))}}),t=[]}}}var z="getPlugin",t=(Bt.__ieDyn=1,Bt);function Bt(){var o,u,l,s,d,c=this;function t(n){var t,n=n=void 0===n?null:n;return n||(t=u||Jt(null,{},c[O]),n=l&&l[z]?t[N](null,l[z]):t[N](null,l)),n}function a(n,t,e){n&&(r=i=[],n&&(r=n[kn])!==i&&L(r)&&(n[kn]=r=i)),!e&&t&&(e=t.getProcessTelContext()[D]());var r,i=l;l&&l[z]&&(i=l[z]()),c[O]=t,u=Jt(e,n,t,i)}function g(){o=!1,c[O]=null,l=u=null,d=[],s=Vt()}g(),b(Bt,c,function(f){var n,t,e,r,i;f.initialize=function(n,t,e,r){a(n,t,r),o=!0},f[I]=function(n,t){var e,r,i,o,u=f[O];if(u&&(!n||u===n[O]()))return r=!1,i=n||function a(n,e,t){var r=e[bn]||{},i=Ft(n,r,e,t),o=i.ctx;return o[C]=function(n){var t=i._next();return t&&t.unload(o,n),!t},o[N]=function(n,t){return a((n=R(n=void 0===n?null:n)?Kt(n,r,e,t):n)||o[D](),e,t)},o}(null,u,l&&l[z]?l[z]():l),o=t||((n={reason:0})[Pn]=!1,n),f[Dn]&&!0===f[Dn](i,o,c)?e=!0:c(),e;function c(){var n;r||(r=!0,s.run(i,t),n=d,d=[],rt(n,function(n){n.rm()}),!0===e&&i[C](o),g())}},f[P]=function(n,t){var e,r,i,o=f[O];if(o&&(!n||o===n[O]()))return r=!1,i=n||function c(n,e,t){var r=e[bn]||{},i=Ft(n,r,e,t).ctx;return i[C]=function(t){return i.iterate(function(n){j(n[P])&&n[P](i,t)})},i[N]=function(n,t){return c((n=R(n=void 0===n?null:n)?Kt(n,r,e,t):n)||i[D](),e,t)},i}(null,o,l&&l[z]?l[z]():l),f._doUpdate&&!0===f._doUpdate(i,t||{reason:0},u)?e=!0:u(),e;function u(){r||(r=!0,a(i.getCfg(),i.core(),i[D]()))}},f._addHook=function(n){n&&(R(n)?d=d.concat(n):d[w](n))},e="_addUnloadCb",t=function(){return s},(n=f)&&t&&(n[e]=(i=r=null,j(e=t)?r=e:i=e,function(){var n=arguments;if(i=r?r():i)return i.add.apply(i,n)}))}),c[E]=function(n){return t(n)[E]()},c[mn]=function(){return o},c.setInitialized=function(n){o=n},c[En]=function(n){l=n},c[C]=function(n,t){t?t[C](n):l&&j(l[U])&&l[U](n,null)},c._getTelCtx=t}var Wt="extensionConfig",Qt=(Xt.getConfig=function(n,t,e,r){return void 0===r&&(r=!1),e=(e&&n[Wt]&&n[Wt][e]&&!L(n[Wt][e][t])?n[Wt][e]:n)[t],L(e)?r:e},Xt);function Xt(){}var Yt=undefined,i="prototype",n=Object,Zt=n[i],F=Array,ne=F[i];function te(t){return function(n){return typeof n===t}}function ee(n){return Zt.toString.call(n)}var re=te("string"),ie=te("function"),oe=F.isArray,ue=te("number"),ce=String;function ae(n,t){var e="";if(n&&"[object Error]"===ee(n))e="{ stack: '"+n.stack+"', message: '"+n.message+"', name: '"+n.name+"'";else try{e=JSON.stringify(n,null,t?ue(t)?t:4:Yt)}catch(r){e=" - "+ae(r,t)}return ee(n)+": "+e}var fe,le,se,o,de,ge=n.defineProperty,ve=(fe="slice",le=ne,"unref"),pe="enabled";function ye(){return d["default"]}function he(){this.constructor=se}function _e(n){var f,l,s,d,g,v,p,t=de.call(this)||this,y=(t.identifier="AppInsightsReactNativePlugin",t.priority=140,null);function h(){return{disableDeviceCollection:!1,disableExceptionCollection:!1,uniqueIdPromiseTimeout:5e3}}return b(_e,t,function(i,o){function u(){l=n||h(),g=!(f={}),p=d=s=null}function r(n){f.id=n,g=!1,v&&v.cancel(),!g&&y&&0<y.length&&i.isInitialized()&&(n=y,y=null,rt(n,function(n){try{i.processTelemetry(n.item,n.itemCtx)}catch(t){}}))}function c(){return typeof global!==_&&global?global:$()}function a(n,t){s?s.trackException({exception:n,severityLevel:3}):wt(i.diagLog(),1,64,"Analytics plugin is not available, ReactNative plugin telemetry will not be sent: "),d&&d.call(global,n,t)}u(),i.initialize=function(n,t,e){var r;i.isInitialized()||(o.initialize(n,t,e),r=n||{},nt(h(),function(n,t){l[n]=Qt.getConfig(r,n,i.identifier,Xn(l[n])?t:l[n])}),l.disableDeviceCollection||i._collectDeviceInfo(),t&&t.getPlugin&&(s=null==(e=t.getPlugin("ApplicationInsightsAnalytics"))?void 0:e.plugin),l.disableExceptionCollection||i._setExceptionHandler())},i.processTelemetry=function(n,t){var e;g?(y=y||[]).push({item:n,itemCtx:t}):(e=n,f&&(e.ext=e.ext||{},e.ext.device=e.ext.device||{},re(f.id)&&(e.ext.device.localId=f.id),re(f.model)&&(e.ext.device.model=f.model),re(f.deviceClass)&&(e.ext.device.deviceClass=f.deviceClass)),i.processNext(n,t))},i.setDeviceInfoModule=function(n){p=n},i.setDeviceId=r,i.setDeviceModel=function(n){f.model=n},i.setDeviceType=function(n){f.deviceClass=n},i._collectDeviceInfo=function(){try{var n=p||ye(),t=(f.deviceClass=n.getDeviceType(),f.model=n.getModel(),n.getUniqueId());t&&ie(t.then)?(g=!0,v&&v.cancel(),(v=function(){return t=this,n=Yt,e=function(n){var t,e=n&&n[fe]||le&&le[fe];if(e)return t=arguments,(e||void 0).apply(n,e?ne.slice.call(t,1):t);e="'"+ce(fe)+"' not defined for "+ae(n);throw new TypeError(e)}(arguments),d=(s=oe(n))?n.length:0,g=(0<d?n[0]:s?Yt:n)||setTimeout,v=(1<d?n[1]:Yt)||clearTimeout,p=e[0],e[0]=function(){y.dn(),p.apply(t,arguments)},i=function(n){v.call(t,n)},u=!0,c=(r=function(n){if(n){if(n.refresh)return n.refresh(),n;v.call(t,n)}return g.apply(t,e)})(null),(s={cancel:l=function(){c&&i(c),c=null},refresh:f=function(){return c=r(c),u||a(),o},hasRef:function(){return c&&c.hasRef?c.hasRef():u},ref:function(){return u=!0,c&&c.ref&&c.ref(),o}})[ve]=a=function(){return u=!1,c&&c[ve]&&c[ve](),o},s[pe]=!1,ge(o=s,pe,{get:function(){return!!c},set:function(n){!n&&c&&l(),n&&!c&&f()}}),(y={h:o,dn:function(){c=null}}).h;var t,n,e,r,i,o,u,c,a,f,l,s,d,g,v,p,y}(function(){v=null,r(f.id)},0)).unref(),t.then(function(n){r(n)},function(n){Ct(i.diagLog(),"Failed to get device id: "+S(n)),r(f.id)})):re(t)&&(f.id=t)}catch(e){Ct(i.diagLog(),"Failed to get DeviceInfo: "+((n=e)&&"[object Error]"===Jn[A](n)?n[_n]:M)+" - "+S(e))}},i._doTeardown=function(n,t,e){var r;(r=c())&&r.ErrorUtils&&r.ErrorUtils.getGlobalHandler()===a&&r.ErrorUtils.setGlobalHandler(d||null),u()},i._setExceptionHandler=function(){var n=c();n&&n.ErrorUtils&&(d="function"==typeof n.ErrorUtils.getGlobalHandler&&n.ErrorUtils.getGlobalHandler()||n.ErrorUtils._globalHandler,n.ErrorUtils.setGlobalHandler(a))},i._config=l,i._getDbgPlgTargets=function(){return[f,p]}}),t}se=_e,typeof(o=de=t)!==H&&null!==o&&V("Class extends value "+o+" is not a constructor or null"),B(se,o),se[r]=(he[r]=o[r],new he),_e.__ieDyn=1,a.ReactNativePlugin=_e,a.getReactNativeDeviceInfo=ye,Object.defineProperty(a,"__esModule",{value:!0})};"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react-native-device-info")):"function"==typeof define&&define.amd?define(["exports","react-native-device-info"],t):t(((n="undefined"!=typeof globalThis?globalThis:n||self).Microsoft=n.Microsoft||{},n.Microsoft.ApplicationInsights=n.Microsoft.ApplicationInsights||{}),n.DeviceInfo);
|
|
5
|
+
var n=this,t=function(a,l){"use strict";function s(n){return n&&"object"==typeof n&&"default"in n?n:{"default":n}}var d=s(l),H="function",q="object",_="undefined",r="prototype",G="hasOwnProperty",e=Object,l=e[r],F=(e.create,e.defineProperty),J=l[G],K=null;function $(n){n=!1===(n=void 0===n||n)?null:K;return n||((n=(n=(n=typeof globalThis!==_?globalThis:n)||typeof self===_?n:self)||typeof window===_?n:window)||typeof global===_||(n=global),K=n),n}function V(n){throw new TypeError(n)}($()||{}).Symbol,($()||{}).Reflect;var B=function(n,t){return(B=e.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var e in t)t[G](e)&&(n[e]=t[e])})(n,t)},n="undefined",W="constructor",v="prototype",Q="function",X="_dynInstFuncs",Y="_isDynProxy",p="_dynClass",Z="_dynInstChk",y=Z,nn="_dfOpts",tn="_unknown_",en="__proto__",rn="_dyn"+en,t="__dynProto$Gbl",on="_dynInstProto",un="useBaseInst",cn="setInstFuncs",an=Object,h=an.getPrototypeOf,fn=an.getOwnPropertyNames,n=(i=(i=(i=(i=typeof globalThis!=n?globalThis:i)||typeof self==n?i:self)||typeof window==n?i:window)||typeof global==n?i:global)||{},ln=n[t]||(n[t]={o:((i={})[cn]=!0,i[un]=!0,i),n:1e3});function x(n,t){return n&&an[v].hasOwnProperty.call(n,t)}function sn(n){return n&&(n===an[v]||n===Array[v])}function dn(n){return sn(n)||n===Function[v]}function m(n){if(n){if(h)return h(n);var t=n[en]||n[v]||(n[W]?n[W][v]:null),e=n[rn]||t;x(n,rn)||(delete n[on],e=n[rn]=n[on]||n[rn],n[on]=t)}return e}function gn(n,t){var e=[];if(fn)e=fn(n);else for(var r in n)"string"==typeof r&&x(n,r)&&e.push(r);if(e&&0<e.length)for(var i=0;i<e.length;i++)t(e[i])}function vn(n,t,e){return t!==W&&typeof n[t]===Q&&(e||x(n,t))}function pn(n){throw new TypeError("DynamicProto: "+n)}function yn(n,t){for(var e=n.length-1;0<=e;e--)if(n[e]===t)return 1}function hn(n,t){return x(n,v)?n.name||t||tn:((n||{})[W]||{}).name||t||tn}function b(n,r,t,e){x(n,v)||pn("theClass is an invalid class definition.");var i,o,u,c,a,f,l=n[v],s=(function(n){if(!h)return 1;for(var t=[],e=m(r);e&&!dn(e)&&!yn(t,e);){if(e===n)return 1;t.push(e),e=m(e)}}(l)||pn("["+hn(n)+"] not in hierarchy of ["+hn(r)+"]"),null),n=(x(l,p)?s=l[p]:(s="_dynCls$"+hn(n,"_")+"$"+ln.n,ln.n++,l[p]=s),b[nn]),d=!!n[un],g=(d&&e&&e[un]!==undefined&&(d=!!e[un]),o={},gn(i=r,function(n){!o[n]&&vn(i,n,!1)&&(o[n]=i[n])}),o),d=(t(r,function(n,t,e,o){function r(n,t,e){var r,i=t[e];return i[Y]&&o&&!1!==(r=n[X]||{})[y]&&(i=(r[t[p]]||{})[e]||i),function(){return i.apply(n,arguments)}}for(var i={},u=(gn(e,function(n){i[n]=r(t,e,n)}),m(n)),c=[];u&&!dn(u)&&!yn(c,u);)gn(u,function(n){!i[n]&&vn(u,n,!h)&&(i[n]=r(t,u,n))}),c.push(u),u=m(u);return i}(l,r,g,d)),!!h&&!!n[cn]);u=l,t=s,c=r,a=g,n=!1!==(d=d&&e?!!e[cn]:d),sn(u)||(l=c[X]=c[X]||{},f=l[t]=l[t]||{},!1!==l[y]&&(l[y]=!!n),gn(c,function(n){var e,r,i;vn(c,n,!1)&&c[n]!==a[n]&&(f[n]=c[n],delete c[n],x(u,n)&&(!u[n]||u[n][Y])||(u[n]=(e=u,r=n,(i=function(){var n,t;return(function(n,t,e,r){var i=null;if(n&&x(e,p)){var o=n[X]||{};if((i=(o[e[p]]||{})[t])||pn("Missing ["+t+"] "+Q),!i[Z]&&!1!==o[y]){for(var u=!x(n,t),c=m(n),a=[];u&&c&&!dn(c)&&!yn(a,c);){var f=c[t];if(f){u=f===r;break}a.push(c),c=m(c)}try{u&&(n[t]=i),i[Z]=1}catch(l){o[y]=!1}}}return i}(this,r,e,i)||(typeof(t=(t=e[n=r])===i?m(e)[n]:t)!==Q&&pn("["+n+"] is not a "+Q),t)).apply(this,arguments)})[Y]=1,i)))}))}b[nn]=ln.o;var _n="name",xn="identifier",w="push",mn="isInitialized",bn="config",wn="logger",g="length",Cn="time",C="processNext",In="getPlugin",I="teardown",Tn="messageId",T="message",Pn="isAsync",Dn="_doTeardown",P="update",D="getNext",E="diagLog",En="setNextPlugin",N="createNew",Nn="userAgent",An="nodeType",Mn="replace",On="enableDebugExceptions",A="call",Un="isChildEvt",Ln="getCtx",f="setCtx",jn="complete",M="",O="core",Rn="disabled",kn="extensionConfig",U="processTelemetry",Sn="priority",zn="errorToConsole",Hn="warnToConsole",qn="getPerfMgr",t="toString",Gn="constructor",Fn=F,n=e.freeze,i=Array.isArray,Jn=l[t],Kn=J[t],$n=Kn[A](e),Vn=/-([a-z])/g,Bn=/([^\w\d_$])/g,Wn=/^(\d+[\w\d_$])/,Qn=Object.getPrototypeOf;function Xn(n){return n===undefined||typeof n===_}function L(n){return null===n||Xn(n)}function Yn(n){return!(!n||typeof n!==q)}function j(n){return!(!n||typeof n!==H)}function Zn(n){var t=n;return n&&"string"==typeof n?(t=(t=n[Mn](Vn,function(n,t){return t.toUpperCase()}))[Mn](Bn,"_"))[Mn](Wn,function(n,t){return"_"+t}):t}function nt(n,t){if(n)for(var e in n)J[A](n,e)&&t[A](n,e,n[e])}function tt(n,t){return!(!n||!t||!~n.indexOf(t))}var R=i||function(n){return!(!n||"[object Array]"!==Jn[A](n))};function et(n){return n&&"object"==typeof n&&(!(n=(Qn||function(n){if(n){if(Qn)return Qn(n);n=n.__proto__||n[r]||n[Gn];if(n)return n}return null})(n))||typeof(n=n[Gn]&&J[A](n,Gn)?n[Gn]:n)===H&&Kn[A](n)===$n)}function rt(n,t,e){var r=n[g];try{for(var i=0;i<r&&!(i in n&&-1===t[A](e||n,n[i],i,n));i++);}catch(o){}}var it=n||function(n){return n};function ot(){var n=Date;return n.now?n.now():(new n).getTime()}function ut(n,t){return L(n)?t:n}var ct="window",at="console",ft="JSON",lt=null,st=null;function k(n){var t=$();return t&&t[n]?t[n]:n===ct&&typeof window===q&&window?window:null}function dt(){return typeof JSON===q&&JSON||null!==k(ft)}function gt(){return dt()?JSON||k(ft):null}function S(n){var t=Object[r].toString[A](n),e=M;return"[object Error]"===t?e="{ stack: '"+n.stack+"', message: '"+n.message+"', name: '"+n[_n]+"'":dt()&&(e=gt().stringify(n)),t+e}var vt=null;function pt(n){return n?'"'+n[Mn](/\"/g,M)+'"':M}function yt(n,t){var e,r=typeof console!==_?console:k(at);r&&(e="log",j(r[e=r[n]?n:e])&&r[e](t))}_t.dataType="MessageData";var ht=_t;function _t(n,t,e,r){void 0===e&&(e=!1),this[Tn]=n,this[T]=(e?"AI: ":"AI (Internal): ")+n;e=M,dt()&&(e=gt().stringify(r)),n=(t?" message:"+pt(t):M)+(r?" props:"+pt(e):M);this[T]+=n}mt.__ieDyn=1;var xt=mt;function mt(i){this.identifier="DiagnosticLogger",this.queue=[];var a,f,l,s,d=0,g={};b(mt,this,function(o){var n;function u(n,t){var e,r;l<=d||(r=!0,e="AITR_"+t[Tn],g[e]?r=!1:g[e]=!0,r&&(n<=f&&(o.queue[w](t),d++,c(1===n?"error":"warn",t)),d===l&&(r=new ht(23,e="Internal events throttle limit per PageView reached for this app.",!1),o.queue[w](r),1===n?o[zn](e):o[Hn](e))))}function c(n,t){var e,r=(e=(e=vt)||!0===(i||{}).disableDbgExt?e:vt||(r=k("Microsoft"),vt=r?r.ApplicationInsights:vt))?e.ChromeDbgExt:null;r&&r[E]&&r[E](n,t)}a=ut((n=i||{}).loggingLevelConsole,0),f=ut(n.loggingLevelTelemetry,1),l=ut(n.maxMessageLimit,25),s=ut(n.enableDebug,ut(n[On],!1)),o.consoleLoggingLevel=function(){return a},o.telemetryLoggingLevel=function(){return f},o.maxInternalMessageLimit=function(){return l},o[On]=function(){return s},o.throwInternal=function(n,t,e,r,i){t=new ht(t,e,i=void 0!==i&&i,r);if(s)throw S(t);e=1===n?zn:Hn;Xn(t[T])?c("throw"+(1===n?"Critical":"Warning"),t):(i?(r=+t[Tn],!g[r]&&n<=a&&(o[e](t[T]),g[r]=!0)):n<=a&&o[e](t[T]),u(n,t))},o[Hn]=function(n){yt("warn",n),c("warning",n)},o[zn]=function(n){yt("error",n),c("error",n)},o.resetInternalMessageCount=function(){d=0,g={}},o.logInternalMessage=u})}function bt(n){return n||new xt}function wt(n,t,e,r,i,o){void 0===o&&(o=!1),bt(n).throwInternal(t,e,r,i,o)}function Ct(n,t){bt(n)[Hn](t)}var It="ParentContextKey",Tt="ChildrenContextKey",Pt=(c.ParentContextKey="parent",c.ChildrenContextKey="childEvts",c);function c(n,i,t){var r,o=this,u=!1;o.start=ot(),o[_n]=n,o[Pn]=t,o[Un]=function(){return!1},j(i)&&(u=function(n){if(Fn)try{var t={enumerable:!0,configurable:!0,get:function(){return!r&&j(i)&&(r=i(),i=null),r}};return Fn(n,"payload",t),!0}catch(e){}return!1}(o)),o[Ln]=function(n){return n?(n===c[It]||n===c[Tt]?o:o.ctx||{})[n]:null},o[f]=function(n,t){n&&(n===c[It]?(o[n]||(o[Un]=function(){return!0}),o[n]=t):n===c[Tt]?o[n]=t:(o.ctx=o.ctx||{})[n]=t)},o[jn]=function(){var n=0,t=o[Ln](c[Tt]);if(R(t))for(var e=0;e<t[g];e++){var r=t[e];r&&(n+=r[Cn])}o[Cn]=ot()-o.start,o.exTime=o[Cn]-n,o[jn]=function(){},!u&&j(i)&&(o.payload=i())}}var Dt="CoreUtils.doPerf";function Et(n,t,e,r,i){if(n)if(n=n[qn]?n[qn]():n){var o,u=void 0,c=n[Ln](Dt);try{if(u=n.create(t(),r,i))return c&&u[f]&&(u[f](Pt[It],c),c[Ln]&&c[f]&&((o=c[Ln](Pt[Tt]))||(o=[],c[f](Pt[Tt],o)),o[w](u))),n[f](Dt,u),e(u)}catch(a){u&&u[f]&&u[f]("exception",a)}finally{u&&n.fire(u),n[f](Dt,c)}}e()}var Nt=4294967296,u=4294967295,At=!1,Mt=123456789,Ot=987654321;function Ut(n){var t,e=0,r=k("crypto")||k("msCrypto");if(0===(e=r&&r.getRandomValues?r.getRandomValues(new Uint32Array(1))[0]&u:e)&&(!(r=typeof navigator===q&&navigator?navigator:k("navigator"))||r[Nn]===st&&null!==lt||(r=((st=r[Nn])||M).toLowerCase(),lt=tt(r,"msie")||tt(r,"trident/")),lt)){if(!At)try{var i=2147483647&ot();(t=(Math.random()*Nt^i)+i)<0&&(t>>>=0),Mt=123456789+t&u,Ot=987654321-t&u,At=!0}catch(o){}r=((Ot=36969*(65535&Ot)+(Ot>>16)&u)<<16)+(65535&(Mt=18e3*(65535&Mt)+(Mt>>16)&u))>>>0&u|0,e=(r>>>=0)&u}return 0===e&&(e=Math.floor(Nt*Math.random()|0)),n||(e>>>=0),e}var Lt=F,l="."+function(n){void 0===n&&(n=22);for(var t=Ut()>>>0,e=0,r=M;r[g]<n;)r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[0|63&t]||"",t>>>=6,5==++e&&(t=(Ut()<<2&4294967295|3&t)>>>0,e=0);return r}(6);function jt(n){return 1===n[An]||9===n[An]||!+n[An]}var Rt,kt=Rt={id:Zn("_aiData-plugin.2.8.140"+((o=void 0!==o&&o)?".2.8.14":M)+l),accept:jt,get:function(n,t,e,r){var i=n[Rt.id];return i?i[Zn(t)]:(r&&((i=function(n,t){var e=t[n.id];if(!e){e={};try{jt(t)&&!function(n,t,e){if(Lt)try{return Lt(n,t,{value:e,enumerable:!1,configurable:!0}),1}catch(r){}}(t,n.id,e)&&(t[n.id]=e)}catch(r){}}return e}(Rt,n))[Zn(t)]=e),e)},kill:function(n,t){if(n&&n[t])try{delete n[t]}catch(e){}}};function St(n){return kt.get(n,"state",{},!0)}var zt="TelemetryPluginChain",Ht="_hasRun",qt="_getTelCtx",Gt=0;function Ft(n,u,e,t){var r=null,i=[],o=(null!==t&&(r=t?function(n,t,e){for(;n;){if(n[In]()===e)return n;n=n[D]()}return Kt([e],t[bn]||{},t)}(n,e,t):n),{_next:function(){var n,t=r;return r=t?t[D]():null,t||(n=i)&&0<n[g]&&(rt(n,function(n){try{n.func[A](n.self,n.args)}catch(t){wt(e[wn],2,73,"Unexpected Exception during onComplete - "+S(t))}}),i=[]),t},ctx:{core:function(){return e},diagLog:function(){return(e||{})[wn]||new xt(u)},getCfg:function(){return u},getExtCfg:c,getConfig:function(n,t,e){void 0===e&&(e=!1);var r,n=c(n,null);return n&&!L(n[t])?r=n[t]:u&&!L(u[t])&&(r=u[t]),L(r)?e:r},hasNext:function(){return!!r},getNext:function(){return r},setNext:function(n){r=n},iterate:function(n){for(;t=o._next();){var t=t[In]();t&&n(t)}},onComplete:function(n,t){for(var e=[],r=2;r<arguments.length;r++)e[r-2]=arguments[r];n&&i[w]({func:n,self:Xn(t)?o.ctx:t,args:e})}}});function c(n,t,e){var r,i,o;return void 0===t&&(t={}),void 0===e&&(e=0),(r=u&&(i=u[kn])&&n?i[n]:r)?Yn(t)&&0!==e&&(o=function d(){var n=arguments,t=n[0]||{},e=n[g],r=!1,i=1;for(0<e&&"boolean"==typeof t&&(r=t,t=n[i]||{},i++),Yn(t)||(t={});i<e;i++){var o,u,c,a,f=n[i],l=R(f),s=Yn(f);for(o in f)(l&&o in f||s&&J[A](f,o))&&(u=f[o],c=void 0,r&&u&&((c=R(u))||et(u))&&(a=t[o],c?R(a)||(a=[]):et(a)||(a={}),u=d(r,a,u)),u!==undefined&&(t[o]=u))}return t}(!0,t,r),u&&2===e&&nt(t,function(n){var t;L(o[n])&&!L(t=u[n])&&(o[n]=t)}),r=o):r=t,r}return o}function Jt(n,e,r,t){var i=Ft(n,e,r,t),o=i.ctx;return o[C]=function(n){var t=i._next();return t&&t[U](n,o),!t},o[N]=function(n,t){return Jt((n=R(n=void 0===n?null:n)?Kt(n,e,r,t):n)||o[D](),e,r,t)},o}function Kt(n,t,e,r){var i,o=null,u=!r;return R(n)&&0<n[g]&&(i=null,rt(n,function(n){(u=!u&&r===n||u)&&n&&j(n[U])&&(n=$t(n,t,e),o=o||n,i&&i._setNext(n),i=n)})),r&&!o?Kt([r],t,e):o}function $t(a,r,i){var f=null,o=j(a[U]),u=j(a[En]),l=a?a[xn]+"-"+a[Sn]+"-"+Gt++:"Unknown-0-"+Gt++,c={getPlugin:function(){return a},getNext:function(){return f},processTelemetry:function(e,n){var t;s(n=n||(t=(t=a&&j(a[qt])?a[qt]():t)||Jt(c,r,i)),function(n){if(!a||!o)return!1;var t=St(a);return!t[I]&&!t[Rn]&&(u&&a[En](f),a[U](e,n),!0)},"processTelemetry",function(){return{item:e}},!e.sync)||n[C](e)},unload:function(r,i){s(r,function(){var n,t,e=!1;return a&&(n=St(a),t=a[O]||n[O],!a||t&&t!==r.core()||n[I]||(n[O]=null,n[I]=!0,n[mn]=!1,a[I]&&!0===a[I](r,i)&&(e=!0))),e},"unload",function(){},i[Pn])||r[C](i)},update:function(r,i){s(r,function(){var n,t,e=!1;return a&&(n=St(a),t=a[O]||n[O],!a||t&&t!==r.core()||n[I]||a[P]&&!0===a[P](r,i)&&(e=!0)),e},"update",function(){},!1)||r[C](i)},_id:l,_setNext:function(n){f=n}};function s(e,r,i,n,t){var o=!1,u=a?a[xn]:zt,c=(c=e[Ht])||(e[Ht]={});return e.setNext(f),a&&Et(e[O](),function(){return u+":"+i},function(){c[l]=!0;try{var n=f?f._id:M;n&&(c[n]=!1),o=r(e)}catch(t){n=!f||c[f._id];n&&(o=!0),f&&n||wt(e[E](),1,73,"Plugin ["+u+"] failed during "+i+" - "+S(t)+", run flags: "+S(c))}},n,t),o}return it(c)}function Vt(){var t=[];return{add:function(n){n&&t[w](n)},run:function(e,r){rt(t,function(n){try{n(e,r)}catch(t){wt(e[E](),2,73,"Unexpected error calling unload handler - "+S(t))}}),t=[]}}}var z="getPlugin",t=(Bt.__ieDyn=1,Bt);function Bt(){var o,u,l,s,d,c=this;function t(n){var t,n=n=void 0===n?null:n;return n||(t=u||Jt(null,{},c[O]),n=l&&l[z]?t[N](null,l[z]):t[N](null,l)),n}function a(n,t,e){n&&(r=i=[],n&&(r=n[kn])!==i&&L(r)&&(n[kn]=r=i)),!e&&t&&(e=t.getProcessTelContext()[D]());var r,i=l;l&&l[z]&&(i=l[z]()),c[O]=t,u=Jt(e,n,t,i)}function g(){o=!1,c[O]=null,l=u=null,d=[],s=Vt()}g(),b(Bt,c,function(f){var n,t,e,r,i;f.initialize=function(n,t,e,r){a(n,t,r),o=!0},f[I]=function(n,t){var e,r,i,o,u=f[O];if(u&&(!n||u===n[O]()))return r=!1,i=n||function a(n,e,t){var r=e[bn]||{},i=Ft(n,r,e,t),o=i.ctx;return o[C]=function(n){var t=i._next();return t&&t.unload(o,n),!t},o[N]=function(n,t){return a((n=R(n=void 0===n?null:n)?Kt(n,r,e,t):n)||o[D](),e,t)},o}(null,u,l&&l[z]?l[z]():l),o=t||((n={reason:0})[Pn]=!1,n),f[Dn]&&!0===f[Dn](i,o,c)?e=!0:c(),e;function c(){var n;r||(r=!0,s.run(i,t),n=d,d=[],rt(n,function(n){n.rm()}),!0===e&&i[C](o),g())}},f[P]=function(n,t){var e,r,i,o=f[O];if(o&&(!n||o===n[O]()))return r=!1,i=n||function c(n,e,t){var r=e[bn]||{},i=Ft(n,r,e,t).ctx;return i[C]=function(t){return i.iterate(function(n){j(n[P])&&n[P](i,t)})},i[N]=function(n,t){return c((n=R(n=void 0===n?null:n)?Kt(n,r,e,t):n)||i[D](),e,t)},i}(null,o,l&&l[z]?l[z]():l),f._doUpdate&&!0===f._doUpdate(i,t||{reason:0},u)?e=!0:u(),e;function u(){r||(r=!0,a(i.getCfg(),i.core(),i[D]()))}},f._addHook=function(n){n&&(R(n)?d=d.concat(n):d[w](n))},e="_addUnloadCb",t=function(){return s},(n=f)&&t&&(n[e]=(i=r=null,j(e=t)?r=e:i=e,function(){var n=arguments;if(i=r?r():i)return i.add.apply(i,n)}))}),c[E]=function(n){return t(n)[E]()},c[mn]=function(){return o},c.setInitialized=function(n){o=n},c[En]=function(n){l=n},c[C]=function(n,t){t?t[C](n):l&&j(l[U])&&l[U](n,null)},c._getTelCtx=t}var Wt="extensionConfig",Qt=(Xt.getConfig=function(n,t,e,r){return void 0===r&&(r=!1),e=(e&&n[Wt]&&n[Wt][e]&&!L(n[Wt][e][t])?n[Wt][e]:n)[t],L(e)?r:e},Xt);function Xt(){}var Yt=undefined,Zt=null,i="prototype",n=Object,ne=n[i],F=Array,te=F[i];function ee(t){return function(n){return typeof n===t}}function re(n){return ne.toString.call(n)}var ie=ee("string"),oe=ee("function"),ue=F.isArray,ce=ee("number"),ae=String;function fe(n,t){var e="";if(n&&"[object Error]"===re(n))e="{ stack: '"+n.stack+"', message: '"+n.message+"', name: '"+n.name+"'";else try{e=JSON.stringify(n,Zt,t?ce(t)?t:4:Yt)}catch(r){e=" - "+fe(r,t)}return re(n)+": "+e}var le,se,de,o,ge,ve=n.defineProperty,pe=(le="slice",se=te,"unref"),ye="enabled";function he(){return d["default"]}function _e(){this.constructor=de}function xe(n){var f,l,s,d,g,v,p,t=ge.call(this)||this,y=(t.identifier="AppInsightsReactNativePlugin",t.priority=140,null);function h(){return{disableDeviceCollection:!1,disableExceptionCollection:!1,uniqueIdPromiseTimeout:5e3}}return b(xe,t,function(i,o){function u(){l=n||h(),g=!(f={}),p=d=s=null}function r(n){f.id=n,g=!1,v&&v.cancel(),!g&&y&&0<y.length&&i.isInitialized()&&(n=y,y=null,rt(n,function(n){try{i.processTelemetry(n.item,n.itemCtx)}catch(t){}}))}function c(){return typeof global!==_&&global?global:$()}function a(n,t){s?s.trackException({exception:n,severityLevel:3}):wt(i.diagLog(),1,64,"Analytics plugin is not available, ReactNative plugin telemetry will not be sent: "),d&&d.call(global,n,t)}u(),i.initialize=function(n,t,e){var r;i.isInitialized()||(o.initialize(n,t,e),r=n||{},nt(h(),function(n,t){l[n]=Qt.getConfig(r,n,i.identifier,Xn(l[n])?t:l[n])}),l.disableDeviceCollection||i._collectDeviceInfo(),t&&t.getPlugin&&(s=null==(e=t.getPlugin("ApplicationInsightsAnalytics"))?void 0:e.plugin),l.disableExceptionCollection||i._setExceptionHandler())},i.processTelemetry=function(n,t){var e;g?(y=y||[]).push({item:n,itemCtx:t}):(e=n,f&&(e.ext=e.ext||{},e.ext.device=e.ext.device||{},ie(f.id)&&(e.ext.device.localId=f.id),ie(f.model)&&(e.ext.device.model=f.model),ie(f.deviceClass)&&(e.ext.device.deviceClass=f.deviceClass)),i.processNext(n,t))},i.setDeviceInfoModule=function(n){p=n},i.setDeviceId=r,i.setDeviceModel=function(n){f.model=n},i.setDeviceType=function(n){f.deviceClass=n},i._collectDeviceInfo=function(){try{var n=p||he(),t=(f.deviceClass=n.getDeviceType(),f.model=n.getModel(),n.getUniqueId());t&&oe(t.then)?(g=!0,v&&v.cancel(),(v=function(){return t=this,n=Yt,e=function(n){var t,e=n&&n[le]||se&&se[le];if(e)return t=arguments,(e||void 0).apply(n,e?te.slice.call(t,1):t);e="'"+ae(le)+"' not defined for "+fe(n);throw new TypeError(e)}(arguments),d=(s=ue(n))?n.length:0,g=(0<d?n[0]:s?Yt:n)||setTimeout,v=(1<d?n[1]:Yt)||clearTimeout,p=e[0],e[0]=function(){y.dn(),p.apply(t,arguments)},i=function(n){v.call(t,n)},u=!0,c=(r=function(n){if(n){if(n.refresh)return n.refresh(),n;v.call(t,n)}return g.apply(t,e)})(Zt),(s={cancel:l=function(){c&&i(c),c=Zt},refresh:f=function(){return c=r(c),u||a(),o},hasRef:function(){return c&&c.hasRef?c.hasRef():u},ref:function(){return u=!0,c&&c.ref&&c.ref(),o}})[pe]=a=function(){return u=!1,c&&c[pe]&&c[pe](),o},s[ye]=!1,ve(o=s,ye,{get:function(){return!!c},set:function(n){!n&&c&&l(),n&&!c&&f()}}),(y={h:o,dn:function(){c=Zt}}).h;var t,n,e,r,i,o,u,c,a,f,l,s,d,g,v,p,y}(function(){v=null,r(f.id)},0)).unref(),t.then(function(n){r(n)},function(n){Ct(i.diagLog(),"Failed to get device id: "+S(n)),r(f.id)})):ie(t)&&(f.id=t)}catch(e){Ct(i.diagLog(),"Failed to get DeviceInfo: "+((n=e)&&"[object Error]"===Jn[A](n)?n[_n]:M)+" - "+S(e))}},i._doTeardown=function(n,t,e){var r;(r=c())&&r.ErrorUtils&&r.ErrorUtils.getGlobalHandler()===a&&r.ErrorUtils.setGlobalHandler(d||null),u()},i._setExceptionHandler=function(){var n=c();n&&n.ErrorUtils&&(d="function"==typeof n.ErrorUtils.getGlobalHandler&&n.ErrorUtils.getGlobalHandler()||n.ErrorUtils._globalHandler,n.ErrorUtils.setGlobalHandler(a))},i._config=l,i._getDbgPlgTargets=function(){return[f,p]}}),t}de=xe,typeof(o=ge=t)!==H&&null!==o&&V("Class extends value "+o+" is not a constructor or null"),B(de,o),de[r]=(_e[r]=o[r],new _e),xe.__ieDyn=1,a.ReactNativePlugin=xe,a.getReactNativeDeviceInfo=he,Object.defineProperty(a,"__esModule",{value:!0})};"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react-native-device-info")):"function"==typeof define&&define.amd?define(["exports","react-native-device-info"],t):t(((n="undefined"!=typeof globalThis?globalThis:n||self).Microsoft=n.Microsoft||{},n.Microsoft.ApplicationInsights=n.Microsoft.ApplicationInsights||{}),n.DeviceInfo);
|
|
6
6
|
//# sourceMappingURL=applicationinsights-react-native.min.js.map
|