stripe-pwa-elements 3.0.0-0 → 3.0.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 (1568) hide show
  1. package/dist/cjs/app-globals-V2Kpy_OQ.js +8 -0
  2. package/dist/cjs/app-globals-V2Kpy_OQ.js.map +1 -0
  3. package/dist/cjs/index-BmB5d_Yj.js +194 -0
  4. package/dist/cjs/index-BmB5d_Yj.js.map +1 -0
  5. package/dist/cjs/index-CQkz7IJv.js +1904 -0
  6. package/dist/cjs/index-CQkz7IJv.js.map +1 -0
  7. package/dist/cjs/index.cjs.js +1 -2
  8. package/dist/cjs/index.cjs.js.map +1 -1
  9. package/dist/cjs/ion-icon.cjs.entry.js +339 -252
  10. package/dist/cjs/ion-icon.entry.cjs.js.map +1 -0
  11. package/dist/cjs/loader.cjs.js +7 -17
  12. package/dist/cjs/loader.cjs.js.map +1 -1
  13. package/dist/cjs/stripe-card-element-modal.cjs.entry.js +111 -0
  14. package/dist/cjs/stripe-card-element-modal.entry.cjs.js.map +1 -0
  15. package/dist/cjs/stripe-card-element.stripe-modal.entry.cjs.js.map +1 -0
  16. package/dist/cjs/stripe-card-element_2.cjs.entry.js +3677 -0
  17. package/dist/cjs/stripe-elements.cjs.js +16 -18
  18. package/dist/cjs/stripe-elements.cjs.js.map +1 -1
  19. package/dist/cjs/stripe-payment-request-button.cjs.entry.js +170 -162
  20. package/dist/cjs/stripe-payment-request-button.entry.cjs.js.map +1 -0
  21. package/dist/collection/collection-manifest.json +6 -6
  22. package/dist/collection/components/{stripe-payment-sheet/stripe-payment-sheet.css → stripe-card-element/stripe-card-element.css} +6 -4
  23. package/dist/collection/components/stripe-card-element/stripe-card-element.js +878 -0
  24. package/dist/collection/components/stripe-card-element/stripe-card-element.js.map +1 -0
  25. package/dist/collection/components/stripe-card-element-modal/stripe-card-element-modal.js +547 -0
  26. package/dist/collection/components/stripe-card-element-modal/stripe-card-element-modal.js.map +1 -0
  27. package/dist/collection/components/stripe-modal/stripe-modal.js +177 -0
  28. package/dist/collection/components/stripe-modal/stripe-modal.js.map +1 -0
  29. package/dist/collection/components/stripe-payment-request-button/stripe-payment-request-button.js +539 -500
  30. package/dist/collection/components/stripe-payment-request-button/stripe-payment-request-button.js.map +1 -1
  31. package/dist/collection/index.js +1 -1
  32. package/dist/collection/interfaces.js.map +1 -1
  33. package/dist/collection/services/card-element-manager.js +147 -0
  34. package/dist/collection/services/card-element-manager.js.map +1 -0
  35. package/dist/collection/services/factory.js +28 -0
  36. package/dist/collection/services/factory.js.map +1 -0
  37. package/dist/collection/services/interfaces.js +2 -0
  38. package/dist/collection/services/interfaces.js.map +1 -0
  39. package/dist/collection/services/stripe-service.js +118 -0
  40. package/dist/collection/services/stripe-service.js.map +1 -0
  41. package/dist/collection/utils/error.js +12 -0
  42. package/dist/collection/utils/error.js.map +1 -0
  43. package/dist/collection/utils/i18n.js +40 -40
  44. package/dist/collection/utils/i18n.js.map +1 -1
  45. package/dist/collection/utils/platform.js +51 -51
  46. package/dist/collection/utils/platform.js.map +1 -1
  47. package/dist/collection/utils/utils.js +22 -22
  48. package/dist/collection/utils/utils.js.map +1 -1
  49. package/dist/components/icon.js +375 -276
  50. package/dist/components/icon.js.map +1 -1
  51. package/dist/components/index.d.ts +6 -0
  52. package/dist/components/index.js +2 -1
  53. package/dist/components/ion-icon.js +1 -0
  54. package/dist/components/stripe-card-element-modal.d.ts +11 -0
  55. package/dist/components/stripe-card-element-modal.js +174 -0
  56. package/dist/components/stripe-card-element-modal.js.map +1 -0
  57. package/dist/components/{stripe-payment.d.ts → stripe-card-element.d.ts} +4 -4
  58. package/dist/components/stripe-card-element.js +9 -0
  59. package/dist/components/stripe-card-element.js.map +1 -0
  60. package/dist/components/stripe-card-element2.js +3586 -0
  61. package/dist/components/stripe-card-element2.js.map +1 -0
  62. package/dist/components/{stripe-sheet.d.ts → stripe-modal.d.ts} +4 -4
  63. package/dist/components/stripe-modal.js +9 -0
  64. package/dist/components/stripe-modal.js.map +1 -0
  65. package/dist/components/stripe-modal2.js +87 -0
  66. package/dist/components/stripe-modal2.js.map +1 -0
  67. package/dist/components/stripe-payment-request-button.d.ts +2 -2
  68. package/dist/components/stripe-payment-request-button.js +1 -0
  69. package/dist/components/stripe-payment-request-button2.js +299 -225
  70. package/dist/components/stripe-payment-request-button2.js.map +1 -1
  71. package/dist/components/utils.js +54 -70
  72. package/dist/components/utils.js.map +1 -1
  73. package/dist/esm/app-globals-DQuL1Twl.js +6 -0
  74. package/dist/esm/app-globals-DQuL1Twl.js.map +1 -0
  75. package/dist/esm/index-C5QyifTT.js +192 -0
  76. package/dist/esm/index-C5QyifTT.js.map +1 -0
  77. package/dist/esm/index-DB2hiILr.js +1892 -0
  78. package/dist/esm/index-DB2hiILr.js.map +1 -0
  79. package/dist/esm/index.js +1 -2
  80. package/dist/esm/index.js.map +1 -1
  81. package/dist/esm/ion-icon.entry.js +339 -250
  82. package/dist/esm/ion-icon.entry.js.map +1 -1
  83. package/dist/esm/loader.js +9 -17
  84. package/dist/esm/loader.js.map +1 -1
  85. package/dist/esm/stripe-card-element-modal.entry.js +109 -0
  86. package/dist/esm/stripe-card-element-modal.entry.js.map +1 -0
  87. package/dist/esm/stripe-card-element.stripe-modal.entry.js.map +1 -0
  88. package/dist/esm/stripe-card-element_2.entry.js +3674 -0
  89. package/dist/esm/stripe-elements.js +16 -17
  90. package/dist/esm/stripe-elements.js.map +1 -1
  91. package/dist/esm/stripe-payment-request-button.entry.js +170 -160
  92. package/dist/esm/stripe-payment-request-button.entry.js.map +1 -1
  93. package/dist/stripe-elements/index.esm.js.map +1 -1
  94. package/dist/stripe-elements/ion-icon.entry.esm.js.map +1 -0
  95. package/dist/stripe-elements/loader.esm.js.map +1 -0
  96. package/dist/stripe-elements/p-263cf51d.entry.js +2 -0
  97. package/dist/stripe-elements/p-263cf51d.entry.js.map +1 -0
  98. package/dist/stripe-elements/p-5beb3870.entry.js +2 -0
  99. package/dist/stripe-elements/p-5beb3870.entry.js.map +1 -0
  100. package/dist/stripe-elements/p-C5QyifTT.js +2 -0
  101. package/dist/stripe-elements/p-C5QyifTT.js.map +1 -0
  102. package/dist/stripe-elements/p-DB2hiILr.js +3 -0
  103. package/dist/stripe-elements/p-DB2hiILr.js.map +1 -0
  104. package/dist/stripe-elements/p-DQuL1Twl.js +2 -0
  105. package/dist/stripe-elements/p-DQuL1Twl.js.map +1 -0
  106. package/dist/stripe-elements/p-b598431f.entry.js +2 -0
  107. package/dist/stripe-elements/p-b598431f.entry.js.map +1 -0
  108. package/dist/stripe-elements/p-bb923a08.entry.js +2 -0
  109. package/dist/stripe-elements/p-bb923a08.entry.js.map +1 -0
  110. package/dist/stripe-elements/stripe-card-element-modal.entry.esm.js.map +1 -0
  111. package/dist/stripe-elements/stripe-card-element.stripe-modal.entry.esm.js.map +1 -0
  112. package/dist/stripe-elements/stripe-elements.esm.js +1 -1
  113. package/dist/stripe-elements/stripe-elements.esm.js.map +1 -1
  114. package/dist/stripe-elements/stripe-payment-request-button.entry.esm.js.map +1 -0
  115. package/dist/stripe-elements/svg/accessibility-outline.svg +1 -1
  116. package/dist/stripe-elements/svg/accessibility-sharp.svg +1 -1
  117. package/dist/stripe-elements/svg/accessibility.svg +1 -1
  118. package/dist/stripe-elements/svg/add-circle-outline.svg +1 -1
  119. package/dist/stripe-elements/svg/add-circle-sharp.svg +1 -1
  120. package/dist/stripe-elements/svg/add-circle.svg +1 -1
  121. package/dist/stripe-elements/svg/add-outline.svg +1 -1
  122. package/dist/stripe-elements/svg/add-sharp.svg +1 -1
  123. package/dist/stripe-elements/svg/add.svg +1 -1
  124. package/dist/stripe-elements/svg/airplane-outline.svg +1 -1
  125. package/dist/stripe-elements/svg/airplane-sharp.svg +1 -1
  126. package/dist/stripe-elements/svg/airplane.svg +1 -1
  127. package/dist/stripe-elements/svg/alarm-outline.svg +1 -1
  128. package/dist/stripe-elements/svg/alarm-sharp.svg +1 -1
  129. package/dist/stripe-elements/svg/alarm.svg +1 -1
  130. package/dist/stripe-elements/svg/albums-outline.svg +1 -1
  131. package/dist/stripe-elements/svg/albums-sharp.svg +1 -1
  132. package/dist/stripe-elements/svg/albums.svg +1 -1
  133. package/dist/stripe-elements/svg/alert-circle-outline.svg +1 -1
  134. package/dist/stripe-elements/svg/alert-circle-sharp.svg +1 -1
  135. package/dist/stripe-elements/svg/alert-circle.svg +1 -1
  136. package/dist/stripe-elements/svg/alert-outline.svg +1 -1
  137. package/dist/stripe-elements/svg/alert-sharp.svg +1 -1
  138. package/dist/stripe-elements/svg/alert.svg +1 -1
  139. package/dist/stripe-elements/svg/american-football-outline.svg +1 -1
  140. package/dist/stripe-elements/svg/american-football-sharp.svg +1 -1
  141. package/dist/stripe-elements/svg/american-football.svg +1 -1
  142. package/dist/stripe-elements/svg/analytics-outline.svg +1 -1
  143. package/dist/stripe-elements/svg/analytics-sharp.svg +1 -1
  144. package/dist/stripe-elements/svg/analytics.svg +1 -1
  145. package/dist/stripe-elements/svg/aperture-outline.svg +1 -1
  146. package/dist/stripe-elements/svg/aperture-sharp.svg +1 -1
  147. package/dist/stripe-elements/svg/aperture.svg +1 -1
  148. package/dist/stripe-elements/svg/apps-outline.svg +1 -1
  149. package/dist/stripe-elements/svg/apps-sharp.svg +1 -1
  150. package/dist/stripe-elements/svg/apps.svg +1 -1
  151. package/dist/stripe-elements/svg/archive-outline.svg +1 -1
  152. package/dist/stripe-elements/svg/archive-sharp.svg +1 -1
  153. package/dist/stripe-elements/svg/archive.svg +1 -1
  154. package/dist/stripe-elements/svg/arrow-back-circle-outline.svg +1 -1
  155. package/dist/stripe-elements/svg/arrow-back-circle-sharp.svg +1 -1
  156. package/dist/stripe-elements/svg/arrow-back-circle.svg +1 -1
  157. package/dist/stripe-elements/svg/arrow-back-outline.svg +1 -1
  158. package/dist/stripe-elements/svg/arrow-back-sharp.svg +1 -1
  159. package/dist/stripe-elements/svg/arrow-back.svg +1 -1
  160. package/dist/stripe-elements/svg/arrow-down-circle-outline.svg +1 -1
  161. package/dist/stripe-elements/svg/arrow-down-circle-sharp.svg +1 -1
  162. package/dist/stripe-elements/svg/arrow-down-circle.svg +1 -1
  163. package/dist/stripe-elements/svg/arrow-down-left-box-outline.svg +1 -0
  164. package/dist/stripe-elements/svg/arrow-down-left-box-sharp.svg +1 -0
  165. package/dist/stripe-elements/svg/arrow-down-left-box.svg +1 -0
  166. package/dist/stripe-elements/svg/arrow-down-outline.svg +1 -1
  167. package/dist/stripe-elements/svg/arrow-down-right-box-outline.svg +1 -0
  168. package/dist/stripe-elements/svg/arrow-down-right-box-sharp.svg +1 -0
  169. package/dist/stripe-elements/svg/arrow-down-right-box.svg +1 -0
  170. package/dist/stripe-elements/svg/arrow-down-sharp.svg +1 -1
  171. package/dist/stripe-elements/svg/arrow-down.svg +1 -1
  172. package/dist/stripe-elements/svg/arrow-forward-circle-outline.svg +1 -1
  173. package/dist/stripe-elements/svg/arrow-forward-circle-sharp.svg +1 -1
  174. package/dist/stripe-elements/svg/arrow-forward-circle.svg +1 -1
  175. package/dist/stripe-elements/svg/arrow-forward-outline.svg +1 -1
  176. package/dist/stripe-elements/svg/arrow-forward-sharp.svg +1 -1
  177. package/dist/stripe-elements/svg/arrow-forward.svg +1 -1
  178. package/dist/stripe-elements/svg/arrow-redo-circle-outline.svg +1 -1
  179. package/dist/stripe-elements/svg/arrow-redo-circle-sharp.svg +1 -1
  180. package/dist/stripe-elements/svg/arrow-redo-circle.svg +1 -1
  181. package/dist/stripe-elements/svg/arrow-redo-outline.svg +1 -1
  182. package/dist/stripe-elements/svg/arrow-redo-sharp.svg +1 -1
  183. package/dist/stripe-elements/svg/arrow-redo.svg +1 -1
  184. package/dist/stripe-elements/svg/arrow-undo-circle-outline.svg +1 -1
  185. package/dist/stripe-elements/svg/arrow-undo-circle-sharp.svg +1 -1
  186. package/dist/stripe-elements/svg/arrow-undo-circle.svg +1 -1
  187. package/dist/stripe-elements/svg/arrow-undo-outline.svg +1 -1
  188. package/dist/stripe-elements/svg/arrow-undo-sharp.svg +1 -1
  189. package/dist/stripe-elements/svg/arrow-undo.svg +1 -1
  190. package/dist/stripe-elements/svg/arrow-up-circle-outline.svg +1 -1
  191. package/dist/stripe-elements/svg/arrow-up-circle-sharp.svg +1 -1
  192. package/dist/stripe-elements/svg/arrow-up-circle.svg +1 -1
  193. package/dist/stripe-elements/svg/arrow-up-left-box-outline.svg +1 -0
  194. package/dist/stripe-elements/svg/arrow-up-left-box-sharp.svg +1 -0
  195. package/dist/stripe-elements/svg/arrow-up-left-box.svg +1 -0
  196. package/dist/stripe-elements/svg/arrow-up-outline.svg +1 -1
  197. package/dist/stripe-elements/svg/arrow-up-right-box-outline.svg +1 -0
  198. package/dist/stripe-elements/svg/arrow-up-right-box-sharp.svg +1 -0
  199. package/dist/stripe-elements/svg/arrow-up-right-box.svg +1 -0
  200. package/dist/stripe-elements/svg/arrow-up-sharp.svg +1 -1
  201. package/dist/stripe-elements/svg/arrow-up.svg +1 -1
  202. package/dist/stripe-elements/svg/at-circle-outline.svg +1 -1
  203. package/dist/stripe-elements/svg/at-circle-sharp.svg +1 -1
  204. package/dist/stripe-elements/svg/at-circle.svg +1 -1
  205. package/dist/stripe-elements/svg/at-outline.svg +1 -1
  206. package/dist/stripe-elements/svg/at-sharp.svg +1 -1
  207. package/dist/stripe-elements/svg/at.svg +1 -1
  208. package/dist/stripe-elements/svg/attach-outline.svg +1 -1
  209. package/dist/stripe-elements/svg/attach-sharp.svg +1 -1
  210. package/dist/stripe-elements/svg/attach.svg +1 -1
  211. package/dist/stripe-elements/svg/backspace-outline.svg +1 -1
  212. package/dist/stripe-elements/svg/backspace-sharp.svg +1 -1
  213. package/dist/stripe-elements/svg/backspace.svg +1 -1
  214. package/dist/stripe-elements/svg/bag-add-outline.svg +1 -1
  215. package/dist/stripe-elements/svg/bag-add-sharp.svg +1 -1
  216. package/dist/stripe-elements/svg/bag-add.svg +1 -1
  217. package/dist/stripe-elements/svg/bag-check-outline.svg +1 -1
  218. package/dist/stripe-elements/svg/bag-check-sharp.svg +1 -1
  219. package/dist/stripe-elements/svg/bag-check.svg +1 -1
  220. package/dist/stripe-elements/svg/bag-handle-outline.svg +1 -1
  221. package/dist/stripe-elements/svg/bag-handle-sharp.svg +1 -1
  222. package/dist/stripe-elements/svg/bag-handle.svg +1 -1
  223. package/dist/stripe-elements/svg/bag-outline.svg +1 -1
  224. package/dist/stripe-elements/svg/bag-remove-outline.svg +1 -1
  225. package/dist/stripe-elements/svg/bag-remove-sharp.svg +1 -1
  226. package/dist/stripe-elements/svg/bag-remove.svg +1 -1
  227. package/dist/stripe-elements/svg/bag-sharp.svg +1 -1
  228. package/dist/stripe-elements/svg/bag.svg +1 -1
  229. package/dist/stripe-elements/svg/balloon-outline.svg +1 -1
  230. package/dist/stripe-elements/svg/balloon-sharp.svg +1 -1
  231. package/dist/stripe-elements/svg/balloon.svg +1 -1
  232. package/dist/stripe-elements/svg/ban-outline.svg +1 -1
  233. package/dist/stripe-elements/svg/ban-sharp.svg +1 -1
  234. package/dist/stripe-elements/svg/ban.svg +1 -1
  235. package/dist/stripe-elements/svg/bandage-outline.svg +1 -1
  236. package/dist/stripe-elements/svg/bandage-sharp.svg +1 -1
  237. package/dist/stripe-elements/svg/bandage.svg +1 -1
  238. package/dist/stripe-elements/svg/bar-chart-outline.svg +1 -1
  239. package/dist/stripe-elements/svg/bar-chart-sharp.svg +1 -1
  240. package/dist/stripe-elements/svg/bar-chart.svg +1 -1
  241. package/dist/stripe-elements/svg/barbell-outline.svg +1 -1
  242. package/dist/stripe-elements/svg/barbell-sharp.svg +1 -1
  243. package/dist/stripe-elements/svg/barbell.svg +1 -1
  244. package/dist/stripe-elements/svg/barcode-outline.svg +1 -1
  245. package/dist/stripe-elements/svg/barcode-sharp.svg +1 -1
  246. package/dist/stripe-elements/svg/barcode.svg +1 -1
  247. package/dist/stripe-elements/svg/baseball-outline.svg +1 -1
  248. package/dist/stripe-elements/svg/baseball-sharp.svg +1 -1
  249. package/dist/stripe-elements/svg/baseball.svg +1 -1
  250. package/dist/stripe-elements/svg/basket-outline.svg +1 -1
  251. package/dist/stripe-elements/svg/basket-sharp.svg +1 -1
  252. package/dist/stripe-elements/svg/basket.svg +1 -1
  253. package/dist/stripe-elements/svg/basketball-outline.svg +1 -1
  254. package/dist/stripe-elements/svg/basketball-sharp.svg +1 -1
  255. package/dist/stripe-elements/svg/basketball.svg +1 -1
  256. package/dist/stripe-elements/svg/battery-charging-outline.svg +1 -1
  257. package/dist/stripe-elements/svg/battery-charging-sharp.svg +1 -1
  258. package/dist/stripe-elements/svg/battery-charging.svg +1 -1
  259. package/dist/stripe-elements/svg/battery-dead-outline.svg +1 -1
  260. package/dist/stripe-elements/svg/battery-dead-sharp.svg +1 -1
  261. package/dist/stripe-elements/svg/battery-dead.svg +1 -1
  262. package/dist/stripe-elements/svg/battery-full-outline.svg +1 -1
  263. package/dist/stripe-elements/svg/battery-full-sharp.svg +1 -1
  264. package/dist/stripe-elements/svg/battery-full.svg +1 -1
  265. package/dist/stripe-elements/svg/battery-half-outline.svg +1 -1
  266. package/dist/stripe-elements/svg/battery-half-sharp.svg +1 -1
  267. package/dist/stripe-elements/svg/battery-half.svg +1 -1
  268. package/dist/stripe-elements/svg/beaker-outline.svg +1 -1
  269. package/dist/stripe-elements/svg/beaker-sharp.svg +1 -1
  270. package/dist/stripe-elements/svg/beaker.svg +1 -1
  271. package/dist/stripe-elements/svg/bed-outline.svg +1 -1
  272. package/dist/stripe-elements/svg/bed-sharp.svg +1 -1
  273. package/dist/stripe-elements/svg/bed.svg +1 -1
  274. package/dist/stripe-elements/svg/beer-outline.svg +1 -1
  275. package/dist/stripe-elements/svg/beer-sharp.svg +1 -1
  276. package/dist/stripe-elements/svg/beer.svg +1 -1
  277. package/dist/stripe-elements/svg/bicycle-outline.svg +1 -1
  278. package/dist/stripe-elements/svg/bicycle-sharp.svg +1 -1
  279. package/dist/stripe-elements/svg/bicycle.svg +1 -1
  280. package/dist/stripe-elements/svg/binoculars-outline.svg +1 -0
  281. package/dist/stripe-elements/svg/binoculars-sharp.svg +1 -0
  282. package/dist/stripe-elements/svg/binoculars.svg +1 -0
  283. package/dist/stripe-elements/svg/bluetooth-outline.svg +1 -1
  284. package/dist/stripe-elements/svg/bluetooth-sharp.svg +1 -1
  285. package/dist/stripe-elements/svg/bluetooth.svg +1 -1
  286. package/dist/stripe-elements/svg/boat-outline.svg +1 -1
  287. package/dist/stripe-elements/svg/boat-sharp.svg +1 -1
  288. package/dist/stripe-elements/svg/boat.svg +1 -1
  289. package/dist/stripe-elements/svg/body-outline.svg +1 -1
  290. package/dist/stripe-elements/svg/body-sharp.svg +1 -1
  291. package/dist/stripe-elements/svg/body.svg +1 -1
  292. package/dist/stripe-elements/svg/bonfire-outline.svg +1 -1
  293. package/dist/stripe-elements/svg/bonfire-sharp.svg +1 -1
  294. package/dist/stripe-elements/svg/bonfire.svg +1 -1
  295. package/dist/stripe-elements/svg/book-outline.svg +1 -1
  296. package/dist/stripe-elements/svg/book-sharp.svg +1 -1
  297. package/dist/stripe-elements/svg/book.svg +1 -1
  298. package/dist/stripe-elements/svg/bookmark-outline.svg +1 -1
  299. package/dist/stripe-elements/svg/bookmark-sharp.svg +1 -1
  300. package/dist/stripe-elements/svg/bookmark.svg +1 -1
  301. package/dist/stripe-elements/svg/bookmarks-outline.svg +1 -1
  302. package/dist/stripe-elements/svg/bookmarks-sharp.svg +1 -1
  303. package/dist/stripe-elements/svg/bookmarks.svg +1 -1
  304. package/dist/stripe-elements/svg/bowling-ball-outline.svg +1 -1
  305. package/dist/stripe-elements/svg/bowling-ball-sharp.svg +1 -1
  306. package/dist/stripe-elements/svg/bowling-ball.svg +1 -1
  307. package/dist/stripe-elements/svg/briefcase-outline.svg +1 -1
  308. package/dist/stripe-elements/svg/briefcase-sharp.svg +1 -1
  309. package/dist/stripe-elements/svg/briefcase.svg +1 -1
  310. package/dist/stripe-elements/svg/browsers-outline.svg +1 -1
  311. package/dist/stripe-elements/svg/browsers-sharp.svg +1 -1
  312. package/dist/stripe-elements/svg/browsers.svg +1 -1
  313. package/dist/stripe-elements/svg/brush-outline.svg +1 -1
  314. package/dist/stripe-elements/svg/brush-sharp.svg +1 -1
  315. package/dist/stripe-elements/svg/brush.svg +1 -1
  316. package/dist/stripe-elements/svg/bug-outline.svg +1 -1
  317. package/dist/stripe-elements/svg/bug-sharp.svg +1 -1
  318. package/dist/stripe-elements/svg/bug.svg +1 -1
  319. package/dist/stripe-elements/svg/build-outline.svg +1 -1
  320. package/dist/stripe-elements/svg/build-sharp.svg +1 -1
  321. package/dist/stripe-elements/svg/build.svg +1 -1
  322. package/dist/stripe-elements/svg/bulb-outline.svg +1 -1
  323. package/dist/stripe-elements/svg/bulb-sharp.svg +1 -1
  324. package/dist/stripe-elements/svg/bulb.svg +1 -1
  325. package/dist/stripe-elements/svg/bus-outline.svg +1 -1
  326. package/dist/stripe-elements/svg/bus-sharp.svg +1 -1
  327. package/dist/stripe-elements/svg/bus.svg +1 -1
  328. package/dist/stripe-elements/svg/business-outline.svg +1 -1
  329. package/dist/stripe-elements/svg/business-sharp.svg +1 -1
  330. package/dist/stripe-elements/svg/business.svg +1 -1
  331. package/dist/stripe-elements/svg/cafe-outline.svg +1 -1
  332. package/dist/stripe-elements/svg/cafe-sharp.svg +1 -1
  333. package/dist/stripe-elements/svg/cafe.svg +1 -1
  334. package/dist/stripe-elements/svg/calculator-outline.svg +1 -1
  335. package/dist/stripe-elements/svg/calculator-sharp.svg +1 -1
  336. package/dist/stripe-elements/svg/calculator.svg +1 -1
  337. package/dist/stripe-elements/svg/calendar-clear-outline.svg +1 -1
  338. package/dist/stripe-elements/svg/calendar-clear-sharp.svg +1 -1
  339. package/dist/stripe-elements/svg/calendar-clear.svg +1 -1
  340. package/dist/stripe-elements/svg/calendar-number-outline.svg +1 -1
  341. package/dist/stripe-elements/svg/calendar-number-sharp.svg +1 -1
  342. package/dist/stripe-elements/svg/calendar-number.svg +1 -1
  343. package/dist/stripe-elements/svg/calendar-outline.svg +1 -1
  344. package/dist/stripe-elements/svg/calendar-sharp.svg +1 -1
  345. package/dist/stripe-elements/svg/calendar.svg +1 -1
  346. package/dist/stripe-elements/svg/call-outline.svg +1 -1
  347. package/dist/stripe-elements/svg/call-sharp.svg +1 -1
  348. package/dist/stripe-elements/svg/call.svg +1 -1
  349. package/dist/stripe-elements/svg/camera-outline.svg +1 -1
  350. package/dist/stripe-elements/svg/camera-reverse-outline.svg +1 -1
  351. package/dist/stripe-elements/svg/camera-reverse-sharp.svg +1 -1
  352. package/dist/stripe-elements/svg/camera-reverse.svg +1 -1
  353. package/dist/stripe-elements/svg/camera-sharp.svg +1 -1
  354. package/dist/stripe-elements/svg/camera.svg +1 -1
  355. package/dist/stripe-elements/svg/car-outline.svg +1 -1
  356. package/dist/stripe-elements/svg/car-sharp.svg +1 -1
  357. package/dist/stripe-elements/svg/car-sport-outline.svg +1 -1
  358. package/dist/stripe-elements/svg/car-sport-sharp.svg +1 -1
  359. package/dist/stripe-elements/svg/car-sport.svg +1 -1
  360. package/dist/stripe-elements/svg/car.svg +1 -1
  361. package/dist/stripe-elements/svg/card-outline.svg +1 -1
  362. package/dist/stripe-elements/svg/card-sharp.svg +1 -1
  363. package/dist/stripe-elements/svg/card.svg +1 -1
  364. package/dist/stripe-elements/svg/caret-back-circle-outline.svg +1 -1
  365. package/dist/stripe-elements/svg/caret-back-circle-sharp.svg +1 -1
  366. package/dist/stripe-elements/svg/caret-back-circle.svg +1 -1
  367. package/dist/stripe-elements/svg/caret-back-outline.svg +1 -1
  368. package/dist/stripe-elements/svg/caret-back-sharp.svg +1 -1
  369. package/dist/stripe-elements/svg/caret-back.svg +1 -1
  370. package/dist/stripe-elements/svg/caret-down-circle-outline.svg +1 -1
  371. package/dist/stripe-elements/svg/caret-down-circle-sharp.svg +1 -1
  372. package/dist/stripe-elements/svg/caret-down-circle.svg +1 -1
  373. package/dist/stripe-elements/svg/caret-down-outline.svg +1 -1
  374. package/dist/stripe-elements/svg/caret-down-sharp.svg +1 -1
  375. package/dist/stripe-elements/svg/caret-down.svg +1 -1
  376. package/dist/stripe-elements/svg/caret-forward-circle-outline.svg +1 -1
  377. package/dist/stripe-elements/svg/caret-forward-circle-sharp.svg +1 -1
  378. package/dist/stripe-elements/svg/caret-forward-circle.svg +1 -1
  379. package/dist/stripe-elements/svg/caret-forward-outline.svg +1 -1
  380. package/dist/stripe-elements/svg/caret-forward-sharp.svg +1 -1
  381. package/dist/stripe-elements/svg/caret-forward.svg +1 -1
  382. package/dist/stripe-elements/svg/caret-up-circle-outline.svg +1 -1
  383. package/dist/stripe-elements/svg/caret-up-circle-sharp.svg +1 -1
  384. package/dist/stripe-elements/svg/caret-up-circle.svg +1 -1
  385. package/dist/stripe-elements/svg/caret-up-outline.svg +1 -1
  386. package/dist/stripe-elements/svg/caret-up-sharp.svg +1 -1
  387. package/dist/stripe-elements/svg/caret-up.svg +1 -1
  388. package/dist/stripe-elements/svg/cart-outline.svg +1 -1
  389. package/dist/stripe-elements/svg/cart-sharp.svg +1 -1
  390. package/dist/stripe-elements/svg/cart.svg +1 -1
  391. package/dist/stripe-elements/svg/cash-outline.svg +1 -1
  392. package/dist/stripe-elements/svg/cash-sharp.svg +1 -1
  393. package/dist/stripe-elements/svg/cash.svg +1 -1
  394. package/dist/stripe-elements/svg/cellular-outline.svg +1 -1
  395. package/dist/stripe-elements/svg/cellular-sharp.svg +1 -1
  396. package/dist/stripe-elements/svg/cellular.svg +1 -1
  397. package/dist/stripe-elements/svg/chatbox-ellipses-outline.svg +1 -1
  398. package/dist/stripe-elements/svg/chatbox-ellipses-sharp.svg +1 -1
  399. package/dist/stripe-elements/svg/chatbox-ellipses.svg +1 -1
  400. package/dist/stripe-elements/svg/chatbox-outline.svg +1 -1
  401. package/dist/stripe-elements/svg/chatbox-sharp.svg +1 -1
  402. package/dist/stripe-elements/svg/chatbox.svg +1 -1
  403. package/dist/stripe-elements/svg/chatbubble-ellipses-outline.svg +1 -1
  404. package/dist/stripe-elements/svg/chatbubble-ellipses-sharp.svg +1 -1
  405. package/dist/stripe-elements/svg/chatbubble-ellipses.svg +1 -1
  406. package/dist/stripe-elements/svg/chatbubble-outline.svg +1 -1
  407. package/dist/stripe-elements/svg/chatbubble-sharp.svg +1 -1
  408. package/dist/stripe-elements/svg/chatbubble.svg +1 -1
  409. package/dist/stripe-elements/svg/chatbubbles-outline.svg +1 -1
  410. package/dist/stripe-elements/svg/chatbubbles-sharp.svg +1 -1
  411. package/dist/stripe-elements/svg/chatbubbles.svg +1 -1
  412. package/dist/stripe-elements/svg/checkbox-outline.svg +1 -1
  413. package/dist/stripe-elements/svg/checkbox-sharp.svg +1 -1
  414. package/dist/stripe-elements/svg/checkbox.svg +1 -1
  415. package/dist/stripe-elements/svg/checkmark-circle-outline.svg +1 -1
  416. package/dist/stripe-elements/svg/checkmark-circle-sharp.svg +1 -1
  417. package/dist/stripe-elements/svg/checkmark-circle.svg +1 -1
  418. package/dist/stripe-elements/svg/checkmark-done-circle-outline.svg +1 -1
  419. package/dist/stripe-elements/svg/checkmark-done-circle-sharp.svg +1 -1
  420. package/dist/stripe-elements/svg/checkmark-done-circle.svg +1 -1
  421. package/dist/stripe-elements/svg/checkmark-done-outline.svg +1 -1
  422. package/dist/stripe-elements/svg/checkmark-done-sharp.svg +1 -1
  423. package/dist/stripe-elements/svg/checkmark-done.svg +1 -1
  424. package/dist/stripe-elements/svg/checkmark-outline.svg +1 -1
  425. package/dist/stripe-elements/svg/checkmark-sharp.svg +1 -1
  426. package/dist/stripe-elements/svg/checkmark.svg +1 -1
  427. package/dist/stripe-elements/svg/chevron-back-circle-outline.svg +1 -1
  428. package/dist/stripe-elements/svg/chevron-back-circle-sharp.svg +1 -1
  429. package/dist/stripe-elements/svg/chevron-back-circle.svg +1 -1
  430. package/dist/stripe-elements/svg/chevron-back-outline.svg +1 -1
  431. package/dist/stripe-elements/svg/chevron-back-sharp.svg +1 -1
  432. package/dist/stripe-elements/svg/chevron-back.svg +1 -1
  433. package/dist/stripe-elements/svg/chevron-collapse-outline.svg +1 -1
  434. package/dist/stripe-elements/svg/chevron-collapse-sharp.svg +1 -1
  435. package/dist/stripe-elements/svg/chevron-collapse.svg +1 -1
  436. package/dist/stripe-elements/svg/chevron-down-circle-outline.svg +1 -1
  437. package/dist/stripe-elements/svg/chevron-down-circle-sharp.svg +1 -1
  438. package/dist/stripe-elements/svg/chevron-down-circle.svg +1 -1
  439. package/dist/stripe-elements/svg/chevron-down-outline.svg +1 -1
  440. package/dist/stripe-elements/svg/chevron-down-sharp.svg +1 -1
  441. package/dist/stripe-elements/svg/chevron-down.svg +1 -1
  442. package/dist/stripe-elements/svg/chevron-expand-outline.svg +1 -1
  443. package/dist/stripe-elements/svg/chevron-expand-sharp.svg +1 -1
  444. package/dist/stripe-elements/svg/chevron-expand.svg +1 -1
  445. package/dist/stripe-elements/svg/chevron-forward-circle-outline.svg +1 -1
  446. package/dist/stripe-elements/svg/chevron-forward-circle-sharp.svg +1 -1
  447. package/dist/stripe-elements/svg/chevron-forward-circle.svg +1 -1
  448. package/dist/stripe-elements/svg/chevron-forward-outline.svg +1 -1
  449. package/dist/stripe-elements/svg/chevron-forward-sharp.svg +1 -1
  450. package/dist/stripe-elements/svg/chevron-forward.svg +1 -1
  451. package/dist/stripe-elements/svg/chevron-up-circle-outline.svg +1 -1
  452. package/dist/stripe-elements/svg/chevron-up-circle-sharp.svg +1 -1
  453. package/dist/stripe-elements/svg/chevron-up-circle.svg +1 -1
  454. package/dist/stripe-elements/svg/chevron-up-outline.svg +1 -1
  455. package/dist/stripe-elements/svg/chevron-up-sharp.svg +1 -1
  456. package/dist/stripe-elements/svg/chevron-up.svg +1 -1
  457. package/dist/stripe-elements/svg/clipboard-outline.svg +1 -1
  458. package/dist/stripe-elements/svg/clipboard-sharp.svg +1 -1
  459. package/dist/stripe-elements/svg/clipboard.svg +1 -1
  460. package/dist/stripe-elements/svg/close-circle-outline.svg +1 -1
  461. package/dist/stripe-elements/svg/close-circle-sharp.svg +1 -1
  462. package/dist/stripe-elements/svg/close-circle.svg +1 -1
  463. package/dist/stripe-elements/svg/close-outline.svg +1 -1
  464. package/dist/stripe-elements/svg/close-sharp.svg +1 -1
  465. package/dist/stripe-elements/svg/close.svg +1 -1
  466. package/dist/stripe-elements/svg/cloud-circle-outline.svg +1 -1
  467. package/dist/stripe-elements/svg/cloud-circle-sharp.svg +1 -1
  468. package/dist/stripe-elements/svg/cloud-circle.svg +1 -1
  469. package/dist/stripe-elements/svg/cloud-done-outline.svg +1 -1
  470. package/dist/stripe-elements/svg/cloud-done-sharp.svg +1 -1
  471. package/dist/stripe-elements/svg/cloud-done.svg +1 -1
  472. package/dist/stripe-elements/svg/cloud-download-outline.svg +1 -1
  473. package/dist/stripe-elements/svg/cloud-download-sharp.svg +1 -1
  474. package/dist/stripe-elements/svg/cloud-download.svg +1 -1
  475. package/dist/stripe-elements/svg/cloud-offline-outline.svg +1 -1
  476. package/dist/stripe-elements/svg/cloud-offline-sharp.svg +1 -1
  477. package/dist/stripe-elements/svg/cloud-offline.svg +1 -1
  478. package/dist/stripe-elements/svg/cloud-outline.svg +1 -1
  479. package/dist/stripe-elements/svg/cloud-sharp.svg +1 -1
  480. package/dist/stripe-elements/svg/cloud-upload-outline.svg +1 -1
  481. package/dist/stripe-elements/svg/cloud-upload-sharp.svg +1 -1
  482. package/dist/stripe-elements/svg/cloud-upload.svg +1 -1
  483. package/dist/stripe-elements/svg/cloud.svg +1 -1
  484. package/dist/stripe-elements/svg/cloudy-night-outline.svg +1 -1
  485. package/dist/stripe-elements/svg/cloudy-night-sharp.svg +1 -1
  486. package/dist/stripe-elements/svg/cloudy-night.svg +1 -1
  487. package/dist/stripe-elements/svg/cloudy-outline.svg +1 -1
  488. package/dist/stripe-elements/svg/cloudy-sharp.svg +1 -1
  489. package/dist/stripe-elements/svg/cloudy.svg +1 -1
  490. package/dist/stripe-elements/svg/code-download-outline.svg +1 -1
  491. package/dist/stripe-elements/svg/code-download-sharp.svg +1 -1
  492. package/dist/stripe-elements/svg/code-download.svg +1 -1
  493. package/dist/stripe-elements/svg/code-outline.svg +1 -1
  494. package/dist/stripe-elements/svg/code-sharp.svg +1 -1
  495. package/dist/stripe-elements/svg/code-slash-outline.svg +1 -1
  496. package/dist/stripe-elements/svg/code-slash-sharp.svg +1 -1
  497. package/dist/stripe-elements/svg/code-slash.svg +1 -1
  498. package/dist/stripe-elements/svg/code-working-outline.svg +1 -1
  499. package/dist/stripe-elements/svg/code-working-sharp.svg +1 -1
  500. package/dist/stripe-elements/svg/code-working.svg +1 -1
  501. package/dist/stripe-elements/svg/code.svg +1 -1
  502. package/dist/stripe-elements/svg/cog-outline.svg +1 -1
  503. package/dist/stripe-elements/svg/cog-sharp.svg +1 -1
  504. package/dist/stripe-elements/svg/cog.svg +1 -1
  505. package/dist/stripe-elements/svg/color-fill-outline.svg +1 -1
  506. package/dist/stripe-elements/svg/color-fill-sharp.svg +1 -1
  507. package/dist/stripe-elements/svg/color-fill.svg +1 -1
  508. package/dist/stripe-elements/svg/color-filter-outline.svg +1 -1
  509. package/dist/stripe-elements/svg/color-filter-sharp.svg +1 -1
  510. package/dist/stripe-elements/svg/color-filter.svg +1 -1
  511. package/dist/stripe-elements/svg/color-palette-outline.svg +1 -1
  512. package/dist/stripe-elements/svg/color-palette-sharp.svg +1 -1
  513. package/dist/stripe-elements/svg/color-palette.svg +1 -1
  514. package/dist/stripe-elements/svg/color-wand-outline.svg +1 -1
  515. package/dist/stripe-elements/svg/color-wand-sharp.svg +1 -1
  516. package/dist/stripe-elements/svg/color-wand.svg +1 -1
  517. package/dist/stripe-elements/svg/compass-outline.svg +1 -1
  518. package/dist/stripe-elements/svg/compass-sharp.svg +1 -1
  519. package/dist/stripe-elements/svg/compass.svg +1 -1
  520. package/dist/stripe-elements/svg/construct-outline.svg +1 -1
  521. package/dist/stripe-elements/svg/construct-sharp.svg +1 -1
  522. package/dist/stripe-elements/svg/construct.svg +1 -1
  523. package/dist/stripe-elements/svg/contract-outline.svg +1 -1
  524. package/dist/stripe-elements/svg/contract-sharp.svg +1 -1
  525. package/dist/stripe-elements/svg/contract.svg +1 -1
  526. package/dist/stripe-elements/svg/contrast-outline.svg +1 -1
  527. package/dist/stripe-elements/svg/contrast-sharp.svg +1 -1
  528. package/dist/stripe-elements/svg/contrast.svg +1 -1
  529. package/dist/stripe-elements/svg/copy-outline.svg +1 -1
  530. package/dist/stripe-elements/svg/copy-sharp.svg +1 -1
  531. package/dist/stripe-elements/svg/copy.svg +1 -1
  532. package/dist/stripe-elements/svg/create-outline.svg +1 -1
  533. package/dist/stripe-elements/svg/create-sharp.svg +1 -1
  534. package/dist/stripe-elements/svg/create.svg +1 -1
  535. package/dist/stripe-elements/svg/crop-outline.svg +1 -1
  536. package/dist/stripe-elements/svg/crop-sharp.svg +1 -1
  537. package/dist/stripe-elements/svg/crop.svg +1 -1
  538. package/dist/stripe-elements/svg/cube-outline.svg +1 -1
  539. package/dist/stripe-elements/svg/cube-sharp.svg +1 -1
  540. package/dist/stripe-elements/svg/cube.svg +1 -1
  541. package/dist/stripe-elements/svg/cut-outline.svg +1 -1
  542. package/dist/stripe-elements/svg/cut-sharp.svg +1 -1
  543. package/dist/stripe-elements/svg/cut.svg +1 -1
  544. package/dist/stripe-elements/svg/desktop-outline.svg +1 -1
  545. package/dist/stripe-elements/svg/desktop-sharp.svg +1 -1
  546. package/dist/stripe-elements/svg/desktop.svg +1 -1
  547. package/dist/stripe-elements/svg/diamond-outline.svg +1 -1
  548. package/dist/stripe-elements/svg/diamond-sharp.svg +1 -1
  549. package/dist/stripe-elements/svg/diamond.svg +1 -1
  550. package/dist/stripe-elements/svg/dice-outline.svg +1 -1
  551. package/dist/stripe-elements/svg/dice-sharp.svg +1 -1
  552. package/dist/stripe-elements/svg/dice.svg +1 -1
  553. package/dist/stripe-elements/svg/disc-outline.svg +1 -1
  554. package/dist/stripe-elements/svg/disc-sharp.svg +1 -1
  555. package/dist/stripe-elements/svg/disc.svg +1 -1
  556. package/dist/stripe-elements/svg/document-attach-outline.svg +1 -1
  557. package/dist/stripe-elements/svg/document-attach-sharp.svg +1 -1
  558. package/dist/stripe-elements/svg/document-attach.svg +1 -1
  559. package/dist/stripe-elements/svg/document-lock-outline.svg +1 -1
  560. package/dist/stripe-elements/svg/document-lock-sharp.svg +1 -1
  561. package/dist/stripe-elements/svg/document-lock.svg +1 -1
  562. package/dist/stripe-elements/svg/document-outline.svg +1 -1
  563. package/dist/stripe-elements/svg/document-sharp.svg +1 -1
  564. package/dist/stripe-elements/svg/document-text-outline.svg +1 -1
  565. package/dist/stripe-elements/svg/document-text-sharp.svg +1 -1
  566. package/dist/stripe-elements/svg/document-text.svg +1 -1
  567. package/dist/stripe-elements/svg/document.svg +1 -1
  568. package/dist/stripe-elements/svg/documents-outline.svg +1 -1
  569. package/dist/stripe-elements/svg/documents-sharp.svg +1 -1
  570. package/dist/stripe-elements/svg/documents.svg +1 -1
  571. package/dist/stripe-elements/svg/download-outline.svg +1 -1
  572. package/dist/stripe-elements/svg/download-sharp.svg +1 -1
  573. package/dist/stripe-elements/svg/download.svg +1 -1
  574. package/dist/stripe-elements/svg/duplicate-outline.svg +1 -1
  575. package/dist/stripe-elements/svg/duplicate-sharp.svg +1 -1
  576. package/dist/stripe-elements/svg/duplicate.svg +1 -1
  577. package/dist/stripe-elements/svg/ear-outline.svg +1 -1
  578. package/dist/stripe-elements/svg/ear-sharp.svg +1 -1
  579. package/dist/stripe-elements/svg/ear.svg +1 -1
  580. package/dist/stripe-elements/svg/earth-outline.svg +1 -1
  581. package/dist/stripe-elements/svg/earth-sharp.svg +1 -1
  582. package/dist/stripe-elements/svg/earth.svg +1 -1
  583. package/dist/stripe-elements/svg/easel-outline.svg +1 -1
  584. package/dist/stripe-elements/svg/easel-sharp.svg +1 -1
  585. package/dist/stripe-elements/svg/easel.svg +1 -1
  586. package/dist/stripe-elements/svg/egg-outline.svg +1 -1
  587. package/dist/stripe-elements/svg/egg-sharp.svg +1 -1
  588. package/dist/stripe-elements/svg/egg.svg +1 -1
  589. package/dist/stripe-elements/svg/ellipse-outline.svg +1 -1
  590. package/dist/stripe-elements/svg/ellipse-sharp.svg +1 -1
  591. package/dist/stripe-elements/svg/ellipse.svg +1 -1
  592. package/dist/stripe-elements/svg/ellipsis-horizontal-circle-outline.svg +1 -1
  593. package/dist/stripe-elements/svg/ellipsis-horizontal-circle-sharp.svg +1 -1
  594. package/dist/stripe-elements/svg/ellipsis-horizontal-circle.svg +1 -1
  595. package/dist/stripe-elements/svg/ellipsis-horizontal-outline.svg +1 -1
  596. package/dist/stripe-elements/svg/ellipsis-horizontal-sharp.svg +1 -1
  597. package/dist/stripe-elements/svg/ellipsis-horizontal.svg +1 -1
  598. package/dist/stripe-elements/svg/ellipsis-vertical-circle-outline.svg +1 -1
  599. package/dist/stripe-elements/svg/ellipsis-vertical-circle-sharp.svg +1 -1
  600. package/dist/stripe-elements/svg/ellipsis-vertical-circle.svg +1 -1
  601. package/dist/stripe-elements/svg/ellipsis-vertical-outline.svg +1 -1
  602. package/dist/stripe-elements/svg/ellipsis-vertical-sharp.svg +1 -1
  603. package/dist/stripe-elements/svg/ellipsis-vertical.svg +1 -1
  604. package/dist/stripe-elements/svg/enter-outline.svg +1 -1
  605. package/dist/stripe-elements/svg/enter-sharp.svg +1 -1
  606. package/dist/stripe-elements/svg/enter.svg +1 -1
  607. package/dist/stripe-elements/svg/exit-outline.svg +1 -1
  608. package/dist/stripe-elements/svg/exit-sharp.svg +1 -1
  609. package/dist/stripe-elements/svg/exit.svg +1 -1
  610. package/dist/stripe-elements/svg/expand-outline.svg +1 -1
  611. package/dist/stripe-elements/svg/expand-sharp.svg +1 -1
  612. package/dist/stripe-elements/svg/expand.svg +1 -1
  613. package/dist/stripe-elements/svg/extension-puzzle-outline.svg +1 -1
  614. package/dist/stripe-elements/svg/extension-puzzle-sharp.svg +1 -1
  615. package/dist/stripe-elements/svg/extension-puzzle.svg +1 -1
  616. package/dist/stripe-elements/svg/eye-off-outline.svg +1 -1
  617. package/dist/stripe-elements/svg/eye-off-sharp.svg +1 -1
  618. package/dist/stripe-elements/svg/eye-off.svg +1 -1
  619. package/dist/stripe-elements/svg/eye-outline.svg +1 -1
  620. package/dist/stripe-elements/svg/eye-sharp.svg +1 -1
  621. package/dist/stripe-elements/svg/eye.svg +1 -1
  622. package/dist/stripe-elements/svg/eyedrop-outline.svg +1 -1
  623. package/dist/stripe-elements/svg/eyedrop-sharp.svg +1 -1
  624. package/dist/stripe-elements/svg/eyedrop.svg +1 -1
  625. package/dist/stripe-elements/svg/fast-food-outline.svg +1 -1
  626. package/dist/stripe-elements/svg/fast-food-sharp.svg +1 -1
  627. package/dist/stripe-elements/svg/fast-food.svg +1 -1
  628. package/dist/stripe-elements/svg/female-outline.svg +1 -1
  629. package/dist/stripe-elements/svg/female-sharp.svg +1 -1
  630. package/dist/stripe-elements/svg/female.svg +1 -1
  631. package/dist/stripe-elements/svg/file-tray-full-outline.svg +1 -1
  632. package/dist/stripe-elements/svg/file-tray-full-sharp.svg +1 -1
  633. package/dist/stripe-elements/svg/file-tray-full.svg +1 -1
  634. package/dist/stripe-elements/svg/file-tray-outline.svg +1 -1
  635. package/dist/stripe-elements/svg/file-tray-sharp.svg +1 -1
  636. package/dist/stripe-elements/svg/file-tray-stacked-outline.svg +1 -1
  637. package/dist/stripe-elements/svg/file-tray-stacked-sharp.svg +1 -1
  638. package/dist/stripe-elements/svg/file-tray-stacked.svg +1 -1
  639. package/dist/stripe-elements/svg/file-tray.svg +1 -1
  640. package/dist/stripe-elements/svg/film-outline.svg +1 -1
  641. package/dist/stripe-elements/svg/film-sharp.svg +1 -1
  642. package/dist/stripe-elements/svg/film.svg +1 -1
  643. package/dist/stripe-elements/svg/filter-circle-outline.svg +1 -1
  644. package/dist/stripe-elements/svg/filter-circle-sharp.svg +1 -1
  645. package/dist/stripe-elements/svg/filter-circle.svg +1 -1
  646. package/dist/stripe-elements/svg/filter-outline.svg +1 -1
  647. package/dist/stripe-elements/svg/filter-sharp.svg +1 -1
  648. package/dist/stripe-elements/svg/filter.svg +1 -1
  649. package/dist/stripe-elements/svg/finger-print-outline.svg +1 -1
  650. package/dist/stripe-elements/svg/finger-print-sharp.svg +1 -1
  651. package/dist/stripe-elements/svg/finger-print.svg +1 -1
  652. package/dist/stripe-elements/svg/fish-outline.svg +1 -1
  653. package/dist/stripe-elements/svg/fish-sharp.svg +1 -1
  654. package/dist/stripe-elements/svg/fish.svg +1 -1
  655. package/dist/stripe-elements/svg/fitness-outline.svg +1 -1
  656. package/dist/stripe-elements/svg/fitness-sharp.svg +1 -1
  657. package/dist/stripe-elements/svg/fitness.svg +1 -1
  658. package/dist/stripe-elements/svg/flag-outline.svg +1 -1
  659. package/dist/stripe-elements/svg/flag-sharp.svg +1 -1
  660. package/dist/stripe-elements/svg/flag.svg +1 -1
  661. package/dist/stripe-elements/svg/flame-outline.svg +1 -1
  662. package/dist/stripe-elements/svg/flame-sharp.svg +1 -1
  663. package/dist/stripe-elements/svg/flame.svg +1 -1
  664. package/dist/stripe-elements/svg/flash-off-outline.svg +1 -1
  665. package/dist/stripe-elements/svg/flash-off-sharp.svg +1 -1
  666. package/dist/stripe-elements/svg/flash-off.svg +1 -1
  667. package/dist/stripe-elements/svg/flash-outline.svg +1 -1
  668. package/dist/stripe-elements/svg/flash-sharp.svg +1 -1
  669. package/dist/stripe-elements/svg/flash.svg +1 -1
  670. package/dist/stripe-elements/svg/flashlight-outline.svg +1 -1
  671. package/dist/stripe-elements/svg/flashlight-sharp.svg +1 -1
  672. package/dist/stripe-elements/svg/flashlight.svg +1 -1
  673. package/dist/stripe-elements/svg/flask-outline.svg +1 -1
  674. package/dist/stripe-elements/svg/flask-sharp.svg +1 -1
  675. package/dist/stripe-elements/svg/flask.svg +1 -1
  676. package/dist/stripe-elements/svg/flower-outline.svg +1 -1
  677. package/dist/stripe-elements/svg/flower-sharp.svg +1 -1
  678. package/dist/stripe-elements/svg/flower.svg +1 -1
  679. package/dist/stripe-elements/svg/folder-open-outline.svg +1 -1
  680. package/dist/stripe-elements/svg/folder-open-sharp.svg +1 -1
  681. package/dist/stripe-elements/svg/folder-open.svg +1 -1
  682. package/dist/stripe-elements/svg/folder-outline.svg +1 -1
  683. package/dist/stripe-elements/svg/folder-sharp.svg +1 -1
  684. package/dist/stripe-elements/svg/folder.svg +1 -1
  685. package/dist/stripe-elements/svg/football-outline.svg +1 -1
  686. package/dist/stripe-elements/svg/football-sharp.svg +1 -1
  687. package/dist/stripe-elements/svg/football.svg +1 -1
  688. package/dist/stripe-elements/svg/footsteps-outline.svg +1 -1
  689. package/dist/stripe-elements/svg/footsteps-sharp.svg +1 -1
  690. package/dist/stripe-elements/svg/footsteps.svg +1 -1
  691. package/dist/stripe-elements/svg/funnel-outline.svg +1 -1
  692. package/dist/stripe-elements/svg/funnel-sharp.svg +1 -1
  693. package/dist/stripe-elements/svg/funnel.svg +1 -1
  694. package/dist/stripe-elements/svg/game-controller-outline.svg +1 -1
  695. package/dist/stripe-elements/svg/game-controller-sharp.svg +1 -1
  696. package/dist/stripe-elements/svg/game-controller.svg +1 -1
  697. package/dist/stripe-elements/svg/gift-outline.svg +1 -1
  698. package/dist/stripe-elements/svg/gift-sharp.svg +1 -1
  699. package/dist/stripe-elements/svg/gift.svg +1 -1
  700. package/dist/stripe-elements/svg/git-branch-outline.svg +1 -1
  701. package/dist/stripe-elements/svg/git-branch-sharp.svg +1 -1
  702. package/dist/stripe-elements/svg/git-branch.svg +1 -1
  703. package/dist/stripe-elements/svg/git-commit-outline.svg +1 -1
  704. package/dist/stripe-elements/svg/git-commit-sharp.svg +1 -1
  705. package/dist/stripe-elements/svg/git-commit.svg +1 -1
  706. package/dist/stripe-elements/svg/git-compare-outline.svg +1 -1
  707. package/dist/stripe-elements/svg/git-compare-sharp.svg +1 -1
  708. package/dist/stripe-elements/svg/git-compare.svg +1 -1
  709. package/dist/stripe-elements/svg/git-merge-outline.svg +1 -1
  710. package/dist/stripe-elements/svg/git-merge-sharp.svg +1 -1
  711. package/dist/stripe-elements/svg/git-merge.svg +1 -1
  712. package/dist/stripe-elements/svg/git-network-outline.svg +1 -1
  713. package/dist/stripe-elements/svg/git-network-sharp.svg +1 -1
  714. package/dist/stripe-elements/svg/git-network.svg +1 -1
  715. package/dist/stripe-elements/svg/git-pull-request-outline.svg +1 -1
  716. package/dist/stripe-elements/svg/git-pull-request-sharp.svg +1 -1
  717. package/dist/stripe-elements/svg/git-pull-request.svg +1 -1
  718. package/dist/stripe-elements/svg/glasses-outline.svg +1 -1
  719. package/dist/stripe-elements/svg/glasses-sharp.svg +1 -1
  720. package/dist/stripe-elements/svg/glasses.svg +1 -1
  721. package/dist/stripe-elements/svg/globe-outline.svg +1 -1
  722. package/dist/stripe-elements/svg/globe-sharp.svg +1 -1
  723. package/dist/stripe-elements/svg/globe.svg +1 -1
  724. package/dist/stripe-elements/svg/golf-outline.svg +1 -1
  725. package/dist/stripe-elements/svg/golf-sharp.svg +1 -1
  726. package/dist/stripe-elements/svg/golf.svg +1 -1
  727. package/dist/stripe-elements/svg/grid-outline.svg +1 -1
  728. package/dist/stripe-elements/svg/grid-sharp.svg +1 -1
  729. package/dist/stripe-elements/svg/grid.svg +1 -1
  730. package/dist/stripe-elements/svg/hammer-outline.svg +1 -1
  731. package/dist/stripe-elements/svg/hammer-sharp.svg +1 -1
  732. package/dist/stripe-elements/svg/hammer.svg +1 -1
  733. package/dist/stripe-elements/svg/hand-left-outline.svg +1 -1
  734. package/dist/stripe-elements/svg/hand-left-sharp.svg +1 -1
  735. package/dist/stripe-elements/svg/hand-left.svg +1 -1
  736. package/dist/stripe-elements/svg/hand-right-outline.svg +1 -1
  737. package/dist/stripe-elements/svg/hand-right-sharp.svg +1 -1
  738. package/dist/stripe-elements/svg/hand-right.svg +1 -1
  739. package/dist/stripe-elements/svg/happy-outline.svg +1 -1
  740. package/dist/stripe-elements/svg/happy-sharp.svg +1 -1
  741. package/dist/stripe-elements/svg/happy.svg +1 -1
  742. package/dist/stripe-elements/svg/hardware-chip-outline.svg +1 -1
  743. package/dist/stripe-elements/svg/hardware-chip-sharp.svg +1 -1
  744. package/dist/stripe-elements/svg/hardware-chip.svg +1 -1
  745. package/dist/stripe-elements/svg/headset-outline.svg +1 -1
  746. package/dist/stripe-elements/svg/headset-sharp.svg +1 -1
  747. package/dist/stripe-elements/svg/headset.svg +1 -1
  748. package/dist/stripe-elements/svg/heart-circle-outline.svg +1 -1
  749. package/dist/stripe-elements/svg/heart-circle-sharp.svg +1 -1
  750. package/dist/stripe-elements/svg/heart-circle.svg +1 -1
  751. package/dist/stripe-elements/svg/heart-dislike-circle-outline.svg +1 -1
  752. package/dist/stripe-elements/svg/heart-dislike-circle-sharp.svg +1 -1
  753. package/dist/stripe-elements/svg/heart-dislike-circle.svg +1 -1
  754. package/dist/stripe-elements/svg/heart-dislike-outline.svg +1 -1
  755. package/dist/stripe-elements/svg/heart-dislike-sharp.svg +1 -1
  756. package/dist/stripe-elements/svg/heart-dislike.svg +1 -1
  757. package/dist/stripe-elements/svg/heart-half-outline.svg +1 -1
  758. package/dist/stripe-elements/svg/heart-half-sharp.svg +1 -1
  759. package/dist/stripe-elements/svg/heart-half.svg +1 -1
  760. package/dist/stripe-elements/svg/heart-outline.svg +1 -1
  761. package/dist/stripe-elements/svg/heart-sharp.svg +1 -1
  762. package/dist/stripe-elements/svg/heart.svg +1 -1
  763. package/dist/stripe-elements/svg/help-buoy-outline.svg +1 -1
  764. package/dist/stripe-elements/svg/help-buoy-sharp.svg +1 -1
  765. package/dist/stripe-elements/svg/help-buoy.svg +1 -1
  766. package/dist/stripe-elements/svg/help-circle-outline.svg +1 -1
  767. package/dist/stripe-elements/svg/help-circle-sharp.svg +1 -1
  768. package/dist/stripe-elements/svg/help-circle.svg +1 -1
  769. package/dist/stripe-elements/svg/help-outline.svg +1 -1
  770. package/dist/stripe-elements/svg/help-sharp.svg +1 -1
  771. package/dist/stripe-elements/svg/help.svg +1 -1
  772. package/dist/stripe-elements/svg/home-outline.svg +1 -1
  773. package/dist/stripe-elements/svg/home-sharp.svg +1 -1
  774. package/dist/stripe-elements/svg/home.svg +1 -1
  775. package/dist/stripe-elements/svg/hourglass-outline.svg +1 -1
  776. package/dist/stripe-elements/svg/hourglass-sharp.svg +1 -1
  777. package/dist/stripe-elements/svg/hourglass.svg +1 -1
  778. package/dist/stripe-elements/svg/ice-cream-outline.svg +1 -1
  779. package/dist/stripe-elements/svg/ice-cream-sharp.svg +1 -1
  780. package/dist/stripe-elements/svg/ice-cream.svg +1 -1
  781. package/dist/stripe-elements/svg/id-card-outline.svg +1 -1
  782. package/dist/stripe-elements/svg/id-card-sharp.svg +1 -1
  783. package/dist/stripe-elements/svg/id-card.svg +1 -1
  784. package/dist/stripe-elements/svg/image-outline.svg +1 -1
  785. package/dist/stripe-elements/svg/image-sharp.svg +1 -1
  786. package/dist/stripe-elements/svg/image.svg +1 -1
  787. package/dist/stripe-elements/svg/images-outline.svg +1 -1
  788. package/dist/stripe-elements/svg/images-sharp.svg +1 -1
  789. package/dist/stripe-elements/svg/images.svg +1 -1
  790. package/dist/stripe-elements/svg/infinite-outline.svg +1 -1
  791. package/dist/stripe-elements/svg/infinite-sharp.svg +1 -1
  792. package/dist/stripe-elements/svg/infinite.svg +1 -1
  793. package/dist/stripe-elements/svg/information-circle-outline.svg +1 -1
  794. package/dist/stripe-elements/svg/information-circle-sharp.svg +1 -1
  795. package/dist/stripe-elements/svg/information-circle.svg +1 -1
  796. package/dist/stripe-elements/svg/information-outline.svg +1 -1
  797. package/dist/stripe-elements/svg/information-sharp.svg +1 -1
  798. package/dist/stripe-elements/svg/information.svg +1 -1
  799. package/dist/stripe-elements/svg/invert-mode-outline.svg +1 -1
  800. package/dist/stripe-elements/svg/invert-mode-sharp.svg +1 -1
  801. package/dist/stripe-elements/svg/invert-mode.svg +1 -1
  802. package/dist/stripe-elements/svg/journal-outline.svg +1 -1
  803. package/dist/stripe-elements/svg/journal-sharp.svg +1 -1
  804. package/dist/stripe-elements/svg/journal.svg +1 -1
  805. package/dist/stripe-elements/svg/key-outline.svg +1 -1
  806. package/dist/stripe-elements/svg/key-sharp.svg +1 -1
  807. package/dist/stripe-elements/svg/key.svg +1 -1
  808. package/dist/stripe-elements/svg/keypad-outline.svg +1 -1
  809. package/dist/stripe-elements/svg/keypad-sharp.svg +1 -1
  810. package/dist/stripe-elements/svg/keypad.svg +1 -1
  811. package/dist/stripe-elements/svg/language-outline.svg +1 -1
  812. package/dist/stripe-elements/svg/language-sharp.svg +1 -1
  813. package/dist/stripe-elements/svg/language.svg +1 -1
  814. package/dist/stripe-elements/svg/laptop-outline.svg +1 -1
  815. package/dist/stripe-elements/svg/laptop-sharp.svg +1 -1
  816. package/dist/stripe-elements/svg/laptop.svg +1 -1
  817. package/dist/stripe-elements/svg/layers-outline.svg +1 -1
  818. package/dist/stripe-elements/svg/layers-sharp.svg +1 -1
  819. package/dist/stripe-elements/svg/layers.svg +1 -1
  820. package/dist/stripe-elements/svg/leaf-outline.svg +1 -1
  821. package/dist/stripe-elements/svg/leaf-sharp.svg +1 -1
  822. package/dist/stripe-elements/svg/leaf.svg +1 -1
  823. package/dist/stripe-elements/svg/library-outline.svg +1 -1
  824. package/dist/stripe-elements/svg/library-sharp.svg +1 -1
  825. package/dist/stripe-elements/svg/library.svg +1 -1
  826. package/dist/stripe-elements/svg/link-outline.svg +1 -1
  827. package/dist/stripe-elements/svg/link-sharp.svg +1 -1
  828. package/dist/stripe-elements/svg/link.svg +1 -1
  829. package/dist/stripe-elements/svg/list-circle-outline.svg +1 -1
  830. package/dist/stripe-elements/svg/list-circle-sharp.svg +1 -1
  831. package/dist/stripe-elements/svg/list-circle.svg +1 -1
  832. package/dist/stripe-elements/svg/list-outline.svg +1 -1
  833. package/dist/stripe-elements/svg/list-sharp.svg +1 -1
  834. package/dist/stripe-elements/svg/list.svg +1 -1
  835. package/dist/stripe-elements/svg/locate-outline.svg +1 -1
  836. package/dist/stripe-elements/svg/locate-sharp.svg +1 -1
  837. package/dist/stripe-elements/svg/locate.svg +1 -1
  838. package/dist/stripe-elements/svg/location-outline.svg +1 -1
  839. package/dist/stripe-elements/svg/location-sharp.svg +1 -1
  840. package/dist/stripe-elements/svg/location.svg +1 -1
  841. package/dist/stripe-elements/svg/lock-closed-outline.svg +1 -1
  842. package/dist/stripe-elements/svg/lock-closed-sharp.svg +1 -1
  843. package/dist/stripe-elements/svg/lock-closed.svg +1 -1
  844. package/dist/stripe-elements/svg/lock-open-outline.svg +1 -1
  845. package/dist/stripe-elements/svg/lock-open-sharp.svg +1 -1
  846. package/dist/stripe-elements/svg/lock-open.svg +1 -1
  847. package/dist/stripe-elements/svg/log-in-outline.svg +1 -1
  848. package/dist/stripe-elements/svg/log-in-sharp.svg +1 -1
  849. package/dist/stripe-elements/svg/log-in.svg +1 -1
  850. package/dist/stripe-elements/svg/log-out-outline.svg +1 -1
  851. package/dist/stripe-elements/svg/log-out-sharp.svg +1 -1
  852. package/dist/stripe-elements/svg/log-out.svg +1 -1
  853. package/dist/stripe-elements/svg/logo-alipay.svg +1 -1
  854. package/dist/stripe-elements/svg/logo-amazon.svg +1 -1
  855. package/dist/stripe-elements/svg/logo-amplify.svg +1 -1
  856. package/dist/stripe-elements/svg/logo-android.svg +1 -1
  857. package/dist/stripe-elements/svg/logo-angular.svg +1 -1
  858. package/dist/stripe-elements/svg/logo-appflow.svg +1 -0
  859. package/dist/stripe-elements/svg/logo-apple-appstore.svg +1 -1
  860. package/dist/stripe-elements/svg/logo-apple-ar.svg +1 -1
  861. package/dist/stripe-elements/svg/logo-apple.svg +1 -1
  862. package/dist/stripe-elements/svg/logo-behance.svg +1 -1
  863. package/dist/stripe-elements/svg/logo-bitbucket.svg +1 -1
  864. package/dist/stripe-elements/svg/logo-bitcoin.svg +1 -1
  865. package/dist/stripe-elements/svg/logo-buffer.svg +1 -1
  866. package/dist/stripe-elements/svg/logo-capacitor.svg +1 -1
  867. package/dist/stripe-elements/svg/logo-chrome.svg +1 -1
  868. package/dist/stripe-elements/svg/logo-closed-captioning.svg +1 -1
  869. package/dist/stripe-elements/svg/logo-codepen.svg +1 -1
  870. package/dist/stripe-elements/svg/logo-css3.svg +1 -1
  871. package/dist/stripe-elements/svg/logo-designernews.svg +1 -1
  872. package/dist/stripe-elements/svg/logo-deviantart.svg +1 -1
  873. package/dist/stripe-elements/svg/logo-discord.svg +1 -1
  874. package/dist/stripe-elements/svg/logo-docker.svg +1 -1
  875. package/dist/stripe-elements/svg/logo-dribbble.svg +1 -1
  876. package/dist/stripe-elements/svg/logo-dropbox.svg +1 -1
  877. package/dist/stripe-elements/svg/logo-edge.svg +1 -1
  878. package/dist/stripe-elements/svg/logo-electron.svg +1 -1
  879. package/dist/stripe-elements/svg/logo-euro.svg +1 -1
  880. package/dist/stripe-elements/svg/logo-facebook.svg +1 -1
  881. package/dist/stripe-elements/svg/logo-figma.svg +1 -1
  882. package/dist/stripe-elements/svg/logo-firebase.svg +1 -1
  883. package/dist/stripe-elements/svg/logo-firefox.svg +1 -1
  884. package/dist/stripe-elements/svg/logo-flickr.svg +1 -1
  885. package/dist/stripe-elements/svg/logo-foursquare.svg +1 -1
  886. package/dist/stripe-elements/svg/logo-github.svg +1 -1
  887. package/dist/stripe-elements/svg/logo-gitlab.svg +1 -1
  888. package/dist/stripe-elements/svg/logo-google-playstore.svg +1 -1
  889. package/dist/stripe-elements/svg/logo-google.svg +1 -1
  890. package/dist/stripe-elements/svg/logo-hackernews.svg +1 -1
  891. package/dist/stripe-elements/svg/logo-html5.svg +1 -1
  892. package/dist/stripe-elements/svg/logo-instagram.svg +1 -1
  893. package/dist/stripe-elements/svg/logo-ionic.svg +1 -1
  894. package/dist/stripe-elements/svg/logo-ionitron.svg +1 -1
  895. package/dist/stripe-elements/svg/logo-javascript.svg +1 -1
  896. package/dist/stripe-elements/svg/logo-laravel.svg +1 -1
  897. package/dist/stripe-elements/svg/logo-linkedin.svg +1 -1
  898. package/dist/stripe-elements/svg/logo-markdown.svg +1 -1
  899. package/dist/stripe-elements/svg/logo-mastodon.svg +1 -1
  900. package/dist/stripe-elements/svg/logo-medium.svg +1 -1
  901. package/dist/stripe-elements/svg/logo-microsoft.svg +1 -1
  902. package/dist/stripe-elements/svg/logo-no-smoking.svg +1 -1
  903. package/dist/stripe-elements/svg/logo-nodejs.svg +1 -1
  904. package/dist/stripe-elements/svg/logo-npm.svg +1 -1
  905. package/dist/stripe-elements/svg/logo-octocat.svg +1 -1
  906. package/dist/stripe-elements/svg/logo-paypal.svg +1 -1
  907. package/dist/stripe-elements/svg/logo-pinterest.svg +1 -1
  908. package/dist/stripe-elements/svg/logo-playstation.svg +1 -1
  909. package/dist/stripe-elements/svg/logo-pwa.svg +1 -1
  910. package/dist/stripe-elements/svg/logo-python.svg +1 -1
  911. package/dist/stripe-elements/svg/logo-react.svg +1 -1
  912. package/dist/stripe-elements/svg/logo-reddit.svg +1 -1
  913. package/dist/stripe-elements/svg/logo-rss.svg +1 -1
  914. package/dist/stripe-elements/svg/logo-sass.svg +1 -1
  915. package/dist/stripe-elements/svg/logo-skype.svg +1 -1
  916. package/dist/stripe-elements/svg/logo-slack.svg +1 -1
  917. package/dist/stripe-elements/svg/logo-snapchat.svg +1 -1
  918. package/dist/stripe-elements/svg/logo-soundcloud.svg +1 -1
  919. package/dist/stripe-elements/svg/logo-stackoverflow.svg +1 -1
  920. package/dist/stripe-elements/svg/logo-steam.svg +1 -1
  921. package/dist/stripe-elements/svg/logo-stencil.svg +1 -1
  922. package/dist/stripe-elements/svg/logo-tableau.svg +1 -1
  923. package/dist/stripe-elements/svg/logo-threads.svg +1 -0
  924. package/dist/stripe-elements/svg/logo-tiktok.svg +1 -1
  925. package/dist/stripe-elements/svg/logo-trapeze.svg +1 -0
  926. package/dist/stripe-elements/svg/logo-tumblr.svg +1 -1
  927. package/dist/stripe-elements/svg/logo-tux.svg +1 -1
  928. package/dist/stripe-elements/svg/logo-twitch.svg +1 -1
  929. package/dist/stripe-elements/svg/logo-twitter.svg +1 -1
  930. package/dist/stripe-elements/svg/logo-usd.svg +1 -1
  931. package/dist/stripe-elements/svg/logo-venmo.svg +1 -1
  932. package/dist/stripe-elements/svg/logo-vercel.svg +1 -1
  933. package/dist/stripe-elements/svg/logo-vimeo.svg +1 -1
  934. package/dist/stripe-elements/svg/logo-vk.svg +1 -1
  935. package/dist/stripe-elements/svg/logo-vue.svg +1 -1
  936. package/dist/stripe-elements/svg/logo-web-component.svg +1 -1
  937. package/dist/stripe-elements/svg/logo-wechat.svg +1 -1
  938. package/dist/stripe-elements/svg/logo-whatsapp.svg +1 -1
  939. package/dist/stripe-elements/svg/logo-windows.svg +1 -1
  940. package/dist/stripe-elements/svg/logo-wordpress.svg +1 -1
  941. package/dist/stripe-elements/svg/logo-x.svg +1 -0
  942. package/dist/stripe-elements/svg/logo-xbox.svg +1 -1
  943. package/dist/stripe-elements/svg/logo-xing.svg +1 -1
  944. package/dist/stripe-elements/svg/logo-yahoo.svg +1 -1
  945. package/dist/stripe-elements/svg/logo-yen.svg +1 -1
  946. package/dist/stripe-elements/svg/logo-youtube.svg +1 -1
  947. package/dist/stripe-elements/svg/magnet-outline.svg +1 -1
  948. package/dist/stripe-elements/svg/magnet-sharp.svg +1 -1
  949. package/dist/stripe-elements/svg/magnet.svg +1 -1
  950. package/dist/stripe-elements/svg/mail-open-outline.svg +1 -1
  951. package/dist/stripe-elements/svg/mail-open-sharp.svg +1 -1
  952. package/dist/stripe-elements/svg/mail-open.svg +1 -1
  953. package/dist/stripe-elements/svg/mail-outline.svg +1 -1
  954. package/dist/stripe-elements/svg/mail-sharp.svg +1 -1
  955. package/dist/stripe-elements/svg/mail-unread-outline.svg +1 -1
  956. package/dist/stripe-elements/svg/mail-unread-sharp.svg +1 -1
  957. package/dist/stripe-elements/svg/mail-unread.svg +1 -1
  958. package/dist/stripe-elements/svg/mail.svg +1 -1
  959. package/dist/stripe-elements/svg/male-female-outline.svg +1 -1
  960. package/dist/stripe-elements/svg/male-female-sharp.svg +1 -1
  961. package/dist/stripe-elements/svg/male-female.svg +1 -1
  962. package/dist/stripe-elements/svg/male-outline.svg +1 -1
  963. package/dist/stripe-elements/svg/male-sharp.svg +1 -1
  964. package/dist/stripe-elements/svg/male.svg +1 -1
  965. package/dist/stripe-elements/svg/man-outline.svg +1 -1
  966. package/dist/stripe-elements/svg/man-sharp.svg +1 -1
  967. package/dist/stripe-elements/svg/man.svg +1 -1
  968. package/dist/stripe-elements/svg/map-outline.svg +1 -1
  969. package/dist/stripe-elements/svg/map-sharp.svg +1 -1
  970. package/dist/stripe-elements/svg/map.svg +1 -1
  971. package/dist/stripe-elements/svg/medal-outline.svg +1 -1
  972. package/dist/stripe-elements/svg/medal-sharp.svg +1 -1
  973. package/dist/stripe-elements/svg/medal.svg +1 -1
  974. package/dist/stripe-elements/svg/medical-outline.svg +1 -1
  975. package/dist/stripe-elements/svg/medical-sharp.svg +1 -1
  976. package/dist/stripe-elements/svg/medical.svg +1 -1
  977. package/dist/stripe-elements/svg/medkit-outline.svg +1 -1
  978. package/dist/stripe-elements/svg/medkit-sharp.svg +1 -1
  979. package/dist/stripe-elements/svg/medkit.svg +1 -1
  980. package/dist/stripe-elements/svg/megaphone-outline.svg +1 -1
  981. package/dist/stripe-elements/svg/megaphone-sharp.svg +1 -1
  982. package/dist/stripe-elements/svg/megaphone.svg +1 -1
  983. package/dist/stripe-elements/svg/menu-outline.svg +1 -1
  984. package/dist/stripe-elements/svg/menu-sharp.svg +1 -1
  985. package/dist/stripe-elements/svg/menu.svg +1 -1
  986. package/dist/stripe-elements/svg/mic-circle-outline.svg +1 -1
  987. package/dist/stripe-elements/svg/mic-circle-sharp.svg +1 -1
  988. package/dist/stripe-elements/svg/mic-circle.svg +1 -1
  989. package/dist/stripe-elements/svg/mic-off-circle-outline.svg +1 -1
  990. package/dist/stripe-elements/svg/mic-off-circle-sharp.svg +1 -1
  991. package/dist/stripe-elements/svg/mic-off-circle.svg +1 -1
  992. package/dist/stripe-elements/svg/mic-off-outline.svg +1 -1
  993. package/dist/stripe-elements/svg/mic-off-sharp.svg +1 -1
  994. package/dist/stripe-elements/svg/mic-off.svg +1 -1
  995. package/dist/stripe-elements/svg/mic-outline.svg +1 -1
  996. package/dist/stripe-elements/svg/mic-sharp.svg +1 -1
  997. package/dist/stripe-elements/svg/mic.svg +1 -1
  998. package/dist/stripe-elements/svg/moon-outline.svg +1 -1
  999. package/dist/stripe-elements/svg/moon-sharp.svg +1 -1
  1000. package/dist/stripe-elements/svg/moon.svg +1 -1
  1001. package/dist/stripe-elements/svg/move-outline.svg +1 -1
  1002. package/dist/stripe-elements/svg/move-sharp.svg +1 -1
  1003. package/dist/stripe-elements/svg/move.svg +1 -1
  1004. package/dist/stripe-elements/svg/musical-note-outline.svg +1 -1
  1005. package/dist/stripe-elements/svg/musical-note-sharp.svg +1 -1
  1006. package/dist/stripe-elements/svg/musical-note.svg +1 -1
  1007. package/dist/stripe-elements/svg/musical-notes-outline.svg +1 -1
  1008. package/dist/stripe-elements/svg/musical-notes-sharp.svg +1 -1
  1009. package/dist/stripe-elements/svg/musical-notes.svg +1 -1
  1010. package/dist/stripe-elements/svg/navigate-circle-outline.svg +1 -1
  1011. package/dist/stripe-elements/svg/navigate-circle-sharp.svg +1 -1
  1012. package/dist/stripe-elements/svg/navigate-circle.svg +1 -1
  1013. package/dist/stripe-elements/svg/navigate-outline.svg +1 -1
  1014. package/dist/stripe-elements/svg/navigate-sharp.svg +1 -1
  1015. package/dist/stripe-elements/svg/navigate.svg +1 -1
  1016. package/dist/stripe-elements/svg/newspaper-outline.svg +1 -1
  1017. package/dist/stripe-elements/svg/newspaper-sharp.svg +1 -1
  1018. package/dist/stripe-elements/svg/newspaper.svg +1 -1
  1019. package/dist/stripe-elements/svg/notifications-circle-outline.svg +1 -1
  1020. package/dist/stripe-elements/svg/notifications-circle-sharp.svg +1 -1
  1021. package/dist/stripe-elements/svg/notifications-circle.svg +1 -1
  1022. package/dist/stripe-elements/svg/notifications-off-circle-outline.svg +1 -1
  1023. package/dist/stripe-elements/svg/notifications-off-circle-sharp.svg +1 -1
  1024. package/dist/stripe-elements/svg/notifications-off-circle.svg +1 -1
  1025. package/dist/stripe-elements/svg/notifications-off-outline.svg +1 -1
  1026. package/dist/stripe-elements/svg/notifications-off-sharp.svg +1 -1
  1027. package/dist/stripe-elements/svg/notifications-off.svg +1 -1
  1028. package/dist/stripe-elements/svg/notifications-outline.svg +1 -1
  1029. package/dist/stripe-elements/svg/notifications-sharp.svg +1 -1
  1030. package/dist/stripe-elements/svg/notifications.svg +1 -1
  1031. package/dist/stripe-elements/svg/nuclear-outline.svg +1 -1
  1032. package/dist/stripe-elements/svg/nuclear-sharp.svg +1 -1
  1033. package/dist/stripe-elements/svg/nuclear.svg +1 -1
  1034. package/dist/stripe-elements/svg/nutrition-outline.svg +1 -1
  1035. package/dist/stripe-elements/svg/nutrition-sharp.svg +1 -1
  1036. package/dist/stripe-elements/svg/nutrition.svg +1 -1
  1037. package/dist/stripe-elements/svg/open-outline.svg +1 -1
  1038. package/dist/stripe-elements/svg/open-sharp.svg +1 -1
  1039. package/dist/stripe-elements/svg/open.svg +1 -1
  1040. package/dist/stripe-elements/svg/options-outline.svg +1 -1
  1041. package/dist/stripe-elements/svg/options-sharp.svg +1 -1
  1042. package/dist/stripe-elements/svg/options.svg +1 -1
  1043. package/dist/stripe-elements/svg/paper-plane-outline.svg +1 -1
  1044. package/dist/stripe-elements/svg/paper-plane-sharp.svg +1 -1
  1045. package/dist/stripe-elements/svg/paper-plane.svg +1 -1
  1046. package/dist/stripe-elements/svg/partly-sunny-outline.svg +1 -1
  1047. package/dist/stripe-elements/svg/partly-sunny-sharp.svg +1 -1
  1048. package/dist/stripe-elements/svg/partly-sunny.svg +1 -1
  1049. package/dist/stripe-elements/svg/pause-circle-outline.svg +1 -1
  1050. package/dist/stripe-elements/svg/pause-circle-sharp.svg +1 -1
  1051. package/dist/stripe-elements/svg/pause-circle.svg +1 -1
  1052. package/dist/stripe-elements/svg/pause-outline.svg +1 -1
  1053. package/dist/stripe-elements/svg/pause-sharp.svg +1 -1
  1054. package/dist/stripe-elements/svg/pause.svg +1 -1
  1055. package/dist/stripe-elements/svg/paw-outline.svg +1 -1
  1056. package/dist/stripe-elements/svg/paw-sharp.svg +1 -1
  1057. package/dist/stripe-elements/svg/paw.svg +1 -1
  1058. package/dist/stripe-elements/svg/pencil-outline.svg +1 -1
  1059. package/dist/stripe-elements/svg/pencil-sharp.svg +1 -1
  1060. package/dist/stripe-elements/svg/pencil.svg +1 -1
  1061. package/dist/stripe-elements/svg/people-circle-outline.svg +1 -1
  1062. package/dist/stripe-elements/svg/people-circle-sharp.svg +1 -1
  1063. package/dist/stripe-elements/svg/people-circle.svg +1 -1
  1064. package/dist/stripe-elements/svg/people-outline.svg +1 -1
  1065. package/dist/stripe-elements/svg/people-sharp.svg +1 -1
  1066. package/dist/stripe-elements/svg/people.svg +1 -1
  1067. package/dist/stripe-elements/svg/person-add-outline.svg +1 -1
  1068. package/dist/stripe-elements/svg/person-add-sharp.svg +1 -1
  1069. package/dist/stripe-elements/svg/person-add.svg +1 -1
  1070. package/dist/stripe-elements/svg/person-circle-outline.svg +1 -1
  1071. package/dist/stripe-elements/svg/person-circle-sharp.svg +1 -1
  1072. package/dist/stripe-elements/svg/person-circle.svg +1 -1
  1073. package/dist/stripe-elements/svg/person-outline.svg +1 -1
  1074. package/dist/stripe-elements/svg/person-remove-outline.svg +1 -1
  1075. package/dist/stripe-elements/svg/person-remove-sharp.svg +1 -1
  1076. package/dist/stripe-elements/svg/person-remove.svg +1 -1
  1077. package/dist/stripe-elements/svg/person-sharp.svg +1 -1
  1078. package/dist/stripe-elements/svg/person.svg +1 -1
  1079. package/dist/stripe-elements/svg/phone-landscape-outline.svg +1 -1
  1080. package/dist/stripe-elements/svg/phone-landscape-sharp.svg +1 -1
  1081. package/dist/stripe-elements/svg/phone-landscape.svg +1 -1
  1082. package/dist/stripe-elements/svg/phone-portrait-outline.svg +1 -1
  1083. package/dist/stripe-elements/svg/phone-portrait-sharp.svg +1 -1
  1084. package/dist/stripe-elements/svg/phone-portrait.svg +1 -1
  1085. package/dist/stripe-elements/svg/pie-chart-outline.svg +1 -1
  1086. package/dist/stripe-elements/svg/pie-chart-sharp.svg +1 -1
  1087. package/dist/stripe-elements/svg/pie-chart.svg +1 -1
  1088. package/dist/stripe-elements/svg/pin-outline.svg +1 -1
  1089. package/dist/stripe-elements/svg/pin-sharp.svg +1 -1
  1090. package/dist/stripe-elements/svg/pin.svg +1 -1
  1091. package/dist/stripe-elements/svg/pint-outline.svg +1 -1
  1092. package/dist/stripe-elements/svg/pint-sharp.svg +1 -1
  1093. package/dist/stripe-elements/svg/pint.svg +1 -1
  1094. package/dist/stripe-elements/svg/pizza-outline.svg +1 -1
  1095. package/dist/stripe-elements/svg/pizza-sharp.svg +1 -1
  1096. package/dist/stripe-elements/svg/pizza.svg +1 -1
  1097. package/dist/stripe-elements/svg/planet-outline.svg +1 -1
  1098. package/dist/stripe-elements/svg/planet-sharp.svg +1 -1
  1099. package/dist/stripe-elements/svg/planet.svg +1 -1
  1100. package/dist/stripe-elements/svg/play-back-circle-outline.svg +1 -1
  1101. package/dist/stripe-elements/svg/play-back-circle-sharp.svg +1 -1
  1102. package/dist/stripe-elements/svg/play-back-circle.svg +1 -1
  1103. package/dist/stripe-elements/svg/play-back-outline.svg +1 -1
  1104. package/dist/stripe-elements/svg/play-back-sharp.svg +1 -1
  1105. package/dist/stripe-elements/svg/play-back.svg +1 -1
  1106. package/dist/stripe-elements/svg/play-circle-outline.svg +1 -1
  1107. package/dist/stripe-elements/svg/play-circle-sharp.svg +1 -1
  1108. package/dist/stripe-elements/svg/play-circle.svg +1 -1
  1109. package/dist/stripe-elements/svg/play-forward-circle-outline.svg +1 -1
  1110. package/dist/stripe-elements/svg/play-forward-circle-sharp.svg +1 -1
  1111. package/dist/stripe-elements/svg/play-forward-circle.svg +1 -1
  1112. package/dist/stripe-elements/svg/play-forward-outline.svg +1 -1
  1113. package/dist/stripe-elements/svg/play-forward-sharp.svg +1 -1
  1114. package/dist/stripe-elements/svg/play-forward.svg +1 -1
  1115. package/dist/stripe-elements/svg/play-outline.svg +1 -1
  1116. package/dist/stripe-elements/svg/play-sharp.svg +1 -1
  1117. package/dist/stripe-elements/svg/play-skip-back-circle-outline.svg +1 -1
  1118. package/dist/stripe-elements/svg/play-skip-back-circle-sharp.svg +1 -1
  1119. package/dist/stripe-elements/svg/play-skip-back-circle.svg +1 -1
  1120. package/dist/stripe-elements/svg/play-skip-back-outline.svg +1 -1
  1121. package/dist/stripe-elements/svg/play-skip-back-sharp.svg +1 -1
  1122. package/dist/stripe-elements/svg/play-skip-back.svg +1 -1
  1123. package/dist/stripe-elements/svg/play-skip-forward-circle-outline.svg +1 -1
  1124. package/dist/stripe-elements/svg/play-skip-forward-circle-sharp.svg +1 -1
  1125. package/dist/stripe-elements/svg/play-skip-forward-circle.svg +1 -1
  1126. package/dist/stripe-elements/svg/play-skip-forward-outline.svg +1 -1
  1127. package/dist/stripe-elements/svg/play-skip-forward-sharp.svg +1 -1
  1128. package/dist/stripe-elements/svg/play-skip-forward.svg +1 -1
  1129. package/dist/stripe-elements/svg/play.svg +1 -1
  1130. package/dist/stripe-elements/svg/podium-outline.svg +1 -1
  1131. package/dist/stripe-elements/svg/podium-sharp.svg +1 -1
  1132. package/dist/stripe-elements/svg/podium.svg +1 -1
  1133. package/dist/stripe-elements/svg/power-outline.svg +1 -1
  1134. package/dist/stripe-elements/svg/power-sharp.svg +1 -1
  1135. package/dist/stripe-elements/svg/power.svg +1 -1
  1136. package/dist/stripe-elements/svg/pricetag-outline.svg +1 -1
  1137. package/dist/stripe-elements/svg/pricetag-sharp.svg +1 -1
  1138. package/dist/stripe-elements/svg/pricetag.svg +1 -1
  1139. package/dist/stripe-elements/svg/pricetags-outline.svg +1 -1
  1140. package/dist/stripe-elements/svg/pricetags-sharp.svg +1 -1
  1141. package/dist/stripe-elements/svg/pricetags.svg +1 -1
  1142. package/dist/stripe-elements/svg/print-outline.svg +1 -1
  1143. package/dist/stripe-elements/svg/print-sharp.svg +1 -1
  1144. package/dist/stripe-elements/svg/print.svg +1 -1
  1145. package/dist/stripe-elements/svg/prism-outline.svg +1 -1
  1146. package/dist/stripe-elements/svg/prism-sharp.svg +1 -1
  1147. package/dist/stripe-elements/svg/prism.svg +1 -1
  1148. package/dist/stripe-elements/svg/pulse-outline.svg +1 -1
  1149. package/dist/stripe-elements/svg/pulse-sharp.svg +1 -1
  1150. package/dist/stripe-elements/svg/pulse.svg +1 -1
  1151. package/dist/stripe-elements/svg/push-outline.svg +1 -1
  1152. package/dist/stripe-elements/svg/push-sharp.svg +1 -1
  1153. package/dist/stripe-elements/svg/push.svg +1 -1
  1154. package/dist/stripe-elements/svg/qr-code-outline.svg +1 -1
  1155. package/dist/stripe-elements/svg/qr-code-sharp.svg +1 -1
  1156. package/dist/stripe-elements/svg/qr-code.svg +1 -1
  1157. package/dist/stripe-elements/svg/radio-button-off-outline.svg +1 -1
  1158. package/dist/stripe-elements/svg/radio-button-off-sharp.svg +1 -1
  1159. package/dist/stripe-elements/svg/radio-button-off.svg +1 -1
  1160. package/dist/stripe-elements/svg/radio-button-on-outline.svg +1 -1
  1161. package/dist/stripe-elements/svg/radio-button-on-sharp.svg +1 -1
  1162. package/dist/stripe-elements/svg/radio-button-on.svg +1 -1
  1163. package/dist/stripe-elements/svg/radio-outline.svg +1 -1
  1164. package/dist/stripe-elements/svg/radio-sharp.svg +1 -1
  1165. package/dist/stripe-elements/svg/radio.svg +1 -1
  1166. package/dist/stripe-elements/svg/rainy-outline.svg +1 -1
  1167. package/dist/stripe-elements/svg/rainy-sharp.svg +1 -1
  1168. package/dist/stripe-elements/svg/rainy.svg +1 -1
  1169. package/dist/stripe-elements/svg/reader-outline.svg +1 -1
  1170. package/dist/stripe-elements/svg/reader-sharp.svg +1 -1
  1171. package/dist/stripe-elements/svg/reader.svg +1 -1
  1172. package/dist/stripe-elements/svg/receipt-outline.svg +1 -1
  1173. package/dist/stripe-elements/svg/receipt-sharp.svg +1 -1
  1174. package/dist/stripe-elements/svg/receipt.svg +1 -1
  1175. package/dist/stripe-elements/svg/recording-outline.svg +1 -1
  1176. package/dist/stripe-elements/svg/recording-sharp.svg +1 -1
  1177. package/dist/stripe-elements/svg/recording.svg +1 -1
  1178. package/dist/stripe-elements/svg/refresh-circle-outline.svg +1 -1
  1179. package/dist/stripe-elements/svg/refresh-circle-sharp.svg +1 -1
  1180. package/dist/stripe-elements/svg/refresh-circle.svg +1 -1
  1181. package/dist/stripe-elements/svg/refresh-outline.svg +1 -1
  1182. package/dist/stripe-elements/svg/refresh-sharp.svg +1 -1
  1183. package/dist/stripe-elements/svg/refresh.svg +1 -1
  1184. package/dist/stripe-elements/svg/reload-circle-outline.svg +1 -1
  1185. package/dist/stripe-elements/svg/reload-circle-sharp.svg +1 -1
  1186. package/dist/stripe-elements/svg/reload-circle.svg +1 -1
  1187. package/dist/stripe-elements/svg/reload-outline.svg +1 -1
  1188. package/dist/stripe-elements/svg/reload-sharp.svg +1 -1
  1189. package/dist/stripe-elements/svg/reload.svg +1 -1
  1190. package/dist/stripe-elements/svg/remove-circle-outline.svg +1 -1
  1191. package/dist/stripe-elements/svg/remove-circle-sharp.svg +1 -1
  1192. package/dist/stripe-elements/svg/remove-circle.svg +1 -1
  1193. package/dist/stripe-elements/svg/remove-outline.svg +1 -1
  1194. package/dist/stripe-elements/svg/remove-sharp.svg +1 -1
  1195. package/dist/stripe-elements/svg/remove.svg +1 -1
  1196. package/dist/stripe-elements/svg/reorder-four-outline.svg +1 -1
  1197. package/dist/stripe-elements/svg/reorder-four-sharp.svg +1 -1
  1198. package/dist/stripe-elements/svg/reorder-four.svg +1 -1
  1199. package/dist/stripe-elements/svg/reorder-three-outline.svg +1 -1
  1200. package/dist/stripe-elements/svg/reorder-three-sharp.svg +1 -1
  1201. package/dist/stripe-elements/svg/reorder-three.svg +1 -1
  1202. package/dist/stripe-elements/svg/reorder-two-outline.svg +1 -1
  1203. package/dist/stripe-elements/svg/reorder-two-sharp.svg +1 -1
  1204. package/dist/stripe-elements/svg/reorder-two.svg +1 -1
  1205. package/dist/stripe-elements/svg/repeat-outline.svg +1 -1
  1206. package/dist/stripe-elements/svg/repeat-sharp.svg +1 -1
  1207. package/dist/stripe-elements/svg/repeat.svg +1 -1
  1208. package/dist/stripe-elements/svg/resize-outline.svg +1 -1
  1209. package/dist/stripe-elements/svg/resize-sharp.svg +1 -1
  1210. package/dist/stripe-elements/svg/resize.svg +1 -1
  1211. package/dist/stripe-elements/svg/restaurant-outline.svg +1 -1
  1212. package/dist/stripe-elements/svg/restaurant-sharp.svg +1 -1
  1213. package/dist/stripe-elements/svg/restaurant.svg +1 -1
  1214. package/dist/stripe-elements/svg/return-down-back-outline.svg +1 -1
  1215. package/dist/stripe-elements/svg/return-down-back-sharp.svg +1 -1
  1216. package/dist/stripe-elements/svg/return-down-back.svg +1 -1
  1217. package/dist/stripe-elements/svg/return-down-forward-outline.svg +1 -1
  1218. package/dist/stripe-elements/svg/return-down-forward-sharp.svg +1 -1
  1219. package/dist/stripe-elements/svg/return-down-forward.svg +1 -1
  1220. package/dist/stripe-elements/svg/return-up-back-outline.svg +1 -1
  1221. package/dist/stripe-elements/svg/return-up-back-sharp.svg +1 -1
  1222. package/dist/stripe-elements/svg/return-up-back.svg +1 -1
  1223. package/dist/stripe-elements/svg/return-up-forward-outline.svg +1 -1
  1224. package/dist/stripe-elements/svg/return-up-forward-sharp.svg +1 -1
  1225. package/dist/stripe-elements/svg/return-up-forward.svg +1 -1
  1226. package/dist/stripe-elements/svg/ribbon-outline.svg +1 -1
  1227. package/dist/stripe-elements/svg/ribbon-sharp.svg +1 -1
  1228. package/dist/stripe-elements/svg/ribbon.svg +1 -1
  1229. package/dist/stripe-elements/svg/rocket-outline.svg +1 -1
  1230. package/dist/stripe-elements/svg/rocket-sharp.svg +1 -1
  1231. package/dist/stripe-elements/svg/rocket.svg +1 -1
  1232. package/dist/stripe-elements/svg/rose-outline.svg +1 -1
  1233. package/dist/stripe-elements/svg/rose-sharp.svg +1 -1
  1234. package/dist/stripe-elements/svg/rose.svg +1 -1
  1235. package/dist/stripe-elements/svg/sad-outline.svg +1 -1
  1236. package/dist/stripe-elements/svg/sad-sharp.svg +1 -1
  1237. package/dist/stripe-elements/svg/sad.svg +1 -1
  1238. package/dist/stripe-elements/svg/save-outline.svg +1 -1
  1239. package/dist/stripe-elements/svg/save-sharp.svg +1 -1
  1240. package/dist/stripe-elements/svg/save.svg +1 -1
  1241. package/dist/stripe-elements/svg/scale-outline.svg +1 -1
  1242. package/dist/stripe-elements/svg/scale-sharp.svg +1 -1
  1243. package/dist/stripe-elements/svg/scale.svg +1 -1
  1244. package/dist/stripe-elements/svg/scan-circle-outline.svg +1 -1
  1245. package/dist/stripe-elements/svg/scan-circle-sharp.svg +1 -1
  1246. package/dist/stripe-elements/svg/scan-circle.svg +1 -1
  1247. package/dist/stripe-elements/svg/scan-outline.svg +1 -1
  1248. package/dist/stripe-elements/svg/scan-sharp.svg +1 -1
  1249. package/dist/stripe-elements/svg/scan.svg +1 -1
  1250. package/dist/stripe-elements/svg/school-outline.svg +1 -1
  1251. package/dist/stripe-elements/svg/school-sharp.svg +1 -1
  1252. package/dist/stripe-elements/svg/school.svg +1 -1
  1253. package/dist/stripe-elements/svg/search-circle-outline.svg +1 -1
  1254. package/dist/stripe-elements/svg/search-circle-sharp.svg +1 -1
  1255. package/dist/stripe-elements/svg/search-circle.svg +1 -1
  1256. package/dist/stripe-elements/svg/search-outline.svg +1 -1
  1257. package/dist/stripe-elements/svg/search-sharp.svg +1 -1
  1258. package/dist/stripe-elements/svg/search.svg +1 -1
  1259. package/dist/stripe-elements/svg/send-outline.svg +1 -1
  1260. package/dist/stripe-elements/svg/send-sharp.svg +1 -1
  1261. package/dist/stripe-elements/svg/send.svg +1 -1
  1262. package/dist/stripe-elements/svg/server-outline.svg +1 -1
  1263. package/dist/stripe-elements/svg/server-sharp.svg +1 -1
  1264. package/dist/stripe-elements/svg/server.svg +1 -1
  1265. package/dist/stripe-elements/svg/settings-outline.svg +1 -1
  1266. package/dist/stripe-elements/svg/settings-sharp.svg +1 -1
  1267. package/dist/stripe-elements/svg/settings.svg +1 -1
  1268. package/dist/stripe-elements/svg/shapes-outline.svg +1 -1
  1269. package/dist/stripe-elements/svg/shapes-sharp.svg +1 -1
  1270. package/dist/stripe-elements/svg/shapes.svg +1 -1
  1271. package/dist/stripe-elements/svg/share-outline.svg +1 -1
  1272. package/dist/stripe-elements/svg/share-sharp.svg +1 -1
  1273. package/dist/stripe-elements/svg/share-social-outline.svg +1 -1
  1274. package/dist/stripe-elements/svg/share-social-sharp.svg +1 -1
  1275. package/dist/stripe-elements/svg/share-social.svg +1 -1
  1276. package/dist/stripe-elements/svg/share.svg +1 -1
  1277. package/dist/stripe-elements/svg/shield-checkmark-outline.svg +1 -1
  1278. package/dist/stripe-elements/svg/shield-checkmark-sharp.svg +1 -1
  1279. package/dist/stripe-elements/svg/shield-checkmark.svg +1 -1
  1280. package/dist/stripe-elements/svg/shield-half-outline.svg +1 -1
  1281. package/dist/stripe-elements/svg/shield-half-sharp.svg +1 -1
  1282. package/dist/stripe-elements/svg/shield-half.svg +1 -1
  1283. package/dist/stripe-elements/svg/shield-outline.svg +1 -1
  1284. package/dist/stripe-elements/svg/shield-sharp.svg +1 -1
  1285. package/dist/stripe-elements/svg/shield.svg +1 -1
  1286. package/dist/stripe-elements/svg/shirt-outline.svg +1 -1
  1287. package/dist/stripe-elements/svg/shirt-sharp.svg +1 -1
  1288. package/dist/stripe-elements/svg/shirt.svg +1 -1
  1289. package/dist/stripe-elements/svg/shuffle-outline.svg +1 -1
  1290. package/dist/stripe-elements/svg/shuffle-sharp.svg +1 -1
  1291. package/dist/stripe-elements/svg/shuffle.svg +1 -1
  1292. package/dist/stripe-elements/svg/skull-outline.svg +1 -1
  1293. package/dist/stripe-elements/svg/skull-sharp.svg +1 -1
  1294. package/dist/stripe-elements/svg/skull.svg +1 -1
  1295. package/dist/stripe-elements/svg/snow-outline.svg +1 -1
  1296. package/dist/stripe-elements/svg/snow-sharp.svg +1 -1
  1297. package/dist/stripe-elements/svg/snow.svg +1 -1
  1298. package/dist/stripe-elements/svg/sparkles-outline.svg +1 -1
  1299. package/dist/stripe-elements/svg/sparkles-sharp.svg +1 -1
  1300. package/dist/stripe-elements/svg/sparkles.svg +1 -1
  1301. package/dist/stripe-elements/svg/speedometer-outline.svg +1 -1
  1302. package/dist/stripe-elements/svg/speedometer-sharp.svg +1 -1
  1303. package/dist/stripe-elements/svg/speedometer.svg +1 -1
  1304. package/dist/stripe-elements/svg/square-outline.svg +1 -1
  1305. package/dist/stripe-elements/svg/square-sharp.svg +1 -1
  1306. package/dist/stripe-elements/svg/square.svg +1 -1
  1307. package/dist/stripe-elements/svg/star-half-outline.svg +1 -1
  1308. package/dist/stripe-elements/svg/star-half-sharp.svg +1 -1
  1309. package/dist/stripe-elements/svg/star-half.svg +1 -1
  1310. package/dist/stripe-elements/svg/star-outline.svg +1 -1
  1311. package/dist/stripe-elements/svg/star-sharp.svg +1 -1
  1312. package/dist/stripe-elements/svg/star.svg +1 -1
  1313. package/dist/stripe-elements/svg/stats-chart-outline.svg +1 -1
  1314. package/dist/stripe-elements/svg/stats-chart-sharp.svg +1 -1
  1315. package/dist/stripe-elements/svg/stats-chart.svg +1 -1
  1316. package/dist/stripe-elements/svg/stop-circle-outline.svg +1 -1
  1317. package/dist/stripe-elements/svg/stop-circle-sharp.svg +1 -1
  1318. package/dist/stripe-elements/svg/stop-circle.svg +1 -1
  1319. package/dist/stripe-elements/svg/stop-outline.svg +1 -1
  1320. package/dist/stripe-elements/svg/stop-sharp.svg +1 -1
  1321. package/dist/stripe-elements/svg/stop.svg +1 -1
  1322. package/dist/stripe-elements/svg/stopwatch-outline.svg +1 -1
  1323. package/dist/stripe-elements/svg/stopwatch-sharp.svg +1 -1
  1324. package/dist/stripe-elements/svg/stopwatch.svg +1 -1
  1325. package/dist/stripe-elements/svg/storefront-outline.svg +1 -1
  1326. package/dist/stripe-elements/svg/storefront-sharp.svg +1 -1
  1327. package/dist/stripe-elements/svg/storefront.svg +1 -1
  1328. package/dist/stripe-elements/svg/subway-outline.svg +1 -1
  1329. package/dist/stripe-elements/svg/subway-sharp.svg +1 -1
  1330. package/dist/stripe-elements/svg/subway.svg +1 -1
  1331. package/dist/stripe-elements/svg/sunny-outline.svg +1 -1
  1332. package/dist/stripe-elements/svg/sunny-sharp.svg +1 -1
  1333. package/dist/stripe-elements/svg/sunny.svg +1 -1
  1334. package/dist/stripe-elements/svg/swap-horizontal-outline.svg +1 -1
  1335. package/dist/stripe-elements/svg/swap-horizontal-sharp.svg +1 -1
  1336. package/dist/stripe-elements/svg/swap-horizontal.svg +1 -1
  1337. package/dist/stripe-elements/svg/swap-vertical-outline.svg +1 -1
  1338. package/dist/stripe-elements/svg/swap-vertical-sharp.svg +1 -1
  1339. package/dist/stripe-elements/svg/swap-vertical.svg +1 -1
  1340. package/dist/stripe-elements/svg/sync-circle-outline.svg +1 -1
  1341. package/dist/stripe-elements/svg/sync-circle-sharp.svg +1 -1
  1342. package/dist/stripe-elements/svg/sync-circle.svg +1 -1
  1343. package/dist/stripe-elements/svg/sync-outline.svg +1 -1
  1344. package/dist/stripe-elements/svg/sync-sharp.svg +1 -1
  1345. package/dist/stripe-elements/svg/sync.svg +1 -1
  1346. package/dist/stripe-elements/svg/tablet-landscape-outline.svg +1 -1
  1347. package/dist/stripe-elements/svg/tablet-landscape-sharp.svg +1 -1
  1348. package/dist/stripe-elements/svg/tablet-landscape.svg +1 -1
  1349. package/dist/stripe-elements/svg/tablet-portrait-outline.svg +1 -1
  1350. package/dist/stripe-elements/svg/tablet-portrait-sharp.svg +1 -1
  1351. package/dist/stripe-elements/svg/tablet-portrait.svg +1 -1
  1352. package/dist/stripe-elements/svg/telescope-outline.svg +1 -1
  1353. package/dist/stripe-elements/svg/telescope-sharp.svg +1 -1
  1354. package/dist/stripe-elements/svg/telescope.svg +1 -1
  1355. package/dist/stripe-elements/svg/tennisball-outline.svg +1 -1
  1356. package/dist/stripe-elements/svg/tennisball-sharp.svg +1 -1
  1357. package/dist/stripe-elements/svg/tennisball.svg +1 -1
  1358. package/dist/stripe-elements/svg/terminal-outline.svg +1 -1
  1359. package/dist/stripe-elements/svg/terminal-sharp.svg +1 -1
  1360. package/dist/stripe-elements/svg/terminal.svg +1 -1
  1361. package/dist/stripe-elements/svg/text-outline.svg +1 -1
  1362. package/dist/stripe-elements/svg/text-sharp.svg +1 -1
  1363. package/dist/stripe-elements/svg/text.svg +1 -1
  1364. package/dist/stripe-elements/svg/thermometer-outline.svg +1 -1
  1365. package/dist/stripe-elements/svg/thermometer-sharp.svg +1 -1
  1366. package/dist/stripe-elements/svg/thermometer.svg +1 -1
  1367. package/dist/stripe-elements/svg/thumbs-down-outline.svg +1 -1
  1368. package/dist/stripe-elements/svg/thumbs-down-sharp.svg +1 -1
  1369. package/dist/stripe-elements/svg/thumbs-down.svg +1 -1
  1370. package/dist/stripe-elements/svg/thumbs-up-outline.svg +1 -1
  1371. package/dist/stripe-elements/svg/thumbs-up-sharp.svg +1 -1
  1372. package/dist/stripe-elements/svg/thumbs-up.svg +1 -1
  1373. package/dist/stripe-elements/svg/thunderstorm-outline.svg +1 -1
  1374. package/dist/stripe-elements/svg/thunderstorm-sharp.svg +1 -1
  1375. package/dist/stripe-elements/svg/thunderstorm.svg +1 -1
  1376. package/dist/stripe-elements/svg/ticket-outline.svg +1 -1
  1377. package/dist/stripe-elements/svg/ticket-sharp.svg +1 -1
  1378. package/dist/stripe-elements/svg/ticket.svg +1 -1
  1379. package/dist/stripe-elements/svg/time-outline.svg +1 -1
  1380. package/dist/stripe-elements/svg/time-sharp.svg +1 -1
  1381. package/dist/stripe-elements/svg/time.svg +1 -1
  1382. package/dist/stripe-elements/svg/timer-outline.svg +1 -1
  1383. package/dist/stripe-elements/svg/timer-sharp.svg +1 -1
  1384. package/dist/stripe-elements/svg/timer.svg +1 -1
  1385. package/dist/stripe-elements/svg/today-outline.svg +1 -1
  1386. package/dist/stripe-elements/svg/today-sharp.svg +1 -1
  1387. package/dist/stripe-elements/svg/today.svg +1 -1
  1388. package/dist/stripe-elements/svg/toggle-outline.svg +1 -1
  1389. package/dist/stripe-elements/svg/toggle-sharp.svg +1 -1
  1390. package/dist/stripe-elements/svg/toggle.svg +1 -1
  1391. package/dist/stripe-elements/svg/trail-sign-outline.svg +1 -1
  1392. package/dist/stripe-elements/svg/trail-sign-sharp.svg +1 -1
  1393. package/dist/stripe-elements/svg/trail-sign.svg +1 -1
  1394. package/dist/stripe-elements/svg/train-outline.svg +1 -1
  1395. package/dist/stripe-elements/svg/train-sharp.svg +1 -1
  1396. package/dist/stripe-elements/svg/train.svg +1 -1
  1397. package/dist/stripe-elements/svg/transgender-outline.svg +1 -1
  1398. package/dist/stripe-elements/svg/transgender-sharp.svg +1 -1
  1399. package/dist/stripe-elements/svg/transgender.svg +1 -1
  1400. package/dist/stripe-elements/svg/trash-bin-outline.svg +1 -1
  1401. package/dist/stripe-elements/svg/trash-bin-sharp.svg +1 -1
  1402. package/dist/stripe-elements/svg/trash-bin.svg +1 -1
  1403. package/dist/stripe-elements/svg/trash-outline.svg +1 -1
  1404. package/dist/stripe-elements/svg/trash-sharp.svg +1 -1
  1405. package/dist/stripe-elements/svg/trash.svg +1 -1
  1406. package/dist/stripe-elements/svg/trending-down-outline.svg +1 -1
  1407. package/dist/stripe-elements/svg/trending-down-sharp.svg +1 -1
  1408. package/dist/stripe-elements/svg/trending-down.svg +1 -1
  1409. package/dist/stripe-elements/svg/trending-up-outline.svg +1 -1
  1410. package/dist/stripe-elements/svg/trending-up-sharp.svg +1 -1
  1411. package/dist/stripe-elements/svg/trending-up.svg +1 -1
  1412. package/dist/stripe-elements/svg/triangle-outline.svg +1 -1
  1413. package/dist/stripe-elements/svg/triangle-sharp.svg +1 -1
  1414. package/dist/stripe-elements/svg/triangle.svg +1 -1
  1415. package/dist/stripe-elements/svg/trophy-outline.svg +1 -1
  1416. package/dist/stripe-elements/svg/trophy-sharp.svg +1 -1
  1417. package/dist/stripe-elements/svg/trophy.svg +1 -1
  1418. package/dist/stripe-elements/svg/tv-outline.svg +1 -1
  1419. package/dist/stripe-elements/svg/tv-sharp.svg +1 -1
  1420. package/dist/stripe-elements/svg/tv.svg +1 -1
  1421. package/dist/stripe-elements/svg/umbrella-outline.svg +1 -1
  1422. package/dist/stripe-elements/svg/umbrella-sharp.svg +1 -1
  1423. package/dist/stripe-elements/svg/umbrella.svg +1 -1
  1424. package/dist/stripe-elements/svg/unlink-outline.svg +1 -1
  1425. package/dist/stripe-elements/svg/unlink-sharp.svg +1 -1
  1426. package/dist/stripe-elements/svg/unlink.svg +1 -1
  1427. package/dist/stripe-elements/svg/videocam-off-outline.svg +1 -1
  1428. package/dist/stripe-elements/svg/videocam-off-sharp.svg +1 -1
  1429. package/dist/stripe-elements/svg/videocam-off.svg +1 -1
  1430. package/dist/stripe-elements/svg/videocam-outline.svg +1 -1
  1431. package/dist/stripe-elements/svg/videocam-sharp.svg +1 -1
  1432. package/dist/stripe-elements/svg/videocam.svg +1 -1
  1433. package/dist/stripe-elements/svg/volume-high-outline.svg +1 -1
  1434. package/dist/stripe-elements/svg/volume-high-sharp.svg +1 -1
  1435. package/dist/stripe-elements/svg/volume-high.svg +1 -1
  1436. package/dist/stripe-elements/svg/volume-low-outline.svg +1 -1
  1437. package/dist/stripe-elements/svg/volume-low-sharp.svg +1 -1
  1438. package/dist/stripe-elements/svg/volume-low.svg +1 -1
  1439. package/dist/stripe-elements/svg/volume-medium-outline.svg +1 -1
  1440. package/dist/stripe-elements/svg/volume-medium-sharp.svg +1 -1
  1441. package/dist/stripe-elements/svg/volume-medium.svg +1 -1
  1442. package/dist/stripe-elements/svg/volume-mute-outline.svg +1 -1
  1443. package/dist/stripe-elements/svg/volume-mute-sharp.svg +1 -1
  1444. package/dist/stripe-elements/svg/volume-mute.svg +1 -1
  1445. package/dist/stripe-elements/svg/volume-off-outline.svg +1 -1
  1446. package/dist/stripe-elements/svg/volume-off-sharp.svg +1 -1
  1447. package/dist/stripe-elements/svg/volume-off.svg +1 -1
  1448. package/dist/stripe-elements/svg/walk-outline.svg +1 -1
  1449. package/dist/stripe-elements/svg/walk-sharp.svg +1 -1
  1450. package/dist/stripe-elements/svg/walk.svg +1 -1
  1451. package/dist/stripe-elements/svg/wallet-outline.svg +1 -1
  1452. package/dist/stripe-elements/svg/wallet-sharp.svg +1 -1
  1453. package/dist/stripe-elements/svg/wallet.svg +1 -1
  1454. package/dist/stripe-elements/svg/warning-outline.svg +1 -1
  1455. package/dist/stripe-elements/svg/warning-sharp.svg +1 -1
  1456. package/dist/stripe-elements/svg/warning.svg +1 -1
  1457. package/dist/stripe-elements/svg/watch-outline.svg +1 -1
  1458. package/dist/stripe-elements/svg/watch-sharp.svg +1 -1
  1459. package/dist/stripe-elements/svg/watch.svg +1 -1
  1460. package/dist/stripe-elements/svg/water-outline.svg +1 -1
  1461. package/dist/stripe-elements/svg/water-sharp.svg +1 -1
  1462. package/dist/stripe-elements/svg/water.svg +1 -1
  1463. package/dist/stripe-elements/svg/wifi-outline.svg +1 -1
  1464. package/dist/stripe-elements/svg/wifi-sharp.svg +1 -1
  1465. package/dist/stripe-elements/svg/wifi.svg +1 -1
  1466. package/dist/stripe-elements/svg/wine-outline.svg +1 -1
  1467. package/dist/stripe-elements/svg/wine-sharp.svg +1 -1
  1468. package/dist/stripe-elements/svg/wine.svg +1 -1
  1469. package/dist/stripe-elements/svg/woman-outline.svg +1 -1
  1470. package/dist/stripe-elements/svg/woman-sharp.svg +1 -1
  1471. package/dist/stripe-elements/svg/woman.svg +1 -1
  1472. package/dist/types/components/stripe-card-element/stripe-card-element.d.ts +264 -0
  1473. package/dist/types/components/stripe-card-element-modal/stripe-card-element-modal.d.ts +124 -0
  1474. package/dist/types/components/stripe-modal/stripe-modal.d.ts +31 -0
  1475. package/dist/types/components/stripe-payment-request-button/stripe-payment-request-button.d.ts +141 -136
  1476. package/dist/types/components.d.ts +231 -155
  1477. package/dist/types/interfaces.d.ts +17 -10
  1478. package/dist/types/services/card-element-manager.d.ts +56 -0
  1479. package/dist/types/services/factory.d.ts +22 -0
  1480. package/dist/types/services/interfaces.d.ts +95 -0
  1481. package/dist/types/services/stripe-service.d.ts +61 -0
  1482. package/dist/types/stencil-public-runtime.d.ts +137 -19
  1483. package/dist/types/utils/error.d.ts +10 -0
  1484. package/dist/types/utils/platform.d.ts +18 -18
  1485. package/dist/types/utils/utils.d.ts +1 -1
  1486. package/loader/cdn.js +1 -3
  1487. package/loader/index.cjs.js +1 -3
  1488. package/loader/index.d.ts +4 -1
  1489. package/loader/index.es2017.js +1 -3
  1490. package/loader/index.js +1 -3
  1491. package/package.json +26 -25
  1492. package/readme.md +29 -23
  1493. package/dist/cjs/index-0cec7387.js +0 -2053
  1494. package/dist/cjs/index-0cec7387.js.map +0 -1
  1495. package/dist/cjs/ion-icon.cjs.entry.js.map +0 -1
  1496. package/dist/cjs/stripe-payment-request-button.cjs.entry.js.map +0 -1
  1497. package/dist/cjs/stripe-payment-sheet.cjs.entry.js +0 -96
  1498. package/dist/cjs/stripe-payment-sheet.cjs.entry.js.map +0 -1
  1499. package/dist/cjs/stripe-payment_2.cjs.entry.js +0 -3509
  1500. package/dist/cjs/stripe-payment_2.cjs.entry.js.map +0 -1
  1501. package/dist/cjs/stripe.esm-603f3c17.js +0 -133
  1502. package/dist/cjs/stripe.esm-603f3c17.js.map +0 -1
  1503. package/dist/collection/components/stripe-element-modal/stripe-element-modal.js +0 -161
  1504. package/dist/collection/components/stripe-element-modal/stripe-element-modal.js.map +0 -1
  1505. package/dist/collection/components/stripe-element-modal/test/stripe-element-modal.e2e.js +0 -10
  1506. package/dist/collection/components/stripe-element-modal/test/stripe-element-modal.e2e.js.map +0 -1
  1507. package/dist/collection/components/stripe-element-modal/test/stripe-element-modal.spec.js +0 -120
  1508. package/dist/collection/components/stripe-element-modal/test/stripe-element-modal.spec.js.map +0 -1
  1509. package/dist/collection/components/stripe-payment-request-button/test/stripe-payment-request-button.e2e.js +0 -10
  1510. package/dist/collection/components/stripe-payment-request-button/test/stripe-payment-request-button.e2e.js.map +0 -1
  1511. package/dist/collection/components/stripe-payment-request-button/test/stripe-payment-request-button.spec.js +0 -18
  1512. package/dist/collection/components/stripe-payment-request-button/test/stripe-payment-request-button.spec.js.map +0 -1
  1513. package/dist/collection/components/stripe-payment-sheet/stripe-payment-sheet.js +0 -808
  1514. package/dist/collection/components/stripe-payment-sheet/stripe-payment-sheet.js.map +0 -1
  1515. package/dist/collection/components/stripe-payment-sheet/test/stripe-payment-sheet.e2e.js +0 -10
  1516. package/dist/collection/components/stripe-payment-sheet/test/stripe-payment-sheet.e2e.js.map +0 -1
  1517. package/dist/collection/components/stripe-payment-sheet/test/stripe-payment-sheet.spec.js +0 -111
  1518. package/dist/collection/components/stripe-payment-sheet/test/stripe-payment-sheet.spec.js.map +0 -1
  1519. package/dist/collection/components/stripe-payment-sheet-modal/stripe-payment-sheet-modal.js +0 -487
  1520. package/dist/collection/components/stripe-payment-sheet-modal/stripe-payment-sheet-modal.js.map +0 -1
  1521. package/dist/collection/components/stripe-payment-sheet-modal/test/stripe-payment-sheet-modal.e2e.js +0 -10
  1522. package/dist/collection/components/stripe-payment-sheet-modal/test/stripe-payment-sheet-modal.e2e.js.map +0 -1
  1523. package/dist/collection/components/stripe-payment-sheet-modal/test/stripe-payment-sheet-modal.spec.js +0 -16
  1524. package/dist/collection/components/stripe-payment-sheet-modal/test/stripe-payment-sheet-modal.spec.js.map +0 -1
  1525. package/dist/components/stripe-element-modal.js +0 -75
  1526. package/dist/components/stripe-element-modal.js.map +0 -1
  1527. package/dist/components/stripe-payment-sheet.d.ts +0 -11
  1528. package/dist/components/stripe-payment-sheet.js +0 -153
  1529. package/dist/components/stripe-payment-sheet.js.map +0 -1
  1530. package/dist/components/stripe-payment-sheet2.js +0 -3404
  1531. package/dist/components/stripe-payment-sheet2.js.map +0 -1
  1532. package/dist/components/stripe-payment.js +0 -8
  1533. package/dist/components/stripe-payment.js.map +0 -1
  1534. package/dist/components/stripe-sheet.js +0 -8
  1535. package/dist/components/stripe-sheet.js.map +0 -1
  1536. package/dist/esm/index-58f9666b.js +0 -2023
  1537. package/dist/esm/index-58f9666b.js.map +0 -1
  1538. package/dist/esm/polyfills/core-js.js +0 -11
  1539. package/dist/esm/polyfills/css-shim.js +0 -1
  1540. package/dist/esm/polyfills/dom.js +0 -79
  1541. package/dist/esm/polyfills/es5-html-element.js +0 -1
  1542. package/dist/esm/polyfills/index.js +0 -34
  1543. package/dist/esm/polyfills/system.js +0 -6
  1544. package/dist/esm/stripe-payment-sheet.entry.js +0 -92
  1545. package/dist/esm/stripe-payment-sheet.entry.js.map +0 -1
  1546. package/dist/esm/stripe-payment_2.entry.js +0 -3504
  1547. package/dist/esm/stripe-payment_2.entry.js.map +0 -1
  1548. package/dist/esm/stripe.esm-bad47977.js +0 -131
  1549. package/dist/esm/stripe.esm-bad47977.js.map +0 -1
  1550. package/dist/node_modules/ionicons/dist/collection/components/icon/icon.css +0 -143
  1551. package/dist/stripe-elements/p-06c00b5c.entry.js +0 -2
  1552. package/dist/stripe-elements/p-06c00b5c.entry.js.map +0 -1
  1553. package/dist/stripe-elements/p-1b4515a4.js +0 -3
  1554. package/dist/stripe-elements/p-1b4515a4.js.map +0 -1
  1555. package/dist/stripe-elements/p-3458123a.entry.js +0 -2
  1556. package/dist/stripe-elements/p-3458123a.entry.js.map +0 -1
  1557. package/dist/stripe-elements/p-3a90ad5d.entry.js +0 -2
  1558. package/dist/stripe-elements/p-3a90ad5d.entry.js.map +0 -1
  1559. package/dist/stripe-elements/p-b10d8613.js +0 -2
  1560. package/dist/stripe-elements/p-b10d8613.js.map +0 -1
  1561. package/dist/stripe-elements/p-c5a2b2e8.entry.js +0 -2
  1562. package/dist/stripe-elements/p-c5a2b2e8.entry.js.map +0 -1
  1563. package/dist/types/components/stripe-element-modal/stripe-element-modal.d.ts +0 -31
  1564. package/dist/types/components/stripe-payment-sheet/stripe-payment-sheet.d.ts +0 -278
  1565. package/dist/types/components/stripe-payment-sheet-modal/stripe-payment-sheet-modal.d.ts +0 -124
  1566. package/loader/package.json +0 -11
  1567. /package/dist/collection/components/{stripe-payment-sheet-modal/stripe-payment-sheet-modal.css → stripe-card-element-modal/stripe-card-element-modal.css} +0 -0
  1568. /package/dist/collection/components/{stripe-element-modal/stripe-element-modal.css → stripe-modal/stripe-modal.css} +0 -0
@@ -1,3509 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-0cec7387.js');
6
- const stripe_esm = require('./stripe.esm-603f3c17.js');
7
-
8
- const getPlatforms = (win) => setupPlatforms(win);
9
- const setupPlatforms = (win = window) => {
10
- if (typeof win === 'undefined') {
11
- return [];
12
- }
13
- win.Ionic = win.Ionic || {};
14
- let platforms = win.Ionic.platforms;
15
- if (platforms == null) {
16
- platforms = win.Ionic.platforms = detectPlatforms(win);
17
- platforms.forEach(p => win.document.documentElement.classList.add(`plt-${p}`));
18
- }
19
- return platforms;
20
- };
21
- const detectPlatforms = (win) => Object.keys(PLATFORMS_MAP).filter(p => PLATFORMS_MAP[p](win));
22
- const isMobileWeb = (win) => isMobile(win) && !isHybrid(win);
23
- const isIpad = (win) => {
24
- // iOS 12 and below
25
- if (testUserAgent(win, /iPad/i)) {
26
- return true;
27
- }
28
- // iOS 13+
29
- if (testUserAgent(win, /Macintosh/i) && isMobile(win)) {
30
- return true;
31
- }
32
- return false;
33
- };
34
- const isIphone = (win) => testUserAgent(win, /iPhone/i);
35
- const isIOS = (win) => testUserAgent(win, /iPhone|iPod/i) || isIpad(win);
36
- const isAndroid = (win) => testUserAgent(win, /android|sink/i);
37
- const isAndroidTablet = (win) => {
38
- return isAndroid(win) && !testUserAgent(win, /mobile/i);
39
- };
40
- const isPhablet = (win) => {
41
- const width = win.innerWidth;
42
- const height = win.innerHeight;
43
- const smallest = Math.min(width, height);
44
- const largest = Math.max(width, height);
45
- return smallest > 390 && smallest < 520 && largest > 620 && largest < 800;
46
- };
47
- const isTablet = (win) => {
48
- const width = win.innerWidth;
49
- const height = win.innerHeight;
50
- const smallest = Math.min(width, height);
51
- const largest = Math.max(width, height);
52
- return isIpad(win) || isAndroidTablet(win) || (smallest > 460 && smallest < 820 && largest > 780 && largest < 1400);
53
- };
54
- const isMobile = (win) => matchMedia(win, '(any-pointer:coarse)');
55
- const isDesktop = (win) => !isMobile(win);
56
- const isHybrid = (win) => isCordova(win) || isCapacitorNative(win);
57
- const isCordova = (win) => !!(win['cordova'] || win['phonegap'] || win['PhoneGap']);
58
- const isCapacitorNative = (win) => {
59
- const capacitor = win['Capacitor'];
60
- return !!(capacitor && capacitor.isNative);
61
- };
62
- const isElectron = (win) => testUserAgent(win, /electron/i);
63
- const isPWA = (win) => !!(win.matchMedia('(display-mode: standalone)').matches || win.navigator.standalone);
64
- const testUserAgent = (win, expr) => expr.test(win.navigator.userAgent);
65
- const matchMedia = (win, query) => win.matchMedia(query).matches;
66
- const PLATFORMS_MAP = {
67
- ipad: isIpad,
68
- iphone: isIphone,
69
- ios: isIOS,
70
- android: isAndroid,
71
- phablet: isPhablet,
72
- tablet: isTablet,
73
- cordova: isCordova,
74
- capacitor: isCapacitorNative,
75
- electron: isElectron,
76
- pwa: isPWA,
77
- mobile: isMobile,
78
- mobileweb: isMobileWeb,
79
- desktop: isDesktop,
80
- hybrid: isHybrid,
81
- };
82
-
83
- const checkPlatform = () => {
84
- const device = getPlatforms();
85
- if (device.includes('ios')) {
86
- return 'ios';
87
- }
88
- if (device.includes('android')) {
89
- return 'android';
90
- }
91
- };
92
- const waitForElm = (el, selector) => {
93
- return new Promise(resolve => {
94
- if (el.querySelector(selector)) {
95
- return resolve(el.querySelector(selector));
96
- }
97
- const observer = new MutationObserver(() => {
98
- if (el.querySelector(selector)) {
99
- resolve(el.querySelector(selector));
100
- observer.disconnect();
101
- }
102
- });
103
- observer.observe(el, {
104
- childList: true,
105
- subtree: true
106
- });
107
- });
108
- };
109
-
110
- function _typeof(obj) {
111
- "@babel/helpers - typeof";
112
-
113
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
114
- return typeof obj;
115
- } : function (obj) {
116
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
117
- }, _typeof(obj);
118
- }
119
-
120
- function _classCallCheck(instance, Constructor) {
121
- if (!(instance instanceof Constructor)) {
122
- throw new TypeError("Cannot call a class as a function");
123
- }
124
- }
125
-
126
- function _toPrimitive(input, hint) {
127
- if (_typeof(input) !== "object" || input === null) return input;
128
- var prim = input[Symbol.toPrimitive];
129
- if (prim !== undefined) {
130
- var res = prim.call(input, hint || "default");
131
- if (_typeof(res) !== "object") return res;
132
- throw new TypeError("@@toPrimitive must return a primitive value.");
133
- }
134
- return (hint === "string" ? String : Number)(input);
135
- }
136
-
137
- function _toPropertyKey(arg) {
138
- var key = _toPrimitive(arg, "string");
139
- return _typeof(key) === "symbol" ? key : String(key);
140
- }
141
-
142
- function _defineProperties(target, props) {
143
- for (var i = 0; i < props.length; i++) {
144
- var descriptor = props[i];
145
- descriptor.enumerable = descriptor.enumerable || false;
146
- descriptor.configurable = true;
147
- if ("value" in descriptor) descriptor.writable = true;
148
- Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
149
- }
150
- }
151
- function _createClass(Constructor, protoProps, staticProps) {
152
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
153
- if (staticProps) _defineProperties(Constructor, staticProps);
154
- Object.defineProperty(Constructor, "prototype", {
155
- writable: false
156
- });
157
- return Constructor;
158
- }
159
-
160
- function _assertThisInitialized(self) {
161
- if (self === void 0) {
162
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
163
- }
164
- return self;
165
- }
166
-
167
- function _setPrototypeOf(o, p) {
168
- _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
169
- o.__proto__ = p;
170
- return o;
171
- };
172
- return _setPrototypeOf(o, p);
173
- }
174
-
175
- function _inherits(subClass, superClass) {
176
- if (typeof superClass !== "function" && superClass !== null) {
177
- throw new TypeError("Super expression must either be null or a function");
178
- }
179
- subClass.prototype = Object.create(superClass && superClass.prototype, {
180
- constructor: {
181
- value: subClass,
182
- writable: true,
183
- configurable: true
184
- }
185
- });
186
- Object.defineProperty(subClass, "prototype", {
187
- writable: false
188
- });
189
- if (superClass) _setPrototypeOf(subClass, superClass);
190
- }
191
-
192
- function _possibleConstructorReturn(self, call) {
193
- if (call && (_typeof(call) === "object" || typeof call === "function")) {
194
- return call;
195
- } else if (call !== void 0) {
196
- throw new TypeError("Derived constructors may only return object or undefined");
197
- }
198
- return _assertThisInitialized(self);
199
- }
200
-
201
- function _getPrototypeOf(o) {
202
- _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
203
- return o.__proto__ || Object.getPrototypeOf(o);
204
- };
205
- return _getPrototypeOf(o);
206
- }
207
-
208
- function _defineProperty(obj, key, value) {
209
- key = _toPropertyKey(key);
210
- if (key in obj) {
211
- Object.defineProperty(obj, key, {
212
- value: value,
213
- enumerable: true,
214
- configurable: true,
215
- writable: true
216
- });
217
- } else {
218
- obj[key] = value;
219
- }
220
- return obj;
221
- }
222
-
223
- function _arrayWithHoles(arr) {
224
- if (Array.isArray(arr)) return arr;
225
- }
226
-
227
- function _iterableToArray(iter) {
228
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
229
- }
230
-
231
- function _arrayLikeToArray(arr, len) {
232
- if (len == null || len > arr.length) len = arr.length;
233
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
234
- return arr2;
235
- }
236
-
237
- function _unsupportedIterableToArray(o, minLen) {
238
- if (!o) return;
239
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
240
- var n = Object.prototype.toString.call(o).slice(8, -1);
241
- if (n === "Object" && o.constructor) n = o.constructor.name;
242
- if (n === "Map" || n === "Set") return Array.from(o);
243
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
244
- }
245
-
246
- function _nonIterableRest() {
247
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
248
- }
249
-
250
- function _toArray(arr) {
251
- return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest();
252
- }
253
-
254
- function ownKeys$6(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
255
- function _objectSpread$6(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$6(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$6(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
256
- var consoleLogger = {
257
- type: 'logger',
258
- log: function log(args) {
259
- this.output('log', args);
260
- },
261
- warn: function warn(args) {
262
- this.output('warn', args);
263
- },
264
- error: function error(args) {
265
- this.output('error', args);
266
- },
267
- output: function output(type, args) {
268
- if (console && console[type]) console[type].apply(console, args);
269
- }
270
- };
271
- var Logger = function () {
272
- function Logger(concreteLogger) {
273
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
274
- _classCallCheck(this, Logger);
275
- this.init(concreteLogger, options);
276
- }
277
- _createClass(Logger, [{
278
- key: "init",
279
- value: function init(concreteLogger) {
280
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
281
- this.prefix = options.prefix || 'i18next:';
282
- this.logger = concreteLogger || consoleLogger;
283
- this.options = options;
284
- this.debug = options.debug;
285
- }
286
- }, {
287
- key: "setDebug",
288
- value: function setDebug(bool) {
289
- this.debug = bool;
290
- }
291
- }, {
292
- key: "log",
293
- value: function log() {
294
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
295
- args[_key] = arguments[_key];
296
- }
297
- return this.forward(args, 'log', '', true);
298
- }
299
- }, {
300
- key: "warn",
301
- value: function warn() {
302
- for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
303
- args[_key2] = arguments[_key2];
304
- }
305
- return this.forward(args, 'warn', '', true);
306
- }
307
- }, {
308
- key: "error",
309
- value: function error() {
310
- for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
311
- args[_key3] = arguments[_key3];
312
- }
313
- return this.forward(args, 'error', '');
314
- }
315
- }, {
316
- key: "deprecate",
317
- value: function deprecate() {
318
- for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
319
- args[_key4] = arguments[_key4];
320
- }
321
- return this.forward(args, 'warn', 'WARNING DEPRECATED: ', true);
322
- }
323
- }, {
324
- key: "forward",
325
- value: function forward(args, lvl, prefix, debugOnly) {
326
- if (debugOnly && !this.debug) return null;
327
- if (typeof args[0] === 'string') args[0] = "".concat(prefix).concat(this.prefix, " ").concat(args[0]);
328
- return this.logger[lvl](args);
329
- }
330
- }, {
331
- key: "create",
332
- value: function create(moduleName) {
333
- return new Logger(this.logger, _objectSpread$6(_objectSpread$6({}, {
334
- prefix: "".concat(this.prefix, ":").concat(moduleName, ":")
335
- }), this.options));
336
- }
337
- }, {
338
- key: "clone",
339
- value: function clone(options) {
340
- options = options || this.options;
341
- options.prefix = options.prefix || this.prefix;
342
- return new Logger(this.logger, options);
343
- }
344
- }]);
345
- return Logger;
346
- }();
347
- var baseLogger = new Logger();
348
-
349
- var EventEmitter = function () {
350
- function EventEmitter() {
351
- _classCallCheck(this, EventEmitter);
352
- this.observers = {};
353
- }
354
- _createClass(EventEmitter, [{
355
- key: "on",
356
- value: function on(events, listener) {
357
- var _this = this;
358
- events.split(' ').forEach(function (event) {
359
- _this.observers[event] = _this.observers[event] || [];
360
- _this.observers[event].push(listener);
361
- });
362
- return this;
363
- }
364
- }, {
365
- key: "off",
366
- value: function off(event, listener) {
367
- if (!this.observers[event]) return;
368
- if (!listener) {
369
- delete this.observers[event];
370
- return;
371
- }
372
- this.observers[event] = this.observers[event].filter(function (l) {
373
- return l !== listener;
374
- });
375
- }
376
- }, {
377
- key: "emit",
378
- value: function emit(event) {
379
- for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
380
- args[_key - 1] = arguments[_key];
381
- }
382
- if (this.observers[event]) {
383
- var cloned = [].concat(this.observers[event]);
384
- cloned.forEach(function (observer) {
385
- observer.apply(void 0, args);
386
- });
387
- }
388
- if (this.observers['*']) {
389
- var _cloned = [].concat(this.observers['*']);
390
- _cloned.forEach(function (observer) {
391
- observer.apply(observer, [event].concat(args));
392
- });
393
- }
394
- }
395
- }]);
396
- return EventEmitter;
397
- }();
398
-
399
- function defer() {
400
- var res;
401
- var rej;
402
- var promise = new Promise(function (resolve, reject) {
403
- res = resolve;
404
- rej = reject;
405
- });
406
- promise.resolve = res;
407
- promise.reject = rej;
408
- return promise;
409
- }
410
- function makeString(object) {
411
- if (object == null) return '';
412
- return '' + object;
413
- }
414
- function copy(a, s, t) {
415
- a.forEach(function (m) {
416
- if (s[m]) t[m] = s[m];
417
- });
418
- }
419
- function getLastOfPath(object, path, Empty) {
420
- function cleanKey(key) {
421
- return key && key.indexOf('###') > -1 ? key.replace(/###/g, '.') : key;
422
- }
423
- function canNotTraverseDeeper() {
424
- return !object || typeof object === 'string';
425
- }
426
- var stack = typeof path !== 'string' ? [].concat(path) : path.split('.');
427
- while (stack.length > 1) {
428
- if (canNotTraverseDeeper()) return {};
429
- var key = cleanKey(stack.shift());
430
- if (!object[key] && Empty) object[key] = new Empty();
431
- if (Object.prototype.hasOwnProperty.call(object, key)) {
432
- object = object[key];
433
- } else {
434
- object = {};
435
- }
436
- }
437
- if (canNotTraverseDeeper()) return {};
438
- return {
439
- obj: object,
440
- k: cleanKey(stack.shift())
441
- };
442
- }
443
- function setPath(object, path, newValue) {
444
- var _getLastOfPath = getLastOfPath(object, path, Object),
445
- obj = _getLastOfPath.obj,
446
- k = _getLastOfPath.k;
447
- obj[k] = newValue;
448
- }
449
- function pushPath(object, path, newValue, concat) {
450
- var _getLastOfPath2 = getLastOfPath(object, path, Object),
451
- obj = _getLastOfPath2.obj,
452
- k = _getLastOfPath2.k;
453
- obj[k] = obj[k] || [];
454
- if (concat) obj[k] = obj[k].concat(newValue);
455
- if (!concat) obj[k].push(newValue);
456
- }
457
- function getPath(object, path) {
458
- var _getLastOfPath3 = getLastOfPath(object, path),
459
- obj = _getLastOfPath3.obj,
460
- k = _getLastOfPath3.k;
461
- if (!obj) return undefined;
462
- return obj[k];
463
- }
464
- function getPathWithDefaults(data, defaultData, key) {
465
- var value = getPath(data, key);
466
- if (value !== undefined) {
467
- return value;
468
- }
469
- return getPath(defaultData, key);
470
- }
471
- function deepExtend(target, source, overwrite) {
472
- for (var prop in source) {
473
- if (prop !== '__proto__' && prop !== 'constructor') {
474
- if (prop in target) {
475
- if (typeof target[prop] === 'string' || target[prop] instanceof String || typeof source[prop] === 'string' || source[prop] instanceof String) {
476
- if (overwrite) target[prop] = source[prop];
477
- } else {
478
- deepExtend(target[prop], source[prop], overwrite);
479
- }
480
- } else {
481
- target[prop] = source[prop];
482
- }
483
- }
484
- }
485
- return target;
486
- }
487
- function regexEscape(str) {
488
- return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&');
489
- }
490
- var _entityMap = {
491
- '&': '&amp;',
492
- '<': '&lt;',
493
- '>': '&gt;',
494
- '"': '&quot;',
495
- "'": '&#39;',
496
- '/': '&#x2F;'
497
- };
498
- function escape(data) {
499
- if (typeof data === 'string') {
500
- return data.replace(/[&<>"'\/]/g, function (s) {
501
- return _entityMap[s];
502
- });
503
- }
504
- return data;
505
- }
506
- var isIE10 = typeof window !== 'undefined' && window.navigator && typeof window.navigator.userAgentData === 'undefined' && window.navigator.userAgent && window.navigator.userAgent.indexOf('MSIE') > -1;
507
- var chars = [' ', ',', '?', '!', ';'];
508
- function looksLikeObjectPath(key, nsSeparator, keySeparator) {
509
- nsSeparator = nsSeparator || '';
510
- keySeparator = keySeparator || '';
511
- var possibleChars = chars.filter(function (c) {
512
- return nsSeparator.indexOf(c) < 0 && keySeparator.indexOf(c) < 0;
513
- });
514
- if (possibleChars.length === 0) return true;
515
- var r = new RegExp("(".concat(possibleChars.map(function (c) {
516
- return c === '?' ? '\\?' : c;
517
- }).join('|'), ")"));
518
- var matched = !r.test(key);
519
- if (!matched) {
520
- var ki = key.indexOf(keySeparator);
521
- if (ki > 0 && !r.test(key.substring(0, ki))) {
522
- matched = true;
523
- }
524
- }
525
- return matched;
526
- }
527
- function deepFind(obj, path) {
528
- var keySeparator = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '.';
529
- if (!obj) return undefined;
530
- if (obj[path]) return obj[path];
531
- var paths = path.split(keySeparator);
532
- var current = obj;
533
- for (var i = 0; i < paths.length; ++i) {
534
- if (!current) return undefined;
535
- if (typeof current[paths[i]] === 'string' && i + 1 < paths.length) {
536
- return undefined;
537
- }
538
- if (current[paths[i]] === undefined) {
539
- var j = 2;
540
- var p = paths.slice(i, i + j).join(keySeparator);
541
- var mix = current[p];
542
- while (mix === undefined && paths.length > i + j) {
543
- j++;
544
- p = paths.slice(i, i + j).join(keySeparator);
545
- mix = current[p];
546
- }
547
- if (mix === undefined) return undefined;
548
- if (mix === null) return null;
549
- if (path.endsWith(p)) {
550
- if (typeof mix === 'string') return mix;
551
- if (p && typeof mix[p] === 'string') return mix[p];
552
- }
553
- var joinedPath = paths.slice(i + j).join(keySeparator);
554
- if (joinedPath) return deepFind(mix, joinedPath, keySeparator);
555
- return undefined;
556
- }
557
- current = current[paths[i]];
558
- }
559
- return current;
560
- }
561
-
562
- function ownKeys$5(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
563
- function _objectSpread$5(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$5(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$5(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
564
- function _createSuper$3(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$3(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
565
- function _isNativeReflectConstruct$3() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
566
- var ResourceStore = function (_EventEmitter) {
567
- _inherits(ResourceStore, _EventEmitter);
568
- var _super = _createSuper$3(ResourceStore);
569
- function ResourceStore(data) {
570
- var _this;
571
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
572
- ns: ['translation'],
573
- defaultNS: 'translation'
574
- };
575
- _classCallCheck(this, ResourceStore);
576
- _this = _super.call(this);
577
- if (isIE10) {
578
- EventEmitter.call(_assertThisInitialized(_this));
579
- }
580
- _this.data = data || {};
581
- _this.options = options;
582
- if (_this.options.keySeparator === undefined) {
583
- _this.options.keySeparator = '.';
584
- }
585
- if (_this.options.ignoreJSONStructure === undefined) {
586
- _this.options.ignoreJSONStructure = true;
587
- }
588
- return _this;
589
- }
590
- _createClass(ResourceStore, [{
591
- key: "addNamespaces",
592
- value: function addNamespaces(ns) {
593
- if (this.options.ns.indexOf(ns) < 0) {
594
- this.options.ns.push(ns);
595
- }
596
- }
597
- }, {
598
- key: "removeNamespaces",
599
- value: function removeNamespaces(ns) {
600
- var index = this.options.ns.indexOf(ns);
601
- if (index > -1) {
602
- this.options.ns.splice(index, 1);
603
- }
604
- }
605
- }, {
606
- key: "getResource",
607
- value: function getResource(lng, ns, key) {
608
- var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
609
- var keySeparator = options.keySeparator !== undefined ? options.keySeparator : this.options.keySeparator;
610
- var ignoreJSONStructure = options.ignoreJSONStructure !== undefined ? options.ignoreJSONStructure : this.options.ignoreJSONStructure;
611
- var path = [lng, ns];
612
- if (key && typeof key !== 'string') path = path.concat(key);
613
- if (key && typeof key === 'string') path = path.concat(keySeparator ? key.split(keySeparator) : key);
614
- if (lng.indexOf('.') > -1) {
615
- path = lng.split('.');
616
- }
617
- var result = getPath(this.data, path);
618
- if (result || !ignoreJSONStructure || typeof key !== 'string') return result;
619
- return deepFind(this.data && this.data[lng] && this.data[lng][ns], key, keySeparator);
620
- }
621
- }, {
622
- key: "addResource",
623
- value: function addResource(lng, ns, key, value) {
624
- var options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {
625
- silent: false
626
- };
627
- var keySeparator = options.keySeparator !== undefined ? options.keySeparator : this.options.keySeparator;
628
- var path = [lng, ns];
629
- if (key) path = path.concat(keySeparator ? key.split(keySeparator) : key);
630
- if (lng.indexOf('.') > -1) {
631
- path = lng.split('.');
632
- value = ns;
633
- ns = path[1];
634
- }
635
- this.addNamespaces(ns);
636
- setPath(this.data, path, value);
637
- if (!options.silent) this.emit('added', lng, ns, key, value);
638
- }
639
- }, {
640
- key: "addResources",
641
- value: function addResources(lng, ns, resources) {
642
- var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {
643
- silent: false
644
- };
645
- for (var m in resources) {
646
- if (typeof resources[m] === 'string' || Object.prototype.toString.apply(resources[m]) === '[object Array]') this.addResource(lng, ns, m, resources[m], {
647
- silent: true
648
- });
649
- }
650
- if (!options.silent) this.emit('added', lng, ns, resources);
651
- }
652
- }, {
653
- key: "addResourceBundle",
654
- value: function addResourceBundle(lng, ns, resources, deep, overwrite) {
655
- var options = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {
656
- silent: false
657
- };
658
- var path = [lng, ns];
659
- if (lng.indexOf('.') > -1) {
660
- path = lng.split('.');
661
- deep = resources;
662
- resources = ns;
663
- ns = path[1];
664
- }
665
- this.addNamespaces(ns);
666
- var pack = getPath(this.data, path) || {};
667
- if (deep) {
668
- deepExtend(pack, resources, overwrite);
669
- } else {
670
- pack = _objectSpread$5(_objectSpread$5({}, pack), resources);
671
- }
672
- setPath(this.data, path, pack);
673
- if (!options.silent) this.emit('added', lng, ns, resources);
674
- }
675
- }, {
676
- key: "removeResourceBundle",
677
- value: function removeResourceBundle(lng, ns) {
678
- if (this.hasResourceBundle(lng, ns)) {
679
- delete this.data[lng][ns];
680
- }
681
- this.removeNamespaces(ns);
682
- this.emit('removed', lng, ns);
683
- }
684
- }, {
685
- key: "hasResourceBundle",
686
- value: function hasResourceBundle(lng, ns) {
687
- return this.getResource(lng, ns) !== undefined;
688
- }
689
- }, {
690
- key: "getResourceBundle",
691
- value: function getResourceBundle(lng, ns) {
692
- if (!ns) ns = this.options.defaultNS;
693
- if (this.options.compatibilityAPI === 'v1') return _objectSpread$5(_objectSpread$5({}, {}), this.getResource(lng, ns));
694
- return this.getResource(lng, ns);
695
- }
696
- }, {
697
- key: "getDataByLanguage",
698
- value: function getDataByLanguage(lng) {
699
- return this.data[lng];
700
- }
701
- }, {
702
- key: "hasLanguageSomeTranslations",
703
- value: function hasLanguageSomeTranslations(lng) {
704
- var data = this.getDataByLanguage(lng);
705
- var n = data && Object.keys(data) || [];
706
- return !!n.find(function (v) {
707
- return data[v] && Object.keys(data[v]).length > 0;
708
- });
709
- }
710
- }, {
711
- key: "toJSON",
712
- value: function toJSON() {
713
- return this.data;
714
- }
715
- }]);
716
- return ResourceStore;
717
- }(EventEmitter);
718
-
719
- var postProcessor = {
720
- processors: {},
721
- addPostProcessor: function addPostProcessor(module) {
722
- this.processors[module.name] = module;
723
- },
724
- handle: function handle(processors, value, key, options, translator) {
725
- var _this = this;
726
- processors.forEach(function (processor) {
727
- if (_this.processors[processor]) value = _this.processors[processor].process(value, key, options, translator);
728
- });
729
- return value;
730
- }
731
- };
732
-
733
- function ownKeys$4(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
734
- function _objectSpread$4(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$4(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$4(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
735
- function _createSuper$2(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$2(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
736
- function _isNativeReflectConstruct$2() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
737
- var checkedLoadedFor = {};
738
- var Translator = function (_EventEmitter) {
739
- _inherits(Translator, _EventEmitter);
740
- var _super = _createSuper$2(Translator);
741
- function Translator(services) {
742
- var _this;
743
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
744
- _classCallCheck(this, Translator);
745
- _this = _super.call(this);
746
- if (isIE10) {
747
- EventEmitter.call(_assertThisInitialized(_this));
748
- }
749
- copy(['resourceStore', 'languageUtils', 'pluralResolver', 'interpolator', 'backendConnector', 'i18nFormat', 'utils'], services, _assertThisInitialized(_this));
750
- _this.options = options;
751
- if (_this.options.keySeparator === undefined) {
752
- _this.options.keySeparator = '.';
753
- }
754
- _this.logger = baseLogger.create('translator');
755
- return _this;
756
- }
757
- _createClass(Translator, [{
758
- key: "changeLanguage",
759
- value: function changeLanguage(lng) {
760
- if (lng) this.language = lng;
761
- }
762
- }, {
763
- key: "exists",
764
- value: function exists(key) {
765
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
766
- interpolation: {}
767
- };
768
- if (key === undefined || key === null) {
769
- return false;
770
- }
771
- var resolved = this.resolve(key, options);
772
- return resolved && resolved.res !== undefined;
773
- }
774
- }, {
775
- key: "extractFromKey",
776
- value: function extractFromKey(key, options) {
777
- var nsSeparator = options.nsSeparator !== undefined ? options.nsSeparator : this.options.nsSeparator;
778
- if (nsSeparator === undefined) nsSeparator = ':';
779
- var keySeparator = options.keySeparator !== undefined ? options.keySeparator : this.options.keySeparator;
780
- var namespaces = options.ns || this.options.defaultNS || [];
781
- var wouldCheckForNsInKey = nsSeparator && key.indexOf(nsSeparator) > -1;
782
- var seemsNaturalLanguage = !this.options.userDefinedKeySeparator && !options.keySeparator && !this.options.userDefinedNsSeparator && !options.nsSeparator && !looksLikeObjectPath(key, nsSeparator, keySeparator);
783
- if (wouldCheckForNsInKey && !seemsNaturalLanguage) {
784
- var m = key.match(this.interpolator.nestingRegexp);
785
- if (m && m.length > 0) {
786
- return {
787
- key: key,
788
- namespaces: namespaces
789
- };
790
- }
791
- var parts = key.split(nsSeparator);
792
- if (nsSeparator !== keySeparator || nsSeparator === keySeparator && this.options.ns.indexOf(parts[0]) > -1) namespaces = parts.shift();
793
- key = parts.join(keySeparator);
794
- }
795
- if (typeof namespaces === 'string') namespaces = [namespaces];
796
- return {
797
- key: key,
798
- namespaces: namespaces
799
- };
800
- }
801
- }, {
802
- key: "translate",
803
- value: function translate(keys, options, lastKey) {
804
- var _this2 = this;
805
- if (_typeof(options) !== 'object' && this.options.overloadTranslationOptionHandler) {
806
- options = this.options.overloadTranslationOptionHandler(arguments);
807
- }
808
- if (_typeof(options) === 'object') options = _objectSpread$4({}, options);
809
- if (!options) options = {};
810
- if (keys === undefined || keys === null) return '';
811
- if (!Array.isArray(keys)) keys = [String(keys)];
812
- var returnDetails = options.returnDetails !== undefined ? options.returnDetails : this.options.returnDetails;
813
- var keySeparator = options.keySeparator !== undefined ? options.keySeparator : this.options.keySeparator;
814
- var _this$extractFromKey = this.extractFromKey(keys[keys.length - 1], options),
815
- key = _this$extractFromKey.key,
816
- namespaces = _this$extractFromKey.namespaces;
817
- var namespace = namespaces[namespaces.length - 1];
818
- var lng = options.lng || this.language;
819
- var appendNamespaceToCIMode = options.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
820
- if (lng && lng.toLowerCase() === 'cimode') {
821
- if (appendNamespaceToCIMode) {
822
- var nsSeparator = options.nsSeparator || this.options.nsSeparator;
823
- if (returnDetails) {
824
- return {
825
- res: "".concat(namespace).concat(nsSeparator).concat(key),
826
- usedKey: key,
827
- exactUsedKey: key,
828
- usedLng: lng,
829
- usedNS: namespace
830
- };
831
- }
832
- return "".concat(namespace).concat(nsSeparator).concat(key);
833
- }
834
- if (returnDetails) {
835
- return {
836
- res: key,
837
- usedKey: key,
838
- exactUsedKey: key,
839
- usedLng: lng,
840
- usedNS: namespace
841
- };
842
- }
843
- return key;
844
- }
845
- var resolved = this.resolve(keys, options);
846
- var res = resolved && resolved.res;
847
- var resUsedKey = resolved && resolved.usedKey || key;
848
- var resExactUsedKey = resolved && resolved.exactUsedKey || key;
849
- var resType = Object.prototype.toString.apply(res);
850
- var noObject = ['[object Number]', '[object Function]', '[object RegExp]'];
851
- var joinArrays = options.joinArrays !== undefined ? options.joinArrays : this.options.joinArrays;
852
- var handleAsObjectInI18nFormat = !this.i18nFormat || this.i18nFormat.handleAsObject;
853
- var handleAsObject = typeof res !== 'string' && typeof res !== 'boolean' && typeof res !== 'number';
854
- if (handleAsObjectInI18nFormat && res && handleAsObject && noObject.indexOf(resType) < 0 && !(typeof joinArrays === 'string' && resType === '[object Array]')) {
855
- if (!options.returnObjects && !this.options.returnObjects) {
856
- if (!this.options.returnedObjectHandler) {
857
- this.logger.warn('accessing an object - but returnObjects options is not enabled!');
858
- }
859
- var r = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(resUsedKey, res, _objectSpread$4(_objectSpread$4({}, options), {}, {
860
- ns: namespaces
861
- })) : "key '".concat(key, " (").concat(this.language, ")' returned an object instead of string.");
862
- if (returnDetails) {
863
- resolved.res = r;
864
- return resolved;
865
- }
866
- return r;
867
- }
868
- if (keySeparator) {
869
- var resTypeIsArray = resType === '[object Array]';
870
- var copy = resTypeIsArray ? [] : {};
871
- var newKeyToUse = resTypeIsArray ? resExactUsedKey : resUsedKey;
872
- for (var m in res) {
873
- if (Object.prototype.hasOwnProperty.call(res, m)) {
874
- var deepKey = "".concat(newKeyToUse).concat(keySeparator).concat(m);
875
- copy[m] = this.translate(deepKey, _objectSpread$4(_objectSpread$4({}, options), {
876
- joinArrays: false,
877
- ns: namespaces
878
- }));
879
- if (copy[m] === deepKey) copy[m] = res[m];
880
- }
881
- }
882
- res = copy;
883
- }
884
- } else if (handleAsObjectInI18nFormat && typeof joinArrays === 'string' && resType === '[object Array]') {
885
- res = res.join(joinArrays);
886
- if (res) res = this.extendTranslation(res, keys, options, lastKey);
887
- } else {
888
- var usedDefault = false;
889
- var usedKey = false;
890
- var needsPluralHandling = options.count !== undefined && typeof options.count !== 'string';
891
- var hasDefaultValue = Translator.hasDefaultValue(options);
892
- var defaultValueSuffix = needsPluralHandling ? this.pluralResolver.getSuffix(lng, options.count, options) : '';
893
- var defaultValue = options["defaultValue".concat(defaultValueSuffix)] || options.defaultValue;
894
- if (!this.isValidLookup(res) && hasDefaultValue) {
895
- usedDefault = true;
896
- res = defaultValue;
897
- }
898
- if (!this.isValidLookup(res)) {
899
- usedKey = true;
900
- res = key;
901
- }
902
- var missingKeyNoValueFallbackToKey = options.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey;
903
- var resForMissing = missingKeyNoValueFallbackToKey && usedKey ? undefined : res;
904
- var updateMissing = hasDefaultValue && defaultValue !== res && this.options.updateMissing;
905
- if (usedKey || usedDefault || updateMissing) {
906
- this.logger.log(updateMissing ? 'updateKey' : 'missingKey', lng, namespace, key, updateMissing ? defaultValue : res);
907
- if (keySeparator) {
908
- var fk = this.resolve(key, _objectSpread$4(_objectSpread$4({}, options), {}, {
909
- keySeparator: false
910
- }));
911
- if (fk && fk.res) this.logger.warn('Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.');
912
- }
913
- var lngs = [];
914
- var fallbackLngs = this.languageUtils.getFallbackCodes(this.options.fallbackLng, options.lng || this.language);
915
- if (this.options.saveMissingTo === 'fallback' && fallbackLngs && fallbackLngs[0]) {
916
- for (var i = 0; i < fallbackLngs.length; i++) {
917
- lngs.push(fallbackLngs[i]);
918
- }
919
- } else if (this.options.saveMissingTo === 'all') {
920
- lngs = this.languageUtils.toResolveHierarchy(options.lng || this.language);
921
- } else {
922
- lngs.push(options.lng || this.language);
923
- }
924
- var send = function send(l, k, specificDefaultValue) {
925
- var defaultForMissing = hasDefaultValue && specificDefaultValue !== res ? specificDefaultValue : resForMissing;
926
- if (_this2.options.missingKeyHandler) {
927
- _this2.options.missingKeyHandler(l, namespace, k, defaultForMissing, updateMissing, options);
928
- } else if (_this2.backendConnector && _this2.backendConnector.saveMissing) {
929
- _this2.backendConnector.saveMissing(l, namespace, k, defaultForMissing, updateMissing, options);
930
- }
931
- _this2.emit('missingKey', l, namespace, k, res);
932
- };
933
- if (this.options.saveMissing) {
934
- if (this.options.saveMissingPlurals && needsPluralHandling) {
935
- lngs.forEach(function (language) {
936
- _this2.pluralResolver.getSuffixes(language, options).forEach(function (suffix) {
937
- send([language], key + suffix, options["defaultValue".concat(suffix)] || defaultValue);
938
- });
939
- });
940
- } else {
941
- send(lngs, key, defaultValue);
942
- }
943
- }
944
- }
945
- res = this.extendTranslation(res, keys, options, resolved, lastKey);
946
- if (usedKey && res === key && this.options.appendNamespaceToMissingKey) res = "".concat(namespace, ":").concat(key);
947
- if ((usedKey || usedDefault) && this.options.parseMissingKeyHandler) {
948
- if (this.options.compatibilityAPI !== 'v1') {
949
- res = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? "".concat(namespace, ":").concat(key) : key, usedDefault ? res : undefined);
950
- } else {
951
- res = this.options.parseMissingKeyHandler(res);
952
- }
953
- }
954
- }
955
- if (returnDetails) {
956
- resolved.res = res;
957
- return resolved;
958
- }
959
- return res;
960
- }
961
- }, {
962
- key: "extendTranslation",
963
- value: function extendTranslation(res, key, options, resolved, lastKey) {
964
- var _this3 = this;
965
- if (this.i18nFormat && this.i18nFormat.parse) {
966
- res = this.i18nFormat.parse(res, _objectSpread$4(_objectSpread$4({}, this.options.interpolation.defaultVariables), options), resolved.usedLng, resolved.usedNS, resolved.usedKey, {
967
- resolved: resolved
968
- });
969
- } else if (!options.skipInterpolation) {
970
- if (options.interpolation) this.interpolator.init(_objectSpread$4(_objectSpread$4({}, options), {
971
- interpolation: _objectSpread$4(_objectSpread$4({}, this.options.interpolation), options.interpolation)
972
- }));
973
- var skipOnVariables = typeof res === 'string' && (options && options.interpolation && options.interpolation.skipOnVariables !== undefined ? options.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables);
974
- var nestBef;
975
- if (skipOnVariables) {
976
- var nb = res.match(this.interpolator.nestingRegexp);
977
- nestBef = nb && nb.length;
978
- }
979
- var data = options.replace && typeof options.replace !== 'string' ? options.replace : options;
980
- if (this.options.interpolation.defaultVariables) data = _objectSpread$4(_objectSpread$4({}, this.options.interpolation.defaultVariables), data);
981
- res = this.interpolator.interpolate(res, data, options.lng || this.language, options);
982
- if (skipOnVariables) {
983
- var na = res.match(this.interpolator.nestingRegexp);
984
- var nestAft = na && na.length;
985
- if (nestBef < nestAft) options.nest = false;
986
- }
987
- if (!options.lng && this.options.compatibilityAPI !== 'v1' && resolved && resolved.res) options.lng = resolved.usedLng;
988
- if (options.nest !== false) res = this.interpolator.nest(res, function () {
989
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
990
- args[_key] = arguments[_key];
991
- }
992
- if (lastKey && lastKey[0] === args[0] && !options.context) {
993
- _this3.logger.warn("It seems you are nesting recursively key: ".concat(args[0], " in key: ").concat(key[0]));
994
- return null;
995
- }
996
- return _this3.translate.apply(_this3, args.concat([key]));
997
- }, options);
998
- if (options.interpolation) this.interpolator.reset();
999
- }
1000
- var postProcess = options.postProcess || this.options.postProcess;
1001
- var postProcessorNames = typeof postProcess === 'string' ? [postProcess] : postProcess;
1002
- if (res !== undefined && res !== null && postProcessorNames && postProcessorNames.length && options.applyPostProcessor !== false) {
1003
- res = postProcessor.handle(postProcessorNames, res, key, this.options && this.options.postProcessPassResolved ? _objectSpread$4({
1004
- i18nResolved: resolved
1005
- }, options) : options, this);
1006
- }
1007
- return res;
1008
- }
1009
- }, {
1010
- key: "resolve",
1011
- value: function resolve(keys) {
1012
- var _this4 = this;
1013
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1014
- var found;
1015
- var usedKey;
1016
- var exactUsedKey;
1017
- var usedLng;
1018
- var usedNS;
1019
- if (typeof keys === 'string') keys = [keys];
1020
- keys.forEach(function (k) {
1021
- if (_this4.isValidLookup(found)) return;
1022
- var extracted = _this4.extractFromKey(k, options);
1023
- var key = extracted.key;
1024
- usedKey = key;
1025
- var namespaces = extracted.namespaces;
1026
- if (_this4.options.fallbackNS) namespaces = namespaces.concat(_this4.options.fallbackNS);
1027
- var needsPluralHandling = options.count !== undefined && typeof options.count !== 'string';
1028
- var needsZeroSuffixLookup = needsPluralHandling && !options.ordinal && options.count === 0 && _this4.pluralResolver.shouldUseIntlApi();
1029
- var needsContextHandling = options.context !== undefined && (typeof options.context === 'string' || typeof options.context === 'number') && options.context !== '';
1030
- var codes = options.lngs ? options.lngs : _this4.languageUtils.toResolveHierarchy(options.lng || _this4.language, options.fallbackLng);
1031
- namespaces.forEach(function (ns) {
1032
- if (_this4.isValidLookup(found)) return;
1033
- usedNS = ns;
1034
- if (!checkedLoadedFor["".concat(codes[0], "-").concat(ns)] && _this4.utils && _this4.utils.hasLoadedNamespace && !_this4.utils.hasLoadedNamespace(usedNS)) {
1035
- checkedLoadedFor["".concat(codes[0], "-").concat(ns)] = true;
1036
- _this4.logger.warn("key \"".concat(usedKey, "\" for languages \"").concat(codes.join(', '), "\" won't get resolved as namespace \"").concat(usedNS, "\" was not yet loaded"), 'This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!');
1037
- }
1038
- codes.forEach(function (code) {
1039
- if (_this4.isValidLookup(found)) return;
1040
- usedLng = code;
1041
- var finalKeys = [key];
1042
- if (_this4.i18nFormat && _this4.i18nFormat.addLookupKeys) {
1043
- _this4.i18nFormat.addLookupKeys(finalKeys, key, code, ns, options);
1044
- } else {
1045
- var pluralSuffix;
1046
- if (needsPluralHandling) pluralSuffix = _this4.pluralResolver.getSuffix(code, options.count, options);
1047
- var zeroSuffix = "".concat(_this4.options.pluralSeparator, "zero");
1048
- if (needsPluralHandling) {
1049
- finalKeys.push(key + pluralSuffix);
1050
- if (needsZeroSuffixLookup) {
1051
- finalKeys.push(key + zeroSuffix);
1052
- }
1053
- }
1054
- if (needsContextHandling) {
1055
- var contextKey = "".concat(key).concat(_this4.options.contextSeparator).concat(options.context);
1056
- finalKeys.push(contextKey);
1057
- if (needsPluralHandling) {
1058
- finalKeys.push(contextKey + pluralSuffix);
1059
- if (needsZeroSuffixLookup) {
1060
- finalKeys.push(contextKey + zeroSuffix);
1061
- }
1062
- }
1063
- }
1064
- }
1065
- var possibleKey;
1066
- while (possibleKey = finalKeys.pop()) {
1067
- if (!_this4.isValidLookup(found)) {
1068
- exactUsedKey = possibleKey;
1069
- found = _this4.getResource(code, ns, possibleKey, options);
1070
- }
1071
- }
1072
- });
1073
- });
1074
- });
1075
- return {
1076
- res: found,
1077
- usedKey: usedKey,
1078
- exactUsedKey: exactUsedKey,
1079
- usedLng: usedLng,
1080
- usedNS: usedNS
1081
- };
1082
- }
1083
- }, {
1084
- key: "isValidLookup",
1085
- value: function isValidLookup(res) {
1086
- return res !== undefined && !(!this.options.returnNull && res === null) && !(!this.options.returnEmptyString && res === '');
1087
- }
1088
- }, {
1089
- key: "getResource",
1090
- value: function getResource(code, ns, key) {
1091
- var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
1092
- if (this.i18nFormat && this.i18nFormat.getResource) return this.i18nFormat.getResource(code, ns, key, options);
1093
- return this.resourceStore.getResource(code, ns, key, options);
1094
- }
1095
- }], [{
1096
- key: "hasDefaultValue",
1097
- value: function hasDefaultValue(options) {
1098
- var prefix = 'defaultValue';
1099
- for (var option in options) {
1100
- if (Object.prototype.hasOwnProperty.call(options, option) && prefix === option.substring(0, prefix.length) && undefined !== options[option]) {
1101
- return true;
1102
- }
1103
- }
1104
- return false;
1105
- }
1106
- }]);
1107
- return Translator;
1108
- }(EventEmitter);
1109
-
1110
- function capitalize(string) {
1111
- return string.charAt(0).toUpperCase() + string.slice(1);
1112
- }
1113
- var LanguageUtil = function () {
1114
- function LanguageUtil(options) {
1115
- _classCallCheck(this, LanguageUtil);
1116
- this.options = options;
1117
- this.supportedLngs = this.options.supportedLngs || false;
1118
- this.logger = baseLogger.create('languageUtils');
1119
- }
1120
- _createClass(LanguageUtil, [{
1121
- key: "getScriptPartFromCode",
1122
- value: function getScriptPartFromCode(code) {
1123
- if (!code || code.indexOf('-') < 0) return null;
1124
- var p = code.split('-');
1125
- if (p.length === 2) return null;
1126
- p.pop();
1127
- if (p[p.length - 1].toLowerCase() === 'x') return null;
1128
- return this.formatLanguageCode(p.join('-'));
1129
- }
1130
- }, {
1131
- key: "getLanguagePartFromCode",
1132
- value: function getLanguagePartFromCode(code) {
1133
- if (!code || code.indexOf('-') < 0) return code;
1134
- var p = code.split('-');
1135
- return this.formatLanguageCode(p[0]);
1136
- }
1137
- }, {
1138
- key: "formatLanguageCode",
1139
- value: function formatLanguageCode(code) {
1140
- if (typeof code === 'string' && code.indexOf('-') > -1) {
1141
- var specialCases = ['hans', 'hant', 'latn', 'cyrl', 'cans', 'mong', 'arab'];
1142
- var p = code.split('-');
1143
- if (this.options.lowerCaseLng) {
1144
- p = p.map(function (part) {
1145
- return part.toLowerCase();
1146
- });
1147
- } else if (p.length === 2) {
1148
- p[0] = p[0].toLowerCase();
1149
- p[1] = p[1].toUpperCase();
1150
- if (specialCases.indexOf(p[1].toLowerCase()) > -1) p[1] = capitalize(p[1].toLowerCase());
1151
- } else if (p.length === 3) {
1152
- p[0] = p[0].toLowerCase();
1153
- if (p[1].length === 2) p[1] = p[1].toUpperCase();
1154
- if (p[0] !== 'sgn' && p[2].length === 2) p[2] = p[2].toUpperCase();
1155
- if (specialCases.indexOf(p[1].toLowerCase()) > -1) p[1] = capitalize(p[1].toLowerCase());
1156
- if (specialCases.indexOf(p[2].toLowerCase()) > -1) p[2] = capitalize(p[2].toLowerCase());
1157
- }
1158
- return p.join('-');
1159
- }
1160
- return this.options.cleanCode || this.options.lowerCaseLng ? code.toLowerCase() : code;
1161
- }
1162
- }, {
1163
- key: "isSupportedCode",
1164
- value: function isSupportedCode(code) {
1165
- if (this.options.load === 'languageOnly' || this.options.nonExplicitSupportedLngs) {
1166
- code = this.getLanguagePartFromCode(code);
1167
- }
1168
- return !this.supportedLngs || !this.supportedLngs.length || this.supportedLngs.indexOf(code) > -1;
1169
- }
1170
- }, {
1171
- key: "getBestMatchFromCodes",
1172
- value: function getBestMatchFromCodes(codes) {
1173
- var _this = this;
1174
- if (!codes) return null;
1175
- var found;
1176
- codes.forEach(function (code) {
1177
- if (found) return;
1178
- var cleanedLng = _this.formatLanguageCode(code);
1179
- if (!_this.options.supportedLngs || _this.isSupportedCode(cleanedLng)) found = cleanedLng;
1180
- });
1181
- if (!found && this.options.supportedLngs) {
1182
- codes.forEach(function (code) {
1183
- if (found) return;
1184
- var lngOnly = _this.getLanguagePartFromCode(code);
1185
- if (_this.isSupportedCode(lngOnly)) return found = lngOnly;
1186
- found = _this.options.supportedLngs.find(function (supportedLng) {
1187
- if (supportedLng === lngOnly) return supportedLng;
1188
- if (supportedLng.indexOf('-') < 0 && lngOnly.indexOf('-') < 0) return;
1189
- if (supportedLng.indexOf(lngOnly) === 0) return supportedLng;
1190
- });
1191
- });
1192
- }
1193
- if (!found) found = this.getFallbackCodes(this.options.fallbackLng)[0];
1194
- return found;
1195
- }
1196
- }, {
1197
- key: "getFallbackCodes",
1198
- value: function getFallbackCodes(fallbacks, code) {
1199
- if (!fallbacks) return [];
1200
- if (typeof fallbacks === 'function') fallbacks = fallbacks(code);
1201
- if (typeof fallbacks === 'string') fallbacks = [fallbacks];
1202
- if (Object.prototype.toString.apply(fallbacks) === '[object Array]') return fallbacks;
1203
- if (!code) return fallbacks["default"] || [];
1204
- var found = fallbacks[code];
1205
- if (!found) found = fallbacks[this.getScriptPartFromCode(code)];
1206
- if (!found) found = fallbacks[this.formatLanguageCode(code)];
1207
- if (!found) found = fallbacks[this.getLanguagePartFromCode(code)];
1208
- if (!found) found = fallbacks["default"];
1209
- return found || [];
1210
- }
1211
- }, {
1212
- key: "toResolveHierarchy",
1213
- value: function toResolveHierarchy(code, fallbackCode) {
1214
- var _this2 = this;
1215
- var fallbackCodes = this.getFallbackCodes(fallbackCode || this.options.fallbackLng || [], code);
1216
- var codes = [];
1217
- var addCode = function addCode(c) {
1218
- if (!c) return;
1219
- if (_this2.isSupportedCode(c)) {
1220
- codes.push(c);
1221
- } else {
1222
- _this2.logger.warn("rejecting language code not found in supportedLngs: ".concat(c));
1223
- }
1224
- };
1225
- if (typeof code === 'string' && code.indexOf('-') > -1) {
1226
- if (this.options.load !== 'languageOnly') addCode(this.formatLanguageCode(code));
1227
- if (this.options.load !== 'languageOnly' && this.options.load !== 'currentOnly') addCode(this.getScriptPartFromCode(code));
1228
- if (this.options.load !== 'currentOnly') addCode(this.getLanguagePartFromCode(code));
1229
- } else if (typeof code === 'string') {
1230
- addCode(this.formatLanguageCode(code));
1231
- }
1232
- fallbackCodes.forEach(function (fc) {
1233
- if (codes.indexOf(fc) < 0) addCode(_this2.formatLanguageCode(fc));
1234
- });
1235
- return codes;
1236
- }
1237
- }]);
1238
- return LanguageUtil;
1239
- }();
1240
-
1241
- var sets = [{
1242
- lngs: ['ach', 'ak', 'am', 'arn', 'br', 'fil', 'gun', 'ln', 'mfe', 'mg', 'mi', 'oc', 'pt', 'pt-BR', 'tg', 'tl', 'ti', 'tr', 'uz', 'wa'],
1243
- nr: [1, 2],
1244
- fc: 1
1245
- }, {
1246
- lngs: ['af', 'an', 'ast', 'az', 'bg', 'bn', 'ca', 'da', 'de', 'dev', 'el', 'en', 'eo', 'es', 'et', 'eu', 'fi', 'fo', 'fur', 'fy', 'gl', 'gu', 'ha', 'hi', 'hu', 'hy', 'ia', 'it', 'kk', 'kn', 'ku', 'lb', 'mai', 'ml', 'mn', 'mr', 'nah', 'nap', 'nb', 'ne', 'nl', 'nn', 'no', 'nso', 'pa', 'pap', 'pms', 'ps', 'pt-PT', 'rm', 'sco', 'se', 'si', 'so', 'son', 'sq', 'sv', 'sw', 'ta', 'te', 'tk', 'ur', 'yo'],
1247
- nr: [1, 2],
1248
- fc: 2
1249
- }, {
1250
- lngs: ['ay', 'bo', 'cgg', 'fa', 'ht', 'id', 'ja', 'jbo', 'ka', 'km', 'ko', 'ky', 'lo', 'ms', 'sah', 'su', 'th', 'tt', 'ug', 'vi', 'wo', 'zh'],
1251
- nr: [1],
1252
- fc: 3
1253
- }, {
1254
- lngs: ['be', 'bs', 'cnr', 'dz', 'hr', 'ru', 'sr', 'uk'],
1255
- nr: [1, 2, 5],
1256
- fc: 4
1257
- }, {
1258
- lngs: ['ar'],
1259
- nr: [0, 1, 2, 3, 11, 100],
1260
- fc: 5
1261
- }, {
1262
- lngs: ['cs', 'sk'],
1263
- nr: [1, 2, 5],
1264
- fc: 6
1265
- }, {
1266
- lngs: ['csb', 'pl'],
1267
- nr: [1, 2, 5],
1268
- fc: 7
1269
- }, {
1270
- lngs: ['cy'],
1271
- nr: [1, 2, 3, 8],
1272
- fc: 8
1273
- }, {
1274
- lngs: ['fr'],
1275
- nr: [1, 2],
1276
- fc: 9
1277
- }, {
1278
- lngs: ['ga'],
1279
- nr: [1, 2, 3, 7, 11],
1280
- fc: 10
1281
- }, {
1282
- lngs: ['gd'],
1283
- nr: [1, 2, 3, 20],
1284
- fc: 11
1285
- }, {
1286
- lngs: ['is'],
1287
- nr: [1, 2],
1288
- fc: 12
1289
- }, {
1290
- lngs: ['jv'],
1291
- nr: [0, 1],
1292
- fc: 13
1293
- }, {
1294
- lngs: ['kw'],
1295
- nr: [1, 2, 3, 4],
1296
- fc: 14
1297
- }, {
1298
- lngs: ['lt'],
1299
- nr: [1, 2, 10],
1300
- fc: 15
1301
- }, {
1302
- lngs: ['lv'],
1303
- nr: [1, 2, 0],
1304
- fc: 16
1305
- }, {
1306
- lngs: ['mk'],
1307
- nr: [1, 2],
1308
- fc: 17
1309
- }, {
1310
- lngs: ['mnk'],
1311
- nr: [0, 1, 2],
1312
- fc: 18
1313
- }, {
1314
- lngs: ['mt'],
1315
- nr: [1, 2, 11, 20],
1316
- fc: 19
1317
- }, {
1318
- lngs: ['or'],
1319
- nr: [2, 1],
1320
- fc: 2
1321
- }, {
1322
- lngs: ['ro'],
1323
- nr: [1, 2, 20],
1324
- fc: 20
1325
- }, {
1326
- lngs: ['sl'],
1327
- nr: [5, 1, 2, 3],
1328
- fc: 21
1329
- }, {
1330
- lngs: ['he', 'iw'],
1331
- nr: [1, 2, 20, 21],
1332
- fc: 22
1333
- }];
1334
- var _rulesPluralsTypes = {
1335
- 1: function _(n) {
1336
- return Number(n > 1);
1337
- },
1338
- 2: function _(n) {
1339
- return Number(n != 1);
1340
- },
1341
- 3: function _(n) {
1342
- return 0;
1343
- },
1344
- 4: function _(n) {
1345
- return Number(n % 10 == 1 && n % 100 != 11 ? 0 : n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2);
1346
- },
1347
- 5: function _(n) {
1348
- return Number(n == 0 ? 0 : n == 1 ? 1 : n == 2 ? 2 : n % 100 >= 3 && n % 100 <= 10 ? 3 : n % 100 >= 11 ? 4 : 5);
1349
- },
1350
- 6: function _(n) {
1351
- return Number(n == 1 ? 0 : n >= 2 && n <= 4 ? 1 : 2);
1352
- },
1353
- 7: function _(n) {
1354
- return Number(n == 1 ? 0 : n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2);
1355
- },
1356
- 8: function _(n) {
1357
- return Number(n == 1 ? 0 : n == 2 ? 1 : n != 8 && n != 11 ? 2 : 3);
1358
- },
1359
- 9: function _(n) {
1360
- return Number(n >= 2);
1361
- },
1362
- 10: function _(n) {
1363
- return Number(n == 1 ? 0 : n == 2 ? 1 : n < 7 ? 2 : n < 11 ? 3 : 4);
1364
- },
1365
- 11: function _(n) {
1366
- return Number(n == 1 || n == 11 ? 0 : n == 2 || n == 12 ? 1 : n > 2 && n < 20 ? 2 : 3);
1367
- },
1368
- 12: function _(n) {
1369
- return Number(n % 10 != 1 || n % 100 == 11);
1370
- },
1371
- 13: function _(n) {
1372
- return Number(n !== 0);
1373
- },
1374
- 14: function _(n) {
1375
- return Number(n == 1 ? 0 : n == 2 ? 1 : n == 3 ? 2 : 3);
1376
- },
1377
- 15: function _(n) {
1378
- return Number(n % 10 == 1 && n % 100 != 11 ? 0 : n % 10 >= 2 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2);
1379
- },
1380
- 16: function _(n) {
1381
- return Number(n % 10 == 1 && n % 100 != 11 ? 0 : n !== 0 ? 1 : 2);
1382
- },
1383
- 17: function _(n) {
1384
- return Number(n == 1 || n % 10 == 1 && n % 100 != 11 ? 0 : 1);
1385
- },
1386
- 18: function _(n) {
1387
- return Number(n == 0 ? 0 : n == 1 ? 1 : 2);
1388
- },
1389
- 19: function _(n) {
1390
- return Number(n == 1 ? 0 : n == 0 || n % 100 > 1 && n % 100 < 11 ? 1 : n % 100 > 10 && n % 100 < 20 ? 2 : 3);
1391
- },
1392
- 20: function _(n) {
1393
- return Number(n == 1 ? 0 : n == 0 || n % 100 > 0 && n % 100 < 20 ? 1 : 2);
1394
- },
1395
- 21: function _(n) {
1396
- return Number(n % 100 == 1 ? 1 : n % 100 == 2 ? 2 : n % 100 == 3 || n % 100 == 4 ? 3 : 0);
1397
- },
1398
- 22: function _(n) {
1399
- return Number(n == 1 ? 0 : n == 2 ? 1 : (n < 0 || n > 10) && n % 10 == 0 ? 2 : 3);
1400
- }
1401
- };
1402
- var deprecatedJsonVersions = ['v1', 'v2', 'v3'];
1403
- var suffixesOrder = {
1404
- zero: 0,
1405
- one: 1,
1406
- two: 2,
1407
- few: 3,
1408
- many: 4,
1409
- other: 5
1410
- };
1411
- function createRules() {
1412
- var rules = {};
1413
- sets.forEach(function (set) {
1414
- set.lngs.forEach(function (l) {
1415
- rules[l] = {
1416
- numbers: set.nr,
1417
- plurals: _rulesPluralsTypes[set.fc]
1418
- };
1419
- });
1420
- });
1421
- return rules;
1422
- }
1423
- var PluralResolver = function () {
1424
- function PluralResolver(languageUtils) {
1425
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1426
- _classCallCheck(this, PluralResolver);
1427
- this.languageUtils = languageUtils;
1428
- this.options = options;
1429
- this.logger = baseLogger.create('pluralResolver');
1430
- if ((!this.options.compatibilityJSON || this.options.compatibilityJSON === 'v4') && (typeof Intl === 'undefined' || !Intl.PluralRules)) {
1431
- this.options.compatibilityJSON = 'v3';
1432
- this.logger.error('Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.');
1433
- }
1434
- this.rules = createRules();
1435
- }
1436
- _createClass(PluralResolver, [{
1437
- key: "addRule",
1438
- value: function addRule(lng, obj) {
1439
- this.rules[lng] = obj;
1440
- }
1441
- }, {
1442
- key: "getRule",
1443
- value: function getRule(code) {
1444
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1445
- if (this.shouldUseIntlApi()) {
1446
- try {
1447
- return new Intl.PluralRules(code, {
1448
- type: options.ordinal ? 'ordinal' : 'cardinal'
1449
- });
1450
- } catch (_unused) {
1451
- return;
1452
- }
1453
- }
1454
- return this.rules[code] || this.rules[this.languageUtils.getLanguagePartFromCode(code)];
1455
- }
1456
- }, {
1457
- key: "needsPlural",
1458
- value: function needsPlural(code) {
1459
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1460
- var rule = this.getRule(code, options);
1461
- if (this.shouldUseIntlApi()) {
1462
- return rule && rule.resolvedOptions().pluralCategories.length > 1;
1463
- }
1464
- return rule && rule.numbers.length > 1;
1465
- }
1466
- }, {
1467
- key: "getPluralFormsOfKey",
1468
- value: function getPluralFormsOfKey(code, key) {
1469
- var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
1470
- return this.getSuffixes(code, options).map(function (suffix) {
1471
- return "".concat(key).concat(suffix);
1472
- });
1473
- }
1474
- }, {
1475
- key: "getSuffixes",
1476
- value: function getSuffixes(code) {
1477
- var _this = this;
1478
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1479
- var rule = this.getRule(code, options);
1480
- if (!rule) {
1481
- return [];
1482
- }
1483
- if (this.shouldUseIntlApi()) {
1484
- return rule.resolvedOptions().pluralCategories.sort(function (pluralCategory1, pluralCategory2) {
1485
- return suffixesOrder[pluralCategory1] - suffixesOrder[pluralCategory2];
1486
- }).map(function (pluralCategory) {
1487
- return "".concat(_this.options.prepend).concat(pluralCategory);
1488
- });
1489
- }
1490
- return rule.numbers.map(function (number) {
1491
- return _this.getSuffix(code, number, options);
1492
- });
1493
- }
1494
- }, {
1495
- key: "getSuffix",
1496
- value: function getSuffix(code, count) {
1497
- var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
1498
- var rule = this.getRule(code, options);
1499
- if (rule) {
1500
- if (this.shouldUseIntlApi()) {
1501
- return "".concat(this.options.prepend).concat(rule.select(count));
1502
- }
1503
- return this.getSuffixRetroCompatible(rule, count);
1504
- }
1505
- this.logger.warn("no plural rule found for: ".concat(code));
1506
- return '';
1507
- }
1508
- }, {
1509
- key: "getSuffixRetroCompatible",
1510
- value: function getSuffixRetroCompatible(rule, count) {
1511
- var _this2 = this;
1512
- var idx = rule.noAbs ? rule.plurals(count) : rule.plurals(Math.abs(count));
1513
- var suffix = rule.numbers[idx];
1514
- if (this.options.simplifyPluralSuffix && rule.numbers.length === 2 && rule.numbers[0] === 1) {
1515
- if (suffix === 2) {
1516
- suffix = 'plural';
1517
- } else if (suffix === 1) {
1518
- suffix = '';
1519
- }
1520
- }
1521
- var returnSuffix = function returnSuffix() {
1522
- return _this2.options.prepend && suffix.toString() ? _this2.options.prepend + suffix.toString() : suffix.toString();
1523
- };
1524
- if (this.options.compatibilityJSON === 'v1') {
1525
- if (suffix === 1) return '';
1526
- if (typeof suffix === 'number') return "_plural_".concat(suffix.toString());
1527
- return returnSuffix();
1528
- } else if (this.options.compatibilityJSON === 'v2') {
1529
- return returnSuffix();
1530
- } else if (this.options.simplifyPluralSuffix && rule.numbers.length === 2 && rule.numbers[0] === 1) {
1531
- return returnSuffix();
1532
- }
1533
- return this.options.prepend && idx.toString() ? this.options.prepend + idx.toString() : idx.toString();
1534
- }
1535
- }, {
1536
- key: "shouldUseIntlApi",
1537
- value: function shouldUseIntlApi() {
1538
- return !deprecatedJsonVersions.includes(this.options.compatibilityJSON);
1539
- }
1540
- }]);
1541
- return PluralResolver;
1542
- }();
1543
-
1544
- function ownKeys$3(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
1545
- function _objectSpread$3(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$3(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$3(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
1546
- function deepFindWithDefaults(data, defaultData, key) {
1547
- var keySeparator = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '.';
1548
- var ignoreJSONStructure = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;
1549
- var path = getPathWithDefaults(data, defaultData, key);
1550
- if (!path && ignoreJSONStructure && typeof key === 'string') {
1551
- path = deepFind(data, key, keySeparator);
1552
- if (path === undefined) path = deepFind(defaultData, key, keySeparator);
1553
- }
1554
- return path;
1555
- }
1556
- var Interpolator = function () {
1557
- function Interpolator() {
1558
- var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
1559
- _classCallCheck(this, Interpolator);
1560
- this.logger = baseLogger.create('interpolator');
1561
- this.options = options;
1562
- this.format = options.interpolation && options.interpolation.format || function (value) {
1563
- return value;
1564
- };
1565
- this.init(options);
1566
- }
1567
- _createClass(Interpolator, [{
1568
- key: "init",
1569
- value: function init() {
1570
- var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
1571
- if (!options.interpolation) options.interpolation = {
1572
- escapeValue: true
1573
- };
1574
- var iOpts = options.interpolation;
1575
- this.escape = iOpts.escape !== undefined ? iOpts.escape : escape;
1576
- this.escapeValue = iOpts.escapeValue !== undefined ? iOpts.escapeValue : true;
1577
- this.useRawValueToEscape = iOpts.useRawValueToEscape !== undefined ? iOpts.useRawValueToEscape : false;
1578
- this.prefix = iOpts.prefix ? regexEscape(iOpts.prefix) : iOpts.prefixEscaped || '{{';
1579
- this.suffix = iOpts.suffix ? regexEscape(iOpts.suffix) : iOpts.suffixEscaped || '}}';
1580
- this.formatSeparator = iOpts.formatSeparator ? iOpts.formatSeparator : iOpts.formatSeparator || ',';
1581
- this.unescapePrefix = iOpts.unescapeSuffix ? '' : iOpts.unescapePrefix || '-';
1582
- this.unescapeSuffix = this.unescapePrefix ? '' : iOpts.unescapeSuffix || '';
1583
- this.nestingPrefix = iOpts.nestingPrefix ? regexEscape(iOpts.nestingPrefix) : iOpts.nestingPrefixEscaped || regexEscape('$t(');
1584
- this.nestingSuffix = iOpts.nestingSuffix ? regexEscape(iOpts.nestingSuffix) : iOpts.nestingSuffixEscaped || regexEscape(')');
1585
- this.nestingOptionsSeparator = iOpts.nestingOptionsSeparator ? iOpts.nestingOptionsSeparator : iOpts.nestingOptionsSeparator || ',';
1586
- this.maxReplaces = iOpts.maxReplaces ? iOpts.maxReplaces : 1000;
1587
- this.alwaysFormat = iOpts.alwaysFormat !== undefined ? iOpts.alwaysFormat : false;
1588
- this.resetRegExp();
1589
- }
1590
- }, {
1591
- key: "reset",
1592
- value: function reset() {
1593
- if (this.options) this.init(this.options);
1594
- }
1595
- }, {
1596
- key: "resetRegExp",
1597
- value: function resetRegExp() {
1598
- var regexpStr = "".concat(this.prefix, "(.+?)").concat(this.suffix);
1599
- this.regexp = new RegExp(regexpStr, 'g');
1600
- var regexpUnescapeStr = "".concat(this.prefix).concat(this.unescapePrefix, "(.+?)").concat(this.unescapeSuffix).concat(this.suffix);
1601
- this.regexpUnescape = new RegExp(regexpUnescapeStr, 'g');
1602
- var nestingRegexpStr = "".concat(this.nestingPrefix, "(.+?)").concat(this.nestingSuffix);
1603
- this.nestingRegexp = new RegExp(nestingRegexpStr, 'g');
1604
- }
1605
- }, {
1606
- key: "interpolate",
1607
- value: function interpolate(str, data, lng, options) {
1608
- var _this = this;
1609
- var match;
1610
- var value;
1611
- var replaces;
1612
- var defaultData = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {};
1613
- function regexSafe(val) {
1614
- return val.replace(/\$/g, '$$$$');
1615
- }
1616
- var handleFormat = function handleFormat(key) {
1617
- if (key.indexOf(_this.formatSeparator) < 0) {
1618
- var path = deepFindWithDefaults(data, defaultData, key, _this.options.keySeparator, _this.options.ignoreJSONStructure);
1619
- return _this.alwaysFormat ? _this.format(path, undefined, lng, _objectSpread$3(_objectSpread$3(_objectSpread$3({}, options), data), {}, {
1620
- interpolationkey: key
1621
- })) : path;
1622
- }
1623
- var p = key.split(_this.formatSeparator);
1624
- var k = p.shift().trim();
1625
- var f = p.join(_this.formatSeparator).trim();
1626
- return _this.format(deepFindWithDefaults(data, defaultData, k, _this.options.keySeparator, _this.options.ignoreJSONStructure), f, lng, _objectSpread$3(_objectSpread$3(_objectSpread$3({}, options), data), {}, {
1627
- interpolationkey: k
1628
- }));
1629
- };
1630
- this.resetRegExp();
1631
- var missingInterpolationHandler = options && options.missingInterpolationHandler || this.options.missingInterpolationHandler;
1632
- var skipOnVariables = options && options.interpolation && options.interpolation.skipOnVariables !== undefined ? options.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables;
1633
- var todos = [{
1634
- regex: this.regexpUnescape,
1635
- safeValue: function safeValue(val) {
1636
- return regexSafe(val);
1637
- }
1638
- }, {
1639
- regex: this.regexp,
1640
- safeValue: function safeValue(val) {
1641
- return _this.escapeValue ? regexSafe(_this.escape(val)) : regexSafe(val);
1642
- }
1643
- }];
1644
- todos.forEach(function (todo) {
1645
- replaces = 0;
1646
- while (match = todo.regex.exec(str)) {
1647
- var matchedVar = match[1].trim();
1648
- value = handleFormat(matchedVar);
1649
- if (value === undefined) {
1650
- if (typeof missingInterpolationHandler === 'function') {
1651
- var temp = missingInterpolationHandler(str, match, options);
1652
- value = typeof temp === 'string' ? temp : '';
1653
- } else if (options && Object.prototype.hasOwnProperty.call(options, matchedVar)) {
1654
- value = '';
1655
- } else if (skipOnVariables) {
1656
- value = match[0];
1657
- continue;
1658
- } else {
1659
- _this.logger.warn("missed to pass in variable ".concat(matchedVar, " for interpolating ").concat(str));
1660
- value = '';
1661
- }
1662
- } else if (typeof value !== 'string' && !_this.useRawValueToEscape) {
1663
- value = makeString(value);
1664
- }
1665
- var safeValue = todo.safeValue(value);
1666
- str = str.replace(match[0], safeValue);
1667
- if (skipOnVariables) {
1668
- todo.regex.lastIndex += value.length;
1669
- todo.regex.lastIndex -= match[0].length;
1670
- } else {
1671
- todo.regex.lastIndex = 0;
1672
- }
1673
- replaces++;
1674
- if (replaces >= _this.maxReplaces) {
1675
- break;
1676
- }
1677
- }
1678
- });
1679
- return str;
1680
- }
1681
- }, {
1682
- key: "nest",
1683
- value: function nest(str, fc) {
1684
- var _this2 = this;
1685
- var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
1686
- var match;
1687
- var value;
1688
- var clonedOptions;
1689
- function handleHasOptions(key, inheritedOptions) {
1690
- var sep = this.nestingOptionsSeparator;
1691
- if (key.indexOf(sep) < 0) return key;
1692
- var c = key.split(new RegExp("".concat(sep, "[ ]*{")));
1693
- var optionsString = "{".concat(c[1]);
1694
- key = c[0];
1695
- optionsString = this.interpolate(optionsString, clonedOptions);
1696
- var matchedSingleQuotes = optionsString.match(/'/g);
1697
- var matchedDoubleQuotes = optionsString.match(/"/g);
1698
- if (matchedSingleQuotes && matchedSingleQuotes.length % 2 === 0 && !matchedDoubleQuotes || matchedDoubleQuotes.length % 2 !== 0) {
1699
- optionsString = optionsString.replace(/'/g, '"');
1700
- }
1701
- try {
1702
- clonedOptions = JSON.parse(optionsString);
1703
- if (inheritedOptions) clonedOptions = _objectSpread$3(_objectSpread$3({}, inheritedOptions), clonedOptions);
1704
- } catch (e) {
1705
- this.logger.warn("failed parsing options string in nesting for key ".concat(key), e);
1706
- return "".concat(key).concat(sep).concat(optionsString);
1707
- }
1708
- delete clonedOptions.defaultValue;
1709
- return key;
1710
- }
1711
- while (match = this.nestingRegexp.exec(str)) {
1712
- var formatters = [];
1713
- clonedOptions = _objectSpread$3({}, options);
1714
- clonedOptions = clonedOptions.replace && typeof clonedOptions.replace !== 'string' ? clonedOptions.replace : clonedOptions;
1715
- clonedOptions.applyPostProcessor = false;
1716
- delete clonedOptions.defaultValue;
1717
- var doReduce = false;
1718
- if (match[0].indexOf(this.formatSeparator) !== -1 && !/{.*}/.test(match[1])) {
1719
- var r = match[1].split(this.formatSeparator).map(function (elem) {
1720
- return elem.trim();
1721
- });
1722
- match[1] = r.shift();
1723
- formatters = r;
1724
- doReduce = true;
1725
- }
1726
- value = fc(handleHasOptions.call(this, match[1].trim(), clonedOptions), clonedOptions);
1727
- if (value && match[0] === str && typeof value !== 'string') return value;
1728
- if (typeof value !== 'string') value = makeString(value);
1729
- if (!value) {
1730
- this.logger.warn("missed to resolve ".concat(match[1], " for nesting ").concat(str));
1731
- value = '';
1732
- }
1733
- if (doReduce) {
1734
- value = formatters.reduce(function (v, f) {
1735
- return _this2.format(v, f, options.lng, _objectSpread$3(_objectSpread$3({}, options), {}, {
1736
- interpolationkey: match[1].trim()
1737
- }));
1738
- }, value.trim());
1739
- }
1740
- str = str.replace(match[0], value);
1741
- this.regexp.lastIndex = 0;
1742
- }
1743
- return str;
1744
- }
1745
- }]);
1746
- return Interpolator;
1747
- }();
1748
-
1749
- function ownKeys$2(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
1750
- function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$2(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$2(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
1751
- function parseFormatStr(formatStr) {
1752
- var formatName = formatStr.toLowerCase().trim();
1753
- var formatOptions = {};
1754
- if (formatStr.indexOf('(') > -1) {
1755
- var p = formatStr.split('(');
1756
- formatName = p[0].toLowerCase().trim();
1757
- var optStr = p[1].substring(0, p[1].length - 1);
1758
- if (formatName === 'currency' && optStr.indexOf(':') < 0) {
1759
- if (!formatOptions.currency) formatOptions.currency = optStr.trim();
1760
- } else if (formatName === 'relativetime' && optStr.indexOf(':') < 0) {
1761
- if (!formatOptions.range) formatOptions.range = optStr.trim();
1762
- } else {
1763
- var opts = optStr.split(';');
1764
- opts.forEach(function (opt) {
1765
- if (!opt) return;
1766
- var _opt$split = opt.split(':'),
1767
- _opt$split2 = _toArray(_opt$split),
1768
- key = _opt$split2[0],
1769
- rest = _opt$split2.slice(1);
1770
- var val = rest.join(':').trim().replace(/^'+|'+$/g, '');
1771
- if (!formatOptions[key.trim()]) formatOptions[key.trim()] = val;
1772
- if (val === 'false') formatOptions[key.trim()] = false;
1773
- if (val === 'true') formatOptions[key.trim()] = true;
1774
- if (!isNaN(val)) formatOptions[key.trim()] = parseInt(val, 10);
1775
- });
1776
- }
1777
- }
1778
- return {
1779
- formatName: formatName,
1780
- formatOptions: formatOptions
1781
- };
1782
- }
1783
- function createCachedFormatter(fn) {
1784
- var cache = {};
1785
- return function invokeFormatter(val, lng, options) {
1786
- var key = lng + JSON.stringify(options);
1787
- var formatter = cache[key];
1788
- if (!formatter) {
1789
- formatter = fn(lng, options);
1790
- cache[key] = formatter;
1791
- }
1792
- return formatter(val);
1793
- };
1794
- }
1795
- var Formatter = function () {
1796
- function Formatter() {
1797
- var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
1798
- _classCallCheck(this, Formatter);
1799
- this.logger = baseLogger.create('formatter');
1800
- this.options = options;
1801
- this.formats = {
1802
- number: createCachedFormatter(function (lng, opt) {
1803
- var formatter = new Intl.NumberFormat(lng, _objectSpread$2({}, opt));
1804
- return function (val) {
1805
- return formatter.format(val);
1806
- };
1807
- }),
1808
- currency: createCachedFormatter(function (lng, opt) {
1809
- var formatter = new Intl.NumberFormat(lng, _objectSpread$2(_objectSpread$2({}, opt), {}, {
1810
- style: 'currency'
1811
- }));
1812
- return function (val) {
1813
- return formatter.format(val);
1814
- };
1815
- }),
1816
- datetime: createCachedFormatter(function (lng, opt) {
1817
- var formatter = new Intl.DateTimeFormat(lng, _objectSpread$2({}, opt));
1818
- return function (val) {
1819
- return formatter.format(val);
1820
- };
1821
- }),
1822
- relativetime: createCachedFormatter(function (lng, opt) {
1823
- var formatter = new Intl.RelativeTimeFormat(lng, _objectSpread$2({}, opt));
1824
- return function (val) {
1825
- return formatter.format(val, opt.range || 'day');
1826
- };
1827
- }),
1828
- list: createCachedFormatter(function (lng, opt) {
1829
- var formatter = new Intl.ListFormat(lng, _objectSpread$2({}, opt));
1830
- return function (val) {
1831
- return formatter.format(val);
1832
- };
1833
- })
1834
- };
1835
- this.init(options);
1836
- }
1837
- _createClass(Formatter, [{
1838
- key: "init",
1839
- value: function init(services) {
1840
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
1841
- interpolation: {}
1842
- };
1843
- var iOpts = options.interpolation;
1844
- this.formatSeparator = iOpts.formatSeparator ? iOpts.formatSeparator : iOpts.formatSeparator || ',';
1845
- }
1846
- }, {
1847
- key: "add",
1848
- value: function add(name, fc) {
1849
- this.formats[name.toLowerCase().trim()] = fc;
1850
- }
1851
- }, {
1852
- key: "addCached",
1853
- value: function addCached(name, fc) {
1854
- this.formats[name.toLowerCase().trim()] = createCachedFormatter(fc);
1855
- }
1856
- }, {
1857
- key: "format",
1858
- value: function format(value, _format, lng) {
1859
- var _this = this;
1860
- var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
1861
- var formats = _format.split(this.formatSeparator);
1862
- var result = formats.reduce(function (mem, f) {
1863
- var _parseFormatStr = parseFormatStr(f),
1864
- formatName = _parseFormatStr.formatName,
1865
- formatOptions = _parseFormatStr.formatOptions;
1866
- if (_this.formats[formatName]) {
1867
- var formatted = mem;
1868
- try {
1869
- var valOptions = options && options.formatParams && options.formatParams[options.interpolationkey] || {};
1870
- var l = valOptions.locale || valOptions.lng || options.locale || options.lng || lng;
1871
- formatted = _this.formats[formatName](mem, l, _objectSpread$2(_objectSpread$2(_objectSpread$2({}, formatOptions), options), valOptions));
1872
- } catch (error) {
1873
- _this.logger.warn(error);
1874
- }
1875
- return formatted;
1876
- } else {
1877
- _this.logger.warn("there was no format function for ".concat(formatName));
1878
- }
1879
- return mem;
1880
- }, value);
1881
- return result;
1882
- }
1883
- }]);
1884
- return Formatter;
1885
- }();
1886
-
1887
- function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
1888
- function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
1889
- function _createSuper$1(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
1890
- function _isNativeReflectConstruct$1() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
1891
- function removePending(q, name) {
1892
- if (q.pending[name] !== undefined) {
1893
- delete q.pending[name];
1894
- q.pendingCount--;
1895
- }
1896
- }
1897
- var Connector = function (_EventEmitter) {
1898
- _inherits(Connector, _EventEmitter);
1899
- var _super = _createSuper$1(Connector);
1900
- function Connector(backend, store, services) {
1901
- var _this;
1902
- var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
1903
- _classCallCheck(this, Connector);
1904
- _this = _super.call(this);
1905
- if (isIE10) {
1906
- EventEmitter.call(_assertThisInitialized(_this));
1907
- }
1908
- _this.backend = backend;
1909
- _this.store = store;
1910
- _this.services = services;
1911
- _this.languageUtils = services.languageUtils;
1912
- _this.options = options;
1913
- _this.logger = baseLogger.create('backendConnector');
1914
- _this.waitingReads = [];
1915
- _this.maxParallelReads = options.maxParallelReads || 10;
1916
- _this.readingCalls = 0;
1917
- _this.maxRetries = options.maxRetries >= 0 ? options.maxRetries : 5;
1918
- _this.retryTimeout = options.retryTimeout >= 1 ? options.retryTimeout : 350;
1919
- _this.state = {};
1920
- _this.queue = [];
1921
- if (_this.backend && _this.backend.init) {
1922
- _this.backend.init(services, options.backend, options);
1923
- }
1924
- return _this;
1925
- }
1926
- _createClass(Connector, [{
1927
- key: "queueLoad",
1928
- value: function queueLoad(languages, namespaces, options, callback) {
1929
- var _this2 = this;
1930
- var toLoad = {};
1931
- var pending = {};
1932
- var toLoadLanguages = {};
1933
- var toLoadNamespaces = {};
1934
- languages.forEach(function (lng) {
1935
- var hasAllNamespaces = true;
1936
- namespaces.forEach(function (ns) {
1937
- var name = "".concat(lng, "|").concat(ns);
1938
- if (!options.reload && _this2.store.hasResourceBundle(lng, ns)) {
1939
- _this2.state[name] = 2;
1940
- } else if (_this2.state[name] < 0) ; else if (_this2.state[name] === 1) {
1941
- if (pending[name] === undefined) pending[name] = true;
1942
- } else {
1943
- _this2.state[name] = 1;
1944
- hasAllNamespaces = false;
1945
- if (pending[name] === undefined) pending[name] = true;
1946
- if (toLoad[name] === undefined) toLoad[name] = true;
1947
- if (toLoadNamespaces[ns] === undefined) toLoadNamespaces[ns] = true;
1948
- }
1949
- });
1950
- if (!hasAllNamespaces) toLoadLanguages[lng] = true;
1951
- });
1952
- if (Object.keys(toLoad).length || Object.keys(pending).length) {
1953
- this.queue.push({
1954
- pending: pending,
1955
- pendingCount: Object.keys(pending).length,
1956
- loaded: {},
1957
- errors: [],
1958
- callback: callback
1959
- });
1960
- }
1961
- return {
1962
- toLoad: Object.keys(toLoad),
1963
- pending: Object.keys(pending),
1964
- toLoadLanguages: Object.keys(toLoadLanguages),
1965
- toLoadNamespaces: Object.keys(toLoadNamespaces)
1966
- };
1967
- }
1968
- }, {
1969
- key: "loaded",
1970
- value: function loaded(name, err, data) {
1971
- var s = name.split('|');
1972
- var lng = s[0];
1973
- var ns = s[1];
1974
- if (err) this.emit('failedLoading', lng, ns, err);
1975
- if (data) {
1976
- this.store.addResourceBundle(lng, ns, data);
1977
- }
1978
- this.state[name] = err ? -1 : 2;
1979
- var loaded = {};
1980
- this.queue.forEach(function (q) {
1981
- pushPath(q.loaded, [lng], ns);
1982
- removePending(q, name);
1983
- if (err) q.errors.push(err);
1984
- if (q.pendingCount === 0 && !q.done) {
1985
- Object.keys(q.loaded).forEach(function (l) {
1986
- if (!loaded[l]) loaded[l] = {};
1987
- var loadedKeys = q.loaded[l];
1988
- if (loadedKeys.length) {
1989
- loadedKeys.forEach(function (n) {
1990
- if (loaded[l][n] === undefined) loaded[l][n] = true;
1991
- });
1992
- }
1993
- });
1994
- q.done = true;
1995
- if (q.errors.length) {
1996
- q.callback(q.errors);
1997
- } else {
1998
- q.callback();
1999
- }
2000
- }
2001
- });
2002
- this.emit('loaded', loaded);
2003
- this.queue = this.queue.filter(function (q) {
2004
- return !q.done;
2005
- });
2006
- }
2007
- }, {
2008
- key: "read",
2009
- value: function read(lng, ns, fcName) {
2010
- var _this3 = this;
2011
- var tried = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
2012
- var wait = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : this.retryTimeout;
2013
- var callback = arguments.length > 5 ? arguments[5] : undefined;
2014
- if (!lng.length) return callback(null, {});
2015
- if (this.readingCalls >= this.maxParallelReads) {
2016
- this.waitingReads.push({
2017
- lng: lng,
2018
- ns: ns,
2019
- fcName: fcName,
2020
- tried: tried,
2021
- wait: wait,
2022
- callback: callback
2023
- });
2024
- return;
2025
- }
2026
- this.readingCalls++;
2027
- var resolver = function resolver(err, data) {
2028
- _this3.readingCalls--;
2029
- if (_this3.waitingReads.length > 0) {
2030
- var next = _this3.waitingReads.shift();
2031
- _this3.read(next.lng, next.ns, next.fcName, next.tried, next.wait, next.callback);
2032
- }
2033
- if (err && data && tried < _this3.maxRetries) {
2034
- setTimeout(function () {
2035
- _this3.read.call(_this3, lng, ns, fcName, tried + 1, wait * 2, callback);
2036
- }, wait);
2037
- return;
2038
- }
2039
- callback(err, data);
2040
- };
2041
- var fc = this.backend[fcName].bind(this.backend);
2042
- if (fc.length === 2) {
2043
- try {
2044
- var r = fc(lng, ns);
2045
- if (r && typeof r.then === 'function') {
2046
- r.then(function (data) {
2047
- return resolver(null, data);
2048
- })["catch"](resolver);
2049
- } else {
2050
- resolver(null, r);
2051
- }
2052
- } catch (err) {
2053
- resolver(err);
2054
- }
2055
- return;
2056
- }
2057
- return fc(lng, ns, resolver);
2058
- }
2059
- }, {
2060
- key: "prepareLoading",
2061
- value: function prepareLoading(languages, namespaces) {
2062
- var _this4 = this;
2063
- var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
2064
- var callback = arguments.length > 3 ? arguments[3] : undefined;
2065
- if (!this.backend) {
2066
- this.logger.warn('No backend was added via i18next.use. Will not load resources.');
2067
- return callback && callback();
2068
- }
2069
- if (typeof languages === 'string') languages = this.languageUtils.toResolveHierarchy(languages);
2070
- if (typeof namespaces === 'string') namespaces = [namespaces];
2071
- var toLoad = this.queueLoad(languages, namespaces, options, callback);
2072
- if (!toLoad.toLoad.length) {
2073
- if (!toLoad.pending.length) callback();
2074
- return null;
2075
- }
2076
- toLoad.toLoad.forEach(function (name) {
2077
- _this4.loadOne(name);
2078
- });
2079
- }
2080
- }, {
2081
- key: "load",
2082
- value: function load(languages, namespaces, callback) {
2083
- this.prepareLoading(languages, namespaces, {}, callback);
2084
- }
2085
- }, {
2086
- key: "reload",
2087
- value: function reload(languages, namespaces, callback) {
2088
- this.prepareLoading(languages, namespaces, {
2089
- reload: true
2090
- }, callback);
2091
- }
2092
- }, {
2093
- key: "loadOne",
2094
- value: function loadOne(name) {
2095
- var _this5 = this;
2096
- var prefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
2097
- var s = name.split('|');
2098
- var lng = s[0];
2099
- var ns = s[1];
2100
- this.read(lng, ns, 'read', undefined, undefined, function (err, data) {
2101
- if (err) _this5.logger.warn("".concat(prefix, "loading namespace ").concat(ns, " for language ").concat(lng, " failed"), err);
2102
- if (!err && data) _this5.logger.log("".concat(prefix, "loaded namespace ").concat(ns, " for language ").concat(lng), data);
2103
- _this5.loaded(name, err, data);
2104
- });
2105
- }
2106
- }, {
2107
- key: "saveMissing",
2108
- value: function saveMissing(languages, namespace, key, fallbackValue, isUpdate) {
2109
- var options = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {};
2110
- var clb = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : function () {};
2111
- if (this.services.utils && this.services.utils.hasLoadedNamespace && !this.services.utils.hasLoadedNamespace(namespace)) {
2112
- this.logger.warn("did not save key \"".concat(key, "\" as the namespace \"").concat(namespace, "\" was not yet loaded"), 'This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!');
2113
- return;
2114
- }
2115
- if (key === undefined || key === null || key === '') return;
2116
- if (this.backend && this.backend.create) {
2117
- var opts = _objectSpread$1(_objectSpread$1({}, options), {}, {
2118
- isUpdate: isUpdate
2119
- });
2120
- var fc = this.backend.create.bind(this.backend);
2121
- if (fc.length < 6) {
2122
- try {
2123
- var r;
2124
- if (fc.length === 5) {
2125
- r = fc(languages, namespace, key, fallbackValue, opts);
2126
- } else {
2127
- r = fc(languages, namespace, key, fallbackValue);
2128
- }
2129
- if (r && typeof r.then === 'function') {
2130
- r.then(function (data) {
2131
- return clb(null, data);
2132
- })["catch"](clb);
2133
- } else {
2134
- clb(null, r);
2135
- }
2136
- } catch (err) {
2137
- clb(err);
2138
- }
2139
- } else {
2140
- fc(languages, namespace, key, fallbackValue, clb, opts);
2141
- }
2142
- }
2143
- if (!languages || !languages[0]) return;
2144
- this.store.addResource(languages[0], namespace, key, fallbackValue);
2145
- }
2146
- }]);
2147
- return Connector;
2148
- }(EventEmitter);
2149
-
2150
- function get() {
2151
- return {
2152
- debug: false,
2153
- initImmediate: true,
2154
- ns: ['translation'],
2155
- defaultNS: ['translation'],
2156
- fallbackLng: ['dev'],
2157
- fallbackNS: false,
2158
- supportedLngs: false,
2159
- nonExplicitSupportedLngs: false,
2160
- load: 'all',
2161
- preload: false,
2162
- simplifyPluralSuffix: true,
2163
- keySeparator: '.',
2164
- nsSeparator: ':',
2165
- pluralSeparator: '_',
2166
- contextSeparator: '_',
2167
- partialBundledLanguages: false,
2168
- saveMissing: false,
2169
- updateMissing: false,
2170
- saveMissingTo: 'fallback',
2171
- saveMissingPlurals: true,
2172
- missingKeyHandler: false,
2173
- missingInterpolationHandler: false,
2174
- postProcess: false,
2175
- postProcessPassResolved: false,
2176
- returnNull: true,
2177
- returnEmptyString: true,
2178
- returnObjects: false,
2179
- joinArrays: false,
2180
- returnedObjectHandler: false,
2181
- parseMissingKeyHandler: false,
2182
- appendNamespaceToMissingKey: false,
2183
- appendNamespaceToCIMode: false,
2184
- overloadTranslationOptionHandler: function handle(args) {
2185
- var ret = {};
2186
- if (_typeof(args[1]) === 'object') ret = args[1];
2187
- if (typeof args[1] === 'string') ret.defaultValue = args[1];
2188
- if (typeof args[2] === 'string') ret.tDescription = args[2];
2189
- if (_typeof(args[2]) === 'object' || _typeof(args[3]) === 'object') {
2190
- var options = args[3] || args[2];
2191
- Object.keys(options).forEach(function (key) {
2192
- ret[key] = options[key];
2193
- });
2194
- }
2195
- return ret;
2196
- },
2197
- interpolation: {
2198
- escapeValue: true,
2199
- format: function format(value, _format, lng, options) {
2200
- return value;
2201
- },
2202
- prefix: '{{',
2203
- suffix: '}}',
2204
- formatSeparator: ',',
2205
- unescapePrefix: '-',
2206
- nestingPrefix: '$t(',
2207
- nestingSuffix: ')',
2208
- nestingOptionsSeparator: ',',
2209
- maxReplaces: 1000,
2210
- skipOnVariables: true
2211
- }
2212
- };
2213
- }
2214
- function transformOptions(options) {
2215
- if (typeof options.ns === 'string') options.ns = [options.ns];
2216
- if (typeof options.fallbackLng === 'string') options.fallbackLng = [options.fallbackLng];
2217
- if (typeof options.fallbackNS === 'string') options.fallbackNS = [options.fallbackNS];
2218
- if (options.supportedLngs && options.supportedLngs.indexOf('cimode') < 0) {
2219
- options.supportedLngs = options.supportedLngs.concat(['cimode']);
2220
- }
2221
- return options;
2222
- }
2223
-
2224
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2225
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
2226
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
2227
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
2228
- function noop() {}
2229
- function bindMemberFunctions(inst) {
2230
- var mems = Object.getOwnPropertyNames(Object.getPrototypeOf(inst));
2231
- mems.forEach(function (mem) {
2232
- if (typeof inst[mem] === 'function') {
2233
- inst[mem] = inst[mem].bind(inst);
2234
- }
2235
- });
2236
- }
2237
- var I18n = function (_EventEmitter) {
2238
- _inherits(I18n, _EventEmitter);
2239
- var _super = _createSuper(I18n);
2240
- function I18n() {
2241
- var _this;
2242
- var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2243
- var callback = arguments.length > 1 ? arguments[1] : undefined;
2244
- _classCallCheck(this, I18n);
2245
- _this = _super.call(this);
2246
- if (isIE10) {
2247
- EventEmitter.call(_assertThisInitialized(_this));
2248
- }
2249
- _this.options = transformOptions(options);
2250
- _this.services = {};
2251
- _this.logger = baseLogger;
2252
- _this.modules = {
2253
- external: []
2254
- };
2255
- bindMemberFunctions(_assertThisInitialized(_this));
2256
- if (callback && !_this.isInitialized && !options.isClone) {
2257
- if (!_this.options.initImmediate) {
2258
- _this.init(options, callback);
2259
- return _possibleConstructorReturn(_this, _assertThisInitialized(_this));
2260
- }
2261
- setTimeout(function () {
2262
- _this.init(options, callback);
2263
- }, 0);
2264
- }
2265
- return _this;
2266
- }
2267
- _createClass(I18n, [{
2268
- key: "init",
2269
- value: function init() {
2270
- var _this2 = this;
2271
- var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2272
- var callback = arguments.length > 1 ? arguments[1] : undefined;
2273
- if (typeof options === 'function') {
2274
- callback = options;
2275
- options = {};
2276
- }
2277
- if (!options.defaultNS && options.defaultNS !== false && options.ns) {
2278
- if (typeof options.ns === 'string') {
2279
- options.defaultNS = options.ns;
2280
- } else if (options.ns.indexOf('translation') < 0) {
2281
- options.defaultNS = options.ns[0];
2282
- }
2283
- }
2284
- var defOpts = get();
2285
- this.options = _objectSpread(_objectSpread(_objectSpread({}, defOpts), this.options), transformOptions(options));
2286
- if (this.options.compatibilityAPI !== 'v1') {
2287
- this.options.interpolation = _objectSpread(_objectSpread({}, defOpts.interpolation), this.options.interpolation);
2288
- }
2289
- if (options.keySeparator !== undefined) {
2290
- this.options.userDefinedKeySeparator = options.keySeparator;
2291
- }
2292
- if (options.nsSeparator !== undefined) {
2293
- this.options.userDefinedNsSeparator = options.nsSeparator;
2294
- }
2295
- function createClassOnDemand(ClassOrObject) {
2296
- if (!ClassOrObject) return null;
2297
- if (typeof ClassOrObject === 'function') return new ClassOrObject();
2298
- return ClassOrObject;
2299
- }
2300
- if (!this.options.isClone) {
2301
- if (this.modules.logger) {
2302
- baseLogger.init(createClassOnDemand(this.modules.logger), this.options);
2303
- } else {
2304
- baseLogger.init(null, this.options);
2305
- }
2306
- var formatter;
2307
- if (this.modules.formatter) {
2308
- formatter = this.modules.formatter;
2309
- } else if (typeof Intl !== 'undefined') {
2310
- formatter = Formatter;
2311
- }
2312
- var lu = new LanguageUtil(this.options);
2313
- this.store = new ResourceStore(this.options.resources, this.options);
2314
- var s = this.services;
2315
- s.logger = baseLogger;
2316
- s.resourceStore = this.store;
2317
- s.languageUtils = lu;
2318
- s.pluralResolver = new PluralResolver(lu, {
2319
- prepend: this.options.pluralSeparator,
2320
- compatibilityJSON: this.options.compatibilityJSON,
2321
- simplifyPluralSuffix: this.options.simplifyPluralSuffix
2322
- });
2323
- if (formatter && (!this.options.interpolation.format || this.options.interpolation.format === defOpts.interpolation.format)) {
2324
- s.formatter = createClassOnDemand(formatter);
2325
- s.formatter.init(s, this.options);
2326
- this.options.interpolation.format = s.formatter.format.bind(s.formatter);
2327
- }
2328
- s.interpolator = new Interpolator(this.options);
2329
- s.utils = {
2330
- hasLoadedNamespace: this.hasLoadedNamespace.bind(this)
2331
- };
2332
- s.backendConnector = new Connector(createClassOnDemand(this.modules.backend), s.resourceStore, s, this.options);
2333
- s.backendConnector.on('*', function (event) {
2334
- for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
2335
- args[_key - 1] = arguments[_key];
2336
- }
2337
- _this2.emit.apply(_this2, [event].concat(args));
2338
- });
2339
- if (this.modules.languageDetector) {
2340
- s.languageDetector = createClassOnDemand(this.modules.languageDetector);
2341
- if (s.languageDetector.init) s.languageDetector.init(s, this.options.detection, this.options);
2342
- }
2343
- if (this.modules.i18nFormat) {
2344
- s.i18nFormat = createClassOnDemand(this.modules.i18nFormat);
2345
- if (s.i18nFormat.init) s.i18nFormat.init(this);
2346
- }
2347
- this.translator = new Translator(this.services, this.options);
2348
- this.translator.on('*', function (event) {
2349
- for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
2350
- args[_key2 - 1] = arguments[_key2];
2351
- }
2352
- _this2.emit.apply(_this2, [event].concat(args));
2353
- });
2354
- this.modules.external.forEach(function (m) {
2355
- if (m.init) m.init(_this2);
2356
- });
2357
- }
2358
- this.format = this.options.interpolation.format;
2359
- if (!callback) callback = noop;
2360
- if (this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
2361
- var codes = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
2362
- if (codes.length > 0 && codes[0] !== 'dev') this.options.lng = codes[0];
2363
- }
2364
- if (!this.services.languageDetector && !this.options.lng) {
2365
- this.logger.warn('init: no languageDetector is used and no lng is defined');
2366
- }
2367
- var storeApi = ['getResource', 'hasResourceBundle', 'getResourceBundle', 'getDataByLanguage'];
2368
- storeApi.forEach(function (fcName) {
2369
- _this2[fcName] = function () {
2370
- var _this2$store;
2371
- return (_this2$store = _this2.store)[fcName].apply(_this2$store, arguments);
2372
- };
2373
- });
2374
- var storeApiChained = ['addResource', 'addResources', 'addResourceBundle', 'removeResourceBundle'];
2375
- storeApiChained.forEach(function (fcName) {
2376
- _this2[fcName] = function () {
2377
- var _this2$store2;
2378
- (_this2$store2 = _this2.store)[fcName].apply(_this2$store2, arguments);
2379
- return _this2;
2380
- };
2381
- });
2382
- var deferred = defer();
2383
- var load = function load() {
2384
- var finish = function finish(err, t) {
2385
- if (_this2.isInitialized && !_this2.initializedStoreOnce) _this2.logger.warn('init: i18next is already initialized. You should call init just once!');
2386
- _this2.isInitialized = true;
2387
- if (!_this2.options.isClone) _this2.logger.log('initialized', _this2.options);
2388
- _this2.emit('initialized', _this2.options);
2389
- deferred.resolve(t);
2390
- callback(err, t);
2391
- };
2392
- if (_this2.languages && _this2.options.compatibilityAPI !== 'v1' && !_this2.isInitialized) return finish(null, _this2.t.bind(_this2));
2393
- _this2.changeLanguage(_this2.options.lng, finish);
2394
- };
2395
- if (this.options.resources || !this.options.initImmediate) {
2396
- load();
2397
- } else {
2398
- setTimeout(load, 0);
2399
- }
2400
- return deferred;
2401
- }
2402
- }, {
2403
- key: "loadResources",
2404
- value: function loadResources(language) {
2405
- var _this3 = this;
2406
- var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : noop;
2407
- var usedCallback = callback;
2408
- var usedLng = typeof language === 'string' ? language : this.language;
2409
- if (typeof language === 'function') usedCallback = language;
2410
- if (!this.options.resources || this.options.partialBundledLanguages) {
2411
- if (usedLng && usedLng.toLowerCase() === 'cimode') return usedCallback();
2412
- var toLoad = [];
2413
- var append = function append(lng) {
2414
- if (!lng) return;
2415
- var lngs = _this3.services.languageUtils.toResolveHierarchy(lng);
2416
- lngs.forEach(function (l) {
2417
- if (toLoad.indexOf(l) < 0) toLoad.push(l);
2418
- });
2419
- };
2420
- if (!usedLng) {
2421
- var fallbacks = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
2422
- fallbacks.forEach(function (l) {
2423
- return append(l);
2424
- });
2425
- } else {
2426
- append(usedLng);
2427
- }
2428
- if (this.options.preload) {
2429
- this.options.preload.forEach(function (l) {
2430
- return append(l);
2431
- });
2432
- }
2433
- this.services.backendConnector.load(toLoad, this.options.ns, function (e) {
2434
- if (!e && !_this3.resolvedLanguage && _this3.language) _this3.setResolvedLanguage(_this3.language);
2435
- usedCallback(e);
2436
- });
2437
- } else {
2438
- usedCallback(null);
2439
- }
2440
- }
2441
- }, {
2442
- key: "reloadResources",
2443
- value: function reloadResources(lngs, ns, callback) {
2444
- var deferred = defer();
2445
- if (!lngs) lngs = this.languages;
2446
- if (!ns) ns = this.options.ns;
2447
- if (!callback) callback = noop;
2448
- this.services.backendConnector.reload(lngs, ns, function (err) {
2449
- deferred.resolve();
2450
- callback(err);
2451
- });
2452
- return deferred;
2453
- }
2454
- }, {
2455
- key: "use",
2456
- value: function use(module) {
2457
- if (!module) throw new Error('You are passing an undefined module! Please check the object you are passing to i18next.use()');
2458
- if (!module.type) throw new Error('You are passing a wrong module! Please check the object you are passing to i18next.use()');
2459
- if (module.type === 'backend') {
2460
- this.modules.backend = module;
2461
- }
2462
- if (module.type === 'logger' || module.log && module.warn && module.error) {
2463
- this.modules.logger = module;
2464
- }
2465
- if (module.type === 'languageDetector') {
2466
- this.modules.languageDetector = module;
2467
- }
2468
- if (module.type === 'i18nFormat') {
2469
- this.modules.i18nFormat = module;
2470
- }
2471
- if (module.type === 'postProcessor') {
2472
- postProcessor.addPostProcessor(module);
2473
- }
2474
- if (module.type === 'formatter') {
2475
- this.modules.formatter = module;
2476
- }
2477
- if (module.type === '3rdParty') {
2478
- this.modules.external.push(module);
2479
- }
2480
- return this;
2481
- }
2482
- }, {
2483
- key: "setResolvedLanguage",
2484
- value: function setResolvedLanguage(l) {
2485
- if (!l || !this.languages) return;
2486
- if (['cimode', 'dev'].indexOf(l) > -1) return;
2487
- for (var li = 0; li < this.languages.length; li++) {
2488
- var lngInLngs = this.languages[li];
2489
- if (['cimode', 'dev'].indexOf(lngInLngs) > -1) continue;
2490
- if (this.store.hasLanguageSomeTranslations(lngInLngs)) {
2491
- this.resolvedLanguage = lngInLngs;
2492
- break;
2493
- }
2494
- }
2495
- }
2496
- }, {
2497
- key: "changeLanguage",
2498
- value: function changeLanguage(lng, callback) {
2499
- var _this4 = this;
2500
- this.isLanguageChangingTo = lng;
2501
- var deferred = defer();
2502
- this.emit('languageChanging', lng);
2503
- var setLngProps = function setLngProps(l) {
2504
- _this4.language = l;
2505
- _this4.languages = _this4.services.languageUtils.toResolveHierarchy(l);
2506
- _this4.resolvedLanguage = undefined;
2507
- _this4.setResolvedLanguage(l);
2508
- };
2509
- var done = function done(err, l) {
2510
- if (l) {
2511
- setLngProps(l);
2512
- _this4.translator.changeLanguage(l);
2513
- _this4.isLanguageChangingTo = undefined;
2514
- _this4.emit('languageChanged', l);
2515
- _this4.logger.log('languageChanged', l);
2516
- } else {
2517
- _this4.isLanguageChangingTo = undefined;
2518
- }
2519
- deferred.resolve(function () {
2520
- return _this4.t.apply(_this4, arguments);
2521
- });
2522
- if (callback) callback(err, function () {
2523
- return _this4.t.apply(_this4, arguments);
2524
- });
2525
- };
2526
- var setLng = function setLng(lngs) {
2527
- if (!lng && !lngs && _this4.services.languageDetector) lngs = [];
2528
- var l = typeof lngs === 'string' ? lngs : _this4.services.languageUtils.getBestMatchFromCodes(lngs);
2529
- if (l) {
2530
- if (!_this4.language) {
2531
- setLngProps(l);
2532
- }
2533
- if (!_this4.translator.language) _this4.translator.changeLanguage(l);
2534
- if (_this4.services.languageDetector && _this4.services.languageDetector.cacheUserLanguage) _this4.services.languageDetector.cacheUserLanguage(l);
2535
- }
2536
- _this4.loadResources(l, function (err) {
2537
- done(err, l);
2538
- });
2539
- };
2540
- if (!lng && this.services.languageDetector && !this.services.languageDetector.async) {
2541
- setLng(this.services.languageDetector.detect());
2542
- } else if (!lng && this.services.languageDetector && this.services.languageDetector.async) {
2543
- if (this.services.languageDetector.detect.length === 0) {
2544
- this.services.languageDetector.detect().then(setLng);
2545
- } else {
2546
- this.services.languageDetector.detect(setLng);
2547
- }
2548
- } else {
2549
- setLng(lng);
2550
- }
2551
- return deferred;
2552
- }
2553
- }, {
2554
- key: "getFixedT",
2555
- value: function getFixedT(lng, ns, keyPrefix) {
2556
- var _this5 = this;
2557
- var fixedT = function fixedT(key, opts) {
2558
- var options;
2559
- if (_typeof(opts) !== 'object') {
2560
- for (var _len3 = arguments.length, rest = new Array(_len3 > 2 ? _len3 - 2 : 0), _key3 = 2; _key3 < _len3; _key3++) {
2561
- rest[_key3 - 2] = arguments[_key3];
2562
- }
2563
- options = _this5.options.overloadTranslationOptionHandler([key, opts].concat(rest));
2564
- } else {
2565
- options = _objectSpread({}, opts);
2566
- }
2567
- options.lng = options.lng || fixedT.lng;
2568
- options.lngs = options.lngs || fixedT.lngs;
2569
- options.ns = options.ns || fixedT.ns;
2570
- options.keyPrefix = options.keyPrefix || keyPrefix || fixedT.keyPrefix;
2571
- var keySeparator = _this5.options.keySeparator || '.';
2572
- var resultKey;
2573
- if (options.keyPrefix && Array.isArray(key)) {
2574
- resultKey = key.map(function (k) {
2575
- return "".concat(options.keyPrefix).concat(keySeparator).concat(k);
2576
- });
2577
- } else {
2578
- resultKey = options.keyPrefix ? "".concat(options.keyPrefix).concat(keySeparator).concat(key) : key;
2579
- }
2580
- return _this5.t(resultKey, options);
2581
- };
2582
- if (typeof lng === 'string') {
2583
- fixedT.lng = lng;
2584
- } else {
2585
- fixedT.lngs = lng;
2586
- }
2587
- fixedT.ns = ns;
2588
- fixedT.keyPrefix = keyPrefix;
2589
- return fixedT;
2590
- }
2591
- }, {
2592
- key: "t",
2593
- value: function t() {
2594
- var _this$translator;
2595
- return this.translator && (_this$translator = this.translator).translate.apply(_this$translator, arguments);
2596
- }
2597
- }, {
2598
- key: "exists",
2599
- value: function exists() {
2600
- var _this$translator2;
2601
- return this.translator && (_this$translator2 = this.translator).exists.apply(_this$translator2, arguments);
2602
- }
2603
- }, {
2604
- key: "setDefaultNamespace",
2605
- value: function setDefaultNamespace(ns) {
2606
- this.options.defaultNS = ns;
2607
- }
2608
- }, {
2609
- key: "hasLoadedNamespace",
2610
- value: function hasLoadedNamespace(ns) {
2611
- var _this6 = this;
2612
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
2613
- if (!this.isInitialized) {
2614
- this.logger.warn('hasLoadedNamespace: i18next was not initialized', this.languages);
2615
- return false;
2616
- }
2617
- if (!this.languages || !this.languages.length) {
2618
- this.logger.warn('hasLoadedNamespace: i18n.languages were undefined or empty', this.languages);
2619
- return false;
2620
- }
2621
- var lng = options.lng || this.resolvedLanguage || this.languages[0];
2622
- var fallbackLng = this.options ? this.options.fallbackLng : false;
2623
- var lastLng = this.languages[this.languages.length - 1];
2624
- if (lng.toLowerCase() === 'cimode') return true;
2625
- var loadNotPending = function loadNotPending(l, n) {
2626
- var loadState = _this6.services.backendConnector.state["".concat(l, "|").concat(n)];
2627
- return loadState === -1 || loadState === 2;
2628
- };
2629
- if (options.precheck) {
2630
- var preResult = options.precheck(this, loadNotPending);
2631
- if (preResult !== undefined) return preResult;
2632
- }
2633
- if (this.hasResourceBundle(lng, ns)) return true;
2634
- if (!this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages) return true;
2635
- if (loadNotPending(lng, ns) && (!fallbackLng || loadNotPending(lastLng, ns))) return true;
2636
- return false;
2637
- }
2638
- }, {
2639
- key: "loadNamespaces",
2640
- value: function loadNamespaces(ns, callback) {
2641
- var _this7 = this;
2642
- var deferred = defer();
2643
- if (!this.options.ns) {
2644
- if (callback) callback();
2645
- return Promise.resolve();
2646
- }
2647
- if (typeof ns === 'string') ns = [ns];
2648
- ns.forEach(function (n) {
2649
- if (_this7.options.ns.indexOf(n) < 0) _this7.options.ns.push(n);
2650
- });
2651
- this.loadResources(function (err) {
2652
- deferred.resolve();
2653
- if (callback) callback(err);
2654
- });
2655
- return deferred;
2656
- }
2657
- }, {
2658
- key: "loadLanguages",
2659
- value: function loadLanguages(lngs, callback) {
2660
- var deferred = defer();
2661
- if (typeof lngs === 'string') lngs = [lngs];
2662
- var preloaded = this.options.preload || [];
2663
- var newLngs = lngs.filter(function (lng) {
2664
- return preloaded.indexOf(lng) < 0;
2665
- });
2666
- if (!newLngs.length) {
2667
- if (callback) callback();
2668
- return Promise.resolve();
2669
- }
2670
- this.options.preload = preloaded.concat(newLngs);
2671
- this.loadResources(function (err) {
2672
- deferred.resolve();
2673
- if (callback) callback(err);
2674
- });
2675
- return deferred;
2676
- }
2677
- }, {
2678
- key: "dir",
2679
- value: function dir(lng) {
2680
- if (!lng) lng = this.resolvedLanguage || (this.languages && this.languages.length > 0 ? this.languages[0] : this.language);
2681
- if (!lng) return 'rtl';
2682
- var rtlLngs = ['ar', 'shu', 'sqr', 'ssh', 'xaa', 'yhd', 'yud', 'aao', 'abh', 'abv', 'acm', 'acq', 'acw', 'acx', 'acy', 'adf', 'ads', 'aeb', 'aec', 'afb', 'ajp', 'apc', 'apd', 'arb', 'arq', 'ars', 'ary', 'arz', 'auz', 'avl', 'ayh', 'ayl', 'ayn', 'ayp', 'bbz', 'pga', 'he', 'iw', 'ps', 'pbt', 'pbu', 'pst', 'prp', 'prd', 'ug', 'ur', 'ydd', 'yds', 'yih', 'ji', 'yi', 'hbo', 'men', 'xmn', 'fa', 'jpr', 'peo', 'pes', 'prs', 'dv', 'sam', 'ckb'];
2683
- var languageUtils = this.services && this.services.languageUtils || new LanguageUtil(get());
2684
- return rtlLngs.indexOf(languageUtils.getLanguagePartFromCode(lng)) > -1 || lng.toLowerCase().indexOf('-arab') > 1 ? 'rtl' : 'ltr';
2685
- }
2686
- }, {
2687
- key: "cloneInstance",
2688
- value: function cloneInstance() {
2689
- var _this8 = this;
2690
- var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2691
- var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : noop;
2692
- var mergedOptions = _objectSpread(_objectSpread(_objectSpread({}, this.options), options), {
2693
- isClone: true
2694
- });
2695
- var clone = new I18n(mergedOptions);
2696
- if (options.debug !== undefined || options.prefix !== undefined) {
2697
- clone.logger = clone.logger.clone(options);
2698
- }
2699
- var membersToCopy = ['store', 'services', 'language'];
2700
- membersToCopy.forEach(function (m) {
2701
- clone[m] = _this8[m];
2702
- });
2703
- clone.services = _objectSpread({}, this.services);
2704
- clone.services.utils = {
2705
- hasLoadedNamespace: clone.hasLoadedNamespace.bind(clone)
2706
- };
2707
- clone.translator = new Translator(clone.services, clone.options);
2708
- clone.translator.on('*', function (event) {
2709
- for (var _len4 = arguments.length, args = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
2710
- args[_key4 - 1] = arguments[_key4];
2711
- }
2712
- clone.emit.apply(clone, [event].concat(args));
2713
- });
2714
- clone.init(mergedOptions, callback);
2715
- clone.translator.options = clone.options;
2716
- clone.translator.backendConnector.services.utils = {
2717
- hasLoadedNamespace: clone.hasLoadedNamespace.bind(clone)
2718
- };
2719
- return clone;
2720
- }
2721
- }, {
2722
- key: "toJSON",
2723
- value: function toJSON() {
2724
- return {
2725
- options: this.options,
2726
- store: this.store,
2727
- language: this.language,
2728
- languages: this.languages,
2729
- resolvedLanguage: this.resolvedLanguage
2730
- };
2731
- }
2732
- }]);
2733
- return I18n;
2734
- }(EventEmitter);
2735
- _defineProperty(I18n, "createInstance", function () {
2736
- var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2737
- var callback = arguments.length > 1 ? arguments[1] : undefined;
2738
- return new I18n(options, callback);
2739
- });
2740
- var instance = I18n.createInstance();
2741
- instance.createInstance = I18n.createInstance;
2742
-
2743
- var arr = [];
2744
- var each = arr.forEach;
2745
- var slice = arr.slice;
2746
- function defaults(obj) {
2747
- each.call(slice.call(arguments, 1), function (source) {
2748
- if (source) {
2749
- for (var prop in source) {
2750
- if (obj[prop] === undefined) obj[prop] = source[prop];
2751
- }
2752
- }
2753
- });
2754
- return obj;
2755
- }
2756
-
2757
- // eslint-disable-next-line no-control-regex
2758
- var fieldContentRegExp = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;
2759
- var serializeCookie = function serializeCookie(name, val, options) {
2760
- var opt = options || {};
2761
- opt.path = opt.path || '/';
2762
- var value = encodeURIComponent(val);
2763
- var str = "".concat(name, "=").concat(value);
2764
- if (opt.maxAge > 0) {
2765
- var maxAge = opt.maxAge - 0;
2766
- if (Number.isNaN(maxAge)) throw new Error('maxAge should be a Number');
2767
- str += "; Max-Age=".concat(Math.floor(maxAge));
2768
- }
2769
- if (opt.domain) {
2770
- if (!fieldContentRegExp.test(opt.domain)) {
2771
- throw new TypeError('option domain is invalid');
2772
- }
2773
- str += "; Domain=".concat(opt.domain);
2774
- }
2775
- if (opt.path) {
2776
- if (!fieldContentRegExp.test(opt.path)) {
2777
- throw new TypeError('option path is invalid');
2778
- }
2779
- str += "; Path=".concat(opt.path);
2780
- }
2781
- if (opt.expires) {
2782
- if (typeof opt.expires.toUTCString !== 'function') {
2783
- throw new TypeError('option expires is invalid');
2784
- }
2785
- str += "; Expires=".concat(opt.expires.toUTCString());
2786
- }
2787
- if (opt.httpOnly) str += '; HttpOnly';
2788
- if (opt.secure) str += '; Secure';
2789
- if (opt.sameSite) {
2790
- var sameSite = typeof opt.sameSite === 'string' ? opt.sameSite.toLowerCase() : opt.sameSite;
2791
- switch (sameSite) {
2792
- case true:
2793
- str += '; SameSite=Strict';
2794
- break;
2795
- case 'lax':
2796
- str += '; SameSite=Lax';
2797
- break;
2798
- case 'strict':
2799
- str += '; SameSite=Strict';
2800
- break;
2801
- case 'none':
2802
- str += '; SameSite=None';
2803
- break;
2804
- default:
2805
- throw new TypeError('option sameSite is invalid');
2806
- }
2807
- }
2808
- return str;
2809
- };
2810
- var cookie = {
2811
- create: function create(name, value, minutes, domain) {
2812
- var cookieOptions = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {
2813
- path: '/',
2814
- sameSite: 'strict'
2815
- };
2816
- if (minutes) {
2817
- cookieOptions.expires = new Date();
2818
- cookieOptions.expires.setTime(cookieOptions.expires.getTime() + minutes * 60 * 1000);
2819
- }
2820
- if (domain) cookieOptions.domain = domain;
2821
- document.cookie = serializeCookie(name, encodeURIComponent(value), cookieOptions);
2822
- },
2823
- read: function read(name) {
2824
- var nameEQ = "".concat(name, "=");
2825
- var ca = document.cookie.split(';');
2826
- for (var i = 0; i < ca.length; i++) {
2827
- var c = ca[i];
2828
- while (c.charAt(0) === ' ') {
2829
- c = c.substring(1, c.length);
2830
- }
2831
- if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length);
2832
- }
2833
- return null;
2834
- },
2835
- remove: function remove(name) {
2836
- this.create(name, '', -1);
2837
- }
2838
- };
2839
- var cookie$1 = {
2840
- name: 'cookie',
2841
- lookup: function lookup(options) {
2842
- var found;
2843
- if (options.lookupCookie && typeof document !== 'undefined') {
2844
- var c = cookie.read(options.lookupCookie);
2845
- if (c) found = c;
2846
- }
2847
- return found;
2848
- },
2849
- cacheUserLanguage: function cacheUserLanguage(lng, options) {
2850
- if (options.lookupCookie && typeof document !== 'undefined') {
2851
- cookie.create(options.lookupCookie, lng, options.cookieMinutes, options.cookieDomain, options.cookieOptions);
2852
- }
2853
- }
2854
- };
2855
-
2856
- var querystring = {
2857
- name: 'querystring',
2858
- lookup: function lookup(options) {
2859
- var found;
2860
- if (typeof window !== 'undefined') {
2861
- var search = window.location.search;
2862
- if (!window.location.search && window.location.hash && window.location.hash.indexOf('?') > -1) {
2863
- search = window.location.hash.substring(window.location.hash.indexOf('?'));
2864
- }
2865
- var query = search.substring(1);
2866
- var params = query.split('&');
2867
- for (var i = 0; i < params.length; i++) {
2868
- var pos = params[i].indexOf('=');
2869
- if (pos > 0) {
2870
- var key = params[i].substring(0, pos);
2871
- if (key === options.lookupQuerystring) {
2872
- found = params[i].substring(pos + 1);
2873
- }
2874
- }
2875
- }
2876
- }
2877
- return found;
2878
- }
2879
- };
2880
-
2881
- var hasLocalStorageSupport = null;
2882
- var localStorageAvailable = function localStorageAvailable() {
2883
- if (hasLocalStorageSupport !== null) return hasLocalStorageSupport;
2884
- try {
2885
- hasLocalStorageSupport = window !== 'undefined' && window.localStorage !== null;
2886
- var testKey = 'i18next.translate.boo';
2887
- window.localStorage.setItem(testKey, 'foo');
2888
- window.localStorage.removeItem(testKey);
2889
- } catch (e) {
2890
- hasLocalStorageSupport = false;
2891
- }
2892
- return hasLocalStorageSupport;
2893
- };
2894
- var localStorage = {
2895
- name: 'localStorage',
2896
- lookup: function lookup(options) {
2897
- var found;
2898
- if (options.lookupLocalStorage && localStorageAvailable()) {
2899
- var lng = window.localStorage.getItem(options.lookupLocalStorage);
2900
- if (lng) found = lng;
2901
- }
2902
- return found;
2903
- },
2904
- cacheUserLanguage: function cacheUserLanguage(lng, options) {
2905
- if (options.lookupLocalStorage && localStorageAvailable()) {
2906
- window.localStorage.setItem(options.lookupLocalStorage, lng);
2907
- }
2908
- }
2909
- };
2910
-
2911
- var hasSessionStorageSupport = null;
2912
- var sessionStorageAvailable = function sessionStorageAvailable() {
2913
- if (hasSessionStorageSupport !== null) return hasSessionStorageSupport;
2914
- try {
2915
- hasSessionStorageSupport = window !== 'undefined' && window.sessionStorage !== null;
2916
- var testKey = 'i18next.translate.boo';
2917
- window.sessionStorage.setItem(testKey, 'foo');
2918
- window.sessionStorage.removeItem(testKey);
2919
- } catch (e) {
2920
- hasSessionStorageSupport = false;
2921
- }
2922
- return hasSessionStorageSupport;
2923
- };
2924
- var sessionStorage = {
2925
- name: 'sessionStorage',
2926
- lookup: function lookup(options) {
2927
- var found;
2928
- if (options.lookupSessionStorage && sessionStorageAvailable()) {
2929
- var lng = window.sessionStorage.getItem(options.lookupSessionStorage);
2930
- if (lng) found = lng;
2931
- }
2932
- return found;
2933
- },
2934
- cacheUserLanguage: function cacheUserLanguage(lng, options) {
2935
- if (options.lookupSessionStorage && sessionStorageAvailable()) {
2936
- window.sessionStorage.setItem(options.lookupSessionStorage, lng);
2937
- }
2938
- }
2939
- };
2940
-
2941
- var navigator$1 = {
2942
- name: 'navigator',
2943
- lookup: function lookup(options) {
2944
- var found = [];
2945
- if (typeof navigator !== 'undefined') {
2946
- if (navigator.languages) {
2947
- // chrome only; not an array, so can't use .push.apply instead of iterating
2948
- for (var i = 0; i < navigator.languages.length; i++) {
2949
- found.push(navigator.languages[i]);
2950
- }
2951
- }
2952
- if (navigator.userLanguage) {
2953
- found.push(navigator.userLanguage);
2954
- }
2955
- if (navigator.language) {
2956
- found.push(navigator.language);
2957
- }
2958
- }
2959
- return found.length > 0 ? found : undefined;
2960
- }
2961
- };
2962
-
2963
- var htmlTag = {
2964
- name: 'htmlTag',
2965
- lookup: function lookup(options) {
2966
- var found;
2967
- var htmlTag = options.htmlTag || (typeof document !== 'undefined' ? document.documentElement : null);
2968
- if (htmlTag && typeof htmlTag.getAttribute === 'function') {
2969
- found = htmlTag.getAttribute('lang');
2970
- }
2971
- return found;
2972
- }
2973
- };
2974
-
2975
- var path = {
2976
- name: 'path',
2977
- lookup: function lookup(options) {
2978
- var found;
2979
- if (typeof window !== 'undefined') {
2980
- var language = window.location.pathname.match(/\/([a-zA-Z-]*)/g);
2981
- if (language instanceof Array) {
2982
- if (typeof options.lookupFromPathIndex === 'number') {
2983
- if (typeof language[options.lookupFromPathIndex] !== 'string') {
2984
- return undefined;
2985
- }
2986
- found = language[options.lookupFromPathIndex].replace('/', '');
2987
- } else {
2988
- found = language[0].replace('/', '');
2989
- }
2990
- }
2991
- }
2992
- return found;
2993
- }
2994
- };
2995
-
2996
- var subdomain = {
2997
- name: 'subdomain',
2998
- lookup: function lookup(options) {
2999
- // If given get the subdomain index else 1
3000
- var lookupFromSubdomainIndex = typeof options.lookupFromSubdomainIndex === 'number' ? options.lookupFromSubdomainIndex + 1 : 1;
3001
- // get all matches if window.location. is existing
3002
- // first item of match is the match itself and the second is the first group macht which sould be the first subdomain match
3003
- // is the hostname no public domain get the or option of localhost
3004
- var language = typeof window !== 'undefined' && window.location && window.location.hostname && window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);
3005
-
3006
- // if there is no match (null) return undefined
3007
- if (!language) return undefined;
3008
- // return the given group match
3009
- return language[lookupFromSubdomainIndex];
3010
- }
3011
- };
3012
-
3013
- function getDefaults() {
3014
- return {
3015
- order: ['querystring', 'cookie', 'localStorage', 'sessionStorage', 'navigator', 'htmlTag'],
3016
- lookupQuerystring: 'lng',
3017
- lookupCookie: 'i18next',
3018
- lookupLocalStorage: 'i18nextLng',
3019
- lookupSessionStorage: 'i18nextLng',
3020
- // cache user language
3021
- caches: ['localStorage'],
3022
- excludeCacheFor: ['cimode']
3023
- // cookieMinutes: 10,
3024
- // cookieDomain: 'myDomain'
3025
- };
3026
- }
3027
- var Browser = /*#__PURE__*/function () {
3028
- function Browser(services) {
3029
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
3030
- _classCallCheck(this, Browser);
3031
- this.type = 'languageDetector';
3032
- this.detectors = {};
3033
- this.init(services, options);
3034
- }
3035
- _createClass(Browser, [{
3036
- key: "init",
3037
- value: function init(services) {
3038
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
3039
- var i18nOptions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
3040
- this.services = services || {
3041
- languageUtils: {}
3042
- }; // this way the language detector can be used without i18next
3043
- this.options = defaults(options, this.options || {}, getDefaults());
3044
-
3045
- // backwards compatibility
3046
- if (this.options.lookupFromUrlIndex) this.options.lookupFromPathIndex = this.options.lookupFromUrlIndex;
3047
- this.i18nOptions = i18nOptions;
3048
- this.addDetector(cookie$1);
3049
- this.addDetector(querystring);
3050
- this.addDetector(localStorage);
3051
- this.addDetector(sessionStorage);
3052
- this.addDetector(navigator$1);
3053
- this.addDetector(htmlTag);
3054
- this.addDetector(path);
3055
- this.addDetector(subdomain);
3056
- }
3057
- }, {
3058
- key: "addDetector",
3059
- value: function addDetector(detector) {
3060
- this.detectors[detector.name] = detector;
3061
- }
3062
- }, {
3063
- key: "detect",
3064
- value: function detect(detectionOrder) {
3065
- var _this = this;
3066
- if (!detectionOrder) detectionOrder = this.options.order;
3067
- var detected = [];
3068
- detectionOrder.forEach(function (detectorName) {
3069
- if (_this.detectors[detectorName]) {
3070
- var lookup = _this.detectors[detectorName].lookup(_this.options);
3071
- if (lookup && typeof lookup === 'string') lookup = [lookup];
3072
- if (lookup) detected = detected.concat(lookup);
3073
- }
3074
- });
3075
- if (this.services.languageUtils.getBestMatchFromCodes) return detected; // new i18next v19.5.0
3076
- return detected.length > 0 ? detected[0] : null; // a little backward compatibility
3077
- }
3078
- }, {
3079
- key: "cacheUserLanguage",
3080
- value: function cacheUserLanguage(lng, caches) {
3081
- var _this2 = this;
3082
- if (!caches) caches = this.options.caches;
3083
- if (!caches) return;
3084
- if (this.options.excludeCacheFor && this.options.excludeCacheFor.indexOf(lng) > -1) return;
3085
- caches.forEach(function (cacheName) {
3086
- if (_this2.detectors[cacheName]) _this2.detectors[cacheName].cacheUserLanguage(lng, _this2.options);
3087
- });
3088
- }
3089
- }]);
3090
- return Browser;
3091
- }();
3092
- Browser.type = 'languageDetector';
3093
-
3094
- instance.use(Browser).init({
3095
- fallbackLng: 'en',
3096
- debug: false,
3097
- resources: {
3098
- en: {
3099
- translation: {},
3100
- },
3101
- ja: {
3102
- translation: {
3103
- 'Pay': '支払う',
3104
- 'Failed to load Stripe': 'ライブラリの読み込みに失敗しました。',
3105
- 'Add your payment information': '支払情報を追加',
3106
- 'Add card': 'カードを追加',
3107
- 'Add a card': 'カードを追加',
3108
- 'Add': '追加',
3109
- 'Card information': 'カード情報',
3110
- 'Card Number': 'カード番号',
3111
- 'MM / YY': '月 / 年',
3112
- 'CVC': 'セキュリティコード(CVC)',
3113
- 'Country or region': '地域',
3114
- 'Postal Code': '郵便番号',
3115
- },
3116
- },
3117
- 'pt-BR': {
3118
- translation: {
3119
- 'Pay': 'Pagar',
3120
- 'Failed to load Stripe': 'Falha ao ler Stripe',
3121
- 'Add your payment information': 'Informações do seu Pagamento',
3122
- 'Add card': 'Adicionar Cartão',
3123
- 'Add a card': 'Adicionar um Cartão',
3124
- 'Add': 'Adicionar',
3125
- 'Card information': 'Informações do Cartão',
3126
- 'Card Number': 'Número do Cartão',
3127
- 'MM / YY': 'MM / AA',
3128
- 'CVC': 'Número de Segurança(CVC)',
3129
- 'Country or region': 'País ou região',
3130
- 'Postal Code': 'Cep',
3131
- },
3132
- },
3133
- },
3134
- });
3135
- const i18n = instance;
3136
-
3137
- const stripePaymentSheetCss = ":root{--color-label:#565656;--color-placeholder:#acacac;--color-heading-text:#333;--color-text-error:#ef4444;--color-input-border:#e4e4e6;--color-button-text:rgba(255, 255, 255, 0.95);--color-button-text-disabled:rgba(255, 255, 255, 0.4);--color-primary:#0074d4}.stripe-payment-sheet-wrap{display:block;width:100%;background:#fff;padding:32px 16px}.stripe-payment-sheet-wrap *:where(:not(iframe,canvas,img,svg,video):not(svg *)){all:unset;display:revert;background:none;border:none;font-family:\"Roboto\", sans-serif;box-sizing:border-box}.stripe-payment-sheet-wrap button{cursor:pointer}.stripe-payment-sheet-wrap .StripeElement{padding:8px 16px;min-height:64px;border-bottom:1px solid var(--color-input-border);border-radius:4px;display:flex;justify-content:center;align-items:center}.stripe-payment-sheet-wrap .StripeElement>.__PrivateStripeElement{width:100%}.stripe-payment-sheet-wrap .stripe-input-box{background-color:#fff;border-radius:2px;filter:drop-shadow(0 0 1px var(--color-input-border))}.stripe-payment-sheet-wrap .stripe-input-column .StripeElement{border-right:1px solid var(--color-input-border)}.stripe-payment-sheet-wrap .stripe-input-column .StripeElement:last-child{border-right:none}.stripe-payment-sheet-wrap .stripe-heading{font-size:24px;font-weight:bold;color:var(--color-heading-text);margin-bottom:24px}.stripe-payment-sheet-wrap .stripe-section-title{font-size:14px;font-weight:bold;color:var(--color-label);margin-bottom:8px}.stripe-payment-sheet-wrap .payment-info label{color:var(--color-label)}.stripe-payment-sheet-wrap .stripe-element-errors{margin-top:8px;font-size:14px;color:var(--color-text-error)}.stripe-payment-sheet-wrap button{display:block;color:var(--color-button-text);background-color:var(--color-primary);width:100%;text-align:center;padding:16px 16px;font-size:18px;border-radius:8px;min-height:42px}.stripe-payment-sheet-wrap button:disabled{color:var(--color-button-text-disabled)}";
3138
-
3139
- const StripePayment = class {
3140
- /**
3141
- * Get Stripe.js, and initialize elements
3142
- * @param publishableKey
3143
- * @param options
3144
- * @example
3145
- * ```
3146
- * const stripeElement = document.createElement('stripe-card-element');
3147
- * customElements
3148
- * .whenDefined('stripe-card-element')
3149
- * .then(() => {
3150
- * tripeElement.initStripe('pk_test_XXXXXXXXX')
3151
- * })
3152
- * ```
3153
- */
3154
- async initStripe(publishableKey, options = undefined) {
3155
- this.loadStripeStatus = 'loading';
3156
- stripe_esm.loadStripe(publishableKey, {
3157
- stripeAccount: options === null || options === void 0 ? void 0 : options.stripeAccount,
3158
- })
3159
- .then(stripe => {
3160
- this.loadStripeStatus = 'success';
3161
- stripe.registerAppInfo({
3162
- name: this.applicationName,
3163
- });
3164
- this.stripe = stripe;
3165
- return;
3166
- })
3167
- .catch(e => {
3168
- console.log(e);
3169
- this.errorMessage = e.message;
3170
- this.loadStripeStatus = 'failure';
3171
- return;
3172
- })
3173
- .then(() => {
3174
- if (!this.stripe) {
3175
- return;
3176
- }
3177
- return this.initElement();
3178
- })
3179
- .then(() => {
3180
- if (!this.stripe) {
3181
- return;
3182
- }
3183
- this.stripeLoadedEventHandler();
3184
- });
3185
- }
3186
- /**
3187
- * Update the form submit progress
3188
- * @param progress
3189
- * @returns
3190
- * @example
3191
- * ```
3192
- * const stripeElement = document.createElement('stripe-card-element');
3193
- * customElements
3194
- * .whenDefined('stripe-card-element')
3195
- * .then(() => {
3196
- * // You must set the attributes to stop running default form submit action when you want to listen the 'formSubmit' event.
3197
- * stripeElement.setAttribute('should-use-default-form-submit-action', false)
3198
- * stripeElement.addEventListener('formSubmit', async props => {
3199
- * const {
3200
- * detail: { stripe, cardNumber, event },
3201
- * } = props;
3202
- * const result = await stripe.createPaymentMethod({
3203
- * type: 'card',
3204
- * card: cardNumber,
3205
- * });
3206
- * console.log(result);
3207
- * stripeElement.updateProgress('success')
3208
- * });
3209
- * })
3210
- */
3211
- async updateProgress(progress) {
3212
- this.progress = progress;
3213
- return this;
3214
- }
3215
- /**
3216
- * Set error message
3217
- * @param errorMessage string
3218
- * @returns
3219
- * @example
3220
- * ```
3221
- * const stripeElement = document.createElement('stripe-card-element');
3222
- * customElements
3223
- * .whenDefined('stripe-card-element')
3224
- * .then(() => {
3225
- * // You must set the attributes to stop running default form submit action when you want to listen the 'formSubmit' event.
3226
- * stripeElement.setAttribute('should-use-default-form-submit-action', false)
3227
- * stripeElement.addEventListener('formSubmit', async props => {
3228
- * try {
3229
- * throw new Error('debug')
3230
- * } catch (e) {
3231
- * stripeElement.setErrorMessage(`Error: ${e.message}`)
3232
- * stripeElement.updateProgress('failure')
3233
- * }
3234
- * });
3235
- * })
3236
- */
3237
- async setErrorMessage(errorMessage) {
3238
- this.errorMessage = errorMessage;
3239
- return this;
3240
- }
3241
- /**
3242
- * @param option
3243
- * @private
3244
- */
3245
- async setPaymentRequestOption(option) {
3246
- this.paymentRequestOption = option;
3247
- this.createPaymentRequestButton();
3248
- return this;
3249
- }
3250
- stripeLoadedEventHandler() {
3251
- const event = {
3252
- stripe: this.stripe,
3253
- };
3254
- if (this.stripeDidLoaded) {
3255
- this.stripeDidLoaded(event);
3256
- }
3257
- this.stripeLoaded.emit(event);
3258
- }
3259
- async formSubmitEventHandler() {
3260
- const { cardCVC, cardExpiry, cardNumber, stripe } = this;
3261
- this.formSubmit.emit({
3262
- cardCVCElement: cardCVC,
3263
- cardExpiryElement: cardExpiry,
3264
- cardNumberElement: cardNumber,
3265
- stripe,
3266
- });
3267
- }
3268
- async defaultFormSubmitResultHandler(result) {
3269
- this.defaultFormSubmitResult.emit(result);
3270
- }
3271
- componentWillUpdate() {
3272
- if (!this.publishableKey) {
3273
- return;
3274
- }
3275
- if (['success', 'loading'].includes(this.loadStripeStatus)) {
3276
- return;
3277
- }
3278
- this.initStripe(this.publishableKey, {
3279
- stripeAccount: this.stripeAccount,
3280
- });
3281
- this.createPaymentRequestButton();
3282
- }
3283
- /**
3284
- * Default form submit action (just call a confirmCardPayment).
3285
- * If you don't want use it, please set `should-use-default-form-submit-action="false"`
3286
- * @param event
3287
- * @param param1
3288
- */
3289
- async defaultFormSubmitAction(event, { stripe, cardNumberElement, intentClientSecret }) {
3290
- event.preventDefault();
3291
- try {
3292
- const { intentType } = this;
3293
- const result = await (() => {
3294
- if (intentType === 'payment') {
3295
- return stripe.confirmCardPayment(intentClientSecret, {
3296
- payment_method: {
3297
- card: cardNumberElement,
3298
- },
3299
- });
3300
- }
3301
- return stripe.confirmCardSetup(intentClientSecret, {
3302
- payment_method: {
3303
- card: cardNumberElement,
3304
- },
3305
- });
3306
- })();
3307
- this.defaultFormSubmitResultHandler(result);
3308
- }
3309
- catch (e) {
3310
- this.defaultFormSubmitResultHandler(e);
3311
- throw e;
3312
- }
3313
- }
3314
- constructor(hostRef) {
3315
- index.registerInstance(this, hostRef);
3316
- this.stripeLoaded = index.createEvent(this, "stripeLoaded", 7);
3317
- this.formSubmit = index.createEvent(this, "formSubmit", 7);
3318
- this.defaultFormSubmitResult = index.createEvent(this, "defaultFormSubmitResult", 7);
3319
- this.loadStripeStatus = '';
3320
- this.stripe = undefined;
3321
- this.intentType = 'payment';
3322
- this.zip = true;
3323
- this.sheetTitle = 'Add your payment information';
3324
- this.buttonLabel = 'Pay';
3325
- this.progress = '';
3326
- this.errorMessage = '';
3327
- this.zipCode = '';
3328
- this.publishableKey = undefined;
3329
- this.stripeAccount = undefined;
3330
- this.applicationName = 'stripe-pwa-elements';
3331
- this.showLabel = false;
3332
- this.intentClientSecret = undefined;
3333
- this.shouldUseDefaultFormSubmitAction = true;
3334
- this.showPaymentRequestButton = undefined;
3335
- this.paymentRequestOption = undefined;
3336
- this.handleSubmit = undefined;
3337
- this.stripeDidLoaded = undefined;
3338
- if (this.publishableKey) {
3339
- this.initStripe(this.publishableKey, {
3340
- stripeAccount: this.stripeAccount,
3341
- });
3342
- }
3343
- else {
3344
- this.loadStripeStatus = 'failure';
3345
- }
3346
- }
3347
- /**
3348
- * Initialize Component using Stripe Element
3349
- */
3350
- async initElement() {
3351
- const elements = this.stripe.elements();
3352
- const handleCardError = ({ error }) => {
3353
- if (error) {
3354
- this.errorMessage = error.message;
3355
- }
3356
- else {
3357
- this.errorMessage = '';
3358
- }
3359
- };
3360
- this.cardNumber = elements.create('cardNumber', {
3361
- placeholder: i18n.t('Card Number'),
3362
- });
3363
- const cardNumberElement = await waitForElm(this.el, '#card-number');
3364
- this.cardNumber.mount(cardNumberElement);
3365
- this.cardNumber.on('change', handleCardError);
3366
- this.cardExpiry = elements.create('cardExpiry');
3367
- const cardExpiryElement = await waitForElm(this.el, '#card-expiry');
3368
- this.cardExpiry.mount(cardExpiryElement);
3369
- this.cardExpiry.on('change', handleCardError);
3370
- this.cardCVC = elements.create('cardCvc');
3371
- const cardCVCElement = await waitForElm(this.el, '#card-cvc');
3372
- this.cardCVC.mount(cardCVCElement);
3373
- this.cardCVC.on('change', handleCardError);
3374
- document.getElementById('stripe-card-element').addEventListener('submit', async (e) => {
3375
- const { cardCVC, cardExpiry, cardNumber, stripe, intentClientSecret } = this;
3376
- const submitEventProps = {
3377
- cardCVCElement: cardCVC,
3378
- cardExpiryElement: cardExpiry,
3379
- cardNumberElement: cardNumber,
3380
- stripe,
3381
- intentClientSecret,
3382
- zipCode: this.zipCode,
3383
- };
3384
- this.progress = 'loading';
3385
- try {
3386
- if (this.handleSubmit) {
3387
- await this.handleSubmit(e, submitEventProps);
3388
- }
3389
- else if (this.shouldUseDefaultFormSubmitAction === true && intentClientSecret) {
3390
- await this.defaultFormSubmitAction(e, submitEventProps);
3391
- }
3392
- else {
3393
- e.preventDefault();
3394
- }
3395
- await this.formSubmitEventHandler();
3396
- if (this.handleSubmit || this.shouldUseDefaultFormSubmitAction === true) {
3397
- this.progress = 'success';
3398
- }
3399
- }
3400
- catch (e) {
3401
- this.errorMessage = e.message;
3402
- this.progress = 'failure';
3403
- }
3404
- });
3405
- }
3406
- componentDidLoad() {
3407
- this.el.classList.add(checkPlatform());
3408
- }
3409
- disconnectedCallback() {
3410
- if (this.cardNumber) {
3411
- this.cardNumber.unmount();
3412
- }
3413
- if (this.cardExpiry) {
3414
- this.cardExpiry.unmount();
3415
- }
3416
- if (this.cardCVC) {
3417
- this.cardCVC.unmount();
3418
- }
3419
- }
3420
- /**
3421
- * Create payment request button
3422
- * It's just proxy of stripe-payment-request-button
3423
- */
3424
- createPaymentRequestButton() {
3425
- const { showPaymentRequestButton, paymentRequestOption } = this;
3426
- if (!showPaymentRequestButton || !paymentRequestOption) {
3427
- return null;
3428
- }
3429
- if (!document) {
3430
- return null;
3431
- }
3432
- const targetElement = document.getElementById('stripe-payment-request-button');
3433
- const stripePaymentRequestElement = document.createElement('stripe-payment-request-button');
3434
- targetElement.appendChild(stripePaymentRequestElement);
3435
- const { paymentRequestPaymentMethodHandler, paymentRequestShippingOptionChangeHandler, paymentRequestShippingAddressChangeHandler } = paymentRequestOption;
3436
- customElements.whenDefined('stripe-payment-request-button').then(() => {
3437
- stripePaymentRequestElement.setPaymentRequestOption(paymentRequestOption);
3438
- if (paymentRequestPaymentMethodHandler) {
3439
- stripePaymentRequestElement.setPaymentMethodEventHandler(paymentRequestPaymentMethodHandler);
3440
- }
3441
- if (paymentRequestShippingOptionChangeHandler) {
3442
- stripePaymentRequestElement.setPaymentRequestShippingOptionEventHandler(paymentRequestShippingOptionChangeHandler);
3443
- }
3444
- if (paymentRequestShippingAddressChangeHandler) {
3445
- stripePaymentRequestElement.setPaymentRequestShippingAddressEventHandler(paymentRequestShippingAddressChangeHandler);
3446
- }
3447
- return stripePaymentRequestElement.initStripe(this.publishableKey);
3448
- });
3449
- }
3450
- render() {
3451
- const { errorMessage } = this;
3452
- if (this.loadStripeStatus === 'failure') {
3453
- return index.h("p", null, i18n.t('Failed to load Stripe'));
3454
- }
3455
- const disabled = this.progress === 'loading';
3456
- return (index.h("div", { class: "stripe-payment-sheet-wrap" }, index.h("form", { id: "stripe-card-element" }, index.h("div", { class: "stripe-heading" }, i18n.t(this.sheetTitle)), index.h("div", { id: "stripe-payment-request-button" }), index.h("div", null, index.h("div", { class: "stripe-section-title" }, i18n.t('Card information'))), index.h("div", { class: "payment-info card visible" }, index.h("fieldset", { class: "stripe-input-box" }, index.h("div", null, index.h("label", null, this.showLabel ? index.h("lenged", null, i18n.t('Card Number')) : null, index.h("div", { id: "card-number" }))), index.h("div", { class: "stripe-input-column", style: { display: 'flex' } }, index.h("label", { style: { width: '50%' } }, this.showLabel ? index.h("lenged", null, i18n.t('MM / YY')) : null, index.h("div", { id: "card-expiry" })), index.h("label", { style: { width: '50%' } }, this.showLabel ? index.h("lenged", null, i18n.t('CVC')) : null, index.h("div", { id: "card-cvc" }))), index.h("div", { id: "card-errors", class: "element-errors" }, errorMessage))), this.zip ? (index.h("div", { style: { marginTop: '1.5rem' } }, index.h("div", { class: "stripe-section-title" }, i18n.t('Country or region')))) : null, this.zip ? (index.h("div", { class: "payment-info card visible" }, index.h("fieldset", { class: "stripe-input-box" }, index.h("div", null, index.h("label", null, this.showLabel ? index.h("lenged", null, i18n.t('Postal Code')) : null, index.h("input", { id: "zip", name: "zip", type: "text", inputmode: "numeric", class: "stripe-input-box StripeElement", style: { width: '100%' }, placeholder: i18n.t('Postal Code'), value: this.zipCode, onInput: e => {
3457
- this.zipCode = e.target.value;
3458
- } })))))) : null, index.h("div", { style: { marginTop: '32px' } }, index.h("button", { type: "submit", disabled: disabled }, this.progress === 'loading' ? i18n.t('Loading') : i18n.t(this.buttonLabel))))));
3459
- }
3460
- get el() { return index.getElement(this); }
3461
- };
3462
- StripePayment.style = stripePaymentSheetCss;
3463
-
3464
- const stripeElementModalCss = "*:where(:not(iframe,canvas,img,svg,video):not(svg *)){all:unset;display:revert;background:none;border:none;font-family:\"Roboto\", sans-serif;box-sizing:border-box}button{cursor:pointer}:root{--color-label:#565656;--color-placeholder:#acacac;--color-heading-text:#333;--color-text-error:#ef4444;--color-input-border:#e4e4e6;--color-button-text:rgba(255, 255, 255, 0.95);--color-button-text-disabled:rgba(255, 255, 255, 0.4);--color-primary:#0074d4}:host{display:block}.modal-row{display:none}.modal-row.open{position:fixed;top:0;left:0;width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:1ch;background:rgba(0, 0, 0, 0.3)}.modal-child{padding:1.5rem;background-color:#fff;width:100%}.modal-close-button-wrap{padding-left:8px}.modal-close-button-wrap .modal-close-button{width:32px;display:block;fill:var(--color-label);cursor:pointer}";
3465
-
3466
- const StripeSheet = class {
3467
- constructor(hostRef) {
3468
- index.registerInstance(this, hostRef);
3469
- this.close = index.createEvent(this, "close", 7);
3470
- this.showCloseButton = true;
3471
- this.open = false;
3472
- }
3473
- /**
3474
- * Toggle modal state
3475
- */
3476
- async toggleModal() {
3477
- this.open = !this.open;
3478
- if (this.open === false) {
3479
- this.close.emit();
3480
- }
3481
- }
3482
- /**
3483
- * Open the modal
3484
- */
3485
- async openModal() {
3486
- this.open = true;
3487
- }
3488
- /**
3489
- * Close the modal
3490
- */
3491
- async closeModal() {
3492
- this.open = false;
3493
- this.close.emit();
3494
- }
3495
- componentDidLoad() {
3496
- this.el.classList.add(checkPlatform());
3497
- }
3498
- render() {
3499
- const { open, showCloseButton } = this;
3500
- return (index.h(index.Host, null, index.h("div", { class: `modal-row${open ? ' open' : ''}`, onClick: () => this.closeModal() }, index.h("div", { class: "modal-child", onClick: e => e.stopPropagation() }, showCloseButton ? (index.h("div", { class: "modal-close-button-wrap" }, index.h("ion-icon", { name: "close", size: "large", class: "modal-close-button", onClick: () => this.closeModal() }))) : null, index.h("slot", null)))));
3501
- }
3502
- get el() { return index.getElement(this); }
3503
- };
3504
- StripeSheet.style = stripeElementModalCss;
3505
-
3506
- exports.stripe_payment = StripePayment;
3507
- exports.stripe_sheet = StripeSheet;
3508
-
3509
- //# sourceMappingURL=stripe-payment_2.cjs.entry.js.map