react-native-google-mobile-ads 8.2.0 → 8.2.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.
Files changed (268) hide show
  1. package/docs/european-user-consent.mdx +19 -0
  2. package/ios_config.sh +2 -2
  3. package/lib/commonjs/AdEventType.js +2 -1
  4. package/lib/commonjs/AdEventType.js.map +1 -1
  5. package/lib/commonjs/AdsConsent.js.map +1 -1
  6. package/lib/commonjs/AdsConsentDebugGeography.js.map +1 -1
  7. package/lib/commonjs/AdsConsentPurposes.js +2 -1
  8. package/lib/commonjs/AdsConsentPurposes.js.map +1 -1
  9. package/lib/commonjs/AdsConsentSpecialFeatures.js +2 -1
  10. package/lib/commonjs/AdsConsentSpecialFeatures.js.map +1 -1
  11. package/lib/commonjs/AdsConsentStatus.js.map +1 -1
  12. package/lib/commonjs/BannerAdSize.js +2 -1
  13. package/lib/commonjs/BannerAdSize.js.map +1 -1
  14. package/lib/commonjs/GAMAdEventType.js +2 -1
  15. package/lib/commonjs/GAMAdEventType.js.map +1 -1
  16. package/lib/commonjs/MaxAdContentRating.js +2 -1
  17. package/lib/commonjs/MaxAdContentRating.js.map +1 -1
  18. package/lib/commonjs/MobileAds.js.map +1 -1
  19. package/lib/commonjs/RewardedAdEventType.js +2 -1
  20. package/lib/commonjs/RewardedAdEventType.js.map +1 -1
  21. package/lib/commonjs/TestIds.js.map +1 -1
  22. package/lib/commonjs/ads/AppOpenAd.js.map +1 -1
  23. package/lib/commonjs/ads/BannerAd.js.map +1 -1
  24. package/lib/commonjs/ads/BaseAd.js.map +1 -1
  25. package/lib/commonjs/ads/GAMBannerAd.js.map +1 -1
  26. package/lib/commonjs/ads/GAMInterstitialAd.js.map +1 -1
  27. package/lib/commonjs/ads/InterstitialAd.js.map +1 -1
  28. package/lib/commonjs/ads/MobileAd.js.map +1 -1
  29. package/lib/commonjs/ads/RewardedAd.js.map +1 -1
  30. package/lib/commonjs/ads/RewardedInterstitialAd.js.map +1 -1
  31. package/lib/commonjs/common/Base64.js.map +1 -1
  32. package/lib/commonjs/common/MutatableParams.js.map +1 -1
  33. package/lib/commonjs/common/ReferenceBase.js.map +1 -1
  34. package/lib/commonjs/common/deeps.js.map +1 -1
  35. package/lib/commonjs/common/id.js.map +1 -1
  36. package/lib/commonjs/common/index.js.map +1 -1
  37. package/lib/commonjs/common/path.js.map +1 -1
  38. package/lib/commonjs/common/promise.js.map +1 -1
  39. package/lib/commonjs/common/serialize.js.map +1 -1
  40. package/lib/commonjs/common/validate.js.map +1 -1
  41. package/lib/commonjs/declarations.d.js.map +1 -1
  42. package/lib/commonjs/hooks/useAppOpenAd.js.map +1 -1
  43. package/lib/commonjs/hooks/useFullScreenAd.js.map +1 -1
  44. package/lib/commonjs/hooks/useInterstitialAd.js.map +1 -1
  45. package/lib/commonjs/hooks/useRewardedAd.js.map +1 -1
  46. package/lib/commonjs/hooks/useRewardedInterstitialAd.js.map +1 -1
  47. package/lib/commonjs/index.js.map +1 -1
  48. package/lib/commonjs/internal/GoogleMobileAdsNativeEventEmitter.js.map +1 -1
  49. package/lib/commonjs/internal/Module.js.map +1 -1
  50. package/lib/commonjs/internal/NativeError.js.map +1 -1
  51. package/lib/commonjs/internal/SharedEventEmitter.js.map +1 -1
  52. package/lib/commonjs/internal/index.js.map +1 -1
  53. package/lib/commonjs/internal/registry/nativeModule.js.map +1 -1
  54. package/lib/commonjs/types/AdEventListener.js.map +1 -1
  55. package/lib/commonjs/types/AdEventsListener.js.map +1 -1
  56. package/lib/commonjs/types/AdShowOptions.js.map +1 -1
  57. package/lib/commonjs/types/AdStates.js.map +1 -1
  58. package/lib/commonjs/types/AdapterStatus.js +4 -3
  59. package/lib/commonjs/types/AdapterStatus.js.map +1 -1
  60. package/lib/commonjs/types/AdsConsent.interface.js.map +1 -1
  61. package/lib/commonjs/types/AppEvent.js.map +1 -1
  62. package/lib/commonjs/types/BannerAdProps.js.map +1 -1
  63. package/lib/commonjs/types/GoogleMobileAdsNativeModule.js.map +1 -1
  64. package/lib/commonjs/types/MobileAd.interface.js.map +1 -1
  65. package/lib/commonjs/types/MobileAdsModule.interface.js.map +1 -1
  66. package/lib/commonjs/types/Module.interface.js.map +1 -1
  67. package/lib/commonjs/types/RequestConfiguration.js.map +1 -1
  68. package/lib/commonjs/types/RequestOptions.js.map +1 -1
  69. package/lib/commonjs/types/RewardedAdReward.js.map +1 -1
  70. package/lib/commonjs/types/index.js.map +1 -1
  71. package/lib/commonjs/validateAdRequestConfiguration.js.map +1 -1
  72. package/lib/commonjs/validateAdRequestOptions.js.map +1 -1
  73. package/lib/commonjs/validateAdShowOptions.js.map +1 -1
  74. package/lib/commonjs/version.js +1 -1
  75. package/lib/commonjs/version.js.map +1 -1
  76. package/lib/module/AdEventType.js.map +1 -1
  77. package/lib/module/AdsConsent.js.map +1 -1
  78. package/lib/module/AdsConsentDebugGeography.js.map +1 -1
  79. package/lib/module/AdsConsentPurposes.js.map +1 -1
  80. package/lib/module/AdsConsentSpecialFeatures.js.map +1 -1
  81. package/lib/module/AdsConsentStatus.js.map +1 -1
  82. package/lib/module/BannerAdSize.js.map +1 -1
  83. package/lib/module/GAMAdEventType.js.map +1 -1
  84. package/lib/module/MaxAdContentRating.js.map +1 -1
  85. package/lib/module/MobileAds.js.map +1 -1
  86. package/lib/module/RewardedAdEventType.js.map +1 -1
  87. package/lib/module/TestIds.js.map +1 -1
  88. package/lib/module/ads/AppOpenAd.js.map +1 -1
  89. package/lib/module/ads/BannerAd.js.map +1 -1
  90. package/lib/module/ads/BaseAd.js.map +1 -1
  91. package/lib/module/ads/GAMBannerAd.js.map +1 -1
  92. package/lib/module/ads/GAMInterstitialAd.js.map +1 -1
  93. package/lib/module/ads/InterstitialAd.js.map +1 -1
  94. package/lib/module/ads/MobileAd.js.map +1 -1
  95. package/lib/module/ads/RewardedAd.js.map +1 -1
  96. package/lib/module/ads/RewardedInterstitialAd.js.map +1 -1
  97. package/lib/module/common/Base64.js.map +1 -1
  98. package/lib/module/common/MutatableParams.js.map +1 -1
  99. package/lib/module/common/ReferenceBase.js.map +1 -1
  100. package/lib/module/common/deeps.js.map +1 -1
  101. package/lib/module/common/id.js.map +1 -1
  102. package/lib/module/common/index.js.map +1 -1
  103. package/lib/module/common/path.js.map +1 -1
  104. package/lib/module/common/promise.js.map +1 -1
  105. package/lib/module/common/serialize.js.map +1 -1
  106. package/lib/module/common/validate.js.map +1 -1
  107. package/lib/module/declarations.d.js.map +1 -1
  108. package/lib/module/hooks/useAppOpenAd.js.map +1 -1
  109. package/lib/module/hooks/useFullScreenAd.js.map +1 -1
  110. package/lib/module/hooks/useInterstitialAd.js.map +1 -1
  111. package/lib/module/hooks/useRewardedAd.js.map +1 -1
  112. package/lib/module/hooks/useRewardedInterstitialAd.js.map +1 -1
  113. package/lib/module/index.js.map +1 -1
  114. package/lib/module/internal/GoogleMobileAdsNativeEventEmitter.js.map +1 -1
  115. package/lib/module/internal/Module.js.map +1 -1
  116. package/lib/module/internal/NativeError.js.map +1 -1
  117. package/lib/module/internal/SharedEventEmitter.js.map +1 -1
  118. package/lib/module/internal/index.js.map +1 -1
  119. package/lib/module/internal/registry/nativeModule.js.map +1 -1
  120. package/lib/module/types/AdEventListener.js.map +1 -1
  121. package/lib/module/types/AdEventsListener.js.map +1 -1
  122. package/lib/module/types/AdShowOptions.js.map +1 -1
  123. package/lib/module/types/AdStates.js.map +1 -1
  124. package/lib/module/types/AdapterStatus.js.map +1 -1
  125. package/lib/module/types/AdsConsent.interface.js.map +1 -1
  126. package/lib/module/types/AppEvent.js.map +1 -1
  127. package/lib/module/types/BannerAdProps.js.map +1 -1
  128. package/lib/module/types/GoogleMobileAdsNativeModule.js.map +1 -1
  129. package/lib/module/types/MobileAd.interface.js.map +1 -1
  130. package/lib/module/types/MobileAdsModule.interface.js.map +1 -1
  131. package/lib/module/types/Module.interface.js.map +1 -1
  132. package/lib/module/types/RequestConfiguration.js.map +1 -1
  133. package/lib/module/types/RequestOptions.js.map +1 -1
  134. package/lib/module/types/RewardedAdReward.js.map +1 -1
  135. package/lib/module/types/index.js.map +1 -1
  136. package/lib/module/validateAdRequestConfiguration.js.map +1 -1
  137. package/lib/module/validateAdRequestOptions.js.map +1 -1
  138. package/lib/module/validateAdShowOptions.js.map +1 -1
  139. package/lib/module/version.js +1 -1
  140. package/lib/module/version.js.map +1 -1
  141. package/lib/typescript/AdEventType.d.ts +1 -0
  142. package/lib/typescript/AdEventType.d.ts.map +1 -0
  143. package/lib/typescript/AdsConsent.d.ts +1 -0
  144. package/lib/typescript/AdsConsent.d.ts.map +1 -0
  145. package/lib/typescript/AdsConsentDebugGeography.d.ts +1 -0
  146. package/lib/typescript/AdsConsentDebugGeography.d.ts.map +1 -0
  147. package/lib/typescript/AdsConsentPurposes.d.ts +1 -0
  148. package/lib/typescript/AdsConsentPurposes.d.ts.map +1 -0
  149. package/lib/typescript/AdsConsentSpecialFeatures.d.ts +1 -0
  150. package/lib/typescript/AdsConsentSpecialFeatures.d.ts.map +1 -0
  151. package/lib/typescript/AdsConsentStatus.d.ts +1 -0
  152. package/lib/typescript/AdsConsentStatus.d.ts.map +1 -0
  153. package/lib/typescript/BannerAdSize.d.ts +1 -0
  154. package/lib/typescript/BannerAdSize.d.ts.map +1 -0
  155. package/lib/typescript/GAMAdEventType.d.ts +1 -0
  156. package/lib/typescript/GAMAdEventType.d.ts.map +1 -0
  157. package/lib/typescript/MaxAdContentRating.d.ts +1 -0
  158. package/lib/typescript/MaxAdContentRating.d.ts.map +1 -0
  159. package/lib/typescript/MobileAds.d.ts +1 -0
  160. package/lib/typescript/MobileAds.d.ts.map +1 -0
  161. package/lib/typescript/RewardedAdEventType.d.ts +1 -0
  162. package/lib/typescript/RewardedAdEventType.d.ts.map +1 -0
  163. package/lib/typescript/TestIds.d.ts +1 -0
  164. package/lib/typescript/TestIds.d.ts.map +1 -0
  165. package/lib/typescript/ads/AppOpenAd.d.ts +1 -0
  166. package/lib/typescript/ads/AppOpenAd.d.ts.map +1 -0
  167. package/lib/typescript/ads/BannerAd.d.ts +1 -0
  168. package/lib/typescript/ads/BannerAd.d.ts.map +1 -0
  169. package/lib/typescript/ads/BaseAd.d.ts +1 -0
  170. package/lib/typescript/ads/BaseAd.d.ts.map +1 -0
  171. package/lib/typescript/ads/GAMBannerAd.d.ts +1 -0
  172. package/lib/typescript/ads/GAMBannerAd.d.ts.map +1 -0
  173. package/lib/typescript/ads/GAMInterstitialAd.d.ts +1 -0
  174. package/lib/typescript/ads/GAMInterstitialAd.d.ts.map +1 -0
  175. package/lib/typescript/ads/InterstitialAd.d.ts +1 -0
  176. package/lib/typescript/ads/InterstitialAd.d.ts.map +1 -0
  177. package/lib/typescript/ads/MobileAd.d.ts +1 -0
  178. package/lib/typescript/ads/MobileAd.d.ts.map +1 -0
  179. package/lib/typescript/ads/RewardedAd.d.ts +1 -0
  180. package/lib/typescript/ads/RewardedAd.d.ts.map +1 -0
  181. package/lib/typescript/ads/RewardedInterstitialAd.d.ts +1 -0
  182. package/lib/typescript/ads/RewardedInterstitialAd.d.ts.map +1 -0
  183. package/lib/typescript/common/Base64.d.ts +2 -0
  184. package/lib/typescript/common/Base64.d.ts.map +1 -0
  185. package/lib/typescript/common/MutatableParams.d.ts +1 -0
  186. package/lib/typescript/common/MutatableParams.d.ts.map +1 -0
  187. package/lib/typescript/common/ReferenceBase.d.ts +1 -0
  188. package/lib/typescript/common/ReferenceBase.d.ts.map +1 -0
  189. package/lib/typescript/common/deeps.d.ts +1 -0
  190. package/lib/typescript/common/deeps.d.ts.map +1 -0
  191. package/lib/typescript/common/id.d.ts +1 -0
  192. package/lib/typescript/common/id.d.ts.map +1 -0
  193. package/lib/typescript/common/index.d.ts +1 -0
  194. package/lib/typescript/common/index.d.ts.map +1 -0
  195. package/lib/typescript/common/path.d.ts +1 -0
  196. package/lib/typescript/common/path.d.ts.map +1 -0
  197. package/lib/typescript/common/promise.d.ts +1 -0
  198. package/lib/typescript/common/promise.d.ts.map +1 -0
  199. package/lib/typescript/common/serialize.d.ts +1 -0
  200. package/lib/typescript/common/serialize.d.ts.map +1 -0
  201. package/lib/typescript/common/validate.d.ts +1 -0
  202. package/lib/typescript/common/validate.d.ts.map +1 -0
  203. package/lib/typescript/hooks/useAppOpenAd.d.ts +1 -0
  204. package/lib/typescript/hooks/useAppOpenAd.d.ts.map +1 -0
  205. package/lib/typescript/hooks/useFullScreenAd.d.ts +1 -0
  206. package/lib/typescript/hooks/useFullScreenAd.d.ts.map +1 -0
  207. package/lib/typescript/hooks/useInterstitialAd.d.ts +1 -0
  208. package/lib/typescript/hooks/useInterstitialAd.d.ts.map +1 -0
  209. package/lib/typescript/hooks/useRewardedAd.d.ts +1 -0
  210. package/lib/typescript/hooks/useRewardedAd.d.ts.map +1 -0
  211. package/lib/typescript/hooks/useRewardedInterstitialAd.d.ts +1 -0
  212. package/lib/typescript/hooks/useRewardedInterstitialAd.d.ts.map +1 -0
  213. package/lib/typescript/index.d.ts +2 -1
  214. package/lib/typescript/index.d.ts.map +1 -0
  215. package/lib/typescript/internal/GoogleMobileAdsNativeEventEmitter.d.ts +1 -0
  216. package/lib/typescript/internal/GoogleMobileAdsNativeEventEmitter.d.ts.map +1 -0
  217. package/lib/typescript/internal/Module.d.ts +1 -0
  218. package/lib/typescript/internal/Module.d.ts.map +1 -0
  219. package/lib/typescript/internal/NativeError.d.ts +1 -0
  220. package/lib/typescript/internal/NativeError.d.ts.map +1 -0
  221. package/lib/typescript/internal/SharedEventEmitter.d.ts +1 -0
  222. package/lib/typescript/internal/SharedEventEmitter.d.ts.map +1 -0
  223. package/lib/typescript/internal/index.d.ts +1 -0
  224. package/lib/typescript/internal/index.d.ts.map +1 -0
  225. package/lib/typescript/internal/registry/nativeModule.d.ts +1 -0
  226. package/lib/typescript/internal/registry/nativeModule.d.ts.map +1 -0
  227. package/lib/typescript/types/AdEventListener.d.ts +1 -0
  228. package/lib/typescript/types/AdEventListener.d.ts.map +1 -0
  229. package/lib/typescript/types/AdEventsListener.d.ts +1 -0
  230. package/lib/typescript/types/AdEventsListener.d.ts.map +1 -0
  231. package/lib/typescript/types/AdShowOptions.d.ts +1 -0
  232. package/lib/typescript/types/AdShowOptions.d.ts.map +1 -0
  233. package/lib/typescript/types/AdStates.d.ts +1 -0
  234. package/lib/typescript/types/AdStates.d.ts.map +1 -0
  235. package/lib/typescript/types/AdapterStatus.d.ts +1 -0
  236. package/lib/typescript/types/AdapterStatus.d.ts.map +1 -0
  237. package/lib/typescript/types/AdsConsent.interface.d.ts +1 -0
  238. package/lib/typescript/types/AdsConsent.interface.d.ts.map +1 -0
  239. package/lib/typescript/types/AppEvent.d.ts +1 -0
  240. package/lib/typescript/types/AppEvent.d.ts.map +1 -0
  241. package/lib/typescript/types/BannerAdProps.d.ts +1 -0
  242. package/lib/typescript/types/BannerAdProps.d.ts.map +1 -0
  243. package/lib/typescript/types/GoogleMobileAdsNativeModule.d.ts +1 -0
  244. package/lib/typescript/types/GoogleMobileAdsNativeModule.d.ts.map +1 -0
  245. package/lib/typescript/types/MobileAd.interface.d.ts +1 -0
  246. package/lib/typescript/types/MobileAd.interface.d.ts.map +1 -0
  247. package/lib/typescript/types/MobileAdsModule.interface.d.ts +1 -0
  248. package/lib/typescript/types/MobileAdsModule.interface.d.ts.map +1 -0
  249. package/lib/typescript/types/Module.interface.d.ts +1 -0
  250. package/lib/typescript/types/Module.interface.d.ts.map +1 -0
  251. package/lib/typescript/types/RequestConfiguration.d.ts +1 -0
  252. package/lib/typescript/types/RequestConfiguration.d.ts.map +1 -0
  253. package/lib/typescript/types/RequestOptions.d.ts +1 -0
  254. package/lib/typescript/types/RequestOptions.d.ts.map +1 -0
  255. package/lib/typescript/types/RewardedAdReward.d.ts +1 -0
  256. package/lib/typescript/types/RewardedAdReward.d.ts.map +1 -0
  257. package/lib/typescript/types/index.d.ts +1 -0
  258. package/lib/typescript/types/index.d.ts.map +1 -0
  259. package/lib/typescript/validateAdRequestConfiguration.d.ts +1 -0
  260. package/lib/typescript/validateAdRequestConfiguration.d.ts.map +1 -0
  261. package/lib/typescript/validateAdRequestOptions.d.ts +1 -0
  262. package/lib/typescript/validateAdRequestOptions.d.ts.map +1 -0
  263. package/lib/typescript/validateAdShowOptions.d.ts +1 -0
  264. package/lib/typescript/validateAdShowOptions.d.ts.map +1 -0
  265. package/lib/typescript/version.d.ts +2 -1
  266. package/lib/typescript/version.d.ts.map +1 -0
  267. package/package.json +18 -19
  268. package/src/version.ts +1 -1
@@ -1 +1 @@
1
- {"version":3,"names":["PUSH_CHARS","AUTO_ID_CHARS","lastPushTime","lastRandChars","generateDatabaseId","serverTimeOffset","timeStampChars","Array","now","Date","getTime","duplicateTime","i","charAt","Math","floor","Error","id","join","random","length","generateFirestoreId","autoId"],"sources":["id.ts"],"sourcesContent":["const PUSH_CHARS = '-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz';\n\nconst AUTO_ID_CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n\n// timestamp of last push, used to prevent local collisions if you push twice in one ms.\nlet lastPushTime = 0;\n\n// we generate 72-bits of randomness which get turned into 12 characters and appended to the\n// timestamp to prevent collisions with other clients. We store the last characters we\n// generated because in the event of a collision, we'll use those same characters except\n// \"incremented\" by one.\nconst lastRandChars: number[] = [];\n\n/**\n * Generate a firebase id - for use with ref().push(val, cb) - e.g. -KXMr7k2tXUFQqiaZRY4'\n * @param serverTimeOffset - pass in server time offset from native side\n * @returns {string}\n */\nexport function generateDatabaseId(serverTimeOffset = 0) {\n const timeStampChars = new Array(8);\n let now = new Date().getTime() + serverTimeOffset;\n const duplicateTime = now === lastPushTime;\n\n lastPushTime = now;\n\n for (let i = 7; i >= 0; i -= 1) {\n timeStampChars[i] = PUSH_CHARS.charAt(now % 64);\n now = Math.floor(now / 64);\n }\n\n if (now !== 0) {\n throw new Error('We should have converted the entire timestamp.');\n }\n\n let id = timeStampChars.join('');\n\n if (!duplicateTime) {\n for (let i = 0; i < 12; i += 1) {\n lastRandChars[i] = Math.floor(Math.random() * 64);\n }\n } else {\n // if the timestamp hasn't changed since last push,\n // use the same random number, but increment it by 1.\n let i;\n for (i = 11; i >= 0 && lastRandChars[i] === 63; i -= 1) {\n lastRandChars[i] = 0;\n }\n\n lastRandChars[i] += 1;\n }\n\n for (let i = 0; i < 12; i++) {\n id += PUSH_CHARS.charAt(lastRandChars[i]);\n }\n\n if (id.length !== 20) {\n throw new Error('Length should be 20.');\n }\n\n return id;\n}\n\n/**\n * Generate a firestore auto id for use with collection/document .add()\n * @return {string}\n */\nexport function generateFirestoreId() {\n let autoId = '';\n\n for (let i = 0; i < 20; i++) {\n autoId += AUTO_ID_CHARS.charAt(Math.floor(Math.random() * AUTO_ID_CHARS.length));\n }\n return autoId;\n}\n"],"mappings":";;;;;;;AAAA,MAAMA,UAAU,GAAG,kEAAkE;AAErF,MAAMC,aAAa,GAAG,gEAAgE;;AAEtF;AACA,IAAIC,YAAY,GAAG,CAAC;;AAEpB;AACA;AACA;AACA;AACA,MAAMC,aAAuB,GAAG,EAAE;;AAElC;AACA;AACA;AACA;AACA;AACO,SAASC,kBAAkB,GAAuB;EAAA,IAAtBC,gBAAgB,uEAAG,CAAC;EACrD,MAAMC,cAAc,GAAG,IAAIC,KAAK,CAAC,CAAC,CAAC;EACnC,IAAIC,GAAG,GAAG,IAAIC,IAAI,EAAE,CAACC,OAAO,EAAE,GAAGL,gBAAgB;EACjD,MAAMM,aAAa,GAAGH,GAAG,KAAKN,YAAY;EAE1CA,YAAY,GAAGM,GAAG;EAElB,KAAK,IAAII,CAAC,GAAG,CAAC,EAAEA,CAAC,IAAI,CAAC,EAAEA,CAAC,IAAI,CAAC,EAAE;IAC9BN,cAAc,CAACM,CAAC,CAAC,GAAGZ,UAAU,CAACa,MAAM,CAACL,GAAG,GAAG,EAAE,CAAC;IAC/CA,GAAG,GAAGM,IAAI,CAACC,KAAK,CAACP,GAAG,GAAG,EAAE,CAAC;EAC5B;EAEA,IAAIA,GA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,CAAC,CAAC;EAClF;EACA,OAAOE,MAAM;AACf"}
1
+ {"version":3,"names":["PUSH_CHARS","AUTO_ID_CHARS","lastPushTime","lastRandChars","generateDatabaseId","serverTimeOffset","timeStampChars","Array","now","Date","getTime","duplicateTime","i","charAt","Math","floor","Error","id","join","random","length","generateFirestoreId","autoId"],"sourceRoot":"../../src","sources":["id.ts"],"mappings":";;;;;;;AAAA,MAAMA,UAAU,GAAG,kEAAkE;AAErF,MAAMC,aAAa,GAAG,gEAAgE;;AAEtF;AACA,IAAIC,YAAY,GAAG,CAAC;;AAEpB;AACA;AACA;AACA;AACA,MAAMC,aAAuB,GAAG,EAAE;;AAElC;AACA;AACA;AACA;AACA;AACO,SAASC,kBAAkB,GAAuB;EAAA,IAAtBC,gBAAgB,uEAAG,CAAC;EACrD,MAAMC,cAAc,GAAG,IAAIC,KAAK,CAAC,CAAC,CAAC;EACnC,IAAIC,GAAG,GAAG,IAAIC,IAAI,EAAE,CAACC,OAAO,EAAE,GAAGL,gBAAgB;EACjD,MAAMM,aAAa,GAAGH,GAAG,KAAKN,YAAY;EAE1CA,YAAY,GAAGM,GAAG;EAElB,KAAK,IAAII,CAAC,GAAG,CAAC,EAAEA,CAAC,IAAI,CAAC,EAAEA,CAAC,IAAI,CAAC,EAAE;IAC9BN,cAAc,CAACM,CAAC,CAAC,GAAGZ,UAAU,CAACa,MAAM,CAACL,GAAG,GAAG,EAAE,CAAC;IAC/CA,GAAG,GAAGM,IAAI,CAACC,KAAK,CAACP,GAAG,GAAG,EAAE,CAAC;EAC5B;EAEA,IAAIA,GAAG,KAAK,CAAC,EAAE;IACb,MAAM,IAAIQ,KAAK,CAAC,gDAAgD,CAAC;EACnE;EAEA,IAAIC,EAAE,GAAGX,cAAc,CAACY,IAAI,CAAC,EAAE,CAAC;EAEhC,IAAI,CAACP,aAAa,EAAE;IAClB,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAG,EAAE,EAAEA,CAAC,IAAI,CAAC,EAAE;MAC9BT,aAAa,CAACS,CAAC,CAAC,GAAGE,IAAI,CAACC,KAAK,CAACD,IAAI,CAACK,MAAM,EAAE,GAAG,EAAE,CAAC;IACnD;EACF,CAAC,MAAM;IACL;IACA;IACA,IAAIP,CAAC;IACL,KAAKA,CAAC,GAAG,EAAE,EAAEA,CAAC,IAAI,CAAC,IAAIT,aAAa,CAACS,CAAC,CAAC,KAAK,EAAE,EAAEA,CAAC,IAAI,CAAC,EAAE;MACtDT,aAAa,CAACS,CAAC,CAAC,GAAG,CAAC;IACtB;IAEAT,aAAa,CAACS,CAAC,CAAC,IAAI,CAAC;EACvB;EAEA,KAAK,IAAIA,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAG,EAAE,EAAEA,CAAC,EAAE,EAAE;IAC3BK,EAAE,IAAIjB,UAAU,CAACa,MAAM,CAACV,aAAa,CAACS,CAAC,CAAC,CAAC;EAC3C;EAEA,IAAIK,EAAE,CAACG,MAAM,KAAK,EAAE,EAAE;IACpB,MAAM,IAAIJ,KAAK,CAAC,sBAAsB,CAAC;EACzC;EAEA,OAAOC,EAAE;AACX;;AAEA;AACA;AACA;AACA;AACO,SAASI,mBAAmB,GAAG;EACpC,IAAIC,MAAM,GAAG,EAAE;EAEf,KAAK,IAAIV,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAG,EAAE,EAAEA,CAAC,EAAE,EAAE;IAC3BU,MAAM,IAAIrB,aAAa,CAACY,MAAM,CAACC,IAAI,CAACC,KAAK,CAACD,IAAI,CAACK,MAAM,EAAE,GAAGlB,aAAa,CAACmB,MAAM,CAAC,CAAC;EAClF;EACA,OAAOE,MAAM;AACf"}
@@ -1 +1 @@
1
- {"version":3,"names":["getDataUrlParts","dataUrlString","isBase64","includes","mediaType","base64String","split","undefined","replace","decodeURIComponent","Base64","btoa","once","fn","context","onceResult","ranOnce","onceInner","args","apply","isError","value","Object","prototype","toString","call","Error","hasOwnProperty","target","property","isPropertySet","isUndefined","stripTrailingSlash","string","isString","endsWith","slice","isIOS","Platform","OS","isAndroid","tryJSONParse","JSON","parse","jsonError","tryJSONStringify","data","stringify"],"sources":["index.ts"],"sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\nimport { Platform } from 'react-native';\nimport * as Base64 from './Base64';\nimport { isString, isUndefined } from './validate';\n\nexport * from './id';\nexport * from './path';\nexport * from './promise';\nexport * from './validate';\n\nexport { Base64 };\nexport { ReferenceBase } from './ReferenceBase';\n\nexport function getDataUrlParts(dataUrlString: string) {\n const isBase64 = dataUrlString.includes(';base64');\n let [mediaType, base64String] = dataUrlString.split(',');\n if (!mediaType || !base64String) {\n return { base64String: undefined, mediaType: undefined };\n }\n mediaType = mediaType.replace('data:', '').replace(';base64', '');\n if (base64String && base64String.includes('%')) {\n base64String = decodeURIComponent(base64String);\n }\n if (!isBase64) {\n base64String = Base64.btoa(base64String);\n }\n return { base64String, mediaType };\n}\n\nexport function once<T>(fn: () => void, context: unknown): (this: T, ...args: []) => void {\n let onceResult: unknown;\n let ranOnce = false;\n\n return function onceInner(...args: []) {\n if (!ranOnce) {\n ranOnce = true;\n onceResult = fn.apply(context || this, args);\n }\n\n return onceResult;\n };\n}\n\nexport function isError(value: unknown) {\n if (Object.prototype.toString.call(value) === '[object Error]') {\n return true;\n }\n\n return value instanceof Error;\n}\n\nexport function hasOwnProperty(target: unknown, property: PropertyKey) {\n return Object.hasOwnProperty.call(target, property);\n}\n\nexport function isPropertySet(target: unknown, property: PropertyKey) {\n return (\n hasOwnProperty(target, property) &&\n !isUndefined((target as Record<PropertyKey, unknown>)[property])\n );\n}\n\n/**\n * Remove a trailing forward slash from a string if it exists\n *\n * @param string\n * @returns {*}\n */\nexport function stripTrailingSlash(string: string) {\n if (!isString(string)) {\n return string;\n }\n return string.endsWith('/') ? string.slice(0, -1) : string;\n}\n\nexport const isIOS = Platform.OS === 'ios';\n\nexport const isAndroid = Platform.OS === 'android';\n\nexport function tryJSONParse(string: string) {\n try {\n return string && JSON.parse(string);\n } catch (jsonError) {\n return string;\n }\n}\n\nexport function tryJSONStringify(data: unknown) {\n try {\n return JSON.stringify(data);\n } catch (jsonError) {\n return null;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBA;AACA;AAAmC;AACnC;AAKA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AAHA;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AAIA;AAAgD;AAAA;AA3BhD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAcO,SAASA,eAAe,CAACC,aAAqB,EAAE;EACrD,MAAMC,QAAQ,GAAGD,aAAa,CAACE,QAAQ,CAAC,SAAS,CAAC;EAClD,IAAI,CAACC,SAAS,EAAEC,YAAY,CAAC,GAAGJ,aAAa,CAACK,KAAK,CAAC,GAAG,CAAC;EACxD,IAAI,CAACF,SAAS,IAAI,CAACC,YAAY,EAAE;IAC/B,OAAO;MAAEA,YAAY,EAAEE,SAAS;MAAEH,SAAS,EAAEG;IAAU,CAAC;EAC1D;EACAH,SAAS,GAAGA,SAAS,CAACI,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAACA,OAAO,CAAC,SAAS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,IAAAC,kBAAQ,EAACD,MAAM,CAAC,EAAE;IACrB,OAAOA,MAAM;EACf;EACA,OAAOA,MAAM,CAACE,QAAQ,CAAC,GAAG,CAAC,GAAGF,MAAM,CAACG,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAGH,MAAM;AAC5D;AAEO,MAAMI,KAAK,GAAGC,qBAAQ,CAACC,EAAE,KAAK,KAAK;AAAC;AAEpC,MAAMC,SAAS,GAAGF,qBAAQ,CAACC,EAAE,KAAK,SAAS;AAAC;AAE5C,SAASE,YAAY,CAACR,MAAc,EAAE;EAC3C,IAAI;IACF,OAAOA,MAAM,IAAIS,IAAI,CAACC,KAAK,CAACV,MAAM,CAAC;EACrC,CAAC,CAAC,OAAOW,SAAS,EAAE;IAClB,OAAOX,MAAM;EACf;AACF;AAEO,SAASY,gBAAgB,CAACC,IAAa,EAAE;EAC9C,IAAI;IACF,OAAOJ,IAAI,CAACK,SAAS,CAACD,IAAI,CAAC;EAC7B,CAAC,CAAC,OAAOF,SAAS,EAAE;IAClB,OAAO,IAAI;EACb;AACF"}
1
+ {"version":3,"names":["getDataUrlParts","dataUrlString","isBase64","includes","mediaType","base64String","split","undefined","replace","decodeURIComponent","Base64","btoa","once","fn","context","onceResult","ranOnce","onceInner","args","apply","isError","value","Object","prototype","toString","call","Error","hasOwnProperty","target","property","isPropertySet","isUndefined","stripTrailingSlash","string","isString","endsWith","slice","isIOS","Platform","OS","isAndroid","tryJSONParse","JSON","parse","jsonError","tryJSONStringify","data","stringify"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBA;AACA;AAAmC;AACnC;AAKA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AAHA;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;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AOF,SAAS,EAAE;IAClB,OAAO,IAAI;EACb;AACF"}
@@ -1 +1 @@
1
- {"version":3,"names":["pathParent","path","length","index","lastIndexOf","slice","pathChild","childPath","canonicalChildPath","pathPieces","join","pathLastComponent","split","filter","$","pathIsEmpty","pathToUrlEncodedString","pieces","pathString","i","encodeURIComponent","String","INVALID_PATH_REGEX","isValidPath","test","toFilePath","_filePath","replace","includes","decodeURIComponent"],"sources":["path.ts"],"sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\n/**\n * Returns the next parent of the path e.g. /foo/bar/car -> /foo/bar\n */\nexport function pathParent(path: string) {\n if (path.length === 0) {\n return null;\n }\n\n const index = path.lastIndexOf('/');\n if (index <= 0) {\n return null;\n }\n\n return path.slice(0, index);\n}\n\n/**\n * Joins a parent and a child path\n */\nexport function pathChild(path: string, childPath: string) {\n const canonicalChildPath = pathPieces(childPath).join('/');\n\n if (path.length === 0) {\n return canonicalChildPath;\n }\n\n return `${path}/${canonicalChildPath}`;\n}\n\n/**\n * Returns the last component of a path, e.g /foo/bar.jpeg -> bar.jpeg\n */\nexport function pathLastComponent(path: string) {\n const index = path.lastIndexOf('/', path.length - 2);\n if (index === -1) {\n return path;\n }\n\n return path.slice(index + 1);\n}\n\n/**\n * Returns all none empty pieces of the path\n * @param path\n * @returns {*}\n */\nexport function pathPieces(path: string) {\n return path.split('/').filter($ => $.length > 0);\n}\n\n/**\n * Returns whether a given path is empty\n * @param path\n * @returns {boolean}\n */\nexport function pathIsEmpty(path: string) {\n return !pathPieces(path).length;\n}\n\n/**\n * Converts a given path to a URL encoded string\n * @param path\n * @returns {string|string}\n */\nexport function pathToUrlEncodedString(path: string) {\n const pieces = pathPieces(path);\n let pathString = '';\n for (let i = 0; i < pieces.length; i++) {\n pathString += `/${encodeURIComponent(String(pieces[i]))}`;\n }\n return pathString || '/';\n}\n\n// eslint-disable-next-line no-control-regex\nexport const INVALID_PATH_REGEX = /[[\\].#$\\u0000-\\u001F\\u007F]/;\n\n/**\n * Ensures a given path is a valid Firebase path\n * @param path\n * @returns {boolean}\n */\nexport function isValidPath(path: unknown) {\n return typeof path === 'string' && path.length !== 0 && !INVALID_PATH_REGEX.test(path);\n}\n\n/**\n * Converts a file path to a standardized string path\n * @param path\n * @returns {*}\n */\nexport function toFilePath(path: string) {\n let _filePath = path.replace('file://', '');\n if (_filePath.includes('%')) {\n _filePath = decodeURIComponent(_filePath);\n }\n return _filePath;\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACO,SAASA,UAAU,CAACC,IAAY,EAAE;EACvC,IAAIA,IAAI,CAACC,MAAM,KAAK,CAAC,EAAE;IACrB,OAAO,IAAI;EACb;EAEA,MAAMC,KAAK,GAAGF,IAAI,CAACG,WAAW,CAAC,GAAG,CAAC;EACnC,IAAID,KAAK,IAAI,CAAC,EAAE;IACd,OAAO,IAAI;EACb;EAEA,OAAOF,IAAI,CAACI,KAAK,CAAC,CAAC,EAAEF,KAAK,CAAC;AAC7B;;AAEA;AACA;AACA;AACO,SAASG,SAAS,CAACL,IAAY,EAAEM,SAAiB,EAAE;EACzD,MAAMC,kBAAkB,GAAGC,UAAU,CAACF,SAAS,CAAC,CAACG,IAAI,CAAC,GAAG,CAAC;EAE1D,IAAIT,IAAI,CAACC,MAAM,KAAK,CAAC,EAAE;IACrB,OAAOM,kBAAkB;EAC3B;EAEA,OAAQ,GAAEP,IAAK,IAAGO,kBAAmB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,IAAI,CAAC;AACxF;;AAEA;AACA;AACA;AACA;AACA;AACO,SAASwB,UAAU,CAACxB,IAAY,EAAE;EACvC,IAAIyB,SAAS,GAAGzB,IAAI,CAAC0B,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC;EAC3C,IAAID,SAAS,CAACE,QAAQ,CAAC,GAAG,CAAC,EAAE;IAC3BF,SAAS,GAAGG,kBAAkB,CAACH,SAAS,CAAC;EAC3C;EACA,OAAOA,SAAS;AAClB"}
1
+ {"version":3,"names":["pathParent","path","length","index","lastIndexOf","slice","pathChild","childPath","canonicalChildPath","pathPieces","join","pathLastComponent","split","filter","$","pathIsEmpty","pathToUrlEncodedString","pieces","pathString","i","encodeURIComponent","String","INVALID_PATH_REGEX","isValidPath","test","toFilePath","_filePath","replace","includes","decodeURIComponent"],"sourceRoot":"../../src","sources":["path.ts"],"mappings":";;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACO,SAASA,UAAU,CAACC,IAAY,EAAE;EACvC,IAAIA,IAAI,CAACC,MAAM,KAAK,CAAC,EAAE;IACrB,OAAO,IAAI;EACb;EAEA,MAAMC,KAAK,GAAGF,IAAI,CAACG,WAAW,CAAC,GAAG,CAAC;EACnC,IAAID,KAAK,IAAI,CAAC,EAAE;IACd,OAAO,IAAI;EACb;EAEA,OAAOF,IAAI,CAACI,KAAK,CAAC,CAAC,EAAEF,KAAK,CAAC;AAC7B;;AAEA;AACA;AACA;AACO,SAASG,SAAS,CAACL,IAAY,EAAEM,SAAiB,EAAE;EACzD,MAAMC,kBAAkB,GAAGC,UAAU,CAACF,SAAS,CAAC,CAACG,IAAI,CAAC,GAAG,CAAC;EAE1D,IAAIT,IAAI,CAACC,MAAM,KAAK,CAAC,EAAE;IACrB,OAAOM,kBAAkB;EAC3B;EAEA,OAAQ,GAAEP,IAAK,IAAGO,kBAAmB,EAAC;AACxC;;AA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F;;AAEA;AACA;AACA;AACA;AACA;AACO,SAASwB,UAAU,CAACxB,IAAY,EAAE;EACvC,IAAIyB,SAAS,GAAGzB,IAAI,CAAC0B,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC;EAC3C,IAAID,SAAS,CAACE,QAAQ,CAAC,GAAG,CAAC,EAAE;IAC3BF,SAAS,GAAGG,kBAAkB,CAACH,SAAS,CAAC;EAC3C;EACA,OAAOA,SAAS;AAClB"}
@@ -1 +1 @@
1
- {"version":3,"names":["promiseDefer","deferred","promise","resolve","reject","Promise","promiseWithOptionalCallback","callback","isFunction","then","result","length","catch","error"],"sources":["promise.ts"],"sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\nimport { isFunction } from './validate';\n\n/**\n *\n */\nexport function promiseDefer() {\n const deferred: {\n promise: Promise<unknown> | null;\n resolve: (value: unknown) => void;\n reject: (value: unknown) => void;\n } = { promise: null, resolve: () => {}, reject: () => {} };\n\n deferred.promise = new Promise((resolve, reject) => {\n deferred.resolve = resolve;\n deferred.reject = reject;\n });\n\n return deferred;\n}\n\n/**\n * @param promise\n * @param callback\n */\nexport function promiseWithOptionalCallback(\n promise: Promise<unknown>,\n callback: (a: unknown, b?: unknown) => void,\n) {\n if (!isFunction(callback)) {\n return promise;\n }\n\n return promise\n .then(result => {\n if (callback && callback.length === 1) {\n callback(null);\n } else if (callback) {\n callback(null, result);\n }\n\n return result;\n })\n .catch(error => {\n if (callback) {\n callback(error);\n }\n return Promise.reject(error);\n });\n}\n"],"mappings":";;;;;;;AAiBA;AAjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA;AACA;AACA;AACO,SAASA,YAAY,GAAG;EAC7B,MAAMC,QAIL,GAAG;IAAEC,OAAO,EAAE,IAAI;IAAEC,OAAO,EAAE,MAAM,CAAC,CAAC;IAAEC,MAAM,EAAE,MAAM,CAAC;EAAE,CAAC;EAE1DH,QAAQ,CAACC,OAAO,GAAG,IAAIG,OAAO,CAAC,CAACF,OAAO,EAAEC,MAAM,KAAK;IAClDH,QAAQ,CAACE,OAAO,GAAGA,OAAO;IAC1BF,QAAQ,CAACG,MAAM,GAAGA,MAAM;EAC1B,CAAC,CAAC;EAEF,OAAOH,QAAQ;AACjB;;AAEA;AACA;AACA;AACA;AACO,SAASK,2BAA2B,CACzCJ,OAAyB,EACzBK,QAA2C,EAC3C;EACA,IAAI,CAAC,IAAAC,oBAAU,EAACD,QAAQ,CAAC,EAAE;IACzB,OAAOL,OAAO;EAChB;EAEA,OAAOA,OAAO,CACXO,IAAI,CAACC,MAAM,IAAI;IACd,IAAIH,QAAQ,IAAIA,QAAQ,CAACI,MAAM,KAAK,CAAC,EAAE;MACrCJ,QAAQ,CAAC,IAAI,CAAC;IAChB,CAAC,MAAM,IAAIA,QAAQ,EAAE;MACnBA,QAAQ,CAAC,IAAI,EAAEG,MAAM,CAAC;IACxB;IAEA,OAAOA,MAAM;EACf,CAAC,CAAC,CACDE,KAAK,CAACC,KAAK,IAAI;IACd,IAAIN,QAAQ,EAAE;MACZA,QAAQ,CAACM,KAAK,CAAC;IACjB;IACA,OAAOR,OAAO,CAACD,MAAM,CAACS,KAAK,CAAC;EAC9B,CAAC,CAAC;AACN"}
1
+ {"version":3,"names":["promiseDefer","deferred","promise","resolve","reject","Promise","promiseWithOptionalCallback","callback","isFunction","then","result","length","catch","error"],"sourceRoot":"../../src","sources":["promise.ts"],"mappings":";;;;;;;AAiBA;AAjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA;AACA;AACA;AACO,SAASA,YAAY,GAAG;EAC7B,MAAMC,QAIL,GAAG;IAAEC,OAAO,EAAE,IAAI;IAAEC,OAAO,EAAE,MAAM,CAAC,CAAC;IAAEC,MAAM,EAAE,MAAM,CAAC;EAAE,CAAC;EAE1DH,QAAQ,CAACC,OAAO,GAAG,IAAIG,OAAO,CAAC,CAACF,OAAO,EAAEC,MAAM,KAAK;IAClDH,QAAQ,CAACE,OAAO,GAAGA,OAAO;IAC1BF,QAAQ,CAACG,MAAM,GAAGA,MAAM;EAC1B,CAAC,CAAC;EAEF,OAAOH,QAAQ;AACjB;;AAEA;AACA;AACA;AACA;AACO,SAASK,2BAA2B,CACzCJ,OAAyB,EACzBK,QAA2C,EAC3C;EACA,IAAI,CAAC,IAAAC,oBAAU,EAACD,QAAQ,CAAC,EAAE;IACzB,OAAOL,OAAO;EAChB;EAEA,OAAOA,OAAO,CACXO,IAAI,CAACC,MAAM,IAAI;IACd,IAAIH,QAAQ,IAAIA,QAAQ,CAACI,MAAM,KAAK,CAAC,EAAE;MACrCJ,QAAQ,CAAC,IAAI,CAAC;IAChB,CAAC,MAAM,IAAIA,QAAQ,EAAE;MACnBA,QAAQ,CAAC,IAAI,EAAEG,MAAM,CAAC;IACxB;IAEA,OAAOA,MAAM;EACf,CAAC,CAAC,CACDE,KAAK,CAACC,KAAK,IAAI;IACd,IAAIN,QAAQ,EAAE;MACZA,QAAQ,CAACM,KAAK,CAAC;IACjB;IACA,OAAOR,OAAO,CAACD,MAAM,CAACS,KAAK,CAAC;EAC9B,CAAC,CAAC;AACN"}
@@ -1 +1 @@
1
- {"version":3,"names":["serializeType","value","isObject","type","serializeObject","object","tryJSONParse","tryJSONStringify"],"sources":["serialize.ts"],"sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\nimport { tryJSONParse, tryJSONStringify } from './index';\nimport { isObject } from './validate';\n\nexport function serializeType(value: unknown) {\n if (isObject(value)) {\n return {\n type: 'object',\n value: serializeObject(value),\n };\n }\n\n return {\n type: typeof value,\n value,\n };\n}\n\nexport function serializeObject(object: unknown) {\n if (!isObject(object)) {\n return object;\n }\n\n // json stringify then parse it calls toString on Objects / Classes\n // that support it i.e new Date() becomes a ISO string.\n return tryJSONParse(tryJSONStringify(object) || '');\n}\n"],"mappings":";;;;;;;AAiBA;AACA;AAlBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAKO,SAASA,aAAa,CAACC,KAAc,EAAE;EAC5C,IAAI,IAAAC,kBAAQ,EAACD,KAAK,CAAC,EAAE;IACnB,OAAO;MACLE,IAAI,EAAE,QAAQ;MACdF,KAAK,EAAEG,eAAe,CAACH,KAAK;IAC9B,CAAC;EACH;EAEA,OAAO;IACLE,IAAI,EAAE,OAAOF,KAAK;IAClBA;EACF,CAAC;AACH;AAEO,SAASG,eAAe,CAACC,MAAe,EAAE;EAC/C,IAAI,CAAC,IAAAH,kBAAQ,EAACG,MAAM,CAAC,EAAE;IACrB,OAAOA,MAAM;EACf;;EAEA;EACA;EACA,OAAO,IAAAC,mBAAY,EAAC,IAAAC,uBAAgB,EAACF,MAAM,CAAC,IAAI,EAAE,CAAC;AACrD"}
1
+ {"version":3,"names":["serializeType","value","isObject","type","serializeObject","object","tryJSONParse","tryJSONStringify"],"sourceRoot":"../../src","sources":["serialize.ts"],"mappings":";;;;;;;AAiBA;AACA;AAlBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAKO,SAASA,aAAa,CAACC,KAAc,EAAE;EAC5C,IAAI,IAAAC,kBAAQ,EAACD,KAAK,CAAC,EAAE;IACnB,OAAO;MACLE,IAAI,EAAE,QAAQ;MACdF,KAAK,EAAEG,eAAe,CAACH,KAAK;IAC9B,CAAC;EACH;EAEA,OAAO;IACLE,IAAI,EAAE,OAAOF,KAAK;IAClBA;EACF,CAAC;AACH;AAEO,SAASG,eAAe,CAACC,MAAe,EAAE;EAC/C,IAAI,CAAC,IAAAH,kBAAQ,EAACG,MAAM,CAAC,EAAE;IACrB,OAAOA,MAAM;EACf;;EAEA;EACA;EACA,OAAO,IAAAC,mBAAY,EAAC,IAAAC,uBAAgB,EAACF,MAAM,CAAC,IAAI,EAAE,CAAC;AACrD"}
@@ -1 +1 @@
1
- {"version":3,"names":["AlphaNumericUnderscore","objectKeyValuesAreStrings","object","isObject","entries","Object","i","length","key","value","isString","isNull","Array","isArray","isDate","prototype","toString","call","isNaN","isFunction","isNumber","isFinite","Number","isInteger","isBoolean","isUndefined","isAlphaNumericUnderscore","test","IS_VALID_URL_REGEX","isValidUrl","url","isOneOf","oneOf","includes","noop","validateOptionalNativeDependencyExists","firebaseJsonKey","apiName","nativeFnExists","errorMessage","Platform","OS","Error"],"sources":["validate.ts"],"sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\nimport { Platform } from 'react-native';\n\nconst AlphaNumericUnderscore = /^[a-zA-Z0-9_]+$/;\n\nexport function objectKeyValuesAreStrings(object: Record<string, unknown>) {\n if (!isObject(object)) {\n return false;\n }\n\n const entries = Object.entries(object);\n\n for (let i = 0; i < entries.length; i++) {\n const [key, value] = entries[i];\n if (!isString(key) || !isString(value)) {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * Simple is null check.\n *\n * @param value\n * @returns {boolean}\n */\nexport function isNull(value: unknown) {\n return value === null;\n}\n\n/**\n * Simple is object check.\n *\n * @param value\n * @returns {boolean}\n */\nexport function isObject(value: unknown) {\n return value ? typeof value === 'object' && !Array.isArray(value) && !isNull(value) : false;\n}\n\n/**\n * Simple is date check\n * https://stackoverflow.com/a/44198641\n * @param value\n * @returns {boolean}\n */\nexport function isDate(value: number) {\n // use the global isNaN() and not Number.isNaN() since it will validate an Invalid Date\n return value && Object.prototype.toString.call(value) === '[object Date]' && !isNaN(value);\n}\n\n/**\n * Simple is function check\n *\n * @param value\n * @returns {*|boolean}\n */\nexport function isFunction(value: unknown) {\n return value ? typeof value === 'function' : false;\n}\n\n/**\n * Simple is string check\n * @param value\n * @return {boolean}\n */\nexport function isString(value: unknown) {\n return typeof value === 'string';\n}\n\n/**\n * Simple is number check\n * @param value\n * @return {boolean}\n */\nexport function isNumber(value: unknown): value is number {\n return typeof value === 'number';\n}\n\n/**\n * Simple finite check\n * @param value\n * @returns {boolean}\n */\nexport function isFinite(value: unknown) {\n return Number.isFinite(value);\n}\n\n/**\n * Simple integer check\n * @param value\n * @returns {boolean}\n */\nexport function isInteger(value: unknown) {\n return Number.isInteger(value);\n}\n\n/**\n * Simple is boolean check\n *\n * @param value\n * @return {boolean}\n */\nexport function isBoolean(value: unknown) {\n return typeof value === 'boolean';\n}\n\n/**\n *\n * @param value\n * @returns {arg is Array<unknown>}\n */\nexport function isArray(value: unknown) {\n return Array.isArray(value);\n}\n\n/**\n *\n * @param value\n * @returns {boolean}\n */\nexport function isUndefined(value: unknown): value is undefined {\n return typeof value === 'undefined';\n}\n\n/**\n * /^[a-zA-Z0-9_]+$/\n *\n * @param value\n * @returns {boolean}\n */\nexport function isAlphaNumericUnderscore(value: string) {\n return AlphaNumericUnderscore.test(value);\n}\n\n/**\n * URL test\n * @param url\n * @returns {boolean}\n */\nconst IS_VALID_URL_REGEX = /^(http|https):\\/\\/[^ \"]+$/;\nexport function isValidUrl(url: string) {\n return IS_VALID_URL_REGEX.test(url);\n}\n\n/**\n * Array includes\n *\n * @param value\n * @param oneOf\n * @returns {boolean}\n */\nexport function isOneOf(value: unknown, oneOf: unknown[] = []) {\n if (!isArray(oneOf)) {\n return false;\n }\n return oneOf.includes(value);\n}\n\nexport function noop() {\n // noop-🐈\n}\n\nexport function validateOptionalNativeDependencyExists(\n firebaseJsonKey: string,\n apiName: string,\n nativeFnExists: boolean,\n) {\n if (nativeFnExists) {\n return;\n }\n let errorMessage =\n \"You attempted to use an optional API that's not enabled natively. \\n\\n To enable \";\n\n errorMessage += apiName;\n errorMessage += ` please set the 'react-native' -> '${firebaseJsonKey}' key to true in your firebase.json file`;\n\n if (Platform.OS === 'android') {\n errorMessage += ' and rebuild your Android app.';\n } else {\n errorMessage +=\n ', re-run pod install and rebuild your iOS app. ' +\n \"If you're not using Pods then make sure you've have downloaded the necessary Firebase iOS SDK dependencies for this API.\";\n }\n\n throw new Error(errorMessage);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAiBA;AAjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,MAAMA,sBAAsB,GAAG,iBAAiB;AAEzC,SAASC,yBAAyB,CAACC,MAA+B,EAAE;EACzE,IAAI,CAACC,QAAQ,CAACD,MAAM,CAAC,EAAE;IACrB,OAAO,KAAK;EACd;EAEA,MAAME,OAAO,GAAGC,MAAM,CAACD,OAAO,CAACF,MAAM,CAAC;EAEtC,KAAK,IAAII,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGF,OAAO,CAACG,MAAM,EAAED,CAAC,EAAE,EAAE;IACvC,MAAM,CAACE,GAAG,EAA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KAAK,SAAS,EAAE;IAC7BF,YAAY,IAAI,gCAAgC;EAClD,CAAC,MAAM;IACLA,YAAY,IACV,iDAAiD,GACjD,0HAA0H;EAC9H;EAEA,MAAM,IAAIG,KAAK,CAACH,YAAY,CAAC;AAC/B"}
1
+ {"version":3,"names":["AlphaNumericUnderscore","objectKeyValuesAreStrings","object","isObject","entries","Object","i","length","key","value","isString","isNull","Array","isArray","isDate","prototype","toString","call","isNaN","isFunction","isNumber","isFinite","Number","isInteger","isBoolean","isUndefined","isAlphaNumericUnderscore","test","IS_VALID_URL_REGEX","isValidUrl","url","isOneOf","oneOf","includes","noop","validateOptionalNativeDependencyExists","firebaseJsonKey","apiName","nativeFnExists","errorMessage","Platform","OS","Error"],"sourceRoot":"../../src","sources":["validate.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAiBA;AAjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,MAAMA,sBAAsB,GAAG,iBAAiB;AAEzC,SAASC,yBAAyB,CAACC,MAA+B,EAAE;EACzE,IAAI,CAACC,QAAQ,CAACD,MAAM,CAAC,EAAE;IACrB,OAAO,KAAK;EACd;EAEA,MAAME,OAAO,GAAGC,MAAM,CAACD,OAAO,CAACF,MAAM,CAAC;EAEtC,KAAK,IAAII,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGF,OAAO,CAACG,MAAM,EAAED,CAAC,EAAE,EAAE;IACvC,MAAM,CAACE,GAAG,EAAEC,KAAK,CAAC,GAAGL,OAAO,CAACE,CAAC,CAAC;IAC/B,IAAI,CAACI,QAAQ,CAACF,GAAG,CAAC,IAAI,CAACE,QAAQ,CAACD,KAAK,CAAC,EAAE;MACtC,OAAO,KAAK;IACd;EACF;EAEA,OAAO,IAAI;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA;AACO,SAASE,MAAM,CAACF,KAAc,EAAE;EACrC,OAAOA,KAAK,KAAK,IAAI;AACvB;;A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ACJ,KAAK,CAAC;AAC7B;;AAEA;AACA;AACA;AACA;AACA;AACO,SAASgB,WAAW,CAAChB,KAAc,EAAsB;EAC9D,OAAO,OAAOA,KAAK,KAAK,WAAW;AACrC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACO,SAASiB,wBAAwB,CAACjB,KAAa,EAAE;EACtD,OAAOT,sBAAsB,CAAC2B,IAAI,CAAClB,KAAK,CAAC;AAC3C;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAMmB,kBAAkB,GAAG,2BAA2B;AAC/C,SAASC,UAAU,CAACC,GAAW,EAAE;EACtC,OAAOF,kBAAkB,CAACD,IAAI,CAACG,GAAG,CAAC;AACrC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,OAAO,CAACtB,KAAc,EAAyB;EAAA,IAAvBuB,KAAgB,uEAAG,EAAE;EAC3D,IAAI,CAACnB,OAAO,CAACmB,KAAK,CAAC,EAAE;IACnB,OAAO,KAAK;EACd;EACA,OAAOA,KAAK,CAACC,QAAQ,CAACxB,KAAK,CAAC;AAC9B;AAEO,SAASyB,IAAI,GAAG;EACrB;AACF;AAEO,SAASC,sCAAsC,CACpDC,eAAuB,EACvBC,OAAe,EACfC,cAAuB,EACvB;EACA,IAAIA,cAAc,EAAE;IAClB;EACF;EACA,IAAIC,YAAY,GACd,mFAAmF;EAErFA,YAAY,IAAIF,OAAO;EACvBE,YAAY,IAAK,sCAAqCH,eAAgB,0CAAyC;EAE/G,IAAII,qBAAQ,CAACC,EAAE,KAAK,SAAS,EAAE;IAC7BF,YAAY,IAAI,gCAAgC;EAClD,CAAC,MAAM;IACLA,YAAY,IACV,iDAAiD,GACjD,0HAA0H;EAC9H;EAEA,MAAM,IAAIG,KAAK,CAACH,YAAY,CAAC;AAC/B"}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["declarations.d.ts"],"sourcesContent":["declare module 'react-native/Libraries/Utilities/binaryToBase64' {\n export default function binaryToBase64(data: ArrayBuffer | Uint8Array): string;\n}\n"],"mappings":""}
1
+ {"version":3,"names":[],"sourceRoot":"../../src","sources":["declarations.d.ts"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"names":["useAppOpenAd","adUnitId","requestOptions","appOpenAd","setAppOpenAd","useState","useDeepCompareEffect","AppOpenAd","createForAdRequest","useFullScreenAd"],"sources":["useAppOpenAd.ts"],"sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\nimport { useState } from 'react';\nimport useDeepCompareEffect from 'use-deep-compare-effect';\n\nimport { AppOpenAd } from '../ads/AppOpenAd';\nimport { AdHookReturns } from '../types/AdStates';\nimport { RequestOptions } from '../types/RequestOptions';\n\nimport { useFullScreenAd } from './useFullScreenAd';\n\n/**\n * React Hook for App Open Ad.\n *\n * @param adUnitId The Ad Unit ID for the App Open Ad. You can find this on your Google Mobile Ads dashboard. You can destroy ad instance by setting this value to null.\n * @param requestOptions Optional RequestOptions used to load the ad.\n */\nexport function useAppOpenAd(\n adUnitId: string | null,\n requestOptions: RequestOptions = {},\n): Omit<AdHookReturns, 'reward' | 'isEarnedReward'> {\n const [appOpenAd, setAppOpenAd] = useState<AppOpenAd | null>(null);\n\n useDeepCompareEffect(() => {\n setAppOpenAd(() => {\n return adUnitId ? AppOpenAd.createForAdRequest(adUnitId, requestOptions) : null;\n });\n }, [adUnitId, requestOptions]);\n\n return useFullScreenAd(appOpenAd);\n}\n"],"mappings":";;;;;;AAiBA;AACA;AAEA;AAIA;AAAoD;AAxBpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAWA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,YAAY,CAC1BC,QAAuB,EAE2B;EAAA,IADlDC,cAA8B,uEAAG,CAAC,CAAC;EAEnC,MAAM,CAACC,SAAS,EAAEC,YAAY,CAAC,GAAG,IAAAC,eAAQ,EAAmB,IAAI,CAAC;EAElE,IAAAC,6BAAoB,EAAC,MAAM;IACzBF,YAAY,CAAC,MAAM;MACjB,OAAOH,QAAQ,GAAGM,oBAAS,CAACC,kBAAkB,CAACP,QAAQ,EAAEC,cAAc,CAAC,GAAG,IAAI;IACjF,CAAC,CAAC;EACJ,CAAC,EAAE,CAACD,QAAQ,EAAEC,cAAc,CAAC,CAAC;EAE9B,OAAO,IAAAO,gCAAe,EAACN,SAAS,CAAC;AACnC"}
1
+ {"version":3,"names":["useAppOpenAd","adUnitId","requestOptions","appOpenAd","setAppOpenAd","useState","useDeepCompareEffect","AppOpenAd","createForAdRequest","useFullScreenAd"],"sourceRoot":"../../src","sources":["useAppOpenAd.ts"],"mappings":";;;;;;AAiBA;AACA;AAEA;AAIA;AAAoD;AAxBpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAWA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,YAAY,CAC1BC,QAAuB,EAE2B;EAAA,IADlDC,cAA8B,uEAAG,CAAC,CAAC;EAEnC,MAAM,CAACC,SAAS,EAAEC,YAAY,CAAC,GAAG,IAAAC,eAAQ,EAAmB,IAAI,CAAC;EAElE,IAAAC,6BAAoB,EAAC,MAAM;IACzBF,YAAY,CAAC,MAAM;MACjB,OAAOH,QAAQ,GAAGM,oBAAS,CAACC,kBAAkB,CAACP,QAAQ,EAAEC,cAAc,CAAC,GAAG,IAAI;IACjF,CAAC,CAAC;EACJ,CAAC,EAAE,CAACD,QAAQ,EAAEC,cAAc,CAAC,CAAC;EAE9B,OAAO,IAAAO,gCAAe,EAACN,SAAS,CAAC;AACnC"}
@@ -1 +1 @@
1
- {"version":3,"names":["initialState","isLoaded","isOpened","isClicked","isClosed","error","undefined","reward","isEarnedReward","useFullScreenAd","ad","state","setState","useReducer","prevState","newState","isShowing","load","useCallback","show","showOptions","useEffect","unsubscribe","addAdEventsListener","type","payload","AdEventType","LOADED","OPENED","CLOSED","CLICKED","ERROR","RewardedAdEventType","EARNED_REWARD"],"sources":["useFullScreenAd.ts"],"sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\nimport { Reducer, useCallback, useEffect, useReducer } from 'react';\n\nimport { AdEventType } from '../AdEventType';\nimport { AppOpenAd } from '../ads/AppOpenAd';\nimport { InterstitialAd } from '../ads/InterstitialAd';\nimport { RewardedAd } from '../ads/RewardedAd';\nimport { RewardedInterstitialAd } from '../ads/RewardedInterstitialAd';\nimport { RewardedAdEventType } from '../RewardedAdEventType';\nimport { AdStates, AdHookReturns } from '../types/AdStates';\nimport { AdShowOptions } from '../types/AdShowOptions';\nimport { RewardedAdReward } from '../types/RewardedAdReward';\n\nconst initialState: AdStates = {\n isLoaded: false,\n isOpened: false,\n isClicked: false,\n isClosed: false,\n error: undefined,\n reward: undefined,\n isEarnedReward: false,\n};\n\nexport function useFullScreenAd<\n T extends AppOpenAd | InterstitialAd | RewardedAd | RewardedInterstitialAd | null,\n>(ad: T): AdHookReturns {\n const [state, setState] = useReducer<Reducer<AdStates, Partial<AdStates>>>(\n (prevState, newState) => ({ ...prevState, ...newState }),\n initialState,\n );\n const isShowing = state.isOpened && !state.isClosed;\n\n const load = useCallback(() => {\n if (ad) {\n setState(initialState);\n ad.load();\n }\n }, [ad]);\n\n const show = useCallback(\n (showOptions?: AdShowOptions) => {\n if (ad) {\n ad.show(showOptions);\n }\n },\n [ad],\n );\n\n useEffect(() => {\n setState(initialState);\n if (!ad) {\n return;\n }\n const unsubscribe = (ad as RewardedAd).addAdEventsListener(({ type, payload }) => {\n switch (type) {\n case AdEventType.LOADED:\n setState({ isLoaded: true });\n break;\n case AdEventType.OPENED:\n setState({ isOpened: true });\n break;\n case AdEventType.CLOSED:\n setState({ isClosed: true, isLoaded: false });\n break;\n case AdEventType.CLICKED:\n setState({ isClicked: true });\n break;\n case AdEventType.ERROR:\n setState({ error: payload as Error });\n break;\n case RewardedAdEventType.LOADED:\n setState({ isLoaded: true, reward: payload as RewardedAdReward });\n break;\n case RewardedAdEventType.EARNED_REWARD:\n setState({ isEarnedReward: true, reward: payload as RewardedAdReward });\n break;\n }\n });\n return () => {\n unsubscribe();\n };\n }, [ad]);\n\n return {\n ...state,\n isShowing,\n load,\n show,\n };\n}\n"],"mappings":";;;;;;AAiBA;AAEA;AAKA;AAxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAcA,MAAMA,YAAsB,GAAG;EAC7BC,QAAQ,EAAE,KAAK;EACfC,QAAQ,EAAE,KAAK;EACfC,SAAS,EAAE,KAAK;EAChBC,QAAQ,EAAE,KAAK;EACfC,KAAK,EAAEC,SAAS;EAChBC,MAAM,EAAED,SAAS;EACjBE,cAAc,EAAE;AAClB,CAAC;AAEM,SAASC,eAAe,CAE7BC,EAAK,EAAiB;EACtB,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAG,IAAAC,iBAAU,EAClC,CAACC,SAAS,EAAEC,QAAQ,MAAM;IAAE,GAAGD,SAAS;IAAE,GAAGC;EAAS,CAAC,CAAC,EACxDf,YAAY,CACb;EACD,MAAMgB,SAAS,GAAGL,KAAK,CAACT,Q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I;YAAEM,MAAM,EAAEkB;UAA4B,CAAC,CAAC;UACjE;QACF,KAAKO,wCAAmB,CAACC,aAAa;UACpCrB,QAAQ,CAAC;YAAEJ,cAAc,EAAE,IAAI;YAAED,MAAM,EAAEkB;UAA4B,CAAC,CAAC;UACvE;MAAM;IAEZ,CAAC,CAAC;IACF,OAAO,MAAM;MACXH,WAAW,EAAE;IACf,CAAC;EACH,CAAC,EAAE,CAACZ,EAAE,CAAC,CAAC;EAER,OAAO;IACL,GAAGC,KAAK;IACRK,SAAS;IACTC,IAAI;IACJE;EACF,CAAC;AACH"}
1
+ {"version":3,"names":["initialState","isLoaded","isOpened","isClicked","isClosed","error","undefined","reward","isEarnedReward","useFullScreenAd","ad","state","setState","useReducer","prevState","newState","isShowing","load","useCallback","show","showOptions","useEffect","unsubscribe","addAdEventsListener","type","payload","AdEventType","LOADED","OPENED","CLOSED","CLICKED","ERROR","RewardedAdEventType","EARNED_REWARD"],"sourceRoot":"../../src","sources":["useFullScreenAd.ts"],"mappings":";;;;;;AAiBA;AAEA;AAKA;AAxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAcA,MAAMA,YAAsB,GAAG;EAC7BC,QAAQ,EAAE,KAAK;EACfC,QAAQ,EAAE,KAAK;EACfC,SAAS,EAAE,KAAK;EAChBC,QAAQ,EAAE,KAAK;EACfC,KAAK,EAAEC,SAAS;EAChBC,MAAM,EAAED,SAAS;EACjBE,cAAc,EAAE;AAClB,CAAC;AAEM,SAASC,eAAe,CAE7BC,EAAK,EAAiB;EACtB,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAG,IAAAC,iBAAU,EAClC,CAACC,SAAS,EAAEC,QAAQ,MAAM;IAAE,GAAGD,SAAS;IAAE,GAAGC;EAAS,CAAC,CAAC,EACxDf,YAAY,CACb;EACD,MAAMgB,SAAS,GAAGL,KAAK,CAACT,QAAQ,IAAI,CAACS,KAAK,CAACP,QA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AAC,CAAC;UACjE;QACF,KAAKO,wCAAmB,CAACC,aAAa;UACpCrB,QAAQ,CAAC;YAAEJ,cAAc,EAAE,IAAI;YAAED,MAAM,EAAEkB;UAA4B,CAAC,CAAC;UACvE;MAAM;IAEZ,CAAC,CAAC;IACF,OAAO,MAAM;MACXH,WAAW,EAAE;IACf,CAAC;EACH,CAAC,EAAE,CAACZ,EAAE,CAAC,CAAC;EAER,OAAO;IACL,GAAGC,KAAK;IACRK,SAAS;IACTC,IAAI;IACJE;EACF,CAAC;AACH"}
@@ -1 +1 @@
1
- {"version":3,"names":["useInterstitialAd","adUnitId","requestOptions","interstitialAd","setInterstitialAd","useState","useDeepCompareEffect","InterstitialAd","createForAdRequest","useFullScreenAd"],"sources":["useInterstitialAd.ts"],"sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\nimport { useState } from 'react';\nimport useDeepCompareEffect from 'use-deep-compare-effect';\n\nimport { InterstitialAd } from '../ads/InterstitialAd';\nimport { AdHookReturns } from '../types/AdStates';\nimport { RequestOptions } from '../types/RequestOptions';\n\nimport { useFullScreenAd } from './useFullScreenAd';\n\n/**\n * React Hook for Interstitial Ad.\n *\n * @param adUnitId The Ad Unit ID for the Interstitial Ad. You can find this on your Google Mobile Ads dashboard. You can destroy ad instance by setting this value to null.\n * @param requestOptions Optional RequestOptions used to load the ad.\n */\nexport function useInterstitialAd(\n adUnitId: string | null,\n requestOptions: RequestOptions = {},\n): Omit<AdHookReturns, 'reward' | 'isEarnedReward'> {\n const [interstitialAd, setInterstitialAd] = useState<InterstitialAd | null>(null);\n\n useDeepCompareEffect(() => {\n setInterstitialAd(() => {\n return adUnitId ? InterstitialAd.createForAdRequest(adUnitId, requestOptions) : null;\n });\n }, [adUnitId, requestOptions]);\n\n return useFullScreenAd(interstitialAd);\n}\n"],"mappings":";;;;;;AAiBA;AACA;AAEA;AAIA;AAAoD;AAxBpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAWA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,iBAAiB,CAC/BC,QAAuB,EAE2B;EAAA,IADlDC,cAA8B,uEAAG,CAAC,CAAC;EAEnC,MAAM,CAACC,cAAc,EAAEC,iBAAiB,CAAC,GAAG,IAAAC,eAAQ,EAAwB,IAAI,CAAC;EAEjF,IAAAC,6BAAoB,EAAC,MAAM;IACzBF,iBAAiB,CAAC,MAAM;MACtB,OAAOH,QAAQ,GAAGM,8BAAc,CAACC,kBAAkB,CAACP,QAAQ,EAAEC,cAAc,CAAC,GAAG,IAAI;IACtF,CAAC,CAAC;EACJ,CAAC,EAAE,CAACD,QAAQ,EAAEC,cAAc,CAAC,CAAC;EAE9B,OAAO,IAAAO,gCAAe,EAACN,cAAc,CAAC;AACxC"}
1
+ {"version":3,"names":["useInterstitialAd","adUnitId","requestOptions","interstitialAd","setInterstitialAd","useState","useDeepCompareEffect","InterstitialAd","createForAdRequest","useFullScreenAd"],"sourceRoot":"../../src","sources":["useInterstitialAd.ts"],"mappings":";;;;;;AAiBA;AACA;AAEA;AAIA;AAAoD;AAxBpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAWA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,iBAAiB,CAC/BC,QAAuB,EAE2B;EAAA,IADlDC,cAA8B,uEAAG,CAAC,CAAC;EAEnC,MAAM,CAACC,cAAc,EAAEC,iBAAiB,CAAC,GAAG,IAAAC,eAAQ,EAAwB,IAAI,CAAC;EAEjF,IAAAC,6BAAoB,EAAC,MAAM;IACzBF,iBAAiB,CAAC,MAAM;MACtB,OAAOH,QAAQ,GAAGM,8BAAc,CAACC,kBAAkB,CAACP,QAAQ,EAAEC,cAAc,CAAC,GAAG,IAAI;IACtF,CAAC,CAAC;EACJ,CAAC,EAAE,CAACD,QAAQ,EAAEC,cAAc,CAAC,CAAC;EAE9B,OAAO,IAAAO,gCAAe,EAACN,cAAc,CAAC;AACxC"}
@@ -1 +1 @@
1
- {"version":3,"names":["useRewardedAd","adUnitId","requestOptions","rewardedAd","setRewardedAd","useState","useDeepCompareEffect","RewardedAd","createForAdRequest","useFullScreenAd"],"sources":["useRewardedAd.ts"],"sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\nimport { useState } from 'react';\nimport useDeepCompareEffect from 'use-deep-compare-effect';\n\nimport { RewardedAd } from '../ads/RewardedAd';\nimport { AdHookReturns } from '../types/AdStates';\nimport { RequestOptions } from '../types/RequestOptions';\n\nimport { useFullScreenAd } from './useFullScreenAd';\n\n/**\n * React Hook for Rewarded Ad.\n *\n * @param adUnitId The Ad Unit ID for the Rewarded Ad. You can find this on your Google Mobile Ads dashboard. You can destroy ad instance by setting this value to null.\n * @param requestOptions Optional RequestOptions used to load the ad.\n */\nexport function useRewardedAd(\n adUnitId: string | null,\n requestOptions: RequestOptions = {},\n): AdHookReturns {\n const [rewardedAd, setRewardedAd] = useState<RewardedAd | null>(null);\n\n useDeepCompareEffect(() => {\n setRewardedAd(() => {\n return adUnitId ? RewardedAd.createForAdRequest(adUnitId, requestOptions) : null;\n });\n }, [adUnitId, requestOptions]);\n\n return useFullScreenAd(rewardedAd);\n}\n"],"mappings":";;;;;;AAiBA;AACA;AAEA;AAIA;AAAoD;AAxBpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAWA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,aAAa,CAC3BC,QAAuB,EAER;EAAA,IADfC,cAA8B,uEAAG,CAAC,CAAC;EAEnC,MAAM,CAACC,UAAU,EAAEC,aAAa,CAAC,GAAG,IAAAC,eAAQ,EAAoB,IAAI,CAAC;EAErE,IAAAC,6BAAoB,EAAC,MAAM;IACzBF,aAAa,CAAC,MAAM;MAClB,OAAOH,QAAQ,GAAGM,sBAAU,CAACC,kBAAkB,CAACP,QAAQ,EAAEC,cAAc,CAAC,GAAG,IAAI;IAClF,CAAC,CAAC;EACJ,CAAC,EAAE,CAACD,QAAQ,EAAEC,cAAc,CAAC,CAAC;EAE9B,OAAO,IAAAO,gCAAe,EAACN,UAAU,CAAC;AACpC"}
1
+ {"version":3,"names":["useRewardedAd","adUnitId","requestOptions","rewardedAd","setRewardedAd","useState","useDeepCompareEffect","RewardedAd","createForAdRequest","useFullScreenAd"],"sourceRoot":"../../src","sources":["useRewardedAd.ts"],"mappings":";;;;;;AAiBA;AACA;AAEA;AAIA;AAAoD;AAxBpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAWA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,aAAa,CAC3BC,QAAuB,EAER;EAAA,IADfC,cAA8B,uEAAG,CAAC,CAAC;EAEnC,MAAM,CAACC,UAAU,EAAEC,aAAa,CAAC,GAAG,IAAAC,eAAQ,EAAoB,IAAI,CAAC;EAErE,IAAAC,6BAAoB,EAAC,MAAM;IACzBF,aAAa,CAAC,MAAM;MAClB,OAAOH,QAAQ,GAAGM,sBAAU,CAACC,kBAAkB,CAACP,QAAQ,EAAEC,cAAc,CAAC,GAAG,IAAI;IAClF,CAAC,CAAC;EACJ,CAAC,EAAE,CAACD,QAAQ,EAAEC,cAAc,CAAC,CAAC;EAE9B,OAAO,IAAAO,gCAAe,EAACN,UAAU,CAAC;AACpC"}
@@ -1 +1 @@
1
- {"version":3,"names":["useRewardedInterstitialAd","adUnitId","requestOptions","rewardedInterstitialAd","setRewardedInterstitialAd","useState","useDeepCompareEffect","RewardedInterstitialAd","createForAdRequest","useFullScreenAd"],"sources":["useRewardedInterstitialAd.ts"],"sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\nimport { useState } from 'react';\nimport useDeepCompareEffect from 'use-deep-compare-effect';\n\nimport { RewardedInterstitialAd } from '../ads/RewardedInterstitialAd';\nimport { AdHookReturns } from '../types/AdStates';\nimport { RequestOptions } from '../types/RequestOptions';\n\nimport { useFullScreenAd } from './useFullScreenAd';\n\n/**\n * React Hook for Rewarded Interstitial Ad.\n *\n * @param adUnitId The Ad Unit ID for the Rewarded Interstitial Ad. You can find this on your Google Mobile Ads dashboard. You can destroy ad instance by setting this value to null.\n * @param requestOptions Optional RequestOptions used to load the ad.\n */\nexport function useRewardedInterstitialAd(\n adUnitId: string | null,\n requestOptions: RequestOptions = {},\n): AdHookReturns {\n const [rewardedInterstitialAd, setRewardedInterstitialAd] =\n useState<RewardedInterstitialAd | null>(null);\n\n useDeepCompareEffect(() => {\n setRewardedInterstitialAd(() => {\n return adUnitId ? RewardedInterstitialAd.createForAdRequest(adUnitId, requestOptions) : null;\n });\n }, [adUnitId, requestOptions]);\n\n return useFullScreenAd(rewardedInterstitialAd);\n}\n"],"mappings":";;;;;;AAiBA;AACA;AAEA;AAIA;AAAoD;AAxBpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAWA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,yBAAyB,CACvCC,QAAuB,EAER;EAAA,IADfC,cAA8B,uEAAG,CAAC,CAAC;EAEnC,MAAM,CAACC,sBAAsB,EAAEC,yBAAyB,CAAC,GACvD,IAAAC,eAAQ,EAAgC,IAAI,CAAC;EAE/C,IAAAC,6BAAoB,EAAC,MAAM;IACzBF,yBAAyB,CAAC,MAAM;MAC9B,OAAOH,QAAQ,GAAGM,8CAAsB,CAACC,kBAAkB,CAACP,QAAQ,EAAEC,cAAc,CAAC,GAAG,IAAI;IAC9F,CAAC,CAAC;EACJ,CAAC,EAAE,CAACD,QAAQ,EAAEC,cAAc,CAAC,CAAC;EAE9B,OAAO,IAAAO,gCAAe,EAACN,sBAAsB,CAAC;AAChD"}
1
+ {"version":3,"names":["useRewardedInterstitialAd","adUnitId","requestOptions","rewardedInterstitialAd","setRewardedInterstitialAd","useState","useDeepCompareEffect","RewardedInterstitialAd","createForAdRequest","useFullScreenAd"],"sourceRoot":"../../src","sources":["useRewardedInterstitialAd.ts"],"mappings":";;;;;;AAiBA;AACA;AAEA;AAIA;AAAoD;AAxBpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAWA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,yBAAyB,CACvCC,QAAuB,EAER;EAAA,IADfC,cAA8B,uEAAG,CAAC,CAAC;EAEnC,MAAM,CAACC,sBAAsB,EAAEC,yBAAyB,CAAC,GACvD,IAAAC,eAAQ,EAAgC,IAAI,CAAC;EAE/C,IAAAC,6BAAoB,EAAC,MAAM;IACzBF,yBAAyB,CAAC,MAAM;MAC9B,OAAOH,QAAQ,GAAGM,8CAAsB,CAACC,kBAAkB,CAACP,QAAQ,EAAEC,cAAc,CAAC,GAAG,IAAI;IAC9F,CAAC,CAAC;EACJ,CAAC,EAAE,CAACD,QAAQ,EAAEC,cAAc,CAAC,CAAC;EAE9B,OAAO,IAAAO,gCAAe,EAACN,sBAAsB,CAAC;AAChD"}
@@ -1 +1 @@
1
- {"version":3,"names":["SDK_VERSION","version"],"sources":["index.ts"],"sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\nimport { version } from './version';\n\n// import { SDK_VERSION } from 'react-native-google-mobile-ads';\nexport const SDK_VERSION = version;\n\nexport { default, MobileAds } from './MobileAds';\nexport { AdsConsentDebugGeography } from './AdsConsentDebugGeography';\nexport { AdsConsentPurposes } from './AdsConsentPurposes';\nexport { AdsConsentSpecialFeatures } from './AdsConsentSpecialFeatures';\nexport { AdsConsentStatus } from './AdsConsentStatus';\nexport { MaxAdContentRating } from './MaxAdContentRating';\nexport { TestIds } from './TestIds';\nexport { AdEventType } from './AdEventType';\nexport { BannerAdSize } from './BannerAdSize';\nexport { GAMAdEventType } from './GAMAdEventType';\nexport { RewardedAdEventType } from './RewardedAdEventType';\nexport { AdsConsent } from './AdsConsent';\nexport { AppOpenAd } from './ads/AppOpenAd';\nexport { InterstitialAd } from './ads/InterstitialAd';\nexport { RewardedAd } from './ads/RewardedAd';\nexport { RewardedInterstitialAd } from './ads/RewardedInterstitialAd';\nexport { BannerAd } from './ads/BannerAd';\nexport { GAMBannerAd } from './ads/GAMBannerAd';\nexport { GAMInterstitialAd } from './ads/GAMInterstitialAd';\nexport { useAppOpenAd } from './hooks/useAppOpenAd';\nexport { useInterstitialAd } from './hooks/useInterstitialAd';\nexport { useRewardedAd } from './hooks/useRewardedAd';\nexport { useRewardedInterstitialAd } from './hooks/useRewardedInterstitialAd';\nexport * from './types';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AAAwB;AAAA;AA7CxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA;AACO,MAAMA,WAAW,GAAGC,gBAAO;AAAC"}
1
+ {"version":3,"names":["SDK_VERSION","version"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AAAwB;AAAA;AA7CxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA;AACO,MAAMA,WAAW,GAAGC,gBAAO;AAAC"}
@@ -1 +1 @@
1
- {"version":3,"names":["RNAppModule","NativeModules","GANativeEventEmitter","NativeEventEmitter","constructor","ready","addListener","eventType","listener","context","eventsNotifyReady","eventsAddListener","subscription","originalRemove","remove","newRemove","eventsRemoveListener","removeSubscription","removeAllListeners","replace","GoogleMobileAdsNativeEventEmitter"],"sources":["GoogleMobileAdsNativeEventEmitter.ts"],"sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\nimport { NativeEventEmitter, NativeModules, EmitterSubscription } from 'react-native';\n\nconst { RNAppModule } = NativeModules;\n\nclass GANativeEventEmitter extends NativeEventEmitter {\n ready: boolean;\n\n constructor() {\n super(RNAppModule);\n this.ready = false;\n }\n\n addListener(\n eventType: string,\n listener: (event: { appName?: string }) => void,\n context?: Record<string, unknown>,\n ) {\n if (!this.ready) {\n RNAppModule.eventsNotifyReady(true);\n this.ready = true;\n }\n RNAppModule.eventsAddListener(eventType);\n\n const subscription = super.addListener(`rnapp_${eventType}`, listener, context);\n\n // React Native 0.65+ altered EventEmitter:\n // - removeSubscription is gone\n // - addListener returns an unsubscriber instead of a more complex object with eventType etc\n\n // make sure eventType for backwards compatibility just in case\n subscription.eventType = `rnapp_${eventType}`;\n\n // New style is to return a remove function on the object, just in csae people call that,\n // we will modify it to do our native unsubscription then call the original\n const originalRemove = subscription.remove;\n const newRemove = () => {\n RNAppModule.eventsRemoveListener(eventType, false);\n if (super.removeSubscription != null) {\n // This is for RN <= 0.64 - 65 and greater no longer have removeSubscription\n super.removeSubscription(subscription);\n } else if (originalRemove != null) {\n // This is for RN >= 0.65\n originalRemove();\n }\n };\n subscription.remove = newRemove;\n return subscription;\n }\n\n removeAllListeners(eventType: string) {\n RNAppModule.eventsRemoveListener(eventType, true);\n super.removeAllListeners(`rnapp_${eventType}`);\n }\n\n // This is likely no longer ever called, but it is here for backwards compatibility with RN <= 0.64\n removeSubscription(subscription: EmitterSubscription) {\n RNAppModule.eventsRemoveListener(subscription.eventType.replace('rnapp_', ''), false);\n if (super.removeSubscription != null) {\n super.removeSubscription(subscription);\n }\n }\n}\n\nexport const GoogleMobileAdsNativeEventEmitter = new GANativeEventEmitter();\n"],"mappings":";;;;;;AAiBA;AAAsF;AAEtF,MAAM;EAAEA;AAAY,CAAC,GAAGC,0BAAa;AAErC,MAAMC,oBAAoB,SAASC,+BAAkB,CAAC;EAGpDC,WAAW,GAAG;IACZ,KAAK,CAACJ,WAAW,CAAC;IAAC;IACnB,IAAI,CAACK,KAAK,GAAG,KAAK;EACpB;EAEAC,WAAW,CACTC,SAAiB,EACjBC,QAA+C,EAC/CC,OAAiC,EACjC;IACA,IAAI,CAAC,IAAI,CAACJ,KAAK,EAAE;MACfL,WAAW,CAACU,iBAAiB,CAAC,IAAI,CAAC;MACnC,IAAI,CAACL,KAAK,GAAG,IAAI;IACnB;IACAL,WAAW,CAACW,iBAAiB,CAACJ,SAAS,CAAC;IAExC,MAAMK,YAAY,GAAG,KAAK,CAACN,WAAW,CAAE,SAAQC,SAAU,EAAC,EAAEC,QAAQ,EAAEC,OAAO,CAAC;;IAE/E;IACA;IACA;;IAEA;IACAG,YAAY,CAACL,SAAS,GAAI,SAAQA,SAAU,EAAC;;IAE7C;IACA;IACA,MAAMM,cAAc,GAAGD,YAAY,CAACE,MAAM;IAC1C,MAAMC,SAAS,GAAG,MAAM;MACtBf,WAAW,CAACgB,oBAAoB,CAACT,SAAS,EAAE,KAAK,CAAC;MAClD,IAAI,KAAK,CAACU,kBAAkB,IAAI,IAAI,EAAE;QACpC;QACA,KAAK,CAACA,kBAAkB,CAACL,YAAY,CAAC;MACxC,CAAC,MAAM,IAAIC,cAAc,IAAI,IAAI,EAAE;QACjC;QACAA,cAAc,EAAE;MAClB;IACF,CAAC;IACDD,YAAY,CAACE,MAAM,GAAGC,SAAS;IAC/B,OAAOH,YAAY;EACrB;EAEAM,kBAAkB,CAACX,SAAiB,EAAE;IACpCP,WAAW,CAACgB,oBAAoB,CAACT,SAAS,EAAE,IAAI,CAAC;IACjD,KAAK,CAACW,kBAAkB,CAAE,SAAQX,SAAU,EAAC,CAAC;EAChD;;EAEA;EACAU,kBAAkB,CAACL,YAAiC,EAAE;IACpDZ,WAAW,CAACgB,oBAAoB,CAACJ,YAAY,CAACL,SAAS,CAACY,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,EAAE,KAAK,CAAC;IACrF,IAAI,KAAK,CAACF,kBAAkB,IAAI,IAAI,EAAE;MACpC,KAAK,CAACA,kBAAkB,CAACL,YAAY,CAAC;IACxC;EACF;AACF;AAEO,MAAMQ,iCAAiC,GAAG,IAAIlB,oBAAoB,EAAE;AAAC"}
1
+ {"version":3,"names":["RNAppModule","NativeModules","GANativeEventEmitter","NativeEventEmitter","constructor","ready","addListener","eventType","listener","context","eventsNotifyReady","eventsAddListener","subscription","originalRemove","remove","newRemove","eventsRemoveListener","removeSubscription","removeAllListeners","replace","GoogleMobileAdsNativeEventEmitter"],"sourceRoot":"../../src","sources":["GoogleMobileAdsNativeEventEmitter.ts"],"mappings":";;;;;;AAiBA;AAAsF;AAEtF,MAAM;EAAEA;AAAY,CAAC,GAAGC,0BAAa;AAErC,MAAMC,oBAAoB,SAASC,+BAAkB,CAAC;EAGpDC,WAAW,GAAG;IACZ,KAAK,CAACJ,WAAW,CAAC;IAAC;IACnB,IAAI,CAACK,KAAK,GAAG,KAAK;EACpB;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EACF;AACF;AAEO,MAAMQ,iCAAiC,GAAG,IAAIlB,oBAAoB,EAAE;AAAC"}
@@ -1 +1 @@
1
- {"version":3,"names":["AppModule","constructor","app","config","_app","_nativeModule","_config","Object","assign","emitter","SharedEventEmitter","eventNameForApp","args","name","join","native","getNativeModule","__extended__"],"sources":["Module.ts"],"sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\nimport { getNativeModule } from './registry/nativeModule';\nimport { SharedEventEmitter } from './SharedEventEmitter';\nimport { App, Config } from '../types/Module.interface';\nimport { GoogleMobileAdsNativeModule } from '../types/GoogleMobileAdsNativeModule';\n\nexport class AppModule {\n _app: App;\n _nativeModule: unknown;\n _config: Config;\n\n static __extended__ = {};\n\n constructor(app: App, config: Config) {\n this._app = app;\n this._nativeModule = null;\n this._config = Object.assign({}, config);\n }\n\n get app() {\n return this._app;\n }\n\n get emitter() {\n return SharedEventEmitter;\n }\n\n eventNameForApp(...args: string[]) {\n return `${this.app.name}-${args.join('-')}`;\n }\n\n get native() {\n if (this._nativeModule) {\n return this._nativeModule as GoogleMobileAdsNativeModule;\n }\n this._nativeModule = getNativeModule(this);\n return this._nativeModule as GoogleMobileAdsNativeModule;\n }\n}\n\n// Instance of checks don't work once compiled\nAppModule.__extended__ = {};\n"],"mappings":";;;;;;AAiBA;AACA;AAA0D;AAInD,MAAMA,SAAS,CAAC;EAOrBC,WAAW,CAACC,GAAQ,EAAEC,MAAc,EAAE;IAAA;IAAA;IAAA;IACpC,IAAI,CAACC,IAAI,GAAGF,GAAG;IACf,IAAI,CAACG,aAAa,GAAG,IAAI;IACzB,IAAI,CAACC,OAAO,GAAGC,MAAM,CAACC,MAAM,CAAC,CAAC,CAAC,EAAEL,MAAM,CAAC;EAC1C;EAEA,IAAID,GAAG,GAAG;IACR,OAAO,IAAI,CAACE,IAAI;EAClB;EAEA,IAAIK,OAAO,GAAG;IACZ,OAAOC,sCAAkB;EAC3B;EAEAC,eAAe,GAAoB;IAAA,kCAAhBC,IAAI;MAAJA,IAAI;IAAA;IACrB,OAAQ,GAAE,IAAI,CAACV,GAAG,CAACW,IAAK,IAAGD,IAAI,CAACE,IAAI,CAAC,GAAG,CAAE,EAAC;EAC7C;EAEA,IAAIC,MAAM,GAAG;IACX,IAAI,IAAI,CAACV,aAAa,EAAE;MACtB,OAAO,IAAI,CAACA,aAAa;IAC3B;IACA,IAAI,CAACA,aAAa,GAAG,IAAAW,6BAAe,EAAC,IAAI,CAAC;IAC1C,OAAO,IAAI,CAACX,aAAa;EAC3B;AACF;;AAEA;AAAA;AAAA,gBAlCaL,SAAS,kBAKE,CAAC,CAAC;AA8B1BA,SAAS,CAACiB,YAAY,GAAG,CAAC,CAAC"}
1
+ {"version":3,"names":["AppModule","constructor","app","config","_app","_nativeModule","_config","Object","assign","emitter","SharedEventEmitter","eventNameForApp","args","name","join","native","getNativeModule","__extended__"],"sourceRoot":"../../src","sources":["Module.ts"],"mappings":";;;;;;AAiBA;AACA;AAA0D;AAInD,MAAMA,SAAS,CAAC;EAOrBC,WAAW,CAACC,GAAQ,EAAEC,MAAc,EAAE;IAAA;IAAA;IAAA;IACpC,IAAI,CAACC,IAAI,GAAGF,GAAG;IACf,IAAI,CAACG,aAAa,GAAG,IAAI;IACzB,IAAI,CAACC,OAAO,GAAGC,MAAM,CAACC,MAAM,CAAC,CAAC,CAAC,EAAEL,MAAM,CAAC;EAC1C;EAEA,IAAID,GAAG,GAAG;IACR,OAAO,IAAI,CAACE,IAAI;EAClB;EAEA,IAAIK,OAAO,GAAG;IACZ,OAAOC,sCAAkB;EAC3B;EAEAC,eAAe,GAAoB;IAAA,kCAAhBC,IAAI;MAAJA,IAAI;IAAA;IACrB,OAAQ,GAAE,IAAI,CAACV,GAAG,CAACW,IAAK,IAAGD,IAAI,CAACE,IAAI,CAAC,GAAG,CAAE,EAAC;EAC7C;EAEA,IAAIC,MAAM,GAAG;IACX,IAAI,IAAI,CAACV,aAAa,EAAE;MACtB,OAAO,IAAI,CAACA,aAAa;IAC3B;IACA,IAAI,CAACA,aAAa,GAAG,IAAAW,6BAAe,EAAC,IAAI,CAAC;IAC1C,OAAO,IAAI,CAACX,aAAa;EAC3B;AACF;;AAEA;AAAA;AAAA,gBAlCaL,SAAS,kBAKE,CAAC,CAAC;AA8B1BA,SAAS,CAACiB,YAAY,GAAG,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"names":["NativeError","Error","fromEvent","errorEvent","namespace","stack","userInfo","constructor","nativeError","jsStack","code","message","getStackWithMessage","split","slice","join"],"sources":["NativeError.ts"],"sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\nexport class NativeError extends Error {\n namespace: string;\n code: string;\n message: string;\n jsStack: string;\n userInfo: { code: string; message: string };\n\n static fromEvent(\n errorEvent: { code: string; message: string },\n namespace: string,\n stack?: string,\n ) {\n return new NativeError({ userInfo: errorEvent }, stack || new Error().stack || '', namespace);\n }\n\n constructor(\n nativeError: { userInfo: { code: string; message: string } },\n jsStack: string,\n namespace: string,\n ) {\n super();\n const { userInfo } = nativeError;\n this.namespace = namespace;\n this.code = `${this.namespace}/${userInfo.code || 'unknown'}`;\n this.message = `[${this.code}] ${userInfo.message}`;\n this.jsStack = jsStack;\n this.userInfo = userInfo;\n this.stack = NativeError.getStackWithMessage(`NativeError: ${this.message}`, this.jsStack);\n }\n\n /**\n * Build a stack trace that includes JS stack prior to calling the native method.\n *\n * @returns {string}\n */\n static getStackWithMessage(message: string, jsStack: string) {\n return [message, ...jsStack.split('\\n').slice(2, 13)].join('\\n');\n }\n}\n"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEO,MAAMA,WAAW,SAASC,KAAK,CAAC;EAOrC,OAAOC,SAAS,CACdC,UAA6C,EAC7CC,SAAiB,EACjBC,KAAc,EACd;IACA,OAAO,IAAIL,WAAW,CAAC;MAAEM,QAAQ,EAAEH;IAAW,CAAC,EAAEE,KAAK,IAAI,IAAIJ,KAAK,EAAE,CAACI,KAAK,IAAI,EAAE,EAAED,SAAS,CAAC;EAC/F;EAEAG,WAAW,CACTC,WAA4D,EAC5DC,OAAe,EACfL,SAAiB,EACjB;IACA,KAAK,EAAE;IAAC;IAAA;IAAA;IAAA;IAAA;IACR,MAAM;MAAEE;IAAS,CAAC,GAAGE,WAAW;IAChC,IAAI,CAACJ,SAAS,GAAGA,SAAS;IAC1B,IAAI,CAACM,IAAI,GAAI,GAAE,IAAI,CAACN,SAAU,IAAGE,QAAQ,CAACI,IAAI,IAAI,SAAU,EAAC;IAC7D,IAAI,CAACC,OAAO,GAAI,IAAG,IAAI,CAACD,IAAK,KAAIJ,QAAQ,CAACK,OAAQ,EAAC;IACnD,IAAI,CAACF,OAAO,GAAGA,OAAO;IACtB,IAAI,CAACH,QAAQ,GAAGA,QAAQ;IACxB,IAAI,CAACD,KAAK,GAAGL,WAAW,CAACY,mBAAmB,CAAE,gBAAe,IAAI,CAACD,OAAQ,EAAC,EAAE,IAAI,CAACF,OAAO,CAAC;EAC5F;;EAEA;AACF;AACA;AACA;AACA;EACE,OAAOG,mBAAmB,CAACD,OAAe,EAAEF,OAAe,EAAE;IAC3D,OAAO,CAACE,OAAO,EAAE,GAAGF,OAAO,CAACI,KAAK,CAAC,IAAI,CAAC,CAACC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAACC,IAAI,CAAC,IAAI,CAAC;EAClE;AACF;AAAC"}
1
+ {"version":3,"names":["NativeError","Error","fromEvent","errorEvent","namespace","stack","userInfo","constructor","nativeError","jsStack","code","message","getStackWithMessage","split","slice","join"],"sourceRoot":"../../src","sources":["NativeError.ts"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEO,MAAMA,WAAW,SAASC,KAAK,CAAC;EAOrC,OAAOC,SAAS,CACdC,UAA6C,EAC7CC,SAAiB,EACjBC,KAAc,EACd;IACA,OAAO,IAAIL,WAAW,CAAC;MAAEM,QAAQ,EAAEH;IAAW,CAAC,EAAEE,KAAK,IAAI,IAAIJ,KAAK,EAAE,CAACI,KAAK,IAAI,EAAE,EAAED,SAAS,CAAC;EAC/F;EAEAG,WAAW,CACTC,WAA4D,EAC5DC,OAAe,EACfL,SAAiB,EACjB;IACA,KAAK,EAAE;IAAC;IAAA;IAAA;IAAA;IAAA;IACR,MAAM;MAAEE;IAAS,CAAC,GAAGE,WAAW;IAChC,IAAI,CAACJ,SAAS,GAAGA,SAAS;IAC1B,IAAI,CAACM,IAAI,GAAI,GAAE,IAAI,CAACN,SAAU,IAAGE,QAAQ,CAACI,IAAI,IAAI,SAAU,EAAC;IAC7D,IAAI,CAACC,OAAO,GAAI,IAAG,IAAI,CAACD,IAAK,KAAIJ,QAAQ,CAACK,OAAQ,EAAC;IACnD,IAAI,CAACF,OAAO,GAAGA,OAAO;IACtB,IAAI,CAACH,QAAQ,GAAGA,QAAQ;IACxB,IAAI,CAACD,KAAK,GAAGL,WAAW,CAACY,mBAAmB,CAAE,gBAAe,IAAI,CAACD,OAAQ,EAAC,EAAE,IAAI,CAACF,OAAO,CAAC;EAC5F;;EAEA;AACF;AACA;AACA;AACA;EACE,OAAOG,mBAAmB,CAACD,OAAe,EAAEF,OAAe,EAAE;IAC3D,OAAO,CAACE,OAAO,EAAE,GAAGF,OAAO,CAACI,KAAK,CAAC,IAAI,CAAC,CAACC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAACC,IAAI,CAAC,IAAI,CAAC;EAClE;AACF;AAAC"}
@@ -1 +1 @@
1
- {"version":3,"names":["SharedEventEmitter","Emitter"],"sources":["SharedEventEmitter.ts"],"sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\n// @ts-ignore: Could not find a declaration file\nimport Emitter from 'react-native/Libraries/vendor/emitter/EventEmitter';\nimport { EventEmitter } from 'react-native';\n\nexport const SharedEventEmitter: EventEmitter = new Emitter();\n"],"mappings":";;;;;;AAkBA;AAAyE;AAlBzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAIO,MAAMA,kBAAgC,GAAG,IAAIC,qBAAO,EAAE;AAAC"}
1
+ {"version":3,"names":["SharedEventEmitter","Emitter"],"sourceRoot":"../../src","sources":["SharedEventEmitter.ts"],"mappings":";;;;;;AAkBA;AAAyE;AAlBzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAIO,MAAMA,kBAAgC,GAAG,IAAIC,qBAAO,EAAE;AAAC"}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\nexport { AppModule as Module } from './Module';\nexport { NativeError } from './NativeError';\nexport * from './registry/nativeModule';\nexport { SharedEventEmitter } from './SharedEventEmitter';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBA;AACA;AACA;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA"}
1
+ {"version":3,"names":[],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBA;AACA;AACA;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA"}
@@ -1 +1 @@
1
- {"version":3,"names":["NATIVE_MODULE_REGISTRY","NATIVE_MODULE_EVENT_SUBSCRIPTIONS","nativeModuleKey","module","_customUrlOrRegion","app","name","_config","namespace","nativeModuleMethodWrapped","method","argToPrepend","args","possiblePromise","then","jsStack","Error","stack","catch","nativeError","Promise","reject","NativeError","nativeModuleWrapped","NativeModule","native","properties","Object","keys","i","len","length","property","isFunction","initialiseNativeModule","config","key","nativeEvents","nativeModuleName","multiModuleRoot","multiModule","Array","isArray","nativeModuleNames","nativeModule","NativeModules","getMissingModuleHelpText","assign","subscribeToNativeModuleEvent","freeze","eventName","GoogleMobileAdsNativeEventEmitter","addListener","event","appName","SharedEventEmitter","emit","snippet","charAt","toUpperCase","slice","Platform","OS","rnPackage","newInstance","getNativeModule"],"sources":["nativeModule.ts"],"sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\nimport { NativeModules, Platform } from 'react-native';\nimport { NativeError } from '../NativeError';\nimport { GoogleMobileAdsNativeEventEmitter } from '../GoogleMobileAdsNativeEventEmitter';\nimport { SharedEventEmitter } from '../SharedEventEmitter';\nimport { isFunction } from '../../common';\nimport { ModuleInterface } from '../../types/Module.interface';\n\nconst NATIVE_MODULE_REGISTRY: Record<string, unknown> = {};\nconst NATIVE_MODULE_EVENT_SUBSCRIPTIONS: Record<string, unknown> = {};\n\nfunction nativeModuleKey(module: ModuleInterface) {\n return `${module._customUrlOrRegion || ''}:${module.app.name}:${module._config.namespace}`;\n}\n\n/**\n * Wraps a native module method to provide\n * auto prepended args and custom Error classes.\n *\n * @param namespace\n * @param method\n * @param argToPrepend\n * @returns {Function}\n */\nfunction nativeModuleMethodWrapped(\n namespace: string,\n method: (...args: unknown[]) => Promise<unknown> | void,\n argToPrepend: [],\n) {\n return (...args: []) => {\n const possiblePromise = method(...[...argToPrepend, ...args]);\n\n // @ts-ignore -- return type is Promise, so tsc infers we *know* it is a promise and .then always exists, but\n // but the typing is actually speculative, we do need to test it\n if (possiblePromise && possiblePromise.then) {\n const jsStack = new Error().stack || '';\n return possiblePromise.catch(nativeError =>\n Promise.reject(new NativeError(nativeError, jsStack, namespace)),\n );\n }\n\n return possiblePromise;\n };\n}\n\n/**\n * Prepends all arguments in prependArgs to all native method calls\n *\n * @param namespace\n * @param NativeModule\n * @param argToPrepend\n */\nfunction nativeModuleWrapped(\n namespace: string,\n NativeModule: Record<string, (...args: unknown[]) => Promise<unknown> | void>,\n argToPrepend: [],\n) {\n const native: Record<string, unknown> = {};\n if (!NativeModule) {\n return NativeModule;\n }\n\n const properties = Object.keys(NativeModule);\n\n for (let i = 0, len = properties.length; i < len; i++) {\n const property = properties[i];\n if (isFunction(NativeModule[property])) {\n native[property] = nativeModuleMethodWrapped(namespace, NativeModule[property], argToPrepend);\n } else {\n native[property] = NativeModule[property];\n }\n }\n\n return native;\n}\n\n/**\n * Initialises and wraps all the native module methods.\n *\n * @param module\n * @returns {*}\n */\nfunction initialiseNativeModule(module: ModuleInterface) {\n const config = module._config;\n const key = nativeModuleKey(module);\n const { namespace, nativeEvents, nativeModuleName } = config;\n const multiModuleRoot: Record<string, unknown> = {};\n const multiModule = Array.isArray(nativeModuleName);\n const nativeModuleNames = multiModule ? nativeModuleName : [nativeModuleName];\n\n for (let i = 0; i < nativeModuleNames.length; i++) {\n const nativeModule = NativeModules[nativeModuleNames[i]];\n\n // only error if there's a single native module\n // as multi modules can mean some are optional\n if (!multiModule && !nativeModule) {\n throw new Error(getMissingModuleHelpText(namespace));\n }\n\n if (multiModule) {\n multiModuleRoot[nativeModuleNames[i]] = !!nativeModule;\n }\n\n Object.assign(multiModuleRoot, nativeModuleWrapped(namespace, nativeModule, []));\n }\n\n if (nativeEvents && nativeEvents.length) {\n for (let i = 0, len = nativeEvents.length; i < len; i++) {\n subscribeToNativeModuleEvent(nativeEvents[i]);\n }\n }\n\n Object.freeze(multiModuleRoot);\n\n NATIVE_MODULE_REGISTRY[key] = multiModuleRoot;\n\n return NATIVE_MODULE_REGISTRY[key];\n}\n\n/**\n * Subscribe to a native event for js side distribution by appName\n * React Native events are hard set at compile - cant do dynamic event names\n * so we use a single event send it to js and js then internally can prefix it\n * and distribute dynamically.\n *\n * @param eventName\n * @private\n */\nfunction subscribeToNativeModuleEvent(eventName: string) {\n if (!NATIVE_MODULE_EVENT_SUBSCRIPTIONS[eventName]) {\n GoogleMobileAdsNativeEventEmitter.addListener(eventName, event => {\n if (event.appName) {\n // native event has an appName property - auto prefix and internally emit\n SharedEventEmitter.emit(`${event.appName}-${eventName}`, event);\n } else {\n // standard event - no need to prefix\n SharedEventEmitter.emit(eventName, event);\n }\n });\n\n NATIVE_MODULE_EVENT_SUBSCRIPTIONS[eventName] = true;\n }\n}\n\n/**\n * Help text for integrating the native counter parts for each module.\n *\n * @param namespace\n * @returns {string}\n */\nfunction getMissingModuleHelpText(namespace: string) {\n const snippet = `${namespace}()`;\n const nativeModule = namespace.charAt(0).toUpperCase() + namespace.slice(1);\n\n if (Platform.OS === 'ios') {\n return (\n `You attempted to use a module that's not installed natively on your iOS project by calling ${snippet}.` +\n '\\r\\n\\r\\nEnsure you have either linked the module or added it to your projects Podfile.' +\n '\\r\\n\\r\\nSee http://invertase.link/ios for full setup instructions.'\n );\n }\n\n const rnPackage = `'io.invertase.${namespace}.ReactNative${nativeModule}Package'`;\n const newInstance = `'new ReactNative${nativeModule}Package()'`;\n\n return (\n `You attempted to use a module that's not installed on your Android project by calling ${snippet}.` +\n `\\r\\n\\r\\nEnsure you have:\\r\\n\\r\\n1) imported the ${rnPackage} module in your 'MainApplication.java' file.\\r\\n\\r\\n2) Added the ` +\n `${newInstance} line inside of the RN 'getPackages()' method list.` +\n '\\r\\n\\r\\nSee http://invertase.link/android for full setup instructions.'\n );\n}\n\n/**\n * Gets a wrapped native module instance for the provided module.\n * Will attempt to create a new instance if non previously created.\n *\n * @param module\n * @returns {*}\n */\nexport function getNativeModule(module: ModuleInterface) {\n const key = nativeModuleKey(module);\n\n if (NATIVE_MODULE_REGISTRY[key]) {\n return NATIVE_MODULE_REGISTRY[key];\n }\n\n return initialiseNativeModule(module);\n}\n"],"mappings":";;;;;;AAiBA;AACA;AACA;AACA;AACA;AArBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AASA,MAAMA,sBAA+C,GAAG,CAAC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EAAE,KAAK,KAAK,EAAE;IACzB,OACG,8FAA6FL,OAAQ,GAAE,GACxG,wFAAwF,GACxF,oEAAoE;EAExE;EAEA,MAAMM,SAAS,GAAI,iBAAgBvD,SAAU,eAAcoC,YAAa,UAAS;EACjF,MAAMoB,WAAW,GAAI,mBAAkBpB,YAAa,YAAW;EAE/D,OACG,yFAAwFa,OAAQ,GAAE,GAClG,mDAAkDM,SAAU,mEAAkE,GAC9H,GAAEC,WAAY,qDAAoD,GACnE,wEAAwE;AAE5E;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,eAAe,CAAC9D,MAAuB,EAAE;EACvD,MAAMiC,GAAG,GAAGlC,eAAe,CAACC,MAAM,CAAC;EAEnC,IAAIH,sBAAsB,CAACoC,GAAG,CAAC,EAAE;IAC/B,OAAOpC,sBAAsB,CAACoC,GAAG,CAAC;EACpC;EAEA,OAAOF,sBAAsB,CAAC/B,MAAM,CAAC;AACvC"}
1
+ {"version":3,"names":["NATIVE_MODULE_REGISTRY","NATIVE_MODULE_EVENT_SUBSCRIPTIONS","nativeModuleKey","module","_customUrlOrRegion","app","name","_config","namespace","nativeModuleMethodWrapped","method","argToPrepend","args","possiblePromise","then","jsStack","Error","stack","catch","nativeError","Promise","reject","NativeError","nativeModuleWrapped","NativeModule","native","properties","Object","keys","i","len","length","property","isFunction","initialiseNativeModule","config","key","nativeEvents","nativeModuleName","multiModuleRoot","multiModule","Array","isArray","nativeModuleNames","nativeModule","NativeModules","getMissingModuleHelpText","assign","subscribeToNativeModuleEvent","freeze","eventName","GoogleMobileAdsNativeEventEmitter","addListener","event","appName","SharedEventEmitter","emit","snippet","charAt","toUpperCase","slice","Platform","OS","rnPackage","newInstance","getNativeModule"],"sourceRoot":"../../src","sources":["nativeModule.ts"],"mappings":";;;;;;AAiBA;AACA;AACA;AACA;AACA;AArBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AASA,MAAM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IAAIC,qBAAQ,CAACC,EAAE,KAAK,KAAK,EAAE;IACzB,OACG,8FAA6FL,OAAQ,GAAE,GACxG,wFAAwF,GACxF,oEAAoE;EAExE;EAEA,MAAMM,SAAS,GAAI,iBAAgBvD,SAAU,eAAcoC,YAAa,UAAS;EACjF,MAAMoB,WAAW,GAAI,mBAAkBpB,YAAa,YAAW;EAE/D,OACG,yFAAwFa,OAAQ,GAAE,GAClG,mDAAkDM,SAAU,mEAAkE,GAC9H,GAAEC,WAAY,qDAAoD,GACnE,wEAAwE;AAE5E;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,eAAe,CAAC9D,MAAuB,EAAE;EACvD,MAAMiC,GAAG,GAAGlC,eAAe,CAACC,MAAM,CAAC;EAEnC,IAAIH,sBAAsB,CAACoC,GAAG,CAAC,EAAE;IAC/B,OAAOpC,sBAAsB,CAACoC,GAAG,CAAC;EACpC;EAEA,OAAOF,sBAAsB,CAAC/B,MAAM,CAAC;AACvC"}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["AdEventListener.ts"],"sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\nimport { AdEventType } from '../AdEventType';\nimport { GAMAdEventType } from '../GAMAdEventType';\nimport { RewardedAdEventType } from '../RewardedAdEventType';\nimport { AppEvent } from './AppEvent';\nimport { RewardedAdReward } from './RewardedAdReward';\n\nexport type AdEventPayload<T extends AdEventType | RewardedAdEventType | GAMAdEventType = never> =\n T extends AdEventType.ERROR\n ? Error\n : T extends RewardedAdEventType\n ? RewardedAdReward\n : T extends GAMAdEventType\n ? AppEvent\n : undefined;\n\nexport type AdEventListener<T extends AdEventType | RewardedAdEventType | GAMAdEventType = never> =\n (payload: AdEventPayload<T>) => void;\n"],"mappings":""}
1
+ {"version":3,"names":[],"sourceRoot":"../../src","sources":["AdEventListener.ts"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["AdEventsListener.ts"],"sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\nimport { AdEventType } from '../AdEventType';\nimport { GAMAdEventType } from '../GAMAdEventType';\nimport { RewardedAdEventType } from '../RewardedAdEventType';\nimport { AdEventPayload } from './AdEventListener';\n\nexport type AdEventsListener<T extends AdEventType | RewardedAdEventType | GAMAdEventType = never> =\n (eventInfo: { type: T; payload: AdEventPayload<T> }) => void;\n"],"mappings":""}
1
+ {"version":3,"names":[],"sourceRoot":"../../src","sources":["AdEventsListener.ts"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["AdShowOptions.ts"],"sourcesContent":["/**\n * A `AdShowOptions` interface used when showing an ad.\n */\nexport interface AdShowOptions {\n /**\n * - On Android, enables [immersive mode](https://developer.android.com/training/system-ui/immersive).\n * - On iOS, this has no effect on how the ad is shown.\n *\n * @android\n */\n immersiveModeEnabled?: boolean;\n}\n"],"mappings":""}
1
+ {"version":3,"names":[],"sourceRoot":"../../src","sources":["AdShowOptions.ts"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["AdStates.ts"],"sourcesContent":["import { AdShowOptions } from './AdShowOptions';\nimport { RewardedAdReward } from './RewardedAdReward';\n\nexport interface AdStates {\n /**\n * Whether the ad is loaded and ready to to be shown to the user.\n */\n isLoaded: boolean;\n /**\n * Whether the ad is opened.\n */\n isOpened: boolean;\n /**\n * Whether the user clicked the advert.\n */\n isClicked: boolean;\n /**\n * Whether the user closed the ad and has returned back to your application.\n */\n isClosed: boolean;\n /**\n * JavaScript Error containing the error code and message thrown by the Ad.\n */\n error?: Error;\n /**\n * Loaded reward item of the Rewarded Ad.\n */\n reward?: RewardedAdReward;\n /**\n * Whether the user earned the reward by Rewarded Ad.\n */\n isEarnedReward?: boolean;\n}\n\nexport interface AdHookReturns extends AdStates {\n /**\n * Whether your ad is showing.\n * The value is equal with `isOpened && !isClosed`.\n */\n isShowing: boolean;\n /**\n * Start loading the advert with the provided RequestOptions.\n * #### Example\n *\n * ```jsx\n * export default function App() {\n * const interstitial = useInterstitialAd(TestIds.INTERSTITIAL, {\n * requestNonPersonalizedAdsOnly: true,\n * });\n * useEffect(() => {\n * interstitial.load();\n * }, [interstitial.load]);\n * }\n * ```\n */\n load: () => void;\n /**\n * Show the loaded advert to the user.\n *\n * #### Example\n *\n * ```jsx\n * export default function App() {\n * const interstitial = useInterstitialAd(TestIds.INTERSTITIAL, {\n * requestNonPersonalizedAdsOnly: true,\n * });\n * return (\n * <View>\n * <Button\n * title=\"Navigate to next screen\"\n * onPress={() => {\n * if (interstitial.isLoaded) {\n * interstitial.show();\n * } else {\n * navigation.navigate('NextScreen');\n * }\n * }}\n * />\n * </View>\n * )\n * }\n * ```\n *\n * @param showOptions An optional `AdShowOptions` interface.\n */\n show: (showOptions?: AdShowOptions) => void;\n}\n"],"mappings":""}
1
+ {"version":3,"names":[],"sourceRoot":"../../src","sources":["AdStates.ts"],"mappings":""}
@@ -4,9 +4,10 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.InitializationState = void 0;
7
- let InitializationState; /**
8
- * An immutable snapshot of a mediation adapter's initialization status.
9
- */
7
+ let InitializationState;
8
+ /**
9
+ * An immutable snapshot of a mediation adapter's initialization status.
10
+ */
10
11
  exports.InitializationState = InitializationState;
11
12
  (function (InitializationState) {
12
13
  InitializationState[InitializationState["AdapterInitializationStateNotReady"] = 0] = "AdapterInitializationStateNotReady";
@@ -1 +1 @@
1
- {"version":3,"names":["InitializationState"],"sources":["AdapterStatus.ts"],"sourcesContent":["export enum InitializationState {\n /**\n * The mediation adapter is less likely to fill ad requests.\n */\n AdapterInitializationStateNotReady = 0,\n\n /**\n * The mediation adapter is ready to service ad requests.\n */\n AdapterInitializationStateReady = 1,\n}\n\n/**\n * An immutable snapshot of a mediation adapter's initialization status.\n */\nexport type AdapterStatus = {\n name: string;\n description: string;\n status: InitializationState;\n};\n"],"mappings":";;;;;;IAAYA,mBAAmB,EAY/B;AACA;AACA;AAFA;AAAA,WAZYA,mBAAmB;EAAnBA,mBAAmB,CAAnBA,mBAAmB;EAAnBA,mBAAmB,CAAnBA,mBAAmB;AAAA,GAAnBA,mBAAmB,mCAAnBA,mBAAmB"}
1
+ {"version":3,"names":["InitializationState"],"sourceRoot":"../../src","sources":["AdapterStatus.ts"],"mappings":";;;;;;IAAYA,mBAAmB;AAY/B;AACA;AACA;AAFA;AAAA,WAZYA,mBAAmB;EAAnBA,mBAAmB,CAAnBA,mBAAmB;EAAnBA,mBAAmB,CAAnBA,mBAAmB;AAAA,GAAnBA,mBAAmB,mCAAnBA,mBAAmB"}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["AdsConsent.interface.ts"],"sourcesContent":["import { TCModel } from '@iabtcf/core';\nimport { AdsConsentDebugGeography } from '../AdsConsentDebugGeography';\nimport { AdsConsentStatus } from '../AdsConsentStatus';\n\n/**\n * Under the Google [EU User Consent Policy](https://www.google.com/about/company/consentstaging.html), you must make certain disclosures to your users in the European Economic Area (EEA)\n * and obtain their consent to use cookies or other local storage, where legally required, and to use personal data\n * (such as AdID) to serve ads. This policy reflects the requirements of the EU ePrivacy Directive and the\n * General Data Protection Regulation (GDPR).\n *\n * It is recommended that you determine the status of a user's consent at every app launch. The user consent status is held\n * on the device until a condition changes which requires the user to consent again, such as a change in publishers.\n *\n * For more information, see [here](https://developers.google.com/admob/ump/android/quick-start#delay_app_measurement_optional).\n */\n\nexport interface AdsConsentInterface {\n /**\n * Requests user consent information.\n *\n * The response from this method provides information about consent form availability and consent status.\n *\n * #### Example\n *\n * ```js\n * import { AdsConsent } from 'react-native-google-mobile-ads';\n *\n * const consentInfo = await AdsConsent.requestInfoUpdate();\n * console.log('A consent form is available:', consentInfo.isConsentFormAvailable);\n * console.log('User consent status:', consentInfo.status);\n * ```\n * @param options An AdsConsentInfoOptions interface.\n */\n requestInfoUpdate(options?: AdsConsentInfoOptions): Promise<AdsConsentInfo>;\n\n /**\n * Shows a Google-rendered user consent form.\n *\n * #### Example\n *\n * ```js\n * import { AdsConsent, AdsConsentStatus } from 'react-native-google-mobile-ads';\n *\n * async function requestConsent() {\n * const consentInfo = await AdsConsent.requestInfoUpdate();\n *\n * // Check if user requires consent\n * if (\n * consentInfo.isConsentFormAvailable &&\n * (consentInfo.status === AdsConsentStatus.UNKNOWN ||\n * consentInfo.status === AdsConsentStatus.REQUIRED)) {\n * // Show a Google-rendered form\n * const formResult = await AdsConsent.showForm();\n *\n * console.log('User consent obtained: ', formResult.status === AdsConsentStatus.OBTAINED);\n * }\n * }\n *\n * ```\n */\n showForm(): Promise<AdsConsentFormResult>;\n\n /**\n * Returns the value stored under the `IABTCF_TCString` key\n * in NSUserDefaults (iOS) / SharedPreferences (Android) as\n * defined by the IAB Europe Transparency & Consent Framework.\n *\n * More information available here:\n * https://github.com/InteractiveAdvertisingBureau/GDPR-Transparency-and-Consent-Framework/blob/master/TCFv2/IAB%20Tech%20Lab%20-%20CMP%20API%20v2.md#in-app-details\n *\n * #### Example\n *\n * ```js\n * import { AdsConsent } from '@invertase/react-native-google-ads';\n *\n * const tcString = await AdsConsent.getTCString();\n * ```\n */\n getTCString(): Promise<string>;\n\n /**\n * Returns the TC Model of the saved IAB TCF 2.0 String.\n *\n * #### Example\n *\n * ```js\n * import { AdsConsent } from '@invertase/react-native-google-ads';\n *\n * const tcModel = await AdsConsent.getTCModel();\n * ```\n */\n getTCModel(): Promise<TCModel>;\n\n /**\n * Provides information about a user's consent choices.\n *\n * #### Example\n *\n * ```js\n * import { AdsConsent } from '@invertase/react-native-google-ads';\n *\n * const { storeAndAccessInformationOnDevice } = await AdsConsent.getUserChoices();\n * ```\n */\n getUserChoices(): Promise<AdsConsentUserChoices>;\n\n /**\n * Resets the UMP SDK state.\n *\n * #### Example\n *\n * ```js\n * import { AdsConsent } from '@invertase/react-native-google-ads';\n *\n * AdsConsent.reset();\n * ```\n */\n reset(): void;\n}\n\n/**\n * The options used when requesting consent information.\n */\nexport interface AdsConsentInfoOptions {\n /**\n * Sets the debug geography to locally test consent.\n */\n debugGeography?: AdsConsentDebugGeography;\n\n /**\n * Set to `true` to provide the option for the user to accept being shown personalized ads, defaults to `false`.\n */\n tagForUnderAgeOfConsent?: boolean;\n\n /**\n * An array of test device IDs to allow.\n */\n testDeviceIdentifiers?: string[];\n}\n\n/**\n * The result of a Google-rendered consent form.\n */\nexport interface AdsConsentFormResult {\n /**\n * The consent status of the user after closing the consent form.\n *\n * - `UNKNOWN`: Unknown consent status.\n * - `REQUIRED`: User consent required but not yet obtained.\n * - `NOT_REQUIRED`: User consent not required.\n * - `OBTAINED`: User consent already obtained.\n */\n status: AdsConsentStatus;\n}\n\n/**\n * The result of requesting info about a users consent status.\n */\nexport interface AdsConsentInfo {\n /**\n * The consent status of the user.\n *\n * - `UNKNOWN`: Unknown consent status.\n * - `REQUIRED`: User consent required but not yet obtained.\n * - `NOT_REQUIRED`: User consent not required.\n * - `OBTAINED`: User consent already obtained.\n */\n status: AdsConsentStatus;\n\n /**\n * If `true` a consent form is available.\n */\n isConsentFormAvailable: boolean;\n}\n\n/**\n * The options used when requesting consent information.\n *\n * https://vendor-list.consensu.org/v2/vendor-list.json\n * https://github.com/InteractiveAdvertisingBureau/GDPR-Transparency-and-Consent-Framework\n */\nexport interface AdsConsentUserChoices {\n /**\n * Your device can be identified based on a scan of your device's\n * unique combination of characteristics.\n *\n * Vendors can:\n * - Create an identifier using data collected via actively scanning a device for\n * - specific characteristics, e.g. installed fonts or screen resolution.\n * - Use such an identifier to re-identify a device.\n */\n activelyScanDeviceCharacteristicsForIdentification: boolean;\n /**\n * Market research can be used to learn more about the audiences who visit sites/apps and view ads.\n *\n * To apply market research to generate audience insights vendors can:\n * - Provide aggregate reporting to advertisers or their representatives about\n * the audiences reached by their ads, through panel-based and similarly derived insights.\n * - Provide aggregate reporting to publishers about the audiences that were served or\n * interacted with content and/or ads on their property by applying\n * panel-based and similarly derived insights.\n * - Associate offline data with an online user for the purposes of\n * market research to generate audience insights if vendors have declared to match and\n * combine offline data sources (Feature 1)\n * - Combine this information with other information previously collected including from\n * across websites and apps.\n *\n * Vendors cannot:\n * - Measure the performance and effectiveness of ads that a specific user was served or\n * interacted with, without a Legal Basis to measure ad performance.\n * - Measure which content a specific user was served and how they interacted with it,\n * without a Legal Basis to measure content performance.\n */\n applyMarketResearchToGenerateAudienceInsights: boolean;\n /**\n * A profile can be built about you and your interests to show you personalised ads\n * that are relevant to you.\n *\n * To create a personalised ads profile vendors can:\n * - Collect information about a user, including a user's activity, interests,\n * demographic information, or location, to create or edit a user profile for use\n * in personalised advertising.\n * - Combine this information with other information previously collected,\n * including from across websites and apps, to create or edit a user profile\n * for use in personalised advertising.\n */\n createAPersonalisedAdsProfile: boolean;\n /**\n * A profile can be built about you and your interests to show you personalised content\n * that is relevant to you.\n *\n * To create a personalised content profile vendors can:\n * - Collect information about a user, including a user's activity, interests, visits to\n * sites or apps, demographic information, or location, to create or edit a user profile\n * for personalising content.\n * - Combine this information with other information previously collected,\n * including from across websites and apps, to create or edit a user profile for use\n * in personalising content.\n */\n createAPersonalisedContentProfile: boolean;\n /**\n * Your data can be used to improve existing systems and software,\n * and to develop new products\n *\n * To develop new products and improve products vendors can:\n * - Use information to improve their existing products with new features and\n * to develop new products\n * - Create new models and algorithms through machine learning\n *\n * Vendors cannot:\n * - Conduct any other data processing operation allowed under\n * a different purpose under this purpose\n */\n developAndImproveProducts: boolean;\n /**\n * The performance and effectiveness of ads that you see or interact with can be measured.\n *\n * To measure ad performance vendors can:\n * - Measure whether and how ads were delivered to and interacted with by a user\n * - Provide reporting about ads including their effectiveness and performance\n * - Provide reporting about users who interacted with ads using data observed during\n * the course of the user's interaction with that ad\n * - Provide reporting to publishers about the ads displayed on their property\n * - Measure whether an ad is serving in a suitable editorial environment (brand-safe) context\n * - Determine the percentage of the ad that had the opportunity to be seen and\n * the duration of that opportunity\n * - Combine this information with other information previously collected,\n * including from across websites and apps\n *\n * Vendors cannot:\n * - Apply panel- or similarly-derived audience insights data to ad measurement data\n * without a Legal Basis to apply market research to generate audience insights (Purpose 9)\n */\n measureAdPerformance: boolean;\n /**\n * The performance and effectiveness of content that you see or interact with can be measured.\n *\n * To measure content performance vendors can:\n * - Measure and report on how content was delivered to and interacted with by users.\n * - Provide reporting, using directly measurable or known information, about users who\n * interacted with the content\n * - Combine this information with other information previously collected,\n * including from across websites and apps.\n *\n * Vendors cannot:\n * - Measure whether and how ads (including native ads) were delivered to and\n * interacted with by a user.\n * - Apply panel- or similarly derived audience insights data to ad measurement\n * data without a Legal Basis to apply market research to generate audience insights (Purpose 9)\n */\n measureContentPerformance: boolean;\n /**\n * Ads can be shown to you based on the content you’re viewing,\n * the app you’re using, your approximate location, or your device type.\n *\n * To do basic ad selection vendors can:\n * - Use real-time information about the context in which the ad will be shown,\n * to show the ad, including information about the content and the device, such as:\n * device type and capabilities, user agent, URL, IP address\n * - Use a user’s non-precise geolocation data\n * - Control the frequency of ads shown to a user.\n * - Sequence the order in which ads are shown to a user.\n * - Prevent an ad from serving in an unsuitable editorial (brand-unsafe) context\n *\n * Vendors cannot:\n * - Create a personalised ads profile using this information for the selection of\n * future ads without a separate legal basis to create a personalised ads profile.\n * - N.B. Non-precise means only an approximate location involving at least a radius\n * of 500 meters is permitted.\n */\n selectBasicAds: boolean;\n /**\n * Personalised ads can be shown to you based on a profile about you.\n *\n * To select personalised ads vendors can:\n * - Select personalised ads based on a user profile or other historical user data,\n * including a user’s prior activity, interests, visits to sites or apps, location,\n * or demographic information.\n */\n selectPersonalisedAds: boolean;\n /**\n * Personalised content can be shown to you based on a profile about you.\n *\n * To select personalised content vendors can:\n * - Select personalised content based on a user profile or other historical user data,\n * including a user’s prior activity, interests, visits to sites or apps, location,\n * or demographic information.\n */\n selectPersonalisedContent: boolean;\n /**\n * Cookies, device identifiers, or other information can be stored or\n * accessed on your device for the purposes presented to you.\n *\n * Vendors can:\n * - Store and access information on the device such as cookies and\n * device identifiers presented to a user.\n */\n storeAndAccessInformationOnDevice: boolean;\n /**\n * Your precise geolocation data can be used in support of one or more purposes.\n * This means your location can be accurate to within several meters.\n *\n * Vendors can:\n * - Collect and process precise geolocation data in support of one or more purposes.\n * - Precise geolocation means that there are no restrictions on the precision of\n * a user's location; this can be accurate to within several meters.\n */\n usePreciseGeolocationData: boolean;\n}\n"],"mappings":""}
1
+ {"version":3,"names":[],"sourceRoot":"../../src","sources":["AdsConsent.interface.ts"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["AppEvent.ts"],"sourcesContent":["/**\n * An app event received from Google Ad Manager ads.\n */\nexport interface AppEvent {\n /**\n * The event name.\n */\n name: string;\n\n /**\n * The data received with the app event.\n */\n data?: string;\n}\n"],"mappings":""}
1
+ {"version":3,"names":[],"sourceRoot":"../../src","sources":["AppEvent.ts"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["BannerAdProps.ts"],"sourcesContent":["import { BannerAdSize } from '../BannerAdSize';\nimport { AppEvent } from './AppEvent';\nimport { RequestOptions } from './RequestOptions';\n\n/**\n * An interface for a Banner advert component.\n *\n * #### Example\n *\n * The `BannerAd` interface is exposed as a React component, allowing you to integrate ads within your existing React\n * Native code base. The component itself is isolated, meaning any standard `View` props (e.g. `style`) are not\n * forwarded on. It is recommended you wrap the `BannerAd` within your own `View` if you wish to apply custom props for use-cases\n * such as positioning.\n *\n * ```js\n * import { BannerAd, BannerAdSize, TestIds } from 'react-native-google-mobile-ads';\n *\n * function HomeScreen() {\n * return (\n * <BannerAd\n * unitId={TestIds.BANNER}\n * size={BannerAdSize.FULL_BANNER}\n * requestOptions={{\n * requestNonPersonalizedAdsOnly: true,\n * }}\n * onAdLoaded={() => {\n * console.log('Advert loaded');\n * }}\n * onAdFailedToLoad={(error) => {\n * console.error('Advert failed to load: ', error);\n * }}\n * />\n * );\n * }\n * ```\n */\nexport interface BannerAdProps {\n /**\n * The Google Mobile Ads unit ID for the banner.\n */\n unitId: string;\n\n /**\n * The size of the banner. Can be a predefined size via `BannerAdSize` or custom dimensions, e.g. `300x200`.\n *\n * Inventory must be available for the banner size specified, otherwise a no-fill error will be sent to `onAdFailedToLoad`.\n */\n size: BannerAdSize | string;\n\n /**\n * The request options for this banner.\n */\n requestOptions?: RequestOptions;\n\n /**\n * When an ad has finished loading.\n */\n onAdLoaded?: (dimensions: { width: number; height: number }) => void;\n\n /**\n * When an ad has failed to load. Callback contains an Error.\n */\n onAdFailedToLoad?: (error: Error) => void;\n\n /**\n * The ad is now visible to the user.\n */\n onAdOpened?: () => void;\n\n /**\n * Called when the user is about to return to the app after tapping on an ad.\n */\n onAdClosed?: () => void;\n}\n\n/**\n * An interface for a GAM Banner advert component.\n *\n * #### Example\n *\n * The `GAMBannerAd` interface is exposed as a React component, allowing you to integrate ads within your existing React\n * Native code base. The component itself is isolated, meaning any standard `View` props (e.g. `style`) are not\n * forwarded on. It is recommended you wrap the `GAMBannerAd` within your own `View` if you wish to apply custom props for use-cases\n * such as positioning.\n *\n * ```js\n * import { GAMBannerAd, BannerAdSize, TestIds } from 'react-native-google-mobile-ads';\n *\n * function HomeScreen() {\n * return (\n * <GAMBannerAd\n * unitId={TestIds.GAM_BANNER}\n * sizes={[BannerAdSize.FULL_BANNER]}\n * requestOptions={{\n * requestNonPersonalizedAdsOnly: true,\n * }}\n * onAdLoaded={() => {\n * console.log('Advert loaded');\n * }}\n * onAdFailedToLoad={(error) => {\n * console.error('Advert failed to load: ', error);\n * }}\n * />\n * );\n * }\n * ```\n */\nexport interface GAMBannerAdProps extends Omit<BannerAdProps, 'size'> {\n /**\n * The available sizes of the banner. Can be a array of predefined sizes via `BannerAdSize` or custom dimensions, e.g. `300x200`.\n *\n * Inventory must be available for the banner sizes specified, otherwise a no-fill error will be sent to `onAdFailedToLoad`.\n */\n sizes: BannerAdSize[] | string[];\n\n /**\n * Whether to enable the manual impression counting.\n *\n * #### Example\n *\n * After setting this value to `true`, call `recordManualImpression()` from the ref object.\n *\n * ```js\n * import { GAMBannerAd, BannerAdSize, TestIds } from 'react-native-google-mobile-ads';\n *\n * function HomeScreen() {\n * const ref = useRef<GAMBannerAd>(null);\n *\n * const recordManualImpression = () => {\n * ref.current?.recordManualImpression();\n * }\n *\n * return (\n * <GAMBannerAd\n * ref={ref}\n * unitId={TestIds.GAM_BANNER}\n * sizes={[BannerAdSize.FULL_BANNER]}\n * manualImpressionsEnabled={true}\n * />\n * );\n * }\n * ```\n */\n manualImpressionsEnabled?: boolean;\n\n /**\n * When an ad received Ad Manager specific app events.\n */\n onAppEvent?: (appEvent: AppEvent) => void;\n}\n"],"mappings":""}
1
+ {"version":3,"names":[],"sourceRoot":"../../src","sources":["BannerAdProps.ts"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["GoogleMobileAdsNativeModule.ts"],"sourcesContent":["import { AdapterStatus } from './AdapterStatus';\nimport { RequestConfiguration } from './RequestConfiguration';\nimport { RequestOptions } from './RequestOptions';\nimport { AdShowOptions } from './AdShowOptions';\n\ntype AdLoadFunction = (requestId: number, adUnitId: string, requestOptions: RequestOptions) => void;\ntype AdShowFunction = (\n requestId: number,\n adUnitId: string,\n showOptions?: AdShowOptions,\n) => Promise<void>;\n\nexport interface GoogleMobileAdsNativeModule {\n initialize(): Promise<AdapterStatus[]>;\n setRequestConfiguration(requestConfiguration?: RequestConfiguration): Promise<void>;\n openAdInspector(): Promise<void>;\n appOpenLoad: AdLoadFunction;\n appOpenShow: AdShowFunction;\n interstitialLoad: AdLoadFunction;\n interstitialShow: AdShowFunction;\n rewardedLoad: AdLoadFunction;\n rewardedShow: AdShowFunction;\n rewardedInterstitialLoad: AdLoadFunction;\n rewardedInterstitialShow: AdShowFunction;\n}\n"],"mappings":""}
1
+ {"version":3,"names":[],"sourceRoot":"../../src","sources":["GoogleMobileAdsNativeModule.ts"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["MobileAd.interface.ts"],"sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\nimport { AdEventListener } from './AdEventListener';\nimport { AdEventsListener } from './AdEventsListener';\nimport { AdShowOptions } from './AdShowOptions';\n\n/**\n * Base class for InterstitialAd, RewardedAd, NativeAd and BannerAd.\n */\nexport interface MobileAdInterface {\n /**\n * The Ad Unit ID for this Gogole Mobile Ads ad.\n */\n adUnitId: string;\n\n /**\n * Whether the advert is loaded and can be shown.\n */\n loaded: boolean;\n\n /**\n * Start loading the advert with the provided RequestOptions.\n *\n * It is recommended you setup ad event handlers before calling this method.\n */\n load(): void;\n\n /**\n * Show the loaded advert to the user.\n *\n * #### Example\n *\n * ```js\n * // Create InterstitialAd/RewardedAd\n * const advert = InterstitialAd.createForAdRequest('...');\n *\n * advert.addAdEventListener(AdEventType.LOADED, () => {\n * advert.show({\n * immersiveModeEnabled: true,\n * });\n * });\n * ```\n *\n * @param showOptions An optional `AdShowOptions` interface.\n */\n show(showOptions?: AdShowOptions): Promise<void>;\n\n /**\n * Listen to ad events. See AdEventTypes for more information.\n *\n * Returns an unsubscriber function to stop listening to further events.\n *\n * #### Example\n *\n * ```js\n * // Create InterstitialAd/RewardedAd\n * const advert = InterstitialAd.createForAdRequest('...');\n *\n * const unsubscribe = advert.addAdEventsListener(({ type, payload }) => {\n * });\n *\n * // Sometime later...\n * unsubscribe();\n * ```\n *\n * @param listener A listener callback containing a event type, error and data.\n */\n addAdEventsListener<T extends never>(listener: AdEventsListener<T>): () => void;\n\n /**\n * Listen to ad events. See AdEventTypes for more information.\n *\n * Returns an unsubscriber function to stop listening to further events.\n *\n * #### Example\n *\n * ```js\n * // Create InterstitialAd/RewardedAd\n * const advert = InterstitialAd.createForAdRequest('...');\n *\n * const unsubscribe = advert.addAdEventListener(AdEventType.Loaded, () => {\n *\n * });\n *\n * // Sometime later...\n * unsubscribe();\n * ```\n *\n * @param type The event type, e.g. `AdEventType.LOADED`.\n * @param listener A listener callback containing a event type, error and data.\n */\n addAdEventListener<T extends never>(type: T, listener: AdEventListener<T>): void;\n\n /**\n * Remove all registered event listeners.\n */\n removeAllListeners(): void;\n}\n"],"mappings":""}
1
+ {"version":3,"names":[],"sourceRoot":"../../src","sources":["MobileAd.interface.ts"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["MobileAdsModule.interface.ts"],"sourcesContent":["import { EventEmitter } from 'react-native';\n\nimport { AdapterStatus } from './AdapterStatus';\nimport { GoogleMobileAdsNativeModule } from './GoogleMobileAdsNativeModule';\nimport { RequestConfiguration } from './RequestConfiguration';\n\n/**\n * The Google Mobile Ads service interface.\n */\nexport interface MobileAdsModuleInterface {\n /**\n * Initialize the SDK.\n */\n initialize(): Promise<AdapterStatus[]>;\n\n /**\n * Sets request options for all future ad requests.\n *\n * #### Example\n *\n * ```js\n * import mobileAds, { MaxAdContentRating } from 'react-native-google-mobile-ads';\n *\n * await mobileAds().setRequestConfiguration({\n * // Update all future requests suitable for parental guidance\n * maxAdContentRating: MaxAdContentRating.PG,\n * });\n * ```\n *\n * @param requestConfiguration An RequestConfiguration interface used on all future Google Mobile Ads ad requests.\n */\n setRequestConfiguration(requestConfiguration: RequestConfiguration): Promise<void>;\n\n /**\n * Opens the Ad Inspector. Ad inspector is an in-app overlay that enables authorized devices to perform real-time analysis of test ad requests directly within a mobile app.\n *\n * The promise will resolve when the inspector is closed.\n * Also, the promise will reject if ad inspector is closed due to an error.\n *\n * @see https://developers.google.com/ad-manager/mobile-ads-sdk/android/ad-inspector\n */\n openAdInspector(): Promise<void>;\n\n /**\n * The native module instance for the Google Mobile Ads service.\n */\n native: GoogleMobileAdsNativeModule;\n\n /**\n * Returns the shared event emitter instance used for all JS event routing.\n */\n emitter: EventEmitter;\n}\n"],"mappings":""}
1
+ {"version":3,"names":[],"sourceRoot":"../../src","sources":["MobileAdsModule.interface.ts"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["Module.interface.ts"],"sourcesContent":["export interface App {\n name: string;\n}\n\nexport interface Config {\n version: string;\n namespace: string;\n nativeModuleName: string[];\n nativeEvents: string[];\n}\n\nexport interface ModuleInterface {\n app: App;\n _config: Config;\n _customUrlOrRegion?: string;\n}\n"],"mappings":""}
1
+ {"version":3,"names":[],"sourceRoot":"../../src","sources":["Module.interface.ts"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["RequestConfiguration.ts"],"sourcesContent":["import { MaxAdContentRating } from '../MaxAdContentRating';\n\n/**\n * The `RequestConfiguration` used when setting global ad settings via `setRequestConfiguration`.\n */\nexport interface RequestConfiguration {\n /**\n * The maximum ad content rating for all ads. Google Mobile Ads returns ads at or below the specified level.\n *\n * Ratings are based on the [digital content label classifications](https://support.google.com/admob/answer/7562142).\n */\n maxAdContentRating?: MaxAdContentRating;\n\n /**\n * If `true`, indicates that you want your content treated as child-directed for purposes of COPPA.\n *\n * For purposes of the [Children's Online Privacy Protection Act (COPPA)](http://business.ftc.gov/privacy-and-security/children%27s-privacy),\n * there is a setting called \"tag for child-directed treatment\". By setting this tag, you certify that this notification\n * is accurate and you are authorized to act on behalf of the owner of the app. You understand that abuse of this\n * setting may result in termination of your Google account.\n */\n tagForChildDirectedTreatment?: boolean;\n\n /**\n * If `true`, indicates that you want the ad request to be handled in a manner suitable for users under the age of consent.\n *\n * You can mark your ad requests to receive treatment for users in the European Economic Area (EEA) under the age of consent.\n * This feature is designed to help facilitate compliance with the [General Data Protection Regulation (GDPR)](https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:32016R0679).\n *\n * See the [Google Mobile SDK docs](https://developers.google.com/admob/android/targeting#ad_content_filtering) for more information.\n */\n tagForUnderAgeOfConsent?: boolean;\n\n /**\n * An array of test device IDs to add to the allowlist.\n *\n * If using an emulator, set the device ID to `EMULATOR`.\n */\n testDeviceIdentifiers?: string[];\n}\n"],"mappings":""}
1
+ {"version":3,"names":[],"sourceRoot":"../../src","sources":["RequestConfiguration.ts"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["RequestOptions.ts"],"sourcesContent":["export interface ServerSideVerificationOptions {\n /**\n * User identifier.\n * If no user identifier is provided by the app, this query parameter will not be present in the SSV callback.\n */\n userId?: string;\n\n /**\n * Custom data string.\n * If no custom data string is provided by the app, this query parameter value will not be present in the SSV callback.\n */\n customData?: string;\n}\n\n/**\n * The `RequestOptions` interface. Used when passing additional request options before an advert is loaded.\n */\nexport interface RequestOptions {\n /**\n * If `true` only non-personalized ads will be loaded.\n *\n * Google serves personalized ads by default. This option must be `true` if users who are within the EEA have only\n * given consent to non-personalized ads.\n */\n requestNonPersonalizedAdsOnly?: boolean;\n\n /**\n * Attaches additional properties to an ad request for direct campaign delivery.\n *\n * Takes an array of string key/value pairs.\n *\n * #### Example\n *\n * Attaches `?campaign=abc&user=123` to the ad request:\n *\n * ```js\n * await Interstitial.createForAdRequest('ca-app-pub-3940256099942544/1033173712', {\n * networkExtras: {\n * campaign: 'abc',\n * user: '123',\n * },\n * });\n */\n networkExtras?: { [key: string]: string };\n\n /**\n * An array of keywords to be sent when loading the ad.\n *\n * Setting keywords helps deliver more specific ads to a user based on the keywords.\n *\n * #### Example\n *\n * ```js\n * await Interstitial.createForAdRequest('ca-app-pub-3940256099942544/1033173712', {\n * keywords: ['fashion', 'clothing'],\n * });\n * ```\n */\n keywords?: string[];\n\n /**\n * Sets a content URL for targeting purposes.\n *\n * Max length of 512.\n */\n contentUrl?: string;\n\n /**\n * key-value pairs used for custom targeting\n *\n * Takes an array of string key/value pairs.\n */\n customTargeting?: { [key: string]: string };\n\n /**\n * Sets the request agent string to identify the ad request's origin. Third party libraries that reference the Mobile\n * Ads SDK should call this method to denote the platform from which the ad request originated. For example, if a\n * third party ad network called \"CoolAds network\" mediates requests to the Mobile Ads SDK, it should call this\n * method with \"CoolAds\".\n *\n * #### Example\n *\n * ```js\n * await Interstitial.createForAdRequest('ca-app-pub-3940256099942544/1033173712', {\n * requestAgent: 'CoolAds',\n * });\n * ```\n */\n requestAgent?: string;\n\n /**\n * Server Side Verification(SSV) Options\n * See [Google Mobile SDK Docs](https://developers.google.com/admob/android/ssv) for more information.\n */\n serverSideVerificationOptions?: ServerSideVerificationOptions;\n\n /**\n * Publisher provided identifier (PPID) for use in frequency capping, audience segmentation and targeting,\n * sequential ad rotation, and other audience-based ad delivery controls across devices.\n * See [this article](https://support.google.com/admanager/answer/2880055) for more information.\n */\n publisherProvidedId?: string;\n}\n"],"mappings":""}
1
+ {"version":3,"names":[],"sourceRoot":"../../src","sources":["RequestOptions.ts"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["RewardedAdReward.ts"],"sourcesContent":["/**\n * A `RewardedAdReward` returned from rewarded ads.\n */\nexport interface RewardedAdReward {\n /**\n * The reward name, e.g. 'coins', 'diamonds'.\n */\n type: string;\n\n /**\n * The number value of the reward, e.g. 10\n */\n amount: number;\n}\n"],"mappings":""}
1
+ {"version":3,"names":[],"sourceRoot":"../../src","sources":["RewardedAdReward.ts"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\nexport * from './AdapterStatus';\nexport * from './AdEventListener';\nexport * from './AdEventsListener';\nexport * from './AdsConsent.interface';\nexport * from './AdShowOptions';\nexport * from './AdStates';\nexport * from './BannerAdProps';\nexport * from './RequestConfiguration';\nexport * from './RequestOptions';\nexport * from './RewardedAdReward';\nexport * from './AppEvent';\n"],"mappings":";;;;;AAiBA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
1
+ {"version":3,"names":[],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;;;;AAiBA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"names":["validateAdRequestConfiguration","requestConfiguration","out","isObject","Error","maxAdContentRating","MaxAdContentRating","G","PG","T","MA","isPropertySet","isBoolean","tagForChildDirectedTreatment","tagForUnderAgeOfConsent","isArray","testDeviceIdentifiers"],"sources":["validateAdRequestConfiguration.ts"],"sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\nimport { isPropertySet, isArray, isBoolean, isObject } from './common';\nimport { MaxAdContentRating } from './MaxAdContentRating';\nimport { RequestConfiguration } from './types/RequestConfiguration';\n\nexport function validateAdRequestConfiguration(requestConfiguration: RequestConfiguration) {\n const out: RequestConfiguration = {};\n\n if (!isObject(requestConfiguration)) {\n throw new Error(\"'requestConfiguration' expected an object value\");\n }\n\n if (requestConfiguration.maxAdContentRating) {\n if (\n requestConfiguration.maxAdContentRating !== MaxAdContentRating.G &&\n requestConfiguration.maxAdContentRating !== MaxAdContentRating.PG &&\n requestConfiguration.maxAdContentRating !== MaxAdContentRating.T &&\n requestConfiguration.maxAdContentRating !== MaxAdContentRating.MA\n ) {\n throw new Error(\n \"'requestConfiguration.maxAdContentRating' expected on of MaxAdContentRating.G, MaxAdContentRating.PG, MaxAdContentRating.T or MaxAdContentRating.MA\",\n );\n }\n\n out.maxAdContentRating = requestConfiguration.maxAdContentRating;\n }\n\n if (isPropertySet(requestConfiguration, 'tagForChildDirectedTreatment')) {\n if (!isBoolean(requestConfiguration.tagForChildDirectedTreatment)) {\n throw new Error(\n \"'requestConfiguration.tagForChildDirectedTreatment' expected a boolean value\",\n );\n }\n\n out.tagForChildDirectedTreatment = requestConfiguration.tagForChildDirectedTreatment;\n }\n\n if (isPropertySet(requestConfiguration, 'tagForUnderAgeOfConsent')) {\n if (!isBoolean(requestConfiguration.tagForUnderAgeOfConsent)) {\n throw new Error(\"'requestConfiguration.tagForUnderAgeOfConsent' expected a boolean value\");\n }\n\n out.tagForUnderAgeOfConsent = requestConfiguration.tagForUnderAgeOfConsent;\n }\n\n if (isPropertySet(requestConfiguration, 'testDeviceIdentifiers')) {\n if (!isArray(requestConfiguration.testDeviceIdentifiers)) {\n throw new Error(\"'requestConfiguration.testDeviceIdentifiers' expected an array value\");\n }\n\n out.testDeviceIdentifiers = requestConfiguration.testDeviceIdentifiers;\n }\n\n return out;\n}\n"],"mappings":";;;;;;AAiBA;AACA;AAlBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAMO,SAASA,8BAA8B,CAACC,oBAA0C,EAAE;EACzF,MAAMC,GAAyB,GAAG,CAAC,CAAC;EAEpC,IAAI,CAAC,IAAAC,gBAAQ,EAACF,oBAAoB,CAAC,EAAE;IACnC,MAAM,IAAIG,KAAK,CAAC,iDAAiD,CAAC;EACpE;EAEA,IAAIH,oBAAoB,CAACI,kBAAkB,EAAE;IAC3C,IACEJ,oBAAoB,CAACI,kBAAkB,KAAKC,sCAAkB,CAACC,CAAC,IAChEN,oBAAoB,CAACI,kBAAkB,KAAKC,sCAAkB,CAACE,EAAE,IACjEP,oBAAoB,CAACI,kBAAkB,KAAKC,sCAAkB,CAACG,CAAC,IAChER,oBAAoB,CAACI,kBAAkB,KAAKC,sCAAkB,CAACI,EAAE,EACjE;MACA,MAAM,IAAIN,KAAK,CACb,qJAAqJ,CACtJ;IACH;IAEAF,GAAG,CAACG,kBAAkB,GAAGJ,oBAAoB,CAACI,kBAAkB;EAClE;EAEA,IAAI,IAAAM,qBAAa,EAACV,oBAAoB,EAAE,8BAA8B,CAAC,EAAE;IACvE,IAAI,CAAC,IAAAW,iBAAS,EAACX,oBAAoB,CAACY,4BAA4B,CAAC,EAAE;MACjE,MAAM,IAAIT,KAAK,CACb,8EAA8E,CAC/E;IACH;IAEAF,GAAG,CAACW,4BAA4B,GAAGZ,oBAAoB,CAACY,4BAA4B;EACtF;EAEA,IAAI,IAAAF,qBAAa,EAACV,oBAAoB,EAAE,yBAAyB,CAAC,EAAE;IAClE,IAAI,CAAC,IAAAW,iBAAS,EAACX,oBAAoB,CAACa,uBAAuB,CAAC,EAAE;MAC5D,MAAM,IAAIV,KAAK,CAAC,yEAAyE,CAAC;IAC5F;IAEAF,GAAG,CAACY,uBAAuB,GAAGb,oBAAoB,CAACa,uBAAuB;EAC5E;EAEA,IAAI,IAAAH,qBAAa,EAACV,oBAAoB,EAAE,uBAAuB,CAAC,EAAE;IAChE,IAAI,CAAC,IAAAc,eAAO,EAACd,oBAAoB,CAACe,qBAAqB,CAAC,EAAE;MACxD,MAAM,IAAIZ,KAAK,CAAC,sEAAsE,CAAC;IACzF;IAEAF,GAAG,CAACc,qBAAqB,GAAGf,oBAAoB,CAACe,qBAAqB;EACxE;EAEA,OAAOd,GAAG;AACZ"}
1
+ {"version":3,"names":["validateAdRequestConfiguration","requestConfiguration","out","isObject","Error","maxAdContentRating","MaxAdContentRating","G","PG","T","MA","isPropertySet","isBoolean","tagForChildDirectedTreatment","tagForUnderAgeOfConsent","isArray","testDeviceIdentifiers"],"sourceRoot":"../../src","sources":["validateAdRequestConfiguration.ts"],"mappings":";;;;;;AAiBA;AACA;AAlBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAMO,SAASA,8BAA8B,CAACC,oBAA0C,EAAE;EACzF,MAAMC,GAAyB,GAAG,CAAC,CAAC;EAEpC,IAAI,CAAC,IAAAC,gBAAQ,EAACF,oBAAoB,CAAC,EAAE;IACnC,MAAM,IAAIG,KAAK,CAAC,iDAAiD,CAAC;EACpE;EAEA,IAAIH,oBAAoB,CAACI,kBAAkB,EAAE;IAC3C,IACEJ,oBAAoB,CAACI,kBAAkB,KAAKC,sCAAkB,CAACC,CAAC,IAChEN,oBAAoB,CAACI,kBAAkB,KAAKC,sCAAkB,CAACE,EAAE,IACjEP,oBAAoB,CAACI,kBAAkB,KAAKC,sCAAkB,CAACG,CAAC,IAChER,oBAAoB,CAACI,kBAAkB,KAAKC,sCAAkB,CAACI,EAAE,EACjE;MACA,MAAM,IAAIN,KAAK,CACb,qJAAqJ,CACtJ;IACH;IAEAF,GAAG,CAACG,kBAAkB,GAAGJ,oBAAoB,CAACI,kBAAkB;EAClE;EAEA,IAAI,IAAAM,qBAAa,EAACV,oBAAoB,EAAE,8BAA8B,CAAC,EAAE;IACvE,IAAI,CAAC,IAAAW,iBAAS,EAACX,oBAAoB,CAACY,4BAA4B,CAAC,EAAE;MACjE,MAAM,IAAIT,KAAK,CACb,8EAA8E,CAC/E;IACH;IAEAF,GAAG,CAACW,4BAA4B,GAAGZ,oBAAoB,CAACY,4BAA4B;EACtF;EAEA,IAAI,IAAAF,qBAAa,EAACV,oBAAoB,EAAE,yBAAyB,CAAC,EAAE;IAClE,IAAI,CAAC,IAAAW,iBAAS,EAACX,oBAAoB,CAACa,uBAAuB,CAAC,EAAE;MAC5D,MAAM,IAAIV,KAAK,CAAC,yEAAyE,CAAC;IAC5F;IAEAF,GAAG,CAACY,uBAAuB,GAAGb,oBAAoB,CAACa,uBAAuB;EAC5E;EAEA,IAAI,IAAAH,qBAAa,EAACV,oBAAoB,EAAE,uBAAuB,CAAC,EAAE;IAChE,IAAI,CAAC,IAAAc,eAAO,EAACd,oBAAoB,CAACe,qBAAqB,CAAC,EAAE;MACxD,MAAM,IAAIZ,KAAK,CAAC,sEAAsE,CAAC;IACzF;IAEAF,GAAG,CAACc,qBAAqB,GAAGf,oBAAoB,CAACe,qBAAqB;EACxE;EAEA,OAAOd,GAAG;AACZ"}
@@ -1 +1 @@
1
- {"version":3,"names":["validateAdRequestOptions","options","out","isUndefined","isObject","Error","isPropertySet","isBoolean","requestNonPersonalizedAdsOnly","networkExtras","Object","entries","forEach","key","value","isString","keywords","isArray","i","length","keyword","contentUrl","isValidUrl","requestAgent","serverSideVerificationOptions","ssvOptions","userId","customData","customTargeting","publisherProvidedId"],"sources":["validateAdRequestOptions.ts"],"sourcesContent":["/*\n * Copyright (c) 2016-present Invertase Limited & Contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this library except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\nimport {\n isPropertySet,\n isArray,\n isBoolean,\n isObject,\n isString,\n isUndefined,\n isValidUrl,\n} from './common';\nimport { RequestOptions } from './types/RequestOptions';\n\nexport function validateAdRequestOptions(options?: RequestOptions) {\n const out: RequestOptions = {};\n\n if (isUndefined(options)) {\n return out;\n }\n\n if (!isObject(options)) {\n throw new Error(\"'options' expected an object value\");\n }\n\n if (isPropertySet(options, 'requestNonPersonalizedAdsOnly')) {\n if (!isBoolean(options.requestNonPersonalizedAdsOnly)) {\n throw new Error(\"'options.requestNonPersonalizedAdsOnly' expected a boolean value\");\n }\n\n out.requestNonPersonalizedAdsOnly = options.requestNonPersonalizedAdsOnly;\n }\n\n if (options.networkExtras) {\n if (!isObject(options.networkExtras)) {\n throw new Error(\"'options.networkExtras' expected an object of key/value pairs\");\n }\n\n Object.entries(options.networkExtras).forEach(([key, value]) => {\n if (!isString(value)) {\n throw new Error(`'options.networkExtras' expected a string value for object key \"${key}\"`);\n }\n });\n\n out.networkExtras = options.networkExtras;\n }\n\n if (options.keywords) {\n if (!isArray(options.keywords)) {\n throw new Error(\"'options.keywords' expected an array containing string values\");\n }\n\n for (let i = 0; i < options.keywords.length; i++) {\n const keyword = options.keywords[i];\n\n if (!isString(keyword)) {\n throw new Error(\"'options.keywords' expected an array containing string values\");\n }\n }\n\n out.keywords = options.keywords;\n }\n\n if (options.contentUrl) {\n if (!isString(options.contentUrl)) {\n throw new Error(\"'options.contentUrl' expected a string value\");\n }\n\n if (!isValidUrl(options.contentUrl)) {\n throw new Error(\"'options.contentUrl' expected a valid HTTP or HTTPS url.\");\n }\n\n if (options.contentUrl.length > 512) {\n throw new Error(\"'options.contentUrl' maximum length of a content URL is 512 characters.\");\n }\n\n out.contentUrl = options.contentUrl;\n }\n\n if (options.requestAgent) {\n if (!isString(options.requestAgent)) {\n throw new Error(\"'options.requestAgent' expected a string value\");\n }\n\n out.requestAgent = options.requestAgent;\n }\n\n if (options.serverSideVerificationOptions) {\n if (!isObject(options.serverSideVerificationOptions)) {\n throw new Error(\n \"'options.serverSideVerificationOptions' expected an object of key/value pairs\",\n );\n }\n\n const ssvOptions = options.serverSideVerificationOptions;\n\n if (ssvOptions.userId && !isString(ssvOptions.userId)) {\n throw new Error(\"'options.serverSideVerificationOptions.userId' expected a string value\");\n }\n\n if (ssvOptions.customData && !isString(ssvOptions.customData)) {\n throw new Error(\"'options.serverSideVerificationOptions.customData' expected a string value\");\n }\n\n out.serverSideVerificationOptions = options.serverSideVerificationOptions;\n }\n\n if (options.customTargeting) {\n if (!isObject(options.customTargeting)) {\n throw new Error(\"'options.customTargeting' expected an object of key/value pairs\");\n }\n out.customTargeting = options.customTargeting;\n }\n\n if (options.publisherProvidedId) {\n if (!isString(options.publisherProvidedId)) {\n throw new Error(\"'options.publisherProvidedId' expected a string value\");\n }\n out.publisherProvidedId = options.publisherProvidedId;\n }\n\n return out;\n}\n"],"mappings":";;;;;;AAiBA;AAjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAaO,SAASA,wBAAwB,CAACC,OAAwB,EAAE;EACjE,MAAMC,GAAmB,GAAG,CAAC,CAAC;EAE9B,IAAI,IAAAC,mBAAW,EAACF,OAAO,CAAC,EAAE;IACxB,OAAOC,GAAG;EACZ;EAEA,IAAI,CAAC,IAAAE,gBAAQ,EAACH,OAAO,CAAC,EAAE;IACtB,MAAM,IAAII,KAAK,CAAC,oCAAoC,CAAC;EACvD;EAEA,IAAI,IAAAC,qBAAa,EAACL,OAAO,EAAE,+BAA+B,CAAC,EAAE;IAC3D,IAAI,CAAC,IAAAM,iBAAS,EAACN,OAAO,C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I,CAAC,IAAAxB,gBAAQ,EAACH,OAAO,CAAC2B,eAAe,CAAC,EAAE;MACtC,MAAM,IAAIvB,KAAK,CAAC,iEAAiE,CAAC;IACpF;IACAH,GAAG,CAAC0B,eAAe,GAAG3B,OAAO,CAAC2B,eAAe;EAC/C;EAEA,IAAI3B,OAAO,CAAC4B,mBAAmB,EAAE;IAC/B,IAAI,CAAC,IAAAd,gBAAQ,EAACd,OAAO,CAAC4B,mBAAmB,CAAC,EAAE;MAC1C,MAAM,IAAIxB,KAAK,CAAC,uDAAuD,CAAC;IAC1E;IACAH,GAAG,CAAC2B,mBAAmB,GAAG5B,OAAO,CAAC4B,mBAAmB;EACvD;EAEA,OAAO3B,GAAG;AACZ"}
1
+ {"version":3,"names":["validateAdRequestOptions","options","out","isUndefined","isObject","Error","isPropertySet","isBoolean","requestNonPersonalizedAdsOnly","networkExtras","Object","entries","forEach","key","value","isString","keywords","isArray","i","length","keyword","contentUrl","isValidUrl","requestAgent","serverSideVerificationOptions","ssvOptions","userId","customData","customTargeting","publisherProvidedId"],"sourceRoot":"../../src","sources":["validateAdRequestOptions.ts"],"mappings":";;;;;;AAiBA;AAjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAaO,SAASA,wBAAwB,CAACC,OAAwB,EAAE;EACjE,MAAMC,GAAmB,GAAG,CAAC,CAAC;EAE9B,IAAI,IAAAC,mBAAW,EAACF,OAAO,CAAC,EAAE;IACxB,OAAOC,GAAG;EACZ;EAEA,IAAI,CAAC,IAAAE,gBAAQ,EAACH,OAAO,CAAC,EAAE;IACtB,MAAM,IAAII,KAAK,CAAC,oCAAoC,CAAC;EACvD;EAEA,IAAI,IAAAC,qBAAa,EAACL,OAAO,EAAE,+BAA+B,CAAC,EAAE;IAC3D,IAAI,CAAC,IAAAM,iBAAS,EAACN,OAAO,CAACO,6BAA6B,CAAC,EAAE;MACrD,MAAM,IAAIH,KAAK,CAAC,kEAAk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