posthog-react-native 4.67.0 → 4.67.2

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.
@@ -1 +1 @@
1
- {"version":3,"file":"PostHogProvider.js","sourceRoot":"","sources":["../src/PostHogProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AACtE,OAAO,EAAoC,IAAI,EAAa,MAAM,cAAc,CAAA;AAChF,OAAO,EAAE,OAAO,EAAkB,MAAM,cAAc,CAAA;AACtD,OAAO,EAAE,yBAAyB,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AACzE,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAA;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAEjD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAA;AA2CvD,MAAM,iBAAiB,GAAG,IAAI,OAAO,EAA2D,CAAA;AAEhG,SAAS,qBAAqB,CAAC,EAC7B,OAAO,EACP,MAAM,GAIP;IACC,oBAAoB,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,UAAU,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,aAAa,EAAE,MAAM,CAAC,CAAA;IACzE,OAAO,IAAI,CAAA;AACb,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAC9B,QAAQ,EACR,MAAM,EACN,OAAO,EACP,MAAM,EACN,WAAW,EACX,KAAK,EACL,KAAK,GAAG,KAAK,GACQ,EAAsB,EAAE;;IAC7C,MAAM,UAAU,GAAG,WAAW,KAAK,IAAI,CAAA;IACv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AAE,MAAM,EAAE,GAAG,YAAY,CAAA;QAEnC,IAAI,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,MAAM,0CAAE,MAAM,EAAE,CAAC;YAC1B,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;YACnD,IAAI,GAAG,KAAK,CAAC,IAAI,CAAA;YACjB,MAAM,GAAG,KAAK,CAAC,MAAM,CAAA;QACvB,CAAC;QAED,MAAM,gBAAgB,GAAG,CAAA,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,wDAAG,IAAI,EAAE,MAAM,CAAC,KAAI,IAAI,IAAI,SAAS,CAAA;QAElF,IAAI,gBAAgB,EAAE,CAAC;YACrB,MAAM,UAAU,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,iBAAiB,wDAAG,gBAAgB,EAAE,MAAM,CAAC,CAAA;YACzE,OAAO,CAAC,MAAM,CAAC,gBAAgB,EAAE,UAAU,CAAC,CAAA;QAC9C,CAAC;IACH,CAAC,EAAE,CAAC,UAAU,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAA;IAElC,gDAAgD;IAChD,SAAS,CAAC,GAAG,EAAE;QACb,mJAAmJ;QACnJ,sDAAsD;QACtD,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,UAAU,CAAC,UAAU,EAAE,CAAC,CAAC,CAAA;YACzB,OAAM;QACR,CAAC;QACD,UAAU,EAAE,CAAA;IACd,CAAC,EAAE,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAA;AAC1B,CAAC;AAED,MAAM,CAAC,MAAM,oBAAoB,GAAG,6BAA6B;IAC/D,CAAC,CAAC,qBAAqB;IACvB,CAAC,CAAC,6BAA6B,CAAA"}
@@ -517,8 +517,13 @@ export declare class PostHog extends PostHogCore {
517
517
  /**
518
518
  * Checks if a feature flag is enabled for the current user.
519
519
  *
520
- * Defaults to undefined if not loaded yet or if there was a problem loading,
521
- * unless `defaultValue` is provided.
520
+ * A `false` return value means the SDK resolved the current value as off. If no evaluation is
521
+ * available, this method returns `defaultValue` when provided. Without a default, it returns
522
+ * `undefined` before flags load; for backwards compatibility, a missing key can resolve to
523
+ * `false` after a non-empty response is stored.
524
+ *
525
+ * Globally inactive flags are omitted from remote responses, so they follow this missing-key
526
+ * behavior rather than carrying an explicit off evaluation.
522
527
  *
523
528
  * {@label Feature flags}
524
529
  *
@@ -538,7 +543,7 @@ export declare class PostHog extends PostHogCore {
538
543
  *
539
544
  * @param key The feature flag key
540
545
  * @param options Optional per-call settings
541
- * @returns True if enabled, false if disabled; when the flag has no value, defaultValue if given, otherwise undefined
546
+ * @returns True if the flag evaluates on, false if it evaluates off, or the missing-value fallback described above
542
547
  */
543
548
  isFeatureEnabled(key: string, options: IsFeatureEnabledOptions & {
544
549
  defaultValue: boolean;
@@ -547,8 +552,13 @@ export declare class PostHog extends PostHogCore {
547
552
  /**
548
553
  * Gets the value of a feature flag for the current user.
549
554
  *
550
- * Defaults to undefined if not loaded yet or if there was a problem loading.
551
- * Multivariant feature flags are returned as a string.
555
+ * Returns `true` or `false` for an evaluated boolean flag and a string for a multivariate flag.
556
+ * Returns `undefined` before flags load or when loading fails. For backwards compatibility, a
557
+ * missing key can resolve to `false` after a non-empty response is stored; use
558
+ * `getFeatureFlagResult()` to distinguish an unavailable key from a conclusive off result.
559
+ *
560
+ * Globally inactive flags are omitted from remote responses, so they follow this missing-key
561
+ * behavior rather than carrying an explicit off evaluation.
552
562
  *
553
563
  * {@label Feature flags}
554
564
  *
@@ -562,7 +572,7 @@ export declare class PostHog extends PostHogCore {
562
572
  *
563
573
  * @param key The feature flag key
564
574
  * @param options Optional per-call settings
565
- * @returns The feature flag value or undefined if not loaded
575
+ * @returns The current feature flag value, or undefined if flags are unavailable
566
576
  */
567
577
  getFeatureFlag(key: string, options?: FeatureFlagResultOptions): boolean | string | undefined;
568
578
  /**
@@ -1 +1 @@
1
- "use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.PostHog=void 0;Object.defineProperty(exports,"PostHogPersistedProperty",{enumerable:true,get:function get(){return _core.PostHogPersistedProperty;}});var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _typeof2=_interopRequireDefault(require("@babel/runtime/helpers/typeof"));var _toConsumableArray2=_interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));var _defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf2=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var _get2=_interopRequireDefault(require("@babel/runtime/helpers/get"));var _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var _reactNative=require("react-native");var _core=require("@posthog/core");var _storage=require("./storage");var _logsDefaults=require("./logs-defaults");var _version=require("./version");var _nativeDeps=require("./native-deps");var _utils=require("./utils");var _wixNavigation=require("./frameworks/wix-navigation");var _OptionalPlugin=require("./optional/OptionalPlugin");var _errorTracking=require("./error-tracking");function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable;})),t.push.apply(t,o);}return t;}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach(function(r){(0,_defineProperty2["default"])(e,r,t[r]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));});}return e;}function _callSuper(t,o,e){return o=(0,_getPrototypeOf2["default"])(o),(0,_possibleConstructorReturn2["default"])(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],(0,_getPrototypeOf2["default"])(t).constructor):o.apply(t,e));}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _superPropGet(t,o,e,r){var p=(0,_get2["default"])((0,_getPrototypeOf2["default"])(1&r?t.prototype:t),o,e);return 2&r&&"function"==typeof p?function(t){return p.apply(e,t);}:p;}function mapAppStateForLogs(state){if(state==='background'){return'background';}if(!state||state==='unknown'){return undefined;}return'foreground';}var NATIVE_CALL_TIMEOUT_MS=10000;var PostHog=exports.PostHog=function(_PostHogCore){function PostHog(apiKey,options){var _this;(0,_classCallCheck2["default"])(this,PostHog);var _a,_b,_c,_d,_e,_f;var normalizedApiKey=typeof apiKey==='string'?apiKey.trim():'';if(!normalizedApiKey){console.error("You must pass your PostHog project's api key. The client will be disabled.");}_this=_callSuper(this,PostHog,[normalizedApiKey,options]);_this._appProperties={};_this._sessionReplayNativeInitialized=false;_this._nativeErrorTrackingInitialized=false;_this._pushNativeInitialized=false;_this._pushNativeUnsupported=false;_this._sessionReplayMacOSWarned=false;_this._sessionReplayEvalChain=Promise.resolve();_this._nativeChain=Promise.resolve();_this._sessionReplayEventTriggers=[];_this._surveysReadyPromise=null;_this._surveysReady=false;_this._requestHeaders={};_this._surveysReadyResolve=null;_this._isInitialized=false;_this._persistence=(_a=options===null||options===void 0?void 0:options.persistence)!==null&&_a!==void 0?_a:'file';_this._disableSurveys=(_b=options===null||options===void 0?void 0:options.disableSurveys)!==null&&_b!==void 0?_b:false;_this._errorTracking=new _errorTracking.ErrorTracking(_this,options===null||options===void 0?void 0:options.errorTracking,_this._logger);_this._setDefaultPersonProperties=(_c=options===null||options===void 0?void 0:options.setDefaultPersonProperties)!==null&&_c!==void 0?_c:true;_this._overrideDisplayLanguage=((_d=options===null||options===void 0?void 0:options.overrideDisplayLanguage)===null||_d===void 0?void 0:_d.trim())||null;_this._requestHeaders=(_e=options===null||options===void 0?void 0:options.requestHeaders)!==null&&_e!==void 0?_e:{};_this._appProperties=typeof(options===null||options===void 0?void 0:options.customAppProperties)==='function'?options.customAppProperties((0,_nativeDeps.getAppProperties)()):(options===null||options===void 0?void 0:options.customAppProperties)||(0,_nativeDeps.getAppProperties)();var storagePromise;var theStorage;if(_this._persistence==='file'){theStorage=(_f=options===null||options===void 0?void 0:options.customStorage)!==null&&_f!==void 0?_f:(0,_nativeDeps.buildOptimisticAsyncStorage)();}if(theStorage){_this._eventsStorage=(0,_storage.createEventsStorage)(theStorage);_this._logsStorage=(0,_storage.createLogsStorage)(theStorage);var preloads=[];if(_this._eventsStorage.preloadPromise){preloads.push(['events',_this._eventsStorage.preloadPromise]);}if(_this._logsStorage.preloadPromise){preloads.push(['logs',_this._logsStorage.preloadPromise]);}if(preloads.length>0){storagePromise=(0,_core.allSettled)(preloads.map(function(_ref){var _ref2=(0,_slicedToArray2["default"])(_ref,2),p=_ref2[1];return p;})).then(function(results){results.forEach(function(r,i){if(r.status==='rejected'){_this._logger.error("PostHog ".concat(preloads[i][0]," storage preload failed:"),r.reason);}});});}}else{_this._eventsStorage=(0,_storage.createEventsMemoryStorage)();_this._logsStorage=(0,_storage.createLogsMemoryStorage)();}_this._currentAppState=mapAppStateForLogs(_reactNative.AppState.currentState);_this._resolvedLogsConfig=(0,_logsDefaults.resolveLogsConfig)(options===null||options===void 0?void 0:options.logs);_this._logs=new _core.PostHogLogs(_this,_this._resolvedLogsConfig,_this._logger,function(){var _a;var flags=_this.getFeatureFlags();var flagKeys=flags?Object.keys(flags):undefined;return{distinctId:_this.getDistinctId()||undefined,sessionId:_this.getSessionId()||undefined,screenName:((_a=_this.sessionProps)===null||_a===void 0?void 0:_a.$screen_name)||undefined,appState:_this._currentAppState,activeFeatureFlags:flagKeys&&flagKeys.length>0?flagKeys:undefined};},function(fn){return _this.wrap(fn);},function(){return _this._logsStorage.waitForPersist();});_reactNative.AppState.addEventListener('change',function(state){if(state==='unknown'){return;}var mapped=mapAppStateForLogs(state);if(mapped){_this._currentAppState=mapped;}void _this.flush()["catch"](function(){var _ref3=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee(err){return _regenerator["default"].wrap(function(_context){while(1)switch(_context.prev=_context.next){case 0:_context.next=1;return(0,_core.logFlushError)(err);case 1:case"end":return _context.stop();}},_callee);}));return function(_x3){return _ref3.apply(this,arguments);};}());var isBackgrounding=mapped==='background';var logsFlushPromise=isBackgrounding?_this._logs.flushWithTimeout(_this._resolvedLogsConfig.backgroundFlushBudgetMs):_this._logs.flush();void logsFlushPromise["catch"](function(){var _ref4=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee2(err){return _regenerator["default"].wrap(function(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=1;return(0,_core.logFlushError)(err);case 1:case"end":return _context2.stop();}},_callee2);}));return function(_x4){return _ref4.apply(this,arguments);};}());void _this._eventsStorage.waitForPersist();void _this._logsStorage.waitForPersist();if(state==='active'){_this.getSessionId();}});var initAfterStorage=function initAfterStorage(){var enablePersistSessionIdAcrossRestart=options===null||options===void 0?void 0:options.enablePersistSessionIdAcrossRestart;if(!enablePersistSessionIdAcrossRestart){_this.setPersistedProperty(_core.PostHogPersistedProperty.SessionId,null);_this.setPersistedProperty(_core.PostHogPersistedProperty.SessionLastTimestamp,null);_this.setPersistedProperty(_core.PostHogPersistedProperty.SessionStartTimestamp,null);}_this.setupBootstrap(options);if(!_this.getPersistedProperty(_core.PostHogPersistedProperty.DeviceId)){var anonId=_this.getAnonymousId();if(anonId){_this.setPersistedProperty(_core.PostHogPersistedProperty.DeviceId,anonId);}}if(_this._setDefaultPersonProperties){_this._setDefaultPersonPropertiesForFlags(false);}_this._isInitialized=true;if(_this.isDisabled){return;}var cachedRemoteConfig=_this.getPersistedProperty(_core.PostHogPersistedProperty.RemoteConfig);if(cachedRemoteConfig){_this._errorTracking.onRemoteConfig(cachedRemoteConfig.errorTracking);}_this.reloadRemoteConfigAsync().then(function(response){if(response){_this._handleSurveysFromRemoteConfig(response);}})["catch"](function(error){_this._logger.error('Error loading remote config:',error);})["finally"](function(){_this._notifySurveysReady();});if((options===null||options===void 0?void 0:options.captureAppLifecycleEvents)!==false){void _this.captureAppLifecycleEvents();}void _this.persistAppVersion();void _this.startSessionReplay(options,cachedRemoteConfig!==null&&cachedRemoteConfig!==void 0?cachedRemoteConfig:undefined);if(options===null||options===void 0?void 0:options.enableSessionReplay){_this.onFeatureFlags(function(){void _this._evaluateAndStartSessionReplay();});}if((options===null||options===void 0?void 0:options.addTracingHeaders)&&options.addTracingHeaders.length>0){(0,_core.patchFetchForTracingHeaders)(_this,options.addTracingHeaders);}};if(storagePromise){_this._initPromise=storagePromise.then(initAfterStorage);}else{_this._initPromise=Promise.resolve();initAfterStorage();}return _this;}(0,_inherits2["default"])(PostHog,_PostHogCore);return(0,_createClass2["default"])(PostHog,[{key:"ready",value:(function(){var _ready=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee3(){return _regenerator["default"].wrap(function(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.next=1;return this._initPromise;case 1:case"end":return _context3.stop();}},_callee3,this);}));function ready(){return _ready.apply(this,arguments);}return ready;}())},{key:"onRemoteConfig",value:function onRemoteConfig(response){this._errorTracking.onRemoteConfig(response.errorTracking);}},{key:"_storageForKey",value:function _storageForKey(key){return key===_core.PostHogPersistedProperty.LogsQueue?this._logsStorage:this._eventsStorage;}},{key:"getPersistedProperty",value:function getPersistedProperty(key){return this._storageForKey(key).getItem(key);}},{key:"setPersistedProperty",value:function setPersistedProperty(key,value){var storage=this._storageForKey(key);return value!==null?storage.setItem(key,value):storage.removeItem(key);}},{key:"flushStorage",value:(function(){var _flushStorage=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee4(){return _regenerator["default"].wrap(function(_context4){while(1)switch(_context4.prev=_context4.next){case 0:_context4.next=1;return this._eventsStorage.waitForPersist();case 1:case"end":return _context4.stop();}},_callee4,this);}));function flushStorage(){return _flushStorage.apply(this,arguments);}return flushStorage;}())},{key:"_shutdown",value:(function(){var _shutdown2=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee5(){var shutdownTimeoutMs,start,logsBudgetMs,remainingMs,drain,_args5=arguments;return _regenerator["default"].wrap(function(_context5){while(1)switch(_context5.prev=_context5.next){case 0:shutdownTimeoutMs=_args5.length>0&&_args5[0]!==undefined?_args5[0]:30000;this._errorTracking.clearExceptionSteps();start=Date.now();logsBudgetMs=Math.min(shutdownTimeoutMs,this._resolvedLogsConfig.terminationFlushBudgetMs);_context5.prev=1;_context5.next=2;return Promise.all([this._logs.shutdown(logsBudgetMs),_superPropGet(PostHog,"_shutdown",this,3)([shutdownTimeoutMs])]);case 2:_context5.prev=2;remainingMs=Math.max(0,shutdownTimeoutMs-(Date.now()-start));drain=Promise.all([this._eventsStorage.waitForPersist(),this._logsStorage.waitForPersist()]);_context5.next=3;return(0,_core.raceWithTimeout)(drain,remainingMs);case 3:return _context5.finish(2);case 4:case"end":return _context5.stop();}},_callee5,this,[[1,,2,4]]);}));function _shutdown(){return _shutdown2.apply(this,arguments);}return _shutdown;}())},{key:"fetch",value:function(_fetch){function fetch(_x,_x2){return _fetch.apply(this,arguments);}fetch.toString=function(){return _fetch.toString();};return fetch;}(function(url,options){return fetch(url,options);})},{key:"getLibraryId",value:function getLibraryId(){return'posthog-react-native';}},{key:"getLibraryVersion",value:function getLibraryVersion(){return _version.version;}},{key:"getCustomUserAgent",value:function getCustomUserAgent(){if(_reactNative.Platform.OS==='web'){return'';}return"".concat(this.getLibraryId(),"/").concat(this.getLibraryVersion());}},{key:"getCustomHeaders",value:function getCustomHeaders(){return _objectSpread(_objectSpread({},_superPropGet(PostHog,"getCustomHeaders",this,3)([])),this._requestHeaders);}},{key:"getCommonEventProperties",value:function getCommonEventProperties(){return _objectSpread(_objectSpread(_objectSpread({},_superPropGet(PostHog,"getCommonEventProperties",this,3)([])),this._appProperties),{},{$screen_height:_reactNative.Dimensions.get('screen').height,$screen_width:_reactNative.Dimensions.get('screen').width});}},{key:"getSurveyDisplayLanguageOverride",value:function getSurveyDisplayLanguageOverride(){return this._overrideDisplayLanguage;}},{key:"register",value:function register(properties){return _superPropGet(PostHog,"register",this,3)([properties]);}},{key:"unregister",value:function unregister(property){return _superPropGet(PostHog,"unregister",this,3)([property]);}},{key:"reset",value:function reset(propertiesToKeep){var _this2=this;var effectivePropertiesToKeep=propertiesToKeep!==null&&propertiesToKeep!==void 0?propertiesToKeep:[_core.PostHogPersistedProperty.InstalledAppBuild,_core.PostHogPersistedProperty.InstalledAppVersion,_core.PostHogPersistedProperty.DeviceId];_superPropGet(PostHog,"reset",this,3)([[_core.PostHogPersistedProperty.RemoteConfig,_core.PostHogPersistedProperty.SessionReplay,_core.PostHogPersistedProperty.Surveys,_core.PostHogPersistedProperty.PushRegistered].concat((0,_toConsumableArray2["default"])(effectivePropertiesToKeep))]);if(this._setDefaultPersonProperties){this._setDefaultPersonPropertiesForFlags(false);}if(_OptionalPlugin.OptionalReactNativePlugin===null||_OptionalPlugin.OptionalReactNativePlugin===void 0?void 0:_OptionalPlugin.OptionalReactNativePlugin.reset){void this._enqueueNative('reset',function(plugin){var _a;return(_a=plugin.reset)===null||_a===void 0?void 0:_a.call(plugin,String(_this2.getDistinctId()),String(_this2.getAnonymousId()));},this.getPersistedProperty(_core.PostHogPersistedProperty.PushRegistered)===true);}this._propagateNativeOptOut();void this._eventsStorage.waitForPersist();}},{key:"_setDefaultPersonPropertiesForFlags",value:function _setDefaultPersonPropertiesForFlags(){var _this3=this;var reloadFeatureFlags=arguments.length>0&&arguments[0]!==undefined?arguments[0]:true;var defaultProps={};var relevantKeys=['$app_version','$app_build','$app_namespace','$os_name','$os_version','$device_type'];relevantKeys.forEach(function(key){var value=_this3._appProperties[key];if(value!==null&&value!==undefined){defaultProps[key]=value;}});var commonProps=this.getCommonEventProperties();if(commonProps.$lib){defaultProps.$lib=commonProps.$lib;}if(commonProps.$lib_version){defaultProps.$lib_version=commonProps.$lib_version;}if(Object.keys(defaultProps).length>0){this.setPersonPropertiesForFlags(defaultProps,reloadFeatureFlags);}}},{key:"flush",value:function flush(){return _superPropGet(PostHog,"flush",this,3)([]);}},{key:"captureLog",value:function captureLog(options){this._logs.captureLog(options);}},{key:"flushLogs",value:function flushLogs(){return this._logs.flush();}},{key:"logger",get:function get(){var _this4=this;if(!this._captureLogger){this._captureLogger={trace:function trace(body,attributes){return _this4.captureLog({body:body,level:'trace',attributes:attributes});},debug:function debug(body,attributes){return _this4.captureLog({body:body,level:'debug',attributes:attributes});},info:function info(body,attributes){return _this4.captureLog({body:body,level:'info',attributes:attributes});},warn:function warn(body,attributes){return _this4.captureLog({body:body,level:'warn',attributes:attributes});},error:function error(body,attributes){return _this4.captureLog({body:body,level:'error',attributes:attributes});},fatal:function fatal(body,attributes){return _this4.captureLog({body:body,level:'fatal',attributes:attributes});}};}return this._captureLogger;}},{key:"optIn",value:function optIn(){var result=_superPropGet(PostHog,"optIn",this,3)([]);void this._eventsStorage.waitForPersist();this._propagateNativeOptOut();return result;}},{key:"optOut",value:function optOut(){var result=_superPropGet(PostHog,"optOut",this,3)([]);void this._eventsStorage.waitForPersist();if(_OptionalPlugin.OptionalReactNativePlugin===null||_OptionalPlugin.OptionalReactNativePlugin===void 0?void 0:_OptionalPlugin.OptionalReactNativePlugin.unregisterPushNotificationToken){void this.unregisterPushNotificationToken();}this._propagateNativeOptOut();return result;}},{key:"_propagateNativeOptOut",value:function _propagateNativeOptOut(){var _this5=this;if(!(_OptionalPlugin.OptionalReactNativePlugin===null||_OptionalPlugin.OptionalReactNativePlugin===void 0?void 0:_OptionalPlugin.OptionalReactNativePlugin.setOptOut)){return;}void this._enqueueNative('setOptOut',function(plugin){var _a;return(_a=plugin.setOptOut)===null||_a===void 0?void 0:_a.call(plugin,_this5.optedOut);});if(this._isPushNativeEnabled(this._sessionReplayOptions)){void this._ensureNativeInitialized();}}},{key:"isFeatureEnabled",value:function isFeatureEnabled(key,options){return _superPropGet(PostHog,"isFeatureEnabled",this,3)([key,options]);}},{key:"getFeatureFlag",value:function getFeatureFlag(key,options){return _superPropGet(PostHog,"getFeatureFlag",this,3)([key,options]);}},{key:"getFeatureFlagPayload",value:function getFeatureFlagPayload(key){return _superPropGet(PostHog,"getFeatureFlagPayload",this,3)([key]);}},{key:"reloadFeatureFlags",value:function reloadFeatureFlags(){_superPropGet(PostHog,"reloadFeatureFlags",this,3)([]);}},{key:"reloadFeatureFlagsAsync",value:function reloadFeatureFlagsAsync(){return _superPropGet(PostHog,"reloadFeatureFlagsAsync",this,3)([]);}},{key:"updateFlags",value:function updateFlags(flags,payloads,options){_superPropGet(PostHog,"updateFlags",this,3)([flags,payloads,options]);}},{key:"group",value:function group(groupType,groupKey,properties){_superPropGet(PostHog,"group",this,3)([groupType,groupKey,properties]);if(properties&&Object.keys(properties).length>0){var propsToCache={};Object.keys(properties).forEach(function(key){var value=properties[key];if(value!==null&&value!==undefined){propsToCache[key]=value;}});if(Object.keys(propsToCache).length>0){this.setGroupPropertiesForFlags((0,_defineProperty2["default"])({},groupType,propsToCache));}}}},{key:"alias",value:function alias(_alias){_superPropGet(PostHog,"alias",this,3)([_alias]);}},{key:"getDistinctId",value:function getDistinctId(){return _superPropGet(PostHog,"getDistinctId",this,3)([]);}},{key:"getDeviceId",value:function getDeviceId(){var deviceId=this.getPersistedProperty(_core.PostHogPersistedProperty.DeviceId);if(!deviceId){var anonId=this.getAnonymousId();if(anonId){this.setPersistedProperty(_core.PostHogPersistedProperty.DeviceId,anonId);return anonId;}return'';}return deviceId;}},{key:"setPersonPropertiesForFlags",value:function setPersonPropertiesForFlags(properties){var reloadFeatureFlags=arguments.length>1&&arguments[1]!==undefined?arguments[1]:true;_superPropGet(PostHog,"setPersonPropertiesForFlags",this,3)([properties,reloadFeatureFlags]);}},{key:"resetPersonPropertiesForFlags",value:function resetPersonPropertiesForFlags(){var reloadFeatureFlags=arguments.length>0&&arguments[0]!==undefined?arguments[0]:true;_superPropGet(PostHog,"resetPersonPropertiesForFlags",this,3)([]);if(reloadFeatureFlags){this.reloadFeatureFlags();}}},{key:"setGroupPropertiesForFlags",value:function setGroupPropertiesForFlags(properties){var reloadFeatureFlags=arguments.length>1&&arguments[1]!==undefined?arguments[1]:true;_superPropGet(PostHog,"setGroupPropertiesForFlags",this,3)([properties]);if(reloadFeatureFlags){this.reloadFeatureFlags();}}},{key:"resetGroupPropertiesForFlags",value:function resetGroupPropertiesForFlags(){var reloadFeatureFlags=arguments.length>0&&arguments[0]!==undefined?arguments[0]:true;_superPropGet(PostHog,"resetGroupPropertiesForFlags",this,3)([]);if(reloadFeatureFlags){this.reloadFeatureFlags();}}},{key:"screen",value:(function(){var _screen=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee6(name,properties,options){return _regenerator["default"].wrap(function(_context6){while(1)switch(_context6.prev=_context6.next){case 0:_context6.next=1;return this._initPromise;case 1:this.registerForSession({$screen_name:name});return _context6.abrupt("return",this.capture('$screen',_objectSpread(_objectSpread({},properties),{},{$screen_name:name}),options));case 2:case"end":return _context6.stop();}},_callee6,this);}));function screen(_x5,_x6,_x7){return _screen.apply(this,arguments);}return screen;}())},{key:"_isEnableSessionReplay",value:function _isEnableSessionReplay(){var _a;return!this.isDisabled&&!(0,_utils.isMacOS)()&&((_a=this._enableSessionReplay)!==null&&_a!==void 0?_a:false);}},{key:"_resetSessionId",value:function _resetSessionId(reactNativeSessionReplay,sessionId){if(reactNativeSessionReplay){reactNativeSessionReplay.endSession();reactNativeSessionReplay.startSession(sessionId);}}},{key:"getSessionId",value:function getSessionId(){var sessionId=_superPropGet(PostHog,"getSessionId",this,3)([]);if(!this._isEnableSessionReplay()&&!this._isNativePluginInitialized()){return sessionId;}if(sessionId.length>0&&this._currentSessionId&&sessionId!==this._currentSessionId){if(_OptionalPlugin.OptionalReactNativePlugin){try{this._resetSessionId(_OptionalPlugin.OptionalReactNativePlugin,String(sessionId));this._logger.info("sessionId rotated from ".concat(this._currentSessionId," to ").concat(sessionId,"."));}catch(e){this._logger.error("Failed to rotate sessionId: ".concat(e,"."));}}this._currentSessionId=sessionId;if(this._sessionReplayEventTriggers.length>0){void this._evaluateAndStartSessionReplay();}}else{this._logger.info("sessionId not rotated, sessionId ".concat(sessionId," and currentSessionId ").concat(this._currentSessionId,"."));}return sessionId;}},{key:"resetSessionId",value:function resetSessionId(){_superPropGet(PostHog,"resetSessionId",this,3)([]);if((this._isEnableSessionReplay()||this._isNativePluginInitialized())&&_OptionalPlugin.OptionalReactNativePlugin){try{_OptionalPlugin.OptionalReactNativePlugin.endSession();this._logger.info("Native PostHog session ended.");}catch(e){this._logger.error("Native PostHog session failed to end: ".concat(e,"."));}}}},{key:"startSessionRecording",value:(function(){var _startSessionRecording2=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee8(){var _this6=this;var resumeCurrent,_args8=arguments;return _regenerator["default"].wrap(function(_context8){while(1)switch(_context8.prev=_context8.next){case 0:resumeCurrent=_args8.length>0&&_args8[0]!==undefined?_args8[0]:true;this._sessionReplayEvalChain=this._sessionReplayEvalChain["catch"](function(){}).then((0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee7(){return _regenerator["default"].wrap(function(_context7){while(1)switch(_context7.prev=_context7.next){case 0:_context7.next=1;return _this6._startSessionRecording(resumeCurrent);case 1:case"end":return _context7.stop();}},_callee7);})));_context8.next=1;return this._sessionReplayEvalChain;case 1:case"end":return _context8.stop();}},_callee8,this);}));function startSessionRecording(){return _startSessionRecording2.apply(this,arguments);}return startSessionRecording;}())},{key:"_startSessionRecording",value:function(){var _startSessionRecording3=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee9(resumeCurrent){var initialized,newSessionId,_t;return _regenerator["default"].wrap(function(_context9){while(1)switch(_context9.prev=_context9.next){case 0:_context9.next=1;return this._initPromise;case 1:if(!this.isDisabled){_context9.next=2;break;}return _context9.abrupt("return",false);case 2:if(_OptionalPlugin.OptionalReactNativePlugin){_context9.next=3;break;}return _context9.abrupt("return",false);case 3:_context9.prev=3;if(_OptionalPlugin.OptionalReactNativePlugin.startRecording){_context9.next=4;break;}this._logger.warn('startRecording is not available. Please update @posthog/react-native-plugin or posthog-react-native-session-replay.');return _context9.abrupt("return",false);case 4:if(this._sessionReplayNativeInitialized){_context9.next=6;break;}this._logger.info('Native session replay SDK not initialized, initializing now...');_context9.next=5;return this.initializeNativePlugin(this._sessionReplayOptions,undefined,true);case 5:initialized=_context9.sent;if(initialized){_context9.next=6;break;}this._logger.error('Failed to initialize native session replay SDK.');return _context9.abrupt("return",false);case 6:if(!resumeCurrent){_superPropGet(PostHog,"resetSessionId",this,3)([]);newSessionId=_superPropGet(PostHog,"getSessionId",this,3)([]);this._resetSessionId(_OptionalPlugin.OptionalReactNativePlugin,String(newSessionId));this._currentSessionId=newSessionId;}_context9.next=7;return _OptionalPlugin.OptionalReactNativePlugin.startRecording(resumeCurrent);case 7:this._logger.info("Session recording ".concat(resumeCurrent?'resumed':'started',"."));return _context9.abrupt("return",true);case 8:_context9.prev=8;_t=_context9["catch"](3);this._logger.error("Failed to start session recording: ".concat(_t));return _context9.abrupt("return",false);case 9:case"end":return _context9.stop();}},_callee9,this,[[3,8]]);}));function _startSessionRecording(_x8){return _startSessionRecording3.apply(this,arguments);}return _startSessionRecording;}()},{key:"stopSessionRecording",value:(function(){var _stopSessionRecording2=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee0(){return _regenerator["default"].wrap(function(_context0){while(1)switch(_context0.prev=_context0.next){case 0:_context0.next=1;return this._stopSessionRecording();case 1:case"end":return _context0.stop();}},_callee0,this);}));function stopSessionRecording(){return _stopSessionRecording2.apply(this,arguments);}return stopSessionRecording;}())},{key:"_stopSessionRecording",value:function(){var _stopSessionRecording3=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee1(){var _t2;return _regenerator["default"].wrap(function(_context1){while(1)switch(_context1.prev=_context1.next){case 0:_context1.next=1;return this._initPromise;case 1:if(!this.isDisabled){_context1.next=2;break;}return _context1.abrupt("return",false);case 2:if(_OptionalPlugin.OptionalReactNativePlugin){_context1.next=3;break;}return _context1.abrupt("return",false);case 3:_context1.prev=3;if(_OptionalPlugin.OptionalReactNativePlugin.stopRecording){_context1.next=4;break;}this._logger.warn('stopRecording is not available. Please update @posthog/react-native-plugin or posthog-react-native-session-replay.');return _context1.abrupt("return",false);case 4:_context1.next=5;return _OptionalPlugin.OptionalReactNativePlugin.stopRecording();case 5:this._logger.info('Session recording stopped.');return _context1.abrupt("return",true);case 6:_context1.prev=6;_t2=_context1["catch"](3);this._logger.error("Failed to stop session recording: ".concat(_t2));return _context1.abrupt("return",false);case 7:case"end":return _context1.stop();}},_callee1,this,[[3,6]]);}));function _stopSessionRecording(){return _stopSessionRecording3.apply(this,arguments);}return _stopSessionRecording;}()},{key:"isSessionReplayActive",value:(function(){var _isSessionReplayActive=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee10(){var _t3;return _regenerator["default"].wrap(function(_context10){while(1)switch(_context10.prev=_context10.next){case 0:_context10.next=1;return this._initPromise;case 1:if(!this.isDisabled){_context10.next=2;break;}return _context10.abrupt("return",false);case 2:if(_OptionalPlugin.OptionalReactNativePlugin){_context10.next=3;break;}return _context10.abrupt("return",false);case 3:_context10.prev=3;_context10.next=4;return _OptionalPlugin.OptionalReactNativePlugin.isEnabled();case 4:return _context10.abrupt("return",_context10.sent);case 5:_context10.prev=5;_t3=_context10["catch"](3);this._logger.error("Failed to check session replay status: ".concat(_t3));return _context10.abrupt("return",false);case 6:case"end":return _context10.stop();}},_callee10,this,[[3,5]]);}));function isSessionReplayActive(){return _isSessionReplayActive.apply(this,arguments);}return isSessionReplayActive;}())},{key:"identify",value:function identify(distinctId,properties,options){var _this7=this;var previousDistinctId=this.getDistinctId();var userProps=(properties===null||properties===void 0?void 0:properties.$set)||properties;var userPropsOnce=properties===null||properties===void 0?void 0:properties.$set_once;_superPropGet(PostHog,"identify",this,3)([distinctId,properties,options]);var propsToCache={};if(userProps&&(0,_typeof2["default"])(userProps)==='object'&&!Array.isArray(userProps)){Object.entries(userProps).forEach(function(_ref6){var _ref7=(0,_slicedToArray2["default"])(_ref6,2),key=_ref7[0],value=_ref7[1];if(value!==null&&value!==undefined){propsToCache[key]=value;}});}var propsOnceToCache={};if(userPropsOnce&&(0,_typeof2["default"])(userPropsOnce)==='object'&&!Array.isArray(userPropsOnce)){Object.entries(userPropsOnce).forEach(function(_ref8){var _ref9=(0,_slicedToArray2["default"])(_ref8,2),key=_ref9[0],value=_ref9[1];if(value!==null&&value!==undefined){propsOnceToCache[key]=value;}});}if(Object.keys(propsToCache).length>0||Object.keys(propsOnceToCache).length>0){this.setPersonPropertiesForFlags(_objectSpread({$set:propsToCache},Object.keys(propsOnceToCache).length>0?{$set_once:propsOnceToCache}:{}),false);}if(_OptionalPlugin.OptionalReactNativePlugin){void this._enqueueNative('identify',function(plugin){var nativeDistinctId=String(_this7.getDistinctId()||previousDistinctId);var anonymousId=String(_this7.getAnonymousId());var identified=plugin.identify(nativeDistinctId,anonymousId);_this7._logger.info("Native PostHog identified with distinctId ".concat(nativeDistinctId," and anonymousId ").concat(anonymousId,"."));return identified;});}void this._eventsStorage.waitForPersist();}},{key:"captureException",value:function captureException(error){var additionalProperties=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var hint=arguments.length>2?arguments[2]:undefined;var resolvedHint=hint!==null&&hint!==void 0?hint:{mechanism:{handled:true,type:'generic'},syntheticException:new Error('Synthetic Error')};additionalProperties=this._errorTracking.attachExceptionSteps(additionalProperties);_superPropGet(PostHog,"captureException",this,3)([error,additionalProperties,resolvedHint]);if((additionalProperties===null||additionalProperties===void 0?void 0:additionalProperties.$exception_level)==='fatal'){void this._eventsStorage.waitForPersist();void this._logsStorage.waitForPersist();}}},{key:"addExceptionStep",value:function addExceptionStep(message,properties){this._errorTracking.addExceptionStep(message,properties);}},{key:"createErrorPropertiesBuilder",value:function createErrorPropertiesBuilder(){return new _core.ErrorTracking.ErrorPropertiesBuilder([new _core.ErrorTracking.PromiseRejectionEventCoercer(),new _core.ErrorTracking.ErrorCoercer(),new _core.ErrorTracking.ErrorEventCoercer(),new _core.ErrorTracking.ObjectCoercer(),new _core.ErrorTracking.StringCoercer(),new _core.ErrorTracking.PrimitiveCoercer()],_core.ErrorTracking.createStackParser((0,_utils.isHermes)()?'hermes':'web:javascript',_core.ErrorTracking.chromeStackLineParser,_core.ErrorTracking.geckoStackLineParser));}},{key:"initReactNativeNavigation",value:function initReactNativeNavigation(options){return(0,_wixNavigation.withReactNativeNavigation)(this,options);}},{key:"createPersonProfile",value:function createPersonProfile(){_superPropGet(PostHog,"createPersonProfile",this,3)([]);}},{key:"setPersonProperties",value:function setPersonProperties(userPropertiesToSet,userPropertiesToSetOnce){var reloadFeatureFlags=arguments.length>2&&arguments[2]!==undefined?arguments[2]:true;_superPropGet(PostHog,"setPersonProperties",this,3)([userPropertiesToSet,userPropertiesToSetOnce,reloadFeatureFlags]);}},{key:"unsetPersonProperties",value:function unsetPersonProperties(propertyNames){var reloadFeatureFlags=arguments.length>1&&arguments[1]!==undefined?arguments[1]:true;_superPropGet(PostHog,"unsetPersonProperties",this,3)([propertyNames,reloadFeatureFlags]);}},{key:"getSurveys",value:function(){var _getSurveys=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee11(){var surveys;return _regenerator["default"].wrap(function(_context11){while(1)switch(_context11.prev=_context11.next){case 0:if(!(this._disableSurveys===true)){_context11.next=1;break;}this._logger.info('Loading surveys is disabled.');this._cacheSurveys(null,'disabled in config');return _context11.abrupt("return",[]);case 1:surveys=this.getPersistedProperty(_core.PostHogPersistedProperty.Surveys);if(!(surveys&&surveys.length>0)){_context11.next=2;break;}this._logger.info('Surveys fetched from storage: ',JSON.stringify(surveys));return _context11.abrupt("return",surveys);case 2:this._logger.info('No surveys found in storage');return _context11.abrupt("return",[]);case 3:case"end":return _context11.stop();}},_callee11,this);}));function getSurveys(){return _getSurveys.apply(this,arguments);}return getSurveys;}()},{key:"_onSurveysReady",value:function _onSurveysReady(){var _this8=this;if(this._surveysReady){return Promise.resolve();}if(!this._surveysReadyPromise){this._surveysReadyPromise=new Promise(function(resolve){_this8._surveysReadyResolve=resolve;});}return this._surveysReadyPromise;}},{key:"_cacheSurveys",value:function _cacheSurveys(surveys,source){this.setPersistedProperty(_core.PostHogPersistedProperty.Surveys,surveys);if(surveys&&surveys.length>0){this._logger.info("Surveys cached from ".concat(source,":"),JSON.stringify(surveys));}else if(surveys===null){this._logger.info("Surveys cleared (".concat(source,")"));}else{this._logger.info("No surveys to cache from ".concat(source,")"));}}},{key:"_notifySurveysReady",value:function _notifySurveysReady(){this._surveysReady=true;if(this._surveysReadyResolve){this._surveysReadyResolve();this._surveysReadyResolve=null;this._surveysReadyPromise=null;}}},{key:"_handleSurveysFromRemoteConfig",value:function _handleSurveysFromRemoteConfig(response){if(this._disableSurveys===true){this._logger.info('Loading surveys skipped, disabled.');this._cacheSurveys(null,'remote config (disabled)');return;}var surveys=response.surveys;if(Array.isArray(surveys)&&surveys.length>0){this._cacheSurveys(surveys,'remote config');}else{this._cacheSurveys(null,'remote config');}}},{key:"registerPushNotificationToken",value:(function(){var _registerPushNotificationToken=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee12(deviceToken,options){var _this9=this;return _regenerator["default"].wrap(function(_context12){while(1)switch(_context12.prev=_context12.next){case 0:return _context12.abrupt("return",this._callPushPlugin('registerPushNotificationToken',{allowMacOS:false,requireInit:true,noop:'token not registered'},function(plugin){var _a,_b;_this9.setPersistedProperty(_core.PostHogPersistedProperty.PushRegistered,true);return(_a=plugin.registerPushNotificationToken)===null||_a===void 0?void 0:_a.call(plugin,deviceToken,(_b=options===null||options===void 0?void 0:options.appId)!==null&&_b!==void 0?_b:null);}));case 1:case"end":return _context12.stop();}},_callee12,this);}));function registerPushNotificationToken(_x9,_x0){return _registerPushNotificationToken.apply(this,arguments);}return registerPushNotificationToken;}())},{key:"unregisterPushNotificationToken",value:(function(){var _unregisterPushNotificationToken=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee13(){var _this0=this;return _regenerator["default"].wrap(function(_context13){while(1)switch(_context13.prev=_context13.next){case 0:return _context13.abrupt("return",this._callPushPlugin('unregisterPushNotificationToken',{allowMacOS:false,allowWhenOptedOut:true,requireInit:this.getPersistedProperty(_core.PostHogPersistedProperty.PushRegistered)===true,noop:'nothing to unregister'},function(plugin){var _a;_this0.setPersistedProperty(_core.PostHogPersistedProperty.PushRegistered,null);return(_a=plugin.unregisterPushNotificationToken)===null||_a===void 0?void 0:_a.call(plugin);}));case 1:case"end":return _context13.stop();}},_callee13,this);}));function unregisterPushNotificationToken(){return _unregisterPushNotificationToken.apply(this,arguments);}return unregisterPushNotificationToken;}())},{key:"capturePushNotificationOpened",value:(function(){var _capturePushNotificationOpened=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee14(options){var properties,_i,_arr,key;return _regenerator["default"].wrap(function(_context14){while(1)switch(_context14.prev=_context14.next){case 0:properties={};for(_i=0,_arr=['title','subtitle','body','payload','action'];_i<_arr.length;_i++){key=_arr[_i];if(options[key]!==undefined){properties[key]=options[key];}}return _context14.abrupt("return",this._callPushPlugin('capturePushNotificationOpened',{allowMacOS:true,requireInit:true,noop:'event not captured'},function(plugin){var _a;return(_a=plugin.capturePushNotificationOpened)===null||_a===void 0?void 0:_a.call(plugin,properties);}));case 1:case"end":return _context14.stop();}},_callee14,this);}));function capturePushNotificationOpened(_x1){return _capturePushNotificationOpened.apply(this,arguments);}return capturePushNotificationOpened;}())},{key:"_callPushPlugin",value:function(){var _callPushPlugin2=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee15(method,behavior,invoke){var _this1=this;return _regenerator["default"].wrap(function(_context15){while(1)switch(_context15.prev=_context15.next){case 0:if(!this.isDisabled){_context15.next=1;break;}return _context15.abrupt("return");case 1:if(!(this.optedOut&&!behavior.allowWhenOptedOut)){_context15.next=2;break;}this._logger.warn("".concat(method," skipped: the user is opted out; ").concat(behavior.noop,"."));return _context15.abrupt("return");case 2:if(!((0,_utils.isWeb)()||!behavior.allowMacOS&&(0,_utils.isMacOS)())){_context15.next=3;break;}this._logger.warn("".concat(method," is not supported on ").concat((0,_utils.isWeb)()?'web':'macOS',"; ").concat(behavior.noop,"."));return _context15.abrupt("return");case 3:if(_OptionalPlugin.OptionalReactNativePlugin===null||_OptionalPlugin.OptionalReactNativePlugin===void 0?void 0:_OptionalPlugin.OptionalReactNativePlugin[method]){_context15.next=4;break;}this._logger.warn("".concat(method," requires @posthog/react-native-plugin; install or update it."));return _context15.abrupt("return");case 4:return _context15.abrupt("return",this._enqueueNative(method,function(plugin){if(_this1.optedOut&&!behavior.allowWhenOptedOut){_this1._logger.warn("".concat(method," skipped: the user is opted out; ").concat(behavior.noop,"."));return;}return invoke(plugin);},behavior.requireInit));case 5:case"end":return _context15.stop();}},_callee15,this);}));function _callPushPlugin(_x10,_x11,_x12){return _callPushPlugin2.apply(this,arguments);}return _callPushPlugin;}()},{key:"_enqueueNative",value:function _enqueueNative(label,run){var _this10=this;var requireInit=arguments.length>2&&arguments[2]!==undefined?arguments[2]:false;var next=this._nativeChain["catch"](function(){}).then((0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee16(){return _regenerator["default"].wrap(function(_context16){while(1)switch(_context16.prev=_context16.next){case 0:if(!(_this10.isDisabled||(0,_utils.isWeb)()||!_OptionalPlugin.OptionalReactNativePlugin)){_context16.next=1;break;}return _context16.abrupt("return");case 1:_context16.next=2;return _this10._initPromise["catch"](function(){});case 2:_context16.next=3;return _this10._sessionReplayEvalChain["catch"](function(){});case 3:if(_this10._isNativePluginInitialized()){_context16.next=6;break;}if(requireInit){_context16.next=4;break;}return _context16.abrupt("return");case 4:_context16.next=5;return _this10._ensureNativeInitialized();case 5:if(_this10._isNativePluginInitialized()){_context16.next=6;break;}_this10._logger.warn("".concat(label," skipped: the native plugin is not initialized."));return _context16.abrupt("return");case 6:_context16.next=7;return(0,_core.raceWithTimeout)(Promise.resolve(run(_OptionalPlugin.OptionalReactNativePlugin)),NATIVE_CALL_TIMEOUT_MS,function(){return _this10._logger.warn("Native PostHog ".concat(label," timed out after ").concat(NATIVE_CALL_TIMEOUT_MS,"ms; continuing."));});case 7:case"end":return _context16.stop();}},_callee16);})))["catch"](function(e){return _this10._logger.warn("Native PostHog ".concat(label," failed: ").concat(e,"."));});this._nativeChain=next;return next;}},{key:"_ensureNativeInitialized",value:function _ensureNativeInitialized(){var _this11=this;this._sessionReplayEvalChain=this._sessionReplayEvalChain["catch"](function(){}).then((0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee17(){return _regenerator["default"].wrap(function(_context17){while(1)switch(_context17.prev=_context17.next){case 0:if(_this11._isNativePluginInitialized()){_context17.next=1;break;}_context17.next=1;return _this11.initializeNativePlugin(_this11._sessionReplayOptions,undefined,false,true);case 1:case"end":return _context17.stop();}},_callee17);})));return this._sessionReplayEvalChain;}},{key:"_isAutocaptureNativeErrors",value:function _isAutocaptureNativeErrors(options){var _a;var autocapture=(_a=options===null||options===void 0?void 0:options.errorTracking)===null||_a===void 0?void 0:_a.autocapture;var nativeCrashes=(0,_typeof2["default"])(autocapture)==='object'&&autocapture.nativeCrashes===true;return!this.isDisabled&&nativeCrashes;}},{key:"_isNativePluginInitialized",value:function _isNativePluginInitialized(){return this._sessionReplayNativeInitialized||this._nativeErrorTrackingInitialized||this._pushNativeInitialized;}},{key:"_isPushNativeEnabled",value:function _isPushNativeEnabled(options){var force=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;if(this.isDisabled||this.optedOut||(0,_utils.isWeb)()||this._pushNativeUnsupported){return false;}return force||(options===null||options===void 0?void 0:options.capturePushNotificationSubscriptions)!==false||(options===null||options===void 0?void 0:options.capturePushNotificationOpened)!==false||!!(options===null||options===void 0?void 0:options.pushIdentityProvider);}},{key:"initializeSessionReplayNative",value:(function(){var _initializeSessionReplayNative=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee18(options,cachedRemoteConfig){return _regenerator["default"].wrap(function(_context18){while(1)switch(_context18.prev=_context18.next){case 0:return _context18.abrupt("return",this.initializeNativePlugin(options,cachedRemoteConfig,true));case 1:case"end":return _context18.stop();}},_callee18,this);}));function initializeSessionReplayNative(_x13,_x14){return _initializeSessionReplayNative.apply(this,arguments);}return initializeSessionReplayNative;}())},{key:"initializeNativePlugin",value:function(){var _initializeNativePlugin=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee19(options,cachedRemoteConfig){var enableSessionReplay,forcePush,_a,_b,_c,_d,_e,_f,_g,_h,_j,enableNativeErrorTracking,enablePush,sessionId,defaultThrottleDelayMs,_ref10,_ref10$maskAllTextInp,maskAllTextInputs,_ref10$maskAllImages,maskAllImages,_ref10$maskAllSandbox,maskAllSandboxedViews,_ref10$captureLog,localCaptureLog,_ref10$captureNetwork,localCaptureNetworkTelemetry,_ref10$verifyScreensh,verifyScreenshotMaskAlignment,_ref10$screenshotMode,screenshotModeBackgroundCapture,localSampleRate,_ref10$iOSdebouncerDe,iOSdebouncerDelayMs,_ref10$androidDebounc,androidDebouncerDelayMs,throttleDelayMs,remoteConsoleLogEnabled,remoteNetworkTimingEnabled,remoteSampleRateRaw,captureLog,captureNetworkTelemetry,localSampleRateValid,remoteSampleRateValid,sampleRate,source,sdkReplayConfig,sessionReplay,cachedSessionReplayConfig,pushOnlyInit,sdkOptions,loggableSdkOptions,wasSessionReplayEnabled,pushIdentityProviderEnabled,pluginConfig,_args19=arguments,_t4,_t5;return _regenerator["default"].wrap(function(_context19){while(1)switch(_context19.prev=_context19.next){case 0:enableSessionReplay=_args19.length>2&&_args19[2]!==undefined?_args19[2]:this._isEnableSessionReplay();forcePush=_args19.length>3&&_args19[3]!==undefined?_args19[3]:false;enableNativeErrorTracking=this._isAutocaptureNativeErrors(options);enablePush=this._isPushNativeEnabled(options,forcePush);if(enableSessionReplay&&(0,_utils.isMacOS)()){if(!this._sessionReplayMacOSWarned){this._sessionReplayMacOSWarned=true;this._logger.warn('Session replay is not supported on macOS; ignoring.');}enableSessionReplay=false;}if(!(!enableSessionReplay&&!enableNativeErrorTracking&&!enablePush)){_context19.next=1;break;}return _context19.abrupt("return",true);case 1:if(_OptionalPlugin.OptionalReactNativePlugin){_context19.next=2;break;}if(enableSessionReplay||enableNativeErrorTracking){this._logger.warn(enableSessionReplay?'Session replay enabled but not installed.':'Native error tracking enabled but not installed.');}this._pushNativeUnsupported=true;return _context19.abrupt("return",false);case 2:if(!((!enableSessionReplay||this._sessionReplayNativeInitialized)&&(!enableNativeErrorTracking||this._nativeErrorTrackingInitialized)&&(!enablePush||this._pushNativeInitialized))){_context19.next=3;break;}return _context19.abrupt("return",true);case 3:if(!(this._isNativePluginInitialized()&&enableSessionReplay&&!this._sessionReplayNativeInitialized)){_context19.next=5;break;}this._sessionReplayNativeInitialized=true;_context19.next=4;return(_a=_OptionalPlugin.OptionalReactNativePlugin.startRecording)===null||_a===void 0?void 0:_a.call(_OptionalPlugin.OptionalReactNativePlugin,true);case 4:return _context19.abrupt("return",true);case 5:sessionId=this.getSessionId();if(!(sessionId.length===0)){_context19.next=6;break;}this._logger.warn("Native PostHog plugin enabled but no sessionId found.");return _context19.abrupt("return",false);case 6:defaultThrottleDelayMs=1000;_ref10=(_b=options===null||options===void 0?void 0:options.sessionReplayConfig)!==null&&_b!==void 0?_b:{},_ref10$maskAllTextInp=_ref10.maskAllTextInputs,maskAllTextInputs=_ref10$maskAllTextInp===void 0?true:_ref10$maskAllTextInp,_ref10$maskAllImages=_ref10.maskAllImages,maskAllImages=_ref10$maskAllImages===void 0?true:_ref10$maskAllImages,_ref10$maskAllSandbox=_ref10.maskAllSandboxedViews,maskAllSandboxedViews=_ref10$maskAllSandbox===void 0?true:_ref10$maskAllSandbox,_ref10$captureLog=_ref10.captureLog,localCaptureLog=_ref10$captureLog===void 0?true:_ref10$captureLog,_ref10$captureNetwork=_ref10.captureNetworkTelemetry,localCaptureNetworkTelemetry=_ref10$captureNetwork===void 0?true:_ref10$captureNetwork,_ref10$verifyScreensh=_ref10.verifyScreenshotMaskAlignment,verifyScreenshotMaskAlignment=_ref10$verifyScreensh===void 0?false:_ref10$verifyScreensh,_ref10$screenshotMode=_ref10.screenshotModeBackgroundCapture,screenshotModeBackgroundCapture=_ref10$screenshotMode===void 0?false:_ref10$screenshotMode,localSampleRate=_ref10.sampleRate,_ref10$iOSdebouncerDe=_ref10.iOSdebouncerDelayMs,iOSdebouncerDelayMs=_ref10$iOSdebouncerDe===void 0?defaultThrottleDelayMs:_ref10$iOSdebouncerDe,_ref10$androidDebounc=_ref10.androidDebouncerDelayMs,androidDebouncerDelayMs=_ref10$androidDebounc===void 0?defaultThrottleDelayMs:_ref10$androidDebounc;throttleDelayMs=(_d=(_c=options===null||options===void 0?void 0:options.sessionReplayConfig)===null||_c===void 0?void 0:_c.throttleDelayMs)!==null&&_d!==void 0?_d:defaultThrottleDelayMs;if(throttleDelayMs===defaultThrottleDelayMs&&(iOSdebouncerDelayMs!==defaultThrottleDelayMs||androidDebouncerDelayMs!==defaultThrottleDelayMs)){throttleDelayMs=Math.max(iOSdebouncerDelayMs,androidDebouncerDelayMs);}remoteConsoleLogEnabled=(0,_utils.getRemoteConfigBool)(cachedRemoteConfig===null||cachedRemoteConfig===void 0?void 0:cachedRemoteConfig.sessionRecording,'consoleLogRecordingEnabled',true);remoteNetworkTimingEnabled=(0,_utils.getRemoteConfigBool)(cachedRemoteConfig===null||cachedRemoteConfig===void 0?void 0:cachedRemoteConfig.capturePerformance,'network_timing',true);remoteSampleRateRaw=(0,_utils.getRemoteConfigNumber)(cachedRemoteConfig===null||cachedRemoteConfig===void 0?void 0:cachedRemoteConfig.sessionRecording,'sampleRate');captureLog=localCaptureLog&&remoteConsoleLogEnabled;captureNetworkTelemetry=localCaptureNetworkTelemetry&&remoteNetworkTimingEnabled;localSampleRateValid=localSampleRate===undefined?undefined:(0,_utils.isValidSampleRate)(localSampleRate)?localSampleRate:undefined;remoteSampleRateValid=remoteSampleRateRaw===undefined?undefined:(0,_utils.isValidSampleRate)(remoteSampleRateRaw)?remoteSampleRateRaw:undefined;sampleRate=localSampleRateValid!==null&&localSampleRateValid!==void 0?localSampleRateValid:remoteSampleRateValid;if(localCaptureLog&&!remoteConsoleLogEnabled){this._logger.info('captureLog disabled by remote config (consoleLogRecordingEnabled=false).');}if(localCaptureNetworkTelemetry&&!remoteNetworkTimingEnabled){this._logger.info('captureNetworkTelemetry disabled by remote config (capturePerformance.network_timing=false).');}if(localSampleRate!==undefined&&localSampleRateValid===undefined){this._logger.warn("Ignoring invalid sessionReplayConfig.sampleRate '".concat(localSampleRate,"'. Expected a number between 0 and 1."));}if(remoteSampleRateRaw!==undefined&&remoteSampleRateValid===undefined){this._logger.warn("Ignoring invalid remote config sessionRecording.sampleRate '".concat(remoteSampleRateRaw,"'. Expected a number between 0 and 1."));}if(localSampleRateValid!==undefined&&remoteSampleRateValid!==undefined){this._logger.warn("Local sessionReplayConfig.sampleRate (".concat(localSampleRateValid,") overrides the remote sampleRate ")+"(".concat(remoteSampleRateValid,"). The project setting is ignored while the local option is set. ")+"Remove sessionReplayConfig.sampleRate to follow the project setting.");}else if(typeof sampleRate==='number'){source=localSampleRateValid!==undefined?'local config':'remote config';this._logger.info("sampleRate set from ".concat(source," (").concat(sampleRate,")."));}else if(cachedRemoteConfig===undefined){this._logger.warn('Session replay starts with no sampleRate because no remote config is cached yet. '+'Any project sample rate applies from the next launch.');}sdkReplayConfig={maskAllTextInputs:maskAllTextInputs,maskAllImages:maskAllImages,maskAllSandboxedViews:maskAllSandboxedViews,captureLog:captureLog,captureNetworkTelemetry:captureNetworkTelemetry,verifyScreenshotMaskAlignment:verifyScreenshotMaskAlignment,screenshotModeBackgroundCapture:screenshotModeBackgroundCapture,sampleRate:sampleRate,iOSdebouncerDelayMs:iOSdebouncerDelayMs,androidDebouncerDelayMs:androidDebouncerDelayMs,throttleDelayMs:throttleDelayMs};this._logger.info("Native PostHog plugin (version ".concat(_OptionalPlugin.OptionalReactNativePluginVersion!==null&&_OptionalPlugin.OptionalReactNativePluginVersion!==void 0?_OptionalPlugin.OptionalReactNativePluginVersion:'unknown',") replay config: ").concat(JSON.stringify(sdkReplayConfig)));sessionReplay=(_e=this.getPersistedProperty(_core.PostHogPersistedProperty.SessionReplay))!==null&&_e!==void 0?_e:{};cachedSessionReplayConfig=(_f=sessionReplay)!==null&&_f!==void 0?_f:{};this._logger.info("Session replay session recording from flags cached config: ".concat(JSON.stringify(cachedSessionReplayConfig)));pushOnlyInit=enablePush&&!enableSessionReplay&&!enableNativeErrorTracking;sdkOptions={apiKey:this.apiKey,host:this.host,debug:this.isDebug,distinctId:this.getDistinctId(),anonymousId:this.getAnonymousId(),sdkVersion:this.getLibraryVersion(),flushAt:this.flushAt,optOut:this.optedOut,preloadFeatureFlags:!pushOnlyInit,requestHeaders:this._requestHeaders};loggableSdkOptions=_objectSpread(_objectSpread({},sdkOptions),{},{requestHeaders:Object.keys(this._requestHeaders)});this._logger.info("Native PostHog plugin sdk options: ".concat(JSON.stringify(loggableSdkOptions)));_context19.prev=7;if(!enableSessionReplay){_context19.next=9;break;}_context19.next=8;return _OptionalPlugin.OptionalReactNativePlugin.isEnabled()["catch"](function(){return false;});case 8:_t4=_context19.sent;_context19.next=10;break;case 9:_t4=false;case 10:wasSessionReplayEnabled=_t4;if(!_OptionalPlugin.OptionalReactNativePlugin.setup){_context19.next=13;break;}pushIdentityProviderEnabled=false;if(options===null||options===void 0?void 0:options.pushIdentityProvider){if(_OptionalPlugin.OptionalReactNativePlugin.setPushIdentityProvider){_OptionalPlugin.OptionalReactNativePlugin.setPushIdentityProvider(options.pushIdentityProvider);pushIdentityProviderEnabled=true;}else{this._logger.warn('pushIdentityProvider requires a newer @posthog/react-native-plugin; push subscriptions will be sent unauthenticated.');}}pluginConfig={sessionReplay:{enabled:enableSessionReplay,sdkReplayConfig:sdkReplayConfig,decideReplayConfig:cachedSessionReplayConfig},errorTracking:{nativeAutocapture:enableNativeErrorTracking,exceptionSteps:this._errorTracking.getNativePluginExceptionStepsConfig()},push:{capturePushNotificationSubscriptions:(_g=options===null||options===void 0?void 0:options.capturePushNotificationSubscriptions)!==null&&_g!==void 0?_g:true,capturePushNotificationOpened:(_h=options===null||options===void 0?void 0:options.capturePushNotificationOpened)!==null&&_h!==void 0?_h:true,pushIdentityProviderEnabled:pushIdentityProviderEnabled}};_context19.next=11;return _OptionalPlugin.OptionalReactNativePlugin.setup(String(sessionId),sdkOptions,pluginConfig);case 11:_context19.next=12;return(_j=_OptionalPlugin.OptionalReactNativePlugin.setOptOut)===null||_j===void 0?void 0:_j.call(_OptionalPlugin.OptionalReactNativePlugin,this.optedOut);case 12:if(wasSessionReplayEnabled){this._resetSessionId(_OptionalPlugin.OptionalReactNativePlugin,String(sessionId));}_context19.next=18;break;case 13:if(enableNativeErrorTracking){this._logger.warn('Native error tracking is not available. Please update @posthog/react-native-plugin or posthog-react-native-session-replay.');enableNativeErrorTracking=false;}if(enablePush){this._logger.warn('Push notifications require @posthog/react-native-plugin; the legacy session-replay plugin does not support them.');}enablePush=false;this._pushNativeUnsupported=true;if(enableSessionReplay){_context19.next=14;break;}return _context19.abrupt("return",false);case 14:_context19.next=15;return _OptionalPlugin.OptionalReactNativePlugin.isEnabled();case 15:if(_context19.sent){_context19.next=17;break;}_context19.next=16;return _OptionalPlugin.OptionalReactNativePlugin.start(String(sessionId),sdkOptions,sdkReplayConfig,cachedSessionReplayConfig);case 16:_context19.next=18;break;case 17:this._resetSessionId(_OptionalPlugin.OptionalReactNativePlugin,String(sessionId));case 18:this._currentSessionId=sessionId;if(enableSessionReplay){this._sessionReplayNativeInitialized=true;this._logger.info("Session replay started with sessionId ".concat(sessionId,"."));}if(enableNativeErrorTracking){this._nativeErrorTrackingInitialized=true;this._errorTracking.onNativeErrorTrackingReady();this._logger.info('Native error tracking started.');}if(enablePush){this._pushNativeInitialized=true;this._logger.info('Push notification native support started.');}return _context19.abrupt("return",true);case 19:_context19.prev=19;_t5=_context19["catch"](7);this._logger.error("Native PostHog plugin failed to start: ".concat(_t5,"."));return _context19.abrupt("return",false);case 20:case"end":return _context19.stop();}},_callee19,this,[[7,19]]);}));function initializeNativePlugin(_x15,_x16){return _initializeNativePlugin.apply(this,arguments);}return initializeNativePlugin;}()},{key:"startSessionReplay",value:function(){var _startSessionReplay=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee20(options,cachedRemoteConfig){return _regenerator["default"].wrap(function(_context20){while(1)switch(_context20.prev=_context20.next){case 0:this._enableSessionReplay=options===null||options===void 0?void 0:options.enableSessionReplay;this._sessionReplayOptions=options;_context20.next=1;return this._evaluateAndStartSessionReplay(cachedRemoteConfig);case 1:case"end":return _context20.stop();}},_callee20,this);}));function startSessionReplay(_x17,_x18){return _startSessionReplay.apply(this,arguments);}return startSessionReplay;}()},{key:"_evaluateAndStartSessionReplay",value:function _evaluateAndStartSessionReplay(cachedRemoteConfig){var _this12=this;this._sessionReplayEvalChain=this._sessionReplayEvalChain["catch"](function(){}).then(function(){return _this12._evaluateAndStartSessionReplayInternal(cachedRemoteConfig);});return this._sessionReplayEvalChain;}},{key:"_evaluateAndStartSessionReplayInternal",value:function(){var _evaluateAndStartSessionReplayInternal2=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee21(cachedRemoteConfig){var _a,_b,_c,_d,options,enableNativeErrorTracking,enablePush,remoteConfig,sessionReplay,featureFlags,cachedFeatureFlags,cachedSessionReplayConfig,recordingActive,linkedFlag,value,flag,variant,_value,eventTriggers,activated,_t6;return _regenerator["default"].wrap(function(_context21){while(1)switch(_context21.prev=_context21.next){case 0:options=this._sessionReplayOptions;enableNativeErrorTracking=this._isAutocaptureNativeErrors(options);enablePush=this._isPushNativeEnabled(options);remoteConfig=cachedRemoteConfig!==null&&cachedRemoteConfig!==void 0?cachedRemoteConfig:this.getPersistedProperty(_core.PostHogPersistedProperty.RemoteConfig);if(this._isEnableSessionReplay()){_context21.next=2;break;}this._logger.info('Session replay is not enabled.');this._sessionReplayEventTriggers=[];if(!(enableNativeErrorTracking||enablePush)){_context21.next=1;break;}_context21.next=1;return this.initializeNativePlugin(options,remoteConfig,false);case 1:return _context21.abrupt("return");case 2:sessionReplay=(_a=this.getPersistedProperty(_core.PostHogPersistedProperty.SessionReplay))!==null&&_a!==void 0?_a:{};featureFlags=(_b=this.getKnownFeatureFlags())!==null&&_b!==void 0?_b:{};cachedFeatureFlags=(_c=featureFlags)!==null&&_c!==void 0?_c:{};cachedSessionReplayConfig=(_d=sessionReplay)!==null&&_d!==void 0?_d:{};this._logger.info('Session replay feature flags from flags cached config:',JSON.stringify(cachedFeatureFlags));recordingActive=true;linkedFlag=cachedSessionReplayConfig['linkedFlag'];if(typeof linkedFlag==='string'){value=cachedFeatureFlags[linkedFlag];if(typeof value==='boolean'){recordingActive=value;}else if(typeof value==='string'){recordingActive=true;}else{recordingActive=false;}this._logger.info("Session replay '".concat(linkedFlag,"' linked flag value: '").concat(value,"'"));}else if(linkedFlag&&(0,_typeof2["default"])(linkedFlag)==='object'){flag=linkedFlag['flag'];variant=linkedFlag['variant'];if(flag&&variant){_value=cachedFeatureFlags[flag];recordingActive=_value===variant;this._logger.info("Session replay '".concat(flag,"' linked flag variant '").concat(variant,"' and value '").concat(_value,"'"));}else{this._logger.info("Session replay '".concat(flag,"' linked flag variant: '").concat(variant,"' does not exist/quota limited."));recordingActive=false;}}else{this._logger.info("Session replay has no cached linkedFlag.");}eventTriggers=this._parseEventTriggers(cachedSessionReplayConfig['eventTriggers']);this._sessionReplayEventTriggers=eventTriggers;if(eventTriggers.length>0){activated=this._isEventTriggerActivatedForSession(_superPropGet(PostHog,"getSessionId",this,3)([]));if(!activated){recordingActive=false;}this._logger.info("Session replay event triggers configured (".concat(eventTriggers.length,"); activated: ").concat(activated,"."));}if(!recordingActive){_context21.next=8;break;}if(!(this._sessionReplayRecordingActive===true)){_context21.next=3;break;}return _context21.abrupt("return");case 3:if(!this._sessionReplayNativeInitialized){_context21.next=5;break;}_context21.next=4;return this._startSessionRecording(true);case 4:_t6=_context21.sent;_context21.next=7;break;case 5:_context21.next=6;return this.initializeNativePlugin(options,remoteConfig,true);case 6:_t6=_context21.sent;case 7:this._sessionReplayRecordingActive=_t6;_context21.next=12;break;case 8:this._logger.info('Session replay disabled.');if(!(this._sessionReplayRecordingActive===true)){_context21.next=10;break;}_context21.next=9;return this._stopSessionRecording();case 9:this._sessionReplayRecordingActive=!_context21.sent;_context21.next=11;break;case 10:this._sessionReplayRecordingActive=false;case 11:if(!(enableNativeErrorTracking||enablePush)){_context21.next=12;break;}_context21.next=12;return this.initializeNativePlugin(options,remoteConfig,false);case 12:case"end":return _context21.stop();}},_callee21,this);}));function _evaluateAndStartSessionReplayInternal(_x19){return _evaluateAndStartSessionReplayInternal2.apply(this,arguments);}return _evaluateAndStartSessionReplayInternal;}()},{key:"processBeforeEnqueue",value:function processBeforeEnqueue(message){var processed=_superPropGet(PostHog,"processBeforeEnqueue",this,3)([message]);try{this._maybeActivateEventTrigger(processed===null||processed===void 0?void 0:processed['event']);}catch(e){this._logger.error("Session replay event trigger check failed: ".concat(e,"."));}return processed;}},{key:"_maybeActivateEventTrigger",value:function _maybeActivateEventTrigger(eventName){if(this._sessionReplayEventTriggers.length===0||typeof eventName!=='string'){return;}if(!this._sessionReplayEventTriggers.includes(eventName)){return;}var sessionId=_superPropGet(PostHog,"getSessionId",this,3)([]);if(!sessionId){return;}if(this._isEventTriggerActivatedForSession(sessionId)&&this._sessionReplayRecordingActive===true){return;}if(!this._isEventTriggerActivatedForSession(sessionId)){this.setPersistedProperty(_core.PostHogPersistedProperty.SessionReplayEventTriggerActivatedSession,sessionId);this._logger.info("Session replay event trigger '".concat(eventName,"' activated for session ").concat(sessionId,"."));}void this._evaluateAndStartSessionReplay();}},{key:"_parseEventTriggers",value:function _parseEventTriggers(value){if(!Array.isArray(value)){return[];}return value.filter(function(entry){return typeof entry==='string';});}},{key:"_isEventTriggerActivatedForSession",value:function _isEventTriggerActivatedForSession(sessionId){return this.getPersistedProperty(_core.PostHogPersistedProperty.SessionReplayEventTriggerActivatedSession)===sessionId;}},{key:"captureAppLifecycleEvents",value:function(){var _captureAppLifecycleEvents=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee22(){var _this13=this;var _a,appBuild,appVersion,isMemoryPersistence,properties,prevAppBuild,prevAppVersion,initialUrl,_t7,_t8,_t9;return _regenerator["default"].wrap(function(_context22){while(1)switch(_context22.prev=_context22.next){case 0:appBuild=this._appProperties.$app_build;appVersion=this._appProperties.$app_version;isMemoryPersistence=this._persistence==='memory';properties={};if(!isMemoryPersistence){prevAppBuild=this.getPersistedProperty(_core.PostHogPersistedProperty.InstalledAppBuild);prevAppVersion=this.getPersistedProperty(_core.PostHogPersistedProperty.InstalledAppVersion);if(!appBuild||!appVersion){this._logger.warn('PostHog could not track installation/update/open, as the build and version were not set. '+'This can happen if some dependencies are not installed correctly, or if you have provided'+'customAppProperties but not included $app_build or $app_version.');}if(appBuild){if(!prevAppBuild){this.capture('Application Installed',properties);}else if(prevAppBuild!==appBuild){this.capture('Application Updated',_objectSpread(_objectSpread(_objectSpread({},(0,_core.maybeAdd)('previous_version',prevAppVersion)),(0,_core.maybeAdd)('previous_build',prevAppBuild)),properties));}}}else{this._logger.warn('PostHog was initialised with persistence set to "memory", capturing native app events (Application Installed and Application Updated) is not supported.');}_context22.next=1;return _reactNative.Linking.getInitialURL();case 1:_t8=_a=_context22.sent;_t7=_t8!==null;if(!_t7){_context22.next=2;break;}_t7=_a!==void 0;case 2:if(!_t7){_context22.next=3;break;}_t9=_a;_context22.next=4;break;case 3:_t9=undefined;case 4:initialUrl=_t9;this.capture('Application Opened',_objectSpread(_objectSpread({},properties),(0,_core.maybeAdd)('url',initialUrl)));_reactNative.AppState.addEventListener('change',function(state){if(state==='active'){_this13.capture('Application Became Active');}else if(state==='background'){_this13.capture('Application Backgrounded');}});case 5:case"end":return _context22.stop();}},_callee22,this);}));function captureAppLifecycleEvents(){return _captureAppLifecycleEvents.apply(this,arguments);}return captureAppLifecycleEvents;}()},{key:"persistAppVersion",value:function(){var _persistAppVersion=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee23(){var appBuild,appVersion;return _regenerator["default"].wrap(function(_context23){while(1)switch(_context23.prev=_context23.next){case 0:appBuild=this._appProperties.$app_build;appVersion=this._appProperties.$app_version;this.setPersistedProperty(_core.PostHogPersistedProperty.InstalledAppBuild,appBuild);this.setPersistedProperty(_core.PostHogPersistedProperty.InstalledAppVersion,appVersion);case 1:case"end":return _context23.stop();}},_callee23,this);}));function persistAppVersion(){return _persistAppVersion.apply(this,arguments);}return persistAppVersion;}()}]);}(_core.PostHogCore);
1
+ "use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.PostHog=void 0;Object.defineProperty(exports,"PostHogPersistedProperty",{enumerable:true,get:function get(){return _core.PostHogPersistedProperty;}});var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _typeof2=_interopRequireDefault(require("@babel/runtime/helpers/typeof"));var _toConsumableArray2=_interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));var _defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf2=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var _get2=_interopRequireDefault(require("@babel/runtime/helpers/get"));var _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var _reactNative=require("react-native");var _core=require("@posthog/core");var _storage=require("./storage");var _logsDefaults=require("./logs-defaults");var _version=require("./version");var _nativeDeps=require("./native-deps");var _utils=require("./utils");var _wixNavigation=require("./frameworks/wix-navigation");var _OptionalPlugin=require("./optional/OptionalPlugin");var _errorTracking=require("./error-tracking");function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable;})),t.push.apply(t,o);}return t;}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach(function(r){(0,_defineProperty2["default"])(e,r,t[r]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));});}return e;}function _callSuper(t,o,e){return o=(0,_getPrototypeOf2["default"])(o),(0,_possibleConstructorReturn2["default"])(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],(0,_getPrototypeOf2["default"])(t).constructor):o.apply(t,e));}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _superPropGet(t,o,e,r){var p=(0,_get2["default"])((0,_getPrototypeOf2["default"])(1&r?t.prototype:t),o,e);return 2&r&&"function"==typeof p?function(t){return p.apply(e,t);}:p;}function mapAppStateForLogs(state){if(state==='background'){return'background';}if(!state||state==='unknown'){return undefined;}return'foreground';}var NATIVE_CALL_TIMEOUT_MS=10000;var PostHog=exports.PostHog=function(_PostHogCore){function PostHog(apiKey,options){var _this;(0,_classCallCheck2["default"])(this,PostHog);var _a,_b,_c,_d,_e,_f;var normalizedApiKey=typeof apiKey==='string'?apiKey.trim():'';if(!normalizedApiKey){console.error("You must pass your PostHog project's api key. The client will be disabled.");}_this=_callSuper(this,PostHog,[normalizedApiKey,options]);_this._appProperties={};_this._sessionReplayNativeInitialized=false;_this._nativeErrorTrackingInitialized=false;_this._pushNativeInitialized=false;_this._pushNativeUnsupported=false;_this._sessionReplayMacOSWarned=false;_this._sessionReplayEvalChain=Promise.resolve();_this._nativeChain=Promise.resolve();_this._sessionReplayEventTriggers=[];_this._surveysReadyPromise=null;_this._surveysReady=false;_this._requestHeaders={};_this._surveysReadyResolve=null;_this._isInitialized=false;_this._persistence=(_a=options===null||options===void 0?void 0:options.persistence)!==null&&_a!==void 0?_a:'file';_this._disableSurveys=(_b=options===null||options===void 0?void 0:options.disableSurveys)!==null&&_b!==void 0?_b:false;_this._errorTracking=new _errorTracking.ErrorTracking(_this,options===null||options===void 0?void 0:options.errorTracking,_this._logger);_this._setDefaultPersonProperties=(_c=options===null||options===void 0?void 0:options.setDefaultPersonProperties)!==null&&_c!==void 0?_c:true;_this._overrideDisplayLanguage=((_d=options===null||options===void 0?void 0:options.overrideDisplayLanguage)===null||_d===void 0?void 0:_d.trim())||null;_this._requestHeaders=(_e=options===null||options===void 0?void 0:options.requestHeaders)!==null&&_e!==void 0?_e:{};_this._appProperties=typeof(options===null||options===void 0?void 0:options.customAppProperties)==='function'?options.customAppProperties((0,_nativeDeps.getAppProperties)()):(options===null||options===void 0?void 0:options.customAppProperties)||(0,_nativeDeps.getAppProperties)();var storagePromise;var theStorage;if(_this._persistence==='file'){theStorage=(_f=options===null||options===void 0?void 0:options.customStorage)!==null&&_f!==void 0?_f:(0,_nativeDeps.buildOptimisticAsyncStorage)();}if(theStorage){_this._eventsStorage=(0,_storage.createEventsStorage)(theStorage);_this._logsStorage=(0,_storage.createLogsStorage)(theStorage);var preloads=[];if(_this._eventsStorage.preloadPromise){preloads.push(['events',_this._eventsStorage.preloadPromise]);}if(_this._logsStorage.preloadPromise){preloads.push(['logs',_this._logsStorage.preloadPromise]);}if(preloads.length>0){storagePromise=(0,_core.allSettled)(preloads.map(function(_ref){var _ref2=(0,_slicedToArray2["default"])(_ref,2),p=_ref2[1];return p;})).then(function(results){results.forEach(function(r,i){if(r.status==='rejected'){_this._logger.error("PostHog ".concat(preloads[i][0]," storage preload failed:"),r.reason);}});});}}else{_this._eventsStorage=(0,_storage.createEventsMemoryStorage)();_this._logsStorage=(0,_storage.createLogsMemoryStorage)();}_this._currentAppState=mapAppStateForLogs(_reactNative.AppState.currentState);_this._resolvedLogsConfig=(0,_logsDefaults.resolveLogsConfig)(options===null||options===void 0?void 0:options.logs);_this._logs=new _core.PostHogLogs(_this,_this._resolvedLogsConfig,_this._logger,function(){var _a;var flags=_this.getFeatureFlags();var flagKeys=flags?Object.keys(flags):undefined;return{distinctId:_this.getDistinctId()||undefined,sessionId:_this.getSessionId()||undefined,screenName:((_a=_this.sessionProps)===null||_a===void 0?void 0:_a.$screen_name)||undefined,appState:_this._currentAppState,activeFeatureFlags:flagKeys&&flagKeys.length>0?flagKeys:undefined};},function(fn){return _this.wrap(fn);},function(){return _this._logsStorage.waitForPersist();});_reactNative.AppState.addEventListener('change',function(state){if(state==='unknown'){return;}var mapped=mapAppStateForLogs(state);if(mapped){_this._currentAppState=mapped;}void _this.flush()["catch"](function(){var _ref3=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee(err){return _regenerator["default"].wrap(function(_context){while(1)switch(_context.prev=_context.next){case 0:_context.next=1;return(0,_core.logFlushError)(err);case 1:case"end":return _context.stop();}},_callee);}));return function(_x3){return _ref3.apply(this,arguments);};}());var isBackgrounding=mapped==='background';var logsFlushPromise=isBackgrounding?_this._logs.flushWithTimeout(_this._resolvedLogsConfig.backgroundFlushBudgetMs):_this._logs.flush();void logsFlushPromise["catch"](function(){var _ref4=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee2(err){return _regenerator["default"].wrap(function(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=1;return(0,_core.logFlushError)(err);case 1:case"end":return _context2.stop();}},_callee2);}));return function(_x4){return _ref4.apply(this,arguments);};}());void _this._eventsStorage.waitForPersist();void _this._logsStorage.waitForPersist();if(state==='active'){_this.getSessionId();}});var initAfterStorage=function initAfterStorage(){var enablePersistSessionIdAcrossRestart=options===null||options===void 0?void 0:options.enablePersistSessionIdAcrossRestart;if(!enablePersistSessionIdAcrossRestart){_this.setPersistedProperty(_core.PostHogPersistedProperty.SessionId,null);_this.setPersistedProperty(_core.PostHogPersistedProperty.SessionLastTimestamp,null);_this.setPersistedProperty(_core.PostHogPersistedProperty.SessionStartTimestamp,null);}_this.setupBootstrap(options);if(!_this.getPersistedProperty(_core.PostHogPersistedProperty.DeviceId)){var anonId=_this.getAnonymousId();if(anonId){_this.setPersistedProperty(_core.PostHogPersistedProperty.DeviceId,anonId);}}if(_this._setDefaultPersonProperties){_this._setDefaultPersonPropertiesForFlags(false);}_this._isInitialized=true;if(_this.isDisabled){return;}var cachedRemoteConfig=_this.getPersistedProperty(_core.PostHogPersistedProperty.RemoteConfig);if(cachedRemoteConfig){_this._errorTracking.onRemoteConfig(cachedRemoteConfig.errorTracking);}_this.reloadRemoteConfigAsync().then(function(response){if(response){_this._handleSurveysFromRemoteConfig(response);}})["catch"](function(error){_this._logger.error('Error loading remote config:',error);})["finally"](function(){_this._notifySurveysReady();});if((options===null||options===void 0?void 0:options.captureAppLifecycleEvents)!==false){void _this.captureAppLifecycleEvents();}void _this.persistAppVersion();void _this.startSessionReplay(options,cachedRemoteConfig!==null&&cachedRemoteConfig!==void 0?cachedRemoteConfig:undefined);if(options===null||options===void 0?void 0:options.enableSessionReplay){_this.onFeatureFlags(function(){void _this._evaluateAndStartSessionReplay();});}if((options===null||options===void 0?void 0:options.addTracingHeaders)&&options.addTracingHeaders.length>0){(0,_core.patchFetchForTracingHeaders)(_this,options.addTracingHeaders);}};if(storagePromise){_this._initPromise=storagePromise.then(initAfterStorage);}else{_this._initPromise=Promise.resolve();initAfterStorage();}return _this;}(0,_inherits2["default"])(PostHog,_PostHogCore);return(0,_createClass2["default"])(PostHog,[{key:"ready",value:(function(){var _ready=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee3(){return _regenerator["default"].wrap(function(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.next=1;return this._initPromise;case 1:case"end":return _context3.stop();}},_callee3,this);}));function ready(){return _ready.apply(this,arguments);}return ready;}())},{key:"onRemoteConfig",value:function onRemoteConfig(response){this._errorTracking.onRemoteConfig(response.errorTracking);}},{key:"_storageForKey",value:function _storageForKey(key){return key===_core.PostHogPersistedProperty.LogsQueue?this._logsStorage:this._eventsStorage;}},{key:"getPersistedProperty",value:function getPersistedProperty(key){return this._storageForKey(key).getItem(key);}},{key:"setPersistedProperty",value:function setPersistedProperty(key,value){var storage=this._storageForKey(key);value!==null?storage.setItem(key,value):storage.removeItem(key);if(key===_core.PostHogPersistedProperty.PersonProperties){this._events.emit('personProperties',value);}}},{key:"flushStorage",value:(function(){var _flushStorage=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee4(){return _regenerator["default"].wrap(function(_context4){while(1)switch(_context4.prev=_context4.next){case 0:_context4.next=1;return this._eventsStorage.waitForPersist();case 1:case"end":return _context4.stop();}},_callee4,this);}));function flushStorage(){return _flushStorage.apply(this,arguments);}return flushStorage;}())},{key:"_shutdown",value:(function(){var _shutdown2=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee5(){var shutdownTimeoutMs,start,logsBudgetMs,remainingMs,drain,_args5=arguments;return _regenerator["default"].wrap(function(_context5){while(1)switch(_context5.prev=_context5.next){case 0:shutdownTimeoutMs=_args5.length>0&&_args5[0]!==undefined?_args5[0]:30000;this._errorTracking.clearExceptionSteps();start=Date.now();logsBudgetMs=Math.min(shutdownTimeoutMs,this._resolvedLogsConfig.terminationFlushBudgetMs);_context5.prev=1;_context5.next=2;return Promise.all([this._logs.shutdown(logsBudgetMs),_superPropGet(PostHog,"_shutdown",this,3)([shutdownTimeoutMs])]);case 2:_context5.prev=2;remainingMs=Math.max(0,shutdownTimeoutMs-(Date.now()-start));drain=Promise.all([this._eventsStorage.waitForPersist(),this._logsStorage.waitForPersist()]);_context5.next=3;return(0,_core.raceWithTimeout)(drain,remainingMs);case 3:return _context5.finish(2);case 4:case"end":return _context5.stop();}},_callee5,this,[[1,,2,4]]);}));function _shutdown(){return _shutdown2.apply(this,arguments);}return _shutdown;}())},{key:"fetch",value:function(_fetch){function fetch(_x,_x2){return _fetch.apply(this,arguments);}fetch.toString=function(){return _fetch.toString();};return fetch;}(function(url,options){return fetch(url,options);})},{key:"getLibraryId",value:function getLibraryId(){return'posthog-react-native';}},{key:"getLibraryVersion",value:function getLibraryVersion(){return _version.version;}},{key:"getCustomUserAgent",value:function getCustomUserAgent(){if(_reactNative.Platform.OS==='web'){return'';}return"".concat(this.getLibraryId(),"/").concat(this.getLibraryVersion());}},{key:"getCustomHeaders",value:function getCustomHeaders(){return _objectSpread(_objectSpread({},_superPropGet(PostHog,"getCustomHeaders",this,3)([])),this._requestHeaders);}},{key:"getCommonEventProperties",value:function getCommonEventProperties(){return _objectSpread(_objectSpread(_objectSpread({},_superPropGet(PostHog,"getCommonEventProperties",this,3)([])),this._appProperties),{},{$screen_height:_reactNative.Dimensions.get('screen').height,$screen_width:_reactNative.Dimensions.get('screen').width});}},{key:"getSurveyDisplayLanguageOverride",value:function getSurveyDisplayLanguageOverride(){return this._overrideDisplayLanguage;}},{key:"register",value:function register(properties){return _superPropGet(PostHog,"register",this,3)([properties]);}},{key:"unregister",value:function unregister(property){return _superPropGet(PostHog,"unregister",this,3)([property]);}},{key:"reset",value:function reset(propertiesToKeep){var _this2=this;var effectivePropertiesToKeep=propertiesToKeep!==null&&propertiesToKeep!==void 0?propertiesToKeep:[_core.PostHogPersistedProperty.InstalledAppBuild,_core.PostHogPersistedProperty.InstalledAppVersion,_core.PostHogPersistedProperty.DeviceId];_superPropGet(PostHog,"reset",this,3)([[_core.PostHogPersistedProperty.RemoteConfig,_core.PostHogPersistedProperty.SessionReplay,_core.PostHogPersistedProperty.Surveys,_core.PostHogPersistedProperty.PushRegistered].concat((0,_toConsumableArray2["default"])(effectivePropertiesToKeep))]);if(this._setDefaultPersonProperties){this._setDefaultPersonPropertiesForFlags(false);}if(_OptionalPlugin.OptionalReactNativePlugin===null||_OptionalPlugin.OptionalReactNativePlugin===void 0?void 0:_OptionalPlugin.OptionalReactNativePlugin.reset){void this._enqueueNative('reset',function(plugin){var _a;return(_a=plugin.reset)===null||_a===void 0?void 0:_a.call(plugin,String(_this2.getDistinctId()),String(_this2.getAnonymousId()));},this.getPersistedProperty(_core.PostHogPersistedProperty.PushRegistered)===true);}this._propagateNativeOptOut();void this._eventsStorage.waitForPersist();}},{key:"_setDefaultPersonPropertiesForFlags",value:function _setDefaultPersonPropertiesForFlags(){var _this3=this;var reloadFeatureFlags=arguments.length>0&&arguments[0]!==undefined?arguments[0]:true;var defaultProps={};var relevantKeys=['$app_version','$app_build','$app_namespace','$os_name','$os_version','$device_type'];relevantKeys.forEach(function(key){var value=_this3._appProperties[key];if(value!==null&&value!==undefined){defaultProps[key]=value;}});var commonProps=this.getCommonEventProperties();if(commonProps.$lib){defaultProps.$lib=commonProps.$lib;}if(commonProps.$lib_version){defaultProps.$lib_version=commonProps.$lib_version;}if(Object.keys(defaultProps).length>0){this.setPersonPropertiesForFlags(defaultProps,reloadFeatureFlags);}}},{key:"flush",value:function flush(){return _superPropGet(PostHog,"flush",this,3)([]);}},{key:"captureLog",value:function captureLog(options){this._logs.captureLog(options);}},{key:"flushLogs",value:function flushLogs(){return this._logs.flush();}},{key:"logger",get:function get(){var _this4=this;if(!this._captureLogger){this._captureLogger={trace:function trace(body,attributes){return _this4.captureLog({body:body,level:'trace',attributes:attributes});},debug:function debug(body,attributes){return _this4.captureLog({body:body,level:'debug',attributes:attributes});},info:function info(body,attributes){return _this4.captureLog({body:body,level:'info',attributes:attributes});},warn:function warn(body,attributes){return _this4.captureLog({body:body,level:'warn',attributes:attributes});},error:function error(body,attributes){return _this4.captureLog({body:body,level:'error',attributes:attributes});},fatal:function fatal(body,attributes){return _this4.captureLog({body:body,level:'fatal',attributes:attributes});}};}return this._captureLogger;}},{key:"optIn",value:function optIn(){var result=_superPropGet(PostHog,"optIn",this,3)([]);void this._eventsStorage.waitForPersist();this._propagateNativeOptOut();return result;}},{key:"optOut",value:function optOut(){var result=_superPropGet(PostHog,"optOut",this,3)([]);void this._eventsStorage.waitForPersist();if(_OptionalPlugin.OptionalReactNativePlugin===null||_OptionalPlugin.OptionalReactNativePlugin===void 0?void 0:_OptionalPlugin.OptionalReactNativePlugin.unregisterPushNotificationToken){void this.unregisterPushNotificationToken();}this._propagateNativeOptOut();return result;}},{key:"_propagateNativeOptOut",value:function _propagateNativeOptOut(){var _this5=this;if(!(_OptionalPlugin.OptionalReactNativePlugin===null||_OptionalPlugin.OptionalReactNativePlugin===void 0?void 0:_OptionalPlugin.OptionalReactNativePlugin.setOptOut)){return;}void this._enqueueNative('setOptOut',function(plugin){var _a;return(_a=plugin.setOptOut)===null||_a===void 0?void 0:_a.call(plugin,_this5.optedOut);});if(this._isPushNativeEnabled(this._sessionReplayOptions)){void this._ensureNativeInitialized();}}},{key:"isFeatureEnabled",value:function isFeatureEnabled(key,options){return _superPropGet(PostHog,"isFeatureEnabled",this,3)([key,options]);}},{key:"getFeatureFlag",value:function getFeatureFlag(key,options){return _superPropGet(PostHog,"getFeatureFlag",this,3)([key,options]);}},{key:"getFeatureFlagPayload",value:function getFeatureFlagPayload(key){return _superPropGet(PostHog,"getFeatureFlagPayload",this,3)([key]);}},{key:"reloadFeatureFlags",value:function reloadFeatureFlags(){_superPropGet(PostHog,"reloadFeatureFlags",this,3)([]);}},{key:"reloadFeatureFlagsAsync",value:function reloadFeatureFlagsAsync(){return _superPropGet(PostHog,"reloadFeatureFlagsAsync",this,3)([]);}},{key:"updateFlags",value:function updateFlags(flags,payloads,options){_superPropGet(PostHog,"updateFlags",this,3)([flags,payloads,options]);}},{key:"group",value:function group(groupType,groupKey,properties){_superPropGet(PostHog,"group",this,3)([groupType,groupKey,properties]);if(properties&&Object.keys(properties).length>0){var propsToCache={};Object.keys(properties).forEach(function(key){var value=properties[key];if(value!==null&&value!==undefined){propsToCache[key]=value;}});if(Object.keys(propsToCache).length>0){this.setGroupPropertiesForFlags((0,_defineProperty2["default"])({},groupType,propsToCache));}}}},{key:"alias",value:function alias(_alias){_superPropGet(PostHog,"alias",this,3)([_alias]);}},{key:"getDistinctId",value:function getDistinctId(){return _superPropGet(PostHog,"getDistinctId",this,3)([]);}},{key:"getDeviceId",value:function getDeviceId(){var deviceId=this.getPersistedProperty(_core.PostHogPersistedProperty.DeviceId);if(!deviceId){var anonId=this.getAnonymousId();if(anonId){this.setPersistedProperty(_core.PostHogPersistedProperty.DeviceId,anonId);return anonId;}return'';}return deviceId;}},{key:"setPersonPropertiesForFlags",value:function setPersonPropertiesForFlags(properties){var reloadFeatureFlags=arguments.length>1&&arguments[1]!==undefined?arguments[1]:true;_superPropGet(PostHog,"setPersonPropertiesForFlags",this,3)([properties,reloadFeatureFlags]);}},{key:"resetPersonPropertiesForFlags",value:function resetPersonPropertiesForFlags(){var reloadFeatureFlags=arguments.length>0&&arguments[0]!==undefined?arguments[0]:true;_superPropGet(PostHog,"resetPersonPropertiesForFlags",this,3)([]);if(reloadFeatureFlags){this.reloadFeatureFlags();}}},{key:"setGroupPropertiesForFlags",value:function setGroupPropertiesForFlags(properties){var reloadFeatureFlags=arguments.length>1&&arguments[1]!==undefined?arguments[1]:true;_superPropGet(PostHog,"setGroupPropertiesForFlags",this,3)([properties]);if(reloadFeatureFlags){this.reloadFeatureFlags();}}},{key:"resetGroupPropertiesForFlags",value:function resetGroupPropertiesForFlags(){var reloadFeatureFlags=arguments.length>0&&arguments[0]!==undefined?arguments[0]:true;_superPropGet(PostHog,"resetGroupPropertiesForFlags",this,3)([]);if(reloadFeatureFlags){this.reloadFeatureFlags();}}},{key:"screen",value:(function(){var _screen=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee6(name,properties,options){return _regenerator["default"].wrap(function(_context6){while(1)switch(_context6.prev=_context6.next){case 0:_context6.next=1;return this._initPromise;case 1:this.registerForSession({$screen_name:name});return _context6.abrupt("return",this.capture('$screen',_objectSpread(_objectSpread({},properties),{},{$screen_name:name}),options));case 2:case"end":return _context6.stop();}},_callee6,this);}));function screen(_x5,_x6,_x7){return _screen.apply(this,arguments);}return screen;}())},{key:"_isEnableSessionReplay",value:function _isEnableSessionReplay(){var _a;return!this.isDisabled&&!(0,_utils.isMacOS)()&&((_a=this._enableSessionReplay)!==null&&_a!==void 0?_a:false);}},{key:"_resetSessionId",value:function _resetSessionId(reactNativeSessionReplay,sessionId){if(reactNativeSessionReplay){reactNativeSessionReplay.endSession();reactNativeSessionReplay.startSession(sessionId);}}},{key:"getSessionId",value:function getSessionId(){var sessionId=_superPropGet(PostHog,"getSessionId",this,3)([]);if(!this._isEnableSessionReplay()&&!this._isNativePluginInitialized()){return sessionId;}if(sessionId.length>0&&this._currentSessionId&&sessionId!==this._currentSessionId){if(_OptionalPlugin.OptionalReactNativePlugin){try{this._resetSessionId(_OptionalPlugin.OptionalReactNativePlugin,String(sessionId));this._logger.info("sessionId rotated from ".concat(this._currentSessionId," to ").concat(sessionId,"."));}catch(e){this._logger.error("Failed to rotate sessionId: ".concat(e,"."));}}this._currentSessionId=sessionId;if(this._sessionReplayEventTriggers.length>0){void this._evaluateAndStartSessionReplay();}}else{this._logger.info("sessionId not rotated, sessionId ".concat(sessionId," and currentSessionId ").concat(this._currentSessionId,"."));}return sessionId;}},{key:"resetSessionId",value:function resetSessionId(){_superPropGet(PostHog,"resetSessionId",this,3)([]);if((this._isEnableSessionReplay()||this._isNativePluginInitialized())&&_OptionalPlugin.OptionalReactNativePlugin){try{_OptionalPlugin.OptionalReactNativePlugin.endSession();this._logger.info("Native PostHog session ended.");}catch(e){this._logger.error("Native PostHog session failed to end: ".concat(e,"."));}}}},{key:"startSessionRecording",value:(function(){var _startSessionRecording2=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee8(){var _this6=this;var resumeCurrent,_args8=arguments;return _regenerator["default"].wrap(function(_context8){while(1)switch(_context8.prev=_context8.next){case 0:resumeCurrent=_args8.length>0&&_args8[0]!==undefined?_args8[0]:true;this._sessionReplayEvalChain=this._sessionReplayEvalChain["catch"](function(){}).then((0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee7(){return _regenerator["default"].wrap(function(_context7){while(1)switch(_context7.prev=_context7.next){case 0:_context7.next=1;return _this6._startSessionRecording(resumeCurrent);case 1:case"end":return _context7.stop();}},_callee7);})));_context8.next=1;return this._sessionReplayEvalChain;case 1:case"end":return _context8.stop();}},_callee8,this);}));function startSessionRecording(){return _startSessionRecording2.apply(this,arguments);}return startSessionRecording;}())},{key:"_startSessionRecording",value:function(){var _startSessionRecording3=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee9(resumeCurrent){var initialized,newSessionId,_t;return _regenerator["default"].wrap(function(_context9){while(1)switch(_context9.prev=_context9.next){case 0:_context9.next=1;return this._initPromise;case 1:if(!this.isDisabled){_context9.next=2;break;}return _context9.abrupt("return",false);case 2:if(_OptionalPlugin.OptionalReactNativePlugin){_context9.next=3;break;}return _context9.abrupt("return",false);case 3:_context9.prev=3;if(_OptionalPlugin.OptionalReactNativePlugin.startRecording){_context9.next=4;break;}this._logger.warn('startRecording is not available. Please update @posthog/react-native-plugin or posthog-react-native-session-replay.');return _context9.abrupt("return",false);case 4:if(this._sessionReplayNativeInitialized){_context9.next=6;break;}this._logger.info('Native session replay SDK not initialized, initializing now...');_context9.next=5;return this.initializeNativePlugin(this._sessionReplayOptions,undefined,true);case 5:initialized=_context9.sent;if(initialized){_context9.next=6;break;}this._logger.error('Failed to initialize native session replay SDK.');return _context9.abrupt("return",false);case 6:if(!resumeCurrent){_superPropGet(PostHog,"resetSessionId",this,3)([]);newSessionId=_superPropGet(PostHog,"getSessionId",this,3)([]);this._resetSessionId(_OptionalPlugin.OptionalReactNativePlugin,String(newSessionId));this._currentSessionId=newSessionId;}_context9.next=7;return _OptionalPlugin.OptionalReactNativePlugin.startRecording(resumeCurrent);case 7:this._logger.info("Session recording ".concat(resumeCurrent?'resumed':'started',"."));return _context9.abrupt("return",true);case 8:_context9.prev=8;_t=_context9["catch"](3);this._logger.error("Failed to start session recording: ".concat(_t));return _context9.abrupt("return",false);case 9:case"end":return _context9.stop();}},_callee9,this,[[3,8]]);}));function _startSessionRecording(_x8){return _startSessionRecording3.apply(this,arguments);}return _startSessionRecording;}()},{key:"stopSessionRecording",value:(function(){var _stopSessionRecording2=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee0(){return _regenerator["default"].wrap(function(_context0){while(1)switch(_context0.prev=_context0.next){case 0:_context0.next=1;return this._stopSessionRecording();case 1:case"end":return _context0.stop();}},_callee0,this);}));function stopSessionRecording(){return _stopSessionRecording2.apply(this,arguments);}return stopSessionRecording;}())},{key:"_stopSessionRecording",value:function(){var _stopSessionRecording3=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee1(){var _t2;return _regenerator["default"].wrap(function(_context1){while(1)switch(_context1.prev=_context1.next){case 0:_context1.next=1;return this._initPromise;case 1:if(!this.isDisabled){_context1.next=2;break;}return _context1.abrupt("return",false);case 2:if(_OptionalPlugin.OptionalReactNativePlugin){_context1.next=3;break;}return _context1.abrupt("return",false);case 3:_context1.prev=3;if(_OptionalPlugin.OptionalReactNativePlugin.stopRecording){_context1.next=4;break;}this._logger.warn('stopRecording is not available. Please update @posthog/react-native-plugin or posthog-react-native-session-replay.');return _context1.abrupt("return",false);case 4:_context1.next=5;return _OptionalPlugin.OptionalReactNativePlugin.stopRecording();case 5:this._logger.info('Session recording stopped.');return _context1.abrupt("return",true);case 6:_context1.prev=6;_t2=_context1["catch"](3);this._logger.error("Failed to stop session recording: ".concat(_t2));return _context1.abrupt("return",false);case 7:case"end":return _context1.stop();}},_callee1,this,[[3,6]]);}));function _stopSessionRecording(){return _stopSessionRecording3.apply(this,arguments);}return _stopSessionRecording;}()},{key:"isSessionReplayActive",value:(function(){var _isSessionReplayActive=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee10(){var _t3;return _regenerator["default"].wrap(function(_context10){while(1)switch(_context10.prev=_context10.next){case 0:_context10.next=1;return this._initPromise;case 1:if(!this.isDisabled){_context10.next=2;break;}return _context10.abrupt("return",false);case 2:if(_OptionalPlugin.OptionalReactNativePlugin){_context10.next=3;break;}return _context10.abrupt("return",false);case 3:_context10.prev=3;_context10.next=4;return _OptionalPlugin.OptionalReactNativePlugin.isEnabled();case 4:return _context10.abrupt("return",_context10.sent);case 5:_context10.prev=5;_t3=_context10["catch"](3);this._logger.error("Failed to check session replay status: ".concat(_t3));return _context10.abrupt("return",false);case 6:case"end":return _context10.stop();}},_callee10,this,[[3,5]]);}));function isSessionReplayActive(){return _isSessionReplayActive.apply(this,arguments);}return isSessionReplayActive;}())},{key:"identify",value:function identify(distinctId,properties,options){var _this7=this;var previousDistinctId=this.getDistinctId();var userProps=(properties===null||properties===void 0?void 0:properties.$set)||properties;var userPropsOnce=properties===null||properties===void 0?void 0:properties.$set_once;_superPropGet(PostHog,"identify",this,3)([distinctId,properties,options]);var propsToCache={};if(userProps&&(0,_typeof2["default"])(userProps)==='object'&&!Array.isArray(userProps)){Object.entries(userProps).forEach(function(_ref6){var _ref7=(0,_slicedToArray2["default"])(_ref6,2),key=_ref7[0],value=_ref7[1];if(value!==null&&value!==undefined){propsToCache[key]=value;}});}var propsOnceToCache={};if(userPropsOnce&&(0,_typeof2["default"])(userPropsOnce)==='object'&&!Array.isArray(userPropsOnce)){Object.entries(userPropsOnce).forEach(function(_ref8){var _ref9=(0,_slicedToArray2["default"])(_ref8,2),key=_ref9[0],value=_ref9[1];if(value!==null&&value!==undefined){propsOnceToCache[key]=value;}});}if(Object.keys(propsToCache).length>0||Object.keys(propsOnceToCache).length>0){this.setPersonPropertiesForFlags(_objectSpread({$set:propsToCache},Object.keys(propsOnceToCache).length>0?{$set_once:propsOnceToCache}:{}),false);}if(_OptionalPlugin.OptionalReactNativePlugin){void this._enqueueNative('identify',function(plugin){var nativeDistinctId=String(_this7.getDistinctId()||previousDistinctId);var anonymousId=String(_this7.getAnonymousId());var identified=plugin.identify(nativeDistinctId,anonymousId);_this7._logger.info("Native PostHog identified with distinctId ".concat(nativeDistinctId," and anonymousId ").concat(anonymousId,"."));return identified;});}void this._eventsStorage.waitForPersist();}},{key:"captureException",value:function captureException(error){var additionalProperties=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var hint=arguments.length>2?arguments[2]:undefined;var resolvedHint=hint!==null&&hint!==void 0?hint:{mechanism:{handled:true,type:'generic'},syntheticException:new Error('Synthetic Error')};additionalProperties=this._errorTracking.attachExceptionSteps(additionalProperties);_superPropGet(PostHog,"captureException",this,3)([error,additionalProperties,resolvedHint]);if((additionalProperties===null||additionalProperties===void 0?void 0:additionalProperties.$exception_level)==='fatal'){void this._eventsStorage.waitForPersist();void this._logsStorage.waitForPersist();}}},{key:"addExceptionStep",value:function addExceptionStep(message,properties){this._errorTracking.addExceptionStep(message,properties);}},{key:"createErrorPropertiesBuilder",value:function createErrorPropertiesBuilder(){return new _core.ErrorTracking.ErrorPropertiesBuilder([new _core.ErrorTracking.PromiseRejectionEventCoercer(),new _core.ErrorTracking.ErrorCoercer(),new _core.ErrorTracking.ErrorEventCoercer(),new _core.ErrorTracking.ObjectCoercer(),new _core.ErrorTracking.StringCoercer(),new _core.ErrorTracking.PrimitiveCoercer()],_core.ErrorTracking.createStackParser((0,_utils.isHermes)()?'hermes':'web:javascript',_core.ErrorTracking.chromeStackLineParser,_core.ErrorTracking.geckoStackLineParser));}},{key:"initReactNativeNavigation",value:function initReactNativeNavigation(options){return(0,_wixNavigation.withReactNativeNavigation)(this,options);}},{key:"createPersonProfile",value:function createPersonProfile(){_superPropGet(PostHog,"createPersonProfile",this,3)([]);}},{key:"setPersonProperties",value:function setPersonProperties(userPropertiesToSet,userPropertiesToSetOnce){var reloadFeatureFlags=arguments.length>2&&arguments[2]!==undefined?arguments[2]:true;_superPropGet(PostHog,"setPersonProperties",this,3)([userPropertiesToSet,userPropertiesToSetOnce,reloadFeatureFlags]);}},{key:"unsetPersonProperties",value:function unsetPersonProperties(propertyNames){var reloadFeatureFlags=arguments.length>1&&arguments[1]!==undefined?arguments[1]:true;_superPropGet(PostHog,"unsetPersonProperties",this,3)([propertyNames,reloadFeatureFlags]);}},{key:"getSurveys",value:function(){var _getSurveys=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee11(){var surveys;return _regenerator["default"].wrap(function(_context11){while(1)switch(_context11.prev=_context11.next){case 0:if(!(this._disableSurveys===true)){_context11.next=1;break;}this._logger.info('Loading surveys is disabled.');this._cacheSurveys(null,'disabled in config');return _context11.abrupt("return",[]);case 1:surveys=this.getPersistedProperty(_core.PostHogPersistedProperty.Surveys);if(!(surveys&&surveys.length>0)){_context11.next=2;break;}this._logger.info('Surveys fetched from storage: ',JSON.stringify(surveys));return _context11.abrupt("return",surveys);case 2:this._logger.info('No surveys found in storage');return _context11.abrupt("return",[]);case 3:case"end":return _context11.stop();}},_callee11,this);}));function getSurveys(){return _getSurveys.apply(this,arguments);}return getSurveys;}()},{key:"_onSurveysReady",value:function _onSurveysReady(){var _this8=this;if(this._surveysReady){return Promise.resolve();}if(!this._surveysReadyPromise){this._surveysReadyPromise=new Promise(function(resolve){_this8._surveysReadyResolve=resolve;});}return this._surveysReadyPromise;}},{key:"_cacheSurveys",value:function _cacheSurveys(surveys,source){this.setPersistedProperty(_core.PostHogPersistedProperty.Surveys,surveys);if(surveys&&surveys.length>0){this._logger.info("Surveys cached from ".concat(source,":"),JSON.stringify(surveys));}else if(surveys===null){this._logger.info("Surveys cleared (".concat(source,")"));}else{this._logger.info("No surveys to cache from ".concat(source,")"));}}},{key:"_notifySurveysReady",value:function _notifySurveysReady(){this._surveysReady=true;if(this._surveysReadyResolve){this._surveysReadyResolve();this._surveysReadyResolve=null;this._surveysReadyPromise=null;}}},{key:"_handleSurveysFromRemoteConfig",value:function _handleSurveysFromRemoteConfig(response){if(this._disableSurveys===true){this._logger.info('Loading surveys skipped, disabled.');this._cacheSurveys(null,'remote config (disabled)');return;}var surveys=response.surveys;if(Array.isArray(surveys)&&surveys.length>0){this._cacheSurveys(surveys,'remote config');}else{this._cacheSurveys(null,'remote config');}}},{key:"registerPushNotificationToken",value:(function(){var _registerPushNotificationToken=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee12(deviceToken,options){var _this9=this;return _regenerator["default"].wrap(function(_context12){while(1)switch(_context12.prev=_context12.next){case 0:return _context12.abrupt("return",this._callPushPlugin('registerPushNotificationToken',{allowMacOS:false,requireInit:true,noop:'token not registered'},function(plugin){var _a,_b;_this9.setPersistedProperty(_core.PostHogPersistedProperty.PushRegistered,true);return(_a=plugin.registerPushNotificationToken)===null||_a===void 0?void 0:_a.call(plugin,deviceToken,(_b=options===null||options===void 0?void 0:options.appId)!==null&&_b!==void 0?_b:null);}));case 1:case"end":return _context12.stop();}},_callee12,this);}));function registerPushNotificationToken(_x9,_x0){return _registerPushNotificationToken.apply(this,arguments);}return registerPushNotificationToken;}())},{key:"unregisterPushNotificationToken",value:(function(){var _unregisterPushNotificationToken=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee13(){var _this0=this;return _regenerator["default"].wrap(function(_context13){while(1)switch(_context13.prev=_context13.next){case 0:return _context13.abrupt("return",this._callPushPlugin('unregisterPushNotificationToken',{allowMacOS:false,allowWhenOptedOut:true,requireInit:this.getPersistedProperty(_core.PostHogPersistedProperty.PushRegistered)===true,noop:'nothing to unregister'},function(plugin){var _a;_this0.setPersistedProperty(_core.PostHogPersistedProperty.PushRegistered,null);return(_a=plugin.unregisterPushNotificationToken)===null||_a===void 0?void 0:_a.call(plugin);}));case 1:case"end":return _context13.stop();}},_callee13,this);}));function unregisterPushNotificationToken(){return _unregisterPushNotificationToken.apply(this,arguments);}return unregisterPushNotificationToken;}())},{key:"capturePushNotificationOpened",value:(function(){var _capturePushNotificationOpened=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee14(options){var properties,_i,_arr,key;return _regenerator["default"].wrap(function(_context14){while(1)switch(_context14.prev=_context14.next){case 0:properties={};for(_i=0,_arr=['title','subtitle','body','payload','action'];_i<_arr.length;_i++){key=_arr[_i];if(options[key]!==undefined){properties[key]=options[key];}}return _context14.abrupt("return",this._callPushPlugin('capturePushNotificationOpened',{allowMacOS:true,requireInit:true,noop:'event not captured'},function(plugin){var _a;return(_a=plugin.capturePushNotificationOpened)===null||_a===void 0?void 0:_a.call(plugin,properties);}));case 1:case"end":return _context14.stop();}},_callee14,this);}));function capturePushNotificationOpened(_x1){return _capturePushNotificationOpened.apply(this,arguments);}return capturePushNotificationOpened;}())},{key:"_callPushPlugin",value:function(){var _callPushPlugin2=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee15(method,behavior,invoke){var _this1=this;return _regenerator["default"].wrap(function(_context15){while(1)switch(_context15.prev=_context15.next){case 0:if(!this.isDisabled){_context15.next=1;break;}return _context15.abrupt("return");case 1:if(!(this.optedOut&&!behavior.allowWhenOptedOut)){_context15.next=2;break;}this._logger.warn("".concat(method," skipped: the user is opted out; ").concat(behavior.noop,"."));return _context15.abrupt("return");case 2:if(!((0,_utils.isWeb)()||!behavior.allowMacOS&&(0,_utils.isMacOS)())){_context15.next=3;break;}this._logger.warn("".concat(method," is not supported on ").concat((0,_utils.isWeb)()?'web':'macOS',"; ").concat(behavior.noop,"."));return _context15.abrupt("return");case 3:if(_OptionalPlugin.OptionalReactNativePlugin===null||_OptionalPlugin.OptionalReactNativePlugin===void 0?void 0:_OptionalPlugin.OptionalReactNativePlugin[method]){_context15.next=4;break;}this._logger.warn("".concat(method," requires @posthog/react-native-plugin; install or update it."));return _context15.abrupt("return");case 4:return _context15.abrupt("return",this._enqueueNative(method,function(plugin){if(_this1.optedOut&&!behavior.allowWhenOptedOut){_this1._logger.warn("".concat(method," skipped: the user is opted out; ").concat(behavior.noop,"."));return;}return invoke(plugin);},behavior.requireInit));case 5:case"end":return _context15.stop();}},_callee15,this);}));function _callPushPlugin(_x10,_x11,_x12){return _callPushPlugin2.apply(this,arguments);}return _callPushPlugin;}()},{key:"_enqueueNative",value:function _enqueueNative(label,run){var _this10=this;var requireInit=arguments.length>2&&arguments[2]!==undefined?arguments[2]:false;var next=this._nativeChain["catch"](function(){}).then((0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee16(){return _regenerator["default"].wrap(function(_context16){while(1)switch(_context16.prev=_context16.next){case 0:if(!(_this10.isDisabled||(0,_utils.isWeb)()||!_OptionalPlugin.OptionalReactNativePlugin)){_context16.next=1;break;}return _context16.abrupt("return");case 1:_context16.next=2;return _this10._initPromise["catch"](function(){});case 2:_context16.next=3;return _this10._sessionReplayEvalChain["catch"](function(){});case 3:if(_this10._isNativePluginInitialized()){_context16.next=6;break;}if(requireInit){_context16.next=4;break;}return _context16.abrupt("return");case 4:_context16.next=5;return _this10._ensureNativeInitialized();case 5:if(_this10._isNativePluginInitialized()){_context16.next=6;break;}_this10._logger.warn("".concat(label," skipped: the native plugin is not initialized."));return _context16.abrupt("return");case 6:_context16.next=7;return(0,_core.raceWithTimeout)(Promise.resolve(run(_OptionalPlugin.OptionalReactNativePlugin)),NATIVE_CALL_TIMEOUT_MS,function(){return _this10._logger.warn("Native PostHog ".concat(label," timed out after ").concat(NATIVE_CALL_TIMEOUT_MS,"ms; continuing."));});case 7:case"end":return _context16.stop();}},_callee16);})))["catch"](function(e){return _this10._logger.warn("Native PostHog ".concat(label," failed: ").concat(e,"."));});this._nativeChain=next;return next;}},{key:"_ensureNativeInitialized",value:function _ensureNativeInitialized(){var _this11=this;this._sessionReplayEvalChain=this._sessionReplayEvalChain["catch"](function(){}).then((0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee17(){return _regenerator["default"].wrap(function(_context17){while(1)switch(_context17.prev=_context17.next){case 0:if(_this11._isNativePluginInitialized()){_context17.next=1;break;}_context17.next=1;return _this11.initializeNativePlugin(_this11._sessionReplayOptions,undefined,false,true);case 1:case"end":return _context17.stop();}},_callee17);})));return this._sessionReplayEvalChain;}},{key:"_isAutocaptureNativeErrors",value:function _isAutocaptureNativeErrors(options){var _a;var autocapture=(_a=options===null||options===void 0?void 0:options.errorTracking)===null||_a===void 0?void 0:_a.autocapture;var nativeCrashes=(0,_typeof2["default"])(autocapture)==='object'&&autocapture.nativeCrashes===true;return!this.isDisabled&&nativeCrashes;}},{key:"_isNativePluginInitialized",value:function _isNativePluginInitialized(){return this._sessionReplayNativeInitialized||this._nativeErrorTrackingInitialized||this._pushNativeInitialized;}},{key:"_isPushNativeEnabled",value:function _isPushNativeEnabled(options){var force=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;if(this.isDisabled||this.optedOut||(0,_utils.isWeb)()||this._pushNativeUnsupported){return false;}return force||(options===null||options===void 0?void 0:options.capturePushNotificationSubscriptions)!==false||(options===null||options===void 0?void 0:options.capturePushNotificationOpened)!==false||!!(options===null||options===void 0?void 0:options.pushIdentityProvider);}},{key:"initializeSessionReplayNative",value:(function(){var _initializeSessionReplayNative=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee18(options,cachedRemoteConfig){return _regenerator["default"].wrap(function(_context18){while(1)switch(_context18.prev=_context18.next){case 0:return _context18.abrupt("return",this.initializeNativePlugin(options,cachedRemoteConfig,true));case 1:case"end":return _context18.stop();}},_callee18,this);}));function initializeSessionReplayNative(_x13,_x14){return _initializeSessionReplayNative.apply(this,arguments);}return initializeSessionReplayNative;}())},{key:"initializeNativePlugin",value:function(){var _initializeNativePlugin=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee19(options,cachedRemoteConfig){var enableSessionReplay,forcePush,_a,_b,_c,_d,_e,_f,_g,_h,_j,enableNativeErrorTracking,enablePush,sessionId,defaultThrottleDelayMs,_ref10,_ref10$maskAllTextInp,maskAllTextInputs,_ref10$maskAllImages,maskAllImages,_ref10$maskAllSandbox,maskAllSandboxedViews,_ref10$captureLog,localCaptureLog,_ref10$captureNetwork,localCaptureNetworkTelemetry,_ref10$verifyScreensh,verifyScreenshotMaskAlignment,_ref10$screenshotMode,screenshotModeBackgroundCapture,localSampleRate,_ref10$iOSdebouncerDe,iOSdebouncerDelayMs,_ref10$androidDebounc,androidDebouncerDelayMs,throttleDelayMs,remoteConsoleLogEnabled,remoteNetworkTimingEnabled,remoteSampleRateRaw,captureLog,captureNetworkTelemetry,localSampleRateValid,remoteSampleRateValid,sampleRate,source,sdkReplayConfig,sessionReplay,cachedSessionReplayConfig,pushOnlyInit,sdkOptions,loggableSdkOptions,wasSessionReplayEnabled,pushIdentityProviderEnabled,pluginConfig,_args19=arguments,_t4,_t5;return _regenerator["default"].wrap(function(_context19){while(1)switch(_context19.prev=_context19.next){case 0:enableSessionReplay=_args19.length>2&&_args19[2]!==undefined?_args19[2]:this._isEnableSessionReplay();forcePush=_args19.length>3&&_args19[3]!==undefined?_args19[3]:false;enableNativeErrorTracking=this._isAutocaptureNativeErrors(options);enablePush=this._isPushNativeEnabled(options,forcePush);if(enableSessionReplay&&(0,_utils.isMacOS)()){if(!this._sessionReplayMacOSWarned){this._sessionReplayMacOSWarned=true;this._logger.warn('Session replay is not supported on macOS; ignoring.');}enableSessionReplay=false;}if(!(!enableSessionReplay&&!enableNativeErrorTracking&&!enablePush)){_context19.next=1;break;}return _context19.abrupt("return",true);case 1:if(_OptionalPlugin.OptionalReactNativePlugin){_context19.next=2;break;}if(enableSessionReplay||enableNativeErrorTracking){this._logger.warn(enableSessionReplay?'Session replay enabled but not installed.':'Native error tracking enabled but not installed.');}this._pushNativeUnsupported=true;return _context19.abrupt("return",false);case 2:if(!((!enableSessionReplay||this._sessionReplayNativeInitialized)&&(!enableNativeErrorTracking||this._nativeErrorTrackingInitialized)&&(!enablePush||this._pushNativeInitialized))){_context19.next=3;break;}return _context19.abrupt("return",true);case 3:if(!(this._isNativePluginInitialized()&&enableSessionReplay&&!this._sessionReplayNativeInitialized)){_context19.next=5;break;}this._sessionReplayNativeInitialized=true;_context19.next=4;return(_a=_OptionalPlugin.OptionalReactNativePlugin.startRecording)===null||_a===void 0?void 0:_a.call(_OptionalPlugin.OptionalReactNativePlugin,true);case 4:return _context19.abrupt("return",true);case 5:sessionId=this.getSessionId();if(!(sessionId.length===0)){_context19.next=6;break;}this._logger.warn("Native PostHog plugin enabled but no sessionId found.");return _context19.abrupt("return",false);case 6:defaultThrottleDelayMs=1000;_ref10=(_b=options===null||options===void 0?void 0:options.sessionReplayConfig)!==null&&_b!==void 0?_b:{},_ref10$maskAllTextInp=_ref10.maskAllTextInputs,maskAllTextInputs=_ref10$maskAllTextInp===void 0?true:_ref10$maskAllTextInp,_ref10$maskAllImages=_ref10.maskAllImages,maskAllImages=_ref10$maskAllImages===void 0?true:_ref10$maskAllImages,_ref10$maskAllSandbox=_ref10.maskAllSandboxedViews,maskAllSandboxedViews=_ref10$maskAllSandbox===void 0?true:_ref10$maskAllSandbox,_ref10$captureLog=_ref10.captureLog,localCaptureLog=_ref10$captureLog===void 0?true:_ref10$captureLog,_ref10$captureNetwork=_ref10.captureNetworkTelemetry,localCaptureNetworkTelemetry=_ref10$captureNetwork===void 0?true:_ref10$captureNetwork,_ref10$verifyScreensh=_ref10.verifyScreenshotMaskAlignment,verifyScreenshotMaskAlignment=_ref10$verifyScreensh===void 0?false:_ref10$verifyScreensh,_ref10$screenshotMode=_ref10.screenshotModeBackgroundCapture,screenshotModeBackgroundCapture=_ref10$screenshotMode===void 0?false:_ref10$screenshotMode,localSampleRate=_ref10.sampleRate,_ref10$iOSdebouncerDe=_ref10.iOSdebouncerDelayMs,iOSdebouncerDelayMs=_ref10$iOSdebouncerDe===void 0?defaultThrottleDelayMs:_ref10$iOSdebouncerDe,_ref10$androidDebounc=_ref10.androidDebouncerDelayMs,androidDebouncerDelayMs=_ref10$androidDebounc===void 0?defaultThrottleDelayMs:_ref10$androidDebounc;throttleDelayMs=(_d=(_c=options===null||options===void 0?void 0:options.sessionReplayConfig)===null||_c===void 0?void 0:_c.throttleDelayMs)!==null&&_d!==void 0?_d:defaultThrottleDelayMs;if(throttleDelayMs===defaultThrottleDelayMs&&(iOSdebouncerDelayMs!==defaultThrottleDelayMs||androidDebouncerDelayMs!==defaultThrottleDelayMs)){throttleDelayMs=Math.max(iOSdebouncerDelayMs,androidDebouncerDelayMs);}remoteConsoleLogEnabled=(0,_utils.getRemoteConfigBool)(cachedRemoteConfig===null||cachedRemoteConfig===void 0?void 0:cachedRemoteConfig.sessionRecording,'consoleLogRecordingEnabled',true);remoteNetworkTimingEnabled=(0,_utils.getRemoteConfigBool)(cachedRemoteConfig===null||cachedRemoteConfig===void 0?void 0:cachedRemoteConfig.capturePerformance,'network_timing',true);remoteSampleRateRaw=(0,_utils.getRemoteConfigNumber)(cachedRemoteConfig===null||cachedRemoteConfig===void 0?void 0:cachedRemoteConfig.sessionRecording,'sampleRate');captureLog=localCaptureLog&&remoteConsoleLogEnabled;captureNetworkTelemetry=localCaptureNetworkTelemetry&&remoteNetworkTimingEnabled;localSampleRateValid=localSampleRate===undefined?undefined:(0,_utils.isValidSampleRate)(localSampleRate)?localSampleRate:undefined;remoteSampleRateValid=remoteSampleRateRaw===undefined?undefined:(0,_utils.isValidSampleRate)(remoteSampleRateRaw)?remoteSampleRateRaw:undefined;sampleRate=localSampleRateValid!==null&&localSampleRateValid!==void 0?localSampleRateValid:remoteSampleRateValid;if(localCaptureLog&&!remoteConsoleLogEnabled){this._logger.info('captureLog disabled by remote config (consoleLogRecordingEnabled=false).');}if(localCaptureNetworkTelemetry&&!remoteNetworkTimingEnabled){this._logger.info('captureNetworkTelemetry disabled by remote config (capturePerformance.network_timing=false).');}if(localSampleRate!==undefined&&localSampleRateValid===undefined){this._logger.warn("Ignoring invalid sessionReplayConfig.sampleRate '".concat(localSampleRate,"'. Expected a number between 0 and 1."));}if(remoteSampleRateRaw!==undefined&&remoteSampleRateValid===undefined){this._logger.warn("Ignoring invalid remote config sessionRecording.sampleRate '".concat(remoteSampleRateRaw,"'. Expected a number between 0 and 1."));}if(localSampleRateValid!==undefined&&remoteSampleRateValid!==undefined){this._logger.warn("Local sessionReplayConfig.sampleRate (".concat(localSampleRateValid,") overrides the remote sampleRate ")+"(".concat(remoteSampleRateValid,"). The project setting is ignored while the local option is set. ")+"Remove sessionReplayConfig.sampleRate to follow the project setting.");}else if(typeof sampleRate==='number'){source=localSampleRateValid!==undefined?'local config':'remote config';this._logger.info("sampleRate set from ".concat(source," (").concat(sampleRate,")."));}else if(cachedRemoteConfig===undefined){this._logger.warn('Session replay starts with no sampleRate because no remote config is cached yet. '+'Any project sample rate applies from the next launch.');}sdkReplayConfig={maskAllTextInputs:maskAllTextInputs,maskAllImages:maskAllImages,maskAllSandboxedViews:maskAllSandboxedViews,captureLog:captureLog,captureNetworkTelemetry:captureNetworkTelemetry,verifyScreenshotMaskAlignment:verifyScreenshotMaskAlignment,screenshotModeBackgroundCapture:screenshotModeBackgroundCapture,sampleRate:sampleRate,iOSdebouncerDelayMs:iOSdebouncerDelayMs,androidDebouncerDelayMs:androidDebouncerDelayMs,throttleDelayMs:throttleDelayMs};this._logger.info("Native PostHog plugin (version ".concat(_OptionalPlugin.OptionalReactNativePluginVersion!==null&&_OptionalPlugin.OptionalReactNativePluginVersion!==void 0?_OptionalPlugin.OptionalReactNativePluginVersion:'unknown',") replay config: ").concat(JSON.stringify(sdkReplayConfig)));sessionReplay=(_e=this.getPersistedProperty(_core.PostHogPersistedProperty.SessionReplay))!==null&&_e!==void 0?_e:{};cachedSessionReplayConfig=(_f=sessionReplay)!==null&&_f!==void 0?_f:{};this._logger.info("Session replay session recording from flags cached config: ".concat(JSON.stringify(cachedSessionReplayConfig)));pushOnlyInit=enablePush&&!enableSessionReplay&&!enableNativeErrorTracking;sdkOptions={apiKey:this.apiKey,host:this.host,debug:this.isDebug,distinctId:this.getDistinctId(),anonymousId:this.getAnonymousId(),sdkVersion:this.getLibraryVersion(),flushAt:this.flushAt,optOut:this.optedOut,preloadFeatureFlags:!pushOnlyInit,requestHeaders:this._requestHeaders};loggableSdkOptions=_objectSpread(_objectSpread({},sdkOptions),{},{requestHeaders:Object.keys(this._requestHeaders)});this._logger.info("Native PostHog plugin sdk options: ".concat(JSON.stringify(loggableSdkOptions)));_context19.prev=7;if(!enableSessionReplay){_context19.next=9;break;}_context19.next=8;return _OptionalPlugin.OptionalReactNativePlugin.isEnabled()["catch"](function(){return false;});case 8:_t4=_context19.sent;_context19.next=10;break;case 9:_t4=false;case 10:wasSessionReplayEnabled=_t4;if(!_OptionalPlugin.OptionalReactNativePlugin.setup){_context19.next=13;break;}pushIdentityProviderEnabled=false;if(options===null||options===void 0?void 0:options.pushIdentityProvider){if(_OptionalPlugin.OptionalReactNativePlugin.setPushIdentityProvider){_OptionalPlugin.OptionalReactNativePlugin.setPushIdentityProvider(options.pushIdentityProvider);pushIdentityProviderEnabled=true;}else{this._logger.warn('pushIdentityProvider requires a newer @posthog/react-native-plugin; push subscriptions will be sent unauthenticated.');}}pluginConfig={sessionReplay:{enabled:enableSessionReplay,sdkReplayConfig:sdkReplayConfig,decideReplayConfig:cachedSessionReplayConfig},errorTracking:{nativeAutocapture:enableNativeErrorTracking,exceptionSteps:this._errorTracking.getNativePluginExceptionStepsConfig()},push:{capturePushNotificationSubscriptions:(_g=options===null||options===void 0?void 0:options.capturePushNotificationSubscriptions)!==null&&_g!==void 0?_g:true,capturePushNotificationOpened:(_h=options===null||options===void 0?void 0:options.capturePushNotificationOpened)!==null&&_h!==void 0?_h:true,pushIdentityProviderEnabled:pushIdentityProviderEnabled}};_context19.next=11;return _OptionalPlugin.OptionalReactNativePlugin.setup(String(sessionId),sdkOptions,pluginConfig);case 11:_context19.next=12;return(_j=_OptionalPlugin.OptionalReactNativePlugin.setOptOut)===null||_j===void 0?void 0:_j.call(_OptionalPlugin.OptionalReactNativePlugin,this.optedOut);case 12:if(wasSessionReplayEnabled){this._resetSessionId(_OptionalPlugin.OptionalReactNativePlugin,String(sessionId));}_context19.next=18;break;case 13:if(enableNativeErrorTracking){this._logger.warn('Native error tracking is not available. Please update @posthog/react-native-plugin or posthog-react-native-session-replay.');enableNativeErrorTracking=false;}if(enablePush){this._logger.warn('Push notifications require @posthog/react-native-plugin; the legacy session-replay plugin does not support them.');}enablePush=false;this._pushNativeUnsupported=true;if(enableSessionReplay){_context19.next=14;break;}return _context19.abrupt("return",false);case 14:_context19.next=15;return _OptionalPlugin.OptionalReactNativePlugin.isEnabled();case 15:if(_context19.sent){_context19.next=17;break;}_context19.next=16;return _OptionalPlugin.OptionalReactNativePlugin.start(String(sessionId),sdkOptions,sdkReplayConfig,cachedSessionReplayConfig);case 16:_context19.next=18;break;case 17:this._resetSessionId(_OptionalPlugin.OptionalReactNativePlugin,String(sessionId));case 18:this._currentSessionId=sessionId;if(enableSessionReplay){this._sessionReplayNativeInitialized=true;this._logger.info("Session replay started with sessionId ".concat(sessionId,"."));}if(enableNativeErrorTracking){this._nativeErrorTrackingInitialized=true;this._errorTracking.onNativeErrorTrackingReady();this._logger.info('Native error tracking started.');}if(enablePush){this._pushNativeInitialized=true;this._logger.info('Push notification native support started.');}return _context19.abrupt("return",true);case 19:_context19.prev=19;_t5=_context19["catch"](7);this._logger.error("Native PostHog plugin failed to start: ".concat(_t5,"."));return _context19.abrupt("return",false);case 20:case"end":return _context19.stop();}},_callee19,this,[[7,19]]);}));function initializeNativePlugin(_x15,_x16){return _initializeNativePlugin.apply(this,arguments);}return initializeNativePlugin;}()},{key:"startSessionReplay",value:function(){var _startSessionReplay=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee20(options,cachedRemoteConfig){return _regenerator["default"].wrap(function(_context20){while(1)switch(_context20.prev=_context20.next){case 0:this._enableSessionReplay=options===null||options===void 0?void 0:options.enableSessionReplay;this._sessionReplayOptions=options;_context20.next=1;return this._evaluateAndStartSessionReplay(cachedRemoteConfig);case 1:case"end":return _context20.stop();}},_callee20,this);}));function startSessionReplay(_x17,_x18){return _startSessionReplay.apply(this,arguments);}return startSessionReplay;}()},{key:"_evaluateAndStartSessionReplay",value:function _evaluateAndStartSessionReplay(cachedRemoteConfig){var _this12=this;this._sessionReplayEvalChain=this._sessionReplayEvalChain["catch"](function(){}).then(function(){return _this12._evaluateAndStartSessionReplayInternal(cachedRemoteConfig);});return this._sessionReplayEvalChain;}},{key:"_evaluateAndStartSessionReplayInternal",value:function(){var _evaluateAndStartSessionReplayInternal2=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee21(cachedRemoteConfig){var _a,_b,_c,_d,options,enableNativeErrorTracking,enablePush,remoteConfig,sessionReplay,featureFlags,cachedFeatureFlags,cachedSessionReplayConfig,recordingActive,linkedFlag,value,flag,variant,_value,eventTriggers,activated,_t6;return _regenerator["default"].wrap(function(_context21){while(1)switch(_context21.prev=_context21.next){case 0:options=this._sessionReplayOptions;enableNativeErrorTracking=this._isAutocaptureNativeErrors(options);enablePush=this._isPushNativeEnabled(options);remoteConfig=cachedRemoteConfig!==null&&cachedRemoteConfig!==void 0?cachedRemoteConfig:this.getPersistedProperty(_core.PostHogPersistedProperty.RemoteConfig);if(this._isEnableSessionReplay()){_context21.next=2;break;}this._logger.info('Session replay is not enabled.');this._sessionReplayEventTriggers=[];if(!(enableNativeErrorTracking||enablePush)){_context21.next=1;break;}_context21.next=1;return this.initializeNativePlugin(options,remoteConfig,false);case 1:return _context21.abrupt("return");case 2:sessionReplay=(_a=this.getPersistedProperty(_core.PostHogPersistedProperty.SessionReplay))!==null&&_a!==void 0?_a:{};featureFlags=(_b=this.getKnownFeatureFlags())!==null&&_b!==void 0?_b:{};cachedFeatureFlags=(_c=featureFlags)!==null&&_c!==void 0?_c:{};cachedSessionReplayConfig=(_d=sessionReplay)!==null&&_d!==void 0?_d:{};this._logger.info('Session replay feature flags from flags cached config:',JSON.stringify(cachedFeatureFlags));recordingActive=true;linkedFlag=cachedSessionReplayConfig['linkedFlag'];if(typeof linkedFlag==='string'){value=cachedFeatureFlags[linkedFlag];if(typeof value==='boolean'){recordingActive=value;}else if(typeof value==='string'){recordingActive=true;}else{recordingActive=false;}this._logger.info("Session replay '".concat(linkedFlag,"' linked flag value: '").concat(value,"'"));}else if(linkedFlag&&(0,_typeof2["default"])(linkedFlag)==='object'){flag=linkedFlag['flag'];variant=linkedFlag['variant'];if(flag&&variant){_value=cachedFeatureFlags[flag];recordingActive=_value===variant;this._logger.info("Session replay '".concat(flag,"' linked flag variant '").concat(variant,"' and value '").concat(_value,"'"));}else{this._logger.info("Session replay '".concat(flag,"' linked flag variant: '").concat(variant,"' does not exist/quota limited."));recordingActive=false;}}else{this._logger.info("Session replay has no cached linkedFlag.");}eventTriggers=this._parseEventTriggers(cachedSessionReplayConfig['eventTriggers']);this._sessionReplayEventTriggers=eventTriggers;if(eventTriggers.length>0){activated=this._isEventTriggerActivatedForSession(_superPropGet(PostHog,"getSessionId",this,3)([]));if(!activated){recordingActive=false;}this._logger.info("Session replay event triggers configured (".concat(eventTriggers.length,"); activated: ").concat(activated,"."));}if(!recordingActive){_context21.next=8;break;}if(!(this._sessionReplayRecordingActive===true)){_context21.next=3;break;}return _context21.abrupt("return");case 3:if(!this._sessionReplayNativeInitialized){_context21.next=5;break;}_context21.next=4;return this._startSessionRecording(true);case 4:_t6=_context21.sent;_context21.next=7;break;case 5:_context21.next=6;return this.initializeNativePlugin(options,remoteConfig,true);case 6:_t6=_context21.sent;case 7:this._sessionReplayRecordingActive=_t6;_context21.next=12;break;case 8:this._logger.info('Session replay disabled.');if(!(this._sessionReplayRecordingActive===true)){_context21.next=10;break;}_context21.next=9;return this._stopSessionRecording();case 9:this._sessionReplayRecordingActive=!_context21.sent;_context21.next=11;break;case 10:this._sessionReplayRecordingActive=false;case 11:if(!(enableNativeErrorTracking||enablePush)){_context21.next=12;break;}_context21.next=12;return this.initializeNativePlugin(options,remoteConfig,false);case 12:case"end":return _context21.stop();}},_callee21,this);}));function _evaluateAndStartSessionReplayInternal(_x19){return _evaluateAndStartSessionReplayInternal2.apply(this,arguments);}return _evaluateAndStartSessionReplayInternal;}()},{key:"processBeforeEnqueue",value:function processBeforeEnqueue(message){var processed=_superPropGet(PostHog,"processBeforeEnqueue",this,3)([message]);try{this._maybeActivateEventTrigger(processed===null||processed===void 0?void 0:processed['event']);}catch(e){this._logger.error("Session replay event trigger check failed: ".concat(e,"."));}return processed;}},{key:"_maybeActivateEventTrigger",value:function _maybeActivateEventTrigger(eventName){if(this._sessionReplayEventTriggers.length===0||typeof eventName!=='string'){return;}if(!this._sessionReplayEventTriggers.includes(eventName)){return;}var sessionId=_superPropGet(PostHog,"getSessionId",this,3)([]);if(!sessionId){return;}if(this._isEventTriggerActivatedForSession(sessionId)&&this._sessionReplayRecordingActive===true){return;}if(!this._isEventTriggerActivatedForSession(sessionId)){this.setPersistedProperty(_core.PostHogPersistedProperty.SessionReplayEventTriggerActivatedSession,sessionId);this._logger.info("Session replay event trigger '".concat(eventName,"' activated for session ").concat(sessionId,"."));}void this._evaluateAndStartSessionReplay();}},{key:"_parseEventTriggers",value:function _parseEventTriggers(value){if(!Array.isArray(value)){return[];}return value.filter(function(entry){return typeof entry==='string';});}},{key:"_isEventTriggerActivatedForSession",value:function _isEventTriggerActivatedForSession(sessionId){return this.getPersistedProperty(_core.PostHogPersistedProperty.SessionReplayEventTriggerActivatedSession)===sessionId;}},{key:"captureAppLifecycleEvents",value:function(){var _captureAppLifecycleEvents=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee22(){var _this13=this;var _a,appBuild,appVersion,isMemoryPersistence,properties,prevAppBuild,prevAppVersion,initialUrl,_t7,_t8,_t9;return _regenerator["default"].wrap(function(_context22){while(1)switch(_context22.prev=_context22.next){case 0:appBuild=this._appProperties.$app_build;appVersion=this._appProperties.$app_version;isMemoryPersistence=this._persistence==='memory';properties={};if(!isMemoryPersistence){prevAppBuild=this.getPersistedProperty(_core.PostHogPersistedProperty.InstalledAppBuild);prevAppVersion=this.getPersistedProperty(_core.PostHogPersistedProperty.InstalledAppVersion);if(!appBuild||!appVersion){this._logger.warn('PostHog could not track installation/update/open, as the build and version were not set. '+'This can happen if some dependencies are not installed correctly, or if you have provided'+'customAppProperties but not included $app_build or $app_version.');}if(appBuild){if(!prevAppBuild){this.capture('Application Installed',properties);}else if(prevAppBuild!==appBuild){this.capture('Application Updated',_objectSpread(_objectSpread(_objectSpread({},(0,_core.maybeAdd)('previous_version',prevAppVersion)),(0,_core.maybeAdd)('previous_build',prevAppBuild)),properties));}}}else{this._logger.warn('PostHog was initialised with persistence set to "memory", capturing native app events (Application Installed and Application Updated) is not supported.');}_context22.next=1;return _reactNative.Linking.getInitialURL();case 1:_t8=_a=_context22.sent;_t7=_t8!==null;if(!_t7){_context22.next=2;break;}_t7=_a!==void 0;case 2:if(!_t7){_context22.next=3;break;}_t9=_a;_context22.next=4;break;case 3:_t9=undefined;case 4:initialUrl=_t9;this.capture('Application Opened',_objectSpread(_objectSpread({},properties),(0,_core.maybeAdd)('url',initialUrl)));_reactNative.AppState.addEventListener('change',function(state){if(state==='active'){_this13.capture('Application Became Active');}else if(state==='background'){_this13.capture('Application Backgrounded');}});case 5:case"end":return _context22.stop();}},_callee22,this);}));function captureAppLifecycleEvents(){return _captureAppLifecycleEvents.apply(this,arguments);}return captureAppLifecycleEvents;}()},{key:"persistAppVersion",value:function(){var _persistAppVersion=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee23(){var appBuild,appVersion;return _regenerator["default"].wrap(function(_context23){while(1)switch(_context23.prev=_context23.next){case 0:appBuild=this._appProperties.$app_build;appVersion=this._appProperties.$app_version;this.setPersistedProperty(_core.PostHogPersistedProperty.InstalledAppBuild,appBuild);this.setPersistedProperty(_core.PostHogPersistedProperty.InstalledAppVersion,appVersion);case 1:case"end":return _context23.stop();}},_callee23,this);}));function persistAppVersion(){return _persistAppVersion.apply(this,arguments);}return persistAppVersion;}()}]);}(_core.PostHogCore);
@@ -1 +1 @@
1
- {"version":3,"file":"posthog-rn.js","sourceRoot":"","sources":["../src/posthog-rn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAuB,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAE3F,OAAO,EAKL,WAAW,EAKX,WAAW,EAEX,wBAAwB,EAIxB,UAAU,EACV,aAAa,EACb,QAAQ,EACR,2BAA2B,EAC3B,eAAe,EAIf,aAAa,IAAI,iBAAiB,GACnC,MAAM,eAAe,CAAA;AAEtB,OAAO,EAEL,mBAAmB,EACnB,iBAAiB,EACjB,yBAAyB,EACzB,uBAAuB,GACxB,MAAM,WAAW,CAAA;AAClB,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,2BAA2B,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAQ7E,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,QAAQ,EAAE,OAAO,EAAE,iBAAiB,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AACjH,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AACvE,OAAO,EAAE,yBAAyB,EAAE,gCAAgC,EAAE,MAAM,2BAA2B,CAAA;AACvG,OAAO,EAAE,aAAa,EAAwB,MAAM,kBAAkB,CAAA;AAEtE,OAAO,EAAE,wBAAwB,EAAE,CAAA;AAEnC;;;;;;GAMG;AACH,SAAS,kBAAkB,CAAC,KAAiC;IAC3D,IAAI,KAAK,KAAK,YAAY,EAAE,CAAC;QAC3B,OAAO,YAAY,CAAA;IACrB,CAAC;IACD,IAAI,CAAC,KAAK,IAAI,KAAK,KAA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AI,CAAC,oBAAoB,CAAC,wBAAwB,CAAC,mBAAmB,EAAE,UAAU,CAAC,CAAA;IACrF,CAAC;CACF"}
@@ -1 +1 @@
1
- "use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");var _typeof=require("@babel/runtime/helpers/typeof");Object.defineProperty(exports,"__esModule",{value:true});exports.PostHogSurveyProvider=PostHogSurveyProvider;var _defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=_interopRequireWildcard(require("react"));var _Surveys=require("./components/Surveys");var _getActiveMatchingSurveys=require("./getActiveMatchingSurveys");var _useSurveyStorage2=require("./useSurveyStorage");var _useActivatedSurveys=require("./useActivatedSurveys");var _SurveyModal=require("./components/SurveyModal");var _surveysUtils=require("./surveys-utils");var _core=require("@posthog/core");var _usePostHog=require("../hooks/usePostHog");var _useFeatureFlags=require("../hooks/useFeatureFlags");var _surveyTranslations=require("./survey-translations");var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/home/runner/work/posthog-js/posthog-js/packages/react-native/dist/surveys/PostHogSurveyProvider.js";function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,"default":e};if(null===e||"object"!=_typeof(e)&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t2 in e)"default"!==_t2&&{}.hasOwnProperty.call(e,_t2)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t2))&&(i.get||i.set)?o(f,_t2,i):f[_t2]=e[_t2]);return f;})(e,t);}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable;})),t.push.apply(t,o);}return t;}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach(function(r){(0,_defineProperty2["default"])(e,r,t[r]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));});}return e;}var ActiveSurveyContext=_react["default"].createContext(undefined);var FeedbackSurveyContext=_react["default"].createContext(undefined);function PostHogSurveyProvider(props){var _a;var posthogFromHook=(0,_usePostHog.usePostHog)();var posthog=(_a=props.client)!==null&&_a!==void 0?_a:posthogFromHook;var _useSurveyStorage=(0,_useSurveyStorage2.useSurveyStorage)(),seenSurveys=_useSurveyStorage.seenSurveys,setSeenSurvey=_useSurveyStorage.setSeenSurvey,setLastSeenSurveyDate=_useSurveyStorage.setLastSeenSurveyDate;var _useState=(0,_react.useState)([]),_useState2=(0,_slicedToArray2["default"])(_useState,2),surveys=_useState2[0],setSurveys=_useState2[1];var _useState3=(0,_react.useState)(undefined),_useState4=(0,_slicedToArray2["default"])(_useState3,2),activeSurvey=_useState4[0],setActiveSurvey=_useState4[1];var shownSurveyIdRef=(0,_react.useRef)(undefined);var activatedSurveys=(0,_useActivatedSurveys.useActivatedSurveys)(posthog,surveys);var flags=(0,_useFeatureFlags.useFeatureFlags)(posthog);(0,_react.useEffect)(function(){posthog.ready().then(function(){return posthog._onSurveysReady();}).then(function(){return posthog.getSurveys();}).then(setSurveys)["catch"](function(){});},[posthog]);(0,_react.useEffect)(function(){var isShown=!!activeSurvey&&shownSurveyIdRef.current===activeSurvey.id;if(isShown){return;}var activeSurveys=(0,_getActiveMatchingSurveys.getActiveMatchingSurveys)(surveys,flags!==null&&flags!==void 0?flags:{},seenSurveys,activatedSurveys);var popoverSurveys=activeSurveys.filter(function(survey){return survey.type===_core.SurveyType.Popover;});if(activeSurvey&&popoverSurveys.some(function(survey){return survey.id===activeSurvey.id;})){return;}setActiveSurvey(popoverSurveys.length>0?popoverSurveys[0]:undefined);},[activeSurvey,flags,surveys,seenSurveys,activatedSurveys]);var translatedActiveSurvey=(0,_react.useMemo)(function(){return activeSurvey?(0,_surveyTranslations.applySurveyTranslationForUser)(activeSurvey,posthog):undefined;},[activeSurvey,posthog]);var surveyAppearance=(0,_react.useMemo)(function(){var _a,_b,_c,_d,_e;if(props.overrideAppearanceWithDefault||!translatedActiveSurvey){return _objectSpread(_objectSpread({},_surveysUtils.defaultSurveyAppearance),(_a=props.defaultSurveyAppearance)!==null&&_a!==void 0?_a:{});}return _objectSpread(_objectSpread(_objectSpread(_objectSpread({},_surveysUtils.defaultSurveyAppearance),(_b=props.defaultSurveyAppearance)!==null&&_b!==void 0?_b:{}),(_c=translatedActiveSurvey.survey.appearance)!==null&&_c!==void 0?_c:{}),((_d=translatedActiveSurvey.survey.appearance)===null||_d===void 0?void 0:_d.submitButtonColor)?{submitButtonTextColor:(_e=translatedActiveSurvey.survey.appearance.submitButtonTextColor)!==null&&_e!==void 0?_e:(0,_surveysUtils.getContrastingTextColor)(translatedActiveSurvey.survey.appearance.submitButtonColor)}:{});},[translatedActiveSurvey,props.defaultSurveyAppearance,props.overrideAppearanceWithDefault]);var activeContext=(0,_react.useMemo)(function(){if(!activeSurvey||!translatedActiveSurvey){return undefined;}return{survey:translatedActiveSurvey.survey,surveyLanguage:translatedActiveSurvey.language,onShow:function onShow(){shownSurveyIdRef.current=activeSurvey.id;(0,_Surveys.sendSurveyShownEvent)(translatedActiveSurvey.survey,posthog,translatedActiveSurvey.language);setLastSeenSurveyDate(new Date());},onClose:function onClose(submitted,responses){shownSurveyIdRef.current=undefined;setSeenSurvey(activeSurvey);setActiveSurvey(undefined);if(!submitted){(0,_Surveys.dismissedSurveyEvent)(translatedActiveSurvey.survey,responses,posthog,translatedActiveSurvey.language);}}};},[activeSurvey,posthog,setLastSeenSurveyDate,setSeenSurvey,translatedActiveSurvey]);var autoPresent=props.autoPresentSurveys!==false;var isAlreadyShown=!!activeSurvey&&shownSurveyIdRef.current===activeSurvey.id;var shouldShowModal=activeContext&&activeContext.survey.type===_core.SurveyType.Popover&&(autoPresent||isAlreadyShown);return(0,_jsxRuntime.jsx)(ActiveSurveyContext.Provider,{value:activeContext,children:(0,_jsxRuntime.jsxs)(FeedbackSurveyContext.Provider,{value:{surveys:surveys,activeSurvey:activeSurvey,setActiveSurvey:setActiveSurvey},children:[props.children,shouldShowModal&&(0,_jsxRuntime.jsx)(_SurveyModal.SurveyModal,_objectSpread({appearance:surveyAppearance,androidKeyboardBehavior:props.androidKeyboardBehavior},activeContext))]})});}
1
+ "use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");var _typeof=require("@babel/runtime/helpers/typeof");Object.defineProperty(exports,"__esModule",{value:true});exports.PostHogSurveyProvider=PostHogSurveyProvider;var _defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=_interopRequireWildcard(require("react"));var _Surveys=require("./components/Surveys");var _getActiveMatchingSurveys=require("./getActiveMatchingSurveys");var _useSurveyStorage2=require("./useSurveyStorage");var _useActivatedSurveys=require("./useActivatedSurveys");var _SurveyModal=require("./components/SurveyModal");var _surveysUtils=require("./surveys-utils");var _core=require("@posthog/core");var _usePostHog=require("../hooks/usePostHog");var _useFeatureFlags=require("../hooks/useFeatureFlags");var _surveyTranslations=require("./survey-translations");var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/home/runner/work/posthog-js/posthog-js/packages/react-native/dist/surveys/PostHogSurveyProvider.js";function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,"default":e};if(null===e||"object"!=_typeof(e)&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t2 in e)"default"!==_t2&&{}.hasOwnProperty.call(e,_t2)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t2))&&(i.get||i.set)?o(f,_t2,i):f[_t2]=e[_t2]);return f;})(e,t);}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable;})),t.push.apply(t,o);}return t;}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach(function(r){(0,_defineProperty2["default"])(e,r,t[r]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));});}return e;}var ActiveSurveyContext=_react["default"].createContext(undefined);var FeedbackSurveyContext=_react["default"].createContext(undefined);function PostHogSurveyProvider(props){var _a;var posthogFromHook=(0,_usePostHog.usePostHog)();var posthog=(_a=props.client)!==null&&_a!==void 0?_a:posthogFromHook;var _useSurveyStorage=(0,_useSurveyStorage2.useSurveyStorage)(),seenSurveys=_useSurveyStorage.seenSurveys,setSeenSurvey=_useSurveyStorage.setSeenSurvey,setLastSeenSurveyDate=_useSurveyStorage.setLastSeenSurveyDate;var _useState=(0,_react.useState)([]),_useState2=(0,_slicedToArray2["default"])(_useState,2),surveys=_useState2[0],setSurveys=_useState2[1];var _useState3=(0,_react.useState)(undefined),_useState4=(0,_slicedToArray2["default"])(_useState3,2),activeSurvey=_useState4[0],setActiveSurvey=_useState4[1];var shownSurveyIdRef=(0,_react.useRef)(undefined);var activatedSurveys=(0,_useActivatedSurveys.useActivatedSurveys)(posthog,surveys);var flags=(0,_useFeatureFlags.useFeatureFlags)(posthog);var _useState5=(0,_react.useState)(function(){return(0,_surveyTranslations.detectUserLanguage)(posthog);}),_useState6=(0,_slicedToArray2["default"])(_useState5,2),userLanguage=_useState6[0],setUserLanguage=_useState6[1];(0,_react.useEffect)(function(){var updateLanguage=function updateLanguage(){return setUserLanguage((0,_surveyTranslations.detectUserLanguage)(posthog));};var unsubscribe=posthog.on('personProperties',updateLanguage);updateLanguage();return unsubscribe;},[posthog]);(0,_react.useEffect)(function(){posthog.ready().then(function(){return posthog._onSurveysReady();}).then(function(){setUserLanguage((0,_surveyTranslations.detectUserLanguage)(posthog));return posthog.getSurveys();}).then(setSurveys)["catch"](function(){});},[posthog]);(0,_react.useEffect)(function(){var isShown=!!activeSurvey&&shownSurveyIdRef.current===activeSurvey.id;if(isShown){return;}var activeSurveys=(0,_getActiveMatchingSurveys.getActiveMatchingSurveys)(surveys,flags!==null&&flags!==void 0?flags:{},seenSurveys,activatedSurveys);var popoverSurveys=activeSurveys.filter(function(survey){return survey.type===_core.SurveyType.Popover;});if(activeSurvey&&popoverSurveys.some(function(survey){return survey.id===activeSurvey.id;})){return;}setActiveSurvey(popoverSurveys.length>0?popoverSurveys[0]:undefined);},[activeSurvey,flags,surveys,seenSurveys,activatedSurveys]);var translatedActiveSurvey=(0,_react.useMemo)(function(){return activeSurvey?(0,_surveyTranslations.applySurveyTranslationForUser)(activeSurvey,posthog,userLanguage):undefined;},[activeSurvey,posthog,userLanguage]);var surveyAppearance=(0,_react.useMemo)(function(){var _a,_b,_c,_d,_e;if(props.overrideAppearanceWithDefault||!translatedActiveSurvey){return _objectSpread(_objectSpread({},_surveysUtils.defaultSurveyAppearance),(_a=props.defaultSurveyAppearance)!==null&&_a!==void 0?_a:{});}return _objectSpread(_objectSpread(_objectSpread(_objectSpread({},_surveysUtils.defaultSurveyAppearance),(_b=props.defaultSurveyAppearance)!==null&&_b!==void 0?_b:{}),(_c=translatedActiveSurvey.survey.appearance)!==null&&_c!==void 0?_c:{}),((_d=translatedActiveSurvey.survey.appearance)===null||_d===void 0?void 0:_d.submitButtonColor)?{submitButtonTextColor:(_e=translatedActiveSurvey.survey.appearance.submitButtonTextColor)!==null&&_e!==void 0?_e:(0,_surveysUtils.getContrastingTextColor)(translatedActiveSurvey.survey.appearance.submitButtonColor)}:{});},[translatedActiveSurvey,props.defaultSurveyAppearance,props.overrideAppearanceWithDefault]);var activeContext=(0,_react.useMemo)(function(){if(!activeSurvey||!translatedActiveSurvey){return undefined;}return{survey:translatedActiveSurvey.survey,surveyLanguage:translatedActiveSurvey.language,onShow:function onShow(){if(shownSurveyIdRef.current===activeSurvey.id){return;}shownSurveyIdRef.current=activeSurvey.id;(0,_Surveys.sendSurveyShownEvent)(translatedActiveSurvey.survey,posthog,translatedActiveSurvey.language);setLastSeenSurveyDate(new Date());},onClose:function onClose(submitted,responses){shownSurveyIdRef.current=undefined;setSeenSurvey(activeSurvey);setActiveSurvey(undefined);if(!submitted){(0,_Surveys.dismissedSurveyEvent)(translatedActiveSurvey.survey,responses,posthog,translatedActiveSurvey.language);}}};},[activeSurvey,posthog,setLastSeenSurveyDate,setSeenSurvey,translatedActiveSurvey]);var autoPresent=props.autoPresentSurveys!==false;var isAlreadyShown=!!activeSurvey&&shownSurveyIdRef.current===activeSurvey.id;var shouldShowModal=activeContext&&activeContext.survey.type===_core.SurveyType.Popover&&(autoPresent||isAlreadyShown);return(0,_jsxRuntime.jsx)(ActiveSurveyContext.Provider,{value:activeContext,children:(0,_jsxRuntime.jsxs)(FeedbackSurveyContext.Provider,{value:{surveys:surveys,activeSurvey:activeSurvey,setActiveSurvey:setActiveSurvey},children:[props.children,shouldShowModal&&(0,_jsxRuntime.jsx)(_SurveyModal.SurveyModal,_objectSpread({appearance:surveyAppearance,androidKeyboardBehavior:props.androidKeyboardBehavior},activeContext))]})});}
@@ -1 +1 @@
1
- {"version":3,"file":"PostHogSurveyProvider.js","sourceRoot":"","sources":["../../src/surveys/PostHogSurveyProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OA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IAChG,kEAAkE;IAClE,MAAM,WAAW,GAAG,KAAK,CAAC,kBAAkB,KAAK,KAAK,CAAA;IACtD,MAAM,cAAc,GAAG,CAAC,CAAC,YAAY,IAAI,gBAAgB,CAAC,OAAO,KAAK,YAAY,CAAC,EAAE,CAAA;IACrF,MAAM,eAAe,GACnB,aAAa,IAAI,aAAa,CAAC,MAAM,CAAC,IAAI,KAAK,UAAU,CAAC,OAAO,IAAI,CAAC,WAAW,IAAI,cAAc,CAAC,CAAA;IAEtG,OAAO,CACL,CAAC,mBAAmB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,aAAa,CAAC,CACjD;MAAA,CAAC,qBAAqB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,CAAC,CAChF;QAAA,CAAC,KAAK,CAAC,QAAQ,CACf;QAAA,CAAC,eAAe,IAAI,CAClB,CAAC,WAAW,CACV,UAAU,CAAC,CAAC,gBAAgB,CAAC,CAC7B,uBAAuB,CAAC,CAAC,KAAK,CAAC,uBAAuB,CAAC,CACvD,IAAI,aAAa,CAAC,EAClB,CACH,CACH;MAAA,EAAE,qBAAqB,CAAC,QAAQ,CAClC;IAAA,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAChC,CAAA;AACH,CAAC;AAED,uEAAuE;AACvE,yBAAyB;AACzB,4GAA4G;AAC5G,MAAM;AACN,IAAI"}
@@ -1 +1 @@
1
- "use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");var _typeof=require("@babel/runtime/helpers/typeof");Object.defineProperty(exports,"__esModule",{value:true});exports.LinkQuestion=LinkQuestion;exports.MultipleChoiceQuestion=MultipleChoiceQuestion;exports.OpenTextQuestion=OpenTextQuestion;exports.RatingButton=RatingButton;exports.RatingQuestion=RatingQuestion;var _toConsumableArray2=_interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _safeStyleSheet=require("../safeStyleSheet");var _icons=require("../icons");var _surveysUtils=require("../surveys-utils");var _core=require("@posthog/core");var _surveys=require("@posthog/core/surveys");var _BottomSection=require("./BottomSection");var _QuestionHeader=require("./QuestionHeader");var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/home/runner/work/posthog-js/posthog-js/packages/react-native/dist/surveys/components/QuestionTypes.js";function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,"default":e};if(null===e||"object"!=_typeof(e)&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t2 in e)"default"!==_t2&&{}.hasOwnProperty.call(e,_t2)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t2))&&(i.get||i.set)?o(f,_t2,i):f[_t2]=e[_t2]);return f;})(e,t);}function QuestionLayout(_ref){var children=_ref.children,footer=_ref.footer;var _useState=(0,_react.useState)(0),_useState2=(0,_slicedToArray2["default"])(_useState,2),viewportHeight=_useState2[0],setViewportHeight=_useState2[1];var _useState3=(0,_react.useState)(0),_useState4=(0,_slicedToArray2["default"])(_useState3,2),contentHeight=_useState4[0],setContentHeight=_useState4[1];var isOverflowing=contentHeight>viewportHeight+1;return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:questionLayoutStyles.container,children:[(0,_jsxRuntime.jsx)(_reactNative.ScrollView,{style:questionLayoutStyles.scroll,keyboardShouldPersistTaps:"handled",showsVerticalScrollIndicator:false,scrollEnabled:isOverflowing,bounces:isOverflowing,onLayout:function onLayout(e){return setViewportHeight(e.nativeEvent.layout.height);},onContentSizeChange:function onContentSizeChange(_width,height){return setContentHeight(height);},children:children}),footer]});}var questionLayoutStyles=(0,_safeStyleSheet.createSafeStyleSheet)({container:{flexShrink:1},scroll:{flexShrink:1}});function OpenTextQuestion(_ref2){var question=_ref2.question,appearance=_ref2.appearance,onSubmit=_ref2.onSubmit;var _a,_b,_c,_d;var _useState5=(0,_react.useState)(''),_useState6=(0,_slicedToArray2["default"])(_useState5,2),text=_useState6[0],setText=_useState6[1];var validationError=(0,_react.useMemo)(function(){return(0,_surveys.getValidationError)(text,question.validation,question.optional);},[text,question.validation,question.optional]);var minLength=(0,_surveys.getLengthFromRules)(question.validation,_core.SurveyValidationType.MinLength);var maxLength=(0,_surveys.getLengthFromRules)(question.validation,_core.SurveyValidationType.MaxLength);var requirementsHint=(0,_react.useMemo)(function(){return(0,_surveys.getRequirementsHint)(minLength,maxLength);},[minLength,maxLength]);var handleSubmit=function handleSubmit(){if(validationError){return;}onSubmit(text.trim());};return(0,_jsxRuntime.jsxs)(QuestionLayout,{footer:(0,_jsxRuntime.jsx)(_BottomSection.BottomSection,{text:(_a=question.buttonText)!==null&&_a!==void 0?_a:appearance.submitButtonText,submitDisabled:!!validationError,appearance:appearance,onSubmit:handleSubmit}),children:[(0,_jsxRuntime.jsx)(_QuestionHeader.QuestionHeader,{question:question.question,description:question.description,descriptionContentType:question.descriptionContentType,appearance:appearance}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.textInputContainer,children:[(0,_jsxRuntime.jsx)(_reactNative.TextInput,{style:[styles.textInput,{backgroundColor:appearance.inputBackground,color:(_b=appearance.inputTextColor)!==null&&_b!==void 0?_b:(0,_surveysUtils.getContrastingTextColor)(appearance.inputBackground),borderColor:appearance.borderColor}],multiline:true,numberOfLines:4,placeholder:appearance.placeholder,placeholderTextColor:(0,_surveysUtils.getContrastingTextColor)((_c=appearance.inputTextColor)!==null&&_c!==void 0?_c:(0,_surveysUtils.getContrastingTextColor)(appearance.inputBackground))==='white'?'rgba(0, 0, 0, 0.5)':'rgba(255, 255, 255, 0.5)',onChangeText:setText,value:text}),requirementsHint&&(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.validationHint,{color:(_d=appearance.textColor)!==null&&_d!==void 0?_d:(0,_surveysUtils.getContrastingTextColor)(appearance.backgroundColor)}],children:requirementsHint})]})]});}function LinkQuestion(_ref3){var question=_ref3.question,appearance=_ref3.appearance,_onSubmit=_ref3.onSubmit;var _a,_b;question=question;return(0,_jsxRuntime.jsx)(QuestionLayout,{footer:(0,_jsxRuntime.jsx)(_BottomSection.BottomSection,{text:(_b=(_a=question.buttonText)!==null&&_a!==void 0?_a:appearance.submitButtonText)!==null&&_b!==void 0?_b:'Submit',submitDisabled:false,link:question.link,appearance:appearance,onSubmit:function onSubmit(){return _onSubmit('link clicked');}}),children:(0,_jsxRuntime.jsx)(_QuestionHeader.QuestionHeader,{question:question.question,description:question.description,descriptionContentType:question.descriptionContentType,appearance:appearance})});}function RatingQuestion(_ref4){var _this=this;var question=_ref4.question,appearance=_ref4.appearance,_onSubmit2=_ref4.onSubmit;var _a,_b,_c,_d;var _useState7=(0,_react.useState)(null),_useState8=(0,_slicedToArray2["default"])(_useState7,2),rating=_useState8[0],setRating=_useState8[1];question=question;return(0,_jsxRuntime.jsxs)(QuestionLayout,{footer:(0,_jsxRuntime.jsx)(_BottomSection.BottomSection,{text:(_a=question.buttonText)!==null&&_a!==void 0?_a:appearance.submitButtonText,submitDisabled:rating===null&&!question.optional,appearance:appearance,onSubmit:function onSubmit(){return _onSubmit2(rating);},skipSubmitButton:question.skipSubmitButton}),children:[(0,_jsxRuntime.jsx)(_QuestionHeader.QuestionHeader,{question:question.question,description:question.description,descriptionContentType:question.descriptionContentType,appearance:appearance}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.ratingSection,children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.ratingOptions,children:[question.display===_core.SurveyRatingDisplay.Emoji&&(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.ratingOptionsEmoji,children:(_b=emojiScaleLists[question.scale])===null||_b===void 0?void 0:_b.map(function(Emoji,idx){var active=idx+1===rating;return(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{style:styles.ratingsEmoji,onPress:function onPress(){var response=idx+1;setRating(response);if(question.skipSubmitButton){_onSubmit2(response);}},children:(0,_jsxRuntime.jsx)(Emoji,{fill:active?appearance.ratingButtonActiveColor:appearance.ratingButtonColor})},idx);})}),question.display===_core.SurveyRatingDisplay.Number&&(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.ratingOptionsNumber,{borderColor:appearance.borderColor}],children:getScaleNumbers(question.scale).map(function(number,idx){var active=rating===number;return(0,_jsxRuntime.jsx)(RatingButton,{index:idx,active:active,appearance:appearance,num:number,setActiveNumber:function setActiveNumber(response){setRating(response);if(question.skipSubmitButton){_onSubmit2(response);}}},idx);})})]}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.ratingText,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:{color:(_c=appearance.textColor)!==null&&_c!==void 0?_c:(0,_surveysUtils.getContrastingTextColor)(appearance.backgroundColor),opacity:_surveysUtils.defaultRatingLabelOpacity},children:question.lowerBoundLabel}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:{color:(_d=appearance.textColor)!==null&&_d!==void 0?_d:(0,_surveysUtils.getContrastingTextColor)(appearance.backgroundColor),opacity:_surveysUtils.defaultRatingLabelOpacity},children:question.upperBoundLabel})]})]})]});}function RatingButton(_ref5){var index=_ref5.index,num=_ref5.num,active=_ref5.active,appearance=_ref5.appearance,setActiveNumber=_ref5.setActiveNumber;var _a;var backgroundColor=active?appearance.ratingButtonActiveColor:appearance.ratingButtonColor;var textColor=active?(0,_surveysUtils.getContrastingTextColor)(backgroundColor):(_a=appearance.inputTextColor)!==null&&_a!==void 0?_a:(0,_surveysUtils.getContrastingTextColor)(backgroundColor);return(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{style:[styles.ratingsNumber,index===0&&{borderLeftWidth:0},{backgroundColor:backgroundColor,borderColor:appearance.borderColor}],onPress:function onPress(){return setActiveNumber(num);},children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:{color:textColor},children:num})});}function MultipleChoiceQuestion(_ref6){var _this2=this;var question=_ref6.question,appearance=_ref6.appearance,_onSubmit3=_ref6.onSubmit;var _a;question=question;var isSingleChoice=question.type===_core.SurveyQuestionType.SingleChoice;var allowMultiple=question.type===_core.SurveyQuestionType.MultipleChoice;var openChoice=question.hasOpenChoice?question.choices[question.choices.length-1]:null;var choices=(0,_react.useMemo)(function(){return(0,_surveysUtils.getDisplayOrderChoices)(question);},[question]);var _useState9=(0,_react.useState)([]),_useState0=(0,_slicedToArray2["default"])(_useState9,2),selectedChoices=_useState0[0],setSelectedChoices=_useState0[1];var _useState1=(0,_react.useState)(''),_useState10=(0,_slicedToArray2["default"])(_useState1,2),openEndedInput=_useState10[0],setOpenEndedInput=_useState10[1];var shouldSkipSubmit=question.skipSubmitButton&&isSingleChoice&&!question.hasOpenChoice;return(0,_jsxRuntime.jsxs)(QuestionLayout,{footer:(0,_jsxRuntime.jsx)(_BottomSection.BottomSection,{text:(_a=question.buttonText)!==null&&_a!==void 0?_a:appearance.submitButtonText,submitDisabled:!question.optional&&(selectedChoices.length===0||openChoice!==null&&selectedChoices.includes(openChoice)&&openEndedInput.length===0),appearance:appearance,onSubmit:function onSubmit(){var result=selectedChoices.map(function(c){return c===openChoice?openEndedInput:c;});_onSubmit3(allowMultiple?result:result[0]);},skipSubmitButton:shouldSkipSubmit}),children:[(0,_jsxRuntime.jsx)(_QuestionHeader.QuestionHeader,{question:question.question,description:question.description,descriptionContentType:question.descriptionContentType,appearance:appearance}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.multipleChoiceOptions,children:choices.map(function(choice,idx){var _a;var isOpenChoice=choice===openChoice;var isSelected=selectedChoices.includes(choice);var choiceTextColor=(_a=appearance.inputTextColor)!==null&&_a!==void 0?_a:(0,_surveysUtils.getContrastingTextColor)(appearance.inputBackground);return(0,_jsxRuntime.jsxs)(_reactNative.Pressable,{style:[styles.choiceOption,{backgroundColor:appearance.inputBackground},isSelected?{borderColor:(0,_surveysUtils.getContrastingTextColor)(appearance.backgroundColor)}:{}],onPress:function onPress(){if(allowMultiple){setSelectedChoices(isSelected?selectedChoices.filter(function(c){return c!==choice;}):[].concat((0,_toConsumableArray2["default"])(selectedChoices),[choice]));}else{setSelectedChoices([choice]);if(shouldSkipSubmit&&!isOpenChoice){_onSubmit3(choice);}}},children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.choiceText,children:[(0,_jsxRuntime.jsxs)(_reactNative.Text,{style:{flexGrow:1,color:choiceTextColor},children:[choice,isOpenChoice?':':'']}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.rightCheckArea,children:isSelected&&(0,_jsxRuntime.jsx)(_icons.CheckSVG,{})})]}),isOpenChoice&&(0,_jsxRuntime.jsx)(_reactNative.TextInput,{style:styles.openEndedInput,onChangeText:function onChangeText(userValue){setOpenEndedInput(userValue);if(!isSelected){setSelectedChoices(allowMultiple?[].concat((0,_toConsumableArray2["default"])(selectedChoices),[choice]):[choice]);}}})]},idx);})})]});}var emojiScaleLists={2:[_icons.ThumbsUpEmoji,_icons.ThumbsDownEmoji],3:[_icons.DissatisfiedEmoji,_icons.NeutralEmoji,_icons.SatisfiedEmoji],5:[_icons.VeryDissatisfiedEmoji,_icons.DissatisfiedEmoji,_icons.NeutralEmoji,_icons.SatisfiedEmoji,_icons.VerySatisfiedEmoji]};var fiveScaleNumbers=[1,2,3,4,5];var sevenScaleNumbers=[1,2,3,4,5,6,7];var tenScaleNumbers=[0,1,2,3,4,5,6,7,8,9,10];function getScaleNumbers(scale){switch(scale){case 5:return fiveScaleNumbers;case 7:return sevenScaleNumbers;case 10:return tenScaleNumbers;default:return fiveScaleNumbers;}}var styles=(0,_safeStyleSheet.createSafeStyleSheet)({textInputContainer:{padding:10},textInput:{borderColor:'#ccc',borderWidth:1,padding:10,marginVertical:10,fontSize:16,height:80,textAlignVertical:'top'},ratingSection:{marginVertical:10},ratingOptions:{flexDirection:'row',justifyContent:'space-between'},ratingOptionsEmoji:{flexDirection:'row',justifyContent:'space-around',flexWrap:'nowrap',flex:1},ratingsEmoji:{padding:4},ratingOptionsNumber:{margin:10,flexGrow:1,flexDirection:'row',justifyContent:'space-between',borderRadius:5,borderWidth:1,overflow:'hidden'},ratingsNumber:{flex:1,paddingVertical:10,alignItems:'center',borderLeftWidth:1},ratingText:{flexDirection:'row',justifyContent:'space-between',padding:10},multipleChoiceOptions:{padding:10},choiceOption:{flexDirection:'column',marginVertical:5,borderWidth:1,borderColor:'grey',borderRadius:5,padding:10},choiceText:{flexDirection:'row'},rightCheckArea:{flexGrow:0},openEndedInput:{padding:5},validationHint:{fontSize:12,opacity:0.7,marginTop:4}});
1
+ "use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");var _typeof=require("@babel/runtime/helpers/typeof");Object.defineProperty(exports,"__esModule",{value:true});exports.LinkQuestion=LinkQuestion;exports.MultipleChoiceQuestion=MultipleChoiceQuestion;exports.OpenTextQuestion=OpenTextQuestion;exports.RatingButton=RatingButton;exports.RatingQuestion=RatingQuestion;var _toConsumableArray2=_interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _safeStyleSheet=require("../safeStyleSheet");var _icons=require("../icons");var _surveysUtils=require("../surveys-utils");var _core=require("@posthog/core");var _surveys=require("@posthog/core/surveys");var _BottomSection=require("./BottomSection");var _QuestionHeader=require("./QuestionHeader");var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/home/runner/work/posthog-js/posthog-js/packages/react-native/dist/surveys/components/QuestionTypes.js";function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,"default":e};if(null===e||"object"!=_typeof(e)&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t2 in e)"default"!==_t2&&{}.hasOwnProperty.call(e,_t2)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t2))&&(i.get||i.set)?o(f,_t2,i):f[_t2]=e[_t2]);return f;})(e,t);}function QuestionLayout(_ref){var children=_ref.children,footer=_ref.footer;var _useState=(0,_react.useState)(0),_useState2=(0,_slicedToArray2["default"])(_useState,2),viewportHeight=_useState2[0],setViewportHeight=_useState2[1];var _useState3=(0,_react.useState)(0),_useState4=(0,_slicedToArray2["default"])(_useState3,2),contentHeight=_useState4[0],setContentHeight=_useState4[1];var isOverflowing=contentHeight>viewportHeight+1;return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:questionLayoutStyles.container,children:[(0,_jsxRuntime.jsx)(_reactNative.ScrollView,{style:questionLayoutStyles.scroll,keyboardShouldPersistTaps:"handled",showsVerticalScrollIndicator:false,scrollEnabled:isOverflowing,bounces:isOverflowing,onLayout:function onLayout(e){return setViewportHeight(e.nativeEvent.layout.height);},onContentSizeChange:function onContentSizeChange(_width,height){return setContentHeight(height);},children:children}),footer]});}var questionLayoutStyles=(0,_safeStyleSheet.createSafeStyleSheet)({container:{flexShrink:1},scroll:{flexShrink:1}});function OpenTextQuestion(_ref2){var question=_ref2.question,appearance=_ref2.appearance,onSubmit=_ref2.onSubmit;var _a,_b,_c,_d;var _useState5=(0,_react.useState)(''),_useState6=(0,_slicedToArray2["default"])(_useState5,2),text=_useState6[0],setText=_useState6[1];var validationError=(0,_react.useMemo)(function(){return(0,_surveys.getValidationError)(text,question.validation,question.optional);},[text,question.validation,question.optional]);var minLength=(0,_surveys.getLengthFromRules)(question.validation,_core.SurveyValidationType.MinLength);var maxLength=(0,_surveys.getLengthFromRules)(question.validation,_core.SurveyValidationType.MaxLength);var requirementsHint=(0,_react.useMemo)(function(){return(0,_surveys.getRequirementsHint)(minLength,maxLength);},[minLength,maxLength]);var handleSubmit=function handleSubmit(){if(validationError){return;}onSubmit(text.trim());};return(0,_jsxRuntime.jsxs)(QuestionLayout,{footer:(0,_jsxRuntime.jsx)(_BottomSection.BottomSection,{text:(_a=question.buttonText)!==null&&_a!==void 0?_a:appearance.submitButtonText,submitDisabled:!!validationError,appearance:appearance,onSubmit:handleSubmit}),children:[(0,_jsxRuntime.jsx)(_QuestionHeader.QuestionHeader,{question:question.question,description:question.description,descriptionContentType:question.descriptionContentType,appearance:appearance}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.textInputContainer,children:[(0,_jsxRuntime.jsx)(_reactNative.TextInput,{style:[styles.textInput,{backgroundColor:appearance.inputBackground,color:(_b=appearance.inputTextColor)!==null&&_b!==void 0?_b:(0,_surveysUtils.getContrastingTextColor)(appearance.inputBackground),borderColor:appearance.borderColor}],multiline:true,numberOfLines:4,placeholder:appearance.placeholder,placeholderTextColor:(0,_surveysUtils.getContrastingTextColor)((_c=appearance.inputTextColor)!==null&&_c!==void 0?_c:(0,_surveysUtils.getContrastingTextColor)(appearance.inputBackground))==='white'?'rgba(0, 0, 0, 0.5)':'rgba(255, 255, 255, 0.5)',onChangeText:setText,value:text}),requirementsHint&&(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.validationHint,{color:(_d=appearance.textColor)!==null&&_d!==void 0?_d:(0,_surveysUtils.getContrastingTextColor)(appearance.backgroundColor)}],children:requirementsHint})]})]});}function LinkQuestion(_ref3){var question=_ref3.question,appearance=_ref3.appearance,_onSubmit=_ref3.onSubmit;var _a,_b;question=question;return(0,_jsxRuntime.jsx)(QuestionLayout,{footer:(0,_jsxRuntime.jsx)(_BottomSection.BottomSection,{text:(_b=(_a=question.buttonText)!==null&&_a!==void 0?_a:appearance.submitButtonText)!==null&&_b!==void 0?_b:'Submit',submitDisabled:false,link:question.link,appearance:appearance,onSubmit:function onSubmit(){return _onSubmit('link clicked');}}),children:(0,_jsxRuntime.jsx)(_QuestionHeader.QuestionHeader,{question:question.question,description:question.description,descriptionContentType:question.descriptionContentType,appearance:appearance})});}function RatingQuestion(_ref4){var _this=this;var question=_ref4.question,appearance=_ref4.appearance,_onSubmit2=_ref4.onSubmit;var _a,_b,_c,_d;var _useState7=(0,_react.useState)(null),_useState8=(0,_slicedToArray2["default"])(_useState7,2),rating=_useState8[0],setRating=_useState8[1];question=question;return(0,_jsxRuntime.jsxs)(QuestionLayout,{footer:(0,_jsxRuntime.jsx)(_BottomSection.BottomSection,{text:(_a=question.buttonText)!==null&&_a!==void 0?_a:appearance.submitButtonText,submitDisabled:rating===null&&!question.optional,appearance:appearance,onSubmit:function onSubmit(){return _onSubmit2(rating);},skipSubmitButton:question.skipSubmitButton}),children:[(0,_jsxRuntime.jsx)(_QuestionHeader.QuestionHeader,{question:question.question,description:question.description,descriptionContentType:question.descriptionContentType,appearance:appearance}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.ratingSection,children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.ratingOptions,children:[question.display===_core.SurveyRatingDisplay.Emoji&&(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.ratingOptionsEmoji,children:(_b=emojiScaleLists[question.scale])===null||_b===void 0?void 0:_b.map(function(Emoji,idx){var active=idx+1===rating;return(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{style:styles.ratingsEmoji,onPress:function onPress(){var response=idx+1;setRating(response);if(question.skipSubmitButton){_onSubmit2(response);}},children:(0,_jsxRuntime.jsx)(Emoji,{fill:active?appearance.ratingButtonActiveColor:appearance.ratingButtonColor})},idx);})}),question.display===_core.SurveyRatingDisplay.Number&&(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.ratingOptionsNumber,{borderColor:appearance.borderColor}],children:getScaleNumbers(question.scale).map(function(number,idx){var active=rating===number;return(0,_jsxRuntime.jsx)(RatingButton,{index:idx,active:active,appearance:appearance,num:number,setActiveNumber:function setActiveNumber(response){setRating(response);if(question.skipSubmitButton){_onSubmit2(response);}}},idx);})})]}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.ratingText,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:{color:(_c=appearance.textColor)!==null&&_c!==void 0?_c:(0,_surveysUtils.getContrastingTextColor)(appearance.backgroundColor),opacity:_surveysUtils.defaultRatingLabelOpacity},children:question.lowerBoundLabel}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:{color:(_d=appearance.textColor)!==null&&_d!==void 0?_d:(0,_surveysUtils.getContrastingTextColor)(appearance.backgroundColor),opacity:_surveysUtils.defaultRatingLabelOpacity},children:question.upperBoundLabel})]})]})]});}function RatingButton(_ref5){var index=_ref5.index,num=_ref5.num,active=_ref5.active,appearance=_ref5.appearance,setActiveNumber=_ref5.setActiveNumber;var _a;var backgroundColor=active?appearance.ratingButtonActiveColor:appearance.ratingButtonColor;var textColor=active?(0,_surveysUtils.getContrastingTextColor)(backgroundColor):(_a=appearance.inputTextColor)!==null&&_a!==void 0?_a:(0,_surveysUtils.getContrastingTextColor)(backgroundColor);return(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{style:[styles.ratingsNumber,index===0&&{borderLeftWidth:0},{backgroundColor:backgroundColor,borderColor:appearance.borderColor}],onPress:function onPress(){return setActiveNumber(num);},children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:{color:textColor},children:num})});}function MultipleChoiceQuestion(_ref6){var _this2=this;var question=_ref6.question,appearance=_ref6.appearance,_onSubmit3=_ref6.onSubmit;var _a;question=question;var isSingleChoice=question.type===_core.SurveyQuestionType.SingleChoice;var allowMultiple=question.type===_core.SurveyQuestionType.MultipleChoice;var openChoiceIndex=question.hasOpenChoice?question.choices.length-1:-1;var choices=(0,_react.useMemo)(function(){return(0,_surveysUtils.getDisplayOrderChoices)(question);},[question]);var _useState9=(0,_react.useState)([]),_useState0=(0,_slicedToArray2["default"])(_useState9,2),selectedChoiceIndices=_useState0[0],setSelectedChoiceIndices=_useState0[1];var _useState1=(0,_react.useState)(''),_useState10=(0,_slicedToArray2["default"])(_useState1,2),openEndedInput=_useState10[0],setOpenEndedInput=_useState10[1];var shouldSkipSubmit=question.skipSubmitButton&&isSingleChoice&&!question.hasOpenChoice;return(0,_jsxRuntime.jsxs)(QuestionLayout,{footer:(0,_jsxRuntime.jsx)(_BottomSection.BottomSection,{text:(_a=question.buttonText)!==null&&_a!==void 0?_a:appearance.submitButtonText,submitDisabled:!question.optional&&(selectedChoiceIndices.length===0||selectedChoiceIndices.includes(openChoiceIndex)&&openEndedInput.length===0),appearance:appearance,onSubmit:function onSubmit(){var result=selectedChoiceIndices.map(function(index){return index===openChoiceIndex?openEndedInput:question.choices[index];});_onSubmit3(allowMultiple?result:result[0]);},skipSubmitButton:shouldSkipSubmit}),children:[(0,_jsxRuntime.jsx)(_QuestionHeader.QuestionHeader,{question:question.question,description:question.description,descriptionContentType:question.descriptionContentType,appearance:appearance}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.multipleChoiceOptions,children:choices.map(function(choice,choiceIndex){var _a;var isOpenChoice=choiceIndex===openChoiceIndex;var isSelected=selectedChoiceIndices.includes(choiceIndex);var choiceTextColor=(_a=appearance.inputTextColor)!==null&&_a!==void 0?_a:(0,_surveysUtils.getContrastingTextColor)(appearance.inputBackground);return(0,_jsxRuntime.jsxs)(_reactNative.Pressable,{style:[styles.choiceOption,{backgroundColor:appearance.inputBackground},isSelected?{borderColor:(0,_surveysUtils.getContrastingTextColor)(appearance.backgroundColor)}:{}],onPress:function onPress(){if(allowMultiple){setSelectedChoiceIndices(isSelected?selectedChoiceIndices.filter(function(index){return index!==choiceIndex;}):[].concat((0,_toConsumableArray2["default"])(selectedChoiceIndices),[choiceIndex]));}else{setSelectedChoiceIndices([choiceIndex]);if(shouldSkipSubmit&&!isOpenChoice){_onSubmit3(choice);}}},children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.choiceText,children:[(0,_jsxRuntime.jsxs)(_reactNative.Text,{style:{flexGrow:1,color:choiceTextColor},children:[choice,isOpenChoice?':':'']}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.rightCheckArea,children:isSelected&&(0,_jsxRuntime.jsx)(_icons.CheckSVG,{})})]}),isOpenChoice&&(0,_jsxRuntime.jsx)(_reactNative.TextInput,{style:styles.openEndedInput,onChangeText:function onChangeText(userValue){setOpenEndedInput(userValue);if(!isSelected){setSelectedChoiceIndices(allowMultiple?[].concat((0,_toConsumableArray2["default"])(selectedChoiceIndices),[choiceIndex]):[choiceIndex]);}}})]},choiceIndex);})})]});}var emojiScaleLists={2:[_icons.ThumbsUpEmoji,_icons.ThumbsDownEmoji],3:[_icons.DissatisfiedEmoji,_icons.NeutralEmoji,_icons.SatisfiedEmoji],5:[_icons.VeryDissatisfiedEmoji,_icons.DissatisfiedEmoji,_icons.NeutralEmoji,_icons.SatisfiedEmoji,_icons.VerySatisfiedEmoji]};var fiveScaleNumbers=[1,2,3,4,5];var sevenScaleNumbers=[1,2,3,4,5,6,7];var tenScaleNumbers=[0,1,2,3,4,5,6,7,8,9,10];function getScaleNumbers(scale){switch(scale){case 5:return fiveScaleNumbers;case 7:return sevenScaleNumbers;case 10:return tenScaleNumbers;default:return fiveScaleNumbers;}}var styles=(0,_safeStyleSheet.createSafeStyleSheet)({textInputContainer:{padding:10},textInput:{borderColor:'#ccc',borderWidth:1,padding:10,marginVertical:10,fontSize:16,height:80,textAlignVertical:'top'},ratingSection:{marginVertical:10},ratingOptions:{flexDirection:'row',justifyContent:'space-between'},ratingOptionsEmoji:{flexDirection:'row',justifyContent:'space-around',flexWrap:'nowrap',flex:1},ratingsEmoji:{padding:4},ratingOptionsNumber:{margin:10,flexGrow:1,flexDirection:'row',justifyContent:'space-between',borderRadius:5,borderWidth:1,overflow:'hidden'},ratingsNumber:{flex:1,paddingVertical:10,alignItems:'center',borderLeftWidth:1},ratingText:{flexDirection:'row',justifyContent:'space-between',padding:10},multipleChoiceOptions:{padding:10},choiceOption:{flexDirection:'column',marginVertical:5,borderWidth:1,borderColor:'grey',borderRadius:5,padding:10},choiceText:{flexDirection:'row'},rightCheckArea:{flexGrow:0},openEndedInput:{padding:5},validationHint:{fontSize:12,opacity:0.7,marginTop:4}});
@@ -1 +1 @@
1
- {"version":3,"file":"QuestionTypes.js","sourceRoot":"","sources":["../../../src/surveys/components/QuestionTypes.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAa,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC3D,OAAO,EAAqB,SAAS,EAAE,UAAU,EAAE,IAAI,EAAE,SAAS,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAEhH,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AACxD,OAAO,EACL,QAAQ,EACR,iBAAiB,EACjB,YAAY,EACZ,cAAc,EACd,eAAe,EACf,aAAa,EACb,qBAAqB,EACrB,kBAAkB,GACnB,MAAM,UAAU,CAAA;AACjB,OAAO,EACL,yBAAyB,EACzB,uBAAuB,EACvB,sBAAsB,GAEvB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAEL,mBAAmB,EACnB,kBAAkB,EAIlB,oBAAoB,GACrB,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AACnG,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAOjD,4EAA4E;AAC5E,wEAAwE;AACxE,uEAAuE;AACvE,8EAA8E;AAC9E,gFAAgF;AAChF,oBAAoB;AACpB,SAAS,cAAc,CAAC,EAAE,QAAQ,EAAE,MAAM,EAA8C;IACtF,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAA;IACvD,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,QAAQ,CAAC,CAAC,CAA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AAa,EAAE,KAAK;QACpB,cAAc,EAAE,cAAc;QAC9B,QAAQ,EAAE,QAAQ;QAClB,IAAI,EAAE,CAAC;KACR;IACD,YAAY,EAAE;QACZ,OAAO,EAAE,CAAC;KACX;IACD,mBAAmB,EAAE;QACnB,MAAM,EAAE,EAAE;QACV,QAAQ,EAAE,CAAC;QACX,aAAa,EAAE,KAAK;QACpB,cAAc,EAAE,eAAe;QAC/B,YAAY,EAAE,CAAC;QACf,WAAW,EAAE,CAAC;QACd,QAAQ,EAAE,QAAQ;KACnB;IACD,aAAa,EAAE;QACb,IAAI,EAAE,CAAC;QACP,eAAe,EAAE,EAAE;QACnB,UAAU,EAAE,QAAQ;QACpB,eAAe,EAAE,CAAC;KACnB;IACD,UAAU,EAAE;QACV,aAAa,EAAE,KAAK;QACpB,cAAc,EAAE,eAAe;QAC/B,OAAO,EAAE,EAAE;KACZ;IACD,qBAAqB,EAAE;QACrB,OAAO,EAAE,EAAE;KACZ;IACD,YAAY,EAAE;QACZ,aAAa,EAAE,QAAQ;QACvB,cAAc,EAAE,CAAC;QACjB,WAAW,EAAE,CAAC;QACd,WAAW,EAAE,MAAM;QACnB,YAAY,EAAE,CAAC;QACf,OAAO,EAAE,EAAE;KACZ;IACD,UAAU,EAAE;QACV,aAAa,EAAE,KAAK;KACrB;IACD,cAAc,EAAE;QACd,QAAQ,EAAE,CAAC;KACZ;IACD,cAAc,EAAE;QACd,OAAO,EAAE,CAAC;KACX;IACD,cAAc,EAAE;QACd,QAAQ,EAAE,EAAE;QACZ,OAAO,EAAE,GAAG;QACZ,SAAS,EAAE,CAAC;KACb;CACF,CAAC,CAAA"}
1
+ {"version":3,"file":"QuestionTypes.js","sourceRoot":"","sources":["../../../src/surveys/components/QuestionTypes.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAa,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC3D,OAAO,EAAqB,SAAS,EAAE,UAAU,EAAE,IAAI,EAAE,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;IACD,aAAa,EAAE;QACb,IAAI,EAAE,CAAC;QACP,eAAe,EAAE,EAAE;QACnB,UAAU,EAAE,QAAQ;QACpB,eAAe,EAAE,CAAC;KACnB;IACD,UAAU,EAAE;QACV,aAAa,EAAE,KAAK;QACpB,cAAc,EAAE,eAAe;QAC/B,OAAO,EAAE,EAAE;KACZ;IACD,qBAAqB,EAAE;QACrB,OAAO,EAAE,EAAE;KACZ;IACD,YAAY,EAAE;QACZ,aAAa,EAAE,QAAQ;QACvB,cAAc,EAAE,CAAC;QACjB,WAAW,EAAE,CAAC;QACd,WAAW,EAAE,MAAM;QACnB,YAAY,EAAE,CAAC;QACf,OAAO,EAAE,EAAE;KACZ;IACD,UAAU,EAAE;QACV,aAAa,EAAE,KAAK;KACrB;IACD,cAAc,EAAE;QACd,QAAQ,EAAE,CAAC;KACZ;IACD,cAAc,EAAE;QACd,OAAO,EAAE,CAAC;KACX;IACD,cAAc,EAAE;QACd,QAAQ,EAAE,EAAE;QACZ,OAAO,EAAE,GAAG;QACZ,SAAS,EAAE,CAAC;KACb;CACF,CAAC,CAAA"}
@@ -1,7 +1,7 @@
1
1
  import { Survey } from '@posthog/core';
2
2
  import { PostHog } from '../posthog-rn';
3
3
  export declare function detectUserLanguage(instance: PostHog): string | null;
4
- export declare function applySurveyTranslationForUser(survey: Survey, instance: PostHog): {
4
+ export declare function applySurveyTranslationForUser(survey: Survey, instance: PostHog, userLanguage?: string | null): {
5
5
  survey: Survey;
6
6
  language: string | null;
7
7
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.applySurveyTranslationForUser=applySurveyTranslationForUser;exports.detectUserLanguage=detectUserLanguage;var _core=require("@posthog/core");var _surveys=require("@posthog/core/surveys");var logger=(0,_core.createLogger)('[SurveyTranslations]');function getLogger(instance){return instance.isDebug?logger:undefined;}function detectUserLanguage(instance){return(0,_surveys.detectSurveyLanguage)({overrideLanguage:instance.getSurveyDisplayLanguageOverride(),storedPersonProperties:instance.getPersistedProperty(_core.PostHogPersistedProperty.PersonProperties),locale:instance.getCommonEventProperties().$locale},getLogger(instance));}function applySurveyTranslationForUser(survey,instance){var userLanguage=detectUserLanguage(instance);var logger=getLogger(instance);if(!userLanguage){logger===null||logger===void 0?void 0:logger.info('No user language detected');return{survey:survey,language:null};}var result=(0,_surveys.applySurveyTranslation)(survey,userLanguage,logger);return{survey:result.survey,language:result.matchedKey};}
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.applySurveyTranslationForUser=applySurveyTranslationForUser;exports.detectUserLanguage=detectUserLanguage;var _core=require("@posthog/core");var _surveys=require("@posthog/core/surveys");var logger=(0,_core.createLogger)('[SurveyTranslations]');function getLogger(instance){return instance.isDebug?logger:undefined;}function detectUserLanguage(instance){return(0,_surveys.detectSurveyLanguage)({overrideLanguage:instance.getSurveyDisplayLanguageOverride(),storedPersonProperties:instance.getPersistedProperty(_core.PostHogPersistedProperty.PersonProperties),locale:instance.getCommonEventProperties().$locale},getLogger(instance));}function applySurveyTranslationForUser(survey,instance){var userLanguage=arguments.length>2&&arguments[2]!==undefined?arguments[2]:detectUserLanguage(instance);var logger=getLogger(instance);if(!userLanguage){logger===null||logger===void 0?void 0:logger.info('No user language detected');return{survey:survey,language:null};}var result=(0,_surveys.applySurveyTranslation)(survey,userLanguage,logger);return{survey:result.survey,language:result.matchedKey};}
@@ -1 +1 @@
1
- {"version":3,"file":"survey-translations.js","sourceRoot":"","sources":["../../src/surveys/survey-translations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAU,wBAAwB,EAAU,MAAM,eAAe,CAAA;AACtF,OAAO,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAA;AAGpF,MAAM,MAAM,GAAG,YAAY,CAAC,sBAAsB,CAAC,CAAA;AAEnD,SAAS,SAAS,CAAC,QAAiB;IAClC,OAAO,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,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OAAO;QACV,wCAAwC,EAAE;YACxC,GAAG,CAAC,OAAO,CAAC,wCAAwC,IAAI,EAAE,CAAC;YAC3D,6CAA6C;SAC9C;KACF,CAAC,CAAA;IAEF,OAAO,MAAM,CAAA;AACf,CAAC;AAED,SAAS,yBAAyB;IAYhC,IAAI,CAAC;QACH,sDAAsD;QACtD,OAAO,OAAO,CAAC,mBAAmB,CAAC,CAAA;IACrC,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CAAC,wEAAwE,CAAC,CAAA;IAC3F,CAAC;AACH,CAAC"}
@@ -1 +1 @@
1
- "use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");var _typeof=require("@babel/runtime/helpers/typeof");Object.defineProperty(exports,"__esModule",{value:true});exports.createPostHogMetroSerializer=void 0;exports.unstableBeforeAssetSerializationDebugIdPlugin=unstableBeforeAssetSerializationDebugIdPlugin;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var crypto=_interopRequireWildcard(require("crypto"));var _utils=require("./utils");var _utils2=require("./vendor/metro/utils");function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,"default":e};if(null===e||"object"!=_typeof(e)&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t2 in e)"default"!==_t2&&{}.hasOwnProperty.call(e,_t2)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t2))&&(i.get||i.set)?o(f,_t2,i):f[_t2]=e[_t2]);return f;})(e,t);}function _createForOfIteratorHelper(r,e){var t="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=_unsupportedIterableToArray(r))||e&&r&&"number"==typeof r.length){t&&(r=t);var _n=0,F=function F(){};return{s:F,n:function n(){return _n>=r.length?{done:!0}:{done:!1,value:r[_n++]};},e:function e(r){throw r;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var o,a=!0,u=!1;return{s:function s(){t=t.call(r);},n:function n(){var r=t.next();return a=r.done,r;},e:function e(r){u=!0,o=r;},f:function f(){try{a||null==t["return"]||t["return"]();}finally{if(u)throw o;}}};}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}var DEBUG_ID_PLACE_HOLDER='__POSTHOG_CHUNK_ID__';var DEBUG_ID_MODULE_PATH='__chunkid__';var SOURCE_MAP_COMMENT='//# sourceMappingURL=';var DEBUG_ID_COMMENT='//# chunkId=';function unstableBeforeAssetSerializationDebugIdPlugin(_ref){var graph=_ref.graph,premodules=_ref.premodules,debugId=_ref.debugId;if(graph.transformOptions.platform==='web'){return premodules;}if(!debugId){return premodules;}var debugIdModuleExists=premodules.some(function(module){return module.path===DEBUG_ID_MODULE_PATH;});if(debugIdModuleExists){console.warn('\n\nChunk ID module found. Skipping PostHog Chunk ID module...\n\n');return premodules;}var debugIdModule=createDebugIdModule(debugId);return(0,_utils.prependModule)(premodules,debugIdModule);}var createPostHogMetroSerializer=exports.createPostHogMetroSerializer=function createPostHogMetroSerializer(customSerializer){var serializer=customSerializer||(0,_utils2.createDefaultMetroSerializer)();return function(){var _ref2=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee(entryPoint,premodules,graph,options){var debugIdModuleExists,debugIdModule,serializerOptions,modifiedPremodules,serializerResult,_yield$extractSeriali,bundleCode,bundleMapString,debugId,debugIdComment,indexOfSourceMapComment,bundleCodeWithDebugId,bundleMap;return _regenerator["default"].wrap(function(_context){while(1)switch(_context.prev=_context.next){case 0:if(!graph.transformOptions.hot){_context.next=1;break;}return _context.abrupt("return",serializer(entryPoint,premodules,graph,options));case 1:debugIdModuleExists=premodules.some(function(module){return module.path===DEBUG_ID_MODULE_PATH;});if(!debugIdModuleExists){_context.next=2;break;}console.warn('Chunk ID module found. Skipping PostHog Chunk ID module...');return _context.abrupt("return",serializer(entryPoint,premodules,graph,options));case 2:debugIdModule=createDebugIdModule(DEBUG_ID_PLACE_HOLDER);serializerOptions=options;serializerOptions.posthogBundleCallback=createPostHogBundleCallback(debugIdModule);modifiedPremodules=(0,_utils.prependModule)(premodules,debugIdModule);serializerResult=serializer(entryPoint,modifiedPremodules,graph,serializerOptions);_context.next=3;return extractSerializerResult(serializerResult);case 3:_yield$extractSeriali=_context.sent;bundleCode=_yield$extractSeriali.code;bundleMapString=_yield$extractSeriali.map;debugId=(0,_utils.determineDebugIdFromBundleSource)(bundleCode);if(debugId){_context.next=4;break;}throw new Error('Chunk ID was not found in the bundle.');case 4:console.log('info '+"Bundle Chunk ID: ".concat(debugId));debugIdComment="".concat(DEBUG_ID_COMMENT).concat(debugId);indexOfSourceMapComment=bundleCode.lastIndexOf(SOURCE_MAP_COMMENT);bundleCodeWithDebugId=indexOfSourceMapComment===-1?"".concat(bundleCode,"\n").concat(debugIdComment):"".concat(bundleCode.substring(0,indexOfSourceMapComment)+debugIdComment,"\n").concat(bundleCode.substring(indexOfSourceMapComment));bundleMap=JSON.parse(bundleMapString);bundleMap['chunkId']=debugId;return _context.abrupt("return",{code:bundleCodeWithDebugId,map:JSON.stringify(bundleMap)});case 5:case"end":return _context.stop();}},_callee);}));return function(_x,_x2,_x3,_x4){return _ref2.apply(this,arguments);};}();};function createPostHogBundleCallback(debugIdModule){return function(bundle){var debugId=calculateDebugId(bundle.pre,bundle.modules);debugIdModule.setSource(injectDebugId(debugIdModule.getSource().toString(),debugId));bundle.pre=injectDebugId(bundle.pre,debugId);return bundle;};}function extractSerializerResult(_x5){return _extractSerializerResult.apply(this,arguments);}function _extractSerializerResult(){_extractSerializerResult=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee2(serializerResult){var awaitedResult;return _regenerator["default"].wrap(function(_context2){while(1)switch(_context2.prev=_context2.next){case 0:if(!(typeof serializerResult==='string')){_context2.next=1;break;}return _context2.abrupt("return",{code:serializerResult,map:'{}'});case 1:if(!('map'in serializerResult)){_context2.next=2;break;}return _context2.abrupt("return",{code:serializerResult.code,map:serializerResult.map});case 2:_context2.next=3;return serializerResult;case 3:awaitedResult=_context2.sent;if(!(typeof awaitedResult==='string')){_context2.next=4;break;}return _context2.abrupt("return",{code:awaitedResult,map:'{}'});case 4:return _context2.abrupt("return",{code:awaitedResult.code,map:awaitedResult.map});case 5:case"end":return _context2.stop();}},_callee2);}));return _extractSerializerResult.apply(this,arguments);}function createDebugIdModule(debugId){return(0,_utils.createVirtualJSModule)(DEBUG_ID_MODULE_PATH,(0,_utils.createDebugIdSnippet)(debugId));}function calculateDebugId(bundleCode,modules){var hash=crypto.createHash('md5');hash.update(bundleCode);if(modules){var _iterator=_createForOfIteratorHelper(modules),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var _step$value=(0,_slicedToArray2["default"])(_step.value,2),code=_step$value[1];hash.update(code);}}catch(err){_iterator.e(err);}finally{_iterator.f();}}return(0,_utils.stringToUUID)(hash.digest('hex'));}function injectDebugId(code,debugId){return code.replace(new RegExp(DEBUG_ID_PLACE_HOLDER,'g'),debugId);}
1
+ "use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");var _typeof=require("@babel/runtime/helpers/typeof");Object.defineProperty(exports,"__esModule",{value:true});exports.createPostHogMetroSerializer=void 0;exports.unstableBeforeAssetSerializationDebugIdPlugin=unstableBeforeAssetSerializationDebugIdPlugin;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var crypto=_interopRequireWildcard(require("crypto"));var _utils=require("./utils");var _utils2=require("./vendor/metro/utils");function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,"default":e};if(null===e||"object"!=_typeof(e)&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t2 in e)"default"!==_t2&&{}.hasOwnProperty.call(e,_t2)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t2))&&(i.get||i.set)?o(f,_t2,i):f[_t2]=e[_t2]);return f;})(e,t);}function _createForOfIteratorHelper(r,e){var t="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=_unsupportedIterableToArray(r))||e&&r&&"number"==typeof r.length){t&&(r=t);var _n=0,F=function F(){};return{s:F,n:function n(){return _n>=r.length?{done:!0}:{done:!1,value:r[_n++]};},e:function e(r){throw r;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var o,a=!0,u=!1;return{s:function s(){t=t.call(r);},n:function n(){var r=t.next();return a=r.done,r;},e:function e(r){u=!0,o=r;},f:function f(){try{a||null==t["return"]||t["return"]();}finally{if(u)throw o;}}};}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}var DEBUG_ID_PLACE_HOLDER='__POSTHOG_CHUNK_ID__';var DEBUG_ID_MODULE_PATH='__chunkid__';var SOURCE_MAP_COMMENT='//# sourceMappingURL=';var DEBUG_ID_COMMENT='//# chunkId=';function unstableBeforeAssetSerializationDebugIdPlugin(_ref){var graph=_ref.graph,premodules=_ref.premodules,debugId=_ref.debugId;if(graph.transformOptions.platform==='web'){return premodules;}if(!debugId){return premodules;}var debugIdModuleExists=premodules.some(function(module){return module.path===DEBUG_ID_MODULE_PATH;});if(debugIdModuleExists){console.warn('\n\nChunk ID module found. Skipping PostHog Chunk ID module...\n\n');return premodules;}var debugIdModule=createDebugIdModule(debugId);return(0,_utils.prependModule)(premodules,debugIdModule);}var createPostHogMetroSerializer=exports.createPostHogMetroSerializer=function createPostHogMetroSerializer(customSerializer){var serializer=customSerializer||(0,_utils2.createDefaultMetroSerializer)();return function(){var _ref2=(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee(entryPoint,premodules,graph,options){var debugIdModuleExists,debugIdModule,serializerOptions,modifiedPremodules,serializerResult,_ref3,bundleCode,bundleMapString,debugId,debugIdComment,indexOfSourceMapComment,bundleCodeWithDebugId,bundleMap;return _regenerator["default"].wrap(function(_context){while(1)switch(_context.prev=_context.next){case 0:if(!(0,_utils.isDevServerBuild)(graph,options)){_context.next=1;break;}return _context.abrupt("return",serializer(entryPoint,premodules,graph,options));case 1:debugIdModuleExists=premodules.some(function(module){return module.path===DEBUG_ID_MODULE_PATH;});if(!debugIdModuleExists){_context.next=2;break;}console.warn('Chunk ID module found. Skipping PostHog Chunk ID module...');return _context.abrupt("return",serializer(entryPoint,premodules,graph,options));case 2:if(!options.modulesOnly){_context.next=3;break;}return _context.abrupt("return",serializer(entryPoint,premodules,graph,options));case 3:debugIdModule=createDebugIdModule(DEBUG_ID_PLACE_HOLDER);serializerOptions=options;serializerOptions.posthogBundleCallback=createPostHogBundleCallback(debugIdModule);modifiedPremodules=(0,_utils.prependModule)(premodules,debugIdModule);_context.next=4;return serializer(entryPoint,modifiedPremodules,graph,serializerOptions);case 4:serializerResult=_context.sent;_ref3=typeof serializerResult==='string'?{code:serializerResult,map:'{}'}:serializerResult,bundleCode=_ref3.code,bundleMapString=_ref3.map;debugId=(0,_utils.determineDebugIdFromBundleSource)(bundleCode);if(debugId){_context.next=5;break;}throw new Error('Chunk ID was not found in the bundle.');case 5:console.log('info '+"Bundle Chunk ID: ".concat(debugId));debugIdComment="".concat(DEBUG_ID_COMMENT).concat(debugId);indexOfSourceMapComment=bundleCode.lastIndexOf(SOURCE_MAP_COMMENT);bundleCodeWithDebugId=indexOfSourceMapComment===-1?"".concat(bundleCode,"\n").concat(debugIdComment):"".concat(bundleCode.substring(0,indexOfSourceMapComment)+debugIdComment,"\n").concat(bundleCode.substring(indexOfSourceMapComment));bundleMap=JSON.parse(bundleMapString);bundleMap['chunkId']=debugId;return _context.abrupt("return",{code:bundleCodeWithDebugId,map:JSON.stringify(bundleMap)});case 6:case"end":return _context.stop();}},_callee);}));return function(_x,_x2,_x3,_x4){return _ref2.apply(this,arguments);};}();};function createPostHogBundleCallback(debugIdModule){return function(bundle){var debugId=calculateDebugId(bundle.pre,bundle.modules);debugIdModule.setSource(injectDebugId(debugIdModule.getSource().toString(),debugId));bundle.pre=injectDebugId(bundle.pre,debugId);return bundle;};}function createDebugIdModule(debugId){return(0,_utils.createVirtualJSModule)(DEBUG_ID_MODULE_PATH,(0,_utils.createDebugIdSnippet)(debugId));}function calculateDebugId(bundleCode,modules){var hash=crypto.createHash('md5');hash.update(bundleCode);if(modules){var _iterator=_createForOfIteratorHelper(modules),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var _step$value=(0,_slicedToArray2["default"])(_step.value,2),code=_step$value[1];hash.update(code);}}catch(err){_iterator.e(err);}finally{_iterator.f();}}return(0,_utils.stringToUUID)(hash.digest('hex'));}function injectDebugId(code,debugId){return code.replace(new RegExp(DEBUG_ID_PLACE_HOLDER,'g'),debugId);}
@@ -1 +1 @@
1
- {"version":3,"file":"posthogMetroSerializer.js","sourceRoot":"","sources":["../../src/tooling/posthogMetroSerializer.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,4BAA4B;AAC5B,wGAAwG;AAExG,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAA;AAIhC,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,gCAAgC,EAChC,aAAa,EACb,YAAY,GACb,MAAM,SAAS,CAAA;AAChB,OAAO,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAA;AAOnE,MAAM,qBAAqB,GAAG,sBAAsB,CAAA;AACpD,MAAM,oBAAoB,GAAG,aAAa,CAAA;AAE1C,MAAM,kBAAkB,GAAG,uBAAuB,CAAA;AAClD,MAAM,gBAAgB,GAAG,cAAc,CAAA;AAEvC;;GAEG;AACH,MAAM,UAAU,6CAA6C,CAAC,EAC5D,KAAK,EACL,UAAU,EACV,OAAO,GAKR;IACC,4EAA4E;IAC5E,IAAI,KAAK,CAAC,gBAAgB,CAAC,QAAQ,KAAK,KAAK,EAAE,CAAC;QAC9C,OAAO,UAAU,CAAA;IACnB,CAAC;IAED,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,UAAU,CAAA;IACnB,CAAC;IAED,MAAM,mBAAmB,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,oBAAoB,CAAC,CAAA;IAC7F,IAAI,mBAAmB,EAAE,CAAC;QACxB,sCAAsC;QACtC,OAAO,CAAC,IAAI,CAAC,oEAAoE,CAAC,CAAA;QAClF,OAAO,UAAU,CAAA;IACnB,CAAC;IAED,MAAM,aAAa,GAAG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Bundle = {
19
19
  };
20
20
  export type MetroSerializerOutput = string | SerializedBundle | Promise<string | SerializedBundle>;
21
21
  export type MetroSerializer = (entryPoint: string, premodules: ReadonlyArray<Module>, graph: ReadOnlyGraph, options: SerializerOptions) => MetroSerializerOutput;
22
+ /**
23
+ * Metro removed `hot` from transform options in 0.83.2. On newer versions,
24
+ * dev-server requests can be distinguished from development CLI bundles by
25
+ * the source URL that Metro supplies.
26
+ */
27
+ export declare function isDevServerBuild(graph: ReadOnlyGraph, options: SerializerOptions): boolean;
22
28
  /**
23
29
  * Returns minified Chunk ID code snippet.
24
30
  */
@@ -1 +1 @@
1
- "use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");var _typeof=require("@babel/runtime/helpers/typeof");Object.defineProperty(exports,"__esModule",{value:true});exports.createDebugIdSnippet=createDebugIdSnippet;exports.createSet=void 0;exports.createVirtualJSModule=createVirtualJSModule;exports.determineDebugIdFromBundleSource=determineDebugIdFromBundleSource;exports.getExpoConfig=getExpoConfig;exports.prependModule=prependModule;exports.stringToUUID=stringToUUID;var _toConsumableArray2=_interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));var crypto=_interopRequireWildcard(require("crypto"));var _countLines=_interopRequireDefault(require("./vendor/metro/countLines"));function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,"default":e};if(null===e||"object"!=_typeof(e)&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t2 in e)"default"!==_t2&&{}.hasOwnProperty.call(e,_t2)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t2))&&(i.get||i.set)?o(f,_t2,i):f[_t2]=e[_t2]);return f;})(e,t);}function createDebugIdSnippet(debugId){return"!function(){try{var e=\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]=\"".concat(debugId,"\")}catch(e){}}();");}function stringToUUID(str){var md5sum=crypto.createHash('md5');md5sum.update(str);var md5Hash=md5sum.digest('hex');var v4variant=['8','9','a','b'][md5Hash.substring(16,17).charCodeAt(0)%4];return"".concat(md5Hash.substring(0,8),"-").concat(md5Hash.substring(8,12),"-4").concat(md5Hash.substring(13,16),"-").concat(v4variant).concat(md5Hash.substring(17,20),"-").concat(md5Hash.substring(20)).toLowerCase();}function determineDebugIdFromBundleSource(code){var match=code.match(/_posthogChunkIds\[[^\]]+\]\s*=\s*"([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})"/);return match?match[1]:undefined;}function resolveSetCreator(){var CountingSetFromPrivate=safeRequireCountingSetFromPrivate();if(CountingSetFromPrivate){return function(){return new CountingSetFromPrivate["default"]();};}var CountingSetFromSrc=safeRequireCountingSetFromSrc();if(CountingSetFromSrc){return function(){return new CountingSetFromSrc["default"]();};}return function(){return new Set();};}function safeRequireCountingSetFromSrc(){try{return require('metro/src/lib/CountingSet');}catch(e){return undefined;}}function safeRequireCountingSetFromPrivate(){try{return require('metro/private/lib/CountingSet');}catch(e){return undefined;}}var createSet=exports.createSet=resolveSetCreator();var PRELUDE_MODULE_PATH='__prelude__';function prependModule(modules,module){var modifiedPremodules=(0,_toConsumableArray2["default"])(modules);if(modifiedPremodules.length>0&&modifiedPremodules[0]!==undefined&&modifiedPremodules[0].path===PRELUDE_MODULE_PATH){modifiedPremodules.unshift(modules[0]);modifiedPremodules[1]=module;}else{modifiedPremodules.unshift(module);}return modifiedPremodules;}function createVirtualJSModule(modulePath,moduleCode){var sourceCode=moduleCode;var outputData={code:sourceCode,lineCount:(0,_countLines["default"])(sourceCode),map:[]};return{setSource:function setSource(code){sourceCode=code;outputData.code=code;outputData.lineCount=(0,_countLines["default"])(code);},dependencies:new Map(),getSource:function getSource(){return Buffer.from(sourceCode);},inverseDependencies:createSet(),path:modulePath,output:[{type:'js/script/virtual',data:outputData}]};}function getExpoConfig(projectRoot){try{var expoConfig=require('@expo/config');if(expoConfig.getConfig){var _expoConfig$getConfig=expoConfig.getConfig(projectRoot),exp=_expoConfig$getConfig.exp;return{name:typeof exp.name==='string'&&exp.name?exp.name:undefined,version:typeof exp.version==='string'&&exp.version?exp.version:undefined};}}catch(_a){}return{};}
1
+ "use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");var _typeof=require("@babel/runtime/helpers/typeof");Object.defineProperty(exports,"__esModule",{value:true});exports.createDebugIdSnippet=createDebugIdSnippet;exports.createSet=void 0;exports.createVirtualJSModule=createVirtualJSModule;exports.determineDebugIdFromBundleSource=determineDebugIdFromBundleSource;exports.getExpoConfig=getExpoConfig;exports.isDevServerBuild=isDevServerBuild;exports.prependModule=prependModule;exports.stringToUUID=stringToUUID;var _toConsumableArray2=_interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));var crypto=_interopRequireWildcard(require("crypto"));var _countLines=_interopRequireDefault(require("./vendor/metro/countLines"));function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,"default":e};if(null===e||"object"!=_typeof(e)&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t2 in e)"default"!==_t2&&{}.hasOwnProperty.call(e,_t2)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t2))&&(i.get||i.set)?o(f,_t2,i):f[_t2]=e[_t2]);return f;})(e,t);}function isDevServerBuild(graph,options){var transformOptions=graph.transformOptions;if('hot'in transformOptions){return Boolean(transformOptions.hot);}return Boolean(transformOptions.dev)&&options.sourceUrl!=null;}function createDebugIdSnippet(debugId){return"!function(){try{var e=\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]=\"".concat(debugId,"\")}catch(e){}}();");}function stringToUUID(str){var md5sum=crypto.createHash('md5');md5sum.update(str);var md5Hash=md5sum.digest('hex');var v4variant=['8','9','a','b'][md5Hash.substring(16,17).charCodeAt(0)%4];return"".concat(md5Hash.substring(0,8),"-").concat(md5Hash.substring(8,12),"-4").concat(md5Hash.substring(13,16),"-").concat(v4variant).concat(md5Hash.substring(17,20),"-").concat(md5Hash.substring(20)).toLowerCase();}function determineDebugIdFromBundleSource(code){var match=code.match(/_posthogChunkIds\[[^\]]+\]\s*=\s*"([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})"/);return match?match[1]:undefined;}function resolveSetCreator(){var CountingSetFromPrivate=safeRequireCountingSetFromPrivate();if(CountingSetFromPrivate){return function(){return new CountingSetFromPrivate["default"]();};}var CountingSetFromSrc=safeRequireCountingSetFromSrc();if(CountingSetFromSrc){return function(){return new CountingSetFromSrc["default"]();};}return function(){return new Set();};}function safeRequireCountingSetFromSrc(){try{return require('metro/src/lib/CountingSet');}catch(e){return undefined;}}function safeRequireCountingSetFromPrivate(){try{return require('metro/private/lib/CountingSet');}catch(e){return undefined;}}var createSet=exports.createSet=resolveSetCreator();var PRELUDE_MODULE_PATH='__prelude__';function prependModule(modules,module){var modifiedPremodules=(0,_toConsumableArray2["default"])(modules);if(modifiedPremodules.length>0&&modifiedPremodules[0]!==undefined&&modifiedPremodules[0].path===PRELUDE_MODULE_PATH){modifiedPremodules.unshift(modules[0]);modifiedPremodules[1]=module;}else{modifiedPremodules.unshift(module);}return modifiedPremodules;}function createVirtualJSModule(modulePath,moduleCode){var sourceCode=moduleCode;var outputData={code:sourceCode,lineCount:(0,_countLines["default"])(sourceCode),map:[]};return{setSource:function setSource(code){sourceCode=code;outputData.code=code;outputData.lineCount=(0,_countLines["default"])(code);},dependencies:new Map(),getSource:function getSource(){return Buffer.from(sourceCode);},inverseDependencies:createSet(),path:modulePath,output:[{type:'js/script/virtual',data:outputData}]};}function getExpoConfig(projectRoot){try{var expoConfig=require('@expo/config');if(expoConfig.getConfig){var _expoConfig$getConfig=expoConfig.getConfig(projectRoot),exp=_expoConfig$getConfig.exp;return{name:typeof exp.name==='string'&&exp.name?exp.name:undefined,version:typeof exp.version==='string'&&exp.version?exp.version:undefined};}}catch(_a){}return{};}
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/tooling/utils.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,4BAA4B;AAC5B,wGAAwG;AAExG,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAA;AAIhC,OAAO,UAAU,MAAM,2BAA2B,CAAA;AA8BlD;;GAEG;AACH,MAAM,UAAU,oBAAoB,CAAC,OAAe;IAClD,OAAO,mQAAmQ,OAAO,mBAAmB,CAAA;AACtS,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAAC,GAAW;IACtC,MAAM,MAAM,GAAG,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAA;IACvC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;IAClB,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;IAEpC,oFAAoF;IACpF,uBAAuB;IACvB,MAAM,SAAS,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,CAAC,CAAW,CAAA;IAE7F,OAAO,GAAG,OAAO,CAAC,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AI,EAAE,OAAO,GAAG,CAAC,IAAI,KAAK,QAAQ,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;gBACrE,OAAO,EAAE,OAAO,GAAG,CAAC,OAAO,KAAK,QAAQ,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS;aAClF,CAAA;QACH,CAAC;IACH,CAAC;IAAC,WAAM,CAAC;QACP,yCAAyC;IAC3C,CAAC;IAED,OAAO,EAAE,CAAA;AACX,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import type { Module, ReadOnlyGraph } from 'metro';
2
- import type { MetroSerializer } from '../../utils';
2
+ import { type MetroSerializer } from '../../utils';
3
3
  /**
4
4
  * This function ensures that modules in source maps are sorted in the same
5
5
  * order as in a plain JS bundle.
@@ -1 +1 @@
1
- "use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.getSortedModules=exports.createDefaultMetroSerializer=void 0;var _typeof2=_interopRequireDefault(require("@babel/runtime/helpers/typeof"));var _toConsumableArray2=_interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));var _a,_b;var baseJSBundleModule;try{baseJSBundleModule=require('metro/private/DeltaBundler/Serializers/baseJSBundle');}catch(_c){baseJSBundleModule=require('metro/src/DeltaBundler/Serializers/baseJSBundle');}var baseJSBundle=typeof baseJSBundleModule==='function'?baseJSBundleModule:(_a=baseJSBundleModule===null||baseJSBundleModule===void 0?void 0:baseJSBundleModule.baseJSBundle)!==null&&_a!==void 0?_a:baseJSBundleModule===null||baseJSBundleModule===void 0?void 0:baseJSBundleModule["default"];var sourceMapString;try{var sourceMapStringModule=require('metro/private/DeltaBundler/Serializers/sourceMapString');sourceMapString=sourceMapStringModule.sourceMapString;}catch(e){sourceMapString=require('metro/src/DeltaBundler/Serializers/sourceMapString');if('sourceMapString'in sourceMapString){sourceMapString=sourceMapString.sourceMapString;}}var bundleToStringModule;try{bundleToStringModule=require('metro/private/lib/bundleToString');}catch(_d){bundleToStringModule=require('metro/src/lib/bundleToString');}var bundleToString=typeof bundleToStringModule==='function'?bundleToStringModule:(_b=bundleToStringModule===null||bundleToStringModule===void 0?void 0:bundleToStringModule.bundleToString)!==null&&_b!==void 0?_b:bundleToStringModule===null||bundleToStringModule===void 0?void 0:bundleToStringModule["default"];var getSortedModules=exports.getSortedModules=function getSortedModules(graph,_ref){var createModuleId=_ref.createModuleId;var modules=(0,_toConsumableArray2["default"])(graph.dependencies.values());return modules.sort(function(a,b){return createModuleId(a.path)-createModuleId(b.path);});};var createDefaultMetroSerializer=exports.createDefaultMetroSerializer=function createDefaultMetroSerializer(){return function(entryPoint,premodules,graph,options){var bundle=(baseJSBundle["default"]||baseJSBundle)(entryPoint,premodules,graph,options);var serializerOptions=options;if(serializerOptions.posthogBundleCallback&&!graph.transformOptions.hot){bundle=serializerOptions.posthogBundleCallback(bundle);}var _ref2=(bundleToString["default"]||bundleToString)(bundle),code=_ref2.code;if(graph.transformOptions.hot){return code;}var sourceMapStringFunction;if(typeof sourceMapString==='function'){sourceMapStringFunction=sourceMapString;}else if((0,_typeof2["default"])(sourceMapString)==='object'&&sourceMapString!=null&&'sourceMapString'in sourceMapString&&typeof sourceMapString['sourceMapString']==='function'){sourceMapStringFunction=sourceMapString.sourceMapString;}else{throw new Error("\n[posthog-react-native/metro] Can't find sourceMapString function in 'metro/src/DeltaBundler/Serializers/sourceMapString'.\nPlease check the version of Metro you are using and report the issue at https://github.com/postHog/posthog-js\n");}var map=(sourceMapStringFunction["default"]||sourceMapStringFunction)([].concat((0,_toConsumableArray2["default"])(premodules),(0,_toConsumableArray2["default"])(getSortedModules(graph,options))),{processModuleFilter:options.processModuleFilter,shouldAddToIgnoreList:options.shouldAddToIgnoreList||function(){return false;}});return{code:code,map:map};};};
1
+ "use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.getSortedModules=exports.createDefaultMetroSerializer=void 0;var _typeof2=_interopRequireDefault(require("@babel/runtime/helpers/typeof"));var _toConsumableArray2=_interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));var _utils=require("../../utils");var _a,_b;var baseJSBundleModule;try{baseJSBundleModule=require('metro/private/DeltaBundler/Serializers/baseJSBundle');}catch(_c){baseJSBundleModule=require('metro/src/DeltaBundler/Serializers/baseJSBundle');}var baseJSBundle=typeof baseJSBundleModule==='function'?baseJSBundleModule:(_a=baseJSBundleModule===null||baseJSBundleModule===void 0?void 0:baseJSBundleModule.baseJSBundle)!==null&&_a!==void 0?_a:baseJSBundleModule===null||baseJSBundleModule===void 0?void 0:baseJSBundleModule["default"];var sourceMapString;try{var sourceMapStringModule=require('metro/private/DeltaBundler/Serializers/sourceMapString');sourceMapString=sourceMapStringModule.sourceMapString;}catch(e){sourceMapString=require('metro/src/DeltaBundler/Serializers/sourceMapString');if('sourceMapString'in sourceMapString){sourceMapString=sourceMapString.sourceMapString;}}var bundleToStringModule;try{bundleToStringModule=require('metro/private/lib/bundleToString');}catch(_d){bundleToStringModule=require('metro/src/lib/bundleToString');}var bundleToString=typeof bundleToStringModule==='function'?bundleToStringModule:(_b=bundleToStringModule===null||bundleToStringModule===void 0?void 0:bundleToStringModule.bundleToString)!==null&&_b!==void 0?_b:bundleToStringModule===null||bundleToStringModule===void 0?void 0:bundleToStringModule["default"];var getSortedModules=exports.getSortedModules=function getSortedModules(graph,_ref){var createModuleId=_ref.createModuleId;var modules=(0,_toConsumableArray2["default"])(graph.dependencies.values());return modules.sort(function(a,b){return createModuleId(a.path)-createModuleId(b.path);});};var createDefaultMetroSerializer=exports.createDefaultMetroSerializer=function createDefaultMetroSerializer(){return function(entryPoint,premodules,graph,options){var bundle=(baseJSBundle["default"]||baseJSBundle)(entryPoint,premodules,graph,options);var serializerOptions=options;if(serializerOptions.posthogBundleCallback&&!(0,_utils.isDevServerBuild)(graph,options)){bundle=serializerOptions.posthogBundleCallback(bundle);}var _ref2=(bundleToString["default"]||bundleToString)(bundle),code=_ref2.code;if((0,_utils.isDevServerBuild)(graph,options)){return code;}var sourceMapStringFunction;if(typeof sourceMapString==='function'){sourceMapStringFunction=sourceMapString;}else if((0,_typeof2["default"])(sourceMapString)==='object'&&sourceMapString!=null&&'sourceMapString'in sourceMapString&&typeof sourceMapString['sourceMapString']==='function'){sourceMapStringFunction=sourceMapString.sourceMapString;}else{throw new Error("\n[posthog-react-native/metro] Can't find sourceMapString function in 'metro/src/DeltaBundler/Serializers/sourceMapString'.\nPlease check the version of Metro you are using and report the issue at https://github.com/postHog/posthog-js\n");}var map=(sourceMapStringFunction["default"]||sourceMapStringFunction)([].concat((0,_toConsumableArray2["default"])(premodules),(0,_toConsumableArray2["default"])(getSortedModules(graph,options))),{processModuleFilter:options.processModuleFilter,shouldAddToIgnoreList:options.shouldAddToIgnoreList||function(){return false;}});return{code:code,map:map};};};
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/tooling/vendor/metro/utils.ts"],"names":[],"mappings":"AAAA,2CAA2C;;AAiC3C,IAAI,kBAAuB,CAAA;AAC3B,IAAI,CAAC;IACH,iEAAiE;IACjE,kBAAkB,GAAG,OAAO,CAAC,qDAAqD,CAAC,CAAA;AACrF,CAAC;AAAC,WAAM,CAAC;IACP,iEAAiE;IACjE,kBAAkB,GAAG,OAAO,CAAC,iDAAiD,CAAC,CAAA;AACjF,CAAC;AAED,MAAM,YAAY,GAChB,OAAO,kBAAkB,KAAK,UAAU;IACtC,CAAC,CAAC,kBAAkB;IACpB,CAAC,CAAC,sEAAsE;QACtE,CAAC,MAAA,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,YAAY,mCAAI,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,OAAO,CAAC,CAAA;AAEvE,IAAI,eAA2C,CAAA;AAC/C,IAAI,C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package/dist/version.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.version=void 0;var version=exports.version="4.67.0";
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.version=void 0;var version=exports.version="4.67.2";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "posthog-react-native",
3
- "version": "4.67.0",
3
+ "version": "4.67.2",
4
4
  "bugs": {
5
5
  "url": "https://github.com/PostHog/posthog-js/issues"
6
6
  },
@@ -34,8 +34,8 @@
34
34
  "directory": "packages/react-native"
35
35
  },
36
36
  "dependencies": {
37
- "@posthog/core": "^1.50.3",
38
- "@posthog/types": "^1.408.1"
37
+ "@posthog/core": "^1.50.6",
38
+ "@posthog/types": "^1.409.1"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@babel/cli": "^7.19.3",
@@ -72,9 +72,9 @@
72
72
  "typescript": "5.8.2",
73
73
  "@vitest/coverage-v8": "^1.6.1",
74
74
  "vitest": "^1.6.1",
75
- "@posthog-tooling/rollup-utils": "1.1.1",
76
75
  "@posthog-tooling/tsconfig-base": "1.1.1",
77
- "@posthog/react-native-plugin": "2.5.1"
76
+ "@posthog-tooling/rollup-utils": "1.1.1",
77
+ "@posthog/react-native-plugin": "2.5.2"
78
78
  },
79
79
  "peerDependencies": {
80
80
  "@react-native-async-storage/async-storage": ">=1.0.0",