@univerjs-pro/telemetry 1.0.0-alpha.6 → 1.0.0-alpha.8
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/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +6 -5
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var _0x446ea2=_0x358d;(function(_0x5c032e,_0xaeae70){var _0x436cdc=_0x358d,_0x22b410=_0x5c032e();while(!![]){try{var _0x1ec21f=parseInt(_0x436cdc(0x17a))/0x1+-parseInt(_0x436cdc(0x175))/0x2*(parseInt(_0x436cdc(0x141))/0x3)+parseInt(_0x436cdc(0x16d))/0x4+parseInt(_0x436cdc(0x14d))/0x5+-parseInt(_0x436cdc(0x13f))/0x6*(parseInt(_0x436cdc(0x152))/0x7)+-parseInt(_0x436cdc(0x14c))/0x8+-parseInt(_0x436cdc(0x17c))/0x9;if(_0x1ec21f===_0xaeae70)break;else _0x22b410['push'](_0x22b410['shift']());}catch(_0x373b32){_0x22b410['push'](_0x22b410['shift']());}}}(_0x29d9,0xbffe9),Object['defineProperty'](exports,Symbol[_0x446ea2(0x133)],{'value':'Module'}));var e=Object['create'],t=Object[_0x446ea2(0x176)],n=Object[_0x446ea2(0x135)],r=Object[_0x446ea2(0x12e)],i=Object['getPrototypeOf'],a=Object[_0x446ea2(0x153)][_0x446ea2(0x178)],o=(_0x42ef2c,_0x1df177,_0x37ba65,_0x51430b)=>{var _0x466cc0=_0x446ea2;if(_0x1df177&&typeof _0x1df177==_0x466cc0(0x13d)||typeof _0x1df177=='function'){for(var _0xf8457b=r(_0x1df177),_0x2cbb60=0x0,_0x5616c4=_0xf8457b[_0x466cc0(0x151)],_0x146289;_0x2cbb60<_0x5616c4;_0x2cbb60++)_0x146289=_0xf8457b[_0x2cbb60],!a[_0x466cc0(0x148)](_0x42ef2c,_0x146289)&&_0x146289!==_0x37ba65&&t(_0x42ef2c,_0x146289,{'get':(_0x4b4a77=>_0x1df177[_0x4b4a77])[_0x466cc0(0x137)](null,_0x146289),'enumerable':!(_0x51430b=n(_0x1df177,_0x146289))||_0x51430b['enumerable']});}return _0x42ef2c;},s=(_0x304e9b,_0x8737a3,_0x58ec5c)=>(_0x58ec5c=_0x304e9b==null?{}:e(i(_0x304e9b)),o(_0x8737a3||!_0x304e9b||!_0x304e9b['__esModule']?t(_0x58ec5c,'default',{'value':_0x304e9b,'enumerable':!0x0}):_0x58ec5c,_0x304e9b));let c=require('@univerjs-pro/license'),l=require('@univerjs/core'),u=require('@univerjs/telemetry'),d=require('posthog-js');d=s(d);var f=_0x446ea2(0x177),p=_0x446ea2(0x140);const m={};function _0x358d(_0x934b9e,_0x9a5d0d){_0x934b9e=_0x934b9e-0x12d;var _0x29d929=_0x29d9();var _0x358dc1=_0x29d929[_0x934b9e];return _0x358dc1;}function h(_0x37f098,_0x5030cf){return function(_0x287312,_0x171d13){_0x5030cf(_0x287312,_0x171d13,_0x37f098);};}function _0x29d9(){var _0x1a7995=['packageName','PosthogTelemetryService','location','forEach','object','decorate','2355882iBthda','1.0.0-alpha.8','219363sWTzic','startTime','_trackService','host','Injector','string','name','call','_telemetryService','UniverTelemetryPlugin','reset','2521976DTOAHH','1480450lvuhjs','get','capture','https://us.i.posthog.com','length','21htsVlH','prototype','ITelemetryService','add','_performanceRecords','_config','telemetry.config','identified_only','univer','service','trackPerformance','currentUser$','disposeWithMe','toPrimitive','_injector','symbol','onStarting','DependentOn','onPageView','anonymous','Plugin','posthog','_userManagerService','default','Disposable','now','endTime','5999852pJjdnT','_configService','function','includes','[UniverTelemetryPlugin]:\x20Telemetry\x20service\x20not\x20provided','merge','Inject','iterator','6QkhDKi','defineProperty','@univerjs-pro/telemetry','hasOwnProperty','identify','1257083zhKJpu','UniverLicensePlugin','4987584lxbsKH','subscribe','debug','getOwnPropertyNames','dispose','version','pluginName','init','toStringTag','_posthog','getOwnPropertyDescriptor','set','bind','IConfigService'];_0x29d9=function(){return _0x1a7995;};return _0x29d9();}function g(_0x275645,_0x4f2f47,_0x42d102,_0x524f4e){var _0x4319b7=_0x446ea2,_0x54b9a6=arguments[_0x4319b7(0x151)],_0x50876a=_0x54b9a6<0x3?_0x4f2f47:_0x524f4e===null?_0x524f4e=Object['getOwnPropertyDescriptor'](_0x4f2f47,_0x42d102):_0x524f4e,_0x3f00f3;if(typeof Reflect==_0x4319b7(0x13d)&&typeof Reflect[_0x4319b7(0x13e)]==_0x4319b7(0x16f))_0x50876a=Reflect[_0x4319b7(0x13e)](_0x275645,_0x4f2f47,_0x42d102,_0x524f4e);else{for(var _0x410e97=_0x275645['length']-0x1;_0x410e97>=0x0;_0x410e97--)(_0x3f00f3=_0x275645[_0x410e97])&&(_0x50876a=(_0x54b9a6<0x3?_0x3f00f3(_0x50876a):_0x54b9a6>0x3?_0x3f00f3(_0x4f2f47,_0x42d102,_0x50876a):_0x3f00f3(_0x4f2f47,_0x42d102))||_0x50876a);}return _0x54b9a6>0x3&&_0x50876a&&Object['defineProperty'](_0x4f2f47,_0x42d102,_0x50876a),_0x50876a;}let _=class extends l[_0x446ea2(0x16a)]{constructor(_0x700cd8,_0x2f0973){var _0x254923=_0x446ea2;super(),this[_0x254923(0x149)]=_0x700cd8,this[_0x254923(0x168)]=_0x2f0973,this[_0x254923(0x143)]();}[_0x446ea2(0x143)](){var _0x576a8b=_0x446ea2;this[_0x576a8b(0x15e)](this[_0x576a8b(0x168)][_0x576a8b(0x15d)][_0x576a8b(0x17d)](_0x2e48a6=>{var _0x55949c=_0x576a8b;_0x2e48a6&&this['_telemetryService']['identify'](_0x2e48a6['userID'],{'name':_0x2e48a6[_0x55949c(0x147)],'anonymous':String(!!_0x2e48a6[_0x55949c(0x165)])});}));}};_=g([h(0x0,u[_0x446ea2(0x154)]),h(0x1,(0x0,l['Inject'])(l['UserManagerService']))],_);function v(_0x4f46ae){'@babel/helpers - typeof';var _0x282176=_0x446ea2;return v=typeof Symbol==_0x282176(0x16f)&&typeof Symbol[_0x282176(0x174)]==_0x282176(0x161)?function(_0x2beb9){return typeof _0x2beb9;}:function(_0x4944bd){var _0x3efe7f=_0x282176;return _0x4944bd&&typeof Symbol==_0x3efe7f(0x16f)&&_0x4944bd['constructor']===Symbol&&_0x4944bd!==Symbol['prototype']?'symbol':typeof _0x4944bd;},v(_0x4f46ae);}function y(_0x3e367b,_0x236527){var _0x11fabe=_0x446ea2;if(v(_0x3e367b)!=_0x11fabe(0x13d)||!_0x3e367b)return _0x3e367b;var _0x4b3ad6=_0x3e367b[Symbol[_0x11fabe(0x15f)]];if(_0x4b3ad6!==void 0x0){var _0x4182ef=_0x4b3ad6[_0x11fabe(0x148)](_0x3e367b,_0x236527||_0x11fabe(0x169));if(v(_0x4182ef)!=_0x11fabe(0x13d))return _0x4182ef;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x236527===_0x11fabe(0x146)?String:Number)(_0x3e367b);}function b(_0x100b9a){var _0x41f285=_0x446ea2,_0x1032ff=y(_0x100b9a,_0x41f285(0x146));return v(_0x1032ff)==_0x41f285(0x161)?_0x1032ff:_0x1032ff+'';}function x(_0x54a17a,_0x552977,_0x48d2f4){return(_0x552977=b(_0x552977))in _0x54a17a?Object['defineProperty'](_0x54a17a,_0x552977,{'value':_0x48d2f4,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x54a17a[_0x552977]=_0x48d2f4,_0x54a17a;}let S=class extends l[_0x446ea2(0x166)]{constructor(_0xe044d0=m,_0x185217,_0x18cba5){var _0x504813=_0x446ea2;super(),this['_config']=_0xe044d0,this[_0x504813(0x160)]=_0x185217,this[_0x504813(0x16e)]=_0x18cba5;let {..._0x4559b5}=(0x0,l[_0x504813(0x172)])({},m,this[_0x504813(0x157)]);this['_configService']['setConfig'](_0x504813(0x158),_0x4559b5);}[_0x446ea2(0x162)](){var _0x51b3b7=_0x446ea2;if(!this[_0x51b3b7(0x157)][_0x51b3b7(0x15b)])throw Error(_0x51b3b7(0x171));[[u[_0x51b3b7(0x154)],{'useClass':this[_0x51b3b7(0x157)][_0x51b3b7(0x15b)]}],[_]][_0x51b3b7(0x13c)](_0x377309=>this[_0x51b3b7(0x160)][_0x51b3b7(0x155)](_0x377309)),this[_0x51b3b7(0x160)][_0x51b3b7(0x14e)](_);}};x(S,_0x446ea2(0x131),'UNIVER_TELEMETRY_PLUGIN'),x(S,_0x446ea2(0x139),f),x(S,_0x446ea2(0x130),p),S=g([(0x0,l[_0x446ea2(0x163)])(c[_0x446ea2(0x17b)]),h(0x1,(0x0,l[_0x446ea2(0x173)])(l[_0x446ea2(0x145)])),h(0x2,l[_0x446ea2(0x138)])],S);var C=class extends l[_0x446ea2(0x16a)]{constructor(_0x83f650=!0x0){var _0x5c79ee=_0x446ea2;super(),x(this,_0x5c79ee(0x156),new Map()),x(this,_0x5c79ee(0x134),void 0x0),_0x83f650&&this['_init']();}get[_0x446ea2(0x167)](){var _0x141d56=_0x446ea2;return this[_0x141d56(0x134)];}['_init'](){var _0xceb8b5=_0x446ea2;typeof window<'u'&&window[_0xceb8b5(0x13b)][_0xceb8b5(0x144)][_0xceb8b5(0x170)](_0xceb8b5(0x15a))&&this[_0xceb8b5(0x132)]();}[_0x446ea2(0x12d)](){var _0x53bbe2;(_0x53bbe2=this['_posthog'])==null||_0x53bbe2['debug']();}[_0x446ea2(0x132)](_0x512b52){var _0x25f319=_0x446ea2;let {token:_0x2161f0,..._0x3b8768}={'token':'phc_57fDHywG9pssGGW4JSHpc3Pq8hQ9puPnoWHoM6x30T7','api_host':_0x25f319(0x150),'person_profiles':_0x25f319(0x159),'capture_pageleave':!0x0,..._0x512b52};this['_posthog']=d[_0x25f319(0x169)][_0x25f319(0x132)](_0x2161f0,_0x3b8768);}['reset'](){var _0x3e4f08=_0x446ea2,_0x39fb8d;(_0x39fb8d=this[_0x3e4f08(0x134)])==null||_0x39fb8d[_0x3e4f08(0x14b)]();}[_0x446ea2(0x142)](_0x320d44){var _0x4209ce=_0x446ea2;this[_0x4209ce(0x156)][_0x4209ce(0x136)](_0x320d44,Date[_0x4209ce(0x16b)]());}[_0x446ea2(0x16c)](_0x435a82){var _0x3055f7=_0x446ea2;let _0x1a22b7=this[_0x3055f7(0x156)][_0x3055f7(0x14e)](_0x435a82);if(this[_0x3055f7(0x156)]['delete'](_0x435a82),_0x1a22b7){let _0x2bb0f7=Date[_0x3055f7(0x16b)]()-_0x1a22b7;this[_0x3055f7(0x15c)]({'duration':_0x2bb0f7,'functionName':_0x435a82});}}[_0x446ea2(0x15c)](_0x5edb96){var _0x1fd67a=_0x446ea2;this[_0x1fd67a(0x14f)]('performance_function_time_cost',_0x5edb96);}[_0x446ea2(0x179)](_0x53b759,_0x162670){var _0x20e413=_0x446ea2,_0x5bcd16;(_0x5bcd16=this[_0x20e413(0x134)])==null||_0x5bcd16['identify'](_0x53b759,_0x162670);}[_0x446ea2(0x14f)](_0x45761e,_0x6fd753){var _0x569547=_0x446ea2,_0x33cc94;(_0x33cc94=this[_0x569547(0x134)])==null||_0x33cc94['capture'](_0x45761e,_0x6fd753);}[_0x446ea2(0x164)](_0x26529f){var _0x56a2ea=_0x446ea2,_0x27962b;(_0x27962b=this['_posthog'])==null||_0x27962b[_0x56a2ea(0x14f)]('$pageview',{'$current_url':_0x26529f});}[_0x446ea2(0x12f)](){var _0x1c3f2e=_0x446ea2;super[_0x1c3f2e(0x12f)](),this[_0x1c3f2e(0x156)]['clear']();}};exports[_0x446ea2(0x13a)]=C,Object['defineProperty'](exports,_0x446ea2(0x14a),{'enumerable':!0x0,'get':function(){return S;}});
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
var _0x38659c=_0x2beb;(function(_0x1d6f2b,_0x465051){var _0x1bedce=_0x2beb,_0x2f6b54=_0x1d6f2b();while(!![]){try{var _0x2d9e32=parseInt(_0x1bedce(0xad))/0x1+-parseInt(_0x1bedce(0x87))/0x2*(parseInt(_0x1bedce(0x7b))/0x3)+-parseInt(_0x1bedce(0x96))/0x4+parseInt(_0x1bedce(0x72))/0x5+-parseInt(_0x1bedce(0x92))/0x6*(parseInt(_0x1bedce(0x6f))/0x7)+-parseInt(_0x1bedce(0xa6))/0x8*(parseInt(_0x1bedce(0x86))/0x9)+parseInt(_0x1bedce(0x77))/0xa;if(_0x2d9e32===_0x465051)break;else _0x2f6b54['push'](_0x2f6b54['shift']());}catch(_0x5d2249){_0x2f6b54['push'](_0x2f6b54['shift']());}}}(_0xd6c3,0xa1efe));import{UniverLicensePlugin as _0x142d17}from'@univerjs-pro/license';import{DependentOn as _0x4ecb82,Disposable as _0x42977b,IConfigService as _0x28dfde,Inject as _0x437d96,Injector as _0x3207f5,Plugin as _0x1fcfe5,UserManagerService as _0x1289ad,merge as _0x8805b3}from'@univerjs/core';import{ITelemetryService as _0x43a7e9}from'@univerjs/telemetry';import _0x506fcf from'posthog-js';var d=_0x38659c(0x74),f=_0x38659c(0x80);const p={};function m(_0x33d52f,_0x5811e0){return function(_0x223129,_0x4cd274){_0x5811e0(_0x223129,_0x4cd274,_0x33d52f);};}function h(_0x1873ed,_0x9585bb,_0x3453c8,_0x5ec469){var _0x2b566a=_0x38659c,_0x6b8768=arguments[_0x2b566a(0x6b)],_0x28748b=_0x6b8768<0x3?_0x9585bb:_0x5ec469===null?_0x5ec469=Object[_0x2b566a(0x73)](_0x9585bb,_0x3453c8):_0x5ec469,_0x54525e;if(typeof Reflect==_0x2b566a(0x6e)&&typeof Reflect['decorate']=='function')_0x28748b=Reflect[_0x2b566a(0x8a)](_0x1873ed,_0x9585bb,_0x3453c8,_0x5ec469);else{for(var _0x59a5f0=_0x1873ed['length']-0x1;_0x59a5f0>=0x0;_0x59a5f0--)(_0x54525e=_0x1873ed[_0x59a5f0])&&(_0x28748b=(_0x6b8768<0x3?_0x54525e(_0x28748b):_0x6b8768>0x3?_0x54525e(_0x9585bb,_0x3453c8,_0x28748b):_0x54525e(_0x9585bb,_0x3453c8))||_0x28748b);}return _0x6b8768>0x3&&_0x28748b&&Object['defineProperty'](_0x9585bb,_0x3453c8,_0x28748b),_0x28748b;}function _0xd6c3(){var _0x345037=['onStarting','_userManagerService','1084123YsYDYS','_performanceRecords','symbol','_configService','pluginName','length','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','https://us.i.posthog.com','object','70pylgTH','posthog','_config','535595SHQIGY','getOwnPropertyDescriptor','@univerjs-pro/telemetry','_trackService','_init','21494120YoyntP','host','[UniverTelemetryPlugin]:\x20Telemetry\x20service\x20not\x20provided','performance_function_time_cost','27UIAOXv','now','setConfig','currentUser$','capture','1.0.0-alpha.8','forEach','call','identify','onPageView','default','72qUgNBa','190534LGWzTs','_telemetryService','debug','decorate','init','version','_posthog','univer','identified_only','delete','endTime','499962wzQFHM','toPrimitive','reset','iterator','2679420JNuPEk','subscribe','get','function','name','string','disposeWithMe','prototype','userID','defineProperty','_injector','phc_57fDHywG9pssGGW4JSHpc3Pq8hQ9puPnoWHoM6x30T7','clear','anonymous','includes','telemetry.config','316832ckKNNZ','constructor','packageName','dispose','trackPerformance'];_0xd6c3=function(){return _0x345037;};return _0xd6c3();}let g=class extends _0x42977b{constructor(_0x547b97,_0xd33eb7){var _0x5b9702=_0x38659c;super(),this[_0x5b9702(0x88)]=_0x547b97,this[_0x5b9702(0xac)]=_0xd33eb7,this[_0x5b9702(0x75)]();}[_0x38659c(0x75)](){var _0x40ddab=_0x38659c;this[_0x40ddab(0x9c)](this[_0x40ddab(0xac)][_0x40ddab(0x7e)][_0x40ddab(0x97)](_0x2a8cf0=>{var _0x2bc9bc=_0x40ddab;_0x2a8cf0&&this[_0x2bc9bc(0x88)][_0x2bc9bc(0x83)](_0x2a8cf0[_0x2bc9bc(0x9e)],{'name':_0x2a8cf0[_0x2bc9bc(0x9a)],'anonymous':String(!!_0x2a8cf0[_0x2bc9bc(0xa3)])});}));}};g=h([m(0x0,_0x43a7e9),m(0x1,_0x437d96(_0x1289ad))],g);function _(_0x3d75d9){'@babel/helpers - typeof';var _0x40ac31=_0x38659c;return _=typeof Symbol==_0x40ac31(0x99)&&typeof Symbol[_0x40ac31(0x95)]==_0x40ac31(0xaf)?function(_0x338548){return typeof _0x338548;}:function(_0x514a3b){var _0x5dbea4=_0x40ac31;return _0x514a3b&&typeof Symbol==_0x5dbea4(0x99)&&_0x514a3b[_0x5dbea4(0xa7)]===Symbol&&_0x514a3b!==Symbol[_0x5dbea4(0x9d)]?_0x5dbea4(0xaf):typeof _0x514a3b;},_(_0x3d75d9);}function v(_0x2a8cfe,_0x325df8){var _0x445826=_0x38659c;if(_(_0x2a8cfe)!=_0x445826(0x6e)||!_0x2a8cfe)return _0x2a8cfe;var _0x54c79b=_0x2a8cfe[Symbol[_0x445826(0x93)]];if(_0x54c79b!==void 0x0){var _0x223154=_0x54c79b[_0x445826(0x82)](_0x2a8cfe,_0x325df8||_0x445826(0x85));if(_(_0x223154)!=_0x445826(0x6e))return _0x223154;throw TypeError(_0x445826(0x6c));}return(_0x325df8===_0x445826(0x9b)?String:Number)(_0x2a8cfe);}function y(_0x493cf4){var _0x1a5663=_0x38659c,_0x2b7435=v(_0x493cf4,_0x1a5663(0x9b));return _(_0x2b7435)==_0x1a5663(0xaf)?_0x2b7435:_0x2b7435+'';}function b(_0x3f2e6f,_0x16113e,_0x2e2af4){var _0x104c70=_0x38659c;return(_0x16113e=y(_0x16113e))in _0x3f2e6f?Object[_0x104c70(0x9f)](_0x3f2e6f,_0x16113e,{'value':_0x2e2af4,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x3f2e6f[_0x16113e]=_0x2e2af4,_0x3f2e6f;}let x=class extends _0x1fcfe5{constructor(_0x4743d0=p,_0x45acbb,_0xca5d12){var _0x11dc79=_0x38659c;super(),this[_0x11dc79(0x71)]=_0x4743d0,this[_0x11dc79(0xa0)]=_0x45acbb,this[_0x11dc79(0xb0)]=_0xca5d12;let {..._0x2fd493}=_0x8805b3({},p,this[_0x11dc79(0x71)]);this[_0x11dc79(0xb0)][_0x11dc79(0x7d)](_0x11dc79(0xa5),_0x2fd493);}[_0x38659c(0xab)](){var _0x553305=_0x38659c;if(!this[_0x553305(0x71)]['service'])throw Error(_0x553305(0x79));[[_0x43a7e9,{'useClass':this[_0x553305(0x71)]['service']}],[g]][_0x553305(0x81)](_0x28b795=>this[_0x553305(0xa0)]['add'](_0x28b795)),this['_injector'][_0x553305(0x98)](g);}};b(x,_0x38659c(0x6a),'UNIVER_TELEMETRY_PLUGIN'),b(x,_0x38659c(0xa8),d),b(x,_0x38659c(0x8c),f),x=h([_0x4ecb82(_0x142d17),m(0x1,_0x437d96(_0x3207f5)),m(0x2,_0x28dfde)],x);function _0x2beb(_0x54e01f,_0x33d448){_0x54e01f=_0x54e01f-0x6a;var _0xd6c32b=_0xd6c3();var _0x2bebf2=_0xd6c32b[_0x54e01f];return _0x2bebf2;}var S=class extends _0x42977b{constructor(_0x3a3bd1=!0x0){var _0x2e8ca2=_0x38659c;super(),b(this,_0x2e8ca2(0xae),new Map()),b(this,'_posthog',void 0x0),_0x3a3bd1&&this[_0x2e8ca2(0x76)]();}get[_0x38659c(0x70)](){return this['_posthog'];}[_0x38659c(0x76)](){var _0x11b31a=_0x38659c;typeof window<'u'&&window['location'][_0x11b31a(0x78)][_0x11b31a(0xa4)](_0x11b31a(0x8e))&&this[_0x11b31a(0x8b)]();}[_0x38659c(0x89)](){var _0x5afa16=_0x38659c,_0x2c7ffa;(_0x2c7ffa=this[_0x5afa16(0x8d)])==null||_0x2c7ffa[_0x5afa16(0x89)]();}['init'](_0x52f3f2){var _0x24e2d0=_0x38659c;let {token:_0x485a19,..._0x381153}={'token':_0x24e2d0(0xa1),'api_host':_0x24e2d0(0x6d),'person_profiles':_0x24e2d0(0x8f),'capture_pageleave':!0x0,..._0x52f3f2};this[_0x24e2d0(0x8d)]=_0x506fcf[_0x24e2d0(0x8b)](_0x485a19,_0x381153);}[_0x38659c(0x94)](){var _0x3cfa9f=_0x38659c,_0x149850;(_0x149850=this[_0x3cfa9f(0x8d)])==null||_0x149850[_0x3cfa9f(0x94)]();}['startTime'](_0x2794a5){var _0x5f1269=_0x38659c;this['_performanceRecords']['set'](_0x2794a5,Date[_0x5f1269(0x7c)]());}[_0x38659c(0x91)](_0x3c0c98){var _0x3e38fa=_0x38659c;let _0x2bb8d0=this[_0x3e38fa(0xae)][_0x3e38fa(0x98)](_0x3c0c98);if(this['_performanceRecords'][_0x3e38fa(0x90)](_0x3c0c98),_0x2bb8d0){let _0x515a49=Date['now']()-_0x2bb8d0;this[_0x3e38fa(0xaa)]({'duration':_0x515a49,'functionName':_0x3c0c98});}}[_0x38659c(0xaa)](_0xbe7c5f){var _0x4249c8=_0x38659c;this['capture'](_0x4249c8(0x7a),_0xbe7c5f);}[_0x38659c(0x83)](_0x26f68b,_0x2c1a95){var _0x2ab209=_0x38659c,_0x2d06ff;(_0x2d06ff=this['_posthog'])==null||_0x2d06ff[_0x2ab209(0x83)](_0x26f68b,_0x2c1a95);}['capture'](_0x3d3632,_0x281518){var _0x1a9e20;(_0x1a9e20=this['_posthog'])==null||_0x1a9e20['capture'](_0x3d3632,_0x281518);}[_0x38659c(0x84)](_0x41e0e4){var _0x414c3f=_0x38659c,_0x2e2921;(_0x2e2921=this['_posthog'])==null||_0x2e2921[_0x414c3f(0x7f)]('$pageview',{'$current_url':_0x41e0e4});}[_0x38659c(0xa9)](){var _0x57c4c7=_0x38659c;super[_0x57c4c7(0xa9)](),this[_0x57c4c7(0xae)][_0x57c4c7(0xa2)]();}};export{S as PosthogTelemetryService,x as UniverTelemetryPlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
var _0x38659c=_0x2beb;(function(_0x1d6f2b,_0x465051){var _0x1bedce=_0x2beb,_0x2f6b54=_0x1d6f2b();while(!![]){try{var _0x2d9e32=parseInt(_0x1bedce(0xad))/0x1+-parseInt(_0x1bedce(0x87))/0x2*(parseInt(_0x1bedce(0x7b))/0x3)+-parseInt(_0x1bedce(0x96))/0x4+parseInt(_0x1bedce(0x72))/0x5+-parseInt(_0x1bedce(0x92))/0x6*(parseInt(_0x1bedce(0x6f))/0x7)+-parseInt(_0x1bedce(0xa6))/0x8*(parseInt(_0x1bedce(0x86))/0x9)+parseInt(_0x1bedce(0x77))/0xa;if(_0x2d9e32===_0x465051)break;else _0x2f6b54['push'](_0x2f6b54['shift']());}catch(_0x5d2249){_0x2f6b54['push'](_0x2f6b54['shift']());}}}(_0xd6c3,0xa1efe));import{UniverLicensePlugin as _0x142d17}from'@univerjs-pro/license';import{DependentOn as _0x4ecb82,Disposable as _0x42977b,IConfigService as _0x28dfde,Inject as _0x437d96,Injector as _0x3207f5,Plugin as _0x1fcfe5,UserManagerService as _0x1289ad,merge as _0x8805b3}from'@univerjs/core';import{ITelemetryService as _0x43a7e9}from'@univerjs/telemetry';import _0x506fcf from'posthog-js';var d=_0x38659c(0x74),f=_0x38659c(0x80);const p={};function m(_0x33d52f,_0x5811e0){return function(_0x223129,_0x4cd274){_0x5811e0(_0x223129,_0x4cd274,_0x33d52f);};}function h(_0x1873ed,_0x9585bb,_0x3453c8,_0x5ec469){var _0x2b566a=_0x38659c,_0x6b8768=arguments[_0x2b566a(0x6b)],_0x28748b=_0x6b8768<0x3?_0x9585bb:_0x5ec469===null?_0x5ec469=Object[_0x2b566a(0x73)](_0x9585bb,_0x3453c8):_0x5ec469,_0x54525e;if(typeof Reflect==_0x2b566a(0x6e)&&typeof Reflect['decorate']=='function')_0x28748b=Reflect[_0x2b566a(0x8a)](_0x1873ed,_0x9585bb,_0x3453c8,_0x5ec469);else{for(var _0x59a5f0=_0x1873ed['length']-0x1;_0x59a5f0>=0x0;_0x59a5f0--)(_0x54525e=_0x1873ed[_0x59a5f0])&&(_0x28748b=(_0x6b8768<0x3?_0x54525e(_0x28748b):_0x6b8768>0x3?_0x54525e(_0x9585bb,_0x3453c8,_0x28748b):_0x54525e(_0x9585bb,_0x3453c8))||_0x28748b);}return _0x6b8768>0x3&&_0x28748b&&Object['defineProperty'](_0x9585bb,_0x3453c8,_0x28748b),_0x28748b;}function _0xd6c3(){var _0x345037=['onStarting','_userManagerService','1084123YsYDYS','_performanceRecords','symbol','_configService','pluginName','length','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','https://us.i.posthog.com','object','70pylgTH','posthog','_config','535595SHQIGY','getOwnPropertyDescriptor','@univerjs-pro/telemetry','_trackService','_init','21494120YoyntP','host','[UniverTelemetryPlugin]:\x20Telemetry\x20service\x20not\x20provided','performance_function_time_cost','27UIAOXv','now','setConfig','currentUser$','capture','1.0.0-alpha.8','forEach','call','identify','onPageView','default','72qUgNBa','190534LGWzTs','_telemetryService','debug','decorate','init','version','_posthog','univer','identified_only','delete','endTime','499962wzQFHM','toPrimitive','reset','iterator','2679420JNuPEk','subscribe','get','function','name','string','disposeWithMe','prototype','userID','defineProperty','_injector','phc_57fDHywG9pssGGW4JSHpc3Pq8hQ9puPnoWHoM6x30T7','clear','anonymous','includes','telemetry.config','316832ckKNNZ','constructor','packageName','dispose','trackPerformance'];_0xd6c3=function(){return _0x345037;};return _0xd6c3();}let g=class extends _0x42977b{constructor(_0x547b97,_0xd33eb7){var _0x5b9702=_0x38659c;super(),this[_0x5b9702(0x88)]=_0x547b97,this[_0x5b9702(0xac)]=_0xd33eb7,this[_0x5b9702(0x75)]();}[_0x38659c(0x75)](){var _0x40ddab=_0x38659c;this[_0x40ddab(0x9c)](this[_0x40ddab(0xac)][_0x40ddab(0x7e)][_0x40ddab(0x97)](_0x2a8cf0=>{var _0x2bc9bc=_0x40ddab;_0x2a8cf0&&this[_0x2bc9bc(0x88)][_0x2bc9bc(0x83)](_0x2a8cf0[_0x2bc9bc(0x9e)],{'name':_0x2a8cf0[_0x2bc9bc(0x9a)],'anonymous':String(!!_0x2a8cf0[_0x2bc9bc(0xa3)])});}));}};g=h([m(0x0,_0x43a7e9),m(0x1,_0x437d96(_0x1289ad))],g);function _(_0x3d75d9){'@babel/helpers - typeof';var _0x40ac31=_0x38659c;return _=typeof Symbol==_0x40ac31(0x99)&&typeof Symbol[_0x40ac31(0x95)]==_0x40ac31(0xaf)?function(_0x338548){return typeof _0x338548;}:function(_0x514a3b){var _0x5dbea4=_0x40ac31;return _0x514a3b&&typeof Symbol==_0x5dbea4(0x99)&&_0x514a3b[_0x5dbea4(0xa7)]===Symbol&&_0x514a3b!==Symbol[_0x5dbea4(0x9d)]?_0x5dbea4(0xaf):typeof _0x514a3b;},_(_0x3d75d9);}function v(_0x2a8cfe,_0x325df8){var _0x445826=_0x38659c;if(_(_0x2a8cfe)!=_0x445826(0x6e)||!_0x2a8cfe)return _0x2a8cfe;var _0x54c79b=_0x2a8cfe[Symbol[_0x445826(0x93)]];if(_0x54c79b!==void 0x0){var _0x223154=_0x54c79b[_0x445826(0x82)](_0x2a8cfe,_0x325df8||_0x445826(0x85));if(_(_0x223154)!=_0x445826(0x6e))return _0x223154;throw TypeError(_0x445826(0x6c));}return(_0x325df8===_0x445826(0x9b)?String:Number)(_0x2a8cfe);}function y(_0x493cf4){var _0x1a5663=_0x38659c,_0x2b7435=v(_0x493cf4,_0x1a5663(0x9b));return _(_0x2b7435)==_0x1a5663(0xaf)?_0x2b7435:_0x2b7435+'';}function b(_0x3f2e6f,_0x16113e,_0x2e2af4){var _0x104c70=_0x38659c;return(_0x16113e=y(_0x16113e))in _0x3f2e6f?Object[_0x104c70(0x9f)](_0x3f2e6f,_0x16113e,{'value':_0x2e2af4,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x3f2e6f[_0x16113e]=_0x2e2af4,_0x3f2e6f;}let x=class extends _0x1fcfe5{constructor(_0x4743d0=p,_0x45acbb,_0xca5d12){var _0x11dc79=_0x38659c;super(),this[_0x11dc79(0x71)]=_0x4743d0,this[_0x11dc79(0xa0)]=_0x45acbb,this[_0x11dc79(0xb0)]=_0xca5d12;let {..._0x2fd493}=_0x8805b3({},p,this[_0x11dc79(0x71)]);this[_0x11dc79(0xb0)][_0x11dc79(0x7d)](_0x11dc79(0xa5),_0x2fd493);}[_0x38659c(0xab)](){var _0x553305=_0x38659c;if(!this[_0x553305(0x71)]['service'])throw Error(_0x553305(0x79));[[_0x43a7e9,{'useClass':this[_0x553305(0x71)]['service']}],[g]][_0x553305(0x81)](_0x28b795=>this[_0x553305(0xa0)]['add'](_0x28b795)),this['_injector'][_0x553305(0x98)](g);}};b(x,_0x38659c(0x6a),'UNIVER_TELEMETRY_PLUGIN'),b(x,_0x38659c(0xa8),d),b(x,_0x38659c(0x8c),f),x=h([_0x4ecb82(_0x142d17),m(0x1,_0x437d96(_0x3207f5)),m(0x2,_0x28dfde)],x);function _0x2beb(_0x54e01f,_0x33d448){_0x54e01f=_0x54e01f-0x6a;var _0xd6c32b=_0xd6c3();var _0x2bebf2=_0xd6c32b[_0x54e01f];return _0x2bebf2;}var S=class extends _0x42977b{constructor(_0x3a3bd1=!0x0){var _0x2e8ca2=_0x38659c;super(),b(this,_0x2e8ca2(0xae),new Map()),b(this,'_posthog',void 0x0),_0x3a3bd1&&this[_0x2e8ca2(0x76)]();}get[_0x38659c(0x70)](){return this['_posthog'];}[_0x38659c(0x76)](){var _0x11b31a=_0x38659c;typeof window<'u'&&window['location'][_0x11b31a(0x78)][_0x11b31a(0xa4)](_0x11b31a(0x8e))&&this[_0x11b31a(0x8b)]();}[_0x38659c(0x89)](){var _0x5afa16=_0x38659c,_0x2c7ffa;(_0x2c7ffa=this[_0x5afa16(0x8d)])==null||_0x2c7ffa[_0x5afa16(0x89)]();}['init'](_0x52f3f2){var _0x24e2d0=_0x38659c;let {token:_0x485a19,..._0x381153}={'token':_0x24e2d0(0xa1),'api_host':_0x24e2d0(0x6d),'person_profiles':_0x24e2d0(0x8f),'capture_pageleave':!0x0,..._0x52f3f2};this[_0x24e2d0(0x8d)]=_0x506fcf[_0x24e2d0(0x8b)](_0x485a19,_0x381153);}[_0x38659c(0x94)](){var _0x3cfa9f=_0x38659c,_0x149850;(_0x149850=this[_0x3cfa9f(0x8d)])==null||_0x149850[_0x3cfa9f(0x94)]();}['startTime'](_0x2794a5){var _0x5f1269=_0x38659c;this['_performanceRecords']['set'](_0x2794a5,Date[_0x5f1269(0x7c)]());}[_0x38659c(0x91)](_0x3c0c98){var _0x3e38fa=_0x38659c;let _0x2bb8d0=this[_0x3e38fa(0xae)][_0x3e38fa(0x98)](_0x3c0c98);if(this['_performanceRecords'][_0x3e38fa(0x90)](_0x3c0c98),_0x2bb8d0){let _0x515a49=Date['now']()-_0x2bb8d0;this[_0x3e38fa(0xaa)]({'duration':_0x515a49,'functionName':_0x3c0c98});}}[_0x38659c(0xaa)](_0xbe7c5f){var _0x4249c8=_0x38659c;this['capture'](_0x4249c8(0x7a),_0xbe7c5f);}[_0x38659c(0x83)](_0x26f68b,_0x2c1a95){var _0x2ab209=_0x38659c,_0x2d06ff;(_0x2d06ff=this['_posthog'])==null||_0x2d06ff[_0x2ab209(0x83)](_0x26f68b,_0x2c1a95);}['capture'](_0x3d3632,_0x281518){var _0x1a9e20;(_0x1a9e20=this['_posthog'])==null||_0x1a9e20['capture'](_0x3d3632,_0x281518);}[_0x38659c(0x84)](_0x41e0e4){var _0x414c3f=_0x38659c,_0x2e2921;(_0x2e2921=this['_posthog'])==null||_0x2e2921[_0x414c3f(0x7f)]('$pageview',{'$current_url':_0x41e0e4});}[_0x38659c(0xa9)](){var _0x57c4c7=_0x38659c;super[_0x57c4c7(0xa9)](),this[_0x57c4c7(0xae)][_0x57c4c7(0xa2)]();}};export{S as PosthogTelemetryService,x as UniverTelemetryPlugin};
|