@unidy.io/sdk 1.1.3 → 1.1.5

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 (699) hide show
  1. package/dist/cjs/app-globals-DSKjcXX_.js +10 -0
  2. package/dist/cjs/app-globals-DSKjcXX_.js.map +1 -0
  3. package/dist/cjs/auth-B83pzi0f.js +582 -0
  4. package/dist/cjs/auth-B83pzi0f.js.map +1 -0
  5. package/dist/cjs/auth-store-DPHWWmXf.js +183 -0
  6. package/dist/cjs/auth-store-DPHWWmXf.js.map +1 -0
  7. package/dist/cjs/component-utils-BpMyeVQo.js +35 -0
  8. package/dist/cjs/component-utils-BpMyeVQo.js.map +1 -0
  9. package/dist/{sdk/flash-store-DXuduRA_.js → cjs/flash-store-BuIBuQDx.js} +8 -6
  10. package/dist/cjs/flash-store-BuIBuQDx.js.map +1 -0
  11. package/dist/cjs/helpers-BcPlKlBG.js +11 -0
  12. package/dist/cjs/helpers-BcPlKlBG.js.map +1 -0
  13. package/dist/cjs/helpers-DJyRa0Qo.js +11 -0
  14. package/dist/cjs/helpers-DJyRa0Qo.js.map +1 -0
  15. package/dist/{sdk/i18n-CacW7WuC.js → cjs/i18n-BoDZ8kd2.js} +18 -24
  16. package/dist/cjs/i18n-BoDZ8kd2.js.map +1 -0
  17. package/dist/cjs/index-B_N5xKgH.js +12025 -0
  18. package/dist/cjs/index-B_N5xKgH.js.map +1 -0
  19. package/dist/{sdk/index-O6h7SI7-.js → cjs/index-DLz3FT7T.js} +10 -8
  20. package/dist/cjs/index-DLz3FT7T.js.map +1 -0
  21. package/dist/cjs/index-R2MKLaem.js +5267 -0
  22. package/dist/cjs/index-R2MKLaem.js.map +1 -0
  23. package/dist/cjs/index.cjs.js +64 -0
  24. package/dist/cjs/index.cjs.js.map +1 -0
  25. package/dist/cjs/loader.cjs.js +14 -0
  26. package/dist/cjs/loader.cjs.js.map +1 -0
  27. package/dist/{sdk/newsletter-helpers-CLSTOCvO.js → cjs/newsletter-helpers-D-V_8kiN.js} +83 -70
  28. package/dist/cjs/newsletter-helpers-D-V_8kiN.js.map +1 -0
  29. package/dist/cjs/newsletter-store-BzytX7Qh.js +38 -0
  30. package/dist/cjs/newsletter-store-BzytX7Qh.js.map +1 -0
  31. package/dist/cjs/pagination-store-BEiW3MQd.js +16 -0
  32. package/dist/cjs/pagination-store-BEiW3MQd.js.map +1 -0
  33. package/dist/{sdk/profile-helpers-mfEp18Tq.js → cjs/profile-helpers-B2h2III_.js} +10 -7
  34. package/dist/cjs/profile-helpers-B2h2III_.js.map +1 -0
  35. package/dist/cjs/profile-store-P_BcYkef.js +22 -0
  36. package/dist/cjs/profile-store-P_BcYkef.js.map +1 -0
  37. package/dist/cjs/sdk.cjs.js +26 -0
  38. package/dist/cjs/sdk.cjs.js.map +1 -0
  39. package/dist/cjs/u-conditional-render.cjs.entry.js +103 -0
  40. package/dist/cjs/u-conditional-render.entry.cjs.js.map +1 -0
  41. package/dist/cjs/u-config.cjs.entry.js +87 -0
  42. package/dist/cjs/u-config.entry.cjs.js.map +1 -0
  43. package/dist/cjs/u-email-field.cjs.entry.js +77 -0
  44. package/dist/cjs/u-email-field.entry.cjs.js.map +1 -0
  45. package/dist/cjs/u-error-message.cjs.entry.js +82 -0
  46. package/dist/cjs/u-error-message.entry.cjs.js.map +1 -0
  47. package/dist/cjs/u-field.u-raw-field.entry.cjs.js.map +1 -0
  48. package/dist/cjs/u-field_2.cjs.entry.js +375 -0
  49. package/dist/cjs/u-flash-message.cjs.entry.js +37 -0
  50. package/dist/cjs/u-flash-message.entry.cjs.js.map +1 -0
  51. package/dist/cjs/u-full-profile.cjs.entry.js +37 -0
  52. package/dist/cjs/u-full-profile.entry.cjs.js.map +1 -0
  53. package/dist/cjs/u-logout-button.cjs.entry.js +38 -0
  54. package/dist/cjs/u-logout-button.entry.cjs.js.map +1 -0
  55. package/dist/cjs/u-magic-code-field.cjs.entry.js +91 -0
  56. package/dist/cjs/u-magic-code-field.entry.cjs.js.map +1 -0
  57. package/dist/cjs/u-missing-field.cjs.entry.js +22 -0
  58. package/dist/cjs/u-missing-field.entry.cjs.js.map +1 -0
  59. package/dist/cjs/u-missing-fields-submit-button.cjs.entry.js +46 -0
  60. package/dist/cjs/u-missing-fields-submit-button.entry.cjs.js.map +1 -0
  61. package/dist/cjs/u-newsletter-checkbox.cjs.entry.js +63 -0
  62. package/dist/cjs/u-newsletter-checkbox.entry.cjs.js.map +1 -0
  63. package/dist/cjs/u-newsletter-logout-button.cjs.entry.js +36 -0
  64. package/dist/cjs/u-newsletter-logout-button.entry.cjs.js.map +1 -0
  65. package/dist/cjs/u-newsletter-preference-checkbox.cjs.entry.js +106 -0
  66. package/dist/cjs/u-newsletter-preference-checkbox.entry.cjs.js.map +1 -0
  67. package/dist/cjs/u-newsletter-resend-doi-button.cjs.entry.js +49 -0
  68. package/dist/cjs/u-newsletter-resend-doi-button.entry.cjs.js.map +1 -0
  69. package/dist/cjs/u-newsletter-root.cjs.entry.js +72 -0
  70. package/dist/cjs/u-newsletter-root.entry.cjs.js.map +1 -0
  71. package/dist/cjs/u-newsletter-toggle-subscription-button.cjs.entry.js +73 -0
  72. package/dist/cjs/u-newsletter-toggle-subscription-button.entry.cjs.js.map +1 -0
  73. package/dist/cjs/u-pagination-button.cjs.entry.js +63 -0
  74. package/dist/cjs/u-pagination-button.entry.cjs.js.map +1 -0
  75. package/dist/cjs/u-pagination-page.cjs.entry.js +44 -0
  76. package/dist/cjs/u-pagination-page.entry.cjs.js.map +1 -0
  77. package/dist/cjs/u-passkey.cjs.entry.js +47 -0
  78. package/dist/cjs/u-passkey.entry.cjs.js.map +1 -0
  79. package/dist/cjs/u-password-field.cjs.entry.js +104 -0
  80. package/dist/cjs/u-password-field.entry.cjs.js.map +1 -0
  81. package/dist/cjs/u-profile.u-submit-button.entry.cjs.js.map +1 -0
  82. package/dist/cjs/u-profile_2.cjs.entry.js +327 -0
  83. package/dist/cjs/u-registration-button.cjs.entry.js +48 -0
  84. package/dist/cjs/u-registration-button.entry.cjs.js.map +1 -0
  85. package/dist/cjs/u-reset-password-button.cjs.entry.js +47 -0
  86. package/dist/cjs/u-reset-password-button.entry.cjs.js.map +1 -0
  87. package/dist/cjs/u-send-magic-code-button.cjs.entry.js +68 -0
  88. package/dist/cjs/u-send-magic-code-button.entry.cjs.js.map +1 -0
  89. package/dist/cjs/u-signed-in.cjs.entry.js +25 -0
  90. package/dist/cjs/u-signed-in.entry.cjs.js.map +1 -0
  91. package/dist/cjs/u-signin-root.cjs.entry.js +43 -0
  92. package/dist/cjs/u-signin-root.entry.cjs.js.map +1 -0
  93. package/dist/cjs/u-signin-step.cjs.entry.js +66 -0
  94. package/dist/cjs/u-signin-step.entry.cjs.js.map +1 -0
  95. package/dist/cjs/u-signin-strategy.cjs.entry.js +30 -0
  96. package/dist/cjs/u-signin-strategy.entry.cjs.js.map +1 -0
  97. package/dist/cjs/u-social-login-button.cjs.entry.js +100 -0
  98. package/dist/cjs/u-social-login-button.entry.cjs.js.map +1 -0
  99. package/dist/cjs/u-spinner.cjs.entry.js +18 -0
  100. package/dist/cjs/u-spinner.entry.cjs.js.map +1 -0
  101. package/dist/cjs/u-ticketable-list.cjs.entry.js +6087 -0
  102. package/dist/cjs/u-ticketable-list.entry.cjs.js.map +1 -0
  103. package/dist/{sdk/unidy-store-DPcuwuXf.js → cjs/unidy-store-7AbWnZ6g.js} +9 -6
  104. package/dist/cjs/unidy-store-7AbWnZ6g.js.map +1 -0
  105. package/dist/collection/api/client.js +144 -0
  106. package/dist/collection/api/client.js.map +1 -0
  107. package/dist/collection/api/index.js +42 -0
  108. package/dist/collection/api/index.js.map +1 -0
  109. package/dist/collection/api/shared.js +18 -0
  110. package/dist/collection/api/shared.js.map +1 -0
  111. package/dist/collection/auth/api/auth.js +264 -0
  112. package/dist/collection/auth/api/auth.js.map +1 -0
  113. package/dist/collection/auth/auth-helpers.js +297 -0
  114. package/dist/collection/auth/auth-helpers.js.map +1 -0
  115. package/dist/collection/auth/auth.js +124 -0
  116. package/dist/collection/auth/auth.js.map +1 -0
  117. package/dist/collection/auth/components/helpers.js +5 -0
  118. package/dist/collection/auth/components/helpers.js.map +1 -0
  119. package/dist/collection/auth/components/logout-button/logout-button.js +85 -0
  120. package/dist/collection/auth/components/logout-button/logout-button.js.map +1 -0
  121. package/dist/collection/auth/components/magic-code-field/magic-code-field.css +1 -0
  122. package/dist/collection/auth/components/magic-code-field/magic-code-field.js +113 -0
  123. package/dist/collection/auth/components/magic-code-field/magic-code-field.js.map +1 -0
  124. package/dist/collection/auth/components/missing-field/missing-field.js +14 -0
  125. package/dist/collection/auth/components/missing-field/missing-field.js.map +1 -0
  126. package/dist/collection/auth/components/missing-fields-submit-button/missing-fields-submit-button.js +39 -0
  127. package/dist/collection/auth/components/missing-fields-submit-button/missing-fields-submit-button.js.map +1 -0
  128. package/dist/collection/auth/components/passkey/passkey.js +103 -0
  129. package/dist/collection/auth/components/passkey/passkey.js.map +1 -0
  130. package/dist/collection/auth/components/password-field/password-field.js +166 -0
  131. package/dist/collection/auth/components/password-field/password-field.js.map +1 -0
  132. package/dist/collection/auth/components/registration/registration-button.js +104 -0
  133. package/dist/collection/auth/components/registration/registration-button.js.map +1 -0
  134. package/dist/collection/auth/components/reset-pass-button/reset-pass-button.js +59 -0
  135. package/dist/collection/auth/components/reset-pass-button/reset-pass-button.js.map +1 -0
  136. package/dist/collection/auth/components/send-magic-code-button/send-magic-code-button.js +104 -0
  137. package/dist/collection/auth/components/send-magic-code-button/send-magic-code-button.js.map +1 -0
  138. package/dist/collection/auth/components/signed-in/signed-in.js +59 -0
  139. package/dist/collection/auth/components/signed-in/signed-in.js.map +1 -0
  140. package/dist/collection/auth/components/signin-root/signin-root.js +97 -0
  141. package/dist/collection/auth/components/signin-root/signin-root.js.map +1 -0
  142. package/dist/collection/auth/components/signin-step/signin-step.js +135 -0
  143. package/dist/collection/auth/components/signin-step/signin-step.js.map +1 -0
  144. package/dist/collection/auth/components/signin-strategy/signin-strategy.js +64 -0
  145. package/dist/collection/auth/components/signin-strategy/signin-strategy.js.map +1 -0
  146. package/dist/collection/auth/components/social-logins/logos/apple.js +3 -0
  147. package/dist/collection/auth/components/social-logins/logos/apple.js.map +1 -0
  148. package/dist/collection/auth/components/social-logins/logos/discord.js +3 -0
  149. package/dist/collection/auth/components/social-logins/logos/discord.js.map +1 -0
  150. package/dist/collection/auth/components/social-logins/logos/facebook.js +3 -0
  151. package/dist/collection/auth/components/social-logins/logos/facebook.js.map +1 -0
  152. package/dist/collection/auth/components/social-logins/logos/google.js +3 -0
  153. package/dist/collection/auth/components/social-logins/logos/google.js.map +1 -0
  154. package/dist/collection/auth/components/social-logins/logos/linkedin.js +3 -0
  155. package/dist/collection/auth/components/social-logins/logos/linkedin.js.map +1 -0
  156. package/dist/collection/auth/components/social-logins/social-login-button.css +1 -0
  157. package/dist/collection/auth/components/social-logins/social-login-button.js +188 -0
  158. package/dist/collection/auth/components/social-logins/social-login-button.js.map +1 -0
  159. package/dist/collection/auth/components/submit-button/auth-submit-button.js +62 -0
  160. package/dist/collection/auth/components/submit-button/auth-submit-button.js.map +1 -0
  161. package/dist/{sdk/index-CYip1Wgu.js → collection/auth/error-definitions.js} +2 -19
  162. package/dist/collection/auth/error-definitions.js.map +1 -0
  163. package/dist/collection/auth/index.js +14 -0
  164. package/dist/collection/auth/index.js.map +1 -0
  165. package/dist/collection/auth/passkey-auth.js +106 -0
  166. package/dist/collection/auth/passkey-auth.js.map +1 -0
  167. package/dist/{sdk/auth-store-Mjo3PyJP.js → collection/auth/store/auth-store.js} +7 -12
  168. package/dist/collection/auth/store/auth-store.js.map +1 -0
  169. package/dist/collection/collection-manifest.json +46 -0
  170. package/dist/collection/globalScript.js +18 -0
  171. package/dist/collection/globalScript.js.map +1 -0
  172. package/dist/collection/i18n.js +31 -0
  173. package/dist/collection/i18n.js.map +1 -0
  174. package/dist/collection/index.js +16 -0
  175. package/dist/collection/index.js.map +1 -0
  176. package/dist/collection/locales/de.json +133 -0
  177. package/dist/collection/locales/en.json +133 -0
  178. package/dist/collection/locales/fr.json +133 -0
  179. package/dist/collection/locales/it.json +133 -0
  180. package/dist/collection/locales/nl_be.json +133 -0
  181. package/dist/collection/locales/ro.json +133 -0
  182. package/dist/collection/logger.js +106 -0
  183. package/dist/collection/logger.js.map +1 -0
  184. package/dist/collection/newsletter/api/newsletters.js +189 -0
  185. package/dist/collection/newsletter/api/newsletters.js.map +1 -0
  186. package/dist/collection/newsletter/components/helpers.js +5 -0
  187. package/dist/collection/newsletter/components/helpers.js.map +1 -0
  188. package/dist/collection/newsletter/components/logout-button/logout-button.js +48 -0
  189. package/dist/collection/newsletter/components/logout-button/logout-button.js.map +1 -0
  190. package/dist/collection/newsletter/components/newsletter-checkbox/newsletter-checkbox.js +109 -0
  191. package/dist/collection/newsletter/components/newsletter-checkbox/newsletter-checkbox.js.map +1 -0
  192. package/dist/collection/newsletter/components/newsletter-root/newsletter-root.js +119 -0
  193. package/dist/collection/newsletter/components/newsletter-root/newsletter-root.js.map +1 -0
  194. package/dist/collection/newsletter/components/preference-checkbox/preference-checkbox.js +178 -0
  195. package/dist/collection/newsletter/components/preference-checkbox/preference-checkbox.js.map +1 -0
  196. package/dist/collection/newsletter/components/resend-doi-button/resend-doi-button.css +1 -0
  197. package/dist/collection/newsletter/components/resend-doi-button/resend-doi-button.js +89 -0
  198. package/dist/collection/newsletter/components/resend-doi-button/resend-doi-button.js.map +1 -0
  199. package/dist/collection/newsletter/components/submit-button/newsletter-submit-button.js +18 -0
  200. package/dist/collection/newsletter/components/submit-button/newsletter-submit-button.js.map +1 -0
  201. package/dist/collection/newsletter/components/toggle-subscription-button/toggle-subscription-button.css +1 -0
  202. package/dist/collection/newsletter/components/toggle-subscription-button/toggle-subscription-button.js +154 -0
  203. package/dist/collection/newsletter/components/toggle-subscription-button/toggle-subscription-button.js.map +1 -0
  204. package/dist/collection/newsletter/index.js +11 -0
  205. package/dist/collection/newsletter/index.js.map +1 -0
  206. package/dist/{sdk/newsletter-helpers-C3t2fsCe.js → collection/newsletter/newsletter-helpers.js} +25 -24
  207. package/dist/collection/newsletter/newsletter-helpers.js.map +1 -0
  208. package/dist/{sdk/newsletter-store-CvULKmsu.js → collection/newsletter/store/newsletter-store.js} +6 -11
  209. package/dist/collection/newsletter/store/newsletter-store.js.map +1 -0
  210. package/dist/collection/profile/api/profile.js +168 -0
  211. package/dist/collection/profile/api/profile.js.map +1 -0
  212. package/dist/collection/profile/components/field/field.css +1 -0
  213. package/dist/collection/profile/components/field/field.js +359 -0
  214. package/dist/collection/profile/components/field/field.js.map +1 -0
  215. package/dist/collection/profile/components/full-profile/full-profile.css +1 -0
  216. package/dist/collection/profile/components/full-profile/full-profile.js +78 -0
  217. package/dist/collection/profile/components/full-profile/full-profile.js.map +1 -0
  218. package/dist/collection/profile/components/profile/profile.js +250 -0
  219. package/dist/collection/profile/components/profile/profile.js.map +1 -0
  220. package/dist/collection/profile/components/raw-field/raw-field.js +697 -0
  221. package/dist/collection/profile/components/raw-field/raw-field.js.map +1 -0
  222. package/dist/collection/profile/components/raw-input-fields/Input.js +3 -0
  223. package/dist/collection/profile/components/raw-input-fields/Input.js.map +1 -0
  224. package/dist/collection/profile/components/raw-input-fields/MultiSelect.js +8 -0
  225. package/dist/collection/profile/components/raw-input-fields/MultiSelect.js.map +1 -0
  226. package/dist/collection/profile/components/raw-input-fields/RadioGroup.js +8 -0
  227. package/dist/collection/profile/components/raw-input-fields/RadioGroup.js.map +1 -0
  228. package/dist/collection/profile/components/raw-input-fields/Select.js +11 -0
  229. package/dist/collection/profile/components/raw-input-fields/Select.js.map +1 -0
  230. package/dist/collection/profile/components/raw-input-fields/Textarea.js +3 -0
  231. package/dist/collection/profile/components/raw-input-fields/Textarea.js.map +1 -0
  232. package/dist/collection/profile/components/submit-button/profile-submit-button.js +17 -0
  233. package/dist/collection/profile/components/submit-button/profile-submit-button.js.map +1 -0
  234. package/dist/collection/profile/index.js +13 -0
  235. package/dist/collection/profile/index.js.map +1 -0
  236. package/dist/collection/profile/profile-helpers.js +31 -0
  237. package/dist/collection/profile/profile-helpers.js.map +1 -0
  238. package/dist/collection/profile/store/profile-store.js +15 -0
  239. package/dist/collection/profile/store/profile-store.js.map +1 -0
  240. package/dist/collection/sdk.css +39 -0
  241. package/dist/collection/shared/component-utils.js +28 -0
  242. package/dist/collection/shared/component-utils.js.map +1 -0
  243. package/dist/collection/shared/components/conditional-render/conditional-render.js +178 -0
  244. package/dist/collection/shared/components/conditional-render/conditional-render.js.map +1 -0
  245. package/dist/collection/shared/components/config/config.js +260 -0
  246. package/dist/collection/shared/components/config/config.js.map +1 -0
  247. package/dist/collection/shared/components/email-field/email-field.css +1 -0
  248. package/dist/collection/shared/components/email-field/email-field.js +145 -0
  249. package/dist/collection/shared/components/email-field/email-field.js.map +1 -0
  250. package/dist/collection/shared/components/error-message/error-message.js +141 -0
  251. package/dist/collection/shared/components/error-message/error-message.js.map +1 -0
  252. package/dist/collection/shared/components/flash-message/close-icon.js +3 -0
  253. package/dist/collection/shared/components/flash-message/close-icon.js.map +1 -0
  254. package/dist/collection/shared/components/flash-message/flash-message.css +1 -0
  255. package/dist/collection/shared/components/flash-message/flash-message.js +79 -0
  256. package/dist/collection/shared/components/flash-message/flash-message.js.map +1 -0
  257. package/dist/collection/shared/components/spinner/spinner.css +1 -0
  258. package/dist/collection/shared/components/spinner/spinner.js +19 -0
  259. package/dist/collection/shared/components/spinner/spinner.js.map +1 -0
  260. package/dist/collection/shared/components/submit-button/context.js +10 -0
  261. package/dist/collection/shared/components/submit-button/context.js.map +1 -0
  262. package/dist/collection/shared/components/submit-button/submit-button.css +1 -0
  263. package/dist/collection/shared/components/submit-button/submit-button.js +196 -0
  264. package/dist/collection/shared/components/submit-button/submit-button.js.map +1 -0
  265. package/dist/collection/shared/store/flash-store.js +43 -0
  266. package/dist/collection/shared/store/flash-store.js.map +1 -0
  267. package/dist/collection/shared/store/unidy-store.js +33 -0
  268. package/dist/collection/shared/store/unidy-store.js.map +1 -0
  269. package/dist/collection/ticketable/api/get-with-schema.js +35 -0
  270. package/dist/collection/ticketable/api/get-with-schema.js.map +1 -0
  271. package/dist/collection/ticketable/api/schemas.js +12 -0
  272. package/dist/collection/ticketable/api/schemas.js.map +1 -0
  273. package/dist/collection/ticketable/api/subscriptions.js +47 -0
  274. package/dist/collection/ticketable/api/subscriptions.js.map +1 -0
  275. package/dist/collection/ticketable/api/tickets.js +48 -0
  276. package/dist/collection/ticketable/api/tickets.js.map +1 -0
  277. package/dist/collection/ticketable/components/pagination/pagination-button.js +108 -0
  278. package/dist/collection/ticketable/components/pagination/pagination-button.js.map +1 -0
  279. package/dist/collection/ticketable/components/pagination/pagination-page.js +69 -0
  280. package/dist/collection/ticketable/components/pagination/pagination-page.js.map +1 -0
  281. package/dist/collection/ticketable/components/ticketable-list/skeleton-helpers.js +54 -0
  282. package/dist/collection/ticketable/components/ticketable-list/skeleton-helpers.js.map +1 -0
  283. package/dist/collection/ticketable/components/ticketable-list/ticketable-list.js +498 -0
  284. package/dist/collection/ticketable/components/ticketable-list/ticketable-list.js.map +1 -0
  285. package/dist/collection/ticketable/index.js +13 -0
  286. package/dist/collection/ticketable/index.js.map +1 -0
  287. package/dist/collection/ticketable/store/pagination-store.js +9 -0
  288. package/dist/collection/ticketable/store/pagination-store.js.map +1 -0
  289. package/dist/{sdk/auth-store-BzXDlgNb.js → components/auth-store.js} +5 -6
  290. package/dist/components/auth-store.js.map +1 -0
  291. package/dist/{sdk/auth-Che07PeV.js → components/auth.js} +134 -124
  292. package/dist/components/auth.js.map +1 -0
  293. package/dist/components/component-utils.js +32 -0
  294. package/dist/components/component-utils.js.map +1 -0
  295. package/dist/components/exports.js +4106 -0
  296. package/dist/components/exports.js.map +1 -0
  297. package/dist/{sdk/u-field.entry.js → components/field.js} +57 -14
  298. package/dist/components/field.js.map +1 -0
  299. package/dist/{sdk/flash-store-Cgu7WoSN.js → components/flash-store.js} +3 -4
  300. package/dist/components/flash-store.js.map +1 -0
  301. package/dist/components/helpers.js +9 -0
  302. package/dist/components/helpers.js.map +1 -0
  303. package/dist/components/helpers2.js +9 -0
  304. package/dist/components/helpers2.js.map +1 -0
  305. package/dist/{sdk/i18n-CRBOSzNq.js → components/i18n.js} +11 -19
  306. package/dist/components/i18n.js.map +1 -0
  307. package/dist/components/index.js +5902 -0
  308. package/dist/components/index.js.map +1 -0
  309. package/dist/components/index2.js +5256 -0
  310. package/dist/components/index2.js.map +1 -0
  311. package/dist/{sdk/index-XIuHpSzj.js → components/index3.js} +3 -3
  312. package/dist/components/index3.js.map +1 -0
  313. package/dist/components/logger.js +111 -0
  314. package/dist/components/logger.js.map +1 -0
  315. package/dist/{sdk/newsletter-helpers-CnufIbIZ.js → components/newsletter-helpers.js} +14 -12
  316. package/dist/components/newsletter-helpers.js.map +1 -0
  317. package/dist/{sdk/newsletter-store-CPY2gFnU.js → components/newsletter-store.js} +3 -8
  318. package/dist/components/newsletter-store.js.map +1 -0
  319. package/dist/components/pagination-store.js +14 -0
  320. package/dist/components/pagination-store.js.map +1 -0
  321. package/dist/{sdk/profile-helpers-Bdz6gmG8.js → components/profile-helpers.js} +4 -4
  322. package/dist/components/profile-helpers.js.map +1 -0
  323. package/dist/{sdk/profile-store-Dr1DP9Te.js → components/profile-store.js} +3 -3
  324. package/dist/components/profile-store.js.map +1 -0
  325. package/dist/{sdk/u-profile.entry.js → components/profile.js} +51 -18
  326. package/dist/components/profile.js.map +1 -0
  327. package/dist/{sdk/u-raw-field.entry.js → components/raw-field.js} +51 -10
  328. package/dist/components/raw-field.js.map +1 -0
  329. package/dist/components/spinner.js +35 -0
  330. package/dist/components/spinner.js.map +1 -0
  331. package/dist/components/submit-button.js +231 -0
  332. package/dist/components/submit-button.js.map +1 -0
  333. package/dist/components/u-conditional-render.js +121 -0
  334. package/dist/components/u-conditional-render.js.map +1 -0
  335. package/dist/components/u-config.js +113 -0
  336. package/dist/components/u-config.js.map +1 -0
  337. package/dist/components/u-email-field.js +99 -0
  338. package/dist/components/u-email-field.js.map +1 -0
  339. package/dist/components/u-error-message.js +105 -0
  340. package/dist/components/u-error-message.js.map +1 -0
  341. package/dist/components/u-field.js +9 -0
  342. package/dist/components/u-field.js.map +1 -0
  343. package/dist/components/u-flash-message.js +58 -0
  344. package/dist/components/u-flash-message.js.map +1 -0
  345. package/dist/components/u-full-profile.js +87 -0
  346. package/dist/components/u-full-profile.js.map +1 -0
  347. package/dist/components/u-logout-button.js +53 -0
  348. package/dist/components/u-logout-button.js.map +1 -0
  349. package/dist/components/u-magic-code-field.js +106 -0
  350. package/dist/components/u-magic-code-field.js.map +1 -0
  351. package/dist/components/u-missing-field.js +57 -0
  352. package/dist/components/u-missing-field.js.map +1 -0
  353. package/dist/components/u-missing-fields-submit-button.js +70 -0
  354. package/dist/components/u-missing-fields-submit-button.js.map +1 -0
  355. package/dist/components/u-newsletter-checkbox.js +77 -0
  356. package/dist/components/u-newsletter-checkbox.js.map +1 -0
  357. package/dist/components/u-newsletter-logout-button.js +51 -0
  358. package/dist/components/u-newsletter-logout-button.js.map +1 -0
  359. package/dist/components/u-newsletter-preference-checkbox.js +124 -0
  360. package/dist/components/u-newsletter-preference-checkbox.js.map +1 -0
  361. package/dist/components/u-newsletter-resend-doi-button.js +70 -0
  362. package/dist/components/u-newsletter-resend-doi-button.js.map +1 -0
  363. package/dist/components/u-newsletter-root.js +90 -0
  364. package/dist/components/u-newsletter-root.js.map +1 -0
  365. package/dist/components/u-newsletter-toggle-subscription-button.js +97 -0
  366. package/dist/components/u-newsletter-toggle-subscription-button.js.map +1 -0
  367. package/dist/components/u-pagination-button.js +86 -0
  368. package/dist/components/u-pagination-button.js.map +1 -0
  369. package/dist/components/u-pagination-page.js +66 -0
  370. package/dist/components/u-pagination-page.js.map +1 -0
  371. package/dist/components/u-passkey.js +65 -0
  372. package/dist/components/u-passkey.js.map +1 -0
  373. package/dist/components/u-password-field.js +125 -0
  374. package/dist/components/u-password-field.js.map +1 -0
  375. package/dist/components/u-profile.js +9 -0
  376. package/dist/components/u-profile.js.map +1 -0
  377. package/dist/components/u-raw-field.js +9 -0
  378. package/dist/components/u-raw-field.js.map +1 -0
  379. package/dist/components/u-registration-button.js +70 -0
  380. package/dist/components/u-registration-button.js.map +1 -0
  381. package/dist/components/u-reset-password-button.js +63 -0
  382. package/dist/components/u-reset-password-button.js.map +1 -0
  383. package/dist/components/u-send-magic-code-button.js +85 -0
  384. package/dist/components/u-send-magic-code-button.js.map +1 -0
  385. package/dist/components/u-signed-in.js +44 -0
  386. package/dist/components/u-signed-in.js.map +1 -0
  387. package/dist/components/u-signin-root.js +63 -0
  388. package/dist/components/u-signin-root.js.map +1 -0
  389. package/dist/components/u-signin-step.js +84 -0
  390. package/dist/components/u-signin-step.js.map +1 -0
  391. package/dist/components/u-signin-strategy.js +50 -0
  392. package/dist/components/u-signin-strategy.js.map +1 -0
  393. package/dist/components/u-social-login-button.js +125 -0
  394. package/dist/components/u-social-login-button.js.map +1 -0
  395. package/dist/components/u-spinner.js +9 -0
  396. package/dist/components/u-spinner.js.map +1 -0
  397. package/dist/components/u-submit-button.js +9 -0
  398. package/dist/components/u-submit-button.js.map +1 -0
  399. package/dist/components/u-ticketable-list.js +6122 -0
  400. package/dist/components/u-ticketable-list.js.map +1 -0
  401. package/dist/{sdk/unidy-store-BwZym11Y.js → components/unidy-store.js} +3 -4
  402. package/dist/components/unidy-store.js.map +1 -0
  403. package/dist/esm/app-globals-CPU9ZcqZ.js +8 -0
  404. package/dist/esm/app-globals-CPU9ZcqZ.js.map +1 -0
  405. package/dist/{sdk/auth-B95hXtvh.js → esm/auth-B0RIcDM-.js} +132 -123
  406. package/dist/esm/auth-B0RIcDM-.js.map +1 -0
  407. package/dist/{sdk/auth-store-CapiC8gJ.js → esm/auth-store-BGMYm_jK.js} +5 -6
  408. package/dist/esm/auth-store-BGMYm_jK.js.map +1 -0
  409. package/dist/esm/component-utils-D1lzXl_Z.js.map +1 -0
  410. package/dist/{sdk/flash-store-DNcSEn2p.js → esm/flash-store-CEvWSG0c.js} +3 -4
  411. package/dist/{sdk/flash-store-DXuduRA_.js.map → esm/flash-store-CEvWSG0c.js.map} +1 -1
  412. package/dist/esm/helpers-BqFCd65h.js.map +1 -0
  413. package/dist/esm/helpers-DUHc_Cx7.js.map +1 -0
  414. package/dist/{sdk/i18n-BCI_ARJL.js → esm/i18n-CLdWzy5J.js} +10 -19
  415. package/dist/esm/i18n-CLdWzy5J.js.map +1 -0
  416. package/dist/{sdk/index-BnBstyfp.js → esm/index-Bjp1XO-f.js} +3 -3
  417. package/dist/{sdk/index-XIuHpSzj.js.map → esm/index-Bjp1XO-f.js.map} +1 -1
  418. package/dist/esm/index-Ci3aTmzp.js +12007 -0
  419. package/dist/esm/index-Ci3aTmzp.js.map +1 -0
  420. package/dist/esm/index-DSDkaHWI.js +5254 -0
  421. package/dist/esm/index-DSDkaHWI.js.map +1 -0
  422. package/dist/esm/index.js +40 -0
  423. package/dist/esm/index.js.map +1 -0
  424. package/dist/esm/loader.js +12 -0
  425. package/dist/esm/loader.js.map +1 -0
  426. package/dist/{sdk/newsletter-helpers-DEXEBD0F.js → esm/newsletter-helpers-CONtbKYi.js} +14 -12
  427. package/dist/esm/newsletter-helpers-CONtbKYi.js.map +1 -0
  428. package/dist/{sdk/newsletter-store-CqD-GcDC.js → esm/newsletter-store-DBL1A203.js} +3 -8
  429. package/dist/{sdk/newsletter-store-CPY2gFnU.js.map → esm/newsletter-store-DBL1A203.js.map} +1 -1
  430. package/dist/esm/pagination-store-DzdJOp-n.js +14 -0
  431. package/dist/esm/pagination-store-DzdJOp-n.js.map +1 -0
  432. package/dist/{sdk/profile-helpers-Bs3aj0CO.js → esm/profile-helpers-CglNd6Nw.js} +4 -4
  433. package/dist/{sdk/profile-helpers-Bdz6gmG8.js.map → esm/profile-helpers-CglNd6Nw.js.map} +1 -1
  434. package/dist/{sdk/profile-store-BZKApsQm.js → esm/profile-store-RmZB2PTc.js} +3 -3
  435. package/dist/{sdk/profile-store-Dr1DP9Te.js.map → esm/profile-store-RmZB2PTc.js.map} +1 -1
  436. package/dist/esm/sdk.js +22 -0
  437. package/dist/esm/sdk.js.map +1 -0
  438. package/dist/{sdk → esm}/u-conditional-render.entry.js +12 -12
  439. package/dist/esm/u-conditional-render.entry.js.map +1 -0
  440. package/dist/{sdk → esm}/u-config.entry.js +15 -16
  441. package/dist/esm/u-config.entry.js.map +1 -0
  442. package/dist/{sdk → esm}/u-email-field.entry.js +7 -7
  443. package/dist/esm/u-email-field.entry.js.map +1 -0
  444. package/dist/{sdk → esm}/u-error-message.entry.js +7 -7
  445. package/dist/esm/u-error-message.entry.js.map +1 -0
  446. package/dist/esm/u-field.u-raw-field.entry.js.map +1 -0
  447. package/dist/esm/u-field_2.entry.js +372 -0
  448. package/dist/{sdk → esm}/u-flash-message.entry.js +4 -4
  449. package/dist/esm/u-flash-message.entry.js.map +1 -0
  450. package/dist/{sdk → esm}/u-full-profile.entry.js +7 -7
  451. package/dist/esm/u-full-profile.entry.js.map +1 -0
  452. package/dist/{sdk → esm}/u-logout-button.entry.js +12 -12
  453. package/dist/esm/u-logout-button.entry.js.map +1 -0
  454. package/dist/{sdk → esm}/u-magic-code-field.entry.js +10 -10
  455. package/dist/esm/u-magic-code-field.entry.js.map +1 -0
  456. package/dist/{sdk → esm}/u-missing-field.entry.js +5 -5
  457. package/dist/esm/u-missing-field.entry.js.map +1 -0
  458. package/dist/{sdk → esm}/u-missing-fields-submit-button.entry.js +9 -9
  459. package/dist/esm/u-missing-fields-submit-button.entry.js.map +1 -0
  460. package/dist/{sdk → esm}/u-newsletter-checkbox.entry.js +13 -13
  461. package/dist/esm/u-newsletter-checkbox.entry.js.map +1 -0
  462. package/dist/{sdk → esm}/u-newsletter-logout-button.entry.js +12 -12
  463. package/dist/esm/u-newsletter-logout-button.entry.js.map +1 -0
  464. package/dist/{sdk → esm}/u-newsletter-preference-checkbox.entry.js +13 -13
  465. package/dist/esm/u-newsletter-preference-checkbox.entry.js.map +1 -0
  466. package/dist/{sdk → esm}/u-newsletter-resend-doi-button.entry.js +12 -12
  467. package/dist/esm/u-newsletter-resend-doi-button.entry.js.map +1 -0
  468. package/dist/{sdk → esm}/u-newsletter-root.entry.js +13 -13
  469. package/dist/esm/u-newsletter-root.entry.js.map +1 -0
  470. package/dist/{sdk → esm}/u-newsletter-toggle-subscription-button.entry.js +13 -13
  471. package/dist/esm/u-newsletter-toggle-subscription-button.entry.js.map +1 -0
  472. package/dist/{sdk → esm}/u-pagination-button.entry.js +2 -2
  473. package/dist/esm/u-pagination-button.entry.js.map +1 -0
  474. package/dist/{sdk → esm}/u-pagination-page.entry.js +2 -2
  475. package/dist/esm/u-pagination-page.entry.js.map +1 -0
  476. package/dist/{sdk → esm}/u-passkey.entry.js +10 -10
  477. package/dist/esm/u-passkey.entry.js.map +1 -0
  478. package/dist/{sdk → esm}/u-password-field.entry.js +6 -6
  479. package/dist/esm/u-password-field.entry.js.map +1 -0
  480. package/dist/esm/u-profile.u-submit-button.entry.js.map +1 -0
  481. package/dist/esm/u-profile_2.entry.js +324 -0
  482. package/dist/{sdk → esm}/u-registration-button.entry.js +6 -6
  483. package/dist/esm/u-registration-button.entry.js.map +1 -0
  484. package/dist/{sdk → esm}/u-reset-password-button.entry.js +10 -10
  485. package/dist/esm/u-reset-password-button.entry.js.map +1 -0
  486. package/dist/{sdk → esm}/u-send-magic-code-button.entry.js +10 -10
  487. package/dist/esm/u-send-magic-code-button.entry.js.map +1 -0
  488. package/dist/{sdk → esm}/u-signed-in.entry.js +5 -5
  489. package/dist/esm/u-signed-in.entry.js.map +1 -0
  490. package/dist/{sdk → esm}/u-signin-root.entry.js +7 -7
  491. package/dist/esm/u-signin-root.entry.js.map +1 -0
  492. package/dist/{sdk → esm}/u-signin-step.entry.js +10 -11
  493. package/dist/esm/u-signin-step.entry.js.map +1 -0
  494. package/dist/{sdk → esm}/u-signin-strategy.entry.js +5 -5
  495. package/dist/esm/u-signin-strategy.entry.js.map +1 -0
  496. package/dist/{sdk → esm}/u-social-login-button.entry.js +7 -7
  497. package/dist/esm/u-social-login-button.entry.js.map +1 -0
  498. package/dist/esm/u-spinner.entry.js +16 -0
  499. package/dist/esm/u-spinner.entry.js.map +1 -0
  500. package/dist/{sdk → esm}/u-ticketable-list.entry.js +84 -143
  501. package/dist/esm/u-ticketable-list.entry.js.map +1 -0
  502. package/dist/{sdk/unidy-store-CtifvCkV.js → esm/unidy-store-BldTAtO0.js} +3 -4
  503. package/dist/{sdk/unidy-store-DPcuwuXf.js.map → esm/unidy-store-BldTAtO0.js.map} +1 -1
  504. package/dist/index.cjs.js +1 -0
  505. package/dist/index.js +1 -0
  506. package/dist/sdk/auth-BopPjv7G.js.map +1 -0
  507. package/dist/sdk/auth-C0vldOq6.js.map +1 -0
  508. package/dist/sdk/auth-store-DQaam_Qh.js.map +1 -0
  509. package/dist/sdk/auth-store-sOmplc4z.js.map +1 -0
  510. package/dist/sdk/{i18n-CRBOSzNq.js.map → i18n-B6rRU-m3.js.map} +1 -1
  511. package/dist/sdk/{i18n-BCI_ARJL.js.map → i18n-CZii1E-s.js.map} +1 -1
  512. package/dist/sdk/{index-CKre5JEG.js.map → index-B1aDcaWd.js.map} +1 -1
  513. package/dist/sdk/index-Df-7P3r0.js.map +1 -0
  514. package/dist/sdk/{index-CYip1Wgu.js.map → index-Eu7hg2ii.js.map} +1 -1
  515. package/dist/sdk/{index-CoYUNBeF.js.map → index-Iulyfmzq.js.map} +1 -1
  516. package/dist/sdk/index.esm.js +2 -22
  517. package/dist/sdk/index.esm.js.map +1 -1
  518. package/dist/sdk/loader.esm.js.map +1 -1
  519. package/dist/sdk/locales/de.json +1 -0
  520. package/dist/sdk/locales/en.json +1 -0
  521. package/dist/sdk/locales/fr.json +1 -0
  522. package/dist/sdk/locales/it.json +1 -0
  523. package/dist/sdk/locales/nl_be.json +1 -0
  524. package/dist/sdk/locales/ro.json +1 -0
  525. package/dist/sdk/newsletter-helpers-8ByV38YW.js.map +1 -0
  526. package/dist/sdk/newsletter-helpers-B-Md6T9k.js.map +1 -0
  527. package/dist/sdk/p-08ff2de2.entry.js +2 -0
  528. package/dist/sdk/p-08ff2de2.entry.js.map +1 -0
  529. package/dist/sdk/p-1ea49938.entry.js +2 -0
  530. package/dist/sdk/p-1ea49938.entry.js.map +1 -0
  531. package/dist/sdk/p-2a65bcbb.entry.js +2 -0
  532. package/dist/sdk/p-2a65bcbb.entry.js.map +1 -0
  533. package/dist/sdk/p-2af8b45f.entry.js +2 -0
  534. package/dist/sdk/p-2af8b45f.entry.js.map +1 -0
  535. package/dist/sdk/p-3411c743.entry.js +2 -0
  536. package/dist/sdk/p-3411c743.entry.js.map +1 -0
  537. package/dist/sdk/p-467c7304.entry.js +2 -0
  538. package/dist/sdk/p-467c7304.entry.js.map +1 -0
  539. package/dist/sdk/p-56abb377.entry.js +2 -0
  540. package/dist/sdk/p-56abb377.entry.js.map +1 -0
  541. package/dist/sdk/p-5703102b.entry.js +2 -0
  542. package/dist/sdk/p-5703102b.entry.js.map +1 -0
  543. package/dist/sdk/p-593c6dde.entry.js +2 -0
  544. package/dist/sdk/p-593c6dde.entry.js.map +1 -0
  545. package/dist/sdk/p-5b627aea.entry.js +2 -0
  546. package/dist/sdk/p-5b627aea.entry.js.map +1 -0
  547. package/dist/sdk/p-5babee6b.entry.js +2 -0
  548. package/dist/sdk/p-5babee6b.entry.js.map +1 -0
  549. package/dist/sdk/p-5cc20a8b.entry.js +2 -0
  550. package/dist/sdk/p-5cc20a8b.entry.js.map +1 -0
  551. package/dist/sdk/p-628ccd68.entry.js +2 -0
  552. package/dist/sdk/p-628ccd68.entry.js.map +1 -0
  553. package/dist/sdk/p-675eb13d.entry.js +2 -0
  554. package/dist/sdk/p-675eb13d.entry.js.map +1 -0
  555. package/dist/sdk/p-6893d167.entry.js +2 -0
  556. package/dist/sdk/p-6893d167.entry.js.map +1 -0
  557. package/dist/sdk/p-6a642433.entry.js +2 -0
  558. package/dist/sdk/p-6a642433.entry.js.map +1 -0
  559. package/dist/sdk/p-73c2ec89.entry.js +2 -0
  560. package/dist/sdk/p-73c2ec89.entry.js.map +1 -0
  561. package/dist/sdk/p-7a0cefff.entry.js +2 -0
  562. package/dist/sdk/p-7a0cefff.entry.js.map +1 -0
  563. package/dist/sdk/p-91bb8b59.entry.js +2 -0
  564. package/dist/sdk/p-91bb8b59.entry.js.map +1 -0
  565. package/dist/sdk/p-9f59909b.entry.js +2 -0
  566. package/dist/sdk/p-9f59909b.entry.js.map +1 -0
  567. package/dist/sdk/p-BZ1kW_eK.js +2 -0
  568. package/dist/sdk/p-BZ1kW_eK.js.map +1 -0
  569. package/dist/sdk/p-BlAULXyw.js +2 -0
  570. package/dist/sdk/p-BlAULXyw.js.map +1 -0
  571. package/dist/sdk/p-BlOjABPD.js +2 -0
  572. package/dist/sdk/p-BlOjABPD.js.map +1 -0
  573. package/dist/sdk/p-BqFCd65h.js +2 -0
  574. package/dist/sdk/p-BqFCd65h.js.map +1 -0
  575. package/dist/sdk/p-C0feI0p8.js +2 -0
  576. package/dist/sdk/p-C0feI0p8.js.map +1 -0
  577. package/dist/sdk/p-C3fhudPT.js +2 -0
  578. package/dist/sdk/p-C3fhudPT.js.map +1 -0
  579. package/dist/sdk/p-CFiZLMAA.js +2 -0
  580. package/dist/sdk/p-CFiZLMAA.js.map +1 -0
  581. package/dist/sdk/p-CPPYdoIv.js +2 -0
  582. package/dist/sdk/p-CPPYdoIv.js.map +1 -0
  583. package/dist/sdk/p-CbRhHGU5.js +2 -0
  584. package/dist/sdk/p-CbRhHGU5.js.map +1 -0
  585. package/dist/sdk/p-Ce8zGAi1.js +2 -0
  586. package/dist/sdk/p-Ce8zGAi1.js.map +1 -0
  587. package/dist/sdk/p-Ci3aTmzp.js +3 -0
  588. package/dist/sdk/p-Ci3aTmzp.js.map +1 -0
  589. package/dist/sdk/p-D1lzXl_Z.js +2 -0
  590. package/dist/sdk/p-D1lzXl_Z.js.map +1 -0
  591. package/dist/sdk/p-DA84OuuU.js +2 -0
  592. package/dist/sdk/p-DA84OuuU.js.map +1 -0
  593. package/dist/sdk/p-DUHc_Cx7.js +2 -0
  594. package/dist/sdk/p-DUHc_Cx7.js.map +1 -0
  595. package/dist/sdk/p-DYtgart8.js +2 -0
  596. package/dist/sdk/p-DYtgart8.js.map +1 -0
  597. package/dist/sdk/p-DdUvQelg.js +2 -0
  598. package/dist/sdk/p-DdUvQelg.js.map +1 -0
  599. package/dist/sdk/p-S3-2d2Qd.js +2 -0
  600. package/dist/sdk/p-S3-2d2Qd.js.map +1 -0
  601. package/dist/sdk/p-a4b7ffd8.entry.js +2 -0
  602. package/dist/sdk/p-a4b7ffd8.entry.js.map +1 -0
  603. package/dist/sdk/p-a5db968f.entry.js +2 -0
  604. package/dist/sdk/p-a5db968f.entry.js.map +1 -0
  605. package/dist/sdk/p-a6393d19.entry.js +2 -0
  606. package/dist/sdk/p-a6393d19.entry.js.map +1 -0
  607. package/dist/sdk/p-c31dbbb4.entry.js +2 -0
  608. package/dist/sdk/p-c31dbbb4.entry.js.map +1 -0
  609. package/dist/sdk/p-c5bffd90.entry.js +2 -0
  610. package/dist/sdk/p-c5bffd90.entry.js.map +1 -0
  611. package/dist/sdk/p-da363474.entry.js +2 -0
  612. package/dist/sdk/p-da363474.entry.js.map +1 -0
  613. package/dist/sdk/p-e3611b71.entry.js +2 -0
  614. package/dist/sdk/p-e3611b71.entry.js.map +1 -0
  615. package/dist/sdk/p-e3f28800.entry.js +2 -0
  616. package/dist/sdk/p-e3f28800.entry.js.map +1 -0
  617. package/dist/sdk/p-effaf86b.entry.js +2 -0
  618. package/dist/sdk/p-effaf86b.entry.js.map +1 -0
  619. package/dist/sdk/p-f0598e42.entry.js +2 -0
  620. package/dist/sdk/p-f0598e42.entry.js.map +1 -0
  621. package/dist/sdk/p-f369a996.entry.js +2 -0
  622. package/dist/sdk/p-f369a996.entry.js.map +1 -0
  623. package/dist/sdk/p-ffac964c.entry.js +2 -0
  624. package/dist/sdk/p-ffac964c.entry.js.map +1 -0
  625. package/dist/sdk/{profile-helpers-Bs3aj0CO.js.map → profile-helpers-BDjk573F.js.map} +1 -1
  626. package/dist/sdk/{profile-helpers-mfEp18Tq.js.map → profile-helpers-b8Koj20a.js.map} +1 -1
  627. package/dist/sdk/sdk.esm.js +2 -48
  628. package/dist/sdk/sdk.esm.js.map +1 -1
  629. package/dist/sdk/u-config.entry.esm.js.map +1 -1
  630. package/dist/sdk/u-error-message.entry.esm.js.map +1 -1
  631. package/dist/sdk/u-field.u-raw-field.entry.esm.js.map +1 -0
  632. package/dist/sdk/u-full-profile.entry.esm.js.map +1 -1
  633. package/dist/sdk/u-magic-code-field.entry.esm.js.map +1 -1
  634. package/dist/sdk/u-password-field.entry.esm.js.map +1 -1
  635. package/dist/sdk/u-profile.u-submit-button.entry.esm.js.map +1 -0
  636. package/dist/sdk/u-signin-step.entry.esm.js.map +1 -1
  637. package/dist/sdk/u-spinner.entry.esm.js.map +1 -1
  638. package/dist/sdk/u-ticketable-list.entry.esm.js.map +1 -1
  639. package/dist/types/auth/auth-helpers.d.ts +24 -25
  640. package/dist/types/auth/auth.d.ts +1 -1
  641. package/dist/types/auth/store/auth-store.d.ts +4 -4
  642. package/dist/types/components.d.ts +72 -0
  643. package/dist/types/profile/api/profile.d.ts +1 -1
  644. package/dist/types/profile/components/profile/profile.d.ts +15 -0
  645. package/dist/types/shared/components/config/config.d.ts +1 -1
  646. package/dist/types/shared/components/error-message/error-message.d.ts +1 -1
  647. package/dist/types/ticketable/components/ticketable-list/ticketable-list.d.ts +12 -2
  648. package/loader/cdn.js +1 -0
  649. package/loader/index.cjs.js +1 -0
  650. package/loader/index.d.ts +24 -0
  651. package/loader/index.es2017.js +1 -0
  652. package/loader/index.js +2 -0
  653. package/package.json +1 -1
  654. package/dist/sdk/auth-B95hXtvh.js.map +0 -1
  655. package/dist/sdk/auth-BiFlsRm-.js +0 -6821
  656. package/dist/sdk/auth-BiFlsRm-.js.map +0 -1
  657. package/dist/sdk/auth-Che07PeV.js.map +0 -1
  658. package/dist/sdk/auth-store-BzXDlgNb.js.map +0 -1
  659. package/dist/sdk/auth-store-CapiC8gJ.js.map +0 -1
  660. package/dist/sdk/auth-store-Mjo3PyJP.js.map +0 -1
  661. package/dist/sdk/auth-wavto6GW.js +0 -6822
  662. package/dist/sdk/auth-wavto6GW.js.map +0 -1
  663. package/dist/sdk/auth-y_LsX4Zn.js +0 -6822
  664. package/dist/sdk/auth-y_LsX4Zn.js.map +0 -1
  665. package/dist/sdk/i18n-CacW7WuC.js.map +0 -1
  666. package/dist/sdk/index-BDX4bHnk.js +0 -15349
  667. package/dist/sdk/index-BDX4bHnk.js.map +0 -1
  668. package/dist/sdk/index-BqL27K_R.js +0 -49640
  669. package/dist/sdk/index-C5jZjlU8.js +0 -49640
  670. package/dist/sdk/index-CKre5JEG.js +0 -15349
  671. package/dist/sdk/index-CoYUNBeF.js +0 -43
  672. package/dist/sdk/index-CvfZ-LfN.js +0 -43
  673. package/dist/sdk/index-CvfZ-LfN.js.map +0 -1
  674. package/dist/sdk/index-Cz3idqu9.js +0 -43
  675. package/dist/sdk/index-Cz3idqu9.js.map +0 -1
  676. package/dist/sdk/index-DJUE7Ceb.js +0 -6254
  677. package/dist/sdk/index-DJUE7Ceb.js.map +0 -1
  678. package/dist/sdk/index-DOyWRKSD.js +0 -43
  679. package/dist/sdk/index-DOyWRKSD.js.map +0 -1
  680. package/dist/sdk/index-gEcJztft.js +0 -15349
  681. package/dist/sdk/index-gEcJztft.js.map +0 -1
  682. package/dist/sdk/index-mfIOXLHL.js +0 -49640
  683. package/dist/sdk/index-mfIOXLHL.js.map +0 -1
  684. package/dist/sdk/newsletter-helpers-C3t2fsCe.js.map +0 -1
  685. package/dist/sdk/newsletter-helpers-CLSTOCvO.js.map +0 -1
  686. package/dist/sdk/newsletter-helpers-CnufIbIZ.js.map +0 -1
  687. package/dist/sdk/newsletter-helpers-DEXEBD0F.js.map +0 -1
  688. package/dist/sdk/newsletter-helpers-MgFueAV9.js +0 -276
  689. package/dist/sdk/newsletter-helpers-MgFueAV9.js.map +0 -1
  690. package/dist/sdk/profile-store-DD6sq42i.js +0 -18
  691. package/dist/sdk/u-field.entry.esm.js.map +0 -1
  692. package/dist/sdk/u-profile.entry.esm.js.map +0 -1
  693. package/dist/sdk/u-raw-field.entry.esm.js.map +0 -1
  694. package/dist/sdk/u-spinner.entry.js +0 -16
  695. package/dist/sdk/u-submit-button.entry.esm.js.map +0 -1
  696. package/dist/sdk/u-submit-button.entry.js +0 -204
  697. /package/dist/{sdk → esm}/component-utils-D1lzXl_Z.js +0 -0
  698. /package/dist/{sdk → esm}/helpers-BqFCd65h.js +0 -0
  699. /package/dist/{sdk → esm}/helpers-DUHc_Cx7.js +0 -0
@@ -0,0 +1,2 @@
1
+ import{r as t,c as e,d as i,h as o,H as s,g as n}from"./p-Ci3aTmzp.js";import{g as a}from"./p-DdUvQelg.js";import{a as r,b as l,s as u}from"./p-C3fhudPT.js";import{A as d}from"./p-BlAULXyw.js";import{t as f}from"./p-CbRhHGU5.js";import{o as p,u as c}from"./p-BlOjABPD.js";import{v as h,b as m}from"./p-DA84OuuU.js";import{s as w,a as g}from"./p-C0feI0p8.js";import{g as b}from"./p-DUHc_Cx7.js";import{n as y}from"./p-CPPYdoIv.js";import{g as v}from"./p-BqFCd65h.js";import{h as x}from"./p-D1lzXl_Z.js";import"./p-BZ1kW_eK.js";import"./p-DYtgart8.js";const k=class{profileId;initialData="";uProfileSuccess;uProfileError;fetchingProfileData=false;constructor(i){t(this,i);this.uProfileSuccess=e(this,"uProfileSuccess");this.uProfileError=e(this,"uProfileError");p("locale",(async t=>{if(r.state.authenticated)await this.getTokenAndFetchProfile()}))}async componentWillLoad(){if(this.initialData!==""){w.data=typeof this.initialData==="string"?JSON.parse(this.initialData):this.initialData}else if(r.state.authenticated){await this.getTokenAndFetchProfile()}w.loading=false}async getTokenAndFetchProfile(){const t=await d.getInstance();const e=await t.getToken();if(e&&typeof e==="string"){await this.fetchProfileData(e)}}async fetchProfileData(t){if(this.fetchingProfileData)return;this.fetchingProfileData=true;try{const e=await a().profile.fetchProfile({idToken:t,lang:c.locale});if(e.success){w.configuration=JSON.parse(JSON.stringify(e.data));w.configUpdateSource="fetch";w.errors={};w.flashErrors={};w.data=JSON.parse(JSON.stringify(e.data))}else{w.flashErrors={[String(e?.status)]:String(e?.error)}}}catch(t){i("Failed to fetch profile data:",t);w.flashErrors={error:f("errors.failed_to_load_profile")}}this.fetchingProfileData=false}async submitProfile(){const t=await d.getInstance();w.loading=true;const{configuration:e,...i}=w;if(!h(i.data)){w.loading=false;return}const o=m(i.data);const s=await a().profile.updateProfile({idToken:await t.getToken(),data:o,lang:c.locale});if(s?.success){w.loading=false;w.configuration=JSON.parse(JSON.stringify(s.data));w.configUpdateSource="submit";w.errors={};this.uProfileSuccess.emit({message:"profile_updated_successfully",payload:s.data})}else{if(s?.data&&"flatErrors"in s.data){w.errors=s.data.flatErrors;this.uProfileError.emit({error:"profile_update_field_errors",details:{fieldErrors:w.errors,httpStatus:s?.status,responseData:s?.data}})}else{w.flashErrors={[String(s?.status)]:String(s?.error)};this.uProfileError.emit({error:"profile_update_failed",details:{flashErrors:w.flashErrors,httpStatus:s?.status,responseData:s?.data}})}w.loading=false}}componentDidLoad(){g("configuration",(t=>{w.data=t}));l("token",(t=>{const e=t??"";if(e){this.fetchProfileData(e)}}))}render(){const t=Object.values(w.errors).some(Boolean);const e=Object.values(w.flashErrors).filter(Boolean).join(", ");const i=w.configUpdateSource==="submit";if(r.state.authenticated){return this.fetchingProfileData?o("div",null,f("loading")):o(s,null,o("slot",null),!t&&e&&o("flash-message",{variant:"error",message:e}),i&&!e&&!t&&o("flash-message",{variant:"success",message:f("profile.updated")}))}return o("h2",null,f("profile.signInToView"))}};const j={handleClick:async(t,e,i)=>{t.preventDefault();await(b(e)?.submit())},isDisabled(t,e){if(e||u.loading)return true;if(u.step==="email"&&t==="email"){return u.email===""}if(u.step==="verification"&&t==="password"){return u.password===""}if(u.step==="reset-password"&&t==="resetPassword"){return!u.resetPassword.newPassword||!u.resetPassword.passwordConfirmation}return false},isLoading(){return u.loading},getButtonText(t,e){if(e)return e;switch(u.step){case"email":return f("buttons.continue");case"verification":if(t==="password"){return f("auth.password.button_text",{defaultValue:"Sign In with Password"})}return f("buttons.submit");case"reset-password":if(t==="resetPassword"){return f("auth.resetPassword.button_text_set",{defaultValue:"Set Password"})}return f("buttons.submit");default:return f("buttons.submit")}},shouldRender(t){if(!u.availableLoginOptions?.password&&t==="password"){return false}if(u.step==="email"){return t==="email"}if(u.step==="verification"){return t==="password"&&u.magicCodeStep!=="sent"}if(u.step==="reset-password"){return t==="resetPassword"}return false}};const C={handleClick:async(t,e,i)=>{t.preventDefault();return await(v(e)?.submit(i))},isDisabled(t,e){if(t==="login"){return e||!y.state.email}return e||!y.state.email||Object.keys(y.state.checkedNewsletters).length===0},isLoading(){return false}};function S(t){return t.closest("u-profile")}const M={async handleClick(t,e,i){t.preventDefault();await(S(e)?.submitProfile())},isDisabled(t,e){return e||w.errors&&Object.keys(w.errors).length>0||w.phoneValid===false},isLoading(){return w.loading}};const I={async handleClick(){},isDisabled(t,e=false){return e||false},isLoading(){return false}};const L='/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer theme{:host,:root{--u-animate-spin:spin 1s linear infinite;--u-font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--u-font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--u-default-font-family:var(--u-font-sans);--u-default-mono-font-family:var(--u-font-mono);--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,::backdrop,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}::file-selector-button{appearance:button;background-color:#0000;border:0 solid;border-radius:0;box-sizing:border-box;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;margin:0;margin-inline-end:4px;opacity:1;padding:0}:host,html{font-family:var(--u-default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--u-default-font-feature-settings,normal);font-variation-settings:var(--u-default-font-variation-settings,normal);-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);tab-size:4;-webkit-tap-highlight-color:transparent;line-height:1.5}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--u-default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--u-default-mono-font-feature-settings,normal);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--u-default-mono-font-variation-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}button,input,optgroup,select,textarea{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:currentColor;color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex;padding-block:0}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.u\\:flex{display:flex}.u\\:justify-center{justify-content:center}.u\\:disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.u\\:disabled\\:opacity-50:disabled{opacity:.5}.u\\:inline-flex{display:inline-flex}.u\\:h-\\[1em\\]{height:1em}.u\\:w-\\[1em\\]{width:1em}.u\\:animate-spin{animation:var(--u-animate-spin)}.u\\:items-center{align-items:center}.u\\:rounded-\\[50\\%\\]{border-radius:50%}} /*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer base{}@layer components;@layer utilities{}@keyframes spin{to{transform:rotate(1turn)}} /*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer base{}@layer components;@layer utilities{.u\\:justify-end{justify-content:flex-end}} /*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-ring-offset-width:0px;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer base{}@layer components;@layer utilities{.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}';const _=class{constructor(e){t(this,e)}get el(){return n(this)}for;text;disabled=false;componentClassName="";context="auth";contextModule=I;hasSlot=false;async componentWillLoad(){this.hasSlot=x(this.el);this.context=this.detectContext();switch(this.context){case"auth":this.contextModule=j;break;case"profile":this.contextModule=M;break;case"newsletter":this.contextModule=C;break;default:this.contextModule=I}}detectContext(){if(this.el.closest("u-signin-root")||this.el.closest("u-signin-step"))return"auth";if(this.el.closest("u-profile"))return"profile";if(this.el.closest("u-newsletter-root"))return"newsletter";throw new Error("No context found for submit button. Make sure you are using the component within a u-signin-root, u-profile, or u-newsletter-root.")}handleClick=async t=>{await this.contextModule.handleClick(t,this.el,this.for)};isDisabled(){return this.contextModule.isDisabled(this.for,this.disabled)}isLoading(){return this.contextModule.isLoading()}getButtonText(){if(this.contextModule.getButtonText){return this.contextModule.getButtonText(this.for,this.text)}if(this.text){return this.text}return f("buttons.submit")}getButtonContent(){const t=this.isLoading();if(t){return o("u-spinner",null)}if(this.hasSlot){return o("slot",null)}return this.getButtonText()}render(){if(this.contextModule.shouldRender&&!this.contextModule.shouldRender(this.for)){return null}const t=[this.componentClassName,this.context==="auth"?"u:flex u:justify-center":"","u:disabled:opacity-50 u:disabled:cursor-not-allowed"].join(" ");const e={type:"submit",part:`${this.context}-submit-button`,disabled:this.isDisabled()||this.isLoading(),class:t,onClick:this.handleClick,"aria-live":"polite"};return o("button",{...e},this.getButtonContent())}};_.style=L;export{k as u_profile,_ as u_submit_button};
2
+ //# sourceMappingURL=p-7a0cefff.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["registerInstance","createEvent","captureException","h","Host","getElement","getUnidyClient","authStore","authStoreOnChange","state$1","Auth","t","onChange","unidyState","validateRequiredFieldsUnchanged","buildPayload","state","profileStoreOnChange","getParentSigninStep","newsletterStore","getParentNewsletterRoot","hasSlotContent","Profile","profileId","initialData","uProfileSuccess","uProfileError","fetchingProfileData","constructor","hostRef","this","async","_locale","authenticated","getTokenAndFetchProfile","componentWillLoad","data","JSON","parse","loading","authInstance","getInstance","idToken","getToken","fetchProfileData","resp","profile","fetchProfile","lang","locale","success","configuration","stringify","configUpdateSource","errors","flashErrors","String","status","error","submitProfile","stateWithoutConfig","updatedProfileData","updateProfile","emit","message","payload","flatErrors","details","fieldErrors","httpStatus","responseData","componentDidLoad","cfg","newToken","token","render","hasFieldErrors","Object","values","some","Boolean","errorMsg","filter","join","wasSubmit","variant","authContext","handleClick","event","el","_forProp","preventDefault","submit","isDisabled","forProp","disabled","step","email","password","resetPassword","newPassword","passwordConfirmation","isLoading","getButtonText","text","defaultValue","shouldRender","availableLoginOptions","magicCodeStep","newsletterContext","keys","checkedNewsletters","length","getParentProfile","closest","profileContext","phoneValid","defaultContext","submitButtonCss","SubmitButton","for","componentClassName","context","contextModule","hasSlot","detectContext","Error","getButtonContent","buttonClasses","buttonProps","type","part","class","onClick","style"],"sources":["0"],"mappings":"YAAcA,OAAuBC,OAAkBC,OAAkBC,OAAQC,OAAWC,MAAkB,8BAChGC,MAAsB,8BACtBC,OAAgBC,OAAwBC,MAAe,8BACvDC,MAAY,8BACjBC,MAAS,8BACJC,OAAeC,MAAkB,8BACjCC,OAAsCC,MAAoB,8BAC1DC,OAAYC,MAA4B,8BACxCC,MAA2B,8BAC3BC,MAAuB,8BACvBC,MAA+B,8BAC/BC,MAAsB,wBAC7B,wBACA,kBAEP,MAAMC,EAAU,MACZC,UACAC,YAAc,GACdC,gBACAC,cACAC,oBAAsB,MACtB,WAAAC,CAAYC,GACR7B,EAAiB8B,KAAMD,GACvBC,KAAKL,gBAAkBxB,EAAY6B,KAAM,mBACzCA,KAAKJ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,CACA,MAAA5B,GACI,GAAI7C,KAAK6F,cAAcjB,eAAiB5E,KAAK6F,cAAcjB,aAAa5E,KAAK0F,KAAM,CAC/E,OAAO,IACX,CACA,MAAMQ,EAAgB,CAClBlG,KAAK2F,mBACL3F,KAAK4F,UAAY,OAAS,0BAA4B,GACtD,uDACFvC,KAAK,KACP,MAAM8C,EAAc,CAChBC,KAAM,SACNC,KAAM,GAAGrG,KAAK4F,wBACd3B,SAAUjE,KAAK+D,cAAgB/D,KAAKwE,YACpC8B,MAAOJ,EACPK,QAASvG,KAAKyD,YACd,YAAa,UAEjB,OAAOpF,EAAE,SAAU,IAAK8H,GAAenG,KAAKiG,mBAChD,GAEJR,EAAae,MAAQhB,SAEZhG,eAAsBiG","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ import{r as s,c as t,g as r,h as i,H as n}from"./p-Ci3aTmzp.js";import{a as o}from"./p-C3fhudPT.js";import"./p-BZ1kW_eK.js";import"./p-BlOjABPD.js";const e=class{constructor(r){s(this,r);this.authEvent=t(this,"authEvent");this.errorEvent=t(this,"errorEvent")}get el(){return r(this)}componentClassName="";authEvent;errorEvent;componentDidLoad(){o.setRootComponentRef(this);const s=this.el.querySelectorAll("u-signin-step").values();if([...s].some((s=>s.name==="single-login"))){o.setInitialStep("single-login")}else{o.setInitialStep("email")}}onAuth(s){this.authEvent.emit(s)}onError(s){this.errorEvent.emit({error:s})}render(){if(o.state.authenticated){return null}return i(n,{class:this.componentClassName},i("slot",null))}};export{e as u_signin_root};
2
+ //# sourceMappingURL=p-91bb8b59.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["registerInstance","createEvent","getElement","h","Host","authStore","SigninRoot","constructor","hostRef","this","authEvent","errorEvent","el","componentClassName","componentDidLoad","setRootComponentRef","signInSteps","querySelectorAll","values","some","step","name","setInitialStep","onAuth","response","emit","onError","error","render","state","authenticated","class"],"sources":["0"],"mappings":"YAAcA,OAAuBC,OAAkBC,OAAYC,OAAQC,MAAY,8BACzEC,MAAiB,wBACxB,wBACA,kBAEP,MAAMC,EAAa,MACf,WAAAC,CAAYC,GACRR,EAAiBS,KAAMD,GACvBC,KAAKC,UAAYT,EAAYQ,KAAM,aACnCA,KAAKE,WAAaV,EAAYQ,KAAM,aACxC,CACA,MAAIG,GAAO,OAAOV,EAAWO,KAAO,CACpCI,mBAAqB,GACrBH,UACAC,WACA,gBAAAG,GACIT,EAAUU,oBAAoBN,MAC9B,MAAMO,EAAcP,KAAKG,GAAGK,iBAAiB,iBAAiBC,SAC9D,GAAI,IAAIF,GAAaG,MAAMC,GAASA,EAAKC,OAAS,iBAAiB,CAC/DhB,EAAUiB,eAAe,eAC7B,KACK,CACDjB,EAAUiB,eAAe,QAC7B,CACJ,CACA,MAAAC,CAAOC,GACHf,KAAKC,UAAUe,KAAKD,EACxB,CACA,OAAAE,CAAQC,GACJlB,KAAKE,WAAWc,KAAK,CAAEE,MAAOA,GAClC,CACA,MAAAC,GACI,GAAIvB,EAAUwB,MAAMC,cAAe,CAC/B,OAAO,IACX,CACA,OAAQ3B,EAAEC,EAAM,CAAE2B,MAAOtB,KAAKI,oBAAsBV,EAAE,OAAQ,MAClE,UAGKG","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ import{r as t,h as e}from"./p-Ci3aTmzp.js";import{s as i}from"./p-C3fhudPT.js";import{A as o}from"./p-BlAULXyw.js";import"./p-BZ1kW_eK.js";import"./p-BlOjABPD.js";import"./p-DdUvQelg.js";import"./p-CbRhHGU5.js";import"./p-C0feI0p8.js";import"./p-D1lzXl_Z.js";import"./p-DYtgart8.js";const n='/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-ring-offset-width:0px;--tw-border-style:solid;--tw-duration:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:host,:root{--u-font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--u-font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--u-color-slate-200:oklch(92.9% .013 255.508);--u-spacing:.25rem;--u-text-lg:1.125rem;--u-text-lg--line-height:1.55556;--u-radius-lg:.5rem;--u-default-transition-duration:.15s;--u-default-transition-timing-function:cubic-bezier(.4,0,.2,1);--u-default-font-family:var(--u-font-sans);--u-default-mono-font-family:var(--u-font-mono);--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,::backdrop,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}::file-selector-button{appearance:button;background-color:#0000;border:0 solid;border-radius:0;box-sizing:border-box;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;margin:0;margin-inline-end:4px;opacity:1;padding:0}:host,html{font-family:var(--u-default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--u-default-font-feature-settings,normal);font-variation-settings:var(--u-default-font-variation-settings,normal);-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);tab-size:4;-webkit-tap-highlight-color:transparent;line-height:1.5}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--u-default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--u-default-mono-font-feature-settings,normal);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--u-default-mono-font-variation-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}button,input,optgroup,select,textarea{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:currentColor;color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex;padding-block:0}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.u\\:flex{display:flex}.u\\:h-\\[50px\\]{height:50px}.u\\:w-\\[50px\\]{width:50px}.u\\:w-full{width:100%}.u\\:justify-center{justify-content:center}.u\\:gap-0\\.5{gap:calc(var(--u-spacing)*.5)}.u\\:rounded-lg{border-radius:var(--u-radius-lg)}.u\\:border-2{border-style:var(--tw-border-style);border-width:2px}.u\\:border-solid{--tw-border-style:solid;border-style:solid}.u\\:border-slate-200{border-color:var(--u-color-slate-200)}.u\\:text-center{text-align:center}.u\\:text-lg{font-size:var(--u-text-lg);line-height:var(--tw-leading,var(--u-text-lg--line-height))}.u\\:transition-colors{transition-duration:var(--tw-duration,var(--u-default-transition-duration));transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--u-default-transition-timing-function))}.u\\:duration-200{--tw-duration:.2s;transition-duration:.2s}.u\\:outline-none{--tw-outline-style:none;outline-style:none}.fixed{position:fixed}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}} /*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;@layer utilities{}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-duration{syntax:"*";inherits:false}';const r=class{constructor(e){t(this,e)}componentClassName="";codeDigits=["","","",""];inputRefs=[];handleInput=(t,e)=>{const i=t.target;const o=i.value.replace(/[^0-9]/g,"");const n=o.slice(-1);i.value=n;const r=[...this.codeDigits];r[e]=n;this.codeDigits=r;const a=r.join("");if(o&&e<3){const t=this.inputRefs[e+1];if(t){t.focus()}}if(a.length===4){this.authenticateWithCode(a)}};handleKeyDown=(t,e)=>{if(t.key==="Backspace"&&!this.codeDigits[e]&&e>0){const t=this.inputRefs[e-1];if(t){t.focus()}}};handlePaste=t=>{t.preventDefault();const e=t.clipboardData?.getData("text")||"";const i=e.replace(/[^0-9]/g,"").slice(0,4).split("");while(i.length<4){i.push("")}this.codeDigits=i;const o=i.findIndex((t=>!t));const n=o!==-1?o:3;if(this.inputRefs[n]){this.inputRefs[n].focus()}const r=i.join("");if(r.length===4){this.authenticateWithCode(r)}};authenticateWithCode=async t=>{const e=await o.getInstance();await e.helpers.authenticateWithMagicCode(t)};render(){if(i.step!=="magic-code"){return null}return e("div",{class:`u:flex u:gap-0.5 u:w-full u:justify-center ${this.componentClassName}`},this.codeDigits.map(((t,o)=>e("input",{key:o,ref:t=>{if(t)this.inputRefs[o]=t},id:`digit-input-${o+1}`,type:"text",inputmode:"numeric",maxlength:"1",value:t,disabled:i.loading,onInput:t=>this.handleInput(t,o),onKeyDown:t=>this.handleKeyDown(t,o),onPaste:o===0?this.handlePaste:undefined,"aria-label":`Digit ${o+1} of ${this.codeDigits.length}`,class:"u:w-[50px] u:h-[50px] u:text-center u:text-lg u:border-2 u:border-solid u:border-slate-200 u:rounded-lg u:outline-none u:transition-colors u:duration-200",part:"digit-input"}))))}};r.style=n;export{r as u_magic_code_field};
2
+ //# sourceMappingURL=p-9f59909b.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["registerInstance","h","state","Auth","magicCodeFieldCss","MagicCodeField","constructor","hostRef","this","componentClassName","codeDigits","inputRefs","handleInput","event","index","target","value","replace","sanitizedDigit","slice","newDigits","fullCode","join","nextInput","focus","length","authenticateWithCode","handleKeyDown","key","prevInput","handlePaste","preventDefault","pastedData","clipboardData","getData","digits","split","push","firstEmptyIndex","findIndex","digit","targetIndex","async","code","authInstance","getInstance","helpers","authenticateWithMagicCode","render","step","class","map","ref","el","id","type","inputmode","maxlength","disabled","loading","onInput","onKeyDown","onPaste","undefined","part","style"],"sources":["0"],"mappings":"YAAcA,OAAkBC,MAAS,8BAC3BC,MAAa,8BACbC,MAAY,wBACnB,wBACA,wBACA,wBACA,wBACA,wBACA,wBACA,kBAEP,MAAMC,EAAoB,86PAE1B,MAAMC,EAAiB,MACnB,WAAAC,CAAYC,GACRP,EAAiBQ,KAAMD,EAC3B,CACAE,mBAAqB,GACrBC,WAAa,CAAC,GAAI,GAAI,GAAI,IAC1BC,UAAY,GACZC,YA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GAAI9C,EAAM+C,OAAS,aAAc,CAC7B,OAAO,IACX,CACA,OAAQhD,EAAE,MAAO,CAAEiD,MAAO,8CAA8C1C,KAAKC,sBAAwBD,KAAKE,WAAWyC,KAAI,CAACX,EAAO1B,IAAWb,EAAE,QAAS,CAEnJ2B,IAAKd,EAAOsC,IAAMC,IACd,GAAIA,EACA7C,KAAKG,UAAUG,GAASuC,CAAE,EAC/BC,GAAI,eAAexC,EAAQ,IAAKyC,KAAM,OAAQC,UAAW,UAAWC,UAAW,IAAKzC,MAAOwB,EAAOkB,SAAUxD,EAAMyD,QAASC,QAAU/C,GAAUL,KAAKI,YAAYC,EAAOC,GAAQ+C,UAAYhD,GAAUL,KAAKmB,cAAcd,EAAOC,GAAQgD,QAAShD,IAAU,EAAIN,KAAKsB,YAAciC,UAAW,aAAc,SAASjD,EAAQ,QAAQN,KAAKE,WAAWe,SAAUyB,MAAO,4JAA6Jc,KAAM,kBAElhB,GAEJ3D,EAAe4D,MAAQ7D,SAEdC","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ import{f as t,i as e}from"./p-Ci3aTmzp.js";const n=(t,e,n)=>{const s=t.get(e);if(!s){t.set(e,[n])}else if(!s.includes(n)){s.push(n)}};const s=(t,e)=>{let n;return(...s)=>{if(n){clearTimeout(n)}n=setTimeout((()=>{n=0;t(...s)}),e)}};const o=t=>!("isConnected"in t)||t.isConnected;const r=s((t=>{for(let e of t.keys()){t.set(e,t.get(e).filter(o))}}),2e3);const c=()=>{if(typeof t!=="function"){return{}}const s=new Map;return{dispose:()=>s.clear(),get:e=>{const o=t();if(o){n(s,e,o)}},set:t=>{const n=s.get(t);if(n){s.set(t,n.filter(e))}r(s)},reset:()=>{s.forEach((t=>t.forEach(e)));r(s)}}};const i=t=>typeof t==="function"?t():t;const f=(t,e=(t,e)=>t!==e)=>{const n=i(t);let s=new Map(Object.entries(n??{}));const o={dispose:[],get:[],set:[],reset:[]};const r=new Map;const c=()=>{s=new Map(Object.entries(i(t)??{}));o.reset.forEach((t=>t()))};const f=()=>{o.dispose.forEach((t=>t()));c()};const p=t=>{o.get.forEach((e=>e(t)));return s.get(t)};const a=(t,n)=>{const r=s.get(t);if(e(n,r,t)){s.set(t,n);o.set.forEach((e=>e(t,n,r)))}};const d=typeof Proxy==="undefined"?{}:new Proxy(n,{get(t,e){return p(e)},ownKeys(t){return Array.from(s.keys())},getOwnPropertyDescriptor(){return{enumerable:true,configurable:true}},has(t,e){return s.has(e)},set(t,e,n){a(e,n);return true}});const l=(t,e)=>{o[t].push(e);return()=>{u(o[t],e)}};const g=(e,n)=>{const s=(t,s)=>{if(t===e){n(s)}};const o=()=>n(i(t)[e]);const c=l("set",s);const f=l("reset",o);r.set(n,{setHandler:s,resetHandler:o,propName:e});return()=>{c();f();r.delete(n)}};const m=(...t)=>{const e=t.reduce(((t,e)=>{if(e.set){t.push(l("set",e.set))}if(e.get){t.push(l("get",e.get))}if(e.reset){t.push(l("reset",e.reset))}if(e.dispose){t.push(l("dispose",e.dispose))}return t}),[]);return()=>e.forEach((t=>t()))};const y=t=>{const e=s.get(t);o.set.forEach((n=>n(t,e,e)))};const w=(t,e)=>{const n=r.get(e);if(n&&n.propName===t){u(o.set,n.setHandler);u(o.reset,n.resetHandler);r.delete(e)}};return{state:d,get:p,set:a,on:l,onChange:g,use:m,dispose:f,reset:c,forceUpdate:y,removeListener:w}};const u=(t,e)=>{const n=t.indexOf(e);if(n>=0){t[n]=t[t.length-1];t.length--}};const p=(t,e)=>{const n=f(t,e);n.use(c());return n};export{p as c};
2
+ //# sourceMappingURL=p-BZ1kW_eK.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"p-BZ1kW_eK.js","sources":["../../node_modules/@stencil/store/dist/index.js"],"sourcesContent":["import { getRenderingRef, forceUpdate } from '@stencil/core';\n\nconst appendToMap = (map, propName, value) => {\n const items = map.get(propName);\n if (!items) {\n map.set(propName, [value]);\n }\n else if (!items.includes(value)) {\n items.push(value);\n }\n};\nconst debounce = (fn, ms) => {\n let timeoutId;\n return (...args) => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n timeoutId = setTimeout(() => {\n timeoutId = 0;\n fn(...args);\n }, ms);\n };\n};\n\n/**\n * Check if a possible element isConnected.\n * The property might not be there, so we check for it.\n *\n * We want it to return true if isConnected is not a property,\n * otherwise we would remove these elements and would not update.\n *\n * Better leak in Edge than to be useless.\n */\nconst isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected;\nconst cleanupElements = debounce((map) => {\n for (let key of map.keys()) {\n map.set(key, map.get(key).filter(isConnected));\n }\n}, 2_000);\nconst stencilSubscription = () => {\n if (typeof getRenderingRef !== 'function') {\n // If we are not in a stencil project, we do nothing.\n // This function is not really exported by @stencil/core.\n return {};\n }\n const elmsToUpdate = new Map();\n return {\n dispose: () => elmsToUpdate.clear(),\n get: (propName) => {\n const elm = getRenderingRef();\n if (elm) {\n appendToMap(elmsToUpdate, propName, elm);\n }\n },\n set: (propName) => {\n const elements = elmsToUpdate.get(propName);\n if (elements) {\n elmsToUpdate.set(propName, elements.filter(forceUpdate));\n }\n cleanupElements(elmsToUpdate);\n },\n reset: () => {\n elmsToUpdate.forEach((elms) => elms.forEach(forceUpdate));\n cleanupElements(elmsToUpdate);\n },\n };\n};\n\nconst unwrap = (val) => (typeof val === 'function' ? val() : val);\nconst createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {\n const unwrappedState = unwrap(defaultState);\n let states = new Map(Object.entries(unwrappedState ?? {}));\n const handlers = {\n dispose: [],\n get: [],\n set: [],\n reset: [],\n };\n // Track onChange listeners to enable removeListener functionality\n const changeListeners = new Map();\n const reset = () => {\n // When resetting the state, the default state may be a function - unwrap it to invoke it.\n // otherwise, the state won't be properly reset\n states = new Map(Object.entries(unwrap(defaultState) ?? {}));\n handlers.reset.forEach((cb) => cb());\n };\n const dispose = () => {\n // Call first dispose as resetting the state would\n // cause less updates ;)\n handlers.dispose.forEach((cb) => cb());\n reset();\n };\n const get = (propName) => {\n handlers.get.forEach((cb) => cb(propName));\n return states.get(propName);\n };\n const set = (propName, value) => {\n const oldValue = states.get(propName);\n if (shouldUpdate(value, oldValue, propName)) {\n states.set(propName, value);\n handlers.set.forEach((cb) => cb(propName, value, oldValue));\n }\n };\n const state = (typeof Proxy === 'undefined'\n ? {}\n : new Proxy(unwrappedState, {\n get(_, propName) {\n return get(propName);\n },\n ownKeys(_) {\n return Array.from(states.keys());\n },\n getOwnPropertyDescriptor() {\n return {\n enumerable: true,\n configurable: true,\n };\n },\n has(_, propName) {\n return states.has(propName);\n },\n set(_, propName, value) {\n set(propName, value);\n return true;\n },\n }));\n const on = (eventName, callback) => {\n handlers[eventName].push(callback);\n return () => {\n removeFromArray(handlers[eventName], callback);\n };\n };\n const onChange = (propName, cb) => {\n const setHandler = (key, newValue) => {\n if (key === propName) {\n cb(newValue);\n }\n };\n const resetHandler = () => cb(unwrap(defaultState)[propName]);\n // Register the handlers\n const unSet = on('set', setHandler);\n const unReset = on('reset', resetHandler);\n // Track the relationship between the user callback and internal handlers\n changeListeners.set(cb, { setHandler, resetHandler, propName });\n return () => {\n unSet();\n unReset();\n changeListeners.delete(cb);\n };\n };\n const use = (...subscriptions) => {\n const unsubs = subscriptions.reduce((unsubs, subscription) => {\n if (subscription.set) {\n unsubs.push(on('set', subscription.set));\n }\n if (subscription.get) {\n unsubs.push(on('get', subscription.get));\n }\n if (subscription.reset) {\n unsubs.push(on('reset', subscription.reset));\n }\n if (subscription.dispose) {\n unsubs.push(on('dispose', subscription.dispose));\n }\n return unsubs;\n }, []);\n return () => unsubs.forEach((unsub) => unsub());\n };\n const forceUpdate = (key) => {\n const oldValue = states.get(key);\n handlers.set.forEach((cb) => cb(key, oldValue, oldValue));\n };\n const removeListener = (propName, listener) => {\n const listenerInfo = changeListeners.get(listener);\n if (listenerInfo && listenerInfo.propName === propName) {\n // Remove the specific handlers that were created for this listener\n removeFromArray(handlers.set, listenerInfo.setHandler);\n removeFromArray(handlers.reset, listenerInfo.resetHandler);\n changeListeners.delete(listener);\n }\n };\n return {\n state,\n get,\n set,\n on,\n onChange,\n use,\n dispose,\n reset,\n forceUpdate,\n removeListener,\n };\n};\nconst removeFromArray = (array, item) => {\n const index = array.indexOf(item);\n if (index >= 0) {\n array[index] = array[array.length - 1];\n array.length--;\n }\n};\n\nconst createStore = (defaultState, shouldUpdate) => {\n const map = createObservableMap(defaultState, shouldUpdate);\n map.use(stencilSubscription());\n return map;\n};\n\nexport { createObservableMap, createStore };\n"],"names":[],"mappings":";;AAEA,MAAM,WAAW,GAAG,CAAC,GAAG,EAAE,QAAQ,EAAE,KAAK,KAAK;AAC9C,IAAI,MAAM,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC;AACnC,IAAI,IAAI,CAAC,KAAK,EAAE;AAChB,QAAQ,GAAG,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,CAAC;AAClC;AACA,SAAS,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;AACrC,QAAQ,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC;AACzB;AACA,CAAC;AACD,MAAM,QAAQ,GAAG,CAAC,EAAE,EAAE,EAAE,KAAK;AAC7B,IAAI,IAAI,SAAS;AACjB,IAAI,OAAO,CAAC,GAAG,IAAI,KAAK;AACxB,QAAQ,IAAI,SAAS,EAAE;AACvB,YAAY,YAAY,CAAC,SAAS,CAAC;AACnC;AACA,QAAQ,SAAS,GAAG,UAAU,CAAC,MAAM;AACrC,YAAY,SAAS,GAAG,CAAC;AACzB,YAAY,EAAE,CAAC,GAAG,IAAI,CAAC;AACvB,SAAS,EAAE,EAAE,CAAC;AACd,KAAK;AACL,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,WAAW,GAAG,CAAC,YAAY,KAAK,EAAE,aAAa,IAAI,YAAY,CAAC,IAAI,YAAY,CAAC,WAAW;AAClG,MAAM,eAAe,GAA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,EAAE;AACV,QAAQ,QAAQ;AAChB,QAAQ,GAAG;AACX,QAAQ,OAAO;AACf,QAAQ,KAAK;AACb,QAAQ,WAAW;AACnB,QAAQ,cAAc;AACtB,KAAK;AACL,CAAC;AACD,MAAM,eAAe,GAAG,CAAC,KAAK,EAAE,IAAI,KAAK;AACzC,IAAI,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC;AACrC,IAAI,IAAI,KAAK,IAAI,CAAC,EAAE;AACpB,QAAQ,KAAK,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;AAC9C,QAAQ,KAAK,CAAC,MAAM,EAAE;AACtB;AACA,CAAC;;AAEI,MAAC,WAAW,GAAG,CAAC,YAAY,EAAE,YAAY,KAAK;AACpD,IAAI,MAAM,GAAG,GAAG,mBAAmB,CAAC,YAAY,EAAE,YAAY,CAAC;AAC/D,IAAI,GAAG,CAAC,GAAG,CAAC,mBAAmB,EAAE,CAAC;AAClC,IAAI,OAAO,GAAG;AACd;;;;","x_google_ignoreList":[0]}
@@ -0,0 +1,2 @@
1
+ import{g as e}from"./p-DdUvQelg.js";import{t as r}from"./p-CbRhHGU5.js";import{w as t}from"./p-BlOjABPD.js";import{a as s,s as i}from"./p-C3fhudPT.js";import{e as n,d as a}from"./p-Ci3aTmzp.js";import{s as o}from"./p-C0feI0p8.js";import{c}from"./p-D1lzXl_Z.js";import{F as d}from"./p-DYtgart8.js";class l extends Error{}l.prototype.name="InvalidTokenError";function u(e){return decodeURIComponent(atob(e).replace(/(.)/g,((e,r)=>{let t=r.charCodeAt(0).toString(16).toUpperCase();if(t.length<2){t="0"+t}return"%"+t})))}function f(e){let r=e.replace(/-/g,"+").replace(/_/g,"/");switch(r.length%4){case 0:break;case 2:r+="==";break;case 3:r+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return u(r)}catch(e){return atob(r)}}function w(e,r){if(typeof e!=="string"){throw new l("Invalid token specified: must be a string")}r||(r={});const t=r.header===true?0:1;const s=e.split(".")[t];if(typeof s!=="string"){throw new l(`Invalid token specified: missing part #${t+1}`)}let i;try{i=f(s)}catch(e){throw new l(`Invalid token specified: invalid base64 for part #${t+1} (${e.message})`)}try{return JSON.parse(i)}catch(e){throw new l(`Invalid token specified: invalid json for part #${t+1} (${e.message})`)}}const _=n("PasskeyAuth");const h={NotSupportedError:"passkey_not_supported",NotAllowedError:"passkey_cancelled",SecurityError:"passkey_security_error",InvalidStateError:"passkey_invalid_state"};function p(e){const r=e.replace(/-/g,"+").replace(/_/g,"/");const t=r+"=".repeat((4-r.length%4)%4);return Uint8Array.from(atob(t),(e=>e.charCodeAt(0)))}function g(e){return{challenge:Uint8Array.from(atob(e.challenge),(e=>e.charCodeAt(0))),timeout:e.timeout||6e4,rpId:e.rpId,userVerification:e.userVerification||"required",allowCredentials:e.allowCredentials?.map((e=>({...e,id:p(e.id)})))}}function y(e){const r=e.response;return{id:e.id,rawId:btoa(String.fromCharCode(...new Uint8Array(e.rawId))),response:{authenticatorData:btoa(String.fromCharCode(...new Uint8Array(r.authenticatorData))),clientDataJSON:btoa(String.fromCharCode(...new Uint8Array(r.clientDataJSON))),signature:btoa(String.fromCharCode(...new Uint8Array(r.signature)))},type:e.type}}function m(e){if(e.sid){s.setSignInId(e.sid);return}try{const r=w(e.jwt);if(r.sid){s.setSignInId(r.sid)}}catch{}}function E(e){_.error("Passkey error:",e);let r="passkey_error";if(e instanceof DOMException){r=h[e.name]||"passkey_error"}s.setFieldError("passkey",r);s.setLoading(false)}async function k(e,r){s.setLoading(true);s.clearErrors();if(!window.PublicKeyCredential){s.setFieldError("passkey","passkey_not_supported");s.setLoading(false);return}try{const[t,n]=await e.auth.getPasskeyOptions(i.sid||undefined);if(t||!n){s.setFieldError("passkey",t||"bad_request");s.setLoading(false);return}const a=g(n);const o=await navigator.credentials.get({publicKey:a});if(!o){s.setFieldError("passkey","passkey_cancelled");s.setLoading(false);return}const c=y(o);const[d,l]=await e.auth.authenticateWithPasskey(c);const u=l;if(d||!u){s.setGlobalError("auth",d||"authentication_failed");s.setLoading(false);return}s.setToken(u.jwt);m(u);r(u)}catch(e){E(e)}}class A{client;logger=n("AuthHelpers");constructor(e){this.client=e}async createSignIn(e,t,i){if(!e){throw new Error(r("errors.required_field",{field:"Email"}))}s.setLoading(true);s.clearErrors();const[n,a]=await this.client.auth.createSignIn(e,t,i);if(n){this.handleAuthError(n,a,t?"password":"email");return}if(t){const e=w(a.jwt);s.setSignInId(e.sid);s.setToken(a.jwt);s.setLoading(false);s.getRootComponentRef()?.onAuth(a);return}if(i){s.setSignInId(a.sid);s.setMagicCodeStep("sent");s.setStep("magic-code");s.setLoading(false);return[n,a]}const o=a;s.setStep("verification");s.setEmail(e);s.setSignInId(o.sid);s.setLoginOptions(o.login_options);s.setLoading(false)}async authenticateWithPassword(e){if(!i.sid){throw new Error(r("errors.no_sign_in_id"))}if(!e){throw new Error(r("errors.required_field",{field:"Password"}))}s.setLoading(true);s.clearErrors();const[t,n]=await this.client.auth.authenticateWithPassword(i.sid,e);if(t){this.handleAuthError(t,n,"password")}else{s.setLoading(false);this.handleAuthSuccess(n);return}}async authenticateWithMagicCode(e){if(!i.sid){throw new Error(r("errors.no_sign_in_id"))}if(!e){throw new Error(r("errors.magic_code_is_missing"))}s.setLoading(true);s.clearErrors();const[t,n]=await this.client.auth.authenticateWithMagicCode(i.sid,e);if(t){this.handleAuthError(t,n,"magicCode");return}this.handleAuthSuccess(n)}authenticateWithPasskey(){return k(this.client,(e=>this.handleAuthSuccess(e)))}async logout(){const[e,r]=await this.client.auth.signOut(i.sid);if(e){s.setGlobalError("auth",e)}return[e,r]}async refreshToken(){if(i.step==="missing-fields"){return}const e=c("sid");if(e){s.setSignInId(e)}if(!i.sid){this.logger.warn("No sign-in ID in the session");return}const[r,t]=await this.client.auth.refreshToken(i.sid);if(r){s.reset();s.setGlobalError("auth",r)}else{s.setToken(t.jwt)}}async sendMagicCode(){if(!i.sid&&i.step!=="single-login"){throw new Error(r("errors.no_sign_in_id"))}s.setMagicCodeStep("requested");s.setLoading(true);s.clearErrors();if(i.step==="single-login"){const[e,r]=await this.createSignIn(i.email,undefined,true);s.setLoading(false);return[e,r]}const[e,t]=await this.client.auth.sendMagicCode(i.sid);s.setLoading(false);s.setStep("magic-code");if(!e){s.setMagicCodeStep("sent");return[null,t]}s.setFieldError("magicCode",e);if(e==="magic_code_recently_created"){s.setMagicCodeStep("sent")}return[e,t]}async sendResetPasswordEmail(){if(!i.sid){throw new Error(r("errors.no_sign_in_id"))}s.setLoading(true);s.setResetPasswordStep("requested");const[e,t]=await this.client.auth.sendResetPasswordEmail(i.sid,window.location.href);if(e){s.setFieldError("resetPassword",e)}else{s.setResetPasswordStep("sent");s.clearErrors()}s.setLoading(false)}async resetPassword(){if(!i.resetPassword.token){throw new Error("No reset token available")}if(!i.resetPassword.newPassword){s.setFieldError("resetPassword","password_required");return}if(i.resetPassword.passwordConfirmation&&i.resetPassword.newPassword!==i.resetPassword.passwordConfirmation){s.setFieldError("resetPassword","passwords_do_not_match");return}s.setLoading(true);s.clearErrors();const[e,t]=await this.client.auth.resetPassword(i.sid,i.resetPassword.token,i.resetPassword.newPassword,i.resetPassword.passwordConfirmation);if(e){s.setFieldError("resetPassword",e);if(e==="invalid_password"){s.setFieldError("password",t.error_details?.password.map((e=>r(`errors.password_requirements.${e}`))).join("\n"))}}else{s.setStep("email");s.updateResetPassword({step:"completed",token:null,newPassword:"",passwordConfirmation:""});c("reset_password_token");d.success.addMessage("Password reset successfully")}s.setLoading(false)}async handleResetPasswordRedirect(){const e=new URL(window.location.href);const r=e.searchParams;const t=r.get("reset_password_token");if(!t){return}if(i.sid){s.setLoading(true);const[e]=await this.client.auth.validateResetPasswordToken(i.sid,t);if(e){s.setFieldError("resetPassword",e);s.setStep("reset-password");s.setLoading(false);return}}s.setResetToken(t);s.setStep("reset-password");s.setLoading(false)}handleSocialAuthRedirect(){const e=new URL(window.location.href);const r=e.searchParams;const t=r.get("error");if(!t&&!r.has("sid")){return}if(!t&&r.has("sid")&&r.has("id_token")){s.setSignInId(c("sid"));const e=c("id_token");if(e){s.setToken(e);this.handleAuthSuccess({jwt:e})}else{this.logger.error("No ID token found in the URL on social auth redirect")}return}if(t!=="missing_required_fields"){this.logger.error("Social auth redirect error:",t);return}const i=c("fields");const n=c("sid");c("error");if(!i||!n){return}try{const e=JSON.parse(i);s.setSignInId(n);this.handleMissingFields(e)}catch(e){this.logger.error("Failed to parse missing fields payload:",e);s.setGlobalError("auth","invalid_required_fields_payload")}}handleAuthError(e,r,t){switch(e){case"account_not_found":s.setFieldError("email",e);break;case"missing_required_fields":{const{fields:e,sid:t}=r;this.handleMissingFields(e);if(t){s.setSignInId(t)}break}default:if(t==="password"){s.setFieldError("password",e)}else if(t==="magicCode"){s.setFieldError("magicCode",e)}else if(t==="email"){s.setFieldError("email",e)}else{s.setGlobalError("auth",e)}break}s.setLoading(false)}handleMissingFields(e){s.setMissingFields(e);o.data=e;s.setStep("missing-fields");s.setLoading(false)}handleAuthSuccess(e){s.setToken(e.jwt);s.setLoading(false);s.getRootComponentRef()?.onAuth(e)}}class I{static instance;helpers;constructor(e){this.helpers=new A(e)}static Errors={email:{NOT_FOUND:"account_not_found"},magicCode:{RECENTLY_CREATED:"magic_code_recently_created",NOT_VALID:"magic_code_not_valid",EXPIRED:"magic_code_expired",USED:"magic_code_used"},password:{INVALID:"invalid_password",NOT_SET:"password_not_set",RESET_PASSWORD_ALREADY_SENT:"reset_password_already_sent"},general:{ACCOUNT_LOCKED:"account_locked",SIGN_IN_EXPIRED:"sign_in_expired"}};static async getInstance(){if(!I.isInitialized()){await t();return I.initialize(e())}return I.instance}static async initialize(e){if(I.instance){return I.instance}I.instance=new I(e);I.instance.helpers.handleSocialAuthRedirect();await I.instance.helpers.handleResetPasswordRedirect();if(I.instance.isTokenValid(i.token)){s.setAuthenticated(true)}return I.instance}static isInitialized(){return!!I.instance}isTokenValid(e){try{let r;if(typeof e==="string"){r=w(e)}else{r=e}if(!r)return false;const t=Date.now()/1e3;return r.exp>t}catch(e){a(e);return false}}async isAuthenticated(){const e=await this.getToken();return typeof e==="string"}async getToken(){const e=i.token;if(e&&this.isTokenValid(e)){return e}await this.helpers.refreshToken();if(i.globalErrors.auth||!i.token){return this.createAuthError(r("errors.refresh_failed"),"REFRESH_FAILED",true)}return i.token}async userData(){const e=await this.getToken();if(typeof e!=="string"){return null}if(!e){return null}try{return w(e)}catch(e){a(e);return null}}async logout(){const[e,t]=await this.helpers.logout();if(e){return this.createAuthError(r("errors.sign_out_failed",{reason:e}),"SIGN_OUT_FAILED",false)}s.reset();return true}getEmail(){return i.email}createAuthError(e,r,t=false){const s=new Error(e);s.code=r;s.requiresReauth=t;return s}}export{I as A};
2
+ //# sourceMappingURL=p-BlAULXyw.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"p-BlAULXyw.js","sources":["../../node_modules/jwt-decode/build/esm/index.js","src/auth/passkey-auth.ts","src/auth/auth-helpers.ts","src/auth/auth.ts"],"sourcesContent":["export class InvalidTokenError extends Error {\n}\nInvalidTokenError.prototype.name = \"InvalidTokenError\";\nfunction b64DecodeUnicode(str) {\n return decodeURIComponent(atob(str).replace(/(.)/g, (m, p) => {\n let code = p.charCodeAt(0).toString(16).toUpperCase();\n if (code.length < 2) {\n code = \"0\" + code;\n }\n return \"%\" + code;\n }));\n}\nfunction base64UrlDecode(str) {\n let output = str.replace(/-/g, \"+\").replace(/_/g, \"/\");\n switch (output.length % 4) {\n case 0:\n break;\n case 2:\n output += \"==\";\n break;\n case 3:\n output += \"=\";\n break;\n default:\n throw new Error(\"base64 string is not of the correct length\");\n }\n try {\n return b64DecodeUnicode(output);\n }\n catch (err) {\n return atob(output);\n }\n}\nexport function jwtDecode(token, options) {\n if (typeof token !== \"string\") {\n throw new InvalidTokenError(\"Invalid token specified: must be a string\");\n }\n options || (options = {});\n const pos = options.header === true ? 0 : 1;\n const part = token.split(\".\")[pos];\n if (typeof part !== \"string\") {\n throw new InvalidTokenError(`Invalid token specified: missing part #${pos + 1}`);\n }\n let decoded;\n try {\n decoded = base64UrlDecode(part);\n }\n catch (e) {\n throw new InvalidTokenError(`Invalid token specified: invalid base64 for part #${pos + 1} (${e.message})`);\n }\n try {\n return JSON.parse(decoded);\n }\n catch (e) {\n throw new InvalidTokenError(`Invalid token specified: invalid json for part #${pos + 1} (${e.message})`);\n }\n}\n","import { jwtDecode } from \"jwt-decode\";\nimport type { PasskeyOptionsResponse, TokenResponse, UnidyClient } from \"../api\";\nimport { createLogger } from \"../logger\";\nimport type { TokenPayload } from \"./auth\";\nimport { authState, authStore } from \"./store/auth-store\";\n\nconst logger = createLogger(\"PasskeyAuth\");\n\nconst PASSKEY_ERRORS: Record<string, string> = {\n NotSupportedError: \"passkey_not_supported\",\n NotAllowedError: \"passkey_cancelled\",\n SecurityError: \"passkey_security_error\",\n InvalidStateError: \"passkey_invalid_state\",\n};\n\nfunction decodeBase64Url(base64url: string): Uint8Array {\n const base64 = base64url.replace(/-/g, \"+\").replace(/_/g, \"/\");\n const padded = base64 + \"=\".repeat((4 - (base64.length % 4)) % 4);\n return Uint8Array.from(atob(padded), (c) => c.charCodeAt(0));\n}\n\nfunction buildPublicKeyOptions(options: PasskeyOptionsResponse): PublicKeyCredentialRequestOptions {\n return {\n challenge: Uint8Array.from(atob(options.challenge), (c) => c.charCodeAt(0)),\n timeout: options.timeout || 60000,\n rpId: options.rpId,\n userVerification: (options.userVerification as UserVerificationRequirement) || \"required\",\n allowCredentials: options.allowCredentials?.map((cred) => ({\n ...cred,\n id: decodeBase64Url(cred.id),\n })),\n };\n}\n\nfunction formatCredentialForServer(credential: PublicKeyCredential) {\n const response = credential.response as AuthenticatorAssertionResponse;\n return {\n id: credential.id,\n rawId: btoa(String.fromCharCode(...new Uint8Array(credential.rawId))),\n response: {\n authenticatorData: btoa(String.fromCharCode(...new Uint8Array(response.authenticatorData))),\n clientDataJSON: btoa(String.fromCharCode(...new Uint8Array(response.clientDataJSON))),\n signature: btoa(String.fromCharCode(...new Uint8Array(response.signature))),\n },\n type: credential.type,\n };\n}\n\nfunction extractAndSetSignInId(tokenResponse: TokenResponse) {\n if (tokenResponse.sid) {\n authStore.setSignInId(tokenResponse.sid);\n return;\n }\n\n // Fallback: extract sid from JWT token payload\n try {\n const decoded = jwtDecode<TokenPayload>(tokenResponse.jwt);\n if (decoded.sid) {\n authStore.setSignInId(decoded.sid);\n }\n } catch {\n // Failed to decode JWT token to extract sid, continue without it\n }\n}\n\nfunction handlePasskeyError(error: unknown) {\n logger.error(\"Passkey error:\", error);\n\n let errorMessage = \"passkey_error\";\n if (error instanceof DOMException) {\n errorMessage = PASSKEY_ERRORS[error.name] || \"passkey_error\";\n }\n\n authStore.setFieldError(\"passkey\", errorMessage);\n authStore.setLoading(false);\n}\n\nexport async function authenticateWithPasskey(client: UnidyClient, onSuccess: (response: TokenResponse) => void) {\n authStore.setLoading(true);\n authStore.clearErrors();\n\n if (!window.PublicKeyCredential) {\n authStore.setFieldError(\"passkey\", \"passkey_not_supported\");\n authStore.setLoading(false);\n return;\n }\n\n try {\n const [optionsError, options] = await client.auth.getPasskeyOptions(authState.sid || undefined);\n\n if (optionsError || !options) {\n authStore.setFieldError(\"passkey\", optionsError || \"bad_request\");\n authStore.setLoading(false);\n return;\n }\n\n const publicKeyOptions = buildPublicKeyOptions(options as PasskeyOptionsResponse);\n\n const credential = (await navigator.credentials.get({\n publicKey: publicKeyOptions,\n })) as PublicKeyCredential | null;\n\n if (!credential) {\n authStore.setFieldError(\"passkey\", \"passkey_cancelled\");\n authStore.setLoading(false);\n return;\n }\n\n const formattedCredential = formatCredentialForServer(credential);\n\n const [verifyError, tkResponse] = await client.auth.authenticateWithPasskey(formattedCredential);\n\n const tokenResponse = tkResponse as TokenResponse;\n if (verifyError || !tokenResponse) {\n authStore.setGlobalError(\"auth\", verifyError || \"authentication_failed\");\n authStore.setLoading(false);\n return;\n }\n\n authStore.setToken(tokenResponse.jwt);\n extractAndSetSignInId(tokenResponse);\n onSuccess(tokenResponse);\n } catch (error) {\n handlePasskeyError(error);\n }\n}\n","import { jwtDecode } from \"jwt-decode\";\nimport type { CreateSignInResponse, RequiredFieldsResponse, TokenResponse, UnidyClient } from \"../api\";\nimport { authState, authStore } from \"../auth/store/auth-store\";\nimport { t } from \"../i18n\";\nimport { createLogger } from \"../logger\";\nimport type { ProfileRaw } from \"../profile\";\nimport { state as profileState } from \"../profile/store/profile-store\";\nimport { clearUrlParam } from \"../shared/component-utils\";\nimport { Flash } from \"../shared/store/flash-store\";\nimport type { TokenPayload } from \"./auth\";\nimport { authenticateWithPasskey } from \"./passkey-auth\";\n\nexport class AuthHelpers {\n private client: UnidyClient;\n private logger = createLogger(\"AuthHelpers\");\n\n constructor(client: UnidyClient) {\n this.client = client;\n }\n\n async createSignIn(email: string, password?: string, sendMagicCode?: boolean) {\n if (!email) {\n throw new Error(t(\"errors.required_field\", { field: \"Email\" }));\n }\n\n authStore.setLoading(true);\n authStore.clearErrors();\n\n const [error, response] = await this.client.auth.createSignIn(email, password, sendMagicCode);\n\n if (error) {\n this.handleAuthError(error, response, password ? \"password\" : \"email\");\n return;\n }\n\n if (password) {\n const token = jwtDecode<TokenPayload>((response as TokenResponse).jwt);\n authStore.setSignInId(token.sid);\n authStore.setToken((response as TokenResponse).jwt);\n authStore.setLoading(false);\n authStore.getRootComponentRef()?.onAuth(response as TokenResponse);\n return;\n }\n\n if (sendMagicCode) {\n authStore.setSignInId((response as CreateSignInResponse).sid);\n authStore.setMagicCodeStep(\"sent\");\n authStore.setStep(\"magic-code\");\n authStore.setLoading(false);\n return [error, response] as const;\n }\n const signInResponse = response as CreateSignInResponse;\n authStore.setStep(\"verification\");\n authStore.setEmail(email);\n authStore.setSignInId(signInResponse.sid);\n authStore.setLoginOptions(signInResponse.login_options);\n authStore.setLoading(false);\n }\n\n async authenticateWithPassword(password: string) {\n if (!authState.sid) {\n throw new Error(t(\"errors.no_sign_in_id\"));\n }\n\n if (!password) {\n throw new Error(t(\"errors.required_field\", { field: \"Password\" }));\n }\n\n authStore.setLoading(true);\n authStore.clearErrors();\n\n const [error, response] = await this.client.auth.authenticateWithPassword(authState.sid, password);\n\n if (error) {\n this.handleAuthError(error, response, \"password\");\n } else {\n authStore.setLoading(false);\n this.handleAuthSuccess(response as TokenResponse);\n return;\n }\n }\n\n async authenticateWithMagicCode(code: string) {\n if (!authState.sid) {\n throw new Error(t(\"errors.no_sign_in_id\"));\n }\n\n if (!code) {\n throw new Error(t(\"errors.magic_code_is_missing\"));\n }\n\n authStore.setLoading(true);\n authStore.clearErrors();\n\n const [error, response] = await this.client.auth.authenticateWithMagicCode(authState.sid, code);\n\n if (error) {\n this.handleAuthError(error, response, \"magicCode\");\n return;\n }\n\n this.handleAuthSuccess(response as TokenResponse);\n }\n\n authenticateWithPasskey() {\n return authenticateWithPasskey(this.client, (response) => this.handleAuthSuccess(response));\n }\n\n async logout() {\n const [error, _] = await this.client.auth.signOut(authState.sid as string);\n\n if (error) {\n authStore.setGlobalError(\"auth\", error);\n }\n\n return [error, _] as const;\n }\n\n async refreshToken() {\n if (authState.step === \"missing-fields\") {\n return;\n }\n\n const sid = clearUrlParam(\"sid\");\n if (sid) {\n authStore.setSignInId(sid);\n }\n\n if (!authState.sid) {\n this.logger.warn(\"No sign-in ID in the session\");\n return;\n }\n\n const [error, response] = await this.client.auth.refreshToken(authState.sid);\n\n if (error) {\n authStore.reset();\n authStore.setGlobalError(\"auth\", error);\n } else {\n authStore.setToken((response as TokenResponse).jwt);\n }\n }\n\n async sendMagicCode() {\n if (!authState.sid && authState.step !== \"single-login\") {\n throw new Error(t(\"errors.no_sign_in_id\"));\n }\n\n authStore.setMagicCodeStep(\"requested\");\n authStore.setLoading(true);\n authStore.clearErrors();\n\n if (authState.step === \"single-login\") {\n const [error, response] = await this.createSignIn(authState.email, undefined, true);\n authStore.setLoading(false);\n return [error, response] as const;\n }\n\n const [error, response] = await this.client.auth.sendMagicCode(authState.sid);\n\n authStore.setLoading(false);\n\n authStore.setStep(\"magic-code\");\n\n if (!error) {\n authStore.setMagicCodeStep(\"sent\");\n\n return [null, response] as const;\n }\n\n authStore.setFieldError(\"magicCode\", error);\n\n if (error === \"magic_code_recently_created\") {\n authStore.setMagicCodeStep(\"sent\");\n }\n\n return [error, response] as const;\n }\n\n async sendResetPasswordEmail() {\n if (!authState.sid) {\n throw new Error(t(\"errors.no_sign_in_id\"));\n }\n\n authStore.setLoading(true);\n authStore.setResetPasswordStep(\"requested\");\n\n const [error, _] = await this.client.auth.sendResetPasswordEmail(authState.sid, window.location.href);\n\n if (error) {\n authStore.setFieldError(\"resetPassword\", error);\n } else {\n authStore.setResetPasswordStep(\"sent\");\n authStore.clearErrors();\n }\n\n authStore.setLoading(false);\n }\n\n async resetPassword() {\n if (!authState.resetPassword.token) {\n throw new Error(\"No reset token available\");\n }\n\n if (!authState.resetPassword.newPassword) {\n authStore.setFieldError(\"resetPassword\", \"password_required\");\n return;\n }\n\n if (\n authState.resetPassword.passwordConfirmation &&\n authState.resetPassword.newPassword !== authState.resetPassword.passwordConfirmation\n ) {\n authStore.setFieldError(\"resetPassword\", \"passwords_do_not_match\");\n return;\n }\n\n authStore.setLoading(true);\n authStore.clearErrors();\n\n const [error, response] = await this.client.auth.resetPassword(\n authState.sid as string,\n authState.resetPassword.token,\n authState.resetPassword.newPassword,\n authState.resetPassword.passwordConfirmation,\n );\n\n if (error) {\n authStore.setFieldError(\"resetPassword\", error);\n\n // TODO: add proper password requirements handling --> for now this is fine\n if (error === \"invalid_password\") {\n authStore.setFieldError(\"password\", response.error_details?.password.map((p) => t(`errors.password_requirements.${p}`)).join(\"\\n\"));\n }\n } else {\n authStore.setStep(\"email\");\n authStore.updateResetPassword({\n step: \"completed\",\n token: null,\n newPassword: \"\",\n passwordConfirmation: \"\",\n });\n\n clearUrlParam(\"reset_password_token\");\n Flash.success.addMessage(\"Password reset successfully\");\n }\n\n authStore.setLoading(false);\n }\n\n async handleResetPasswordRedirect() {\n const url = new URL(window.location.href);\n const params = url.searchParams;\n const resetToken = params.get(\"reset_password_token\");\n\n if (!resetToken) {\n return;\n }\n\n if (authState.sid) {\n authStore.setLoading(true);\n\n const [error] = await this.client.auth.validateResetPasswordToken(authState.sid, resetToken);\n\n if (error) {\n authStore.setFieldError(\"resetPassword\", error);\n authStore.setStep(\"reset-password\");\n authStore.setLoading(false);\n return;\n }\n }\n\n authStore.setResetToken(resetToken);\n authStore.setStep(\"reset-password\");\n authStore.setLoading(false);\n }\n\n handleSocialAuthRedirect(): void {\n const url = new URL(window.location.href);\n const params = url.searchParams;\n const error = params.get(\"error\");\n\n // Not a social auth redirect (normal page load)\n if (!error && !params.has(\"sid\")) {\n return;\n }\n\n // Handle successful social auth redirect\n if (!error && params.has(\"sid\") && params.has(\"id_token\")) {\n authStore.setSignInId(clearUrlParam(\"sid\"));\n\n const idToken = clearUrlParam(\"id_token\");\n\n if (idToken) {\n authStore.setToken(idToken);\n this.handleAuthSuccess({ jwt: idToken } as TokenResponse);\n } else {\n this.logger.error(\"No ID token found in the URL on social auth redirect\");\n }\n\n return;\n }\n\n // Handle missing required fields\n if (error !== \"missing_required_fields\") {\n this.logger.error(\"Social auth redirect error:\", error);\n return;\n }\n\n const fieldsFromUrl = clearUrlParam(\"fields\");\n const sid = clearUrlParam(\"sid\");\n clearUrlParam(\"error\");\n\n if (!fieldsFromUrl || !sid) {\n return;\n }\n\n try {\n const fields = JSON.parse(fieldsFromUrl);\n authStore.setSignInId(sid);\n\n this.handleMissingFields(fields);\n } catch (e) {\n this.logger.error(\"Failed to parse missing fields payload:\", e);\n authStore.setGlobalError(\"auth\", \"invalid_required_fields_payload\");\n }\n }\n\n private handleAuthError(error: string, response: unknown, fallbackField?: \"email\" | \"password\" | \"magicCode\") {\n switch (error) {\n case \"account_not_found\":\n authStore.setFieldError(\"email\", error);\n break;\n\n case \"missing_required_fields\": {\n const { fields, sid } = response as RequiredFieldsResponse;\n this.handleMissingFields(fields);\n if (sid) {\n authStore.setSignInId(sid);\n }\n break;\n }\n\n default:\n if (fallbackField === \"password\") {\n authStore.setFieldError(\"password\", error);\n } else if (fallbackField === \"magicCode\") {\n authStore.setFieldError(\"magicCode\", error);\n } else if (fallbackField === \"email\") {\n authStore.setFieldError(\"email\", error);\n } else {\n // e.g. \"account_locked\", \"internal_server_error\"\n authStore.setGlobalError(\"auth\", error);\n }\n break;\n }\n\n authStore.setLoading(false);\n }\n\n private handleMissingFields(fields: RequiredFieldsResponse[\"fields\"]) {\n authStore.setMissingFields(fields);\n profileState.data = fields as ProfileRaw;\n authStore.setStep(\"missing-fields\");\n authStore.setLoading(false);\n }\n\n private handleAuthSuccess(response: TokenResponse) {\n authStore.setToken(response.jwt);\n authStore.setLoading(false);\n authStore.getRootComponentRef()?.onAuth(response);\n }\n}\n","import * as Sentry from \"@sentry/browser\";\nimport { jwtDecode } from \"jwt-decode\";\nimport type { UnidyClient } from \"../api\";\nimport { getUnidyClient } from \"../api\";\nimport { t } from \"../i18n\";\nimport { waitForConfig } from \"../shared/store/unidy-store\";\nimport { AuthHelpers } from \"./auth-helpers\";\nimport { authState, authStore } from \"./store/auth-store\";\n\nexport interface TokenPayload {\n sub: string; // unidy id\n sid: string; // sign-in id\n exp: number;\n iat: number;\n iss: string;\n aud: string;\n nonce: string;\n auth_time: number;\n email: string;\n email_verified: boolean;\n [key: string]: unknown;\n}\n\nexport type AuthError = Error & {\n code: \"TOKEN_EXPIRED\" | \"REFRESH_FAILED\" | \"NO_TOKEN\" | \"INVALID_TOKEN\" | \"SIGN_IN_NOT_FOUND\" | \"SIGN_OUT_FAILED\";\n requiresReauth: boolean;\n};\n\nexport class Auth {\n private static instance: Auth;\n\n readonly helpers: AuthHelpers;\n\n private constructor(client: UnidyClient) {\n this.helpers = new AuthHelpers(client);\n }\n\n static Errors = {\n email: {\n NOT_FOUND: \"account_not_found\",\n },\n magicCode: {\n RECENTLY_CREATED: \"magic_code_recently_created\",\n NOT_VALID: \"magic_code_not_valid\",\n EXPIRED: \"magic_code_expired\",\n USED: \"magic_code_used\",\n },\n password: {\n INVALID: \"invalid_password\",\n NOT_SET: \"password_not_set\",\n RESET_PASSWORD_ALREADY_SENT: \"reset_password_already_sent\",\n },\n general: {\n ACCOUNT_LOCKED: \"account_locked\",\n SIGN_IN_EXPIRED: \"sign_in_expired\",\n },\n } as const;\n\n static async getInstance(): Promise<Auth> {\n if (!Auth.isInitialized()) {\n await waitForConfig();\n\n return Auth.initialize(getUnidyClient());\n }\n\n return Auth.instance;\n }\n\n static async initialize(client: UnidyClient): Promise<Auth> {\n if (Auth.instance) {\n return Auth.instance;\n }\n\n Auth.instance = new Auth(client);\n\n Auth.instance.helpers.handleSocialAuthRedirect();\n await Auth.instance.helpers.handleResetPasswordRedirect();\n\n if (Auth.instance.isTokenValid(authState.token)) {\n authStore.setAuthenticated(true);\n }\n\n return Auth.instance;\n }\n\n static isInitialized(): boolean {\n return !!Auth.instance;\n }\n\n isTokenValid(token: string | TokenPayload | null): boolean {\n try {\n let decoded: TokenPayload | null;\n\n if (typeof token === \"string\") {\n decoded = jwtDecode<TokenPayload>(token);\n } else {\n decoded = token;\n }\n\n if (!decoded) return false;\n\n const currentTime = Date.now() / 1000;\n return decoded.exp > currentTime;\n } catch (error) {\n Sentry.captureException(error);\n return false;\n }\n }\n\n async isAuthenticated(): Promise<boolean> {\n const token = await this.getToken();\n return typeof token === \"string\";\n }\n\n async getToken(): Promise<string | AuthError> {\n const currentToken = authState.token;\n\n if (currentToken && this.isTokenValid(currentToken)) {\n return currentToken;\n }\n\n await this.helpers.refreshToken();\n\n if (authState.globalErrors.auth || !authState.token) {\n return this.createAuthError(t(\"errors.refresh_failed\"), \"REFRESH_FAILED\", true);\n }\n\n return authState.token as string;\n }\n\n async userData(): Promise<TokenPayload | null> {\n const token = await this.getToken();\n\n if (typeof token !== \"string\") {\n return null;\n }\n\n if (!token) {\n return null;\n }\n\n try {\n return jwtDecode<TokenPayload>(token);\n } catch (error) {\n Sentry.captureException(error);\n return null;\n }\n }\n\n async logout(): Promise<boolean | AuthError> {\n const [error, _] = await this.helpers.logout();\n\n if (error) {\n return this.createAuthError(t(\"errors.sign_out_failed\", { reason: error }), \"SIGN_OUT_FAILED\", false);\n }\n\n authStore.reset();\n\n return true;\n }\n\n getEmail(): string | null {\n return authState.email;\n }\n\n private createAuthError(message: string, code: AuthError[\"code\"], requiresReauth = false): AuthError {\n const error = new Error(message) as AuthError;\n error.code = code;\n error.requiresReauth = requiresReauth;\n\n return error;\n }\n}\n"],"names":["authState","profileState","Sentry.captureException"],"mappings":";;;;;;;;;AAAO,MAAM,iBAAiB,SAAS,KAAK,CAAC;AAC7C;AACA,iBAAiB,CAAC,SAAS,CAAC,IAAI,GAAG,mBAAmB;AACtD,SAAS,gBAAgB,CAAC,GAAG,EAAE;AAC/B,IAAI,OAAO,kBAAkB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK;AAClE,QAAQ,IAAI,IAAI,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE;AAC7D,QAAQ,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE;AAC7B,YAAY,IAAI,GAAG,GAAG,GAAG,IAAI;AAC7B;AACA,QAAQ,OAAO,GAAG,GAAG,IAAI;AACzB,KAAK,CAAC,CAAC;AACP;AACA,SAAS,eAAe,CAAC,GAAG,EAAE;AAC9B,IAAI,IAAI,MAAM,GAAG,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC;AAC1D,IAAI,QAAQ,MAAM,CAAC,MAAM,GAAG,CAAC;AAC7B,QAAQ,KAAK,CAAC;AACd,YAAY;AACZ,QAAQ,KAAK,CAAC;AACd,YAAY,MAAM,IAAI,IAAI;AAC1B,YAAY;AACZ,QAAQ,KAAK,CAAC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,OAAOF,KAAS,CAAC,KAAK;;AAGhB,IAAA,eAAe,CAAC,OAAe,EAAE,IAAuB,EAAE,cAAc,GAAG,KAAK,EAAA;AACtF,QAAA,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,OAAO,CAAc;AAC7C,QAAA,KAAK,CAAC,IAAI,GAAG,IAAI;AACjB,QAAA,KAAK,CAAC,cAAc,GAAG,cAAc;AAErC,QAAA,OAAO,KAAK;;;;;;","x_google_ignoreList":[0]}
@@ -0,0 +1,2 @@
1
+ import{c as o}from"./p-BZ1kW_eK.js";const e={mode:"production",apiKey:"",baseUrl:"",locale:"en",isConfigured:false,backendConnected:true};const n=o(e);const t=n.state;const s=n.onChange;const r=1e3;function i(){if(t.isConfigured){return Promise.resolve()}return new Promise(((o,e)=>{const n=setTimeout((()=>{t();e(new Error(`Unidy SDK: <u-config> not found or not loaded within ${r}ms`))}),r);const t=s("isConfigured",(e=>{if(e){clearTimeout(n);t();o()}}))}))}export{s as o,t as u,i as w};
2
+ //# sourceMappingURL=p-BlOjABPD.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"p-BlOjABPD.js","sources":["src/shared/store/unidy-store.ts"],"sourcesContent":["import { createStore } from \"@stencil/store\";\n\nexport interface UnidyState {\n mode: \"production\" | \"development\";\n apiKey: string;\n baseUrl: string;\n locale: string;\n\n isConfigured: boolean;\n backendConnected: boolean;\n}\n\nconst initialState: UnidyState = {\n mode: \"production\",\n apiKey: \"\",\n baseUrl: \"\",\n locale: \"en\",\n\n isConfigured: false,\n backendConnected: true,\n};\n\nconst store = createStore<UnidyState>(initialState);\n\nexport const unidyState = store.state;\nexport const reset = store.reset;\nexport const onChange: <K extends keyof UnidyState>(prop: K, cb: (value: UnidyState[K]) => void) => () => void = store.onChange;\n\nconst CONFIG_TIMEOUT_MS = 1000;\n\nexport function waitForConfig(): Promise<void> {\n if (unidyState.isConfigured) {\n return Promise.resolve();\n }\n\n return new Promise((resolve, reject) => {\n const timeout = setTimeout(() => {\n unsubscribe();\n reject(new Error(`Unidy SDK: <u-config> not found or not loaded within ${CONFIG_TIMEOUT_MS}ms`));\n }, CONFIG_TIMEOUT_MS);\n\n const unsubscribe = onChange(\"isConfigured\", (value) => {\n if (value) {\n clearTimeout(timeout);\n unsubscribe();\n resolve();\n }\n });\n });\n}\n"],"names":[],"mappings":";;AAYA,MAAM,YAAY,GAAe;AAC/B,IAAA,IAAI,EAAE,YAAY;AAClB,IAAA,MAAM,EAAE,EAAE;AACV,IAAA,OAAO,EAAE,EAAE;AACX,IAAA,MAAM,EAAE,IAAI;AAEZ,IAAA,YAAY,EAAE,KAAK;AACnB,IAAA,gBAAgB,EAAE,IAAI;CACvB;AAED,MAAM,KAAK,GAAG,WAAW,CAAa,YAAY,CAAC;AAEtC,MAAA,UAAU,GAAG,KAAK,CAAC;AAEnB,MAAA,QAAQ,GAA4F,KAAK,CAAC;AAEvH,MAAM,iBAAiB,GAAG,IAAI;SAEd,aAAa,GAAA;AAC3B,IAAA,IAAI,UAAU,CAAC,YAAY,EAAE;AAC3B,QAAA,OAAO,OAAO,CAAC,OAAO,EAAE;;IAG1B,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,KAAI;AACrC,QAAA,MAAM,OAAO,GAAG,UAAU,CAAC,MAAK;AAC9B,YAAA,WAAW,EAAE;YACb,MAAM,CAAC,IAAI,KAAK,CAAC,wDAAwD,iBAAiB,CAAA,EAAA,CAAI,CAAC,CAAC;SACjG,EAAE,iBAAiB,CAAC;QAErB,MAAM,WAAW,GAAG,QAAQ,CAAC,cAAc,EAAE,CAAC,KAAK,KAAI;YACrD,IAAI,KAAK,EAAE;gBACT,YAAY,CAAC,OAAO,CAAC;AACrB,gBAAA,WAAW,EAAE;AACb,gBAAA,OAAO,EAAE;;AAEb,SAAC,CAAC;AACJ,KAAC,CAAC;AACJ;;;;"}
@@ -0,0 +1,2 @@
1
+ function t(t){const n=t.closest("u-newsletter-root");return n||null}export{t as g};
2
+ //# sourceMappingURL=p-BqFCd65h.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"p-BqFCd65h.js","sources":["src/newsletter/components/helpers.ts"],"sourcesContent":["export function getParentNewsletterRoot(element: HTMLElement): HTMLUNewsletterRootElement | null {\n const newsletterRoot = element.closest(\"u-newsletter-root\") as HTMLUNewsletterRootElement;\n return newsletterRoot || null;\n}\n"],"names":[],"mappings":"AAAM,SAAU,uBAAuB,CAAC,OAAoB,EAAA;IAC1D,MAAM,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC,mBAAmB,CAA+B;IACzF,OAAO,cAAc,IAAI,IAAI;AAC/B;;;;"}
@@ -0,0 +1,2 @@
1
+ import{c as s}from"./p-BZ1kW_eK.js";const o={loading:true,data:{},configuration:{},errors:{},flashErrors:{},phoneValid:true};const a=s(o);const r=a.onChange;const{state:t}=a;export{r as a,a as p,t as s};
2
+ //# sourceMappingURL=p-C0feI0p8.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"p-C0feI0p8.js","sources":["src/profile/store/profile-store.ts"],"sourcesContent":["import { createStore } from \"@stencil/store\";\n\nexport type Option = { value: string; label: string; icon?: string | null };\nexport type RadioOption = { value: string; label: string; checked: boolean };\n\nexport interface ProfileNode {\n value?: string | undefined | string[];\n type?: string;\n label?: string;\n required?: boolean;\n readonly?: boolean;\n locked?: boolean;\n locked_text?: string;\n options?: Option[];\n radio_options?: RadioOption[];\n attr_name?: string;\n}\n\nexport type ProfileRaw = {\n custom_attributes?: Record<string, ProfileNode>;\n} & Record<string, ProfileNode>;\n\nexport interface ProfileState {\n loading: boolean;\n data: ProfileRaw;\n configuration: ProfileRaw;\n errors: Record<string, string | null>;\n configUpdateSource?: \"fetch\" | \"submit\";\n flashErrors: Record<string, string | null>;\n phoneValid: boolean;\n}\n\nconst initialState: ProfileState = {\n loading: true,\n data: {},\n configuration: {},\n errors: {},\n flashErrors: {},\n phoneValid: true,\n};\n\nconst profileStore = createStore<ProfileState>(initialState);\n\nconst profileStoreOnChange: <K extends keyof ProfileState>(prop: K, cb: (value: ProfileState[K]) => void) => () => void =\n profileStore.onChange;\n\nexport { profileStore };\nexport const { state } = profileStore;\nexport { profileStoreOnChange as onChange };\n"],"names":[],"mappings":";;AAgCA,MAAM,YAAY,GAAiB;AACjC,IAAA,OAAO,EAAE,IAAI;AACb,IAAA,IAAI,EAAE,EAAE;AACR,IAAA,aAAa,EAAE,EAAE;AACjB,IAAA,MAAM,EAAE,EAAE;AACV,IAAA,WAAW,EAAE,EAAE;AACf,IAAA,UAAU,EAAE,IAAI;CACjB;AAED,MAAM,YAAY,GAAG,WAAW,CAAe,YAAY;AAE3D,MAAM,oBAAoB,GACxB,YAAY,CAAC;AAGF,MAAA,EAAE,KAAK,EAAE,GAAG;;;;"}
@@ -0,0 +1,2 @@
1
+ import{c as e}from"./p-BZ1kW_eK.js";import{u as s}from"./p-BlOjABPD.js";const t=()=>{const e=i.state.missingRequiredFields??{};const{custom_attributes:s,...t}=e;return t};const o=()=>{const e=i.state.missingRequiredFields??{};return e?.custom_attributes??{}};const n=()=>{const e=Object.keys(t());const s=Object.keys(o()).map((e=>`custom_attributes.${e}`));return[...e,...s]};const r={SID:"unidy_signin_id",TOKEN:"unidy_token",EMAIL:"unidy_email"};const l=(e,s,t)=>{if(t){e.setItem(s,t)}else{e.removeItem(s)}};const a={step:undefined,email:localStorage.getItem(r.EMAIL)??"",password:"",magicCodeStep:null,resetPassword:{step:null,token:null,newPassword:"",passwordConfirmation:""},sid:localStorage.getItem(r.SID),loading:false,errors:{email:null,password:null,magicCode:null,resetPassword:null,passkey:null},globalErrors:{},authenticated:false,missingRequiredFields:undefined,availableLoginOptions:{magic_link:false,password:false,social_logins:[],passkey:true},token:sessionStorage.getItem(r.TOKEN)};const i=e(a);const{state:u,reset:d}=i;const c=i.onChange;class f{rootComponentRef=null;setRootComponentRef(e){this.rootComponentRef=e}getRootComponentRef(){return this.rootComponentRef}get state(){return u}setInitialStep(e){if(u.step===undefined)u.step=e}setEmail(e){u.email=e;u.errors.email=null;l(localStorage,r.EMAIL,e)}setPassword(e){u.password=e;u.errors.password=null}setMissingFields(e){u.missingRequiredFields=e}setLoginOptions(e){u.availableLoginOptions=e}setLoading(e){u.loading=e}setFieldError(e,s){if(!this.handleError(s))return;u.errors={...u.errors,[e]:s}}setGlobalError(e,s){if(!this.handleError(s))return;u.globalErrors={...u.globalErrors,[e]:s}}handleError(e){if(!e)return true;if(e==="connection_failed"){s.backendConnected=false;return false}if(e==="sign_in_not_found"){this.reset();return false}this.rootComponentRef?.onError(e);return true}clearFieldError(e){u.errors={...u.errors,[e]:null}}clearErrors(){u.errors=a.errors;u.globalErrors={}}setStep(e){u.step=e}setSignInId(e){u.sid=e;l(localStorage,r.SID,e)}setToken(e){u.token=e;l(sessionStorage,r.TOKEN,e);this.setAuthenticated(!!e)}setMagicCodeStep(e){u.magicCodeStep=e}setResetPasswordStep(e){u.resetPassword={...u.resetPassword,step:e}}setResetToken(e){u.resetPassword={...u.resetPassword,token:e}}setNewPassword(e){u.resetPassword={...u.resetPassword,newPassword:e}}setConfirmPassword(e){u.resetPassword={...u.resetPassword,passwordConfirmation:e}}updateResetPassword(e){u.resetPassword={...u.resetPassword,...e}}setAuthenticated(e){u.authenticated=e;if(!e){u.token=null;u.sid=null}}reset(){d();l(localStorage,r.SID,null);l(localStorage,r.EMAIL,null);l(sessionStorage,r.TOKEN,null)}}const g=new f;export{g as a,c as b,n as m,u as s};
2
+ //# sourceMappingURL=p-C3fhudPT.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"p-C3fhudPT.js","sources":["src/auth/store/auth-store.ts"],"sourcesContent":["import { createStore } from \"@stencil/store\";\nimport type { ProfileNode } from \"../../profile\";\nimport { unidyState } from \"../../shared/store/unidy-store\";\nimport type { LoginOptions, RequiredFieldsResponse } from \"../api/auth\";\nimport type { SigninRoot } from \"../components/signin-root/signin-root\";\n\nexport type AuthStep = \"email\" | \"verification\" | \"magic-code\" | \"missing-fields\" | \"reset-password\" | \"registration\" | \"single-login\";\n\nexport interface AuthState {\n step: AuthStep;\n sid: string | null;\n email: string;\n password: string;\n\n magicCodeStep: null | \"requested\" | \"sent\";\n resetPassword: {\n step: null | \"requested\" | \"sent\" | \"completed\";\n token: string | null;\n newPassword: string;\n passwordConfirmation: string;\n };\n missingRequiredFields?: RequiredFieldsResponse[\"fields\"];\n availableLoginOptions: LoginOptions | null;\n\n loading: boolean;\n errors: Record<\"email\" | \"password\" | \"magicCode\" | \"resetPassword\" | \"passkey\", string | null>;\n globalErrors: Record<string, string | null>;\n\n authenticated: boolean;\n token: string | null;\n}\n\nconst missingRequiredUserDefaultFields = () => {\n const fields = store.state.missingRequiredFields ?? ({} as RequiredFieldsResponse[\"fields\"]);\n const { custom_attributes, ...missingRequiredUserDefaultFields } = fields;\n return missingRequiredUserDefaultFields as Record<string, ProfileNode>;\n};\n\nconst missingRequiredCustomAttributeFields = () => {\n const fields = store.state.missingRequiredFields ?? ({} as RequiredFieldsResponse[\"fields\"]);\n return (fields?.custom_attributes ?? {}) as Record<string, ProfileNode>;\n};\n\nexport const missingFieldNames = () => {\n const userDefaultFields = Object.keys(missingRequiredUserDefaultFields());\n const ca = Object.keys(missingRequiredCustomAttributeFields()).map((k) => `custom_attributes.${k}`);\n return [...userDefaultFields, ...ca];\n};\n\nconst SESSION_KEYS = {\n SID: \"unidy_signin_id\",\n TOKEN: \"unidy_token\",\n EMAIL: \"unidy_email\",\n} as const;\n\nconst saveToStorage = (storage: Storage, key: string, value: string | null) => {\n if (value) {\n storage.setItem(key, value);\n } else {\n storage.removeItem(key);\n }\n};\n\nconst initialState: AuthState = {\n step: undefined,\n email: localStorage.getItem(SESSION_KEYS.EMAIL) ?? \"\",\n password: \"\",\n magicCodeStep: null,\n resetPassword: {\n step: null,\n token: null,\n newPassword: \"\",\n passwordConfirmation: \"\",\n },\n sid: localStorage.getItem(SESSION_KEYS.SID),\n loading: false,\n errors: {\n email: null,\n password: null,\n magicCode: null,\n resetPassword: null,\n passkey: null,\n },\n globalErrors: {},\n authenticated: false,\n missingRequiredFields: undefined,\n availableLoginOptions: {\n magic_link: false,\n password: false,\n social_logins: [],\n passkey: true,\n },\n token: sessionStorage.getItem(SESSION_KEYS.TOKEN),\n};\n\nconst store = createStore<AuthState>(initialState);\nconst { state, reset } = store;\n\nconst authStoreOnChange: <K extends keyof AuthState>(prop: K, cb: (value: AuthState[K]) => void) => () => void = store.onChange;\n\nclass AuthStore {\n private rootComponentRef: SigninRoot | null = null;\n\n setRootComponentRef(ref: SigninRoot) {\n this.rootComponentRef = ref;\n }\n\n getRootComponentRef() {\n return this.rootComponentRef;\n }\n\n get state() {\n return state;\n }\n\n setInitialStep(step: AuthStep) {\n if (state.step === undefined) state.step = step;\n }\n\n setEmail(email: string) {\n state.email = email;\n state.errors.email = null;\n saveToStorage(localStorage, SESSION_KEYS.EMAIL, email);\n }\n\n setPassword(password: string) {\n state.password = password;\n state.errors.password = null;\n }\n\n setMissingFields(fields: RequiredFieldsResponse[\"fields\"]) {\n state.missingRequiredFields = fields;\n }\n\n setLoginOptions(availableLoginOptions: LoginOptions) {\n state.availableLoginOptions = availableLoginOptions;\n }\n\n setLoading(loading: boolean) {\n state.loading = loading;\n }\n\n setFieldError(field: \"email\" | \"password\" | \"magicCode\" | \"resetPassword\" | \"passkey\", error: string | null) {\n if (!this.handleError(error)) return;\n\n state.errors = { ...state.errors, [field]: error };\n }\n\n setGlobalError(key: string, error: string | null) {\n if (!this.handleError(error)) return;\n state.globalErrors = { ...state.globalErrors, [key]: error };\n }\n\n private handleError(error: string | null): boolean {\n if (!error) return true;\n\n if (error === \"connection_failed\") {\n unidyState.backendConnected = false;\n return false;\n }\n\n if (error === \"sign_in_not_found\") {\n this.reset();\n return false;\n }\n\n this.rootComponentRef?.onError(error);\n return true;\n }\n\n clearFieldError(field: \"email\" | \"password\" | \"magicCode\" | \"resetPassword\" | \"passkey\") {\n state.errors = { ...state.errors, [field]: null } as Record<\n \"email\" | \"password\" | \"magicCode\" | \"resetPassword\" | \"passkey\",\n string | null\n >;\n }\n\n clearErrors() {\n state.errors = initialState.errors;\n state.globalErrors = {};\n }\n\n setStep(step: AuthStep) {\n state.step = step;\n }\n\n setSignInId(signInId: string) {\n state.sid = signInId;\n saveToStorage(localStorage, SESSION_KEYS.SID, signInId);\n }\n\n setToken(token: string) {\n state.token = token;\n saveToStorage(sessionStorage, SESSION_KEYS.TOKEN, token);\n this.setAuthenticated(!!token);\n }\n\n setMagicCodeStep(step: null | \"requested\" | \"sent\") {\n state.magicCodeStep = step;\n }\n\n setResetPasswordStep(step: null | \"requested\" | \"sent\" | \"completed\") {\n state.resetPassword = { ...state.resetPassword, step };\n }\n\n setResetToken(token: string | null) {\n state.resetPassword = { ...state.resetPassword, token };\n }\n\n setNewPassword(password: string) {\n state.resetPassword = { ...state.resetPassword, newPassword: password };\n }\n\n setConfirmPassword(password: string) {\n state.resetPassword = { ...state.resetPassword, passwordConfirmation: password };\n }\n\n updateResetPassword(updates: Partial<AuthState[\"resetPassword\"]>) {\n state.resetPassword = { ...state.resetPassword, ...updates };\n }\n\n setAuthenticated(authenticated: boolean) {\n state.authenticated = authenticated;\n\n if (!authenticated) {\n state.token = null;\n state.sid = null;\n }\n }\n\n reset() {\n reset();\n saveToStorage(localStorage, SESSION_KEYS.SID, null);\n saveToStorage(localStorage, SESSION_KEYS.EMAIL, null);\n saveToStorage(sessionStorage, SESSION_KEYS.TOKEN, null);\n }\n}\n\nexport const authStore = new AuthStore();\nexport { state as authState, authStoreOnChange as onChange };\n"],"names":[],"mappings":";;;AAgCA,MAAM,gCAAgC,GAAG,MAAK;IAC5C,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,qBAAqB,IAAK,EAAuC;IAC5F,MAAM,EAAE,iBAAiB,EAAE,GAAG,gCAAgC,EAAE,GAAG,MAAM;AACzE,IAAA,OAAO,gCAA+D;AACxE,CAAC;AAED,MAAM,oCAAoC,GAAG,MAAK;IAChD,MAAM,MAAM,GAAG,KAAK,CAA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B,EAAE,QAAQ,EAAE;;AAGlF,IAAA,mBAAmB,CAAC,OAA4C,EAAA;AAC9D,QAAA,KAAK,CAAC,aAAa,GAAG,EAAE,GAAG,KAAK,CAAC,aAAa,EAAE,GAAG,OAAO,EAAE;;AAG9D,IAAA,gBAAgB,CAAC,aAAsB,EAAA;AACrC,QAAA,KAAK,CAAC,aAAa,GAAG,aAAa;QAEnC,IAAI,CAAC,aAAa,EAAE;AAClB,YAAA,KAAK,CAAC,KAAK,GAAG,IAAI;AAClB,YAAA,KAAK,CAAC,GAAG,GAAG,IAAI;;;IAIpB,KAAK,GAAA;AACH,QAAA,KAAK,EAAE;QACP,aAAa,CAAC,YAAY,EAAE,YAAY,CAAC,GAAG,EAAE,IAAI,CAAC;QACnD,aAAa,CAAC,YAAY,EAAE,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC;QACrD,aAAa,CAAC,cAAc,EAAE,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC;;AAE1D;AAEY,MAAA,SAAS,GAAG,IAAI,SAAS;;;;"}
@@ -0,0 +1,2 @@
1
+ import{a}from"./p-Ci3aTmzp.js";const o=a;export{o as g};
2
+ //# sourceMappingURL=p-CFiZLMAA.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"p-CFiZLMAA.js","sources":["@stencil/core/internal/app-globals"],"sourcesContent":["import appGlobalScript from '/Users/coki/Projects/unidy.io/unidy-sdk/packages/sdk/src/globalScript.ts';\nexport const globalScripts = appGlobalScript;\nexport const globalStyles = \"\";\n"],"names":[],"mappings":";;AACY,MAAC,aAAa,GAAG;;;;"}
@@ -0,0 +1,2 @@
1
+ import{c as e}from"./p-BZ1kW_eK.js";const s="unidy_newsletter_";const t=e=>{sessionStorage.setItem(`${s}${e}`,c.state[e])};const n=e=>sessionStorage.getItem(`${s}${e}`);const o={email:n("email")??"",preferenceToken:n("preferenceToken")??"",checkedNewsletters:{},defaultPreferences:{},fetchingSubscriptions:false,existingSubscriptions:[],errors:{},isAuthenticated:false};const c=e(o);const r=(e,s)=>{const t=c.state.defaultPreferences[e]??new Set;const n=new Set(t);n.add(s);c.state.defaultPreferences={...c.state.defaultPreferences,[e]:n}};export{c as n,t as p,r as s};
2
+ //# sourceMappingURL=p-CPPYdoIv.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"p-CPPYdoIv.js","sources":["src/newsletter/store/newsletter-store.ts"],"sourcesContent":["import { createStore } from \"@stencil/store\";\n\nexport type NewsletterErrorIdentifier =\n | \"unconfirmed\"\n | \"already_subscribed\"\n | \"invalid_email\"\n | \"newsletter_not_found\"\n | \"preferences_not_found\"\n | \"invalid_preference_token\"\n | \"unknown\";\n\nexport type NewsletterInternalName = string;\nexport type PreferenceIdentifier = string;\n\nexport interface ExistingSubscription {\n newsletter_internal_name: NewsletterInternalName;\n confirmed: boolean;\n preference_identifiers: PreferenceIdentifier[];\n}\n\nexport type CheckedNewsletters = Record<NewsletterInternalName, PreferenceIdentifier[]>;\n\nexport type DefaultPreferences = Record<NewsletterInternalName, Set<PreferenceIdentifier>>;\n\ninterface NewsletterState {\n email: string;\n preferenceToken: string;\n checkedNewsletters: CheckedNewsletters;\n defaultPreferences: DefaultPreferences;\n\n fetchingSubscriptions: boolean;\n existingSubscriptions: ExistingSubscription[];\n\n errors: Record<string, NewsletterErrorIdentifier>;\n\n isAuthenticated: boolean;\n}\n\nconst PERSIST_KEY_PREFIX = \"unidy_newsletter_\";\n\nexport const persist = (key: \"email\" | \"preferenceToken\") => {\n sessionStorage.setItem(`${PERSIST_KEY_PREFIX}${key}`, newsletterStore.state[key]);\n};\n\nconst getPersistedValue = (key: \"email\" | \"preferenceToken\") => {\n return sessionStorage.getItem(`${PERSIST_KEY_PREFIX}${key}`);\n};\n\nconst initialState: NewsletterState = {\n email: getPersistedValue(\"email\") ?? \"\",\n preferenceToken: getPersistedValue(\"preferenceToken\") ?? \"\",\n checkedNewsletters: {},\n defaultPreferences: {},\n\n fetchingSubscriptions: false,\n existingSubscriptions: [],\n\n errors: {},\n isAuthenticated: false,\n};\n\nexport const newsletterStore = createStore<NewsletterState>(initialState);\n\nexport const storeDefaultPreference = (internalName: NewsletterInternalName, preferenceIdentifier: PreferenceIdentifier) => {\n const current = newsletterStore.state.defaultPreferences[internalName] ?? new Set();\n const updated = new Set(current);\n updated.add(preferenceIdentifier);\n newsletterStore.state.defaultPreferences = {\n ...newsletterStore.state.defaultPreferences,\n [internalName]: updated,\n };\n};\n\nexport const reset = () => {\n sessionStorage.removeItem(`${PERSIST_KEY_PREFIX}preferenceToken`);\n sessionStorage.removeItem(`${PERSIST_KEY_PREFIX}email`);\n newsletterStore.state = initialState;\n};\n"],"names":[],"mappings":";;AAsCA,MAAM,kBAAkB,GAAG,mBAAmB;AAEjC,MAAA,OAAO,GAAG,CAAC,GAAgC,KAAI;AAC1D,IAAA,cAAc,CAAC,OAAO,CAAC,CAAG,EAAA,kBAAkB,GAAG,GAAG,CAAA,CAAE,EAAE,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AACnF;AAEA,MAAM,iBAAiB,GAAG,CAAC,GAAgC,KAAI;IAC7D,OAAO,cAAc,CAAC,OAAO,CAAC,CAAA,EAAG,kBAAkB,CAAG,EAAA,GAAG,CAAE,CAAA,CAAC;AAC9D,CAAC;AAED,MAAM,YAAY,GAAoB;AACpC,IAAA,KAAK,EAAE,iBAAiB,CAAC,OAAO,CAAC,IAAI,EAAE;AACvC,IAAA,eAAe,EAAE,iBAAiB,CAAC,iBAAiB,CAAC,IAAI,EAAE;AAC3D,IAAA,kBAAkB,EAAE,EAAE;AACtB,IAAA,kBAAkB,EAAE,EAAE;AAEtB,IAAA,qBAAqB,EAAE,KAAK;AAC5B,IAAA,qBAAqB,EAAE,EAAE;AAEzB,IAAA,MAAM,EAAE,EAAE;AACV,IAAA,eAAe,EAAE,KAAK;CACvB;MAEY,eAAe,GAAG,WAAW,CAAkB,YAAY;MAE3D,sBAAsB,GAAG,CAAC,YAAoC,EAAE,oBAA0C,KAAI;AAC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