@drawbridge/components 0.1.37 → 0.1.39

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 (329) hide show
  1. package/components/styles.css +68 -355
  2. package/dist/advertisement.js +15 -20
  3. package/dist/advertisement.mjs +15 -20
  4. package/dist/bridge/advertisements.js +4 -2
  5. package/dist/bridge/advertisements.mjs +5 -3
  6. package/dist/bridge/fields.js +89 -6
  7. package/dist/bridge/fields.mjs +89 -7
  8. package/dist/bridge/form-subdomain-agreement.js +165 -0
  9. package/dist/bridge/form-subdomain-agreement.mjs +132 -0
  10. package/dist/bridge/form-subdomain-embed.js +5 -1
  11. package/dist/bridge/form-subdomain-embed.mjs +5 -1
  12. package/dist/bridge/form-subdomain-header.js +21 -14
  13. package/dist/bridge/form-subdomain-header.mjs +20 -14
  14. package/dist/bridge/form-subdomain-issue.js +17 -8
  15. package/dist/bridge/form-subdomain-issue.mjs +17 -8
  16. package/dist/bridge/form-subdomain-missions.js +58 -52
  17. package/dist/bridge/form-subdomain-missions.mjs +60 -54
  18. package/dist/bridge/form-subdomain.js +226 -95
  19. package/dist/bridge/form-subdomain.mjs +225 -97
  20. package/dist/bridge/lib/entry.js +71 -6
  21. package/dist/bridge/lib/entry.mjs +60 -5
  22. package/dist/bridge/lib/order.js +23 -0
  23. package/dist/bridge/lib/order.mjs +20 -0
  24. package/dist/bridge/template-layout.js +5 -2
  25. package/dist/bridge/template-layout.mjs +6 -3
  26. package/dist/bridge/template-modal.js +82 -15
  27. package/dist/bridge/template-modal.mjs +83 -16
  28. package/dist/bridge/template-subdomain-gallery.js +126 -75
  29. package/dist/bridge/template-subdomain-gallery.mjs +122 -75
  30. package/dist/bridge/template-subdomain.js +16 -14
  31. package/dist/bridge/template-subdomain.mjs +17 -15
  32. package/dist/dashboard/avatar.js +5 -0
  33. package/dist/dashboard/avatar.mjs +5 -0
  34. package/dist/dashboard/campaign-form.js +1815 -0
  35. package/dist/dashboard/campaign-form.mjs +1786 -0
  36. package/dist/dashboard/card-affiliate.js +3 -2
  37. package/dist/dashboard/card-affiliate.mjs +3 -2
  38. package/dist/dashboard/card-campaign-agreement.js +172 -0
  39. package/dist/dashboard/card-campaign-agreement.mjs +139 -0
  40. package/dist/dashboard/card-campaign-switch.js +25 -10
  41. package/dist/dashboard/card-campaign-switch.mjs +24 -10
  42. package/dist/dashboard/card-order.js +6 -14
  43. package/dist/dashboard/card-order.mjs +6 -14
  44. package/dist/dashboard/card-section.js +69 -26
  45. package/dist/dashboard/card-section.mjs +65 -26
  46. package/dist/dashboard/card-shortcut.js +183 -0
  47. package/dist/dashboard/card-shortcut.mjs +154 -0
  48. package/dist/dashboard/card-tile.js +3 -35
  49. package/dist/dashboard/card-tile.mjs +3 -34
  50. package/dist/dashboard/document-blocks.js +305 -0
  51. package/dist/dashboard/document-blocks.mjs +270 -0
  52. package/dist/dashboard/drawer-subscription.js +52 -14
  53. package/dist/dashboard/drawer-subscription.mjs +52 -14
  54. package/dist/dashboard/drawer.js +20 -3
  55. package/dist/dashboard/drawer.mjs +21 -4
  56. package/dist/dashboard/dropdown.js +6 -2
  57. package/dist/dashboard/dropdown.mjs +6 -2
  58. package/dist/dashboard/form-admin-subscription-custom.js +72 -8
  59. package/dist/dashboard/form-admin-subscription-custom.mjs +72 -8
  60. package/dist/dashboard/form-ai.js +0 -148
  61. package/dist/dashboard/form-ai.mjs +1 -148
  62. package/dist/dashboard/form-filters-analytics.js +86 -38
  63. package/dist/dashboard/form-filters-analytics.mjs +85 -38
  64. package/dist/dashboard/form-organization-brand.js +30 -13
  65. package/dist/dashboard/form-organization-brand.mjs +30 -13
  66. package/dist/dashboard/form-organization-campaign-advertisement.js +38 -112
  67. package/dist/dashboard/form-organization-campaign-advertisement.mjs +38 -112
  68. package/dist/dashboard/form-organization-campaign-advertisements.js +374 -0
  69. package/dist/dashboard/form-organization-campaign-advertisements.mjs +345 -0
  70. package/dist/dashboard/form-organization-campaign-agreement.js +402 -210
  71. package/dist/dashboard/form-organization-campaign-agreement.mjs +398 -211
  72. package/dist/dashboard/form-organization-campaign-design.js +258 -0
  73. package/dist/dashboard/form-organization-campaign-design.mjs +223 -0
  74. package/dist/dashboard/form-organization-campaign-field-item.js +585 -0
  75. package/dist/dashboard/form-organization-campaign-field-item.mjs +552 -0
  76. package/dist/dashboard/form-organization-campaign-field-number.js +48 -7
  77. package/dist/dashboard/form-organization-campaign-field-number.mjs +48 -7
  78. package/dist/dashboard/form-organization-campaign-field-select.js +15 -4
  79. package/dist/dashboard/form-organization-campaign-field-select.mjs +15 -4
  80. package/dist/dashboard/form-organization-campaign-field-skill.js +359 -0
  81. package/dist/dashboard/form-organization-campaign-field-skill.mjs +330 -0
  82. package/dist/dashboard/form-organization-campaign-field-text.js +46 -6
  83. package/dist/dashboard/form-organization-campaign-field-text.mjs +46 -6
  84. package/dist/dashboard/form-organization-campaign-field-textarea.js +22 -13
  85. package/dist/dashboard/form-organization-campaign-field-textarea.mjs +22 -13
  86. package/dist/dashboard/form-organization-campaign-footer.js +178 -0
  87. package/dist/dashboard/form-organization-campaign-footer.mjs +149 -0
  88. package/dist/dashboard/form-organization-campaign-integration-age.js +2 -35
  89. package/dist/dashboard/form-organization-campaign-integration-age.mjs +2 -35
  90. package/dist/dashboard/form-organization-campaign-integration-geocode.js +4 -1
  91. package/dist/dashboard/form-organization-campaign-integration-geocode.mjs +4 -1
  92. package/dist/dashboard/form-organization-campaign-page-embed.js +1 -1
  93. package/dist/dashboard/form-organization-campaign-page-embed.mjs +1 -1
  94. package/dist/dashboard/form-organization-campaign-page-preview.js +1 -2
  95. package/dist/dashboard/form-organization-campaign-page-preview.mjs +1 -2
  96. package/dist/dashboard/form-organization-campaign-page-qr.js +2 -2
  97. package/dist/dashboard/form-organization-campaign-page-qr.mjs +2 -2
  98. package/dist/dashboard/form-organization-campaign-page-share.js +5 -5
  99. package/dist/dashboard/form-organization-campaign-page-share.mjs +5 -5
  100. package/dist/dashboard/form-organization-campaign-page-slug.js +2 -3
  101. package/dist/dashboard/form-organization-campaign-page-slug.mjs +2 -3
  102. package/dist/dashboard/form-organization-campaign-page.js +168 -265
  103. package/dist/dashboard/form-organization-campaign-page.mjs +170 -266
  104. package/dist/dashboard/form-organization-campaign-section.js +125 -107
  105. package/dist/dashboard/form-organization-campaign-section.mjs +121 -107
  106. package/dist/dashboard/form-organization-campaign.js +119 -9
  107. package/dist/dashboard/form-organization-campaign.mjs +118 -9
  108. package/dist/dashboard/form-organization-file-frame.js +7 -1
  109. package/dist/dashboard/form-organization-file-frame.mjs +7 -1
  110. package/dist/dashboard/form-organization-workflow.js +587 -530
  111. package/dist/dashboard/form-organization-workflow.mjs +588 -531
  112. package/dist/dashboard/form-organization.js +22 -0
  113. package/dist/dashboard/form-organization.mjs +22 -0
  114. package/dist/dashboard/form-reposition.js +396 -0
  115. package/dist/dashboard/form-reposition.mjs +359 -0
  116. package/dist/dashboard/form-support.js +189 -0
  117. package/dist/dashboard/form-support.mjs +160 -0
  118. package/dist/dashboard/form-tests.js +683 -0
  119. package/dist/dashboard/form-tests.mjs +646 -0
  120. package/dist/dashboard/form-verify-prize.js +114 -34
  121. package/dist/dashboard/form-verify-prize.mjs +111 -34
  122. package/dist/dashboard/google.js +8 -1
  123. package/dist/dashboard/google.mjs +8 -1
  124. package/dist/dashboard/input-array.js +2 -0
  125. package/dist/dashboard/input-array.mjs +2 -0
  126. package/dist/dashboard/input-editor.js +17 -6
  127. package/dist/dashboard/input-editor.mjs +17 -6
  128. package/dist/dashboard/input-fields.js +287 -437
  129. package/dist/dashboard/input-fields.mjs +287 -436
  130. package/dist/dashboard/input-file.js +70 -2
  131. package/dist/dashboard/input-file.mjs +70 -2
  132. package/dist/dashboard/input-font.js +64 -55
  133. package/dist/dashboard/input-font.mjs +64 -55
  134. package/dist/dashboard/input-resource.js +4 -1
  135. package/dist/dashboard/input-resource.mjs +4 -1
  136. package/dist/dashboard/lib/ab-tests.js +130 -0
  137. package/dist/dashboard/lib/ab-tests.mjs +94 -0
  138. package/dist/dashboard/lib/features.js +1 -1
  139. package/dist/dashboard/lib/features.mjs +1 -1
  140. package/dist/dashboard/lib/focus.js +93 -0
  141. package/dist/dashboard/lib/focus.mjs +69 -0
  142. package/dist/dashboard/lib/form-page.js +209 -0
  143. package/dist/dashboard/lib/form-page.mjs +161 -0
  144. package/dist/dashboard/lib/item-list.js +0 -15
  145. package/dist/dashboard/lib/item-list.mjs +0 -14
  146. package/dist/dashboard/lib/rail.js +16 -17
  147. package/dist/dashboard/lib/rail.mjs +15 -16
  148. package/dist/dashboard/lib/sms.js +8 -2
  149. package/dist/dashboard/lib/sms.mjs +6 -1
  150. package/dist/dashboard/list-resource.js +2 -0
  151. package/dist/dashboard/list-resource.mjs +2 -0
  152. package/dist/dashboard/menu.js +54 -5
  153. package/dist/dashboard/menu.mjs +53 -5
  154. package/dist/dashboard/modal.js +19 -4
  155. package/dist/dashboard/modal.mjs +20 -5
  156. package/dist/dashboard/order-sections.js +4 -0
  157. package/dist/dashboard/order-sections.mjs +4 -0
  158. package/dist/dashboard/preview.js +838 -324
  159. package/dist/dashboard/preview.mjs +826 -324
  160. package/dist/dashboard/provider-ui.js +20 -12
  161. package/dist/dashboard/provider-ui.mjs +21 -13
  162. package/dist/dashboard/recharts.js +53 -28
  163. package/dist/dashboard/recharts.mjs +53 -28
  164. package/dist/dashboard/swatch.js +35 -0
  165. package/dist/dashboard/swatch.mjs +31 -0
  166. package/dist/dashboard/table-contacts.js +6 -10
  167. package/dist/dashboard/table-contacts.mjs +6 -10
  168. package/dist/dashboard/table.js +10 -3
  169. package/dist/dashboard/table.mjs +9 -3
  170. package/dist/dashboard/template-dashboard.js +12 -7
  171. package/dist/dashboard/template-dashboard.mjs +11 -7
  172. package/dist/dashboard/template-design.js +564 -0
  173. package/dist/dashboard/template-design.mjs +531 -0
  174. package/dist/dashboard/template-rail.js +192 -126
  175. package/dist/dashboard/template-rail.mjs +190 -125
  176. package/dist/dashboard/template-socket.js +0 -3
  177. package/dist/dashboard/template-socket.mjs +0 -3
  178. package/dist/dashboard/template-test-page.js +436 -0
  179. package/dist/dashboard/template-test-page.mjs +407 -0
  180. package/dist/dashboard/template-tests.js +141 -0
  181. package/dist/dashboard/template-tests.mjs +112 -0
  182. package/dist/dashboard/template-ui.js +20 -11
  183. package/dist/dashboard/template-ui.mjs +22 -13
  184. package/dist/dashboard/template-variant.js +185 -0
  185. package/dist/dashboard/template-variant.mjs +156 -0
  186. package/dist/icons/arrow-down-long.js +47 -0
  187. package/dist/icons/arrow-down-long.mjs +28 -0
  188. package/dist/icons/arrows-pointing-out.js +46 -0
  189. package/dist/icons/arrows-pointing-out.mjs +27 -0
  190. package/dist/icons/beaker.js +46 -0
  191. package/dist/icons/beaker.mjs +27 -0
  192. package/dist/icons/identification.js +46 -0
  193. package/dist/icons/identification.mjs +27 -0
  194. package/dist/icons/lifebuoy.js +46 -0
  195. package/dist/icons/lifebuoy.mjs +27 -0
  196. package/dist/icons/rectangle-group.js +46 -0
  197. package/dist/icons/rectangle-group.mjs +27 -0
  198. package/dist/icons/rectangle-stack.js +46 -0
  199. package/dist/icons/rectangle-stack.mjs +27 -0
  200. package/dist/icons/shopping-bag.js +46 -0
  201. package/dist/icons/shopping-bag.mjs +27 -0
  202. package/dist/icons/swatch.js +46 -0
  203. package/dist/icons/swatch.mjs +27 -0
  204. package/dist/icons/window.js +46 -0
  205. package/dist/icons/window.mjs +27 -0
  206. package/dist/icons/zoom-in.js +46 -0
  207. package/dist/icons/zoom-in.mjs +27 -0
  208. package/dist/input-answer.js +60 -0
  209. package/dist/input-answer.mjs +27 -0
  210. package/dist/input-checkbox.js +7 -1
  211. package/dist/input-checkbox.mjs +7 -1
  212. package/dist/input-name.js +3 -3
  213. package/dist/input-name.mjs +3 -3
  214. package/dist/input-select.js +3 -1
  215. package/dist/input-select.mjs +3 -1
  216. package/dist/provider-font.js +4 -3
  217. package/dist/provider-font.mjs +4 -3
  218. package/dist/shared/badge.js +15 -0
  219. package/dist/shared/badge.mjs +11 -0
  220. package/dist/shared/carousel.js +11 -7
  221. package/dist/shared/carousel.mjs +11 -7
  222. package/dist/shared/document-pieces.js +295 -0
  223. package/dist/shared/document-pieces.mjs +260 -0
  224. package/dist/shared/lib/campaign.js +18 -9
  225. package/dist/shared/lib/campaign.mjs +17 -9
  226. package/dist/shared/lib/helpers.js +24 -0
  227. package/dist/shared/lib/helpers.mjs +22 -0
  228. package/dist/shared/lib/video.js +6 -0
  229. package/dist/shared/lib/video.mjs +5 -0
  230. package/dist/shared/sortable.js +27 -10
  231. package/dist/shared/sortable.mjs +27 -10
  232. package/dist/shared/tabs.js +1 -1
  233. package/dist/shared/tabs.mjs +1 -1
  234. package/dist/video.js +127 -9
  235. package/dist/video.mjs +125 -11
  236. package/package.json +176 -20
  237. package/types/bridge/fields.d.ts +6 -1
  238. package/types/bridge/form-subdomain-agreement.d.ts +27 -0
  239. package/types/bridge/form-subdomain-missions.d.ts +2 -0
  240. package/types/bridge/form-subdomain.d.ts +62 -3
  241. package/types/bridge/lib/entry.d.ts +46 -7
  242. package/types/bridge/lib/order.d.ts +13 -2
  243. package/types/bridge/subdomain-content.d.ts +1 -0
  244. package/types/bridge/template-subdomain-gallery.d.ts +13 -1
  245. package/types/dashboard/campaign-form.d.ts +42 -0
  246. package/types/dashboard/card-campaign-agreement.d.ts +26 -0
  247. package/types/dashboard/card-campaign-switch.d.ts +13 -1
  248. package/types/dashboard/card-order.d.ts +2 -2
  249. package/types/dashboard/card-section.d.ts +9 -1
  250. package/types/dashboard/card-shortcut.d.ts +40 -0
  251. package/types/dashboard/card-tile.d.ts +4 -9
  252. package/types/dashboard/document-blocks.d.ts +14 -0
  253. package/types/dashboard/drawer.d.ts +3 -0
  254. package/types/dashboard/form-ai.d.ts +0 -17
  255. package/types/dashboard/form-organization-brand.d.ts +3 -0
  256. package/types/dashboard/form-organization-campaign-advertisements.d.ts +15 -0
  257. package/types/dashboard/form-organization-campaign-agreement.d.ts +53 -10
  258. package/types/dashboard/form-organization-campaign-design.d.ts +46 -0
  259. package/types/dashboard/form-organization-campaign-field-item.d.ts +36 -0
  260. package/types/dashboard/form-organization-campaign-field-number.d.ts +4 -1
  261. package/types/dashboard/form-organization-campaign-field-select.d.ts +6 -1
  262. package/types/dashboard/form-organization-campaign-field-skill.d.ts +36 -0
  263. package/types/dashboard/form-organization-campaign-field-text.d.ts +5 -1
  264. package/types/dashboard/form-organization-campaign-field-textarea.d.ts +4 -1
  265. package/types/dashboard/form-organization-campaign-footer.d.ts +23 -0
  266. package/types/dashboard/form-organization-campaign-integration-age.d.ts +2 -1
  267. package/types/dashboard/form-organization-campaign-integration-geocode.d.ts +2 -0
  268. package/types/dashboard/form-organization-campaign-page.d.ts +9 -15
  269. package/types/dashboard/form-organization-campaign-section.d.ts +24 -8
  270. package/types/dashboard/form-organization-campaign.d.ts +3 -0
  271. package/types/dashboard/form-organization-workflow.d.ts +3 -0
  272. package/types/dashboard/form-organization.d.ts +2 -2
  273. package/types/dashboard/form-reposition.d.ts +29 -0
  274. package/types/dashboard/form-support.d.ts +14 -0
  275. package/types/dashboard/form-tests.d.ts +78 -0
  276. package/types/dashboard/form-verify-prize.d.ts +30 -3
  277. package/types/dashboard/input-editor.d.ts +9 -0
  278. package/types/dashboard/input-fields.d.ts +8 -5
  279. package/types/dashboard/input-file.d.ts +4 -0
  280. package/types/dashboard/input-resource.d.ts +1 -0
  281. package/types/dashboard/lib/ab-tests.d.ts +50 -0
  282. package/types/dashboard/lib/escape.d.ts +4 -0
  283. package/types/dashboard/lib/focus.d.ts +16 -0
  284. package/types/dashboard/lib/form-page.d.ts +25 -0
  285. package/types/dashboard/lib/item-list.d.ts +10 -5
  286. package/types/dashboard/lib/rail.d.ts +0 -1
  287. package/types/dashboard/lib/sms.d.ts +7 -0
  288. package/types/dashboard/modal.d.ts +3 -1
  289. package/types/dashboard/preview.d.ts +65 -10
  290. package/types/dashboard/recharts.d.ts +3 -0
  291. package/types/dashboard/swatch.d.ts +4 -0
  292. package/types/dashboard/template-dashboard.d.ts +3 -0
  293. package/types/dashboard/template-design.d.ts +30 -0
  294. package/types/dashboard/template-test-page.d.ts +69 -0
  295. package/types/dashboard/template-tests.d.ts +30 -0
  296. package/types/dashboard/template-variant.d.ts +18 -0
  297. package/types/icons/arrow-down-long.d.ts +5 -0
  298. package/types/icons/arrows-pointing-out.d.ts +5 -0
  299. package/types/icons/beaker.d.ts +5 -0
  300. package/types/icons/identification.d.ts +5 -0
  301. package/types/icons/lifebuoy.d.ts +5 -0
  302. package/types/icons/rectangle-group.d.ts +5 -0
  303. package/types/icons/rectangle-stack.d.ts +5 -0
  304. package/types/icons/shopping-bag.d.ts +5 -0
  305. package/types/icons/swatch.d.ts +5 -0
  306. package/types/icons/window.d.ts +5 -0
  307. package/types/icons/zoom-in.d.ts +5 -0
  308. package/types/input-answer.d.ts +15 -0
  309. package/types/input-select.d.ts +2 -0
  310. package/types/shared/button.d.ts +1 -1
  311. package/types/shared/document-pieces.d.ts +34 -0
  312. package/types/shared/lib/campaign.d.ts +11 -0
  313. package/types/shared/lib/helpers.d.ts +22 -1
  314. package/types/shared/lib/motion.d.ts +2 -0
  315. package/types/shared/lib/video.d.ts +3 -0
  316. package/types/shared/sortable.d.ts +6 -0
  317. package/types/video.d.ts +18 -2
  318. package/dist/bridge/template-preview.js +0 -208
  319. package/dist/bridge/template-preview.mjs +0 -173
  320. package/dist/dashboard/device.js +0 -95
  321. package/dist/dashboard/device.mjs +0 -72
  322. package/dist/dashboard/form-organization-campaign-field-list.js +0 -425
  323. package/dist/dashboard/form-organization-campaign-field-list.mjs +0 -396
  324. package/dist/dashboard/item-row.js +0 -92
  325. package/dist/dashboard/item-row.mjs +0 -63
  326. package/types/bridge/template-preview.d.ts +0 -10
  327. package/types/dashboard/device.d.ts +0 -12
  328. package/types/dashboard/form-organization-campaign-field-list.d.ts +0 -36
  329. package/types/dashboard/item-row.d.ts +0 -25
@@ -14,9 +14,10 @@ import { ageFor, ageGateSchema } from "./lib/age-gate.mjs";
14
14
  import { useGoogleReCaptcha } from "react-google-recaptcha-v3";
15
15
  import { assertRecaptcha } from "./lib/recaptcha.mjs";
16
16
  import { submissionEndpoint } from "./lib/url.mjs";
17
- import { agreementWording, panelMissions } from "./lib/entry.mjs";
17
+ import { AFTER, agreementContent, agreementPhrase, agreementShown, agreementTitles, agreementWording, panelMissions, termsOptOut } from "./lib/entry.mjs";
18
+ import FormSubdomainAgreement from "./form-subdomain-agreement.mjs";
18
19
  import { LOCATION_TIMEOUT, locationCopy, locationStatus } from "./lib/location.mjs";
19
- import { isLastList, itemCount, limitMessage, orderTotal, sectionsOf } from "./lib/order.mjs";
20
+ import { isLastList, itemCount, itemRuns, limitMessage, orderTotal, priced, refusedSection, sectionsOf } from "./lib/order.mjs";
20
21
  import Form from "../shared/form.mjs";
21
22
  import Button from "../shared/button.mjs";
22
23
  import Fieldset from "../shared/fieldset.mjs";
@@ -45,6 +46,7 @@ const scrollToCentre = (node) => {
45
46
  };
46
47
  const FormSubdomainSubmission = ({
47
48
  affiliate,
49
+ after = AFTER,
48
50
  button,
49
51
  checkout,
50
52
  giveaway,
@@ -149,6 +151,7 @@ const FormSubdomainSubmission = ({
149
151
  {
150
152
  ...{
151
153
  advertisements,
154
+ after,
152
155
  button,
153
156
  contact: data == null ? void 0 : data.contact,
154
157
  message,
@@ -162,6 +165,10 @@ const FormSubdomainSubmission = ({
162
165
  }
163
166
  }
164
167
  );
168
+ const parts = {
169
+ advertisements,
170
+ message: message && /* @__PURE__ */ jsx(FormSubdomainMessage, { ...{ message, style } })
171
+ };
165
172
  return /* @__PURE__ */ jsxs(
166
173
  "div",
167
174
  {
@@ -174,16 +181,13 @@ const FormSubdomainSubmission = ({
174
181
  {
175
182
  ...{
176
183
  button,
177
- title,
178
184
  preview,
179
185
  style,
180
- ...message && {
181
- message
182
- }
186
+ title
183
187
  }
184
188
  }
185
189
  ),
186
- advertisements
190
+ after.map((key) => /* @__PURE__ */ jsx(Fragment, { children: parts[key] }, key))
187
191
  ]
188
192
  }
189
193
  );
@@ -287,10 +291,11 @@ const FormSubdomainGeocode = ({
287
291
  disabled,
288
292
  callback,
289
293
  preview,
294
+ still,
290
295
  style,
291
296
  values
292
297
  }) => {
293
- const [state, setState] = useState(disabled ? { message: "Campaign is not currently active", status: "inactive" } : { status: "checking" });
298
+ const [state, setState] = useState(still ? { status: "asking" } : disabled ? { message: "Campaign is not currently active", status: "inactive" } : { status: "checking" });
294
299
  const [attempt, setAttempt] = useState(0);
295
300
  const searchParams = useSearchParams();
296
301
  const token = searchParams.get("drwbrdg_pre");
@@ -299,7 +304,7 @@ const FormSubdomainGeocode = ({
299
304
  useEffect(
300
305
  () => {
301
306
  var _a, _b;
302
- if (disabled) return;
307
+ if (disabled || still) return;
303
308
  if (!navigator.geolocation) {
304
309
  setState({ status: "unsupported" });
305
310
  return;
@@ -337,7 +342,7 @@ const FormSubdomainGeocode = ({
337
342
  live = false;
338
343
  };
339
344
  },
340
- [attempt, disabled, preview, token, values == null ? void 0 : values.slug, values == null ? void 0 : values.subdomain]
345
+ [attempt, disabled, preview, still, token, values == null ? void 0 : values.slug, values == null ? void 0 : values.subdomain]
341
346
  );
342
347
  if (["denied", "inactive", "missing", "outside", "unsupported"].includes(state.status)) {
343
348
  const retry = ["denied", "missing"].includes(state.status);
@@ -477,7 +482,8 @@ const FormSubdomainAge = ({
477
482
  {
478
483
  ...{
479
484
  button,
480
- title: "Confirm your age",
485
+ description: values == null ? void 0 : values.description,
486
+ title: (values == null ? void 0 : values.title) || "Confirm your age",
481
487
  style
482
488
  }
483
489
  }
@@ -524,7 +530,7 @@ const FormSubdomainAge = ({
524
530
  className: "space-y-2 w-full"
525
531
  },
526
532
  children: [
527
- /* @__PURE__ */ jsx("p", { children: "Month" }),
533
+ /* @__PURE__ */ jsx("p", { children: "Month *" }),
528
534
  /* @__PURE__ */ jsx(
529
535
  InputText,
530
536
  {
@@ -552,7 +558,7 @@ const FormSubdomainAge = ({
552
558
  className: "space-y-2 w-full"
553
559
  },
554
560
  children: [
555
- /* @__PURE__ */ jsx("p", { children: "Day" }),
561
+ /* @__PURE__ */ jsx("p", { children: "Day *" }),
556
562
  /* @__PURE__ */ jsx(
557
563
  InputText,
558
564
  {
@@ -580,7 +586,7 @@ const FormSubdomainAge = ({
580
586
  className: "space-y-2 w-full"
581
587
  },
582
588
  children: [
583
- /* @__PURE__ */ jsx("p", { children: "Year" }),
589
+ /* @__PURE__ */ jsx("p", { children: "Year *" }),
584
590
  /* @__PURE__ */ jsx(
585
591
  InputText,
586
592
  {
@@ -621,7 +627,8 @@ const FormSubdomainAge = ({
621
627
  ...{
622
628
  disabled,
623
629
  style,
624
- submitting: formState == null ? void 0 : formState.isSubmitting
630
+ submitting: formState == null ? void 0 : formState.isSubmitting,
631
+ text: (values == null ? void 0 : values.button) || "Next"
625
632
  }
626
633
  }
627
634
  )
@@ -637,11 +644,11 @@ const FormSubdomainItemList = ({
637
644
  currency,
638
645
  field,
639
646
  onChange,
640
- prices,
647
+ prices = true,
641
648
  style,
642
649
  value
643
650
  }) => {
644
- var _a;
651
+ var _a, _b;
645
652
  return /* @__PURE__ */ jsxs(
646
653
  "div",
647
654
  {
@@ -649,8 +656,8 @@ const FormSubdomainItemList = ({
649
656
  className: "space-y-2"
650
657
  },
651
658
  children: [
652
- /* @__PURE__ */ jsx(
653
- "p",
659
+ (((_a = field == null ? void 0 : field.settings) == null ? void 0 : _a.items) || []).length !== 1 && /* @__PURE__ */ jsx(
660
+ "h5",
654
661
  {
655
662
  ...{
656
663
  className: "text-xs uppercase tracking-wide opacity-60"
@@ -664,8 +671,8 @@ const FormSubdomainItemList = ({
664
671
  ...{
665
672
  className: "space-y-4"
666
673
  },
667
- children: (((_a = field == null ? void 0 : field.settings) == null ? void 0 : _a.items) || []).map((item) => {
668
- var _a2, _b;
674
+ children: (((_b = field == null ? void 0 : field.settings) == null ? void 0 : _b.items) || []).map((item) => {
675
+ var _a2, _b2;
669
676
  const quantity = Number(value == null ? void 0 : value[item.id]) || 0;
670
677
  const src = cdnSrc(item.image, "200x200", (_a2 = item.image) == null ? void 0 : _a2.updatedAt);
671
678
  return /* @__PURE__ */ jsx(
@@ -691,7 +698,7 @@ const FormSubdomainItemList = ({
691
698
  {
692
699
  ...{
693
700
  // The image's own description, else its file name, as every image slot.
694
- alt: item.description || ((_b = item.image) == null ? void 0 : _b.filename) || "",
701
+ alt: item.description || ((_b2 = item.image) == null ? void 0 : _b2.filename) || "",
695
702
  className: "object-cover",
696
703
  fill: true,
697
704
  sizes: "56px",
@@ -725,7 +732,7 @@ const FormSubdomainItemList = ({
725
732
  className: "text-xs opacity-60"
726
733
  },
727
734
  children: formatCurrency({
728
- code: currency.toUpperCase(),
735
+ code: (currency || "usd").toUpperCase(),
729
736
  display: "parts",
730
737
  value: item.price
731
738
  })
@@ -779,20 +786,28 @@ const FormSubdomainSection = ({
779
786
  focus,
780
787
  initial,
781
788
  last,
789
+ onAgreement,
782
790
  preview,
791
+ refused,
783
792
  section,
784
793
  slugs = [],
785
794
  style,
786
795
  values
787
796
  }) => {
788
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
797
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
789
798
  const fields = (section == null ? void 0 : section.fields) || [];
790
799
  const lists = fields.filter((field) => (field == null ? void 0 : field.slug) === "list");
791
- const prices = ((_a = section == null ? void 0 : section.settings) == null ? void 0 : _a.prices) !== false;
792
- const currency = ((_b = section == null ? void 0 : section.settings) == null ? void 0 : _b.currency) || "usd";
793
- const smsConsent = Boolean(last) && (values == null ? void 0 : values.sms) !== false && (Boolean((_d = (_c = values == null ? void 0 : values.agreements) == null ? void 0 : _c.sms) == null ? void 0 : _d.enabled) || slugs.includes("phone"));
794
- const marketingConsent = Boolean(last) && Boolean((_f = (_e = values == null ? void 0 : values.agreements) == null ? void 0 : _e.marketing) == null ? void 0 : _f.enabled);
795
- const termsConsent = Boolean(last) && Boolean((_h = (_g = values == null ? void 0 : values.agreements) == null ? void 0 : _g.terms) == null ? void 0 : _h.enabled);
800
+ const prices = priced(lists);
801
+ const currency = ((_a = section == null ? void 0 : section.settings) == null ? void 0 : _a.currency) || "usd";
802
+ const opens = (key) => {
803
+ var _a2;
804
+ return agreementContent((_a2 = values == null ? void 0 : values.agreements) == null ? void 0 : _a2[key]);
805
+ };
806
+ const optOutLine = termsOptOut(values);
807
+ const smsConsent = Boolean(last) && (values == null ? void 0 : values.sms) !== false && Boolean((_c = (_b = values == null ? void 0 : values.agreements) == null ? void 0 : _b.sms) == null ? void 0 : _c.enabled) && slugs.includes("phone");
808
+ const marketingConsent = Boolean(last) && Boolean((_e = (_d = values == null ? void 0 : values.agreements) == null ? void 0 : _d.marketing) == null ? void 0 : _e.enabled) && agreementShown((_f = values == null ? void 0 : values.agreements) == null ? void 0 : _f.marketing);
809
+ const termsConsent = Boolean(last) && Boolean((_h = (_g = values == null ? void 0 : values.agreements) == null ? void 0 : _g.terms) == null ? void 0 : _h.enabled) && agreementShown((_i = values == null ? void 0 : values.agreements) == null ? void 0 : _i.terms);
810
+ const privacy = Boolean(last) && Boolean((_k = (_j = values == null ? void 0 : values.agreements) == null ? void 0 : _j.privacy) == null ? void 0 : _k.enabled) && Boolean(opens("privacy"));
796
811
  const schema = useMemo(
797
812
  () => {
798
813
  var _a2;
@@ -832,10 +847,17 @@ const FormSubdomainSection = ({
832
847
  },
833
848
  [marketingConsent, section, smsConsent, termsConsent, values]
834
849
  );
835
- const { control, getValues, handleSubmit, formState } = useForm({
850
+ const { control, getValues, handleSubmit, formState, setError } = useForm({
836
851
  defaultValues: initial || {},
837
852
  resolver: resolver(schema)
838
853
  });
854
+ useEffect(
855
+ () => Object.entries(refused || {}).forEach(([id, message]) => {
856
+ if (fields.some((field) => (field == null ? void 0 : field.id) === id)) setError("fields." + id, { message });
857
+ }),
858
+ [refused]
859
+ // eslint-disable-line react-hooks/exhaustive-deps
860
+ );
839
861
  const answers = useWatch({
840
862
  control,
841
863
  name: "fields"
@@ -846,25 +868,42 @@ const FormSubdomainSection = ({
846
868
  onChange,
847
869
  value
848
870
  }) => {
849
- var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2;
871
+ var _a2, _b2, _c2, _d2;
872
+ const { lead, name } = agreementPhrase(key, ((_b2 = (_a2 = values == null ? void 0 : values.agreements) == null ? void 0 : _a2[key]) == null ? void 0 : _b2.label) || fallback);
850
873
  return /* @__PURE__ */ jsx(
851
874
  InputCheckbox,
852
875
  {
853
876
  ...{
854
877
  labelId: "checkbox-" + key,
855
- label: /* @__PURE__ */ jsx(Fragment, { children: ((_b2 = (_a2 = values == null ? void 0 : values.agreements) == null ? void 0 : _a2[key]) == null ? void 0 : _b2.link) ? /* @__PURE__ */ jsx(
856
- Button,
857
- {
858
- ...{
859
- element: Link,
860
- href: (_d2 = (_c2 = values == null ? void 0 : values.agreements) == null ? void 0 : _c2[key]) == null ? void 0 : _d2.link,
861
- inline: true,
862
- target: "_blank",
863
- variant: "link"
864
- },
865
- children: ((_f2 = (_e2 = values == null ? void 0 : values.agreements) == null ? void 0 : _e2[key]) == null ? void 0 : _f2.label) || fallback
866
- }
867
- ) : ((_h2 = (_g2 = values == null ? void 0 : values.agreements) == null ? void 0 : _g2[key]) == null ? void 0 : _h2.label) || fallback }),
878
+ // @story public-entry/read-agreement
879
+ // A link opens in a new tab; a document opens over the form, with Back.
880
+ label: /* @__PURE__ */ jsxs(Fragment, { children: [
881
+ lead,
882
+ opens(key) === "link" ? /* @__PURE__ */ jsx(
883
+ Button,
884
+ {
885
+ ...{
886
+ element: Link,
887
+ href: (_d2 = (_c2 = values == null ? void 0 : values.agreements) == null ? void 0 : _c2[key]) == null ? void 0 : _d2.link,
888
+ inline: true,
889
+ target: "_blank",
890
+ variant: "link"
891
+ },
892
+ children: name
893
+ }
894
+ ) : opens(key) === "document" ? /* @__PURE__ */ jsx(
895
+ Button,
896
+ {
897
+ ...{
898
+ inline: true,
899
+ onClick: () => onAgreement == null ? void 0 : onAgreement(key),
900
+ variant: "link"
901
+ },
902
+ children: name
903
+ }
904
+ ) : name,
905
+ key === "terms" && " *"
906
+ ] }),
868
907
  onChange,
869
908
  style,
870
909
  value
@@ -873,7 +912,7 @@ const FormSubdomainSection = ({
873
912
  );
874
913
  };
875
914
  const count = itemCount(lists, answers);
876
- const itemsError = (_j = (_i = formState == null ? void 0 : formState.errors) == null ? void 0 : _i.items) == null ? void 0 : _j.message;
915
+ const itemsError = (_m = (_l = formState == null ? void 0 : formState.errors) == null ? void 0 : _l.items) == null ? void 0 : _m.message;
877
916
  const totalBlock = (prices || itemsError) && /* @__PURE__ */ jsxs(
878
917
  "div",
879
918
  {
@@ -888,7 +927,7 @@ const FormSubdomainSection = ({
888
927
  className: "flex items-center justify-between text-sm"
889
928
  },
890
929
  children: [
891
- /* @__PURE__ */ jsx("span", { children: "ESTIMATED TOTAL \xB7 " + count + " " + (count === 1 ? "ITEM" : "ITEMS") }),
930
+ /* @__PURE__ */ jsx("span", { children: "TOTAL \xB7 " + count + " " + (count === 1 ? "ITEM" : "ITEMS") }),
892
931
  /* @__PURE__ */ jsx("span", { children: formatCurrency({
893
932
  code: currency.toUpperCase(),
894
933
  display: "parts",
@@ -909,6 +948,38 @@ const FormSubdomainSection = ({
909
948
  ]
910
949
  }
911
950
  );
951
+ const drawn = (field) => /* @__PURE__ */ jsx(
952
+ Controller,
953
+ {
954
+ ...{
955
+ control,
956
+ name: "fields." + field.id,
957
+ render: ({ field: { onChange, value } }) => {
958
+ var _a2, _b2;
959
+ return (field == null ? void 0 : field.slug) === "list" ? /* @__PURE__ */ jsx(
960
+ FormSubdomainItemList,
961
+ {
962
+ ...{
963
+ currency,
964
+ field,
965
+ onChange,
966
+ prices,
967
+ style,
968
+ value
969
+ }
970
+ }
971
+ ) : components[drawnAs[field == null ? void 0 : field.slug] || (field == null ? void 0 : field.slug)]({
972
+ error: (_b2 = (_a2 = formState == null ? void 0 : formState.errors) == null ? void 0 : _a2.fields) == null ? void 0 : _b2[field == null ? void 0 : field.id],
973
+ field,
974
+ onChange,
975
+ style,
976
+ value
977
+ });
978
+ }
979
+ }
980
+ },
981
+ field == null ? void 0 : field.id
982
+ );
912
983
  const consent = [
913
984
  termsConsent && ["terms"],
914
985
  marketingConsent && ["marketing", agreementWording.marketing],
@@ -984,40 +1055,21 @@ const FormSubdomainSection = ({
984
1055
  ...{
985
1056
  className: (lists.length > 0 ? "space-y-6 " : "space-y-4 ") + faded()
986
1057
  },
987
- children: fields.map((field) => /* @__PURE__ */ jsxs(Fragment, { children: [
988
- /* @__PURE__ */ jsx(
989
- Controller,
990
- {
991
- ...{
992
- control,
993
- name: "fields." + field.id,
994
- render: ({ field: { onChange, value } }) => {
995
- var _a2, _b2;
996
- return (field == null ? void 0 : field.slug) === "list" ? /* @__PURE__ */ jsx(
997
- FormSubdomainItemList,
998
- {
999
- ...{
1000
- currency,
1001
- field,
1002
- onChange,
1003
- prices,
1004
- style,
1005
- value
1006
- }
1007
- }
1008
- ) : components[drawnAs[field == null ? void 0 : field.slug] || (field == null ? void 0 : field.slug)]({
1009
- error: (_b2 = (_a2 = formState == null ? void 0 : formState.errors) == null ? void 0 : _a2.fields) == null ? void 0 : _b2[field == null ? void 0 : field.id],
1010
- field,
1011
- onChange,
1012
- style,
1013
- value
1014
- });
1015
- }
1058
+ children: itemRuns(fields).map((run) => {
1059
+ var _a2;
1060
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
1061
+ run.fields.length > 1 ? /* @__PURE__ */ jsx(
1062
+ "div",
1063
+ {
1064
+ ...{
1065
+ className: "space-y-4"
1066
+ },
1067
+ children: run.fields.map(drawn)
1016
1068
  }
1017
- }
1018
- ),
1019
- isLastList(fields, field == null ? void 0 : field.id) && totalBlock
1020
- ] }, field == null ? void 0 : field.id))
1069
+ ) : drawn(run.fields[0]),
1070
+ run.fields.some((field) => isLastList(fields, field == null ? void 0 : field.id)) && totalBlock
1071
+ ] }, (_a2 = run.fields[0]) == null ? void 0 : _a2.id);
1072
+ })
1021
1073
  }
1022
1074
  ),
1023
1075
  consent.length > 0 && /* @__PURE__ */ jsx(
@@ -1048,6 +1100,11 @@ const FormSubdomainSection = ({
1048
1100
  {
1049
1101
  ...{
1050
1102
  error: (_c2 = (_b2 = (_a2 = formState == null ? void 0 : formState.errors) == null ? void 0 : _a2.agreements) == null ? void 0 : _b2[key]) == null ? void 0 : _c2.message,
1103
+ // @story public-entry/read-agreement
1104
+ // The organizer's own rules may not say it; our document does, in Opting out.
1105
+ ...key === "terms" && opens("terms") === "link" && optOutLine && {
1106
+ message: optOutLine
1107
+ },
1051
1108
  input: checkbox({
1052
1109
  fallback,
1053
1110
  key,
@@ -1083,11 +1140,41 @@ const FormSubdomainSection = ({
1083
1140
  disabled,
1084
1141
  style,
1085
1142
  submitting: formState == null ? void 0 : formState.isSubmitting,
1086
- text: last ? "Submit" : "Next"
1143
+ // @story public-entry/submit
1144
+ // The step's own Next text; the last step's is the form's one Submit text.
1145
+ text: last ? (values == null ? void 0 : values.submit) || "Submit" : (section == null ? void 0 : section.button) || "Next"
1087
1146
  }
1088
1147
  }
1089
1148
  )
1090
1149
  }
1150
+ ),
1151
+ privacy && /* @__PURE__ */ jsx(
1152
+ "p",
1153
+ {
1154
+ ...{
1155
+ className: "text-center text-xs " + faded("privacy"),
1156
+ ...focus === "privacy" && {
1157
+ ref: focused
1158
+ }
1159
+ },
1160
+ children: /* @__PURE__ */ jsx(
1161
+ Button,
1162
+ {
1163
+ ...{
1164
+ inline: true,
1165
+ variant: "link",
1166
+ ...opens("privacy") === "link" ? {
1167
+ element: Link,
1168
+ href: (_o = (_n = values == null ? void 0 : values.agreements) == null ? void 0 : _n.privacy) == null ? void 0 : _o.link,
1169
+ target: "_blank"
1170
+ } : {
1171
+ onClick: () => onAgreement == null ? void 0 : onAgreement("privacy")
1172
+ }
1173
+ },
1174
+ children: ((_q = (_p = values == null ? void 0 : values.agreements) == null ? void 0 : _p.privacy) == null ? void 0 : _q.label) || "Privacy policy"
1175
+ }
1176
+ )
1177
+ }
1091
1178
  )
1092
1179
  ]
1093
1180
  }
@@ -1097,6 +1184,7 @@ const FormSubdomain = ({
1097
1184
  agreements,
1098
1185
  button,
1099
1186
  disabled,
1187
+ documents,
1100
1188
  fields,
1101
1189
  focus,
1102
1190
  integrations,
@@ -1107,20 +1195,29 @@ const FormSubdomain = ({
1107
1195
  },
1108
1196
  params,
1109
1197
  preview,
1198
+ // @story public-entry/read-agreement
1199
+ // False while the campaign's giveaway is off ( lib/entry giveawayOn ).
1200
+ giveaway,
1110
1201
  // The share payload's `sms` : false while texts are off on the platform.
1111
1202
  sms,
1112
1203
  step: start = 0,
1113
1204
  style,
1205
+ // @story public-entry/submit
1206
+ // The form's one Submit text, on the last step ( `defaults.submit` ).
1207
+ submit,
1114
1208
  tracking
1115
1209
  }) => {
1116
- var _a, _b, _c;
1210
+ var _a, _b, _c, _d, _e;
1117
1211
  const { executeRecaptcha } = useGoogleReCaptcha();
1118
1212
  const searchParams = useSearchParams();
1119
1213
  const token = searchParams.get("drwbrdg_pre");
1120
1214
  const [data, setData] = useState({});
1121
1215
  const [step, setStep] = useState(start);
1216
+ const [reading, setReading] = useState(null);
1217
+ const [refused, setRefused] = useState(null);
1122
1218
  const sections = sectionsOf(fields);
1123
1219
  const slugs = sections.flatMap((section) => ((section == null ? void 0 : section.fields) || []).map((field) => field == null ? void 0 : field.slug));
1220
+ const before = Number(Boolean((_a = integrations == null ? void 0 : integrations.geocode) == null ? void 0 : _a.enabled)) + Number(Boolean((_b = integrations == null ? void 0 : integrations.age) == null ? void 0 : _b.enabled));
1124
1221
  const merge = (object = {}) => ({
1125
1222
  ...data,
1126
1223
  ...object,
@@ -1131,7 +1228,7 @@ const FormSubdomain = ({
1131
1228
  });
1132
1229
  const onSubmit = useCallback(
1133
1230
  async (values) => {
1134
- var _a2, _b2;
1231
+ var _a2, _b2, _c2;
1135
1232
  try {
1136
1233
  let recaptcha;
1137
1234
  if (Boolean((_a2 = integrations == null ? void 0 : integrations.recaptcha) == null ? void 0 : _a2.enabled)) {
@@ -1168,13 +1265,21 @@ const FormSubdomain = ({
1168
1265
  );
1169
1266
  }
1170
1267
  } catch (error) {
1268
+ const index = refusedSection(sections, (_c2 = error == null ? void 0 : error.data) == null ? void 0 : _c2.fields);
1269
+ if (index >= 0) {
1270
+ setData(values);
1271
+ setRefused(error.data.fields);
1272
+ setStep(before + index);
1273
+ return;
1274
+ }
1275
+ ;
1171
1276
  onError(error);
1172
1277
  }
1173
1278
  },
1174
- [executeRecaptcha, integrations, onError, onSuccess, params, preview, token, tracking]
1279
+ [before, executeRecaptcha, integrations, onError, onSuccess, params, preview, sections, token, tracking]
1175
1280
  );
1176
1281
  const forms = [
1177
- ...Boolean((_a = integrations == null ? void 0 : integrations.geocode) == null ? void 0 : _a.enabled) ? [
1282
+ ...Boolean((_c = integrations == null ? void 0 : integrations.geocode) == null ? void 0 : _c.enabled) ? [
1178
1283
  /* @__PURE__ */ jsx(
1179
1284
  FormSubdomainGeocode,
1180
1285
  {
@@ -1198,7 +1303,7 @@ const FormSubdomain = ({
1198
1303
  "form-subdomain-geocode"
1199
1304
  )
1200
1305
  ] : [],
1201
- ...Boolean((_b = integrations == null ? void 0 : integrations.age) == null ? void 0 : _b.enabled) ? [
1306
+ ...Boolean((_d = integrations == null ? void 0 : integrations.age) == null ? void 0 : _d.enabled) ? [
1202
1307
  /* @__PURE__ */ jsx(
1203
1308
  FormSubdomainAge,
1204
1309
  {
@@ -1223,7 +1328,7 @@ const FormSubdomain = ({
1223
1328
  disabled,
1224
1329
  preview,
1225
1330
  style,
1226
- values: (_c = integrations == null ? void 0 : integrations.age) == null ? void 0 : _c.settings
1331
+ values: (_e = integrations == null ? void 0 : integrations.age) == null ? void 0 : _e.settings
1227
1332
  }
1228
1333
  },
1229
1334
  "form-subdomain-age"
@@ -1241,6 +1346,7 @@ const FormSubdomain = ({
1241
1346
  button,
1242
1347
  callback: async (object) => {
1243
1348
  const merged = merge(object);
1349
+ setRefused(null);
1244
1350
  if (index < sections.length - 1) {
1245
1351
  setData(merged);
1246
1352
  setStep(step + 1);
@@ -1252,39 +1358,61 @@ const FormSubdomain = ({
1252
1358
  focus,
1253
1359
  initial: data,
1254
1360
  last: index === sections.length - 1,
1361
+ onAgreement: setReading,
1255
1362
  preview,
1363
+ refused,
1256
1364
  section,
1257
1365
  slugs,
1258
1366
  style,
1259
1367
  values: {
1260
1368
  agreements,
1261
- sms
1369
+ giveaway,
1370
+ sms,
1371
+ submit
1262
1372
  }
1263
1373
  }
1264
1374
  },
1265
1375
  "form-subdomain-section-" + section.id
1266
1376
  ))
1267
1377
  ];
1268
- return /* @__PURE__ */ jsx(
1378
+ return /* @__PURE__ */ jsxs(
1269
1379
  "div",
1270
1380
  {
1271
1381
  ...{
1272
1382
  className: "space-y-6"
1273
1383
  },
1274
- children: /* @__PURE__ */ jsx(
1275
- "div",
1276
- {
1277
- ...{
1278
- className: "relative w-full space-y-6"
1279
- },
1280
- children: forms == null ? void 0 : forms[step]
1281
- }
1282
- )
1384
+ children: [
1385
+ reading && /* @__PURE__ */ jsx(
1386
+ FormSubdomainAgreement,
1387
+ {
1388
+ ...{
1389
+ agreement: agreements == null ? void 0 : agreements[reading],
1390
+ back: () => setReading(null),
1391
+ button,
1392
+ data: documents,
1393
+ style,
1394
+ title: agreementTitles[reading]
1395
+ }
1396
+ }
1397
+ ),
1398
+ /* @__PURE__ */ jsx(
1399
+ "div",
1400
+ {
1401
+ ...{
1402
+ className: "relative w-full space-y-6" + (reading ? " hidden" : "")
1403
+ },
1404
+ children: forms == null ? void 0 : forms[step]
1405
+ }
1406
+ )
1407
+ ]
1283
1408
  }
1284
1409
  );
1285
1410
  };
1286
1411
  var form_subdomain_default = FormSubdomain;
1287
1412
  export {
1413
+ FormSubdomainAge,
1414
+ FormSubdomainGeocode,
1415
+ FormSubdomainItemList,
1288
1416
  FormSubdomainMessage,
1289
1417
  FormSubdomainSubmission,
1290
1418
  form_subdomain_default as default