@stripe/stripe-react-native 0.44.0 → 0.45.0

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 (314) hide show
  1. package/.clang-format +90 -0
  2. package/.editorconfig +3 -0
  3. package/CHANGELOG.md +7 -1
  4. package/android/build.gradle +89 -18
  5. package/android/gradle.properties +1 -1
  6. package/android/src/main/java/com/reactnativestripesdk/AuBECSDebitFormViewManager.kt +15 -6
  7. package/android/src/main/java/com/reactnativestripesdk/CardChangeEvent.kt +56 -0
  8. package/android/src/main/java/com/reactnativestripesdk/CardFieldView.kt +4 -4
  9. package/android/src/main/java/com/reactnativestripesdk/CardFieldViewManager.kt +55 -45
  10. package/android/src/main/java/com/reactnativestripesdk/{CardFocusEvent.kt → CardFocusChangeEvent.kt} +2 -2
  11. package/android/src/main/java/com/reactnativestripesdk/CardFormCompleteEvent.kt +17 -16
  12. package/android/src/main/java/com/reactnativestripesdk/CardFormView.kt +5 -5
  13. package/android/src/main/java/com/reactnativestripesdk/CardFormViewManager.kt +39 -33
  14. package/android/src/main/java/com/reactnativestripesdk/CollectBankAccountLauncherFragment.kt +4 -2
  15. package/android/src/main/java/com/reactnativestripesdk/EmbeddedPaymentElementView.kt +182 -0
  16. package/android/src/main/java/com/reactnativestripesdk/EmbeddedPaymentElementViewManager.kt +231 -0
  17. package/android/src/main/java/com/reactnativestripesdk/FinancialConnectionsSheetFragment.kt +8 -5
  18. package/android/src/main/java/com/reactnativestripesdk/GooglePayButtonManager.kt +14 -6
  19. package/android/src/main/java/com/reactnativestripesdk/PaymentMethodCreateParamsFactory.kt +3 -1
  20. package/android/src/main/java/com/reactnativestripesdk/PaymentOptionDisplayDataMapper.kt +17 -0
  21. package/android/src/main/java/com/reactnativestripesdk/PaymentSheetAppearance.kt +266 -0
  22. package/android/src/main/java/com/reactnativestripesdk/PaymentSheetFragment.kt +8 -13
  23. package/android/src/main/java/com/reactnativestripesdk/StripeContainerManager.kt +11 -3
  24. package/android/src/main/java/com/reactnativestripesdk/StripeSdkModule.kt +106 -59
  25. package/android/src/main/java/com/reactnativestripesdk/StripeSdkPackage.kt +34 -4
  26. package/android/src/main/java/com/reactnativestripesdk/addresssheet/AddressSheetView.kt +33 -27
  27. package/android/src/main/java/com/reactnativestripesdk/addresssheet/AddressSheetViewManager.kt +49 -24
  28. package/android/src/main/java/com/reactnativestripesdk/customersheet/CustomerSheetFragment.kt +16 -3
  29. package/android/src/main/java/com/reactnativestripesdk/customersheet/ReactNativeCustomerAdapter.kt +11 -29
  30. package/android/src/main/java/com/reactnativestripesdk/pushprovisioning/AddToWalletButtonManager.kt +36 -12
  31. package/android/src/main/java/com/reactnativestripesdk/pushprovisioning/AddToWalletButtonView.kt +5 -3
  32. package/android/src/main/java/com/reactnativestripesdk/utils/Extensions.kt +4 -0
  33. package/android/src/main/java/com/reactnativestripesdk/utils/Mappers.kt +21 -0
  34. package/android/src/oldarch/java/com/facebook/react/viewmanagers/AddToWalletButtonManagerDelegate.java +49 -0
  35. package/android/src/oldarch/java/com/facebook/react/viewmanagers/AddToWalletButtonManagerInterface.java +25 -0
  36. package/android/src/oldarch/java/com/facebook/react/viewmanagers/AddressSheetViewManagerDelegate.java +64 -0
  37. package/android/src/oldarch/java/com/facebook/react/viewmanagers/AddressSheetViewManagerInterface.java +30 -0
  38. package/android/src/oldarch/java/com/facebook/react/viewmanagers/ApplePayButtonManagerDelegate.java +41 -0
  39. package/android/src/oldarch/java/com/facebook/react/viewmanagers/ApplePayButtonManagerInterface.java +20 -0
  40. package/android/src/oldarch/java/com/facebook/react/viewmanagers/AuBECSDebitFormManagerDelegate.java +36 -0
  41. package/android/src/oldarch/java/com/facebook/react/viewmanagers/AuBECSDebitFormManagerInterface.java +20 -0
  42. package/android/src/oldarch/java/com/facebook/react/viewmanagers/CardFieldManagerDelegate.java +73 -0
  43. package/android/src/oldarch/java/com/facebook/react/viewmanagers/CardFieldManagerInterface.java +31 -0
  44. package/android/src/oldarch/java/com/facebook/react/viewmanagers/CardFormManagerDelegate.java +67 -0
  45. package/android/src/oldarch/java/com/facebook/react/viewmanagers/CardFormManagerInterface.java +29 -0
  46. package/android/src/oldarch/java/com/facebook/react/viewmanagers/EmbeddedPaymentElementViewManagerDelegate.java +49 -0
  47. package/android/src/oldarch/java/com/facebook/react/viewmanagers/EmbeddedPaymentElementViewManagerInterface.java +21 -0
  48. package/android/src/oldarch/java/com/facebook/react/viewmanagers/GooglePayButtonManagerDelegate.java +38 -0
  49. package/android/src/oldarch/java/com/facebook/react/viewmanagers/GooglePayButtonManagerInterface.java +19 -0
  50. package/android/src/oldarch/java/com/facebook/react/viewmanagers/StripeContainerManagerDelegate.java +32 -0
  51. package/android/src/oldarch/java/com/facebook/react/viewmanagers/StripeContainerManagerInterface.java +17 -0
  52. package/android/src/oldarch/java/com/reactnativestripesdk/NativeStripeSdkModuleSpec.java +311 -0
  53. package/ios/AddressSheet/AddressSheetUtils.swift +21 -19
  54. package/ios/AddressSheet/AddressSheetView.swift +23 -17
  55. package/ios/ApplePayButtonManager.m +0 -1
  56. package/ios/ApplePayButtonManager.swift +1 -3
  57. package/ios/ApplePayButtonView.swift +25 -20
  58. package/ios/ApplePayViewController.swift +22 -22
  59. package/ios/AuBECSDebitFormView.swift +14 -8
  60. package/ios/CardFieldManager.swift +1 -4
  61. package/ios/CardFieldView.swift +28 -25
  62. package/ios/CardFormManager.swift +1 -4
  63. package/ios/CardFormView.swift +25 -16
  64. package/ios/CustomerSheet/CustomerSheetUtils.swift +12 -16
  65. package/ios/CustomerSheet/ReactNativeCustomerAdapter.swift +8 -8
  66. package/ios/EmbeddedPaymentElementManager.m +6 -0
  67. package/ios/EmbeddedPaymentElementView.swift +48 -0
  68. package/ios/NewArch/AddToWalletButtonComponentView.h +10 -0
  69. package/ios/NewArch/AddToWalletButtonComponentView.mm +93 -0
  70. package/ios/NewArch/AddressSheetViewComponentView.h +10 -0
  71. package/ios/NewArch/AddressSheetViewComponentView.mm +109 -0
  72. package/ios/NewArch/ApplePayButtonComponentView.h +10 -0
  73. package/ios/NewArch/ApplePayButtonComponentView.mm +124 -0
  74. package/ios/NewArch/AuBECSDebitFormComponentView.h +10 -0
  75. package/ios/NewArch/AuBECSDebitFormComponentView.mm +95 -0
  76. package/ios/NewArch/CardFieldComponentView.h +10 -0
  77. package/ios/NewArch/CardFieldComponentView.mm +125 -0
  78. package/ios/NewArch/CardFormComponentView.h +10 -0
  79. package/ios/NewArch/CardFormComponentView.mm +108 -0
  80. package/ios/NewArch/StripeContainerComponentView.h +10 -0
  81. package/ios/NewArch/StripeContainerComponentView.mm +74 -0
  82. package/ios/NewArch/StripeNewArchConversions.h +20 -0
  83. package/ios/NewArch/StripeNewArchConversions.mm +47 -0
  84. package/ios/OldArch/StripeSdkEventEmitterCompat.h +27 -0
  85. package/ios/OldArch/StripeSdkEventEmitterCompat.m +105 -0
  86. package/ios/PaymentOptionDisplayData+ReactNative.swift +55 -0
  87. package/ios/PaymentSheetAppearance.swift +194 -1
  88. package/ios/PushProvisioning/AddToWalletButtonView.swift +19 -13
  89. package/ios/StripeContainerView.swift +5 -3
  90. package/ios/StripeSdk.h +21 -0
  91. package/ios/StripeSdk.mm +415 -0
  92. package/ios/StripeSdkEmitter.swift +19 -0
  93. package/ios/{StripeSdk+CustomerSheet.swift → StripeSdkImpl+CustomerSheet.swift} +24 -25
  94. package/ios/StripeSdkImpl+Embedded.swift +327 -0
  95. package/ios/{StripeSdk+PaymentSheet.swift → StripeSdkImpl+PaymentSheet.swift} +18 -29
  96. package/ios/{StripeSdk.swift → StripeSdkImpl.swift} +50 -72
  97. package/ios/StripeSwiftInterop.h +25 -0
  98. package/ios/stripe_react_native.h +2 -0
  99. package/lib/commonjs/components/AddToWalletButton.js +1 -1
  100. package/lib/commonjs/components/AddToWalletButton.js.map +1 -1
  101. package/lib/commonjs/components/AddressSheet.js +1 -1
  102. package/lib/commonjs/components/AddressSheet.js.map +1 -1
  103. package/lib/commonjs/components/AuBECSDebitForm.js +1 -1
  104. package/lib/commonjs/components/AuBECSDebitForm.js.map +1 -1
  105. package/lib/commonjs/components/CardField.js +1 -1
  106. package/lib/commonjs/components/CardField.js.map +1 -1
  107. package/lib/commonjs/components/CardForm.js +1 -1
  108. package/lib/commonjs/components/CardForm.js.map +1 -1
  109. package/lib/commonjs/components/CustomerSheet.js +1 -1
  110. package/lib/commonjs/components/CustomerSheet.js.map +1 -1
  111. package/lib/commonjs/components/PlatformPayButton.js +1 -1
  112. package/lib/commonjs/components/PlatformPayButton.js.map +1 -1
  113. package/lib/commonjs/components/StripeContainer.js +1 -1
  114. package/lib/commonjs/components/StripeContainer.js.map +1 -1
  115. package/lib/commonjs/components/StripeProvider.js +1 -1
  116. package/lib/commonjs/components/StripeProvider.js.map +1 -1
  117. package/lib/commonjs/events.js +2 -0
  118. package/lib/commonjs/events.js.map +1 -0
  119. package/lib/commonjs/functions.js +1 -1
  120. package/lib/commonjs/functions.js.map +1 -1
  121. package/lib/commonjs/index.js +1 -1
  122. package/lib/commonjs/index.js.map +1 -1
  123. package/lib/commonjs/specs/NativeAddToWalletButton.js +2 -0
  124. package/lib/commonjs/specs/NativeAddToWalletButton.js.map +1 -0
  125. package/lib/commonjs/specs/NativeAddressSheet.js +2 -0
  126. package/lib/commonjs/specs/NativeAddressSheet.js.map +1 -0
  127. package/lib/commonjs/specs/NativeApplePayButton.js +2 -0
  128. package/lib/commonjs/specs/NativeApplePayButton.js.map +1 -0
  129. package/lib/commonjs/specs/NativeAuBECSDebitForm.js +2 -0
  130. package/lib/commonjs/specs/NativeAuBECSDebitForm.js.map +1 -0
  131. package/lib/commonjs/specs/NativeCardField.js +2 -0
  132. package/lib/commonjs/specs/NativeCardField.js.map +1 -0
  133. package/lib/commonjs/specs/NativeCardForm.js +2 -0
  134. package/lib/commonjs/specs/NativeCardForm.js.map +1 -0
  135. package/lib/commonjs/specs/NativeEmbeddedPaymentElement.js +2 -0
  136. package/lib/commonjs/specs/NativeEmbeddedPaymentElement.js.map +1 -0
  137. package/lib/commonjs/specs/NativeGooglePayButton.js +2 -0
  138. package/lib/commonjs/specs/NativeGooglePayButton.js.map +1 -0
  139. package/lib/commonjs/specs/NativeStripeContainer.js +2 -0
  140. package/lib/commonjs/specs/NativeStripeContainer.js.map +1 -0
  141. package/lib/commonjs/specs/NativeStripeSdkModule.js +2 -0
  142. package/lib/commonjs/specs/NativeStripeSdkModule.js.map +1 -0
  143. package/lib/commonjs/specs/utils.js +2 -0
  144. package/lib/commonjs/specs/utils.js.map +1 -0
  145. package/lib/commonjs/types/EmbeddedPaymentElement.js +2 -0
  146. package/lib/commonjs/types/EmbeddedPaymentElement.js.map +1 -0
  147. package/lib/commonjs/types/PaymentSheet.js +1 -1
  148. package/lib/commonjs/types/PaymentSheet.js.map +1 -1
  149. package/lib/module/components/AddToWalletButton.js +1 -1
  150. package/lib/module/components/AddToWalletButton.js.map +1 -1
  151. package/lib/module/components/AddressSheet.js +1 -1
  152. package/lib/module/components/AddressSheet.js.map +1 -1
  153. package/lib/module/components/AuBECSDebitForm.js +1 -1
  154. package/lib/module/components/AuBECSDebitForm.js.map +1 -1
  155. package/lib/module/components/CardField.js +1 -1
  156. package/lib/module/components/CardField.js.map +1 -1
  157. package/lib/module/components/CardForm.js +1 -1
  158. package/lib/module/components/CardForm.js.map +1 -1
  159. package/lib/module/components/CustomerSheet.js +1 -1
  160. package/lib/module/components/CustomerSheet.js.map +1 -1
  161. package/lib/module/components/PlatformPayButton.js +1 -1
  162. package/lib/module/components/PlatformPayButton.js.map +1 -1
  163. package/lib/module/components/StripeContainer.js +1 -1
  164. package/lib/module/components/StripeContainer.js.map +1 -1
  165. package/lib/module/components/StripeProvider.js +1 -1
  166. package/lib/module/components/StripeProvider.js.map +1 -1
  167. package/lib/module/events.js +2 -0
  168. package/lib/module/events.js.map +1 -0
  169. package/lib/module/functions.js +1 -1
  170. package/lib/module/functions.js.map +1 -1
  171. package/lib/module/index.js +1 -1
  172. package/lib/module/index.js.map +1 -1
  173. package/lib/module/specs/NativeAddToWalletButton.js +2 -0
  174. package/lib/module/specs/NativeAddToWalletButton.js.map +1 -0
  175. package/lib/module/specs/NativeAddressSheet.js +2 -0
  176. package/lib/module/specs/NativeAddressSheet.js.map +1 -0
  177. package/lib/module/specs/NativeApplePayButton.js +2 -0
  178. package/lib/module/specs/NativeApplePayButton.js.map +1 -0
  179. package/lib/module/specs/NativeAuBECSDebitForm.js +2 -0
  180. package/lib/module/specs/NativeAuBECSDebitForm.js.map +1 -0
  181. package/lib/module/specs/NativeCardField.js +2 -0
  182. package/lib/module/specs/NativeCardField.js.map +1 -0
  183. package/lib/module/specs/NativeCardForm.js +2 -0
  184. package/lib/module/specs/NativeCardForm.js.map +1 -0
  185. package/lib/module/specs/NativeEmbeddedPaymentElement.js +2 -0
  186. package/lib/module/specs/NativeEmbeddedPaymentElement.js.map +1 -0
  187. package/lib/module/specs/NativeGooglePayButton.js +2 -0
  188. package/lib/module/specs/NativeGooglePayButton.js.map +1 -0
  189. package/lib/module/specs/NativeStripeContainer.js +2 -0
  190. package/lib/module/specs/NativeStripeContainer.js.map +1 -0
  191. package/lib/module/specs/NativeStripeSdkModule.js +2 -0
  192. package/lib/module/specs/NativeStripeSdkModule.js.map +1 -0
  193. package/lib/module/specs/utils.js +2 -0
  194. package/lib/module/specs/utils.js.map +1 -0
  195. package/lib/module/types/EmbeddedPaymentElement.js +2 -0
  196. package/lib/module/types/EmbeddedPaymentElement.js.map +1 -0
  197. package/lib/module/types/PaymentSheet.js +1 -1
  198. package/lib/module/types/PaymentSheet.js.map +1 -1
  199. package/lib/typescript/src/components/AddToWalletButton.d.ts.map +1 -1
  200. package/lib/typescript/src/components/AddressSheet.d.ts.map +1 -1
  201. package/lib/typescript/src/components/AuBECSDebitForm.d.ts.map +1 -1
  202. package/lib/typescript/src/components/CardField.d.ts +1 -1
  203. package/lib/typescript/src/components/CardField.d.ts.map +1 -1
  204. package/lib/typescript/src/components/CardForm.d.ts +1 -1
  205. package/lib/typescript/src/components/CardForm.d.ts.map +1 -1
  206. package/lib/typescript/src/components/CustomerSheet.d.ts +1 -1
  207. package/lib/typescript/src/components/CustomerSheet.d.ts.map +1 -1
  208. package/lib/typescript/src/components/StripeContainer.d.ts.map +1 -1
  209. package/lib/typescript/src/events.d.ts +13 -0
  210. package/lib/typescript/src/events.d.ts.map +1 -0
  211. package/lib/typescript/src/functions.d.ts.map +1 -1
  212. package/lib/typescript/src/hooks/useFinancialConnectionsSheet.d.ts +4 -4
  213. package/lib/typescript/src/hooks/useFinancialConnectionsSheet.d.ts.map +1 -1
  214. package/lib/typescript/src/hooks/useStripe.d.ts +2 -2
  215. package/lib/typescript/src/hooks/useStripe.d.ts.map +1 -1
  216. package/lib/typescript/src/index.d.ts +2 -0
  217. package/lib/typescript/src/index.d.ts.map +1 -1
  218. package/lib/typescript/src/specs/NativeAddToWalletButton.d.ts +27 -0
  219. package/lib/typescript/src/specs/NativeAddToWalletButton.d.ts.map +1 -0
  220. package/lib/typescript/src/specs/NativeAddressSheet.d.ts +34 -0
  221. package/lib/typescript/src/specs/NativeAddressSheet.d.ts.map +1 -0
  222. package/lib/typescript/src/specs/NativeApplePayButton.d.ts +28 -0
  223. package/lib/typescript/src/specs/NativeApplePayButton.d.ts.map +1 -0
  224. package/lib/typescript/src/specs/NativeAuBECSDebitForm.d.ts +19 -0
  225. package/lib/typescript/src/specs/NativeAuBECSDebitForm.d.ts.map +1 -0
  226. package/lib/typescript/src/specs/NativeCardField.d.ts +33 -0
  227. package/lib/typescript/src/specs/NativeCardField.d.ts.map +1 -0
  228. package/lib/typescript/src/specs/NativeCardForm.d.ts +31 -0
  229. package/lib/typescript/src/specs/NativeCardForm.d.ts.map +1 -0
  230. package/lib/typescript/src/specs/NativeEmbeddedPaymentElement.d.ts +22 -0
  231. package/lib/typescript/src/specs/NativeEmbeddedPaymentElement.d.ts.map +1 -0
  232. package/lib/typescript/src/specs/NativeGooglePayButton.d.ts +11 -0
  233. package/lib/typescript/src/specs/NativeGooglePayButton.d.ts.map +1 -0
  234. package/lib/typescript/src/specs/NativeStripeContainer.d.ts +8 -0
  235. package/lib/typescript/src/specs/NativeStripeContainer.d.ts.map +1 -0
  236. package/lib/typescript/src/specs/NativeStripeSdkModule.d.ts +93 -0
  237. package/lib/typescript/src/specs/NativeStripeSdkModule.d.ts.map +1 -0
  238. package/lib/typescript/src/specs/utils.d.ts +20 -0
  239. package/lib/typescript/src/specs/utils.d.ts.map +1 -0
  240. package/lib/typescript/src/types/CustomerSheet.d.ts +1 -5
  241. package/lib/typescript/src/types/CustomerSheet.d.ts.map +1 -1
  242. package/lib/typescript/src/types/EmbeddedPaymentElement.d.ts +161 -0
  243. package/lib/typescript/src/types/EmbeddedPaymentElement.d.ts.map +1 -0
  244. package/lib/typescript/src/types/PaymentSheet.d.ts +97 -4
  245. package/lib/typescript/src/types/PaymentSheet.d.ts.map +1 -1
  246. package/lib/typescript/src/types/components/CardFieldInput.d.ts +3 -2
  247. package/lib/typescript/src/types/components/CardFieldInput.d.ts.map +1 -1
  248. package/lib/typescript/src/types/components/CardFormView.d.ts +3 -1
  249. package/lib/typescript/src/types/components/CardFormView.d.ts.map +1 -1
  250. package/package.json +20 -1
  251. package/src/components/AddToWalletButton.tsx +2 -5
  252. package/src/components/AddressSheet.tsx +5 -16
  253. package/src/components/AuBECSDebitForm.tsx +3 -12
  254. package/src/components/CardField.tsx +20 -30
  255. package/src/components/CardForm.tsx +14 -29
  256. package/src/components/CustomerSheet.tsx +23 -25
  257. package/src/components/PlatformPayButton.tsx +6 -6
  258. package/src/components/StripeContainer.tsx +5 -12
  259. package/src/components/StripeProvider.tsx +1 -1
  260. package/src/events.ts +49 -0
  261. package/src/functions.ts +13 -24
  262. package/src/hooks/useFinancialConnectionsSheet.tsx +2 -2
  263. package/src/hooks/useStripe.tsx +2 -2
  264. package/src/index.tsx +3 -0
  265. package/src/specs/NativeAddToWalletButton.ts +40 -0
  266. package/src/specs/NativeAddressSheet.ts +50 -0
  267. package/src/specs/NativeApplePayButton.ts +40 -0
  268. package/src/specs/NativeAuBECSDebitForm.ts +24 -0
  269. package/src/specs/NativeCardField.ts +51 -0
  270. package/src/specs/NativeCardForm.ts +43 -0
  271. package/src/specs/NativeEmbeddedPaymentElement.ts +37 -0
  272. package/src/specs/NativeGooglePayButton.ts +20 -0
  273. package/src/specs/NativeStripeContainer.ts +12 -0
  274. package/src/specs/NativeStripeSdkModule.ts +219 -0
  275. package/src/specs/utils.ts +22 -0
  276. package/src/types/CustomerSheet.ts +1 -5
  277. package/src/types/EmbeddedPaymentElement.tsx +467 -0
  278. package/src/types/PaymentSheet.ts +114 -4
  279. package/src/types/components/CardFieldInput.ts +1 -2
  280. package/src/types/components/CardFormView.ts +1 -1
  281. package/stripe-react-native.podspec +27 -2
  282. package/android/.gradle/8.11.1/checksums/checksums.lock +0 -0
  283. package/android/.gradle/8.11.1/checksums/md5-checksums.bin +0 -0
  284. package/android/.gradle/8.11.1/checksums/sha1-checksums.bin +0 -0
  285. package/android/.gradle/8.11.1/executionHistory/executionHistory.lock +0 -0
  286. package/android/.gradle/8.11.1/fileChanges/last-build.bin +0 -0
  287. package/android/.gradle/8.11.1/fileHashes/fileHashes.lock +0 -0
  288. package/android/.gradle/8.11.1/gc.properties +0 -0
  289. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  290. package/android/.gradle/buildOutputCleanup/cache.properties +0 -2
  291. package/android/.gradle/vcs-1/gc.properties +0 -0
  292. package/android/src/main/java/com/reactnativestripesdk/CardChangedEvent.kt +0 -54
  293. package/ios/StripeSdk.m +0 -244
  294. package/lib/commonjs/NativeStripeSdk.js +0 -2
  295. package/lib/commonjs/NativeStripeSdk.js.map +0 -1
  296. package/lib/commonjs/components/ApplePayButtonNative.js +0 -2
  297. package/lib/commonjs/components/ApplePayButtonNative.js.map +0 -1
  298. package/lib/commonjs/components/GooglePayButtonNative.js +0 -2
  299. package/lib/commonjs/components/GooglePayButtonNative.js.map +0 -1
  300. package/lib/module/NativeStripeSdk.js +0 -2
  301. package/lib/module/NativeStripeSdk.js.map +0 -1
  302. package/lib/module/components/ApplePayButtonNative.js +0 -2
  303. package/lib/module/components/ApplePayButtonNative.js.map +0 -1
  304. package/lib/module/components/GooglePayButtonNative.js +0 -2
  305. package/lib/module/components/GooglePayButtonNative.js.map +0 -1
  306. package/lib/typescript/src/NativeStripeSdk.d.ts +0 -58
  307. package/lib/typescript/src/NativeStripeSdk.d.ts.map +0 -1
  308. package/lib/typescript/src/components/ApplePayButtonNative.d.ts +0 -4
  309. package/lib/typescript/src/components/ApplePayButtonNative.d.ts.map +0 -1
  310. package/lib/typescript/src/components/GooglePayButtonNative.d.ts +0 -4
  311. package/lib/typescript/src/components/GooglePayButtonNative.d.ts.map +0 -1
  312. package/src/NativeStripeSdk.tsx +0 -159
  313. package/src/components/ApplePayButtonNative.tsx +0 -5
  314. package/src/components/GooglePayButtonNative.tsx +0 -7
@@ -1,13 +1,16 @@
1
1
  import PassKit
2
2
  import Stripe
3
- import StripePaymentSheet
3
+ @_spi(EmbeddedPaymentElementPrivateBeta) import StripePaymentSheet
4
4
  import StripeFinancialConnections
5
5
  import Foundation
6
6
 
7
- @objc(StripeSdk)
8
- class StripeSdk: RCTEventEmitter, UIAdaptivePresentationControllerDelegate {
9
- public var cardFieldView: CardFieldView? = nil
10
- public var cardFormView: CardFormView? = nil
7
+ @objc(StripeSdkImpl)
8
+ public class StripeSdkImpl: NSObject, UIAdaptivePresentationControllerDelegate {
9
+ @objc public static let shared = StripeSdkImpl()
10
+
11
+ @objc public weak var emitter: StripeSdkEmitter? = nil
12
+ weak var cardFieldView: CardFieldView? = nil
13
+ weak var cardFormView: CardFormView? = nil
11
14
 
12
15
  var merchantIdentifier: String? = nil
13
16
 
@@ -60,25 +63,10 @@ class StripeSdk: RCTEventEmitter, UIAdaptivePresentationControllerDelegate {
60
63
  var fetchSelectedPaymentOptionCallback: ((CustomerPaymentOption?) -> Void)? = nil
61
64
  var setupIntentClientSecretForCustomerAttachCallback: ((String) -> Void)? = nil
62
65
 
63
- var hasEventListeners = false
64
- override func startObserving() {
65
- hasEventListeners = true
66
- }
67
- override func stopObserving() {
68
- hasEventListeners = false
69
- }
70
-
71
- override func supportedEvents() -> [String]! {
72
- return ["onOrderTrackingCallback", "onConfirmHandlerCallback", "onCustomerAdapterFetchPaymentMethodsCallback", "onCustomerAdapterAttachPaymentMethodCallback",
73
- "onCustomerAdapterDetachPaymentMethodCallback", "onCustomerAdapterSetSelectedPaymentOptionCallback", "onCustomerAdapterFetchSelectedPaymentOptionCallback",
74
- "onCustomerAdapterSetupIntentClientSecretForCustomerAttachCallback", "onFinancialConnectionsEvent"]
75
- }
76
-
77
- @objc override static func requiresMainQueueSetup() -> Bool {
78
- return false
79
- }
66
+ var embeddedInstance: EmbeddedPaymentElement? = nil
67
+ lazy var embeddedInstanceDelegate = StripeSdkEmbeddedPaymentElementDelegate(sdkImpl: self)
80
68
 
81
- @objc override func constantsToExport() -> [AnyHashable : Any] {
69
+ @objc public func getConstants() -> [AnyHashable : Any] {
82
70
  return [
83
71
  "API_VERSIONS": [
84
72
  "CORE": STPAPIClient.apiVersion,
@@ -88,7 +76,7 @@ class StripeSdk: RCTEventEmitter, UIAdaptivePresentationControllerDelegate {
88
76
  }
89
77
 
90
78
  @objc(initialise:resolver:rejecter:)
91
- func initialise(params: NSDictionary, resolver resolve: @escaping RCTPromiseResolveBlock, rejecter reject: @escaping RCTPromiseRejectBlock) -> Void {
79
+ public func initialise(params: NSDictionary, resolver resolve: @escaping RCTPromiseResolveBlock, rejecter reject: @escaping RCTPromiseRejectBlock) -> Void {
92
80
  let publishableKey = params["publishableKey"] as! String
93
81
  let appInfo = params["appInfo"] as! NSDictionary
94
82
  let stripeAccountId = params["stripeAccountId"] as? String
@@ -117,7 +105,7 @@ class StripeSdk: RCTEventEmitter, UIAdaptivePresentationControllerDelegate {
117
105
  }
118
106
 
119
107
  @objc(initPaymentSheet:resolver:rejecter:)
120
- func initPaymentSheet(params: NSDictionary, resolver resolve: @escaping RCTPromiseResolveBlock,
108
+ public func initPaymentSheet(params: NSDictionary, resolver resolve: @escaping RCTPromiseResolveBlock,
121
109
  rejecter reject: @escaping RCTPromiseRejectBlock) -> Void {
122
110
  let (error, configuration) = buildPaymentSheetConfiguration(params: params)
123
111
  guard let configuration = configuration else {
@@ -129,7 +117,7 @@ class StripeSdk: RCTEventEmitter, UIAdaptivePresentationControllerDelegate {
129
117
  }
130
118
 
131
119
  @objc(intentCreationCallback:resolver:rejecter:)
132
- @MainActor func intentCreationCallback(result: NSDictionary, resolver resolve: @escaping RCTPromiseResolveBlock,
120
+ @MainActor public func intentCreationCallback(result: NSDictionary, resolver resolve: @escaping RCTPromiseResolveBlock,
133
121
  rejecter reject: @escaping RCTPromiseRejectBlock) -> Void {
134
122
  guard let paymentSheetIntentCreationCallback = self.paymentSheetIntentCreationCallback else {
135
123
  resolve(Errors.createError(ErrorType.Failed, "No intent creation callback was set"))
@@ -154,7 +142,7 @@ class StripeSdk: RCTEventEmitter, UIAdaptivePresentationControllerDelegate {
154
142
  }
155
143
 
156
144
  @objc(confirmPaymentSheetPayment:rejecter:)
157
- func confirmPaymentSheetPayment(resolver resolve: @escaping RCTPromiseResolveBlock,
145
+ public func confirmPaymentSheetPayment(resolver resolve: @escaping RCTPromiseResolveBlock,
158
146
  rejecter reject: @escaping RCTPromiseRejectBlock) -> Void {
159
147
  DispatchQueue.main.async {
160
148
  if (self.paymentSheetFlowController != nil) {
@@ -176,14 +164,14 @@ class StripeSdk: RCTEventEmitter, UIAdaptivePresentationControllerDelegate {
176
164
  }
177
165
 
178
166
  @objc(resetPaymentSheetCustomer:rejecter:)
179
- func resetPaymentSheetCustomer(resolver resolve: @escaping RCTPromiseResolveBlock,
167
+ public func resetPaymentSheetCustomer(resolver resolve: @escaping RCTPromiseResolveBlock,
180
168
  rejecter reject: @escaping RCTPromiseRejectBlock) -> Void {
181
169
  PaymentSheet.resetCustomer()
182
170
  resolve(nil)
183
171
  }
184
172
 
185
173
  @objc(presentPaymentSheet:resolver:rejecter:)
186
- func presentPaymentSheet(options: NSDictionary,
174
+ public func presentPaymentSheet(options: NSDictionary,
187
175
  resolver resolve: @escaping RCTPromiseResolveBlock,
188
176
  rejecter reject: @escaping RCTPromiseRejectBlock) -> Void {
189
177
  var paymentSheetViewController: UIViewController?
@@ -233,7 +221,7 @@ class StripeSdk: RCTEventEmitter, UIAdaptivePresentationControllerDelegate {
233
221
  }
234
222
 
235
223
  @objc(createTokenForCVCUpdate:resolver:rejecter:)
236
- func createTokenForCVCUpdate(cvc: String?, resolver resolve: @escaping RCTPromiseResolveBlock, rejecter reject: @escaping RCTPromiseRejectBlock) {
224
+ public func createTokenForCVCUpdate(cvc: String?, resolver resolve: @escaping RCTPromiseResolveBlock, rejecter reject: @escaping RCTPromiseRejectBlock) {
237
225
  guard let cvc = cvc else {
238
226
  resolve(Errors.createError(ErrorType.Failed, "You must provide CVC"))
239
227
  return;
@@ -250,7 +238,7 @@ class StripeSdk: RCTEventEmitter, UIAdaptivePresentationControllerDelegate {
250
238
  }
251
239
 
252
240
  @objc(confirmSetupIntent:data:options:resolver:rejecter:)
253
- func confirmSetupIntent (setupIntentClientSecret: String, params: NSDictionary,
241
+ public func confirmSetupIntent (setupIntentClientSecret: String, params: NSDictionary,
254
242
  options: NSDictionary, resolver resolve: @escaping RCTPromiseResolveBlock,
255
243
  rejecter reject: @escaping RCTPromiseRejectBlock) {
256
244
  let paymentMethodData = params["paymentMethodData"] as? NSDictionary
@@ -318,7 +306,7 @@ class StripeSdk: RCTEventEmitter, UIAdaptivePresentationControllerDelegate {
318
306
  }
319
307
 
320
308
  @objc(updatePlatformPaySheet:shippingMethods:errors:resolver:rejecter:)
321
- func updatePlatformPaySheet(summaryItems: NSArray,
309
+ public func updatePlatformPaySheet(summaryItems: NSArray,
322
310
  shippingMethods: NSArray,
323
311
  errors: [NSDictionary],
324
312
  resolver resolve: @escaping RCTPromiseResolveBlock,
@@ -365,13 +353,13 @@ class StripeSdk: RCTEventEmitter, UIAdaptivePresentationControllerDelegate {
365
353
  }
366
354
 
367
355
  @objc(openApplePaySetup:rejecter:)
368
- func openApplePaySetup(resolver resolve: @escaping RCTPromiseResolveBlock, rejecter reject: @escaping RCTPromiseRejectBlock) -> Void {
356
+ public func openApplePaySetup(resolver resolve: @escaping RCTPromiseResolveBlock, rejecter reject: @escaping RCTPromiseRejectBlock) -> Void {
369
357
  PKPassLibrary.init().openPaymentSetup()
370
358
  resolve([])
371
359
  }
372
360
 
373
361
  @objc(handleURLCallback:resolver:rejecter:)
374
- func handleURLCallback(url: String?, resolver resolve: @escaping RCTPromiseResolveBlock, rejecter reject: @escaping RCTPromiseRejectBlock) {
362
+ public func handleURLCallback(url: String?, resolver resolve: @escaping RCTPromiseResolveBlock, rejecter reject: @escaping RCTPromiseRejectBlock) {
375
363
  guard let url = url else {
376
364
  resolve(false)
377
365
  return;
@@ -388,14 +376,14 @@ class StripeSdk: RCTEventEmitter, UIAdaptivePresentationControllerDelegate {
388
376
  }
389
377
 
390
378
  @objc(isPlatformPaySupported:resolver:rejecter:)
391
- func isPlatformPaySupported(params: NSDictionary,
379
+ public func isPlatformPaySupported(params: NSDictionary,
392
380
  resolver resolve: @escaping RCTPromiseResolveBlock,
393
381
  rejecter reject: @escaping RCTPromiseRejectBlock) {
394
382
  resolve(StripeAPI.deviceSupportsApplePay())
395
383
  }
396
384
 
397
385
  @objc(createPlatformPayPaymentMethod:usesDeprecatedTokenFlow:resolver:rejecter:)
398
- func createPlatformPayPaymentMethod(params: NSDictionary,
386
+ public func createPlatformPayPaymentMethod(params: NSDictionary,
399
387
  usesDeprecatedTokenFlow: Bool,
400
388
  resolver resolve: @escaping RCTPromiseResolveBlock,
401
389
  rejecter reject: @escaping RCTPromiseRejectBlock) {
@@ -433,13 +421,13 @@ class StripeSdk: RCTEventEmitter, UIAdaptivePresentationControllerDelegate {
433
421
  }
434
422
 
435
423
  @objc(dismissPlatformPay:rejecter:)
436
- func dismissPlatformPay(resolver resolve: @escaping RCTPromiseResolveBlock, rejecter reject: @escaping RCTPromiseRejectBlock) -> Void {
424
+ public func dismissPlatformPay(resolver resolve: @escaping RCTPromiseResolveBlock, rejecter reject: @escaping RCTPromiseRejectBlock) -> Void {
437
425
  let didDismiss = maybeDismissApplePay()
438
426
  resolve(didDismiss)
439
427
  }
440
428
 
441
429
  @objc(confirmPlatformPay:params:isPaymentIntent:resolver:rejecter:)
442
- func confirmPlatformPay(
430
+ public func confirmPlatformPay(
443
431
  clientSecret: String?,
444
432
  params: NSDictionary,
445
433
  isPaymentIntent: Bool,
@@ -484,7 +472,7 @@ class StripeSdk: RCTEventEmitter, UIAdaptivePresentationControllerDelegate {
484
472
  }
485
473
 
486
474
  @objc(createPaymentMethod:options:resolver:rejecter:)
487
- func createPaymentMethod(
475
+ public func createPaymentMethod(
488
476
  params: NSDictionary,
489
477
  options: NSDictionary,
490
478
  resolver resolve: @escaping RCTPromiseResolveBlock,
@@ -526,7 +514,7 @@ class StripeSdk: RCTEventEmitter, UIAdaptivePresentationControllerDelegate {
526
514
  }
527
515
 
528
516
  @objc(createToken:resolver:rejecter:)
529
- func createToken(
517
+ public func createToken(
530
518
  params: NSDictionary,
531
519
  resolver resolve: @escaping RCTPromiseResolveBlock,
532
520
  rejecter reject: @escaping RCTPromiseRejectBlock
@@ -633,7 +621,7 @@ class StripeSdk: RCTEventEmitter, UIAdaptivePresentationControllerDelegate {
633
621
  }
634
622
 
635
623
  @objc(handleNextAction:returnURL:resolver:rejecter:)
636
- func handleNextAction(
624
+ public func handleNextAction(
637
625
  paymentIntentClientSecret: String,
638
626
  returnURL: String?,
639
627
  resolver resolve: @escaping RCTPromiseResolveBlock,
@@ -665,7 +653,7 @@ class StripeSdk: RCTEventEmitter, UIAdaptivePresentationControllerDelegate {
665
653
  }
666
654
 
667
655
  @objc(handleNextActionForSetup:returnURL:resolver:rejecter:)
668
- func handleNextActionForSetup(
656
+ public func handleNextActionForSetup(
669
657
  setupIntentClientSecret: String,
670
658
  returnURL: String?,
671
659
  resolver resolve: @escaping RCTPromiseResolveBlock,
@@ -697,7 +685,7 @@ class StripeSdk: RCTEventEmitter, UIAdaptivePresentationControllerDelegate {
697
685
  }
698
686
 
699
687
  @objc(collectBankAccount:clientSecret:params:resolver:rejecter:)
700
- func collectBankAccount(
688
+ public func collectBankAccount(
701
689
  isPaymentIntent: Bool,
702
690
  clientSecret: NSString,
703
691
  params: NSDictionary,
@@ -733,13 +721,9 @@ class StripeSdk: RCTEventEmitter, UIAdaptivePresentationControllerDelegate {
733
721
  connectionsReturnURL = nil
734
722
  }
735
723
 
736
- var onEvent: ((FinancialConnectionsEvent) -> Void)? = nil
737
-
738
- if hasEventListeners {
739
- onEvent = { [weak self] event in
740
- let mappedEvent = Mappers.financialConnectionsEventToMap(event)
741
- self?.sendEvent(withName: "onFinancialConnectionsEvent", body: mappedEvent)
742
- }
724
+ let onEvent = { [weak self] (event: FinancialConnectionsEvent) in
725
+ let mappedEvent = Mappers.financialConnectionsEventToMap(event)
726
+ self?.emitter?.emitOnFinancialConnectionsEvent(mappedEvent)
743
727
  }
744
728
 
745
729
  let style = STPBankAccountCollectorUserInterfaceStyle(from: params)
@@ -803,7 +787,7 @@ class StripeSdk: RCTEventEmitter, UIAdaptivePresentationControllerDelegate {
803
787
  }
804
788
 
805
789
  @objc(confirmPayment:data:options:resolver:rejecter:)
806
- func confirmPayment(
790
+ public func confirmPayment(
807
791
  paymentIntentClientSecret: String,
808
792
  params: NSDictionary?,
809
793
  options: NSDictionary,
@@ -894,7 +878,7 @@ class StripeSdk: RCTEventEmitter, UIAdaptivePresentationControllerDelegate {
894
878
  }
895
879
 
896
880
  @objc(retrievePaymentIntent:resolver:rejecter:)
897
- func retrievePaymentIntent(
881
+ public func retrievePaymentIntent(
898
882
  clientSecret: String,
899
883
  resolver resolve: @escaping RCTPromiseResolveBlock,
900
884
  rejecter reject: @escaping RCTPromiseRejectBlock
@@ -918,7 +902,7 @@ class StripeSdk: RCTEventEmitter, UIAdaptivePresentationControllerDelegate {
918
902
  }
919
903
 
920
904
  @objc(retrieveSetupIntent:resolver:rejecter:)
921
- func retrieveSetupIntent(
905
+ public func retrieveSetupIntent(
922
906
  clientSecret: String,
923
907
  resolver resolve: @escaping RCTPromiseResolveBlock,
924
908
  rejecter reject: @escaping RCTPromiseRejectBlock
@@ -942,7 +926,7 @@ class StripeSdk: RCTEventEmitter, UIAdaptivePresentationControllerDelegate {
942
926
  }
943
927
 
944
928
  @objc(verifyMicrodeposits:clientSecret:params:resolver:rejecter:)
945
- func verifyMicrodeposits(
929
+ public func verifyMicrodeposits(
946
930
  isPaymentIntent: Bool,
947
931
  clientSecret: NSString,
948
932
  params: NSDictionary,
@@ -1010,7 +994,7 @@ class StripeSdk: RCTEventEmitter, UIAdaptivePresentationControllerDelegate {
1010
994
  }
1011
995
 
1012
996
  @objc(canAddCardToWallet:resolver:rejecter:)
1013
- func canAddCardToWallet(
997
+ public func canAddCardToWallet(
1014
998
  params: NSDictionary,
1015
999
  resolver resolve: @escaping RCTPromiseResolveBlock,
1016
1000
  rejecter reject: @escaping RCTPromiseRejectBlock
@@ -1028,7 +1012,7 @@ class StripeSdk: RCTEventEmitter, UIAdaptivePresentationControllerDelegate {
1028
1012
  }
1029
1013
 
1030
1014
  @objc(isCardInWallet:resolver:rejecter:)
1031
- func isCardInWallet(
1015
+ public func isCardInWallet(
1032
1016
  params: NSDictionary,
1033
1017
  resolver resolve: @escaping RCTPromiseResolveBlock,
1034
1018
  rejecter reject: @escaping RCTPromiseRejectBlock
@@ -1041,7 +1025,7 @@ class StripeSdk: RCTEventEmitter, UIAdaptivePresentationControllerDelegate {
1041
1025
  }
1042
1026
 
1043
1027
  @objc(collectBankAccountToken:params:resolver:rejecter:)
1044
- func collectBankAccountToken(
1028
+ public func collectBankAccountToken(
1045
1029
  clientSecret: String,
1046
1030
  params: NSDictionary,
1047
1031
  resolver resolve: @escaping RCTPromiseResolveBlock,
@@ -1059,13 +1043,10 @@ class StripeSdk: RCTEventEmitter, UIAdaptivePresentationControllerDelegate {
1059
1043
  }
1060
1044
 
1061
1045
  let configuration = FinancialConnectionsSheet.Configuration(from: params)
1062
- var onEvent: ((FinancialConnectionsEvent) -> Void)? = nil
1063
1046
 
1064
- if hasEventListeners {
1065
- onEvent = { [weak self] event in
1047
+ let onEvent = { [weak self] (event: FinancialConnectionsEvent) in
1066
1048
  let mappedEvent = Mappers.financialConnectionsEventToMap(event)
1067
- self?.sendEvent(withName: "onFinancialConnectionsEvent", body: mappedEvent)
1068
- }
1049
+ self?.emitter?.emitOnFinancialConnectionsEvent(mappedEvent)
1069
1050
  }
1070
1051
 
1071
1052
  FinancialConnections.presentForToken(
@@ -1078,7 +1059,7 @@ class StripeSdk: RCTEventEmitter, UIAdaptivePresentationControllerDelegate {
1078
1059
  }
1079
1060
 
1080
1061
  @objc(collectFinancialConnectionsAccounts:params:resolver:rejecter:)
1081
- func collectFinancialConnectionsAccounts(
1062
+ public func collectFinancialConnectionsAccounts(
1082
1063
  clientSecret: String,
1083
1064
  params: NSDictionary,
1084
1065
  resolver resolve: @escaping RCTPromiseResolveBlock,
@@ -1096,13 +1077,10 @@ class StripeSdk: RCTEventEmitter, UIAdaptivePresentationControllerDelegate {
1096
1077
  }
1097
1078
 
1098
1079
  let configuration = FinancialConnectionsSheet.Configuration(from: params)
1099
- var onEvent: ((FinancialConnectionsEvent) -> Void)? = nil
1100
1080
 
1101
- if hasEventListeners {
1102
- onEvent = { [weak self] event in
1081
+ let onEvent = { [weak self] (event: FinancialConnectionsEvent) in
1103
1082
  let mappedEvent = Mappers.financialConnectionsEventToMap(event)
1104
- self?.sendEvent(withName: "onFinancialConnectionsEvent", body: mappedEvent)
1105
- }
1083
+ self?.emitter?.emitOnFinancialConnectionsEvent(mappedEvent)
1106
1084
  }
1107
1085
 
1108
1086
  FinancialConnections.present(
@@ -1115,7 +1093,7 @@ class StripeSdk: RCTEventEmitter, UIAdaptivePresentationControllerDelegate {
1115
1093
  }
1116
1094
 
1117
1095
  @objc(configureOrderTracking:orderIdentifier:webServiceUrl:authenticationToken:resolver:rejecter:)
1118
- func configureOrderTracking(
1096
+ public func configureOrderTracking(
1119
1097
  orderTypeIdentifier: String,
1120
1098
  orderIdentifier: String,
1121
1099
  webServiceUrl: String,
@@ -1140,7 +1118,7 @@ class StripeSdk: RCTEventEmitter, UIAdaptivePresentationControllerDelegate {
1140
1118
  #endif
1141
1119
  }
1142
1120
 
1143
- func presentationControllerDidDismiss(_ presentationController: UIPresentationController) {
1121
+ public func presentationControllerDidDismiss(_ presentationController: UIPresentationController) {
1144
1122
  confirmPaymentResolver?(Errors.createError(ErrorType.Canceled, "FPX Payment has been canceled"))
1145
1123
  }
1146
1124
 
@@ -1191,8 +1169,8 @@ func findViewControllerPresenter(from uiViewController: UIViewController) -> UIV
1191
1169
  return presentingViewController
1192
1170
  }
1193
1171
 
1194
- extension StripeSdk: STPAuthenticationContext {
1195
- func authenticationPresentingViewController() -> UIViewController {
1172
+ extension StripeSdkImpl: STPAuthenticationContext {
1173
+ public func authenticationPresentingViewController() -> UIViewController {
1196
1174
  return findViewControllerPresenter(from: UIApplication.shared.delegate?.window??.rootViewController ?? UIViewController())
1197
1175
  }
1198
1176
  }
@@ -0,0 +1,25 @@
1
+ // Import this header instead of stripe_react_native-Swift.h to make sure
2
+ // it includes all its dependencies.
3
+
4
+ // stripe_react_native-Swift.h is missing some type defs.
5
+ @protocol STPAuthenticationContext;
6
+ @protocol STPApplePayContextDelegate;
7
+ @protocol PKPaymentAuthorizationViewControllerDelegate;
8
+ @protocol STPIssuingCardEphemeralKeyProvider;
9
+ @protocol PKAddPaymentPassViewControllerDelegate;
10
+ @protocol STPAUBECSDebitFormViewDelegate;
11
+ @protocol STPPaymentCardTextFieldDelegate;
12
+ @protocol STPCardFormViewDelegate;
13
+
14
+ typedef NS_ENUM(NSUInteger, STPPaymentStatus);
15
+
16
+ // stripe_react_native-Swift.h also depends on these headers.
17
+ #import <React/RCTBridgeModule.h>
18
+ #import <React/RCTViewManager.h>
19
+
20
+ // When using frameworks the import is different.
21
+ #if __has_include("stripe_react_native/stripe_react_native-Swift.h")
22
+ #import <stripe_react_native/stripe_react_native-Swift.h>
23
+ #elif __has_include(<stripe_react_native-Swift.h>)
24
+ #import <stripe_react_native-Swift.h>
25
+ #endif
@@ -0,0 +1,2 @@
1
+ // stripe_react_native-Swift.h includes this
2
+
@@ -1,2 +1,2 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.AddToWalletButton=AddToWalletButton;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/charliecruzan/stripe/stripe-react-native/src/components/AddToWalletButton.tsx";var _excluded=["onComplete"];var AddToWalletButtonNative=(0,_reactNative.requireNativeComponent)('AddToWalletButton');function AddToWalletButton(_ref){var onComplete=_ref.onComplete,props=(0,_objectWithoutProperties2.default)(_ref,_excluded);return(0,_jsxRuntime.jsx)(AddToWalletButtonNative,Object.assign({},props,{onCompleteAction:function onCompleteAction(value){return onComplete(value.nativeEvent);}}));}
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.AddToWalletButton=AddToWalletButton;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireDefault(require("react"));var _NativeAddToWalletButton=_interopRequireDefault(require("../specs/NativeAddToWalletButton"));var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/davidestes/stripe/stripe-react-native/src/components/AddToWalletButton.tsx";var _excluded=["onComplete"];function AddToWalletButton(_ref){var onComplete=_ref.onComplete,props=(0,_objectWithoutProperties2.default)(_ref,_excluded);return(0,_jsxRuntime.jsx)(_NativeAddToWalletButton.default,Object.assign({},props,{onCompleteAction:function onCompleteAction(value){return onComplete(value.nativeEvent);}}));}
2
2
  //# sourceMappingURL=AddToWalletButton.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_jsxRuntime","_jsxFileName","_excluded","AddToWalletButtonNative","requireNativeComponent","AddToWalletButton","_ref","onComplete","props","_objectWithoutProperties2","default","jsx","Object","assign","onCompleteAction","value","nativeEvent"],"sourceRoot":"../../../src","sources":["components/AddToWalletButton.tsx"],"mappings":"wSAAA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WACA,IAAAC,YAAA,CAAAD,OAAA,iBAOsB,IAAAE,WAAA,CAAAF,OAAA,0BAAAG,YAAA,4FAAAC,SAAA,gBAQtB,GAAM,CAAAC,uBAAuB,CAC3B,GAAAC,mCAAsB,EAAM,mBAAmB,CAAC,CAgE3C,QAAS,CAAAC,iBAAiBA,CAAAC,IAAA,CAAkC,IAA/B,CAAAC,UAAU,CAAAD,IAAA,CAAVC,UAAU,CAAKC,KAAK,IAAAC,yBAAA,CAAAC,OAAA,EAAAJ,IAAA,CAAAJ,SAAA,EACtD,MACE,GAAAF,WAAA,CAAAW,GAAA,EAACR,uBAAuB,CAAAS,MAAA,CAAAC,MAAA,IAClBL,KAAK,EACTM,gBAAgB,CAAE,QAAlB,CAAAA,gBAAgBA,CACdC,KAEE,QACC,CAAAR,UAAU,CAACQ,KAAK,CAACC,WAAW,CAAC,EAAC,EACpC,CAAC,CAEN","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_NativeAddToWalletButton","_jsxRuntime","_jsxFileName","_excluded","AddToWalletButton","_ref","onComplete","props","_objectWithoutProperties2","default","jsx","Object","assign","onCompleteAction","value","nativeEvent"],"sourceRoot":"../../../src","sources":["components/AddToWalletButton.tsx"],"mappings":"wSAAA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WAcA,IAAAC,wBAAA,CAAAF,sBAAA,CAAAC,OAAA,sCAAuE,IAAAE,WAAA,CAAAF,OAAA,0BAAAG,YAAA,yFAAAC,SAAA,gBAgEhE,QAAS,CAAAC,iBAAiBA,CAAAC,IAAA,CAAkC,IAA/B,CAAAC,UAAU,CAAAD,IAAA,CAAVC,UAAU,CAAKC,KAAK,IAAAC,yBAAA,CAAAC,OAAA,EAAAJ,IAAA,CAAAF,SAAA,EACtD,MACE,GAAAF,WAAA,CAAAS,GAAA,EAACV,wBAAA,CAAAS,OAAuB,CAAAE,MAAA,CAAAC,MAAA,IAClBL,KAAK,EACTM,gBAAgB,CAAE,QAAlB,CAAAA,gBAAgBA,CACdC,KAEE,QACC,CAAAR,UAAU,CAACQ,KAAK,CAACC,WAAW,CAAC,EAAC,EACpC,CAAC,CAEN","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.AddressSheet=AddressSheet;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/charliecruzan/stripe/stripe-react-native/src/components/AddressSheet.tsx";var _excluded=["onSubmit","onError"];var AddressSheetNative=(0,_reactNative.requireNativeComponent)('AddressSheetView');function AddressSheet(_ref){var onSubmit=_ref.onSubmit,onError=_ref.onError,props=(0,_objectWithoutProperties2.default)(_ref,_excluded);return(0,_jsxRuntime.jsx)(AddressSheetNative,Object.assign({},props,{onSubmitAction:function onSubmitAction(value){return onSubmit(value.nativeEvent);},onErrorAction:function onErrorAction(value){return onError(value.nativeEvent.error);}}));}
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.AddressSheet=AddressSheet;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireDefault(require("react"));var _NativeAddressSheet=_interopRequireDefault(require("../specs/NativeAddressSheet"));var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/davidestes/stripe/stripe-react-native/src/components/AddressSheet.tsx";var _excluded=["onSubmit","onError"];function AddressSheet(_ref){var onSubmit=_ref.onSubmit,onError=_ref.onError,props=(0,_objectWithoutProperties2.default)(_ref,_excluded);return(0,_jsxRuntime.jsx)(_NativeAddressSheet.default,Object.assign({},props,{onSubmitAction:function onSubmitAction(event){return onSubmit(event.nativeEvent.result);},onErrorAction:function onErrorAction(event){return onError(event.nativeEvent.error);}}));}
2
2
  //# sourceMappingURL=AddressSheet.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_jsxRuntime","_jsxFileName","_excluded","AddressSheetNative","requireNativeComponent","AddressSheet","_ref","onSubmit","onError","props","_objectWithoutProperties2","default","jsx","Object","assign","onSubmitAction","value","nativeEvent","onErrorAction","error"],"sourceRoot":"../../../src","sources":["components/AddressSheet.tsx"],"mappings":"8RAAA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WACA,IAAAC,YAAA,CAAAD,OAAA,iBAIsB,IAAAE,WAAA,CAAAF,OAAA,0BAAAG,YAAA,uFAAAC,SAAA,wBAQtB,GAAM,CAAAC,kBAAkB,CAAG,GAAAC,mCAAsB,EAAM,kBAAkB,CAAC,CA4DnE,QAAS,CAAAC,YAAYA,CAAAC,IAAA,CAAyC,IAAtC,CAAAC,QAAQ,CAAAD,IAAA,CAARC,QAAQ,CAAEC,OAAO,CAAAF,IAAA,CAAPE,OAAO,CAAKC,KAAK,IAAAC,yBAAA,CAAAC,OAAA,EAAAL,IAAA,CAAAJ,SAAA,EACxD,MACE,GAAAF,WAAA,CAAAY,GAAA,EAACT,kBAAkB,CAAAU,MAAA,CAAAC,MAAA,IACbL,KAAK,EACTM,cAAc,CAAE,QAAhB,CAAAA,cAAcA,CAAGC,KAAiD,QAChE,CAAAT,QAAQ,CAACS,KAAK,CAACC,WAAW,CAAC,EAC5B,CACDC,aAAa,CAAE,QAAf,CAAAA,aAAaA,CACXF,KAEE,QACC,CAAAR,OAAO,CAACQ,KAAK,CAACC,WAAW,CAACE,KAAK,CAAC,EAAC,EACvC,CAAC,CAEN","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_NativeAddressSheet","_jsxRuntime","_jsxFileName","_excluded","AddressSheet","_ref","onSubmit","onError","props","_objectWithoutProperties2","default","jsx","Object","assign","onSubmitAction","event","nativeEvent","result","onErrorAction","error"],"sourceRoot":"../../../src","sources":["components/AddressSheet.tsx"],"mappings":"8RAAA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WAQA,IAAAC,mBAAA,CAAAF,sBAAA,CAAAC,OAAA,iCAA6D,IAAAE,WAAA,CAAAF,OAAA,0BAAAG,YAAA,oFAAAC,SAAA,wBA4DtD,QAAS,CAAAC,YAAYA,CAAAC,IAAA,CAAyC,IAAtC,CAAAC,QAAQ,CAAAD,IAAA,CAARC,QAAQ,CAAEC,OAAO,CAAAF,IAAA,CAAPE,OAAO,CAAKC,KAAK,IAAAC,yBAAA,CAAAC,OAAA,EAAAL,IAAA,CAAAF,SAAA,EACxD,MACE,GAAAF,WAAA,CAAAU,GAAA,EAACX,mBAAA,CAAAU,OAAkB,CAAAE,MAAA,CAAAC,MAAA,IACbL,KAAK,EACTM,cAAc,CAAE,QAAhB,CAAAA,cAAcA,CAAGC,KAAK,QAAK,CAAAT,QAAQ,CAACS,KAAK,CAACC,WAAW,CAACC,MAAM,CAAC,EAAC,CAC9DC,aAAa,CAAE,QAAf,CAAAA,aAAaA,CAAGH,KAAK,QAAK,CAAAR,OAAO,CAACQ,KAAK,CAACC,WAAW,CAACG,KAAK,CAAC,EAAC,EAC5D,CAAC,CAEN","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.AuBECSDebitForm=AuBECSDebitForm;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/charliecruzan/stripe/stripe-react-native/src/components/AuBECSDebitForm.tsx";var _excluded=["onComplete","companyName","formStyle"];var AuBECSDebitFormNative=(0,_reactNative.requireNativeComponent)('AuBECSDebitForm');function AuBECSDebitForm(_ref){var onComplete=_ref.onComplete,companyName=_ref.companyName,formStyle=_ref.formStyle,props=(0,_objectWithoutProperties2.default)(_ref,_excluded);return(0,_jsxRuntime.jsx)(AuBECSDebitFormNative,Object.assign({onCompleteAction:function onCompleteAction(value){return onComplete(value.nativeEvent);},companyName:companyName,formStyle:Object.assign({},formStyle)},props));}
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.AuBECSDebitForm=AuBECSDebitForm;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireDefault(require("react"));var _NativeAuBECSDebitForm=_interopRequireDefault(require("../specs/NativeAuBECSDebitForm"));var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/davidestes/stripe/stripe-react-native/src/components/AuBECSDebitForm.tsx";var _excluded=["onComplete","companyName","formStyle"];function AuBECSDebitForm(_ref){var onComplete=_ref.onComplete,companyName=_ref.companyName,formStyle=_ref.formStyle,props=(0,_objectWithoutProperties2.default)(_ref,_excluded);return(0,_jsxRuntime.jsx)(_NativeAuBECSDebitForm.default,Object.assign({onCompleteAction:function onCompleteAction(value){return onComplete(value.nativeEvent);},companyName:companyName,formStyle:Object.assign({},formStyle)},props));}
2
2
  //# sourceMappingURL=AuBECSDebitForm.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_jsxRuntime","_jsxFileName","_excluded","AuBECSDebitFormNative","requireNativeComponent","AuBECSDebitForm","_ref","onComplete","companyName","formStyle","props","_objectWithoutProperties2","default","jsx","Object","assign","onCompleteAction","value","nativeEvent"],"sourceRoot":"../../../src","sources":["components/AuBECSDebitForm.tsx"],"mappings":"oSAAA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WACA,IAAAC,YAAA,CAAAD,OAAA,iBAKsB,IAAAE,WAAA,CAAAF,OAAA,0BAAAG,YAAA,0FAAAC,SAAA,0CAGtB,GAAM,CAAAC,qBAAqB,CACzB,GAAAC,mCAAsB,EACpB,iBACF,CAAC,CA4BI,QAAS,CAAAC,eAAeA,CAAAC,IAAA,CAKrB,IAJR,CAAAC,UAAU,CAAAD,IAAA,CAAVC,UAAU,CACVC,WAAW,CAAAF,IAAA,CAAXE,WAAW,CACXC,SAAS,CAAAH,IAAA,CAATG,SAAS,CACNC,KAAK,IAAAC,yBAAA,CAAAC,OAAA,EAAAN,IAAA,CAAAJ,SAAA,EAER,MACE,GAAAF,WAAA,CAAAa,GAAA,EAACV,qBAAqB,CAAAW,MAAA,CAAAC,MAAA,EACpBC,gBAAgB,CAAE,QAAlB,CAAAA,gBAAgBA,CAAGC,KAAK,QAAK,CAAAV,UAAU,CAACU,KAAK,CAACC,WAAW,CAAC,EAAC,CAC3DV,WAAW,CAAEA,WAAY,CACzBC,SAAS,CAAAK,MAAA,CAAAC,MAAA,IAAON,SAAS,CAAG,EACxBC,KAAK,CACV,CAAC,CAEN","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_NativeAuBECSDebitForm","_jsxRuntime","_jsxFileName","_excluded","AuBECSDebitForm","_ref","onComplete","companyName","formStyle","props","_objectWithoutProperties2","default","jsx","Object","assign","onCompleteAction","value","nativeEvent"],"sourceRoot":"../../../src","sources":["components/AuBECSDebitForm.tsx"],"mappings":"oSAAA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WAEA,IAAAC,sBAAA,CAAAF,sBAAA,CAAAC,OAAA,oCAAmE,IAAAE,WAAA,CAAAF,OAAA,0BAAAG,YAAA,uFAAAC,SAAA,0CA6B5D,QAAS,CAAAC,eAAeA,CAAAC,IAAA,CAKrB,IAJR,CAAAC,UAAU,CAAAD,IAAA,CAAVC,UAAU,CACVC,WAAW,CAAAF,IAAA,CAAXE,WAAW,CACXC,SAAS,CAAAH,IAAA,CAATG,SAAS,CACNC,KAAK,IAAAC,yBAAA,CAAAC,OAAA,EAAAN,IAAA,CAAAF,SAAA,EAER,MACE,GAAAF,WAAA,CAAAW,GAAA,EAACZ,sBAAA,CAAAW,OAAqB,CAAAE,MAAA,CAAAC,MAAA,EACpBC,gBAAgB,CAAE,QAAlB,CAAAA,gBAAgBA,CAAGC,KAAK,QAAK,CAAAV,UAAU,CAACU,KAAK,CAACC,WAAW,CAAC,EAAC,CAC3DV,WAAW,CAAEA,WAAY,CACzBC,SAAS,CAAAK,MAAA,CAAAC,MAAA,IAAON,SAAS,CAAG,EACxBC,KAAK,CACV,CAAC,CAEN","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.CardField=void 0;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _helpers=require("../helpers");var _jsxRuntime=require("react/jsx-runtime");var _excluded=["onCardChange","onFocus","onBlur","cardStyle","placeholders","postalCodeEnabled","countryCode"];var _this=this,_jsxFileName="/Users/charliecruzan/stripe/stripe-react-native/src/components/CardField.tsx";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&{}.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}var CardFieldNative=(0,_reactNative.requireNativeComponent)('CardField');var CardField=exports.CardField=(0,_react.forwardRef)(function(_ref,ref){var onCardChange=_ref.onCardChange,onFocus=_ref.onFocus,onBlur=_ref.onBlur,cardStyle=_ref.cardStyle,placeholders=_ref.placeholders,postalCodeEnabled=_ref.postalCodeEnabled,countryCode=_ref.countryCode,props=(0,_objectWithoutProperties2.default)(_ref,_excluded);var inputRef=(0,_react.useRef)(null);var onCardChangeHandler=(0,_react.useCallback)(function(event){var card=event.nativeEvent;var data={last4:card.last4,expiryMonth:card.expiryMonth,expiryYear:card.expiryYear,complete:card.complete,brand:card.brand,validExpiryDate:card.validExpiryDate,validNumber:card.validNumber,validCVC:card.validCVC};if(card.hasOwnProperty('postalCode')){data.postalCode=card.postalCode||'';}if(card.hasOwnProperty('number')||card.hasOwnProperty('cvc')){data.number=card.number||'';data.cvc=card.cvc||'';if(__DEV__&&onCardChange&&card.complete){console.warn(`[stripe-react-native] ⚠️ WARNING: You've enabled \`dangerouslyGetFullCardDetails\`, meaning full card details are being returned. Only do this if you're certain that you fulfill the necessary PCI compliance requirements. Make sure that you're not mistakenly logging or storing full card details! See the docs for details: https://stripe.com/docs/security/guide#validating-pci-compliance`);}}onCardChange==null||onCardChange(data);},[onCardChange]);var onFocusHandler=(0,_react.useCallback)(function(event){var focusedField=event.nativeEvent.focusedField;if(focusedField){(0,_helpers.focusInput)(inputRef.current);onFocus==null||onFocus(focusedField);}else{onBlur==null||onBlur();}},[onFocus,onBlur]);var focus=function focus(){_reactNative.UIManager.dispatchViewManagerCommand((0,_reactNative.findNodeHandle)(inputRef.current),'focus',[]);};var blur=function blur(){_reactNative.UIManager.dispatchViewManagerCommand((0,_reactNative.findNodeHandle)(inputRef.current),'blur',[]);};var clear=function clear(){_reactNative.UIManager.dispatchViewManagerCommand((0,_reactNative.findNodeHandle)(inputRef.current),'clear',[]);};(0,_react.useImperativeHandle)(ref,function(){return{focus:focus,blur:blur,clear:clear};});(0,_react.useLayoutEffect)(function(){var inputRefValue=inputRef.current;if(inputRefValue!==null){(0,_helpers.registerInput)(inputRefValue);return function(){(0,_helpers.unregisterInput)(inputRefValue);if((0,_helpers.currentlyFocusedInput)()===inputRefValue){inputRefValue.blur();}};}return function(){};},[inputRef]);return(0,_jsxRuntime.jsx)(CardFieldNative,Object.assign({ref:inputRef,onCardChange:onCardChangeHandler,onFocusChange:onFocusHandler,postalCodeEnabled:postalCodeEnabled!=null?postalCodeEnabled:true,countryCode:countryCode!=null?countryCode:null,cardStyle:{backgroundColor:cardStyle==null?void 0:cardStyle.backgroundColor,borderColor:cardStyle==null?void 0:cardStyle.borderColor,borderWidth:cardStyle==null?void 0:cardStyle.borderWidth,borderRadius:cardStyle==null?void 0:cardStyle.borderRadius,cursorColor:cardStyle==null?void 0:cardStyle.cursorColor,fontSize:cardStyle==null?void 0:cardStyle.fontSize,placeholderColor:cardStyle==null?void 0:cardStyle.placeholderColor,textColor:cardStyle==null?void 0:cardStyle.textColor,textErrorColor:cardStyle==null?void 0:cardStyle.textErrorColor,fontFamily:cardStyle==null?void 0:cardStyle.fontFamily},placeholders:{number:placeholders==null?void 0:placeholders.number,expiration:placeholders==null?void 0:placeholders.expiration,cvc:placeholders==null?void 0:placeholders.cvc,postalCode:placeholders==null?void 0:placeholders.postalCode}},props));});
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.CardField=void 0;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireWildcard(require("react"));var _helpers=require("../helpers");var _NativeCardField=_interopRequireWildcard(require("../specs/NativeCardField"));var _jsxRuntime=require("react/jsx-runtime");var _excluded=["onCardChange","onFocus","onBlur","cardStyle","placeholders","autofocus","postalCodeEnabled","disabled","dangerouslyGetFullCardDetails"];var _this=this,_jsxFileName="/Users/davidestes/stripe/stripe-react-native/src/components/CardField.tsx";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&{}.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}var CardField=exports.CardField=(0,_react.forwardRef)(function(_ref,ref){var onCardChange=_ref.onCardChange,onFocus=_ref.onFocus,onBlur=_ref.onBlur,cardStyle=_ref.cardStyle,placeholders=_ref.placeholders,autofocus=_ref.autofocus,postalCodeEnabled=_ref.postalCodeEnabled,disabled=_ref.disabled,dangerouslyGetFullCardDetails=_ref.dangerouslyGetFullCardDetails,props=(0,_objectWithoutProperties2.default)(_ref,_excluded);var inputRef=(0,_react.useRef)(null);var onCardChangeHandler=(0,_react.useCallback)(function(event){var card=event.nativeEvent.card;var data={last4:card.last4,expiryMonth:card.expiryMonth,expiryYear:card.expiryYear,complete:card.complete,brand:card.brand,validExpiryDate:card.validExpiryDate,validNumber:card.validNumber,validCVC:card.validCVC};if(card.hasOwnProperty('postalCode')){data.postalCode=card.postalCode||'';}if(card.hasOwnProperty('number')||card.hasOwnProperty('cvc')){data.number=card.number||'';data.cvc=card.cvc||'';if(__DEV__&&onCardChange&&card.complete){console.warn(`[stripe-react-native] ⚠️ WARNING: You've enabled \`dangerouslyGetFullCardDetails\`, meaning full card details are being returned. Only do this if you're certain that you fulfill the necessary PCI compliance requirements. Make sure that you're not mistakenly logging or storing full card details! See the docs for details: https://stripe.com/docs/security/guide#validating-pci-compliance`);}}onCardChange==null||onCardChange(data);},[onCardChange]);var onFocusHandler=(0,_react.useCallback)(function(event){var focusedField=event.nativeEvent.focusedField;if(focusedField){(0,_helpers.focusInput)(inputRef.current);onFocus==null||onFocus(focusedField);}else{onBlur==null||onBlur();}},[onFocus,onBlur]);var focus=function focus(){_NativeCardField.Commands.focus(inputRef.current);};var blur=function blur(){_NativeCardField.Commands.blur(inputRef.current);};var clear=function clear(){_NativeCardField.Commands.clear(inputRef.current);};(0,_react.useImperativeHandle)(ref,function(){return{focus:focus,blur:blur,clear:clear};});(0,_react.useLayoutEffect)(function(){var inputRefValue=inputRef.current;if(inputRefValue!==null){(0,_helpers.registerInput)(inputRefValue);return function(){(0,_helpers.unregisterInput)(inputRefValue);if((0,_helpers.currentlyFocusedInput)()===inputRefValue){inputRefValue.blur();}};}return function(){};},[inputRef]);return(0,_jsxRuntime.jsx)(_NativeCardField.default,Object.assign({ref:inputRef,onCardChange:onCardChangeHandler,onFocusChange:onFocusHandler,cardStyle:{backgroundColor:cardStyle==null?void 0:cardStyle.backgroundColor,borderColor:cardStyle==null?void 0:cardStyle.borderColor,borderWidth:cardStyle==null?void 0:cardStyle.borderWidth,borderRadius:cardStyle==null?void 0:cardStyle.borderRadius,cursorColor:cardStyle==null?void 0:cardStyle.cursorColor,fontSize:cardStyle==null?void 0:cardStyle.fontSize,placeholderColor:cardStyle==null?void 0:cardStyle.placeholderColor,textColor:cardStyle==null?void 0:cardStyle.textColor,textErrorColor:cardStyle==null?void 0:cardStyle.textErrorColor,fontFamily:cardStyle==null?void 0:cardStyle.fontFamily},placeholders:{number:placeholders==null?void 0:placeholders.number,expiration:placeholders==null?void 0:placeholders.expiration,cvc:placeholders==null?void 0:placeholders.cvc,postalCode:placeholders==null?void 0:placeholders.postalCode},autofocus:autofocus!=null?autofocus:false,postalCodeEnabled:postalCodeEnabled!=null?postalCodeEnabled:true,disabled:disabled!=null?disabled:false,dangerouslyGetFullCardDetails:dangerouslyGetFullCardDetails!=null?dangerouslyGetFullCardDetails:false},props));});
2
2
  //# sourceMappingURL=CardField.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_helpers","_jsxRuntime","_excluded","_this","_jsxFileName","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","CardFieldNative","requireNativeComponent","CardField","exports","forwardRef","_ref","ref","onCardChange","onFocus","onBlur","cardStyle","placeholders","postalCodeEnabled","countryCode","props","_objectWithoutProperties2","inputRef","useRef","onCardChangeHandler","useCallback","event","card","nativeEvent","data","last4","expiryMonth","expiryYear","complete","brand","validExpiryDate","validNumber","validCVC","postalCode","number","cvc","__DEV__","console","warn","onFocusHandler","focusedField","focusInput","current","focus","UIManager","dispatchViewManagerCommand","findNodeHandle","blur","clear","useImperativeHandle","useLayoutEffect","inputRefValue","registerInput","unregisterInput","currentlyFocusedInput","jsx","assign","onFocusChange","backgroundColor","borderColor","borderWidth","borderRadius","cursorColor","fontSize","placeholderColor","textColor","textErrorColor","fontFamily","expiration"],"sourceRoot":"../../../src","sources":["components/CardField.tsx"],"mappings":"qRACA,IAAAA,MAAA,CAAAC,uBAAA,CAAAC,OAAA,WAOA,IAAAC,YAAA,CAAAD,OAAA,iBASA,IAAAE,QAAA,CAAAF,OAAA,eAKoB,IAAAG,WAAA,CAAAH,OAAA,0BAAAI,SAAA,sGAAAC,KAAA,MAAAC,YAAA,yFAAAC,yBAAAC,CAAA,wBAAAC,OAAA,iBAAAC,CAAA,KAAAD,OAAA,GAAAE,CAAA,KAAAF,OAAA,UAAAF,wBAAA,UAAAA,yBAAAC,CAAA,SAAAA,CAAA,CAAAG,CAAA,CAAAD,CAAA,IAAAF,CAAA,YAAAT,wBAAAS,CAAA,CAA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M,CAC5BkC,UAAU,CAAExD,YAAY,cAAZA,YAAY,CAAEwD,UAAU,CACpCjC,GAAG,CAAEvB,YAAY,cAAZA,YAAY,CAAEuB,GAAG,CACtBF,UAAU,CAAErB,YAAY,cAAZA,YAAY,CAAEqB,UAC5B,CAAE,EACElB,KAAK,CACV,CAAC,CAEN,CACF,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_helpers","_NativeCardField","_jsxRuntime","_excluded","_this","_jsxFileName","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","CardField","exports","forwardRef","_ref","ref","onCardChange","onFocus","onBlur","cardStyle","placeholders","autofocus","postalCodeEnabled","disabled","dangerouslyGetFullCardDetails","props","_objectWithoutProperties2","inputRef","useRef","onCardChangeHandler","useCallback","event","card","nativeEvent","data","last4","expiryMonth","expiryYear","complete","brand","validExpiryDate","validNumber","validCVC","postalCode","number","cvc","__DEV__","console","warn","onFocusHandler","focusedField","focusInput","current","focus","Commands","blur","clear","useImperativeHandle","useLayoutEffect","inputRefValue","registerInput","unregisterInput","currentlyFocusedInput","jsx","assign","onFocusChange","backgroundColor","borderColor","borderWidth","borderRadius","cursorColor","fontSize","placeholderColor","textColor","textErrorColor","fontFamily","expiration"],"sourceRoot":"../../../src","sources":["components/CardField.tsx"],"mappings":"qRAAA,IAAAA,MAAA,CAAAC,uBAAA,CAAAC,OAAA,WAaA,IAAAC,QAAA,CAAAD,OAAA,eAMA,IAAAE,gBAAA,CAAAH,uBAAA,CAAAC,OAAA,8BAGkC,IAAAG,WAAA,CAAAH,OAAA,0BAAAI,SAAA,+IAAAC,KAAA,MAAAC,YAAA,sFAAAC,yBAAAC,CAAA,wBAAAC,OAAA,iBAAAC,CAAA,KAAAD,OAAA,GAAAE,CAAA,KAAAF,OAAA,UAAAF,wBAAA,UAAAA,yBAAAC,CAAA,SAAAA,CAAA,CAAAG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AY,CAAEuB,UAC5B,CAAE,CACFtB,SAAS,CAAEA,SAAS,OAATA,SAAS,CAAI,KAAM,CAC9BC,iBAAiB,CAAEA,iBAAiB,OAAjBA,iBAAiB,CAAI,IAAK,CAC7CC,QAAQ,CAAEA,QAAQ,OAARA,QAAQ,CAAI,KAAM,CAC5BC,6BAA6B,CAAEA,6BAA6B,OAA7BA,6BAA6B,CAAI,KAAM,EAClEC,KAAK,CACV,CAAC,CAEN,CACF,CAAC","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.CardForm=void 0;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _helpers=require("../helpers");var _jsxRuntime=require("react/jsx-runtime");var _excluded=["onFormComplete","cardStyle","placeholders","defaultValues"];var _this=this,_jsxFileName="/Users/charliecruzan/stripe/stripe-react-native/src/components/CardForm.tsx";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&{}.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}var CardFormNative=(0,_reactNative.requireNativeComponent)('CardForm');var CardForm=exports.CardForm=(0,_react.forwardRef)(function(_ref,ref){var onFormComplete=_ref.onFormComplete,cardStyle=_ref.cardStyle,placeholders=_ref.placeholders,defaultValues=_ref.defaultValues,props=(0,_objectWithoutProperties2.default)(_ref,_excluded);var inputRef=(0,_react.useRef)(null);var onFormCompleteHandler=(0,_react.useCallback)(function(event){var card=event.nativeEvent;var data={last4:card.last4,expiryMonth:card.expiryMonth,expiryYear:card.expiryYear,complete:card.complete,brand:card.brand,country:card.country,postalCode:card.postalCode};if(card.hasOwnProperty('number')||card.hasOwnProperty('cvc')){data.number=card.number||'';data.cvc=card.cvc||'';if(__DEV__&&onFormComplete&&card.complete){console.warn(`[stripe-react-native] ⚠️ WARNING: You've enabled \`dangerouslyGetFullCardDetails\`, meaning full card details are being returned. Only do this if you're certain that you fulfill the necessary PCI compliance requirements. Make sure that you're not mistakenly logging or storing full card details! See the docs for details: https://stripe.com/docs/security/guide#validating-pci-compliance`);}}onFormComplete==null||onFormComplete(data);},[onFormComplete]);var focus=function focus(){_reactNative.UIManager.dispatchViewManagerCommand((0,_reactNative.findNodeHandle)(inputRef.current),'focus',[]);};var blur=function blur(){_reactNative.UIManager.dispatchViewManagerCommand((0,_reactNative.findNodeHandle)(inputRef.current),'blur',[]);};(0,_react.useImperativeHandle)(ref,function(){return{focus:focus,blur:blur};});var onFocusHandler=(0,_react.useCallback)(function(event){var focusedField=event.nativeEvent.focusedField;if(focusedField){(0,_helpers.focusInput)(inputRef.current);}else{}},[]);(0,_react.useLayoutEffect)(function(){var inputRefValue=inputRef.current;if(inputRefValue!==null){(0,_helpers.registerInput)(inputRefValue);return function(){(0,_helpers.unregisterInput)(inputRefValue);if((0,_helpers.currentlyFocusedInput)()===inputRefValue){inputRefValue.blur();}};}return function(){};},[inputRef]);return(0,_jsxRuntime.jsx)(CardFormNative,Object.assign({ref:inputRef,onFormComplete:onFormCompleteHandler,cardStyle:{backgroundColor:cardStyle==null?void 0:cardStyle.backgroundColor,borderColor:cardStyle==null?void 0:cardStyle.borderColor,borderWidth:cardStyle==null?void 0:cardStyle.borderWidth,borderRadius:cardStyle==null?void 0:cardStyle.borderRadius,cursorColor:cardStyle==null?void 0:cardStyle.cursorColor,fontSize:cardStyle==null?void 0:cardStyle.fontSize,placeholderColor:cardStyle==null?void 0:cardStyle.placeholderColor,textColor:cardStyle==null?void 0:cardStyle.textColor,textErrorColor:cardStyle==null?void 0:cardStyle.textErrorColor,fontFamily:cardStyle==null?void 0:cardStyle.fontFamily},placeholders:{number:placeholders==null?void 0:placeholders.number,expiration:placeholders==null?void 0:placeholders.expiration,cvc:placeholders==null?void 0:placeholders.cvc,postalCode:placeholders==null?void 0:placeholders.postalCode},defaultValues:Object.assign({},defaultValues!=null?defaultValues:{}),onFocusChange:onFocusHandler},props));});
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.CardForm=void 0;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireWildcard(require("react"));var _NativeCardForm=_interopRequireWildcard(require("../specs/NativeCardForm"));var _helpers=require("../helpers");var _jsxRuntime=require("react/jsx-runtime");var _excluded=["onFormComplete","cardStyle","placeholders","defaultValues","autofocus","dangerouslyGetFullCardDetails","disabled"];var _this=this,_jsxFileName="/Users/davidestes/stripe/stripe-react-native/src/components/CardForm.tsx";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&{}.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}var CardForm=exports.CardForm=(0,_react.forwardRef)(function(_ref,ref){var onFormComplete=_ref.onFormComplete,cardStyle=_ref.cardStyle,placeholders=_ref.placeholders,defaultValues=_ref.defaultValues,autofocus=_ref.autofocus,dangerouslyGetFullCardDetails=_ref.dangerouslyGetFullCardDetails,disabled=_ref.disabled,props=(0,_objectWithoutProperties2.default)(_ref,_excluded);var inputRef=(0,_react.useRef)(null);var onFormCompleteHandler=(0,_react.useCallback)(function(event){var card=event.nativeEvent.card;var data={last4:card.last4,expiryMonth:card.expiryMonth,expiryYear:card.expiryYear,complete:card.complete,brand:card.brand,country:card.country,postalCode:card.postalCode};if(card.hasOwnProperty('number')||card.hasOwnProperty('cvc')){data.number=card.number||'';data.cvc=card.cvc||'';if(__DEV__&&onFormComplete&&card.complete){console.warn(`[stripe-react-native] ⚠️ WARNING: You've enabled \`dangerouslyGetFullCardDetails\`, meaning full card details are being returned. Only do this if you're certain that you fulfill the necessary PCI compliance requirements. Make sure that you're not mistakenly logging or storing full card details! See the docs for details: https://stripe.com/docs/security/guide#validating-pci-compliance`);}}onFormComplete==null||onFormComplete(data);},[onFormComplete]);var focus=function focus(){_NativeCardForm.Commands.focus(inputRef.current);};var blur=function blur(){_NativeCardForm.Commands.blur(inputRef.current);};(0,_react.useImperativeHandle)(ref,function(){return{focus:focus,blur:blur};});var onFocusHandler=(0,_react.useCallback)(function(event){var focusedField=event.nativeEvent.focusedField;if(focusedField){(0,_helpers.focusInput)(inputRef.current);}},[]);(0,_react.useLayoutEffect)(function(){var inputRefValue=inputRef.current;if(inputRefValue!==null){(0,_helpers.registerInput)(inputRefValue);return function(){(0,_helpers.unregisterInput)(inputRefValue);if((0,_helpers.currentlyFocusedInput)()===inputRefValue){inputRefValue.blur();}};}return function(){};},[inputRef]);return(0,_jsxRuntime.jsx)(_NativeCardForm.default,Object.assign({ref:inputRef,onFormComplete:onFormCompleteHandler,cardStyle:{backgroundColor:cardStyle==null?void 0:cardStyle.backgroundColor,borderColor:cardStyle==null?void 0:cardStyle.borderColor,borderWidth:cardStyle==null?void 0:cardStyle.borderWidth,borderRadius:cardStyle==null?void 0:cardStyle.borderRadius,cursorColor:cardStyle==null?void 0:cardStyle.cursorColor,fontSize:cardStyle==null?void 0:cardStyle.fontSize,placeholderColor:cardStyle==null?void 0:cardStyle.placeholderColor,textColor:cardStyle==null?void 0:cardStyle.textColor,textErrorColor:cardStyle==null?void 0:cardStyle.textErrorColor,fontFamily:cardStyle==null?void 0:cardStyle.fontFamily},placeholders:{number:placeholders==null?void 0:placeholders.number,expiration:placeholders==null?void 0:placeholders.expiration,cvc:placeholders==null?void 0:placeholders.cvc,postalCode:placeholders==null?void 0:placeholders.postalCode},defaultValues:Object.assign({},defaultValues!=null?defaultValues:{}),onFocusChange:onFocusHandler,autofocus:autofocus!=null?autofocus:false,dangerouslyGetFullCardDetails:dangerouslyGetFullCardDetails!=null?dangerouslyGetFullCardDetails:false,disabled:disabled!=null?disabled:false,postalCodeEnabled:true},props));});
2
2
  //# sourceMappingURL=CardForm.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_helpers","_jsxRuntime","_excluded","_this","_jsxFileName","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","CardFormNative","requireNativeComponent","CardForm","exports","forwardRef","_ref","ref","onFormComplete","cardStyle","placeholders","defaultValues","props","_objectWithoutProperties2","inputRef","useRef","onFormCompleteHandler","useCallback","event","card","nativeEvent","data","last4","expiryMonth","expiryYear","complete","brand","country","postalCode","number","cvc","__DEV__","console","warn","focus","UIManager","dispatchViewManagerCommand","findNodeHandle","current","blur","useImperativeHandle","onFocusHandler","focusedField","focusInput","useLayoutEffect","inputRefValue","registerInput","unregisterInput","currentlyFocusedInput","jsx","assign","backgroundColor","borderColor","borderWidth","borderRadius","cursorColor","fontSize","placeholderColor","textColor","textErrorColor","fontFamily","expiration","onFocusChange"],"sourceRoot":"../../../src","sources":["components/CardForm.tsx"],"m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{"version":3,"names":["_react","_interopRequireWildcard","require","_NativeCardForm","_helpers","_jsxRuntime","_excluded","_this","_jsxFileName","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","CardForm","exports","forwardRef","_ref","ref","onFormComplete","cardStyle","placeholders","defaultValues","autofocus","dangerouslyGetFullCardDetails","disabled","props","_objectWithoutProperties2","inputRef","useRef","onFormCompleteHandler","useCallback","event","card","nativeEvent","data","last4","expiryMonth","expiryYear","complete","brand","country","postalCode","number","cvc","__DEV__","console","warn","focus","Commands","current","blur","useImperativeHandle","onFocusHandler","focusedField","focusInput","useLayoutEffect","inputRefValue","registerInput","unregisterInput","currentlyFocusedInput","jsx","assign","backgroundColor","borderColor","borderWidth","borderRadius","cursorColor","fontSize","placeholderColor","textColor","textErrorColor","fontFamily","expiration","onFocusChange","postalCodeEnabled"],"sourceRoot":"../../../src","sources":["components/CardForm.tsx"],"mappings":"oRAAA,IAAAA,MAAA,CAAAC,uBAAA,CAAAC,OAAA,WAaA,IAAAC,eAAA,CAAAF,uBAAA,CAAAC,OAAA,6BACA,IAAAE,QAAA,CAAAF,OAAA,eAKoB,IAAAG,WAAA,CAAAH,OAAA,0BAAAI,SAAA,0HAAAC,KAAA,MAAAC,YAAA,qFAAAC,yBAAAC,CAAA,wBAAAC,OAAA,iBAAAC,CAAA,KAAAD,OAAA,GAAAE,CAAA,KAAAF,OAAA,UAAAF,wBAAA,UAAAA,yBAAAC,CAAA,SAAAA,CAAA,CAAAG,CAAA,CAAAD,CAAA,IAAAF,CAAA,YAAAT,wBAAAS,CAAA,CAAAE,CAAA,MAAAA,CAAA,EAAAF,CAAA,EAAAA,CAAA,CAAAI,UAAA,QAAAJ,CAAA,WAAAA,CAAA,mBAAAA,CAAA,qBAAAA,CAAA,QAAAK,OAAA,CAAAL,CAAA,MAAAG,CAAA,CAAAJ,wBAAA,CAAAG,CAAA,KAAAC,CAA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