@pontive/pontkit-core 1.1.0 → 1.1.2

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 (377) hide show
  1. package/catalog.json +1 -1
  2. package/custom-elements.json +1 -1
  3. package/dist/assets/icons/account.icon.d.ts +1 -1
  4. package/dist/assets/icons/badge-check-icon.d.ts +1 -1
  5. package/dist/assets/icons/burger-menu.icon.d.ts +1 -1
  6. package/dist/assets/icons/check.d.ts +1 -1
  7. package/dist/assets/icons/clock-icon.d.ts +1 -1
  8. package/dist/assets/icons/close.icon.d.ts +1 -1
  9. package/dist/assets/icons/copy.icon.d.ts +1 -1
  10. package/dist/assets/icons/edit.icon.d.ts +1 -1
  11. package/dist/assets/icons/email.d.ts +1 -1
  12. package/dist/assets/icons/image-icon.d.ts +1 -1
  13. package/dist/assets/icons/link-icon.d.ts +1 -1
  14. package/dist/assets/icons/location.icon.d.ts +1 -1
  15. package/dist/assets/icons/members-icon.d.ts +1 -1
  16. package/dist/assets/icons/personal-info.icon.d.ts +1 -1
  17. package/dist/assets/icons/plusIcon.d.ts +1 -1
  18. package/dist/assets/icons/refresh-cw-icon.d.ts +1 -1
  19. package/dist/assets/icons/search-icon.d.ts +1 -1
  20. package/dist/assets/icons/triangle-alert.d.ts +1 -1
  21. package/dist/assets/icons/url.icon.d.ts +1 -1
  22. package/dist/assets/icons/user-round-check-icon.d.ts +1 -1
  23. package/dist/components/renderers/auth/button/_passkey-button.d.ts +2 -2
  24. package/dist/components/renderers/auth/button/_provider-button.d.ts +2 -2
  25. package/dist/components/renderers/auth/button/_submit-button.d.ts +2 -2
  26. package/dist/components/renderers/auth/button/button.defs.d.ts +1 -1
  27. package/dist/components/renderers/auth/edit-identifier/_edit-identifier.d.ts +2 -2
  28. package/dist/components/renderers/auth/field/_confirm-field.d.ts +2 -2
  29. package/dist/components/renderers/auth/field/_email-field.d.ts +2 -2
  30. package/dist/components/renderers/auth/field/_identifier-field.d.ts +2 -2
  31. package/dist/components/renderers/auth/field/_name-field.d.ts +2 -2
  32. package/dist/components/renderers/auth/field/_password-field.d.ts +2 -2
  33. package/dist/components/renderers/auth/field/_phone-field.d.ts +2 -2
  34. package/dist/components/renderers/auth/field/_username-field.d.ts +2 -2
  35. package/dist/components/renderers/auth/field/field.stories/helpers.d.ts +2 -2
  36. package/dist/components/renderers/auth/form/_form.d.ts +2 -2
  37. package/dist/components/renderers/auth/otp/_otp-resend.d.ts +2 -2
  38. package/dist/components/renderers/auth/otp/_otp.d.ts +1 -1
  39. package/dist/components/renderers/auth/provider-field/_provider-field.d.ts +2 -2
  40. package/dist/components/renderers/auth/qr-code/_qr-code.d.ts +2 -2
  41. package/dist/components/renderers/auth/recovery-codes/_recovery-codes.d.ts +1 -1
  42. package/dist/components/renderers/auth/secret/_secret.d.ts +1 -1
  43. package/dist/components/renderers/feedback/alert/_alert.d.ts +2 -2
  44. package/dist/components/renderers/feedback/alert/alert.defs.d.ts +1 -1
  45. package/dist/components/renderers/feedback/countdown/_countdown.d.ts +1 -1
  46. package/dist/components/renderers/layout/block/_block.d.ts +1 -1
  47. package/dist/components/renderers/layout/container/_container.d.ts +1 -1
  48. package/dist/components/renderers/layout/divider/_divider.d.ts +2 -2
  49. package/dist/components/renderers/layout/gap/_gap.d.ts +1 -1
  50. package/dist/components/renderers/layout/header/_header.d.ts +1 -1
  51. package/dist/components/renderers/navigation/link/_link.d.ts +2 -2
  52. package/dist/components/renderers/typography/subtitle/_subtitle.d.ts +1 -1
  53. package/dist/components/renderers/typography/title/_title.d.ts +1 -1
  54. package/dist/components/renderers/visuals/logo/_logo.d.ts +1 -1
  55. package/dist/components/renderers/visuals/watermark/_watermark.d.ts +2 -2
  56. package/dist/components/ui/badge-selector/badge-selector.d.ts +2 -2
  57. package/dist/components/ui/hint/index.d.ts +2 -2
  58. package/dist/components/ui/modal/index.d.ts +2 -2
  59. package/dist/components/ui/multi-email-input/multi-email-input.d.ts +2 -2
  60. package/dist/components/ui/multi-select-filter/pont-multi-select-filter.d.ts +2 -2
  61. package/dist/components/ui/paginator/paginator.d.ts +3 -3
  62. package/dist/components/ui/pont-sidedrawer/pont-sidedrawer.d.ts +2 -2
  63. package/dist/components/widgets/pont-account-settings/pont-account-settings.d.ts +3 -3
  64. package/dist/components/widgets/pont-account-settings/profile/components/account-info.d.ts +1 -1
  65. package/dist/components/widgets/pont-account-settings/profile/components/location-info.d.ts +1 -1
  66. package/dist/components/widgets/pont-account-settings/profile/components/personal-info.d.ts +1 -1
  67. package/dist/components/widgets/pont-account-settings/profile/components/urls-info.d.ts +1 -1
  68. package/dist/components/widgets/pont-account-settings/profile/pont-profile.d.ts +1 -1
  69. package/dist/components/widgets/pont-account-settings/security-settings/security-settings.d.ts +2 -2
  70. package/dist/components/widgets/pont-account-settings/sidebar/sidebar.d.ts +1 -1
  71. package/dist/components/widgets/pont-member-management/components/action-modal.d.ts +1 -1
  72. package/dist/components/widgets/pont-member-management/components/invitations-panel.d.ts +2 -2
  73. package/dist/components/widgets/pont-member-management/components/invite-members-form.d.ts +2 -2
  74. package/dist/components/widgets/pont-member-management/components/manage-roles-form.d.ts +2 -2
  75. package/dist/components/widgets/pont-member-management/components/members-panel.d.ts +2 -2
  76. package/dist/components/widgets/pont-member-management/components/monitoring-cards.d.ts +1 -1
  77. package/dist/components/widgets/pont-member-management/pont-member-management.d.ts +1 -1
  78. package/dist/components/widgets/pont-nav-user/pont-nav-user.d.ts +1 -1
  79. package/dist/components/widgets/pont-preview/pont-preview.d.ts +1 -1
  80. package/dist/components/widgets/pont-signin/pont-signin.d.ts +2 -2
  81. package/dist/components/widgets/pont-signup/pont-signup.d.ts +2 -2
  82. package/dist/components/wrappers/base-element/base-element.d.ts +1 -1
  83. package/dist/components/wrappers/layout/layout.d.ts +2 -2
  84. package/dist/components/wrappers/pont-auth-state/pont-auth-state.d.ts +2 -2
  85. package/dist/components/wrappers/pont-authenticated/pont-authenticated.d.ts +2 -2
  86. package/dist/components/wrappers/pont-provider/pont-provider.d.ts +1 -1
  87. package/dist/components/wrappers/pont-signed-in/pont-signed-in.d.ts +2 -2
  88. package/dist/components/wrappers/pont-signed-out/pont-signed-out.d.ts +2 -2
  89. package/dist/constants/components.d.ts +1 -1
  90. package/dist/context/branding-context.d.ts +1 -1
  91. package/dist/context/design-context.d.ts +1 -1
  92. package/dist/index.js +74 -74
  93. package/dist/index.js.map +1 -1
  94. package/dist/index.mjs +434 -434
  95. package/dist/index.mjs.map +1 -1
  96. package/dist/primitives/assets/icons/anchor.icon.d.ts +1 -1
  97. package/dist/primitives/assets/icons/app-window.icon.d.ts +1 -1
  98. package/dist/primitives/assets/icons/arrow-right.icon.d.ts +1 -1
  99. package/dist/primitives/assets/icons/arrow-up-circle.icon.d.ts +1 -1
  100. package/dist/primitives/assets/icons/arrow-up-right.icon.d.ts +1 -1
  101. package/dist/primitives/assets/icons/arrow-up.icon.d.ts +1 -1
  102. package/dist/primitives/assets/icons/arrows.icon.d.ts +1 -1
  103. package/dist/primitives/assets/icons/asterisk.icon.d.ts +1 -1
  104. package/dist/primitives/assets/icons/badge-alert.icon.d.ts +1 -1
  105. package/dist/primitives/assets/icons/badge-check.icon.d.ts +1 -1
  106. package/dist/primitives/assets/icons/badge-info.icon.d.ts +1 -1
  107. package/dist/primitives/assets/icons/badge-x.icon.d.ts +1 -1
  108. package/dist/primitives/assets/icons/bell.icon.d.ts +1 -1
  109. package/dist/primitives/assets/icons/bookmark.icon.d.ts +1 -1
  110. package/dist/primitives/assets/icons/brand-javascript.icon.d.ts +1 -1
  111. package/dist/primitives/assets/icons/captions.icon.d.ts +1 -1
  112. package/dist/primitives/assets/icons/carousel-arrow-left.d.ts +1 -1
  113. package/dist/primitives/assets/icons/carousel-arrow-right.d.ts +1 -1
  114. package/dist/primitives/assets/icons/chart.icon.d.ts +1 -1
  115. package/dist/primitives/assets/icons/check.icon.d.ts +1 -1
  116. package/dist/primitives/assets/icons/chevron-right.icon.d.ts +1 -1
  117. package/dist/primitives/assets/icons/chorven-down.icon.d.ts +1 -1
  118. package/dist/primitives/assets/icons/circle-alert.icon.d.ts +1 -1
  119. package/dist/primitives/assets/icons/circle-check.icon.d.ts +1 -1
  120. package/dist/primitives/assets/icons/circle-fading-arrow-up.icon.d.ts +1 -1
  121. package/dist/primitives/assets/icons/circle-x.icon.d.ts +1 -1
  122. package/dist/primitives/assets/icons/circle.icon.d.ts +1 -1
  123. package/dist/primitives/assets/icons/close.icon.d.ts +1 -1
  124. package/dist/primitives/assets/icons/cloud.icon.d.ts +1 -1
  125. package/dist/primitives/assets/icons/code.icon.d.ts +1 -1
  126. package/dist/primitives/assets/icons/copy.icon.d.ts +1 -1
  127. package/dist/primitives/assets/icons/corner-down-left.icon.d.ts +1 -1
  128. package/dist/primitives/assets/icons/credit-card.icon.d.ts +1 -1
  129. package/dist/primitives/assets/icons/decrease.icon.d.ts +1 -1
  130. package/dist/primitives/assets/icons/dot.icon.d.ts +1 -1
  131. package/dist/primitives/assets/icons/down.d.ts +1 -1
  132. package/dist/primitives/assets/icons/external-link.icon.d.ts +1 -1
  133. package/dist/primitives/assets/icons/eye-off.d.ts +1 -1
  134. package/dist/primitives/assets/icons/eye-off.icon.d.ts +1 -1
  135. package/dist/primitives/assets/icons/eye-on.d.ts +1 -1
  136. package/dist/primitives/assets/icons/file-code.icon.d.ts +1 -1
  137. package/dist/primitives/assets/icons/folder-code.icon.d.ts +1 -1
  138. package/dist/primitives/assets/icons/git-branch-minus.icon.d.ts +1 -1
  139. package/dist/primitives/assets/icons/git-branch-plus.icon.d.ts +1 -1
  140. package/dist/primitives/assets/icons/help-circle.icon.d.ts +1 -1
  141. package/dist/primitives/assets/icons/house.icon.d.ts +1 -1
  142. package/dist/primitives/assets/icons/inbox.icon.d.ts +1 -1
  143. package/dist/primitives/assets/icons/info.icon.d.ts +1 -1
  144. package/dist/primitives/assets/icons/loader-circle.icon.d.ts +1 -1
  145. package/dist/primitives/assets/icons/mail-warning.icon.d.ts +1 -1
  146. package/dist/primitives/assets/icons/mail.icon.d.ts +1 -1
  147. package/dist/primitives/assets/icons/minus.icon.d.ts +1 -1
  148. package/dist/primitives/assets/icons/plus.icon.d.ts +1 -1
  149. package/dist/primitives/assets/icons/rabbit.icon.d.ts +1 -1
  150. package/dist/primitives/assets/icons/radio-group.icon.d.ts +1 -1
  151. package/dist/primitives/assets/icons/radio.icon.d.ts +1 -1
  152. package/dist/primitives/assets/icons/refresh-ccw.icon.d.ts +1 -1
  153. package/dist/primitives/assets/icons/refresh-cw.icon.d.ts +1 -1
  154. package/dist/primitives/assets/icons/search.icon.d.ts +1 -1
  155. package/dist/primitives/assets/icons/settings.icon.d.ts +1 -1
  156. package/dist/primitives/assets/icons/shield-alert.icon.d.ts +1 -1
  157. package/dist/primitives/assets/icons/shopping-bag.icon.d.ts +1 -1
  158. package/dist/primitives/assets/icons/star.icon.d.ts +1 -1
  159. package/dist/primitives/assets/icons/tick.icon.d.ts +1 -1
  160. package/dist/primitives/assets/icons/up-down.d.ts +1 -1
  161. package/dist/primitives/assets/icons/up.d.ts +1 -1
  162. package/dist/primitives/assets/icons/wand.icon.d.ts +1 -1
  163. package/dist/primitives/components/ui/accordion/accordion-content.d.ts +2 -2
  164. package/dist/primitives/components/ui/accordion/accordion-item.d.ts +1 -1
  165. package/dist/primitives/components/ui/accordion/accordion-trigger.d.ts +2 -2
  166. package/dist/primitives/components/ui/accordion/accordion.d.ts +2 -2
  167. package/dist/primitives/components/ui/alert/_alert-action.d.ts +2 -2
  168. package/dist/primitives/components/ui/alert/_alert-description.d.ts +2 -2
  169. package/dist/primitives/components/ui/alert/_alert-title.d.ts +2 -2
  170. package/dist/primitives/components/ui/alert/_alert.d.ts +2 -2
  171. package/dist/primitives/components/ui/aspect-ratio/aspect-ratio.d.ts +2 -2
  172. package/dist/primitives/components/ui/avatar/_avatar-badge.d.ts +2 -2
  173. package/dist/primitives/components/ui/avatar/_avatar-fallback.d.ts +2 -2
  174. package/dist/primitives/components/ui/avatar/_avatar-group-count.d.ts +2 -2
  175. package/dist/primitives/components/ui/avatar/_avatar-group.d.ts +2 -2
  176. package/dist/primitives/components/ui/avatar/_avatar-image.d.ts +2 -2
  177. package/dist/primitives/components/ui/avatar/_avatar.d.ts +2 -2
  178. package/dist/primitives/components/ui/badge/_badge.d.ts +2 -2
  179. package/dist/primitives/components/ui/breadcrumb/breadcrumb-ellipsis.d.ts +1 -1
  180. package/dist/primitives/components/ui/breadcrumb/breadcrumb-item.d.ts +2 -2
  181. package/dist/primitives/components/ui/breadcrumb/breadcrumb-link.d.ts +2 -2
  182. package/dist/primitives/components/ui/breadcrumb/breadcrumb-list.d.ts +2 -2
  183. package/dist/primitives/components/ui/breadcrumb/breadcrumb-separator.d.ts +1 -1
  184. package/dist/primitives/components/ui/breadcrumb/breadcrumb-text.d.ts +2 -2
  185. package/dist/primitives/components/ui/breadcrumb/breadcrumb.d.ts +2 -2
  186. package/dist/primitives/components/ui/button/_button.d.ts +2 -2
  187. package/dist/primitives/components/ui/calendar/calendar.d.ts +2 -2
  188. package/dist/primitives/components/ui/card/_card-action.d.ts +2 -2
  189. package/dist/primitives/components/ui/card/_card-content.d.ts +2 -2
  190. package/dist/primitives/components/ui/card/_card-description.d.ts +2 -2
  191. package/dist/primitives/components/ui/card/_card-footer.d.ts +2 -2
  192. package/dist/primitives/components/ui/card/_card-header.d.ts +2 -2
  193. package/dist/primitives/components/ui/card/_card-title.d.ts +2 -2
  194. package/dist/primitives/components/ui/card/_card.d.ts +2 -2
  195. package/dist/primitives/components/ui/carousel/carousel.d.ts +2 -2
  196. package/dist/primitives/components/ui/checkbox/_checkbox.d.ts +2 -2
  197. package/dist/primitives/components/ui/collapsible/collapsible-content.d.ts +2 -2
  198. package/dist/primitives/components/ui/collapsible/collapsible-trigger.d.ts +2 -2
  199. package/dist/primitives/components/ui/collapsible/collapsible.d.ts +2 -2
  200. package/dist/primitives/components/ui/combobox/combo-box-empty.d.ts +2 -2
  201. package/dist/primitives/components/ui/combobox/combo-box-group.d.ts +2 -2
  202. package/dist/primitives/components/ui/combobox/combo-box-input.d.ts +2 -2
  203. package/dist/primitives/components/ui/combobox/combo-box-item.d.ts +2 -2
  204. package/dist/primitives/components/ui/combobox/combo-box-trigger.d.ts +2 -2
  205. package/dist/primitives/components/ui/combobox/combo-box-value.d.ts +2 -2
  206. package/dist/primitives/components/ui/combobox/combo-box.d.ts +2 -2
  207. package/dist/primitives/components/ui/command/command-empty.atom.d.ts +2 -2
  208. package/dist/primitives/components/ui/command/command-group.atom.d.ts +2 -2
  209. package/dist/primitives/components/ui/command/command-input.atom.d.ts +2 -2
  210. package/dist/primitives/components/ui/command/command-item.atom.d.ts +2 -2
  211. package/dist/primitives/components/ui/command/command-list.atom.d.ts +2 -2
  212. package/dist/primitives/components/ui/command/command-separator.atom.d.ts +2 -2
  213. package/dist/primitives/components/ui/command/command.d.ts +2 -2
  214. package/dist/primitives/components/ui/command/command.helpers.d.ts +6 -6
  215. package/dist/primitives/components/ui/context-menu/context-menu-checkbox-Item.d.ts +2 -2
  216. package/dist/primitives/components/ui/context-menu/context-menu-content.d.ts +2 -2
  217. package/dist/primitives/components/ui/context-menu/context-menu-group.d.ts +2 -2
  218. package/dist/primitives/components/ui/context-menu/context-menu-item.d.ts +2 -2
  219. package/dist/primitives/components/ui/context-menu/context-menu-radio-item.d.ts +2 -2
  220. package/dist/primitives/components/ui/context-menu/context-menu-seperator.d.ts +2 -2
  221. package/dist/primitives/components/ui/context-menu/context-menu-shortcut.d.ts +2 -2
  222. package/dist/primitives/components/ui/context-menu/context-menu-trigger.d.ts +2 -2
  223. package/dist/primitives/components/ui/context-menu/context-menu.d.ts +2 -2
  224. package/dist/primitives/components/ui/context-menu/context-menu.helpers.d.ts +1 -1
  225. package/dist/primitives/components/ui/data-table/data-table.d.ts +2 -2
  226. package/dist/primitives/components/ui/date-picker/date-picker.d.ts +2 -2
  227. package/dist/primitives/components/ui/dialog/dialog-close.d.ts +2 -2
  228. package/dist/primitives/components/ui/dialog/dialog-content.d.ts +2 -2
  229. package/dist/primitives/components/ui/dialog/dialog-footer.d.ts +2 -2
  230. package/dist/primitives/components/ui/dialog/dialog-header.d.ts +2 -2
  231. package/dist/primitives/components/ui/dialog/dialog-overly.d.ts +2 -2
  232. package/dist/primitives/components/ui/dialog/dialog-trigger.d.ts +2 -2
  233. package/dist/primitives/components/ui/dialog/dialog.d.ts +2 -2
  234. package/dist/primitives/components/ui/drawer/drawer-close.d.ts +2 -2
  235. package/dist/primitives/components/ui/drawer/drawer-content.d.ts +2 -2
  236. package/dist/primitives/components/ui/drawer/drawer-description.d.ts +2 -2
  237. package/dist/primitives/components/ui/drawer/drawer-footer.d.ts +2 -2
  238. package/dist/primitives/components/ui/drawer/drawer-header.d.ts +2 -2
  239. package/dist/primitives/components/ui/drawer/drawer-overlay.d.ts +2 -2
  240. package/dist/primitives/components/ui/drawer/drawer-title.d.ts +2 -2
  241. package/dist/primitives/components/ui/drawer/drawer-trigger.d.ts +2 -2
  242. package/dist/primitives/components/ui/drawer/drawer.d.ts +2 -2
  243. package/dist/primitives/components/ui/dropdown-menu/dropdown-menu-checkbox-Item.d.ts +2 -2
  244. package/dist/primitives/components/ui/dropdown-menu/dropdown-menu-content.d.ts +2 -2
  245. package/dist/primitives/components/ui/dropdown-menu/dropdown-menu-group.d.ts +2 -2
  246. package/dist/primitives/components/ui/dropdown-menu/dropdown-menu-item.d.ts +2 -2
  247. package/dist/primitives/components/ui/dropdown-menu/dropdown-menu-radio-item.d.ts +2 -2
  248. package/dist/primitives/components/ui/dropdown-menu/dropdown-menu-seperator.d.ts +2 -2
  249. package/dist/primitives/components/ui/dropdown-menu/dropdown-menu-shortcut.d.ts +2 -2
  250. package/dist/primitives/components/ui/dropdown-menu/dropdown-menu-trigger.d.ts +2 -2
  251. package/dist/primitives/components/ui/dropdown-menu/dropdown-menu.d.ts +2 -2
  252. package/dist/primitives/components/ui/dropdown-menu/dropdown-menu.helpers.d.ts +3 -3
  253. package/dist/primitives/components/ui/empty/_empty-content.d.ts +2 -2
  254. package/dist/primitives/components/ui/empty/_empty-description.d.ts +2 -2
  255. package/dist/primitives/components/ui/empty/_empty-header.d.ts +2 -2
  256. package/dist/primitives/components/ui/empty/_empty-media.d.ts +2 -2
  257. package/dist/primitives/components/ui/empty/_empty-title.d.ts +2 -2
  258. package/dist/primitives/components/ui/empty/_empty.d.ts +2 -2
  259. package/dist/primitives/components/ui/field/_field-content.d.ts +2 -2
  260. package/dist/primitives/components/ui/field/_field-description.d.ts +2 -2
  261. package/dist/primitives/components/ui/field/_field-error.d.ts +2 -2
  262. package/dist/primitives/components/ui/field/_field-group.d.ts +2 -2
  263. package/dist/primitives/components/ui/field/_field-label.d.ts +2 -2
  264. package/dist/primitives/components/ui/field/_field-legend.d.ts +2 -2
  265. package/dist/primitives/components/ui/field/_field-separator.d.ts +2 -2
  266. package/dist/primitives/components/ui/field/_field-set.d.ts +2 -2
  267. package/dist/primitives/components/ui/field/_field-title.d.ts +2 -2
  268. package/dist/primitives/components/ui/field/_field.d.ts +2 -2
  269. package/dist/primitives/components/ui/form/pont-form-controller.d.ts +2 -2
  270. package/dist/primitives/components/ui/form/pont-form-description.d.ts +1 -1
  271. package/dist/primitives/components/ui/form/pont-form-field.d.ts +1 -1
  272. package/dist/primitives/components/ui/form/pont-form-item.d.ts +1 -1
  273. package/dist/primitives/components/ui/form/pont-form-label.d.ts +1 -1
  274. package/dist/primitives/components/ui/form/pont-form-message.d.ts +2 -2
  275. package/dist/primitives/components/ui/form/pont-form.d.ts +1 -1
  276. package/dist/primitives/components/ui/hoverCard/hover-card-content.d.ts +2 -2
  277. package/dist/primitives/components/ui/hoverCard/hover-card-trigger.d.ts +2 -2
  278. package/dist/primitives/components/ui/hoverCard/hover-card.d.ts +2 -2
  279. package/dist/primitives/components/ui/input/_input.d.ts +2 -2
  280. package/dist/primitives/components/ui/input-group/_input-group-addon.d.ts +2 -2
  281. package/dist/primitives/components/ui/input-group/_input-group-button.d.ts +2 -2
  282. package/dist/primitives/components/ui/input-group/_input-group-input.d.ts +2 -2
  283. package/dist/primitives/components/ui/input-group/_input-group-text.d.ts +2 -2
  284. package/dist/primitives/components/ui/input-group/_input-group-textarea.d.ts +2 -2
  285. package/dist/primitives/components/ui/input-group/_input-group.d.ts +2 -2
  286. package/dist/primitives/components/ui/input-otp/_input-otp-group.d.ts +2 -2
  287. package/dist/primitives/components/ui/input-otp/_input-otp-separator.d.ts +2 -2
  288. package/dist/primitives/components/ui/input-otp/_input-otp-slot.d.ts +2 -2
  289. package/dist/primitives/components/ui/input-otp/_input-otp.d.ts +2 -2
  290. package/dist/primitives/components/ui/item/_item-actions.d.ts +2 -2
  291. package/dist/primitives/components/ui/item/_item-content.d.ts +2 -2
  292. package/dist/primitives/components/ui/item/_item-description.d.ts +2 -2
  293. package/dist/primitives/components/ui/item/_item-footer.d.ts +2 -2
  294. package/dist/primitives/components/ui/item/_item-group.d.ts +2 -2
  295. package/dist/primitives/components/ui/item/_item-header.d.ts +2 -2
  296. package/dist/primitives/components/ui/item/_item-media.d.ts +2 -2
  297. package/dist/primitives/components/ui/item/_item-separator.d.ts +2 -2
  298. package/dist/primitives/components/ui/item/_item-title.d.ts +2 -2
  299. package/dist/primitives/components/ui/item/_item.d.ts +2 -2
  300. package/dist/primitives/components/ui/kbd/_kbd-group.d.ts +2 -2
  301. package/dist/primitives/components/ui/kbd/_kbd.d.ts +2 -2
  302. package/dist/primitives/components/ui/label/_label.d.ts +2 -2
  303. package/dist/primitives/components/ui/menubar/menubar-checkbox.item.d.ts +2 -2
  304. package/dist/primitives/components/ui/menubar/menubar-content.d.ts +2 -2
  305. package/dist/primitives/components/ui/menubar/menubar-group.d.ts +2 -2
  306. package/dist/primitives/components/ui/menubar/menubar-item.d.ts +2 -2
  307. package/dist/primitives/components/ui/menubar/menubar-menu.d.ts +2 -2
  308. package/dist/primitives/components/ui/menubar/menubar-radio-item.d.ts +2 -2
  309. package/dist/primitives/components/ui/menubar/menubar-separator.d.ts +2 -2
  310. package/dist/primitives/components/ui/menubar/menubar-shortcut.d.ts +2 -2
  311. package/dist/primitives/components/ui/menubar/menubar-trigger.d.ts +2 -2
  312. package/dist/primitives/components/ui/menubar/menubar.d.ts +2 -2
  313. package/dist/primitives/components/ui/menubar/menubar.helpers.d.ts +3 -3
  314. package/dist/primitives/components/ui/navigation-menu/navigation-menu-content.d.ts +2 -2
  315. package/dist/primitives/components/ui/navigation-menu/navigation-menu-item.d.ts +2 -2
  316. package/dist/primitives/components/ui/navigation-menu/navigation-menu-link.d.ts +2 -2
  317. package/dist/primitives/components/ui/navigation-menu/navigation-menu-list.d.ts +2 -2
  318. package/dist/primitives/components/ui/navigation-menu/navigation-menu-trigger.d.ts +2 -2
  319. package/dist/primitives/components/ui/navigation-menu/navigation-menu.d.ts +2 -2
  320. package/dist/primitives/components/ui/pagination/pagination-content.d.ts +2 -2
  321. package/dist/primitives/components/ui/pagination/pagination-ellipsis.d.ts +2 -2
  322. package/dist/primitives/components/ui/pagination/pagination-item.d.ts +2 -2
  323. package/dist/primitives/components/ui/pagination/pagination-link.d.ts +2 -2
  324. package/dist/primitives/components/ui/pagination/pagination-next.d.ts +2 -2
  325. package/dist/primitives/components/ui/pagination/pagination-previous.d.ts +2 -2
  326. package/dist/primitives/components/ui/pagination/pagination.d.ts +2 -2
  327. package/dist/primitives/components/ui/password-input/_password-input.d.ts +2 -2
  328. package/dist/primitives/components/ui/popover/popover-content.d.ts +2 -2
  329. package/dist/primitives/components/ui/popover/popover-trigger.d.ts +2 -2
  330. package/dist/primitives/components/ui/popover/popover.d.ts +2 -2
  331. package/dist/primitives/components/ui/progress/progress.d.ts +2 -2
  332. package/dist/primitives/components/ui/radio-group/radio-group-item.d.ts +2 -2
  333. package/dist/primitives/components/ui/radio-group/radio-group.d.ts +2 -2
  334. package/dist/primitives/components/ui/scroll-area/scroll-area.d.ts +1 -1
  335. package/dist/primitives/components/ui/select/select-group.d.ts +1 -1
  336. package/dist/primitives/components/ui/select/select-item.d.ts +2 -2
  337. package/dist/primitives/components/ui/select/select-label.d.ts +2 -2
  338. package/dist/primitives/components/ui/select/select-list.d.ts +2 -2
  339. package/dist/primitives/components/ui/select/select-seperator.d.ts +2 -2
  340. package/dist/primitives/components/ui/select/select-trigger.d.ts +2 -2
  341. package/dist/primitives/components/ui/select/select-value.d.ts +1 -1
  342. package/dist/primitives/components/ui/select/select.d.ts +2 -2
  343. package/dist/primitives/components/ui/separator/_separator.d.ts +2 -2
  344. package/dist/primitives/components/ui/skeleton/skeleton.d.ts +1 -1
  345. package/dist/primitives/components/ui/spinner/_spinner.d.ts +2 -2
  346. package/dist/primitives/components/ui/switch/switch.d.ts +2 -2
  347. package/dist/primitives/components/ui/table/table.d.ts +2 -2
  348. package/dist/primitives/components/ui/tabs/_tabs-content.d.ts +2 -2
  349. package/dist/primitives/components/ui/tabs/_tabs-list.d.ts +2 -2
  350. package/dist/primitives/components/ui/tabs/_tabs-trigger.d.ts +2 -2
  351. package/dist/primitives/components/ui/tabs/_tabs.d.ts +2 -2
  352. package/dist/primitives/components/ui/textarea/_textarea.d.ts +2 -2
  353. package/dist/primitives/components/ui/toast/toast-action.d.ts +2 -2
  354. package/dist/primitives/components/ui/toast/toast-description.d.ts +2 -2
  355. package/dist/primitives/components/ui/toast/toast-title.d.ts +2 -2
  356. package/dist/primitives/components/ui/toast/toast-trigger.d.ts +2 -2
  357. package/dist/primitives/components/ui/toast/toast-view-port.d.ts +2 -2
  358. package/dist/primitives/components/ui/toast/toast.d.ts +2 -2
  359. package/dist/primitives/components/ui/toggle/toggle.d.ts +2 -2
  360. package/dist/primitives/components/ui/toggle-group/toggle-group-item.d.ts +2 -2
  361. package/dist/primitives/components/ui/toggle-group/toggle-group.d.ts +2 -2
  362. package/dist/primitives/components/ui/typography/_typography-blockquote.d.ts +2 -2
  363. package/dist/primitives/components/ui/typography/_typography-code.d.ts +2 -2
  364. package/dist/primitives/components/ui/typography/_typography-h.d.ts +2 -2
  365. package/dist/primitives/components/ui/typography/_typography-large.d.ts +2 -2
  366. package/dist/primitives/components/ui/typography/_typography-lead.d.ts +2 -2
  367. package/dist/primitives/components/ui/typography/_typography-list.d.ts +2 -2
  368. package/dist/primitives/components/ui/typography/_typography-muted.d.ts +2 -2
  369. package/dist/primitives/components/ui/typography/_typography-p.d.ts +2 -2
  370. package/dist/primitives/components/ui/typography/_typography-small.d.ts +2 -2
  371. package/dist/primitives/components/ui/typography/_typography-table.d.ts +1 -1
  372. package/dist/primitives/helpers/base-element.d.ts +1 -1
  373. package/dist/primitives/helpers/mouse-conroller.helper.d.ts +1 -1
  374. package/dist/primitives/helpers/shadow-wrapper.d.ts +3 -3
  375. package/dist/primitives/helpers/widget-controller.d.ts +1 -1
  376. package/dist/types/components/user-profile.d.ts +1 -1
  377. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1299,7 +1299,7 @@
1299
1299
  * @license
1300
1300
  * Copyright 2022 Google LLC
1301
1301
  * SPDX-License-Identifier: BSD-3-Clause
1302
- */function ct({context:e,subscribe:t}){return(r,n)=>{typeof n=="object"?n.addInitializer((function(){new si(this,{context:e,callback:o=>{r.set.call(this,o)},subscribe:t})})):r.constructor.addInitializer((o=>{new si(o,{context:e,callback:i=>{o[n]=i},subscribe:t})}))}}class Jp{constructor(){this.values={},this.errors={},this.validators={},this.subscribers=new Set}registerField({name:t,defaultValue:r="",validator:n}){t in this.values||(this.values[t]=r),n&&(this.validators[t]=n)}unregisterField(t){delete this.values[t],delete this.errors[t],delete this.validators[t]}setValue(t,r){t in this.validators||console.warn(`[FormController] setValue called before validator was registered for "${t}"`),this.values[t]=r,this.validateField(t),this.notify()}getValue(t){return this.values[t]}getError(t){return this.errors[t]??null}validateField(t){const r=this.validators[t],n=this.values[t],o=r?r(n):null;return this.errors[t]=o,this.notify(),!o}validateAll(){let t=!0;return Object.keys(this.validators).forEach(r=>{this.validateField(r)||(t=!1)}),t}subscribe(t){return this.subscribers.add(t),()=>this.subscribers.delete(t)}notify(){this.subscribers.forEach(t=>t())}getValues(){return{...this.values}}getErrors(){return{...this.errors}}}const $n="pont-form-context",es=new WeakMap,_b=Eo(class extends $p{render(e){return h}update(e,[t]){var n;const r=t!==this.G;return r&&this.rt(void 0),(r||this.lt!==this.ct)&&(this.G=t,this.ht=(n=e.options)==null?void 0:n.host,this.rt(this.ct=e.element)),h}rt(e){if(this.G!==void 0)if(this.isConnected||(e=void 0),typeof this.G=="function"){const t=this.ht??globalThis;let r=es.get(t);r===void 0&&(r=new WeakMap,es.set(t,r)),r.get(this.G)!==void 0&&this.G.call(this.ht,void 0),r.set(this.G,e),e!==void 0&&this.G.call(this.ht,e)}else this.G.value=e}get lt(){var e,t;return typeof this.G=="function"?(e=es.get(this.ht??globalThis))==null?void 0:e.get(this.G):(t=this.G)==null?void 0:t.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var wb=Object.defineProperty,$b=Object.getOwnPropertyDescriptor,Xp=(e,t,r,n)=>{for(var o=n>1?void 0:n?$b(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&wb(t,r,o),o};let ra=class extends y{constructor(){super(...arguments),this.form=new Jp,this.handleSubmit=e=>{if(e.preventDefault(),this.form.validateAll()){const r=this.form.getValues();alert(JSON.stringify(r,null,2))}}}createRenderRoot(){return this}async firstUpdated(e){await this.updateComplete,Array.from(this.childNodes).forEach(t=>{t!==this.formElement&&this.formElement.appendChild(t)}),this.querySelectorAll("pont-form-field").forEach(t=>{const r=t.getAttribute("name"),n=t.validators,o=n==null?void 0:n[0];this.form.registerField({name:r,validator:o})})}render(){return l`
1302
+ */function pt({context:e,subscribe:t}){return(r,n)=>{typeof n=="object"?n.addInitializer((function(){new si(this,{context:e,callback:o=>{r.set.call(this,o)},subscribe:t})})):r.constructor.addInitializer((o=>{new si(o,{context:e,callback:i=>{o[n]=i},subscribe:t})}))}}class Jp{constructor(){this.values={},this.errors={},this.validators={},this.subscribers=new Set}registerField({name:t,defaultValue:r="",validator:n}){t in this.values||(this.values[t]=r),n&&(this.validators[t]=n)}unregisterField(t){delete this.values[t],delete this.errors[t],delete this.validators[t]}setValue(t,r){t in this.validators||console.warn(`[FormController] setValue called before validator was registered for "${t}"`),this.values[t]=r,this.validateField(t),this.notify()}getValue(t){return this.values[t]}getError(t){return this.errors[t]??null}validateField(t){const r=this.validators[t],n=this.values[t],o=r?r(n):null;return this.errors[t]=o,this.notify(),!o}validateAll(){let t=!0;return Object.keys(this.validators).forEach(r=>{this.validateField(r)||(t=!1)}),t}subscribe(t){return this.subscribers.add(t),()=>this.subscribers.delete(t)}notify(){this.subscribers.forEach(t=>t())}getValues(){return{...this.values}}getErrors(){return{...this.errors}}}const $n="pont-form-context",es=new WeakMap,_b=Eo(class extends $p{render(e){return h}update(e,[t]){var n;const r=t!==this.G;return r&&this.rt(void 0),(r||this.lt!==this.ct)&&(this.G=t,this.ht=(n=e.options)==null?void 0:n.host,this.rt(this.ct=e.element)),h}rt(e){if(this.G!==void 0)if(this.isConnected||(e=void 0),typeof this.G=="function"){const t=this.ht??globalThis;let r=es.get(t);r===void 0&&(r=new WeakMap,es.set(t,r)),r.get(this.G)!==void 0&&this.G.call(this.ht,void 0),r.set(this.G,e),e!==void 0&&this.G.call(this.ht,e)}else this.G.value=e}get lt(){var e,t;return typeof this.G=="function"?(e=es.get(this.ht??globalThis))==null?void 0:e.get(this.G):(t=this.G)==null?void 0:t.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var wb=Object.defineProperty,$b=Object.getOwnPropertyDescriptor,Xp=(e,t,r,n)=>{for(var o=n>1?void 0:n?$b(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&wb(t,r,o),o};let ra=class extends y{constructor(){super(...arguments),this.form=new Jp,this.handleSubmit=e=>{if(e.preventDefault(),this.form.validateAll()){const r=this.form.getValues();alert(JSON.stringify(r,null,2))}}}createRenderRoot(){return this}async firstUpdated(e){await this.updateComplete,Array.from(this.childNodes).forEach(t=>{t!==this.formElement&&this.formElement.appendChild(t)}),this.querySelectorAll("pont-form-field").forEach(t=>{const r=t.getAttribute("name"),n=t.validators,o=n==null?void 0:n[0];this.form.registerField({name:r,validator:o})})}render(){return l`
1303
1303
  <form
1304
1304
  part="form-controller"
1305
1305
  class="${u("",this.className)}"
@@ -1312,10 +1312,10 @@
1312
1312
  part="form-description"
1313
1313
  class="${u(Cb,this.className)}"
1314
1314
  ></p>
1315
- `}};eh([ct({context:th})],oa.prototype,"itemContext",2);oa=eh([p("pont-form-description")],oa);const Tb="pont-form-field-context";var Db=Object.defineProperty,Lb=Object.getOwnPropertyDescriptor,Fo=(e,t,r,n)=>{for(var o=n>1?void 0:n?Lb(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Db(t,r,o),o};let He=class extends y{constructor(){super(...arguments),this.name="",this.validators=[],this.defaultValue="",this.fieldName="",this.registered=!1}createRenderRoot(){return this}get _container(){return this.querySelector("div[part=form-field]")}updated(){var t;if(this.registered||!this.form||!this.name)return;this.form.registerField({name:this.name,validator:r=>{for(const n of this.validators??[]){const o=n(r);if(o)return o}return null},defaultValue:this.defaultValue}),this.registered=!0,this.moveLightDomChildrenInto(this._container);const e=(t=this._container)==null?void 0:t.querySelector("pont-input, input, textarea, select");e&&(e.value=this.defaultValue??"",this.form.setValue(this.name,this.defaultValue??""),e.addEventListener("input",()=>{this.form.setValue(this.name,e.value)}))}disconnectedCallback(){var e;super.disconnectedCallback(),this.isConnected||(e=this.form)==null||e.unregisterField(this.name)}render(){return l`<div
1315
+ `}};eh([pt({context:th})],oa.prototype,"itemContext",2);oa=eh([p("pont-form-description")],oa);const Tb="pont-form-field-context";var Db=Object.defineProperty,Lb=Object.getOwnPropertyDescriptor,Fo=(e,t,r,n)=>{for(var o=n>1?void 0:n?Lb(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Db(t,r,o),o};let He=class extends y{constructor(){super(...arguments),this.name="",this.validators=[],this.defaultValue="",this.fieldName="",this.registered=!1}createRenderRoot(){return this}get _container(){return this.querySelector("div[part=form-field]")}updated(){var t;if(this.registered||!this.form||!this.name)return;this.form.registerField({name:this.name,validator:r=>{for(const n of this.validators??[]){const o=n(r);if(o)return o}return null},defaultValue:this.defaultValue}),this.registered=!0,this.moveLightDomChildrenInto(this._container);const e=(t=this._container)==null?void 0:t.querySelector("pont-input, input, textarea, select");e&&(e.value=this.defaultValue??"",this.form.setValue(this.name,this.defaultValue??""),e.addEventListener("input",()=>{this.form.setValue(this.name,e.value)}))}disconnectedCallback(){var e;super.disconnectedCallback(),this.isConnected||(e=this.form)==null||e.unregisterField(this.name)}render(){return l`<div
1316
1316
  part="form-field"
1317
1317
  class="${u(Sb,this.className)}"
1318
- ></div>`}};Fo([ct({context:$n})],He.prototype,"form",2);Fo([a({type:String})],He.prototype,"name",2);Fo([a({type:Array})],He.prototype,"validators",2);Fo([a({type:String})],He.prototype,"defaultValue",2);Fo([Wt({context:Tb})],He.prototype,"fieldName",2);He=Fo([p("pont-form-field")],He);var Fb=Object.defineProperty,kb=Object.getOwnPropertyDescriptor,rh=(e,t,r,n)=>{for(var o=n>1?void 0:n?kb(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Fb(t,r,o),o};let na=class extends y{constructor(){super(...arguments),this._generatedId=crypto.randomUUID(),this.itemContext={id:this._generatedId}}createRenderRoot(){return this}get _container(){return this.querySelector("div[part=form-item]")}firstUpdated(){this.moveLightDomChildrenInto(this._container)}render(){return l`<div
1318
+ ></div>`}};Fo([pt({context:$n})],He.prototype,"form",2);Fo([a({type:String})],He.prototype,"name",2);Fo([a({type:Array})],He.prototype,"validators",2);Fo([a({type:String})],He.prototype,"defaultValue",2);Fo([Wt({context:Tb})],He.prototype,"fieldName",2);He=Fo([p("pont-form-field")],He);var Fb=Object.defineProperty,kb=Object.getOwnPropertyDescriptor,rh=(e,t,r,n)=>{for(var o=n>1?void 0:n?kb(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Fb(t,r,o),o};let na=class extends y{constructor(){super(...arguments),this._generatedId=crypto.randomUUID(),this.itemContext={id:this._generatedId}}createRenderRoot(){return this}get _container(){return this.querySelector("div[part=form-item]")}firstUpdated(){this.moveLightDomChildrenInto(this._container)}render(){return l`<div
1319
1319
  part="form-item"
1320
1320
  class="${u(Eb,this.className)}"
1321
1321
  ></div>`}};rh([Wt({context:th})],na.prototype,"itemContext",2);na=rh([p("pont-form-item")],na);var Nb=Object.defineProperty,Mb=Object.getOwnPropertyDescriptor,Wa=(e,t,r,n)=>{for(var o=n>1?void 0:n?Mb(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Nb(t,r,o),o};let ai=class extends y{constructor(){super(...arguments),this.hasError=!1,this.unsubscribe=null}get _field(){let e=this.parentElement;for(;e&&!(e instanceof He);)e=e.parentElement;return e}createRenderRoot(){return this}get _label(){return this.querySelector("label[part=form-label]")}firstUpdated(){this.moveLightDomChildrenInto(this._label)}connectedCallback(){super.connectedCallback();const e=this._field.name;this.hasError=!!this.form.getError(e),this.unsubscribe=this.form.subscribe(()=>{const t=this.form.getError(e);this.hasError=!!t,this.requestUpdate()})}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribe&&this.unsubscribe()}render(){return l`
@@ -1324,12 +1324,12 @@
1324
1324
  for="${this._field.name}"
1325
1325
  class="${u(xb,this.hasError&&Ob,this.className)}"
1326
1326
  ></label>
1327
- `}};Wa([ct({context:$n})],ai.prototype,"form",2);Wa([g()],ai.prototype,"hasError",2);ai=Wa([p("pont-form-label")],ai);var Bb=Object.defineProperty,Ub=Object.getOwnPropertyDescriptor,Ya=(e,t,r,n)=>{for(var o=n>1?void 0:n?Ub(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Bb(t,r,o),o};let li=class extends f{constructor(){super(...arguments),this.error=null,this.unsubscribe=null}get _field(){let e=this.parentElement;for(;e&&!(e instanceof He);)e=e.parentElement;return e}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.error=this.form.getError(this._field.name),this.unsubscribe=this.form.subscribe(()=>{this.error=this.form.getErrors()[this._field.name],this.requestUpdate()})}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribe&&this.unsubscribe()}render(){return this.error?l`<p
1327
+ `}};Wa([pt({context:$n})],ai.prototype,"form",2);Wa([g()],ai.prototype,"hasError",2);ai=Wa([p("pont-form-label")],ai);var Bb=Object.defineProperty,Ub=Object.getOwnPropertyDescriptor,Ya=(e,t,r,n)=>{for(var o=n>1?void 0:n?Ub(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Bb(t,r,o),o};let li=class extends f{constructor(){super(...arguments),this.error=null,this.unsubscribe=null}get _field(){let e=this.parentElement;for(;e&&!(e instanceof He);)e=e.parentElement;return e}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.error=this.form.getError(this._field.name),this.unsubscribe=this.form.subscribe(()=>{this.error=this.form.getErrors()[this._field.name],this.requestUpdate()})}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribe&&this.unsubscribe()}render(){return this.error?l`<p
1328
1328
  id="${this._field.name}-message"
1329
1329
  class="${u(Rb,this.className)}"
1330
1330
  >
1331
1331
  ${this.error}
1332
- </p>`:null}};Ya([ct({context:$n})],li.prototype,"form",2);Ya([g()],li.prototype,"error",2);li=Ya([p("pont-form-message")],li);var jb=Object.defineProperty,qb=Object.getOwnPropertyDescriptor,Qa=(e,t,r,n)=>{for(var o=n>1?void 0:n?qb(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&jb(t,r,o),o};let di=class extends y{constructor(){super(...arguments),this.form=new Jp,this.onSubmit=()=>{},this.handleSubmit=t=>{t.preventDefault(),this.form.validateAll()&&this.onSubmit(this.form.getValues())}}createRenderRoot(){return this}get _formElement(){return this.querySelector("form[part=form-root]")}firstUpdated(){this.moveLightDomChildrenInto(this._formElement)}render(){return l`
1332
+ </p>`:null}};Ya([pt({context:$n})],li.prototype,"form",2);Ya([g()],li.prototype,"error",2);li=Ya([p("pont-form-message")],li);var jb=Object.defineProperty,qb=Object.getOwnPropertyDescriptor,Qa=(e,t,r,n)=>{for(var o=n>1?void 0:n?qb(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&jb(t,r,o),o};let di=class extends y{constructor(){super(...arguments),this.form=new Jp,this.onSubmit=()=>{},this.handleSubmit=t=>{t.preventDefault(),this.form.validateAll()&&this.onSubmit(this.form.getValues())}}createRenderRoot(){return this}get _formElement(){return this.querySelector("form[part=form-root]")}firstUpdated(){this.moveLightDomChildrenInto(this._formElement)}render(){return l`
1333
1333
  <form
1334
1334
  part="form-root"
1335
1335
  id="pont-form-root"
@@ -1434,7 +1434,7 @@
1434
1434
  .onFocus=${this.onFocus}
1435
1435
  .onBlur=${this.onBlur}
1436
1436
  ></pont-input>
1437
- `}};Q([a({type:String})],G.prototype,"accept",2);Q([a({type:String})],G.prototype,"autocomplete",2);Q([a({type:Boolean})],G.prototype,"disabled",2);Q([a({type:String})],G.prototype,"form",2);Q([a({type:String})],G.prototype,"id",2);Q([a({type:Boolean})],G.prototype,"invalid",2);Q([a({type:Number})],G.prototype,"max",2);Q([a({type:Number})],G.prototype,"maxlength",2);Q([a({type:Number})],G.prototype,"min",2);Q([a({type:Number})],G.prototype,"minlength",2);Q([a({type:Boolean})],G.prototype,"multiple",2);Q([a({type:String})],G.prototype,"name",2);Q([a({type:String})],G.prototype,"pattern",2);Q([a({type:String})],G.prototype,"placeholder",2);Q([a({type:Boolean})],G.prototype,"readonly",2);Q([a({type:Boolean})],G.prototype,"required",2);Q([a({type:Number})],G.prototype,"step",2);Q([a({type:String})],G.prototype,"type",2);Q([a({type:String})],G.prototype,"value",2);Q([a({attribute:!1})],G.prototype,"onClick",2);Q([a({attribute:!1})],G.prototype,"onInput",2);Q([a({attribute:!1})],G.prototype,"onChange",2);Q([a({attribute:!1})],G.prototype,"onFocus",2);Q([a({attribute:!1})],G.prototype,"onBlur",2);G=Q([p("pont-input-group-input")],G);var iy=Object.getOwnPropertyDescriptor,sy=(e,t,r,n)=>{for(var o=n>1?void 0:n?iy(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let Bd=class extends f{createRenderRoot(){return this}get _textSlot(){return this.querySelector('[data-slot="input-group-text"]')}firstUpdated(){const e=this._textSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<span data-slot="input-group-text"></span>`}};Bd=sy([p("pont-input-group-text")],Bd);var ay=Object.defineProperty,ly=Object.getOwnPropertyDescriptor,gt=(e,t,r,n)=>{for(var o=n>1?void 0:n?ly(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&ay(t,r,o),o};let st=class extends f{constructor(){super(...arguments),this.id="",this._onInput=e=>{const t=e.target;this.value=t.value,this.onInput&&this.onInput(e)},this._onChange=e=>{const t=e.target;this.value=t.value,this.onChange&&this.onChange(e)},this._onFocus=e=>{this.dispatchEvent(new FocusEvent("focus",{bubbles:!0,composed:!0,relatedTarget:e.relatedTarget})),this.onFocus&&this.onFocus(e)},this._onBlur=e=>{this.dispatchEvent(new FocusEvent("blur",{bubbles:!0,composed:!0,relatedTarget:e.relatedTarget})),this.onBlur&&this.onBlur(e)}}createRenderRoot(){return this}updated(e){e.has("id")&&(this.id&&(this._textareaId=this.id),this.removeAttribute("id"))}firstUpdated(){this._textareaId=this.id,this.removeAttribute("id")}render(){return l`
1437
+ `}};Q([a({type:String})],G.prototype,"accept",2);Q([a({type:String})],G.prototype,"autocomplete",2);Q([a({type:Boolean})],G.prototype,"disabled",2);Q([a({type:String})],G.prototype,"form",2);Q([a({type:String})],G.prototype,"id",2);Q([a({type:Boolean})],G.prototype,"invalid",2);Q([a({type:Number})],G.prototype,"max",2);Q([a({type:Number})],G.prototype,"maxlength",2);Q([a({type:Number})],G.prototype,"min",2);Q([a({type:Number})],G.prototype,"minlength",2);Q([a({type:Boolean})],G.prototype,"multiple",2);Q([a({type:String})],G.prototype,"name",2);Q([a({type:String})],G.prototype,"pattern",2);Q([a({type:String})],G.prototype,"placeholder",2);Q([a({type:Boolean})],G.prototype,"readonly",2);Q([a({type:Boolean})],G.prototype,"required",2);Q([a({type:Number})],G.prototype,"step",2);Q([a({type:String})],G.prototype,"type",2);Q([a({type:String})],G.prototype,"value",2);Q([a({attribute:!1})],G.prototype,"onClick",2);Q([a({attribute:!1})],G.prototype,"onInput",2);Q([a({attribute:!1})],G.prototype,"onChange",2);Q([a({attribute:!1})],G.prototype,"onFocus",2);Q([a({attribute:!1})],G.prototype,"onBlur",2);G=Q([p("pont-input-group-input")],G);var iy=Object.getOwnPropertyDescriptor,sy=(e,t,r,n)=>{for(var o=n>1?void 0:n?iy(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let Bd=class extends f{createRenderRoot(){return this}get _textSlot(){return this.querySelector('[data-slot="input-group-text"]')}firstUpdated(){const e=this._textSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<span data-slot="input-group-text"></span>`}};Bd=sy([p("pont-input-group-text")],Bd);var ay=Object.defineProperty,ly=Object.getOwnPropertyDescriptor,gt=(e,t,r,n)=>{for(var o=n>1?void 0:n?ly(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&ay(t,r,o),o};let at=class extends f{constructor(){super(...arguments),this.id="",this._onInput=e=>{const t=e.target;this.value=t.value,this.onInput&&this.onInput(e)},this._onChange=e=>{const t=e.target;this.value=t.value,this.onChange&&this.onChange(e)},this._onFocus=e=>{this.dispatchEvent(new FocusEvent("focus",{bubbles:!0,composed:!0,relatedTarget:e.relatedTarget})),this.onFocus&&this.onFocus(e)},this._onBlur=e=>{this.dispatchEvent(new FocusEvent("blur",{bubbles:!0,composed:!0,relatedTarget:e.relatedTarget})),this.onBlur&&this.onBlur(e)}}createRenderRoot(){return this}updated(e){e.has("id")&&(this.id&&(this._textareaId=this.id),this.removeAttribute("id"))}firstUpdated(){this._textareaId=this.id,this.removeAttribute("id")}render(){return l`
1438
1438
  <textarea
1439
1439
  data-slot="textarea"
1440
1440
  autocapitalize=${this.autocapitalize?this.autocapitalize:h}
@@ -1463,7 +1463,7 @@
1463
1463
  @focus=${this._onFocus}
1464
1464
  @blur=${this._onBlur}
1465
1465
  ></textarea>
1466
- `}};gt([a({type:String})],st.prototype,"autocomplete",2);gt([a({type:Number})],st.prototype,"cols",2);gt([a({type:Boolean})],st.prototype,"disabled",2);gt([a({type:String})],st.prototype,"form",2);gt([a({type:String})],st.prototype,"id",2);gt([a({type:Boolean})],st.prototype,"invalid",2);gt([a({type:Number})],st.prototype,"maxlength",2);gt([a({type:Number})],st.prototype,"minlength",2);gt([a({type:String})],st.prototype,"name",2);gt([a({type:String})],st.prototype,"placeholder",2);gt([a({type:Boolean})],st.prototype,"readonly",2);gt([a({type:Boolean})],st.prototype,"required",2);gt([a({type:Number})],st.prototype,"rows",2);gt([a({type:String})],st.prototype,"wrap",2);gt([a({type:String})],st.prototype,"value",2);gt([a({attribute:!1})],st.prototype,"onInput",2);gt([a({attribute:!1})],st.prototype,"onChange",2);gt([a({attribute:!1})],st.prototype,"onFocus",2);gt([a({attribute:!1})],st.prototype,"onBlur",2);st=gt([p("pont-textarea")],st);var dy=Object.defineProperty,cy=Object.getOwnPropertyDescriptor,ft=(e,t,r,n)=>{for(var o=n>1?void 0:n?cy(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&dy(t,r,o),o};let at=class extends f{constructor(){super(...arguments),this.id=""}createRenderRoot(){return this}updated(e){e.has("id")&&(this.id&&(this._textareaId=this.id),this.removeAttribute("id"))}firstUpdated(){this._textareaId=this.id,this.removeAttribute("id")}render(){return l`
1466
+ `}};gt([a({type:String})],at.prototype,"autocomplete",2);gt([a({type:Number})],at.prototype,"cols",2);gt([a({type:Boolean})],at.prototype,"disabled",2);gt([a({type:String})],at.prototype,"form",2);gt([a({type:String})],at.prototype,"id",2);gt([a({type:Boolean})],at.prototype,"invalid",2);gt([a({type:Number})],at.prototype,"maxlength",2);gt([a({type:Number})],at.prototype,"minlength",2);gt([a({type:String})],at.prototype,"name",2);gt([a({type:String})],at.prototype,"placeholder",2);gt([a({type:Boolean})],at.prototype,"readonly",2);gt([a({type:Boolean})],at.prototype,"required",2);gt([a({type:Number})],at.prototype,"rows",2);gt([a({type:String})],at.prototype,"wrap",2);gt([a({type:String})],at.prototype,"value",2);gt([a({attribute:!1})],at.prototype,"onInput",2);gt([a({attribute:!1})],at.prototype,"onChange",2);gt([a({attribute:!1})],at.prototype,"onFocus",2);gt([a({attribute:!1})],at.prototype,"onBlur",2);at=gt([p("pont-textarea")],at);var dy=Object.defineProperty,cy=Object.getOwnPropertyDescriptor,ft=(e,t,r,n)=>{for(var o=n>1?void 0:n?cy(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&dy(t,r,o),o};let lt=class extends f{constructor(){super(...arguments),this.id=""}createRenderRoot(){return this}updated(e){e.has("id")&&(this.id&&(this._textareaId=this.id),this.removeAttribute("id"))}firstUpdated(){this._textareaId=this.id,this.removeAttribute("id")}render(){return l`
1467
1467
  <pont-textarea
1468
1468
  data-slot="input-group-textarea"
1469
1469
  autocapitalize=${this.autocapitalize?this.autocapitalize:h}
@@ -1490,7 +1490,7 @@
1490
1490
  .onfocus=${this.onFocus}
1491
1491
  .onblur=${this.onBlur}
1492
1492
  ></pont-textarea>
1493
- `}};ft([a({type:String})],at.prototype,"autocomplete",2);ft([a({type:Number})],at.prototype,"cols",2);ft([a({type:Boolean})],at.prototype,"disabled",2);ft([a({type:String})],at.prototype,"form",2);ft([a({type:String})],at.prototype,"id",2);ft([a({type:Boolean})],at.prototype,"invalid",2);ft([a({type:Number})],at.prototype,"maxlength",2);ft([a({type:Number})],at.prototype,"minlength",2);ft([a({type:String})],at.prototype,"name",2);ft([a({type:String})],at.prototype,"placeholder",2);ft([a({type:Boolean})],at.prototype,"readonly",2);ft([a({type:Boolean})],at.prototype,"required",2);ft([a({type:Number})],at.prototype,"rows",2);ft([a({type:String})],at.prototype,"wrap",2);ft([a({type:String})],at.prototype,"value",2);ft([a({attribute:!1})],at.prototype,"onInput",2);ft([a({attribute:!1})],at.prototype,"onChange",2);ft([a({attribute:!1})],at.prototype,"onFocus",2);ft([a({attribute:!1})],at.prototype,"onBlur",2);at=ft([p("pont-input-group-textarea")],at);var py=Object.defineProperty,hy=Object.getOwnPropertyDescriptor,pt=(e,t,r,n)=>{for(var o=n>1?void 0:n?hy(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&py(t,r,o),o};let rt=class extends f{constructor(){super(),this.autocomplete="one-time-code",this.id="",this.inputmode="numeric",this._activeSlot=null,this._hasFocus=!1,this._value="",this._children=[],this._handleBlur=e=>{var t;this._hasFocus=!1,this._activeSlot=null,this._sync(),this.dispatchEvent(new FocusEvent("blur",{bubbles:!0,composed:!0,relatedTarget:e.relatedTarget})),(t=this.onBlur)==null||t.call(this,e)},this._handleFocus=e=>{var t;this._hasFocus=!0,this._activeSlot===null&&(this._activeSlot=this._computeInitialActiveSlot()),this._sync(),this.dispatchEvent(new FocusEvent("focus",{bubbles:!0,composed:!0,relatedTarget:e.relatedTarget})),(t=this.onFocus)==null||t.call(this,e)},this._handleKeyDown=e=>{if(this.disabled||!this._hasFocus)return;this._activeSlot===null&&(this._activeSlot=this._computeInitialActiveSlot());const t=e.key,r=this._currentValue??"";if(t==="ArrowLeft"){e.preventDefault(),this._activeSlot=this._clampIndex(this._activeSlot-1),this._sync();return}if(t==="ArrowRight"){e.preventDefault(),this._activeSlot=this._clampIndex(this._activeSlot+1),this._sync();return}if(t==="Home"){e.preventDefault(),this._activeSlot=0,this._sync();return}if(t==="End"){e.preventDefault(),this._activeSlot=Math.max(0,r.length-1),this._sync();return}if(t==="Backspace"){e.preventDefault(),this._deleteChar();return}if(t==="Delete"){if(e.preventDefault(),this._activeSlot!==null){const o=r.split("");o[this._activeSlot]="",this._updateValue(o.join("")),this._sync()}return}if(e.ctrlKey||e.metaKey||t.length!==1)return;const n=this._regex();n&&!n.test(t)||(e.preventDefault(),this._insertChar(t))},this._handlePaste=e=>{var c,m;if(this.disabled)return;e.preventDefault();let t=((c=e.clipboardData)==null?void 0:c.getData("text"))??"";this.pasteTransformer&&(t=this.pasteTransformer(t));const r=this._regex(),n=Array.from(t).filter(v=>r?r.test(v):!0);if(!n.length)return;const o=(this._currentValue??"").split("").slice(0,this.maxlength);for(;o.length<this.maxlength;)o.push("");let s=this._activeSlot??this._computeInitialActiveSlot();for(const v of n){if(s>=this.maxlength)break;o[s]=v,s++}const d=o.join("");this._updateValue(d),this._activeSlot=Math.min(s,this.maxlength-1),this._checkComplete(),this._sync(),(m=this.onPaste)==null||m.call(this,e)},this._children=Array.from(this.childNodes)}createRenderRoot(){return this}get _containerSlot(){return this.querySelector('[data-slot="input-otp-container"]')}get _wrapperSlot(){return this.querySelector('[data-slot="input-otp-wrapper"]')}get _slots(){return Array.from(this.querySelectorAll("pont-input-otp-slot"))}get _isControlled(){return this.value!==void 0}get _currentValue(){return this._isControlled?this.value:this._value}_inputEl(){return this.querySelector('[data-slot="input-otp"]')}_regex(){return this.pattern?new RegExp(this.pattern):null}_clampIndex(e){return Math.max(0,Math.min(e,this.maxlength-1))}_computeInitialActiveSlot(){const e=(this._currentValue??"").length;return e>=this.maxlength?this.maxlength-1:e}_createCaret(){const e=document.createElement("div");e.dataset.slot="input-otp-slot-caret-wrapper";const t=document.createElement("div");return t.dataset.slot="input-otp-slot-caret",e.appendChild(t),e}_sync(){const e=this._currentValue??"";this._slots.forEach(t=>{const r=t._slotSlot;if(!r)return;const n=e[t.index]??"",o=this._hasFocus&&!this.disabled&&t.index===this._activeSlot;r.dataset.state=o?"active":"inactive",n?r.textContent=n:r.textContent="";const i=o&&!n,s=r.querySelector('[data-slot="input-otp-caret-wrapper"]');i&&!s&&r.appendChild(this._createCaret()),!i&&s&&s.remove()})}_updateValue(e){var t;this._isControlled||(this._value=e),(t=this.onChange)==null||t.call(this,e)}_checkComplete(){var e,t;((e=this._currentValue)==null?void 0:e.length)===this.maxlength&&((t=this.onComplete)==null||t.call(this,this._currentValue))}_insertChar(e){if(this._activeSlot===null)return;const t=this._activeSlot,r=(this._currentValue??"").split("");r[t]=e;const n=r.join("").slice(0,this.maxlength);this._updateValue(n),this._activeSlot=this._clampIndex(this._activeSlot+1),this._checkComplete()}_deleteChar(){if(this._activeSlot===null)return;let e=this._activeSlot;const t=(this._currentValue??"").split("");e>0&&!t[e]&&e--,t[e]="",this._activeSlot=e,this._updateValue(t.join(""))}updated(e){e.has("id")&&(this.id&&(this._inputId=this.id),this.removeAttribute("id")),e.has("value")&&this._isControlled&&(this._value=this.value??""),this._sync()}firstUpdated(){this._inputId=this.id,this.removeAttribute("id"),this._value=this.value??this.defaultValue??"";const e=this._containerSlot,t=this._wrapperSlot;!e||!t||(this._children.forEach(r=>{e.insertBefore(r,t)}),this.addEventListener("pont-input-otp-slot:focus",r=>{var o;if(this.disabled)return;const{index:n}=r.detail;this._activeSlot=n,this._hasFocus=!0,(o=this._inputEl())==null||o.focus(),this._sync()}))}render(){return l`
1493
+ `}};ft([a({type:String})],lt.prototype,"autocomplete",2);ft([a({type:Number})],lt.prototype,"cols",2);ft([a({type:Boolean})],lt.prototype,"disabled",2);ft([a({type:String})],lt.prototype,"form",2);ft([a({type:String})],lt.prototype,"id",2);ft([a({type:Boolean})],lt.prototype,"invalid",2);ft([a({type:Number})],lt.prototype,"maxlength",2);ft([a({type:Number})],lt.prototype,"minlength",2);ft([a({type:String})],lt.prototype,"name",2);ft([a({type:String})],lt.prototype,"placeholder",2);ft([a({type:Boolean})],lt.prototype,"readonly",2);ft([a({type:Boolean})],lt.prototype,"required",2);ft([a({type:Number})],lt.prototype,"rows",2);ft([a({type:String})],lt.prototype,"wrap",2);ft([a({type:String})],lt.prototype,"value",2);ft([a({attribute:!1})],lt.prototype,"onInput",2);ft([a({attribute:!1})],lt.prototype,"onChange",2);ft([a({attribute:!1})],lt.prototype,"onFocus",2);ft([a({attribute:!1})],lt.prototype,"onBlur",2);lt=ft([p("pont-input-group-textarea")],lt);var py=Object.defineProperty,hy=Object.getOwnPropertyDescriptor,ht=(e,t,r,n)=>{for(var o=n>1?void 0:n?hy(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&py(t,r,o),o};let ot=class extends f{constructor(){super(),this.autocomplete="one-time-code",this.id="",this.inputmode="numeric",this._activeSlot=null,this._hasFocus=!1,this._value="",this._children=[],this._handleBlur=e=>{var t;this._hasFocus=!1,this._activeSlot=null,this._sync(),this.dispatchEvent(new FocusEvent("blur",{bubbles:!0,composed:!0,relatedTarget:e.relatedTarget})),(t=this.onBlur)==null||t.call(this,e)},this._handleFocus=e=>{var t;this._hasFocus=!0,this._activeSlot===null&&(this._activeSlot=this._computeInitialActiveSlot()),this._sync(),this.dispatchEvent(new FocusEvent("focus",{bubbles:!0,composed:!0,relatedTarget:e.relatedTarget})),(t=this.onFocus)==null||t.call(this,e)},this._handleKeyDown=e=>{if(this.disabled||!this._hasFocus)return;this._activeSlot===null&&(this._activeSlot=this._computeInitialActiveSlot());const t=e.key,r=this._currentValue??"";if(t==="ArrowLeft"){e.preventDefault(),this._activeSlot=this._clampIndex(this._activeSlot-1),this._sync();return}if(t==="ArrowRight"){e.preventDefault(),this._activeSlot=this._clampIndex(this._activeSlot+1),this._sync();return}if(t==="Home"){e.preventDefault(),this._activeSlot=0,this._sync();return}if(t==="End"){e.preventDefault(),this._activeSlot=Math.max(0,r.length-1),this._sync();return}if(t==="Backspace"){e.preventDefault(),this._deleteChar();return}if(t==="Delete"){if(e.preventDefault(),this._activeSlot!==null){const o=r.split("");o[this._activeSlot]="",this._updateValue(o.join("")),this._sync()}return}if(e.ctrlKey||e.metaKey||t.length!==1)return;const n=this._regex();n&&!n.test(t)||(e.preventDefault(),this._insertChar(t))},this._handlePaste=e=>{var c,m;if(this.disabled)return;e.preventDefault();let t=((c=e.clipboardData)==null?void 0:c.getData("text"))??"";this.pasteTransformer&&(t=this.pasteTransformer(t));const r=this._regex(),n=Array.from(t).filter(v=>r?r.test(v):!0);if(!n.length)return;const o=(this._currentValue??"").split("").slice(0,this.maxlength);for(;o.length<this.maxlength;)o.push("");let s=this._activeSlot??this._computeInitialActiveSlot();for(const v of n){if(s>=this.maxlength)break;o[s]=v,s++}const d=o.join("");this._updateValue(d),this._activeSlot=Math.min(s,this.maxlength-1),this._checkComplete(),this._sync(),(m=this.onPaste)==null||m.call(this,e)},this._children=Array.from(this.childNodes)}createRenderRoot(){return this}get _containerSlot(){return this.querySelector('[data-slot="input-otp-container"]')}get _wrapperSlot(){return this.querySelector('[data-slot="input-otp-wrapper"]')}get _slots(){return Array.from(this.querySelectorAll("pont-input-otp-slot"))}get _isControlled(){return this.value!==void 0}get _currentValue(){return this._isControlled?this.value:this._value}_inputEl(){return this.querySelector('[data-slot="input-otp"]')}_regex(){return this.pattern?new RegExp(this.pattern):null}_clampIndex(e){return Math.max(0,Math.min(e,this.maxlength-1))}_computeInitialActiveSlot(){const e=(this._currentValue??"").length;return e>=this.maxlength?this.maxlength-1:e}_createCaret(){const e=document.createElement("div");e.dataset.slot="input-otp-slot-caret-wrapper";const t=document.createElement("div");return t.dataset.slot="input-otp-slot-caret",e.appendChild(t),e}_sync(){const e=this._currentValue??"";this._slots.forEach(t=>{const r=t._slotSlot;if(!r)return;const n=e[t.index]??"",o=this._hasFocus&&!this.disabled&&t.index===this._activeSlot;r.dataset.state=o?"active":"inactive",n?r.textContent=n:r.textContent="";const i=o&&!n,s=r.querySelector('[data-slot="input-otp-caret-wrapper"]');i&&!s&&r.appendChild(this._createCaret()),!i&&s&&s.remove()})}_updateValue(e){var t;this._isControlled||(this._value=e),(t=this.onChange)==null||t.call(this,e)}_checkComplete(){var e,t;((e=this._currentValue)==null?void 0:e.length)===this.maxlength&&((t=this.onComplete)==null||t.call(this,this._currentValue))}_insertChar(e){if(this._activeSlot===null)return;const t=this._activeSlot,r=(this._currentValue??"").split("");r[t]=e;const n=r.join("").slice(0,this.maxlength);this._updateValue(n),this._activeSlot=this._clampIndex(this._activeSlot+1),this._checkComplete()}_deleteChar(){if(this._activeSlot===null)return;let e=this._activeSlot;const t=(this._currentValue??"").split("");e>0&&!t[e]&&e--,t[e]="",this._activeSlot=e,this._updateValue(t.join(""))}updated(e){e.has("id")&&(this.id&&(this._inputId=this.id),this.removeAttribute("id")),e.has("value")&&this._isControlled&&(this._value=this.value??""),this._sync()}firstUpdated(){this._inputId=this.id,this.removeAttribute("id"),this._value=this.value??this.defaultValue??"";const e=this._containerSlot,t=this._wrapperSlot;!e||!t||(this._children.forEach(r=>{e.insertBefore(r,t)}),this.addEventListener("pont-input-otp-slot:focus",r=>{var o;if(this.disabled)return;const{index:n}=r.detail;this._activeSlot=n,this._hasFocus=!0,(o=this._inputEl())==null||o.focus(),this._sync()}))}render(){return l`
1494
1494
  <div data-slot="input-otp-container">
1495
1495
  <div data-slot="input-otp-wrapper">
1496
1496
  <input
@@ -1513,7 +1513,7 @@
1513
1513
  />
1514
1514
  </div>
1515
1515
  </div>
1516
- `}};pt([a({type:String})],rt.prototype,"autocomplete",2);pt([a({attribute:"default-value",type:String})],rt.prototype,"defaultValue",2);pt([a({type:Boolean})],rt.prototype,"disabled",2);pt([a({type:String})],rt.prototype,"form",2);pt([a({type:String})],rt.prototype,"id",2);pt([a({type:String})],rt.prototype,"inputmode",2);pt([a({type:Number})],rt.prototype,"maxlength",2);pt([a({type:String})],rt.prototype,"name",2);pt([a({type:String})],rt.prototype,"pattern",2);pt([a({type:Boolean})],rt.prototype,"required",2);pt([a({type:String})],rt.prototype,"value",2);pt([a({attribute:!1})],rt.prototype,"onChange",2);pt([a({attribute:!1})],rt.prototype,"onComplete",2);pt([a({attribute:!1})],rt.prototype,"onBlur",2);pt([a({attribute:!1})],rt.prototype,"onFocus",2);pt([a({attribute:!1})],rt.prototype,"onPaste",2);pt([a({attribute:!1})],rt.prototype,"pasteTransformer",2);pt([g()],rt.prototype,"_activeSlot",2);pt([g()],rt.prototype,"_hasFocus",2);pt([g()],rt.prototype,"_value",2);rt=pt([p("pont-input-otp")],rt);var uy=Object.getOwnPropertyDescriptor,my=(e,t,r,n)=>{for(var o=n>1?void 0:n?uy(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let Ud=class extends f{createRenderRoot(){return this}get _groupSlot(){return this.querySelector('[data-slot="input-otp-group"]')}firstUpdated(){const e=this._groupSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<div data-slot="input-otp-group"></div>`}};Ud=my([p("pont-input-otp-group")],Ud);var gy=Object.defineProperty,fy=Object.getOwnPropertyDescriptor,tl=(e,t,r,n)=>{for(var o=n>1?void 0:n?fy(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&gy(t,r,o),o};let hi=class extends f{constructor(){super(...arguments),this._handleClick=()=>{this.dispatchEvent(new CustomEvent("pont-input-otp-slot:focus",{detail:{index:this.index},bubbles:!0}))}}createRenderRoot(){return this}get _slotSlot(){return this.querySelector('[data-slot="input-otp-slot"]')}render(){return l`
1516
+ `}};ht([a({type:String})],ot.prototype,"autocomplete",2);ht([a({attribute:"default-value",type:String})],ot.prototype,"defaultValue",2);ht([a({type:Boolean})],ot.prototype,"disabled",2);ht([a({type:String})],ot.prototype,"form",2);ht([a({type:String})],ot.prototype,"id",2);ht([a({type:String})],ot.prototype,"inputmode",2);ht([a({type:Number})],ot.prototype,"maxlength",2);ht([a({type:String})],ot.prototype,"name",2);ht([a({type:String})],ot.prototype,"pattern",2);ht([a({type:Boolean})],ot.prototype,"required",2);ht([a({type:String})],ot.prototype,"value",2);ht([a({attribute:!1})],ot.prototype,"onChange",2);ht([a({attribute:!1})],ot.prototype,"onComplete",2);ht([a({attribute:!1})],ot.prototype,"onBlur",2);ht([a({attribute:!1})],ot.prototype,"onFocus",2);ht([a({attribute:!1})],ot.prototype,"onPaste",2);ht([a({attribute:!1})],ot.prototype,"pasteTransformer",2);ht([g()],ot.prototype,"_activeSlot",2);ht([g()],ot.prototype,"_hasFocus",2);ht([g()],ot.prototype,"_value",2);ot=ht([p("pont-input-otp")],ot);var uy=Object.getOwnPropertyDescriptor,my=(e,t,r,n)=>{for(var o=n>1?void 0:n?uy(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let Ud=class extends f{createRenderRoot(){return this}get _groupSlot(){return this.querySelector('[data-slot="input-otp-group"]')}firstUpdated(){const e=this._groupSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<div data-slot="input-otp-group"></div>`}};Ud=my([p("pont-input-otp-group")],Ud);var gy=Object.defineProperty,fy=Object.getOwnPropertyDescriptor,tl=(e,t,r,n)=>{for(var o=n>1?void 0:n?fy(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&gy(t,r,o),o};let hi=class extends f{constructor(){super(...arguments),this._handleClick=()=>{this.dispatchEvent(new CustomEvent("pont-input-otp-slot:focus",{detail:{index:this.index},bubbles:!0}))}}createRenderRoot(){return this}get _slotSlot(){return this.querySelector('[data-slot="input-otp-slot"]')}render(){return l`
1517
1517
  <div
1518
1518
  data-slot="input-otp-slot"
1519
1519
  aria-invalid=${this.invalid||this.ariaInvalid==="true"?"true":h}
@@ -1899,7 +1899,7 @@
1899
1899
  part="pagination"
1900
1900
  class=${u(ee.root,this.className)}
1901
1901
  ></nav>
1902
- `}};sc=L_([p("pont-pagination")],sc);var F_=Object.defineProperty,k_=Object.getOwnPropertyDescriptor,vt=(e,t,r,n)=>{for(var o=n>1?void 0:n?k_(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&F_(t,r,o),o};let lt=class extends f{constructor(){super(...arguments),this.id="",this._showPassword=!1,this._handleToggle=()=>{this._showPassword=!this._showPassword}}createRenderRoot(){return this}updated(e){e.has("id")&&(this.id&&(this._inputId=this.id),this.removeAttribute("id"))}firstUpdated(){this._inputId=this.id,this.removeAttribute("id")}_renderIcon(){return this._showPassword?l`
1902
+ `}};sc=L_([p("pont-pagination")],sc);var F_=Object.defineProperty,k_=Object.getOwnPropertyDescriptor,vt=(e,t,r,n)=>{for(var o=n>1?void 0:n?k_(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&F_(t,r,o),o};let dt=class extends f{constructor(){super(...arguments),this.id="",this._showPassword=!1,this._handleToggle=()=>{this._showPassword=!this._showPassword}}createRenderRoot(){return this}updated(e){e.has("id")&&(this.id&&(this._inputId=this.id),this.removeAttribute("id"))}firstUpdated(){this._inputId=this.id,this.removeAttribute("id")}_renderIcon(){return this._showPassword?l`
1903
1903
  <svg
1904
1904
  data-slot="password-input-icon"
1905
1905
  xmlns="http://www.w3.org/2000/svg"
@@ -1985,7 +1985,7 @@
1985
1985
  </pont-input-group-button>
1986
1986
  </pont-input-group-addon>
1987
1987
  </pont-input-group>
1988
- `}};vt([a({type:String})],lt.prototype,"autocomplete",2);vt([a({type:Boolean})],lt.prototype,"disabled",2);vt([a({type:String})],lt.prototype,"form",2);vt([a({type:String})],lt.prototype,"id",2);vt([a({type:Boolean})],lt.prototype,"invalid",2);vt([a({type:Number})],lt.prototype,"maxlength",2);vt([a({type:Number})],lt.prototype,"minlength",2);vt([a({type:String})],lt.prototype,"name",2);vt([a({type:String})],lt.prototype,"pattern",2);vt([a({type:String})],lt.prototype,"placeholder",2);vt([a({type:Boolean})],lt.prototype,"readonly",2);vt([a({type:Boolean})],lt.prototype,"required",2);vt([a({type:String})],lt.prototype,"value",2);vt([a({attribute:!1})],lt.prototype,"onClick",2);vt([a({attribute:!1})],lt.prototype,"onInput",2);vt([a({attribute:!1})],lt.prototype,"onChange",2);vt([a({attribute:!1})],lt.prototype,"onFocus",2);vt([a({attribute:!1})],lt.prototype,"onBlur",2);vt([g()],lt.prototype,"_showPassword",2);lt=vt([p("pont-password-input")],lt);const ac={root:["pont-relative pont-overflow-hidden","pont-w-progress-space-w pont-h-progress-space-h","pont-bg-progress-color-bg","pont-rounded-progress-radius"],indicator:["pont-flex-1","pont-w-progress-indicator-space-w pont-h-progress-indicator-space-h","pont-bg-progress-indicator-color-bg","pont-transition-all"]};var N_=Object.defineProperty,M_=Object.getOwnPropertyDescriptor,lh=(e,t,r,n)=>{for(var o=n>1?void 0:n?M_(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&N_(t,r,o),o};let ca=class extends f{constructor(){super(...arguments),this.value=15}createRenderRoot(){return this}render(){return l`
1988
+ `}};vt([a({type:String})],dt.prototype,"autocomplete",2);vt([a({type:Boolean})],dt.prototype,"disabled",2);vt([a({type:String})],dt.prototype,"form",2);vt([a({type:String})],dt.prototype,"id",2);vt([a({type:Boolean})],dt.prototype,"invalid",2);vt([a({type:Number})],dt.prototype,"maxlength",2);vt([a({type:Number})],dt.prototype,"minlength",2);vt([a({type:String})],dt.prototype,"name",2);vt([a({type:String})],dt.prototype,"pattern",2);vt([a({type:String})],dt.prototype,"placeholder",2);vt([a({type:Boolean})],dt.prototype,"readonly",2);vt([a({type:Boolean})],dt.prototype,"required",2);vt([a({type:String})],dt.prototype,"value",2);vt([a({attribute:!1})],dt.prototype,"onClick",2);vt([a({attribute:!1})],dt.prototype,"onInput",2);vt([a({attribute:!1})],dt.prototype,"onChange",2);vt([a({attribute:!1})],dt.prototype,"onFocus",2);vt([a({attribute:!1})],dt.prototype,"onBlur",2);vt([g()],dt.prototype,"_showPassword",2);dt=vt([p("pont-password-input")],dt);const ac={root:["pont-relative pont-overflow-hidden","pont-w-progress-space-w pont-h-progress-space-h","pont-bg-progress-color-bg","pont-rounded-progress-radius"],indicator:["pont-flex-1","pont-w-progress-indicator-space-w pont-h-progress-indicator-space-h","pont-bg-progress-indicator-color-bg","pont-transition-all"]};var N_=Object.defineProperty,M_=Object.getOwnPropertyDescriptor,lh=(e,t,r,n)=>{for(var o=n>1?void 0:n?M_(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&N_(t,r,o),o};let ca=class extends f{constructor(){super(...arguments),this.value=15}createRenderRoot(){return this}render(){return l`
1989
1989
  <div
1990
1990
  part="progress"
1991
1991
  aria-valuenow="${this.value}"
@@ -2329,20 +2329,20 @@
2329
2329
  </table>
2330
2330
  </div>
2331
2331
  </div>
2332
- `}};Ti([a({type:Array})],mn.prototype,"dataTable",2);Ti([a({type:Array})],mn.prototype,"footerData",2);Ti([a({type:String})],mn.prototype,"captionText",2);mn=Ti([p("pont-table")],mn);function ww(){const e=Date.now().toString(36),t=Math.random().toString(36).substring(2,7);return`rtg-${e}${t}`}function $w(e,t){return`${e}-trigger-${t}`}function Pw(e,t){return`${e}-content-${t}`}var Cw=Object.defineProperty,Sw=Object.getOwnPropertyDescriptor,vr=(e,t,r,n)=>{for(var o=n>1?void 0:n?Sw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Cw(t,r,o),o};let Ke=class extends f{constructor(){super(...arguments),this._initialSyncDone=!1,this.orientation="horizontal",this.dir="ltr",this.activationMode="automatic",this._baseId=ww(),this._onTriggerSelect=e=>{var r;const t=e.detail.value;this._isControlled?(r=this.onValueChange)==null||r.call(this,t):this._activeValue=t}}connectedCallback(){super.connectedCallback(),this._mutationObserver=new MutationObserver(()=>{this._sync()}),this._mutationObserver.observe(this,{childList:!0,subtree:!0})}disconnectedCallback(){var e;(e=this._mutationObserver)==null||e.disconnect(),super.disconnectedCallback()}createRenderRoot(){return this}get _rootSlot(){return this.querySelector('[data-slot="tabs"]')}get _list(){return this.querySelector("pont-tabs-list")}get _triggers(){return Array.from(this.querySelectorAll("pont-tabs-trigger"))}get _contents(){return Array.from(this.querySelectorAll("pont-tabs-content"))}get _isControlled(){return this.value!==void 0}get _currentValue(){return this._isControlled?this.value:this._activeValue}_sync(){var r,n;if(!this._rootSlot)return;if((r=this._list)!=null&&r._listSlot){const o=this._list._listSlot;o.setAttribute("data-orientation",this.orientation),o.setAttribute("aria-orientation",this.orientation)}const e=this._triggers,t=this._contents;e.length!==0&&(!this._initialSyncDone&&!this._isControlled&&!this._activeValue&&(this._activeValue=this.defaultValue??((n=e[0])==null?void 0:n.value),this._initialSyncDone=!0),e.forEach(o=>{var c;const i=o._triggerSlot;if(!i)return;i.setAttribute("data-orientation",this.orientation),i.id||(i.id=$w(this._baseId,o.value));const s=o.value===this._currentValue;i.setAttribute("data-state",s?"active":"inactive"),i.tabIndex=s?0:-1,i.setAttribute("aria-selected",String(s));const d=t.find(m=>m.value===o.value);d!=null&&d._contentSlot&&((c=d._contentSlot).id||(c.id=Pw(this._baseId,d.value)),d._contentSlot.setAttribute("aria-labelledby",i.id),i.setAttribute("aria-controls",d._contentSlot.id))}),t.forEach(o=>{const i=o._contentSlot;if(!i)return;i.setAttribute("data-orientation",this.orientation);const s=o.value===this._currentValue;i.setAttribute("data-state",s?"active":"inactive"),i.toggleAttribute("hidden",!s)}))}async firstUpdated(){Array.from(this.childNodes).forEach(e=>{var t;e!==this._rootSlot&&((t=this._rootSlot)==null||t.appendChild(e))}),this.addEventListener("pont-tabs:trigger-select",this._onTriggerSelect),await this.updateComplete,await new Promise(e=>setTimeout(e,0)),this._sync()}updated(e){e.has("value")&&this._isControlled&&(this._activeValue=this.value),this._sync()}render(){return l`
2332
+ `}};Ti([a({type:Array})],mn.prototype,"dataTable",2);Ti([a({type:Array})],mn.prototype,"footerData",2);Ti([a({type:String})],mn.prototype,"captionText",2);mn=Ti([p("pont-table")],mn);const ww="pont-account-settings-dashboard-width",$w="pont-account-settings-modal-width",Pw="pont-account-settings-dashboard",Cw="pont-account-settings-page-reset-margin",Sw="pont-account-settings-modal-root",et="pont",hc={xs:640,sm:768};function Ew(){const e=Date.now().toString(36),t=Math.random().toString(36).substring(2,7);return`${et}-${e}${t}`}function xw(e,t){return`${e}-trigger-${t}`}function Ow(e,t){return`${e}-content-${t}`}var Rw=Object.defineProperty,Iw=Object.getOwnPropertyDescriptor,vr=(e,t,r,n)=>{for(var o=n>1?void 0:n?Iw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Rw(t,r,o),o};let Ke=class extends f{constructor(){super(...arguments),this._initialSyncDone=!1,this.orientation="horizontal",this.dir="ltr",this.activationMode="automatic",this._baseId=Ew(),this._onTriggerSelect=e=>{var r;const t=e.detail.value;this._isControlled?(r=this.onValueChange)==null||r.call(this,t):this._activeValue=t}}connectedCallback(){super.connectedCallback(),this._mutationObserver=new MutationObserver(()=>{this._sync()}),this._mutationObserver.observe(this,{childList:!0,subtree:!0})}disconnectedCallback(){var e;(e=this._mutationObserver)==null||e.disconnect(),super.disconnectedCallback()}createRenderRoot(){return this}get _rootSlot(){return this.querySelector('[data-slot="tabs"]')}get _list(){return this.querySelector("pont-tabs-list")}get _triggers(){return Array.from(this.querySelectorAll("pont-tabs-trigger"))}get _contents(){return Array.from(this.querySelectorAll("pont-tabs-content"))}get _isControlled(){return this.value!==void 0}get _currentValue(){return this._isControlled?this.value:this._activeValue}_sync(){var r,n;if(!this._rootSlot)return;if((r=this._list)!=null&&r._listSlot){const o=this._list._listSlot;o.setAttribute("data-orientation",this.orientation),o.setAttribute("aria-orientation",this.orientation)}const e=this._triggers,t=this._contents;e.length!==0&&(!this._initialSyncDone&&!this._isControlled&&!this._activeValue&&(this._activeValue=this.defaultValue??((n=e[0])==null?void 0:n.value),this._initialSyncDone=!0),e.forEach(o=>{var c;const i=o._triggerSlot;if(!i)return;i.setAttribute("data-orientation",this.orientation),i.id||(i.id=xw(this._baseId,o.value));const s=o.value===this._currentValue;i.setAttribute("data-state",s?"active":"inactive"),i.tabIndex=s?0:-1,i.setAttribute("aria-selected",String(s));const d=t.find(m=>m.value===o.value);d!=null&&d._contentSlot&&((c=d._contentSlot).id||(c.id=Ow(this._baseId,d.value)),d._contentSlot.setAttribute("aria-labelledby",i.id),i.setAttribute("aria-controls",d._contentSlot.id))}),t.forEach(o=>{const i=o._contentSlot;if(!i)return;i.setAttribute("data-orientation",this.orientation);const s=o.value===this._currentValue;i.setAttribute("data-state",s?"active":"inactive"),i.toggleAttribute("hidden",!s)}))}async firstUpdated(){Array.from(this.childNodes).forEach(e=>{var t;e!==this._rootSlot&&((t=this._rootSlot)==null||t.appendChild(e))}),this.addEventListener("pont-tabs:trigger-select",this._onTriggerSelect),await this.updateComplete,await new Promise(e=>setTimeout(e,0)),this._sync()}updated(e){e.has("value")&&this._isControlled&&(this._activeValue=this.value),this._sync()}render(){return l`
2333
2333
  <div
2334
2334
  data-slot="tabs"
2335
2335
  data-orientation=${this.orientation}
2336
2336
  dir=${this.dir}
2337
2337
  ></div>
2338
- `}};vr([a({attribute:"default-value",type:String})],Ke.prototype,"defaultValue",2);vr([a({type:String})],Ke.prototype,"value",2);vr([a({attribute:!1})],Ke.prototype,"onValueChange",2);vr([a({type:String})],Ke.prototype,"orientation",2);vr([a({type:String})],Ke.prototype,"dir",2);vr([a({attribute:"activation-mode",type:String})],Ke.prototype,"activationMode",2);vr([g()],Ke.prototype,"_activeValue",2);Ke=vr([p("pont-tabs")],Ke);var Ew=Object.defineProperty,xw=Object.getOwnPropertyDescriptor,mh=(e,t,r,n)=>{for(var o=n>1?void 0:n?xw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Ew(t,r,o),o};let ga=class extends f{constructor(){super(...arguments),this.variant="default"}createRenderRoot(){return this}get _listSlot(){return this.querySelector('[data-slot="tabs-list"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._listSlot&&((r=this._listSlot)==null||r.appendChild(t))})}render(){return l`
2338
+ `}};vr([a({attribute:"default-value",type:String})],Ke.prototype,"defaultValue",2);vr([a({type:String})],Ke.prototype,"value",2);vr([a({attribute:!1})],Ke.prototype,"onValueChange",2);vr([a({type:String})],Ke.prototype,"orientation",2);vr([a({type:String})],Ke.prototype,"dir",2);vr([a({attribute:"activation-mode",type:String})],Ke.prototype,"activationMode",2);vr([g()],Ke.prototype,"_activeValue",2);Ke=vr([p("pont-tabs")],Ke);var Aw=Object.defineProperty,Tw=Object.getOwnPropertyDescriptor,mh=(e,t,r,n)=>{for(var o=n>1?void 0:n?Tw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Aw(t,r,o),o};let ga=class extends f{constructor(){super(...arguments),this.variant="default"}createRenderRoot(){return this}get _listSlot(){return this.querySelector('[data-slot="tabs-list"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._listSlot&&((r=this._listSlot)==null||r.appendChild(t))})}render(){return l`
2339
2339
  <div
2340
2340
  data-slot="tabs-list"
2341
2341
  data-variant=${this.variant}
2342
2342
  role="tablist"
2343
2343
  tabindex="0"
2344
2344
  ></div>
2345
- `}};mh([a({type:String})],ga.prototype,"variant",2);ga=mh([p("pont-tabs-list")],ga);var Ow=Object.defineProperty,Rw=Object.getOwnPropertyDescriptor,ll=(e,t,r,n)=>{for(var o=n>1?void 0:n?Rw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Ow(t,r,o),o};let bi=class extends f{constructor(){super(...arguments),this.value="",this._onClick=()=>{this._emitSelect()},this._onKeyDown=e=>{(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this._emitSelect())}}createRenderRoot(){return this}get _triggerSlot(){return this.querySelector('[data-slot="tabs-trigger"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._triggerSlot&&((r=this._triggerSlot)==null||r.appendChild(t))})}_emitSelect(){this.disabled||this.dispatchEvent(new CustomEvent("pont-tabs:trigger-select",{detail:{value:this.value},bubbles:!0}))}render(){return l`
2345
+ `}};mh([a({type:String})],ga.prototype,"variant",2);ga=mh([p("pont-tabs-list")],ga);var Dw=Object.defineProperty,Lw=Object.getOwnPropertyDescriptor,ll=(e,t,r,n)=>{for(var o=n>1?void 0:n?Lw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Dw(t,r,o),o};let bi=class extends f{constructor(){super(...arguments),this.value="",this._onClick=()=>{this._emitSelect()},this._onKeyDown=e=>{(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this._emitSelect())}}createRenderRoot(){return this}get _triggerSlot(){return this.querySelector('[data-slot="tabs-trigger"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._triggerSlot&&((r=this._triggerSlot)==null||r.appendChild(t))})}_emitSelect(){this.disabled||this.dispatchEvent(new CustomEvent("pont-tabs:trigger-select",{detail:{value:this.value},bubbles:!0}))}render(){return l`
2346
2346
  <button
2347
2347
  data-slot="tabs-trigger"
2348
2348
  ?data-disabled=${this.disabled}
@@ -2352,18 +2352,18 @@
2352
2352
  @click=${this._onClick}
2353
2353
  @keydown=${this._onKeyDown}
2354
2354
  ></button>
2355
- `}};ll([a({type:String})],bi.prototype,"value",2);ll([a({type:Boolean})],bi.prototype,"disabled",2);bi=ll([p("pont-tabs-trigger")],bi);var Iw=Object.defineProperty,Aw=Object.getOwnPropertyDescriptor,gh=(e,t,r,n)=>{for(var o=n>1?void 0:n?Aw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Iw(t,r,o),o};let fa=class extends f{constructor(){super(...arguments),this.value=""}createRenderRoot(){return this}get _contentSlot(){return this.querySelector('[data-slot="tabs-content"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._contentSlot&&((r=this._contentSlot)==null||r.appendChild(t))})}render(){return l`
2355
+ `}};ll([a({type:String})],bi.prototype,"value",2);ll([a({type:Boolean})],bi.prototype,"disabled",2);bi=ll([p("pont-tabs-trigger")],bi);var Fw=Object.defineProperty,kw=Object.getOwnPropertyDescriptor,gh=(e,t,r,n)=>{for(var o=n>1?void 0:n?kw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Fw(t,r,o),o};let fa=class extends f{constructor(){super(...arguments),this.value=""}createRenderRoot(){return this}get _contentSlot(){return this.querySelector('[data-slot="tabs-content"]')}firstUpdated(e){Array.from(this.childNodes).forEach(t=>{var r;t!==this._contentSlot&&((r=this._contentSlot)==null||r.appendChild(t))})}render(){return l`
2356
2356
  <div
2357
2357
  data-slot="tabs-content"
2358
2358
  role="tabpanel"
2359
2359
  tabindex="0"
2360
2360
  hidden
2361
2361
  ></div>
2362
- `}};gh([a({type:String})],fa.prototype,"value",2);fa=gh([p("pont-tabs-content")],fa);const xn={viewportRoot:["pont-fixed pont-top-0 pont-z-[100] pont-flex pont-max-h-screen pont-w-toast-viewport-root-space-w pont-flex-col-reverse pont-px-toast-viewport-root-space-px pont-py-toast-viewport-root-space-py sm:pont-bottom-0 sm:pont-right-0 sm:pont-top-auto sm:pont-flex-col md:pont-max-w-toast-viewport-root-space-w-md"],viewportItem:{base:["group pont-pointer-events-auto pont-relative pont-flex pont-w-toast-viewport-item-space-w pont-items-center pont-justify-between pont-gap-toast-viewport-item-space-gap pont-overflow-hidden pont-rounded-toast-viewport-item-radius pont-px-toast-viewport-item-space-px pont-py-toast-viewport-item-space-py pont-shadow-toast-viewport-item-shadow pont-transition-all","data-[swipe=cancel]:pont-translate-x-0","data-[swipe=end]:pont-translate-x-[var(--radix-toast-swipe-end-x)]","data-[swipe=move]:pont-translate-x-[var(--radix-toast-swipe-move-x)]","data-[swipe=move]:pont-transition-none","data-[state=open]:pont-animate-toast-animate-in","data-[state=closed]:pont-animate-toast-animate-out","data-[swipe=end]:pont-animate-toast-animate-out","data-[state=closed]:pont-opacity-80","data-[state=open]:pont-translate-y-toast-viewport-item-translate-y-enter-desktop","data-[state=open]:sm:pont-translate-y-toast-viewport-item-translate-y-enter-mobile","data-[state=closed]:pont-translate-x-toast-viewport-item-translate-x-exit"],variants:{default:["pont-border pont-border-toast-viewport-default-color-border pont-bg-toast-viewport-default-color-bg pont-text-toast-viewport-default-color-text"],destructive:["pont-bg-toast-viewport-destructive-color-bg pont-text-toast-viewport-destructive-color-text"]}},action:{base:["pont-text-toast-action-font pont-font-toast-action-font-weight pont-text-toast-action-color-text","pont-h-toast-action-space-h pont-px-toast-action-space-px pont-py-toast-action-space-py","pont-inline-flex pont-border pont-border-toast-action-color-border pont-shrink-0 pont-items-center pont-justify-center pont-rounded-toast-action-radius pont-transition-colors","focus:pont-outline-none focus:pont-ring-toast-action-width-ring-focus focus:pont-ring-toast-action-color-ring-focus","disabled:pont-pointer-events-none disabled:pont-opacity-toast-action-opacity-disabled"],variants:{default:["pont-bg-toast-action-default-color-bg hover:pont-bg-toast-action-default-color-bg-hover"],destructive:["pont-bg-toast-action-destructive-color-bg hover:pont-bg-toast-action-destructive-color-bg-hover pont-text-toast-action-destructive-color-text focus:pont-ring-toast-action-destructive-color-ring-focus"]}},title:["pont-text-toast-title-font pont-font-toast-title-font-weight [&+div]:pont-text-toast-title-font"],description:["pont-text-toast-description-font pont-opacity-toast-description-opacity"]};var Tw=Object.defineProperty,Dw=Object.getOwnPropertyDescriptor,dl=(e,t,r,n)=>{for(var o=n>1?void 0:n?Dw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Tw(t,r,o),o};const hc="closed";let qr=class extends y{constructor(){super(...arguments),this.variant="default",this.state=hc}get _containerElement(){return this.querySelector("li[part=toast-view-port-li]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l` <ol
2362
+ `}};gh([a({type:String})],fa.prototype,"value",2);fa=gh([p("pont-tabs-content")],fa);const xn={viewportRoot:["pont-fixed pont-top-0 pont-z-[100] pont-flex pont-max-h-screen pont-w-toast-viewport-root-space-w pont-flex-col-reverse pont-px-toast-viewport-root-space-px pont-py-toast-viewport-root-space-py sm:pont-bottom-0 sm:pont-right-0 sm:pont-top-auto sm:pont-flex-col md:pont-max-w-toast-viewport-root-space-w-md"],viewportItem:{base:["group pont-pointer-events-auto pont-relative pont-flex pont-w-toast-viewport-item-space-w pont-items-center pont-justify-between pont-gap-toast-viewport-item-space-gap pont-overflow-hidden pont-rounded-toast-viewport-item-radius pont-px-toast-viewport-item-space-px pont-py-toast-viewport-item-space-py pont-shadow-toast-viewport-item-shadow pont-transition-all","data-[swipe=cancel]:pont-translate-x-0","data-[swipe=end]:pont-translate-x-[var(--radix-toast-swipe-end-x)]","data-[swipe=move]:pont-translate-x-[var(--radix-toast-swipe-move-x)]","data-[swipe=move]:pont-transition-none","data-[state=open]:pont-animate-toast-animate-in","data-[state=closed]:pont-animate-toast-animate-out","data-[swipe=end]:pont-animate-toast-animate-out","data-[state=closed]:pont-opacity-80","data-[state=open]:pont-translate-y-toast-viewport-item-translate-y-enter-desktop","data-[state=open]:sm:pont-translate-y-toast-viewport-item-translate-y-enter-mobile","data-[state=closed]:pont-translate-x-toast-viewport-item-translate-x-exit"],variants:{default:["pont-border pont-border-toast-viewport-default-color-border pont-bg-toast-viewport-default-color-bg pont-text-toast-viewport-default-color-text"],destructive:["pont-bg-toast-viewport-destructive-color-bg pont-text-toast-viewport-destructive-color-text"]}},action:{base:["pont-text-toast-action-font pont-font-toast-action-font-weight pont-text-toast-action-color-text","pont-h-toast-action-space-h pont-px-toast-action-space-px pont-py-toast-action-space-py","pont-inline-flex pont-border pont-border-toast-action-color-border pont-shrink-0 pont-items-center pont-justify-center pont-rounded-toast-action-radius pont-transition-colors","focus:pont-outline-none focus:pont-ring-toast-action-width-ring-focus focus:pont-ring-toast-action-color-ring-focus","disabled:pont-pointer-events-none disabled:pont-opacity-toast-action-opacity-disabled"],variants:{default:["pont-bg-toast-action-default-color-bg hover:pont-bg-toast-action-default-color-bg-hover"],destructive:["pont-bg-toast-action-destructive-color-bg hover:pont-bg-toast-action-destructive-color-bg-hover pont-text-toast-action-destructive-color-text focus:pont-ring-toast-action-destructive-color-ring-focus"]}},title:["pont-text-toast-title-font pont-font-toast-title-font-weight [&+div]:pont-text-toast-title-font"],description:["pont-text-toast-description-font pont-opacity-toast-description-opacity"]};var Nw=Object.defineProperty,Mw=Object.getOwnPropertyDescriptor,dl=(e,t,r,n)=>{for(var o=n>1?void 0:n?Mw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Nw(t,r,o),o};const uc="closed";let qr=class extends y{constructor(){super(...arguments),this.variant="default",this.state=uc}get _containerElement(){return this.querySelector("li[part=toast-view-port-li]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l` <ol
2363
2363
  part="toast-view-port"
2364
2364
  tabindex="-1"
2365
2365
  @click="${e=>e.stopPropagation()}"
2366
- class="${u(xn.viewportRoot,this.className,`${this.state===hc?"hidden":"block"} `)}"
2366
+ class="${u(xn.viewportRoot,this.className,`${this.state===uc?"hidden":"block"} `)}"
2367
2367
  >
2368
2368
  <li
2369
2369
  part="toast-view-port-li"
@@ -2377,32 +2377,32 @@
2377
2377
  data-radix-collection-item=""
2378
2378
  style="user-select: none; touch-action: none;"
2379
2379
  ></li>
2380
- </ol>`}};qr.toastVariants=xn.viewportItem;dl([a({type:String})],qr.prototype,"variant",2);dl([a({attribute:"data-state",type:String})],qr.prototype,"state",2);qr=dl([p("pont-toast-view-port")],qr);var Lw=Object.defineProperty,Fw=Object.getOwnPropertyDescriptor,fh=(e,t,r,n)=>{for(var o=n>1?void 0:n?Fw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Lw(t,r,o),o};let Co=class extends y{constructor(){super(...arguments),this.variant="default"}get _containerElement(){return this.querySelector("button[part=toast-action]")}getAttributesToExclude(){return["click","type","variant"]}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}getFilteredAttributes(){const e=this.getAttributesToExclude(),t={};for(const r of this.attributes)e.includes(r.name)||(t[r.name]=r.value);return t}createRenderRoot(){return this}render(){const e=this.getFilteredAttributes();return l`
2380
+ </ol>`}};qr.toastVariants=xn.viewportItem;dl([a({type:String})],qr.prototype,"variant",2);dl([a({attribute:"data-state",type:String})],qr.prototype,"state",2);qr=dl([p("pont-toast-view-port")],qr);var Bw=Object.defineProperty,Uw=Object.getOwnPropertyDescriptor,fh=(e,t,r,n)=>{for(var o=n>1?void 0:n?Uw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Bw(t,r,o),o};let Co=class extends y{constructor(){super(...arguments),this.variant="default"}get _containerElement(){return this.querySelector("button[part=toast-action]")}getAttributesToExclude(){return["click","type","variant"]}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}getFilteredAttributes(){const e=this.getAttributesToExclude(),t={};for(const r of this.attributes)e.includes(r.name)||(t[r.name]=r.value);return t}createRenderRoot(){return this}render(){const e=this.getFilteredAttributes();return l`
2381
2381
  <button
2382
2382
  ${xt(e)}
2383
2383
  part="toast-action"
2384
2384
  type="button"
2385
2385
  class="${u(Co.toastVariants.base,Co.toastVariants.variants[this.variant],this.className,"pont-w-max")}"
2386
2386
  ></button>
2387
- `}};Co.toastVariants=xn.action;fh([a({type:String})],Co.prototype,"variant",2);Co=fh([p("pont-toast-action")],Co);var kw=Object.getOwnPropertyDescriptor,Nw=(e,t,r,n)=>{for(var o=n>1?void 0:n?kw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let uc=class extends y{get _containerElement(){return this.querySelector("div[part=toast-description]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`
2387
+ `}};Co.toastVariants=xn.action;fh([a({type:String})],Co.prototype,"variant",2);Co=fh([p("pont-toast-action")],Co);var jw=Object.getOwnPropertyDescriptor,qw=(e,t,r,n)=>{for(var o=n>1?void 0:n?jw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let mc=class extends y{get _containerElement(){return this.querySelector("div[part=toast-description]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`
2388
2388
  <div
2389
2389
  class="${u(xn.description,this.className)}"
2390
2390
  part="toast-description"
2391
2391
  >
2392
2392
  <slot></slot>
2393
2393
  </div>
2394
- `}};uc=Nw([p("pont-toast-description")],uc);var Mw=Object.getOwnPropertyDescriptor,Bw=(e,t,r,n)=>{for(var o=n>1?void 0:n?Mw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let mc=class extends y{get _containerElement(){return this.querySelector("div[part=toast-title]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`
2394
+ `}};mc=qw([p("pont-toast-description")],mc);var zw=Object.getOwnPropertyDescriptor,Vw=(e,t,r,n)=>{for(var o=n>1?void 0:n?zw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let gc=class extends y{get _containerElement(){return this.querySelector("div[part=toast-title]")}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){return l`
2395
2395
  <div
2396
2396
  part="toast-title"
2397
2397
  class="${u(xn.title,this.className)}"
2398
2398
  ></div>
2399
- `}};mc=Bw([p("pont-toast-title")],mc);var Uw=Object.getOwnPropertyDescriptor,jw=(e,t,r,n)=>{for(var o=n>1?void 0:n?Uw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let gc=class extends y{constructor(){super(),this.handleClick=this.handleClick.bind(this)}get _containerElement(){return this.querySelector("div[part=toast-trigger]")}get _toast(){let e=this.parentElement;for(;e&&!(e instanceof yi);)e=e.parentElement;return e}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}handleClick(e){e.stopPropagation(),this.dispatchEvent(new CustomEvent("open-toast",{bubbles:!0})),this._toast.isOpen=!0}render(){return l`
2399
+ `}};gc=Vw([p("pont-toast-title")],gc);var Hw=Object.getOwnPropertyDescriptor,Gw=(e,t,r,n)=>{for(var o=n>1?void 0:n?Hw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let fc=class extends y{constructor(){super(),this.handleClick=this.handleClick.bind(this)}get _containerElement(){return this.querySelector("div[part=toast-trigger]")}get _toast(){let e=this.parentElement;for(;e&&!(e instanceof yi);)e=e.parentElement;return e}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}handleClick(e){e.stopPropagation(),this.dispatchEvent(new CustomEvent("open-toast",{bubbles:!0})),this._toast.isOpen=!0}render(){return l`
2400
2400
  <div
2401
2401
  @click=${this.handleClick}
2402
2402
  part="toast-trigger"
2403
2403
  class="${u(this.className)}"
2404
2404
  ></div>
2405
- `}};gc=jw([p("pont-toast-trigger")],gc);var qw=Object.defineProperty,zw=Object.getOwnPropertyDescriptor,vh=(e,t,r,n)=>{for(var o=n>1?void 0:n?zw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&qw(t,r,o),o};let yi=class extends y{constructor(){super(...arguments),this.isOpen=!1}get _containerElement(){return this.querySelector("div[part=toast]")}onClick(){this.isOpen=!this.isOpen}connectedCallback(){super.connectedCallback(),this.addEventListener("close-toast",()=>{this.isOpen=!1}),this.addEventListener("open-toast",()=>{this.isOpen=!0})}get _content(){return this.querySelector("pont-toast-view-port")}updated(e){super.updated(e);const t=this._content;t&&(t.dataset.state=this.isOpen?"open":"closed")}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}createRenderRoot(){return this}render(){return l` <div class="${u("",this.className)}" part="toast"></div> `}};vh([g()],yi.prototype,"isOpen",2);yi=vh([p("pont-toast")],yi);var _i=(e=>(e.MULTIPLE="multiple",e.SINGLE="single",e))(_i||{}),wi=(e=>(e.DEFAULT="default",e.OUTLINE="outline",e))(wi||{}),$i=(e=>(e.SMALL="sm",e.MEDIUM="md",e.LARGE="lg",e))($i||{});const Vw=ka("pont-inline-flex pont-items-center pont-justify-center pont-rounded-toggle-group-item-radius pont-text-toggle-group-item-font pont-font-toggle-group-item-font-weight pont-transition-colors focus-visible:pont-outline-none focus-visible:pont-ring-toggle-group-item-width-ring-focus focus-visible:pont-ring-toggle-group-item-color-ring-focus focus-visible:pont-ring-offset-toggle-group-item-width-ring-offset-focus disabled:pont-pointer-events-none disabled:pont-opacity-toggle-group-item-opacity-disabled data-[state=on]:pont-bg-toggle-group-item-color-bg-on data-[state=on]:pont-text-toggle-group-item-color-text-on pont-bg-transparent",{variants:{variant:{default:"hover:pont-bg-toggle-group-item-default-color-bg-hover hover:pont-text-toggle-group-item-default-color-text-hover",outline:"pont-border pont-border-toggle-group-item-outline-color-border hover:pont-bg-toggle-group-item-outline-color-bg-hover hover:pont-text-toggle-group-item-outline-color-text-hover"},size:{sm:"pont-h-toggle-group-item-space-h-sm pont-px-toggle-group-item-space-px-sm",md:"pont-h-toggle-group-item-space-h-md pont-px-toggle-group-item-space-px-md",lg:"pont-h-toggle-group-item-space-h-lg pont-px-toggle-group-item-space-px-lg"}}}),Hw="pont-flex pont-items-center pont-justify-center pont-gap-toggle-group-space-gap";var Gw=Object.defineProperty,Kw=Object.getOwnPropertyDescriptor,Wr=(e,t,r,n)=>{for(var o=n>1?void 0:n?Kw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Gw(t,r,o),o};let Se=class extends y{constructor(){super(),this.checked=!1,this.id=Ia(),this.variant=wi.DEFAULT,this.size=$i.SMALL,this.disabled=!1,this.type=_i.SINGLE,this.variant=wi.DEFAULT,this.size=$i.SMALL}get _parent(){let e=this.parentElement;for(;e&&!(e instanceof We);)e=e.parentElement;return e}get _containerElement(){return this.querySelector("button[part=toggle-group-item]")}get _siblings(){var e;return Array.from(((e=this.parentElement)==null?void 0:e.children)||[]).filter(t=>t!==this)}getAttributesToExclude(){return["disabled","type"]}createRenderRoot(){return this}firstUpdated(e){this.syncFromParent(),this.moveLightDomChildrenInto(this._containerElement)}syncFromParent(){const e=this._parent;if(!e)return;this.variant!==e.variant&&(this.variant=e.variant),this.size!==e.size&&(this.size=e.size);const t=e.selectedItems.includes(this.id);this.checked!==t&&(this.checked=t),this.type!==e.type&&(this.type=e.type)}syncSelection(){const e=this._parent;if(!e)return;const t=e.selectedItems.includes(this.id);this.checked!==t&&(this.checked=t)}toggleSelection(e){if(this.disabled||!this._parent)return;const t=this._parent,r=t.selectedItems.indexOf(e);this.type===_i.SINGLE?(r!==-1?t.selectedItems.splice(r,1):t.selectedItems[0]=e,this._siblings.forEach(n=>n.syncSelection())):r!==-1?t.selectedItems.splice(r,1):t.selectedItems.push(e),this.syncSelection()}render(){return console.log({variant:this.variant,size:this.size,className:this.className}),l`
2405
+ `}};fc=Gw([p("pont-toast-trigger")],fc);var Kw=Object.defineProperty,Ww=Object.getOwnPropertyDescriptor,vh=(e,t,r,n)=>{for(var o=n>1?void 0:n?Ww(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Kw(t,r,o),o};let yi=class extends y{constructor(){super(...arguments),this.isOpen=!1}get _containerElement(){return this.querySelector("div[part=toast]")}onClick(){this.isOpen=!this.isOpen}connectedCallback(){super.connectedCallback(),this.addEventListener("close-toast",()=>{this.isOpen=!1}),this.addEventListener("open-toast",()=>{this.isOpen=!0})}get _content(){return this.querySelector("pont-toast-view-port")}updated(e){super.updated(e);const t=this._content;t&&(t.dataset.state=this.isOpen?"open":"closed")}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}createRenderRoot(){return this}render(){return l` <div class="${u("",this.className)}" part="toast"></div> `}};vh([g()],yi.prototype,"isOpen",2);yi=vh([p("pont-toast")],yi);var _i=(e=>(e.MULTIPLE="multiple",e.SINGLE="single",e))(_i||{}),wi=(e=>(e.DEFAULT="default",e.OUTLINE="outline",e))(wi||{}),$i=(e=>(e.SMALL="sm",e.MEDIUM="md",e.LARGE="lg",e))($i||{});const Yw=ka("pont-inline-flex pont-items-center pont-justify-center pont-rounded-toggle-group-item-radius pont-text-toggle-group-item-font pont-font-toggle-group-item-font-weight pont-transition-colors focus-visible:pont-outline-none focus-visible:pont-ring-toggle-group-item-width-ring-focus focus-visible:pont-ring-toggle-group-item-color-ring-focus focus-visible:pont-ring-offset-toggle-group-item-width-ring-offset-focus disabled:pont-pointer-events-none disabled:pont-opacity-toggle-group-item-opacity-disabled data-[state=on]:pont-bg-toggle-group-item-color-bg-on data-[state=on]:pont-text-toggle-group-item-color-text-on pont-bg-transparent",{variants:{variant:{default:"hover:pont-bg-toggle-group-item-default-color-bg-hover hover:pont-text-toggle-group-item-default-color-text-hover",outline:"pont-border pont-border-toggle-group-item-outline-color-border hover:pont-bg-toggle-group-item-outline-color-bg-hover hover:pont-text-toggle-group-item-outline-color-text-hover"},size:{sm:"pont-h-toggle-group-item-space-h-sm pont-px-toggle-group-item-space-px-sm",md:"pont-h-toggle-group-item-space-h-md pont-px-toggle-group-item-space-px-md",lg:"pont-h-toggle-group-item-space-h-lg pont-px-toggle-group-item-space-px-lg"}}}),Qw="pont-flex pont-items-center pont-justify-center pont-gap-toggle-group-space-gap";var Zw=Object.defineProperty,Jw=Object.getOwnPropertyDescriptor,Wr=(e,t,r,n)=>{for(var o=n>1?void 0:n?Jw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Zw(t,r,o),o};let Se=class extends y{constructor(){super(),this.checked=!1,this.id=Ia(),this.variant=wi.DEFAULT,this.size=$i.SMALL,this.disabled=!1,this.type=_i.SINGLE,this.variant=wi.DEFAULT,this.size=$i.SMALL}get _parent(){let e=this.parentElement;for(;e&&!(e instanceof We);)e=e.parentElement;return e}get _containerElement(){return this.querySelector("button[part=toggle-group-item]")}get _siblings(){var e;return Array.from(((e=this.parentElement)==null?void 0:e.children)||[]).filter(t=>t!==this)}getAttributesToExclude(){return["disabled","type"]}createRenderRoot(){return this}firstUpdated(e){this.syncFromParent(),this.moveLightDomChildrenInto(this._containerElement)}syncFromParent(){const e=this._parent;if(!e)return;this.variant!==e.variant&&(this.variant=e.variant),this.size!==e.size&&(this.size=e.size);const t=e.selectedItems.includes(this.id);this.checked!==t&&(this.checked=t),this.type!==e.type&&(this.type=e.type)}syncSelection(){const e=this._parent;if(!e)return;const t=e.selectedItems.includes(this.id);this.checked!==t&&(this.checked=t)}toggleSelection(e){if(this.disabled||!this._parent)return;const t=this._parent,r=t.selectedItems.indexOf(e);this.type===_i.SINGLE?(r!==-1?t.selectedItems.splice(r,1):t.selectedItems[0]=e,this._siblings.forEach(n=>n.syncSelection())):r!==-1?t.selectedItems.splice(r,1):t.selectedItems.push(e),this.syncSelection()}render(){return console.log({variant:this.variant,size:this.size,className:this.className}),l`
2406
2406
  <button
2407
2407
  part="toggle-group-item"
2408
2408
  id=${this.id}
@@ -2413,15 +2413,15 @@
2413
2413
  ?disabled=${this.disabled}
2414
2414
  @click=${()=>this.toggleSelection(this.id)}
2415
2415
  ></button>
2416
- `}};Se.toggleGroupVariants=Vw;Wr([a({attribute:!0,type:Boolean,reflect:!0})],Se.prototype,"checked",2);Wr([a({attribute:!0,type:String,reflect:!0})],Se.prototype,"id",2);Wr([a()],Se.prototype,"variant",2);Wr([a()],Se.prototype,"size",2);Wr([a({type:Boolean})],Se.prototype,"disabled",2);Wr([a({type:String})],Se.prototype,"type",2);Se=Wr([p("pont-toggle-group-item")],Se);var Ww=Object.defineProperty,Yw=Object.getOwnPropertyDescriptor,Yr=(e,t,r,n)=>{for(var o=n>1?void 0:n?Yw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Ww(t,r,o),o};let We=class extends y{constructor(){super(...arguments),this.disabled=!1,this.type=_i.SINGLE,this.required=!1,this.variant=wi.DEFAULT,this.size=$i.SMALL,this.selectedItems=[]}get _containerElement(){return this.querySelector("div[part=toggle-group]")}getAttributesToExclude(){return["disabled","type","data-testid"]}connectedCallback(){super.connectedCallback()}firstUpdated(e){super.firstUpdated(e),this.moveLightDomChildrenInto(this._containerElement)}updated(e){(e.has("variant")||e.has("size")||e.has("disabled")||e.has("type"))&&this.querySelectorAll("pont-toggle-group-item").forEach(t=>{t.variant=this.variant,t.size=this.size,t.disabled=this.disabled,t.type=this.type})}createRenderRoot(){return this}render(){const e=this.getFilteredAttributes();return console.log({variant:this.variant,size:this.size,className:this.className}),l`
2416
+ `}};Se.toggleGroupVariants=Yw;Wr([a({attribute:!0,type:Boolean,reflect:!0})],Se.prototype,"checked",2);Wr([a({attribute:!0,type:String,reflect:!0})],Se.prototype,"id",2);Wr([a()],Se.prototype,"variant",2);Wr([a()],Se.prototype,"size",2);Wr([a({type:Boolean})],Se.prototype,"disabled",2);Wr([a({type:String})],Se.prototype,"type",2);Se=Wr([p("pont-toggle-group-item")],Se);var Xw=Object.defineProperty,t$=Object.getOwnPropertyDescriptor,Yr=(e,t,r,n)=>{for(var o=n>1?void 0:n?t$(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Xw(t,r,o),o};let We=class extends y{constructor(){super(...arguments),this.disabled=!1,this.type=_i.SINGLE,this.required=!1,this.variant=wi.DEFAULT,this.size=$i.SMALL,this.selectedItems=[]}get _containerElement(){return this.querySelector("div[part=toggle-group]")}getAttributesToExclude(){return["disabled","type","data-testid"]}connectedCallback(){super.connectedCallback()}firstUpdated(e){super.firstUpdated(e),this.moveLightDomChildrenInto(this._containerElement)}updated(e){(e.has("variant")||e.has("size")||e.has("disabled")||e.has("type"))&&this.querySelectorAll("pont-toggle-group-item").forEach(t=>{t.variant=this.variant,t.size=this.size,t.disabled=this.disabled,t.type=this.type})}createRenderRoot(){return this}render(){const e=this.getFilteredAttributes();return console.log({variant:this.variant,size:this.size,className:this.className}),l`
2417
2417
  <div
2418
2418
  part="toggle-group"
2419
2419
  role="group"
2420
2420
  ${xt(e)}
2421
- class="${u(Hw,this.className)}"
2421
+ class="${u(Qw,this.className)}"
2422
2422
  ?disable="${this.disabled}"
2423
2423
  ></div>
2424
- `}};Yr([a({type:Boolean})],We.prototype,"disabled",2);Yr([a({type:String})],We.prototype,"type",2);Yr([a({attribute:!0,type:Boolean,reflect:!0})],We.prototype,"required",2);Yr([a()],We.prototype,"variant",2);Yr([a()],We.prototype,"size",2);Yr([a({type:Array})],We.prototype,"selectedItems",2);We=Yr([p("pont-toggle-group")],We);var Hn=(e=>(e.SMALL="sm",e.MEDIUM="md",e.LARGE="lg",e))(Hn||{}),Gn=(e=>(e.DEFAULT="default",e.OUTLINE="outline",e))(Gn||{});const Qw=ka("pont-inline-flex pont-items-center pont-justify-center pont-rounded-toggle-radius pont-text-toggle-font pont-font-toggle-font-weight pont-transition-colors focus-visible:pont-outline-none focus-visible:pont-ring-toggle-width-ring-focus focus-visible:pont-ring-toggle-color-ring-focus focus-visible:pont-ring-offset-toggle-width-ring-offset-focus disabled:pont-pointer-events-none disabled:pont-opacity-toggle-opacity-disabled data-[state=on]:pont-bg-toggle-color-bg-on data-[state=on]:pont-text-toggle-color-text-on pont-bg-transparent",{variants:{variant:{default:"hover:pont-bg-toggle-default-color-bg-hover hover:pont-text-toggle-default-color-text-hover",outline:"pont-border pont-border-toggle-outline-color-border hover:pont-bg-toggle-outline-color-bg-hover hover:pont-text-toggle-outline-color-text-hover"},size:{sm:"pont-h-toggle-space-h-sm pont-px-toggle-space-px-sm",md:"pont-h-toggle-space-h-md pont-px-toggle-space-px-md",lg:"pont-h-toggle-space-h-lg pont-px-toggle-space-px-lg"}}});var Zw=Object.defineProperty,Jw=Object.getOwnPropertyDescriptor,Bo=(e,t,r,n)=>{for(var o=n>1?void 0:n?Jw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Zw(t,r,o),o};let Ye=class extends y{constructor(){super(...arguments),this.disabled=!1,this.checked=!1,this.required=!1,this.variant=Gn.DEFAULT,this.size=Hn.SMALL}willUpdate(e){e.has("variant")&&(this.variant=this.normalizeEnum(this.variant,Gn,Gn.DEFAULT)),e.has("size")&&(this.size=this.normalizeEnum(this.size,Hn,Hn.SMALL))}get _containerElement(){return this.querySelector("button[part=toggle]")}getAttributesToExclude(){return["disabled","checked","variant","size","required","data-testid"]}toggle(){this.disabled||(this.checked=!this.checked)}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){const e=this.getFilteredAttributes();return l`
2424
+ `}};Yr([a({type:Boolean})],We.prototype,"disabled",2);Yr([a({type:String})],We.prototype,"type",2);Yr([a({attribute:!0,type:Boolean,reflect:!0})],We.prototype,"required",2);Yr([a()],We.prototype,"variant",2);Yr([a()],We.prototype,"size",2);Yr([a({type:Array})],We.prototype,"selectedItems",2);We=Yr([p("pont-toggle-group")],We);var Hn=(e=>(e.SMALL="sm",e.MEDIUM="md",e.LARGE="lg",e))(Hn||{}),Gn=(e=>(e.DEFAULT="default",e.OUTLINE="outline",e))(Gn||{});const e$=ka("pont-inline-flex pont-items-center pont-justify-center pont-rounded-toggle-radius pont-text-toggle-font pont-font-toggle-font-weight pont-transition-colors focus-visible:pont-outline-none focus-visible:pont-ring-toggle-width-ring-focus focus-visible:pont-ring-toggle-color-ring-focus focus-visible:pont-ring-offset-toggle-width-ring-offset-focus disabled:pont-pointer-events-none disabled:pont-opacity-toggle-opacity-disabled data-[state=on]:pont-bg-toggle-color-bg-on data-[state=on]:pont-text-toggle-color-text-on pont-bg-transparent",{variants:{variant:{default:"hover:pont-bg-toggle-default-color-bg-hover hover:pont-text-toggle-default-color-text-hover",outline:"pont-border pont-border-toggle-outline-color-border hover:pont-bg-toggle-outline-color-bg-hover hover:pont-text-toggle-outline-color-text-hover"},size:{sm:"pont-h-toggle-space-h-sm pont-px-toggle-space-px-sm",md:"pont-h-toggle-space-h-md pont-px-toggle-space-px-md",lg:"pont-h-toggle-space-h-lg pont-px-toggle-space-px-lg"}}});var r$=Object.defineProperty,o$=Object.getOwnPropertyDescriptor,Bo=(e,t,r,n)=>{for(var o=n>1?void 0:n?o$(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&r$(t,r,o),o};let Ye=class extends y{constructor(){super(...arguments),this.disabled=!1,this.checked=!1,this.required=!1,this.variant=Gn.DEFAULT,this.size=Hn.SMALL}willUpdate(e){e.has("variant")&&(this.variant=this.normalizeEnum(this.variant,Gn,Gn.DEFAULT)),e.has("size")&&(this.size=this.normalizeEnum(this.size,Hn,Hn.SMALL))}get _containerElement(){return this.querySelector("button[part=toggle]")}getAttributesToExclude(){return["disabled","checked","variant","size","required","data-testid"]}toggle(){this.disabled||(this.checked=!this.checked)}createRenderRoot(){return this}firstUpdated(e){this.moveLightDomChildrenInto(this._containerElement)}render(){const e=this.getFilteredAttributes();return l`
2425
2425
  <button
2426
2426
  type="button"
2427
2427
  part="toggle"
@@ -2434,13 +2434,13 @@
2434
2434
  ?disabled=${this.disabled}
2435
2435
  ${xt(e)}
2436
2436
  ></button>
2437
- `}};Ye.toggleVariants=Qw;Bo([a({type:Boolean})],Ye.prototype,"disabled",2);Bo([a({attribute:!0,type:Boolean,reflect:!0})],Ye.prototype,"checked",2);Bo([a({attribute:!0,type:Boolean,reflect:!0})],Ye.prototype,"required",2);Bo([a({attribute:!0,type:String})],Ye.prototype,"variant",2);Bo([a({attribute:!0,type:String})],Ye.prototype,"size",2);Ye=Bo([p("pont-toggle")],Ye);var Xw=Object.getOwnPropertyDescriptor,t$=(e,t,r,n)=>{for(var o=n>1?void 0:n?Xw(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let fc=class extends f{createRenderRoot(){return this}get _blockquoteSlot(){return this.querySelector('[data-slot="typography-blockquote"]')}firstUpdated(){const e=this._blockquoteSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<blockquote data-slot="typography-blockquote"></blockquote>`}};fc=t$([p("pont-typography-blockquote")],fc);var e$=Object.getOwnPropertyDescriptor,r$=(e,t,r,n)=>{for(var o=n>1?void 0:n?e$(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let vc=class extends f{createRenderRoot(){return this}get _codeSlot(){return this.querySelector('[data-slot="typography-code"]')}firstUpdated(){const e=this._codeSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<code data-slot="typography-code"></code>`}};vc=r$([p("pont-typography-code")],vc);var o$=Object.defineProperty,n$=Object.getOwnPropertyDescriptor,bh=(e,t,r,n)=>{for(var o=n>1?void 0:n?n$(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&o$(t,r,o),o};let va=class extends f{constructor(){super(...arguments),this.level="h1"}createRenderRoot(){return this}get _hSlot(){return this.querySelector('[data-slot="typography-h"]')}firstUpdated(){const e=this._hSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return this.level==="h2"?l`
2437
+ `}};Ye.toggleVariants=e$;Bo([a({type:Boolean})],Ye.prototype,"disabled",2);Bo([a({attribute:!0,type:Boolean,reflect:!0})],Ye.prototype,"checked",2);Bo([a({attribute:!0,type:Boolean,reflect:!0})],Ye.prototype,"required",2);Bo([a({attribute:!0,type:String})],Ye.prototype,"variant",2);Bo([a({attribute:!0,type:String})],Ye.prototype,"size",2);Ye=Bo([p("pont-toggle")],Ye);var n$=Object.getOwnPropertyDescriptor,i$=(e,t,r,n)=>{for(var o=n>1?void 0:n?n$(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let vc=class extends f{createRenderRoot(){return this}get _blockquoteSlot(){return this.querySelector('[data-slot="typography-blockquote"]')}firstUpdated(){const e=this._blockquoteSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<blockquote data-slot="typography-blockquote"></blockquote>`}};vc=i$([p("pont-typography-blockquote")],vc);var s$=Object.getOwnPropertyDescriptor,a$=(e,t,r,n)=>{for(var o=n>1?void 0:n?s$(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let bc=class extends f{createRenderRoot(){return this}get _codeSlot(){return this.querySelector('[data-slot="typography-code"]')}firstUpdated(){const e=this._codeSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<code data-slot="typography-code"></code>`}};bc=a$([p("pont-typography-code")],bc);var l$=Object.defineProperty,d$=Object.getOwnPropertyDescriptor,bh=(e,t,r,n)=>{for(var o=n>1?void 0:n?d$(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&l$(t,r,o),o};let va=class extends f{constructor(){super(...arguments),this.level="h1"}createRenderRoot(){return this}get _hSlot(){return this.querySelector('[data-slot="typography-h"]')}firstUpdated(){const e=this._hSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return this.level==="h2"?l`
2438
2438
  <h2 data-slot="typography-h" data-level="${this.level}"></h2>
2439
2439
  `:this.level==="h3"?l`
2440
2440
  <h3 data-slot="typography-h" data-level="${this.level}"></h3>
2441
2441
  `:this.level==="h4"?l`
2442
2442
  <h4 data-slot="typography-h" data-level="${this.level}"></h4>
2443
- `:l`<h1 data-slot="typography-h" data-level="${this.level}"></h1>`}};bh([a({type:String})],va.prototype,"level",2);va=bh([p("pont-typography-h")],va);var i$=Object.getOwnPropertyDescriptor,s$=(e,t,r,n)=>{for(var o=n>1?void 0:n?i$(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let bc=class extends f{createRenderRoot(){return this}get _largeSlot(){return this.querySelector('[data-slot="typography-large"]')}firstUpdated(){const e=this._largeSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<div data-slot="typography-large"></div>`}};bc=s$([p("pont-typography-large")],bc);var a$=Object.getOwnPropertyDescriptor,l$=(e,t,r,n)=>{for(var o=n>1?void 0:n?a$(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let yc=class extends f{createRenderRoot(){return this}get _leadSlot(){return this.querySelector('[data-slot="typography-lead"]')}firstUpdated(){const e=this._leadSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<p data-slot="typography-lead"></p>`}};yc=l$([p("pont-typography-lead")],yc);var d$=Object.getOwnPropertyDescriptor,c$=(e,t,r,n)=>{for(var o=n>1?void 0:n?d$(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let _c=class extends f{createRenderRoot(){return this}get _listSlot(){return this.querySelector('[data-slot="typography-list"]')}firstUpdated(){const e=this._listSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<ul data-slot="typography-list"></ul>`}};_c=c$([p("pont-typography-list")],_c);var p$=Object.getOwnPropertyDescriptor,h$=(e,t,r,n)=>{for(var o=n>1?void 0:n?p$(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let wc=class extends f{createRenderRoot(){return this}get _mutedSlot(){return this.querySelector('[data-slot="typography-muted"]')}firstUpdated(){const e=this._mutedSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<p data-slot="typography-muted"></p>`}};wc=h$([p("pont-typography-muted")],wc);var u$=Object.getOwnPropertyDescriptor,m$=(e,t,r,n)=>{for(var o=n>1?void 0:n?u$(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let $c=class extends f{createRenderRoot(){return this}get _pSlot(){return this.querySelector('[data-slot="typography-p"]')}firstUpdated(){const e=this._pSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<p data-slot="typography-p"></p>`}};$c=m$([p("pont-typography-p")],$c);var g$=Object.getOwnPropertyDescriptor,f$=(e,t,r,n)=>{for(var o=n>1?void 0:n?g$(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let Pc=class extends f{createRenderRoot(){return this}get _smallSlot(){return this.querySelector('[data-slot="typography-small"]')}firstUpdated(){const e=this._smallSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<small data-slot="typography-small"></small>`}};Pc=f$([p("pont-typography-small")],Pc);var v$=Object.getOwnPropertyDescriptor,b$=(e,t,r,n)=>{for(var o=n>1?void 0:n?v$(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let Cc=class extends f{createRenderRoot(){return this}};Cc=b$([p("pont-typography-table")],Cc);var y$=Object.defineProperty,_$=Object.getOwnPropertyDescriptor,bt=(e,t,r,n)=>{for(var o=n>1?void 0:n?_$(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&y$(t,r,o),o};let dt=class extends y{constructor(){super(...arguments),this.placeholder="Filter emails...",this.dataTable=[],this.hasDefaultSelect=!0,this.hasDefaultPagination=!0,this.hasDefaultSearch=!0,this.checkedRows={},this.searchTerm="",this.columnVisibility={},this.sortColumn=null,this.sortDirection="asc",this.cellRenderers={},this.rowActions=[],this.paginationLabels=["Previous","Next"],this.pageSize=5,this.currentPage=1,this.sortableColumns=["email"],this.columnOrder=[]}get _chevronDownIcon(){return l`
2443
+ `:l`<h1 data-slot="typography-h" data-level="${this.level}"></h1>`}};bh([a({type:String})],va.prototype,"level",2);va=bh([p("pont-typography-h")],va);var c$=Object.getOwnPropertyDescriptor,p$=(e,t,r,n)=>{for(var o=n>1?void 0:n?c$(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let yc=class extends f{createRenderRoot(){return this}get _largeSlot(){return this.querySelector('[data-slot="typography-large"]')}firstUpdated(){const e=this._largeSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<div data-slot="typography-large"></div>`}};yc=p$([p("pont-typography-large")],yc);var h$=Object.getOwnPropertyDescriptor,u$=(e,t,r,n)=>{for(var o=n>1?void 0:n?h$(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let _c=class extends f{createRenderRoot(){return this}get _leadSlot(){return this.querySelector('[data-slot="typography-lead"]')}firstUpdated(){const e=this._leadSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<p data-slot="typography-lead"></p>`}};_c=u$([p("pont-typography-lead")],_c);var m$=Object.getOwnPropertyDescriptor,g$=(e,t,r,n)=>{for(var o=n>1?void 0:n?m$(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let wc=class extends f{createRenderRoot(){return this}get _listSlot(){return this.querySelector('[data-slot="typography-list"]')}firstUpdated(){const e=this._listSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<ul data-slot="typography-list"></ul>`}};wc=g$([p("pont-typography-list")],wc);var f$=Object.getOwnPropertyDescriptor,v$=(e,t,r,n)=>{for(var o=n>1?void 0:n?f$(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let $c=class extends f{createRenderRoot(){return this}get _mutedSlot(){return this.querySelector('[data-slot="typography-muted"]')}firstUpdated(){const e=this._mutedSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<p data-slot="typography-muted"></p>`}};$c=v$([p("pont-typography-muted")],$c);var b$=Object.getOwnPropertyDescriptor,y$=(e,t,r,n)=>{for(var o=n>1?void 0:n?b$(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let Pc=class extends f{createRenderRoot(){return this}get _pSlot(){return this.querySelector('[data-slot="typography-p"]')}firstUpdated(){const e=this._pSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<p data-slot="typography-p"></p>`}};Pc=y$([p("pont-typography-p")],Pc);var _$=Object.getOwnPropertyDescriptor,w$=(e,t,r,n)=>{for(var o=n>1?void 0:n?_$(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let Cc=class extends f{createRenderRoot(){return this}get _smallSlot(){return this.querySelector('[data-slot="typography-small"]')}firstUpdated(){const e=this._smallSlot;if(!e)return;Array.from(this.childNodes).filter(r=>r!==e).forEach(r=>e.appendChild(r))}render(){return l`<small data-slot="typography-small"></small>`}};Cc=w$([p("pont-typography-small")],Cc);var $$=Object.getOwnPropertyDescriptor,P$=(e,t,r,n)=>{for(var o=n>1?void 0:n?$$(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(o)||o);return o};let Sc=class extends f{createRenderRoot(){return this}};Sc=P$([p("pont-typography-table")],Sc);var C$=Object.defineProperty,S$=Object.getOwnPropertyDescriptor,bt=(e,t,r,n)=>{for(var o=n>1?void 0:n?S$(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&C$(t,r,o),o};let ct=class extends y{constructor(){super(...arguments),this.placeholder="Filter emails...",this.dataTable=[],this.hasDefaultSelect=!0,this.hasDefaultPagination=!0,this.hasDefaultSearch=!0,this.checkedRows={},this.searchTerm="",this.columnVisibility={},this.sortColumn=null,this.sortDirection="asc",this.cellRenderers={},this.rowActions=[],this.paginationLabels=["Previous","Next"],this.pageSize=5,this.currentPage=1,this.sortableColumns=["email"],this.columnOrder=[]}get _chevronDownIcon(){return l`
2444
2444
  <svg
2445
2445
  xmlns="http://www.w3.org/2000/svg"
2446
2446
  width="24"
@@ -2625,8 +2625,8 @@
2625
2625
  </div>
2626
2626
  ${this.hasDefaultPagination&&this.hasDefaultSelect?this._renderPagination():h}
2627
2627
  </div>
2628
- `}};bt([a({type:String})],dt.prototype,"placeholder",2);bt([a({type:Array})],dt.prototype,"dataTable",2);bt([a({type:Boolean})],dt.prototype,"hasDefaultSelect",2);bt([a({type:Boolean})],dt.prototype,"hasDefaultPagination",2);bt([a({type:Boolean})],dt.prototype,"hasDefaultSearch",2);bt([a({type:Object})],dt.prototype,"checkedRows",2);bt([a({type:String})],dt.prototype,"searchTerm",2);bt([a({type:Object})],dt.prototype,"columnVisibility",2);bt([a({type:String})],dt.prototype,"sortColumn",2);bt([a({type:String})],dt.prototype,"sortDirection",2);bt([a({type:Object})],dt.prototype,"cellRenderers",2);bt([a({type:Object})],dt.prototype,"headerRenderers",2);bt([a({type:Array})],dt.prototype,"rowActions",2);bt([a({type:Array})],dt.prototype,"paginationLabels",2);bt([a({type:Number})],dt.prototype,"pageSize",2);bt([a({type:Number})],dt.prototype,"currentPage",2);bt([a({type:Array})],dt.prototype,"sortableColumns",2);bt([a({type:Array})],dt.prototype,"columnOrder",2);bt([a({type:Function})],dt.prototype,"isRowDisabled",2);dt=bt([p("pont-data-table")],dt);var X=class extends Error{constructor(t,r,n,o){super(r);I(this,"code");I(this,"details");I(this,"status");this.name="LoginflowError",this.code=t,this.details=n,this.status=o}};function yh(e){const t=(e??"").trim();if(!t)throw new X("CONFIG_ERROR","domain is required");if(t.startsWith("/")){if(typeof location>"u")throw new X("CONFIG_ERROR",`domain "${t}" is relative to the page origin, and there is no page here`);return Sc(new URL(t,location.origin))}const r=/^https?:\/\//i.test(t)?"":`${$$(w$(t))?"http":"https"}://`;try{return Sc(new URL(`${r}${t}`))}catch{throw new X("CONFIG_ERROR",`domain "${t}" is not a hostname, an origin, or a path`)}}function Sc(e){return`${e.origin}${e.pathname}`.replace(/\/+$/,"")}function w$(e){return e.split("/")[0]}function $$(e){return/^(localhost|127\.0\.0\.1|\[::1\])(:\d+)?$/i.test(e)}var fe,P$=(fe=class{constructor(){I(this,"data",new Map)}static get Instance(){return fe.instance||(fe.instance=new fe),fe.instance}get(t){return this.data.get(t)}set(t,r){this.data.set(t,r)}setConfig(t){this.data.set("config",t)}getConfig(){return this.data.get("config")}getApiBaseUrl(){return yh(this.getConfig().domain)}apiIsSameOrigin(){if(typeof location>"u")return!1;try{return new URL(this.getApiBaseUrl()).host===location.host}catch{return!1}}remove(t){this.data.delete(t)}clear(){this.data.clear()}},I(fe,"instance"),fe),it=P$.Instance,ve,Pi=(ve=class{constructor(){}static get Instance(){return ve.instance||(ve.instance=new ve),ve.instance}async request(t,r={}){const n=it.getConfig(),o=`${it.getApiBaseUrl()}${t}`,i=5e4,s=new AbortController,d=setTimeout(()=>s.abort(),i);try{const c=await fetch(o,{...r,signal:s.signal,headers:{"Content-Type":"application/json",...n.headers,...r.headers}});if(clearTimeout(d),!c.ok){const m=await c.json().catch(()=>({}));throw new X(m.code||m.error||"API_ERROR",m.message||m.error_description||`HTTP ${c.status}: ${c.statusText}`,m.details,c.status)}return await c.json()}catch(c){throw clearTimeout(d),c instanceof X?c:c instanceof Error?c.name==="AbortError"?new X("TIMEOUT","Request timeout"):new X("NETWORK_ERROR",c.message):new X("UNKNOWN_ERROR","An unknown error occurred")}}async post(t,r){return this.request(t,{credentials:"include",method:"POST",body:r?JSON.stringify(r):void 0})}async get(t){return this.request(t,{credentials:"include",method:"GET"})}async postForm(t,r){return this.request(t,{credentials:"include",method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams(r).toString()})}},I(ve,"instance"),ve),_h="__Secure-pontive_session_state",rs="__Secure-pontive_session_probe";function C$(){return wh(_h)?"present":S$()?"absent":"unknown"}function ba(){if(!(typeof document>"u"||typeof location>"u"))for(const e of["",...O$(location.hostname)])ya(_h,"",e,0)}function S$(){if(typeof document>"u"||typeof location>"u")return!1;const e=x$();try{ya(rs,"1",e,60);const t=wh(rs)==="1";return ya(rs,"",e,0),t&&E$(e)}catch{return!1}}function E$(e){return e!==""||it.apiIsSameOrigin()}function x$(){let e;try{e=new URL(it.getApiBaseUrl()).hostname}catch{return""}const t=location.hostname;if(!e||!t||e.toLowerCase()===t.toLowerCase())return"";const r=t.split("."),n=e.split(".");let o=0;for(;o<r.length&&o<n.length&&r[r.length-1-o].toLowerCase()===n[n.length-1-o].toLowerCase();)o+=1;return o<2?"":n.slice(n.length-o).join(".")}function O$(e){const t=e.split("."),r=[];for(let n=1;n+2<=t.length;n+=1)r.push(t.slice(n).join("."));return r}function ya(e,t,r,n){const o=R$()?"; Secure":"",i=r?`; Domain=${r}`:"";document.cookie=`${e}=${t}; Path=/; Max-Age=${n}; SameSite=Lax${i}${o}`}function R$(){return typeof globalThis.isSecureContext=="boolean"?globalThis.isSecureContext:location.protocol==="https:"}function wh(e){if(typeof document>"u"||!document.cookie)return null;for(const t of document.cookie.split(";")){const r=t.indexOf("=");if(!(r<0)&&t.slice(0,r).trim()===e)return t.slice(r+1).trim()||null}return null}var St,zt=(St=class{constructor(){I(this,"AUTH_SESSION_STORAGE_KEY","pontive_auth_session");I(this,"memorySession",null);I(this,"refreshTimeoutId",null);I(this,"refreshPromise",null);I(this,"refreshRetryCount",0);I(this,"refreshBlockedUntil",0);I(this,"sessionGeneration",0);I(this,"channel",null);I(this,"channelName","");I(this,"applyingBroadcast",!1);I(this,"restorePromise",null)}static get Instance(){return St.instance||(St.instance=new St),St.instance}setCurrentSession(t){this.sessionGeneration+=1,this.write(JSON.stringify(t)),this.publish({type:"session",session:t})}async withRefreshLock(t){const r=typeof navigator<"u"?navigator.locks:void 0;return r?r.request(this.channelKey("refresh"),t):t()}channelKey(t){const r=it.getConfig();return`pontive-${t}:${(r==null?void 0:r.domain)??""}:${(r==null?void 0:r.appId)??""}`}ensureChannel(){var r;if(typeof BroadcastChannel>"u")return null;const t=this.channelKey("session");return this.channel&&this.channelName===t?this.channel:((r=this.channel)==null||r.close(),this.channelName=t,this.channel=new BroadcastChannel(t),this.channel.onmessage=n=>this.receive(n.data),this.channel)}publish(t){var r;this.applyingBroadcast||(r=this.ensureChannel())==null||r.postMessage(t)}receive(t){this.applyingBroadcast=!0;try{if(t.type==="cleared"){this.clearSession();return}this.setCurrentSession(t.session),this.scheduleTokenRefresh()}finally{this.applyingBroadcast=!1}}isCurrentGeneration(t){return this.sessionGeneration===t}getCurrentSession(){const t=this.getStoredSession();return t?this.isSessionExpired(t)?(this.clearSession(),null):(this.shouldRefreshToken(t)&&this.triggerBackgroundRefresh(t),t):null}peekSession(){return this.getStoredSession()}isAuthenticated(){return this.getCurrentSession()!==null}getAuthenticatedUser(){const t=this.getCurrentSession();if(!t)return null;const r=t.id_token?this.decodeJWT(t.id_token):null;return r||(t.user??null)}cleanup(){var t;this.refreshTimeoutId&&(clearTimeout(this.refreshTimeoutId),this.refreshTimeoutId=null),this.refreshPromise=null,(t=this.channel)==null||t.close(),this.channel=null,this.channelName=""}clearSession(){this.sessionGeneration+=1,this.memorySession=null,localStorage.removeItem(this.AUTH_SESSION_STORAGE_KEY),this.refreshTimeoutId&&(clearTimeout(this.refreshTimeoutId),this.refreshTimeoutId=null),this.refreshRetryCount=0,this.refreshBlockedUntil=0,this.publish({type:"cleared"})}isSessionExpired(t){return!t||!t.expires_at?!0:Date.now()>=t.expires_at}cleanExpiredSession(){const t=this.getStoredSession();t&&this.isSessionExpired(t)&&this.clearSession()}getStoredSession(){const t=this.read();if(!t)return null;try{return JSON.parse(t)}catch{return this.clearSession(),null}}write(t){this.memorySession=t,localStorage.removeItem(this.AUTH_SESSION_STORAGE_KEY)}read(){return this.memorySession}decodeJWT(t){try{const n=t.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),o=decodeURIComponent(atob(n).split("").map(i=>"%"+("00"+i.charCodeAt(0).toString(16)).slice(-2)).join(""));return JSON.parse(o)}catch{return null}}shouldRefreshToken(t){if(!t||!t.expires_at)return!1;const r=Date.now(),n=t.expires_at,o=t.expires_in||3600,i=r+o*1e3*.2;return n<=i}scheduleTokenRefresh(){this.refreshTimeoutId&&(clearTimeout(this.refreshTimeoutId),this.refreshTimeoutId=null);const t=this.getCurrentSession();if(!t||!t.expires_at)return;const r=Date.now(),n=t.expires_at,o=t.expires_in||3600,i=n-r-o*1e3*.2;i>0&&(this.refreshTimeoutId=setTimeout(()=>{this.triggerBackgroundRefresh(t)},i))}triggerBackgroundRefresh(t){this.refreshPromise||Date.now()<this.refreshBlockedUntil||(this.refreshPromise=this.withRefreshLock(()=>{const r=this.getStoredSession();return r&&!this.shouldRefreshToken(r)?(this.scheduleTokenRefresh(),Promise.resolve(null)):this.refreshTokens(r??t)}).then(r=>(r&&(this.setCurrentSession(r),this.refreshRetryCount=0,this.refreshBlockedUntil=0,this.scheduleTokenRefresh()),r)).catch(r=>(console.error("Background token refresh failed:",r),null)).finally(()=>{this.refreshPromise=null}))}async refreshTokens(t){const r=this.sessionGeneration;try{const n=await this.requestTokens(t);return this.isCurrentGeneration(r)?n:(console.warn("Token refresh returned after the session changed; discarding it"),null)}catch(n){return this.isCurrentGeneration(r)?I$(n)?(console.error("Token refresh rejected, signing out:",Yo(n)),ba(),this.clearSession(),null):(console.warn("Token refresh failed, keeping session and retrying:",Yo(n)),this.scheduleRefreshRetry(t),null):(console.warn("Token refresh failed after the session changed; ignoring:",Yo(n)),null)}}async fetchUserInfo(t){try{return await Pi.Instance.request("/oauth2/userinfo",{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${t}`}})}catch(r){return console.debug("Could not read user info for the restored session:",Yo(r)),null}}async requestTokens(t){var o;const r={grant_type:"refresh_token",client_id:(o=it.getConfig())==null?void 0:o.appId};t!=null&&t.refresh_token&&(r.refresh_token=t.refresh_token);const n=await Pi.Instance.postForm("/oauth2/token",r);return{id_token:n.id_token??(t==null?void 0:t.id_token)??"",access_token:n.access_token,refresh_token:n.refresh_token??(t==null?void 0:t.refresh_token),expires_in:n.expires_in,expires_at:Date.now()+n.expires_in*1e3}}async restoreSession(){const t=this.getStoredSession();return t&&!this.isSessionExpired(t)?t:C$()==="absent"?null:this.restorePromise?this.restorePromise:(this.restorePromise=this.withRefreshLock(async()=>{const r=this.getStoredSession();if(r&&!this.isSessionExpired(r))return r;try{const n=await this.requestTokens(null);return n.id_token||(n.user=await this.fetchUserInfo(n.access_token)??void 0),this.setCurrentSession(n),this.scheduleTokenRefresh(),n}catch(n){return T$(n)&&ba(),console.debug("No session to restore:",Yo(n)),null}}).finally(()=>{this.restorePromise=null}),this.restorePromise)}scheduleRefreshRetry(t){if(this.refreshTimeoutId&&(clearTimeout(this.refreshTimeoutId),this.refreshTimeoutId=null),this.refreshRetryCount>=St.MAX_REFRESH_RETRIES){console.warn("Token refresh gave up after",this.refreshRetryCount,"attempts"),this.refreshRetryCount=0,this.refreshBlockedUntil=0;return}const r=Math.min(St.REFRESH_RETRY_BASE_MS*2**this.refreshRetryCount,St.MAX_REFRESH_RETRY_DELAY_MS);this.refreshRetryCount+=1,this.refreshBlockedUntil=Date.now()+r,this.refreshTimeoutId=setTimeout(()=>{this.refreshBlockedUntil=0,this.triggerBackgroundRefresh(t)},r)}},I(St,"MAX_REFRESH_RETRIES",5),I(St,"REFRESH_RETRY_BASE_MS",5e3),I(St,"MAX_REFRESH_RETRY_DELAY_MS",6e4),I(St,"instance"),St);function I$(e){return!(e instanceof X)||e.status===void 0?!1:e.status===401?!0:e.status===400&&A$.has(e.code)}var A$=new Set(["invalid_grant","invalid_client"]);function T$(e){return e instanceof X&&e.status!==void 0&&e.status>=400&&e.status<500}function Yo(e){return e instanceof X?`${e.code} (status ${e.status??"none"}): ${e.message}`:String(e)}var $h=class{constructor(e=sessionStorage){I(this,"storage");I(this,"FLOW_STATE_KEY","pontive_loginflow_state");I(this,"FLOW_EXPIRY_MS",540*1e3);this.storage=e}getFlowState(){const e=this.storage.getItem(this.FLOW_STATE_KEY);if(!e)return null;try{const t=JSON.parse(e);return this.isExpired(t)?(this.clearFlowState(),null):t}catch{return this.clearFlowState(),null}}saveFlowState(e,t,r){const n=Date.now(),o=this.getFlowState(),i={flowType:e,flow_id:t,state:r.state,startedAt:(o==null?void 0:o.startedAt)||n,lastUpdatedAt:n,render_spec:r.render_spec};this.storage.setItem(this.FLOW_STATE_KEY,JSON.stringify(i))}restoreFromHistory(e){const t={flowType:e.flowType,flow_id:e.flow_id,state:e.state,startedAt:e.timestamp,lastUpdatedAt:e.timestamp,render_spec:void 0};this.storage.setItem(this.FLOW_STATE_KEY,JSON.stringify(t))}clearFlowState(){this.storage.removeItem(this.FLOW_STATE_KEY)}isExpired(e){return Date.now()-e.lastUpdatedAt>this.FLOW_EXPIRY_MS}get expiryMs(){return this.FLOW_EXPIRY_MS}},Ci=class{static detect(e,t=window.location){const r=t.pathname.toLowerCase();return r.includes(e.signinUrl)?"signin":r.includes(e.signupUrl)?"signup":"custom"}},Ph=class{constructor(){I(this,"listeners",new Map)}on(e,t){this.listeners.has(e)||this.listeners.set(e,new Set),this.listeners.get(e).add(t)}off(e,t){var r;(r=this.listeners.get(e))==null||r.delete(t)}emit(e,t){const r=this.listeners.get(e);r&&r.forEach(n=>{try{n(t)}catch(o){console.error(`[FlowEventBus] Error in event handler for ${e}:`,o)}})}clear(){this.listeners.clear()}clearEvent(e){this.listeners.delete(e)}},D$=class{getNavigationType(){const e=performance.getEntriesByType("navigation");if(e.length>0)return e[0].type;const t=performance.navigation;if(t)switch(t.type){case 1:return"reload";case 2:return"back_forward";default:return"navigate"}return"navigate"}},L$=class Ch{constructor(t,r,n=window.location,o,i){I(this,"httpClient",Pi.Instance);I(this,"flowId");I(this,"redirectTimeoutId",null);I(this,"flowStateManager");I(this,"flowEventBus");I(this,"location");I(this,"navigationTypeDetector");I(this,"eventHandlers",new Map([["switch_to_signin",this.handleSwitchToSignin.bind(this)],["switch_to_signup",this.handleSwitchToSignup.bind(this)]]));const s=it.getConfig();if(!s.domain)throw new X("CONFIG_ERROR","Domain is required");if(!s.appId)throw new X("CONFIG_ERROR","App ID is required");this.flowId=t,this.location=n,this.flowStateManager=o||new $h,this.flowEventBus=r||new Ph,this.navigationTypeDetector=i||new D$,zt.Instance.cleanExpiredSession(),zt.Instance.scheduleTokenRefresh()}static async init(t,r,n,o,i){const s=new Ch(t,r,n,o,i),d=await s.initializeFlowInternal();return{sdk:s,flowType:d.flowType,isResumed:d.isResumed,state:d.state,render_spec:d.render_spec,auth_result:d.auth_result}}async startFlow(t,r){if(!r.app_id)throw new X("VALIDATION_ERROR","Client ID is required");const n=`/auth/v1/authflows/${t}/start`;return this.executeFlowRequest(()=>this.httpClient.post(n,r),"START_FLOW_ERROR","Failed to start flow")}async resumeFlow(t){const r=`/auth/v1/authflows/${t}/resume`;return this.executeFlowRequest(()=>this.httpClient.post(r),"RESUME_FLOW_ERROR","Failed to resume flow")}async processEvent(t,r){if(!t.event)throw new X("VALIDATION_ERROR","Event type is required");const n=this.eventHandlers.get(t.event);return n?await n():await this.processServerEvent(t,r)}async executeFlowRequest(t,r,n,o){try{const i=await t();return o&&await o(i),this.processAuthResult(i.auth_result),i.redirection&&this.redirect(i.redirection),i}catch(i){throw i instanceof X?i:new X(r,n,i instanceof Error?{originalError:i.message,stack:i.stack}:i)}}async processServerEvent(t,r){let n=this.flowStateManager.getFlowState();if(!n&&(console.warn("Flow state expired, restarting flow before processing event"),await this.initializeFlowInternal(),n=this.flowStateManager.getFlowState(),!n))throw new X("FLOW_RESTART_ERROR","Failed to restart flow - no flow state after initialization");const o=n.state,i=`/auth/v1/authflows/${n.flowType}/events`,s=await this.executeFlowRequest(()=>this.httpClient.post(i,t),"PROCESS_EVENT_ERROR","Failed to process event",r);if(!s.auth_result){this.flowStateManager.saveFlowState(n.flowType,n.flow_id,s);const d=this.flowStateManager.getFlowState();if(d){const c=o!==s.state;this.flowEventBus.emit("flow:updated",{flowState:d,isNewStep:c})}}return s}processAuthResult(t){if(t){const r={id_token:t.id_token,access_token:t.access_token,refresh_token:t.refresh_token,expires_in:t.expires_in,expires_at:Date.now()+t.expires_in*1e3};zt.Instance.setCurrentSession(r),zt.Instance.scheduleTokenRefresh(),this.flowStateManager.clearFlowState();const{onAuthenticated:n}=it.getConfig();if(n){n(r);return}console.warn("pontive: signed in, but no onAuthenticated was supplied, so the SDK cannot route the user. Supply onAuthenticated to handle the handoff.")}}async initializeFlowInternal(){const t=it.getConfig(),r=Ci.detect(t,this.location);this.validateFlowType(r);const n=this.flowStateManager.getFlowState();return this.shouldResumeFlow(n,r)?await this.resumeExistingFlow(n,r):await this.startNewFlow(r)}validateFlowType(t){if(t==="custom"&&!this.flowId)throw new X("FLOW_ID_ERROR","Flow ID is required for custom flows")}shouldResumeFlow(t,r){if(!t)return!1;const o=new URLSearchParams(this.location.search).get("resume")==="true",i=this.navigationTypeDetector.getNavigationType();if(i==="navigate"&&!o)return this.flowStateManager.clearFlowState(),console.log(`Fresh navigation detected (type: ${i}), starting new flow`),!1;if(t.flowType!==r)return this.flowStateManager.clearFlowState(),console.log(`Flow type changed from ${t.flowType} to ${r}, starting new flow, flow_id: ${this.flowId}`),!1;if(r==="custom"&&t.flow_id!==this.flowId)return this.flowStateManager.clearFlowState(),console.log(`Custom flow ID changed, starting new flow, flow_id: ${this.flowId}`),!1;const s=o?"explicit resume=true":`navigation type: ${i}`;return console.log(`Resuming existing flow (${s})`),!0}async resumeExistingFlow(t,r){try{const n=await this.resumeFlow(r);if(!n.auth_result){this.flowStateManager.saveFlowState(r,t.flow_id,n);const o=this.flowStateManager.getFlowState();o&&this.flowEventBus.emit("flow:resumed",{flowState:o})}return{flowType:r,isResumed:!0,state:n.state,render_spec:n.render_spec,auth_result:n.auth_result}}catch(n){return this.flowStateManager.clearFlowState(),console.warn("Failed to resume flow, starting fresh:",n),await this.startNewFlow(r)}}async startNewFlow(t){const r=it.getConfig(),n=new URLSearchParams(this.location.search),o={};n.forEach((c,m)=>{o[m]=c}),console.log("metadata",o);const i=n.get("locales")||r.locales||void 0,s={app_id:r.appId,origin_url:this.location.href,signin_url:r.signinUrl,signup_url:r.signupUrl,locales:i,flow_id:this.determineFlowId(t),metadata:o},d=await this.startFlow(t,s);if(!d.auth_result){this.flowStateManager.saveFlowState(t,s.flow_id,d);const c=this.flowStateManager.getFlowState();c&&this.flowEventBus.emit("flow:started",{flowState:c})}return{flowType:t,isResumed:!1,state:d.state,render_spec:d.render_spec,auth_result:d.auth_result}}determineFlowId(t){switch(t){case"signin":return this.flowId||"signin-flow";case"signup":return this.flowId||"signup-flow";case"custom":if(!this.flowId)throw new X("FLOW_ID_ERROR","Flow ID is required for custom flows");return this.flowId}}async handleSwitchToSignin(){const t=it.getConfig();return this.redirect({url:this.withCurrentQuery(t.signinUrl),redirect_delay:0}),{state:"End"}}async handleSwitchToSignup(){const t=it.getConfig();return this.redirect({url:this.withCurrentQuery(t.signupUrl),redirect_delay:0}),{state:"End"}}withCurrentQuery(t){const r=this.location.search;return!r||r==="?"?t:t.includes("?")?`${t}&${r.slice(1)}`:`${t}${r}`}redirect(t){t.url&&(this.redirectTimeoutId!==null&&(console.log("Clearing existing redirect timeout before scheduling new redirect to:",t.url),clearTimeout(this.redirectTimeoutId),this.redirectTimeoutId=null),this.redirectTimeoutId=setTimeout(()=>{this.location.href=t.url},t.redirect_delay*1e3))}reloadPage(){setTimeout(()=>{this.location.reload()},0)}getEventBus(){return this.flowEventBus}cleanup(){this.redirectTimeoutId&&(clearTimeout(this.redirectTimeoutId),this.redirectTimeoutId=null),this.flowEventBus.clear()}},F$=class{constructor(e){I(this,"delayMs");I(this,"timerId",null);this.delayMs=e}debounce(e){this.timerId&&clearTimeout(this.timerId),this.timerId=setTimeout(()=>{e(),this.timerId=null},this.delayMs)}cancel(){this.timerId&&(clearTimeout(this.timerId),this.timerId=null)}isPending(){return this.timerId!==null}},k$=class{pushState(e,t,r){history.pushState(e,t,r)}replaceState(e,t,r){history.replaceState(e,t,r)}get state(){return history.state}},N$=class{constructor(e,t,r=!1,n=window.location,o,i){I(this,"popstateListener",null);I(this,"pageshowListener",null);I(this,"debouncer");I(this,"isProcessing",!1);I(this,"isHandlingNavigationEvent",!1);I(this,"onFlowRestartNeeded",null);I(this,"skipHistoryTracking");I(this,"flowStateManager");I(this,"historyAdapter");I(this,"location");this.onFlowRestartNeeded=t,this.skipHistoryTracking=r,this.debouncer=new F$(200),this.location=n,this.flowStateManager=o||new $h,this.historyAdapter=i||new k$,this.subscribeToFlowEvents(e),this.initializeListener()}subscribeToFlowEvents(e){e.on("flow:started",this.handleFlowStart.bind(this)),e.on("flow:updated",this.handleFlowUpdate.bind(this)),e.on("flow:resumed",this.handleFlowResume.bind(this))}initializeListener(){this.popstateListener=e=>{console.log("[NavigationManager] popstate event received"),this.debouncer.debounce(()=>{console.log("[NavigationManager] Debounce timeout fired, handling popstate"),this.handlePopState(e)})},this.pageshowListener=e=>{e.persisted&&(console.log("[NavigationManager] Page restored from bfcache"),this.debouncer.debounce(()=>{console.log("[NavigationManager] Handling bfcache restoration"),this.handleBfcacheRestoration()}))},window.addEventListener("popstate",this.popstateListener),window.addEventListener("pageshow",this.pageshowListener)}async handlePopState(e){if(this.isProcessing){console.log("[NavigationManager] Already processing popstate, skipping");return}console.log("[NavigationManager] Starting popstate processing"),this.isProcessing=!0,this.isHandlingNavigationEvent=!0;try{const t=e.state,r=this.flowStateManager.getFlowState(),n=it.getConfig(),o=Ci.detect(n,this.location);if(t&&this.restoreHistoryStateToSession(t),this.shouldRestartFlow(t,r,o)){await this.triggerFlowRestart();return}console.log("[NavigationManager] Valid state restored from history")}finally{this.isProcessing=!1,this.isHandlingNavigationEvent=!1}}async handleBfcacheRestoration(){if(this.isProcessing){console.log("[NavigationManager] Already processing bfcache restoration, skipping");return}console.log("[NavigationManager] Starting bfcache restoration processing"),this.isProcessing=!0,this.isHandlingNavigationEvent=!0;try{const e=this.historyAdapter.state,t=this.flowStateManager.getFlowState(),r=it.getConfig(),n=Ci.detect(r,this.location);if(e&&this.restoreHistoryStateToSession(e),this.shouldRestartFlow(e,t,n)){await this.triggerFlowRestart();return}console.log("[NavigationManager] Valid state restored from bfcache")}finally{this.isProcessing=!1,this.isHandlingNavigationEvent=!1}}restoreHistoryStateToSession(e){console.log("[NavigationManager] Restoring history state to session storage:",e),this.flowStateManager.restoreFromHistory(e)}shouldRestartFlow(e,t,r){return e&&e.flowType!==r?(console.log("[NavigationManager] Flow type changed via navigation:",e.flowType,"→",r),this.flowStateManager.clearFlowState(),!0):e?Date.now()-e.timestamp>this.flowStateManager.expiryMs?(console.log("[NavigationManager] History state expired, clearing and restarting flow"),this.flowStateManager.clearFlowState(),!0):(console.log("[NavigationManager] Valid history state restored, triggering restart to resume flow"),!0):(console.log("[NavigationManager] No history state, skipping"),!1)}async triggerFlowRestart(){this.onFlowRestartNeeded&&await this.onFlowRestartNeeded()}createHistoryState(e){return{flowType:e.flowType,flow_id:e.flow_id,state:e.state,timestamp:Date.now()}}updateBrowserHistory(e,t){if(this.skipHistoryTracking){console.log("[NavigationManager] Skipping history tracking (created from navigation)");return}const r=this.createHistoryState(e);try{t==="push"?(this.historyAdapter.pushState(r,"",this.location.href),console.log("[NavigationManager] Pushed state to history")):(this.historyAdapter.replaceState(r,"",this.location.href),console.log("[NavigationManager] Replaced state in history"))}catch(n){console.error("[NavigationManager] Failed to update history:",n)}}handleFlowStart(e){this.updateBrowserHistory(e.flowState,"replace")}handleFlowUpdate(e){const t=this.isHandlingNavigationEvent||!e.isNewStep?"replace":"push";this.updateBrowserHistory(e.flowState,t)}handleFlowResume(e){this.updateBrowserHistory(e.flowState,"replace")}destroy(){this.debouncer.cancel(),this.popstateListener&&(window.removeEventListener("popstate",this.popstateListener),this.popstateListener=null),this.pageshowListener&&(window.removeEventListener("pageshow",this.pageshowListener),this.pageshowListener=null),this.onFlowRestartNeeded=null}},Cr=new AbortController,M$=class{constructor(){I(this,"httpClient",Pi.Instance);I(this,"capabilities",{webauthn:!1});I(this,"capabilitiesDetected",!1)}async detectCapabilities(){if(!this.capabilitiesDetected)try{if(typeof window.PublicKeyCredential=="function"?this.capabilities.webauthn=!0:this.capabilities.webauthn=!1,typeof PublicKeyCredential.getClientCapabilities=="function"){const e=await PublicKeyCredential.getClientCapabilities();this.capabilities={...this.capabilities,...e};return}typeof PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable=="function"&&(this.capabilities.userVerifyingPlatformAuthenticator=await PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable()),(PublicKeyCredential==null?void 0:PublicKeyCredential.isConditionalMediationAvailable)!==void 0&&typeof PublicKeyCredential.isConditionalMediationAvailable=="function"?this.capabilities.conditionalGet=await PublicKeyCredential.isConditionalMediationAvailable():this.capabilities.conditionalGet=!1}finally{this.capabilitiesDetected=!0}}async fetchPublicKeyCredentialRequestOptions(e,t){try{return this.httpClient.post("/auth/v1/webauthn/login/options",{conditional:t,flow_type:e})}catch(r){return console.error("error",r),null}}async fetchPublicKeyCredentialCreationOptions(e,t){try{return this.httpClient.post("/auth/v1/webauthn/register/options",{conditional:t,flow_type:e})}catch(r){return console.error("error",r),null}}async startRegistration(e,t){if(await this.detectCapabilities(),!e)return console.error("No PublicKeyCredentialCreationOptionsJSON provided"),null;Cr.abort(),Cr=new AbortController;const r=this.toPublicKeyCredentialCreationOptions(e),n={signal:Cr.signal,publicKey:r};if(t){if(!this.isConditionalCreateAvailable())return console.error("Conditional create mediation not supported in this browser"),null;n.mediation="conditional"}try{const o=await navigator.credentials.create(n);if(!o){console.error("no credential returned by authenticator");return}const{id:i,rawId:s,response:d,type:c}=o;let m;typeof d.getTransports=="function"&&(m=d.getTransports());let v;if(typeof d.getPublicKeyAlgorithm=="function")try{v=d.getPublicKeyAlgorithm()}catch(_){os("getPublicKeyAlgorithm()",_)}let b;if(typeof d.getPublicKey=="function")try{const _=d.getPublicKey();_!==null&&(b=this.bufferToBase64URLString(_))}catch(_){os("getPublicKey()",_)}let w;if(typeof d.getAuthenticatorData=="function")try{w=this.bufferToBase64URLString(d.getAuthenticatorData())}catch(_){os("getAuthenticatorData()",_)}return{id:i,rawId:this.bufferToBase64URLString(s),response:{attestationObject:this.bufferToBase64URLString(d.attestationObject),clientDataJSON:this.bufferToBase64URLString(d.clientDataJSON),transports:m,publicKeyAlgorithm:v,publicKey:b,authenticatorData:w},type:c,clientExtensionResults:o.getClientExtensionResults(),authenticatorAttachment:this.toAuthenticatorAttachment(o.authenticatorAttachment)}}catch(o){const i=this.identifyAuthenticationError({error:o,options:n});return i instanceof Sr?console.error(`WebAuthn authentication failed with code: ${i.code}, message: ${i.message}`):console.error("WebAuthn authentication failed with error:",o),null}}async startAuthentication(e,t){if(await this.detectCapabilities(),!e)return console.error("No PublicKeyCredentialRequestOptionsJSON provided"),null;if(!this.isWebAuthnAvailable())return console.error("WebAuthn not supported in this browser"),null;Cr.abort(),Cr=new AbortController;const r=this.toPublicKeyCredentialRequestOptions(e),n={signal:Cr.signal,publicKey:r};if(t){if(!this.isConditionalGetAvailable())return console.error("Conditional mediation not supported in this browser"),null;n.mediation="conditional",n.publicKey&&(n.publicKey.allowCredentials=[])}try{const o=await navigator.credentials.get(n);return this.toPublicKeyCredentialJSON(o)}catch(o){const i=this.identifyAuthenticationError({error:o,options:n});return i instanceof Sr?console.error(`WebAuthn authentication failed with code: ${i.code}, message: ${i.message}`):console.error("WebAuthn authentication failed with error:",o),null}}async signalUnknownCredential(e,t){if(await this.detectCapabilities(),this.isSignalUnknownCredentialAvailable())try{await PublicKeyCredential.signalUnknownCredential({rpId:e,credentialId:t})}catch(r){console.error("Failed to signal unknown credential:",r)}else console.warn("signalUnknownCredential not supported in this browser")}async signalCurrentUserDetails(e){if(await this.detectCapabilities(),this.isSignalCurrentUserDetailsAvailable())try{await PublicKeyCredential.signalCurrentUserDetails(e)}catch(t){console.error("Failed to signal current user details:",t)}else console.warn("signalCurrentUserDetails not supported. Ask user to update manually.")}toPublicKeyCredentialDescriptor(e){const{id:t}=e;return{...e,id:this.base64URLStringToBuffer(t),type:e.type,transports:e.transports}}toAuthenticatorAttachment(e){const t=["cross-platform","platform"];if(e&&!(t.indexOf(e)<0))return e}bufferToBase64URLString(e){const t=new Uint8Array(e);let r="";for(const o of t)r+=String.fromCharCode(o);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}base64URLStringToBuffer(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),r=(4-t.length%4)%4,n=t.padEnd(t.length+r,"="),o=atob(n),i=new ArrayBuffer(o.length),s=new Uint8Array(i);for(let d=0;d<o.length;d++)s[d]=o.charCodeAt(d);return i}toPublicKeyCredentialJSON(e){if(typeof e.toJSON=="function")return e.toJSON();const t=e.response;return{id:e.id,type:e.type,rawId:this.bufferToBase64URLString(e.rawId),authenticatorAttachment:this.toAuthenticatorAttachment(e.authenticatorAttachment),clientExtensionResults:e==null?void 0:e.getClientExtensionResults(),response:{clientDataJSON:this.bufferToBase64URLString(t.clientDataJSON),authenticatorData:this.bufferToBase64URLString(t.authenticatorData),signature:this.bufferToBase64URLString(t.signature),userHandle:t.userHandle?this.bufferToBase64URLString(t.userHandle):void 0}}}toPublicKeyCredentialCreationOptions(e){var r;if(typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(e);const t={challenge:this.base64URLStringToBuffer(e.challenge),rp:{id:e.rp.id,name:e.rp.name},user:{displayName:e.user.displayName,id:this.base64URLStringToBuffer(e.user.id),name:e.user.name},pubKeyCredParams:e.pubKeyCredParams.map(n=>({alg:n.alg,type:n.type})),timeout:e.timeout};if(e.attestation&&(t.attestation=e.attestation),e.extensions!==void 0&&(t.extensions=e.extensions),e.authenticatorSelection){const n={};e.authenticatorSelection.authenticatorAttachment&&(n.authenticatorAttachment=e.authenticatorSelection.authenticatorAttachment),e.authenticatorSelection.requireResidentKey&&(n.requireResidentKey=e.authenticatorSelection.requireResidentKey),e.authenticatorSelection.residentKey&&(n.residentKey=e.authenticatorSelection.residentKey),e.authenticatorSelection.userVerification&&(n.userVerification=e.authenticatorSelection.userVerification),t.authenticatorSelection=n}return(r=e.excludeCredentials)!=null&&r.length&&(t.excludeCredentials=e.excludeCredentials.map(n=>this.toPublicKeyCredentialDescriptor(n))),t}toPublicKeyCredentialRequestOptions(e){var r;if(typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(e);const t={challenge:this.base64URLStringToBuffer(e.challenge)};return e.rpId!==void 0&&(t.rpId=e.rpId),e.timeout!==void 0&&(t.timeout=e.timeout),e.userVerification!==void 0&&(t.userVerification=e.userVerification),e.extensions!==void 0&&(t.extensions=e.extensions),(r=e.allowCredentials)!=null&&r.length&&(t.allowCredentials=e.allowCredentials.map(n=>this.toPublicKeyCredentialDescriptor(n))),t}identifyAuthenticationError({error:e,options:t}){const{publicKey:r}=t;if(!r)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new Sr({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new Sr({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const n=window.location.hostname;if(B$(n)){if(r.rpId!==n)return new Sr({message:`The RP ID "${r.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Sr({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new Sr({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return e}isPublicKeyCredentialRequestOptionsJSON(e){return typeof e=="object"&&e!==null&&"challenge"in e}isWebAuthnAvailable(){return this.capabilities.webauthn}isSignalAllAcceptedCredentialsAvailable(){return!!this.capabilities.signalAllAcceptedCredentials}isSignalCurrentUserDetailsAvailable(){return!!this.capabilities.signalCurrentUserDetails}isSignalUnknownCredentialAvailable(){return!!this.capabilities.signalUnknownCredential}isConditionalGetAvailable(){return!!this.capabilities.conditionalGet}isConditionalCreateAvailable(){return!!this.capabilities.conditionalCreate}isHybridTransportAvailable(){return!!this.capabilities.hybridTransport}destroy(){Cr.abort()}};function os(e,t){console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${e}. You should report this error to them.
2629
- `,t)}var Sr=class extends Error{constructor({message:t,code:r,cause:n,name:o}){super(t);I(this,"code");this.name=o??n.name,this.code=r}};function B$(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}var be,U$=(be=class{constructor(){I(this,"configured",!1);I(this,"configuredResolve");I(this,"configuredPromise",new Promise(t=>{this.configuredResolve=t}));I(this,"loginflow",null);I(this,"navigationManager",null);I(this,"flowEventBus",null);I(this,"webauthnService",null)}static get Instance(){return be.instance||(be.instance=new be),be.instance}ensureConfigured(){if(!this.configured)throw new X("NOT_CONFIGURED","Auth.configure() must be called before using Auth methods")}ensureLoginflowInitialized(){if(!this.loginflow)throw new X("LOGINFLOW_NOT_INITIALIZED","Call Auth.startLoginflow() first")}async startLoginflowInternal(t,r=!1){this.ensureConfigured(),this.webauthnService&&(console.log("[AuthService] Cleaning up and aborting ongoing webauthn flows"),this.webauthnService.destroy(),this.webauthnService=null),this.loginflow&&(console.log("[AuthService] Cleaning up old loginflow instance"),this.loginflow.cleanup(),this.loginflow=null),this.navigationManager&&(console.log("[AuthService] Cleaning up old navigation manager instance"),this.navigationManager.destroy(),this.navigationManager=null),this.webauthnService=new M$,this.webauthnService.detectCapabilities(),this.flowEventBus=new Ph,this.navigationManager=new N$(this.flowEventBus,async()=>{console.log("[AuthService] Navigation restart triggered, restarting loginflow"),await this.startLoginflowInternal(void 0,!1)},r);const n=await L$.init(t,this.flowEventBus),o=it.getConfig();this.startPasskeyAuthentication(n.flowType,!0),this.loginflow=n.sdk;const i={flowType:n.flowType,isResumed:n.isResumed,state:n.state,render_spec:n.render_spec,auth_result:n.auth_result};return o.onFlowStateChange&&o.onFlowStateChange({eventType:n.isResumed?"flow_resumed":"flow_started",flowType:n.flowType,state:n.state,render_spec:n.render_spec,auth_result:n.auth_result,isResumed:n.isResumed}),i}configure(t){if(!t.domain||!t.appId)throw new X("CONFIG_ERROR","domain and appId are required");it.setConfig(t),this.configured=!0,this.configuredResolve()}whenConfigured(){return this.configuredPromise}isAuthenticated(){return this.ensureConfigured(),zt.Instance.isAuthenticated()}getCurrentSession(){return this.ensureConfigured(),zt.Instance.getCurrentSession()}async restoreSession(){return this.ensureConfigured(),zt.Instance.restoreSession()}getAuthenticatedUser(){return this.ensureConfigured(),zt.Instance.getAuthenticatedUser()}async startLoginflow(t){return this.startLoginflowInternal(t,!1)}async processLoginflowEvent(t){var i,s;this.ensureConfigured(),this.ensureLoginflowInitialized();const r=it.getConfig(),n=Ci.detect(r,location);if(t.event==="signin_with_passkey"&&!((i=t.data)!=null&&i.credential_request)){const d=await this.getPasskeyCredential(n,!1);if(!d||!d.cred)return console.error("no credential returned by browser"),{state:""};t.data={credential_request:d.cred}}if(t.event==="register_passkey"&&!((s=t.data)!=null&&s.conditional)){console.log("attempt to register a passkey");const d=await this.createPasskeyCredential(n,!1);if(!d)return console.error("no credential created by browser"),{state:""};t.data={credential_creation_response:d,conditional:!1}}const o=await this.loginflow.processEvent(t,async d=>{var c;if((c=d.data)!=null&&c.conditional_create_enabled){console.log("attempt to register a passkey conditionally");const m=await this.registerPasskey(n,!0);m&&(m.render_spec=void 0,d.render_spec=void 0)}});if(console.log("render spec",o.render_spec),r.onFlowStateChange){const d=sessionStorage.getItem("pontive_loginflow_state");let c="custom";if(d)try{c=JSON.parse(d).flowType}catch(m){console.error("Failed to parse flow state:",m)}r.onFlowStateChange({eventType:"flow_updated",flowType:c,state:o.state,render_spec:o.render_spec,auth_result:o.auth_result})}return o}async getPasskeyCredential(t,r){var o,i;const n=await((o=this.webauthnService)==null?void 0:o.fetchPublicKeyCredentialRequestOptions(t,r));if(!n)return console.error("failed to fetch public key request options"),null;try{return{cred:await((i=this.webauthnService)==null?void 0:i.startAuthentication(n,r)),options:n}}catch(s){return console.error("error starting authentication",s),null}}async startPasskeyAuthentication(t,r=!1){var s,d;const n=await this.getPasskeyCredential(t,r);if(!n||!n.cred){console.error("no credential found");return}const{cred:o,options:i}=n;try{((s=(await this.processLoginflowEvent({event:"signin_with_passkey",data:{credential_request:o}})).data)==null?void 0:s.error)==="CredentialNotFound"&&(i.rpId&&o.id?(d=this.webauthnService)==null||d.signalUnknownCredential(i.rpId,o.id):console.log("missing rpId or credential id for signalUnknownCredential"))}catch(c){console.error("failed to signin with passkey",c)}}async createPasskeyCredential(t,r){var n,o;try{const i=await((n=this.webauthnService)==null?void 0:n.fetchPublicKeyCredentialCreationOptions(t,r));if(!i){console.warn("no credential creation option returned by webauthn service"),console.log("skipping conditional passkey registration...");return}return(o=this.webauthnService)==null?void 0:o.startRegistration(i,r)}catch(i){console.log("error",i)}}async registerPasskey(t,r=!1){try{const n=await this.createPasskeyCredential(t,r),o=await this.processLoginflowEvent({event:"register_passkey",data:{credential_creation_response:n,conditional:r}});return console.log("passkey creation res",o),o}catch(n){console.log("error",n)}}invalidateSession(){zt.Instance.clearSession()}async signOut(t){var o,i;this.ensureConfigured();const r=(o=zt.Instance.peekSession())==null?void 0:o.id_token,n=((i=it.getConfig())==null?void 0:i.appId)??"";if(ba(),zt.Instance.clearSession(),zt.Instance.cleanup(),this.loginflow&&(this.loginflow.cleanup(),this.loginflow=null),this.navigationManager&&(this.navigationManager.destroy(),this.navigationManager=null),this.flowEventBus&&(this.flowEventBus.clear(),this.flowEventBus=null),!it.apiIsSameOrigin()){window.location.assign(this.endSessionUrl(r,n,t==null?void 0:t.returnTo));return}await this.endServerSession(r,n),window.location.reload()}async endServerSession(t,r){try{await fetch(`${it.getApiBaseUrl()}/oauth2/end_session`,{method:"POST",credentials:"include",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({client_id:r,...t?{id_token_hint:t}:{}}).toString()})}catch(n){console.warn("Could not end the session at the authorization server:",n)}}endSessionUrl(t,r,n){const o=new URLSearchParams({post_logout_redirect_uri:n??`${window.location.origin}${window.location.pathname}`,client_id:r});return t&&o.set("id_token_hint",t),`${it.getApiBaseUrl()}/oauth2/end_session?${o.toString()}`}},I(be,"instance"),be),tt=U$.Instance,j$=Object.defineProperty,q$=(e,t,r,n)=>{for(var o=void 0,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(t,r,o)||o);return o&&j$(t,r,o),o};class jt extends f{constructor(){super(),this.shadow=!1,this.__initialAttributesCache=null}parseJsonAttribute(t){try{const r=this.getAttribute(t);return r?JSON.parse(r):{}}catch{return{}}}get sbStyle(){return this.parseJsonAttribute("pont-style")}getAttributesToExclude(){return[]}getFilteredAttributes(){const t={};return Array.from(this.attributes).forEach(r=>{this.getAttributesToExclude().includes(r.name)||(t[r.name]=r.value??"")}),t}isCustomPropertySet(t){const r=getComputedStyle(this).getPropertyValue(t).trim();return r!=="inherit"&&r.length>0}applyCustomClass(t,r,n=""){var o,i;t.some(s=>this.isCustomPropertySet(s))&&((i=(o=this.shadowRoot)==null?void 0:o.querySelector(r))==null||i.classList.add(n))}moveAttributesToElement(t,r=["id","class"]){t&&r.forEach(n=>{const o=this.getAttribute(n);o!==null&&(t.setAttribute(n,o),this.removeAttribute(n))})}removeAttributesFromHost(t=["id","class"]){t.forEach(r=>{this.hasAttribute(r)&&this.removeAttribute(r)})}captureHostAttributes(){if(this.__initialAttributesCache)return this.__initialAttributesCache;const t={};return Array.from(this.attributes).forEach(r=>{t[r.name]=r.value}),this.__initialAttributesCache=t,t}getHostClass(){return this.captureHostAttributes().class??""}removeDuplicateContent(){var i;const t=document.createTreeWalker(this,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{var d;return s.nodeType===Node.COMMENT_NODE||s.nodeType===Node.TEXT_NODE&&!((d=s.textContent)!=null&&d.trim())?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),r=new Map,n=[];let o;for(;o=t.nextNode();){let s;if(o.nodeType===Node.TEXT_NODE){const d=(i=o.textContent)==null?void 0:i.trim();if(!d)continue;s=`text:${d}`}else if(o instanceof HTMLElement){const d=Array.from(o.attributes).map(c=>`${c.name}=${c.value}`).sort().join(":");s=`element:${o.tagName}:${d}`}else continue;if(r.has(s)){const d=r.get(s);d!=null&&d.parentNode&&n.push(d),r.set(s,o)}else r.set(s,o)}n.forEach(s=>{var d;return(d=s.parentNode)==null?void 0:d.removeChild(s)})}moveLightDomChildrenInto(t,r){let n;r!=null&&r.length?(n=r.filter(o=>this.contains(o)&&o!==t&&!o.contains(t)),n.forEach(o=>{const i=Array.from(t.childNodes).find(s=>{var d;return(d=s.isEqualNode)==null?void 0:d.call(s,o)});i&&t.removeChild(i)})):n=Array.from(this.childNodes).filter(o=>o!==t&&!t.contains(o)&&!o.contains(t)),n.forEach(o=>t.appendChild(o))}}q$([a({type:Boolean})],jt.prototype,"shadow");const Qr="pont:auth",Uo={showWatermark:!0},On="pont:branding";class z${constructor(t){this.consumer=new si(t,{context:On,subscribe:!0})}get showWatermark(){var t;return((t=this.consumer.value)==null?void 0:t.showWatermark)??Uo.showWatermark}}const Sh="pont:design-mode";class Rn{constructor(t){this.host=t,this.consumer=new si(t,{context:Sh,subscribe:!0})}get active(){return this.host.hasAttribute("design-mode")?this.host.getAttribute("design-mode")!=="false":this.consumer.value??!1}}const Eh="pont:env",cl=Symbol("renderSpecContext"),In="pont-user-context",pl="";var V$=Object.defineProperty,H$=Object.getOwnPropertyDescriptor,An=(e,t,r,n)=>{for(var o=n>1?void 0:n?H$(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&V$(t,r,o),o};exports.PontKitLayout=class extends f{constructor(){super(...arguments),this.spec="",this.designMode=!1,this.branding=Uo,this.handleError=t=>{var r;return console.error("pont-form error",(r=t.detail)==null?void 0:r.message)}}set renderSpec(t){this.spec=t,this.requestUpdate()}createRenderRoot(){return this}updated(){this.renderDynamicContent()}renderDynamicContent(){if(!this.spec)return;const r=(this.shadowRoot||this).querySelector("#dynamic-content");r&&(r.innerHTML=this.spec,r.querySelectorAll("*").forEach(n=>{n.localName.includes("-")&&!customElements.get(n.localName)?exports.PontKitLayout.reportUnregistered(n.localName):customElements.upgrade(n)}))}static reportUnregistered(t){exports.PontKitLayout.reportedUnregistered.has(t)||(exports.PontKitLayout.reportedUnregistered.add(t),console.warn(`pontive: <${t}> is in the rendered spec but this core-elements bundle does not define it`),document.dispatchEvent(new CustomEvent(exports.PontKitLayout.UNREGISTERED_ELEMENT_EVENT,{detail:{tag:t}})))}render(){return l`
2628
+ `}};bt([a({type:String})],ct.prototype,"placeholder",2);bt([a({type:Array})],ct.prototype,"dataTable",2);bt([a({type:Boolean})],ct.prototype,"hasDefaultSelect",2);bt([a({type:Boolean})],ct.prototype,"hasDefaultPagination",2);bt([a({type:Boolean})],ct.prototype,"hasDefaultSearch",2);bt([a({type:Object})],ct.prototype,"checkedRows",2);bt([a({type:String})],ct.prototype,"searchTerm",2);bt([a({type:Object})],ct.prototype,"columnVisibility",2);bt([a({type:String})],ct.prototype,"sortColumn",2);bt([a({type:String})],ct.prototype,"sortDirection",2);bt([a({type:Object})],ct.prototype,"cellRenderers",2);bt([a({type:Object})],ct.prototype,"headerRenderers",2);bt([a({type:Array})],ct.prototype,"rowActions",2);bt([a({type:Array})],ct.prototype,"paginationLabels",2);bt([a({type:Number})],ct.prototype,"pageSize",2);bt([a({type:Number})],ct.prototype,"currentPage",2);bt([a({type:Array})],ct.prototype,"sortableColumns",2);bt([a({type:Array})],ct.prototype,"columnOrder",2);bt([a({type:Function})],ct.prototype,"isRowDisabled",2);ct=bt([p("pont-data-table")],ct);var X=class extends Error{constructor(t,r,n,o){super(r);I(this,"code");I(this,"details");I(this,"status");this.name="LoginflowError",this.code=t,this.details=n,this.status=o}};function yh(e){const t=(e??"").trim();if(!t)throw new X("CONFIG_ERROR","domain is required");if(t.startsWith("/")){if(typeof location>"u")throw new X("CONFIG_ERROR",`domain "${t}" is relative to the page origin, and there is no page here`);return Ec(new URL(t,location.origin))}const r=/^https?:\/\//i.test(t)?"":`${x$(E$(t))?"http":"https"}://`;try{return Ec(new URL(`${r}${t}`))}catch{throw new X("CONFIG_ERROR",`domain "${t}" is not a hostname, an origin, or a path`)}}function Ec(e){return`${e.origin}${e.pathname}`.replace(/\/+$/,"")}function E$(e){return e.split("/")[0]}function x$(e){return/^(localhost|127\.0\.0\.1|\[::1\])(:\d+)?$/i.test(e)}var fe,O$=(fe=class{constructor(){I(this,"data",new Map)}static get Instance(){return fe.instance||(fe.instance=new fe),fe.instance}get(t){return this.data.get(t)}set(t,r){this.data.set(t,r)}setConfig(t){this.data.set("config",t)}getConfig(){return this.data.get("config")}getApiBaseUrl(){return yh(this.getConfig().domain)}apiIsSameOrigin(){if(typeof location>"u")return!1;try{return new URL(this.getApiBaseUrl()).host===location.host}catch{return!1}}remove(t){this.data.delete(t)}clear(){this.data.clear()}},I(fe,"instance"),fe),st=O$.Instance,ve,Pi=(ve=class{constructor(){}static get Instance(){return ve.instance||(ve.instance=new ve),ve.instance}async request(t,r={}){const n=st.getConfig(),o=`${st.getApiBaseUrl()}${t}`,i=5e4,s=new AbortController,d=setTimeout(()=>s.abort(),i);try{const c=await fetch(o,{...r,signal:s.signal,headers:{"Content-Type":"application/json",...n.headers,...r.headers}});if(clearTimeout(d),!c.ok){const m=await c.json().catch(()=>({}));throw new X(m.code||m.error||"API_ERROR",m.message||m.error_description||`HTTP ${c.status}: ${c.statusText}`,m.details,c.status)}return await c.json()}catch(c){throw clearTimeout(d),c instanceof X?c:c instanceof Error?c.name==="AbortError"?new X("TIMEOUT","Request timeout"):new X("NETWORK_ERROR",c.message):new X("UNKNOWN_ERROR","An unknown error occurred")}}async post(t,r){return this.request(t,{credentials:"include",method:"POST",body:r?JSON.stringify(r):void 0})}async get(t){return this.request(t,{credentials:"include",method:"GET"})}async postForm(t,r){return this.request(t,{credentials:"include",method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams(r).toString()})}},I(ve,"instance"),ve),_h="__Secure-pontive_session_state",rs="__Secure-pontive_session_probe";function R$(){return wh(_h)?"present":I$()?"absent":"unknown"}function ba(){if(!(typeof document>"u"||typeof location>"u"))for(const e of["",...D$(location.hostname)])ya(_h,"",e,0)}function I$(){if(typeof document>"u"||typeof location>"u")return!1;const e=T$();try{ya(rs,"1",e,60);const t=wh(rs)==="1";return ya(rs,"",e,0),t&&A$(e)}catch{return!1}}function A$(e){return e!==""||st.apiIsSameOrigin()}function T$(){let e;try{e=new URL(st.getApiBaseUrl()).hostname}catch{return""}const t=location.hostname;if(!e||!t||e.toLowerCase()===t.toLowerCase())return"";const r=t.split("."),n=e.split(".");let o=0;for(;o<r.length&&o<n.length&&r[r.length-1-o].toLowerCase()===n[n.length-1-o].toLowerCase();)o+=1;return o<2?"":n.slice(n.length-o).join(".")}function D$(e){const t=e.split("."),r=[];for(let n=1;n+2<=t.length;n+=1)r.push(t.slice(n).join("."));return r}function ya(e,t,r,n){const o=L$()?"; Secure":"",i=r?`; Domain=${r}`:"";document.cookie=`${e}=${t}; Path=/; Max-Age=${n}; SameSite=Lax${i}${o}`}function L$(){return typeof globalThis.isSecureContext=="boolean"?globalThis.isSecureContext:location.protocol==="https:"}function wh(e){if(typeof document>"u"||!document.cookie)return null;for(const t of document.cookie.split(";")){const r=t.indexOf("=");if(!(r<0)&&t.slice(0,r).trim()===e)return t.slice(r+1).trim()||null}return null}var St,zt=(St=class{constructor(){I(this,"AUTH_SESSION_STORAGE_KEY","pontive_auth_session");I(this,"memorySession",null);I(this,"refreshTimeoutId",null);I(this,"refreshPromise",null);I(this,"refreshRetryCount",0);I(this,"refreshBlockedUntil",0);I(this,"sessionGeneration",0);I(this,"channel",null);I(this,"channelName","");I(this,"applyingBroadcast",!1);I(this,"restorePromise",null)}static get Instance(){return St.instance||(St.instance=new St),St.instance}setCurrentSession(t){this.sessionGeneration+=1,this.write(JSON.stringify(t)),this.publish({type:"session",session:t})}async withRefreshLock(t){const r=typeof navigator<"u"?navigator.locks:void 0;return r?r.request(this.channelKey("refresh"),t):t()}channelKey(t){const r=st.getConfig();return`pontive-${t}:${(r==null?void 0:r.domain)??""}:${(r==null?void 0:r.appId)??""}`}ensureChannel(){var r;if(typeof BroadcastChannel>"u")return null;const t=this.channelKey("session");return this.channel&&this.channelName===t?this.channel:((r=this.channel)==null||r.close(),this.channelName=t,this.channel=new BroadcastChannel(t),this.channel.onmessage=n=>this.receive(n.data),this.channel)}publish(t){var r;this.applyingBroadcast||(r=this.ensureChannel())==null||r.postMessage(t)}receive(t){this.applyingBroadcast=!0;try{if(t.type==="cleared"){this.clearSession();return}this.setCurrentSession(t.session),this.scheduleTokenRefresh()}finally{this.applyingBroadcast=!1}}isCurrentGeneration(t){return this.sessionGeneration===t}getCurrentSession(){const t=this.getStoredSession();return t?this.isSessionExpired(t)?(this.clearSession(),null):(this.shouldRefreshToken(t)&&this.triggerBackgroundRefresh(t),t):null}peekSession(){return this.getStoredSession()}isAuthenticated(){return this.getCurrentSession()!==null}getAuthenticatedUser(){const t=this.getCurrentSession();if(!t)return null;const r=t.id_token?this.decodeJWT(t.id_token):null;return r||(t.user??null)}cleanup(){var t;this.refreshTimeoutId&&(clearTimeout(this.refreshTimeoutId),this.refreshTimeoutId=null),this.refreshPromise=null,(t=this.channel)==null||t.close(),this.channel=null,this.channelName=""}clearSession(){this.sessionGeneration+=1,this.memorySession=null,localStorage.removeItem(this.AUTH_SESSION_STORAGE_KEY),this.refreshTimeoutId&&(clearTimeout(this.refreshTimeoutId),this.refreshTimeoutId=null),this.refreshRetryCount=0,this.refreshBlockedUntil=0,this.publish({type:"cleared"})}isSessionExpired(t){return!t||!t.expires_at?!0:Date.now()>=t.expires_at}cleanExpiredSession(){const t=this.getStoredSession();t&&this.isSessionExpired(t)&&this.clearSession()}getStoredSession(){const t=this.read();if(!t)return null;try{return JSON.parse(t)}catch{return this.clearSession(),null}}write(t){this.memorySession=t,localStorage.removeItem(this.AUTH_SESSION_STORAGE_KEY)}read(){return this.memorySession}decodeJWT(t){try{const n=t.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),o=decodeURIComponent(atob(n).split("").map(i=>"%"+("00"+i.charCodeAt(0).toString(16)).slice(-2)).join(""));return JSON.parse(o)}catch{return null}}shouldRefreshToken(t){if(!t||!t.expires_at)return!1;const r=Date.now(),n=t.expires_at,o=t.expires_in||3600,i=r+o*1e3*.2;return n<=i}scheduleTokenRefresh(){this.refreshTimeoutId&&(clearTimeout(this.refreshTimeoutId),this.refreshTimeoutId=null);const t=this.getCurrentSession();if(!t||!t.expires_at)return;const r=Date.now(),n=t.expires_at,o=t.expires_in||3600,i=n-r-o*1e3*.2;i>0&&(this.refreshTimeoutId=setTimeout(()=>{this.triggerBackgroundRefresh(t)},i))}triggerBackgroundRefresh(t){this.refreshPromise||Date.now()<this.refreshBlockedUntil||(this.refreshPromise=this.withRefreshLock(()=>{const r=this.getStoredSession();return r&&!this.shouldRefreshToken(r)?(this.scheduleTokenRefresh(),Promise.resolve(null)):this.refreshTokens(r??t)}).then(r=>(r&&(this.setCurrentSession(r),this.refreshRetryCount=0,this.refreshBlockedUntil=0,this.scheduleTokenRefresh()),r)).catch(r=>(console.error("Background token refresh failed:",r),null)).finally(()=>{this.refreshPromise=null}))}async refreshTokens(t){const r=this.sessionGeneration;try{const n=await this.requestTokens(t);return this.isCurrentGeneration(r)?n:(console.warn("Token refresh returned after the session changed; discarding it"),null)}catch(n){return this.isCurrentGeneration(r)?F$(n)?(console.error("Token refresh rejected, signing out:",Yo(n)),ba(),this.clearSession(),null):(console.warn("Token refresh failed, keeping session and retrying:",Yo(n)),this.scheduleRefreshRetry(t),null):(console.warn("Token refresh failed after the session changed; ignoring:",Yo(n)),null)}}async fetchUserInfo(t){try{return await Pi.Instance.request("/oauth2/userinfo",{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${t}`}})}catch(r){return console.debug("Could not read user info for the restored session:",Yo(r)),null}}async requestTokens(t){var o;const r={grant_type:"refresh_token",client_id:(o=st.getConfig())==null?void 0:o.appId};t!=null&&t.refresh_token&&(r.refresh_token=t.refresh_token);const n=await Pi.Instance.postForm("/oauth2/token",r);return{id_token:n.id_token??(t==null?void 0:t.id_token)??"",access_token:n.access_token,refresh_token:n.refresh_token??(t==null?void 0:t.refresh_token),expires_in:n.expires_in,expires_at:Date.now()+n.expires_in*1e3}}async restoreSession(){const t=this.getStoredSession();return t&&!this.isSessionExpired(t)?t:R$()==="absent"?null:this.restorePromise?this.restorePromise:(this.restorePromise=this.withRefreshLock(async()=>{const r=this.getStoredSession();if(r&&!this.isSessionExpired(r))return r;try{const n=await this.requestTokens(null);return n.id_token||(n.user=await this.fetchUserInfo(n.access_token)??void 0),this.setCurrentSession(n),this.scheduleTokenRefresh(),n}catch(n){return N$(n)&&ba(),console.debug("No session to restore:",Yo(n)),null}}).finally(()=>{this.restorePromise=null}),this.restorePromise)}scheduleRefreshRetry(t){if(this.refreshTimeoutId&&(clearTimeout(this.refreshTimeoutId),this.refreshTimeoutId=null),this.refreshRetryCount>=St.MAX_REFRESH_RETRIES){console.warn("Token refresh gave up after",this.refreshRetryCount,"attempts"),this.refreshRetryCount=0,this.refreshBlockedUntil=0;return}const r=Math.min(St.REFRESH_RETRY_BASE_MS*2**this.refreshRetryCount,St.MAX_REFRESH_RETRY_DELAY_MS);this.refreshRetryCount+=1,this.refreshBlockedUntil=Date.now()+r,this.refreshTimeoutId=setTimeout(()=>{this.refreshBlockedUntil=0,this.triggerBackgroundRefresh(t)},r)}},I(St,"MAX_REFRESH_RETRIES",5),I(St,"REFRESH_RETRY_BASE_MS",5e3),I(St,"MAX_REFRESH_RETRY_DELAY_MS",6e4),I(St,"instance"),St);function F$(e){return!(e instanceof X)||e.status===void 0?!1:e.status===401?!0:e.status===400&&k$.has(e.code)}var k$=new Set(["invalid_grant","invalid_client"]);function N$(e){return e instanceof X&&e.status!==void 0&&e.status>=400&&e.status<500}function Yo(e){return e instanceof X?`${e.code} (status ${e.status??"none"}): ${e.message}`:String(e)}var $h=class{constructor(e=sessionStorage){I(this,"storage");I(this,"FLOW_STATE_KEY","pontive_loginflow_state");I(this,"FLOW_EXPIRY_MS",540*1e3);this.storage=e}getFlowState(){const e=this.storage.getItem(this.FLOW_STATE_KEY);if(!e)return null;try{const t=JSON.parse(e);return this.isExpired(t)?(this.clearFlowState(),null):t}catch{return this.clearFlowState(),null}}saveFlowState(e,t,r){const n=Date.now(),o=this.getFlowState(),i={flowType:e,flow_id:t,state:r.state,startedAt:(o==null?void 0:o.startedAt)||n,lastUpdatedAt:n,render_spec:r.render_spec};this.storage.setItem(this.FLOW_STATE_KEY,JSON.stringify(i))}restoreFromHistory(e){const t={flowType:e.flowType,flow_id:e.flow_id,state:e.state,startedAt:e.timestamp,lastUpdatedAt:e.timestamp,render_spec:void 0};this.storage.setItem(this.FLOW_STATE_KEY,JSON.stringify(t))}clearFlowState(){this.storage.removeItem(this.FLOW_STATE_KEY)}isExpired(e){return Date.now()-e.lastUpdatedAt>this.FLOW_EXPIRY_MS}get expiryMs(){return this.FLOW_EXPIRY_MS}},Ci=class{static detect(e,t=window.location){const r=t.pathname.toLowerCase();return r.includes(e.signinUrl)?"signin":r.includes(e.signupUrl)?"signup":"custom"}},Ph=class{constructor(){I(this,"listeners",new Map)}on(e,t){this.listeners.has(e)||this.listeners.set(e,new Set),this.listeners.get(e).add(t)}off(e,t){var r;(r=this.listeners.get(e))==null||r.delete(t)}emit(e,t){const r=this.listeners.get(e);r&&r.forEach(n=>{try{n(t)}catch(o){console.error(`[FlowEventBus] Error in event handler for ${e}:`,o)}})}clear(){this.listeners.clear()}clearEvent(e){this.listeners.delete(e)}},M$=class{getNavigationType(){const e=performance.getEntriesByType("navigation");if(e.length>0)return e[0].type;const t=performance.navigation;if(t)switch(t.type){case 1:return"reload";case 2:return"back_forward";default:return"navigate"}return"navigate"}},B$=class Ch{constructor(t,r,n=window.location,o,i){I(this,"httpClient",Pi.Instance);I(this,"flowId");I(this,"redirectTimeoutId",null);I(this,"flowStateManager");I(this,"flowEventBus");I(this,"location");I(this,"navigationTypeDetector");I(this,"eventHandlers",new Map([["switch_to_signin",this.handleSwitchToSignin.bind(this)],["switch_to_signup",this.handleSwitchToSignup.bind(this)]]));const s=st.getConfig();if(!s.domain)throw new X("CONFIG_ERROR","Domain is required");if(!s.appId)throw new X("CONFIG_ERROR","App ID is required");this.flowId=t,this.location=n,this.flowStateManager=o||new $h,this.flowEventBus=r||new Ph,this.navigationTypeDetector=i||new M$,zt.Instance.cleanExpiredSession(),zt.Instance.scheduleTokenRefresh()}static async init(t,r,n,o,i){const s=new Ch(t,r,n,o,i),d=await s.initializeFlowInternal();return{sdk:s,flowType:d.flowType,isResumed:d.isResumed,state:d.state,render_spec:d.render_spec,auth_result:d.auth_result}}async startFlow(t,r){if(!r.app_id)throw new X("VALIDATION_ERROR","Client ID is required");const n=`/auth/v1/authflows/${t}/start`;return this.executeFlowRequest(()=>this.httpClient.post(n,r),"START_FLOW_ERROR","Failed to start flow")}async resumeFlow(t){const r=`/auth/v1/authflows/${t}/resume`;return this.executeFlowRequest(()=>this.httpClient.post(r),"RESUME_FLOW_ERROR","Failed to resume flow")}async processEvent(t,r){if(!t.event)throw new X("VALIDATION_ERROR","Event type is required");const n=this.eventHandlers.get(t.event);return n?await n():await this.processServerEvent(t,r)}async executeFlowRequest(t,r,n,o){try{const i=await t();return o&&await o(i),this.processAuthResult(i.auth_result),i.redirection&&this.redirect(i.redirection),i}catch(i){throw i instanceof X?i:new X(r,n,i instanceof Error?{originalError:i.message,stack:i.stack}:i)}}async processServerEvent(t,r){let n=this.flowStateManager.getFlowState();if(!n&&(console.warn("Flow state expired, restarting flow before processing event"),await this.initializeFlowInternal(),n=this.flowStateManager.getFlowState(),!n))throw new X("FLOW_RESTART_ERROR","Failed to restart flow - no flow state after initialization");const o=n.state,i=`/auth/v1/authflows/${n.flowType}/events`,s=await this.executeFlowRequest(()=>this.httpClient.post(i,t),"PROCESS_EVENT_ERROR","Failed to process event",r);if(!s.auth_result){this.flowStateManager.saveFlowState(n.flowType,n.flow_id,s);const d=this.flowStateManager.getFlowState();if(d){const c=o!==s.state;this.flowEventBus.emit("flow:updated",{flowState:d,isNewStep:c})}}return s}processAuthResult(t){if(t){const r={id_token:t.id_token,access_token:t.access_token,refresh_token:t.refresh_token,expires_in:t.expires_in,expires_at:Date.now()+t.expires_in*1e3};zt.Instance.setCurrentSession(r),zt.Instance.scheduleTokenRefresh(),this.flowStateManager.clearFlowState();const{onAuthenticated:n}=st.getConfig();if(n){n(r);return}console.warn("pontive: signed in, but no onAuthenticated was supplied, so the SDK cannot route the user. Supply onAuthenticated to handle the handoff.")}}async initializeFlowInternal(){const t=st.getConfig(),r=Ci.detect(t,this.location);this.validateFlowType(r);const n=this.flowStateManager.getFlowState();return this.shouldResumeFlow(n,r)?await this.resumeExistingFlow(n,r):await this.startNewFlow(r)}validateFlowType(t){if(t==="custom"&&!this.flowId)throw new X("FLOW_ID_ERROR","Flow ID is required for custom flows")}shouldResumeFlow(t,r){if(!t)return!1;const o=new URLSearchParams(this.location.search).get("resume")==="true",i=this.navigationTypeDetector.getNavigationType();if(i==="navigate"&&!o)return this.flowStateManager.clearFlowState(),console.log(`Fresh navigation detected (type: ${i}), starting new flow`),!1;if(t.flowType!==r)return this.flowStateManager.clearFlowState(),console.log(`Flow type changed from ${t.flowType} to ${r}, starting new flow, flow_id: ${this.flowId}`),!1;if(r==="custom"&&t.flow_id!==this.flowId)return this.flowStateManager.clearFlowState(),console.log(`Custom flow ID changed, starting new flow, flow_id: ${this.flowId}`),!1;const s=o?"explicit resume=true":`navigation type: ${i}`;return console.log(`Resuming existing flow (${s})`),!0}async resumeExistingFlow(t,r){try{const n=await this.resumeFlow(r);if(!n.auth_result){this.flowStateManager.saveFlowState(r,t.flow_id,n);const o=this.flowStateManager.getFlowState();o&&this.flowEventBus.emit("flow:resumed",{flowState:o})}return{flowType:r,isResumed:!0,state:n.state,render_spec:n.render_spec,auth_result:n.auth_result}}catch(n){return this.flowStateManager.clearFlowState(),console.warn("Failed to resume flow, starting fresh:",n),await this.startNewFlow(r)}}async startNewFlow(t){const r=st.getConfig(),n=new URLSearchParams(this.location.search),o={};n.forEach((c,m)=>{o[m]=c}),console.log("metadata",o);const i=n.get("locales")||r.locales||void 0,s={app_id:r.appId,origin_url:this.location.href,signin_url:r.signinUrl,signup_url:r.signupUrl,locales:i,flow_id:this.determineFlowId(t),metadata:o},d=await this.startFlow(t,s);if(!d.auth_result){this.flowStateManager.saveFlowState(t,s.flow_id,d);const c=this.flowStateManager.getFlowState();c&&this.flowEventBus.emit("flow:started",{flowState:c})}return{flowType:t,isResumed:!1,state:d.state,render_spec:d.render_spec,auth_result:d.auth_result}}determineFlowId(t){switch(t){case"signin":return this.flowId||"signin-flow";case"signup":return this.flowId||"signup-flow";case"custom":if(!this.flowId)throw new X("FLOW_ID_ERROR","Flow ID is required for custom flows");return this.flowId}}async handleSwitchToSignin(){const t=st.getConfig();return this.redirect({url:this.withCurrentQuery(t.signinUrl),redirect_delay:0}),{state:"End"}}async handleSwitchToSignup(){const t=st.getConfig();return this.redirect({url:this.withCurrentQuery(t.signupUrl),redirect_delay:0}),{state:"End"}}withCurrentQuery(t){const r=this.location.search;return!r||r==="?"?t:t.includes("?")?`${t}&${r.slice(1)}`:`${t}${r}`}redirect(t){t.url&&(this.redirectTimeoutId!==null&&(console.log("Clearing existing redirect timeout before scheduling new redirect to:",t.url),clearTimeout(this.redirectTimeoutId),this.redirectTimeoutId=null),this.redirectTimeoutId=setTimeout(()=>{this.location.href=t.url},t.redirect_delay*1e3))}reloadPage(){setTimeout(()=>{this.location.reload()},0)}getEventBus(){return this.flowEventBus}cleanup(){this.redirectTimeoutId&&(clearTimeout(this.redirectTimeoutId),this.redirectTimeoutId=null),this.flowEventBus.clear()}},U$=class{constructor(e){I(this,"delayMs");I(this,"timerId",null);this.delayMs=e}debounce(e){this.timerId&&clearTimeout(this.timerId),this.timerId=setTimeout(()=>{e(),this.timerId=null},this.delayMs)}cancel(){this.timerId&&(clearTimeout(this.timerId),this.timerId=null)}isPending(){return this.timerId!==null}},j$=class{pushState(e,t,r){history.pushState(e,t,r)}replaceState(e,t,r){history.replaceState(e,t,r)}get state(){return history.state}},q$=class{constructor(e,t,r=!1,n=window.location,o,i){I(this,"popstateListener",null);I(this,"pageshowListener",null);I(this,"debouncer");I(this,"isProcessing",!1);I(this,"isHandlingNavigationEvent",!1);I(this,"onFlowRestartNeeded",null);I(this,"skipHistoryTracking");I(this,"flowStateManager");I(this,"historyAdapter");I(this,"location");this.onFlowRestartNeeded=t,this.skipHistoryTracking=r,this.debouncer=new U$(200),this.location=n,this.flowStateManager=o||new $h,this.historyAdapter=i||new j$,this.subscribeToFlowEvents(e),this.initializeListener()}subscribeToFlowEvents(e){e.on("flow:started",this.handleFlowStart.bind(this)),e.on("flow:updated",this.handleFlowUpdate.bind(this)),e.on("flow:resumed",this.handleFlowResume.bind(this))}initializeListener(){this.popstateListener=e=>{console.log("[NavigationManager] popstate event received"),this.debouncer.debounce(()=>{console.log("[NavigationManager] Debounce timeout fired, handling popstate"),this.handlePopState(e)})},this.pageshowListener=e=>{e.persisted&&(console.log("[NavigationManager] Page restored from bfcache"),this.debouncer.debounce(()=>{console.log("[NavigationManager] Handling bfcache restoration"),this.handleBfcacheRestoration()}))},window.addEventListener("popstate",this.popstateListener),window.addEventListener("pageshow",this.pageshowListener)}async handlePopState(e){if(this.isProcessing){console.log("[NavigationManager] Already processing popstate, skipping");return}console.log("[NavigationManager] Starting popstate processing"),this.isProcessing=!0,this.isHandlingNavigationEvent=!0;try{const t=e.state,r=this.flowStateManager.getFlowState(),n=st.getConfig(),o=Ci.detect(n,this.location);if(t&&this.restoreHistoryStateToSession(t),this.shouldRestartFlow(t,r,o)){await this.triggerFlowRestart();return}console.log("[NavigationManager] Valid state restored from history")}finally{this.isProcessing=!1,this.isHandlingNavigationEvent=!1}}async handleBfcacheRestoration(){if(this.isProcessing){console.log("[NavigationManager] Already processing bfcache restoration, skipping");return}console.log("[NavigationManager] Starting bfcache restoration processing"),this.isProcessing=!0,this.isHandlingNavigationEvent=!0;try{const e=this.historyAdapter.state,t=this.flowStateManager.getFlowState(),r=st.getConfig(),n=Ci.detect(r,this.location);if(e&&this.restoreHistoryStateToSession(e),this.shouldRestartFlow(e,t,n)){await this.triggerFlowRestart();return}console.log("[NavigationManager] Valid state restored from bfcache")}finally{this.isProcessing=!1,this.isHandlingNavigationEvent=!1}}restoreHistoryStateToSession(e){console.log("[NavigationManager] Restoring history state to session storage:",e),this.flowStateManager.restoreFromHistory(e)}shouldRestartFlow(e,t,r){return e&&e.flowType!==r?(console.log("[NavigationManager] Flow type changed via navigation:",e.flowType,"→",r),this.flowStateManager.clearFlowState(),!0):e?Date.now()-e.timestamp>this.flowStateManager.expiryMs?(console.log("[NavigationManager] History state expired, clearing and restarting flow"),this.flowStateManager.clearFlowState(),!0):(console.log("[NavigationManager] Valid history state restored, triggering restart to resume flow"),!0):(console.log("[NavigationManager] No history state, skipping"),!1)}async triggerFlowRestart(){this.onFlowRestartNeeded&&await this.onFlowRestartNeeded()}createHistoryState(e){return{flowType:e.flowType,flow_id:e.flow_id,state:e.state,timestamp:Date.now()}}updateBrowserHistory(e,t){if(this.skipHistoryTracking){console.log("[NavigationManager] Skipping history tracking (created from navigation)");return}const r=this.createHistoryState(e);try{t==="push"?(this.historyAdapter.pushState(r,"",this.location.href),console.log("[NavigationManager] Pushed state to history")):(this.historyAdapter.replaceState(r,"",this.location.href),console.log("[NavigationManager] Replaced state in history"))}catch(n){console.error("[NavigationManager] Failed to update history:",n)}}handleFlowStart(e){this.updateBrowserHistory(e.flowState,"replace")}handleFlowUpdate(e){const t=this.isHandlingNavigationEvent||!e.isNewStep?"replace":"push";this.updateBrowserHistory(e.flowState,t)}handleFlowResume(e){this.updateBrowserHistory(e.flowState,"replace")}destroy(){this.debouncer.cancel(),this.popstateListener&&(window.removeEventListener("popstate",this.popstateListener),this.popstateListener=null),this.pageshowListener&&(window.removeEventListener("pageshow",this.pageshowListener),this.pageshowListener=null),this.onFlowRestartNeeded=null}},Cr=new AbortController,z$=class{constructor(){I(this,"httpClient",Pi.Instance);I(this,"capabilities",{webauthn:!1});I(this,"capabilitiesDetected",!1)}async detectCapabilities(){if(!this.capabilitiesDetected)try{if(typeof window.PublicKeyCredential=="function"?this.capabilities.webauthn=!0:this.capabilities.webauthn=!1,typeof PublicKeyCredential.getClientCapabilities=="function"){const e=await PublicKeyCredential.getClientCapabilities();this.capabilities={...this.capabilities,...e};return}typeof PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable=="function"&&(this.capabilities.userVerifyingPlatformAuthenticator=await PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable()),(PublicKeyCredential==null?void 0:PublicKeyCredential.isConditionalMediationAvailable)!==void 0&&typeof PublicKeyCredential.isConditionalMediationAvailable=="function"?this.capabilities.conditionalGet=await PublicKeyCredential.isConditionalMediationAvailable():this.capabilities.conditionalGet=!1}finally{this.capabilitiesDetected=!0}}async fetchPublicKeyCredentialRequestOptions(e,t){try{return this.httpClient.post("/auth/v1/webauthn/login/options",{conditional:t,flow_type:e})}catch(r){return console.error("error",r),null}}async fetchPublicKeyCredentialCreationOptions(e,t){try{return this.httpClient.post("/auth/v1/webauthn/register/options",{conditional:t,flow_type:e})}catch(r){return console.error("error",r),null}}async startRegistration(e,t){if(await this.detectCapabilities(),!e)return console.error("No PublicKeyCredentialCreationOptionsJSON provided"),null;Cr.abort(),Cr=new AbortController;const r=this.toPublicKeyCredentialCreationOptions(e),n={signal:Cr.signal,publicKey:r};if(t){if(!this.isConditionalCreateAvailable())return console.error("Conditional create mediation not supported in this browser"),null;n.mediation="conditional"}try{const o=await navigator.credentials.create(n);if(!o){console.error("no credential returned by authenticator");return}const{id:i,rawId:s,response:d,type:c}=o;let m;typeof d.getTransports=="function"&&(m=d.getTransports());let v;if(typeof d.getPublicKeyAlgorithm=="function")try{v=d.getPublicKeyAlgorithm()}catch(_){os("getPublicKeyAlgorithm()",_)}let b;if(typeof d.getPublicKey=="function")try{const _=d.getPublicKey();_!==null&&(b=this.bufferToBase64URLString(_))}catch(_){os("getPublicKey()",_)}let w;if(typeof d.getAuthenticatorData=="function")try{w=this.bufferToBase64URLString(d.getAuthenticatorData())}catch(_){os("getAuthenticatorData()",_)}return{id:i,rawId:this.bufferToBase64URLString(s),response:{attestationObject:this.bufferToBase64URLString(d.attestationObject),clientDataJSON:this.bufferToBase64URLString(d.clientDataJSON),transports:m,publicKeyAlgorithm:v,publicKey:b,authenticatorData:w},type:c,clientExtensionResults:o.getClientExtensionResults(),authenticatorAttachment:this.toAuthenticatorAttachment(o.authenticatorAttachment)}}catch(o){const i=this.identifyAuthenticationError({error:o,options:n});return i instanceof Sr?console.error(`WebAuthn authentication failed with code: ${i.code}, message: ${i.message}`):console.error("WebAuthn authentication failed with error:",o),null}}async startAuthentication(e,t){if(await this.detectCapabilities(),!e)return console.error("No PublicKeyCredentialRequestOptionsJSON provided"),null;if(!this.isWebAuthnAvailable())return console.error("WebAuthn not supported in this browser"),null;Cr.abort(),Cr=new AbortController;const r=this.toPublicKeyCredentialRequestOptions(e),n={signal:Cr.signal,publicKey:r};if(t){if(!this.isConditionalGetAvailable())return console.error("Conditional mediation not supported in this browser"),null;n.mediation="conditional",n.publicKey&&(n.publicKey.allowCredentials=[])}try{const o=await navigator.credentials.get(n);return this.toPublicKeyCredentialJSON(o)}catch(o){const i=this.identifyAuthenticationError({error:o,options:n});return i instanceof Sr?console.error(`WebAuthn authentication failed with code: ${i.code}, message: ${i.message}`):console.error("WebAuthn authentication failed with error:",o),null}}async signalUnknownCredential(e,t){if(await this.detectCapabilities(),this.isSignalUnknownCredentialAvailable())try{await PublicKeyCredential.signalUnknownCredential({rpId:e,credentialId:t})}catch(r){console.error("Failed to signal unknown credential:",r)}else console.warn("signalUnknownCredential not supported in this browser")}async signalCurrentUserDetails(e){if(await this.detectCapabilities(),this.isSignalCurrentUserDetailsAvailable())try{await PublicKeyCredential.signalCurrentUserDetails(e)}catch(t){console.error("Failed to signal current user details:",t)}else console.warn("signalCurrentUserDetails not supported. Ask user to update manually.")}toPublicKeyCredentialDescriptor(e){const{id:t}=e;return{...e,id:this.base64URLStringToBuffer(t),type:e.type,transports:e.transports}}toAuthenticatorAttachment(e){const t=["cross-platform","platform"];if(e&&!(t.indexOf(e)<0))return e}bufferToBase64URLString(e){const t=new Uint8Array(e);let r="";for(const o of t)r+=String.fromCharCode(o);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}base64URLStringToBuffer(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),r=(4-t.length%4)%4,n=t.padEnd(t.length+r,"="),o=atob(n),i=new ArrayBuffer(o.length),s=new Uint8Array(i);for(let d=0;d<o.length;d++)s[d]=o.charCodeAt(d);return i}toPublicKeyCredentialJSON(e){if(typeof e.toJSON=="function")return e.toJSON();const t=e.response;return{id:e.id,type:e.type,rawId:this.bufferToBase64URLString(e.rawId),authenticatorAttachment:this.toAuthenticatorAttachment(e.authenticatorAttachment),clientExtensionResults:e==null?void 0:e.getClientExtensionResults(),response:{clientDataJSON:this.bufferToBase64URLString(t.clientDataJSON),authenticatorData:this.bufferToBase64URLString(t.authenticatorData),signature:this.bufferToBase64URLString(t.signature),userHandle:t.userHandle?this.bufferToBase64URLString(t.userHandle):void 0}}}toPublicKeyCredentialCreationOptions(e){var r;if(typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(e);const t={challenge:this.base64URLStringToBuffer(e.challenge),rp:{id:e.rp.id,name:e.rp.name},user:{displayName:e.user.displayName,id:this.base64URLStringToBuffer(e.user.id),name:e.user.name},pubKeyCredParams:e.pubKeyCredParams.map(n=>({alg:n.alg,type:n.type})),timeout:e.timeout};if(e.attestation&&(t.attestation=e.attestation),e.extensions!==void 0&&(t.extensions=e.extensions),e.authenticatorSelection){const n={};e.authenticatorSelection.authenticatorAttachment&&(n.authenticatorAttachment=e.authenticatorSelection.authenticatorAttachment),e.authenticatorSelection.requireResidentKey&&(n.requireResidentKey=e.authenticatorSelection.requireResidentKey),e.authenticatorSelection.residentKey&&(n.residentKey=e.authenticatorSelection.residentKey),e.authenticatorSelection.userVerification&&(n.userVerification=e.authenticatorSelection.userVerification),t.authenticatorSelection=n}return(r=e.excludeCredentials)!=null&&r.length&&(t.excludeCredentials=e.excludeCredentials.map(n=>this.toPublicKeyCredentialDescriptor(n))),t}toPublicKeyCredentialRequestOptions(e){var r;if(typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(e);const t={challenge:this.base64URLStringToBuffer(e.challenge)};return e.rpId!==void 0&&(t.rpId=e.rpId),e.timeout!==void 0&&(t.timeout=e.timeout),e.userVerification!==void 0&&(t.userVerification=e.userVerification),e.extensions!==void 0&&(t.extensions=e.extensions),(r=e.allowCredentials)!=null&&r.length&&(t.allowCredentials=e.allowCredentials.map(n=>this.toPublicKeyCredentialDescriptor(n))),t}identifyAuthenticationError({error:e,options:t}){const{publicKey:r}=t;if(!r)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new Sr({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new Sr({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const n=window.location.hostname;if(V$(n)){if(r.rpId!==n)return new Sr({message:`The RP ID "${r.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Sr({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new Sr({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return e}isPublicKeyCredentialRequestOptionsJSON(e){return typeof e=="object"&&e!==null&&"challenge"in e}isWebAuthnAvailable(){return this.capabilities.webauthn}isSignalAllAcceptedCredentialsAvailable(){return!!this.capabilities.signalAllAcceptedCredentials}isSignalCurrentUserDetailsAvailable(){return!!this.capabilities.signalCurrentUserDetails}isSignalUnknownCredentialAvailable(){return!!this.capabilities.signalUnknownCredential}isConditionalGetAvailable(){return!!this.capabilities.conditionalGet}isConditionalCreateAvailable(){return!!this.capabilities.conditionalCreate}isHybridTransportAvailable(){return!!this.capabilities.hybridTransport}destroy(){Cr.abort()}};function os(e,t){console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${e}. You should report this error to them.
2629
+ `,t)}var Sr=class extends Error{constructor({message:t,code:r,cause:n,name:o}){super(t);I(this,"code");this.name=o??n.name,this.code=r}};function V$(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}var be,H$=(be=class{constructor(){I(this,"configured",!1);I(this,"configuredResolve");I(this,"configuredPromise",new Promise(t=>{this.configuredResolve=t}));I(this,"loginflow",null);I(this,"navigationManager",null);I(this,"flowEventBus",null);I(this,"webauthnService",null)}static get Instance(){return be.instance||(be.instance=new be),be.instance}ensureConfigured(){if(!this.configured)throw new X("NOT_CONFIGURED","Auth.configure() must be called before using Auth methods")}ensureLoginflowInitialized(){if(!this.loginflow)throw new X("LOGINFLOW_NOT_INITIALIZED","Call Auth.startLoginflow() first")}async startLoginflowInternal(t,r=!1){this.ensureConfigured(),this.webauthnService&&(console.log("[AuthService] Cleaning up and aborting ongoing webauthn flows"),this.webauthnService.destroy(),this.webauthnService=null),this.loginflow&&(console.log("[AuthService] Cleaning up old loginflow instance"),this.loginflow.cleanup(),this.loginflow=null),this.navigationManager&&(console.log("[AuthService] Cleaning up old navigation manager instance"),this.navigationManager.destroy(),this.navigationManager=null),this.webauthnService=new z$,this.webauthnService.detectCapabilities(),this.flowEventBus=new Ph,this.navigationManager=new q$(this.flowEventBus,async()=>{console.log("[AuthService] Navigation restart triggered, restarting loginflow"),await this.startLoginflowInternal(void 0,!1)},r);const n=await B$.init(t,this.flowEventBus),o=st.getConfig();this.startPasskeyAuthentication(n.flowType,!0),this.loginflow=n.sdk;const i={flowType:n.flowType,isResumed:n.isResumed,state:n.state,render_spec:n.render_spec,auth_result:n.auth_result};return o.onFlowStateChange&&o.onFlowStateChange({eventType:n.isResumed?"flow_resumed":"flow_started",flowType:n.flowType,state:n.state,render_spec:n.render_spec,auth_result:n.auth_result,isResumed:n.isResumed}),i}configure(t){if(!t.domain||!t.appId)throw new X("CONFIG_ERROR","domain and appId are required");st.setConfig(t),this.configured=!0,this.configuredResolve()}whenConfigured(){return this.configuredPromise}isAuthenticated(){return this.ensureConfigured(),zt.Instance.isAuthenticated()}getCurrentSession(){return this.ensureConfigured(),zt.Instance.getCurrentSession()}async restoreSession(){return this.ensureConfigured(),zt.Instance.restoreSession()}getAuthenticatedUser(){return this.ensureConfigured(),zt.Instance.getAuthenticatedUser()}async startLoginflow(t){return this.startLoginflowInternal(t,!1)}async processLoginflowEvent(t){var i,s;this.ensureConfigured(),this.ensureLoginflowInitialized();const r=st.getConfig(),n=Ci.detect(r,location);if(t.event==="signin_with_passkey"&&!((i=t.data)!=null&&i.credential_request)){const d=await this.getPasskeyCredential(n,!1);if(!d||!d.cred)return console.error("no credential returned by browser"),{state:""};t.data={credential_request:d.cred}}if(t.event==="register_passkey"&&!((s=t.data)!=null&&s.conditional)){console.log("attempt to register a passkey");const d=await this.createPasskeyCredential(n,!1);if(!d)return console.error("no credential created by browser"),{state:""};t.data={credential_creation_response:d,conditional:!1}}const o=await this.loginflow.processEvent(t,async d=>{var c;if((c=d.data)!=null&&c.conditional_create_enabled){console.log("attempt to register a passkey conditionally");const m=await this.registerPasskey(n,!0);m&&(m.render_spec=void 0,d.render_spec=void 0)}});if(console.log("render spec",o.render_spec),r.onFlowStateChange){const d=sessionStorage.getItem("pontive_loginflow_state");let c="custom";if(d)try{c=JSON.parse(d).flowType}catch(m){console.error("Failed to parse flow state:",m)}r.onFlowStateChange({eventType:"flow_updated",flowType:c,state:o.state,render_spec:o.render_spec,auth_result:o.auth_result})}return o}async getPasskeyCredential(t,r){var o,i;const n=await((o=this.webauthnService)==null?void 0:o.fetchPublicKeyCredentialRequestOptions(t,r));if(!n)return console.error("failed to fetch public key request options"),null;try{return{cred:await((i=this.webauthnService)==null?void 0:i.startAuthentication(n,r)),options:n}}catch(s){return console.error("error starting authentication",s),null}}async startPasskeyAuthentication(t,r=!1){var s,d;const n=await this.getPasskeyCredential(t,r);if(!n||!n.cred){console.error("no credential found");return}const{cred:o,options:i}=n;try{((s=(await this.processLoginflowEvent({event:"signin_with_passkey",data:{credential_request:o}})).data)==null?void 0:s.error)==="CredentialNotFound"&&(i.rpId&&o.id?(d=this.webauthnService)==null||d.signalUnknownCredential(i.rpId,o.id):console.log("missing rpId or credential id for signalUnknownCredential"))}catch(c){console.error("failed to signin with passkey",c)}}async createPasskeyCredential(t,r){var n,o;try{const i=await((n=this.webauthnService)==null?void 0:n.fetchPublicKeyCredentialCreationOptions(t,r));if(!i){console.warn("no credential creation option returned by webauthn service"),console.log("skipping conditional passkey registration...");return}return(o=this.webauthnService)==null?void 0:o.startRegistration(i,r)}catch(i){console.log("error",i)}}async registerPasskey(t,r=!1){try{const n=await this.createPasskeyCredential(t,r),o=await this.processLoginflowEvent({event:"register_passkey",data:{credential_creation_response:n,conditional:r}});return console.log("passkey creation res",o),o}catch(n){console.log("error",n)}}invalidateSession(){zt.Instance.clearSession()}async signOut(t){var o,i;this.ensureConfigured();const r=(o=zt.Instance.peekSession())==null?void 0:o.id_token,n=((i=st.getConfig())==null?void 0:i.appId)??"";if(ba(),zt.Instance.clearSession(),zt.Instance.cleanup(),this.loginflow&&(this.loginflow.cleanup(),this.loginflow=null),this.navigationManager&&(this.navigationManager.destroy(),this.navigationManager=null),this.flowEventBus&&(this.flowEventBus.clear(),this.flowEventBus=null),!st.apiIsSameOrigin()){window.location.assign(this.endSessionUrl(r,n,t==null?void 0:t.returnTo));return}await this.endServerSession(r,n),window.location.reload()}async endServerSession(t,r){try{await fetch(`${st.getApiBaseUrl()}/oauth2/end_session`,{method:"POST",credentials:"include",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({client_id:r,...t?{id_token_hint:t}:{}}).toString()})}catch(n){console.warn("Could not end the session at the authorization server:",n)}}endSessionUrl(t,r,n){const o=new URLSearchParams({post_logout_redirect_uri:n??`${window.location.origin}${window.location.pathname}`,client_id:r});return t&&o.set("id_token_hint",t),`${st.getApiBaseUrl()}/oauth2/end_session?${o.toString()}`}},I(be,"instance"),be),tt=H$.Instance,G$=Object.defineProperty,K$=(e,t,r,n)=>{for(var o=void 0,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(t,r,o)||o);return o&&G$(t,r,o),o};class jt extends f{constructor(){super(),this.shadow=!1,this.__initialAttributesCache=null}parseJsonAttribute(t){try{const r=this.getAttribute(t);return r?JSON.parse(r):{}}catch{return{}}}get sbStyle(){return this.parseJsonAttribute("pont-style")}getAttributesToExclude(){return[]}getFilteredAttributes(){const t={};return Array.from(this.attributes).forEach(r=>{this.getAttributesToExclude().includes(r.name)||(t[r.name]=r.value??"")}),t}isCustomPropertySet(t){const r=getComputedStyle(this).getPropertyValue(t).trim();return r!=="inherit"&&r.length>0}applyCustomClass(t,r,n=""){var o,i;t.some(s=>this.isCustomPropertySet(s))&&((i=(o=this.shadowRoot)==null?void 0:o.querySelector(r))==null||i.classList.add(n))}moveAttributesToElement(t,r=["id","class"]){t&&r.forEach(n=>{const o=this.getAttribute(n);o!==null&&(t.setAttribute(n,o),this.removeAttribute(n))})}removeAttributesFromHost(t=["id","class"]){t.forEach(r=>{this.hasAttribute(r)&&this.removeAttribute(r)})}captureHostAttributes(){if(this.__initialAttributesCache)return this.__initialAttributesCache;const t={};return Array.from(this.attributes).forEach(r=>{t[r.name]=r.value}),this.__initialAttributesCache=t,t}getHostClass(){return this.captureHostAttributes().class??""}removeDuplicateContent(){var i;const t=document.createTreeWalker(this,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{var d;return s.nodeType===Node.COMMENT_NODE||s.nodeType===Node.TEXT_NODE&&!((d=s.textContent)!=null&&d.trim())?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),r=new Map,n=[];let o;for(;o=t.nextNode();){let s;if(o.nodeType===Node.TEXT_NODE){const d=(i=o.textContent)==null?void 0:i.trim();if(!d)continue;s=`text:${d}`}else if(o instanceof HTMLElement){const d=Array.from(o.attributes).map(c=>`${c.name}=${c.value}`).sort().join(":");s=`element:${o.tagName}:${d}`}else continue;if(r.has(s)){const d=r.get(s);d!=null&&d.parentNode&&n.push(d),r.set(s,o)}else r.set(s,o)}n.forEach(s=>{var d;return(d=s.parentNode)==null?void 0:d.removeChild(s)})}moveLightDomChildrenInto(t,r){let n;r!=null&&r.length?(n=r.filter(o=>this.contains(o)&&o!==t&&!o.contains(t)),n.forEach(o=>{const i=Array.from(t.childNodes).find(s=>{var d;return(d=s.isEqualNode)==null?void 0:d.call(s,o)});i&&t.removeChild(i)})):n=Array.from(this.childNodes).filter(o=>o!==t&&!t.contains(o)&&!o.contains(t)),n.forEach(o=>t.appendChild(o))}}K$([a({type:Boolean})],jt.prototype,"shadow");const Qr="pont:auth",Uo={showWatermark:!0},On="pont:branding";class W${constructor(t){this.consumer=new si(t,{context:On,subscribe:!0})}get showWatermark(){var t;return((t=this.consumer.value)==null?void 0:t.showWatermark)??Uo.showWatermark}}const Sh="pont:design-mode";class Rn{constructor(t){this.host=t,this.consumer=new si(t,{context:Sh,subscribe:!0})}get active(){return this.host.hasAttribute("design-mode")?this.host.getAttribute("design-mode")!=="false":this.consumer.value??!1}}const Eh="pont:env",cl=Symbol("renderSpecContext"),In="pont-user-context",pl="";var Y$=Object.defineProperty,Q$=Object.getOwnPropertyDescriptor,An=(e,t,r,n)=>{for(var o=n>1?void 0:n?Q$(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Y$(t,r,o),o};exports.PontKitLayout=class extends f{constructor(){super(...arguments),this.spec="",this.designMode=!1,this.branding=Uo,this.handleError=t=>{var r;return console.error("pont-form error",(r=t.detail)==null?void 0:r.message)}}set renderSpec(t){this.spec=t,this.requestUpdate()}createRenderRoot(){return this}updated(){this.renderDynamicContent()}renderDynamicContent(){if(!this.spec)return;const r=(this.shadowRoot||this).querySelector("#dynamic-content");r&&(r.innerHTML=this.spec,r.querySelectorAll("*").forEach(n=>{n.localName.includes("-")&&!customElements.get(n.localName)?exports.PontKitLayout.reportUnregistered(n.localName):customElements.upgrade(n)}))}static reportUnregistered(t){exports.PontKitLayout.reportedUnregistered.has(t)||(exports.PontKitLayout.reportedUnregistered.add(t),console.warn(`pontive: <${t}> is in the rendered spec but this core-elements bundle does not define it`),document.dispatchEvent(new CustomEvent(exports.PontKitLayout.UNREGISTERED_ELEMENT_EVENT,{detail:{tag:t}})))}render(){return l`
2630
2630
  <pont-form
2631
2631
  custom-id="pont-layout-form"
2632
2632
  @pont-form:error=${this.handleError}
@@ -2635,7 +2635,7 @@
2635
2635
  <div id="dynamic-content"></div>
2636
2636
  </div>
2637
2637
  </pont-form>
2638
- `}};exports.PontKitLayout.reportedUnregistered=new Set;exports.PontKitLayout.UNREGISTERED_ELEMENT_EVENT="pont:unregistered-element";An([g()],exports.PontKitLayout.prototype,"spec",2);An([a({attribute:!1})],exports.PontKitLayout.prototype,"renderSpec",1);An([a({type:Boolean,attribute:"design-mode"}),Wt({context:Sh})],exports.PontKitLayout.prototype,"designMode",2);An([a({attribute:!1}),Wt({context:On})],exports.PontKitLayout.prototype,"branding",2);exports.PontKitLayout=An([p("pont-layout")],exports.PontKitLayout);let _a=null;function G$(e){_a=e}function K$(){return _a||console.warn("SDK environment not initialized. Call initSdk({...}) before using <pont-provider>."),_a}const W$="pont-account-settings-dashboard-width",Y$="pont-account-settings-modal-width",Q$="pont-account-settings-dashboard",Z$="pont-account-settings-page-reset-margin",J$="pont-account-settings-modal-root",ht="sb",Ec={xs:640,sm:768};function Vt(...e){return _p(Aa(e))}function X$(e){return Object.entries(e).filter(([t,r])=>typeof r!="object"&&r!=null).map(([t,r])=>`${t}: ${r};`).join(" ")}function tP(e){document.documentElement.setAttribute("data-theme",e)}function eP(){const e=document.documentElement.getAttribute("data-theme");(!e||e!=="light"&&e!=="dark")&&tP("light")}function rP(e,t){return e?e.includes("{{theme}}")?e.replace("{{theme}}",t):e:""}function wa(){return new Promise(e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))})}const xc="abcdefghijklmnopqrstuvwxyz0123456789",oP=6;function nP(e){let t="";for(let r=0;r<oP;r++)t+=xc.charAt(Math.floor(Math.random()*xc.length));return t}const wt=()=>nP();function hl(e){const t=document.createElement("pont-toast"),r=document.createElement("pont-toast-view-port");r.part="user-profile-toast",r.setAttribute("variant","destructive"),t.dataset.state="open";const n=document.createElement("div");n.className="pont-grid pont-gap-1";const o=document.createElement("pont-toast-title");o.textContent="Uh oh! Something went wrong.";const i=document.createElement("pont-toast-description");i.textContent=e,n.appendChild(o),n.appendChild(i),r.appendChild(n),t.appendChild(r),document.body.appendChild(t),setTimeout(()=>{t.dataset.state="open",r.dataset.state="open"},10),setTimeout(()=>{t.parentNode&&t.parentNode.removeChild(t)},3.5*1e3)}async function xh(e,t=5e3){if(!e)return;let r;const n=new Promise(o=>{r=setTimeout(()=>o("timeout"),t)});try{await Promise.race([e.whenConfigured(),n])==="timeout"&&console.warn(`pontive: Auth.configure() has not been called after ${t}ms. Is this widget mounted inside <pont-provider>?`)}finally{clearTimeout(r)}}function iP(e){if(!(e!=null&&e.startsWith("data:image/svg+xml;base64,")))return null;try{const t=e.replace("data:image/svg+xml;base64,","");return atob(t)}catch(t){return console.error("Invalid base64 SVG:",t),null}}function sP(e){return/^https?:\/\//.test(e)||e!=null&&e.startsWith("data:image/svg+xml;base64,")?e:`data:image/svg+xml;base64,${e}`}function Oe(){var e;return(e=tt.getCurrentSession())==null?void 0:e.access_token}function $a(e,t=!1){if(!e&&e!==0)return"N/A";const r=typeof e=="string"?new Date(e):new Date(t?e:e*1e3);if(isNaN(r.getTime()))return"Invalid Date";const n=new Date,o=new Date(n.getFullYear(),n.getMonth(),n.getDate()),i=new Date(r.getFullYear(),r.getMonth(),r.getDate()),s=Math.floor((o.getTime()-i.getTime())/(1e3*60*60*24));return s===0?"Today":s===1?"Yesterday":s>1&&s<=6?r.toLocaleDateString("en-US",{weekday:"long"}):r.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}function Pa(e,t=!1){if(!e&&e!==0)return"N/A";const r=typeof e=="string"?new Date(e):new Date(t?e:e*1e3);return isNaN(r.getTime())?"Invalid Time":r.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1})}function Oh(e){return e?e.slice(0,2).toUpperCase():""}var aP=Object.defineProperty,lP=Object.getOwnPropertyDescriptor,br=(e,t,r,n)=>{for(var o=n>1?void 0:n?lP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&aP(t,r,o),o};exports.PontProvider=class extends f{constructor(){var t,r;super(...arguments),this.env=null,this.locales=(t=this.env)==null?void 0:t.locales,this.effectiveLocales=(r=this.env)==null?void 0:r.locales,this.auth={isAuthenticated:!1,resolved:!1},this.renderSpec=null,this.branding=Uo,this.autoRedirect=!0,this._handleLocaleEvent=n=>{var s;const i=(s=n.detail)==null?void 0:s.locales;i&&this.setLocale(i)},this.BRANDING_LINK_ID="pont-branding-css",this.REDIRECT_ATTEMPT_KEY="sb_auth_redirect_attempt",this.REDIRECT_BOUNCE_WINDOW_MS=1e4}createRenderRoot(){return this}setLocale(t){this.locales!==t&&(this.locales=t,this.dispatchLocaleChangedEvent(t))}dispatchLocaleChangedEvent(t){this.dispatchEvent(new CustomEvent("pont:locale-changed",{detail:{locales:t},bubbles:!0,composed:!0}))}connectedCallback(){super.connectedCallback(),eP(),document.addEventListener("pont:set-locales",this._handleLocaleEvent),(async()=>{for(;!this.env||!this.env.domain;)await new Promise(r=>setTimeout(r,20));this.updateLocaleAndAuth()})().catch(r=>console.error("Error initializing PontProvider:",r))}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("pont:set-locales",this._handleLocaleEvent)}getBrandingCssUrl(){if(!this.env)return null;let t;try{t=yh(this.env.domain)}catch(r){return console.warn("Could not resolve the auth base URL for branding:",r),null}return`${t}/auth/v1/apps/${this.env.appId}/branding.css`}loadBrandingCss(t){const r=document.head.querySelector(`link#${this.BRANDING_LINK_ID}`);if(r&&r.remove(),!t)return;const n=document.createElement("link");n.id=this.BRANDING_LINK_ID,n.rel="stylesheet";const o=Date.now(),i=t.includes("?")?"&":"?";n.href=`${t}${i}v=${o}`,n.onerror=s=>{console.warn("Failed to load branding CSS:",t,s)},document.head.appendChild(n)}configureAuth(t){tt.configure({domain:t.domain,appId:t.appId,locales:this.effectiveLocales||this.locales||t.locales,signinUrl:t.signinUrl,signupUrl:t.signupUrl,onFlowStateChange:r=>{r.render_spec&&(this.renderSpec=r.render_spec)},onAuthenticated:()=>{this.refreshAuthState()}})}updateLocaleAndAuth(){if(!this.env)return;const t=this.locales||this.env.locales||"";this.effectiveLocales!==t&&(this.effectiveLocales=t,this.dispatchLocaleChangedEvent(t)),this.configureAuth(this.env),G$(this.env),this.restoreThenRefreshAuthState(),this.loadBrandingCss(this.getBrandingCssUrl())}updated(t){var r;super.updated(t),(t.has("env")||t.has("locales"))&&(r=this.env)!=null&&r.domain&&this.updateLocaleAndAuth(),t.has("auth")&&this.handleAuthStateChange()}handleAuthStateChange(){if(!this.autoRedirect||!this.auth.isAuthenticated||!this.env)return;const t=window.location.pathname;if(![this.env.signinUrl,this.env.signupUrl].some(d=>t.includes(d)))return;const s=new URLSearchParams(window.location.search).get("redirect_url")||this.env.signinRedirectUrl||"/";if(this.wasBouncedBackFrom(s)){this.clearRedirectAttempt(),tt.invalidateSession(),this.refreshAuthState();return}this.recordRedirectAttempt(s),window.location.href=s}recordRedirectAttempt(t){try{sessionStorage.setItem(this.REDIRECT_ATTEMPT_KEY,JSON.stringify({target:t,at:Date.now()}))}catch{}}clearRedirectAttempt(){try{sessionStorage.removeItem(this.REDIRECT_ATTEMPT_KEY)}catch{}}wasBouncedBackFrom(t){let r=null;try{r=sessionStorage.getItem(this.REDIRECT_ATTEMPT_KEY)}catch{return!1}if(!r||(this.clearRedirectAttempt(),this.getNavigationType()!=="navigate"))return!1;try{const n=JSON.parse(r);return n.target!==t||typeof n.at!="number"?!1:Date.now()-n.at<this.REDIRECT_BOUNCE_WINDOW_MS}catch{return!1}}getNavigationType(){try{const[t]=performance.getEntriesByType("navigation");return(t==null?void 0:t.type)??"navigate"}catch{return"navigate"}}refreshAuthState(){this.auth={isAuthenticated:tt.isAuthenticated(),resolved:!0},this.dispatchAuthChangedEvent(this.auth)}dispatchAuthChangedEvent(t){this.dispatchEvent(new CustomEvent("pont:auth-changed",{detail:{...t},bubbles:!0,composed:!0}))}async restoreThenRefreshAuthState(){try{await tt.restoreSession()}catch{}this.refreshAuthState()}};br([a({type:Object}),Wt({context:Eh})],exports.PontProvider.prototype,"env",2);br([a({type:String})],exports.PontProvider.prototype,"locales",2);br([g(),Wt({context:pl})],exports.PontProvider.prototype,"effectiveLocales",2);br([g(),Wt({context:Qr})],exports.PontProvider.prototype,"auth",2);br([g(),Wt({context:cl})],exports.PontProvider.prototype,"renderSpec",2);br([g(),Wt({context:On})],exports.PontProvider.prototype,"branding",2);br([a({type:Boolean})],exports.PontProvider.prototype,"autoRedirect",2);exports.PontProvider=br([p("pont-provider")],exports.PontProvider);var dP=Object.defineProperty,cP=Object.getOwnPropertyDescriptor,Rh=(e,t,r,n)=>{for(var o=n>1?void 0:n?cP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&dP(t,r,o),o};exports.SignedOut=class extends f{constructor(){super(...arguments),this._cachedChildren=[]}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._cachedChildren.length===0&&(this._cachedChildren=Array.from(this.childNodes),this._cachedChildren.forEach(t=>this.removeChild(t)))}tryRemoveFallback(){requestAnimationFrame(()=>{const r=this.querySelector('[part="fallback"]');r==null||r.remove()})}updated(t){t.has("auth")&&this.tryRemoveFallback()}render(){var t;return!((t=this.auth)!=null&&t.resolved)||this.auth.isAuthenticated?l``:l` <div>${this._cachedChildren}</div> `}};Rh([ct({context:Qr,subscribe:!0}),a({attribute:!1})],exports.SignedOut.prototype,"auth",2);exports.SignedOut=Rh([p("pont-signed-out")],exports.SignedOut);var pP=Object.defineProperty,hP=Object.getOwnPropertyDescriptor,Ih=(e,t,r,n)=>{for(var o=n>1?void 0:n?hP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&pP(t,r,o),o};exports.SignedIn=class extends f{constructor(){super(...arguments),this._cachedChildren=[]}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._cachedChildren.length===0&&(this._cachedChildren=Array.from(this.childNodes),this._cachedChildren.forEach(t=>this.removeChild(t)))}tryRemoveFallback(){requestAnimationFrame(()=>{const r=this.querySelector('[part="fallback"]');r==null||r.remove()})}updated(t){t.has("auth")&&this.tryRemoveFallback()}render(){var t;return!((t=this.auth)!=null&&t.resolved)||!this.auth.isAuthenticated?l``:l` <div>${this._cachedChildren}</div> `}};Ih([ct({context:Qr,subscribe:!0}),a({attribute:!1})],exports.SignedIn.prototype,"auth",2);exports.SignedIn=Ih([p("pont-signed-in")],exports.SignedIn);var uP=Object.defineProperty,mP=Object.getOwnPropertyDescriptor,Di=(e,t,r,n)=>{for(var o=n>1?void 0:n?mP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&uP(t,r,o),o};exports.PontAuthenticated=class extends f{constructor(){super(...arguments),this._cachedChildren=[],this._loadingChildren=[],this._captured=!1,this.redirectUrl="",this.env=null}createRenderRoot(){return this}connectedCallback(){if(super.connectedCallback(),this._captured)return;this._captured=!0;const t=Array.from(this.childNodes);t.forEach(r=>this.removeChild(r));for(const r of t)r instanceof Element&&r.getAttribute("slot")==="loading"?this._loadingChildren.push(r):this._cachedChildren.push(r)}render(){var t;return this.auth?this.auth.resolved?this.auth.isAuthenticated?l`${this._cachedChildren}`:(window.location.href=this.redirectUrl||((t=this.env)==null?void 0:t.signinUrl),h):l`${this._loadingChildren}`:h}};Di([a({type:String})],exports.PontAuthenticated.prototype,"redirectUrl",2);Di([ct({context:Eh}),a({attribute:!1})],exports.PontAuthenticated.prototype,"env",2);Di([ct({context:Qr,subscribe:!0}),a({attribute:!1})],exports.PontAuthenticated.prototype,"auth",2);exports.PontAuthenticated=Di([p("pont-authenticated")],exports.PontAuthenticated);var gP=Object.defineProperty,fP=Object.getOwnPropertyDescriptor,Ah=(e,t,r,n)=>{for(var o=n>1?void 0:n?fP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&gP(t,r,o),o};exports.AuthStateElement=class extends f{constructor(){super(...arguments),this._cachedChildren=[]}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._cachedChildren.length===0&&(this._cachedChildren=Array.from(this.childNodes),this._cachedChildren.forEach(t=>this.removeChild(t)))}tryRemoveFallback(){requestAnimationFrame(()=>{const r=this.querySelector('[part="fallback"]');r==null||r.remove()})}syncAuthChildren(){this.auth&&(this.auth.isAuthenticated?this.querySelectorAll("pont-signed-out").forEach(t=>t.remove()):this.querySelectorAll("pont-signed-in").forEach(t=>t.remove()))}updated(t){var r;t.has("auth")&&(r=this.auth)!=null&&r.resolved&&(this.syncAuthChildren(),this.tryRemoveFallback())}render(){var t;return(t=this.auth)!=null&&t.resolved?l` <div>${this._cachedChildren}</div> `:l``}};Ah([ct({context:Qr,subscribe:!0}),a({attribute:!1})],exports.AuthStateElement.prototype,"auth",2);exports.AuthStateElement=Ah([p("pont-auth-state")],exports.AuthStateElement);var me=(e=>(e.PROFILE="Profile",e.SECURITY="Security",e.APPEARANCE="Appearance",e.NOTIFICATION="Notification",e))(me||{}),sr=(e=>(e.MODAL="MODAL",e.PAGE="PAGE",e))(sr||{}),Ve=(e=>(e.BURGER="BURGER",e.REGULAR="REGULAR",e))(Ve||{}),Rr=(e=>(e.VERTICAL="VERTICAL",e.HORIZONTAL="HORIZONTAL",e))(Rr||{}),et=(e=>(e.COLUMN="COLUMN",e.ROW="ROW",e))(et||{});function Li(){return U`<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
2638
+ `}};exports.PontKitLayout.reportedUnregistered=new Set;exports.PontKitLayout.UNREGISTERED_ELEMENT_EVENT="pont:unregistered-element";An([g()],exports.PontKitLayout.prototype,"spec",2);An([a({attribute:!1})],exports.PontKitLayout.prototype,"renderSpec",1);An([a({type:Boolean,attribute:"design-mode"}),Wt({context:Sh})],exports.PontKitLayout.prototype,"designMode",2);An([a({attribute:!1}),Wt({context:On})],exports.PontKitLayout.prototype,"branding",2);exports.PontKitLayout=An([p("pont-layout")],exports.PontKitLayout);let _a=null;function Z$(e){_a=e}function J$(){return _a||console.warn("SDK environment not initialized. Call initSdk({...}) before using <pont-provider>."),_a}function Vt(...e){return _p(Aa(e))}function X$(e){return Object.entries(e).filter(([t,r])=>typeof r!="object"&&r!=null).map(([t,r])=>`${t}: ${r};`).join(" ")}function tP(e){document.documentElement.setAttribute("data-theme",e)}function eP(){const e=document.documentElement.getAttribute("data-theme");(!e||e!=="light"&&e!=="dark")&&tP("light")}function rP(e,t){return e?e.includes("{{theme}}")?e.replace("{{theme}}",t):e:""}function wa(){return new Promise(e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))})}const xc="abcdefghijklmnopqrstuvwxyz0123456789",oP=6;function nP(e){let t="";for(let r=0;r<oP;r++)t+=xc.charAt(Math.floor(Math.random()*xc.length));return t}const wt=()=>nP();function hl(e){const t=document.createElement("pont-toast"),r=document.createElement("pont-toast-view-port");r.part="user-profile-toast",r.setAttribute("variant","destructive"),t.dataset.state="open";const n=document.createElement("div");n.className="pont-grid pont-gap-1";const o=document.createElement("pont-toast-title");o.textContent="Uh oh! Something went wrong.";const i=document.createElement("pont-toast-description");i.textContent=e,n.appendChild(o),n.appendChild(i),r.appendChild(n),t.appendChild(r),document.body.appendChild(t),setTimeout(()=>{t.dataset.state="open",r.dataset.state="open"},10),setTimeout(()=>{t.parentNode&&t.parentNode.removeChild(t)},3.5*1e3)}async function xh(e,t=5e3){if(!e)return;let r;const n=new Promise(o=>{r=setTimeout(()=>o("timeout"),t)});try{await Promise.race([e.whenConfigured(),n])==="timeout"&&console.warn(`pontive: Auth.configure() has not been called after ${t}ms. Is this widget mounted inside <pont-provider>?`)}finally{clearTimeout(r)}}function iP(e){if(!(e!=null&&e.startsWith("data:image/svg+xml;base64,")))return null;try{const t=e.replace("data:image/svg+xml;base64,","");return atob(t)}catch(t){return console.error("Invalid base64 SVG:",t),null}}function sP(e){return/^https?:\/\//.test(e)||e!=null&&e.startsWith("data:image/svg+xml;base64,")?e:`data:image/svg+xml;base64,${e}`}function Oe(){var e;return(e=tt.getCurrentSession())==null?void 0:e.access_token}function $a(e,t=!1){if(!e&&e!==0)return"N/A";const r=typeof e=="string"?new Date(e):new Date(t?e:e*1e3);if(isNaN(r.getTime()))return"Invalid Date";const n=new Date,o=new Date(n.getFullYear(),n.getMonth(),n.getDate()),i=new Date(r.getFullYear(),r.getMonth(),r.getDate()),s=Math.floor((o.getTime()-i.getTime())/(1e3*60*60*24));return s===0?"Today":s===1?"Yesterday":s>1&&s<=6?r.toLocaleDateString("en-US",{weekday:"long"}):r.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}function Pa(e,t=!1){if(!e&&e!==0)return"N/A";const r=typeof e=="string"?new Date(e):new Date(t?e:e*1e3);return isNaN(r.getTime())?"Invalid Time":r.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1})}function Oh(e){return e?e.slice(0,2).toUpperCase():""}var aP=Object.defineProperty,lP=Object.getOwnPropertyDescriptor,br=(e,t,r,n)=>{for(var o=n>1?void 0:n?lP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&aP(t,r,o),o};exports.PontProvider=class extends f{constructor(){var t,r;super(...arguments),this.env=null,this.locales=(t=this.env)==null?void 0:t.locales,this.effectiveLocales=(r=this.env)==null?void 0:r.locales,this.auth={isAuthenticated:!1,resolved:!1},this.renderSpec=null,this.branding=Uo,this.autoRedirect=!0,this._handleLocaleEvent=n=>{var s;const i=(s=n.detail)==null?void 0:s.locales;i&&this.setLocale(i)},this.BRANDING_LINK_ID="pont-branding-css",this.REDIRECT_ATTEMPT_KEY="sb_auth_redirect_attempt",this.REDIRECT_BOUNCE_WINDOW_MS=1e4}createRenderRoot(){return this}setLocale(t){this.locales!==t&&(this.locales=t,this.dispatchLocaleChangedEvent(t))}dispatchLocaleChangedEvent(t){this.dispatchEvent(new CustomEvent("pont:locale-changed",{detail:{locales:t},bubbles:!0,composed:!0}))}connectedCallback(){super.connectedCallback(),eP(),document.addEventListener("pont:set-locales",this._handleLocaleEvent),(async()=>{for(;!this.env||!this.env.domain;)await new Promise(r=>setTimeout(r,20));this.updateLocaleAndAuth()})().catch(r=>console.error("Error initializing PontProvider:",r))}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("pont:set-locales",this._handleLocaleEvent)}getBrandingCssUrl(){if(!this.env)return null;let t;try{t=yh(this.env.domain)}catch(r){return console.warn("Could not resolve the auth base URL for branding:",r),null}return`${t}/auth/v1/apps/${this.env.appId}/branding.css`}loadBrandingCss(t){const r=document.head.querySelector(`link#${this.BRANDING_LINK_ID}`);if(r&&r.remove(),!t)return;const n=document.createElement("link");n.id=this.BRANDING_LINK_ID,n.rel="stylesheet";const o=Date.now(),i=t.includes("?")?"&":"?";n.href=`${t}${i}v=${o}`,n.onerror=s=>{console.warn("Failed to load branding CSS:",t,s)},document.head.appendChild(n)}configureAuth(t){tt.configure({domain:t.domain,appId:t.appId,locales:this.effectiveLocales||this.locales||t.locales,signinUrl:t.signinUrl,signupUrl:t.signupUrl,onFlowStateChange:r=>{r.render_spec&&(this.renderSpec=r.render_spec)},onAuthenticated:()=>{this.refreshAuthState()}})}updateLocaleAndAuth(){if(!this.env)return;const t=this.locales||this.env.locales||"";this.effectiveLocales!==t&&(this.effectiveLocales=t,this.dispatchLocaleChangedEvent(t)),this.configureAuth(this.env),Z$(this.env),this.restoreThenRefreshAuthState(),this.loadBrandingCss(this.getBrandingCssUrl())}updated(t){var r;super.updated(t),(t.has("env")||t.has("locales"))&&(r=this.env)!=null&&r.domain&&this.updateLocaleAndAuth(),t.has("auth")&&this.handleAuthStateChange()}handleAuthStateChange(){if(!this.autoRedirect||!this.auth.isAuthenticated||!this.env)return;const t=window.location.pathname;if(![this.env.signinUrl,this.env.signupUrl].some(d=>t.includes(d)))return;const s=new URLSearchParams(window.location.search).get("redirect_url")||this.env.signinRedirectUrl||"/";if(this.wasBouncedBackFrom(s)){this.clearRedirectAttempt(),tt.invalidateSession(),this.refreshAuthState();return}this.recordRedirectAttempt(s),window.location.href=s}recordRedirectAttempt(t){try{sessionStorage.setItem(this.REDIRECT_ATTEMPT_KEY,JSON.stringify({target:t,at:Date.now()}))}catch{}}clearRedirectAttempt(){try{sessionStorage.removeItem(this.REDIRECT_ATTEMPT_KEY)}catch{}}wasBouncedBackFrom(t){let r=null;try{r=sessionStorage.getItem(this.REDIRECT_ATTEMPT_KEY)}catch{return!1}if(!r||(this.clearRedirectAttempt(),this.getNavigationType()!=="navigate"))return!1;try{const n=JSON.parse(r);return n.target!==t||typeof n.at!="number"?!1:Date.now()-n.at<this.REDIRECT_BOUNCE_WINDOW_MS}catch{return!1}}getNavigationType(){try{const[t]=performance.getEntriesByType("navigation");return(t==null?void 0:t.type)??"navigate"}catch{return"navigate"}}refreshAuthState(){this.auth={isAuthenticated:tt.isAuthenticated(),resolved:!0},this.dispatchAuthChangedEvent(this.auth)}dispatchAuthChangedEvent(t){this.dispatchEvent(new CustomEvent("pont:auth-changed",{detail:{...t},bubbles:!0,composed:!0}))}async restoreThenRefreshAuthState(){try{await tt.restoreSession()}catch{}this.refreshAuthState()}};br([a({type:Object}),Wt({context:Eh})],exports.PontProvider.prototype,"env",2);br([a({type:String})],exports.PontProvider.prototype,"locales",2);br([g(),Wt({context:pl})],exports.PontProvider.prototype,"effectiveLocales",2);br([g(),Wt({context:Qr})],exports.PontProvider.prototype,"auth",2);br([g(),Wt({context:cl})],exports.PontProvider.prototype,"renderSpec",2);br([g(),Wt({context:On})],exports.PontProvider.prototype,"branding",2);br([a({type:Boolean})],exports.PontProvider.prototype,"autoRedirect",2);exports.PontProvider=br([p("pont-provider")],exports.PontProvider);var dP=Object.defineProperty,cP=Object.getOwnPropertyDescriptor,Rh=(e,t,r,n)=>{for(var o=n>1?void 0:n?cP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&dP(t,r,o),o};exports.SignedOut=class extends f{constructor(){super(...arguments),this._cachedChildren=[]}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._cachedChildren.length===0&&(this._cachedChildren=Array.from(this.childNodes),this._cachedChildren.forEach(t=>this.removeChild(t)))}tryRemoveFallback(){requestAnimationFrame(()=>{const r=this.querySelector('[part="fallback"]');r==null||r.remove()})}updated(t){t.has("auth")&&this.tryRemoveFallback()}render(){var t;return!((t=this.auth)!=null&&t.resolved)||this.auth.isAuthenticated?l``:l` <div>${this._cachedChildren}</div> `}};Rh([pt({context:Qr,subscribe:!0}),a({attribute:!1})],exports.SignedOut.prototype,"auth",2);exports.SignedOut=Rh([p("pont-signed-out")],exports.SignedOut);var pP=Object.defineProperty,hP=Object.getOwnPropertyDescriptor,Ih=(e,t,r,n)=>{for(var o=n>1?void 0:n?hP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&pP(t,r,o),o};exports.SignedIn=class extends f{constructor(){super(...arguments),this._cachedChildren=[]}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._cachedChildren.length===0&&(this._cachedChildren=Array.from(this.childNodes),this._cachedChildren.forEach(t=>this.removeChild(t)))}tryRemoveFallback(){requestAnimationFrame(()=>{const r=this.querySelector('[part="fallback"]');r==null||r.remove()})}updated(t){t.has("auth")&&this.tryRemoveFallback()}render(){var t;return!((t=this.auth)!=null&&t.resolved)||!this.auth.isAuthenticated?l``:l` <div>${this._cachedChildren}</div> `}};Ih([pt({context:Qr,subscribe:!0}),a({attribute:!1})],exports.SignedIn.prototype,"auth",2);exports.SignedIn=Ih([p("pont-signed-in")],exports.SignedIn);var uP=Object.defineProperty,mP=Object.getOwnPropertyDescriptor,Di=(e,t,r,n)=>{for(var o=n>1?void 0:n?mP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&uP(t,r,o),o};exports.PontAuthenticated=class extends f{constructor(){super(...arguments),this._cachedChildren=[],this._loadingChildren=[],this._captured=!1,this.redirectUrl="",this.env=null}createRenderRoot(){return this}connectedCallback(){if(super.connectedCallback(),this._captured)return;this._captured=!0;const t=Array.from(this.childNodes);t.forEach(r=>this.removeChild(r));for(const r of t)r instanceof Element&&r.getAttribute("slot")==="loading"?this._loadingChildren.push(r):this._cachedChildren.push(r)}render(){var t;return this.auth?this.auth.resolved?this.auth.isAuthenticated?l`${this._cachedChildren}`:(window.location.href=this.redirectUrl||((t=this.env)==null?void 0:t.signinUrl),h):l`${this._loadingChildren}`:h}};Di([a({type:String})],exports.PontAuthenticated.prototype,"redirectUrl",2);Di([pt({context:Eh}),a({attribute:!1})],exports.PontAuthenticated.prototype,"env",2);Di([pt({context:Qr,subscribe:!0}),a({attribute:!1})],exports.PontAuthenticated.prototype,"auth",2);exports.PontAuthenticated=Di([p("pont-authenticated")],exports.PontAuthenticated);var gP=Object.defineProperty,fP=Object.getOwnPropertyDescriptor,Ah=(e,t,r,n)=>{for(var o=n>1?void 0:n?fP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&gP(t,r,o),o};exports.AuthStateElement=class extends f{constructor(){super(...arguments),this._cachedChildren=[]}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._cachedChildren.length===0&&(this._cachedChildren=Array.from(this.childNodes),this._cachedChildren.forEach(t=>this.removeChild(t)))}tryRemoveFallback(){requestAnimationFrame(()=>{const r=this.querySelector('[part="fallback"]');r==null||r.remove()})}syncAuthChildren(){this.auth&&(this.auth.isAuthenticated?this.querySelectorAll("pont-signed-out").forEach(t=>t.remove()):this.querySelectorAll("pont-signed-in").forEach(t=>t.remove()))}updated(t){var r;t.has("auth")&&(r=this.auth)!=null&&r.resolved&&(this.syncAuthChildren(),this.tryRemoveFallback())}render(){var t;return(t=this.auth)!=null&&t.resolved?l` <div>${this._cachedChildren}</div> `:l``}};Ah([pt({context:Qr,subscribe:!0}),a({attribute:!1})],exports.AuthStateElement.prototype,"auth",2);exports.AuthStateElement=Ah([p("pont-auth-state")],exports.AuthStateElement);var me=(e=>(e.PROFILE="Profile",e.SECURITY="Security",e.APPEARANCE="Appearance",e.NOTIFICATION="Notification",e))(me||{}),sr=(e=>(e.MODAL="MODAL",e.PAGE="PAGE",e))(sr||{}),Ve=(e=>(e.BURGER="BURGER",e.REGULAR="REGULAR",e))(Ve||{}),Rr=(e=>(e.VERTICAL="VERTICAL",e.HORIZONTAL="HORIZONTAL",e))(Rr||{}),rt=(e=>(e.COLUMN="COLUMN",e.ROW="ROW",e))(rt||{});function Li(){return U`<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
2639
2639
  <path d="M6.66501 1.32926H1.99834C1.64472 1.32926 1.30558 1.46974 1.05553 1.71979C0.805484 1.96984 0.665009 2.30898 0.665009 2.6626V11.9959C0.665009 12.3496 0.805484 12.6887 1.05553 12.9387C1.30558 13.1888 1.64472 13.3293 1.99834 13.3293H11.3317C11.6853 13.3293 12.0244 13.1888 12.2745 12.9387C12.5245 12.6887 12.665 12.3496 12.665 11.9959V7.32926M10.9151 1.07925C11.1803 0.814036 11.54 0.665039 11.9151 0.665039C12.2901 0.665039 12.6499 0.814036 12.9151 1.07925C13.1803 1.34447 13.3293 1.70418 13.3293 2.07925C13.3293 2.45433 13.1803 2.81404 12.9151 3.07925L6.90641 9.08859C6.7481 9.24675 6.55254 9.36253 6.33774 9.42525L4.4224 9.98525C4.36504 10.002 4.30423 10.003 4.24634 9.98816C4.18846 9.97333 4.13562 9.94321 4.09337 9.90096C4.05112 9.8587 4.021 9.80587 4.00617 9.74798C3.99134 9.69009 3.99234 9.62929 4.00907 9.57192L4.56907 7.65659C4.63209 7.44195 4.74809 7.24662 4.9064 7.08859L10.9151 1.07925Z" stroke="currentColor" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"/>
2640
2640
  </svg>
2641
2641
  `}function Mt(){return U`
@@ -2716,7 +2716,7 @@
2716
2716
  ${this._cachedChildren}
2717
2717
  </div>
2718
2718
  </div>
2719
- `:h}};Fi([a({type:Boolean})],exports.PontModal.prototype,"isOpen",2);Fi([a({type:Boolean})],exports.PontModal.prototype,"showClose",2);Fi([a({type:String})],exports.PontModal.prototype,"layoutClass",2);exports.PontModal=Fi([p("pont-modal")],exports.PontModal);const ki="pont-account-settings-card-header-container",gn="pont-account-settings-card-title",$t="pont-account-settings-input-label pont-shrink-0 md:pont-block",Ni="pont-account-settings-card-container";class xP extends Error{constructor(t,r,n){super(t),this.name="ApiError",this.status=r,this.data=n}}async function Re(e,t={}){var b;const{token:r,headers:n,...o}=t,i=K$(),s=i==null?void 0:i.apiBaseUrl,d=(i==null?void 0:i.projectId)||"",c={"Content-Type":"application/json",...i==null?void 0:i.headers,...r?{Authorization:`Bearer ${r}`}:{}};n&&(n instanceof Headers?n.forEach((w,_)=>{c[_]=w}):Array.isArray(n)?n.forEach(([w,_])=>{c[w]=_}):Object.assign(c,n)),Object.prototype.hasOwnProperty.call(c,"x-pontive-project-id")||(c["x-pontive-project-id"]=d);const m=await fetch(`${s}${e}`,{...o,headers:c});let v=null;try{v=await m.json()}catch{}if(!m.ok)throw new xP(((b=v==null?void 0:v.error)==null?void 0:b.message)||m.statusText||"Something went wrong",m.status,v);return v}async function OP(e,t){return Re(`/users/${encodeURIComponent(e)}`,{method:"GET",token:Oe(),headers:{"x-pontive-project-id":"proj_06fghx60hnrcxftadsj44e0pj8"}})}async function Mi(e,t){return Re(`/users/${encodeURIComponent(e)}`,{method:"PATCH",body:JSON.stringify(t),token:Oe(),headers:{"x-pontive-project-id":"proj_06fghx60hnrcxftadsj44e0pj8"}})}async function RP(e,t){var i,s;const r=new URLSearchParams;t&&(t.search&&r.append("search",t.search),t.page!==void 0&&r.append("page",t.page.toString()),t.limit!==void 0&&r.append("limit",t.limit.toString()),t.order&&r.append("order",t.order),(i=t.user_ids)!=null&&i.length&&t.user_ids.forEach(d=>r.append("user_ids",d)),(s=t.emails)!=null&&s.length&&t.emails.forEach(d=>r.append("emails",d)),t.roles&&r.append("roles",t.roles));const n=r.toString(),o=`/organizations/${encodeURIComponent(e)}/members${n?`?${n}`:""}`;return Re(o,{method:"GET",token:Oe(),headers:{"x-pontive-project-id":"proj_06fghx60hnrcxftadsj44e0pj8"}})}async function IP(e,t,r){const n=`/organizations/${encodeURIComponent(e)}/members/${encodeURIComponent(t)}/roles`;await Re(n,{method:"PUT",token:Oe(),headers:{"x-pontive-project-id":"proj_06fghx60hnrcxftadsj44e0pj8","Content-Type":"application/json"},body:JSON.stringify(r)})}async function AP(e,t){const r=`/organizations/${encodeURIComponent(e)}/members/${encodeURIComponent(t)}`;await Re(r,{method:"DELETE",token:Oe(),headers:{"x-pontive-project-id":"proj_06fghx60hnrcxftadsj44e0pj8","Content-Type":"application/json"}})}async function TP(e,t){const r=`/organizations/${encodeURIComponent(e)}/invitations`;return Re(r,{method:"POST",token:Oe(),headers:{"x-pontive-project-id":"proj_06fghx60hnrcxftadsj44e0pj8","Content-Type":"application/json"},body:JSON.stringify(t)})}async function DP(e,t){const r=`/organizations/${encodeURIComponent(e)}/invitations/${encodeURIComponent(t)}/resend`;return Re(r,{method:"POST",token:Oe(),headers:{"x-pontive-project-id":"proj_06fghx60hnrcxftadsj44e0pj8","Content-Type":"application/json"}})}async function LP(e,t){const r=`/organizations/${encodeURIComponent(e)}/invitations/${encodeURIComponent(t)}/cancel`;return Re(r,{method:"POST",token:Oe(),headers:{"x-pontive-project-id":"proj_06fghx60hnrcxftadsj44e0pj8","Content-Type":"application/json"}})}async function FP(e,t){var i;const r=new URLSearchParams;t&&(t.search&&r.append("search",t.search),t.status&&r.append("status",t.status),t.expired!==void 0&&r.append("expired",t.expired.toString()),t.invited_by&&r.append("invited_by",t.invited_by),t.page!==void 0&&r.append("page",t.page.toString()),t.limit!==void 0&&r.append("limit",t.limit.toString()),t.order&&r.append("order",t.order),(i=t.invitee_emails)!=null&&i.length&&t.invitee_emails.forEach(s=>r.append("invitee_emails",s)),t.roles&&r.append("roles",t.roles));const n=r.toString(),o=`/organizations/${encodeURIComponent(e)}/invitations${n?`?${n}`:""}`;return Re(o,{method:"GET",token:Oe(),headers:{"x-pontive-project-id":"proj_06fghx60hnrcxftadsj44e0pj8"}})}async function ul(e){const t=new URLSearchParams;e&&(e.type&&t.append("type",e.type),e.name&&t.append("name",e.name),e.resource_type&&t.append("resource_type",e.resource_type),e.resource_id&&t.append("resource_id",e.resource_id),e.include_instance_scoped!==void 0&&t.append("include_instance_scoped",e.include_instance_scoped.toString()),e.permission&&t.append("permission",e.permission),e.page!==void 0&&t.append("page",e.page.toString()),e.limit!==void 0&&t.append("limit",e.limit.toString()),e.order&&t.append("order",e.order));const r=t.toString(),n=`/roles${r?`?${r}`:""}`;return Re(n,{method:"GET",token:Oe(),headers:{"x-pontive-project-id":"proj_06fghx60hnrcxftadsj44e0pj8"}})}var kP=Object.defineProperty,NP=Object.getOwnPropertyDescriptor,ot=(e,t,r,n)=>{for(var o=n>1?void 0:n?NP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&kP(t,r,o),o};exports.PontAccountInfo=class extends f{constructor(){super(...arguments),this.showAvatarMenu=!1,this.showIcons=!0,this.content=null,this.otpVariant="simple",this.otpLength=6,this.layout=et.ROW,this.isEditingEmail=!1,this.isVerifyingEmail=!1,this.isEditingPhone=!1,this.isVerifyingPhone=!1,this.isUploadingImage=!1,this.isEditingAvatarMobile=!1,this.isMobile=!1,this._isAvatarEditorOpen=!1,this._popoverObserver=null,this._intentionalClose=!1,this.avatarDraft="",this._committedAvatar="",this.formData={avatar:"",email:"",phone:""},this._onMobileChange=t=>{this.isMobile=t.matches,t.matches||(this.isEditingAvatarMobile=!1)},this.handleAvatarInput=t=>{this.avatarDraft=t.target.value,this.account={...this.account,avatar:this.avatarDraft}},this.handleSaveAvatar=async()=>{if(!this.isUploadingImage){this.isUploadingImage=!0;try{const t=await Mi(this.userContextValue.identifier,{picture:this.avatarDraft});this.account={...this.account,avatar:t.picture??""},this._committedAvatar=this.account.avatar,this.avatarDraft=this.account.avatar,this._isAvatarEditorOpen=!1,this.isMobile?this.isEditingAvatarMobile=!1:(this._intentionalClose=!0,this.querySelector("pont-popover-content").state="closed")}catch{this.isMobile?this.isEditingAvatarMobile=!1:(this._intentionalClose=!0,this.querySelector("pont-popover-content").state="closed")}finally{this.isUploadingImage=!1}}}}firstUpdated(){this._setupPopoverObserver()}_setupPopoverObserver(){const t=this.querySelector("pont-popover-content");if(!t)return;const r=new MutationObserver(o=>{for(const i of o)if(i.type==="childList"){const s=t.firstElementChild;if(s&&s.hasAttribute("data-state")){this._attachAttributeObserver(s),r.disconnect();break}}});r.observe(t,{childList:!0,subtree:!1});const n=t.firstElementChild;n&&n.hasAttribute("data-state")&&(this._attachAttributeObserver(n),r.disconnect())}_attachAttributeObserver(t){this._popoverObserver&&this._popoverObserver.disconnect(),this._popoverObserver=new MutationObserver(r=>{for(const n of r)if(n.type==="attributes"&&n.attributeName==="data-state"){const o=t.getAttribute("data-state");o==="open"?this.openAvatarEditor():o==="closed"&&(this._intentionalClose?this._intentionalClose=!1:(this.account={...this.account,avatar:this._committedAvatar},this.avatarDraft=this._committedAvatar,this._isAvatarEditorOpen=!1))}}),this._popoverObserver.observe(t,{attributes:!0})}updated(t){t.has("account")&&this.account.avatar&&!this._isAvatarEditorOpen&&(this.avatarDraft=this.account.avatar,this._committedAvatar=this.account.avatar)}connectedCallback(){super.connectedCallback(),this._mobileQuery=window.matchMedia("(max-width: 767px)"),this.isMobile=this._mobileQuery.matches,this._mobileQuery.addEventListener("change",this._onMobileChange)}disconnectedCallback(){super.disconnectedCallback(),this._mobileQuery.removeEventListener("change",this._onMobileChange),this._popoverObserver&&(this._popoverObserver.disconnect(),this._popoverObserver=null)}openAvatarEditor(){this._isAvatarEditorOpen=!0,this._committedAvatar=this.account.avatar,this.avatarDraft=this.account.avatar}resetAvatarDraft(){this.avatarDraft=this.account.avatar}handleCancelAvatar(){this.isUploadingImage||(this.account={...this.account,avatar:this._committedAvatar},this.avatarDraft=this._committedAvatar,this._isAvatarEditorOpen=!1,this.isMobile?this.isEditingAvatarMobile=!1:(this._intentionalClose=!0,this.querySelector("pont-popover-content").state="closed"))}renderDisplayRow(t,r,n){const o=this.layout===et.COLUMN;return l`
2719
+ `:h}};Fi([a({type:Boolean})],exports.PontModal.prototype,"isOpen",2);Fi([a({type:Boolean})],exports.PontModal.prototype,"showClose",2);Fi([a({type:String})],exports.PontModal.prototype,"layoutClass",2);exports.PontModal=Fi([p("pont-modal")],exports.PontModal);const ki="pont-account-settings-card-header-container",gn="pont-account-settings-card-title",$t="pont-account-settings-input-label pont-shrink-0 md:pont-block",Ni="pont-account-settings-card-container";class xP extends Error{constructor(t,r,n){super(t),this.name="ApiError",this.status=r,this.data=n}}async function Re(e,t={}){var b;const{token:r,headers:n,...o}=t,i=J$(),s=i==null?void 0:i.apiBaseUrl,d=(i==null?void 0:i.projectId)||"",c={"Content-Type":"application/json",...i==null?void 0:i.headers,...r?{Authorization:`Bearer ${r}`}:{}};n&&(n instanceof Headers?n.forEach((w,_)=>{c[_]=w}):Array.isArray(n)?n.forEach(([w,_])=>{c[w]=_}):Object.assign(c,n)),Object.prototype.hasOwnProperty.call(c,"x-pontive-project-id")||(c["x-pontive-project-id"]=d);const m=await fetch(`${s}${e}`,{...o,headers:c});let v=null;try{v=await m.json()}catch{}if(!m.ok)throw new xP(((b=v==null?void 0:v.error)==null?void 0:b.message)||m.statusText||"Something went wrong",m.status,v);return v}async function OP(e,t){return Re(`/users/${encodeURIComponent(e)}`,{method:"GET",token:Oe(),headers:{"x-pontive-project-id":"proj_06fghx60hnrcxftadsj44e0pj8"}})}async function Mi(e,t){return Re(`/users/${encodeURIComponent(e)}`,{method:"PATCH",body:JSON.stringify(t),token:Oe(),headers:{"x-pontive-project-id":"proj_06fghx60hnrcxftadsj44e0pj8"}})}async function RP(e,t){var i,s;const r=new URLSearchParams;t&&(t.search&&r.append("search",t.search),t.page!==void 0&&r.append("page",t.page.toString()),t.limit!==void 0&&r.append("limit",t.limit.toString()),t.order&&r.append("order",t.order),(i=t.user_ids)!=null&&i.length&&t.user_ids.forEach(d=>r.append("user_ids",d)),(s=t.emails)!=null&&s.length&&t.emails.forEach(d=>r.append("emails",d)),t.roles&&r.append("roles",t.roles));const n=r.toString(),o=`/organizations/${encodeURIComponent(e)}/members${n?`?${n}`:""}`;return Re(o,{method:"GET",token:Oe(),headers:{"x-pontive-project-id":"proj_06fghx60hnrcxftadsj44e0pj8"}})}async function IP(e,t,r){const n=`/organizations/${encodeURIComponent(e)}/members/${encodeURIComponent(t)}/roles`;await Re(n,{method:"PUT",token:Oe(),headers:{"x-pontive-project-id":"proj_06fghx60hnrcxftadsj44e0pj8","Content-Type":"application/json"},body:JSON.stringify(r)})}async function AP(e,t){const r=`/organizations/${encodeURIComponent(e)}/members/${encodeURIComponent(t)}`;await Re(r,{method:"DELETE",token:Oe(),headers:{"x-pontive-project-id":"proj_06fghx60hnrcxftadsj44e0pj8","Content-Type":"application/json"}})}async function TP(e,t){const r=`/organizations/${encodeURIComponent(e)}/invitations`;return Re(r,{method:"POST",token:Oe(),headers:{"x-pontive-project-id":"proj_06fghx60hnrcxftadsj44e0pj8","Content-Type":"application/json"},body:JSON.stringify(t)})}async function DP(e,t){const r=`/organizations/${encodeURIComponent(e)}/invitations/${encodeURIComponent(t)}/resend`;return Re(r,{method:"POST",token:Oe(),headers:{"x-pontive-project-id":"proj_06fghx60hnrcxftadsj44e0pj8","Content-Type":"application/json"}})}async function LP(e,t){const r=`/organizations/${encodeURIComponent(e)}/invitations/${encodeURIComponent(t)}/cancel`;return Re(r,{method:"POST",token:Oe(),headers:{"x-pontive-project-id":"proj_06fghx60hnrcxftadsj44e0pj8","Content-Type":"application/json"}})}async function FP(e,t){var i;const r=new URLSearchParams;t&&(t.search&&r.append("search",t.search),t.status&&r.append("status",t.status),t.expired!==void 0&&r.append("expired",t.expired.toString()),t.invited_by&&r.append("invited_by",t.invited_by),t.page!==void 0&&r.append("page",t.page.toString()),t.limit!==void 0&&r.append("limit",t.limit.toString()),t.order&&r.append("order",t.order),(i=t.invitee_emails)!=null&&i.length&&t.invitee_emails.forEach(s=>r.append("invitee_emails",s)),t.roles&&r.append("roles",t.roles));const n=r.toString(),o=`/organizations/${encodeURIComponent(e)}/invitations${n?`?${n}`:""}`;return Re(o,{method:"GET",token:Oe(),headers:{"x-pontive-project-id":"proj_06fghx60hnrcxftadsj44e0pj8"}})}async function ul(e){const t=new URLSearchParams;e&&(e.type&&t.append("type",e.type),e.name&&t.append("name",e.name),e.resource_type&&t.append("resource_type",e.resource_type),e.resource_id&&t.append("resource_id",e.resource_id),e.include_instance_scoped!==void 0&&t.append("include_instance_scoped",e.include_instance_scoped.toString()),e.permission&&t.append("permission",e.permission),e.page!==void 0&&t.append("page",e.page.toString()),e.limit!==void 0&&t.append("limit",e.limit.toString()),e.order&&t.append("order",e.order));const r=t.toString(),n=`/roles${r?`?${r}`:""}`;return Re(n,{method:"GET",token:Oe(),headers:{"x-pontive-project-id":"proj_06fghx60hnrcxftadsj44e0pj8"}})}var kP=Object.defineProperty,NP=Object.getOwnPropertyDescriptor,nt=(e,t,r,n)=>{for(var o=n>1?void 0:n?NP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&kP(t,r,o),o};exports.PontAccountInfo=class extends f{constructor(){super(...arguments),this.showAvatarMenu=!1,this.showIcons=!0,this.content=null,this.otpVariant="simple",this.otpLength=6,this.layout=rt.ROW,this.isEditingEmail=!1,this.isVerifyingEmail=!1,this.isEditingPhone=!1,this.isVerifyingPhone=!1,this.isUploadingImage=!1,this.isEditingAvatarMobile=!1,this.isMobile=!1,this._isAvatarEditorOpen=!1,this._popoverObserver=null,this._intentionalClose=!1,this.avatarDraft="",this._committedAvatar="",this.formData={avatar:"",email:"",phone:""},this._onMobileChange=t=>{this.isMobile=t.matches,t.matches||(this.isEditingAvatarMobile=!1)},this.handleAvatarInput=t=>{this.avatarDraft=t.target.value,this.account={...this.account,avatar:this.avatarDraft}},this.handleSaveAvatar=async()=>{if(!this.isUploadingImage){this.isUploadingImage=!0;try{const t=await Mi(this.userContextValue.identifier,{picture:this.avatarDraft});this.account={...this.account,avatar:t.picture??""},this._committedAvatar=this.account.avatar,this.avatarDraft=this.account.avatar,this._isAvatarEditorOpen=!1,this.isMobile?this.isEditingAvatarMobile=!1:(this._intentionalClose=!0,this.querySelector("pont-popover-content").state="closed")}catch{this.isMobile?this.isEditingAvatarMobile=!1:(this._intentionalClose=!0,this.querySelector("pont-popover-content").state="closed")}finally{this.isUploadingImage=!1}}}}firstUpdated(){this._setupPopoverObserver()}_setupPopoverObserver(){const t=this.querySelector("pont-popover-content");if(!t)return;const r=new MutationObserver(o=>{for(const i of o)if(i.type==="childList"){const s=t.firstElementChild;if(s&&s.hasAttribute("data-state")){this._attachAttributeObserver(s),r.disconnect();break}}});r.observe(t,{childList:!0,subtree:!1});const n=t.firstElementChild;n&&n.hasAttribute("data-state")&&(this._attachAttributeObserver(n),r.disconnect())}_attachAttributeObserver(t){this._popoverObserver&&this._popoverObserver.disconnect(),this._popoverObserver=new MutationObserver(r=>{for(const n of r)if(n.type==="attributes"&&n.attributeName==="data-state"){const o=t.getAttribute("data-state");o==="open"?this.openAvatarEditor():o==="closed"&&(this._intentionalClose?this._intentionalClose=!1:(this.account={...this.account,avatar:this._committedAvatar},this.avatarDraft=this._committedAvatar,this._isAvatarEditorOpen=!1))}}),this._popoverObserver.observe(t,{attributes:!0})}updated(t){t.has("account")&&this.account.avatar&&!this._isAvatarEditorOpen&&(this.avatarDraft=this.account.avatar,this._committedAvatar=this.account.avatar)}connectedCallback(){super.connectedCallback(),this._mobileQuery=window.matchMedia("(max-width: 767px)"),this.isMobile=this._mobileQuery.matches,this._mobileQuery.addEventListener("change",this._onMobileChange)}disconnectedCallback(){super.disconnectedCallback(),this._mobileQuery.removeEventListener("change",this._onMobileChange),this._popoverObserver&&(this._popoverObserver.disconnect(),this._popoverObserver=null)}openAvatarEditor(){this._isAvatarEditorOpen=!0,this._committedAvatar=this.account.avatar,this.avatarDraft=this.account.avatar}resetAvatarDraft(){this.avatarDraft=this.account.avatar}handleCancelAvatar(){this.isUploadingImage||(this.account={...this.account,avatar:this._committedAvatar},this.avatarDraft=this._committedAvatar,this._isAvatarEditorOpen=!1,this.isMobile?this.isEditingAvatarMobile=!1:(this._intentionalClose=!0,this.querySelector("pont-popover-content").state="closed"))}renderDisplayRow(t,r,n){const o=this.layout===rt.COLUMN;return l`
2720
2720
  <div
2721
2721
  class=${Vt("pont-account-settings-display-row",o?"":"pont-grid pont-account-settings-account-grid pont-items-center")}
2722
2722
  >
@@ -2731,7 +2731,7 @@
2731
2731
  </div>
2732
2732
  `:l`
2733
2733
  <div
2734
- class=${this.layout===et.ROW?"pont-flex pont-w-full pont-items-center":""}
2734
+ class=${this.layout===rt.ROW?"pont-flex pont-w-full pont-items-center":""}
2735
2735
  >
2736
2736
  <div
2737
2737
  part="label"
@@ -2937,7 +2937,7 @@
2937
2937
  </pont-card-content>
2938
2938
  </div>
2939
2939
  </pont-card>
2940
- `}createRenderRoot(){return this}};ot([a({type:Object})],exports.PontAccountInfo.prototype,"account",2);ot([a({type:Boolean})],exports.PontAccountInfo.prototype,"showAvatarMenu",2);ot([a({attribute:!1})],exports.PontAccountInfo.prototype,"toggleAvatarMenu",2);ot([a({attribute:!1})],exports.PontAccountInfo.prototype,"onAvatarChange",2);ot([a({attribute:!1})],exports.PontAccountInfo.prototype,"onAvatarRemove",2);ot([a({type:Boolean})],exports.PontAccountInfo.prototype,"showIcons",2);ot([a({type:Object})],exports.PontAccountInfo.prototype,"content",2);ot([a({type:String})],exports.PontAccountInfo.prototype,"otpVariant",2);ot([a({type:Number})],exports.PontAccountInfo.prototype,"otpLength",2);ot([a({type:String})],exports.PontAccountInfo.prototype,"layout",2);ot([g()],exports.PontAccountInfo.prototype,"isEditingEmail",2);ot([g()],exports.PontAccountInfo.prototype,"isVerifyingEmail",2);ot([g()],exports.PontAccountInfo.prototype,"isEditingPhone",2);ot([g()],exports.PontAccountInfo.prototype,"isVerifyingPhone",2);ot([g()],exports.PontAccountInfo.prototype,"isUploadingImage",2);ot([g()],exports.PontAccountInfo.prototype,"isEditingAvatarMobile",2);ot([g()],exports.PontAccountInfo.prototype,"isMobile",2);ot([g()],exports.PontAccountInfo.prototype,"_isAvatarEditorOpen",2);ot([g()],exports.PontAccountInfo.prototype,"avatarDraft",2);ot([g()],exports.PontAccountInfo.prototype,"formData",2);ot([ct({context:In,subscribe:!0})],exports.PontAccountInfo.prototype,"userContextValue",2);exports.PontAccountInfo=ot([p("pont-account-info")],exports.PontAccountInfo);var MP=Object.defineProperty,BP=Object.getOwnPropertyDescriptor,Ie=(e,t,r,n)=>{for(var o=n>1?void 0:n?BP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&MP(t,r,o),o};exports.PontLocationInfo=class extends f{constructor(){super(...arguments),this.showIcons=!0,this.layout=et.ROW,this.content=null,this.isEditing=!1,this.isSaving=!1,this.formData={location:"",zoneInfo:""},this.errors={},this.handleSave=async()=>{var t,r,n,o;if(!this.isSaving&&this.validate()){this.isSaving=!0;try{const i=await Mi(this.userContextValue.identifier,{address:{...(t=this.userContextValue.user)==null?void 0:t.address,locality:this.formData.location},zoneinfo:this.formData.zoneInfo});this.locationInfo={location:((r=i.address)==null?void 0:r.locality)??"",zoneInfo:i.zoneinfo??""},this.isEditing=!1}catch(i){console.error("Failed to update location info",i);let s="Failed to update location information. Please try again.";if(i instanceof Error&&"status"in i){const d=i;s=((o=(n=d.data)==null?void 0:n.error)==null?void 0:o.message)??d.message??s}else i instanceof Error&&(s=i.message);hl(s)}finally{this.isSaving=!1}}}}createRenderRoot(){return this}handleEdit(){this.isSaving||(this.formData={...this.locationInfo},this.errors={},this.isEditing=!0)}handleCancel(){this.isSaving||(this.isEditing=!1,this.errors={})}updateField(t,r){this.formData={...this.formData,[t]:r}}validate(){const t={};return this.errors=t,Object.keys(t).length===0}renderField(t,r){return this.layout===et.ROW?l`
2940
+ `}createRenderRoot(){return this}};nt([a({type:Object})],exports.PontAccountInfo.prototype,"account",2);nt([a({type:Boolean})],exports.PontAccountInfo.prototype,"showAvatarMenu",2);nt([a({attribute:!1})],exports.PontAccountInfo.prototype,"toggleAvatarMenu",2);nt([a({attribute:!1})],exports.PontAccountInfo.prototype,"onAvatarChange",2);nt([a({attribute:!1})],exports.PontAccountInfo.prototype,"onAvatarRemove",2);nt([a({type:Boolean})],exports.PontAccountInfo.prototype,"showIcons",2);nt([a({type:Object})],exports.PontAccountInfo.prototype,"content",2);nt([a({type:String})],exports.PontAccountInfo.prototype,"otpVariant",2);nt([a({type:Number})],exports.PontAccountInfo.prototype,"otpLength",2);nt([a({type:String})],exports.PontAccountInfo.prototype,"layout",2);nt([g()],exports.PontAccountInfo.prototype,"isEditingEmail",2);nt([g()],exports.PontAccountInfo.prototype,"isVerifyingEmail",2);nt([g()],exports.PontAccountInfo.prototype,"isEditingPhone",2);nt([g()],exports.PontAccountInfo.prototype,"isVerifyingPhone",2);nt([g()],exports.PontAccountInfo.prototype,"isUploadingImage",2);nt([g()],exports.PontAccountInfo.prototype,"isEditingAvatarMobile",2);nt([g()],exports.PontAccountInfo.prototype,"isMobile",2);nt([g()],exports.PontAccountInfo.prototype,"_isAvatarEditorOpen",2);nt([g()],exports.PontAccountInfo.prototype,"avatarDraft",2);nt([g()],exports.PontAccountInfo.prototype,"formData",2);nt([pt({context:In,subscribe:!0})],exports.PontAccountInfo.prototype,"userContextValue",2);exports.PontAccountInfo=nt([p("pont-account-info")],exports.PontAccountInfo);var MP=Object.defineProperty,BP=Object.getOwnPropertyDescriptor,Ie=(e,t,r,n)=>{for(var o=n>1?void 0:n?BP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&MP(t,r,o),o};exports.PontLocationInfo=class extends f{constructor(){super(...arguments),this.showIcons=!0,this.layout=rt.ROW,this.content=null,this.isEditing=!1,this.isSaving=!1,this.formData={location:"",zoneInfo:""},this.errors={},this.handleSave=async()=>{var t,r,n,o;if(!this.isSaving&&this.validate()){this.isSaving=!0;try{const i=await Mi(this.userContextValue.identifier,{address:{...(t=this.userContextValue.user)==null?void 0:t.address,locality:this.formData.location},zoneinfo:this.formData.zoneInfo});this.locationInfo={location:((r=i.address)==null?void 0:r.locality)??"",zoneInfo:i.zoneinfo??""},this.isEditing=!1}catch(i){console.error("Failed to update location info",i);let s="Failed to update location information. Please try again.";if(i instanceof Error&&"status"in i){const d=i;s=((o=(n=d.data)==null?void 0:n.error)==null?void 0:o.message)??d.message??s}else i instanceof Error&&(s=i.message);hl(s)}finally{this.isSaving=!1}}}}createRenderRoot(){return this}handleEdit(){this.isSaving||(this.formData={...this.locationInfo},this.errors={},this.isEditing=!0)}handleCancel(){this.isSaving||(this.isEditing=!1,this.errors={})}updateField(t,r){this.formData={...this.formData,[t]:r}}validate(){const t={};return this.errors=t,Object.keys(t).length===0}renderField(t,r){return this.layout===rt.ROW?l`
2941
2941
  <div class="pont-flex pont-w-full pont-account-settings-info-card-rows">
2942
2942
  <pont-typography-p
2943
2943
  ><div
@@ -3041,16 +3041,16 @@
3041
3041
  <pont-card-content>
3042
3042
  ${this.isEditing?l`
3043
3043
  <div
3044
- class=${this.layout===et.ROW?"pont-grid pont-account-settings-row-layout pont-account-settings-form-body":"pont-account-settings-column-layout pont-account-settings-form-body"}
3044
+ class=${this.layout===rt.ROW?"pont-grid pont-account-settings-row-layout pont-account-settings-form-body":"pont-account-settings-column-layout pont-account-settings-form-body"}
3045
3045
  >
3046
3046
  ${t.map(o=>this.renderField(o.label,o.key))}
3047
3047
  </div>
3048
3048
  `:l`
3049
3049
  <div
3050
- class=${this.layout===et.ROW?"pont-grid pont-account-settings-row-layout pont-account-settings-form-body":"pont-account-settings-column-layout pont-account-settings-form-body"}
3050
+ class=${this.layout===rt.ROW?"pont-grid pont-account-settings-row-layout pont-account-settings-form-body":"pont-account-settings-column-layout pont-account-settings-form-body"}
3051
3051
  >
3052
3052
  <div
3053
- class=${this.layout===et.ROW?"pont-flex pont-w-full pont-account-settings-info-card-rows":"pont-account-settings-info-card-rows"}
3053
+ class=${this.layout===rt.ROW?"pont-flex pont-w-full pont-account-settings-info-card-rows":"pont-account-settings-info-card-rows"}
3054
3054
  >
3055
3055
  <pont-typography-p
3056
3056
  ><div
@@ -3069,7 +3069,7 @@
3069
3069
  </div>
3070
3070
 
3071
3071
  <div
3072
- class=${this.layout===et.ROW?"pont-flex pont-w-full pont-account-settings-info-card-rows":"pont-account-settings-info-card-rows"}
3072
+ class=${this.layout===rt.ROW?"pont-flex pont-w-full pont-account-settings-info-card-rows":"pont-account-settings-info-card-rows"}
3073
3073
  >
3074
3074
  <pont-typography-p
3075
3075
  ><div
@@ -3094,7 +3094,7 @@
3094
3094
  ${this.isEditing?this.renderFooter():null}
3095
3095
  </div>
3096
3096
  </pont-card>
3097
- `}};Ie([a({type:Object})],exports.PontLocationInfo.prototype,"locationInfo",2);Ie([a({type:Boolean})],exports.PontLocationInfo.prototype,"showIcons",2);Ie([a({type:String})],exports.PontLocationInfo.prototype,"layout",2);Ie([a({type:Object})],exports.PontLocationInfo.prototype,"content",2);Ie([ct({context:In,subscribe:!0})],exports.PontLocationInfo.prototype,"userContextValue",2);Ie([g()],exports.PontLocationInfo.prototype,"isEditing",2);Ie([g()],exports.PontLocationInfo.prototype,"isSaving",2);Ie([g()],exports.PontLocationInfo.prototype,"formData",2);Ie([g()],exports.PontLocationInfo.prototype,"errors",2);exports.PontLocationInfo=Ie([p("pont-location-info")],exports.PontLocationInfo);var UP=Object.defineProperty,jP=Object.getOwnPropertyDescriptor,Ae=(e,t,r,n)=>{for(var o=n>1?void 0:n?jP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&UP(t,r,o),o};exports.PontPersonalInfo=class extends f{constructor(){super(...arguments),this.showIcons=!0,this.layout=et.ROW,this.content=null,this.isEditing=!1,this.isSaving=!1,this.formData=this.personal,this.errors={},this.handleSave=async()=>{var t,r;if(!this.isSaving&&this.validate()){this.isSaving=!0;try{const n=await Mi(this.userContextValue.identifier,{username:this.formData.username,given_name:this.formData.first,middle_name:this.formData.middle,family_name:this.formData.last,nickname:this.formData.nickname,gender:this.formData.gender,profile:this.formData.bio});this.personal={username:n.username??"",first:n.given_name??"",middle:n.middle_name??"",last:n.family_name??"",nickname:n.nickname??"",gender:n.gender??"",bio:n.profile??""},this.isEditing=!1}catch(n){console.error("Failed to update personal info",n);let o="Failed to update personal information. Please try again.";if(n instanceof Error&&"status"in n){const i=n;o=((r=(t=i.data)==null?void 0:t.error)==null?void 0:r.message)??i.message??o}else n instanceof Error&&(o=n.message);hl(o)}finally{this.isSaving=!1}}}}handleEdit(){this.isSaving||(this.formData={...this.personal},this.errors={},this.isEditing=!0)}handleCancel(){this.isEditing=!1,this.errors={}}updateField(t,r){this.formData={...this.formData,[t]:r}}validate(){const t={};return this.errors=t,Object.keys(t).length===0}createRenderRoot(){return this}renderControl(t){return t==="gender"?l`
3097
+ `}};Ie([a({type:Object})],exports.PontLocationInfo.prototype,"locationInfo",2);Ie([a({type:Boolean})],exports.PontLocationInfo.prototype,"showIcons",2);Ie([a({type:String})],exports.PontLocationInfo.prototype,"layout",2);Ie([a({type:Object})],exports.PontLocationInfo.prototype,"content",2);Ie([pt({context:In,subscribe:!0})],exports.PontLocationInfo.prototype,"userContextValue",2);Ie([g()],exports.PontLocationInfo.prototype,"isEditing",2);Ie([g()],exports.PontLocationInfo.prototype,"isSaving",2);Ie([g()],exports.PontLocationInfo.prototype,"formData",2);Ie([g()],exports.PontLocationInfo.prototype,"errors",2);exports.PontLocationInfo=Ie([p("pont-location-info")],exports.PontLocationInfo);var UP=Object.defineProperty,jP=Object.getOwnPropertyDescriptor,Ae=(e,t,r,n)=>{for(var o=n>1?void 0:n?jP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&UP(t,r,o),o};exports.PontPersonalInfo=class extends f{constructor(){super(...arguments),this.showIcons=!0,this.layout=rt.ROW,this.content=null,this.isEditing=!1,this.isSaving=!1,this.formData=this.personal,this.errors={},this.handleSave=async()=>{var t,r;if(!this.isSaving&&this.validate()){this.isSaving=!0;try{const n=await Mi(this.userContextValue.identifier,{username:this.formData.username,given_name:this.formData.first,middle_name:this.formData.middle,family_name:this.formData.last,nickname:this.formData.nickname,gender:this.formData.gender,profile:this.formData.bio});this.personal={username:n.username??"",first:n.given_name??"",middle:n.middle_name??"",last:n.family_name??"",nickname:n.nickname??"",gender:n.gender??"",bio:n.profile??""},this.isEditing=!1}catch(n){console.error("Failed to update personal info",n);let o="Failed to update personal information. Please try again.";if(n instanceof Error&&"status"in n){const i=n;o=((r=(t=i.data)==null?void 0:t.error)==null?void 0:r.message)??i.message??o}else n instanceof Error&&(o=n.message);hl(o)}finally{this.isSaving=!1}}}}handleEdit(){this.isSaving||(this.formData={...this.personal},this.errors={},this.isEditing=!0)}handleCancel(){this.isEditing=!1,this.errors={}}updateField(t,r){this.formData={...this.formData,[t]:r}}validate(){const t={};return this.errors=t,Object.keys(t).length===0}createRenderRoot(){return this}renderControl(t){return t==="gender"?l`
3098
3098
  <pont-select
3099
3099
  .value=${this.formData.gender}
3100
3100
  ?disabled=${this.isSaving}
@@ -3119,7 +3119,7 @@
3119
3119
  ?disabled=${this.isSaving}
3120
3120
  @input=${r=>this.updateField(t,r.target.value)}
3121
3121
  ></pont-input>
3122
- `}renderField(t,r,n=!1){return this.layout===et.ROW?l`
3122
+ `}renderField(t,r,n=!1){return this.layout===rt.ROW?l`
3123
3123
  <div class="pont-flex pont-w-full pont-account-settings-info-card-rows">
3124
3124
  <pont-typography-p>
3125
3125
  <div
@@ -3207,17 +3207,17 @@
3207
3207
  <pont-card-content>
3208
3208
  ${this.isEditing?l`
3209
3209
  <div
3210
- class=${this.layout===et.ROW?"pont-grid pont-account-settings-row-layout pont-account-settings-form-body":"pont-account-settings-column-layout pont-account-settings-form-body"}
3210
+ class=${this.layout===rt.ROW?"pont-grid pont-account-settings-row-layout pont-account-settings-form-body":"pont-account-settings-column-layout pont-account-settings-form-body"}
3211
3211
  >
3212
3212
  ${t.map(o=>this.renderField(o.label,o.key))}
3213
3213
  </div>
3214
3214
  `:l`
3215
3215
  <div
3216
- class=${this.layout===et.ROW?"pont-grid pont-account-settings-row-layout pont-account-settings-form-body":"pont-account-settings-column-layout pont-account-settings-form-body"}
3216
+ class=${this.layout===rt.ROW?"pont-grid pont-account-settings-row-layout pont-account-settings-form-body":"pont-account-settings-column-layout pont-account-settings-form-body"}
3217
3217
  >
3218
3218
  ${t.map(o=>l`
3219
3219
  <div
3220
- class=${this.layout===et.ROW?"pont-flex pont-w-full pont-account-settings-info-card-rows":"pont-account-settings-info-card-rows"}
3220
+ class=${this.layout===rt.ROW?"pont-flex pont-w-full pont-account-settings-info-card-rows":"pont-account-settings-info-card-rows"}
3221
3221
  >
3222
3222
  <pont-typography-p>
3223
3223
  <div
@@ -3243,7 +3243,7 @@
3243
3243
  ${this.isEditing?this.renderFooter():null}
3244
3244
  </div>
3245
3245
  </pont-card>
3246
- `}};Ae([a({type:Object})],exports.PontPersonalInfo.prototype,"personal",2);Ae([a({type:Boolean})],exports.PontPersonalInfo.prototype,"showIcons",2);Ae([a({type:String})],exports.PontPersonalInfo.prototype,"layout",2);Ae([a({type:Object})],exports.PontPersonalInfo.prototype,"content",2);Ae([ct({context:In,subscribe:!0})],exports.PontPersonalInfo.prototype,"userContextValue",2);Ae([g()],exports.PontPersonalInfo.prototype,"isEditing",2);Ae([g()],exports.PontPersonalInfo.prototype,"isSaving",2);Ae([g()],exports.PontPersonalInfo.prototype,"formData",2);Ae([g()],exports.PontPersonalInfo.prototype,"errors",2);exports.PontPersonalInfo=Ae([p("pont-personal-info")],exports.PontPersonalInfo);var qP=Object.defineProperty,zP=Object.getOwnPropertyDescriptor,Te=(e,t,r,n)=>{for(var o=n>1?void 0:n?zP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&qP(t,r,o),o};exports.PontUrlsInfo=class extends f{constructor(){super(...arguments),this.showIcons=!0,this.layout=et.ROW,this.content=null,this.isEditing=!1,this.isSaving=!1,this.formData={website:""},this.errors={},this.handleSave=async()=>{var t,r;if(!this.isSaving&&this.validate()){this.isSaving=!0;try{const n=await Mi(this.userContextValue.identifier,{website:this.formData.website});this.URLsInfo={website:n.website??""},this.isEditing=!1}catch(n){console.error("Failed to update URLs info",n);let o="Failed to update website. Please try again.";if(n instanceof Error&&"status"in n){const i=n;o=((r=(t=i.data)==null?void 0:t.error)==null?void 0:r.message)??i.message??o}else n instanceof Error&&(o=n.message);hl(o)}finally{this.isSaving=!1}}}}createRenderRoot(){return this}handleEdit(){this.isSaving||(this.formData={...this.URLsInfo},this.errors={},this.isEditing=!0)}handleCancel(){this.isSaving||(this.isEditing=!1,this.errors={})}updateField(t,r){this.formData={...this.formData,[t]:r}}validate(){const t={};return this.errors=t,Object.keys(t).length===0}renderField(t,r,n=!1){return this.layout===et.ROW?l`
3246
+ `}};Ae([a({type:Object})],exports.PontPersonalInfo.prototype,"personal",2);Ae([a({type:Boolean})],exports.PontPersonalInfo.prototype,"showIcons",2);Ae([a({type:String})],exports.PontPersonalInfo.prototype,"layout",2);Ae([a({type:Object})],exports.PontPersonalInfo.prototype,"content",2);Ae([pt({context:In,subscribe:!0})],exports.PontPersonalInfo.prototype,"userContextValue",2);Ae([g()],exports.PontPersonalInfo.prototype,"isEditing",2);Ae([g()],exports.PontPersonalInfo.prototype,"isSaving",2);Ae([g()],exports.PontPersonalInfo.prototype,"formData",2);Ae([g()],exports.PontPersonalInfo.prototype,"errors",2);exports.PontPersonalInfo=Ae([p("pont-personal-info")],exports.PontPersonalInfo);var qP=Object.defineProperty,zP=Object.getOwnPropertyDescriptor,Te=(e,t,r,n)=>{for(var o=n>1?void 0:n?zP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&qP(t,r,o),o};exports.PontUrlsInfo=class extends f{constructor(){super(...arguments),this.showIcons=!0,this.layout=rt.ROW,this.content=null,this.isEditing=!1,this.isSaving=!1,this.formData={website:""},this.errors={},this.handleSave=async()=>{var t,r;if(!this.isSaving&&this.validate()){this.isSaving=!0;try{const n=await Mi(this.userContextValue.identifier,{website:this.formData.website});this.URLsInfo={website:n.website??""},this.isEditing=!1}catch(n){console.error("Failed to update URLs info",n);let o="Failed to update website. Please try again.";if(n instanceof Error&&"status"in n){const i=n;o=((r=(t=i.data)==null?void 0:t.error)==null?void 0:r.message)??i.message??o}else n instanceof Error&&(o=n.message);hl(o)}finally{this.isSaving=!1}}}}createRenderRoot(){return this}handleEdit(){this.isSaving||(this.formData={...this.URLsInfo},this.errors={},this.isEditing=!0)}handleCancel(){this.isSaving||(this.isEditing=!1,this.errors={})}updateField(t,r){this.formData={...this.formData,[t]:r}}validate(){const t={};return this.errors=t,Object.keys(t).length===0}renderField(t,r,n=!1){return this.layout===rt.ROW?l`
3247
3247
  <div class="pont-flex pont-w-full pont-account-settings-info-card-rows">
3248
3248
  <pont-typography-p
3249
3249
  ><div
@@ -3347,16 +3347,16 @@
3347
3347
  <pont-card-content>
3348
3348
  ${this.isEditing?l`
3349
3349
  <div
3350
- class=${this.layout===et.ROW?"pont-grid pont-account-settings-row-layout pont-account-settings-form-body":"pont-account-settings-column-layout pont-account-settings-form-body"}
3350
+ class=${this.layout===rt.ROW?"pont-grid pont-account-settings-row-layout pont-account-settings-form-body":"pont-account-settings-column-layout pont-account-settings-form-body"}
3351
3351
  >
3352
3352
  ${t.map(o=>this.renderField(o.label,o.key))}
3353
3353
  </div>
3354
3354
  `:l`
3355
3355
  <div
3356
- class=${this.layout===et.ROW?"pont-grid pont-account-settings-row-layout pont-account-settings-form-body":"pont-account-settings-column-layout pont-account-settings-form-body"}
3356
+ class=${this.layout===rt.ROW?"pont-grid pont-account-settings-row-layout pont-account-settings-form-body":"pont-account-settings-column-layout pont-account-settings-form-body"}
3357
3357
  >
3358
3358
  <div
3359
- class=${this.layout===et.ROW?"pont-flex pont-w-full pont-account-settings-info-card-rows":"pont-account-settings-info-card-rows"}
3359
+ class=${this.layout===rt.ROW?"pont-flex pont-w-full pont-account-settings-info-card-rows":"pont-account-settings-info-card-rows"}
3360
3360
  >
3361
3361
  <pont-typography-p
3362
3362
  ><div
@@ -3392,7 +3392,7 @@
3392
3392
  ${this.isEditing?this.renderFooter():null}
3393
3393
  </div>
3394
3394
  </pont-card>
3395
- `}};Te([a({type:Object})],exports.PontUrlsInfo.prototype,"URLsInfo",2);Te([a({type:Boolean})],exports.PontUrlsInfo.prototype,"showIcons",2);Te([a({type:String})],exports.PontUrlsInfo.prototype,"layout",2);Te([a({type:Object})],exports.PontUrlsInfo.prototype,"content",2);Te([ct({context:In,subscribe:!0})],exports.PontUrlsInfo.prototype,"userContextValue",2);Te([g()],exports.PontUrlsInfo.prototype,"isEditing",2);Te([g()],exports.PontUrlsInfo.prototype,"isSaving",2);Te([g()],exports.PontUrlsInfo.prototype,"formData",2);Te([g()],exports.PontUrlsInfo.prototype,"errors",2);exports.PontUrlsInfo=Te([p("pont-urls-info")],exports.PontUrlsInfo);var VP=Object.defineProperty,HP=Object.getOwnPropertyDescriptor,Ot=(e,t,r,n)=>{for(var o=n>1?void 0:n?HP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&VP(t,r,o),o};exports.Profile=class extends f{constructor(){super(...arguments),this.showAvatarMenu=!1,this.orientation=Rr.HORIZONTAL,this.sidebarDisplayType=Ve.REGULAR,this.mode=sr==null?void 0:sr.PAGE,this.widgetsLayout=et.ROW,this.content=null}createRenderRoot(){return this}render(){var t,r,n,o;return l`
3395
+ `}};Te([a({type:Object})],exports.PontUrlsInfo.prototype,"URLsInfo",2);Te([a({type:Boolean})],exports.PontUrlsInfo.prototype,"showIcons",2);Te([a({type:String})],exports.PontUrlsInfo.prototype,"layout",2);Te([a({type:Object})],exports.PontUrlsInfo.prototype,"content",2);Te([pt({context:In,subscribe:!0})],exports.PontUrlsInfo.prototype,"userContextValue",2);Te([g()],exports.PontUrlsInfo.prototype,"isEditing",2);Te([g()],exports.PontUrlsInfo.prototype,"isSaving",2);Te([g()],exports.PontUrlsInfo.prototype,"formData",2);Te([g()],exports.PontUrlsInfo.prototype,"errors",2);exports.PontUrlsInfo=Te([p("pont-urls-info")],exports.PontUrlsInfo);var VP=Object.defineProperty,HP=Object.getOwnPropertyDescriptor,Ot=(e,t,r,n)=>{for(var o=n>1?void 0:n?HP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&VP(t,r,o),o};exports.Profile=class extends f{constructor(){super(...arguments),this.showAvatarMenu=!1,this.orientation=Rr.HORIZONTAL,this.sidebarDisplayType=Ve.REGULAR,this.mode=sr==null?void 0:sr.PAGE,this.widgetsLayout=rt.ROW,this.content=null}createRenderRoot(){return this}render(){var t,r,n,o;return l`
3396
3396
  <div class="pont-account-settings-section-stack">
3397
3397
  <pont-account-info
3398
3398
  .content=${(t=this.content)==null?void 0:t.account}
@@ -3499,7 +3499,7 @@
3499
3499
  </div>
3500
3500
 
3501
3501
  ${this.isBurger?this.renderMobileDrawer():null}
3502
- `}};Zr([a({type:String})],gr.prototype,"orientation",2);Zr([a({type:String})],gr.prototype,"displayType",2);Zr([a({type:String})],gr.prototype,"mode",2);Zr([a({type:Object})],gr.prototype,"config",2);Zr([a({type:String})],gr.prototype,"activeTab",2);Zr([g()],gr.prototype,"isMenuOpen",2);gr=Zr([p("pont-profile-sidebar")],gr);function Fh(){document.dispatchEvent(new CustomEvent("open-user-profile",{bubbles:!0,composed:!0}))}function ml(){document.dispatchEvent(new CustomEvent("close-user-profile",{bubbles:!0,composed:!0}))}function kh(){document.dispatchEvent(new CustomEvent("open-member-management",{bubbles:!0,composed:!0}))}function Nh(){document.dispatchEvent(new CustomEvent("close-member-management",{bubbles:!0,composed:!0}))}function Mh(e){document.dispatchEvent(new CustomEvent("pont:set-locales",{detail:{locales:e},bubbles:!0,composed:!0}))}typeof window<"u"&&(window.__pontCoreSdk||(window.__pontCoreSdk={}),window.__pontCoreSdk.openAccountSettingsModal=Fh,window.__pontCoreSdk.closeAccountSettingsModal=ml,window.__pontCoreSdk.openMemberManagementModal=kh,window.__pontCoreSdk.closeMemberManagementModal=Nh,window.__pontCoreSdk.setLocales=Mh);var ZP=Object.defineProperty,qt=(e,t,r,n)=>{for(var o=void 0,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(t,r,o)||o);return o&&ZP(t,r,o),o};class Rt extends f{constructor(){super(),this.showAvatarMenu=!1,this.orientation=Rr.HORIZONTAL,this.mobileDisplay=Ve.REGULAR,this.mode=sr.PAGE,this.widgetsLayout=et.ROW,this.content=null,this.isOpen=!1,this.currentBreakpoint="md",this.activeTab=me.PROFILE,this._userLoaded=!1,this._userLoading=!1,this.userContextValue={user:null,identifier:null},this.__initialized=!1,this.account={email:"",phone:"",avatar:""},this.personal={username:"",first:"",middle:"",last:"",nickname:"",gender:"",bio:""},this.location={location:"",zoneInfo:""},this.urls={website:""},this._handleResize=()=>{this._updateBreakpoint()},this._handleCloseProfile=()=>{this.isModal&&(this.isOpen=!1)},this._handleOpenProfile=()=>{this.isModal&&(this.isOpen=!0)},this._toggleAvatarMenu=t=>{t.stopPropagation(),this.showAvatarMenu=!this.showAvatarMenu},this._handleAvatarChange=()=>{const t=document.createElement("input");t.type="file",t.accept="image/*",t.onchange=r=>{var i;const n=(i=r.target.files)==null?void 0:i[0];if(!n)return;const o=new FileReader;o.onload=()=>{this.account.avatar=o.result,this.requestUpdate()},o.readAsDataURL(n)},t.click()},this._handleAvatarRemove=()=>{this.account.avatar="https://via.placeholder.com/80",this.showAvatarMenu=!1},this._handleClickOutside=t=>{if(!this.showAvatarMenu)return;const r=t.target,n=this.querySelector("pont-account-info"),o=this.querySelector("pont-card");n!=null&&n.contains(r)||o!=null&&o.contains(r)||(this.showAvatarMenu=!1)},this._handleOpenProfile=this._handleOpenProfile.bind(this),this._handleCloseProfile=this._handleCloseProfile.bind(this),window.addEventListener("open-user-profile",this._handleOpenProfile),window.addEventListener("close-user-profile",this._handleCloseProfile)}get isModal(){return this.mode===sr.MODAL}get isVerticalOrientation(){return this.orientation===Rr.VERTICAL}get isHorizontalOrientation(){return this.orientation===Rr.HORIZONTAL}get isBurger(){return this.sidebarDisplayType===Ve.BURGER}get sidebarDisplayType(){return this.isVerticalOrientation||this.currentBreakpoint==="md"?Ve.REGULAR:Ve.BURGER}get layoutKey(){return`${this.orientation}|${this.mode}|${this.widgetsLayout}|${this.mobileDisplay}`}get containerClasses(){const t=this.isBurger||this.isVerticalOrientation;return Vt(Q$,this.isModal?J$:Z$,this.isModal?Y$:W$,t?"!pont-flex-col":"!pont-flex-row")}get contentClasses(){return Vt("pont-flex-grow",this.isModal?`pont-account-settings-modal-content ${this.isHorizontalOrientation?"pont-account-settings-modal-content-horizontal":""}`:"pont-account-settings-content-md-max-height-full",this.isVerticalOrientation?"pont-account-settings-vertical-margin":"")}connectedCallback(){super.connectedCallback(),this._updateBreakpoint(),window.addEventListener("resize",this._handleResize),document.addEventListener("remove-avatar",this._handleAvatarRemove),document.addEventListener("click",this._handleClickOutside),document.addEventListener("close-user-profile",this._handleCloseProfile),document.addEventListener("open-user-profile",this._handleOpenProfile),document.addEventListener("change-avatar",this._handleAvatarChange)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this._handleResize),document.removeEventListener("remove-avatar",this._handleAvatarRemove),document.removeEventListener("click",this._handleClickOutside),document.removeEventListener("close-user-profile",this._handleCloseProfile),document.removeEventListener("open-user-profile",this._handleOpenProfile),document.removeEventListener("change-avatar",this._handleAvatarChange)}updated(t){t.has("mode")&&(this.isModal?this.isOpen=!1:this.isOpen=!0),t.has("userContextValue")&&this.userContextValue.user&&this.tryRemoveFallback(),t.has("auth")&&this.loadUser()}firstUpdated(){this.__initialized||(this.__initialized=!0,this.style.width="100%",this.style.display="flex",this.style.justifyContent="center",this.style.flexDirection="column")}fillProfileData(t){var r;this.account={...this.account,avatar:t.picture||"",email:t.email||"",phone:t.phone||""},this.personal={...this.personal,bio:t.profile||"",first:t.given_name||"",last:t.family_name||"",username:t.username||"",gender:t.gender||"",middle:t.middle_name||"",nickname:t.nickname||""},this.location={...this.location,location:((r=t.address)==null?void 0:r.locality)||"",zoneInfo:t.zoneinfo||""},this.urls={...this.urls,website:t.website||""}}async loadUser(){var t,r;if(!(!((t=this.auth)!=null&&t.resolved)||!this.auth.isAuthenticated)&&!(this._userLoaded||this._userLoading)&&(this.userContextValue.identifier=((r=tt.getAuthenticatedUser())==null?void 0:r.email)??"",!!this.userContextValue.identifier)){this._userLoading=!0;try{this.userContextValue.user=await OP(this.userContextValue.identifier),this.tryRemoveFallback(),this.fillProfileData(this.userContextValue.user),this._userLoaded=!0}catch(n){console.error("[pont-account-settings] Failed loading user:",n)}finally{this._userLoading=!1}}}tryRemoveFallback(){requestAnimationFrame(()=>{const r=this.querySelector('[part="fallback"]');r==null||r.remove()})}_updateBreakpoint(){const t=window.innerWidth;this.currentBreakpoint=t<Ec.xs?"xs":t<Ec.sm?"sm":"md"}renderWatermark(){return this.isVerticalOrientation?l`
3502
+ `}};Zr([a({type:String})],gr.prototype,"orientation",2);Zr([a({type:String})],gr.prototype,"displayType",2);Zr([a({type:String})],gr.prototype,"mode",2);Zr([a({type:Object})],gr.prototype,"config",2);Zr([a({type:String})],gr.prototype,"activeTab",2);Zr([g()],gr.prototype,"isMenuOpen",2);gr=Zr([p("pont-profile-sidebar")],gr);function Fh(){document.dispatchEvent(new CustomEvent("open-user-profile",{bubbles:!0,composed:!0}))}function ml(){document.dispatchEvent(new CustomEvent("close-user-profile",{bubbles:!0,composed:!0}))}function kh(){document.dispatchEvent(new CustomEvent("open-member-management",{bubbles:!0,composed:!0}))}function Nh(){document.dispatchEvent(new CustomEvent("close-member-management",{bubbles:!0,composed:!0}))}function Mh(e){document.dispatchEvent(new CustomEvent("pont:set-locales",{detail:{locales:e},bubbles:!0,composed:!0}))}typeof window<"u"&&(window.__pontCoreSdk||(window.__pontCoreSdk={}),window.__pontCoreSdk.openAccountSettingsModal=Fh,window.__pontCoreSdk.closeAccountSettingsModal=ml,window.__pontCoreSdk.openMemberManagementModal=kh,window.__pontCoreSdk.closeMemberManagementModal=Nh,window.__pontCoreSdk.setLocales=Mh);var ZP=Object.defineProperty,qt=(e,t,r,n)=>{for(var o=void 0,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(t,r,o)||o);return o&&ZP(t,r,o),o};class Rt extends f{constructor(){super(),this.showAvatarMenu=!1,this.orientation=Rr.HORIZONTAL,this.mobileDisplay=Ve.REGULAR,this.mode=sr.PAGE,this.widgetsLayout=rt.ROW,this.content=null,this.isOpen=!1,this.currentBreakpoint="md",this.activeTab=me.PROFILE,this._userLoaded=!1,this._userLoading=!1,this.userContextValue={user:null,identifier:null},this.__initialized=!1,this.account={email:"",phone:"",avatar:""},this.personal={username:"",first:"",middle:"",last:"",nickname:"",gender:"",bio:""},this.location={location:"",zoneInfo:""},this.urls={website:""},this._handleResize=()=>{this._updateBreakpoint()},this._handleCloseProfile=()=>{this.isModal&&(this.isOpen=!1)},this._handleOpenProfile=()=>{this.isModal&&(this.isOpen=!0)},this._toggleAvatarMenu=t=>{t.stopPropagation(),this.showAvatarMenu=!this.showAvatarMenu},this._handleAvatarChange=()=>{const t=document.createElement("input");t.type="file",t.accept="image/*",t.onchange=r=>{var i;const n=(i=r.target.files)==null?void 0:i[0];if(!n)return;const o=new FileReader;o.onload=()=>{this.account.avatar=o.result,this.requestUpdate()},o.readAsDataURL(n)},t.click()},this._handleAvatarRemove=()=>{this.account.avatar="https://via.placeholder.com/80",this.showAvatarMenu=!1},this._handleClickOutside=t=>{if(!this.showAvatarMenu)return;const r=t.target,n=this.querySelector("pont-account-info"),o=this.querySelector("pont-card");n!=null&&n.contains(r)||o!=null&&o.contains(r)||(this.showAvatarMenu=!1)},this._handleOpenProfile=this._handleOpenProfile.bind(this),this._handleCloseProfile=this._handleCloseProfile.bind(this),window.addEventListener("open-user-profile",this._handleOpenProfile),window.addEventListener("close-user-profile",this._handleCloseProfile)}get isModal(){return this.mode===sr.MODAL}get isVerticalOrientation(){return this.orientation===Rr.VERTICAL}get isHorizontalOrientation(){return this.orientation===Rr.HORIZONTAL}get isBurger(){return this.sidebarDisplayType===Ve.BURGER}get sidebarDisplayType(){return this.isVerticalOrientation||this.currentBreakpoint==="md"?Ve.REGULAR:Ve.BURGER}get layoutKey(){return`${this.orientation}|${this.mode}|${this.widgetsLayout}|${this.mobileDisplay}`}get containerClasses(){const t=this.isBurger||this.isVerticalOrientation;return Vt(Pw,this.isModal?Sw:Cw,this.isModal?$w:ww,t?"!pont-flex-col":"!pont-flex-row")}get contentClasses(){return Vt("pont-flex-grow",this.isModal?`pont-account-settings-modal-content ${this.isHorizontalOrientation?"pont-account-settings-modal-content-horizontal":""}`:"pont-account-settings-content-md-max-height-full",this.isVerticalOrientation?"pont-account-settings-vertical-margin":"")}connectedCallback(){super.connectedCallback(),this._updateBreakpoint(),window.addEventListener("resize",this._handleResize),document.addEventListener("remove-avatar",this._handleAvatarRemove),document.addEventListener("click",this._handleClickOutside),document.addEventListener("close-user-profile",this._handleCloseProfile),document.addEventListener("open-user-profile",this._handleOpenProfile),document.addEventListener("change-avatar",this._handleAvatarChange)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this._handleResize),document.removeEventListener("remove-avatar",this._handleAvatarRemove),document.removeEventListener("click",this._handleClickOutside),document.removeEventListener("close-user-profile",this._handleCloseProfile),document.removeEventListener("open-user-profile",this._handleOpenProfile),document.removeEventListener("change-avatar",this._handleAvatarChange)}updated(t){t.has("mode")&&(this.isModal?this.isOpen=!1:this.isOpen=!0),t.has("userContextValue")&&this.userContextValue.user&&this.tryRemoveFallback(),t.has("auth")&&this.loadUser()}firstUpdated(){this.__initialized||(this.__initialized=!0,this.style.width="100%",this.style.display="flex",this.style.justifyContent="center",this.style.flexDirection="column")}fillProfileData(t){var r;this.account={...this.account,avatar:t.picture||"",email:t.email||"",phone:t.phone||""},this.personal={...this.personal,bio:t.profile||"",first:t.given_name||"",last:t.family_name||"",username:t.username||"",gender:t.gender||"",middle:t.middle_name||"",nickname:t.nickname||""},this.location={...this.location,location:((r=t.address)==null?void 0:r.locality)||"",zoneInfo:t.zoneinfo||""},this.urls={...this.urls,website:t.website||""}}async loadUser(){var t,r;if(!(!((t=this.auth)!=null&&t.resolved)||!this.auth.isAuthenticated)&&!(this._userLoaded||this._userLoading)&&(this.userContextValue.identifier=((r=tt.getAuthenticatedUser())==null?void 0:r.email)??"",!!this.userContextValue.identifier)){this._userLoading=!0;try{this.userContextValue.user=await OP(this.userContextValue.identifier),this.tryRemoveFallback(),this.fillProfileData(this.userContextValue.user),this._userLoaded=!0}catch(n){console.error("[pont-account-settings] Failed loading user:",n)}finally{this._userLoading=!1}}}tryRemoveFallback(){requestAnimationFrame(()=>{const r=this.querySelector('[part="fallback"]');r==null||r.remove()})}_updateBreakpoint(){const t=window.innerWidth;this.currentBreakpoint=t<hc.xs?"xs":t<hc.sm?"sm":"md"}renderWatermark(){return this.isVerticalOrientation?l`
3503
3503
  <div class="pont-account-settings-watermark-container">
3504
3504
  <pont-watermark custom-id="pont-watermark"></pont-watermark>
3505
3505
  </div>
@@ -3566,7 +3566,7 @@
3566
3566
  ${this.renderMainContent()}
3567
3567
  </div>
3568
3568
  </pont-modal>
3569
- `:this.renderMainContent():h:l``}createRenderRoot(){return this}}qt([a({type:Boolean})],Rt.prototype,"showAvatarMenu");qt([a({type:String})],Rt.prototype,"orientation");qt([a({type:String})],Rt.prototype,"mobileDisplay");qt([a({type:String,reflect:!0})],Rt.prototype,"mode");qt([a({type:String})],Rt.prototype,"widgetsLayout");qt([a({type:Object})],Rt.prototype,"content");qt([g()],Rt.prototype,"isOpen");qt([g()],Rt.prototype,"currentBreakpoint");qt([g()],Rt.prototype,"activeTab");qt([ct({context:Qr,subscribe:!0}),a({attribute:!1})],Rt.prototype,"auth");qt([g()],Rt.prototype,"_userLoaded");qt([g()],Rt.prototype,"_userLoading");qt([Wt({context:In}),g()],Rt.prototype,"userContextValue");customElements.define("pont-account-settings",Rt);var JP=Object.defineProperty,XP=Object.getOwnPropertyDescriptor,Bh=(e,t,r,n)=>{for(var o=n>1?void 0:n?XP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&JP(t,r,o),o};exports.PontSecuritySettings=class extends f{constructor(){super(...arguments),this.loading=!1}render(){return this.loading?l`<div class="pont-account-settings-security-loading">
3569
+ `:this.renderMainContent():h:l``}createRenderRoot(){return this}}qt([a({type:Boolean})],Rt.prototype,"showAvatarMenu");qt([a({type:String})],Rt.prototype,"orientation");qt([a({type:String})],Rt.prototype,"mobileDisplay");qt([a({type:String,reflect:!0})],Rt.prototype,"mode");qt([a({type:String})],Rt.prototype,"widgetsLayout");qt([a({type:Object})],Rt.prototype,"content");qt([g()],Rt.prototype,"isOpen");qt([g()],Rt.prototype,"currentBreakpoint");qt([g()],Rt.prototype,"activeTab");qt([pt({context:Qr,subscribe:!0}),a({attribute:!1})],Rt.prototype,"auth");qt([g()],Rt.prototype,"_userLoaded");qt([g()],Rt.prototype,"_userLoading");qt([Wt({context:In}),g()],Rt.prototype,"userContextValue");customElements.define("pont-account-settings",Rt);var JP=Object.defineProperty,XP=Object.getOwnPropertyDescriptor,Bh=(e,t,r,n)=>{for(var o=n>1?void 0:n?XP(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&JP(t,r,o),o};exports.PontSecuritySettings=class extends f{constructor(){super(...arguments),this.loading=!1}render(){return this.loading?l`<div class="pont-account-settings-security-loading">
3570
3570
  Loading security settings...
3571
3571
  </div>`:l`
3572
3572
  <div class="pont-account-settings-security-panel">
@@ -3611,7 +3611,7 @@
3611
3611
  <pont-field-separator id="${this.rootId}" part="${exports.PontDivider.PARTS.root}">
3612
3612
  ${this.label??h}
3613
3613
  </pont-field-separator>
3614
- `}};exports.PontDivider.ROOT="divider";exports.PontDivider.TAG=`${ht}-${exports.PontDivider.ROOT}`;exports.PontDivider.PARTS={root:exports.PontDivider.ROOT};Bi([a({type:String})],exports.PontDivider.prototype,"seed",2);Bi([a({type:String,attribute:"custom-id"})],exports.PontDivider.prototype,"customId",2);Bi([a({type:String})],exports.PontDivider.prototype,"label",2);exports.PontDivider=Bi([p("pont-divider")],exports.PontDivider);var r1=Object.defineProperty,gl=(e,t,r,n)=>{for(var o=void 0,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(t,r,o)||o);return o&&r1(t,r,o),o};const $l=class $l extends f{constructor(){super(...arguments),this.totalPages=1,this.currentPage=1,this.hideGoTo=!1}createRenderRoot(){return this}get visiblePages(){if(this.totalPages<=0)return[];if(this.totalPages<=3)return Array.from({length:this.totalPages},(r,n)=>n+1);let t=Math.max(1,this.currentPage-1);return t+2>this.totalPages&&(t=this.totalPages-2),[t,t+1,t+2]}goTo(t){this.totalPages<=0||t===this.currentPage||t<1||t>this.totalPages||this.dispatchEvent(new CustomEvent("page-change",{detail:{page:t},bubbles:!0,composed:!0}))}render(){const t=this.totalPages,r=this.currentPage,n=t>0,o=!n||r<=1,i=!n||r>=t,s=n?this.visiblePages:[];return l`
3614
+ `}};exports.PontDivider.ROOT="divider";exports.PontDivider.TAG=`${et}-${exports.PontDivider.ROOT}`;exports.PontDivider.PARTS={root:exports.PontDivider.ROOT};Bi([a({type:String})],exports.PontDivider.prototype,"seed",2);Bi([a({type:String,attribute:"custom-id"})],exports.PontDivider.prototype,"customId",2);Bi([a({type:String})],exports.PontDivider.prototype,"label",2);exports.PontDivider=Bi([p("pont-divider")],exports.PontDivider);var r1=Object.defineProperty,gl=(e,t,r,n)=>{for(var o=void 0,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(t,r,o)||o);return o&&r1(t,r,o),o};const $l=class $l extends f{constructor(){super(...arguments),this.totalPages=1,this.currentPage=1,this.hideGoTo=!1}createRenderRoot(){return this}get visiblePages(){if(this.totalPages<=0)return[];if(this.totalPages<=3)return Array.from({length:this.totalPages},(r,n)=>n+1);let t=Math.max(1,this.currentPage-1);return t+2>this.totalPages&&(t=this.totalPages-2),[t,t+1,t+2]}goTo(t){this.totalPages<=0||t===this.currentPage||t<1||t>this.totalPages||this.dispatchEvent(new CustomEvent("page-change",{detail:{page:t},bubbles:!0,composed:!0}))}render(){const t=this.totalPages,r=this.currentPage,n=t>0,o=!n||r<=1,i=!n||r>=t,s=n?this.visiblePages:[];return l`
3615
3615
  <nav
3616
3616
  class="pont-flex pont-flex-wrap pont-items-center pont-justify-center pont-gap-1"
3617
3617
  aria-label="Pagination"
@@ -4584,10 +4584,10 @@
4584
4584
  `}};Ui([a({type:Boolean})],exports.PreviewComponent.prototype,"loading",2);Ui([a({type:Object})],exports.PreviewComponent.prototype,"renderSpec",2);Ui([a({attribute:!1})],exports.PreviewComponent.prototype,"branding",2);exports.PreviewComponent=Ui([p("pont-preview")],exports.PreviewComponent);var $1=Object.defineProperty,P1=Object.getOwnPropertyDescriptor,ji=(e,t,r,n)=>{for(var o=n>1?void 0:n?P1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&$1(t,r,o),o};exports.PontSignIn=class extends f{constructor(){super(...arguments),this.renderSpec=null,this.branding=Uo,this.locales="",this.__flowStarted=!1,this.__initialized=!1,this.__previousLocale=null}createRenderRoot(){return this}firstUpdated(){this.__initialized||(this.__initialized=!0,this.__previousLocale=this.locales,this.startAuthFlow())}updated(t){if(t.has("locales")){const r=this.locales;this.__previousLocale!==r&&(this.__previousLocale=r,this.__flowStarted=!1,this.startAuthFlow())}this.renderSpec&&this.tryRemoveFallback()}async startAuthFlow(){if(!this.__flowStarted){this.__flowStarted=!0,await xh(tt);try{await tt.startLoginflow("sys_signin-flow-passkey"),this.tryRemoveFallback()}catch(t){console.error("[pont-signin] Auth failed:",t),this.__flowStarted=!1}}}tryRemoveFallback(){requestAnimationFrame(()=>{const r=this.querySelector('[part="fallback"]');r==null||r.remove()})}render(){return this.renderSpec?l`<pont-layout
4585
4585
  .renderSpec=${this.renderSpec}
4586
4586
  .branding=${this.branding}
4587
- ></pont-layout>`:l``}};ji([ct({context:cl,subscribe:!0})],exports.PontSignIn.prototype,"renderSpec",2);ji([ct({context:On,subscribe:!0})],exports.PontSignIn.prototype,"branding",2);ji([ct({context:pl,subscribe:!0})],exports.PontSignIn.prototype,"locales",2);exports.PontSignIn=ji([p("pont-signin")],exports.PontSignIn);var C1=Object.defineProperty,S1=Object.getOwnPropertyDescriptor,qi=(e,t,r,n)=>{for(var o=n>1?void 0:n?S1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&C1(t,r,o),o};exports.PontSignUp=class extends f{constructor(){super(...arguments),this.renderSpec=null,this.branding=Uo,this.locales="",this.__flowStarted=!1,this.__initialized=!1,this.__previousLocale=null}createRenderRoot(){return this}firstUpdated(){this.__initialized||(this.__initialized=!0,this.__previousLocale=this.locales,this.startAuthFlow())}updated(t){if(t.has("locales")){const r=this.locales;this.__previousLocale!==r&&(this.__previousLocale=r,this.__flowStarted=!1,this.startAuthFlow())}t.has("renderSpec")&&this.renderSpec&&this.tryRemoveFallback()}async startAuthFlow(){if(!this.__flowStarted){this.__flowStarted=!0,await xh(tt);try{await tt.startLoginflow("sys_signup-flow"),this.tryRemoveFallback()}catch(t){console.error("[pont-signup] Auth failed:",t),this.__flowStarted=!1}}}tryRemoveFallback(){requestAnimationFrame(()=>{const r=this.querySelector('[part="fallback"]');r==null||r.remove()})}render(){return this.renderSpec?l`<pont-layout
4587
+ ></pont-layout>`:l``}};ji([pt({context:cl,subscribe:!0})],exports.PontSignIn.prototype,"renderSpec",2);ji([pt({context:On,subscribe:!0})],exports.PontSignIn.prototype,"branding",2);ji([pt({context:pl,subscribe:!0})],exports.PontSignIn.prototype,"locales",2);exports.PontSignIn=ji([p("pont-signin")],exports.PontSignIn);var C1=Object.defineProperty,S1=Object.getOwnPropertyDescriptor,qi=(e,t,r,n)=>{for(var o=n>1?void 0:n?S1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&C1(t,r,o),o};exports.PontSignUp=class extends f{constructor(){super(...arguments),this.renderSpec=null,this.branding=Uo,this.locales="",this.__flowStarted=!1,this.__initialized=!1,this.__previousLocale=null}createRenderRoot(){return this}firstUpdated(){this.__initialized||(this.__initialized=!0,this.__previousLocale=this.locales,this.startAuthFlow())}updated(t){if(t.has("locales")){const r=this.locales;this.__previousLocale!==r&&(this.__previousLocale=r,this.__flowStarted=!1,this.startAuthFlow())}t.has("renderSpec")&&this.renderSpec&&this.tryRemoveFallback()}async startAuthFlow(){if(!this.__flowStarted){this.__flowStarted=!0,await xh(tt);try{await tt.startLoginflow("sys_signup-flow"),this.tryRemoveFallback()}catch(t){console.error("[pont-signup] Auth failed:",t),this.__flowStarted=!1}}}tryRemoveFallback(){requestAnimationFrame(()=>{const r=this.querySelector('[part="fallback"]');r==null||r.remove()})}render(){return this.renderSpec?l`<pont-layout
4588
4588
  .renderSpec=${this.renderSpec}
4589
4589
  .branding=${this.branding}
4590
- ></pont-layout>`:l``}};qi([ct({context:cl,subscribe:!0})],exports.PontSignUp.prototype,"renderSpec",2);qi([ct({context:On,subscribe:!0})],exports.PontSignUp.prototype,"branding",2);qi([ct({context:pl,subscribe:!0})],exports.PontSignUp.prototype,"locales",2);exports.PontSignUp=qi([p("pont-signup")],exports.PontSignUp);var E1=Object.defineProperty,Le=(e,t,r,n)=>{for(var o=void 0,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(t,r,o)||o);return o&&E1(t,r,o),o};class zi extends f{constructor(){super(...arguments),this.isTrigger=!1,this.user={}}createRenderRoot(){return this}render(){const{name:t,email:r,avatar_url:n}=this.user||{};return l`
4590
+ ></pont-layout>`:l``}};qi([pt({context:cl,subscribe:!0})],exports.PontSignUp.prototype,"renderSpec",2);qi([pt({context:On,subscribe:!0})],exports.PontSignUp.prototype,"branding",2);qi([pt({context:pl,subscribe:!0})],exports.PontSignUp.prototype,"locales",2);exports.PontSignUp=qi([p("pont-signup")],exports.PontSignUp);var E1=Object.defineProperty,Le=(e,t,r,n)=>{for(var o=void 0,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=s(t,r,o)||o);return o&&E1(t,r,o),o};class zi extends f{constructor(){super(...arguments),this.isTrigger=!1,this.user={}}createRenderRoot(){return this}render(){const{name:t,email:r,avatar_url:n}=this.user||{};return l`
4591
4591
  <div
4592
4592
  class=${Vt("pont-flex pont-items-center pont-gap-2 pont-w-full",this.isTrigger?"pont-py-2":"")}
4593
4593
  >
@@ -4700,7 +4700,7 @@
4700
4700
  </pont-dropdown-menu-group>
4701
4701
  </pont-dropdown-menu-content>
4702
4702
  </pont-dropdown-menu>
4703
- `}_navigate(t){console.log("Navigate to:",t),window.location.href=t}_handleMenuItemClick(t,r){t.stopPropagation();try{if(r&&typeof r.onClick=="function"){r.onClick(t,r),this.dispatchEvent(new CustomEvent("menu-item-click",{detail:{item:r},bubbles:!0,composed:!0}));return}if(r&&r.href){this._navigate(r.href),this.dispatchEvent(new CustomEvent("menu-item-click",{detail:{item:r},bubbles:!0,composed:!0}));return}}catch(n){console.error("[pont-nav-user] menu item click handler failed",n)}}}Le([a({type:String})],Fe.prototype,"accountSettingsPath");Le([a({attribute:!1})],Fe.prototype,"menuItems");Le([ct({context:Qr,subscribe:!0}),a({attribute:!1})],Fe.prototype,"auth");Le([g()],Fe.prototype,"user");Le([g()],Fe.prototype,"signedIn");Le([g()],Fe.prototype,"isLoading");Le([g()],Fe.prototype,"_itemStates");Le([g()],Fe.prototype,"_subMenuOpen");customElements.define("pont-nav-user",Fe);var x1=Object.defineProperty,O1=Object.getOwnPropertyDescriptor,Uh=(e,t,r,n)=>{for(var o=n>1?void 0:n?O1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&x1(t,r,o),o};exports.PontHint=class extends f{constructor(){super(...arguments),this.content=""}createRenderRoot(){return this}render(){return l`<p class="pont-mt-2">${this.content}</p>`}};Uh([a({type:String})],exports.PontHint.prototype,"content",2);exports.PontHint=Uh([p("pont-hint")],exports.PontHint);var R1=Object.defineProperty,I1=Object.getOwnPropertyDescriptor,ke=(e,t,r,n)=>{for(var o=n>1?void 0:n?I1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&R1(t,r,o),o};const A1=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;exports.MultiEmailInput=class extends f{constructor(){super(...arguments),this.label="",this.value=[],this.placeholder="Enter email addresses",this.disabled=!1,this.maxEmails=50,this.className="",this.inputValue="",this.error=null}createRenderRoot(){return this}validateEmail(t){return A1.test(t.trim())}addEmails(t){const r=[],n=[];for(const o of t){const i=o.trim();i&&(this.validateEmail(i)?!this.value.includes(i)&&!r.includes(i)&&r.push(i):n.push(i))}if(r.length>0){const o=[...this.value,...r].slice(0,this.maxEmails);this.value=o,this.inputValue="",this.error=null,o.length>=this.maxEmails&&(this.error=`Maximum ${this.maxEmails} emails allowed`),this.notifyChange(o)}n.length>0&&(this.error=`Invalid email${n.length>1?"s":""}: ${n.join(", ")}`)}notifyChange(t){var r;(r=this.onChange)==null||r.call(this,t),this.dispatchEvent(new CustomEvent("emails-changed",{detail:{emails:t},bubbles:!0,composed:!0}))}handleKeyDown(t){if(this.error&&this.inputValue!==""&&(this.error=null),["Enter",",",";"," "].includes(t.key)){t.preventDefault(),this.inputValue.trim()&&this.addEmails([this.inputValue]);return}if(t.key==="Backspace"&&!this.inputValue&&this.value.length>0){const r=this.value.slice(0,-1);this.value=r,this.error=null,this.notifyChange(r)}}handlePaste(t){var o;t.preventDefault();const n=(((o=t.clipboardData)==null?void 0:o.getData("text"))??"").split(/[;,\n\s]+/).map(i=>i.trim()).filter(Boolean);this.addEmails(n)}handleBlur(){this.inputValue.trim()&&this.addEmails([this.inputValue])}removeEmail(t){const r=this.value.filter(n=>n!==t);this.value=r,this.error=null,this.notifyChange(r)}render(){const t=this.disabled||this.value.length>=this.maxEmails;return l`
4703
+ `}_navigate(t){console.log("Navigate to:",t),window.location.href=t}_handleMenuItemClick(t,r){t.stopPropagation();try{if(r&&typeof r.onClick=="function"){r.onClick(t,r),this.dispatchEvent(new CustomEvent("menu-item-click",{detail:{item:r},bubbles:!0,composed:!0}));return}if(r&&r.href){this._navigate(r.href),this.dispatchEvent(new CustomEvent("menu-item-click",{detail:{item:r},bubbles:!0,composed:!0}));return}}catch(n){console.error("[pont-nav-user] menu item click handler failed",n)}}}Le([a({type:String})],Fe.prototype,"accountSettingsPath");Le([a({attribute:!1})],Fe.prototype,"menuItems");Le([pt({context:Qr,subscribe:!0}),a({attribute:!1})],Fe.prototype,"auth");Le([g()],Fe.prototype,"user");Le([g()],Fe.prototype,"signedIn");Le([g()],Fe.prototype,"isLoading");Le([g()],Fe.prototype,"_itemStates");Le([g()],Fe.prototype,"_subMenuOpen");customElements.define("pont-nav-user",Fe);var x1=Object.defineProperty,O1=Object.getOwnPropertyDescriptor,Uh=(e,t,r,n)=>{for(var o=n>1?void 0:n?O1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&x1(t,r,o),o};exports.PontHint=class extends f{constructor(){super(...arguments),this.content=""}createRenderRoot(){return this}render(){return l`<p class="pont-mt-2">${this.content}</p>`}};Uh([a({type:String})],exports.PontHint.prototype,"content",2);exports.PontHint=Uh([p("pont-hint")],exports.PontHint);var R1=Object.defineProperty,I1=Object.getOwnPropertyDescriptor,ke=(e,t,r,n)=>{for(var o=n>1?void 0:n?I1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&R1(t,r,o),o};const A1=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;exports.MultiEmailInput=class extends f{constructor(){super(...arguments),this.label="",this.value=[],this.placeholder="Enter email addresses",this.disabled=!1,this.maxEmails=50,this.className="",this.inputValue="",this.error=null}createRenderRoot(){return this}validateEmail(t){return A1.test(t.trim())}addEmails(t){const r=[],n=[];for(const o of t){const i=o.trim();i&&(this.validateEmail(i)?!this.value.includes(i)&&!r.includes(i)&&r.push(i):n.push(i))}if(r.length>0){const o=[...this.value,...r].slice(0,this.maxEmails);this.value=o,this.inputValue="",this.error=null,o.length>=this.maxEmails&&(this.error=`Maximum ${this.maxEmails} emails allowed`),this.notifyChange(o)}n.length>0&&(this.error=`Invalid email${n.length>1?"s":""}: ${n.join(", ")}`)}notifyChange(t){var r;(r=this.onChange)==null||r.call(this,t),this.dispatchEvent(new CustomEvent("emails-changed",{detail:{emails:t},bubbles:!0,composed:!0}))}handleKeyDown(t){if(this.error&&this.inputValue!==""&&(this.error=null),["Enter",",",";"," "].includes(t.key)){t.preventDefault(),this.inputValue.trim()&&this.addEmails([this.inputValue]);return}if(t.key==="Backspace"&&!this.inputValue&&this.value.length>0){const r=this.value.slice(0,-1);this.value=r,this.error=null,this.notifyChange(r)}}handlePaste(t){var o;t.preventDefault();const n=(((o=t.clipboardData)==null?void 0:o.getData("text"))??"").split(/[;,\n\s]+/).map(i=>i.trim()).filter(Boolean);this.addEmails(n)}handleBlur(){this.inputValue.trim()&&this.addEmails([this.inputValue])}removeEmail(t){const r=this.value.filter(n=>n!==t);this.value=r,this.error=null,this.notifyChange(r)}render(){const t=this.disabled||this.value.length>=this.maxEmails;return l`
4704
4704
  <div class="pont-space-y-2 ${this.className}">
4705
4705
  ${this.label?l`<pont-label part="label">${this.label}</pont-label>`:h}
4706
4706
 
@@ -4912,7 +4912,7 @@
4912
4912
  ${this.content.includes("label")?this.label:h}
4913
4913
  ${this.iconAlign==="end"?this._renderIcon():h}
4914
4914
  </pont-button>
4915
- `}};exports.PontPasskeyButton.ROOT="passkey-button";exports.PontPasskeyButton.ICON="icon";exports.PontPasskeyButton.TAG=`${ht}-${exports.PontPasskeyButton.ROOT}`;exports.PontPasskeyButton.CLICK_EVENT=`${exports.PontPasskeyButton.TAG}:click`;exports.PontPasskeyButton.SUCCESS_EVENT=`${exports.PontPasskeyButton.TAG}:success`;exports.PontPasskeyButton.ERROR_EVENT=`${exports.PontPasskeyButton.TAG}:error`;exports.PontPasskeyButton.PARTS={root:exports.PontPasskeyButton.ROOT,icon:`${exports.PontPasskeyButton.ROOT}-${exports.PontPasskeyButton.ICON}`};Jt([a({type:String})],exports.PontPasskeyButton.prototype,"seed",2);Jt([a({type:String,attribute:"custom-id"})],exports.PontPasskeyButton.prototype,"customId",2);Jt([a({type:String})],exports.PontPasskeyButton.prototype,"variant",2);Jt([a({type:String})],exports.PontPasskeyButton.prototype,"size",2);Jt([a({type:String})],exports.PontPasskeyButton.prototype,"content",2);Jt([a({type:String,attribute:"icon-align"})],exports.PontPasskeyButton.prototype,"iconAlign",2);Jt([a({type:String})],exports.PontPasskeyButton.prototype,"label",1);Jt([a({type:String})],exports.PontPasskeyButton.prototype,"event",2);Jt([a({type:Boolean})],exports.PontPasskeyButton.prototype,"disabled",2);Jt([a({type:Boolean})],exports.PontPasskeyButton.prototype,"loading",2);Jt([g()],exports.PontPasskeyButton.prototype,"_loading",2);exports.PontPasskeyButton=Jt([p("pont-passkey-button")],exports.PontPasskeyButton);var q1=Object.defineProperty,z1=Object.getOwnPropertyDescriptor,Lt=(e,t,r,n)=>{for(var o=n>1?void 0:n?z1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&q1(t,r,o),o};exports.PontProviderButton=class extends f{constructor(){super(...arguments),this.seed=wt(),this.design=new Rn(this),this.variant=io.variant,this.size=io.size,this.content=io.content,this.iconAlign=io.iconAlign,this._prompt=io.prompt,this._loading=!1,this._handleClick=async()=>{if(!this.isDisabled){this._loading=!0,this.dispatchEvent(new CustomEvent(exports.PontProviderButton.CLICK_EVENT,{detail:{id:this.rootId,provider:this.provider,event:this.event},bubbles:!0,composed:!0}));try{if(this.event){const t=await tt.processLoginflowEvent({event:this.event});this.dispatchEvent(new CustomEvent(exports.PontProviderButton.SUCCESS_EVENT,{detail:{id:this.rootId,provider:this.provider,event:this.event,result:t},bubbles:!0,composed:!0}))}}catch(t){const r=t instanceof Error?t.message:String(t);this.dispatchEvent(new CustomEvent(exports.PontProviderButton.ERROR_EVENT,{detail:{id:this.rootId,provider:this.provider,event:this.event,message:r},bubbles:!0,composed:!0}))}finally{this._loading=!1}}}}get _provider(){return!this.provider&&this.design.active?"google":this.provider}get prompt(){return this._prompt}set prompt(t){const r=this._prompt;this._prompt=t.length?t:io.prompt,this.requestUpdate("prompt",r)}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontProviderButton.TAG}-${this.seed}`}get iconId(){return`${this.rootId}-${exports.PontProviderButton.ICON}`}get isLoading(){return this.loading||this._loading}get isDisabled(){return this.disabled||this.isLoading}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this._handleClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._handleClick)}_renderIcon(){const t=this.content==="icon"?"":`pont-icon-align-${this.iconAlign}`;return this.isLoading?l`
4915
+ `}};exports.PontPasskeyButton.ROOT="passkey-button";exports.PontPasskeyButton.ICON="icon";exports.PontPasskeyButton.TAG=`${et}-${exports.PontPasskeyButton.ROOT}`;exports.PontPasskeyButton.CLICK_EVENT=`${exports.PontPasskeyButton.TAG}:click`;exports.PontPasskeyButton.SUCCESS_EVENT=`${exports.PontPasskeyButton.TAG}:success`;exports.PontPasskeyButton.ERROR_EVENT=`${exports.PontPasskeyButton.TAG}:error`;exports.PontPasskeyButton.PARTS={root:exports.PontPasskeyButton.ROOT,icon:`${exports.PontPasskeyButton.ROOT}-${exports.PontPasskeyButton.ICON}`};Jt([a({type:String})],exports.PontPasskeyButton.prototype,"seed",2);Jt([a({type:String,attribute:"custom-id"})],exports.PontPasskeyButton.prototype,"customId",2);Jt([a({type:String})],exports.PontPasskeyButton.prototype,"variant",2);Jt([a({type:String})],exports.PontPasskeyButton.prototype,"size",2);Jt([a({type:String})],exports.PontPasskeyButton.prototype,"content",2);Jt([a({type:String,attribute:"icon-align"})],exports.PontPasskeyButton.prototype,"iconAlign",2);Jt([a({type:String})],exports.PontPasskeyButton.prototype,"label",1);Jt([a({type:String})],exports.PontPasskeyButton.prototype,"event",2);Jt([a({type:Boolean})],exports.PontPasskeyButton.prototype,"disabled",2);Jt([a({type:Boolean})],exports.PontPasskeyButton.prototype,"loading",2);Jt([g()],exports.PontPasskeyButton.prototype,"_loading",2);exports.PontPasskeyButton=Jt([p("pont-passkey-button")],exports.PontPasskeyButton);var q1=Object.defineProperty,z1=Object.getOwnPropertyDescriptor,Lt=(e,t,r,n)=>{for(var o=n>1?void 0:n?z1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&q1(t,r,o),o};exports.PontProviderButton=class extends f{constructor(){super(...arguments),this.seed=wt(),this.design=new Rn(this),this.variant=io.variant,this.size=io.size,this.content=io.content,this.iconAlign=io.iconAlign,this._prompt=io.prompt,this._loading=!1,this._handleClick=async()=>{if(!this.isDisabled){this._loading=!0,this.dispatchEvent(new CustomEvent(exports.PontProviderButton.CLICK_EVENT,{detail:{id:this.rootId,provider:this.provider,event:this.event},bubbles:!0,composed:!0}));try{if(this.event){const t=await tt.processLoginflowEvent({event:this.event});this.dispatchEvent(new CustomEvent(exports.PontProviderButton.SUCCESS_EVENT,{detail:{id:this.rootId,provider:this.provider,event:this.event,result:t},bubbles:!0,composed:!0}))}}catch(t){const r=t instanceof Error?t.message:String(t);this.dispatchEvent(new CustomEvent(exports.PontProviderButton.ERROR_EVENT,{detail:{id:this.rootId,provider:this.provider,event:this.event,message:r},bubbles:!0,composed:!0}))}finally{this._loading=!1}}}}get _provider(){return!this.provider&&this.design.active?"google":this.provider}get prompt(){return this._prompt}set prompt(t){const r=this._prompt;this._prompt=t.length?t:io.prompt,this.requestUpdate("prompt",r)}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontProviderButton.TAG}-${this.seed}`}get iconId(){return`${this.rootId}-${exports.PontProviderButton.ICON}`}get isLoading(){return this.loading||this._loading}get isDisabled(){return this.disabled||this.isLoading}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this._handleClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._handleClick)}_renderIcon(){const t=this.content==="icon"?"":`pont-icon-align-${this.iconAlign}`;return this.isLoading?l`
4916
4916
  <pont-spinner
4917
4917
  id="${this.iconId}"
4918
4918
  part="${exports.PontProviderButton.PARTS.icon}"
@@ -4944,7 +4944,7 @@
4944
4944
  ${this.content.includes("label")?r:h}
4945
4945
  ${this.iconAlign==="end"?this._renderIcon():h}
4946
4946
  </pont-button>
4947
- `}};exports.PontProviderButton.ROOT="provider-button";exports.PontProviderButton.ICON="icon";exports.PontProviderButton.TAG=`${ht}-${exports.PontProviderButton.ROOT}`;exports.PontProviderButton.CLICK_EVENT=`${exports.PontProviderButton.TAG}:click`;exports.PontProviderButton.SUCCESS_EVENT=`${exports.PontProviderButton.TAG}:success`;exports.PontProviderButton.ERROR_EVENT=`${exports.PontProviderButton.TAG}:error`;exports.PontProviderButton.PARTS={root:exports.PontProviderButton.ROOT,icon:`${exports.PontProviderButton.ROOT}-${exports.PontProviderButton.ICON}`};Lt([a({type:String})],exports.PontProviderButton.prototype,"seed",2);Lt([a({type:String,attribute:"custom-id"})],exports.PontProviderButton.prototype,"customId",2);Lt([a({type:String})],exports.PontProviderButton.prototype,"provider",2);Lt([a({type:String})],exports.PontProviderButton.prototype,"variant",2);Lt([a({type:String})],exports.PontProviderButton.prototype,"size",2);Lt([a({type:String})],exports.PontProviderButton.prototype,"content",2);Lt([a({type:String,attribute:"icon-align"})],exports.PontProviderButton.prototype,"iconAlign",2);Lt([a({type:String})],exports.PontProviderButton.prototype,"prompt",1);Lt([a({type:String})],exports.PontProviderButton.prototype,"label",2);Lt([a({type:String})],exports.PontProviderButton.prototype,"event",2);Lt([a({type:Boolean})],exports.PontProviderButton.prototype,"disabled",2);Lt([a({type:Boolean})],exports.PontProviderButton.prototype,"loading",2);Lt([g()],exports.PontProviderButton.prototype,"_loading",2);exports.PontProviderButton=Lt([p("pont-provider-button")],exports.PontProviderButton);var V1=Object.defineProperty,H1=Object.getOwnPropertyDescriptor,ce=(e,t,r,n)=>{for(var o=n>1?void 0:n?H1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&V1(t,r,o),o};exports.PontSubmitButton=class extends f{constructor(){super(...arguments),this.seed=wt(),this.variant=so.variant,this.size=so.size,this.content=so.content,this.iconAlign=so.iconAlign,this._label=so.label,this._handleClick=()=>{this.isDisabled||this.dispatchEvent(new CustomEvent(exports.PontSubmitButton.CLICK_EVENT,{detail:{id:this.rootId,event:this.event},bubbles:!0,composed:!0}))}}get label(){return this._label}set label(t){const r=this._label;this._label=t.length?t:so.label,this.requestUpdate("label",r)}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontSubmitButton.TAG}-${this.seed}`}get iconId(){return`${this.rootId}-${exports.PontSubmitButton.ICON}`}get isDisabled(){return this.disabled||this.loading}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this._handleClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._handleClick)}_renderIcon(){const t=this.content==="icon"?"":`pont-icon-align-${this.iconAlign}`;return this.loading?l`
4947
+ `}};exports.PontProviderButton.ROOT="provider-button";exports.PontProviderButton.ICON="icon";exports.PontProviderButton.TAG=`${et}-${exports.PontProviderButton.ROOT}`;exports.PontProviderButton.CLICK_EVENT=`${exports.PontProviderButton.TAG}:click`;exports.PontProviderButton.SUCCESS_EVENT=`${exports.PontProviderButton.TAG}:success`;exports.PontProviderButton.ERROR_EVENT=`${exports.PontProviderButton.TAG}:error`;exports.PontProviderButton.PARTS={root:exports.PontProviderButton.ROOT,icon:`${exports.PontProviderButton.ROOT}-${exports.PontProviderButton.ICON}`};Lt([a({type:String})],exports.PontProviderButton.prototype,"seed",2);Lt([a({type:String,attribute:"custom-id"})],exports.PontProviderButton.prototype,"customId",2);Lt([a({type:String})],exports.PontProviderButton.prototype,"provider",2);Lt([a({type:String})],exports.PontProviderButton.prototype,"variant",2);Lt([a({type:String})],exports.PontProviderButton.prototype,"size",2);Lt([a({type:String})],exports.PontProviderButton.prototype,"content",2);Lt([a({type:String,attribute:"icon-align"})],exports.PontProviderButton.prototype,"iconAlign",2);Lt([a({type:String})],exports.PontProviderButton.prototype,"prompt",1);Lt([a({type:String})],exports.PontProviderButton.prototype,"label",2);Lt([a({type:String})],exports.PontProviderButton.prototype,"event",2);Lt([a({type:Boolean})],exports.PontProviderButton.prototype,"disabled",2);Lt([a({type:Boolean})],exports.PontProviderButton.prototype,"loading",2);Lt([g()],exports.PontProviderButton.prototype,"_loading",2);exports.PontProviderButton=Lt([p("pont-provider-button")],exports.PontProviderButton);var V1=Object.defineProperty,H1=Object.getOwnPropertyDescriptor,ce=(e,t,r,n)=>{for(var o=n>1?void 0:n?H1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&V1(t,r,o),o};exports.PontSubmitButton=class extends f{constructor(){super(...arguments),this.seed=wt(),this.variant=so.variant,this.size=so.size,this.content=so.content,this.iconAlign=so.iconAlign,this._label=so.label,this._handleClick=()=>{this.isDisabled||this.dispatchEvent(new CustomEvent(exports.PontSubmitButton.CLICK_EVENT,{detail:{id:this.rootId,event:this.event},bubbles:!0,composed:!0}))}}get label(){return this._label}set label(t){const r=this._label;this._label=t.length?t:so.label,this.requestUpdate("label",r)}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontSubmitButton.TAG}-${this.seed}`}get iconId(){return`${this.rootId}-${exports.PontSubmitButton.ICON}`}get isDisabled(){return this.disabled||this.loading}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this._handleClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._handleClick)}_renderIcon(){const t=this.content==="icon"?"":`pont-icon-align-${this.iconAlign}`;return this.loading?l`
4948
4948
  <pont-spinner
4949
4949
  id="${this.iconId}"
4950
4950
  part="${exports.PontSubmitButton.PARTS.icon}"
@@ -4983,7 +4983,7 @@
4983
4983
  ${this.content.includes("label")?this.label:h}
4984
4984
  ${this.iconAlign==="end"?this._renderIcon():h}
4985
4985
  </pont-button>
4986
- `}};exports.PontSubmitButton.ROOT="submit-button";exports.PontSubmitButton.ICON="icon";exports.PontSubmitButton.TAG=`${ht}-${exports.PontSubmitButton.ROOT}`;exports.PontSubmitButton.CLICK_EVENT=`${exports.PontSubmitButton.TAG}:click`;exports.PontSubmitButton.PARTS={root:exports.PontSubmitButton.ROOT,icon:`${exports.PontSubmitButton.ROOT}-${exports.PontSubmitButton.ICON}`};ce([a({type:String})],exports.PontSubmitButton.prototype,"seed",2);ce([a({type:String,attribute:"custom-id"})],exports.PontSubmitButton.prototype,"customId",2);ce([a({type:String})],exports.PontSubmitButton.prototype,"variant",2);ce([a({type:String})],exports.PontSubmitButton.prototype,"size",2);ce([a({type:String})],exports.PontSubmitButton.prototype,"content",2);ce([a({type:String,attribute:"icon-align"})],exports.PontSubmitButton.prototype,"iconAlign",2);ce([a({type:String})],exports.PontSubmitButton.prototype,"label",1);ce([a({type:String})],exports.PontSubmitButton.prototype,"event",2);ce([a({type:Boolean})],exports.PontSubmitButton.prototype,"disabled",2);ce([a({type:Boolean})],exports.PontSubmitButton.prototype,"loading",2);exports.PontSubmitButton=ce([p("pont-submit-button")],exports.PontSubmitButton);var G1=Object.defineProperty,K1=Object.getOwnPropertyDescriptor,z=(e,t,r,n)=>{for(var o=n>1?void 0:n?K1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&G1(t,r,o),o};exports.PontPasswordField=class extends f{constructor(){super(...arguments),this.seed=wt(),this._name=qe.name,this._label=qe.label,this.variant=qe.variant,this.rules=qe.rules,this.validation=qe.validation,this._forgotLabel=qe.forgotLabel,this._invalid=!1,this._errors=[],this._value="",this._loading=!1,this._dirty=!1,this._form=null,this._handleInput=t=>{const r=t.target,n=`${exports.PontPasswordField.INPUT_SELECTORS} input`;r.matches(n)&&(this._dirty=!0,this._value=r.value)},this._handleFormSubmit=t=>{this._validate()||t.preventDefault()},this._handleFormReset=()=>{const t=exports.PontPasswordField.INPUT_SELECTORS,r=this.querySelector(t);r&&(r.value=this.defaultValue??""),this._invalid=!1,this._errors=[],this._value="",this._dirty=!1},this._handleForgotClick=async()=>{if(this.isDisabled)return;this._loading=!0;const{rootId:t,forgotId:r,forgotEvent:n}=this;this.dispatchEvent(new CustomEvent(exports.PontPasswordField.FORGOT_CLICK_EVENT,{detail:{id:t,forgotId:r,event:n},bubbles:!0,composed:!0}));try{if(n){const o=await tt.processLoginflowEvent({event:n});this.dispatchEvent(new CustomEvent(exports.PontPasswordField.FORGOT_SUCCESS_EVENT,{detail:{id:t,forgotId:r,event:n,result:o},bubbles:!0,composed:!0}))}}catch(o){const i=o instanceof Error?o.message:String(o);this.dispatchEvent(new CustomEvent(exports.PontPasswordField.FORGOT_ERROR_EVENT,{detail:{id:t,forgotId:r,event:n,message:i},bubbles:!0,composed:!0}))}finally{this._loading=!1}}}get _defaultInputId(){return`${this.rootId}-${exports.PontPasswordField.INPUT}`}get inputId(){return this._inputId??this._defaultInputId}set inputId(t){const r=this.inputId;this._inputId=t||void 0,this.requestUpdate("inputId",r)}get name(){return this._name}set name(t){const r=this._name;this._name=t.length?t:qe.name,this.requestUpdate("name",r)}get label(){return this._label}set label(t){const r=this._label;this._label=t.length?t:qe.label,this.requestUpdate("label",r)}get minlength(){return this._minlength}set minlength(t){const r=this._minlength;this._minlength=t===void 0||t>0?t:void 0,this.requestUpdate("minlength",r)}get maxlength(){return this._maxlength}set maxlength(t){const r=this._maxlength;if(t===void 0||t<=0)this._maxlength=void 0;else{const{minlength:n}=this;this._maxlength=n?Math.max(t,n):t}this.requestUpdate("maxlength",r)}get _defaultRequiredError(){return Ft(this.label)}get requiredError(){return this._requiredError??this._defaultRequiredError}set requiredError(t){const r=this.requiredError;this._requiredError=t||void 0,this.requestUpdate("requiredError",r)}get _defaultMinlengthError(){return jo(this.label,this.minlength)}get minlengthError(){return this._minlengthError??this._defaultMinlengthError}set minlengthError(t){const r=this.minlengthError;this._minlengthError=t||void 0,this.requestUpdate("minlengthError",r)}get _defaultMaxlengthError(){return qo(this.label,this.maxlength)}get maxlengthError(){return this._maxlengthError??this._defaultMaxlengthError}set maxlengthError(t){const r=this.maxlengthError;this._maxlengthError=t||void 0,this.requestUpdate("maxlengthError",r)}get _defaultFormatError(){return Ne(this.label)}get formatError(){return this._formatError??this._defaultFormatError}set formatError(t){const r=this.formatError;this._formatError=t||void 0,this.requestUpdate("formatError",r)}get forgotLabel(){return this._forgotLabel}set forgotLabel(t){const r=this._forgotLabel;this._forgotLabel=t.length?t:qe.forgotLabel,this.requestUpdate("forgotLabel",r)}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontPasswordField.TAG}-${this.seed}`}get labelId(){return`${this.rootId}-${exports.PontPasswordField.LABEL}`}get markId(){return`${this.rootId}-${exports.PontPasswordField.MARK}`}get forgotId(){return`${this.rootId}-${exports.PontPasswordField.FORGOT}`}get descriptionId(){return`${this.rootId}-${exports.PontPasswordField.DESCRIPTION}`}get errorId(){return`${this.rootId}-${exports.PontPasswordField.ERROR}`}get value(){const t=this.defaultValue??"";return this._dirty?this._value:t}get isDisabled(){return this.disabled||this._loading}updated(t){if(t.has("defaultValue")&&!this._dirty){const r=exports.PontPasswordField.INPUT_SELECTORS,n=this.querySelector(r);n&&(n.value=this.defaultValue??"")}}connectedCallback(){super.connectedCallback(),this.addEventListener("input",this._handleInput),this._form=this.closest("form"),this._form!==null&&(this._form.noValidate=!0,this._form.addEventListener("submit",this._handleFormSubmit),this._form.addEventListener("reset",this._handleFormReset))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("input",this._handleInput),this._form!==null&&(this._form.removeEventListener("submit",this._handleFormSubmit),this._form.removeEventListener("reset",this._handleFormReset),this._form=null)}validate(){return this._validate()}_dispatchValidate(t,r,n){const{rootId:o,inputId:i,name:s,value:d}=this;this.dispatchEvent(new CustomEvent(exports.PontPasswordField.VALIDATE_EVENT,{detail:{id:o,inputId:i,name:s,value:d,valid:t,type:r,message:n},bubbles:!0,composed:!0}))}_onValidateSuccess(){this._invalid=!1,this._errors=[],this._dispatchValidate(!0,"success","Valid password.")}_onValidateError(t,r,n){this._invalid=!0,this._errors=n!=null&&n.length?n:[r],this._dispatchValidate(!1,t,r)}_validate(){const t=this.value;if(this.required&&!t)return this._onValidateError("required",this.requiredError),!1;if(!t||this.validation==="simple")return this._onValidateSuccess(),!0;const{minlength:r}=this;if(r&&t.length<r)return this._onValidateError("minlength",this.minlengthError),!1;const{maxlength:n}=this;if(n&&t.length>n)return this._onValidateError("maxlength",this.maxlengthError),!1;let o=!0;const i=[];for(const s of this.rules)(s.name?exports.PontPasswordField.RULE_PATTERNS[s.name]:new RegExp(s.pattern)).test(t)||(o=!1,s.error&&i.push(s.error));if(!o){const s=i.length?i.join(" "):this.formatError;return this._onValidateError("format",s,i),!1}return this._onValidateSuccess(),!0}_renderMark(){let t;if(this.mark)t="mark";else if(this.required&&this.caret)t="caret";else return h;return l`
4986
+ `}};exports.PontSubmitButton.ROOT="submit-button";exports.PontSubmitButton.ICON="icon";exports.PontSubmitButton.TAG=`${et}-${exports.PontSubmitButton.ROOT}`;exports.PontSubmitButton.CLICK_EVENT=`${exports.PontSubmitButton.TAG}:click`;exports.PontSubmitButton.PARTS={root:exports.PontSubmitButton.ROOT,icon:`${exports.PontSubmitButton.ROOT}-${exports.PontSubmitButton.ICON}`};ce([a({type:String})],exports.PontSubmitButton.prototype,"seed",2);ce([a({type:String,attribute:"custom-id"})],exports.PontSubmitButton.prototype,"customId",2);ce([a({type:String})],exports.PontSubmitButton.prototype,"variant",2);ce([a({type:String})],exports.PontSubmitButton.prototype,"size",2);ce([a({type:String})],exports.PontSubmitButton.prototype,"content",2);ce([a({type:String,attribute:"icon-align"})],exports.PontSubmitButton.prototype,"iconAlign",2);ce([a({type:String})],exports.PontSubmitButton.prototype,"label",1);ce([a({type:String})],exports.PontSubmitButton.prototype,"event",2);ce([a({type:Boolean})],exports.PontSubmitButton.prototype,"disabled",2);ce([a({type:Boolean})],exports.PontSubmitButton.prototype,"loading",2);exports.PontSubmitButton=ce([p("pont-submit-button")],exports.PontSubmitButton);var G1=Object.defineProperty,K1=Object.getOwnPropertyDescriptor,z=(e,t,r,n)=>{for(var o=n>1?void 0:n?K1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&G1(t,r,o),o};exports.PontPasswordField=class extends f{constructor(){super(...arguments),this.seed=wt(),this._name=qe.name,this._label=qe.label,this.variant=qe.variant,this.rules=qe.rules,this.validation=qe.validation,this._forgotLabel=qe.forgotLabel,this._invalid=!1,this._errors=[],this._value="",this._loading=!1,this._dirty=!1,this._form=null,this._handleInput=t=>{const r=t.target,n=`${exports.PontPasswordField.INPUT_SELECTORS} input`;r.matches(n)&&(this._dirty=!0,this._value=r.value)},this._handleFormSubmit=t=>{this._validate()||t.preventDefault()},this._handleFormReset=()=>{const t=exports.PontPasswordField.INPUT_SELECTORS,r=this.querySelector(t);r&&(r.value=this.defaultValue??""),this._invalid=!1,this._errors=[],this._value="",this._dirty=!1},this._handleForgotClick=async()=>{if(this.isDisabled)return;this._loading=!0;const{rootId:t,forgotId:r,forgotEvent:n}=this;this.dispatchEvent(new CustomEvent(exports.PontPasswordField.FORGOT_CLICK_EVENT,{detail:{id:t,forgotId:r,event:n},bubbles:!0,composed:!0}));try{if(n){const o=await tt.processLoginflowEvent({event:n});this.dispatchEvent(new CustomEvent(exports.PontPasswordField.FORGOT_SUCCESS_EVENT,{detail:{id:t,forgotId:r,event:n,result:o},bubbles:!0,composed:!0}))}}catch(o){const i=o instanceof Error?o.message:String(o);this.dispatchEvent(new CustomEvent(exports.PontPasswordField.FORGOT_ERROR_EVENT,{detail:{id:t,forgotId:r,event:n,message:i},bubbles:!0,composed:!0}))}finally{this._loading=!1}}}get _defaultInputId(){return`${this.rootId}-${exports.PontPasswordField.INPUT}`}get inputId(){return this._inputId??this._defaultInputId}set inputId(t){const r=this.inputId;this._inputId=t||void 0,this.requestUpdate("inputId",r)}get name(){return this._name}set name(t){const r=this._name;this._name=t.length?t:qe.name,this.requestUpdate("name",r)}get label(){return this._label}set label(t){const r=this._label;this._label=t.length?t:qe.label,this.requestUpdate("label",r)}get minlength(){return this._minlength}set minlength(t){const r=this._minlength;this._minlength=t===void 0||t>0?t:void 0,this.requestUpdate("minlength",r)}get maxlength(){return this._maxlength}set maxlength(t){const r=this._maxlength;if(t===void 0||t<=0)this._maxlength=void 0;else{const{minlength:n}=this;this._maxlength=n?Math.max(t,n):t}this.requestUpdate("maxlength",r)}get _defaultRequiredError(){return Ft(this.label)}get requiredError(){return this._requiredError??this._defaultRequiredError}set requiredError(t){const r=this.requiredError;this._requiredError=t||void 0,this.requestUpdate("requiredError",r)}get _defaultMinlengthError(){return jo(this.label,this.minlength)}get minlengthError(){return this._minlengthError??this._defaultMinlengthError}set minlengthError(t){const r=this.minlengthError;this._minlengthError=t||void 0,this.requestUpdate("minlengthError",r)}get _defaultMaxlengthError(){return qo(this.label,this.maxlength)}get maxlengthError(){return this._maxlengthError??this._defaultMaxlengthError}set maxlengthError(t){const r=this.maxlengthError;this._maxlengthError=t||void 0,this.requestUpdate("maxlengthError",r)}get _defaultFormatError(){return Ne(this.label)}get formatError(){return this._formatError??this._defaultFormatError}set formatError(t){const r=this.formatError;this._formatError=t||void 0,this.requestUpdate("formatError",r)}get forgotLabel(){return this._forgotLabel}set forgotLabel(t){const r=this._forgotLabel;this._forgotLabel=t.length?t:qe.forgotLabel,this.requestUpdate("forgotLabel",r)}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontPasswordField.TAG}-${this.seed}`}get labelId(){return`${this.rootId}-${exports.PontPasswordField.LABEL}`}get markId(){return`${this.rootId}-${exports.PontPasswordField.MARK}`}get forgotId(){return`${this.rootId}-${exports.PontPasswordField.FORGOT}`}get descriptionId(){return`${this.rootId}-${exports.PontPasswordField.DESCRIPTION}`}get errorId(){return`${this.rootId}-${exports.PontPasswordField.ERROR}`}get value(){const t=this.defaultValue??"";return this._dirty?this._value:t}get isDisabled(){return this.disabled||this._loading}updated(t){if(t.has("defaultValue")&&!this._dirty){const r=exports.PontPasswordField.INPUT_SELECTORS,n=this.querySelector(r);n&&(n.value=this.defaultValue??"")}}connectedCallback(){super.connectedCallback(),this.addEventListener("input",this._handleInput),this._form=this.closest("form"),this._form!==null&&(this._form.noValidate=!0,this._form.addEventListener("submit",this._handleFormSubmit),this._form.addEventListener("reset",this._handleFormReset))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("input",this._handleInput),this._form!==null&&(this._form.removeEventListener("submit",this._handleFormSubmit),this._form.removeEventListener("reset",this._handleFormReset),this._form=null)}validate(){return this._validate()}_dispatchValidate(t,r,n){const{rootId:o,inputId:i,name:s,value:d}=this;this.dispatchEvent(new CustomEvent(exports.PontPasswordField.VALIDATE_EVENT,{detail:{id:o,inputId:i,name:s,value:d,valid:t,type:r,message:n},bubbles:!0,composed:!0}))}_onValidateSuccess(){this._invalid=!1,this._errors=[],this._dispatchValidate(!0,"success","Valid password.")}_onValidateError(t,r,n){this._invalid=!0,this._errors=n!=null&&n.length?n:[r],this._dispatchValidate(!1,t,r)}_validate(){const t=this.value;if(this.required&&!t)return this._onValidateError("required",this.requiredError),!1;if(!t||this.validation==="simple")return this._onValidateSuccess(),!0;const{minlength:r}=this;if(r&&t.length<r)return this._onValidateError("minlength",this.minlengthError),!1;const{maxlength:n}=this;if(n&&t.length>n)return this._onValidateError("maxlength",this.maxlengthError),!1;let o=!0;const i=[];for(const s of this.rules)(s.name?exports.PontPasswordField.RULE_PATTERNS[s.name]:new RegExp(s.pattern)).test(t)||(o=!1,s.error&&i.push(s.error));if(!o){const s=i.length?i.join(" "):this.formatError;return this._onValidateError("format",s,i),!1}return this._onValidateSuccess(),!0}_renderMark(){let t;if(this.mark)t="mark";else if(this.required&&this.caret)t="caret";else return h;return l`
4987
4987
  <span
4988
4988
  id="${this.markId}"
4989
4989
  part="${exports.PontPasswordField.PARTS.mark}"
@@ -5057,7 +5057,7 @@
5057
5057
  </pont-field-description>
5058
5058
  `:h}
5059
5059
  </pont-field>
5060
- `}};exports.PontPasswordField.ROOT="password-field";exports.PontPasswordField.LABEL="label";exports.PontPasswordField.MARK="mark";exports.PontPasswordField.FORGOT="forgot";exports.PontPasswordField.DESCRIPTION="description";exports.PontPasswordField.INPUT="input";exports.PontPasswordField.ERROR="error";exports.PontPasswordField.TAG=`${ht}-${exports.PontPasswordField.ROOT}`;exports.PontPasswordField.VALIDATE_EVENT=`${exports.PontPasswordField.TAG}:validate`;exports.PontPasswordField.FORGOT_CLICK_EVENT=`${exports.PontPasswordField.TAG}:forgot-click`;exports.PontPasswordField.FORGOT_SUCCESS_EVENT=`${exports.PontPasswordField.TAG}:forgot-success`;exports.PontPasswordField.FORGOT_ERROR_EVENT=`${exports.PontPasswordField.TAG}:forgot-error`;exports.PontPasswordField.PARTS={root:exports.PontPasswordField.ROOT,label:`${exports.PontPasswordField.ROOT}-${exports.PontPasswordField.LABEL}`,mark:`${exports.PontPasswordField.ROOT}-${exports.PontPasswordField.MARK}`,forgot:`${exports.PontPasswordField.ROOT}-${exports.PontPasswordField.FORGOT}`,description:`${exports.PontPasswordField.ROOT}-${exports.PontPasswordField.DESCRIPTION}`,input:`${exports.PontPasswordField.ROOT}-${exports.PontPasswordField.INPUT}`,error:`${exports.PontPasswordField.ROOT}-${exports.PontPasswordField.ERROR}`};exports.PontPasswordField.INPUT_SELECTORS=`pont-input[part="${exports.PontPasswordField.PARTS.input}"], pont-password-input[part="${exports.PontPasswordField.PARTS.input}"]`;exports.PontPasswordField.RULE_PATTERNS={uppercase:/[A-Z]/,lowercase:/[a-z]/,number:/[0-9]/,special:/[!@#$%^&*()_=+{}[\]|\\;:"<>,./?-]/};z([a({type:String})],exports.PontPasswordField.prototype,"seed",2);z([a({type:String,attribute:"custom-id"})],exports.PontPasswordField.prototype,"customId",2);z([a({type:String,attribute:"input-id"})],exports.PontPasswordField.prototype,"inputId",1);z([a({type:String})],exports.PontPasswordField.prototype,"name",1);z([a({type:String,attribute:"default-value"})],exports.PontPasswordField.prototype,"defaultValue",2);z([a({type:String})],exports.PontPasswordField.prototype,"label",1);z([a({type:String})],exports.PontPasswordField.prototype,"placeholder",2);z([a({type:String})],exports.PontPasswordField.prototype,"description",2);z([a({type:String})],exports.PontPasswordField.prototype,"variant",2);z([a({type:String})],exports.PontPasswordField.prototype,"mark",2);z([a({type:Boolean})],exports.PontPasswordField.prototype,"caret",2);z([a({type:String})],exports.PontPasswordField.prototype,"autocomplete",2);z([a({type:Boolean})],exports.PontPasswordField.prototype,"disabled",2);z([a({type:Boolean})],exports.PontPasswordField.prototype,"required",2);z([a({type:Number})],exports.PontPasswordField.prototype,"minlength",1);z([a({type:Number})],exports.PontPasswordField.prototype,"maxlength",1);z([a({type:Array})],exports.PontPasswordField.prototype,"rules",2);z([a({type:String})],exports.PontPasswordField.prototype,"validation",2);z([a({type:String,attribute:"required-error"})],exports.PontPasswordField.prototype,"requiredError",1);z([a({type:String,attribute:"minlength-error"})],exports.PontPasswordField.prototype,"minlengthError",1);z([a({type:String,attribute:"maxlength-error"})],exports.PontPasswordField.prototype,"maxlengthError",1);z([a({type:String,attribute:"format-error"})],exports.PontPasswordField.prototype,"formatError",1);z([a({type:Boolean})],exports.PontPasswordField.prototype,"forgot",2);z([a({type:String,attribute:"forgot-label"})],exports.PontPasswordField.prototype,"forgotLabel",1);z([a({type:String,attribute:"forgot-event"})],exports.PontPasswordField.prototype,"forgotEvent",2);z([g()],exports.PontPasswordField.prototype,"_invalid",2);z([g()],exports.PontPasswordField.prototype,"_errors",2);z([g()],exports.PontPasswordField.prototype,"_value",2);z([g()],exports.PontPasswordField.prototype,"_loading",2);exports.PontPasswordField=z([p("pont-password-field")],exports.PontPasswordField);const Ft=e=>`${e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()} is a required field.`,Ne=e=>`Please enter a valid ${e.toLowerCase()}.`,jo=(e,t)=>t?`${e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()} must be at least ${t} characters.`:`Please enter a longer ${e.toLowerCase()}.`,qo=(e,t)=>t?`${e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()} can have at most ${t} characters.`:`Please enter a shorter ${e.toLowerCase()}.`,ao={name:"email",label:"Email",pattern:/^[^\s@]+@[^\s@]+\.[^\s@]+$/.source,validation:"default",requiredError:Ft("Email"),formatError:Ne("Email")},lo={name:"phone",label:"Phone",pattern:/^\+?(\d[\d-.() ]+)?(\([\d-.() ]+\))?[\d-.() ]+\d$/.source,validation:"default",requiredError:Ft("Phone"),formatError:Ne("Phone")},co={name:"username",label:"Username",pattern:/^[a-z0-9_]*$/.source,validation:"default",requiredError:Ft("Username"),minlengthError:jo("Username"),maxlengthError:qo("Username"),formatError:Ne("Username")},po={name:"name",label:"Name",pattern:/^[\p{L} .'-]*$/u.source,validation:"default",requiredError:Ft("Name"),minlengthError:jo("Name"),maxlengthError:qo("Name"),formatError:Ne("Name")},Qo={name:"login_id",identifiers:[],label:"Identifier",validation:"default",requiredError:Ft("Identifier")},qe={name:"password",label:"Password",variant:"toggle",rules:[{name:"uppercase",error:"Must contain an uppercase letter."},{name:"lowercase",error:"Must contain a lowercase letter."},{name:"number",error:"Must contain a number."},{name:"special",error:"Must contain a special character."}],validation:"default",requiredError:Ft("Password"),minlengthError:jo("Password"),maxlengthError:qo("Password"),formatError:Ne("Password"),forgotLabel:"Forgot your password?"},ze={name:"confirm",label:"Confirm Password",variant:"toggle",pair:exports.PontPasswordField.TAG,validation:"default",requiredError:Ft("Confirm Password"),matchError:"Passwords do not match."};var W1=Object.defineProperty,Y1=Object.getOwnPropertyDescriptor,nt=(e,t,r,n)=>{for(var o=n>1?void 0:n?Y1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&W1(t,r,o),o};exports.PontConfirmField=class extends f{constructor(){super(...arguments),this.seed=wt(),this._name=ze.name,this._label=ze.label,this.variant=ze.variant,this.pair=ze.pair,this.validation=ze.validation,this._matchError=ze.matchError,this._invalid=!1,this._error="",this._value="",this._dirty=!1,this._form=null,this._handleInput=t=>{const r=t.target,n=`${exports.PontConfirmField.INPUT_SELECTORS} input`;r.matches(n)&&(this._dirty=!0,this._value=r.value)},this._handleFormSubmit=t=>{this._validate()||t.preventDefault()},this._handleFormReset=()=>{const t=exports.PontConfirmField.INPUT_SELECTORS,r=this.querySelector(t);r&&(r.value=this.defaultValue??""),this._invalid=!1,this._error="",this._value="",this._dirty=!1}}get _defaultInputId(){return`${this.rootId}-${exports.PontConfirmField.INPUT}`}get inputId(){return this._inputId??this._defaultInputId}set inputId(t){const r=this.inputId;this._inputId=t||void 0,this.requestUpdate("inputId",r)}get name(){return this._name}set name(t){const r=this._name;this._name=t.length?t:ze.name,this.requestUpdate("name",r)}get label(){return this._label}set label(t){const r=this._label;this._label=t.length?t:ze.label,this.requestUpdate("label",r)}get _defaultRequiredError(){return Ft(this.label)}get requiredError(){return this._requiredError??this._defaultRequiredError}set requiredError(t){const r=this.requiredError;this._requiredError=t||void 0,this.requestUpdate("requiredError",r)}get matchError(){return this._matchError}set matchError(t){const r=this._matchError;this._matchError=t.length?t:ze.matchError,this.requestUpdate("matchError",r)}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontConfirmField.TAG}-${this.seed}`}get labelId(){return`${this.rootId}-${exports.PontConfirmField.LABEL}`}get markId(){return`${this.rootId}-${exports.PontConfirmField.MARK}`}get descriptionId(){return`${this.rootId}-${exports.PontConfirmField.DESCRIPTION}`}get errorId(){return`${this.rootId}-${exports.PontConfirmField.ERROR}`}get value(){const t=this.defaultValue??"";return this._dirty?this._value:t}get pairValue(){const r=(this._form??document).querySelector(this.pair);return r?r.value:""}updated(t){if(t.has("defaultValue")&&!this._dirty){const r=exports.PontConfirmField.INPUT_SELECTORS,n=this.querySelector(r);n&&(n.value=this.defaultValue??"")}}connectedCallback(){super.connectedCallback(),this.addEventListener("input",this._handleInput),this._form=this.closest("form"),this._form!==null&&(this._form.noValidate=!0,this._form.addEventListener("submit",this._handleFormSubmit),this._form.addEventListener("reset",this._handleFormReset))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("input",this._handleInput),this._form!==null&&(this._form.removeEventListener("submit",this._handleFormSubmit),this._form.removeEventListener("reset",this._handleFormReset),this._form=null)}validate(){return this._validate()}_dispatchValidate(t,r,n){const{rootId:o,inputId:i,name:s,value:d}=this,c={selector:this.pair,value:this.pairValue};this.dispatchEvent(new CustomEvent(exports.PontConfirmField.VALIDATE_EVENT,{detail:{id:o,inputId:i,name:s,value:d,valid:t,type:r,pair:c,message:n},bubbles:!0,composed:!0}))}_onValidateSuccess(){this._invalid=!1,this._error="",this._dispatchValidate(!0,"success","Valid confirm.")}_onValidateError(t,r){this._invalid=!0,this._error=r,this._dispatchValidate(!1,t,r)}_validate(){const t=this.value;return this.required&&!t?(this._onValidateError("required",this.requiredError),!1):!t||this.validation==="simple"?(this._onValidateSuccess(),!0):t!==this.pairValue?(this._onValidateError("match",this.matchError),!1):(this._onValidateSuccess(),!0)}_renderMark(){let t;if(this.mark)t="mark";else if(this.required&&this.caret)t="caret";else return h;return l`
5060
+ `}};exports.PontPasswordField.ROOT="password-field";exports.PontPasswordField.LABEL="label";exports.PontPasswordField.MARK="mark";exports.PontPasswordField.FORGOT="forgot";exports.PontPasswordField.DESCRIPTION="description";exports.PontPasswordField.INPUT="input";exports.PontPasswordField.ERROR="error";exports.PontPasswordField.TAG=`${et}-${exports.PontPasswordField.ROOT}`;exports.PontPasswordField.VALIDATE_EVENT=`${exports.PontPasswordField.TAG}:validate`;exports.PontPasswordField.FORGOT_CLICK_EVENT=`${exports.PontPasswordField.TAG}:forgot-click`;exports.PontPasswordField.FORGOT_SUCCESS_EVENT=`${exports.PontPasswordField.TAG}:forgot-success`;exports.PontPasswordField.FORGOT_ERROR_EVENT=`${exports.PontPasswordField.TAG}:forgot-error`;exports.PontPasswordField.PARTS={root:exports.PontPasswordField.ROOT,label:`${exports.PontPasswordField.ROOT}-${exports.PontPasswordField.LABEL}`,mark:`${exports.PontPasswordField.ROOT}-${exports.PontPasswordField.MARK}`,forgot:`${exports.PontPasswordField.ROOT}-${exports.PontPasswordField.FORGOT}`,description:`${exports.PontPasswordField.ROOT}-${exports.PontPasswordField.DESCRIPTION}`,input:`${exports.PontPasswordField.ROOT}-${exports.PontPasswordField.INPUT}`,error:`${exports.PontPasswordField.ROOT}-${exports.PontPasswordField.ERROR}`};exports.PontPasswordField.INPUT_SELECTORS=`pont-input[part="${exports.PontPasswordField.PARTS.input}"], pont-password-input[part="${exports.PontPasswordField.PARTS.input}"]`;exports.PontPasswordField.RULE_PATTERNS={uppercase:/[A-Z]/,lowercase:/[a-z]/,number:/[0-9]/,special:/[!@#$%^&*()_=+{}[\]|\\;:"<>,./?-]/};z([a({type:String})],exports.PontPasswordField.prototype,"seed",2);z([a({type:String,attribute:"custom-id"})],exports.PontPasswordField.prototype,"customId",2);z([a({type:String,attribute:"input-id"})],exports.PontPasswordField.prototype,"inputId",1);z([a({type:String})],exports.PontPasswordField.prototype,"name",1);z([a({type:String,attribute:"default-value"})],exports.PontPasswordField.prototype,"defaultValue",2);z([a({type:String})],exports.PontPasswordField.prototype,"label",1);z([a({type:String})],exports.PontPasswordField.prototype,"placeholder",2);z([a({type:String})],exports.PontPasswordField.prototype,"description",2);z([a({type:String})],exports.PontPasswordField.prototype,"variant",2);z([a({type:String})],exports.PontPasswordField.prototype,"mark",2);z([a({type:Boolean})],exports.PontPasswordField.prototype,"caret",2);z([a({type:String})],exports.PontPasswordField.prototype,"autocomplete",2);z([a({type:Boolean})],exports.PontPasswordField.prototype,"disabled",2);z([a({type:Boolean})],exports.PontPasswordField.prototype,"required",2);z([a({type:Number})],exports.PontPasswordField.prototype,"minlength",1);z([a({type:Number})],exports.PontPasswordField.prototype,"maxlength",1);z([a({type:Array})],exports.PontPasswordField.prototype,"rules",2);z([a({type:String})],exports.PontPasswordField.prototype,"validation",2);z([a({type:String,attribute:"required-error"})],exports.PontPasswordField.prototype,"requiredError",1);z([a({type:String,attribute:"minlength-error"})],exports.PontPasswordField.prototype,"minlengthError",1);z([a({type:String,attribute:"maxlength-error"})],exports.PontPasswordField.prototype,"maxlengthError",1);z([a({type:String,attribute:"format-error"})],exports.PontPasswordField.prototype,"formatError",1);z([a({type:Boolean})],exports.PontPasswordField.prototype,"forgot",2);z([a({type:String,attribute:"forgot-label"})],exports.PontPasswordField.prototype,"forgotLabel",1);z([a({type:String,attribute:"forgot-event"})],exports.PontPasswordField.prototype,"forgotEvent",2);z([g()],exports.PontPasswordField.prototype,"_invalid",2);z([g()],exports.PontPasswordField.prototype,"_errors",2);z([g()],exports.PontPasswordField.prototype,"_value",2);z([g()],exports.PontPasswordField.prototype,"_loading",2);exports.PontPasswordField=z([p("pont-password-field")],exports.PontPasswordField);const Ft=e=>`${e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()} is a required field.`,Ne=e=>`Please enter a valid ${e.toLowerCase()}.`,jo=(e,t)=>t?`${e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()} must be at least ${t} characters.`:`Please enter a longer ${e.toLowerCase()}.`,qo=(e,t)=>t?`${e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()} can have at most ${t} characters.`:`Please enter a shorter ${e.toLowerCase()}.`,ao={name:"email",label:"Email",pattern:/^[^\s@]+@[^\s@]+\.[^\s@]+$/.source,validation:"default",requiredError:Ft("Email"),formatError:Ne("Email")},lo={name:"phone",label:"Phone",pattern:/^\+?(\d[\d-.() ]+)?(\([\d-.() ]+\))?[\d-.() ]+\d$/.source,validation:"default",requiredError:Ft("Phone"),formatError:Ne("Phone")},co={name:"username",label:"Username",pattern:/^[a-z0-9_]*$/.source,validation:"default",requiredError:Ft("Username"),minlengthError:jo("Username"),maxlengthError:qo("Username"),formatError:Ne("Username")},po={name:"name",label:"Name",pattern:/^[\p{L} .'-]*$/u.source,validation:"default",requiredError:Ft("Name"),minlengthError:jo("Name"),maxlengthError:qo("Name"),formatError:Ne("Name")},Qo={name:"login_id",identifiers:[],label:"Identifier",validation:"default",requiredError:Ft("Identifier")},qe={name:"password",label:"Password",variant:"toggle",rules:[{name:"uppercase",error:"Must contain an uppercase letter."},{name:"lowercase",error:"Must contain a lowercase letter."},{name:"number",error:"Must contain a number."},{name:"special",error:"Must contain a special character."}],validation:"default",requiredError:Ft("Password"),minlengthError:jo("Password"),maxlengthError:qo("Password"),formatError:Ne("Password"),forgotLabel:"Forgot your password?"},ze={name:"confirm",label:"Confirm Password",variant:"toggle",pair:exports.PontPasswordField.TAG,validation:"default",requiredError:Ft("Confirm Password"),matchError:"Passwords do not match."};var W1=Object.defineProperty,Y1=Object.getOwnPropertyDescriptor,it=(e,t,r,n)=>{for(var o=n>1?void 0:n?Y1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&W1(t,r,o),o};exports.PontConfirmField=class extends f{constructor(){super(...arguments),this.seed=wt(),this._name=ze.name,this._label=ze.label,this.variant=ze.variant,this.pair=ze.pair,this.validation=ze.validation,this._matchError=ze.matchError,this._invalid=!1,this._error="",this._value="",this._dirty=!1,this._form=null,this._handleInput=t=>{const r=t.target,n=`${exports.PontConfirmField.INPUT_SELECTORS} input`;r.matches(n)&&(this._dirty=!0,this._value=r.value)},this._handleFormSubmit=t=>{this._validate()||t.preventDefault()},this._handleFormReset=()=>{const t=exports.PontConfirmField.INPUT_SELECTORS,r=this.querySelector(t);r&&(r.value=this.defaultValue??""),this._invalid=!1,this._error="",this._value="",this._dirty=!1}}get _defaultInputId(){return`${this.rootId}-${exports.PontConfirmField.INPUT}`}get inputId(){return this._inputId??this._defaultInputId}set inputId(t){const r=this.inputId;this._inputId=t||void 0,this.requestUpdate("inputId",r)}get name(){return this._name}set name(t){const r=this._name;this._name=t.length?t:ze.name,this.requestUpdate("name",r)}get label(){return this._label}set label(t){const r=this._label;this._label=t.length?t:ze.label,this.requestUpdate("label",r)}get _defaultRequiredError(){return Ft(this.label)}get requiredError(){return this._requiredError??this._defaultRequiredError}set requiredError(t){const r=this.requiredError;this._requiredError=t||void 0,this.requestUpdate("requiredError",r)}get matchError(){return this._matchError}set matchError(t){const r=this._matchError;this._matchError=t.length?t:ze.matchError,this.requestUpdate("matchError",r)}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontConfirmField.TAG}-${this.seed}`}get labelId(){return`${this.rootId}-${exports.PontConfirmField.LABEL}`}get markId(){return`${this.rootId}-${exports.PontConfirmField.MARK}`}get descriptionId(){return`${this.rootId}-${exports.PontConfirmField.DESCRIPTION}`}get errorId(){return`${this.rootId}-${exports.PontConfirmField.ERROR}`}get value(){const t=this.defaultValue??"";return this._dirty?this._value:t}get pairValue(){const r=(this._form??document).querySelector(this.pair);return r?r.value:""}updated(t){if(t.has("defaultValue")&&!this._dirty){const r=exports.PontConfirmField.INPUT_SELECTORS,n=this.querySelector(r);n&&(n.value=this.defaultValue??"")}}connectedCallback(){super.connectedCallback(),this.addEventListener("input",this._handleInput),this._form=this.closest("form"),this._form!==null&&(this._form.noValidate=!0,this._form.addEventListener("submit",this._handleFormSubmit),this._form.addEventListener("reset",this._handleFormReset))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("input",this._handleInput),this._form!==null&&(this._form.removeEventListener("submit",this._handleFormSubmit),this._form.removeEventListener("reset",this._handleFormReset),this._form=null)}validate(){return this._validate()}_dispatchValidate(t,r,n){const{rootId:o,inputId:i,name:s,value:d}=this,c={selector:this.pair,value:this.pairValue};this.dispatchEvent(new CustomEvent(exports.PontConfirmField.VALIDATE_EVENT,{detail:{id:o,inputId:i,name:s,value:d,valid:t,type:r,pair:c,message:n},bubbles:!0,composed:!0}))}_onValidateSuccess(){this._invalid=!1,this._error="",this._dispatchValidate(!0,"success","Valid confirm.")}_onValidateError(t,r){this._invalid=!0,this._error=r,this._dispatchValidate(!1,t,r)}_validate(){const t=this.value;return this.required&&!t?(this._onValidateError("required",this.requiredError),!1):!t||this.validation==="simple"?(this._onValidateSuccess(),!0):t!==this.pairValue?(this._onValidateError("match",this.matchError),!1):(this._onValidateSuccess(),!0)}_renderMark(){let t;if(this.mark)t="mark";else if(this.required&&this.caret)t="caret";else return h;return l`
5061
5061
  <span
5062
5062
  id="${this.markId}"
5063
5063
  part="${exports.PontConfirmField.PARTS.mark}"
@@ -5119,7 +5119,7 @@
5119
5119
  </pont-field-description>
5120
5120
  `:h}
5121
5121
  </pont-field>
5122
- `}};exports.PontConfirmField.ROOT="confirm-field";exports.PontConfirmField.LABEL="label";exports.PontConfirmField.MARK="mark";exports.PontConfirmField.DESCRIPTION="description";exports.PontConfirmField.INPUT="input";exports.PontConfirmField.ERROR="error";exports.PontConfirmField.TAG=`${ht}-${exports.PontConfirmField.ROOT}`;exports.PontConfirmField.VALIDATE_EVENT=`${exports.PontConfirmField.TAG}:validate`;exports.PontConfirmField.PARTS={root:exports.PontConfirmField.ROOT,label:`${exports.PontConfirmField.ROOT}-${exports.PontConfirmField.LABEL}`,mark:`${exports.PontConfirmField.ROOT}-${exports.PontConfirmField.MARK}`,description:`${exports.PontConfirmField.ROOT}-${exports.PontConfirmField.DESCRIPTION}`,input:`${exports.PontConfirmField.ROOT}-${exports.PontConfirmField.INPUT}`,error:`${exports.PontConfirmField.ROOT}-${exports.PontConfirmField.ERROR}`};exports.PontConfirmField.INPUT_SELECTORS=`pont-input[part="${exports.PontConfirmField.PARTS.input}"], pont-password-input[part="${exports.PontConfirmField.PARTS.input}"]`;nt([a({type:String})],exports.PontConfirmField.prototype,"seed",2);nt([a({type:String,attribute:"custom-id"})],exports.PontConfirmField.prototype,"customId",2);nt([a({type:String,attribute:"input-id"})],exports.PontConfirmField.prototype,"inputId",1);nt([a({type:String})],exports.PontConfirmField.prototype,"name",1);nt([a({type:String,attribute:"default-value"})],exports.PontConfirmField.prototype,"defaultValue",2);nt([a({type:String})],exports.PontConfirmField.prototype,"label",1);nt([a({type:String})],exports.PontConfirmField.prototype,"placeholder",2);nt([a({type:String})],exports.PontConfirmField.prototype,"description",2);nt([a({type:String})],exports.PontConfirmField.prototype,"variant",2);nt([a({type:String})],exports.PontConfirmField.prototype,"mark",2);nt([a({type:Boolean})],exports.PontConfirmField.prototype,"caret",2);nt([a({type:String})],exports.PontConfirmField.prototype,"autocomplete",2);nt([a({type:Boolean})],exports.PontConfirmField.prototype,"disabled",2);nt([a({type:Boolean})],exports.PontConfirmField.prototype,"required",2);nt([a({type:String})],exports.PontConfirmField.prototype,"pair",2);nt([a({type:String})],exports.PontConfirmField.prototype,"validation",2);nt([a({type:String,attribute:"required-error"})],exports.PontConfirmField.prototype,"requiredError",1);nt([a({type:String,attribute:"match-error"})],exports.PontConfirmField.prototype,"matchError",1);nt([g()],exports.PontConfirmField.prototype,"_invalid",2);nt([g()],exports.PontConfirmField.prototype,"_error",2);nt([g()],exports.PontConfirmField.prototype,"_value",2);exports.PontConfirmField=nt([p("pont-confirm-field")],exports.PontConfirmField);var Q1=Object.defineProperty,Z1=Object.getOwnPropertyDescriptor,ut=(e,t,r,n)=>{for(var o=n>1?void 0:n?Z1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Q1(t,r,o),o};exports.PontEmailField=class extends f{constructor(){super(...arguments),this.seed=wt(),this._name=ao.name,this._label=ao.label,this.pattern=ao.pattern,this.validation=ao.validation,this._invalid=!1,this._error="",this._value="",this._dirty=!1,this._form=null,this._handleInput=t=>{const r=t.target,n=`${exports.PontEmailField.INPUT_SELECTORS} > input`;r.matches(n)&&(this._dirty=!0,this._value=r.value)},this._handleFormSubmit=t=>{this._validate()||t.preventDefault()},this._handleFormReset=()=>{const t=exports.PontEmailField.INPUT_SELECTORS,r=this.querySelector(t);r&&(r.value=this.defaultValue??""),this._invalid=!1,this._error="",this._value="",this._dirty=!1}}get _defaultInputId(){return`${this.rootId}-${exports.PontEmailField.INPUT}`}get inputId(){return this._inputId??this._defaultInputId}set inputId(t){const r=this.inputId;this._inputId=t||void 0,this.requestUpdate("inputId",r)}get name(){return this._name}set name(t){const r=this._name;this._name=t.length?t:ao.name,this.requestUpdate("name",r)}get label(){return this._label}set label(t){const r=this._label;this._label=t.length?t:ao.label,this.requestUpdate("label",r)}get _defaultRequiredError(){return Ft(this.label)}get requiredError(){return this._requiredError??this._defaultRequiredError}set requiredError(t){const r=this.requiredError;this._requiredError=t||void 0,this.requestUpdate("requiredError",r)}get _defaultFormatError(){return Ne(this.label)}get formatError(){return this._formatError??this._defaultFormatError}set formatError(t){const r=this.formatError;this._formatError=t||void 0,this.requestUpdate("formatError",r)}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontEmailField.TAG}-${this.seed}`}get labelId(){return`${this.rootId}-${exports.PontEmailField.LABEL}`}get markId(){return`${this.rootId}-${exports.PontEmailField.MARK}`}get descriptionId(){return`${this.rootId}-${exports.PontEmailField.DESCRIPTION}`}get errorId(){return`${this.rootId}-${exports.PontEmailField.ERROR}`}get value(){const t=this.defaultValue??"";return(this._dirty?this._value:t).trim().toLowerCase()}updated(t){if(t.has("defaultValue")&&!this._dirty){const r=exports.PontEmailField.INPUT_SELECTORS,n=this.querySelector(r);n&&(n.value=this.defaultValue??"")}}connectedCallback(){super.connectedCallback(),this.addEventListener("input",this._handleInput),this._form=this.closest("form"),this._form!==null&&(this._form.noValidate=!0,this._form.addEventListener("submit",this._handleFormSubmit),this._form.addEventListener("reset",this._handleFormReset))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("input",this._handleInput),this._form!==null&&(this._form.removeEventListener("submit",this._handleFormSubmit),this._form.removeEventListener("reset",this._handleFormReset),this._form=null)}validate(){return this._validate()}_dispatchValidate(t,r,n){const{rootId:o,inputId:i,name:s,value:d}=this;this.dispatchEvent(new CustomEvent(exports.PontEmailField.VALIDATE_EVENT,{detail:{id:o,inputId:i,name:s,value:d,valid:t,type:r,message:n},bubbles:!0,composed:!0}))}_onValidateSuccess(){this._invalid=!1,this._error="",this._dispatchValidate(!0,"success","Valid email.")}_onValidateError(t,r){this._invalid=!0,this._error=r,this._dispatchValidate(!1,t,r)}_validate(){const t=this.value;return this.required&&!t?(this._onValidateError("required",this.requiredError),!1):!t||this.validation==="simple"?(this._onValidateSuccess(),!0):new RegExp(this.pattern).test(t)?(this._onValidateSuccess(),!0):(this._onValidateError("format",this.formatError),!1)}_renderMark(){let t;if(this.mark)t="mark";else if(this.required&&this.caret)t="caret";else return h;return l`
5122
+ `}};exports.PontConfirmField.ROOT="confirm-field";exports.PontConfirmField.LABEL="label";exports.PontConfirmField.MARK="mark";exports.PontConfirmField.DESCRIPTION="description";exports.PontConfirmField.INPUT="input";exports.PontConfirmField.ERROR="error";exports.PontConfirmField.TAG=`${et}-${exports.PontConfirmField.ROOT}`;exports.PontConfirmField.VALIDATE_EVENT=`${exports.PontConfirmField.TAG}:validate`;exports.PontConfirmField.PARTS={root:exports.PontConfirmField.ROOT,label:`${exports.PontConfirmField.ROOT}-${exports.PontConfirmField.LABEL}`,mark:`${exports.PontConfirmField.ROOT}-${exports.PontConfirmField.MARK}`,description:`${exports.PontConfirmField.ROOT}-${exports.PontConfirmField.DESCRIPTION}`,input:`${exports.PontConfirmField.ROOT}-${exports.PontConfirmField.INPUT}`,error:`${exports.PontConfirmField.ROOT}-${exports.PontConfirmField.ERROR}`};exports.PontConfirmField.INPUT_SELECTORS=`pont-input[part="${exports.PontConfirmField.PARTS.input}"], pont-password-input[part="${exports.PontConfirmField.PARTS.input}"]`;it([a({type:String})],exports.PontConfirmField.prototype,"seed",2);it([a({type:String,attribute:"custom-id"})],exports.PontConfirmField.prototype,"customId",2);it([a({type:String,attribute:"input-id"})],exports.PontConfirmField.prototype,"inputId",1);it([a({type:String})],exports.PontConfirmField.prototype,"name",1);it([a({type:String,attribute:"default-value"})],exports.PontConfirmField.prototype,"defaultValue",2);it([a({type:String})],exports.PontConfirmField.prototype,"label",1);it([a({type:String})],exports.PontConfirmField.prototype,"placeholder",2);it([a({type:String})],exports.PontConfirmField.prototype,"description",2);it([a({type:String})],exports.PontConfirmField.prototype,"variant",2);it([a({type:String})],exports.PontConfirmField.prototype,"mark",2);it([a({type:Boolean})],exports.PontConfirmField.prototype,"caret",2);it([a({type:String})],exports.PontConfirmField.prototype,"autocomplete",2);it([a({type:Boolean})],exports.PontConfirmField.prototype,"disabled",2);it([a({type:Boolean})],exports.PontConfirmField.prototype,"required",2);it([a({type:String})],exports.PontConfirmField.prototype,"pair",2);it([a({type:String})],exports.PontConfirmField.prototype,"validation",2);it([a({type:String,attribute:"required-error"})],exports.PontConfirmField.prototype,"requiredError",1);it([a({type:String,attribute:"match-error"})],exports.PontConfirmField.prototype,"matchError",1);it([g()],exports.PontConfirmField.prototype,"_invalid",2);it([g()],exports.PontConfirmField.prototype,"_error",2);it([g()],exports.PontConfirmField.prototype,"_value",2);exports.PontConfirmField=it([p("pont-confirm-field")],exports.PontConfirmField);var Q1=Object.defineProperty,Z1=Object.getOwnPropertyDescriptor,ut=(e,t,r,n)=>{for(var o=n>1?void 0:n?Z1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Q1(t,r,o),o};exports.PontEmailField=class extends f{constructor(){super(...arguments),this.seed=wt(),this._name=ao.name,this._label=ao.label,this.pattern=ao.pattern,this.validation=ao.validation,this._invalid=!1,this._error="",this._value="",this._dirty=!1,this._form=null,this._handleInput=t=>{const r=t.target,n=`${exports.PontEmailField.INPUT_SELECTORS} > input`;r.matches(n)&&(this._dirty=!0,this._value=r.value)},this._handleFormSubmit=t=>{this._validate()||t.preventDefault()},this._handleFormReset=()=>{const t=exports.PontEmailField.INPUT_SELECTORS,r=this.querySelector(t);r&&(r.value=this.defaultValue??""),this._invalid=!1,this._error="",this._value="",this._dirty=!1}}get _defaultInputId(){return`${this.rootId}-${exports.PontEmailField.INPUT}`}get inputId(){return this._inputId??this._defaultInputId}set inputId(t){const r=this.inputId;this._inputId=t||void 0,this.requestUpdate("inputId",r)}get name(){return this._name}set name(t){const r=this._name;this._name=t.length?t:ao.name,this.requestUpdate("name",r)}get label(){return this._label}set label(t){const r=this._label;this._label=t.length?t:ao.label,this.requestUpdate("label",r)}get _defaultRequiredError(){return Ft(this.label)}get requiredError(){return this._requiredError??this._defaultRequiredError}set requiredError(t){const r=this.requiredError;this._requiredError=t||void 0,this.requestUpdate("requiredError",r)}get _defaultFormatError(){return Ne(this.label)}get formatError(){return this._formatError??this._defaultFormatError}set formatError(t){const r=this.formatError;this._formatError=t||void 0,this.requestUpdate("formatError",r)}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontEmailField.TAG}-${this.seed}`}get labelId(){return`${this.rootId}-${exports.PontEmailField.LABEL}`}get markId(){return`${this.rootId}-${exports.PontEmailField.MARK}`}get descriptionId(){return`${this.rootId}-${exports.PontEmailField.DESCRIPTION}`}get errorId(){return`${this.rootId}-${exports.PontEmailField.ERROR}`}get value(){const t=this.defaultValue??"";return(this._dirty?this._value:t).trim().toLowerCase()}updated(t){if(t.has("defaultValue")&&!this._dirty){const r=exports.PontEmailField.INPUT_SELECTORS,n=this.querySelector(r);n&&(n.value=this.defaultValue??"")}}connectedCallback(){super.connectedCallback(),this.addEventListener("input",this._handleInput),this._form=this.closest("form"),this._form!==null&&(this._form.noValidate=!0,this._form.addEventListener("submit",this._handleFormSubmit),this._form.addEventListener("reset",this._handleFormReset))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("input",this._handleInput),this._form!==null&&(this._form.removeEventListener("submit",this._handleFormSubmit),this._form.removeEventListener("reset",this._handleFormReset),this._form=null)}validate(){return this._validate()}_dispatchValidate(t,r,n){const{rootId:o,inputId:i,name:s,value:d}=this;this.dispatchEvent(new CustomEvent(exports.PontEmailField.VALIDATE_EVENT,{detail:{id:o,inputId:i,name:s,value:d,valid:t,type:r,message:n},bubbles:!0,composed:!0}))}_onValidateSuccess(){this._invalid=!1,this._error="",this._dispatchValidate(!0,"success","Valid email.")}_onValidateError(t,r){this._invalid=!0,this._error=r,this._dispatchValidate(!1,t,r)}_validate(){const t=this.value;return this.required&&!t?(this._onValidateError("required",this.requiredError),!1):!t||this.validation==="simple"?(this._onValidateSuccess(),!0):new RegExp(this.pattern).test(t)?(this._onValidateSuccess(),!0):(this._onValidateError("format",this.formatError),!1)}_renderMark(){let t;if(this.mark)t="mark";else if(this.required&&this.caret)t="caret";else return h;return l`
5123
5123
  <span
5124
5124
  id="${this.markId}"
5125
5125
  part="${exports.PontEmailField.PARTS.mark}"
@@ -5169,7 +5169,7 @@
5169
5169
  </pont-field-description>
5170
5170
  `:h}
5171
5171
  </pont-field>
5172
- `}};exports.PontEmailField.ROOT="email-field";exports.PontEmailField.LABEL="label";exports.PontEmailField.MARK="mark";exports.PontEmailField.DESCRIPTION="description";exports.PontEmailField.INPUT="input";exports.PontEmailField.ERROR="error";exports.PontEmailField.TAG=`${ht}-${exports.PontEmailField.ROOT}`;exports.PontEmailField.VALIDATE_EVENT=`${exports.PontEmailField.TAG}:validate`;exports.PontEmailField.PARTS={root:exports.PontEmailField.ROOT,label:`${exports.PontEmailField.ROOT}-${exports.PontEmailField.LABEL}`,mark:`${exports.PontEmailField.ROOT}-${exports.PontEmailField.MARK}`,description:`${exports.PontEmailField.ROOT}-${exports.PontEmailField.DESCRIPTION}`,input:`${exports.PontEmailField.ROOT}-${exports.PontEmailField.INPUT}`,error:`${exports.PontEmailField.ROOT}-${exports.PontEmailField.ERROR}`};exports.PontEmailField.INPUT_SELECTORS=`pont-input[part="${exports.PontEmailField.PARTS.input}"]`;ut([a({type:String})],exports.PontEmailField.prototype,"seed",2);ut([a({type:String,attribute:"custom-id"})],exports.PontEmailField.prototype,"customId",2);ut([a({type:String,attribute:"input-id"})],exports.PontEmailField.prototype,"inputId",1);ut([a({type:String})],exports.PontEmailField.prototype,"name",1);ut([a({type:String,attribute:"default-value"})],exports.PontEmailField.prototype,"defaultValue",2);ut([a({type:String})],exports.PontEmailField.prototype,"label",1);ut([a({type:String})],exports.PontEmailField.prototype,"placeholder",2);ut([a({type:String})],exports.PontEmailField.prototype,"description",2);ut([a({type:String})],exports.PontEmailField.prototype,"mark",2);ut([a({type:Boolean})],exports.PontEmailField.prototype,"caret",2);ut([a({type:String})],exports.PontEmailField.prototype,"autocomplete",2);ut([a({type:Boolean})],exports.PontEmailField.prototype,"disabled",2);ut([a({type:Boolean})],exports.PontEmailField.prototype,"required",2);ut([a({type:String})],exports.PontEmailField.prototype,"pattern",2);ut([a({type:String})],exports.PontEmailField.prototype,"validation",2);ut([a({type:String,attribute:"required-error"})],exports.PontEmailField.prototype,"requiredError",1);ut([a({type:String,attribute:"format-error"})],exports.PontEmailField.prototype,"formatError",1);ut([g()],exports.PontEmailField.prototype,"_invalid",2);ut([g()],exports.PontEmailField.prototype,"_error",2);ut([g()],exports.PontEmailField.prototype,"_value",2);exports.PontEmailField=ut([p("pont-email-field")],exports.PontEmailField);var J1=Object.defineProperty,X1=Object.getOwnPropertyDescriptor,yt=(e,t,r,n)=>{for(var o=n>1?void 0:n?X1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&J1(t,r,o),o};exports.PontIdentifierField=class extends f{constructor(){super(...arguments),this.seed=wt(),this._name=Qo.name,this.identifiers=Qo.identifiers,this.design=new Rn(this),this.validation=Qo.validation,this._invalid=!1,this._error="",this._value="",this._dirty=!1,this._form=null,this._handleInput=t=>{const r=t.target,n=`${exports.PontIdentifierField.INPUT_SELECTORS} > input`;r.matches(n)&&(this._dirty=!0,this._value=r.value)},this._handleFormSubmit=t=>{this._validate()||t.preventDefault()},this._handleFormReset=()=>{const t=exports.PontIdentifierField.INPUT_SELECTORS,r=this.querySelector(t);r&&(r.value=this.defaultValue??""),this._invalid=!1,this._error="",this._value="",this._dirty=!1}}get _defaultInputId(){return`${this.rootId}-${exports.PontIdentifierField.INPUT}`}get inputId(){return this._inputId??this._defaultInputId}set inputId(t){const r=this.inputId;this._inputId=t||void 0,this.requestUpdate("inputId",r)}get name(){return this._name}set name(t){const r=this._name;this._name=t.length?t:Qo.name,this.requestUpdate("name",r)}get _identifiers(){return this.identifiers.length===0&&this.design.active?["email","username","phone"]:this.identifiers}get _defaultLabel(){const t=this._identifiers;if(t.length===0)return Qo.label;let r=t[0];if(t.length>1){const n=t.slice(0,-1).join(", "),o=t.length>2?", or ":" or ",i=t.slice(-1)[0];r=n+o+i}return r.charAt(0).toUpperCase()+r.slice(1)}get label(){return this._label??this._defaultLabel}set label(t){const r=this.label;this._label=t||void 0,this.requestUpdate("label",r)}get _defaultRequiredError(){return Ft(this.label)}get requiredError(){return this._requiredError??this._defaultRequiredError}set requiredError(t){const r=this.requiredError;this._requiredError=t||void 0,this.requestUpdate("requiredError",r)}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontIdentifierField.TAG}-${this.seed}`}get labelId(){return`${this.rootId}-${exports.PontIdentifierField.LABEL}`}get markId(){return`${this.rootId}-${exports.PontIdentifierField.MARK}`}get descriptionId(){return`${this.rootId}-${exports.PontIdentifierField.DESCRIPTION}`}get errorId(){return`${this.rootId}-${exports.PontIdentifierField.ERROR}`}get value(){const t=this.defaultValue??"";return(this._dirty?this._value:t).trim().toLowerCase()}get _type(){const t=this._identifiers.join();return t==="email"?"email":t==="phone"?"tel":"text"}updated(t){if(t.has("defaultValue")&&!this._dirty){const r=exports.PontIdentifierField.INPUT_SELECTORS,n=this.querySelector(r);n&&(n.value=this.defaultValue??"")}}connectedCallback(){super.connectedCallback(),this.addEventListener("input",this._handleInput),this._form=this.closest("form"),this._form!==null&&(this._form.noValidate=!0,this._form.addEventListener("submit",this._handleFormSubmit),this._form.addEventListener("reset",this._handleFormReset))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("input",this._handleInput),this._form!==null&&(this._form.removeEventListener("submit",this._handleFormSubmit),this._form.removeEventListener("reset",this._handleFormReset),this._form=null)}validate(){return this._validate()}_dispatchValidate(t,r,n){const{rootId:o,inputId:i,name:s,identifiers:d,value:c}=this;this.dispatchEvent(new CustomEvent(exports.PontIdentifierField.VALIDATE_EVENT,{detail:{id:o,inputId:i,name:s,identifiers:d,value:c,valid:t,type:r,message:n},bubbles:!0,composed:!0}))}_onValidateSuccess(){this._invalid=!1,this._error="",this._dispatchValidate(!0,"success","Valid identifier.")}_onValidateError(t,r){this._invalid=!0,this._error=r,this._dispatchValidate(!1,t,r)}_validate(){const t=this.value;return this.required&&!t?(this._onValidateError("required",this.requiredError),!1):(this._onValidateSuccess(),!0)}_renderMark(){let t;if(this.mark)t="mark";else if(this.required&&this.caret)t="caret";else return h;return l`
5172
+ `}};exports.PontEmailField.ROOT="email-field";exports.PontEmailField.LABEL="label";exports.PontEmailField.MARK="mark";exports.PontEmailField.DESCRIPTION="description";exports.PontEmailField.INPUT="input";exports.PontEmailField.ERROR="error";exports.PontEmailField.TAG=`${et}-${exports.PontEmailField.ROOT}`;exports.PontEmailField.VALIDATE_EVENT=`${exports.PontEmailField.TAG}:validate`;exports.PontEmailField.PARTS={root:exports.PontEmailField.ROOT,label:`${exports.PontEmailField.ROOT}-${exports.PontEmailField.LABEL}`,mark:`${exports.PontEmailField.ROOT}-${exports.PontEmailField.MARK}`,description:`${exports.PontEmailField.ROOT}-${exports.PontEmailField.DESCRIPTION}`,input:`${exports.PontEmailField.ROOT}-${exports.PontEmailField.INPUT}`,error:`${exports.PontEmailField.ROOT}-${exports.PontEmailField.ERROR}`};exports.PontEmailField.INPUT_SELECTORS=`pont-input[part="${exports.PontEmailField.PARTS.input}"]`;ut([a({type:String})],exports.PontEmailField.prototype,"seed",2);ut([a({type:String,attribute:"custom-id"})],exports.PontEmailField.prototype,"customId",2);ut([a({type:String,attribute:"input-id"})],exports.PontEmailField.prototype,"inputId",1);ut([a({type:String})],exports.PontEmailField.prototype,"name",1);ut([a({type:String,attribute:"default-value"})],exports.PontEmailField.prototype,"defaultValue",2);ut([a({type:String})],exports.PontEmailField.prototype,"label",1);ut([a({type:String})],exports.PontEmailField.prototype,"placeholder",2);ut([a({type:String})],exports.PontEmailField.prototype,"description",2);ut([a({type:String})],exports.PontEmailField.prototype,"mark",2);ut([a({type:Boolean})],exports.PontEmailField.prototype,"caret",2);ut([a({type:String})],exports.PontEmailField.prototype,"autocomplete",2);ut([a({type:Boolean})],exports.PontEmailField.prototype,"disabled",2);ut([a({type:Boolean})],exports.PontEmailField.prototype,"required",2);ut([a({type:String})],exports.PontEmailField.prototype,"pattern",2);ut([a({type:String})],exports.PontEmailField.prototype,"validation",2);ut([a({type:String,attribute:"required-error"})],exports.PontEmailField.prototype,"requiredError",1);ut([a({type:String,attribute:"format-error"})],exports.PontEmailField.prototype,"formatError",1);ut([g()],exports.PontEmailField.prototype,"_invalid",2);ut([g()],exports.PontEmailField.prototype,"_error",2);ut([g()],exports.PontEmailField.prototype,"_value",2);exports.PontEmailField=ut([p("pont-email-field")],exports.PontEmailField);var J1=Object.defineProperty,X1=Object.getOwnPropertyDescriptor,yt=(e,t,r,n)=>{for(var o=n>1?void 0:n?X1(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&J1(t,r,o),o};exports.PontIdentifierField=class extends f{constructor(){super(...arguments),this.seed=wt(),this._name=Qo.name,this.identifiers=Qo.identifiers,this.design=new Rn(this),this.validation=Qo.validation,this._invalid=!1,this._error="",this._value="",this._dirty=!1,this._form=null,this._handleInput=t=>{const r=t.target,n=`${exports.PontIdentifierField.INPUT_SELECTORS} > input`;r.matches(n)&&(this._dirty=!0,this._value=r.value)},this._handleFormSubmit=t=>{this._validate()||t.preventDefault()},this._handleFormReset=()=>{const t=exports.PontIdentifierField.INPUT_SELECTORS,r=this.querySelector(t);r&&(r.value=this.defaultValue??""),this._invalid=!1,this._error="",this._value="",this._dirty=!1}}get _defaultInputId(){return`${this.rootId}-${exports.PontIdentifierField.INPUT}`}get inputId(){return this._inputId??this._defaultInputId}set inputId(t){const r=this.inputId;this._inputId=t||void 0,this.requestUpdate("inputId",r)}get name(){return this._name}set name(t){const r=this._name;this._name=t.length?t:Qo.name,this.requestUpdate("name",r)}get _identifiers(){return this.identifiers.length===0&&this.design.active?["email","username","phone"]:this.identifiers}get _defaultLabel(){const t=this._identifiers;if(t.length===0)return Qo.label;let r=t[0];if(t.length>1){const n=t.slice(0,-1).join(", "),o=t.length>2?", or ":" or ",i=t.slice(-1)[0];r=n+o+i}return r.charAt(0).toUpperCase()+r.slice(1)}get label(){return this._label??this._defaultLabel}set label(t){const r=this.label;this._label=t||void 0,this.requestUpdate("label",r)}get _defaultRequiredError(){return Ft(this.label)}get requiredError(){return this._requiredError??this._defaultRequiredError}set requiredError(t){const r=this.requiredError;this._requiredError=t||void 0,this.requestUpdate("requiredError",r)}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontIdentifierField.TAG}-${this.seed}`}get labelId(){return`${this.rootId}-${exports.PontIdentifierField.LABEL}`}get markId(){return`${this.rootId}-${exports.PontIdentifierField.MARK}`}get descriptionId(){return`${this.rootId}-${exports.PontIdentifierField.DESCRIPTION}`}get errorId(){return`${this.rootId}-${exports.PontIdentifierField.ERROR}`}get value(){const t=this.defaultValue??"";return(this._dirty?this._value:t).trim().toLowerCase()}get _type(){const t=this._identifiers.join();return t==="email"?"email":t==="phone"?"tel":"text"}updated(t){if(t.has("defaultValue")&&!this._dirty){const r=exports.PontIdentifierField.INPUT_SELECTORS,n=this.querySelector(r);n&&(n.value=this.defaultValue??"")}}connectedCallback(){super.connectedCallback(),this.addEventListener("input",this._handleInput),this._form=this.closest("form"),this._form!==null&&(this._form.noValidate=!0,this._form.addEventListener("submit",this._handleFormSubmit),this._form.addEventListener("reset",this._handleFormReset))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("input",this._handleInput),this._form!==null&&(this._form.removeEventListener("submit",this._handleFormSubmit),this._form.removeEventListener("reset",this._handleFormReset),this._form=null)}validate(){return this._validate()}_dispatchValidate(t,r,n){const{rootId:o,inputId:i,name:s,identifiers:d,value:c}=this;this.dispatchEvent(new CustomEvent(exports.PontIdentifierField.VALIDATE_EVENT,{detail:{id:o,inputId:i,name:s,identifiers:d,value:c,valid:t,type:r,message:n},bubbles:!0,composed:!0}))}_onValidateSuccess(){this._invalid=!1,this._error="",this._dispatchValidate(!0,"success","Valid identifier.")}_onValidateError(t,r){this._invalid=!0,this._error=r,this._dispatchValidate(!1,t,r)}_validate(){const t=this.value;return this.required&&!t?(this._onValidateError("required",this.requiredError),!1):(this._onValidateSuccess(),!0)}_renderMark(){let t;if(this.mark)t="mark";else if(this.required&&this.caret)t="caret";else return h;return l`
5173
5173
  <span
5174
5174
  id="${this.markId}"
5175
5175
  part="${exports.PontIdentifierField.PARTS.mark}"
@@ -5219,7 +5219,7 @@
5219
5219
  </pont-field-description>
5220
5220
  `:h}
5221
5221
  </pont-field>
5222
- `}};exports.PontIdentifierField.ROOT="identifier-field";exports.PontIdentifierField.LABEL="label";exports.PontIdentifierField.MARK="mark";exports.PontIdentifierField.DESCRIPTION="description";exports.PontIdentifierField.INPUT="input";exports.PontIdentifierField.ERROR="error";exports.PontIdentifierField.TAG=`${ht}-${exports.PontIdentifierField.ROOT}`;exports.PontIdentifierField.VALIDATE_EVENT=`${exports.PontIdentifierField.TAG}:validate`;exports.PontIdentifierField.PARTS={root:exports.PontIdentifierField.ROOT,label:`${exports.PontIdentifierField.ROOT}-${exports.PontIdentifierField.LABEL}`,mark:`${exports.PontIdentifierField.ROOT}-${exports.PontIdentifierField.MARK}`,description:`${exports.PontIdentifierField.ROOT}-${exports.PontIdentifierField.DESCRIPTION}`,input:`${exports.PontIdentifierField.ROOT}-${exports.PontIdentifierField.INPUT}`,error:`${exports.PontIdentifierField.ROOT}-${exports.PontIdentifierField.ERROR}`};exports.PontIdentifierField.INPUT_SELECTORS=`pont-input[part="${exports.PontIdentifierField.PARTS.input}"]`;yt([a({type:String})],exports.PontIdentifierField.prototype,"seed",2);yt([a({type:String,attribute:"custom-id"})],exports.PontIdentifierField.prototype,"customId",2);yt([a({type:String,attribute:"input-id"})],exports.PontIdentifierField.prototype,"inputId",1);yt([a({type:String})],exports.PontIdentifierField.prototype,"name",1);yt([a({type:String,attribute:"default-value"})],exports.PontIdentifierField.prototype,"defaultValue",2);yt([a({type:Array})],exports.PontIdentifierField.prototype,"identifiers",2);yt([a({type:String})],exports.PontIdentifierField.prototype,"label",1);yt([a({type:String})],exports.PontIdentifierField.prototype,"placeholder",2);yt([a({type:String})],exports.PontIdentifierField.prototype,"description",2);yt([a({type:String})],exports.PontIdentifierField.prototype,"mark",2);yt([a({type:Boolean})],exports.PontIdentifierField.prototype,"caret",2);yt([a({type:String})],exports.PontIdentifierField.prototype,"autocomplete",2);yt([a({type:Boolean})],exports.PontIdentifierField.prototype,"disabled",2);yt([a({type:Boolean})],exports.PontIdentifierField.prototype,"required",2);yt([a({type:String})],exports.PontIdentifierField.prototype,"validation",2);yt([a({type:String,attribute:"required-error"})],exports.PontIdentifierField.prototype,"requiredError",1);yt([g()],exports.PontIdentifierField.prototype,"_invalid",2);yt([g()],exports.PontIdentifierField.prototype,"_error",2);yt([g()],exports.PontIdentifierField.prototype,"_value",2);exports.PontIdentifierField=yt([p("pont-identifier-field")],exports.PontIdentifierField);var t0=Object.defineProperty,e0=Object.getOwnPropertyDescriptor,Z=(e,t,r,n)=>{for(var o=n>1?void 0:n?e0(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&t0(t,r,o),o};exports.PontNameField=class extends f{constructor(){super(...arguments),this.seed=wt(),this._name=po.name,this._label=po.label,this.pattern=po.pattern,this.validation=po.validation,this._invalid=!1,this._error="",this._value="",this._dirty=!1,this._form=null,this._handleInput=t=>{const r=t.target,n=`${exports.PontNameField.INPUT_SELECTORS} > input`;r.matches(n)&&(this._dirty=!0,this._value=r.value)},this._handleFormSubmit=t=>{this._validate()||t.preventDefault()},this._handleFormReset=()=>{const t=exports.PontNameField.INPUT_SELECTORS,r=this.querySelector(t);r&&(r.value=this.defaultValue??""),this._invalid=!1,this._error="",this._value="",this._dirty=!1}}get _defaultInputId(){return`${this.rootId}-${exports.PontNameField.INPUT}`}get inputId(){return this._inputId??this._defaultInputId}set inputId(t){const r=this.inputId;this._inputId=t||void 0,this.requestUpdate("inputId",r)}get name(){return this._name}set name(t){const r=this._name;this._name=t.length?t:po.name,this.requestUpdate("name",r)}get label(){return this._label}set label(t){const r=this._label;this._label=t.length?t:po.label,this.requestUpdate("label",r)}get minlength(){return this._minlength}set minlength(t){const r=this._minlength;this._minlength=t===void 0||t>0?t:void 0,this.requestUpdate("minlength",r)}get maxlength(){return this._maxlength}set maxlength(t){const r=this._maxlength;if(t===void 0||t<=0)this._maxlength=void 0;else{const{minlength:n}=this;this._maxlength=n?Math.max(t,n):t}this.requestUpdate("maxlength",r)}get _defaultRequiredError(){return Ft(this.label)}get requiredError(){return this._requiredError??this._defaultRequiredError}set requiredError(t){const r=this.requiredError;this._requiredError=t||void 0,this.requestUpdate("requiredError",r)}get _defaultMinlengthError(){return jo(this.label,this.minlength)}get minlengthError(){return this._minlengthError??this._defaultMinlengthError}set minlengthError(t){const r=this.minlengthError;this._minlengthError=t||void 0,this.requestUpdate("minlengthError",r)}get _defaultMaxlengthError(){return qo(this.label,this.maxlength)}get maxlengthError(){return this._maxlengthError??this._defaultMaxlengthError}set maxlengthError(t){const r=this.maxlengthError;this._maxlengthError=t||void 0,this.requestUpdate("maxlengthError",r)}get _defaultFormatError(){return Ne(this.label)}get formatError(){return this._formatError??this._defaultFormatError}set formatError(t){const r=this.formatError;this._formatError=t||void 0,this.requestUpdate("formatError",r)}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontNameField.TAG}-${this.seed}`}get labelId(){return`${this.rootId}-${exports.PontNameField.LABEL}`}get markId(){return`${this.rootId}-${exports.PontNameField.MARK}`}get descriptionId(){return`${this.rootId}-${exports.PontNameField.DESCRIPTION}`}get errorId(){return`${this.rootId}-${exports.PontNameField.ERROR}`}get value(){const t=this.defaultValue??"";return(this._dirty?this._value:t).trim().replace(/\s+/g," ")}updated(t){if(t.has("defaultValue")&&!this._dirty){const r=exports.PontNameField.INPUT_SELECTORS,n=this.querySelector(r);n&&(n.value=this.defaultValue??"")}}connectedCallback(){super.connectedCallback(),this.addEventListener("input",this._handleInput),this._form=this.closest("form"),this._form!==null&&(this._form.noValidate=!0,this._form.addEventListener("submit",this._handleFormSubmit),this._form.addEventListener("reset",this._handleFormReset))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("input",this._handleInput),this._form!==null&&(this._form.removeEventListener("submit",this._handleFormSubmit),this._form.removeEventListener("reset",this._handleFormReset),this._form=null)}validate(){return this._validate()}_dispatchValidate(t,r,n){const{rootId:o,inputId:i,name:s,value:d}=this;this.dispatchEvent(new CustomEvent(exports.PontNameField.VALIDATE_EVENT,{detail:{id:o,inputId:i,name:s,value:d,valid:t,type:r,message:n},bubbles:!0,composed:!0}))}_onValidateSuccess(){this._invalid=!1,this._error="",this._dispatchValidate(!0,"success","Valid name.")}_onValidateError(t,r){this._invalid=!0,this._error=r,this._dispatchValidate(!1,t,r)}_validate(){const t=this.value;if(this.required&&!t)return this._onValidateError("required",this.requiredError),!1;if(!t||this.validation==="simple")return this._onValidateSuccess(),!0;const{minlength:r}=this;if(r&&t.length<r)return this._onValidateError("minlength",this.minlengthError),!1;const{maxlength:n}=this;return n&&t.length>n?(this._onValidateError("maxlength",this.maxlengthError),!1):new RegExp(this.pattern,"u").test(t)?(this._onValidateSuccess(),!0):(this._onValidateError("format",this.formatError),!1)}_renderMark(){let t;if(this.mark)t="mark";else if(this.required&&this.caret)t="caret";else return h;return l`
5222
+ `}};exports.PontIdentifierField.ROOT="identifier-field";exports.PontIdentifierField.LABEL="label";exports.PontIdentifierField.MARK="mark";exports.PontIdentifierField.DESCRIPTION="description";exports.PontIdentifierField.INPUT="input";exports.PontIdentifierField.ERROR="error";exports.PontIdentifierField.TAG=`${et}-${exports.PontIdentifierField.ROOT}`;exports.PontIdentifierField.VALIDATE_EVENT=`${exports.PontIdentifierField.TAG}:validate`;exports.PontIdentifierField.PARTS={root:exports.PontIdentifierField.ROOT,label:`${exports.PontIdentifierField.ROOT}-${exports.PontIdentifierField.LABEL}`,mark:`${exports.PontIdentifierField.ROOT}-${exports.PontIdentifierField.MARK}`,description:`${exports.PontIdentifierField.ROOT}-${exports.PontIdentifierField.DESCRIPTION}`,input:`${exports.PontIdentifierField.ROOT}-${exports.PontIdentifierField.INPUT}`,error:`${exports.PontIdentifierField.ROOT}-${exports.PontIdentifierField.ERROR}`};exports.PontIdentifierField.INPUT_SELECTORS=`pont-input[part="${exports.PontIdentifierField.PARTS.input}"]`;yt([a({type:String})],exports.PontIdentifierField.prototype,"seed",2);yt([a({type:String,attribute:"custom-id"})],exports.PontIdentifierField.prototype,"customId",2);yt([a({type:String,attribute:"input-id"})],exports.PontIdentifierField.prototype,"inputId",1);yt([a({type:String})],exports.PontIdentifierField.prototype,"name",1);yt([a({type:String,attribute:"default-value"})],exports.PontIdentifierField.prototype,"defaultValue",2);yt([a({type:Array})],exports.PontIdentifierField.prototype,"identifiers",2);yt([a({type:String})],exports.PontIdentifierField.prototype,"label",1);yt([a({type:String})],exports.PontIdentifierField.prototype,"placeholder",2);yt([a({type:String})],exports.PontIdentifierField.prototype,"description",2);yt([a({type:String})],exports.PontIdentifierField.prototype,"mark",2);yt([a({type:Boolean})],exports.PontIdentifierField.prototype,"caret",2);yt([a({type:String})],exports.PontIdentifierField.prototype,"autocomplete",2);yt([a({type:Boolean})],exports.PontIdentifierField.prototype,"disabled",2);yt([a({type:Boolean})],exports.PontIdentifierField.prototype,"required",2);yt([a({type:String})],exports.PontIdentifierField.prototype,"validation",2);yt([a({type:String,attribute:"required-error"})],exports.PontIdentifierField.prototype,"requiredError",1);yt([g()],exports.PontIdentifierField.prototype,"_invalid",2);yt([g()],exports.PontIdentifierField.prototype,"_error",2);yt([g()],exports.PontIdentifierField.prototype,"_value",2);exports.PontIdentifierField=yt([p("pont-identifier-field")],exports.PontIdentifierField);var t0=Object.defineProperty,e0=Object.getOwnPropertyDescriptor,Z=(e,t,r,n)=>{for(var o=n>1?void 0:n?e0(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&t0(t,r,o),o};exports.PontNameField=class extends f{constructor(){super(...arguments),this.seed=wt(),this._name=po.name,this._label=po.label,this.pattern=po.pattern,this.validation=po.validation,this._invalid=!1,this._error="",this._value="",this._dirty=!1,this._form=null,this._handleInput=t=>{const r=t.target,n=`${exports.PontNameField.INPUT_SELECTORS} > input`;r.matches(n)&&(this._dirty=!0,this._value=r.value)},this._handleFormSubmit=t=>{this._validate()||t.preventDefault()},this._handleFormReset=()=>{const t=exports.PontNameField.INPUT_SELECTORS,r=this.querySelector(t);r&&(r.value=this.defaultValue??""),this._invalid=!1,this._error="",this._value="",this._dirty=!1}}get _defaultInputId(){return`${this.rootId}-${exports.PontNameField.INPUT}`}get inputId(){return this._inputId??this._defaultInputId}set inputId(t){const r=this.inputId;this._inputId=t||void 0,this.requestUpdate("inputId",r)}get name(){return this._name}set name(t){const r=this._name;this._name=t.length?t:po.name,this.requestUpdate("name",r)}get label(){return this._label}set label(t){const r=this._label;this._label=t.length?t:po.label,this.requestUpdate("label",r)}get minlength(){return this._minlength}set minlength(t){const r=this._minlength;this._minlength=t===void 0||t>0?t:void 0,this.requestUpdate("minlength",r)}get maxlength(){return this._maxlength}set maxlength(t){const r=this._maxlength;if(t===void 0||t<=0)this._maxlength=void 0;else{const{minlength:n}=this;this._maxlength=n?Math.max(t,n):t}this.requestUpdate("maxlength",r)}get _defaultRequiredError(){return Ft(this.label)}get requiredError(){return this._requiredError??this._defaultRequiredError}set requiredError(t){const r=this.requiredError;this._requiredError=t||void 0,this.requestUpdate("requiredError",r)}get _defaultMinlengthError(){return jo(this.label,this.minlength)}get minlengthError(){return this._minlengthError??this._defaultMinlengthError}set minlengthError(t){const r=this.minlengthError;this._minlengthError=t||void 0,this.requestUpdate("minlengthError",r)}get _defaultMaxlengthError(){return qo(this.label,this.maxlength)}get maxlengthError(){return this._maxlengthError??this._defaultMaxlengthError}set maxlengthError(t){const r=this.maxlengthError;this._maxlengthError=t||void 0,this.requestUpdate("maxlengthError",r)}get _defaultFormatError(){return Ne(this.label)}get formatError(){return this._formatError??this._defaultFormatError}set formatError(t){const r=this.formatError;this._formatError=t||void 0,this.requestUpdate("formatError",r)}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontNameField.TAG}-${this.seed}`}get labelId(){return`${this.rootId}-${exports.PontNameField.LABEL}`}get markId(){return`${this.rootId}-${exports.PontNameField.MARK}`}get descriptionId(){return`${this.rootId}-${exports.PontNameField.DESCRIPTION}`}get errorId(){return`${this.rootId}-${exports.PontNameField.ERROR}`}get value(){const t=this.defaultValue??"";return(this._dirty?this._value:t).trim().replace(/\s+/g," ")}updated(t){if(t.has("defaultValue")&&!this._dirty){const r=exports.PontNameField.INPUT_SELECTORS,n=this.querySelector(r);n&&(n.value=this.defaultValue??"")}}connectedCallback(){super.connectedCallback(),this.addEventListener("input",this._handleInput),this._form=this.closest("form"),this._form!==null&&(this._form.noValidate=!0,this._form.addEventListener("submit",this._handleFormSubmit),this._form.addEventListener("reset",this._handleFormReset))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("input",this._handleInput),this._form!==null&&(this._form.removeEventListener("submit",this._handleFormSubmit),this._form.removeEventListener("reset",this._handleFormReset),this._form=null)}validate(){return this._validate()}_dispatchValidate(t,r,n){const{rootId:o,inputId:i,name:s,value:d}=this;this.dispatchEvent(new CustomEvent(exports.PontNameField.VALIDATE_EVENT,{detail:{id:o,inputId:i,name:s,value:d,valid:t,type:r,message:n},bubbles:!0,composed:!0}))}_onValidateSuccess(){this._invalid=!1,this._error="",this._dispatchValidate(!0,"success","Valid name.")}_onValidateError(t,r){this._invalid=!0,this._error=r,this._dispatchValidate(!1,t,r)}_validate(){const t=this.value;if(this.required&&!t)return this._onValidateError("required",this.requiredError),!1;if(!t||this.validation==="simple")return this._onValidateSuccess(),!0;const{minlength:r}=this;if(r&&t.length<r)return this._onValidateError("minlength",this.minlengthError),!1;const{maxlength:n}=this;return n&&t.length>n?(this._onValidateError("maxlength",this.maxlengthError),!1):new RegExp(this.pattern,"u").test(t)?(this._onValidateSuccess(),!0):(this._onValidateError("format",this.formatError),!1)}_renderMark(){let t;if(this.mark)t="mark";else if(this.required&&this.caret)t="caret";else return h;return l`
5223
5223
  <span
5224
5224
  id="${this.markId}"
5225
5225
  part="${exports.PontNameField.PARTS.mark}"
@@ -5269,7 +5269,7 @@
5269
5269
  </pont-field-description>
5270
5270
  `:h}
5271
5271
  </pont-field>
5272
- `}};exports.PontNameField.ROOT="name-field";exports.PontNameField.LABEL="label";exports.PontNameField.MARK="mark";exports.PontNameField.DESCRIPTION="description";exports.PontNameField.INPUT="input";exports.PontNameField.ERROR="error";exports.PontNameField.TAG=`${ht}-${exports.PontNameField.ROOT}`;exports.PontNameField.VALIDATE_EVENT=`${exports.PontNameField.TAG}:validate`;exports.PontNameField.PARTS={root:exports.PontNameField.ROOT,label:`${exports.PontNameField.ROOT}-${exports.PontNameField.LABEL}`,mark:`${exports.PontNameField.ROOT}-${exports.PontNameField.MARK}`,description:`${exports.PontNameField.ROOT}-${exports.PontNameField.DESCRIPTION}`,input:`${exports.PontNameField.ROOT}-${exports.PontNameField.INPUT}`,error:`${exports.PontNameField.ROOT}-${exports.PontNameField.ERROR}`};exports.PontNameField.INPUT_SELECTORS=`pont-input[part="${exports.PontNameField.PARTS.input}"]`;Z([a({type:String})],exports.PontNameField.prototype,"seed",2);Z([a({type:String,attribute:"custom-id"})],exports.PontNameField.prototype,"customId",2);Z([a({type:String,attribute:"input-id"})],exports.PontNameField.prototype,"inputId",1);Z([a({type:String})],exports.PontNameField.prototype,"name",1);Z([a({type:String,attribute:"default-value"})],exports.PontNameField.prototype,"defaultValue",2);Z([a({type:String})],exports.PontNameField.prototype,"label",1);Z([a({type:String})],exports.PontNameField.prototype,"placeholder",2);Z([a({type:String})],exports.PontNameField.prototype,"description",2);Z([a({type:String})],exports.PontNameField.prototype,"mark",2);Z([a({type:Boolean})],exports.PontNameField.prototype,"caret",2);Z([a({type:String})],exports.PontNameField.prototype,"autocomplete",2);Z([a({type:Boolean})],exports.PontNameField.prototype,"disabled",2);Z([a({type:Boolean})],exports.PontNameField.prototype,"required",2);Z([a({type:Number})],exports.PontNameField.prototype,"minlength",1);Z([a({type:Number})],exports.PontNameField.prototype,"maxlength",1);Z([a({type:String})],exports.PontNameField.prototype,"pattern",2);Z([a({type:String})],exports.PontNameField.prototype,"validation",2);Z([a({type:String,attribute:"required-error"})],exports.PontNameField.prototype,"requiredError",1);Z([a({type:String,attribute:"minlength-error"})],exports.PontNameField.prototype,"minlengthError",1);Z([a({type:String,attribute:"maxlength-error"})],exports.PontNameField.prototype,"maxlengthError",1);Z([a({type:String,attribute:"format-error"})],exports.PontNameField.prototype,"formatError",1);Z([g()],exports.PontNameField.prototype,"_invalid",2);Z([g()],exports.PontNameField.prototype,"_error",2);Z([g()],exports.PontNameField.prototype,"_value",2);exports.PontNameField=Z([p("pont-name-field")],exports.PontNameField);var r0=Object.defineProperty,o0=Object.getOwnPropertyDescriptor,mt=(e,t,r,n)=>{for(var o=n>1?void 0:n?o0(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&r0(t,r,o),o};exports.PontPhoneField=class extends f{constructor(){super(...arguments),this.seed=wt(),this._name=lo.name,this._label=lo.label,this.pattern=lo.pattern,this.validation=lo.validation,this._invalid=!1,this._error="",this._value="",this._dirty=!1,this._form=null,this._handleInput=t=>{const r=t.target,n=`${exports.PontPhoneField.INPUT_SELECTORS} > input`;r.matches(n)&&(this._dirty=!0,this._value=r.value)},this._handleFormSubmit=t=>{this._validate()||t.preventDefault()},this._handleFormReset=()=>{const t=exports.PontPhoneField.INPUT_SELECTORS,r=this.querySelector(t);r&&(r.value=this.defaultValue??""),this._invalid=!1,this._error="",this._value="",this._dirty=!1}}get _defaultInputId(){return`${this.rootId}-${exports.PontPhoneField.INPUT}`}get inputId(){return this._inputId??this._defaultInputId}set inputId(t){const r=this.inputId;this._inputId=t||void 0,this.requestUpdate("inputId",r)}get name(){return this._name}set name(t){const r=this._name;this._name=t.length?t:lo.name,this.requestUpdate("name",r)}get label(){return this._label}set label(t){const r=this._label;this._label=t.length?t:lo.label,this.requestUpdate("label",r)}get _defaultRequiredError(){return Ft(this.label)}get requiredError(){return this._requiredError??this._defaultRequiredError}set requiredError(t){const r=this.requiredError;this._requiredError=t||void 0,this.requestUpdate("requiredError",r)}get _defaultFormatError(){return Ne(this.label)}get formatError(){return this._formatError??this._defaultFormatError}set formatError(t){const r=this.formatError;this._formatError=t||void 0,this.requestUpdate("formatError",r)}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontPhoneField.TAG}-${this.seed}`}get labelId(){return`${this.rootId}-${exports.PontPhoneField.LABEL}`}get markId(){return`${this.rootId}-${exports.PontPhoneField.MARK}`}get descriptionId(){return`${this.rootId}-${exports.PontPhoneField.DESCRIPTION}`}get errorId(){return`${this.rootId}-${exports.PontPhoneField.ERROR}`}get value(){const t=this.defaultValue??"";return(this._dirty?this._value:t).replace(/\s/g,"")}updated(t){if(t.has("defaultValue")&&!this._dirty){const r=exports.PontPhoneField.INPUT_SELECTORS,n=this.querySelector(r);n&&(n.value=this.defaultValue??"")}}connectedCallback(){super.connectedCallback(),this.addEventListener("input",this._handleInput),this._form=this.closest("form"),this._form!==null&&(this._form.noValidate=!0,this._form.addEventListener("submit",this._handleFormSubmit),this._form.addEventListener("reset",this._handleFormReset))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("input",this._handleInput),this._form!==null&&(this._form.removeEventListener("submit",this._handleFormSubmit),this._form.removeEventListener("reset",this._handleFormReset),this._form=null)}validate(){return this._validate()}_dispatchValidate(t,r,n){const{rootId:o,inputId:i,name:s,value:d}=this;this.dispatchEvent(new CustomEvent(exports.PontPhoneField.VALIDATE_EVENT,{detail:{id:o,inputId:i,name:s,value:d,valid:t,type:r,message:n},bubbles:!0,composed:!0}))}_onValidateSuccess(){this._invalid=!1,this._error="",this._dispatchValidate(!0,"success","Valid phone.")}_onValidateError(t,r){this._invalid=!0,this._error=r,this._dispatchValidate(!1,t,r)}_validate(){const t=this.value;return this.required&&!t?(this._onValidateError("required",this.requiredError),!1):!t||this.validation==="simple"?(this._onValidateSuccess(),!0):new RegExp(this.pattern).test(t)?(this._onValidateSuccess(),!0):(this._onValidateError("format",this.formatError),!1)}_renderMark(){let t;if(this.mark)t="mark";else if(this.required&&this.caret)t="caret";else return h;return l`
5272
+ `}};exports.PontNameField.ROOT="name-field";exports.PontNameField.LABEL="label";exports.PontNameField.MARK="mark";exports.PontNameField.DESCRIPTION="description";exports.PontNameField.INPUT="input";exports.PontNameField.ERROR="error";exports.PontNameField.TAG=`${et}-${exports.PontNameField.ROOT}`;exports.PontNameField.VALIDATE_EVENT=`${exports.PontNameField.TAG}:validate`;exports.PontNameField.PARTS={root:exports.PontNameField.ROOT,label:`${exports.PontNameField.ROOT}-${exports.PontNameField.LABEL}`,mark:`${exports.PontNameField.ROOT}-${exports.PontNameField.MARK}`,description:`${exports.PontNameField.ROOT}-${exports.PontNameField.DESCRIPTION}`,input:`${exports.PontNameField.ROOT}-${exports.PontNameField.INPUT}`,error:`${exports.PontNameField.ROOT}-${exports.PontNameField.ERROR}`};exports.PontNameField.INPUT_SELECTORS=`pont-input[part="${exports.PontNameField.PARTS.input}"]`;Z([a({type:String})],exports.PontNameField.prototype,"seed",2);Z([a({type:String,attribute:"custom-id"})],exports.PontNameField.prototype,"customId",2);Z([a({type:String,attribute:"input-id"})],exports.PontNameField.prototype,"inputId",1);Z([a({type:String})],exports.PontNameField.prototype,"name",1);Z([a({type:String,attribute:"default-value"})],exports.PontNameField.prototype,"defaultValue",2);Z([a({type:String})],exports.PontNameField.prototype,"label",1);Z([a({type:String})],exports.PontNameField.prototype,"placeholder",2);Z([a({type:String})],exports.PontNameField.prototype,"description",2);Z([a({type:String})],exports.PontNameField.prototype,"mark",2);Z([a({type:Boolean})],exports.PontNameField.prototype,"caret",2);Z([a({type:String})],exports.PontNameField.prototype,"autocomplete",2);Z([a({type:Boolean})],exports.PontNameField.prototype,"disabled",2);Z([a({type:Boolean})],exports.PontNameField.prototype,"required",2);Z([a({type:Number})],exports.PontNameField.prototype,"minlength",1);Z([a({type:Number})],exports.PontNameField.prototype,"maxlength",1);Z([a({type:String})],exports.PontNameField.prototype,"pattern",2);Z([a({type:String})],exports.PontNameField.prototype,"validation",2);Z([a({type:String,attribute:"required-error"})],exports.PontNameField.prototype,"requiredError",1);Z([a({type:String,attribute:"minlength-error"})],exports.PontNameField.prototype,"minlengthError",1);Z([a({type:String,attribute:"maxlength-error"})],exports.PontNameField.prototype,"maxlengthError",1);Z([a({type:String,attribute:"format-error"})],exports.PontNameField.prototype,"formatError",1);Z([g()],exports.PontNameField.prototype,"_invalid",2);Z([g()],exports.PontNameField.prototype,"_error",2);Z([g()],exports.PontNameField.prototype,"_value",2);exports.PontNameField=Z([p("pont-name-field")],exports.PontNameField);var r0=Object.defineProperty,o0=Object.getOwnPropertyDescriptor,mt=(e,t,r,n)=>{for(var o=n>1?void 0:n?o0(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&r0(t,r,o),o};exports.PontPhoneField=class extends f{constructor(){super(...arguments),this.seed=wt(),this._name=lo.name,this._label=lo.label,this.pattern=lo.pattern,this.validation=lo.validation,this._invalid=!1,this._error="",this._value="",this._dirty=!1,this._form=null,this._handleInput=t=>{const r=t.target,n=`${exports.PontPhoneField.INPUT_SELECTORS} > input`;r.matches(n)&&(this._dirty=!0,this._value=r.value)},this._handleFormSubmit=t=>{this._validate()||t.preventDefault()},this._handleFormReset=()=>{const t=exports.PontPhoneField.INPUT_SELECTORS,r=this.querySelector(t);r&&(r.value=this.defaultValue??""),this._invalid=!1,this._error="",this._value="",this._dirty=!1}}get _defaultInputId(){return`${this.rootId}-${exports.PontPhoneField.INPUT}`}get inputId(){return this._inputId??this._defaultInputId}set inputId(t){const r=this.inputId;this._inputId=t||void 0,this.requestUpdate("inputId",r)}get name(){return this._name}set name(t){const r=this._name;this._name=t.length?t:lo.name,this.requestUpdate("name",r)}get label(){return this._label}set label(t){const r=this._label;this._label=t.length?t:lo.label,this.requestUpdate("label",r)}get _defaultRequiredError(){return Ft(this.label)}get requiredError(){return this._requiredError??this._defaultRequiredError}set requiredError(t){const r=this.requiredError;this._requiredError=t||void 0,this.requestUpdate("requiredError",r)}get _defaultFormatError(){return Ne(this.label)}get formatError(){return this._formatError??this._defaultFormatError}set formatError(t){const r=this.formatError;this._formatError=t||void 0,this.requestUpdate("formatError",r)}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontPhoneField.TAG}-${this.seed}`}get labelId(){return`${this.rootId}-${exports.PontPhoneField.LABEL}`}get markId(){return`${this.rootId}-${exports.PontPhoneField.MARK}`}get descriptionId(){return`${this.rootId}-${exports.PontPhoneField.DESCRIPTION}`}get errorId(){return`${this.rootId}-${exports.PontPhoneField.ERROR}`}get value(){const t=this.defaultValue??"";return(this._dirty?this._value:t).replace(/\s/g,"")}updated(t){if(t.has("defaultValue")&&!this._dirty){const r=exports.PontPhoneField.INPUT_SELECTORS,n=this.querySelector(r);n&&(n.value=this.defaultValue??"")}}connectedCallback(){super.connectedCallback(),this.addEventListener("input",this._handleInput),this._form=this.closest("form"),this._form!==null&&(this._form.noValidate=!0,this._form.addEventListener("submit",this._handleFormSubmit),this._form.addEventListener("reset",this._handleFormReset))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("input",this._handleInput),this._form!==null&&(this._form.removeEventListener("submit",this._handleFormSubmit),this._form.removeEventListener("reset",this._handleFormReset),this._form=null)}validate(){return this._validate()}_dispatchValidate(t,r,n){const{rootId:o,inputId:i,name:s,value:d}=this;this.dispatchEvent(new CustomEvent(exports.PontPhoneField.VALIDATE_EVENT,{detail:{id:o,inputId:i,name:s,value:d,valid:t,type:r,message:n},bubbles:!0,composed:!0}))}_onValidateSuccess(){this._invalid=!1,this._error="",this._dispatchValidate(!0,"success","Valid phone.")}_onValidateError(t,r){this._invalid=!0,this._error=r,this._dispatchValidate(!1,t,r)}_validate(){const t=this.value;return this.required&&!t?(this._onValidateError("required",this.requiredError),!1):!t||this.validation==="simple"?(this._onValidateSuccess(),!0):new RegExp(this.pattern).test(t)?(this._onValidateSuccess(),!0):(this._onValidateError("format",this.formatError),!1)}_renderMark(){let t;if(this.mark)t="mark";else if(this.required&&this.caret)t="caret";else return h;return l`
5273
5273
  <span
5274
5274
  id="${this.markId}"
5275
5275
  part="${exports.PontPhoneField.PARTS.mark}"
@@ -5319,7 +5319,7 @@
5319
5319
  </pont-field-description>
5320
5320
  `:h}
5321
5321
  </pont-field>
5322
- `}};exports.PontPhoneField.ROOT="phone-field";exports.PontPhoneField.LABEL="label";exports.PontPhoneField.MARK="mark";exports.PontPhoneField.DESCRIPTION="description";exports.PontPhoneField.INPUT="input";exports.PontPhoneField.ERROR="error";exports.PontPhoneField.TAG=`${ht}-${exports.PontPhoneField.ROOT}`;exports.PontPhoneField.VALIDATE_EVENT=`${exports.PontPhoneField.TAG}:validate`;exports.PontPhoneField.PARTS={root:exports.PontPhoneField.ROOT,label:`${exports.PontPhoneField.ROOT}-${exports.PontPhoneField.LABEL}`,mark:`${exports.PontPhoneField.ROOT}-${exports.PontPhoneField.MARK}`,description:`${exports.PontPhoneField.ROOT}-${exports.PontPhoneField.DESCRIPTION}`,input:`${exports.PontPhoneField.ROOT}-${exports.PontPhoneField.INPUT}`,error:`${exports.PontPhoneField.ROOT}-${exports.PontPhoneField.ERROR}`};exports.PontPhoneField.INPUT_SELECTORS=`pont-input[part="${exports.PontPhoneField.PARTS.input}"]`;mt([a({type:String})],exports.PontPhoneField.prototype,"seed",2);mt([a({type:String,attribute:"custom-id"})],exports.PontPhoneField.prototype,"customId",2);mt([a({type:String,attribute:"input-id"})],exports.PontPhoneField.prototype,"inputId",1);mt([a({type:String})],exports.PontPhoneField.prototype,"name",1);mt([a({type:String,attribute:"default-value"})],exports.PontPhoneField.prototype,"defaultValue",2);mt([a({type:String})],exports.PontPhoneField.prototype,"label",1);mt([a({type:String})],exports.PontPhoneField.prototype,"placeholder",2);mt([a({type:String})],exports.PontPhoneField.prototype,"description",2);mt([a({type:String})],exports.PontPhoneField.prototype,"mark",2);mt([a({type:Boolean})],exports.PontPhoneField.prototype,"caret",2);mt([a({type:String})],exports.PontPhoneField.prototype,"autocomplete",2);mt([a({type:Boolean})],exports.PontPhoneField.prototype,"disabled",2);mt([a({type:Boolean})],exports.PontPhoneField.prototype,"required",2);mt([a({type:String})],exports.PontPhoneField.prototype,"pattern",2);mt([a({type:String})],exports.PontPhoneField.prototype,"validation",2);mt([a({type:String,attribute:"required-error"})],exports.PontPhoneField.prototype,"requiredError",1);mt([a({type:String,attribute:"format-error"})],exports.PontPhoneField.prototype,"formatError",1);mt([g()],exports.PontPhoneField.prototype,"_invalid",2);mt([g()],exports.PontPhoneField.prototype,"_error",2);mt([g()],exports.PontPhoneField.prototype,"_value",2);exports.PontPhoneField=mt([p("pont-phone-field")],exports.PontPhoneField);var n0=Object.defineProperty,i0=Object.getOwnPropertyDescriptor,J=(e,t,r,n)=>{for(var o=n>1?void 0:n?i0(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&n0(t,r,o),o};exports.PontUsernameField=class extends f{constructor(){super(...arguments),this.seed=wt(),this._name=co.name,this._label=co.label,this.pattern=co.pattern,this.validation=co.validation,this._invalid=!1,this._error="",this._value="",this._dirty=!1,this._form=null,this._handleInput=t=>{const r=t.target,n=`${exports.PontUsernameField.INPUT_SELECTORS} > input`;r.matches(n)&&(this._dirty=!0,this._value=r.value)},this._handleFormSubmit=t=>{this._validate()||t.preventDefault()},this._handleFormReset=()=>{const t=exports.PontUsernameField.INPUT_SELECTORS,r=this.querySelector(t);r&&(r.value=this.defaultValue??""),this._invalid=!1,this._error="",this._value="",this._dirty=!1}}get _defaultInputId(){return`${this.rootId}-${exports.PontUsernameField.INPUT}`}get inputId(){return this._inputId??this._defaultInputId}set inputId(t){const r=this.inputId;this._inputId=t||void 0,this.requestUpdate("inputId",r)}get name(){return this._name}set name(t){const r=this._name;this._name=t.length?t:co.name,this.requestUpdate("name",r)}get label(){return this._label}set label(t){const r=this._label;this._label=t.length?t:co.label,this.requestUpdate("label",r)}get minlength(){return this._minlength}set minlength(t){const r=this._minlength;this._minlength=t===void 0||t>0?t:void 0,this.requestUpdate("minlength",r)}get maxlength(){return this._maxlength}set maxlength(t){const r=this._maxlength;if(t===void 0||t<=0)this._maxlength=void 0;else{const{minlength:n}=this;this._maxlength=n?Math.max(t,n):t}this.requestUpdate("maxlength",r)}get _defaultRequiredError(){return Ft(this.label)}get requiredError(){return this._requiredError??this._defaultRequiredError}set requiredError(t){const r=this.requiredError;this._requiredError=t||void 0,this.requestUpdate("requiredError",r)}get _defaultMinlengthError(){return jo(this.label,this.minlength)}get minlengthError(){return this._minlengthError??this._defaultMinlengthError}set minlengthError(t){const r=this.minlengthError;this._minlengthError=t||void 0,this.requestUpdate("minlengthError",r)}get _defaultMaxlengthError(){return qo(this.label,this.maxlength)}get maxlengthError(){return this._maxlengthError??this._defaultMaxlengthError}set maxlengthError(t){const r=this.maxlengthError;this._maxlengthError=t||void 0,this.requestUpdate("maxlengthError",r)}get _defaultFormatError(){return Ne(this.label)}get formatError(){return this._formatError??this._defaultFormatError}set formatError(t){const r=this.formatError;this._formatError=t||void 0,this.requestUpdate("formatError",r)}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontUsernameField.TAG}-${this.seed}`}get labelId(){return`${this.rootId}-${exports.PontUsernameField.LABEL}`}get markId(){return`${this.rootId}-${exports.PontUsernameField.MARK}`}get descriptionId(){return`${this.rootId}-${exports.PontUsernameField.DESCRIPTION}`}get errorId(){return`${this.rootId}-${exports.PontUsernameField.ERROR}`}get value(){const t=this.defaultValue??"";return(this._dirty?this._value:t).trim().toLowerCase()}updated(t){if(t.has("defaultValue")&&!this._dirty){const r=exports.PontUsernameField.INPUT_SELECTORS,n=this.querySelector(r);n&&(n.value=this.defaultValue??"")}}connectedCallback(){super.connectedCallback(),this.addEventListener("input",this._handleInput),this._form=this.closest("form"),this._form!==null&&(this._form.noValidate=!0,this._form.addEventListener("submit",this._handleFormSubmit),this._form.addEventListener("reset",this._handleFormReset))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("input",this._handleInput),this._form!==null&&(this._form.removeEventListener("submit",this._handleFormSubmit),this._form.removeEventListener("reset",this._handleFormReset),this._form=null)}validate(){return this._validate()}_dispatchValidate(t,r,n){const{rootId:o,inputId:i,name:s,value:d}=this;this.dispatchEvent(new CustomEvent(exports.PontUsernameField.VALIDATE_EVENT,{detail:{id:o,inputId:i,name:s,value:d,valid:t,type:r,message:n},bubbles:!0,composed:!0}))}_onValidateSuccess(){this._invalid=!1,this._error="",this._dispatchValidate(!0,"success","Valid username.")}_onValidateError(t,r){this._invalid=!0,this._error=r,this._dispatchValidate(!1,t,r)}_validate(){const t=this.value;if(this.required&&!t)return this._onValidateError("required",this.requiredError),!1;if(!t||this.validation==="simple")return this._onValidateSuccess(),!0;const{minlength:r}=this;if(r&&t.length<r)return this._onValidateError("minlength",this.minlengthError),!1;const{maxlength:n}=this;return n&&t.length>n?(this._onValidateError("maxlength",this.maxlengthError),!1):new RegExp(this.pattern).test(t)?(this._onValidateSuccess(),!0):(this._onValidateError("format",this.formatError),!1)}_renderMark(){let t;if(this.mark)t="mark";else if(this.required&&this.caret)t="caret";else return h;return l`
5322
+ `}};exports.PontPhoneField.ROOT="phone-field";exports.PontPhoneField.LABEL="label";exports.PontPhoneField.MARK="mark";exports.PontPhoneField.DESCRIPTION="description";exports.PontPhoneField.INPUT="input";exports.PontPhoneField.ERROR="error";exports.PontPhoneField.TAG=`${et}-${exports.PontPhoneField.ROOT}`;exports.PontPhoneField.VALIDATE_EVENT=`${exports.PontPhoneField.TAG}:validate`;exports.PontPhoneField.PARTS={root:exports.PontPhoneField.ROOT,label:`${exports.PontPhoneField.ROOT}-${exports.PontPhoneField.LABEL}`,mark:`${exports.PontPhoneField.ROOT}-${exports.PontPhoneField.MARK}`,description:`${exports.PontPhoneField.ROOT}-${exports.PontPhoneField.DESCRIPTION}`,input:`${exports.PontPhoneField.ROOT}-${exports.PontPhoneField.INPUT}`,error:`${exports.PontPhoneField.ROOT}-${exports.PontPhoneField.ERROR}`};exports.PontPhoneField.INPUT_SELECTORS=`pont-input[part="${exports.PontPhoneField.PARTS.input}"]`;mt([a({type:String})],exports.PontPhoneField.prototype,"seed",2);mt([a({type:String,attribute:"custom-id"})],exports.PontPhoneField.prototype,"customId",2);mt([a({type:String,attribute:"input-id"})],exports.PontPhoneField.prototype,"inputId",1);mt([a({type:String})],exports.PontPhoneField.prototype,"name",1);mt([a({type:String,attribute:"default-value"})],exports.PontPhoneField.prototype,"defaultValue",2);mt([a({type:String})],exports.PontPhoneField.prototype,"label",1);mt([a({type:String})],exports.PontPhoneField.prototype,"placeholder",2);mt([a({type:String})],exports.PontPhoneField.prototype,"description",2);mt([a({type:String})],exports.PontPhoneField.prototype,"mark",2);mt([a({type:Boolean})],exports.PontPhoneField.prototype,"caret",2);mt([a({type:String})],exports.PontPhoneField.prototype,"autocomplete",2);mt([a({type:Boolean})],exports.PontPhoneField.prototype,"disabled",2);mt([a({type:Boolean})],exports.PontPhoneField.prototype,"required",2);mt([a({type:String})],exports.PontPhoneField.prototype,"pattern",2);mt([a({type:String})],exports.PontPhoneField.prototype,"validation",2);mt([a({type:String,attribute:"required-error"})],exports.PontPhoneField.prototype,"requiredError",1);mt([a({type:String,attribute:"format-error"})],exports.PontPhoneField.prototype,"formatError",1);mt([g()],exports.PontPhoneField.prototype,"_invalid",2);mt([g()],exports.PontPhoneField.prototype,"_error",2);mt([g()],exports.PontPhoneField.prototype,"_value",2);exports.PontPhoneField=mt([p("pont-phone-field")],exports.PontPhoneField);var n0=Object.defineProperty,i0=Object.getOwnPropertyDescriptor,J=(e,t,r,n)=>{for(var o=n>1?void 0:n?i0(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&n0(t,r,o),o};exports.PontUsernameField=class extends f{constructor(){super(...arguments),this.seed=wt(),this._name=co.name,this._label=co.label,this.pattern=co.pattern,this.validation=co.validation,this._invalid=!1,this._error="",this._value="",this._dirty=!1,this._form=null,this._handleInput=t=>{const r=t.target,n=`${exports.PontUsernameField.INPUT_SELECTORS} > input`;r.matches(n)&&(this._dirty=!0,this._value=r.value)},this._handleFormSubmit=t=>{this._validate()||t.preventDefault()},this._handleFormReset=()=>{const t=exports.PontUsernameField.INPUT_SELECTORS,r=this.querySelector(t);r&&(r.value=this.defaultValue??""),this._invalid=!1,this._error="",this._value="",this._dirty=!1}}get _defaultInputId(){return`${this.rootId}-${exports.PontUsernameField.INPUT}`}get inputId(){return this._inputId??this._defaultInputId}set inputId(t){const r=this.inputId;this._inputId=t||void 0,this.requestUpdate("inputId",r)}get name(){return this._name}set name(t){const r=this._name;this._name=t.length?t:co.name,this.requestUpdate("name",r)}get label(){return this._label}set label(t){const r=this._label;this._label=t.length?t:co.label,this.requestUpdate("label",r)}get minlength(){return this._minlength}set minlength(t){const r=this._minlength;this._minlength=t===void 0||t>0?t:void 0,this.requestUpdate("minlength",r)}get maxlength(){return this._maxlength}set maxlength(t){const r=this._maxlength;if(t===void 0||t<=0)this._maxlength=void 0;else{const{minlength:n}=this;this._maxlength=n?Math.max(t,n):t}this.requestUpdate("maxlength",r)}get _defaultRequiredError(){return Ft(this.label)}get requiredError(){return this._requiredError??this._defaultRequiredError}set requiredError(t){const r=this.requiredError;this._requiredError=t||void 0,this.requestUpdate("requiredError",r)}get _defaultMinlengthError(){return jo(this.label,this.minlength)}get minlengthError(){return this._minlengthError??this._defaultMinlengthError}set minlengthError(t){const r=this.minlengthError;this._minlengthError=t||void 0,this.requestUpdate("minlengthError",r)}get _defaultMaxlengthError(){return qo(this.label,this.maxlength)}get maxlengthError(){return this._maxlengthError??this._defaultMaxlengthError}set maxlengthError(t){const r=this.maxlengthError;this._maxlengthError=t||void 0,this.requestUpdate("maxlengthError",r)}get _defaultFormatError(){return Ne(this.label)}get formatError(){return this._formatError??this._defaultFormatError}set formatError(t){const r=this.formatError;this._formatError=t||void 0,this.requestUpdate("formatError",r)}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontUsernameField.TAG}-${this.seed}`}get labelId(){return`${this.rootId}-${exports.PontUsernameField.LABEL}`}get markId(){return`${this.rootId}-${exports.PontUsernameField.MARK}`}get descriptionId(){return`${this.rootId}-${exports.PontUsernameField.DESCRIPTION}`}get errorId(){return`${this.rootId}-${exports.PontUsernameField.ERROR}`}get value(){const t=this.defaultValue??"";return(this._dirty?this._value:t).trim().toLowerCase()}updated(t){if(t.has("defaultValue")&&!this._dirty){const r=exports.PontUsernameField.INPUT_SELECTORS,n=this.querySelector(r);n&&(n.value=this.defaultValue??"")}}connectedCallback(){super.connectedCallback(),this.addEventListener("input",this._handleInput),this._form=this.closest("form"),this._form!==null&&(this._form.noValidate=!0,this._form.addEventListener("submit",this._handleFormSubmit),this._form.addEventListener("reset",this._handleFormReset))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("input",this._handleInput),this._form!==null&&(this._form.removeEventListener("submit",this._handleFormSubmit),this._form.removeEventListener("reset",this._handleFormReset),this._form=null)}validate(){return this._validate()}_dispatchValidate(t,r,n){const{rootId:o,inputId:i,name:s,value:d}=this;this.dispatchEvent(new CustomEvent(exports.PontUsernameField.VALIDATE_EVENT,{detail:{id:o,inputId:i,name:s,value:d,valid:t,type:r,message:n},bubbles:!0,composed:!0}))}_onValidateSuccess(){this._invalid=!1,this._error="",this._dispatchValidate(!0,"success","Valid username.")}_onValidateError(t,r){this._invalid=!0,this._error=r,this._dispatchValidate(!1,t,r)}_validate(){const t=this.value;if(this.required&&!t)return this._onValidateError("required",this.requiredError),!1;if(!t||this.validation==="simple")return this._onValidateSuccess(),!0;const{minlength:r}=this;if(r&&t.length<r)return this._onValidateError("minlength",this.minlengthError),!1;const{maxlength:n}=this;return n&&t.length>n?(this._onValidateError("maxlength",this.maxlengthError),!1):new RegExp(this.pattern).test(t)?(this._onValidateSuccess(),!0):(this._onValidateError("format",this.formatError),!1)}_renderMark(){let t;if(this.mark)t="mark";else if(this.required&&this.caret)t="caret";else return h;return l`
5323
5323
  <span
5324
5324
  id="${this.markId}"
5325
5325
  part="${exports.PontUsernameField.PARTS.mark}"
@@ -5369,7 +5369,7 @@
5369
5369
  </pont-field-description>
5370
5370
  `:h}
5371
5371
  </pont-field>
5372
- `}};exports.PontUsernameField.ROOT="username-field";exports.PontUsernameField.LABEL="label";exports.PontUsernameField.MARK="mark";exports.PontUsernameField.DESCRIPTION="description";exports.PontUsernameField.INPUT="input";exports.PontUsernameField.ERROR="error";exports.PontUsernameField.TAG=`${ht}-${exports.PontUsernameField.ROOT}`;exports.PontUsernameField.VALIDATE_EVENT=`${exports.PontUsernameField.TAG}:validate`;exports.PontUsernameField.PARTS={root:exports.PontUsernameField.ROOT,label:`${exports.PontUsernameField.ROOT}-${exports.PontUsernameField.LABEL}`,mark:`${exports.PontUsernameField.ROOT}-${exports.PontUsernameField.MARK}`,description:`${exports.PontUsernameField.ROOT}-${exports.PontUsernameField.DESCRIPTION}`,input:`${exports.PontUsernameField.ROOT}-${exports.PontUsernameField.INPUT}`,error:`${exports.PontUsernameField.ROOT}-${exports.PontUsernameField.ERROR}`};exports.PontUsernameField.INPUT_SELECTORS=`pont-input[part="${exports.PontUsernameField.PARTS.input}"]`;J([a({type:String})],exports.PontUsernameField.prototype,"seed",2);J([a({type:String,attribute:"custom-id"})],exports.PontUsernameField.prototype,"customId",2);J([a({type:String,attribute:"input-id"})],exports.PontUsernameField.prototype,"inputId",1);J([a({type:String})],exports.PontUsernameField.prototype,"name",1);J([a({type:String,attribute:"default-value"})],exports.PontUsernameField.prototype,"defaultValue",2);J([a({type:String})],exports.PontUsernameField.prototype,"label",1);J([a({type:String})],exports.PontUsernameField.prototype,"placeholder",2);J([a({type:String})],exports.PontUsernameField.prototype,"description",2);J([a({type:String})],exports.PontUsernameField.prototype,"mark",2);J([a({type:Boolean})],exports.PontUsernameField.prototype,"caret",2);J([a({type:String})],exports.PontUsernameField.prototype,"autocomplete",2);J([a({type:Boolean})],exports.PontUsernameField.prototype,"disabled",2);J([a({type:Boolean})],exports.PontUsernameField.prototype,"required",2);J([a({type:Number})],exports.PontUsernameField.prototype,"minlength",1);J([a({type:Number})],exports.PontUsernameField.prototype,"maxlength",1);J([a({type:String})],exports.PontUsernameField.prototype,"pattern",2);J([a({type:String})],exports.PontUsernameField.prototype,"validation",2);J([a({type:String,attribute:"required-error"})],exports.PontUsernameField.prototype,"requiredError",1);J([a({type:String,attribute:"minlength-error"})],exports.PontUsernameField.prototype,"minlengthError",1);J([a({type:String,attribute:"maxlength-error"})],exports.PontUsernameField.prototype,"maxlengthError",1);J([a({type:String,attribute:"format-error"})],exports.PontUsernameField.prototype,"formatError",1);J([g()],exports.PontUsernameField.prototype,"_invalid",2);J([g()],exports.PontUsernameField.prototype,"_error",2);J([g()],exports.PontUsernameField.prototype,"_value",2);exports.PontUsernameField=J([p("pont-username-field")],exports.PontUsernameField);const ns={label:"Link",service:"auth"};var s0=Object.defineProperty,a0=Object.getOwnPropertyDescriptor,Me=(e,t,r,n)=>{for(var o=n>1?void 0:n?a0(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&s0(t,r,o),o};exports.PontLink=class extends f{constructor(){super(...arguments),this.seed=wt(),this._label=ns.label,this.service=ns.service,this._loading=!1,this._handleClick=async()=>{if(this.isDisabled)return;this._loading=!0;const{rootId:t,buttonId:r,service:n,event:o}=this;this.dispatchEvent(new CustomEvent(exports.PontLink.CLICK_EVENT,{detail:{id:t,buttonId:r,service:n,event:o},bubbles:!0,composed:!0}));try{if(o&&n==="auth"){const i=await tt.processLoginflowEvent({event:o});this.dispatchEvent(new CustomEvent(exports.PontLink.SUCCESS_EVENT,{detail:{id:t,buttonId:r,event:o,result:i},bubbles:!0,composed:!0}))}}catch(i){const s=i instanceof Error?i.message:String(i);this.dispatchEvent(new CustomEvent(exports.PontLink.ERROR_EVENT,{detail:{id:t,buttonId:r,event:o,message:s},bubbles:!0,composed:!0}))}finally{this._loading=!1}}}get label(){return this._label}set label(t){const r=this._label;this._label=t.length?t:ns.label,this.requestUpdate("label",r)}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontLink.TAG}-${this.seed}`}get buttonId(){return`${this.rootId}-${exports.PontLink.BUTTON}`}get promptId(){return`${this.rootId}-${exports.PontLink.PROMPT}`}get isLoading(){return this.loading||this._loading}get isDisabled(){return this.disabled||this.isLoading}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this._handleClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._handleClick)}render(){var t;return l`
5372
+ `}};exports.PontUsernameField.ROOT="username-field";exports.PontUsernameField.LABEL="label";exports.PontUsernameField.MARK="mark";exports.PontUsernameField.DESCRIPTION="description";exports.PontUsernameField.INPUT="input";exports.PontUsernameField.ERROR="error";exports.PontUsernameField.TAG=`${et}-${exports.PontUsernameField.ROOT}`;exports.PontUsernameField.VALIDATE_EVENT=`${exports.PontUsernameField.TAG}:validate`;exports.PontUsernameField.PARTS={root:exports.PontUsernameField.ROOT,label:`${exports.PontUsernameField.ROOT}-${exports.PontUsernameField.LABEL}`,mark:`${exports.PontUsernameField.ROOT}-${exports.PontUsernameField.MARK}`,description:`${exports.PontUsernameField.ROOT}-${exports.PontUsernameField.DESCRIPTION}`,input:`${exports.PontUsernameField.ROOT}-${exports.PontUsernameField.INPUT}`,error:`${exports.PontUsernameField.ROOT}-${exports.PontUsernameField.ERROR}`};exports.PontUsernameField.INPUT_SELECTORS=`pont-input[part="${exports.PontUsernameField.PARTS.input}"]`;J([a({type:String})],exports.PontUsernameField.prototype,"seed",2);J([a({type:String,attribute:"custom-id"})],exports.PontUsernameField.prototype,"customId",2);J([a({type:String,attribute:"input-id"})],exports.PontUsernameField.prototype,"inputId",1);J([a({type:String})],exports.PontUsernameField.prototype,"name",1);J([a({type:String,attribute:"default-value"})],exports.PontUsernameField.prototype,"defaultValue",2);J([a({type:String})],exports.PontUsernameField.prototype,"label",1);J([a({type:String})],exports.PontUsernameField.prototype,"placeholder",2);J([a({type:String})],exports.PontUsernameField.prototype,"description",2);J([a({type:String})],exports.PontUsernameField.prototype,"mark",2);J([a({type:Boolean})],exports.PontUsernameField.prototype,"caret",2);J([a({type:String})],exports.PontUsernameField.prototype,"autocomplete",2);J([a({type:Boolean})],exports.PontUsernameField.prototype,"disabled",2);J([a({type:Boolean})],exports.PontUsernameField.prototype,"required",2);J([a({type:Number})],exports.PontUsernameField.prototype,"minlength",1);J([a({type:Number})],exports.PontUsernameField.prototype,"maxlength",1);J([a({type:String})],exports.PontUsernameField.prototype,"pattern",2);J([a({type:String})],exports.PontUsernameField.prototype,"validation",2);J([a({type:String,attribute:"required-error"})],exports.PontUsernameField.prototype,"requiredError",1);J([a({type:String,attribute:"minlength-error"})],exports.PontUsernameField.prototype,"minlengthError",1);J([a({type:String,attribute:"maxlength-error"})],exports.PontUsernameField.prototype,"maxlengthError",1);J([a({type:String,attribute:"format-error"})],exports.PontUsernameField.prototype,"formatError",1);J([g()],exports.PontUsernameField.prototype,"_invalid",2);J([g()],exports.PontUsernameField.prototype,"_error",2);J([g()],exports.PontUsernameField.prototype,"_value",2);exports.PontUsernameField=J([p("pont-username-field")],exports.PontUsernameField);const ns={label:"Link",service:"auth"};var s0=Object.defineProperty,a0=Object.getOwnPropertyDescriptor,Me=(e,t,r,n)=>{for(var o=n>1?void 0:n?a0(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&s0(t,r,o),o};exports.PontLink=class extends f{constructor(){super(...arguments),this.seed=wt(),this._label=ns.label,this.service=ns.service,this._loading=!1,this._handleClick=async()=>{if(this.isDisabled)return;this._loading=!0;const{rootId:t,buttonId:r,service:n,event:o}=this;this.dispatchEvent(new CustomEvent(exports.PontLink.CLICK_EVENT,{detail:{id:t,buttonId:r,service:n,event:o},bubbles:!0,composed:!0}));try{if(o&&n==="auth"){const i=await tt.processLoginflowEvent({event:o});this.dispatchEvent(new CustomEvent(exports.PontLink.SUCCESS_EVENT,{detail:{id:t,buttonId:r,event:o,result:i},bubbles:!0,composed:!0}))}}catch(i){const s=i instanceof Error?i.message:String(i);this.dispatchEvent(new CustomEvent(exports.PontLink.ERROR_EVENT,{detail:{id:t,buttonId:r,event:o,message:s},bubbles:!0,composed:!0}))}finally{this._loading=!1}}}get label(){return this._label}set label(t){const r=this._label;this._label=t.length?t:ns.label,this.requestUpdate("label",r)}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontLink.TAG}-${this.seed}`}get buttonId(){return`${this.rootId}-${exports.PontLink.BUTTON}`}get promptId(){return`${this.rootId}-${exports.PontLink.PROMPT}`}get isLoading(){return this.loading||this._loading}get isDisabled(){return this.disabled||this.isLoading}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this._handleClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._handleClick)}render(){var t;return l`
5373
5373
  <div id="${this.rootId}" part="${exports.PontLink.PARTS.root}">
5374
5374
  ${(t=this.prompt)!=null&&t.length?l`
5375
5375
  <p id="${this.promptId}" part="${exports.PontLink.PARTS.prompt}">
@@ -5389,7 +5389,7 @@
5389
5389
  ${this.label}
5390
5390
  </pont-button>
5391
5391
  </div>
5392
- `}};exports.PontLink.ROOT="link";exports.PontLink.BUTTON="button";exports.PontLink.PROMPT="prompt";exports.PontLink.TAG=`${ht}-${exports.PontLink.ROOT}`;exports.PontLink.CLICK_EVENT=`${exports.PontLink.TAG}:click`;exports.PontLink.SUCCESS_EVENT=`${exports.PontLink.TAG}:success`;exports.PontLink.ERROR_EVENT=`${exports.PontLink.TAG}:error`;exports.PontLink.PARTS={root:exports.PontLink.ROOT,button:`${exports.PontLink.ROOT}-${exports.PontLink.BUTTON}`,prompt:`${exports.PontLink.ROOT}-${exports.PontLink.PROMPT}`};Me([a({type:String})],exports.PontLink.prototype,"seed",2);Me([a({type:String,attribute:"custom-id"})],exports.PontLink.prototype,"customId",2);Me([a({type:String})],exports.PontLink.prototype,"label",1);Me([a({type:String})],exports.PontLink.prototype,"prompt",2);Me([a({type:String})],exports.PontLink.prototype,"service",2);Me([a({type:String})],exports.PontLink.prototype,"event",2);Me([a({type:Boolean})],exports.PontLink.prototype,"disabled",2);Me([a({type:Boolean})],exports.PontLink.prototype,"loading",2);Me([g()],exports.PontLink.prototype,"_loading",2);exports.PontLink=Me([p("pont-link")],exports.PontLink);/**
5392
+ `}};exports.PontLink.ROOT="link";exports.PontLink.BUTTON="button";exports.PontLink.PROMPT="prompt";exports.PontLink.TAG=`${et}-${exports.PontLink.ROOT}`;exports.PontLink.CLICK_EVENT=`${exports.PontLink.TAG}:click`;exports.PontLink.SUCCESS_EVENT=`${exports.PontLink.TAG}:success`;exports.PontLink.ERROR_EVENT=`${exports.PontLink.TAG}:error`;exports.PontLink.PARTS={root:exports.PontLink.ROOT,button:`${exports.PontLink.ROOT}-${exports.PontLink.BUTTON}`,prompt:`${exports.PontLink.ROOT}-${exports.PontLink.PROMPT}`};Me([a({type:String})],exports.PontLink.prototype,"seed",2);Me([a({type:String,attribute:"custom-id"})],exports.PontLink.prototype,"customId",2);Me([a({type:String})],exports.PontLink.prototype,"label",1);Me([a({type:String})],exports.PontLink.prototype,"prompt",2);Me([a({type:String})],exports.PontLink.prototype,"service",2);Me([a({type:String})],exports.PontLink.prototype,"event",2);Me([a({type:Boolean})],exports.PontLink.prototype,"disabled",2);Me([a({type:Boolean})],exports.PontLink.prototype,"loading",2);Me([g()],exports.PontLink.prototype,"_loading",2);exports.PontLink=Me([p("pont-link")],exports.PontLink);/**
5393
5393
  * @license
5394
5394
  * Copyright 2020 Google LLC
5395
5395
  * SPDX-License-Identifier: BSD-3-Clause
@@ -5429,7 +5429,7 @@
5429
5429
  </pont-button>
5430
5430
  </div>
5431
5431
  `:h}
5432
- `}};exports.PontOtp.ROOT="otp";exports.PontOtp.TAG=`${ht}-${exports.PontOtp.ROOT}`;_t([a({type:Boolean,attribute:"exclude-from-form",converter:{fromAttribute:e=>e!==null&&e!=="false",toAttribute:e=>e?"":null}})],exports.PontOtp.prototype,"excludeFromForm",2);_t([a({type:Boolean})],exports.PontOtp.prototype,"required",2);_t([a({attribute:"required-error"})],exports.PontOtp.prototype,"requiredError",2);_t([a({attribute:"incomplete-error"})],exports.PontOtp.prototype,"incompleteError",2);_t([a()],exports.PontOtp.prototype,"variant",2);_t([a({type:Number})],exports.PontOtp.prototype,"length",2);_t([a({type:Number})],exports.PontOtp.prototype,"timeout",2);_t([a({attribute:"data-key"})],exports.PontOtp.prototype,"dataKey",2);_t([a()],exports.PontOtp.prototype,"name",2);_t([a({type:Boolean})],exports.PontOtp.prototype,"disabled",2);_t([a({type:Boolean,attribute:"auto-submit",converter:{fromAttribute:e=>e!==null&&e!=="false",toAttribute:e=>e?"":null}})],exports.PontOtp.prototype,"autoSubmit",2);_t([a()],exports.PontOtp.prototype,"event",2);_t([a({attribute:"resend-text"})],exports.PontOtp.prototype,"resendText",2);_t([a({attribute:"resend-button-text"})],exports.PontOtp.prototype,"resendButtonText",2);_t([a({attribute:"resend-event"})],exports.PontOtp.prototype,"resendEvent",2);_t([a()],exports.PontOtp.prototype,"id",2);_t([g()],exports.PontOtp.prototype,"_invalid",2);_t([g()],exports.PontOtp.prototype,"_error",2);_t([g()],exports.PontOtp.prototype,"_value",2);exports.PontOtp=_t([p("pont-otp")],exports.PontOtp);const Un={duration:60,resend_event:"",resend_button_label:"Resend code",count_down_text:"Resend code in "};var u0=Object.defineProperty,m0=Object.getOwnPropertyDescriptor,yr=(e,t,r,n)=>{for(var o=n>1?void 0:n?m0(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&u0(t,r,o),o};exports.PontOtpResend=class extends f{constructor(){super(...arguments),this.seed=wt(),this.duration=Un.duration,this.resend_event=Un.resend_event,this.resend_button_label=Un.resend_button_label,this.count_down_text=Un.count_down_text,this._remaining=0,this._handleResendClick=()=>{tt.processLoginflowEvent({event:this.resend_event}),this._startCountdown()}}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontOtpResend.TAG}-${this.seed}`}get countdownId(){return`${this.rootId}-${exports.PontOtpResend.COUNTDOWN}`}get resendButtonId(){return`${this.rootId}-${exports.PontOtpResend.RESEND_BUTTON}`}connectedCallback(){super.connectedCallback(),this._startCountdown()}disconnectedCallback(){super.disconnectedCallback(),this._clearTimer()}updated(t){t.has("duration")&&this._startCountdown()}_startCountdown(){this._clearTimer();const t=this.duration;if(t<=0){this._remaining=0;return}this._remaining=t,this._timer=window.setInterval(()=>{this._remaining=Math.max(0,this._remaining-1),this._remaining<=0&&this._clearTimer()},1e3)}_clearTimer(){this._timer&&(clearInterval(this._timer),this._timer=void 0)}render(){const t=this._remaining>0;return l`
5432
+ `}};exports.PontOtp.ROOT="otp";exports.PontOtp.TAG=`${et}-${exports.PontOtp.ROOT}`;_t([a({type:Boolean,attribute:"exclude-from-form",converter:{fromAttribute:e=>e!==null&&e!=="false",toAttribute:e=>e?"":null}})],exports.PontOtp.prototype,"excludeFromForm",2);_t([a({type:Boolean})],exports.PontOtp.prototype,"required",2);_t([a({attribute:"required-error"})],exports.PontOtp.prototype,"requiredError",2);_t([a({attribute:"incomplete-error"})],exports.PontOtp.prototype,"incompleteError",2);_t([a()],exports.PontOtp.prototype,"variant",2);_t([a({type:Number})],exports.PontOtp.prototype,"length",2);_t([a({type:Number})],exports.PontOtp.prototype,"timeout",2);_t([a({attribute:"data-key"})],exports.PontOtp.prototype,"dataKey",2);_t([a()],exports.PontOtp.prototype,"name",2);_t([a({type:Boolean})],exports.PontOtp.prototype,"disabled",2);_t([a({type:Boolean,attribute:"auto-submit",converter:{fromAttribute:e=>e!==null&&e!=="false",toAttribute:e=>e?"":null}})],exports.PontOtp.prototype,"autoSubmit",2);_t([a()],exports.PontOtp.prototype,"event",2);_t([a({attribute:"resend-text"})],exports.PontOtp.prototype,"resendText",2);_t([a({attribute:"resend-button-text"})],exports.PontOtp.prototype,"resendButtonText",2);_t([a({attribute:"resend-event"})],exports.PontOtp.prototype,"resendEvent",2);_t([a()],exports.PontOtp.prototype,"id",2);_t([g()],exports.PontOtp.prototype,"_invalid",2);_t([g()],exports.PontOtp.prototype,"_error",2);_t([g()],exports.PontOtp.prototype,"_value",2);exports.PontOtp=_t([p("pont-otp")],exports.PontOtp);const Un={duration:60,resend_event:"",resend_button_label:"Resend code",count_down_text:"Resend code in "};var u0=Object.defineProperty,m0=Object.getOwnPropertyDescriptor,yr=(e,t,r,n)=>{for(var o=n>1?void 0:n?m0(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&u0(t,r,o),o};exports.PontOtpResend=class extends f{constructor(){super(...arguments),this.seed=wt(),this.duration=Un.duration,this.resend_event=Un.resend_event,this.resend_button_label=Un.resend_button_label,this.count_down_text=Un.count_down_text,this._remaining=0,this._handleResendClick=()=>{tt.processLoginflowEvent({event:this.resend_event}),this._startCountdown()}}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontOtpResend.TAG}-${this.seed}`}get countdownId(){return`${this.rootId}-${exports.PontOtpResend.COUNTDOWN}`}get resendButtonId(){return`${this.rootId}-${exports.PontOtpResend.RESEND_BUTTON}`}connectedCallback(){super.connectedCallback(),this._startCountdown()}disconnectedCallback(){super.disconnectedCallback(),this._clearTimer()}updated(t){t.has("duration")&&this._startCountdown()}_startCountdown(){this._clearTimer();const t=this.duration;if(t<=0){this._remaining=0;return}this._remaining=t,this._timer=window.setInterval(()=>{this._remaining=Math.max(0,this._remaining-1),this._remaining<=0&&this._clearTimer()},1e3)}_clearTimer(){this._timer&&(clearInterval(this._timer),this._timer=void 0)}render(){const t=this._remaining>0;return l`
5433
5433
  <div part=${exports.PontOtpResend.PARTS.root} id=${this.rootId}>
5434
5434
  ${t?l`
5435
5435
  <pont-typography-muted
@@ -5449,14 +5449,14 @@
5449
5449
  </pont-button>
5450
5450
  `}
5451
5451
  </div>
5452
- `}};exports.PontOtpResend.ROOT="otp-resend";exports.PontOtpResend.COUNTDOWN="countdown";exports.PontOtpResend.RESEND_BUTTON="resend-button";exports.PontOtpResend.TAG=`${ht}-${exports.PontOtpResend.ROOT}`;exports.PontOtpResend.PARTS={root:exports.PontOtpResend.ROOT,countdown:`${exports.PontOtpResend.ROOT}-${exports.PontOtpResend.COUNTDOWN}`,resendButton:`${exports.PontOtpResend.ROOT}-${exports.PontOtpResend.RESEND_BUTTON}`};yr([a({type:String})],exports.PontOtpResend.prototype,"seed",2);yr([a({type:String,attribute:"custom-id"})],exports.PontOtpResend.prototype,"customId",2);yr([a({type:Number})],exports.PontOtpResend.prototype,"duration",2);yr([a({type:String,attribute:"resend-event"})],exports.PontOtpResend.prototype,"resend_event",2);yr([a({type:String,attribute:"resend-button-label"})],exports.PontOtpResend.prototype,"resend_button_label",2);yr([a({type:String,attribute:"count-down-text"})],exports.PontOtpResend.prototype,"count_down_text",2);yr([g()],exports.PontOtpResend.prototype,"_remaining",2);exports.PontOtpResend=yr([p("pont-otp-resend")],exports.PontOtpResend);const g0=[exports.PontEmailField,exports.PontPhoneField,exports.PontUsernameField,exports.PontIdentifierField,exports.PontNameField,exports.PontPasswordField,exports.PontConfirmField,exports.PontOtp],f0=[exports.PontPasskeyButton,exports.PontProviderButton,exports.PontLink];var v0=Object.defineProperty,b0=Object.getOwnPropertyDescriptor,Dn=(e,t,r,n)=>{for(var o=n>1?void 0:n?b0(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&v0(t,r,o),o};exports.PontForm=class extends f{constructor(){super(...arguments),this.seed=wt(),this._loading=!1,this._handleSubmitClick=t=>{var r;this._pendingEvent=(r=t.detail)==null?void 0:r.event},this._handleSubmit=async t=>{if(t.preventDefault(),this._loading)return;const r=this._fields;if(!r.map(b=>b.validate()).every(Boolean))return;const i={};r.forEach(b=>{i[b.name]=b.value});const s=this._pendingEvent;if(this.onSubmit){this.onSubmit(i,s);return}if(!s)return;const d=new CustomEvent(exports.PontForm.SUBMIT_EVENT,{detail:{id:this.rootId,data:i,event:s},bubbles:!0,composed:!0,cancelable:!0});if(this.dispatchEvent(d),d.defaultPrevented)return;const c=this._interactives,m=r.map(b=>!!b.disabled),v=c.map(b=>!!b.disabled);this._setLoading(!0,r,m,c,v);try{const b=await tt.processLoginflowEvent({event:s,...Object.keys(i).length?{data:i}:{}});this._dispatch(exports.PontForm.SUCCESS_EVENT,{id:this.rootId,data:i,event:s,result:b})}catch(b){const w=b instanceof Error?b.message:String(b);this._dispatch(exports.PontForm.ERROR_EVENT,{id:this.rootId,data:i,event:s,message:w})}finally{this._setLoading(!1,r,m,c,v),this._pendingEvent=void 0}},this._handleReset=t=>{this._pendingEvent=void 0,this.onReset&&this.onReset(t),this._dispatch(exports.PontForm.RESET_EVENT,{id:this.rootId})}}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontForm.TAG}-${this.seed}`}get _form(){const t=`form[part="${exports.PontForm.PARTS.root}"]`;return this.querySelector(t)}get _fields(){const t=this._form;return t?Array.from(t.querySelectorAll(g0.map(n=>n.TAG).join(", "))).filter(n=>typeof n.isFormField>"u"?!0:n.isFormField):[]}get _submit(){const t=this._form;if(!t)return null;const r=exports.PontSubmitButton.TAG;return t.querySelector(r)}get _interactives(){const t=this._form;if(!t)return[];const r=f0.map(n=>n.TAG).join(", ");return Array.from(t.querySelectorAll(r))}connectedCallback(){super.connectedCallback();const t=exports.PontSubmitButton.CLICK_EVENT;this.addEventListener(t,this._handleSubmitClick)}disconnectedCallback(){super.disconnectedCallback();const t=exports.PontSubmitButton.CLICK_EVENT;this.removeEventListener(t,this._handleSubmitClick)}firstUpdated(){const t=this._form;if(!t)return;Array.from(this.childNodes).filter(n=>n!==t).forEach(n=>t.appendChild(n))}_dispatch(t,r={}){this.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0}))}_setLoading(t,r,n,o,i){r.forEach((d,c)=>{d.disabled=t?!0:n[c]}),o.forEach((d,c)=>{d.disabled=t?!0:i[c]});const s=this._submit;s&&(s.loading=t),this._loading=t}render(){return l`
5452
+ `}};exports.PontOtpResend.ROOT="otp-resend";exports.PontOtpResend.COUNTDOWN="countdown";exports.PontOtpResend.RESEND_BUTTON="resend-button";exports.PontOtpResend.TAG=`${et}-${exports.PontOtpResend.ROOT}`;exports.PontOtpResend.PARTS={root:exports.PontOtpResend.ROOT,countdown:`${exports.PontOtpResend.ROOT}-${exports.PontOtpResend.COUNTDOWN}`,resendButton:`${exports.PontOtpResend.ROOT}-${exports.PontOtpResend.RESEND_BUTTON}`};yr([a({type:String})],exports.PontOtpResend.prototype,"seed",2);yr([a({type:String,attribute:"custom-id"})],exports.PontOtpResend.prototype,"customId",2);yr([a({type:Number})],exports.PontOtpResend.prototype,"duration",2);yr([a({type:String,attribute:"resend-event"})],exports.PontOtpResend.prototype,"resend_event",2);yr([a({type:String,attribute:"resend-button-label"})],exports.PontOtpResend.prototype,"resend_button_label",2);yr([a({type:String,attribute:"count-down-text"})],exports.PontOtpResend.prototype,"count_down_text",2);yr([g()],exports.PontOtpResend.prototype,"_remaining",2);exports.PontOtpResend=yr([p("pont-otp-resend")],exports.PontOtpResend);const g0=[exports.PontEmailField,exports.PontPhoneField,exports.PontUsernameField,exports.PontIdentifierField,exports.PontNameField,exports.PontPasswordField,exports.PontConfirmField,exports.PontOtp],f0=[exports.PontPasskeyButton,exports.PontProviderButton,exports.PontLink];var v0=Object.defineProperty,b0=Object.getOwnPropertyDescriptor,Dn=(e,t,r,n)=>{for(var o=n>1?void 0:n?b0(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&v0(t,r,o),o};exports.PontForm=class extends f{constructor(){super(...arguments),this.seed=wt(),this._loading=!1,this._handleSubmitClick=t=>{var r;this._pendingEvent=(r=t.detail)==null?void 0:r.event},this._handleSubmit=async t=>{if(t.preventDefault(),this._loading)return;const r=this._fields;if(!r.map(b=>b.validate()).every(Boolean))return;const i={};r.forEach(b=>{i[b.name]=b.value});const s=this._pendingEvent;if(this.onSubmit){this.onSubmit(i,s);return}if(!s)return;const d=new CustomEvent(exports.PontForm.SUBMIT_EVENT,{detail:{id:this.rootId,data:i,event:s},bubbles:!0,composed:!0,cancelable:!0});if(this.dispatchEvent(d),d.defaultPrevented)return;const c=this._interactives,m=r.map(b=>!!b.disabled),v=c.map(b=>!!b.disabled);this._setLoading(!0,r,m,c,v);try{const b=await tt.processLoginflowEvent({event:s,...Object.keys(i).length?{data:i}:{}});this._dispatch(exports.PontForm.SUCCESS_EVENT,{id:this.rootId,data:i,event:s,result:b})}catch(b){const w=b instanceof Error?b.message:String(b);this._dispatch(exports.PontForm.ERROR_EVENT,{id:this.rootId,data:i,event:s,message:w})}finally{this._setLoading(!1,r,m,c,v),this._pendingEvent=void 0}},this._handleReset=t=>{this._pendingEvent=void 0,this.onReset&&this.onReset(t),this._dispatch(exports.PontForm.RESET_EVENT,{id:this.rootId})}}createRenderRoot(){return this}get rootId(){return this.customId??`${exports.PontForm.TAG}-${this.seed}`}get _form(){const t=`form[part="${exports.PontForm.PARTS.root}"]`;return this.querySelector(t)}get _fields(){const t=this._form;return t?Array.from(t.querySelectorAll(g0.map(n=>n.TAG).join(", "))).filter(n=>typeof n.isFormField>"u"?!0:n.isFormField):[]}get _submit(){const t=this._form;if(!t)return null;const r=exports.PontSubmitButton.TAG;return t.querySelector(r)}get _interactives(){const t=this._form;if(!t)return[];const r=f0.map(n=>n.TAG).join(", ");return Array.from(t.querySelectorAll(r))}connectedCallback(){super.connectedCallback();const t=exports.PontSubmitButton.CLICK_EVENT;this.addEventListener(t,this._handleSubmitClick)}disconnectedCallback(){super.disconnectedCallback();const t=exports.PontSubmitButton.CLICK_EVENT;this.removeEventListener(t,this._handleSubmitClick)}firstUpdated(){const t=this._form;if(!t)return;Array.from(this.childNodes).filter(n=>n!==t).forEach(n=>t.appendChild(n))}_dispatch(t,r={}){this.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0}))}_setLoading(t,r,n,o,i){r.forEach((d,c)=>{d.disabled=t?!0:n[c]}),o.forEach((d,c)=>{d.disabled=t?!0:i[c]});const s=this._submit;s&&(s.loading=t),this._loading=t}render(){return l`
5453
5453
  <form
5454
5454
  id="${this.rootId}"
5455
5455
  part="${exports.PontForm.PARTS.root}"
5456
5456
  @submit=${this._handleSubmit}
5457
5457
  @reset=${this._handleReset}
5458
5458
  ></form>
5459
- `}};exports.PontForm.ROOT="form";exports.PontForm.TAG=`${ht}-${exports.PontForm.ROOT}`;exports.PontForm.SUBMIT_EVENT=`${exports.PontForm.TAG}:submit`;exports.PontForm.SUCCESS_EVENT=`${exports.PontForm.TAG}:success`;exports.PontForm.ERROR_EVENT=`${exports.PontForm.TAG}:error`;exports.PontForm.RESET_EVENT=`${exports.PontForm.TAG}:reset`;exports.PontForm.PARTS={root:exports.PontForm.ROOT};Dn([a({type:String})],exports.PontForm.prototype,"seed",2);Dn([a({type:String,attribute:"custom-id"})],exports.PontForm.prototype,"customId",2);Dn([a({attribute:!1})],exports.PontForm.prototype,"onSubmit",2);Dn([a({attribute:!1})],exports.PontForm.prototype,"onReset",2);exports.PontForm=Dn([p("pont-form")],exports.PontForm);var y0=Object.defineProperty,_0=Object.getOwnPropertyDescriptor,kt=(e,t,r,n)=>{for(var o=n>1?void 0:n?_0(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&y0(t,r,o),o};exports.PontProviderField=class extends f{constructor(){super(...arguments),this.seed=wt(),this.providers=[],this.overrides=[],this.design=new Rn(this)}static get parts(){const t=this._ROOT,r=`${t}-${this._BUTTON}`;return{root:t,button:r}}createRenderRoot(){return this}get rootId(){return this.customId??`sb-${exports.PontProviderField.parts.root}-${this.seed}`}get buttonId(){return`${this.rootId}-${exports.PontProviderField._BUTTON}`}get columns(){const t=this._providers.length;return t<3?"one":t%3===0?"three":t===5?"two-three":t===7?"three-four":"four"}get _providers(){return this.providers.length===0&&this.design.active?[...exports.PontProviderField.DESIGN_PROVIDERS]:[...new Set(this.providers)]}get _overrides(){return this.overrides.filter((t,r,n)=>r===n.findIndex(o=>o.provider===t.provider))}_renderButton(t){const r=`signin_with_oauth(${t.provider})`,n=t.content??this.content??(this._providers.length>2?"icon":void 0);return l`
5459
+ `}};exports.PontForm.ROOT="form";exports.PontForm.TAG=`${et}-${exports.PontForm.ROOT}`;exports.PontForm.SUBMIT_EVENT=`${exports.PontForm.TAG}:submit`;exports.PontForm.SUCCESS_EVENT=`${exports.PontForm.TAG}:success`;exports.PontForm.ERROR_EVENT=`${exports.PontForm.TAG}:error`;exports.PontForm.RESET_EVENT=`${exports.PontForm.TAG}:reset`;exports.PontForm.PARTS={root:exports.PontForm.ROOT};Dn([a({type:String})],exports.PontForm.prototype,"seed",2);Dn([a({type:String,attribute:"custom-id"})],exports.PontForm.prototype,"customId",2);Dn([a({attribute:!1})],exports.PontForm.prototype,"onSubmit",2);Dn([a({attribute:!1})],exports.PontForm.prototype,"onReset",2);exports.PontForm=Dn([p("pont-form")],exports.PontForm);var y0=Object.defineProperty,_0=Object.getOwnPropertyDescriptor,kt=(e,t,r,n)=>{for(var o=n>1?void 0:n?_0(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&y0(t,r,o),o};exports.PontProviderField=class extends f{constructor(){super(...arguments),this.seed=wt(),this.providers=[],this.overrides=[],this.design=new Rn(this)}static get parts(){const t=this._ROOT,r=`${t}-${this._BUTTON}`;return{root:t,button:r}}createRenderRoot(){return this}get rootId(){return this.customId??`${et}-${exports.PontProviderField.parts.root}-${this.seed}`}get buttonId(){return`${this.rootId}-${exports.PontProviderField._BUTTON}`}get columns(){const t=this._providers.length;return t<3?"one":t%3===0?"three":t===5?"two-three":t===7?"three-four":"four"}get _providers(){return this.providers.length===0&&this.design.active?[...exports.PontProviderField.DESIGN_PROVIDERS]:[...new Set(this.providers)]}get _overrides(){return this.overrides.filter((t,r,n)=>r===n.findIndex(o=>o.provider===t.provider))}_renderButton(t){const r=`signin_with_oauth(${t.provider})`,n=t.content??this.content??(this._providers.length>2?"icon":void 0);return l`
5460
5460
  <pont-provider-button
5461
5461
  id="${this.buttonId}"
5462
5462
  part="${exports.PontProviderField.parts.button}"
@@ -5490,7 +5490,7 @@
5490
5490
  >
5491
5491
  </div>
5492
5492
  </div>
5493
- `}};exports.PontEditIdentifier.ROOT="edit-identifier";exports.PontEditIdentifier.ICON="icon";exports.PontEditIdentifier.TAG=`${ht}-${exports.PontEditIdentifier.ROOT}`;exports.PontEditIdentifier.CLICK_EVENT=`${exports.PontEditIdentifier.TAG}:click`;exports.PontEditIdentifier.PARTS={root:exports.PontEditIdentifier.ROOT,icon:`${exports.PontEditIdentifier.ROOT}-${exports.PontEditIdentifier.ICON}`};Ln([a({type:String})],exports.PontEditIdentifier.prototype,"seed",2);Ln([a({type:String,attribute:"custom-id"})],exports.PontEditIdentifier.prototype,"customId",2);Ln([a({type:String})],exports.PontEditIdentifier.prototype,"identifier",2);Ln([a({type:String})],exports.PontEditIdentifier.prototype,"event",2);exports.PontEditIdentifier=Ln([p("pont-edit-identifier")],exports.PontEditIdentifier);function C0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ho={},ss,Ic;function S0(){return Ic||(Ic=1,ss=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),ss}var as={},rr={},Ac;function Xr(){if(Ac)return rr;Ac=1;let e;const t=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return rr.getSymbolSize=function(n){if(!n)throw new Error('"version" cannot be null or undefined');if(n<1||n>40)throw new Error('"version" should be in range from 1 to 40');return n*4+17},rr.getSymbolTotalCodewords=function(n){return t[n]},rr.getBCHDigit=function(r){let n=0;for(;r!==0;)n++,r>>>=1;return n},rr.setToSJISFunction=function(n){if(typeof n!="function")throw new Error('"toSJISFunc" is not a valid function.');e=n},rr.isKanjiModeEnabled=function(){return typeof e<"u"},rr.toSJIS=function(n){return e(n)},rr}var ls={},Tc;function fl(){return Tc||(Tc=1,(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(r){if(typeof r!="string")throw new Error("Param is not a string");switch(r.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+r)}}e.isValid=function(n){return n&&typeof n.bit<"u"&&n.bit>=0&&n.bit<4},e.from=function(n,o){if(e.isValid(n))return n;try{return t(n)}catch{return o}}})(ls)),ls}var ds,Dc;function E0(){if(Dc)return ds;Dc=1;function e(){this.buffer=[],this.length=0}return e.prototype={get:function(t){const r=Math.floor(t/8);return(this.buffer[r]>>>7-t%8&1)===1},put:function(t,r){for(let n=0;n<r;n++)this.putBit((t>>>r-n-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){const r=Math.floor(this.length/8);this.buffer.length<=r&&this.buffer.push(0),t&&(this.buffer[r]|=128>>>this.length%8),this.length++}},ds=e,ds}var cs,Lc;function x0(){if(Lc)return cs;Lc=1;function e(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}return e.prototype.set=function(t,r,n,o){const i=t*this.size+r;this.data[i]=n,o&&(this.reservedBit[i]=!0)},e.prototype.get=function(t,r){return this.data[t*this.size+r]},e.prototype.xor=function(t,r,n){this.data[t*this.size+r]^=n},e.prototype.isReserved=function(t,r){return this.reservedBit[t*this.size+r]},cs=e,cs}var ps={},Fc;function O0(){return Fc||(Fc=1,(function(e){const t=Xr().getSymbolSize;e.getRowColCoords=function(n){if(n===1)return[];const o=Math.floor(n/7)+2,i=t(n),s=i===145?26:Math.ceil((i-13)/(2*o-2))*2,d=[i-7];for(let c=1;c<o-1;c++)d[c]=d[c-1]-s;return d.push(6),d.reverse()},e.getPositions=function(n){const o=[],i=e.getRowColCoords(n),s=i.length;for(let d=0;d<s;d++)for(let c=0;c<s;c++)d===0&&c===0||d===0&&c===s-1||d===s-1&&c===0||o.push([i[d],i[c]]);return o}})(ps)),ps}var hs={},kc;function R0(){if(kc)return hs;kc=1;const e=Xr().getSymbolSize,t=7;return hs.getPositions=function(n){const o=e(n);return[[0,0],[o-t,0],[0,o-t]]},hs}var us={},Nc;function I0(){return Nc||(Nc=1,(function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(o){return o!=null&&o!==""&&!isNaN(o)&&o>=0&&o<=7},e.from=function(o){return e.isValid(o)?parseInt(o,10):void 0},e.getPenaltyN1=function(o){const i=o.size;let s=0,d=0,c=0,m=null,v=null;for(let b=0;b<i;b++){d=c=0,m=v=null;for(let w=0;w<i;w++){let _=o.get(b,w);_===m?d++:(d>=5&&(s+=t.N1+(d-5)),m=_,d=1),_=o.get(w,b),_===v?c++:(c>=5&&(s+=t.N1+(c-5)),v=_,c=1)}d>=5&&(s+=t.N1+(d-5)),c>=5&&(s+=t.N1+(c-5))}return s},e.getPenaltyN2=function(o){const i=o.size;let s=0;for(let d=0;d<i-1;d++)for(let c=0;c<i-1;c++){const m=o.get(d,c)+o.get(d,c+1)+o.get(d+1,c)+o.get(d+1,c+1);(m===4||m===0)&&s++}return s*t.N2},e.getPenaltyN3=function(o){const i=o.size;let s=0,d=0,c=0;for(let m=0;m<i;m++){d=c=0;for(let v=0;v<i;v++)d=d<<1&2047|o.get(m,v),v>=10&&(d===1488||d===93)&&s++,c=c<<1&2047|o.get(v,m),v>=10&&(c===1488||c===93)&&s++}return s*t.N3},e.getPenaltyN4=function(o){let i=0;const s=o.data.length;for(let c=0;c<s;c++)i+=o.data[c];return Math.abs(Math.ceil(i*100/s/5)-10)*t.N4};function r(n,o,i){switch(n){case e.Patterns.PATTERN000:return(o+i)%2===0;case e.Patterns.PATTERN001:return o%2===0;case e.Patterns.PATTERN010:return i%3===0;case e.Patterns.PATTERN011:return(o+i)%3===0;case e.Patterns.PATTERN100:return(Math.floor(o/2)+Math.floor(i/3))%2===0;case e.Patterns.PATTERN101:return o*i%2+o*i%3===0;case e.Patterns.PATTERN110:return(o*i%2+o*i%3)%2===0;case e.Patterns.PATTERN111:return(o*i%3+(o+i)%2)%2===0;default:throw new Error("bad maskPattern:"+n)}}e.applyMask=function(o,i){const s=i.size;for(let d=0;d<s;d++)for(let c=0;c<s;c++)i.isReserved(c,d)||i.xor(c,d,r(o,c,d))},e.getBestMask=function(o,i){const s=Object.keys(e.Patterns).length;let d=0,c=1/0;for(let m=0;m<s;m++){i(m),e.applyMask(m,o);const v=e.getPenaltyN1(o)+e.getPenaltyN2(o)+e.getPenaltyN3(o)+e.getPenaltyN4(o);e.applyMask(m,o),v<c&&(c=v,d=m)}return d}})(us)),us}var jn={},Mc;function qh(){if(Mc)return jn;Mc=1;const e=fl(),t=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],r=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return jn.getBlocksCount=function(o,i){switch(i){case e.L:return t[(o-1)*4+0];case e.M:return t[(o-1)*4+1];case e.Q:return t[(o-1)*4+2];case e.H:return t[(o-1)*4+3];default:return}},jn.getTotalCodewordsCount=function(o,i){switch(i){case e.L:return r[(o-1)*4+0];case e.M:return r[(o-1)*4+1];case e.Q:return r[(o-1)*4+2];case e.H:return r[(o-1)*4+3];default:return}},jn}var ms={},Zo={},Bc;function A0(){if(Bc)return Zo;Bc=1;const e=new Uint8Array(512),t=new Uint8Array(256);return(function(){let n=1;for(let o=0;o<255;o++)e[o]=n,t[n]=o,n<<=1,n&256&&(n^=285);for(let o=255;o<512;o++)e[o]=e[o-255]})(),Zo.log=function(n){if(n<1)throw new Error("log("+n+")");return t[n]},Zo.exp=function(n){return e[n]},Zo.mul=function(n,o){return n===0||o===0?0:e[t[n]+t[o]]},Zo}var Uc;function T0(){return Uc||(Uc=1,(function(e){const t=A0();e.mul=function(n,o){const i=new Uint8Array(n.length+o.length-1);for(let s=0;s<n.length;s++)for(let d=0;d<o.length;d++)i[s+d]^=t.mul(n[s],o[d]);return i},e.mod=function(n,o){let i=new Uint8Array(n);for(;i.length-o.length>=0;){const s=i[0];for(let c=0;c<o.length;c++)i[c]^=t.mul(o[c],s);let d=0;for(;d<i.length&&i[d]===0;)d++;i=i.slice(d)}return i},e.generateECPolynomial=function(n){let o=new Uint8Array([1]);for(let i=0;i<n;i++)o=e.mul(o,new Uint8Array([1,t.exp(i)]));return o}})(ms)),ms}var gs,jc;function D0(){if(jc)return gs;jc=1;const e=T0();function t(r){this.genPoly=void 0,this.degree=r,this.degree&&this.initialize(this.degree)}return t.prototype.initialize=function(n){this.degree=n,this.genPoly=e.generateECPolynomial(this.degree)},t.prototype.encode=function(n){if(!this.genPoly)throw new Error("Encoder not initialized");const o=new Uint8Array(n.length+this.degree);o.set(n);const i=e.mod(o,this.genPoly),s=this.degree-i.length;if(s>0){const d=new Uint8Array(this.degree);return d.set(i,s),d}return i},gs=t,gs}var fs={},vs={},bs={},qc;function zh(){return qc||(qc=1,bs.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}),bs}var he={},zc;function Vh(){if(zc)return he;zc=1;const e="[0-9]+",t="[A-Z $%*+\\-./:]+";let r="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";r=r.replace(/u/g,"\\u");const n="(?:(?![A-Z0-9 $%*+\\-./:]|"+r+`)(?:.|[\r
5493
+ `}};exports.PontEditIdentifier.ROOT="edit-identifier";exports.PontEditIdentifier.ICON="icon";exports.PontEditIdentifier.TAG=`${et}-${exports.PontEditIdentifier.ROOT}`;exports.PontEditIdentifier.CLICK_EVENT=`${exports.PontEditIdentifier.TAG}:click`;exports.PontEditIdentifier.PARTS={root:exports.PontEditIdentifier.ROOT,icon:`${exports.PontEditIdentifier.ROOT}-${exports.PontEditIdentifier.ICON}`};Ln([a({type:String})],exports.PontEditIdentifier.prototype,"seed",2);Ln([a({type:String,attribute:"custom-id"})],exports.PontEditIdentifier.prototype,"customId",2);Ln([a({type:String})],exports.PontEditIdentifier.prototype,"identifier",2);Ln([a({type:String})],exports.PontEditIdentifier.prototype,"event",2);exports.PontEditIdentifier=Ln([p("pont-edit-identifier")],exports.PontEditIdentifier);function C0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ho={},ss,Ic;function S0(){return Ic||(Ic=1,ss=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),ss}var as={},rr={},Ac;function Xr(){if(Ac)return rr;Ac=1;let e;const t=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return rr.getSymbolSize=function(n){if(!n)throw new Error('"version" cannot be null or undefined');if(n<1||n>40)throw new Error('"version" should be in range from 1 to 40');return n*4+17},rr.getSymbolTotalCodewords=function(n){return t[n]},rr.getBCHDigit=function(r){let n=0;for(;r!==0;)n++,r>>>=1;return n},rr.setToSJISFunction=function(n){if(typeof n!="function")throw new Error('"toSJISFunc" is not a valid function.');e=n},rr.isKanjiModeEnabled=function(){return typeof e<"u"},rr.toSJIS=function(n){return e(n)},rr}var ls={},Tc;function fl(){return Tc||(Tc=1,(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(r){if(typeof r!="string")throw new Error("Param is not a string");switch(r.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+r)}}e.isValid=function(n){return n&&typeof n.bit<"u"&&n.bit>=0&&n.bit<4},e.from=function(n,o){if(e.isValid(n))return n;try{return t(n)}catch{return o}}})(ls)),ls}var ds,Dc;function E0(){if(Dc)return ds;Dc=1;function e(){this.buffer=[],this.length=0}return e.prototype={get:function(t){const r=Math.floor(t/8);return(this.buffer[r]>>>7-t%8&1)===1},put:function(t,r){for(let n=0;n<r;n++)this.putBit((t>>>r-n-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){const r=Math.floor(this.length/8);this.buffer.length<=r&&this.buffer.push(0),t&&(this.buffer[r]|=128>>>this.length%8),this.length++}},ds=e,ds}var cs,Lc;function x0(){if(Lc)return cs;Lc=1;function e(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}return e.prototype.set=function(t,r,n,o){const i=t*this.size+r;this.data[i]=n,o&&(this.reservedBit[i]=!0)},e.prototype.get=function(t,r){return this.data[t*this.size+r]},e.prototype.xor=function(t,r,n){this.data[t*this.size+r]^=n},e.prototype.isReserved=function(t,r){return this.reservedBit[t*this.size+r]},cs=e,cs}var ps={},Fc;function O0(){return Fc||(Fc=1,(function(e){const t=Xr().getSymbolSize;e.getRowColCoords=function(n){if(n===1)return[];const o=Math.floor(n/7)+2,i=t(n),s=i===145?26:Math.ceil((i-13)/(2*o-2))*2,d=[i-7];for(let c=1;c<o-1;c++)d[c]=d[c-1]-s;return d.push(6),d.reverse()},e.getPositions=function(n){const o=[],i=e.getRowColCoords(n),s=i.length;for(let d=0;d<s;d++)for(let c=0;c<s;c++)d===0&&c===0||d===0&&c===s-1||d===s-1&&c===0||o.push([i[d],i[c]]);return o}})(ps)),ps}var hs={},kc;function R0(){if(kc)return hs;kc=1;const e=Xr().getSymbolSize,t=7;return hs.getPositions=function(n){const o=e(n);return[[0,0],[o-t,0],[0,o-t]]},hs}var us={},Nc;function I0(){return Nc||(Nc=1,(function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(o){return o!=null&&o!==""&&!isNaN(o)&&o>=0&&o<=7},e.from=function(o){return e.isValid(o)?parseInt(o,10):void 0},e.getPenaltyN1=function(o){const i=o.size;let s=0,d=0,c=0,m=null,v=null;for(let b=0;b<i;b++){d=c=0,m=v=null;for(let w=0;w<i;w++){let _=o.get(b,w);_===m?d++:(d>=5&&(s+=t.N1+(d-5)),m=_,d=1),_=o.get(w,b),_===v?c++:(c>=5&&(s+=t.N1+(c-5)),v=_,c=1)}d>=5&&(s+=t.N1+(d-5)),c>=5&&(s+=t.N1+(c-5))}return s},e.getPenaltyN2=function(o){const i=o.size;let s=0;for(let d=0;d<i-1;d++)for(let c=0;c<i-1;c++){const m=o.get(d,c)+o.get(d,c+1)+o.get(d+1,c)+o.get(d+1,c+1);(m===4||m===0)&&s++}return s*t.N2},e.getPenaltyN3=function(o){const i=o.size;let s=0,d=0,c=0;for(let m=0;m<i;m++){d=c=0;for(let v=0;v<i;v++)d=d<<1&2047|o.get(m,v),v>=10&&(d===1488||d===93)&&s++,c=c<<1&2047|o.get(v,m),v>=10&&(c===1488||c===93)&&s++}return s*t.N3},e.getPenaltyN4=function(o){let i=0;const s=o.data.length;for(let c=0;c<s;c++)i+=o.data[c];return Math.abs(Math.ceil(i*100/s/5)-10)*t.N4};function r(n,o,i){switch(n){case e.Patterns.PATTERN000:return(o+i)%2===0;case e.Patterns.PATTERN001:return o%2===0;case e.Patterns.PATTERN010:return i%3===0;case e.Patterns.PATTERN011:return(o+i)%3===0;case e.Patterns.PATTERN100:return(Math.floor(o/2)+Math.floor(i/3))%2===0;case e.Patterns.PATTERN101:return o*i%2+o*i%3===0;case e.Patterns.PATTERN110:return(o*i%2+o*i%3)%2===0;case e.Patterns.PATTERN111:return(o*i%3+(o+i)%2)%2===0;default:throw new Error("bad maskPattern:"+n)}}e.applyMask=function(o,i){const s=i.size;for(let d=0;d<s;d++)for(let c=0;c<s;c++)i.isReserved(c,d)||i.xor(c,d,r(o,c,d))},e.getBestMask=function(o,i){const s=Object.keys(e.Patterns).length;let d=0,c=1/0;for(let m=0;m<s;m++){i(m),e.applyMask(m,o);const v=e.getPenaltyN1(o)+e.getPenaltyN2(o)+e.getPenaltyN3(o)+e.getPenaltyN4(o);e.applyMask(m,o),v<c&&(c=v,d=m)}return d}})(us)),us}var jn={},Mc;function qh(){if(Mc)return jn;Mc=1;const e=fl(),t=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],r=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return jn.getBlocksCount=function(o,i){switch(i){case e.L:return t[(o-1)*4+0];case e.M:return t[(o-1)*4+1];case e.Q:return t[(o-1)*4+2];case e.H:return t[(o-1)*4+3];default:return}},jn.getTotalCodewordsCount=function(o,i){switch(i){case e.L:return r[(o-1)*4+0];case e.M:return r[(o-1)*4+1];case e.Q:return r[(o-1)*4+2];case e.H:return r[(o-1)*4+3];default:return}},jn}var ms={},Zo={},Bc;function A0(){if(Bc)return Zo;Bc=1;const e=new Uint8Array(512),t=new Uint8Array(256);return(function(){let n=1;for(let o=0;o<255;o++)e[o]=n,t[n]=o,n<<=1,n&256&&(n^=285);for(let o=255;o<512;o++)e[o]=e[o-255]})(),Zo.log=function(n){if(n<1)throw new Error("log("+n+")");return t[n]},Zo.exp=function(n){return e[n]},Zo.mul=function(n,o){return n===0||o===0?0:e[t[n]+t[o]]},Zo}var Uc;function T0(){return Uc||(Uc=1,(function(e){const t=A0();e.mul=function(n,o){const i=new Uint8Array(n.length+o.length-1);for(let s=0;s<n.length;s++)for(let d=0;d<o.length;d++)i[s+d]^=t.mul(n[s],o[d]);return i},e.mod=function(n,o){let i=new Uint8Array(n);for(;i.length-o.length>=0;){const s=i[0];for(let c=0;c<o.length;c++)i[c]^=t.mul(o[c],s);let d=0;for(;d<i.length&&i[d]===0;)d++;i=i.slice(d)}return i},e.generateECPolynomial=function(n){let o=new Uint8Array([1]);for(let i=0;i<n;i++)o=e.mul(o,new Uint8Array([1,t.exp(i)]));return o}})(ms)),ms}var gs,jc;function D0(){if(jc)return gs;jc=1;const e=T0();function t(r){this.genPoly=void 0,this.degree=r,this.degree&&this.initialize(this.degree)}return t.prototype.initialize=function(n){this.degree=n,this.genPoly=e.generateECPolynomial(this.degree)},t.prototype.encode=function(n){if(!this.genPoly)throw new Error("Encoder not initialized");const o=new Uint8Array(n.length+this.degree);o.set(n);const i=e.mod(o,this.genPoly),s=this.degree-i.length;if(s>0){const d=new Uint8Array(this.degree);return d.set(i,s),d}return i},gs=t,gs}var fs={},vs={},bs={},qc;function zh(){return qc||(qc=1,bs.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}),bs}var he={},zc;function Vh(){if(zc)return he;zc=1;const e="[0-9]+",t="[A-Z $%*+\\-./:]+";let r="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";r=r.replace(/u/g,"\\u");const n="(?:(?![A-Z0-9 $%*+\\-./:]|"+r+`)(?:.|[\r
5494
5494
  ]))+`;he.KANJI=new RegExp(r,"g"),he.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),he.BYTE=new RegExp(n,"g"),he.NUMERIC=new RegExp(e,"g"),he.ALPHANUMERIC=new RegExp(t,"g");const o=new RegExp("^"+r+"$"),i=new RegExp("^"+e+"$"),s=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return he.testKanji=function(c){return o.test(c)},he.testNumeric=function(c){return i.test(c)},he.testAlphanumeric=function(c){return s.test(c)},he}var Vc;function to(){return Vc||(Vc=1,(function(e){const t=zh(),r=Vh();e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(i,s){if(!i.ccBits)throw new Error("Invalid mode: "+i);if(!t.isValid(s))throw new Error("Invalid version: "+s);return s>=1&&s<10?i.ccBits[0]:s<27?i.ccBits[1]:i.ccBits[2]},e.getBestModeForData=function(i){return r.testNumeric(i)?e.NUMERIC:r.testAlphanumeric(i)?e.ALPHANUMERIC:r.testKanji(i)?e.KANJI:e.BYTE},e.toString=function(i){if(i&&i.id)return i.id;throw new Error("Invalid mode")},e.isValid=function(i){return i&&i.bit&&i.ccBits};function n(o){if(typeof o!="string")throw new Error("Param is not a string");switch(o.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+o)}}e.from=function(i,s){if(e.isValid(i))return i;try{return n(i)}catch{return s}}})(vs)),vs}var Hc;function L0(){return Hc||(Hc=1,(function(e){const t=Xr(),r=qh(),n=fl(),o=to(),i=zh(),s=7973,d=t.getBCHDigit(s);function c(w,_,C){for(let P=1;P<=40;P++)if(_<=e.getCapacity(P,C,w))return P}function m(w,_){return o.getCharCountIndicator(w,_)+4}function v(w,_){let C=0;return w.forEach(function(P){const x=m(P.mode,_);C+=x+P.getBitsLength()}),C}function b(w,_){for(let C=1;C<=40;C++)if(v(w,C)<=e.getCapacity(C,_,o.MIXED))return C}e.from=function(_,C){return i.isValid(_)?parseInt(_,10):C},e.getCapacity=function(_,C,P){if(!i.isValid(_))throw new Error("Invalid QR Code version");typeof P>"u"&&(P=o.BYTE);const x=t.getSymbolTotalCodewords(_),S=r.getTotalCodewordsCount(_,C),D=(x-S)*8;if(P===o.MIXED)return D;const L=D-m(P,_);switch(P){case o.NUMERIC:return Math.floor(L/10*3);case o.ALPHANUMERIC:return Math.floor(L/11*2);case o.KANJI:return Math.floor(L/13);case o.BYTE:default:return Math.floor(L/8)}},e.getBestVersionForData=function(_,C){let P;const x=n.from(C,n.M);if(Array.isArray(_)){if(_.length>1)return b(_,x);if(_.length===0)return 1;P=_[0]}else P=_;return c(P.mode,P.getLength(),x)},e.getEncodedBits=function(_){if(!i.isValid(_)||_<7)throw new Error("Invalid QR Code version");let C=_<<12;for(;t.getBCHDigit(C)-d>=0;)C^=s<<t.getBCHDigit(C)-d;return _<<12|C}})(fs)),fs}var ys={},Gc;function F0(){if(Gc)return ys;Gc=1;const e=Xr(),t=1335,r=21522,n=e.getBCHDigit(t);return ys.getEncodedBits=function(i,s){const d=i.bit<<3|s;let c=d<<10;for(;e.getBCHDigit(c)-n>=0;)c^=t<<e.getBCHDigit(c)-n;return(d<<10|c)^r},ys}var _s={},ws,Kc;function k0(){if(Kc)return ws;Kc=1;const e=to();function t(r){this.mode=e.NUMERIC,this.data=r.toString()}return t.getBitsLength=function(n){return 10*Math.floor(n/3)+(n%3?n%3*3+1:0)},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(n){let o,i,s;for(o=0;o+3<=this.data.length;o+=3)i=this.data.substr(o,3),s=parseInt(i,10),n.put(s,10);const d=this.data.length-o;d>0&&(i=this.data.substr(o),s=parseInt(i,10),n.put(s,d*3+1))},ws=t,ws}var $s,Wc;function N0(){if(Wc)return $s;Wc=1;const e=to(),t=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function r(n){this.mode=e.ALPHANUMERIC,this.data=n}return r.getBitsLength=function(o){return 11*Math.floor(o/2)+6*(o%2)},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(o){let i;for(i=0;i+2<=this.data.length;i+=2){let s=t.indexOf(this.data[i])*45;s+=t.indexOf(this.data[i+1]),o.put(s,11)}this.data.length%2&&o.put(t.indexOf(this.data[i]),6)},$s=r,$s}var Ps,Yc;function M0(){if(Yc)return Ps;Yc=1;const e=to();function t(r){this.mode=e.BYTE,typeof r=="string"?this.data=new TextEncoder().encode(r):this.data=new Uint8Array(r)}return t.getBitsLength=function(n){return n*8},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(r){for(let n=0,o=this.data.length;n<o;n++)r.put(this.data[n],8)},Ps=t,Ps}var Cs,Qc;function B0(){if(Qc)return Cs;Qc=1;const e=to(),t=Xr();function r(n){this.mode=e.KANJI,this.data=n}return r.getBitsLength=function(o){return o*13},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(n){let o;for(o=0;o<this.data.length;o++){let i=t.toSJIS(this.data[o]);if(i>=33088&&i<=40956)i-=33088;else if(i>=57408&&i<=60351)i-=49472;else throw new Error("Invalid SJIS character: "+this.data[o]+`
5495
5495
  Make sure your charset is UTF-8`);i=(i>>>8&255)*192+(i&255),n.put(i,13)}},Cs=r,Cs}var Ss={exports:{}},Zc;function U0(){return Zc||(Zc=1,(function(e){var t={single_source_shortest_paths:function(r,n,o){var i={},s={};s[n]=0;var d=t.PriorityQueue.make();d.push(n,0);for(var c,m,v,b,w,_,C,P,x;!d.empty();){c=d.pop(),m=c.value,b=c.cost,w=r[m]||{};for(v in w)w.hasOwnProperty(v)&&(_=w[v],C=b+_,P=s[v],x=typeof s[v]>"u",(x||P>C)&&(s[v]=C,d.push(v,C),i[v]=m))}if(typeof o<"u"&&typeof s[o]>"u"){var S=["Could not find a path from ",n," to ",o,"."].join("");throw new Error(S)}return i},extract_shortest_path_from_predecessor_list:function(r,n){for(var o=[],i=n;i;)o.push(i),r[i],i=r[i];return o.reverse(),o},find_path:function(r,n,o){var i=t.single_source_shortest_paths(r,n,o);return t.extract_shortest_path_from_predecessor_list(i,o)},PriorityQueue:{make:function(r){var n=t.PriorityQueue,o={},i;r=r||{};for(i in n)n.hasOwnProperty(i)&&(o[i]=n[i]);return o.queue=[],o.sorter=r.sorter||n.default_sorter,o},default_sorter:function(r,n){return r.cost-n.cost},push:function(r,n){var o={value:r,cost:n};this.queue.push(o),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=t})(Ss)),Ss.exports}var Jc;function j0(){return Jc||(Jc=1,(function(e){const t=to(),r=k0(),n=N0(),o=M0(),i=B0(),s=Vh(),d=Xr(),c=U0();function m(S){return unescape(encodeURIComponent(S)).length}function v(S,D,L){const R=[];let K;for(;(K=S.exec(L))!==null;)R.push({data:K[0],index:K.index,mode:D,length:K[0].length});return R}function b(S){const D=v(s.NUMERIC,t.NUMERIC,S),L=v(s.ALPHANUMERIC,t.ALPHANUMERIC,S);let R,K;return d.isKanjiModeEnabled()?(R=v(s.BYTE,t.BYTE,S),K=v(s.KANJI,t.KANJI,S)):(R=v(s.BYTE_KANJI,t.BYTE,S),K=[]),D.concat(L,R,K).sort(function(A,T){return A.index-T.index}).map(function(A){return{data:A.data,mode:A.mode,length:A.length}})}function w(S,D){switch(D){case t.NUMERIC:return r.getBitsLength(S);case t.ALPHANUMERIC:return n.getBitsLength(S);case t.KANJI:return i.getBitsLength(S);case t.BYTE:return o.getBitsLength(S)}}function _(S){return S.reduce(function(D,L){const R=D.length-1>=0?D[D.length-1]:null;return R&&R.mode===L.mode?(D[D.length-1].data+=L.data,D):(D.push(L),D)},[])}function C(S){const D=[];for(let L=0;L<S.length;L++){const R=S[L];switch(R.mode){case t.NUMERIC:D.push([R,{data:R.data,mode:t.ALPHANUMERIC,length:R.length},{data:R.data,mode:t.BYTE,length:R.length}]);break;case t.ALPHANUMERIC:D.push([R,{data:R.data,mode:t.BYTE,length:R.length}]);break;case t.KANJI:D.push([R,{data:R.data,mode:t.BYTE,length:m(R.data)}]);break;case t.BYTE:D.push([{data:R.data,mode:t.BYTE,length:m(R.data)}])}}return D}function P(S,D){const L={},R={start:{}};let K=["start"];for(let O=0;O<S.length;O++){const A=S[O],T=[];for(let E=0;E<A.length;E++){const N=A[E],F=""+O+E;T.push(F),L[F]={node:N,lastCount:0},R[F]={};for(let $=0;$<K.length;$++){const k=K[$];L[k]&&L[k].node.mode===N.mode?(R[k][F]=w(L[k].lastCount+N.length,N.mode)-w(L[k].lastCount,N.mode),L[k].lastCount+=N.length):(L[k]&&(L[k].lastCount=N.length),R[k][F]=w(N.length,N.mode)+4+t.getCharCountIndicator(N.mode,D))}}K=T}for(let O=0;O<K.length;O++)R[K[O]].end=0;return{map:R,table:L}}function x(S,D){let L;const R=t.getBestModeForData(S);if(L=t.from(D,R),L!==t.BYTE&&L.bit<R.bit)throw new Error('"'+S+'" cannot be encoded with mode '+t.toString(L)+`.
5496
5496
  Suggested mode is: `+t.toString(R));switch(L===t.KANJI&&!d.isKanjiModeEnabled()&&(L=t.BYTE),L){case t.NUMERIC:return new r(S);case t.ALPHANUMERIC:return new n(S);case t.KANJI:return new i(S);case t.BYTE:return new o(S)}}e.fromArray=function(D){return D.reduce(function(L,R){return typeof R=="string"?L.push(x(R,null)):R.data&&L.push(x(R.data,R.mode)),L},[])},e.fromString=function(D,L){const R=b(D,d.isKanjiModeEnabled()),K=C(R),O=P(K,L),A=c.find_path(O.map,"start","end"),T=[];for(let E=1;E<A.length-1;E++)T.push(O.table[A[E]].node);return e.fromArray(_(T))},e.rawSplit=function(D){return e.fromArray(b(D,d.isKanjiModeEnabled()))}})(_s)),_s}var Xc;function q0(){if(Xc)return as;Xc=1;const e=Xr(),t=fl(),r=E0(),n=x0(),o=O0(),i=R0(),s=I0(),d=qh(),c=D0(),m=L0(),v=F0(),b=to(),w=j0();function _(O,A){const T=O.size,E=i.getPositions(A);for(let N=0;N<E.length;N++){const F=E[N][0],$=E[N][1];for(let k=-1;k<=7;k++)if(!(F+k<=-1||T<=F+k))for(let M=-1;M<=7;M++)$+M<=-1||T<=$+M||(k>=0&&k<=6&&(M===0||M===6)||M>=0&&M<=6&&(k===0||k===6)||k>=2&&k<=4&&M>=2&&M<=4?O.set(F+k,$+M,!0,!0):O.set(F+k,$+M,!1,!0))}}function C(O){const A=O.size;for(let T=8;T<A-8;T++){const E=T%2===0;O.set(T,6,E,!0),O.set(6,T,E,!0)}}function P(O,A){const T=o.getPositions(A);for(let E=0;E<T.length;E++){const N=T[E][0],F=T[E][1];for(let $=-2;$<=2;$++)for(let k=-2;k<=2;k++)$===-2||$===2||k===-2||k===2||$===0&&k===0?O.set(N+$,F+k,!0,!0):O.set(N+$,F+k,!1,!0)}}function x(O,A){const T=O.size,E=m.getEncodedBits(A);let N,F,$;for(let k=0;k<18;k++)N=Math.floor(k/3),F=k%3+T-8-3,$=(E>>k&1)===1,O.set(N,F,$,!0),O.set(F,N,$,!0)}function S(O,A,T){const E=O.size,N=v.getEncodedBits(A,T);let F,$;for(F=0;F<15;F++)$=(N>>F&1)===1,F<6?O.set(F,8,$,!0):F<8?O.set(F+1,8,$,!0):O.set(E-15+F,8,$,!0),F<8?O.set(8,E-F-1,$,!0):F<9?O.set(8,15-F-1+1,$,!0):O.set(8,15-F-1,$,!0);O.set(E-8,8,1,!0)}function D(O,A){const T=O.size;let E=-1,N=T-1,F=7,$=0;for(let k=T-1;k>0;k-=2)for(k===6&&k--;;){for(let M=0;M<2;M++)if(!O.isReserved(N,k-M)){let Xt=!1;$<A.length&&(Xt=(A[$]>>>F&1)===1),O.set(N,k-M,Xt),F--,F===-1&&($++,F=7)}if(N+=E,N<0||T<=N){N-=E,E=-E;break}}}function L(O,A,T){const E=new r;T.forEach(function(M){E.put(M.mode.bit,4),E.put(M.getLength(),b.getCharCountIndicator(M.mode,O)),M.write(E)});const N=e.getSymbolTotalCodewords(O),F=d.getTotalCodewordsCount(O,A),$=(N-F)*8;for(E.getLengthInBits()+4<=$&&E.put(0,4);E.getLengthInBits()%8!==0;)E.putBit(0);const k=($-E.getLengthInBits())/8;for(let M=0;M<k;M++)E.put(M%2?17:236,8);return R(E,O,A)}function R(O,A,T){const E=e.getSymbolTotalCodewords(A),N=d.getTotalCodewordsCount(A,T),F=E-N,$=d.getBlocksCount(A,T),k=E%$,M=$-k,Xt=Math.floor(E/$),pe=Math.floor(F/$),Fn=pe+1,eo=Xt-pe,$r=new c(eo);let ro=0;const It=new Array($),Pl=new Array($);let Gi=0;const Gh=new Uint8Array(O.buffer);for(let oo=0;oo<$;oo++){const Wi=oo<M?pe:Fn;It[oo]=Gh.slice(ro,ro+Wi),Pl[oo]=$r.encode(It[oo]),ro+=Wi,Gi=Math.max(Gi,Wi)}const Ki=new Uint8Array(E);let Cl=0,Be,Ue;for(Be=0;Be<Gi;Be++)for(Ue=0;Ue<$;Ue++)Be<It[Ue].length&&(Ki[Cl++]=It[Ue][Be]);for(Be=0;Be<eo;Be++)for(Ue=0;Ue<$;Ue++)Ki[Cl++]=Pl[Ue][Be];return Ki}function K(O,A,T,E){let N;if(Array.isArray(O))N=w.fromArray(O);else if(typeof O=="string"){let Xt=A;if(!Xt){const pe=w.rawSplit(O);Xt=m.getBestVersionForData(pe,T)}N=w.fromString(O,Xt||40)}else throw new Error("Invalid data");const F=m.getBestVersionForData(N,T);if(!F)throw new Error("The amount of data is too big to be stored in a QR Code");if(!A)A=F;else if(A<F)throw new Error(`
@@ -5530,7 +5530,7 @@ Minimum version required to store current data is: `+F+`.
5530
5530
  `:h}
5531
5531
  </div>
5532
5532
  </div>
5533
- `}_getReappearButtonVariant(){return getComputedStyle(this).getPropertyValue("--pont-qr-code-reappear-button-variant").trim()||"primary"}};exports.PontQrCode.ROOT="qr-code";exports.PontQrCode.QR_CANVAS="canvas";exports.PontQrCode.OVERLAY="overlay";exports.PontQrCode.REAPPEAR_BUTTON="reappear-button";exports.PontQrCode.TAG=`${ht}-${exports.PontQrCode.ROOT}`;exports.PontQrCode.PARTS={root:exports.PontQrCode.ROOT,canvas:`${exports.PontQrCode.ROOT}-${exports.PontQrCode.QR_CANVAS}`,overlay:`${exports.PontQrCode.ROOT}-${exports.PontQrCode.OVERLAY}`,reappearButton:`${exports.PontQrCode.ROOT}-${exports.PontQrCode.REAPPEAR_BUTTON}`};Je([a({type:String})],exports.PontQrCode.prototype,"seed",2);Je([a({type:String,attribute:"custom-id"})],exports.PontQrCode.prototype,"customId",2);Je([a({type:String})],exports.PontQrCode.prototype,"url",2);Je([a({type:Number})],exports.PontQrCode.prototype,"timeout",2);Je([a({type:String,attribute:"reappear-button-text"})],exports.PontQrCode.prototype,"reappearButtonText",2);Je([a({type:Boolean})],exports.PontQrCode.prototype,"disabled",2);Je([a({type:String,attribute:"error-correction"})],exports.PontQrCode.prototype,"errorCorrection",2);Je([g()],exports.PontQrCode.prototype,"_obscured",2);exports.PontQrCode=Je([p("pont-qr-code")],exports.PontQrCode);const Jo={title:"Can't scan?",secret:"",issuer:"",account:"",secretLabel:"Manual secret"};var Q0=Object.defineProperty,Z0=Object.getOwnPropertyDescriptor,_r=(e,t,r,n)=>{for(var o=n>1?void 0:n?Z0(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Q0(t,r,o),o};exports.PontSecret=class extends jt{constructor(){super(...arguments),this.title=Jo.title,this.secret=Jo.secret,this.issuer=Jo.issuer,this.account=Jo.account,this.secretLabel=Jo.secretLabel,this.disabled=!1,this._copied=!1,this._handleCopy=async()=>{if(!(!this.secret||this.disabled))try{await navigator.clipboard.writeText(this.secret),this.emit("pont-secret:copied",{secret:this.secret}),this._copied=!0,this._copyTimeout&&clearTimeout(this._copyTimeout),this._copyTimeout=window.setTimeout(()=>{this._copied=!1,this._copyTimeout=void 0},2e3)}catch(t){console.warn("Failed to copy secret:",t),this.emit("pont-secret:copy-error",{error:t})}}}createRenderRoot(){return this}emit(t,r){this.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0}))}render(){return l`
5533
+ `}_getReappearButtonVariant(){return getComputedStyle(this).getPropertyValue("--pont-qr-code-reappear-button-variant").trim()||"primary"}};exports.PontQrCode.ROOT="qr-code";exports.PontQrCode.QR_CANVAS="canvas";exports.PontQrCode.OVERLAY="overlay";exports.PontQrCode.REAPPEAR_BUTTON="reappear-button";exports.PontQrCode.TAG=`${et}-${exports.PontQrCode.ROOT}`;exports.PontQrCode.PARTS={root:exports.PontQrCode.ROOT,canvas:`${exports.PontQrCode.ROOT}-${exports.PontQrCode.QR_CANVAS}`,overlay:`${exports.PontQrCode.ROOT}-${exports.PontQrCode.OVERLAY}`,reappearButton:`${exports.PontQrCode.ROOT}-${exports.PontQrCode.REAPPEAR_BUTTON}`};Je([a({type:String})],exports.PontQrCode.prototype,"seed",2);Je([a({type:String,attribute:"custom-id"})],exports.PontQrCode.prototype,"customId",2);Je([a({type:String})],exports.PontQrCode.prototype,"url",2);Je([a({type:Number})],exports.PontQrCode.prototype,"timeout",2);Je([a({type:String,attribute:"reappear-button-text"})],exports.PontQrCode.prototype,"reappearButtonText",2);Je([a({type:Boolean})],exports.PontQrCode.prototype,"disabled",2);Je([a({type:String,attribute:"error-correction"})],exports.PontQrCode.prototype,"errorCorrection",2);Je([g()],exports.PontQrCode.prototype,"_obscured",2);exports.PontQrCode=Je([p("pont-qr-code")],exports.PontQrCode);const Jo={title:"Can't scan?",secret:"",issuer:"",account:"",secretLabel:"Manual secret"};var Q0=Object.defineProperty,Z0=Object.getOwnPropertyDescriptor,_r=(e,t,r,n)=>{for(var o=n>1?void 0:n?Z0(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Q0(t,r,o),o};exports.PontSecret=class extends jt{constructor(){super(...arguments),this.title=Jo.title,this.secret=Jo.secret,this.issuer=Jo.issuer,this.account=Jo.account,this.secretLabel=Jo.secretLabel,this.disabled=!1,this._copied=!1,this._handleCopy=async()=>{if(!(!this.secret||this.disabled))try{await navigator.clipboard.writeText(this.secret),this.emit("pont-secret:copied",{secret:this.secret}),this._copied=!0,this._copyTimeout&&clearTimeout(this._copyTimeout),this._copyTimeout=window.setTimeout(()=>{this._copied=!1,this._copyTimeout=void 0},2e3)}catch(t){console.warn("Failed to copy secret:",t),this.emit("pont-secret:copy-error",{error:t})}}}createRenderRoot(){return this}emit(t,r){this.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0}))}render(){return l`
5534
5534
  <div part=${exports.PontSecret.PARTS.root} class="pont-secret-root">
5535
5535
  <div part=${exports.PontSecret.PARTS.card} class="pont-secret-card">
5536
5536
  <div part=${exports.PontSecret.PARTS.title} class="pont-secret-title">
@@ -5586,7 +5586,7 @@ Minimum version required to store current data is: `+F+`.
5586
5586
  </div>
5587
5587
  </div>
5588
5588
  </div>
5589
- `}};exports.PontSecret.ROOT="secret";exports.PontSecret.CARD="card";exports.PontSecret.TITLE="title";exports.PontSecret.INPUT_GROUP="input-group";exports.PontSecret.COPY_BUTTON="copy-button";exports.PontSecret.METADATA="metadata";exports.PontSecret.ISSUER="issuer";exports.PontSecret.ACCOUNT="account";exports.PontSecret.TOOLTIP="tooltip";exports.PontSecret.TAG=`${ht}-${exports.PontSecret.ROOT}`;exports.PontSecret.PARTS={root:exports.PontSecret.ROOT,card:`${exports.PontSecret.ROOT}-${exports.PontSecret.CARD}`,title:`${exports.PontSecret.ROOT}-${exports.PontSecret.TITLE}`,inputGroup:`${exports.PontSecret.ROOT}-${exports.PontSecret.INPUT_GROUP}`,copyButton:`${exports.PontSecret.ROOT}-${exports.PontSecret.COPY_BUTTON}`,metadata:`${exports.PontSecret.ROOT}-${exports.PontSecret.METADATA}`,issuer:`${exports.PontSecret.ROOT}-${exports.PontSecret.ISSUER}`,account:`${exports.PontSecret.ROOT}-${exports.PontSecret.ACCOUNT}`,tooltip:`${exports.PontSecret.ROOT}-${exports.PontSecret.TOOLTIP}`};_r([a({type:String})],exports.PontSecret.prototype,"title",2);_r([a({type:String})],exports.PontSecret.prototype,"secret",2);_r([a({type:String})],exports.PontSecret.prototype,"issuer",2);_r([a({type:String})],exports.PontSecret.prototype,"account",2);_r([a({type:String,attribute:"secret-label"})],exports.PontSecret.prototype,"secretLabel",2);_r([a({type:Boolean})],exports.PontSecret.prototype,"disabled",2);_r([g()],exports.PontSecret.prototype,"_copied",2);exports.PontSecret=_r([p("pont-secret")],exports.PontSecret);const Rs={title:"Recovery codes",subtitle:"Use these codes if you lose access to your authenticator app.",codes:[]};var J0=Object.defineProperty,X0=Object.getOwnPropertyDescriptor,zo=(e,t,r,n)=>{for(var o=n>1?void 0:n?X0(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&J0(t,r,o),o};exports.PontRecoveryCodes=class extends jt{constructor(){super(...arguments),this.title=Rs.title,this.subtitle=Rs.subtitle,this.codes=Rs.codes,this.disabled=!1,this._copied=!1,this._handleCopyAll=async()=>{if(!this.codes.length||this.disabled)return;const t=this.codes.join(`
5589
+ `}};exports.PontSecret.ROOT="secret";exports.PontSecret.CARD="card";exports.PontSecret.TITLE="title";exports.PontSecret.INPUT_GROUP="input-group";exports.PontSecret.COPY_BUTTON="copy-button";exports.PontSecret.METADATA="metadata";exports.PontSecret.ISSUER="issuer";exports.PontSecret.ACCOUNT="account";exports.PontSecret.TOOLTIP="tooltip";exports.PontSecret.TAG=`${et}-${exports.PontSecret.ROOT}`;exports.PontSecret.PARTS={root:exports.PontSecret.ROOT,card:`${exports.PontSecret.ROOT}-${exports.PontSecret.CARD}`,title:`${exports.PontSecret.ROOT}-${exports.PontSecret.TITLE}`,inputGroup:`${exports.PontSecret.ROOT}-${exports.PontSecret.INPUT_GROUP}`,copyButton:`${exports.PontSecret.ROOT}-${exports.PontSecret.COPY_BUTTON}`,metadata:`${exports.PontSecret.ROOT}-${exports.PontSecret.METADATA}`,issuer:`${exports.PontSecret.ROOT}-${exports.PontSecret.ISSUER}`,account:`${exports.PontSecret.ROOT}-${exports.PontSecret.ACCOUNT}`,tooltip:`${exports.PontSecret.ROOT}-${exports.PontSecret.TOOLTIP}`};_r([a({type:String})],exports.PontSecret.prototype,"title",2);_r([a({type:String})],exports.PontSecret.prototype,"secret",2);_r([a({type:String})],exports.PontSecret.prototype,"issuer",2);_r([a({type:String})],exports.PontSecret.prototype,"account",2);_r([a({type:String,attribute:"secret-label"})],exports.PontSecret.prototype,"secretLabel",2);_r([a({type:Boolean})],exports.PontSecret.prototype,"disabled",2);_r([g()],exports.PontSecret.prototype,"_copied",2);exports.PontSecret=_r([p("pont-secret")],exports.PontSecret);const Rs={title:"Recovery codes",subtitle:"Use these codes if you lose access to your authenticator app.",codes:[]};var J0=Object.defineProperty,X0=Object.getOwnPropertyDescriptor,zo=(e,t,r,n)=>{for(var o=n>1?void 0:n?X0(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&J0(t,r,o),o};exports.PontRecoveryCodes=class extends jt{constructor(){super(...arguments),this.title=Rs.title,this.subtitle=Rs.subtitle,this.codes=Rs.codes,this.disabled=!1,this._copied=!1,this._handleCopyAll=async()=>{if(!this.codes.length||this.disabled)return;const t=this.codes.join(`
5590
5590
  `);try{await navigator.clipboard.writeText(t),this.emit("pont-recovery-codes:copied",{codes:this.codes}),this._copied=!0,this._copyTimeout&&clearTimeout(this._copyTimeout),this._copyTimeout=window.setTimeout(()=>{this._copied=!1,this._copyTimeout=void 0},2e3)}catch(r){console.warn("Failed to copy codes:",r),this.emit("pont-recovery-codes:copy-error",{error:r})}},this._handleDownload=()=>{if(!this.codes.length||this.disabled)return;const t=this.codes.join(`
5591
5591
  `),r=new Blob([t],{type:"text/plain"}),n=URL.createObjectURL(r),o=document.createElement("a");o.href=n,o.download="recovery-codes.txt",document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(n),this.emit("pont-recovery-codes:downloaded",{codes:this.codes})}}createRenderRoot(){return this}emit(t,r){this.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0}))}render(){const t=this.codes&&this.codes.length>0;return l`
5592
5592
  <div part=${exports.PontRecoveryCodes.PARTS.root} class="pont-recovery-codes-root">
@@ -5659,7 +5659,7 @@ Minimum version required to store current data is: `+F+`.
5659
5659
  </div>
5660
5660
  </div>
5661
5661
  </div>
5662
- `}};exports.PontRecoveryCodes.ROOT="recovery-codes";exports.PontRecoveryCodes.CARD="card";exports.PontRecoveryCodes.TITLE="title";exports.PontRecoveryCodes.SUBTITLE="subtitle";exports.PontRecoveryCodes.CODES_LIST="codes-list";exports.PontRecoveryCodes.CODE_ITEM="code-item";exports.PontRecoveryCodes.BUTTONS="buttons";exports.PontRecoveryCodes.COPY_BUTTON="copy-button";exports.PontRecoveryCodes.DOWNLOAD_BUTTON="download-button";exports.PontRecoveryCodes.TOOLTIP="tooltip";exports.PontRecoveryCodes.TAG=`${ht}-${exports.PontRecoveryCodes.ROOT}`;exports.PontRecoveryCodes.PARTS={root:exports.PontRecoveryCodes.ROOT,card:`${exports.PontRecoveryCodes.ROOT}-${exports.PontRecoveryCodes.CARD}`,title:`${exports.PontRecoveryCodes.ROOT}-${exports.PontRecoveryCodes.TITLE}`,subtitle:`${exports.PontRecoveryCodes.ROOT}-${exports.PontRecoveryCodes.SUBTITLE}`,codesList:`${exports.PontRecoveryCodes.ROOT}-${exports.PontRecoveryCodes.CODES_LIST}`,codeItem:`${exports.PontRecoveryCodes.ROOT}-${exports.PontRecoveryCodes.CODE_ITEM}`,buttons:`${exports.PontRecoveryCodes.ROOT}-${exports.PontRecoveryCodes.BUTTONS}`,copyButton:`${exports.PontRecoveryCodes.ROOT}-${exports.PontRecoveryCodes.COPY_BUTTON}`,downloadButton:`${exports.PontRecoveryCodes.ROOT}-${exports.PontRecoveryCodes.DOWNLOAD_BUTTON}`,tooltip:`${exports.PontRecoveryCodes.ROOT}-${exports.PontRecoveryCodes.TOOLTIP}`};zo([a({type:String})],exports.PontRecoveryCodes.prototype,"title",2);zo([a({type:String})],exports.PontRecoveryCodes.prototype,"subtitle",2);zo([a({type:Array})],exports.PontRecoveryCodes.prototype,"codes",2);zo([a({type:Boolean})],exports.PontRecoveryCodes.prototype,"disabled",2);zo([g()],exports.PontRecoveryCodes.prototype,"_copied",2);exports.PontRecoveryCodes=zo([p("pont-recovery-codes")],exports.PontRecoveryCodes);const t2={default:U`
5662
+ `}};exports.PontRecoveryCodes.ROOT="recovery-codes";exports.PontRecoveryCodes.CARD="card";exports.PontRecoveryCodes.TITLE="title";exports.PontRecoveryCodes.SUBTITLE="subtitle";exports.PontRecoveryCodes.CODES_LIST="codes-list";exports.PontRecoveryCodes.CODE_ITEM="code-item";exports.PontRecoveryCodes.BUTTONS="buttons";exports.PontRecoveryCodes.COPY_BUTTON="copy-button";exports.PontRecoveryCodes.DOWNLOAD_BUTTON="download-button";exports.PontRecoveryCodes.TOOLTIP="tooltip";exports.PontRecoveryCodes.TAG=`${et}-${exports.PontRecoveryCodes.ROOT}`;exports.PontRecoveryCodes.PARTS={root:exports.PontRecoveryCodes.ROOT,card:`${exports.PontRecoveryCodes.ROOT}-${exports.PontRecoveryCodes.CARD}`,title:`${exports.PontRecoveryCodes.ROOT}-${exports.PontRecoveryCodes.TITLE}`,subtitle:`${exports.PontRecoveryCodes.ROOT}-${exports.PontRecoveryCodes.SUBTITLE}`,codesList:`${exports.PontRecoveryCodes.ROOT}-${exports.PontRecoveryCodes.CODES_LIST}`,codeItem:`${exports.PontRecoveryCodes.ROOT}-${exports.PontRecoveryCodes.CODE_ITEM}`,buttons:`${exports.PontRecoveryCodes.ROOT}-${exports.PontRecoveryCodes.BUTTONS}`,copyButton:`${exports.PontRecoveryCodes.ROOT}-${exports.PontRecoveryCodes.COPY_BUTTON}`,downloadButton:`${exports.PontRecoveryCodes.ROOT}-${exports.PontRecoveryCodes.DOWNLOAD_BUTTON}`,tooltip:`${exports.PontRecoveryCodes.ROOT}-${exports.PontRecoveryCodes.TOOLTIP}`};zo([a({type:String})],exports.PontRecoveryCodes.prototype,"title",2);zo([a({type:String})],exports.PontRecoveryCodes.prototype,"subtitle",2);zo([a({type:Array})],exports.PontRecoveryCodes.prototype,"codes",2);zo([a({type:Boolean})],exports.PontRecoveryCodes.prototype,"disabled",2);zo([g()],exports.PontRecoveryCodes.prototype,"_copied",2);exports.PontRecoveryCodes=zo([p("pont-recovery-codes")],exports.PontRecoveryCodes);const t2={default:U`
5663
5663
  <circle cx="12" cy="12" r="10"/>
5664
5664
  <line x1="12" x2="12" y1="8" y2="12"/>
5665
5665
  <line x1="12" x2="12.01" y1="16" y2="16"/>
@@ -5719,11 +5719,11 @@ Minimum version required to store current data is: `+F+`.
5719
5719
  </pont-callout-description>
5720
5720
  `:h}
5721
5721
  </pont-callout>
5722
- `}};exports.PontAlert.ROOT="alert";exports.PontAlert.ICON="icon";exports.PontAlert.TITLE="title";exports.PontAlert.DESCRIPTION="description";exports.PontAlert.TAG=`${ht}-${exports.PontAlert.ROOT}`;exports.PontAlert.PARTS={root:exports.PontAlert.ROOT,icon:`${exports.PontAlert.ROOT}-${exports.PontAlert.ICON}`,title:`${exports.PontAlert.ROOT}-${exports.PontAlert.TITLE}`,description:`${exports.PontAlert.ROOT}-${exports.PontAlert.DESCRIPTION}`};Xe([a({type:String})],exports.PontAlert.prototype,"seed",2);Xe([a({type:String,attribute:"custom-id"})],exports.PontAlert.prototype,"customId",2);Xe([a({type:String})],exports.PontAlert.prototype,"status",2);Xe([a({type:String})],exports.PontAlert.prototype,"palette",2);Xe([a({type:String})],exports.PontAlert.prototype,"variant",2);Xe([a({type:String})],exports.PontAlert.prototype,"title",1);Xe([a({type:String})],exports.PontAlert.prototype,"description",2);Xe([a({type:Boolean})],exports.PontAlert.prototype,"icon",2);exports.PontAlert=Xe([p("pont-alert")],exports.PontAlert);var o2=Object.defineProperty,n2=Object.getOwnPropertyDescriptor,Vo=(e,t,r,n)=>{for(var o=n>1?void 0:n?n2(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&o2(t,r,o),o};exports.PontCountdown=class extends jt{constructor(){super(...arguments),this.content="",this.duration=5,this.redirectUrl="/",this.id="",this.seconds=0,this.timerId=null}get _containerElement(){return this.querySelector(`div[part=${this.id?this.id:"countdown"}]`)}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.initializeCountdown()}disconnectedCallback(){this.clearTimer(),super.disconnectedCallback()}initializeCountdown(){this.seconds=Math.max(0,this.duration||0),this.startTimer()}startTimer(){this.clearTimer(),this.timerId=window.setInterval(()=>{this.seconds<=1?this.completeCountdown():this.seconds--},1e3)}completeCountdown(){this.clearTimer(),window.location.href=this.redirectUrl||"/"}clearTimer(){this.timerId!==null&&(clearInterval(this.timerId),this.timerId=null)}renderContent(){return`${this.content} ${this.seconds}s...`}render(){return l`
5722
+ `}};exports.PontAlert.ROOT="alert";exports.PontAlert.ICON="icon";exports.PontAlert.TITLE="title";exports.PontAlert.DESCRIPTION="description";exports.PontAlert.TAG=`${et}-${exports.PontAlert.ROOT}`;exports.PontAlert.PARTS={root:exports.PontAlert.ROOT,icon:`${exports.PontAlert.ROOT}-${exports.PontAlert.ICON}`,title:`${exports.PontAlert.ROOT}-${exports.PontAlert.TITLE}`,description:`${exports.PontAlert.ROOT}-${exports.PontAlert.DESCRIPTION}`};Xe([a({type:String})],exports.PontAlert.prototype,"seed",2);Xe([a({type:String,attribute:"custom-id"})],exports.PontAlert.prototype,"customId",2);Xe([a({type:String})],exports.PontAlert.prototype,"status",2);Xe([a({type:String})],exports.PontAlert.prototype,"palette",2);Xe([a({type:String})],exports.PontAlert.prototype,"variant",2);Xe([a({type:String})],exports.PontAlert.prototype,"title",1);Xe([a({type:String})],exports.PontAlert.prototype,"description",2);Xe([a({type:Boolean})],exports.PontAlert.prototype,"icon",2);exports.PontAlert=Xe([p("pont-alert")],exports.PontAlert);var o2=Object.defineProperty,n2=Object.getOwnPropertyDescriptor,Vo=(e,t,r,n)=>{for(var o=n>1?void 0:n?n2(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&o2(t,r,o),o};exports.PontCountdown=class extends jt{constructor(){super(...arguments),this.content="",this.duration=5,this.redirectUrl="/",this.id="",this.seconds=0,this.timerId=null}get _containerElement(){return this.querySelector(`div[part=${this.id?this.id:"countdown"}]`)}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.initializeCountdown()}disconnectedCallback(){this.clearTimer(),super.disconnectedCallback()}initializeCountdown(){this.seconds=Math.max(0,this.duration||0),this.startTimer()}startTimer(){this.clearTimer(),this.timerId=window.setInterval(()=>{this.seconds<=1?this.completeCountdown():this.seconds--},1e3)}completeCountdown(){this.clearTimer(),window.location.href=this.redirectUrl||"/"}clearTimer(){this.timerId!==null&&(clearInterval(this.timerId),this.timerId=null)}renderContent(){return`${this.content} ${this.seconds}s...`}render(){return l`
5723
5723
  <div part=${this.id?this.id:"countdown"}>
5724
5724
  <pont-typography-p>${this.renderContent()}</pont-typography-p>
5725
5725
  </div>
5726
- `}};Vo([a()],exports.PontCountdown.prototype,"content",2);Vo([a({type:Number})],exports.PontCountdown.prototype,"duration",2);Vo([a({attribute:"redirect-url"})],exports.PontCountdown.prototype,"redirectUrl",2);Vo([a()],exports.PontCountdown.prototype,"id",2);Vo([g()],exports.PontCountdown.prototype,"seconds",2);exports.PontCountdown=Vo([p("pont-countdown")],exports.PontCountdown);var i2=Object.defineProperty,s2=Object.getOwnPropertyDescriptor,Vi=(e,t,r,n)=>{for(var o=n>1?void 0:n?s2(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&i2(t,r,o),o};exports.PontBlock=class extends jt{constructor(){super(...arguments),this.id="",this.align="center",this.justify="start",this.branding=new z$(this)}createRenderRoot(){return this}async firstUpdated(){await this.updateComplete;const t=this.querySelector("pont-card-content");t!=null&&t.updateComplete&&await t.updateComplete;const r=t==null?void 0:t.querySelector('div[data-slot="card-content"]');r&&this.moveLightDomChildrenInto(r),await wa()}async updated(){await this.updateComplete,await wa()}_renderWatermark(){return l`
5726
+ `}};Vo([a()],exports.PontCountdown.prototype,"content",2);Vo([a({type:Number})],exports.PontCountdown.prototype,"duration",2);Vo([a({attribute:"redirect-url"})],exports.PontCountdown.prototype,"redirectUrl",2);Vo([a()],exports.PontCountdown.prototype,"id",2);Vo([g()],exports.PontCountdown.prototype,"seconds",2);exports.PontCountdown=Vo([p("pont-countdown")],exports.PontCountdown);var i2=Object.defineProperty,s2=Object.getOwnPropertyDescriptor,Vi=(e,t,r,n)=>{for(var o=n>1?void 0:n?s2(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&i2(t,r,o),o};exports.PontBlock=class extends jt{constructor(){super(...arguments),this.id="",this.align="center",this.justify="start",this.branding=new W$(this)}createRenderRoot(){return this}async firstUpdated(){await this.updateComplete;const t=this.querySelector("pont-card-content");t!=null&&t.updateComplete&&await t.updateComplete;const r=t==null?void 0:t.querySelector('div[data-slot="card-content"]');r&&this.moveLightDomChildrenInto(r),await wa()}async updated(){await this.updateComplete,await wa()}_renderWatermark(){return l`
5727
5727
  <pont-card-footer border>
5728
5728
  <pont-watermark variant="muted"></pont-watermark>
5729
5729
  </pont-card-footer>
@@ -5826,5 +5826,5 @@ Minimum version required to store current data is: `+F+`.
5826
5826
  >
5827
5827
  ${this.logoAlign==="start"?l`${this._renderLogo()} ${this._renderLabel()}`:l`${this._renderLabel()} ${this._renderLogo()}`}
5828
5828
  </span>
5829
- `}};exports.PontWatermark.ROOT="watermark";exports.PontWatermark.LABEL="label";exports.PontWatermark.LOGO="logo";exports.PontWatermark.TAG=`${ht}-${exports.PontWatermark.ROOT}`;exports.PontWatermark.PARTS={root:exports.PontWatermark.ROOT,label:`${exports.PontWatermark.ROOT}-${exports.PontWatermark.LABEL}`,logo:`${exports.PontWatermark.ROOT}-${exports.PontWatermark.LOGO}`};Ho([a({type:String})],exports.PontWatermark.prototype,"seed",2);Ho([a({type:String,attribute:"custom-id"})],exports.PontWatermark.prototype,"customId",2);Ho([a({type:String})],exports.PontWatermark.prototype,"variant",2);Ho([a({type:String,attribute:"logo-align"})],exports.PontWatermark.prototype,"logoAlign",2);Ho([a({type:String})],exports.PontWatermark.prototype,"label",1);exports.PontWatermark=Ho([p("pont-watermark")],exports.PontWatermark);function E2(){return tt}exports.BaseElement=jt;exports.PontAccountSettings=Rt;exports.PontMemberManagement=j;exports.PontNavUser=Fe;exports.PontPaginator=zr;exports.PontUserSnippet=zi;exports.closeAccountSettingsModal=ml;exports.closeMemberManagementModal=Nh;exports.openAccountSettingsModal=Fh;exports.openMemberManagementModal=kh;exports.setLocales=Mh;exports.useAuthProvider=E2;
5829
+ `}};exports.PontWatermark.ROOT="watermark";exports.PontWatermark.LABEL="label";exports.PontWatermark.LOGO="logo";exports.PontWatermark.TAG=`${et}-${exports.PontWatermark.ROOT}`;exports.PontWatermark.PARTS={root:exports.PontWatermark.ROOT,label:`${exports.PontWatermark.ROOT}-${exports.PontWatermark.LABEL}`,logo:`${exports.PontWatermark.ROOT}-${exports.PontWatermark.LOGO}`};Ho([a({type:String})],exports.PontWatermark.prototype,"seed",2);Ho([a({type:String,attribute:"custom-id"})],exports.PontWatermark.prototype,"customId",2);Ho([a({type:String})],exports.PontWatermark.prototype,"variant",2);Ho([a({type:String,attribute:"logo-align"})],exports.PontWatermark.prototype,"logoAlign",2);Ho([a({type:String})],exports.PontWatermark.prototype,"label",1);exports.PontWatermark=Ho([p("pont-watermark")],exports.PontWatermark);function E2(){return tt}exports.BaseElement=jt;exports.PontAccountSettings=Rt;exports.PontMemberManagement=j;exports.PontNavUser=Fe;exports.PontPaginator=zr;exports.PontUserSnippet=zi;exports.closeAccountSettingsModal=ml;exports.closeMemberManagementModal=Nh;exports.openAccountSettingsModal=Fh;exports.openMemberManagementModal=kh;exports.setLocales=Mh;exports.useAuthProvider=E2;
5830
5830
  //# sourceMappingURL=index.js.map