@verbb/formie-browser 1.0.1 → 1.0.3

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 (361) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/chunks/address-finder-BjMuEiwF.js +37 -0
  3. package/dist/chunks/bpoint-KudsBCo2.js +26 -0
  4. package/dist/chunks/calculations-DlGSkQ3W.js +147 -0
  5. package/dist/chunks/captcha-eu-CterYFok.js +34 -0
  6. package/dist/chunks/checkbox-radio-CBvgk3hR.js +136 -0
  7. package/dist/chunks/conditions-DYy1-Hwt.js +459 -0
  8. package/dist/chunks/date-picker-BlD--zfe.js +4994 -0
  9. package/dist/chunks/eway-qwc-B5Us.js +74 -0
  10. package/dist/chunks/file-upload-CIgHrXfp.js +316 -0
  11. package/dist/chunks/friendly-captcha-v1-EDFac33c.js +33 -0
  12. package/dist/chunks/friendly-captcha-v2-BDpSvFGR.js +38 -0
  13. package/dist/chunks/go-cardless-DuDMVsnz.js +24 -0
  14. package/dist/chunks/google-address-Bmjp01pH.js +181 -0
  15. package/dist/chunks/hcaptcha-BTQ6An6g.js +56 -0
  16. package/dist/chunks/hidden-DbPdOxKb.js +31 -0
  17. package/dist/chunks/index-BEsfee-D.js +1839 -0
  18. package/dist/chunks/index-BP7Unm5Y.js +863 -0
  19. package/dist/chunks/index-BcqwpPNE.js +4314 -0
  20. package/dist/chunks/loqate-BdNGv93o.js +55 -0
  21. package/dist/chunks/mollie-DFOjTuGX.js +24 -0
  22. package/dist/chunks/moneris-BbFfl-EL.js +101 -0
  23. package/dist/chunks/opayo-CmgYa9ya.js +122 -0
  24. package/dist/chunks/paddle-BUi7w1_o.js +60 -0
  25. package/dist/chunks/paypal-A-ePfh6k.js +100 -0
  26. package/dist/chunks/payway-BqFCbhyo.js +56 -0
  27. package/dist/chunks/phone-country-DPMiqk4L.js +3765 -0
  28. package/dist/chunks/place-kit-CX7tamAg.js +42 -0
  29. package/dist/chunks/placekit-autocomplete.esm-LAwfbPZl.js +1299 -0
  30. package/dist/chunks/recaptcha-enterprise-DxF6cW95.js +71 -0
  31. package/dist/chunks/recaptcha-shared-DhGcbiaq.js +15 -0
  32. package/dist/chunks/recaptcha-v2-checkbox-R9EfbZ4k.js +41 -0
  33. package/dist/chunks/recaptcha-v2-invisible-DV9hswAp.js +59 -0
  34. package/dist/chunks/recaptcha-v3-V0xc-Edh.js +28 -0
  35. package/dist/chunks/repeater-DKUT6TGI.js +124 -0
  36. package/dist/chunks/rich-text-SH7KiaKH.js +304 -0
  37. package/dist/chunks/scripts-D9N2d5rN.js +36 -0
  38. package/dist/chunks/sdk-3SicTWby.js +1559 -0
  39. package/dist/chunks/shared-BmntPmnW.js +80 -0
  40. package/dist/chunks/signature-BA3tQsGT.js +550 -0
  41. package/dist/chunks/snaptcha-DV7p6J9k.js +8 -0
  42. package/dist/chunks/square-Bs-ndqYK.js +46 -0
  43. package/dist/chunks/stripe-DkZAHxtn.js +202 -0
  44. package/dist/chunks/styles-C3aqgtek.js +21 -0
  45. package/dist/chunks/summary-Dq2i9TQk.js +126 -0
  46. package/dist/chunks/table-Cu4WfVcw.js +95 -0
  47. package/dist/chunks/text-limit-2ycmB-Ae.js +135 -0
  48. package/dist/chunks/turnstile-CId90tRr.js +59 -0
  49. package/dist/chunks/utils-BntI3W4S.js +6149 -0
  50. package/dist/css/theme/forms/_form.css +28 -0
  51. package/dist/index.d.ts +30 -0
  52. package/dist/index.d.ts.map +1 -0
  53. package/dist/index.js +39 -3205
  54. package/dist/js/compatibility/dom-adapter.d.ts +12 -0
  55. package/dist/js/compatibility/dom-adapter.d.ts.map +1 -0
  56. package/dist/js/compatibility/event-map.d.ts +25 -0
  57. package/dist/js/compatibility/event-map.d.ts.map +1 -0
  58. package/dist/js/compatibility/validator-adapter.d.ts +17 -0
  59. package/dist/js/compatibility/validator-adapter.d.ts.map +1 -0
  60. package/dist/js/contracts/client.d.ts +40 -0
  61. package/dist/js/contracts/client.d.ts.map +1 -0
  62. package/dist/js/contracts/common.d.ts +5 -0
  63. package/dist/js/contracts/common.d.ts.map +1 -0
  64. package/dist/js/contracts/modules.d.ts +47 -0
  65. package/dist/js/contracts/modules.d.ts.map +1 -0
  66. package/dist/js/contracts/schema.d.ts +79 -0
  67. package/dist/js/contracts/schema.d.ts.map +1 -0
  68. package/dist/js/contracts/theme.d.ts +2 -0
  69. package/dist/js/contracts/theme.d.ts.map +1 -0
  70. package/dist/js/core/create-formie-client.d.ts +3 -0
  71. package/dist/js/core/create-formie-client.d.ts.map +1 -0
  72. package/dist/js/core/dom-events.d.ts +2 -0
  73. package/dist/js/core/dom-events.d.ts.map +1 -0
  74. package/dist/js/core/formie.d.ts +27 -0
  75. package/dist/js/core/formie.d.ts.map +1 -0
  76. package/dist/js/core/hydrate-modules.d.ts +22 -0
  77. package/dist/js/core/hydrate-modules.d.ts.map +1 -0
  78. package/dist/js/core/page-client-event.d.ts +9 -0
  79. package/dist/js/core/page-client-event.d.ts.map +1 -0
  80. package/dist/js/core/page-tab-errors.d.ts +2 -0
  81. package/dist/js/core/page-tab-errors.d.ts.map +1 -0
  82. package/dist/js/core/submit-flow.d.ts +21 -0
  83. package/dist/js/core/submit-flow.d.ts.map +1 -0
  84. package/dist/js/core/submit-result-state.d.ts +8 -0
  85. package/dist/js/core/submit-result-state.d.ts.map +1 -0
  86. package/dist/js/core/submit-result-ui.d.ts +10 -0
  87. package/dist/js/core/submit-result-ui.d.ts.map +1 -0
  88. package/dist/js/events/event-bus.d.ts +21 -0
  89. package/dist/js/events/event-bus.d.ts.map +1 -0
  90. package/dist/js/modules/address/address-finder.d.ts +2 -0
  91. package/dist/js/modules/address/address-finder.d.ts.map +1 -0
  92. package/dist/js/modules/address/api.d.ts +8 -0
  93. package/dist/js/modules/address/api.d.ts.map +1 -0
  94. package/dist/js/modules/address/constants.d.ts +15 -0
  95. package/dist/js/modules/address/constants.d.ts.map +1 -0
  96. package/dist/js/modules/address/factories.d.ts +35 -0
  97. package/dist/js/modules/address/factories.d.ts.map +1 -0
  98. package/dist/js/modules/address/google-address.d.ts +9 -0
  99. package/dist/js/modules/address/google-address.d.ts.map +1 -0
  100. package/dist/js/modules/address/host.d.ts +30 -0
  101. package/dist/js/modules/address/host.d.ts.map +1 -0
  102. package/dist/js/modules/address/index.d.ts +3 -0
  103. package/dist/js/modules/address/index.d.ts.map +1 -0
  104. package/dist/js/modules/address/loqate.d.ts +2 -0
  105. package/dist/js/modules/address/loqate.d.ts.map +1 -0
  106. package/dist/js/modules/address/place-kit.d.ts +2 -0
  107. package/dist/js/modules/address/place-kit.d.ts.map +1 -0
  108. package/dist/js/modules/captchas/api.d.ts +9 -0
  109. package/dist/js/modules/captchas/api.d.ts.map +1 -0
  110. package/dist/js/modules/captchas/captcha-eu.d.ts +2 -0
  111. package/dist/js/modules/captchas/captcha-eu.d.ts.map +1 -0
  112. package/dist/js/modules/captchas/constants.d.ts +5 -0
  113. package/dist/js/modules/captchas/constants.d.ts.map +1 -0
  114. package/dist/js/modules/captchas/factories.d.ts +63 -0
  115. package/dist/js/modules/captchas/factories.d.ts.map +1 -0
  116. package/dist/js/modules/captchas/friendly-captcha-v1.d.ts +2 -0
  117. package/dist/js/modules/captchas/friendly-captcha-v1.d.ts.map +1 -0
  118. package/dist/js/modules/captchas/friendly-captcha-v2.d.ts +2 -0
  119. package/dist/js/modules/captchas/friendly-captcha-v2.d.ts.map +1 -0
  120. package/dist/js/modules/captchas/hcaptcha.d.ts +2 -0
  121. package/dist/js/modules/captchas/hcaptcha.d.ts.map +1 -0
  122. package/dist/js/modules/captchas/host.d.ts +78 -0
  123. package/dist/js/modules/captchas/host.d.ts.map +1 -0
  124. package/dist/js/modules/captchas/index.d.ts +3 -0
  125. package/dist/js/modules/captchas/index.d.ts.map +1 -0
  126. package/dist/js/modules/captchas/recaptcha-enterprise.d.ts +2 -0
  127. package/dist/js/modules/captchas/recaptcha-enterprise.d.ts.map +1 -0
  128. package/dist/js/modules/captchas/recaptcha-shared.d.ts +26 -0
  129. package/dist/js/modules/captchas/recaptcha-shared.d.ts.map +1 -0
  130. package/dist/js/modules/captchas/recaptcha-v2-checkbox.d.ts +2 -0
  131. package/dist/js/modules/captchas/recaptcha-v2-checkbox.d.ts.map +1 -0
  132. package/dist/js/modules/captchas/recaptcha-v2-invisible.d.ts +2 -0
  133. package/dist/js/modules/captchas/recaptcha-v2-invisible.d.ts.map +1 -0
  134. package/dist/js/modules/captchas/recaptcha-v3.d.ts +2 -0
  135. package/dist/js/modules/captchas/recaptcha-v3.d.ts.map +1 -0
  136. package/dist/js/modules/captchas/snaptcha.d.ts +2 -0
  137. package/dist/js/modules/captchas/snaptcha.d.ts.map +1 -0
  138. package/dist/js/modules/captchas/turnstile.d.ts +2 -0
  139. package/dist/js/modules/captchas/turnstile.d.ts.map +1 -0
  140. package/dist/js/modules/captchas/utils.d.ts +13 -0
  141. package/dist/js/modules/captchas/utils.d.ts.map +1 -0
  142. package/dist/js/modules/fields/calculations.d.ts +3 -0
  143. package/dist/js/modules/fields/calculations.d.ts.map +1 -0
  144. package/dist/js/modules/fields/checkbox-radio.d.ts +3 -0
  145. package/dist/js/modules/fields/checkbox-radio.d.ts.map +1 -0
  146. package/dist/js/modules/fields/conditions/config.d.ts +5 -0
  147. package/dist/js/modules/fields/conditions/config.d.ts.map +1 -0
  148. package/dist/js/modules/fields/conditions/effects.d.ts +4 -0
  149. package/dist/js/modules/fields/conditions/effects.d.ts.map +1 -0
  150. package/dist/js/modules/fields/conditions/evaluator.d.ts +6 -0
  151. package/dist/js/modules/fields/conditions/evaluator.d.ts.map +1 -0
  152. package/dist/js/modules/fields/conditions/references.d.ts +5 -0
  153. package/dist/js/modules/fields/conditions/references.d.ts.map +1 -0
  154. package/dist/js/modules/fields/conditions/transforms.d.ts +3 -0
  155. package/dist/js/modules/fields/conditions/transforms.d.ts.map +1 -0
  156. package/dist/js/modules/fields/conditions/types.d.ts +30 -0
  157. package/dist/js/modules/fields/conditions/types.d.ts.map +1 -0
  158. package/dist/js/modules/fields/conditions/values.d.ts +5 -0
  159. package/dist/js/modules/fields/conditions/values.d.ts.map +1 -0
  160. package/dist/js/modules/fields/conditions.d.ts +3 -0
  161. package/dist/js/modules/fields/conditions.d.ts.map +1 -0
  162. package/dist/js/modules/fields/date-picker.d.ts +3 -0
  163. package/dist/js/modules/fields/date-picker.d.ts.map +1 -0
  164. package/dist/js/modules/fields/file-upload.d.ts +3 -0
  165. package/dist/js/modules/fields/file-upload.d.ts.map +1 -0
  166. package/dist/js/modules/fields/hidden.d.ts +3 -0
  167. package/dist/js/modules/fields/hidden.d.ts.map +1 -0
  168. package/dist/js/modules/fields/index.d.ts +3 -0
  169. package/dist/js/modules/fields/index.d.ts.map +1 -0
  170. package/dist/js/modules/fields/phone-country.d.ts +3 -0
  171. package/dist/js/modules/fields/phone-country.d.ts.map +1 -0
  172. package/dist/js/modules/fields/repeater.d.ts +3 -0
  173. package/dist/js/modules/fields/repeater.d.ts.map +1 -0
  174. package/dist/js/modules/fields/rich-text.d.ts +3 -0
  175. package/dist/js/modules/fields/rich-text.d.ts.map +1 -0
  176. package/dist/js/modules/fields/shared.d.ts +20 -0
  177. package/dist/js/modules/fields/shared.d.ts.map +1 -0
  178. package/dist/js/modules/fields/signature.d.ts +3 -0
  179. package/dist/js/modules/fields/signature.d.ts.map +1 -0
  180. package/dist/js/modules/fields/summary.d.ts +3 -0
  181. package/dist/js/modules/fields/summary.d.ts.map +1 -0
  182. package/dist/js/modules/fields/table.d.ts +3 -0
  183. package/dist/js/modules/fields/table.d.ts.map +1 -0
  184. package/dist/js/modules/fields/text-limit.d.ts +3 -0
  185. package/dist/js/modules/fields/text-limit.d.ts.map +1 -0
  186. package/dist/js/modules/loader.d.ts +11 -0
  187. package/dist/js/modules/loader.d.ts.map +1 -0
  188. package/dist/js/modules/payments/api.d.ts +8 -0
  189. package/dist/js/modules/payments/api.d.ts.map +1 -0
  190. package/dist/js/modules/payments/bpoint.d.ts +2 -0
  191. package/dist/js/modules/payments/bpoint.d.ts.map +1 -0
  192. package/dist/js/modules/payments/constants.d.ts +5 -0
  193. package/dist/js/modules/payments/constants.d.ts.map +1 -0
  194. package/dist/js/modules/payments/eway.d.ts +9 -0
  195. package/dist/js/modules/payments/eway.d.ts.map +1 -0
  196. package/dist/js/modules/payments/factories.d.ts +54 -0
  197. package/dist/js/modules/payments/factories.d.ts.map +1 -0
  198. package/dist/js/modules/payments/go-cardless.d.ts +2 -0
  199. package/dist/js/modules/payments/go-cardless.d.ts.map +1 -0
  200. package/dist/js/modules/payments/host.d.ts +70 -0
  201. package/dist/js/modules/payments/host.d.ts.map +1 -0
  202. package/dist/js/modules/payments/index.d.ts +3 -0
  203. package/dist/js/modules/payments/index.d.ts.map +1 -0
  204. package/dist/js/modules/payments/mollie.d.ts +2 -0
  205. package/dist/js/modules/payments/mollie.d.ts.map +1 -0
  206. package/dist/js/modules/payments/moneris.d.ts +2 -0
  207. package/dist/js/modules/payments/moneris.d.ts.map +1 -0
  208. package/dist/js/modules/payments/opayo.d.ts +25 -0
  209. package/dist/js/modules/payments/opayo.d.ts.map +1 -0
  210. package/dist/js/modules/payments/paddle.d.ts +2 -0
  211. package/dist/js/modules/payments/paddle.d.ts.map +1 -0
  212. package/dist/js/modules/payments/paypal.d.ts +2 -0
  213. package/dist/js/modules/payments/paypal.d.ts.map +1 -0
  214. package/dist/js/modules/payments/payway.d.ts +2 -0
  215. package/dist/js/modules/payments/payway.d.ts.map +1 -0
  216. package/dist/js/modules/payments/square.d.ts +2 -0
  217. package/dist/js/modules/payments/square.d.ts.map +1 -0
  218. package/dist/js/modules/payments/stripe.d.ts +2 -0
  219. package/dist/js/modules/payments/stripe.d.ts.map +1 -0
  220. package/dist/js/modules/payments/utils.d.ts +17 -0
  221. package/dist/js/modules/payments/utils.d.ts.map +1 -0
  222. package/dist/js/modules/registry.d.ts +9 -0
  223. package/dist/js/modules/registry.d.ts.map +1 -0
  224. package/dist/js/modules/styles.d.ts +2 -0
  225. package/dist/js/modules/styles.d.ts.map +1 -0
  226. package/dist/js/submit/pipeline.d.ts +18 -0
  227. package/dist/js/submit/pipeline.d.ts.map +1 -0
  228. package/dist/js/theme/theme-classes.d.ts +10 -0
  229. package/dist/js/theme/theme-classes.d.ts.map +1 -0
  230. package/dist/js/transport/forms-api.d.ts +11 -0
  231. package/dist/js/transport/forms-api.d.ts.map +1 -0
  232. package/dist/js/utils/async.d.ts +8 -0
  233. package/dist/js/utils/async.d.ts.map +1 -0
  234. package/dist/js/utils/debug.d.ts +10 -0
  235. package/dist/js/utils/debug.d.ts.map +1 -0
  236. package/dist/js/utils/event-names.d.ts +13 -0
  237. package/dist/js/utils/event-names.d.ts.map +1 -0
  238. package/dist/js/utils/field-references.d.ts +6 -0
  239. package/dist/js/utils/field-references.d.ts.map +1 -0
  240. package/dist/js/utils/field-references.keys.d.ts +4 -0
  241. package/dist/js/utils/field-references.keys.d.ts.map +1 -0
  242. package/dist/js/utils/field-references.parser.d.ts +3 -0
  243. package/dist/js/utils/field-references.parser.d.ts.map +1 -0
  244. package/dist/js/utils/field-references.registry.d.ts +3 -0
  245. package/dist/js/utils/field-references.registry.d.ts.map +1 -0
  246. package/dist/js/utils/field-references.resolver.d.ts +4 -0
  247. package/dist/js/utils/field-references.resolver.d.ts.map +1 -0
  248. package/dist/js/utils/field-references.types.d.ts +27 -0
  249. package/dist/js/utils/field-references.types.d.ts.map +1 -0
  250. package/dist/js/utils/fields.d.ts +5 -0
  251. package/dist/js/utils/fields.d.ts.map +1 -0
  252. package/dist/js/utils/http.d.ts +9 -0
  253. package/dist/js/utils/http.d.ts.map +1 -0
  254. package/dist/js/utils/i18n.d.ts +7 -0
  255. package/dist/js/utils/i18n.d.ts.map +1 -0
  256. package/dist/js/utils/scripts.d.ts +13 -0
  257. package/dist/js/utils/scripts.d.ts.map +1 -0
  258. package/dist/js/utils/unload-warning.d.ts +10 -0
  259. package/dist/js/utils/unload-warning.d.ts.map +1 -0
  260. package/dist/js/validation/rules/email.d.ts +4 -0
  261. package/dist/js/validation/rules/email.d.ts.map +1 -0
  262. package/dist/js/validation/rules/match.d.ts +4 -0
  263. package/dist/js/validation/rules/match.d.ts.map +1 -0
  264. package/dist/js/validation/rules/number.d.ts +4 -0
  265. package/dist/js/validation/rules/number.d.ts.map +1 -0
  266. package/dist/js/validation/rules/required.d.ts +4 -0
  267. package/dist/js/validation/rules/required.d.ts.map +1 -0
  268. package/dist/js/validation/rules/shared.d.ts +7 -0
  269. package/dist/js/validation/rules/shared.d.ts.map +1 -0
  270. package/dist/js/validation/rules/url.d.ts +4 -0
  271. package/dist/js/validation/rules/url.d.ts.map +1 -0
  272. package/dist/js/validation/rules.d.ts +10 -0
  273. package/dist/js/validation/rules.d.ts.map +1 -0
  274. package/dist/js/validation/scope.d.ts +6 -0
  275. package/dist/js/validation/scope.d.ts.map +1 -0
  276. package/dist/js/validation/submit-readiness.d.ts +4 -0
  277. package/dist/js/validation/submit-readiness.d.ts.map +1 -0
  278. package/dist/js/validation/types.d.ts +44 -0
  279. package/dist/js/validation/types.d.ts.map +1 -0
  280. package/dist/js/validation/validator.d.ts +54 -0
  281. package/dist/js/validation/validator.d.ts.map +1 -0
  282. package/package.json +3 -2
  283. package/src/css/theme/forms/_form.css +28 -0
  284. package/src/js/core/create-formie-client.ts +6 -0
  285. package/src/js/core/submit-result-state.ts +17 -0
  286. package/src/js/modules/address/google-address.ts +33 -1
  287. package/src/js/modules/fields/conditions/effects.ts +79 -2
  288. package/src/js/modules/fields/conditions.ts +53 -11
  289. package/src/js/modules/fields/file-upload.ts +189 -97
  290. package/src/js/modules/fields/repeater.ts +1 -1
  291. package/src/js/modules/fields/rich-text.ts +2 -2
  292. package/src/js/modules/fields/signature.ts +1 -1
  293. package/src/js/modules/fields/summary.ts +1 -1
  294. package/src/js/modules/fields/table.ts +1 -1
  295. package/src/js/modules/fields/text-limit.ts +1 -1
  296. package/src/js/modules/payments/paypal.ts +1 -1
  297. package/src/js/modules/payments/payway.ts +1 -1
  298. package/src/js/modules/payments/stripe.ts +1 -1
  299. package/src/js/submit/pipeline.ts +3 -28
  300. package/src/js/validation/scope.ts +25 -0
  301. package/src/js/validation/submit-readiness.ts +157 -0
  302. package/src/js/validation/validator.ts +4 -0
  303. package/dist/chunks/address-finder-DfMCiW89.js +0 -47
  304. package/dist/chunks/api-CbqEMQT5.js +0 -181
  305. package/dist/chunks/api-DE7LfK-R.js +0 -960
  306. package/dist/chunks/api-DOfDzYC_.js +0 -538
  307. package/dist/chunks/async-B3DUf1GZ.js +0 -26
  308. package/dist/chunks/bpoint-Ciy3yY9Q.js +0 -34
  309. package/dist/chunks/calculations-CkYAqO_-.js +0 -197
  310. package/dist/chunks/captcha-eu-DnOWhMwr.js +0 -43
  311. package/dist/chunks/checkbox-radio-0x7Tc0br.js +0 -197
  312. package/dist/chunks/chunk-K6L4z4UQ.js +0 -24
  313. package/dist/chunks/conditions-4fXKhEJS.js +0 -609
  314. package/dist/chunks/date-picker-B6iZkjHS.js +0 -6204
  315. package/dist/chunks/debug-KnZeKYBI.js +0 -39
  316. package/dist/chunks/dist-D09GnXMW.js +0 -2663
  317. package/dist/chunks/event-names-DamGPtXR.js +0 -51
  318. package/dist/chunks/eway-DEAYcwT0.js +0 -86
  319. package/dist/chunks/field-references.keys-BpBZ_quS.js +0 -24
  320. package/dist/chunks/field-references.resolver-Ba6xhiJC.js +0 -183
  321. package/dist/chunks/file-upload-BIj85NFH.js +0 -428
  322. package/dist/chunks/friendly-captcha-v1-CqO4WVre.js +0 -40
  323. package/dist/chunks/friendly-captcha-v2-CyykcJcM.js +0 -47
  324. package/dist/chunks/friendly-challenge-Dg8XkStd.js +0 -1101
  325. package/dist/chunks/go-cardless-CuND59rR.js +0 -26
  326. package/dist/chunks/google-address--uR8WDSm.js +0 -208
  327. package/dist/chunks/hcaptcha-CmaFUesv.js +0 -72
  328. package/dist/chunks/hidden-CYnZYple.js +0 -36
  329. package/dist/chunks/http-18nn97DZ.js +0 -29
  330. package/dist/chunks/i18n-vUh-KGiH.js +0 -55
  331. package/dist/chunks/loqate-BICNJlVK.js +0 -97
  332. package/dist/chunks/mollie-DwlsgHZ1.js +0 -26
  333. package/dist/chunks/moneris-B_IFZFTx.js +0 -159
  334. package/dist/chunks/opayo-U2x_TOII.js +0 -192
  335. package/dist/chunks/paddle-BqXFrc79.js +0 -75
  336. package/dist/chunks/paypal-VowQ3ilP.js +0 -121
  337. package/dist/chunks/payway-VOO-ajyg.js +0 -75
  338. package/dist/chunks/phone-country-B6Me4lK0.js +0 -3317
  339. package/dist/chunks/place-kit-ldUl-u9w.js +0 -56
  340. package/dist/chunks/placekit-autocomplete.esm-D-lGeaZl.js +0 -1771
  341. package/dist/chunks/recaptcha-enterprise-DPJNyv1X.js +0 -72
  342. package/dist/chunks/recaptcha-shared-DTI4qWVR.js +0 -22
  343. package/dist/chunks/recaptcha-v2-checkbox-zFjpvJ5c.js +0 -49
  344. package/dist/chunks/recaptcha-v2-invisible-CnYtkNvz.js +0 -62
  345. package/dist/chunks/recaptcha-v3-EAlWhnkX.js +0 -33
  346. package/dist/chunks/repeater-BPm7Mkyn.js +0 -149
  347. package/dist/chunks/rich-text-CHSly1Hq.js +0 -438
  348. package/dist/chunks/scripts-BGD_iU_6.js +0 -41
  349. package/dist/chunks/sdk-B7u9fTlP.js +0 -2103
  350. package/dist/chunks/shared-DC6_1u8X.js +0 -85
  351. package/dist/chunks/signature-DNMCgrMd.js +0 -763
  352. package/dist/chunks/snaptcha-CCDunGeb.js +0 -8
  353. package/dist/chunks/square-BLqK51rS.js +0 -61
  354. package/dist/chunks/stripe-B6ZcDQdx.js +0 -273
  355. package/dist/chunks/styles-BIh6g7V_.js +0 -22
  356. package/dist/chunks/summary-BTG0uIOt.js +0 -189
  357. package/dist/chunks/table-BTYc0Qm8.js +0 -122
  358. package/dist/chunks/text-limit-CgBMu4sJ.js +0 -177
  359. package/dist/chunks/theme-classes-vSHpdCUO.js +0 -59
  360. package/dist/chunks/turnstile-DP0bdR7T.js +0 -68
  361. package/dist/chunks/utils-ByrEVYrJ.js +0 -49584
@@ -0,0 +1,74 @@
1
+ import { u as f, w } from "./index-BcqwpPNE.js";
2
+ import { l as m } from "./scripts-D9N2d5rN.js";
3
+ const s = [
4
+ {
5
+ id: "FORMIE_EWAY_SCRIPT_MIN",
6
+ src: "https://secure.ewaypayments.com/scripts/eCrypt.min.js"
7
+ },
8
+ {
9
+ id: "FORMIE_EWAY_SCRIPT",
10
+ src: "https://secure.ewaypayments.com/scripts/eCrypt.js"
11
+ }
12
+ ];
13
+ async function i() {
14
+ let t = null;
15
+ for (const r of s) {
16
+ try {
17
+ return await m("eCrypt", {
18
+ id: r.id,
19
+ src: r.src,
20
+ timeoutMs: 1e4
21
+ }), await w(() => {
22
+ const o = window.eCrypt;
23
+ return o && typeof o.encryptValue == "function" ? o : null;
24
+ }, {
25
+ timeoutMs: 1e4,
26
+ intervalMs: 50
27
+ });
28
+ } catch (e) {
29
+ t = e instanceof Error ? e : new Error("Unknown eWay script load error.");
30
+ }
31
+ s.forEach(({ id: e }) => {
32
+ document.getElementById(e)?.remove();
33
+ });
34
+ }
35
+ throw t || new Error("Eway encryption script failed to load.");
36
+ }
37
+ const C = f({
38
+ id: "eway",
39
+ defaultRequiredInputSuffixes: ["ewayTokenData"],
40
+ load: async (t) => {
41
+ const { provider: r } = t.options;
42
+ return r.cseKey?.trim() ? i() : (console.error("[formie] Missing cseKey for Eway."), null);
43
+ },
44
+ onBeforeAuthorize: async (t) => {
45
+ const { field: r, services: e, provider: o, api: y } = t, n = o.cseKey;
46
+ if (!n?.trim())
47
+ return e.addError("Missing cseKey for Eway."), !1;
48
+ let c = y;
49
+ if (!c?.encryptValue)
50
+ try {
51
+ c = await i();
52
+ } catch (a) {
53
+ return e.addError(a instanceof Error ? a.message : "Eway encryption script failed to load."), !1;
54
+ }
55
+ const d = r.querySelector('[data-eway-card="cardholder-name"]')?.value ?? "", u = r.querySelector('[data-eway-card="card-number"]')?.value ?? "", l = r.querySelector('[data-eway-card="expiry-date"]')?.value ?? "", p = r.querySelector('[data-eway-card="security-code"]')?.value ?? "";
56
+ try {
57
+ const a = {
58
+ cardholderName: d,
59
+ cardNumber: c.encryptValue(u, n),
60
+ expiryDate: l,
61
+ securityCode: c.encryptValue(p, n)
62
+ };
63
+ return e.updateInputs("ewayTokenData", JSON.stringify(a)), !0;
64
+ } catch (a) {
65
+ return e.addError(a instanceof Error ? a.message : "Failed to encrypt card details."), !1;
66
+ }
67
+ },
68
+ onAfterSubmit: async ({ services: t }) => {
69
+ t.updateInputs("ewayTokenData", "");
70
+ }
71
+ });
72
+ export {
73
+ C as ewayModule
74
+ };
@@ -0,0 +1,316 @@
1
+ import { r as K, a as O, d as x } from "./shared-BmntPmnW.js";
2
+ import { e as q } from "./styles-C3aqgtek.js";
3
+ import { k as B, l as j, m as W, o as Y } from "./index-BcqwpPNE.js";
4
+ const $ = "@layer formie-theme{.formie-file-input{padding:var(--formie-space-1);line-height:var(--formie-line-height-base);cursor:pointer}.formie-file-input::file-selector-button,.formie-file-input::-webkit-file-upload-button{appearance:none;-webkit-appearance:none;margin-inline-end:var(--formie-space-2);padding:calc(var(--formie-control-padding-y) - 1px) var(--formie-space-2);min-height:calc(var(--formie-control-height) - (var(--formie-space-1) * 2));border:var(--formie-border-width) solid var(--formie-color-border);border-radius:calc(var(--formie-radius-sm) - 1px);background:var(--formie-color-surface-subtle);color:var(--formie-color-heading);font-weight:var(--formie-font-weight-normal);font-size:var(--formie-font-size-xs);line-height:1.1;white-space:nowrap;cursor:pointer;transition:border-color .15s ease,background-color .15s ease,color .15s ease,box-shadow .15s ease}.formie-file-input:hover::file-selector-button,.formie-file-input:hover::-webkit-file-upload-button{border-color:color-mix(in srgb,var(--formie-color-border) 70%,var(--formie-color-heading) 30%);background:var(--formie-color-surface-muted)}.formie-file-input:focus{outline:0}.formie-file-input:focus-visible::file-selector-button,.formie-file-input:focus-visible::-webkit-file-upload-button{border-color:var(--formie-color-focus-ring)}.formie-field-has-error .formie-file-input::file-selector-button,.formie-field-has-error .formie-file-input::-webkit-file-upload-button{border-color:var(--formie-color-danger)}.formie-file-summary{padding:var(--formie-file-summary-padding);gap:var(--formie-gap-file-summary);border:var(--formie-border-width) solid var(--formie-color-border);border-radius:var(--formie-radius-sm)}.formie-file-summary-container{margin:0;padding-left:var(--formie-list-indent)}}", _ = 'input[type="file"][data-formie-file-input]', F = j("uploaded"), L = W("reset"), J = "data-formie-file-upload-key", G = "data-formie-file-upload-hydrate-endpoint", I = "data-formie-file-upload-anchor", Q = "data-formie-file-upload-asset-id", X = [
5
+ "fileLimit",
6
+ "fileSizeMinLimit",
7
+ "fileSizeMaxLimit"
8
+ ], w = "file-upload", E = "file-upload", T = B("repeater", "init-row"), Z = "[data-formie-field-handle]";
9
+ q(E, [$]);
10
+ function h(e) {
11
+ return !!e && typeof e == "object" && !Array.isArray(e);
12
+ }
13
+ function b(e) {
14
+ const t = Number(e);
15
+ return Number.isInteger(t) && t > 0 ? t : null;
16
+ }
17
+ function c(e) {
18
+ return typeof e == "string" ? e.trim() : "";
19
+ }
20
+ function M(e) {
21
+ return e.getAttribute("data-formie-field-handle")?.trim() || "";
22
+ }
23
+ function k(e) {
24
+ return e.name.endsWith("[]") ? e.name.slice(0, -2) : e.name;
25
+ }
26
+ function D(e) {
27
+ return `${k(e)}[]`;
28
+ }
29
+ function ee(e) {
30
+ return e.getAttribute(J)?.trim() || e.getAttribute("data-formie-input-id")?.trim() || "";
31
+ }
32
+ function C(e) {
33
+ return Array.from(e.querySelectorAll('input[type="hidden"]')).filter((t) => t instanceof HTMLInputElement);
34
+ }
35
+ function P(e, t) {
36
+ const r = D(t);
37
+ return C(e).filter((n) => n.name === r && n.value.trim() !== "");
38
+ }
39
+ function te(e, t) {
40
+ const r = k(t), n = C(e).find((s) => s.hasAttribute(I) || s.name === r && s.value === "");
41
+ if (n)
42
+ return n.setAttribute(I, "true"), n.name = r, n.value = "", n;
43
+ const i = document.createElement("input");
44
+ return i.type = "hidden", i.name = r, i.value = "", i.setAttribute(I, "true"), t.insertAdjacentElement("afterend", i), i;
45
+ }
46
+ function N(e) {
47
+ if (Array.isArray(e))
48
+ return null;
49
+ const t = b(e);
50
+ if (t)
51
+ return {
52
+ assetId: t,
53
+ filename: ""
54
+ };
55
+ if (!h(e))
56
+ return null;
57
+ const r = b(e.assetId ?? e.id ?? e.value), n = c(e.filename ?? e.title ?? e.label ?? e.name), i = c(e.url) || null;
58
+ return !r && !n ? null : {
59
+ assetId: r,
60
+ filename: n,
61
+ url: i
62
+ };
63
+ }
64
+ function v(e) {
65
+ if (!Array.isArray(e)) {
66
+ const t = N(e);
67
+ return t ? [t] : [];
68
+ }
69
+ return e.flatMap((t) => {
70
+ if (Array.isArray(t))
71
+ return v(t);
72
+ const r = N(t);
73
+ return r ? [r] : [];
74
+ });
75
+ }
76
+ function S(e) {
77
+ return e ? Array.from(e.querySelectorAll("[data-formie-file-summary-item]")).map((t) => ({
78
+ assetId: null,
79
+ filename: t.textContent?.trim() || ""
80
+ })).filter((t) => t.filename !== "") : [];
81
+ }
82
+ function H(e, t) {
83
+ return P(e, t).map((r) => ({
84
+ assetId: b(r.value),
85
+ filename: ""
86
+ })).filter((r) => r.assetId !== null);
87
+ }
88
+ function U(e, t) {
89
+ return e.length ? e.map((r, n) => ({
90
+ assetId: r.assetId,
91
+ filename: t[n]?.filename || ""
92
+ })) : t;
93
+ }
94
+ function z(e) {
95
+ return e.map((t) => t.trim().toLowerCase()).filter(Boolean);
96
+ }
97
+ function re(e, t) {
98
+ const r = z(e.map((i) => i.filename)), n = z(t);
99
+ return !r.length || !n.length ? !1 : r.every((i) => n.includes(i));
100
+ }
101
+ function ne(e) {
102
+ K(e, w, (t) => {
103
+ t.addValidator("fileLimit", ({ input: r }) => {
104
+ const n = parseInt(r.getAttribute("data-formie-file-limit") || "", 10);
105
+ return r.type !== "file" || !n || !("files" in r) || !r.files?.length ? !0 : r.files.length <= n;
106
+ }, ({ input: r, t: n }) => n("Choose up to {files} files.", {
107
+ files: r.getAttribute("data-formie-file-limit") || ""
108
+ })), t.addValidator("fileSizeMinLimit", ({ input: r }) => {
109
+ const i = parseFloat(r.getAttribute("data-formie-size-min-limit") || "") * 1e3 * 1e3;
110
+ return r.type !== "file" || !i || !("files" in r) || !r.files?.length ? !0 : Array.from(r.files).every((s) => s.size >= i);
111
+ }, ({ input: r, t: n }) => n("File must be larger than {filesize} MB.", {
112
+ filesize: r.getAttribute("data-formie-size-min-limit") || ""
113
+ })), t.addValidator("fileSizeMaxLimit", ({ input: r }) => {
114
+ const i = parseFloat(r.getAttribute("data-formie-size-max-limit") || "") * 1e3 * 1e3;
115
+ return r.type !== "file" || !i || !("files" in r) || !r.files?.length ? !0 : Array.from(r.files).every((s) => s.size <= i);
116
+ }, ({ input: r, t: n }) => n("File must be smaller than {filesize} MB.", {
117
+ filesize: r.getAttribute("data-formie-size-max-limit") || ""
118
+ }));
119
+ });
120
+ }
121
+ function ie(e) {
122
+ O(e, w, X);
123
+ }
124
+ function V(e, t) {
125
+ const r = e.querySelector("[data-formie-file-summary]");
126
+ if (r)
127
+ return r;
128
+ const n = document.createElement("div");
129
+ return n.className = "formie-file-summary", n.setAttribute("data-formie-file-summary", "true"), t.insertAdjacentElement("afterend", n), n;
130
+ }
131
+ function y(e) {
132
+ const t = e.pendingFiles.length ? e.pendingFiles : e.uploadedAssets.map((s) => s.filename || (s.assetId ? `Asset #${s.assetId}` : "")).filter(Boolean), r = e.summaryRoot || e.field.querySelector("[data-formie-file-summary]");
133
+ if (!t.length) {
134
+ r && (r.replaceChildren(), r.hidden = !0), e.summaryRoot = r;
135
+ return;
136
+ }
137
+ const n = r || V(e.field, e.input);
138
+ if (!n)
139
+ return;
140
+ n.hidden = !1, e.summaryRoot = n;
141
+ const i = document.createElement("ul");
142
+ i.className = "formie-file-summary-container", i.setAttribute("data-formie-file-summary-container", "true"), t.forEach((s) => {
143
+ const o = document.createElement("li");
144
+ o.className = "formie-file-summary-item", o.setAttribute("data-formie-file-summary-item", "true"), o.textContent = s, i.appendChild(o);
145
+ }), n.replaceChildren(i);
146
+ }
147
+ function R(e, t, r) {
148
+ let i = te(e, t);
149
+ const s = D(t);
150
+ P(e, t).forEach((o) => {
151
+ o.remove();
152
+ }), r.forEach((o) => {
153
+ if (!o.assetId)
154
+ return;
155
+ const l = document.createElement("input");
156
+ l.type = "hidden", l.name = s, l.value = String(o.assetId), l.setAttribute(Q, "true"), i.insertAdjacentElement("afterend", l), i = l;
157
+ }), t.value = "";
158
+ }
159
+ function oe(e) {
160
+ if (!e)
161
+ return "";
162
+ const t = e.querySelector('input[name="handle"]');
163
+ return t instanceof HTMLInputElement && t.value.trim() ? t.value.trim() : e.getAttribute("data-formie-handle")?.trim() || "";
164
+ }
165
+ function se(e, t, r) {
166
+ const n = t.form, i = new FormData(), s = oe(n), o = M(e);
167
+ s && i.append("handle", s), o && i.append("fieldHandle", o);
168
+ const l = n?.querySelector('input[name="submissionUid"]');
169
+ return l instanceof HTMLInputElement && l.value.trim() && i.append("submissionUid", l.value.trim()), r.forEach((a) => {
170
+ i.append("assetIds[]", String(a));
171
+ }), i;
172
+ }
173
+ async function ae(e, t, r) {
174
+ const n = r.map((a) => a.assetId).filter((a) => a !== null);
175
+ if (!n.length)
176
+ return r;
177
+ const i = t.getAttribute(G)?.trim() || "/actions/formie/file-upload/hydrate", s = await Y(i, {
178
+ method: "POST",
179
+ body: se(e, t, n)
180
+ }), o = v(s.assets);
181
+ if (!o.length)
182
+ return r;
183
+ const l = new Map(o.map((a) => [a.assetId, a]));
184
+ return r.map((a) => {
185
+ if (!a.assetId || !l.has(a.assetId))
186
+ return a;
187
+ const p = l.get(a.assetId);
188
+ return {
189
+ assetId: a.assetId,
190
+ filename: p.filename || a.filename,
191
+ url: p.url ?? a.url
192
+ };
193
+ });
194
+ }
195
+ function le(e, t) {
196
+ const r = e.detail;
197
+ if (!h(r))
198
+ return [];
199
+ const n = c(r.fieldHandle), i = c(r.inputKey), s = c(r.inputName ?? r.name), o = h(r.data) ? r.data : null, l = c(o?.fieldHandle), a = c(o?.inputKey), p = c(o?.inputName ?? o?.name), d = [];
200
+ let m = !1, u = !1, g = !1;
201
+ if (i !== "" && i === t.inputKey && (m = !0, d.push(r.assets, r.assetIds, r.data)), s !== "" && s === t.inputName && (u = !0, d.push(r.assets, r.assetIds, r.data)), n === t.fieldHandle && (g = !0, d.push(r.assets, r.assetIds, r.data)), o) {
202
+ const f = [
203
+ o.assets,
204
+ o.assetIds,
205
+ o.uploadedAssets,
206
+ o.data
207
+ ];
208
+ a !== "" && a === t.inputKey && (m = !0, d.push(...f)), p !== "" && p === t.inputName && (u = !0, d.push(...f)), l === t.fieldHandle && (g = !0, d.push(...f));
209
+ }
210
+ [r.assets, r.assetIds, r.data].forEach((f) => {
211
+ h(f) && (t.inputKey && t.inputKey in f && (m = !0, d.push(f[t.inputKey])), t.inputName in f && (u = !0, d.push(f[t.inputName])), t.fieldHandle in f && d.push(f[t.fieldHandle]));
212
+ });
213
+ for (const f of d) {
214
+ const A = v(f);
215
+ if (A.length && (m || u || g || re(A, t.pendingFiles)))
216
+ return A;
217
+ }
218
+ return [];
219
+ }
220
+ function de(e) {
221
+ const t = e.closest(Z);
222
+ return t instanceof HTMLElement ? t : null;
223
+ }
224
+ function ue(e) {
225
+ return Array.from(e.querySelectorAll(_)).filter((t) => t instanceof HTMLInputElement);
226
+ }
227
+ function fe(e, t, r) {
228
+ const n = {
229
+ field: e,
230
+ input: t,
231
+ summaryRoot: V(e, t),
232
+ uploadedAssets: U(
233
+ H(e, t),
234
+ S(e.querySelector("[data-formie-file-summary]"))
235
+ ),
236
+ pendingFiles: [],
237
+ hydrationToken: 0
238
+ }, i = () => {
239
+ n.pendingFiles = Array.from(t.files || []).map((d) => d.name), y(n);
240
+ }, s = async (d) => {
241
+ n.hydrationToken += 1;
242
+ const m = n.hydrationToken;
243
+ n.pendingFiles = [], n.uploadedAssets = d, R(e, t, d), y(n);
244
+ try {
245
+ const u = await ae(e, t, d);
246
+ if (m !== n.hydrationToken)
247
+ return;
248
+ n.uploadedAssets = u, y(n), x(e, E, "uploaded-assets-sync", {
249
+ fileUpload: e,
250
+ assets: u
251
+ });
252
+ } catch (u) {
253
+ console.error("[formie] Failed to hydrate uploaded file details.", u);
254
+ }
255
+ }, o = () => {
256
+ n.hydrationToken += 1, n.pendingFiles = [], n.uploadedAssets = [], R(e, t, []), y(n);
257
+ }, l = (d) => {
258
+ const m = M(e);
259
+ if (!m)
260
+ return;
261
+ const u = le(d, {
262
+ fieldHandle: m,
263
+ inputKey: ee(t),
264
+ inputName: t.name,
265
+ pendingFiles: n.pendingFiles
266
+ });
267
+ u.length && s(u);
268
+ }, a = () => {
269
+ o();
270
+ };
271
+ return t.addEventListener("change", i), r?.addEventListener(F, l), r?.addEventListener(L, a), (() => {
272
+ const d = H(e, t), m = S(n.summaryRoot);
273
+ if (n.uploadedAssets = U(d, m), n.uploadedAssets.some((u) => u.assetId && !u.filename)) {
274
+ s(n.uploadedAssets);
275
+ return;
276
+ }
277
+ y(n);
278
+ })(), () => {
279
+ t.removeEventListener("change", i), r?.removeEventListener(F, l), r?.removeEventListener(L, a);
280
+ };
281
+ }
282
+ const ye = {
283
+ id: E,
284
+ kind: "field",
285
+ match: (e) => !!e.target.querySelector(_),
286
+ setup: async (e) => {
287
+ const t = e.form, r = /* @__PURE__ */ new WeakSet(), n = [], i = (o) => {
288
+ ue(o).forEach((l) => {
289
+ if (r.has(l))
290
+ return;
291
+ const a = de(l);
292
+ a && (r.add(l), n.push(fe(a, l, t)));
293
+ });
294
+ };
295
+ ne(t), i(e.target);
296
+ const s = (o) => {
297
+ const l = o.detail;
298
+ if (!h(l))
299
+ return;
300
+ const a = l.row;
301
+ a instanceof HTMLElement && i(a);
302
+ };
303
+ return t?.addEventListener(T, s), await e.emit("formie:module:file-upload:init", {
304
+ count: n.length
305
+ }), {
306
+ destroy: () => {
307
+ t?.removeEventListener(T, s), n.forEach((o) => {
308
+ o();
309
+ }), ie(t), e.emit("formie:module:file-upload:destroy", {});
310
+ }
311
+ };
312
+ }
313
+ };
314
+ export {
315
+ ye as fileUploadModule
316
+ };
@@ -0,0 +1,33 @@
1
+ import { a as l } from "./index-BcqwpPNE.js";
2
+ const c = l({
3
+ id: "friendly-captcha-v1",
4
+ defaultPlaceholderSelector: "[data-friendly-captcha-placeholder]",
5
+ defaultTokenFieldNames: ["frc-captcha-solution"],
6
+ load: async () => import("./index-BP7Unm5Y.js"),
7
+ mount: ({ api: e, container: t, provider: a, services: o }) => new e.WidgetInstance(t, {
8
+ sitekey: a.siteKey || "",
9
+ startMode: a.startMode || "none",
10
+ language: a.language || "en",
11
+ solutionFieldName: "frc-captcha-solution",
12
+ doneCallback: (n) => {
13
+ typeof n == "string" && n.trim() !== "" && o.tokens.write(n.trim()), o.errors.clear();
14
+ },
15
+ errorCallback: () => {
16
+ o.tokens.clear();
17
+ }
18
+ }),
19
+ screen: async ({ widget: e, placeholder: t, services: a, stageCtx: o }) => {
20
+ if (a.tokens.has())
21
+ return;
22
+ if (await e.start(), !await a.tokens.wait()) {
23
+ const r = a.errors.getDefaultMessage();
24
+ a.errors.show(r, t), o.abort(r);
25
+ }
26
+ },
27
+ unmount: ({ widget: e, services: t }) => {
28
+ e.destroy(), t.tokens.clear();
29
+ }
30
+ });
31
+ export {
32
+ c as friendlyCaptchaV1Module
33
+ };
@@ -0,0 +1,38 @@
1
+ import { a as l } from "./index-BcqwpPNE.js";
2
+ const i = l({
3
+ id: "friendly-captcha-v2",
4
+ defaultPlaceholderSelector: "[data-friendly-captcha-placeholder]",
5
+ defaultTokenFieldNames: ["frc-captcha-response"],
6
+ load: async () => import("./sdk-3SicTWby.js"),
7
+ mount: ({ api: r, container: n, provider: e, services: t }) => {
8
+ const a = new r.FriendlyCaptchaSDK().createWidget({
9
+ element: n,
10
+ sitekey: e.siteKey || "",
11
+ formFieldName: "frc-captcha-response",
12
+ language: e.language,
13
+ startMode: e.startMode || "none"
14
+ });
15
+ return a.addEventListener("frc:widget.complete", (s) => {
16
+ const o = s.detail;
17
+ typeof o?.response == "string" && o.response.trim() !== "" && t.tokens.write(o.response.trim()), t.errors.clear();
18
+ }), a.addEventListener("frc:widget.expire", () => {
19
+ t.tokens.clear(), t.errors.clear();
20
+ }), a.addEventListener("frc:widget.error", (s) => {
21
+ s.detail?.error && t.tokens.clear();
22
+ }), a;
23
+ },
24
+ screen: async ({ widget: r, placeholder: n, services: e, stageCtx: t }) => {
25
+ if (e.tokens.has())
26
+ return;
27
+ if (r.start(), !await e.tokens.wait()) {
28
+ const a = e.errors.getDefaultMessage();
29
+ e.errors.show(a, n), t.abort(a);
30
+ }
31
+ },
32
+ unmount: ({ widget: r, services: n }) => {
33
+ r.destroy(), n.tokens.clear();
34
+ }
35
+ });
36
+ export {
37
+ i as friendlyCaptchaV2Module
38
+ };
@@ -0,0 +1,24 @@
1
+ import { u as a, v as o } from "./index-BcqwpPNE.js";
2
+ const d = o("go-cardless", "redirect"), l = a({
3
+ id: "go-cardless",
4
+ defaultRequiredInputSuffixes: [],
5
+ load: async () => null,
6
+ setup: async ({ services: n, root: e }) => {
7
+ const r = (s) => {
8
+ const t = s.detail?.data;
9
+ if (!t?.redirectUrl) {
10
+ n.addError("Missing GoCardless redirect URL.");
11
+ return;
12
+ }
13
+ window.location.href = t.redirectUrl;
14
+ };
15
+ return e.addEventListener(d, r), {
16
+ destroy: () => {
17
+ e.removeEventListener(d, r);
18
+ }
19
+ };
20
+ }
21
+ });
22
+ export {
23
+ l as goCardlessModule
24
+ };
@@ -0,0 +1,181 @@
1
+ import { d as x, g as E } from "./index-BcqwpPNE.js";
2
+ import { e as v, a as L } from "./scripts-D9N2d5rN.js";
3
+ const w = "FORMIE_GOOGLE_ADDRESS_SCRIPT", m = "formieGoogleMapsReady";
4
+ let f = null;
5
+ async function R(t) {
6
+ const e = window, n = e.google;
7
+ if (typeof n < "u" && n !== null) {
8
+ const s = n.maps;
9
+ if (s?.places?.PlaceAutocompleteElement)
10
+ return n;
11
+ const i = s;
12
+ return typeof i?.importLibrary == "function" && await i.importLibrary("places"), n;
13
+ }
14
+ if (f)
15
+ return f;
16
+ if (document.getElementById(w)) {
17
+ const s = await v("google", 1e4), i = s?.maps;
18
+ return typeof i?.importLibrary == "function" && await i.importLibrary("places"), s;
19
+ }
20
+ const o = new URL("https://maps.googleapis.com/maps/api/js");
21
+ o.searchParams.set("key", t), o.searchParams.set("loading", "async"), o.searchParams.set("libraries", "places"), o.searchParams.set("callback", m), f = (async () => {
22
+ const s = new Promise((d, r) => {
23
+ const u = setTimeout(() => {
24
+ e[m] && (delete e[m], r(new Error("Google Maps API load timeout")));
25
+ }, 15e3);
26
+ e[m] = () => {
27
+ clearTimeout(u), delete e[m], d(e.google);
28
+ };
29
+ });
30
+ await L({
31
+ id: w,
32
+ src: o.toString(),
33
+ async: !0,
34
+ defer: !0
35
+ });
36
+ const i = await s, l = i?.maps;
37
+ return typeof l?.importLibrary == "function" && await l.importLibrary("places"), i;
38
+ })();
39
+ try {
40
+ return await f;
41
+ } catch (s) {
42
+ throw f = null, s;
43
+ }
44
+ }
45
+ function A(t, e) {
46
+ e.formattedAddress && t.input.setValue("autoComplete", e.formattedAddress), e.address1 && t.input.setValue("address1", e.address1), e.city !== void 0 && t.input.setValue("city", e.city), e.state !== void 0 && t.input.setValue("state", e.state), e.zip !== void 0 && t.input.setValue("zip", e.zip), e.country !== void 0 && t.input.setValue("country", e.country);
47
+ }
48
+ function S() {
49
+ return {
50
+ subpremise: "shortText",
51
+ street_number: "shortText",
52
+ route: "longText",
53
+ postal_town: "longText",
54
+ locality: "longText",
55
+ administrative_area_level_1: "shortText",
56
+ country: "shortText",
57
+ postal_code: "shortText"
58
+ };
59
+ }
60
+ function b(t) {
61
+ const e = S(), n = {};
62
+ for (const a of t) {
63
+ const o = a.types?.[0];
64
+ if (!o || !e[o]) continue;
65
+ const s = e[o], i = a[s] ?? a.short_text ?? a.long_text ?? "";
66
+ n[o] = i;
67
+ }
68
+ return n;
69
+ }
70
+ function C(t) {
71
+ let e = "";
72
+ return (t.street_number || t.route) && (e = [t.street_number, t.route].filter(Boolean).join(" "), t.subpremise && (e = `${t.subpremise}/${e}`)), {
73
+ address1: e,
74
+ city: t.locality || t.postal_town || "",
75
+ state: t.administrative_area_level_1 || "",
76
+ zip: t.postal_code || "",
77
+ country: t.country || ""
78
+ };
79
+ }
80
+ function T(t) {
81
+ const e = t.componentRestrictions;
82
+ if (e && typeof e == "object") {
83
+ const a = e.country;
84
+ if (Array.isArray(a) ? a.length > 0 : a)
85
+ return !0;
86
+ }
87
+ const n = t.includedRegionCodes;
88
+ return Array.isArray(n) && n.length > 0;
89
+ }
90
+ function G(t) {
91
+ const e = { types: ["geocode"], ...t.options || {} }, n = t.countryDefaultValue?.trim().toLowerCase();
92
+ return !n || T(e) ? e : {
93
+ ...e,
94
+ componentRestrictions: { country: n },
95
+ includedRegionCodes: [n.toUpperCase()]
96
+ };
97
+ }
98
+ const I = x({
99
+ id: "google-address",
100
+ load: async ({ options: t }) => {
101
+ const e = t.provider.apiKey;
102
+ if (!e)
103
+ throw new Error("Google Places API key is required");
104
+ return R(e);
105
+ },
106
+ mount: async ({ api: t, field: e, services: n, provider: a }) => {
107
+ const o = n.input.getAutocomplete(), s = t?.maps?.places?.PlaceAutocompleteElement;
108
+ if (!o || typeof s != "function")
109
+ return console.warn("[formie] Google Places API not ready; address autocomplete skipped."), null;
110
+ const i = G(a), l = new s(i), d = window.getComputedStyle(o).height;
111
+ l.style.height = d, l.style.boxSizing = "border-box";
112
+ let r = o.parentElement;
113
+ r?.classList.contains("formie-autocomplete-wrapper") || (r = document.createElement("div"), r.classList.add("formie-autocomplete-wrapper"), o.parentNode?.insertBefore(r, o), r.appendChild(o));
114
+ const u = o.value;
115
+ if (u) {
116
+ const c = document.createElement("div");
117
+ c.classList.add("formie-autocomplete-placeholder"), c.textContent = u, r.style.position = "relative", c.style.cssText = `
118
+ position: absolute; left: 0; top: 0; height: ${d};
119
+ line-height: ${d}; width: 100%; padding: 0 2.5rem;
120
+ pointer-events: none; color: #6B7280; font-size: 14px; z-index: 1;
121
+ `, r.appendChild(c), l.addEventListener("focusin", () => {
122
+ c.style.display = "none";
123
+ }), l.addEventListener("focusout", () => {
124
+ o.value && (c.style.display = "");
125
+ });
126
+ }
127
+ r.replaceChild(l, o), o.type = "hidden", o.name = o.getAttribute("name") || "", r.appendChild(o);
128
+ const y = async (c) => {
129
+ const h = c.placePrediction;
130
+ if (!h) return;
131
+ const p = await h.toPlace();
132
+ if (await p.fetchFields({ fields: ["addressComponents", "formattedAddress"] }), !p.addressComponents) return;
133
+ const P = b(
134
+ p.addressComponents
135
+ ), _ = C(P);
136
+ A(n, {
137
+ ..._,
138
+ formattedAddress: p.formattedAddress
139
+ }), e.dispatchEvent(
140
+ new CustomEvent(E("google", "populate"), {
141
+ bubbles: !0,
142
+ detail: {
143
+ addressProvider: "google",
144
+ place: p,
145
+ formattedAddress: p.formattedAddress,
146
+ addressComponents: p.addressComponents
147
+ }
148
+ })
149
+ );
150
+ };
151
+ return l.addEventListener("gmp-select", y), l;
152
+ },
153
+ onCurrentLocation: async (t, { field: e, services: n }) => {
154
+ const { latitude: a, longitude: o } = t.coords, s = n.form, i = s?.action || window.location.href, l = e.getAttribute("data-formie-field-handle")?.trim(), d = s?.querySelector('[name="handle"]')?.value?.trim();
155
+ if (!(!d || !l))
156
+ try {
157
+ const r = new FormData();
158
+ r.append("action", "formie/address/google-places-geocode"), r.append("latlng", `${a},${o}`), r.append("handle", d), r.append("fieldHandle", l);
159
+ const y = await (await fetch(i, {
160
+ method: "POST",
161
+ body: r,
162
+ credentials: "include",
163
+ headers: {
164
+ "X-Requested-With": "XMLHttpRequest",
165
+ Accept: "application/json"
166
+ }
167
+ })).json();
168
+ if (y?.results?.[0]?.address_components) {
169
+ const c = b(
170
+ y.results[0].address_components
171
+ ), g = C(c);
172
+ A(n, g);
173
+ }
174
+ } catch {
175
+ }
176
+ }
177
+ });
178
+ export {
179
+ G as buildGoogleAutocompleteOptions,
180
+ I as googleAddressModule
181
+ };