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AQ,GAAG,CAAC,EAAE;YACxB,MAAM,IAAI,UAAU,CAAC,eAAe,EAAE,kCAAkC,CAAC,CAAC;SAC3E;QAED,qBAAqB,CAAC,YAAY,CAAC,CAAC;QACpC,MAAM,kBAAkB,GAAG,oBAAoB,CAAC,YAAY,CAAC,CAAC;QAE9D,OAAO,qBAAqB,CAAC,6BAA6B,CAAC,kBAAkB,EAAE,OAAO,CAAC,CAAC;IAC1F,CAAC;CACF,CAAC;AAEF,SAAS,kBAAkB,CAAC,QAAgB,EAAE,GAAW,EAAE,GAAW;IACpE,OAAO,QAAQ,IAAI,GAAG,IAAI,QAAQ,IAAI,GAAG,CAAC;AAC5C,CAAC","sourcesContent":["import { CodedError, RCTDeviceEventEmitter, UnavailabilityError } from '@unimodules/core';\nimport Constants from 'expo-constants';\nimport { EventEmitter, EventSubscription } from 'fbemitter';\nimport invariant from 'invariant';\nimport { Platform } from 'react-native';\n\nimport ExponentNotifications from './ExponentNotifications';\nimport {\n Notification,\n LocalNotification,\n Channel,\n ActionType,\n LocalNotificationId,\n} from './Notifications.types';\nimport Storage from './Storage';\n\nlet _emitter;\nlet _initialNotification;\n\nfunction _maybeInitEmitter() {\n if (!_emitter) {\n _emitter = new EventEmitter();\n RCTDeviceEventEmitter.addListener('Exponent.notification', emitNotification);\n }\n}\n\nexport function emitNotification(notification) {\n if (typeof notification === 'string') {\n notification = JSON.parse(notification);\n }\n\n /* Don't mutate the original notification */\n notification = { ...notification };\n\n if (typeof notification.data === 'string') {\n try {\n notification.data = JSON.parse(notification.data);\n } catch (e) {\n // It's actually just a string, that's fine\n }\n }\n\n _emitter.emit('notification', notification);\n}\n\nfunction _processNotification(notification) {\n notification = Object.assign({}, notification);\n\n if (!notification.data) {\n notification.data = {};\n }\n\n if (notification.hasOwnProperty('count')) {\n delete notification.count;\n }\n\n // Delete any Android properties on iOS and merge the iOS properties on root notification object\n if (Platform.OS === 'ios') {\n if (notification.android) {\n delete notification.android;\n }\n\n if (notification.ios) {\n notification = Object.assign(notification, notification.ios);\n notification.data._displayInForeground = notification.ios._displayInForeground;\n delete notification.ios;\n }\n }\n\n // Delete any iOS properties on Android and merge the Android properties on root notification\n // object\n if (Platform.OS === 'android') {\n if (notification.ios) {\n delete notification.ios;\n }\n\n if (notification.android) {\n notification = Object.assign(notification, notification.android);\n delete notification.android;\n }\n }\n\n return notification;\n}\n\nfunction _validateNotification(notification) {\n if (Platform.OS === 'ios') {\n invariant(\n !!notification.title && !!notification.body,\n 'Local notifications on iOS require both a title and a body'\n );\n } else if (Platform.OS === 'android') {\n invariant(!!notification.title, 'Local notifications on Android require a title');\n }\n}\n\nconst ASYNC_STORAGE_PREFIX = '__expo_internal_channel_';\n// TODO: remove this before releasing\n// this will always be `true` for SDK 28+\nconst IS_USING_NEW_BINARY =\n ExponentNotifications && typeof ExponentNotifications.createChannel === 'function';\n\nasync function _legacyReadChannel(id: string): Promise<Channel | null> {\n try {\n const channelString = await Storage.getItem(`${ASYNC_STORAGE_PREFIX}${id}`);\n if (channelString) {\n return JSON.parse(channelString);\n }\n } catch (e) {}\n return null;\n}\n\nfunction _legacyDeleteChannel(id: string): Promise<void> {\n return Storage.removeItem(`${ASYNC_STORAGE_PREFIX}${id}`);\n}\n\nif (Platform.OS === 'android') {\n Storage.clear = async function(callback?: (error?: Error) => void): Promise<void> {\n try {\n const keys = await Storage.getAllKeys();\n if (keys && keys.length) {\n const filteredKeys = keys.filter(key => !key.startsWith(ASYNC_STORAGE_PREFIX));\n await Storage.multiRemove(filteredKeys);\n }\n callback && callback();\n } catch (e) {\n callback && callback(e);\n throw e;\n }\n };\n}\n\n// This codepath will never be triggered in SDK 28 and above\n// TODO: remove before releasing\nfunction _legacySaveChannel(id: string, channel: Channel): Promise<void> {\n return Storage.setItem(`${ASYNC_STORAGE_PREFIX}${id}`, JSON.stringify(channel));\n}\n\nexport default {\n /* Only used internally to initialize the notification from top level props */\n _setInitialNotification(notification: Notification) {\n _initialNotification = notification;\n },\n\n // User passes set of actions titles.\n createCategoryAsync(\n categoryId: string,\n actions: ActionType[],\n previewPlaceholder?: string\n ): Promise<void> {\n return Platform.OS === 'ios'\n ? ExponentNotifications.createCategoryAsync(categoryId, actions, previewPlaceholder)\n : ExponentNotifications.createCategoryAsync(categoryId, actions);\n },\n\n deleteCategoryAsync(categoryId: string): Promise<void> {\n return ExponentNotifications.deleteCategoryAsync(categoryId);\n },\n\n /* Re-export */\n getExpoPushTokenAsync(): Promise<string> {\n if (!ExponentNotifications.getExponentPushTokenAsync) {\n throw new UnavailabilityError('Expo.Notifications', 'getExpoPushTokenAsync');\n }\n if (!Constants.isDevice) {\n throw new Error(`Must be on a physical device to get an Expo Push Token`);\n }\n return ExponentNotifications.getExponentPushTokenAsync();\n },\n\n getDevicePushTokenAsync: (config: {\n gcmSenderId?: string;\n }): Promise<{ type: string; data: string }> => {\n if (!ExponentNotifications.getDevicePushTokenAsync) {\n throw new UnavailabilityError('Expo.Notifications', 'getDevicePushTokenAsync');\n }\n return ExponentNotifications.getDevicePushTokenAsync(config || {});\n },\n\n createChannelAndroidAsync(id: string, channel: Channel): Promise<void> {\n if (Platform.OS !== 'android') {\n console.warn(`createChannelAndroidAsync(...) has no effect on ${Platform.OS}`);\n return Promise.resolve();\n }\n // This codepath will never be triggered in SDK 28 and above\n // TODO: remove before releasing\n if (!IS_USING_NEW_BINARY) {\n return _legacySaveChannel(id, channel);\n }\n return ExponentNotifications.createChannel(id, channel);\n },\n\n deleteChannelAndroidAsync(id: string): Promise<void> {\n if (Platform.OS !== 'android') {\n console.warn(`deleteChannelAndroidAsync(...) has no effect on ${Platform.OS}`);\n return Promise.resolve();\n }\n // This codepath will never be triggered in SDK 28 and above\n // TODO: remove before releasing\n if (!IS_USING_NEW_BINARY) {\n return Promise.resolve();\n }\n return ExponentNotifications.deleteChannel(id);\n },\n\n /* Shows a notification instantly */\n async presentLocalNotificationAsync(\n notification: LocalNotification\n ): Promise<LocalNotificationId> {\n _validateNotification(notification);\n const nativeNotification = _processNotification(notification);\n\n if (Platform.OS !== 'android') {\n return await ExponentNotifications.presentLocalNotification(nativeNotification);\n } else {\n let _channel;\n if (nativeNotification.channelId) {\n _channel = await _legacyReadChannel(nativeNotification.channelId);\n }\n\n if (IS_USING_NEW_BINARY) {\n // delete the legacy channel from AsyncStorage so this codepath isn't triggered anymore\n _legacyDeleteChannel(nativeNotification.channelId);\n return ExponentNotifications.presentLocalNotificationWithChannel(\n nativeNotification,\n _channel\n );\n } else {\n // TODO: remove this codepath before releasing, it will never be triggered on SDK 28+\n // channel does not actually exist, so add its settings to the individual notification\n if (_channel) {\n nativeNotification.sound = _channel.sound;\n nativeNotification.priority = _channel.priority;\n nativeNotification.vibrate = _channel.vibrate;\n }\n return ExponentNotifications.presentLocalNotification(nativeNotification);\n }\n }\n },\n\n /* Schedule a notification at a later date */\n async scheduleLocalNotificationAsync(\n notification: LocalNotification,\n options: {\n time?: Date | number;\n repeat?: 'minute' | 'hour' | 'day' | 'week' | 'month' | 'year';\n intervalMs?: number;\n } = {}\n ): Promise<LocalNotificationId> {\n // set now at the beginning of the method, to prevent potential weird warnings when we validate\n // options.time later on\n const now = Date.now();\n\n // Validate and process the notification data\n _validateNotification(notification);\n const nativeNotification = _processNotification(notification);\n\n // Validate `options.time`\n if (options.time) {\n let timeAsDateObj: Date | null = null;\n if (options.time && typeof options.time === 'number') {\n timeAsDateObj = new Date(options.time);\n if (timeAsDateObj.toString() === 'Invalid Date') {\n timeAsDateObj = null;\n }\n } else if (options.time && options.time instanceof Date) {\n timeAsDateObj = options.time;\n }\n\n // If we couldn't convert properly, throw an error\n if (!timeAsDateObj) {\n throw new Error(\n `Provided value for \"time\" is invalid. Please verify that it's either a number representing Unix Epoch time in milliseconds, or a valid date object.`\n );\n }\n\n // If someone passes in a value that is too small, say, by an order of 1000 (it's common to\n // accidently pass seconds instead of ms), display a warning.\n if (timeAsDateObj.getTime() < now) {\n console.warn(\n `Provided value for \"time\" is before the current date. Did you possibly pass number of seconds since Unix Epoch instead of number of milliseconds?`\n );\n }\n\n options = {\n ...options,\n time: timeAsDateObj.getTime(),\n };\n }\n\n if (options.intervalMs != null && options.repeat != null) {\n throw new Error(`Pass either the \"repeat\" option or \"intervalMs\" option, not both`);\n }\n\n // Validate options.repeat\n if (options.repeat != null) {\n const validOptions = new Set(['minute', 'hour', 'day', 'week', 'month', 'year']);\n if (!validOptions.has(options.repeat)) {\n throw new Error(\n `Pass one of ['minute', 'hour', 'day', 'week', 'month', 'year'] as the value for the \"repeat\" option`\n );\n }\n }\n\n if (options.intervalMs != null) {\n if (Platform.OS === 'ios') {\n throw new Error(`The \"intervalMs\" option is not supported on iOS`);\n }\n\n if (options.intervalMs <= 0 || !Number.isInteger(options.intervalMs)) {\n throw new Error(\n `Pass an integer greater than zero as the value for the \"intervalMs\" option`\n );\n }\n }\n\n if (Platform.OS !== 'android') {\n if (options.repeat) {\n console.warn(\n 'Ability to schedule an automatically repeated notification is deprecated on iOS and will be removed in the next SDK release.'\n );\n return ExponentNotifications.legacyScheduleLocalRepeatingNotification(\n nativeNotification,\n options\n );\n }\n\n return ExponentNotifications.scheduleLocalNotification(nativeNotification, options);\n } else {\n let _channel;\n if (nativeNotification.channelId) {\n _channel = await _legacyReadChannel(nativeNotification.channelId);\n }\n\n if (IS_USING_NEW_BINARY) {\n // delete the legacy channel from AsyncStorage so this codepath isn't triggered anymore\n _legacyDeleteChannel(nativeNotification.channelId);\n return ExponentNotifications.scheduleLocalNotificationWithChannel(\n nativeNotification,\n options,\n _channel\n );\n } else {\n // TODO: remove this codepath before releasing, it will never be triggered on SDK 28+\n // channel does not actually exist, so add its settings to the individual notification\n if (_channel) {\n nativeNotification.sound = _channel.sound;\n nativeNotification.priority = _channel.priority;\n nativeNotification.vibrate = _channel.vibrate;\n }\n return ExponentNotifications.scheduleLocalNotification(nativeNotification, options);\n }\n }\n },\n\n /* Dismiss currently shown notification with ID (Android only) */\n async dismissNotificationAsync(notificationId: LocalNotificationId): Promise<void> {\n if (!ExponentNotifications.dismissNotification) {\n throw new UnavailabilityError('Expo.Notifications', 'dismissNotification');\n }\n return await ExponentNotifications.dismissNotification(notificationId);\n },\n\n /* Dismiss all currently shown notifications (Android only) */\n async dismissAllNotificationsAsync(): Promise<void> {\n if (!ExponentNotifications.dismissAllNotifications) {\n throw new UnavailabilityError('Expo.Notifications', 'dismissAllNotifications');\n }\n return await ExponentNotifications.dismissAllNotifications();\n },\n\n /* Cancel scheduled notification notification with ID */\n cancelScheduledNotificationAsync(notificationId: LocalNotificationId): Promise<void> {\n if (Platform.OS === 'android' && typeof notificationId === 'string') {\n return ExponentNotifications.cancelScheduledNotificationWithStringIdAsync(notificationId);\n }\n return ExponentNotifications.cancelScheduledNotificationAsync(notificationId);\n },\n\n /* Cancel all scheduled notifications */\n cancelAllScheduledNotificationsAsync(): Promise<void> {\n return ExponentNotifications.cancelAllScheduledNotificationsAsync();\n },\n\n /* Primary public api */\n addListener(listener: (notification: Notification) => unknown): EventSubscription {\n _maybeInitEmitter();\n\n if (_initialNotification) {\n const initialNotification = _initialNotification;\n _initialNotification = null;\n setTimeout(() => {\n emitNotification(initialNotification);\n }, 0);\n }\n\n return _emitter.addListener('notification', listener);\n },\n\n async getBadgeNumberAsync(): Promise<number> {\n if (!ExponentNotifications.getBadgeNumberAsync) {\n return 0;\n }\n return ExponentNotifications.getBadgeNumberAsync();\n },\n\n async setBadgeNumberAsync(number: number): Promise<void> {\n if (!ExponentNotifications.setBadgeNumberAsync) {\n throw new UnavailabilityError('Expo.Notifications', 'setBadgeNumberAsync');\n }\n return ExponentNotifications.setBadgeNumberAsync(number);\n },\n\n async scheduleNotificationWithCalendarAsync(\n notification: LocalNotification,\n options: {\n year?: number;\n month?: number;\n hour?: number;\n day?: number;\n minute?: number;\n second?: number;\n weekDay?: number;\n repeat?: boolean;\n } = {}\n ): Promise<string> {\n const areOptionsValid: boolean =\n (options.month == null || isInRangeInclusive(options.month, 1, 12)) &&\n (options.day == null || isInRangeInclusive(options.day, 1, 31)) &&\n (options.hour == null || isInRangeInclusive(options.hour, 0, 23)) &&\n (options.minute == null || isInRangeInclusive(options.minute, 0, 59)) &&\n (options.second == null || isInRangeInclusive(options.second, 0, 59)) &&\n (options.weekDay == null || isInRangeInclusive(options.weekDay, 1, 7)) &&\n (options.weekDay == null || options.day == null);\n\n if (!areOptionsValid) {\n throw new CodedError(\n 'WRONG_OPTIONS',\n 'Options in scheduleNotificationWithCalendarAsync call were incorrect!'\n );\n }\n\n _validateNotification(notification);\n const nativeNotification = _processNotification(notification);\n\n return ExponentNotifications.scheduleNotificationWithCalendar(nativeNotification, options);\n },\n\n async scheduleNotificationWithTimerAsync(\n notification: LocalNotification,\n options: {\n interval: number;\n repeat?: boolean;\n }\n ): Promise<string> {\n if (options.interval < 1) {\n throw new CodedError('WRONG_OPTIONS', 'Interval must be not less then 1');\n }\n\n _validateNotification(notification);\n const nativeNotification = _processNotification(notification);\n\n return ExponentNotifications.scheduleNotificationWithTimer(nativeNotification, options);\n },\n};\n\nfunction isInRangeInclusive(variable: number, min: number, max: number): boolean {\n return variable >= min && variable <= max;\n}\n"]}
\No newline at end of file