stripe-pwa-elements 3.1.0 → 4.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 (235) hide show
  1. package/dist/cjs/app-globals-V2Kpy_OQ.js +0 -3
  2. package/dist/cjs/error-FFC4kSs5.js +0 -3
  3. package/dist/cjs/{factory-Hsw0e7-d.js → factory-da3xAKkz.js} +194 -73
  4. package/dist/cjs/{index-Ba1pBePA.js → index-CYbA1N_k.js} +24 -6
  5. package/dist/cjs/index-Dkb0SxZc.js +4694 -0
  6. package/dist/cjs/index.cjs.js +0 -1
  7. package/dist/cjs/ion-icon.cjs.entry.js +22 -13
  8. package/dist/cjs/loader.cjs.js +2 -3
  9. package/dist/cjs/stripe-address-element.cjs.entry.js +34 -26
  10. package/dist/cjs/stripe-card-element-modal.cjs.entry.js +6 -7
  11. package/dist/cjs/stripe-card-element_2.cjs.entry.js +135 -73
  12. package/dist/cjs/stripe-currency-selector.cjs.entry.js +13 -10
  13. package/dist/cjs/stripe-elements.cjs.js +31 -5
  14. package/dist/cjs/stripe-express-checkout-element.cjs.entry.js +25 -22
  15. package/dist/cjs/stripe-link-authentication-element.cjs.entry.js +13 -10
  16. package/dist/cjs/stripe-payment-element.cjs.entry.js +190 -131
  17. package/dist/cjs/stripe-payment-request-button.cjs.entry.js +12 -7
  18. package/dist/collection/collection-manifest.json +3 -2
  19. package/dist/collection/components/stripe-address-element/stripe-address-element.js +29 -21
  20. package/dist/collection/components/stripe-card-element/stripe-card-element.helpers.js +57 -0
  21. package/dist/collection/components/stripe-card-element/stripe-card-element.js +55 -68
  22. package/dist/collection/components/stripe-card-element-modal/stripe-card-element-modal.css +2 -2
  23. package/dist/collection/components/stripe-card-element-modal/stripe-card-element-modal.js +16 -12
  24. package/dist/collection/components/stripe-currency-selector/stripe-currency-selector.js +10 -6
  25. package/dist/collection/components/stripe-express-checkout-element/stripe-express-checkout-element.js +28 -20
  26. package/dist/collection/components/stripe-link-authentication-element/stripe-link-authentication-element.js +12 -7
  27. package/dist/collection/components/stripe-modal/stripe-modal.css +36 -2
  28. package/dist/collection/components/stripe-modal/stripe-modal.js +34 -7
  29. package/dist/collection/components/stripe-payment-element/stripe-payment-element.helpers.js +114 -0
  30. package/dist/collection/components/stripe-payment-element/stripe-payment-element.js +69 -126
  31. package/dist/collection/components/stripe-payment-request-button/stripe-payment-request-button.js +34 -12
  32. package/dist/collection/index.js +0 -1
  33. package/dist/collection/interfaces.js +0 -1
  34. package/dist/collection/services/address-element-manager.js +3 -4
  35. package/dist/collection/services/card-element-manager.js +3 -4
  36. package/dist/collection/services/currency-selector-element-manager.js +3 -4
  37. package/dist/collection/services/express-checkout-element-manager.js +9 -10
  38. package/dist/collection/services/factory.js +0 -1
  39. package/dist/collection/services/interfaces.js +0 -1
  40. package/dist/collection/services/link-authentication-element-manager.js +3 -4
  41. package/dist/collection/services/payment-element-manager.js +4 -5
  42. package/dist/collection/services/stripe-service.js +5 -6
  43. package/dist/collection/utils/element-finder.js +2 -3
  44. package/dist/collection/utils/error.js +0 -1
  45. package/dist/collection/utils/i18n.js +0 -1
  46. package/dist/collection/utils/platform.js +0 -1
  47. package/dist/collection/utils/test-setup.js +5 -0
  48. package/dist/collection/utils/utils.js +2 -3
  49. package/dist/components/error.js +1 -16
  50. package/dist/components/factory.js +1 -3736
  51. package/dist/components/icon.js +1 -459
  52. package/dist/components/index.d.ts +2 -0
  53. package/dist/components/index.js +1 -4
  54. package/dist/components/index2.js +1 -192
  55. package/dist/components/ion-icon.js +1 -9
  56. package/dist/components/stripe-address-element.js +1 -327
  57. package/dist/components/stripe-card-element-modal.js +1 -174
  58. package/dist/components/stripe-card-element.js +1 -9
  59. package/dist/components/stripe-card-element2.js +1 -440
  60. package/dist/components/stripe-currency-selector.js +1 -218
  61. package/dist/components/stripe-express-checkout-element.js +1 -332
  62. package/dist/components/stripe-link-authentication-element.js +1 -256
  63. package/dist/components/stripe-modal.js +1 -9
  64. package/dist/components/stripe-modal2.js +1 -88
  65. package/dist/components/stripe-payment-element.js +1 -510
  66. package/dist/components/stripe-payment-request-button.js +1 -9
  67. package/dist/components/stripe-payment-request-button2.js +1 -224
  68. package/dist/components/utils.js +1 -89
  69. package/dist/esm/app-globals-DQuL1Twl.js +0 -3
  70. package/dist/esm/error-XRfh5Wrs.js +0 -3
  71. package/dist/esm/{factory-Li_TGt9P.js → factory-DeqoYLf_.js} +194 -73
  72. package/dist/esm/index-C6bbmyga.js +4677 -0
  73. package/dist/esm/{index-BHDCxQOb.js → index-CBXaOfXU.js} +24 -6
  74. package/dist/esm/index.js +0 -1
  75. package/dist/esm/ion-icon.entry.js +22 -13
  76. package/dist/esm/loader.js +3 -4
  77. package/dist/esm/stripe-address-element.entry.js +34 -26
  78. package/dist/esm/stripe-card-element-modal.entry.js +6 -7
  79. package/dist/esm/stripe-card-element_2.entry.js +135 -73
  80. package/dist/esm/stripe-currency-selector.entry.js +13 -10
  81. package/dist/esm/stripe-elements.js +32 -6
  82. package/dist/esm/stripe-express-checkout-element.entry.js +25 -22
  83. package/dist/esm/stripe-link-authentication-element.entry.js +13 -10
  84. package/dist/esm/stripe-payment-element.entry.js +190 -131
  85. package/dist/esm/stripe-payment-request-button.entry.js +12 -7
  86. package/dist/stripe-elements/index.esm.js +0 -2
  87. package/dist/stripe-elements/p--sA2m1ad.js +1 -0
  88. package/dist/stripe-elements/p-38e7b187.entry.js +1 -0
  89. package/dist/stripe-elements/p-44495284.entry.js +1 -0
  90. package/dist/stripe-elements/p-4ba675fa.entry.js +1 -0
  91. package/dist/stripe-elements/p-5cf62945.entry.js +1 -0
  92. package/dist/stripe-elements/p-C6bbmyga.js +2 -0
  93. package/dist/stripe-elements/p-CBXaOfXU.js +1 -0
  94. package/dist/stripe-elements/p-DQuL1Twl.js +1 -2
  95. package/dist/stripe-elements/p-XRfh5Wrs.js +1 -2
  96. package/dist/stripe-elements/p-c24ae181.entry.js +1 -0
  97. package/dist/stripe-elements/p-d9e86451.entry.js +1 -0
  98. package/dist/stripe-elements/p-f09c86a0.entry.js +1 -0
  99. package/dist/stripe-elements/p-f64f394d.entry.js +1 -0
  100. package/dist/stripe-elements/p-f6d2425e.entry.js +1 -0
  101. package/dist/stripe-elements/stripe-elements.esm.js +1 -2
  102. package/dist/stripe-elements/svg/.gitignore +4 -0
  103. package/dist/types/components/stripe-card-element/stripe-card-element.d.ts +5 -1
  104. package/dist/types/components/stripe-card-element/stripe-card-element.helpers.d.ts +29 -0
  105. package/dist/types/components/stripe-card-element-modal/stripe-card-element-modal.d.ts +4 -4
  106. package/dist/types/components/stripe-modal/stripe-modal.d.ts +6 -0
  107. package/dist/types/components/stripe-payment-element/stripe-payment-element.d.ts +2 -2
  108. package/dist/types/components/stripe-payment-element/stripe-payment-element.helpers.d.ts +54 -0
  109. package/dist/types/components/stripe-payment-request-button/stripe-payment-request-button.d.ts +8 -0
  110. package/dist/types/components.d.ts +139 -29
  111. package/dist/types/index.d.ts +1 -0
  112. package/dist/types/services/interfaces.d.ts +3 -3
  113. package/dist/types/services/stripe-service.d.ts +2 -2
  114. package/dist/types/stencil-public-runtime.d.ts +110 -5
  115. package/dist/types/utils/test-setup.d.ts +1 -0
  116. package/package.json +50 -30
  117. package/readme.md +386 -133
  118. package/dist/cjs/app-globals-V2Kpy_OQ.js.map +0 -1
  119. package/dist/cjs/error-FFC4kSs5.js.map +0 -1
  120. package/dist/cjs/factory-Hsw0e7-d.js.map +0 -1
  121. package/dist/cjs/index-Ba1pBePA.js.map +0 -1
  122. package/dist/cjs/index-C1haN5iF.js +0 -1907
  123. package/dist/cjs/index-C1haN5iF.js.map +0 -1
  124. package/dist/cjs/index.cjs.js.map +0 -1
  125. package/dist/cjs/ion-icon.entry.cjs.js.map +0 -1
  126. package/dist/cjs/loader.cjs.js.map +0 -1
  127. package/dist/cjs/stripe-address-element.entry.cjs.js.map +0 -1
  128. package/dist/cjs/stripe-card-element-modal.entry.cjs.js.map +0 -1
  129. package/dist/cjs/stripe-card-element.stripe-modal.entry.cjs.js.map +0 -1
  130. package/dist/cjs/stripe-currency-selector.entry.cjs.js.map +0 -1
  131. package/dist/cjs/stripe-elements.cjs.js.map +0 -1
  132. package/dist/cjs/stripe-express-checkout-element.entry.cjs.js.map +0 -1
  133. package/dist/cjs/stripe-link-authentication-element.entry.cjs.js.map +0 -1
  134. package/dist/cjs/stripe-payment-element.entry.cjs.js.map +0 -1
  135. package/dist/cjs/stripe-payment-request-button.entry.cjs.js.map +0 -1
  136. package/dist/collection/components/stripe-address-element/stripe-address-element.js.map +0 -1
  137. package/dist/collection/components/stripe-card-element/stripe-card-element.js.map +0 -1
  138. package/dist/collection/components/stripe-card-element-modal/stripe-card-element-modal.js.map +0 -1
  139. package/dist/collection/components/stripe-currency-selector/stripe-currency-selector.js.map +0 -1
  140. package/dist/collection/components/stripe-express-checkout-element/stripe-express-checkout-element.js.map +0 -1
  141. package/dist/collection/components/stripe-link-authentication-element/stripe-link-authentication-element.js.map +0 -1
  142. package/dist/collection/components/stripe-modal/stripe-modal.js.map +0 -1
  143. package/dist/collection/components/stripe-payment-element/stripe-payment-element.js.map +0 -1
  144. package/dist/collection/components/stripe-payment-request-button/stripe-payment-request-button.js.map +0 -1
  145. package/dist/collection/index.js.map +0 -1
  146. package/dist/collection/interfaces.js.map +0 -1
  147. package/dist/collection/services/address-element-manager.js.map +0 -1
  148. package/dist/collection/services/card-element-manager.js.map +0 -1
  149. package/dist/collection/services/currency-selector-element-manager.js.map +0 -1
  150. package/dist/collection/services/express-checkout-element-manager.js.map +0 -1
  151. package/dist/collection/services/factory.js.map +0 -1
  152. package/dist/collection/services/interfaces.js.map +0 -1
  153. package/dist/collection/services/link-authentication-element-manager.js.map +0 -1
  154. package/dist/collection/services/payment-element-manager.js.map +0 -1
  155. package/dist/collection/services/stripe-service.js.map +0 -1
  156. package/dist/collection/utils/element-finder.js.map +0 -1
  157. package/dist/collection/utils/error.js.map +0 -1
  158. package/dist/collection/utils/i18n.js.map +0 -1
  159. package/dist/collection/utils/platform.js.map +0 -1
  160. package/dist/collection/utils/utils.js.map +0 -1
  161. package/dist/components/error.js.map +0 -1
  162. package/dist/components/factory.js.map +0 -1
  163. package/dist/components/icon.js.map +0 -1
  164. package/dist/components/index.js.map +0 -1
  165. package/dist/components/index2.js.map +0 -1
  166. package/dist/components/ion-icon.js.map +0 -1
  167. package/dist/components/stripe-address-element.js.map +0 -1
  168. package/dist/components/stripe-card-element-modal.js.map +0 -1
  169. package/dist/components/stripe-card-element.js.map +0 -1
  170. package/dist/components/stripe-card-element2.js.map +0 -1
  171. package/dist/components/stripe-currency-selector.js.map +0 -1
  172. package/dist/components/stripe-express-checkout-element.js.map +0 -1
  173. package/dist/components/stripe-link-authentication-element.js.map +0 -1
  174. package/dist/components/stripe-modal.js.map +0 -1
  175. package/dist/components/stripe-modal2.js.map +0 -1
  176. package/dist/components/stripe-payment-element.js.map +0 -1
  177. package/dist/components/stripe-payment-request-button.js.map +0 -1
  178. package/dist/components/stripe-payment-request-button2.js.map +0 -1
  179. package/dist/components/utils.js.map +0 -1
  180. package/dist/esm/app-globals-DQuL1Twl.js.map +0 -1
  181. package/dist/esm/error-XRfh5Wrs.js.map +0 -1
  182. package/dist/esm/factory-Li_TGt9P.js.map +0 -1
  183. package/dist/esm/index-BHDCxQOb.js.map +0 -1
  184. package/dist/esm/index-Dkis4t79.js +0 -1895
  185. package/dist/esm/index-Dkis4t79.js.map +0 -1
  186. package/dist/esm/index.js.map +0 -1
  187. package/dist/esm/ion-icon.entry.js.map +0 -1
  188. package/dist/esm/loader.js.map +0 -1
  189. package/dist/esm/stripe-address-element.entry.js.map +0 -1
  190. package/dist/esm/stripe-card-element-modal.entry.js.map +0 -1
  191. package/dist/esm/stripe-card-element.stripe-modal.entry.js.map +0 -1
  192. package/dist/esm/stripe-currency-selector.entry.js.map +0 -1
  193. package/dist/esm/stripe-elements.js.map +0 -1
  194. package/dist/esm/stripe-express-checkout-element.entry.js.map +0 -1
  195. package/dist/esm/stripe-link-authentication-element.entry.js.map +0 -1
  196. package/dist/esm/stripe-payment-element.entry.js.map +0 -1
  197. package/dist/esm/stripe-payment-request-button.entry.js.map +0 -1
  198. package/dist/stripe-elements/index.esm.js.map +0 -1
  199. package/dist/stripe-elements/ion-icon.entry.esm.js.map +0 -1
  200. package/dist/stripe-elements/loader.esm.js.map +0 -1
  201. package/dist/stripe-elements/p-01d63033.entry.js +0 -2
  202. package/dist/stripe-elements/p-01d63033.entry.js.map +0 -1
  203. package/dist/stripe-elements/p-1b8f9c7f.entry.js +0 -2
  204. package/dist/stripe-elements/p-1b8f9c7f.entry.js.map +0 -1
  205. package/dist/stripe-elements/p-37008853.entry.js +0 -2
  206. package/dist/stripe-elements/p-37008853.entry.js.map +0 -1
  207. package/dist/stripe-elements/p-5d152193.entry.js +0 -2
  208. package/dist/stripe-elements/p-5d152193.entry.js.map +0 -1
  209. package/dist/stripe-elements/p-623f13e6.entry.js +0 -2
  210. package/dist/stripe-elements/p-623f13e6.entry.js.map +0 -1
  211. package/dist/stripe-elements/p-809c9f2f.entry.js +0 -2
  212. package/dist/stripe-elements/p-809c9f2f.entry.js.map +0 -1
  213. package/dist/stripe-elements/p-BHDCxQOb.js +0 -2
  214. package/dist/stripe-elements/p-BHDCxQOb.js.map +0 -1
  215. package/dist/stripe-elements/p-DQuL1Twl.js.map +0 -1
  216. package/dist/stripe-elements/p-Dkis4t79.js +0 -3
  217. package/dist/stripe-elements/p-Dkis4t79.js.map +0 -1
  218. package/dist/stripe-elements/p-WnA32N4v.js +0 -2
  219. package/dist/stripe-elements/p-WnA32N4v.js.map +0 -1
  220. package/dist/stripe-elements/p-XRfh5Wrs.js.map +0 -1
  221. package/dist/stripe-elements/p-ba41e196.entry.js +0 -2
  222. package/dist/stripe-elements/p-ba41e196.entry.js.map +0 -1
  223. package/dist/stripe-elements/p-bb1bc49a.entry.js +0 -2
  224. package/dist/stripe-elements/p-bb1bc49a.entry.js.map +0 -1
  225. package/dist/stripe-elements/p-f21ea941.entry.js +0 -2
  226. package/dist/stripe-elements/p-f21ea941.entry.js.map +0 -1
  227. package/dist/stripe-elements/stripe-address-element.entry.esm.js.map +0 -1
  228. package/dist/stripe-elements/stripe-card-element-modal.entry.esm.js.map +0 -1
  229. package/dist/stripe-elements/stripe-card-element.stripe-modal.entry.esm.js.map +0 -1
  230. package/dist/stripe-elements/stripe-currency-selector.entry.esm.js.map +0 -1
  231. package/dist/stripe-elements/stripe-elements.esm.js.map +0 -1
  232. package/dist/stripe-elements/stripe-express-checkout-element.entry.esm.js.map +0 -1
  233. package/dist/stripe-elements/stripe-link-authentication-element.entry.esm.js.map +0 -1
  234. package/dist/stripe-elements/stripe-payment-element.entry.esm.js.map +0 -1
  235. package/dist/stripe-elements/stripe-payment-request-button.entry.esm.js.map +0 -1
@@ -1,2 +0,0 @@
1
- import{d as t,f as e}from"./p-Dkis4t79.js";import{l as i}from"./p-BHDCxQOb.js";const s=t=>n(t);const n=(t=window)=>{if(typeof t==="undefined"){return[]}t.Ionic=t.Ionic||{};let e=t.Ionic.platforms;if(e==null){e=t.Ionic.platforms=r(t);e.forEach((e=>t.document.documentElement.classList.add(`plt-${e}`)))}return e};const r=t=>Object.keys(k).filter((e=>k[e](t)));const o=t=>p(t)&&!m(t);const a=t=>{if(v(t,/iPad/i)){return true}if(v(t,/Macintosh/i)&&p(t)){return true}return false};const h=t=>v(t,/iPhone/i);const c=t=>v(t,/iPhone|iPod/i)||a(t);const u=t=>v(t,/android|sink/i);const f=t=>u(t)&&!v(t,/mobile/i);const l=t=>{const e=t.innerWidth;const i=t.innerHeight;const s=Math.min(e,i);const n=Math.max(e,i);return s>390&&s<520&&n>620&&n<800};const d=t=>{const e=t.innerWidth;const i=t.innerHeight;const s=Math.min(e,i);const n=Math.max(e,i);return a(t)||f(t)||s>460&&s<820&&n>780&&n<1400};const p=t=>$(t,"(any-pointer:coarse)");const g=t=>!p(t);const m=t=>y(t)||w(t);const y=t=>!!(t["cordova"]||t["phonegap"]||t["PhoneGap"]);const w=t=>{const e=t["Capacitor"];return!!(e&&e.isNative)};const b=t=>v(t,/electron/i);const S=t=>!!(t.matchMedia("(display-mode: standalone)").matches||t.navigator.standalone);const v=(t,e)=>e.test(t.navigator.userAgent);const $=(t,e)=>t.matchMedia(e).matches;const k={ipad:a,iphone:h,ios:c,android:u,phablet:l,tablet:d,cordova:y,capacitor:w,electron:b,pwa:S,mobile:p,mobileweb:o,desktop:g,hybrid:m};const x=()=>{const t=s();if(t.includes("ios")){return"ios"}if(t.includes("android")){return"android"}};const C=t=>typeof t==="string";const j=()=>{let t;let e;const i=new Promise(((i,s)=>{t=i;e=s}));i.resolve=t;i.reject=e;return i};const E=t=>{if(t==null)return"";return""+t};const O=(t,e,i)=>{t.forEach((t=>{if(e[t])i[t]=e[t]}))};const M=/###/g;const N=t=>t&&t.indexOf("###")>-1?t.replace(M,"."):t;const P=t=>!t||C(t);const L=(t,e,i)=>{const s=!C(e)?e:e.split(".");let n=0;while(n<s.length-1){if(P(t))return{};const e=N(s[n]);if(!t[e]&&i)t[e]=new i;if(Object.prototype.hasOwnProperty.call(t,e)){t=t[e]}else{t={}}++n}if(P(t))return{};return{obj:t,k:N(s[n])}};const A=(t,e,i)=>{const{obj:s,k:n}=L(t,e,Object);if(s!==undefined||e.length===1){s[n]=i;return}let r=e[e.length-1];let o=e.slice(0,e.length-1);let a=L(t,o,Object);while(a.obj===undefined&&o.length){r=`${o[o.length-1]}.${r}`;o=o.slice(0,o.length-1);a=L(t,o,Object);if(a?.obj&&typeof a.obj[`${a.k}.${r}`]!=="undefined"){a.obj=undefined}}a.obj[`${a.k}.${r}`]=i};const R=(t,e,i,s)=>{const{obj:n,k:r}=L(t,e,Object);n[r]=n[r]||[];n[r].push(i)};const z=(t,e)=>{const{obj:i,k:s}=L(t,e);if(!i)return undefined;if(!Object.prototype.hasOwnProperty.call(i,s))return undefined;return i[s]};const I=(t,e,i)=>{const s=z(t,i);if(s!==undefined){return s}return z(e,i)};const T=(t,e,i)=>{for(const s in e){if(s!=="__proto__"&&s!=="constructor"){if(s in t){if(C(t[s])||t[s]instanceof String||C(e[s])||e[s]instanceof String){if(i)t[s]=e[s]}else{T(t[s],e[s],i)}}else{t[s]=e[s]}}}return t};const F=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var V={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const D=t=>{if(C(t)){return t.replace(/[&<>"'\/]/g,(t=>V[t]))}return t};class B{constructor(t){this.capacity=t;this.regExpMap=new Map;this.regExpQueue=[]}getRegExp(t){const e=this.regExpMap.get(t);if(e!==undefined){return e}const i=new RegExp(t);if(this.regExpQueue.length===this.capacity){this.regExpMap.delete(this.regExpQueue.shift())}this.regExpMap.set(t,i);this.regExpQueue.push(t);return i}}const K=[" ",",","?","!",";"];const H=new B(20);const U=(t,e,i)=>{e=e||"";i=i||"";const s=K.filter((t=>e.indexOf(t)<0&&i.indexOf(t)<0));if(s.length===0)return true;const n=H.getRegExp(`(${s.map((t=>t==="?"?"\\?":t)).join("|")})`);let r=!n.test(t);if(!r){const e=t.indexOf(i);if(e>0&&!n.test(t.substring(0,e))){r=true}}return r};const _=(t,e,i=".")=>{if(!t)return undefined;if(t[e]){if(!Object.prototype.hasOwnProperty.call(t,e))return undefined;return t[e]}const s=e.split(i);let n=t;for(let t=0;t<s.length;){if(!n||typeof n!=="object"){return undefined}let e;let r="";for(let o=t;o<s.length;++o){if(o!==t){r+=i}r+=s[o];e=n[r];if(e!==undefined){if(["string","number","boolean"].indexOf(typeof e)>-1&&o<s.length-1){continue}t+=o-t+1;break}}n=e}return n};const Y=t=>t?.replace("_","-");const J={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){console?.[t]?.apply?.(console,e)}};class W{constructor(t,e={}){this.init(t,e)}init(t,e={}){this.prefix=e.prefix||"i18next:";this.logger=t||J;this.options=e;this.debug=e.debug}log(...t){return this.forward(t,"log","",true)}warn(...t){return this.forward(t,"warn","",true)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",true)}forward(t,e,i,s){if(s&&!this.debug)return null;if(C(t[0]))t[0]=`${i}${this.prefix} ${t[0]}`;return this.logger[e](t)}create(t){return new W(this.logger,{...{prefix:`${this.prefix}:${t}:`},...this.options})}clone(t){t=t||this.options;t.prefix=t.prefix||this.prefix;return new W(this.logger,t)}}var q=new W;class G{constructor(){this.observers={}}on(t,e){t.split(" ").forEach((t=>{if(!this.observers[t])this.observers[t]=new Map;const i=this.observers[t].get(e)||0;this.observers[t].set(e,i+1)}));return this}off(t,e){if(!this.observers[t])return;if(!e){delete this.observers[t];return}this.observers[t].delete(e)}emit(t,...e){if(this.observers[t]){const i=Array.from(this.observers[t].entries());i.forEach((([t,i])=>{for(let s=0;s<i;s++){t(...e)}}))}if(this.observers["*"]){const i=Array.from(this.observers["*"].entries());i.forEach((([i,s])=>{for(let n=0;n<s;n++){i.apply(i,[t,...e])}}))}}}class Q extends G{constructor(t,e={ns:["translation"],defaultNS:"translation"}){super();this.data=t||{};this.options=e;if(this.options.keySeparator===undefined){this.options.keySeparator="."}if(this.options.ignoreJSONStructure===undefined){this.options.ignoreJSONStructure=true}}addNamespaces(t){if(this.options.ns.indexOf(t)<0){this.options.ns.push(t)}}removeNamespaces(t){const e=this.options.ns.indexOf(t);if(e>-1){this.options.ns.splice(e,1)}}getResource(t,e,i,s={}){const n=s.keySeparator!==undefined?s.keySeparator:this.options.keySeparator;const r=s.ignoreJSONStructure!==undefined?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let o;if(t.indexOf(".")>-1){o=t.split(".")}else{o=[t,e];if(i){if(Array.isArray(i)){o.push(...i)}else if(C(i)&&n){o.push(...i.split(n))}else{o.push(i)}}}const a=z(this.data,o);if(!a&&!e&&!i&&t.indexOf(".")>-1){t=o[0];e=o[1];i=o.slice(2).join(".")}if(a||!r||!C(i))return a;return _(this.data?.[t]?.[e],i,n)}addResource(t,e,i,s,n={silent:false}){const r=n.keySeparator!==undefined?n.keySeparator:this.options.keySeparator;let o=[t,e];if(i)o=o.concat(r?i.split(r):i);if(t.indexOf(".")>-1){o=t.split(".");s=e;e=o[1]}this.addNamespaces(e);A(this.data,o,s);if(!n.silent)this.emit("added",t,e,i,s)}addResources(t,e,i,s={silent:false}){for(const s in i){if(C(i[s])||Array.isArray(i[s]))this.addResource(t,e,s,i[s],{silent:true})}if(!s.silent)this.emit("added",t,e,i)}addResourceBundle(t,e,i,s,n,r={silent:false,skipCopy:false}){let o=[t,e];if(t.indexOf(".")>-1){o=t.split(".");s=i;i=e;e=o[1]}this.addNamespaces(e);let a=z(this.data,o)||{};if(!r.skipCopy)i=JSON.parse(JSON.stringify(i));if(s){T(a,i,n)}else{a={...a,...i}}A(this.data,o,a);if(!r.silent)this.emit("added",t,e,i)}removeResourceBundle(t,e){if(this.hasResourceBundle(t,e)){delete this.data[t][e]}this.removeNamespaces(e);this.emit("removed",t,e)}hasResourceBundle(t,e){return this.getResource(t,e)!==undefined}getResourceBundle(t,e){if(!e)e=this.options.defaultNS;return this.getResource(t,e)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const e=this.getDataByLanguage(t);const i=e&&Object.keys(e)||[];return!!i.find((t=>e[t]&&Object.keys(e[t]).length>0))}toJSON(){return this.data}}var Z={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,i,s,n){t.forEach((t=>{e=this.processors[t]?.process(e,i,s,n)??e}));return e}};const X=Symbol("i18next/PATH_KEY");function tt(){const t=[];const e=Object.create(null);let i;e.get=(s,n)=>{i?.revoke?.();if(n===X)return t;t.push(n);i=Proxy.revocable(s,e);return i.proxy};return Proxy.revocable(Object.create(null),e).proxy}function et(t,e){const{[X]:i}=t(tt());return i.join(e?.keySeparator??".")}const it={};const st=t=>!C(t)&&typeof t!=="boolean"&&typeof t!=="number";class nt extends G{constructor(t,e={}){super();O(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this);this.options=e;if(this.options.keySeparator===undefined){this.options.keySeparator="."}this.logger=q.create("translator")}changeLanguage(t){if(t)this.language=t}exists(t,e={interpolation:{}}){const i={...e};if(t==null)return false;const s=this.resolve(t,i);if(s?.res===undefined)return false;const n=st(s.res);if(i.returnObjects===false&&n){return false}return true}extractFromKey(t,e){let i=e.nsSeparator!==undefined?e.nsSeparator:this.options.nsSeparator;if(i===undefined)i=":";const s=e.keySeparator!==undefined?e.keySeparator:this.options.keySeparator;let n=e.ns||this.options.defaultNS||[];const r=i&&t.indexOf(i)>-1;const o=!this.options.userDefinedKeySeparator&&!e.keySeparator&&!this.options.userDefinedNsSeparator&&!e.nsSeparator&&!U(t,i,s);if(r&&!o){const e=t.match(this.interpolator.nestingRegexp);if(e&&e.length>0){return{key:t,namespaces:C(n)?[n]:n}}const r=t.split(i);if(i!==s||i===s&&this.options.ns.indexOf(r[0])>-1)n=r.shift();t=r.join(s)}return{key:t,namespaces:C(n)?[n]:n}}translate(t,e,i){let s=typeof e==="object"?{...e}:e;if(typeof s!=="object"&&this.options.overloadTranslationOptionHandler){s=this.options.overloadTranslationOptionHandler(arguments)}if(typeof s==="object")s={...s};if(!s)s={};if(t==null)return"";if(typeof t==="function")t=et(t,{...this.options,...s});if(!Array.isArray(t))t=[String(t)];const n=s.returnDetails!==undefined?s.returnDetails:this.options.returnDetails;const r=s.keySeparator!==undefined?s.keySeparator:this.options.keySeparator;const{key:o,namespaces:a}=this.extractFromKey(t[t.length-1],s);const h=a[a.length-1];let c=s.nsSeparator!==undefined?s.nsSeparator:this.options.nsSeparator;if(c===undefined)c=":";const u=s.lng||this.language;const f=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u?.toLowerCase()==="cimode"){if(f){if(n){return{res:`${h}${c}${o}`,usedKey:o,exactUsedKey:o,usedLng:u,usedNS:h,usedParams:this.getUsedParamsDetails(s)}}return`${h}${c}${o}`}if(n){return{res:o,usedKey:o,exactUsedKey:o,usedLng:u,usedNS:h,usedParams:this.getUsedParamsDetails(s)}}return o}const l=this.resolve(t,s);let d=l?.res;const p=l?.usedKey||o;const g=l?.exactUsedKey||o;const m=["[object Number]","[object Function]","[object RegExp]"];const y=s.joinArrays!==undefined?s.joinArrays:this.options.joinArrays;const w=!this.i18nFormat||this.i18nFormat.handleAsObject;const b=s.count!==undefined&&!C(s.count);const S=nt.hasDefaultValue(s);const v=b?this.pluralResolver.getSuffix(u,s.count,s):"";const $=s.ordinal&&b?this.pluralResolver.getSuffix(u,s.count,{ordinal:false}):"";const k=b&&!s.ordinal&&s.count===0;const x=k&&s[`defaultValue${this.options.pluralSeparator}zero`]||s[`defaultValue${v}`]||s[`defaultValue${$}`]||s.defaultValue;let j=d;if(w&&!d&&S){j=x}const E=st(j);const O=Object.prototype.toString.apply(j);if(w&&j&&E&&m.indexOf(O)<0&&!(C(y)&&Array.isArray(j))){if(!s.returnObjects&&!this.options.returnObjects){if(!this.options.returnedObjectHandler){this.logger.warn("accessing an object - but returnObjects options is not enabled!")}const t=this.options.returnedObjectHandler?this.options.returnedObjectHandler(p,j,{...s,ns:a}):`key '${o} (${this.language})' returned an object instead of string.`;if(n){l.res=t;l.usedParams=this.getUsedParamsDetails(s);return l}return t}if(r){const t=Array.isArray(j);const e=t?[]:{};const i=t?g:p;for(const t in j){if(Object.prototype.hasOwnProperty.call(j,t)){const n=`${i}${r}${t}`;if(S&&!d){e[t]=this.translate(n,{...s,defaultValue:st(x)?x[t]:undefined,...{joinArrays:false,ns:a}})}else{e[t]=this.translate(n,{...s,...{joinArrays:false,ns:a}})}if(e[t]===n)e[t]=j[t]}}d=e}}else if(w&&C(y)&&Array.isArray(d)){d=d.join(y);if(d)d=this.extendTranslation(d,t,s,i)}else{let e=false;let n=false;if(!this.isValidLookup(d)&&S){e=true;d=x}if(!this.isValidLookup(d)){n=true;d=o}const a=s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey;const f=a&&n?undefined:d;const p=S&&x!==d&&this.options.updateMissing;if(n||e||p){this.logger.log(p?"updateKey":"missingKey",u,h,o,p?x:d);if(r){const t=this.resolve(o,{...s,keySeparator:false});if(t&&t.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.")}let t=[];const e=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&&e&&e[0]){for(let i=0;i<e.length;i++){t.push(e[i])}}else if(this.options.saveMissingTo==="all"){t=this.languageUtils.toResolveHierarchy(s.lng||this.language)}else{t.push(s.lng||this.language)}const i=(t,e,i)=>{const n=S&&i!==d?i:f;if(this.options.missingKeyHandler){this.options.missingKeyHandler(t,h,e,n,p,s)}else if(this.backendConnector?.saveMissing){this.backendConnector.saveMissing(t,h,e,n,p,s)}this.emit("missingKey",t,h,e,d)};if(this.options.saveMissing){if(this.options.saveMissingPlurals&&b){t.forEach((t=>{const e=this.pluralResolver.getSuffixes(t,s);if(k&&s[`defaultValue${this.options.pluralSeparator}zero`]&&e.indexOf(`${this.options.pluralSeparator}zero`)<0){e.push(`${this.options.pluralSeparator}zero`)}e.forEach((e=>{i([t],o+e,s[`defaultValue${e}`]||x)}))}))}else{i(t,o,x)}}}d=this.extendTranslation(d,t,s,l,i);if(n&&d===o&&this.options.appendNamespaceToMissingKey){d=`${h}${c}${o}`}if((n||e)&&this.options.parseMissingKeyHandler){d=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${h}${c}${o}`:o,e?d:undefined,s)}}if(n){l.res=d;l.usedParams=this.getUsedParamsDetails(s);return l}return d}extendTranslation(t,e,i,s,n){if(this.i18nFormat?.parse){t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...i},i.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s})}else if(!i.skipInterpolation){if(i.interpolation)this.interpolator.init({...i,...{interpolation:{...this.options.interpolation,...i.interpolation}}});const r=C(t)&&(i?.interpolation?.skipOnVariables!==undefined?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let o;if(r){const e=t.match(this.interpolator.nestingRegexp);o=e&&e.length}let a=i.replace&&!C(i.replace)?i.replace:i;if(this.options.interpolation.defaultVariables)a={...this.options.interpolation.defaultVariables,...a};t=this.interpolator.interpolate(t,a,i.lng||this.language||s.usedLng,i);if(r){const e=t.match(this.interpolator.nestingRegexp);const s=e&&e.length;if(o<s)i.nest=false}if(!i.lng&&s&&s.res)i.lng=this.language||s.usedLng;if(i.nest!==false)t=this.interpolator.nest(t,((...t)=>{if(n?.[0]===t[0]&&!i.context){this.logger.warn(`It seems you are nesting recursively key: ${t[0]} in key: ${e[0]}`);return null}return this.translate(...t,e)}),i);if(i.interpolation)this.interpolator.reset()}const r=i.postProcess||this.options.postProcess;const o=C(r)?[r]:r;if(t!=null&&o?.length&&i.applyPostProcessor!==false){t=Z.handle(o,t,e,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(i)},...i}:i,this)}return t}resolve(t,e={}){let i;let s;let n;let r;let o;if(C(t))t=[t];t.forEach((t=>{if(this.isValidLookup(i))return;const a=this.extractFromKey(t,e);const h=a.key;s=h;let c=a.namespaces;if(this.options.fallbackNS)c=c.concat(this.options.fallbackNS);const u=e.count!==undefined&&!C(e.count);const f=u&&!e.ordinal&&e.count===0;const l=e.context!==undefined&&(C(e.context)||typeof e.context==="number")&&e.context!=="";const d=e.lngs?e.lngs:this.languageUtils.toResolveHierarchy(e.lng||this.language,e.fallbackLng);c.forEach((t=>{if(this.isValidLookup(i))return;o=t;if(!it[`${d[0]}-${t}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(o)){it[`${d[0]}-${t}`]=true;this.logger.warn(`key "${s}" for languages "${d.join(", ")}" won't get resolved as namespace "${o}" 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!!!")}d.forEach((s=>{if(this.isValidLookup(i))return;r=s;const o=[h];if(this.i18nFormat?.addLookupKeys){this.i18nFormat.addLookupKeys(o,h,s,t,e)}else{let t;if(u)t=this.pluralResolver.getSuffix(s,e.count,e);const i=`${this.options.pluralSeparator}zero`;const n=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u){if(e.ordinal&&t.indexOf(n)===0){o.push(h+t.replace(n,this.options.pluralSeparator))}o.push(h+t);if(f){o.push(h+i)}}if(l){const s=`${h}${this.options.contextSeparator||"_"}${e.context}`;o.push(s);if(u){if(e.ordinal&&t.indexOf(n)===0){o.push(s+t.replace(n,this.options.pluralSeparator))}o.push(s+t);if(f){o.push(s+i)}}}}let a;while(a=o.pop()){if(!this.isValidLookup(i)){n=a;i=this.getResource(s,t,a,e)}}}))}))}));return{res:i,usedKey:s,exactUsedKey:n,usedLng:r,usedNS:o}}isValidLookup(t){return t!==undefined&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,e,i,s={}){if(this.i18nFormat?.getResource)return this.i18nFormat.getResource(t,e,i,s);return this.resourceStore.getResource(t,e,i,s)}getUsedParamsDetails(t={}){const e=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"];const i=t.replace&&!C(t.replace);let s=i?t.replace:t;if(i&&typeof t.count!=="undefined"){s.count=t.count}if(this.options.interpolation.defaultVariables){s={...this.options.interpolation.defaultVariables,...s}}if(!i){s={...s};for(const t of e){delete s[t]}}return s}static hasDefaultValue(t){const e="defaultValue";for(const i in t){if(Object.prototype.hasOwnProperty.call(t,i)&&e===i.substring(0,e.length)&&undefined!==t[i]){return true}}return false}}class rt{constructor(t){this.options=t;this.supportedLngs=this.options.supportedLngs||false;this.logger=q.create("languageUtils")}getScriptPartFromCode(t){t=Y(t);if(!t||t.indexOf("-")<0)return null;const e=t.split("-");if(e.length===2)return null;e.pop();if(e[e.length-1].toLowerCase()==="x")return null;return this.formatLanguageCode(e.join("-"))}getLanguagePartFromCode(t){t=Y(t);if(!t||t.indexOf("-")<0)return t;const e=t.split("-");return this.formatLanguageCode(e[0])}formatLanguageCode(t){if(C(t)&&t.indexOf("-")>-1){let e;try{e=Intl.getCanonicalLocales(t)[0]}catch(t){}if(e&&this.options.lowerCaseLng){e=e.toLowerCase()}if(e)return e;if(this.options.lowerCaseLng){return t.toLowerCase()}return t}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){if(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs){t=this.getLanguagePartFromCode(t)}return!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let e;t.forEach((t=>{if(e)return;const i=this.formatLanguageCode(t);if(!this.options.supportedLngs||this.isSupportedCode(i))e=i}));if(!e&&this.options.supportedLngs){t.forEach((t=>{if(e)return;const i=this.getScriptPartFromCode(t);if(this.isSupportedCode(i))return e=i;const s=this.getLanguagePartFromCode(t);if(this.isSupportedCode(s))return e=s;e=this.options.supportedLngs.find((t=>{if(t===s)return t;if(t.indexOf("-")<0&&s.indexOf("-")<0)return;if(t.indexOf("-")>0&&s.indexOf("-")<0&&t.substring(0,t.indexOf("-"))===s)return t;if(t.indexOf(s)===0&&s.length>1)return t}))}))}if(!e)e=this.getFallbackCodes(this.options.fallbackLng)[0];return e}getFallbackCodes(t,e){if(!t)return[];if(typeof t==="function")t=t(e);if(C(t))t=[t];if(Array.isArray(t))return t;if(!e)return t.default||[];let i=t[e];if(!i)i=t[this.getScriptPartFromCode(e)];if(!i)i=t[this.formatLanguageCode(e)];if(!i)i=t[this.getLanguagePartFromCode(e)];if(!i)i=t.default;return i||[]}toResolveHierarchy(t,e){const i=this.getFallbackCodes((e===false?[]:e)||this.options.fallbackLng||[],t);const s=[];const n=t=>{if(!t)return;if(this.isSupportedCode(t)){s.push(t)}else{this.logger.warn(`rejecting language code not found in supportedLngs: ${t}`)}};if(C(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)){if(this.options.load!=="languageOnly")n(this.formatLanguageCode(t));if(this.options.load!=="languageOnly"&&this.options.load!=="currentOnly")n(this.getScriptPartFromCode(t));if(this.options.load!=="currentOnly")n(this.getLanguagePartFromCode(t))}else if(C(t)){n(this.formatLanguageCode(t))}i.forEach((t=>{if(s.indexOf(t)<0)n(this.formatLanguageCode(t))}));return s}}const ot={zero:0,one:1,two:2,few:3,many:4,other:5};const at={select:t=>t===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class ht{constructor(t,e={}){this.languageUtils=t;this.options=e;this.logger=q.create("pluralResolver");this.pluralRulesCache={}}addRule(t,e){this.rules[t]=e}clearCache(){this.pluralRulesCache={}}getRule(t,e={}){const i=Y(t==="dev"?"en":t);const s=e.ordinal?"ordinal":"cardinal";const n=JSON.stringify({cleanedCode:i,type:s});if(n in this.pluralRulesCache){return this.pluralRulesCache[n]}let r;try{r=new Intl.PluralRules(i,{type:s})}catch(i){if(!Intl){this.logger.error("No Intl support, please use an Intl polyfill!");return at}if(!t.match(/-|_/))return at;const s=this.languageUtils.getLanguagePartFromCode(t);r=this.getRule(s,e)}this.pluralRulesCache[n]=r;return r}needsPlural(t,e={}){let i=this.getRule(t,e);if(!i)i=this.getRule("dev",e);return i?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(t,e,i={}){return this.getSuffixes(t,i).map((t=>`${e}${t}`))}getSuffixes(t,e={}){let i=this.getRule(t,e);if(!i)i=this.getRule("dev",e);if(!i)return[];return i.resolvedOptions().pluralCategories.sort(((t,e)=>ot[t]-ot[e])).map((t=>`${this.options.prepend}${e.ordinal?`ordinal${this.options.prepend}`:""}${t}`))}getSuffix(t,e,i={}){const s=this.getRule(t,i);if(s){return`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${s.select(e)}`}this.logger.warn(`no plural rule found for: ${t}`);return this.getSuffix("dev",e,i)}}const ct=(t,e,i,s=".",n=true)=>{let r=I(t,e,i);if(!r&&n&&C(i)){r=_(t,i,s);if(r===undefined)r=_(e,i,s)}return r};const ut=t=>t.replace(/\$/g,"$$$$");class ft{constructor(t={}){this.logger=q.create("interpolator");this.options=t;this.format=t?.interpolation?.format||(t=>t);this.init(t)}init(t={}){if(!t.interpolation)t.interpolation={escapeValue:true};const{escape:e,escapeValue:i,useRawValueToEscape:s,prefix:n,prefixEscaped:r,suffix:o,suffixEscaped:a,formatSeparator:h,unescapeSuffix:c,unescapePrefix:u,nestingPrefix:f,nestingPrefixEscaped:l,nestingSuffix:d,nestingSuffixEscaped:p,nestingOptionsSeparator:g,maxReplaces:m,alwaysFormat:y}=t.interpolation;this.escape=e!==undefined?e:D;this.escapeValue=i!==undefined?i:true;this.useRawValueToEscape=s!==undefined?s:false;this.prefix=n?F(n):r||"{{";this.suffix=o?F(o):a||"}}";this.formatSeparator=h||",";this.unescapePrefix=c?"":u||"-";this.unescapeSuffix=this.unescapePrefix?"":c||"";this.nestingPrefix=f?F(f):l||F("$t(");this.nestingSuffix=d?F(d):p||F(")");this.nestingOptionsSeparator=g||",";this.maxReplaces=m||1e3;this.alwaysFormat=y!==undefined?y:false;this.resetRegExp()}reset(){if(this.options)this.init(this.options)}resetRegExp(){const t=(t,e)=>{if(t?.source===e){t.lastIndex=0;return t}return new RegExp(e,"g")};this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`);this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`);this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(t,e,i,s){let n;let r;let o;const a=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};const h=t=>{if(t.indexOf(this.formatSeparator)<0){const n=ct(e,a,t,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(n,undefined,i,{...s,...e,interpolationkey:t}):n}const n=t.split(this.formatSeparator);const r=n.shift().trim();const o=n.join(this.formatSeparator).trim();return this.format(ct(e,a,r,this.options.keySeparator,this.options.ignoreJSONStructure),o,i,{...s,...e,interpolationkey:r})};this.resetRegExp();const c=s?.missingInterpolationHandler||this.options.missingInterpolationHandler;const u=s?.interpolation?.skipOnVariables!==undefined?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;const f=[{regex:this.regexpUnescape,safeValue:t=>ut(t)},{regex:this.regexp,safeValue:t=>this.escapeValue?ut(this.escape(t)):ut(t)}];f.forEach((e=>{o=0;while(n=e.regex.exec(t)){const i=n[1].trim();r=h(i);if(r===undefined){if(typeof c==="function"){const e=c(t,n,s);r=C(e)?e:""}else if(s&&Object.prototype.hasOwnProperty.call(s,i)){r=""}else if(u){r=n[0];continue}else{this.logger.warn(`missed to pass in variable ${i} for interpolating ${t}`);r=""}}else if(!C(r)&&!this.useRawValueToEscape){r=E(r)}const a=e.safeValue(r);t=t.replace(n[0],a);if(u){e.regex.lastIndex+=r.length;e.regex.lastIndex-=n[0].length}else{e.regex.lastIndex=0}o++;if(o>=this.maxReplaces){break}}}));return t}nest(t,e,i={}){let s;let n;let r;const o=(t,e)=>{const i=this.nestingOptionsSeparator;if(t.indexOf(i)<0)return t;const s=t.split(new RegExp(`${i}[ ]*{`));let n=`{${s[1]}`;t=s[0];n=this.interpolate(n,r);const o=n.match(/'/g);const a=n.match(/"/g);if((o?.length??0)%2===0&&!a||a.length%2!==0){n=n.replace(/'/g,'"')}try{r=JSON.parse(n);if(e)r={...e,...r}}catch(e){this.logger.warn(`failed parsing options string in nesting for key ${t}`,e);return`${t}${i}${n}`}if(r.defaultValue&&r.defaultValue.indexOf(this.prefix)>-1)delete r.defaultValue;return t};while(s=this.nestingRegexp.exec(t)){let a=[];r={...i};r=r.replace&&!C(r.replace)?r.replace:r;r.applyPostProcessor=false;delete r.defaultValue;const h=/{.*}/.test(s[1])?s[1].lastIndexOf("}")+1:s[1].indexOf(this.formatSeparator);if(h!==-1){a=s[1].slice(h).split(this.formatSeparator).map((t=>t.trim())).filter(Boolean);s[1]=s[1].slice(0,h)}n=e(o.call(this,s[1].trim(),r),r);if(n&&s[0]===t&&!C(n))return n;if(!C(n))n=E(n);if(!n){this.logger.warn(`missed to resolve ${s[1]} for nesting ${t}`);n=""}if(a.length){n=a.reduce(((t,e)=>this.format(t,e,i.lng,{...i,interpolationkey:s[1].trim()})),n.trim())}t=t.replace(s[0],n);this.regexp.lastIndex=0}return t}}const lt=t=>{let e=t.toLowerCase().trim();const i={};if(t.indexOf("(")>-1){const s=t.split("(");e=s[0].toLowerCase().trim();const n=s[1].substring(0,s[1].length-1);if(e==="currency"&&n.indexOf(":")<0){if(!i.currency)i.currency=n.trim()}else if(e==="relativetime"&&n.indexOf(":")<0){if(!i.range)i.range=n.trim()}else{const t=n.split(";");t.forEach((t=>{if(t){const[e,...s]=t.split(":");const n=s.join(":").trim().replace(/^'+|'+$/g,"");const r=e.trim();if(!i[r])i[r]=n;if(n==="false")i[r]=false;if(n==="true")i[r]=true;if(!isNaN(n))i[r]=parseInt(n,10)}}))}}return{formatName:e,formatOptions:i}};const dt=t=>{const e={};return(i,s,n)=>{let r=n;if(n&&n.interpolationkey&&n.formatParams&&n.formatParams[n.interpolationkey]&&n[n.interpolationkey]){r={...r,[n.interpolationkey]:undefined}}const o=s+JSON.stringify(r);let a=e[o];if(!a){a=t(Y(s),n);e[o]=a}return a(i)}};const pt=t=>(e,i,s)=>t(Y(i),s)(e);class gt{constructor(t={}){this.logger=q.create("formatter");this.options=t;this.init(t)}init(t,e={interpolation:{}}){this.formatSeparator=e.interpolation.formatSeparator||",";const i=e.cacheInBuiltFormats?dt:pt;this.formats={number:i(((t,e)=>{const i=new Intl.NumberFormat(t,{...e});return t=>i.format(t)})),currency:i(((t,e)=>{const i=new Intl.NumberFormat(t,{...e,style:"currency"});return t=>i.format(t)})),datetime:i(((t,e)=>{const i=new Intl.DateTimeFormat(t,{...e});return t=>i.format(t)})),relativetime:i(((t,e)=>{const i=new Intl.RelativeTimeFormat(t,{...e});return t=>i.format(t,e.range||"day")})),list:i(((t,e)=>{const i=new Intl.ListFormat(t,{...e});return t=>i.format(t)}))}}add(t,e){this.formats[t.toLowerCase().trim()]=e}addCached(t,e){this.formats[t.toLowerCase().trim()]=dt(e)}format(t,e,i,s={}){const n=e.split(this.formatSeparator);if(n.length>1&&n[0].indexOf("(")>1&&n[0].indexOf(")")<0&&n.find((t=>t.indexOf(")")>-1))){const t=n.findIndex((t=>t.indexOf(")")>-1));n[0]=[n[0],...n.splice(1,t)].join(this.formatSeparator)}const r=n.reduce(((t,e)=>{const{formatName:n,formatOptions:r}=lt(e);if(this.formats[n]){let e=t;try{const o=s?.formatParams?.[s.interpolationkey]||{};const a=o.locale||o.lng||s.locale||s.lng||i;e=this.formats[n](t,a,{...r,...s,...o})}catch(t){this.logger.warn(t)}return e}else{this.logger.warn(`there was no format function for ${n}`)}return t}),t);return r}}const mt=(t,e)=>{if(t.pending[e]!==undefined){delete t.pending[e];t.pendingCount--}};class yt extends G{constructor(t,e,i,s={}){super();this.backend=t;this.store=e;this.services=i;this.languageUtils=i.languageUtils;this.options=s;this.logger=q.create("backendConnector");this.waitingReads=[];this.maxParallelReads=s.maxParallelReads||10;this.readingCalls=0;this.maxRetries=s.maxRetries>=0?s.maxRetries:5;this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350;this.state={};this.queue=[];this.backend?.init?.(i,s.backend,s)}queueLoad(t,e,i,s){const n={};const r={};const o={};const a={};t.forEach((t=>{let s=true;e.forEach((e=>{const o=`${t}|${e}`;if(!i.reload&&this.store.hasResourceBundle(t,e)){this.state[o]=2}else if(this.state[o]<0);else if(this.state[o]===1){if(r[o]===undefined)r[o]=true}else{this.state[o]=1;s=false;if(r[o]===undefined)r[o]=true;if(n[o]===undefined)n[o]=true;if(a[e]===undefined)a[e]=true}}));if(!s)o[t]=true}));if(Object.keys(n).length||Object.keys(r).length){this.queue.push({pending:r,pendingCount:Object.keys(r).length,loaded:{},errors:[],callback:s})}return{toLoad:Object.keys(n),pending:Object.keys(r),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(a)}}loaded(t,e,i){const s=t.split("|");const n=s[0];const r=s[1];if(e)this.emit("failedLoading",n,r,e);if(!e&&i){this.store.addResourceBundle(n,r,i,undefined,undefined,{skipCopy:true})}this.state[t]=e?-1:2;if(e&&i)this.state[t]=0;const o={};this.queue.forEach((i=>{R(i.loaded,[n],r);mt(i,t);if(e)i.errors.push(e);if(i.pendingCount===0&&!i.done){Object.keys(i.loaded).forEach((t=>{if(!o[t])o[t]={};const e=i.loaded[t];if(e.length){e.forEach((e=>{if(o[t][e]===undefined)o[t][e]=true}))}}));i.done=true;if(i.errors.length){i.callback(i.errors)}else{i.callback()}}}));this.emit("loaded",o);this.queue=this.queue.filter((t=>!t.done))}read(t,e,i,s=0,n=this.retryTimeout,r){if(!t.length)return r(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:e,fcName:i,tried:s,wait:n,callback:r});return}this.readingCalls++;const o=(o,a)=>{this.readingCalls--;if(this.waitingReads.length>0){const t=this.waitingReads.shift();this.read(t.lng,t.ns,t.fcName,t.tried,t.wait,t.callback)}if(o&&a&&s<this.maxRetries){setTimeout((()=>{this.read.call(this,t,e,i,s+1,n*2,r)}),n);return}r(o,a)};const a=this.backend[i].bind(this.backend);if(a.length===2){try{const i=a(t,e);if(i&&typeof i.then==="function"){i.then((t=>o(null,t))).catch(o)}else{o(null,i)}}catch(t){o(t)}return}return a(t,e,o)}prepareLoading(t,e,i={},s){if(!this.backend){this.logger.warn("No backend was added via i18next.use. Will not load resources.");return s&&s()}if(C(t))t=this.languageUtils.toResolveHierarchy(t);if(C(e))e=[e];const n=this.queueLoad(t,e,i,s);if(!n.toLoad.length){if(!n.pending.length)s();return null}n.toLoad.forEach((t=>{this.loadOne(t)}))}load(t,e,i){this.prepareLoading(t,e,{},i)}reload(t,e,i){this.prepareLoading(t,e,{reload:true},i)}loadOne(t,e=""){const i=t.split("|");const s=i[0];const n=i[1];this.read(s,n,"read",undefined,undefined,((i,r)=>{if(i)this.logger.warn(`${e}loading namespace ${n} for language ${s} failed`,i);if(!i&&r)this.logger.log(`${e}loaded namespace ${n} for language ${s}`,r);this.loaded(t,i,r)}))}saveMissing(t,e,i,s,n,r={},o=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(e)){this.logger.warn(`did not save key "${i}" as the namespace "${e}" 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!!!");return}if(i===undefined||i===null||i==="")return;if(this.backend?.create){const a={...r,isUpdate:n};const h=this.backend.create.bind(this.backend);if(h.length<6){try{let n;if(h.length===5){n=h(t,e,i,s,a)}else{n=h(t,e,i,s)}if(n&&typeof n.then==="function"){n.then((t=>o(null,t))).catch(o)}else{o(null,n)}}catch(t){o(t)}}else{h(t,e,i,s,o,a)}}if(!t||!t[0])return;this.store.addResource(t[0],e,i,s)}}const wt=()=>({debug:false,initAsync:true,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:false,supportedLngs:false,nonExplicitSupportedLngs:false,load:"all",preload:false,simplifyPluralSuffix:true,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:false,saveMissing:false,updateMissing:false,saveMissingTo:"fallback",saveMissingPlurals:true,missingKeyHandler:false,missingInterpolationHandler:false,postProcess:false,postProcessPassResolved:false,returnNull:false,returnEmptyString:true,returnObjects:false,joinArrays:false,returnedObjectHandler:false,parseMissingKeyHandler:false,appendNamespaceToMissingKey:false,appendNamespaceToCIMode:false,overloadTranslationOptionHandler:t=>{let e={};if(typeof t[1]==="object")e=t[1];if(C(t[1]))e.defaultValue=t[1];if(C(t[2]))e.tDescription=t[2];if(typeof t[2]==="object"||typeof t[3]==="object"){const i=t[3]||t[2];Object.keys(i).forEach((t=>{e[t]=i[t]}))}return e},interpolation:{escapeValue:true,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:true},cacheInBuiltFormats:true});const bt=t=>{if(C(t.ns))t.ns=[t.ns];if(C(t.fallbackLng))t.fallbackLng=[t.fallbackLng];if(C(t.fallbackNS))t.fallbackNS=[t.fallbackNS];if(t.supportedLngs?.indexOf?.("cimode")<0){t.supportedLngs=t.supportedLngs.concat(["cimode"])}if(typeof t.initImmediate==="boolean")t.initAsync=t.initImmediate;return t};const St=()=>{};const vt=t=>{const e=Object.getOwnPropertyNames(Object.getPrototypeOf(t));e.forEach((e=>{if(typeof t[e]==="function"){t[e]=t[e].bind(t)}}))};class $t extends G{constructor(t={},e){super();this.options=bt(t);this.services={};this.logger=q;this.modules={external:[]};vt(this);if(e&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync){this.init(t,e);return this}setTimeout((()=>{this.init(t,e)}),0)}}init(t={},e){this.isInitializing=true;if(typeof t==="function"){e=t;t={}}if(t.defaultNS==null&&t.ns){if(C(t.ns)){t.defaultNS=t.ns}else if(t.ns.indexOf("translation")<0){t.defaultNS=t.ns[0]}}const i=wt();this.options={...i,...this.options,...bt(t)};this.options.interpolation={...i.interpolation,...this.options.interpolation};if(t.keySeparator!==undefined){this.options.userDefinedKeySeparator=t.keySeparator}if(t.nsSeparator!==undefined){this.options.userDefinedNsSeparator=t.nsSeparator}const s=t=>{if(!t)return null;if(typeof t==="function")return new t;return t};if(!this.options.isClone){if(this.modules.logger){q.init(s(this.modules.logger),this.options)}else{q.init(null,this.options)}let t;if(this.modules.formatter){t=this.modules.formatter}else{t=gt}const e=new rt(this.options);this.store=new Q(this.options.resources,this.options);const n=this.services;n.logger=q;n.resourceStore=this.store;n.languageUtils=e;n.pluralResolver=new ht(e,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix});const r=this.options.interpolation.format&&this.options.interpolation.format!==i.interpolation.format;if(r){this.logger.deprecate(`init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting`)}if(t&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)){n.formatter=s(t);if(n.formatter.init)n.formatter.init(n,this.options);this.options.interpolation.format=n.formatter.format.bind(n.formatter)}n.interpolator=new ft(this.options);n.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)};n.backendConnector=new yt(s(this.modules.backend),n.resourceStore,n,this.options);n.backendConnector.on("*",((t,...e)=>{this.emit(t,...e)}));if(this.modules.languageDetector){n.languageDetector=s(this.modules.languageDetector);if(n.languageDetector.init)n.languageDetector.init(n,this.options.detection,this.options)}if(this.modules.i18nFormat){n.i18nFormat=s(this.modules.i18nFormat);if(n.i18nFormat.init)n.i18nFormat.init(this)}this.translator=new nt(this.services,this.options);this.translator.on("*",((t,...e)=>{this.emit(t,...e)}));this.modules.external.forEach((t=>{if(t.init)t.init(this)}))}this.format=this.options.interpolation.format;if(!e)e=St;if(this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const t=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);if(t.length>0&&t[0]!=="dev")this.options.lng=t[0]}if(!this.services.languageDetector&&!this.options.lng){this.logger.warn("init: no languageDetector is used and no lng is defined")}const n=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];n.forEach((t=>{this[t]=(...e)=>this.store[t](...e)}));const r=["addResource","addResources","addResourceBundle","removeResourceBundle"];r.forEach((t=>{this[t]=(...e)=>{this.store[t](...e);return this}}));const o=j();const a=()=>{const t=(t,i)=>{this.isInitializing=false;if(this.isInitialized&&!this.initializedStoreOnce)this.logger.warn("init: i18next is already initialized. You should call init just once!");this.isInitialized=true;if(!this.options.isClone)this.logger.log("initialized",this.options);this.emit("initialized",this.options);o.resolve(i);e(t,i)};if(this.languages&&!this.isInitialized)return t(null,this.t.bind(this));this.changeLanguage(this.options.lng,t)};if(this.options.resources||!this.options.initAsync){a()}else{setTimeout(a,0)}return o}loadResources(t,e=St){let i=e;const s=C(t)?t:this.language;if(typeof t==="function")i=t;if(!this.options.resources||this.options.partialBundledLanguages){if(s?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return i();const t=[];const e=e=>{if(!e)return;if(e==="cimode")return;const i=this.services.languageUtils.toResolveHierarchy(e);i.forEach((e=>{if(e==="cimode")return;if(t.indexOf(e)<0)t.push(e)}))};if(!s){const t=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);t.forEach((t=>e(t)))}else{e(s)}this.options.preload?.forEach?.((t=>e(t)));this.services.backendConnector.load(t,this.options.ns,(t=>{if(!t&&!this.resolvedLanguage&&this.language)this.setResolvedLanguage(this.language);i(t)}))}else{i(null)}}reloadResources(t,e,i){const s=j();if(typeof t==="function"){i=t;t=undefined}if(typeof e==="function"){i=e;e=undefined}if(!t)t=this.languages;if(!e)e=this.options.ns;if(!i)i=St;this.services.backendConnector.reload(t,e,(t=>{s.resolve();i(t)}));return s}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");if(t.type==="backend"){this.modules.backend=t}if(t.type==="logger"||t.log&&t.warn&&t.error){this.modules.logger=t}if(t.type==="languageDetector"){this.modules.languageDetector=t}if(t.type==="i18nFormat"){this.modules.i18nFormat=t}if(t.type==="postProcessor"){Z.addPostProcessor(t)}if(t.type==="formatter"){this.modules.formatter=t}if(t.type==="3rdParty"){this.modules.external.push(t)}return this}setResolvedLanguage(t){if(!t||!this.languages)return;if(["cimode","dev"].indexOf(t)>-1)return;for(let t=0;t<this.languages.length;t++){const e=this.languages[t];if(["cimode","dev"].indexOf(e)>-1)continue;if(this.store.hasLanguageSomeTranslations(e)){this.resolvedLanguage=e;break}}if(!this.resolvedLanguage&&this.languages.indexOf(t)<0&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;this.languages.unshift(t)}}changeLanguage(t,e){this.isLanguageChangingTo=t;const i=j();this.emit("languageChanging",t);const s=t=>{this.language=t;this.languages=this.services.languageUtils.toResolveHierarchy(t);this.resolvedLanguage=undefined;this.setResolvedLanguage(t)};const n=(n,r)=>{if(r){if(this.isLanguageChangingTo===t){s(r);this.translator.changeLanguage(r);this.isLanguageChangingTo=undefined;this.emit("languageChanged",r);this.logger.log("languageChanged",r)}}else{this.isLanguageChangingTo=undefined}i.resolve(((...t)=>this.t(...t)));if(e)e(n,((...t)=>this.t(...t)))};const r=e=>{if(!t&&!e&&this.services.languageDetector)e=[];const i=C(e)?e:e&&e[0];const r=this.store.hasLanguageSomeTranslations(i)?i:this.services.languageUtils.getBestMatchFromCodes(C(e)?[e]:e);if(r){if(!this.language){s(r)}if(!this.translator.language)this.translator.changeLanguage(r);this.services.languageDetector?.cacheUserLanguage?.(r)}this.loadResources(r,(t=>{n(t,r)}))};if(!t&&this.services.languageDetector&&!this.services.languageDetector.async){r(this.services.languageDetector.detect())}else if(!t&&this.services.languageDetector&&this.services.languageDetector.async){if(this.services.languageDetector.detect.length===0){this.services.languageDetector.detect().then(r)}else{this.services.languageDetector.detect(r)}}else{r(t)}return i}getFixedT(t,e,i){const s=(t,e,...n)=>{let r;if(typeof e!=="object"){r=this.options.overloadTranslationOptionHandler([t,e].concat(n))}else{r={...e}}r.lng=r.lng||s.lng;r.lngs=r.lngs||s.lngs;r.ns=r.ns||s.ns;if(r.keyPrefix!=="")r.keyPrefix=r.keyPrefix||i||s.keyPrefix;const o=this.options.keySeparator||".";let a;if(r.keyPrefix&&Array.isArray(t)){a=t.map((t=>{if(typeof t==="function")t=et(t,{...this.options,...e});return`${r.keyPrefix}${o}${t}`}))}else{if(typeof t==="function")t=et(t,{...this.options,...e});a=r.keyPrefix?`${r.keyPrefix}${o}${t}`:t}return this.t(a,r)};if(C(t)){s.lng=t}else{s.lngs=t}s.ns=e;s.keyPrefix=i;return s}t(...t){return this.translator?.translate(...t)}exists(...t){return this.translator?.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,e={}){if(!this.isInitialized){this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages);return false}if(!this.languages||!this.languages.length){this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages);return false}const i=e.lng||this.resolvedLanguage||this.languages[0];const s=this.options?this.options.fallbackLng:false;const n=this.languages[this.languages.length-1];if(i.toLowerCase()==="cimode")return true;const r=(t,e)=>{const i=this.services.backendConnector.state[`${t}|${e}`];return i===-1||i===0||i===2};if(e.precheck){const t=e.precheck(this,r);if(t!==undefined)return t}if(this.hasResourceBundle(i,t))return true;if(!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages)return true;if(r(i,t)&&(!s||r(n,t)))return true;return false}loadNamespaces(t,e){const i=j();if(!this.options.ns){if(e)e();return Promise.resolve()}if(C(t))t=[t];t.forEach((t=>{if(this.options.ns.indexOf(t)<0)this.options.ns.push(t)}));this.loadResources((t=>{i.resolve();if(e)e(t)}));return i}loadLanguages(t,e){const i=j();if(C(t))t=[t];const s=this.options.preload||[];const n=t.filter((t=>s.indexOf(t)<0&&this.services.languageUtils.isSupportedCode(t)));if(!n.length){if(e)e();return Promise.resolve()}this.options.preload=s.concat(n);this.loadResources((t=>{i.resolve();if(e)e(t)}));return i}dir(t){if(!t)t=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language);if(!t)return"rtl";try{const e=new Intl.Locale(t);if(e&&e.getTextInfo){const t=e.getTextInfo();if(t&&t.direction)return t.direction}}catch(t){}const e=["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"];const i=this.services?.languageUtils||new rt(wt());if(t.toLowerCase().indexOf("-latn")>1)return"ltr";return e.indexOf(i.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},e){const i=new $t(t,e);i.createInstance=$t.createInstance;return i}cloneInstance(t={},e=St){const i=t.forkResourceStore;if(i)delete t.forkResourceStore;const s={...this.options,...t,...{isClone:true}};const n=new $t(s);if(t.debug!==undefined||t.prefix!==undefined){n.logger=n.logger.clone(t)}const r=["store","services","language"];r.forEach((t=>{n[t]=this[t]}));n.services={...this.services};n.services.utils={hasLoadedNamespace:n.hasLoadedNamespace.bind(n)};if(i){const t=Object.keys(this.store.data).reduce(((t,e)=>{t[e]={...this.store.data[e]};t[e]=Object.keys(t[e]).reduce(((i,s)=>{i[s]={...t[e][s]};return i}),t[e]);return t}),{});n.store=new Q(t,s);n.services.resourceStore=n.store}n.translator=new nt(n.services,s);n.translator.on("*",((t,...e)=>{n.emit(t,...e)}));n.init(s,e);n.translator.options=s;n.translator.backendConnector.services.utils={hasLoadedNamespace:n.hasLoadedNamespace.bind(n)};return n}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const kt=$t.createInstance();const{slice:xt,forEach:Ct}=[];function jt(t){Ct.call(xt.call(arguments,1),(e=>{if(e){for(const i in e){if(t[i]===undefined)t[i]=e[i]}}}));return t}function Et(t){if(typeof t!=="string")return false;const e=[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i];return e.some((e=>e.test(t)))}const Ot=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;const Mt=function(t,e){let i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{path:"/"};const s=i;const n=encodeURIComponent(e);let r=`${t}=${n}`;if(s.maxAge>0){const t=s.maxAge-0;if(Number.isNaN(t))throw new Error("maxAge should be a Number");r+=`; Max-Age=${Math.floor(t)}`}if(s.domain){if(!Ot.test(s.domain)){throw new TypeError("option domain is invalid")}r+=`; Domain=${s.domain}`}if(s.path){if(!Ot.test(s.path)){throw new TypeError("option path is invalid")}r+=`; Path=${s.path}`}if(s.expires){if(typeof s.expires.toUTCString!=="function"){throw new TypeError("option expires is invalid")}r+=`; Expires=${s.expires.toUTCString()}`}if(s.httpOnly)r+="; HttpOnly";if(s.secure)r+="; Secure";if(s.sameSite){const t=typeof s.sameSite==="string"?s.sameSite.toLowerCase():s.sameSite;switch(t){case true:r+="; SameSite=Strict";break;case"lax":r+="; SameSite=Lax";break;case"strict":r+="; SameSite=Strict";break;case"none":r+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}if(s.partitioned)r+="; Partitioned";return r};const Nt={create(t,e,i,s){let n=arguments.length>4&&arguments[4]!==undefined?arguments[4]:{path:"/",sameSite:"strict"};if(i){n.expires=new Date;n.expires.setTime(n.expires.getTime()+i*60*1e3)}if(s)n.domain=s;document.cookie=Mt(t,e,n)},read(t){const e=`${t}=`;const i=document.cookie.split(";");for(let t=0;t<i.length;t++){let s=i[t];while(s.charAt(0)===" ")s=s.substring(1,s.length);if(s.indexOf(e)===0)return s.substring(e.length,s.length)}return null},remove(t,e){this.create(t,"",-1,e)}};var Pt={name:"cookie",lookup(t){let{lookupCookie:e}=t;if(e&&typeof document!=="undefined"){return Nt.read(e)||undefined}return undefined},cacheUserLanguage(t,e){let{lookupCookie:i,cookieMinutes:s,cookieDomain:n,cookieOptions:r}=e;if(i&&typeof document!=="undefined"){Nt.create(i,t,s,n,r)}}};var Lt={name:"querystring",lookup(t){let{lookupQuerystring:e}=t;let i;if(typeof window!=="undefined"){let{search:t}=window.location;if(!window.location.search&&window.location.hash?.indexOf("?")>-1){t=window.location.hash.substring(window.location.hash.indexOf("?"))}const s=t.substring(1);const n=s.split("&");for(let t=0;t<n.length;t++){const s=n[t].indexOf("=");if(s>0){const r=n[t].substring(0,s);if(r===e){i=n[t].substring(s+1)}}}}return i}};var At={name:"hash",lookup(t){let{lookupHash:e,lookupFromHashIndex:i}=t;let s;if(typeof window!=="undefined"){const{hash:t}=window.location;if(t&&t.length>2){const n=t.substring(1);if(e){const t=n.split("&");for(let i=0;i<t.length;i++){const n=t[i].indexOf("=");if(n>0){const r=t[i].substring(0,n);if(r===e){s=t[i].substring(n+1)}}}}if(s)return s;if(!s&&i>-1){const e=t.match(/\/([a-zA-Z-]*)/g);if(!Array.isArray(e))return undefined;const s=typeof i==="number"?i:0;return e[s]?.replace("/","")}}}return s}};let Rt=null;const zt=()=>{if(Rt!==null)return Rt;try{Rt=typeof window!=="undefined"&&window.localStorage!==null;if(!Rt){return false}const t="i18next.translate.boo";window.localStorage.setItem(t,"foo");window.localStorage.removeItem(t)}catch(t){Rt=false}return Rt};var It={name:"localStorage",lookup(t){let{lookupLocalStorage:e}=t;if(e&&zt()){return window.localStorage.getItem(e)||undefined}return undefined},cacheUserLanguage(t,e){let{lookupLocalStorage:i}=e;if(i&&zt()){window.localStorage.setItem(i,t)}}};let Tt=null;const Ft=()=>{if(Tt!==null)return Tt;try{Tt=typeof window!=="undefined"&&window.sessionStorage!==null;if(!Tt){return false}const t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo");window.sessionStorage.removeItem(t)}catch(t){Tt=false}return Tt};var Vt={name:"sessionStorage",lookup(t){let{lookupSessionStorage:e}=t;if(e&&Ft()){return window.sessionStorage.getItem(e)||undefined}return undefined},cacheUserLanguage(t,e){let{lookupSessionStorage:i}=e;if(i&&Ft()){window.sessionStorage.setItem(i,t)}}};var Dt={name:"navigator",lookup(t){const e=[];if(typeof navigator!=="undefined"){const{languages:t,userLanguage:i,language:s}=navigator;if(t){for(let i=0;i<t.length;i++){e.push(t[i])}}if(i){e.push(i)}if(s){e.push(s)}}return e.length>0?e:undefined}};var Bt={name:"htmlTag",lookup(t){let{htmlTag:e}=t;let i;const s=e||(typeof document!=="undefined"?document.documentElement:null);if(s&&typeof s.getAttribute==="function"){i=s.getAttribute("lang")}return i}};var Kt={name:"path",lookup(t){let{lookupFromPathIndex:e}=t;if(typeof window==="undefined")return undefined;const i=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(!Array.isArray(i))return undefined;const s=typeof e==="number"?e:0;return i[s]?.replace("/","")}};var Ht={name:"subdomain",lookup(t){let{lookupFromSubdomainIndex:e}=t;const i=typeof e==="number"?e+1:1;const s=typeof window!=="undefined"&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(!s)return undefined;return s[i]}};let Ut=false;try{Ut=true}catch(t){}const _t=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];if(!Ut)_t.splice(1,1);const Yt=()=>({order:_t,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:t=>t});class Jt{constructor(t){let e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};this.type="languageDetector";this.detectors={};this.init(t,e)}init(){let t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{languageUtils:{}};let e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};let i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};this.services=t;this.options=jt(e,this.options||{},Yt());if(typeof this.options.convertDetectedLanguage==="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1){this.options.convertDetectedLanguage=t=>t.replace("-","_")}if(this.options.lookupFromUrlIndex)this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex;this.i18nOptions=i;this.addDetector(Pt);this.addDetector(Lt);this.addDetector(It);this.addDetector(Vt);this.addDetector(Dt);this.addDetector(Bt);this.addDetector(Kt);this.addDetector(Ht);this.addDetector(At)}addDetector(t){this.detectors[t.name]=t;return this}detect(){let t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:this.options.order;let e=[];t.forEach((t=>{if(this.detectors[t]){let i=this.detectors[t].lookup(this.options);if(i&&typeof i==="string")i=[i];if(i)e=e.concat(i)}}));e=e.filter((t=>t!==undefined&&t!==null&&!Et(t))).map((t=>this.options.convertDetectedLanguage(t)));if(this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes)return e;return e.length>0?e[0]:null}cacheUserLanguage(t){let e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:this.options.caches;if(!e)return;if(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1)return;e.forEach((e=>{if(this.detectors[e])this.detectors[e].cacheUserLanguage(t,this.options)}))}}Jt.type="languageDetector";kt.use(Jt).init({fallbackLng:"en",debug:false,resources:{en:{translation:{}},ja:{translation:{Pay:"支払う","Failed to load Stripe":"ライブラリの読み込みに失敗しました。","Add your payment information":"支払情報を追加","Add card":"カードを追加","Add a card":"カードを追加",Add:"追加","Card information":"カード情報","Card Number":"カード番号","MM / YY":"月 / 年",CVC:"セキュリティコード(CVC)","Country or region":"地域","Postal Code":"郵便番号"}},"pt-BR":{translation:{Pay:"Pagar","Failed to load Stripe":"Falha ao ler Stripe","Add your payment information":"Informações do seu Pagamento","Add card":"Adicionar Cartão","Add a card":"Adicionar um Cartão",Add:"Adicionar","Card information":"Informações do Cartão","Card Number":"Número do Cartão","MM / YY":"MM / AA",CVC:"Número de Segurança(CVC)","Country or region":"País ou região","Postal Code":"Cep"}}}});const Wt=kt;const qt=(t,e,i)=>{const s=t.get(e);if(!s){t.set(e,[i])}else if(!s.includes(i)){s.push(i)}};const Gt=(t,e)=>{let i;return(...s)=>{if(i){clearTimeout(i)}i=setTimeout((()=>{i=0;t(...s)}),e)}};const Qt=t=>!("isConnected"in t)||t.isConnected;const Zt=Gt((t=>{for(let e of t.keys()){t.set(e,t.get(e).filter(Qt))}}),2e3);const Xt=()=>{if(typeof t!=="function"){return{}}const i=new Map;return{dispose:()=>i.clear(),get:e=>{const s=t();if(s){qt(i,e,s)}},set:t=>{const s=i.get(t);if(s){i.set(t,s.filter(e))}Zt(i)},reset:()=>{i.forEach((t=>t.forEach(e)));Zt(i)}}};const te=t=>typeof t==="function"?t():t;const ee=(t,e=(t,e)=>t!==e)=>{const i=te(t);let s=new Map(Object.entries(i??{}));const n={dispose:[],get:[],set:[],reset:[]};const r=new Map;const o=()=>{s=new Map(Object.entries(te(t)??{}));n.reset.forEach((t=>t()))};const a=()=>{n.dispose.forEach((t=>t()));o()};const h=t=>{n.get.forEach((e=>e(t)));return s.get(t)};const c=(t,i)=>{const r=s.get(t);if(e(i,r,t)){s.set(t,i);n.set.forEach((e=>e(t,i,r)))}};const u=typeof Proxy==="undefined"?{}:new Proxy(i,{get(t,e){return h(e)},ownKeys(t){return Array.from(s.keys())},getOwnPropertyDescriptor(){return{enumerable:true,configurable:true}},has(t,e){return s.has(e)},set(t,e,i){c(e,i);return true}});const f=(t,e)=>{n[t].push(e);return()=>{ie(n[t],e)}};const l=(e,i)=>{const s=(t,s)=>{if(t===e){i(s)}};const n=()=>i(te(t)[e]);const o=f("set",s);const a=f("reset",n);r.set(i,{setHandler:s,resetHandler:n,propName:e});return()=>{o();a();r.delete(i)}};const d=(...t)=>{const e=t.reduce(((t,e)=>{if(e.set){t.push(f("set",e.set))}if(e.get){t.push(f("get",e.get))}if(e.reset){t.push(f("reset",e.reset))}if(e.dispose){t.push(f("dispose",e.dispose))}return t}),[]);return()=>e.forEach((t=>t()))};const p=t=>{const e=s.get(t);n.set.forEach((i=>i(t,e,e)))};const g=(t,e)=>{const i=r.get(e);if(i&&i.propName===t){ie(n.set,i.setHandler);ie(n.reset,i.resetHandler);r.delete(e)}};return{state:u,get:h,set:c,on:f,onChange:l,use:d,dispose:a,reset:o,forceUpdate:p,removeListener:g}};const ie=(t,e)=>{const i=t.indexOf(e);if(i>=0){t[i]=t[t.length-1];t.length--}};const se=(t,e)=>{const i=ee(t,e);i.use(Xt());return i};class ne{constructor(){this.store=se({loadStripeStatus:"",applicationName:"stripe-pwa-elements",isCheckoutSession:false});this.changeListeners=new Map}get state(){return this.store.state}onChange(t,e){const i=this.store.onChange(t,e);if(!this.changeListeners.has(t)){this.changeListeners.set(t,[])}this.changeListeners.get(t).push(i);return i}async initialize(t,e){this.store.state.publishableKey=t;this.store.state.isCheckoutSession=false;if(e===null||e===void 0?void 0:e.stripeAccount){this.store.state.stripeAccount=e.stripeAccount}if(e===null||e===void 0?void 0:e.applicationName){this.store.state.applicationName=e.applicationName}if(this.store.state.stripe&&this.store.state.publishableKey===t&&this.store.state.stripeAccount===(e===null||e===void 0?void 0:e.stripeAccount)&&!this.store.state.isCheckoutSession){return}this.store.state.loadStripeStatus="loading";try{const s=await i(t,{stripeAccount:e===null||e===void 0?void 0:e.stripeAccount});s.registerAppInfo({name:this.store.state.applicationName});this.store.state.stripe=s;this.store.state.elements=s.elements();this.store.state.checkout=undefined;this.store.state.loadStripeStatus="success"}catch(t){console.error("Failed to load Stripe.js:",t);this.store.state.loadStripeStatus="failure"}}async initializeWithCheckoutSession(t,e,s){this.store.state.publishableKey=t;this.store.state.isCheckoutSession=true;if(s===null||s===void 0?void 0:s.stripeAccount){this.store.state.stripeAccount=s.stripeAccount}if(s===null||s===void 0?void 0:s.applicationName){this.store.state.applicationName=s.applicationName}this.store.state.loadStripeStatus="loading";try{const n=await i(t,{stripeAccount:s===null||s===void 0?void 0:s.stripeAccount});n.registerAppInfo({name:this.store.state.applicationName});this.store.state.stripe=n;const r=n.initCheckout({clientSecret:e,elementsOptions:s===null||s===void 0?void 0:s.elementsOptions});this.store.state.checkout=r;this.store.state.elements=undefined;this.store.state.loadStripeStatus="success"}catch(t){console.error("Failed to initialize Stripe Checkout:",t);this.store.state.loadStripeStatus="failure"}}getStripe(){return this.store.state.stripe}getElements(){return this.store.state.elements}getCheckout(){return this.store.state.checkout}reset(){this.store.reset()}dispose(){this.changeListeners.forEach((t=>{t.forEach((t=>t()))}));this.changeListeners.clear();this.store.dispose()}}new ne;function re(t,e,i=5e3){return new Promise(((s,n)=>{const r=t.querySelector(e);if(r){return s(r)}const o=setTimeout((()=>{a.disconnect();n(new Error(`Element "${e}" not found within ${i}ms`))}),i);const a=new MutationObserver((()=>{const i=t.querySelector(e);if(i){clearTimeout(o);a.disconnect();s(i)}}));a.observe(t,{childList:true,subtree:true})}))}class oe{constructor(t){this.stripeService=t;this.store=se({errorMessage:"",errorSource:undefined})}getState(){return this.store.state}async initialize(t){const e=this.stripeService.getElements();if(!e){throw new Error("StripeService not initialized. Call StripeService.initialize() first.")}if(this.cardElements){this.unmount()}const i=e.create("cardNumber",{placeholder:Wt.t("Card Number")});const s=await re(t,"#card-number");i.mount(s);i.on("change",this.handleCardError("cardNumber"));const n=e.create("cardExpiry");const r=await re(t,"#card-expiry");n.mount(r);n.on("change",this.handleCardError("cardExpiry"));const o=e.create("cardCvc");const a=await re(t,"#card-cvc");o.mount(a);o.on("change",this.handleCardError("cardCvc"));this.cardElements={cardNumber:i,cardExpiry:n,cardCVC:o};return this.cardElements}getElements(){return this.cardElements}setError(t){this.store.set("errorMessage",t)}clearError(){this.store.set("errorMessage","");this.store.set("errorSource",undefined)}unmount(){var t,e,i;if(!this.cardElements){return}(t=this.cardElements.cardNumber)===null||t===void 0?void 0:t.unmount();(e=this.cardElements.cardExpiry)===null||e===void 0?void 0:e.unmount();(i=this.cardElements.cardCVC)===null||i===void 0?void 0:i.unmount();this.cardElements=undefined}handleCardError(t){return({error:e})=>{if(e){this.store.set("errorMessage",e.message);this.store.set("errorSource",t);return}if(this.store.state.errorSource===t){this.store.set("errorMessage","");this.store.set("errorSource",undefined)}}}}class ae{constructor(t){this.stripeService=t;this.store=se({errorMessage:""})}getState(){return this.store.state}async initialize(t,e){const i=this.stripeService.state.isCheckoutSession;if(this.paymentElement){this.unmount()}if(i){const t=this.stripeService.getCheckout();if(!t){throw new Error("StripeService not initialized with Checkout Session. Call StripeService.initializeWithCheckoutSession() first.")}this.paymentElement=t.createPaymentElement(e)}else{const t=this.stripeService.getElements();if(!t){throw new Error("StripeService not initialized. Call StripeService.initialize() first.")}const i=e||{};this.paymentElement=t.create("payment",i)}const s=await re(t,"#payment-element");this.paymentElement.mount(s);return this.paymentElement}getElement(){return this.paymentElement}setError(t){this.store.set("errorMessage",t)}clearError(){this.store.set("errorMessage","")}unmount(){if(!this.paymentElement){return}this.paymentElement.unmount();this.paymentElement=undefined}}class he{constructor(t){this.stripeService=t;this.store=se({errorMessage:"",isComplete:false})}getState(){return this.store.state}async initialize(t,e){const i=this.stripeService.getElements();if(!i){throw new Error("StripeService not initialized. Call StripeService.initialize() first.")}if(this.addressElement){this.unmount()}this.addressElement=i.create("address",e||{mode:"billing"});const s=await re(t,"#address-element");this.addressElement.mount(s);this.addressElement.on("change",(t=>{this.store.set("errorMessage","");this.store.set("isComplete",t.complete)}));return this.addressElement}getElement(){return this.addressElement}setError(t){this.store.set("errorMessage",t)}clearError(){this.store.set("errorMessage","")}unmount(){if(!this.addressElement){return}this.addressElement.unmount();this.addressElement=undefined}}class ce{constructor(t){this.stripeService=t;this.store=se({errorMessage:"",email:undefined})}getState(){return this.store.state}onChange(t,e){return this.store.onChange(t,e)}async initialize(t,e){const i=this.stripeService.getElements();if(!i){throw new Error("StripeService not initialized. Call StripeService.initialize() first.")}if(this.linkAuthenticationElement){this.unmount()}const s=i.create("linkAuthentication",e);const n=await re(t,"#link-authentication-element");s.mount(n);s.on("change",(t=>{var e;this.store.set("email",(e=t.value)===null||e===void 0?void 0:e.email)}));this.linkAuthenticationElement=s;return this.linkAuthenticationElement}getElement(){return this.linkAuthenticationElement}setError(t){this.store.set("errorMessage",t)}clearError(){this.store.set("errorMessage","")}unmount(){if(!this.linkAuthenticationElement){return}this.linkAuthenticationElement.unmount();this.linkAuthenticationElement=undefined}}class ue{constructor(t){this.stripeService=t;this.store=se({errorMessage:"",selectedCurrency:undefined})}getState(){return this.store.state}async initialize(t,e){const i=this.stripeService.getElements();if(!i){throw new Error("StripeService not initialized. Call StripeService.initialize() first.")}if(this.currencySelectorElement){this.unmount()}const s=await re(t,"#currency-selector");this.currencySelectorElement=i.create("currencySelector",e||{});this.currencySelectorElement.mount(s);this.currencySelectorElement.on("change",(t=>{var e;this.store.set("errorMessage","");if((e=t===null||t===void 0?void 0:t.value)===null||e===void 0?void 0:e.currency){this.store.set("selectedCurrency",t.value.currency)}}));return this.currencySelectorElement}getElement(){return this.currencySelectorElement}setError(t){this.store.set("errorMessage",t)}clearError(){this.store.set("errorMessage","")}unmount(){if(!this.currencySelectorElement){return}this.currencySelectorElement.unmount();this.currencySelectorElement=undefined}}class fe{constructor(t){this.stripeService=t;this.store=se({errorMessage:"",isReady:false})}getState(){return this.store.state}async initialize(t,e,i){const s=this.stripeService.getElements();if(!s){throw new Error("StripeService not initialized. Call StripeService.initialize() first.")}if(this.expressCheckoutElement){this.unmount()}const n=Object.assign({},e);if(n.buttonHeight&&typeof n.buttonHeight==="string"){const t=parseInt(n.buttonHeight.replace("px",""),10);if(!isNaN(t)){n.buttonHeight=t}}const r=s.create("expressCheckout",n);const o=await re(t,"#express-checkout-element");if(i===null||i===void 0?void 0:i.onConfirm){r.on("confirm",i.onConfirm)}if(i===null||i===void 0?void 0:i.onClick){r.on("click",i.onClick)}if(i===null||i===void 0?void 0:i.onCancel){r.on("cancel",i.onCancel)}if(i===null||i===void 0?void 0:i.onShippingAddressChange){r.on("shippingaddresschange",i.onShippingAddressChange)}if(i===null||i===void 0?void 0:i.onShippingRateChange){r.on("shippingratechange",i.onShippingRateChange)}r.on("ready",(()=>{this.store.set("isReady",true)}));r.mount(o);this.expressCheckoutElement=r;return this.expressCheckoutElement}getElement(){return this.expressCheckoutElement}update(t){if(!this.expressCheckoutElement){console.warn("Express Checkout Element not initialized. Cannot update options.");return}const e=Object.assign({},t);if(e.buttonHeight&&typeof e.buttonHeight==="string"){const t=parseInt(e.buttonHeight.replace("px",""),10);if(!isNaN(t)){e.buttonHeight=t}}this.expressCheckoutElement.update(e)}setError(t){this.store.set("errorMessage",t)}clearError(){this.store.set("errorMessage","")}unmount(){if(!this.expressCheckoutElement){return}this.expressCheckoutElement.unmount();this.expressCheckoutElement=undefined;this.store.set("isReady",false)}}class le{createStripeService(){return new ne}createCardElementManager(t){return new oe(t)}createPaymentElementManager(t){return new ae(t)}createAddressElementManager(t){return new he(t)}createLinkAuthenticationElementManager(t){return new ce(t)}createCurrencySelectorElementManager(t){return new ue(t)}createExpressCheckoutElementManager(t){return new fe(t)}}const de=new le;export{x as c,Wt as i,de as s};
2
- //# sourceMappingURL=p-WnA32N4v.js.map