@kanorio/elements 1.2.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (337) hide show
  1. package/README.md +1 -1
  2. package/dist/CustomerAccountPanel-FXJEOS4F.js +2 -0
  3. package/dist/CustomerAccountPanel-LK4GSYYU.js +2 -0
  4. package/dist/{FormAddressField-QR7ZCH77.js → FormAddressField-NH5LD6K7.js} +2 -2
  5. package/dist/{FormAddressField-C6VN7J6I.js → FormAddressField-Z5XT2ELO.js} +2 -2
  6. package/dist/FormFileField-5YFTKIRZ.js +2 -0
  7. package/dist/FormFileField-D2XIGIML.js +2 -0
  8. package/dist/{FormTaxIdField-K34MDUPW.js → FormTaxIdField-GGBQOVZE.js} +2 -2
  9. package/dist/{FormTaxIdField-XMK5WRQO.js → FormTaxIdField-XJSMW3II.js} +2 -2
  10. package/dist/KanorioAccount-GXRAMZCI.js +2 -0
  11. package/dist/KanorioAccount-P6IIPIZ2.js +2 -0
  12. package/dist/KanorioAnalytics-KYTK3T2L.js +2 -0
  13. package/dist/KanorioAnalytics-XHKBWYTS.js +2 -0
  14. package/dist/KanorioCurriculum-3TLNLUL4.js +2 -0
  15. package/dist/KanorioCurriculum-SQ4S3U5T.js +2 -0
  16. package/dist/KanorioForm-FDS5UKUT.js +2 -0
  17. package/dist/KanorioForm-K3H3YUQH.js +2 -0
  18. package/dist/KanorioLightbox-QPJQJLNO.js +2 -0
  19. package/dist/KanorioLightbox-WBMR7MLG.js +2 -0
  20. package/dist/KanorioLogin-JMHHBRU7.js +2 -0
  21. package/dist/KanorioLogin-QMPBTK55.js +2 -0
  22. package/dist/KanorioMedia-5P63OK4U.js +2 -0
  23. package/dist/KanorioMedia-LONTU7H2.js +2 -0
  24. package/dist/KanorioReviews-AAQ27MYU.js +2 -0
  25. package/dist/KanorioReviews-LUB4KF23.js +2 -0
  26. package/dist/KanorioUnit-ADFQ7POH.js +2 -0
  27. package/dist/KanorioUnit-YBKFHGLB.js +2 -0
  28. package/dist/{MediaPlayer-F43FPK4E.js → MediaPlayer-C5KI6N5V.js} +2 -2
  29. package/dist/{MediaPlayer-JHFZFOOG.js → MediaPlayer-PMAEZSCZ.js} +2 -2
  30. package/dist/{PDFViewerFull-INVHZL4V.js → PDFViewerFull-6MZJTHN2.js} +2 -2
  31. package/dist/{PDFViewerFull-CB44M7GW.js → PDFViewerFull-P3HCVGDZ.js} +2 -2
  32. package/dist/account.d.ts +3 -2
  33. package/dist/account.js +1 -1
  34. package/dist/analytics.js +1 -1
  35. package/dist/ar-JXAEXYYY.js +2 -0
  36. package/dist/ar-UXUCJCPY.js +2 -0
  37. package/dist/bg-EUIPVVBX.js +2 -0
  38. package/dist/bg-HEU3KGAJ.js +2 -0
  39. package/dist/{bn-BHRS66N3.js → bn-L35GOE5D.js} +2 -2
  40. package/dist/{bn-DM5WNGJ5.js → bn-LMQOF3SO.js} +2 -2
  41. package/dist/bot-protection.d.ts +67 -36
  42. package/dist/bot-protection.js +1 -1
  43. package/dist/chunk-2H3LTDAA.js +2 -0
  44. package/dist/chunk-3NXF6SCJ.js +2 -0
  45. package/dist/{chunk-EE4S6NRV.js → chunk-4OC7BRQS.js} +2 -2
  46. package/dist/{chunk-DTBRUBPG.js → chunk-56UUP6CI.js} +2 -2
  47. package/dist/{chunk-IAXVJLJ3.js → chunk-65RP744E.js} +2 -2
  48. package/dist/chunk-APWDEDWM.js +2 -0
  49. package/dist/{chunk-H7VP4BYY.js → chunk-CD7JDUB6.js} +2 -2
  50. package/dist/{chunk-4KA3HSRQ.js → chunk-CIVS7LYU.js} +2 -2
  51. package/dist/chunk-CMYBXWO5.js +3 -0
  52. package/dist/{chunk-WM5S3YN5.js → chunk-CTMHQZAU.js} +2 -2
  53. package/dist/chunk-D4KDA3KL.js +2 -0
  54. package/dist/{chunk-36YEGBKK.js → chunk-EGJ6SNTR.js} +2 -2
  55. package/dist/chunk-G5673RJK.js +3 -0
  56. package/dist/{chunk-2ONAW3CA.js → chunk-GWUOOGNK.js} +2 -2
  57. package/dist/{chunk-FQCA2VGY.js → chunk-HAHAYDYM.js} +2 -2
  58. package/dist/chunk-IDY2ZCXL.js +2 -0
  59. package/dist/{chunk-NGRNPVON.js → chunk-II7PVZWZ.js} +2 -2
  60. package/dist/chunk-J5SMJRYC.js +2 -0
  61. package/dist/{chunk-N5PIQM4L.js → chunk-KW2CH7SS.js} +2 -2
  62. package/dist/chunk-KYXZNMNA.js +2 -0
  63. package/dist/{chunk-QOQQCCID.js → chunk-L3BUSP27.js} +2 -2
  64. package/dist/{chunk-B7KLKVIM.js → chunk-L66F3USG.js} +2 -2
  65. package/dist/{chunk-NBDRYQZV.js → chunk-OLGITMLA.js} +2 -2
  66. package/dist/{chunk-BGVTMWPN.js → chunk-OWXGUUSI.js} +2 -2
  67. package/dist/chunk-Q4APVE7S.js +2 -0
  68. package/dist/chunk-QF55WZDP.js +2 -0
  69. package/dist/{chunk-4MOCTNN7.js → chunk-QRKYFFDH.js} +2 -2
  70. package/dist/chunk-QYTK2CW3.js +2 -0
  71. package/dist/chunk-R5M6FXXQ.js +2 -0
  72. package/dist/chunk-RI64PHGM.js +2 -0
  73. package/dist/chunk-RNRIZCZS.js +2 -0
  74. package/dist/chunk-RTF2NUMK.js +3 -0
  75. package/dist/chunk-SB5665ZK.js +2 -0
  76. package/dist/{chunk-5HWAL7VK.js → chunk-SGFVHVLE.js} +2 -2
  77. package/dist/{chunk-K4VRRKYJ.js → chunk-UDNUWN4W.js} +2 -2
  78. package/dist/{chunk-AF46NLXK.js → chunk-UITC3NFQ.js} +2 -2
  79. package/dist/chunk-VGQ2N7JH.js +2 -0
  80. package/dist/chunk-WJPCDZSL.js +2 -0
  81. package/dist/{chunk-LWRWKZBC.js → chunk-WKKPZXK3.js} +2 -2
  82. package/dist/{chunk-Z4OV6QHI.js → chunk-Y5JA6B5O.js} +2 -2
  83. package/dist/cs-LY4LE4NI.js +2 -0
  84. package/dist/cs-MGLMNU2K.js +2 -0
  85. package/dist/curriculum.d.ts +3 -2
  86. package/dist/curriculum.js +1 -1
  87. package/dist/da-LQTLZNBW.js +2 -0
  88. package/dist/da-X5HKEDEL.js +2 -0
  89. package/dist/de-M3M4VBDR.js +2 -0
  90. package/dist/de-Y5ELIZBU.js +2 -0
  91. package/dist/{deliverables-C5RD2ASE.js → deliverables-EOIAZFWB.js} +25 -25
  92. package/dist/{deliverables-BDS7WMBC.js → deliverables-NO5NEFRM.js} +2 -2
  93. package/dist/{el-SMBF7FG4.js → el-7YYYEHW6.js} +2 -2
  94. package/dist/{el-G2AWU43W.js → el-YZGS3PLP.js} +2 -2
  95. package/dist/elements.css +1 -1
  96. package/dist/en-AU-IUEA3YQP.js +2 -0
  97. package/dist/en-AU-RQ2DVIXE.js +2 -0
  98. package/dist/en-CA-OFK46Q44.js +2 -0
  99. package/dist/en-CA-QDP57WHG.js +2 -0
  100. package/dist/en-GB-URCOTEDK.js +2 -0
  101. package/dist/en-GB-VNG2IO2E.js +2 -0
  102. package/dist/en-JSBHSC4K.js +2 -0
  103. package/dist/en-MCRNEXQP.js +2 -0
  104. package/dist/en-US-5RT4SJ3V.js +2 -0
  105. package/dist/en-US-IWMVMSUT.js +2 -0
  106. package/dist/es-419-53Z5HI6Z.js +2 -0
  107. package/dist/es-419-JFUQ3D4V.js +2 -0
  108. package/dist/es-ES-BMD6JJEO.js +2 -0
  109. package/dist/es-ES-PBIVNTAT.js +2 -0
  110. package/dist/fa-57P7R77M.js +2 -0
  111. package/dist/{fa-OYP2Q5EV.js → fa-NE4XJTHW.js} +2 -2
  112. package/dist/fi-G5MG7VJ2.js +2 -0
  113. package/dist/fi-SCTIKRMX.js +2 -0
  114. package/dist/form.d.ts +393 -23
  115. package/dist/form.js +1 -1
  116. package/dist/{forms-answers-address-7P6EVFY5.js → forms-answers-address-5MXQYIH3.js} +2 -2
  117. package/dist/{forms-answers-address-IQV2Y56H.js → forms-answers-address-BGBI445K.js} +2 -2
  118. package/dist/{forms-answers-tax-id-WJD7K3PG.js → forms-answers-tax-id-3AYXCNP5.js} +2 -2
  119. package/dist/{forms-answers-tax-id-D4GOUC6N.js → forms-answers-tax-id-LSWOEHJ4.js} +2 -2
  120. package/dist/fr-CA-4X7URW4M.js +2 -0
  121. package/dist/fr-CA-RQDI3NIQ.js +2 -0
  122. package/dist/fr-FR-EDVHTVOW.js +2 -0
  123. package/dist/fr-FR-KGXOTINP.js +2 -0
  124. package/dist/{gu-BREQK3GJ.js → gu-7AJCL43I.js} +2 -2
  125. package/dist/{gu-RNCZTEOA.js → gu-QE53XIWR.js} +2 -2
  126. package/dist/he-UWYKIUPF.js +2 -0
  127. package/dist/he-VLGZUN42.js +2 -0
  128. package/dist/{hi-DKG5TPYX.js → hi-5M4U37GW.js} +2 -2
  129. package/dist/{hi-F7Y62LAZ.js → hi-KXKJMKZF.js} +2 -2
  130. package/dist/{hu-3Y5YEIFL.js → hu-JU7V3YQX.js} +2 -2
  131. package/dist/{hu-L6W5O2G5.js → hu-YRF3KPIJ.js} +2 -2
  132. package/dist/id-IRL2KCIE.js +2 -0
  133. package/dist/id-SXO4Z54V.js +2 -0
  134. package/dist/index.d.ts +5 -3
  135. package/dist/index.js +1 -1
  136. package/dist/it-55QCLHB7.js +2 -0
  137. package/dist/it-RBRELRA3.js +2 -0
  138. package/dist/ja-2WRUVHKU.js +2 -0
  139. package/dist/ja-3HZPHYZS.js +2 -0
  140. package/dist/kanorio-elements.js +1 -1
  141. package/dist/{km-HPCMYWAG.js → km-EW4ISUB7.js} +2 -2
  142. package/dist/{km-PHVYTPLT.js → km-SL6MZB3H.js} +2 -2
  143. package/dist/{kn-QAWBGLHG.js → kn-RUSRJNGR.js} +2 -2
  144. package/dist/kn-YGEU3PSD.js +2 -0
  145. package/dist/ko-2GI6Z5YH.js +2 -0
  146. package/dist/ko-QK33QMU2.js +2 -0
  147. package/dist/{lightbox-DEvsB5dB.d.ts → lightbox-BmkHgtZg.d.ts} +1 -1
  148. package/dist/lightbox.d.ts +4 -3
  149. package/dist/lightbox.js +1 -1
  150. package/dist/{lo-JNUKFIQV.js → lo-PPDKXTQQ.js} +2 -2
  151. package/dist/{lo-YRHYLRZC.js → lo-ZRV6OAH6.js} +2 -2
  152. package/dist/login.d.ts +3 -2
  153. package/dist/login.js +1 -1
  154. package/dist/media.d.ts +3 -2
  155. package/dist/media.js +1 -1
  156. package/dist/{ml-QO64O4H6.js → ml-BIZEFHNR.js} +2 -2
  157. package/dist/{ml-3LXSDTNF.js → ml-KO2JGAL5.js} +2 -2
  158. package/dist/{mr-PLM72664.js → mr-J4AGQFC7.js} +2 -2
  159. package/dist/{mr-5WLN37JQ.js → mr-PZNRW5MW.js} +2 -2
  160. package/dist/{ms-PIAATVMD.js → ms-NYWKJQEQ.js} +2 -2
  161. package/dist/{ms-N544Y63H.js → ms-OMUKF5WC.js} +2 -2
  162. package/dist/{my-3J665CWK.js → my-FHI5JEQF.js} +2 -2
  163. package/dist/{my-6IKSM3XW.js → my-R4OXNUDW.js} +2 -2
  164. package/dist/nb-EC6AP76Y.js +2 -0
  165. package/dist/nb-U4QN5GJE.js +2 -0
  166. package/dist/{ne-ASFNHMO3.js → ne-DRPNDCZH.js} +2 -2
  167. package/dist/ne-J3XQJZAY.js +2 -0
  168. package/dist/nl-BE-QIH5K6WQ.js +2 -0
  169. package/dist/nl-BE-VHBDCIRF.js +2 -0
  170. package/dist/nl-NL-FZMZRVH4.js +2 -0
  171. package/dist/nl-NL-USXHXD5U.js +2 -0
  172. package/dist/nn-IPL74C6S.js +2 -0
  173. package/dist/nn-UCSEDGDB.js +2 -0
  174. package/dist/{pa-P2GAYL5A.js → pa-LTF7CWS2.js} +2 -2
  175. package/dist/{pa-VX5TUNDP.js → pa-NTK4KSUF.js} +2 -2
  176. package/dist/{phone-input-Q5AV6KSW.js → phone-input-DOL46AIF.js} +2 -2
  177. package/dist/{phone-input-T6QX2TDS.js → phone-input-PXLNDXAB.js} +2 -2
  178. package/dist/pl-6FXX3WNC.js +2 -0
  179. package/dist/pl-YWCG2YWW.js +2 -0
  180. package/dist/{provider-CMLzyAjJ.d.ts → provider-BYGVc6kS.d.ts} +3 -1
  181. package/dist/provider.d.ts +3 -2
  182. package/dist/provider.js +1 -1
  183. package/dist/pt-BR-5JRKIQVH.js +2 -0
  184. package/dist/pt-BR-CIJCMCLE.js +2 -0
  185. package/dist/pt-PT-A7F2KKCY.js +2 -0
  186. package/dist/pt-PT-Y2UCAKHP.js +2 -0
  187. package/dist/reviews.d.ts +3 -2
  188. package/dist/reviews.js +1 -1
  189. package/dist/ro-6MQF2KY2.js +2 -0
  190. package/dist/ro-YISUN7LU.js +2 -0
  191. package/dist/ru-KGU3SC3S.js +2 -0
  192. package/dist/ru-RMPFJQSL.js +2 -0
  193. package/dist/{si-5VUM5FGR.js → si-CTQN6I2M.js} +2 -2
  194. package/dist/{si-5F7RWQIE.js → si-N5U32GIL.js} +2 -2
  195. package/dist/sv-36EB3HIA.js +2 -0
  196. package/dist/sv-QGZRDKBJ.js +2 -0
  197. package/dist/sw-CWIRVHYD.js +2 -0
  198. package/dist/sw-OUQYTLJF.js +2 -0
  199. package/dist/{ta-MNWTH3F5.js → ta-E3ZBHC6A.js} +2 -2
  200. package/dist/{ta-R73RBA23.js → ta-N7BHKWBO.js} +2 -2
  201. package/dist/{te-5SBVH4OF.js → te-7JC2KGAU.js} +2 -2
  202. package/dist/{te-GVW56XDM.js → te-CTCZQKFU.js} +2 -2
  203. package/dist/{th-G6SY3D2Q.js → th-AN5CLQP6.js} +2 -2
  204. package/dist/{th-2GWK7DBB.js → th-JVK4E2AJ.js} +2 -2
  205. package/dist/tl-BSWGJB7O.js +2 -0
  206. package/dist/tl-X72423V3.js +2 -0
  207. package/dist/tr-22NUPSET.js +2 -0
  208. package/dist/tr-AZ2PLRZY.js +2 -0
  209. package/dist/{uk-PGHXMWJR.js → uk-POKPJJDZ.js} +2 -2
  210. package/dist/uk-UOTQJ3E7.js +2 -0
  211. package/dist/unit.d.ts +3 -1
  212. package/dist/unit.js +1 -1
  213. package/dist/{ur-4CR64XUI.js → ur-6LBRTMAE.js} +2 -2
  214. package/dist/{ur-J5HV4NTW.js → ur-NRHFTLO5.js} +2 -2
  215. package/dist/vi-3ZVAOXIJ.js +2 -0
  216. package/dist/vi-XC4CGJHX.js +2 -0
  217. package/dist/web-components.js +1 -1
  218. package/dist/zh-CN-EKEY2CLM.js +2 -0
  219. package/dist/zh-CN-XW3PLUG5.js +2 -0
  220. package/dist/zh-HK-25OZZBHO.js +2 -0
  221. package/dist/zh-HK-EPQAUBL3.js +2 -0
  222. package/dist/zh-Hant-LFJZCOMK.js +2 -0
  223. package/dist/zh-Hant-RQMTFZSE.js +2 -0
  224. package/package.json +2 -2
  225. package/dist/CustomerAccountPanel-DJKV7LT4.js +0 -2
  226. package/dist/CustomerAccountPanel-RWEHWBJY.js +0 -2
  227. package/dist/FormFileField-LZDCXI2Z.js +0 -2
  228. package/dist/FormFileField-ONL4Q55V.js +0 -2
  229. package/dist/KanorioAccount-EN3TM67X.js +0 -2
  230. package/dist/KanorioAccount-XGVSGVYN.js +0 -2
  231. package/dist/KanorioAnalytics-NEKTFQEE.js +0 -2
  232. package/dist/KanorioAnalytics-UMCUWQM7.js +0 -2
  233. package/dist/KanorioCurriculum-3QSCOHK7.js +0 -2
  234. package/dist/KanorioCurriculum-RUIGZ5X7.js +0 -2
  235. package/dist/KanorioForm-GUA5GEJY.js +0 -2
  236. package/dist/KanorioForm-KXV7D2TU.js +0 -2
  237. package/dist/KanorioLightbox-M72HNQQX.js +0 -2
  238. package/dist/KanorioLightbox-TQ3Q73TD.js +0 -2
  239. package/dist/KanorioLogin-5XFN3YEE.js +0 -2
  240. package/dist/KanorioLogin-AJHHVQGV.js +0 -2
  241. package/dist/KanorioMedia-ADKUDH5C.js +0 -2
  242. package/dist/KanorioMedia-DLBSXCKA.js +0 -2
  243. package/dist/KanorioReviews-42FZSXTI.js +0 -2
  244. package/dist/KanorioReviews-7LD5WKFG.js +0 -2
  245. package/dist/KanorioUnit-NWBX5DEI.js +0 -2
  246. package/dist/KanorioUnit-SIM3344J.js +0 -2
  247. package/dist/ar-3VA7IUCO.js +0 -2
  248. package/dist/ar-AUQCHHZG.js +0 -2
  249. package/dist/bg-IRGRVWOG.js +0 -2
  250. package/dist/bg-QWC2KG3G.js +0 -2
  251. package/dist/chunk-4BBERZ6T.js +0 -2
  252. package/dist/chunk-5AUWUK5R.js +0 -2
  253. package/dist/chunk-66XN5RR4.js +0 -2
  254. package/dist/chunk-EZMTUAQX.js +0 -2
  255. package/dist/chunk-FSY5GB5E.js +0 -3
  256. package/dist/chunk-G4U6BFZY.js +0 -2
  257. package/dist/chunk-GJY6AQIS.js +0 -2
  258. package/dist/chunk-IXDKZO42.js +0 -2
  259. package/dist/chunk-MIQK3T3Y.js +0 -2
  260. package/dist/chunk-QGR3QAQB.js +0 -3
  261. package/dist/chunk-SUXTLVTX.js +0 -2
  262. package/dist/chunk-UIHBR4NU.js +0 -3
  263. package/dist/chunk-WXIUWMFR.js +0 -2
  264. package/dist/cs-3IX2ZQKJ.js +0 -2
  265. package/dist/cs-NZW6FBFY.js +0 -2
  266. package/dist/da-AFMLFM32.js +0 -2
  267. package/dist/da-PZ32KKTE.js +0 -2
  268. package/dist/de-5JPEK4HF.js +0 -2
  269. package/dist/de-MVL4XGYR.js +0 -2
  270. package/dist/en-AIAENVLI.js +0 -2
  271. package/dist/en-AU-LB5UVGIW.js +0 -2
  272. package/dist/en-AU-Q2O2HPJ2.js +0 -2
  273. package/dist/en-CA-AZDOY7PW.js +0 -2
  274. package/dist/en-CA-PVKXM3WS.js +0 -2
  275. package/dist/en-GB-2N4WB6SL.js +0 -2
  276. package/dist/en-GB-Y5QRPC7S.js +0 -2
  277. package/dist/en-SAXQF5YW.js +0 -2
  278. package/dist/en-US-74L4OI3J.js +0 -2
  279. package/dist/en-US-EKS52JBW.js +0 -2
  280. package/dist/es-419-Q5IH6W5F.js +0 -2
  281. package/dist/es-419-VSZWGONE.js +0 -2
  282. package/dist/es-ES-7L55KPLO.js +0 -2
  283. package/dist/es-ES-ETSYFLPQ.js +0 -2
  284. package/dist/fa-WRJCKGS3.js +0 -2
  285. package/dist/fi-44ST6B6Q.js +0 -2
  286. package/dist/fi-J6NJBPNK.js +0 -2
  287. package/dist/fr-CA-KXRNFZBP.js +0 -2
  288. package/dist/fr-CA-PWWAPLBH.js +0 -2
  289. package/dist/fr-FR-FMLQPLOD.js +0 -2
  290. package/dist/fr-FR-MQAFE7IX.js +0 -2
  291. package/dist/he-GNC45OCB.js +0 -2
  292. package/dist/he-VXZCGAHY.js +0 -2
  293. package/dist/id-7DWHYYFC.js +0 -2
  294. package/dist/id-DCV57AQB.js +0 -2
  295. package/dist/it-7RASZ4SK.js +0 -2
  296. package/dist/it-JICU5WVL.js +0 -2
  297. package/dist/ja-4V7QJLTM.js +0 -2
  298. package/dist/ja-52MBIM3T.js +0 -2
  299. package/dist/kn-5DYCOYAN.js +0 -2
  300. package/dist/ko-55JV4VQK.js +0 -2
  301. package/dist/ko-FZIJZG6K.js +0 -2
  302. package/dist/nb-345ACUTX.js +0 -2
  303. package/dist/nb-F33WYJ6T.js +0 -2
  304. package/dist/ne-AAIECB2W.js +0 -2
  305. package/dist/nl-BE-SHZLAL5T.js +0 -2
  306. package/dist/nl-BE-WK4C6XRZ.js +0 -2
  307. package/dist/nl-NL-2YLHGJZL.js +0 -2
  308. package/dist/nl-NL-PHRY43UB.js +0 -2
  309. package/dist/nn-I5A2LCBH.js +0 -2
  310. package/dist/nn-S3SNETRB.js +0 -2
  311. package/dist/pl-4Y4BWTLT.js +0 -2
  312. package/dist/pl-SGPLZAER.js +0 -2
  313. package/dist/pt-BR-CW3MRSRP.js +0 -2
  314. package/dist/pt-BR-WKEKB5CG.js +0 -2
  315. package/dist/pt-PT-AJZQS2C6.js +0 -2
  316. package/dist/pt-PT-ZTPCI2K6.js +0 -2
  317. package/dist/ro-ANISGUFX.js +0 -2
  318. package/dist/ro-HRV64STT.js +0 -2
  319. package/dist/ru-7U566HR4.js +0 -2
  320. package/dist/ru-PKSZKOLH.js +0 -2
  321. package/dist/sv-HZVCM7LG.js +0 -2
  322. package/dist/sv-UOGO55PW.js +0 -2
  323. package/dist/sw-5XU65KFC.js +0 -2
  324. package/dist/sw-KVAYRFED.js +0 -2
  325. package/dist/tl-OCD2O6J3.js +0 -2
  326. package/dist/tl-PZNXANIM.js +0 -2
  327. package/dist/tr-2BDM6H5Q.js +0 -2
  328. package/dist/tr-VFMHVRQX.js +0 -2
  329. package/dist/uk-OQRACKKD.js +0 -2
  330. package/dist/vi-MQSOSIUY.js +0 -2
  331. package/dist/vi-U7OT2LM7.js +0 -2
  332. package/dist/zh-CN-CCYHPSVA.js +0 -2
  333. package/dist/zh-CN-RNW2BEY7.js +0 -2
  334. package/dist/zh-HK-HE2T63O2.js +0 -2
  335. package/dist/zh-HK-RKREDSAO.js +0 -2
  336. package/dist/zh-Hant-GBQLGJDF.js +0 -2
  337. package/dist/zh-Hant-T6KHSA5B.js +0 -2
package/README.md CHANGED
@@ -43,7 +43,7 @@ import "@kanorio/elements/elements.css";
43
43
 
44
44
  Common attributes: `site-url` (your Kanorio site; defaults to the current origin, so set it when the page is on your own domain), `locale` (defaults to `<html lang>`, 58 locales built in), `theme` (`dark` / `light` / `auto`), `token`.
45
45
 
46
- Styling: the site's brand (`GET /site` `brand`: colors, corner radius, font) is applied automatically to each element's root (`.kanorio-elements[data-kanorio-brand]`) as `--brand-color`, `--brand-foreground`, `--site-radius-*` and `--site-font-family`; pass `brand={false}` to skip. `--media-*` and `--site-*` keep their defaults under `.kanorio-elements`. Popups (select menus, pickers, the mobile sheet, the lightbox and viewers, the player menus) are added to `<body>` with the class `kanorio-popup` and the same theme and brand; to restyle them and the bot-protection box, write your variable overrides for `.kanorio-elements, .kanorio-popup, .kanorio-part`. In a dark element the dark theme's own values of the colours it sets (`--site-fg`, `--site-fg-muted`, `--site-surface`, `--site-surface-muted`, `--site-border`, `--site-field-*`, `--site-danger-text`) win over a rule written for the classes alone. To change them there, add the theme attribute to the selector, in a stylesheet loaded after `elements.css`: `:is(.kanorio-elements, .kanorio-popup, .kanorio-part)[data-kanorio-theme="dark"]`, and for `theme="auto"` the same with `[data-kanorio-theme="auto"]` inside `@media (prefers-color-scheme: dark)`. `KanorioProvider` renders no element: it passes `theme` and the other settings to the elements inside it, and a `theme` set on an element takes precedence over the provider's (an element placed inside another element is dark when either is). `KanorioReviews` and `KanorioRating` render unstyled markup with `data-kanorio-*` attributes for your own stylesheet. `KanorioBotProtection` adds no element to your form; its ALTCHA box (class `kanorio-part`) takes the brand of the surrounding provider, and the `theme` you give it or `light` / `dark` set on the provider (not the provider's `auto`: pass `theme="auto"` to the box when your form follows the visitor's system); it keeps its light defaults otherwise. Vidstack, pdf.js and the deliverable player load on demand.
46
+ Styling: the site's brand (`GET /site` `brand`: colors, corner radius, font) is applied automatically to each element's root (`.kanorio-elements[data-kanorio-brand]`) as `--brand-color`, `--brand-foreground`, `--site-radius-*` and `--site-font-family`; pass `brand={false}` to skip. `--media-*` and `--site-*` keep their defaults under `.kanorio-elements`. Popups (select menus, pickers, the mobile sheet, the lightbox and viewers, the player menus) are added to `<body>` with the class `kanorio-popup` and the same theme and brand; to restyle them and the bot-protection box, write your variable overrides for `.kanorio-elements, .kanorio-popup, .kanorio-part`. In a dark element the dark theme's own values of the colours it sets (`--site-fg`, `--site-fg-muted`, `--site-surface`, `--site-surface-muted`, `--site-border`, `--site-field-*`, `--site-danger-text`) win over a rule written for the classes alone. To change them there, add the theme attribute to the selector, in a stylesheet loaded after `elements.css`: `:is(.kanorio-elements, .kanorio-popup, .kanorio-part)[data-kanorio-theme="dark"]`, and for `theme="auto"` the same with `[data-kanorio-theme="auto"]` inside `@media (prefers-color-scheme: dark)`. `KanorioProvider` renders no element: it passes `theme` and the other settings to the elements inside it, and a `theme` set on an element takes precedence over the provider's (an element placed inside another element is dark when either is). `KanorioReviews` and `KanorioRating` render unstyled markup with `data-kanorio-*` attributes for your own stylesheet. `KanorioBotProtection` adds no element to your form; its ALTCHA box (class `kanorio-part`) takes the brand of the surrounding provider, and the `theme` you give it or `light` / `dark` set on the provider (not the provider's `auto`: pass `theme="auto"` to the box when your form follows the visitor's system); it keeps its light defaults otherwise. On a site that uses Turnstile, reCAPTCHA or hCaptcha, the widget's container carries the same class and theme, and the widget is drawn in that theme (reCAPTCHA and hCaptcha have no `auto`: they take the visitor's system colours when the widget is drawn). Vidstack, pdf.js and the deliverable player load on demand.
47
47
 
48
48
  ## Compatibility
49
49
 
@@ -0,0 +1,2 @@
1
+ "use client";import{f as a,g as b}from"./chunk-KW2CH7SS.js";import"./chunk-WJPCDZSL.js";import"./chunk-QYTK2CW3.js";import"./chunk-VYSRVTYI.js";import"./chunk-2LOQXVFI.js";import"./chunk-2E6RCDAA.js";import"./chunk-ET57PWXC.js";import"./chunk-S2NFWI7C.js";import"./chunk-AFNEGNVJ.js";import"./chunk-OU4IOHLN.js";import"./chunk-OTK4YNSG.js";import"./chunk-NSY72ZYX.js";import"./chunk-6LGTFWQS.js";import"./chunk-CDG7S4P5.js";export{b as CustomerAccountPanel,a as RESEND_COOLDOWN_SECONDS};
2
+ //# sourceMappingURL=CustomerAccountPanel-FXJEOS4F.js.map
@@ -0,0 +1,2 @@
1
+ "use client";import{CustomerAccountPanel,RESEND_COOLDOWN_SECONDS}from"./chunk-4OC7BRQS.js";import"./chunk-C7HUM2EN.js";import"./chunk-KYXZNMNA.js";import"./chunk-RKEHHJDU.js";import"./chunk-JH5D6YJX.js";import"./chunk-33AQQY6T.js";import"./chunk-VUTODQFX.js";import"./chunk-KNNN5V3T.js";import"./chunk-763LNERD.js";import"./chunk-U7H3W23Q.js";import"./chunk-Q4APVE7S.js";import"./chunk-3ZTUZPSD.js";export{CustomerAccountPanel,RESEND_COOLDOWN_SECONDS};
2
+ //# sourceMappingURL=CustomerAccountPanel-LK4GSYYU.js.map
@@ -1,2 +1,2 @@
1
- "use client";import{ADDRESS_LIMITS,findAddressIssues,getAddressFormat,isAddressCountry,listAddressCountries,normalizePostalAddress}from"./chunk-GMW7AUSG.js";import{SearchablePicker,getCountryDisplayName}from"./chunk-2FSD3N7F.js";import"./chunk-GZCED6V3.js";import{Input}from"./chunk-W32ZFOPN.js";import"./chunk-S7FE2XRA.js";import"./chunk-AQ6F6MIJ.js";import"./chunk-63XJWMJG.js";import{FORM_DANGER,FORM_FG_MUTED,FORM_FIELD_INVALID_CLASS}from"./chunk-SVWEVSYJ.js";import{isFormAddressAnswer}from"./chunk-66XN5RR4.js";import"./chunk-RG5JA44V.js";import"./chunk-FFAWYDLJ.js";import"./chunk-C7HUM2EN.js";import"./chunk-33AQQY6T.js";import{cn}from"./chunk-VUTODQFX.js";import"./chunk-763LNERD.js";import{useSiteLabels}from"./chunk-U7H3W23Q.js";import"./chunk-3ZTUZPSD.js";import{useMemo}from"react";import{jsx,jsxs}from"react/jsx-runtime";var AUTOCOMPLETE={addressLine1:"address-line1",addressLine2:"address-line2",locality:"address-level2",region:"address-level1",postalCode:"postal-code"};var MAX_LENGTH={addressLine1:ADDRESS_LIMITS.LINE_MAX,addressLine2:ADDRESS_LIMITS.LINE_MAX,locality:ADDRESS_LIMITS.PART_MAX,region:ADDRESS_LIMITS.PART_MAX,postalCode:ADDRESS_LIMITS.POSTAL_MAX};function partLabel(key,format,labels){switch(key){case"addressLine1":return labels.addressLine1;case"addressLine2":return labels.addressLine2;case"locality":return labels[`addressLocality_${format.localityType}`];case"region":return labels[`addressRegion_${format.regionType}`];case"postalCode":return labels[`addressPostal_${format.postalType}`]}}function flagOf(code){return String.fromCodePoint(...[...code].map(ch=>127462+ch.charCodeAt(0)-65))}function FormAddressField({field,inputId,describedBy,invalid,value,labels,siteCountry,controlClassName,onChange,onFocus,onBlur}){const siteLabels=useSiteLabels();const{ui,locale}=siteLabels;const allowed=useMemo(()=>{const all=listAddressCountries();const picked=field.countries.filter(code=>isAddressCountry(code));return picked.length>0?picked:all},[field.countries]);const fallbackCountry=useMemo(()=>{for(const candidate of[field.defaultCountry,siteCountry?.toUpperCase()]){if(candidate&&allowed.includes(candidate))return candidate}return allowed.length===1?allowed[0]:""},[field.defaultCountry,siteCountry,allowed]);const current=isFormAddressAnswer(value)?value:{};const countryCode=current.countryCode&&allowed.includes(current.countryCode)?current.countryCode:fallbackCountry;const format=getAddressFormat(countryCode);const items=useMemo(()=>{const collator=new Intl.Collator(locale||void 0);return allowed.map(code=>({value:code,label:getCountryDisplayName(code,locale),leading:jsx("span",{"aria-hidden":true,children:flagOf(code)}),keywords:[code]})).sort((a,b)=>collator.compare(a.label,b.label))},[allowed,locale]);const pinned=useMemo(()=>[...new Set([fallbackCountry,siteCountry?.toUpperCase()??""].filter(code=>code&&allowed.includes(code)))],[fallbackCountry,siteCountry,allowed]);const pickerLabels=useMemo(()=>({title:labels.addressCountry,search:ui.countrySearch,noMatch:ui.countryNoMatch,pinned:ui.countryGroupCommon,all:ui.countryGroupAll}),[labels.addressCountry,ui.countrySearch,ui.countryNoMatch,ui.countryGroupCommon,ui.countryGroupAll]);const update=patch=>{onChange({addressLine1:"",...current,countryCode,...patch})};const normalized=invalid?normalizePostalAddress({...current,countryCode}):null;const issues=normalized?findAddressIssues(normalized):null;const flagged=key=>Boolean(issues&&(issues.missing.includes(key)||key==="postalCode"&&issues.postalCode));const nameFlagged=invalid&&field.askRecipientName&&!current.recipientName?.trim();const inputClass=bad=>cn("h-11 w-full",controlClassName,bad&&FORM_FIELD_INVALID_CLASS);const subLabelClass=cn("mb-1 block text-sm",FORM_FG_MUTED);const mark=field.required?jsx("span",{"aria-hidden":true,className:cn("ml-0.5",FORM_DANGER),children:"*"}):null;const handleGroupBlur=e=>{if(e.relatedTarget&&e.currentTarget.contains(e.relatedTarget))return;onBlur()};return jsxs("div",{role:"group","aria-describedby":describedBy,className:"grid grid-cols-2 gap-x-3 gap-y-3",onFocus,onBlur:handleGroupBlur,children:[jsxs("div",{className:"col-span-2",children:[jsx("span",{className:subLabelClass,children:labels.addressCountry}),jsx(SearchablePicker,{items,value:countryCode||null,onChange:next=>update({countryCode:next}),labels:pickerLabels,pinnedValues:pinned,disabled:allowed.length===1,error:invalid&&!countryCode,triggerAriaLabel:countryCode?`${labels.addressCountry}: ${getCountryDisplayName(countryCode,locale)}`:labels.addressCountry,triggerClassName:cn("w-full justify-between",controlClassName),trigger:countryCode?jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[jsx("span",{"aria-hidden":true,children:flagOf(countryCode)}),jsx("span",{className:"truncate",children:getCountryDisplayName(countryCode,locale)})]}):jsx("span",{className:"truncate text-zinc-400",children:ui.selectCountry})})]}),field.askRecipientName&&jsxs("div",{className:"col-span-2",children:[jsxs("label",{htmlFor:`${inputId}-recipient`,className:subLabelClass,children:[labels.addressRecipient,mark]}),jsx(Input,{id:`${inputId}-recipient`,type:"text",autoComplete:"name",maxLength:ADDRESS_LIMITS.NAME_MAX,"aria-invalid":nameFlagged||void 0,className:inputClass(nameFlagged),value:current.recipientName??"",onChange:e=>update({recipientName:e.target.value})})]}),format.parts.map((part,index)=>{const isLine=part.key==="addressLine1"||part.key==="addressLine2";const bad=flagged(part.key);const id=index===0?inputId:`${inputId}-${part.key}`;return jsxs("div",{className:isLine?"col-span-2":"col-span-2 sm:col-span-1",children:[jsxs("label",{htmlFor:id,className:subLabelClass,children:[partLabel(part.key,format,labels),part.required?mark:null]}),jsx(Input,{id,type:"text",autoComplete:AUTOCOMPLETE[part.key],maxLength:MAX_LENGTH[part.key],placeholder:part.key==="postalCode"?format.postalExample:void 0,"aria-invalid":bad||void 0,className:inputClass(bad),value:current[part.key]??"",onChange:e=>update({[part.key]:e.target.value})})]},part.key)})]})}export{FormAddressField};
2
- //# sourceMappingURL=FormAddressField-QR7ZCH77.js.map
1
+ "use client";import{ADDRESS_LIMITS,findAddressIssues,getAddressFormat,isAddressCountry,listAddressCountries,normalizePostalAddress}from"./chunk-GMW7AUSG.js";import{SearchablePicker,getCountryDisplayName}from"./chunk-2FSD3N7F.js";import"./chunk-GZCED6V3.js";import{Input}from"./chunk-W32ZFOPN.js";import"./chunk-S7FE2XRA.js";import"./chunk-AQ6F6MIJ.js";import"./chunk-63XJWMJG.js";import{FORM_DANGER,FORM_FG_MUTED,FORM_FIELD_INVALID_CLASS}from"./chunk-SVWEVSYJ.js";import{isFormAddressAnswer}from"./chunk-APWDEDWM.js";import"./chunk-RG5JA44V.js";import"./chunk-FFAWYDLJ.js";import"./chunk-C7HUM2EN.js";import"./chunk-33AQQY6T.js";import{cn}from"./chunk-VUTODQFX.js";import"./chunk-763LNERD.js";import{useSiteLabels}from"./chunk-U7H3W23Q.js";import"./chunk-3ZTUZPSD.js";import{useMemo}from"react";import{jsx,jsxs}from"react/jsx-runtime";var AUTOCOMPLETE={addressLine1:"address-line1",addressLine2:"address-line2",locality:"address-level2",region:"address-level1",postalCode:"postal-code"};var MAX_LENGTH={addressLine1:ADDRESS_LIMITS.LINE_MAX,addressLine2:ADDRESS_LIMITS.LINE_MAX,locality:ADDRESS_LIMITS.PART_MAX,region:ADDRESS_LIMITS.PART_MAX,postalCode:ADDRESS_LIMITS.POSTAL_MAX};function partLabel(key,format,labels){switch(key){case"addressLine1":return labels.addressLine1;case"addressLine2":return labels.addressLine2;case"locality":return labels[`addressLocality_${format.localityType}`];case"region":return labels[`addressRegion_${format.regionType}`];case"postalCode":return labels[`addressPostal_${format.postalType}`]}}function flagOf(code){return String.fromCodePoint(...[...code].map(ch=>127462+ch.charCodeAt(0)-65))}function FormAddressField({field,inputId,describedBy,invalid,value,labels,siteCountry,controlClassName,onChange,onFocus,onBlur}){const siteLabels=useSiteLabels();const{ui,locale}=siteLabels;const allowed=useMemo(()=>{const all=listAddressCountries();const picked=field.countries.filter(code=>isAddressCountry(code));return picked.length>0?picked:all},[field.countries]);const fallbackCountry=useMemo(()=>{for(const candidate of[field.defaultCountry,siteCountry?.toUpperCase()]){if(candidate&&allowed.includes(candidate))return candidate}return allowed.length===1?allowed[0]:""},[field.defaultCountry,siteCountry,allowed]);const current=isFormAddressAnswer(value)?value:{};const countryCode=current.countryCode&&allowed.includes(current.countryCode)?current.countryCode:fallbackCountry;const format=getAddressFormat(countryCode);const items=useMemo(()=>{const collator=new Intl.Collator(locale||void 0);return allowed.map(code=>({value:code,label:getCountryDisplayName(code,locale),leading:jsx("span",{"aria-hidden":true,children:flagOf(code)}),keywords:[code]})).sort((a,b)=>collator.compare(a.label,b.label))},[allowed,locale]);const pinned=useMemo(()=>[...new Set([fallbackCountry,siteCountry?.toUpperCase()??""].filter(code=>code&&allowed.includes(code)))],[fallbackCountry,siteCountry,allowed]);const pickerLabels=useMemo(()=>({title:labels.addressCountry,search:ui.countrySearch,noMatch:ui.countryNoMatch,pinned:ui.countryGroupCommon,all:ui.countryGroupAll}),[labels.addressCountry,ui.countrySearch,ui.countryNoMatch,ui.countryGroupCommon,ui.countryGroupAll]);const update=patch=>{onChange({addressLine1:"",...current,countryCode,...patch})};const normalized=invalid?normalizePostalAddress({...current,countryCode}):null;const issues=normalized?findAddressIssues(normalized):null;const flagged=key=>Boolean(issues&&(issues.missing.includes(key)||key==="postalCode"&&issues.postalCode));const nameFlagged=invalid&&field.askRecipientName&&!current.recipientName?.trim();const inputClass=bad=>cn("h-11 w-full",controlClassName,bad&&FORM_FIELD_INVALID_CLASS);const subLabelClass=cn("mb-1 block text-sm",FORM_FG_MUTED);const mark=field.required?jsx("span",{"aria-hidden":true,className:cn("ml-0.5",FORM_DANGER),children:"*"}):null;const handleGroupBlur=e=>{if(e.relatedTarget&&e.currentTarget.contains(e.relatedTarget))return;onBlur()};return jsxs("div",{role:"group","aria-describedby":describedBy,className:"grid grid-cols-2 gap-x-3 gap-y-3",onFocus,onBlur:handleGroupBlur,children:[jsxs("div",{className:"col-span-2",children:[jsx("span",{className:subLabelClass,children:labels.addressCountry}),jsx(SearchablePicker,{items,value:countryCode||null,onChange:next=>update({countryCode:next}),labels:pickerLabels,pinnedValues:pinned,disabled:allowed.length===1,error:invalid&&!countryCode,triggerAriaLabel:countryCode?`${labels.addressCountry}: ${getCountryDisplayName(countryCode,locale)}`:labels.addressCountry,triggerClassName:cn("w-full justify-between",controlClassName),trigger:countryCode?jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[jsx("span",{"aria-hidden":true,children:flagOf(countryCode)}),jsx("span",{className:"truncate",children:getCountryDisplayName(countryCode,locale)})]}):jsx("span",{className:"truncate text-zinc-400",children:ui.selectCountry})})]}),field.askRecipientName&&jsxs("div",{className:"col-span-2",children:[jsxs("label",{htmlFor:`${inputId}-recipient`,className:subLabelClass,children:[labels.addressRecipient,mark]}),jsx(Input,{id:`${inputId}-recipient`,type:"text",autoComplete:"name",maxLength:ADDRESS_LIMITS.NAME_MAX,"aria-invalid":nameFlagged||void 0,className:inputClass(nameFlagged),value:current.recipientName??"",onChange:e=>update({recipientName:e.target.value})})]}),format.parts.map((part,index)=>{const isLine=part.key==="addressLine1"||part.key==="addressLine2";const bad=flagged(part.key);const id=index===0?inputId:`${inputId}-${part.key}`;return jsxs("div",{className:isLine?"col-span-2":"col-span-2 sm:col-span-1",children:[jsxs("label",{htmlFor:id,className:subLabelClass,children:[partLabel(part.key,format,labels),part.required?mark:null]}),jsx(Input,{id,type:"text",autoComplete:AUTOCOMPLETE[part.key],maxLength:MAX_LENGTH[part.key],placeholder:part.key==="postalCode"?format.postalExample:void 0,"aria-invalid":bad||void 0,className:inputClass(bad),value:current[part.key]??"",onChange:e=>update({[part.key]:e.target.value})})]},part.key)})]})}export{FormAddressField};
2
+ //# sourceMappingURL=FormAddressField-NH5LD6K7.js.map
@@ -1,2 +1,2 @@
1
- "use client";import{a as u,b as $,c as D,d as O,e as X,g as B}from"./chunk-K2XZKV3Q.js";import{a as U,b as C}from"./chunk-BU7KUHZK.js";import{j as G}from"./chunk-GJY6AQIS.js";import"./chunk-A4DPHHAP.js";import{b as K,c as V,g as q}from"./chunk-N4BGAMWD.js";import"./chunk-ARU5PTJV.js";import{a as v}from"./chunk-KDNGDR64.js";import"./chunk-D7K3YCBR.js";import"./chunk-VYSRVTYI.js";import"./chunk-UM74DXPE.js";import"./chunk-W63RJF6Q.js";import"./chunk-U7KVGD47.js";import"./chunk-ET57PWXC.js";import{ba as g}from"./chunk-S2NFWI7C.js";import{b as I}from"./chunk-AFNEGNVJ.js";import{a as x}from"./chunk-OU4IOHLN.js";import"./chunk-NSY72ZYX.js";import{a as re}from"./chunk-6LGTFWQS.js";import{c as k}from"./chunk-CDG7S4P5.js";var m=k(re());var s=k(x()),ne={addressLine1:"address-line1",addressLine2:"address-line2",locality:"address-level2",region:"address-level1",postalCode:"postal-code"},ae={addressLine1:u.LINE_MAX,addressLine2:u.LINE_MAX,locality:u.PART_MAX,region:u.PART_MAX,postalCode:u.POSTAL_MAX};function te(r,a,l){switch(r){case"addressLine1":return l.addressLine1;case"addressLine2":return l.addressLine2;case"locality":return l[`addressLocality_${a.localityType}`];case"region":return l[`addressRegion_${a.regionType}`];case"postalCode":return l[`addressPostal_${a.postalType}`]}}function z(r){return String.fromCodePoint(...[...r].map(a=>127462+a.charCodeAt(0)-65))}function ge({field:r,inputId:a,describedBy:l,invalid:F,value:P,labels:c,siteCountry:A,controlClassName:M,onChange:H,onFocus:j,onBlur:J}){let Q=I(),{ui:d,locale:p}=Q,t=(0,m.useMemo)(()=>{let e=$(),n=r.countries.filter(y=>D(y));return n.length>0?n:e},[r.countries]),L=(0,m.useMemo)(()=>{for(let e of[r.defaultCountry,A?.toUpperCase()])if(e&&t.includes(e))return e;return t.length===1?t[0]:""},[r.defaultCountry,A,t]),i=G(P)?P:{},o=i.countryCode&&t.includes(i.countryCode)?i.countryCode:L,f=O(o),W=(0,m.useMemo)(()=>{let e=new Intl.Collator(p||void 0);return t.map(n=>({value:n,label:C(n,p),leading:(0,s.jsx)("span",{"aria-hidden":!0,children:z(n)}),keywords:[n]})).sort((n,y)=>e.compare(n.label,y.label))},[t,p]),Y=(0,m.useMemo)(()=>[...new Set([L,A?.toUpperCase()??""].filter(e=>e&&t.includes(e)))],[L,A,t]),Z=(0,m.useMemo)(()=>({title:c.addressCountry,search:d.countrySearch,noMatch:d.countryNoMatch,pinned:d.countryGroupCommon,all:d.countryGroupAll}),[c.addressCountry,d.countrySearch,d.countryNoMatch,d.countryGroupCommon,d.countryGroupAll]),h=e=>{H({addressLine1:"",...i,countryCode:o,...e})},S=F?X({...i,countryCode:o}):null,N=S?B(S):null,ee=e=>!!(N&&(N.missing.includes(e)||e==="postalCode"&&N.postalCode)),_=F&&r.askRecipientName&&!i.recipientName?.trim(),w=e=>g("h-11 w-full",M,e&&q),b=g("mb-1 block text-sm",K),E=r.required?(0,s.jsx)("span",{"aria-hidden":!0,className:g("ml-0.5",V),children:"*"}):null;return(0,s.jsxs)("div",{role:"group","aria-describedby":l,className:"grid grid-cols-2 gap-x-3 gap-y-3",onFocus:j,onBlur:e=>{e.relatedTarget&&e.currentTarget.contains(e.relatedTarget)||J()},children:[(0,s.jsxs)("div",{className:"col-span-2",children:[(0,s.jsx)("span",{className:b,children:c.addressCountry}),(0,s.jsx)(U,{items:W,value:o||null,onChange:e=>h({countryCode:e}),labels:Z,pinnedValues:Y,disabled:t.length===1,error:F&&!o,triggerAriaLabel:o?`${c.addressCountry}: ${C(o,p)}`:c.addressCountry,triggerClassName:g("w-full justify-between",M),trigger:o?(0,s.jsxs)("span",{className:"flex min-w-0 items-center gap-2",children:[(0,s.jsx)("span",{"aria-hidden":!0,children:z(o)}),(0,s.jsx)("span",{className:"truncate",children:C(o,p)})]}):(0,s.jsx)("span",{className:"truncate text-zinc-400",children:d.selectCountry})})]}),r.askRecipientName&&(0,s.jsxs)("div",{className:"col-span-2",children:[(0,s.jsxs)("label",{htmlFor:`${a}-recipient`,className:b,children:[c.addressRecipient,E]}),(0,s.jsx)(v,{id:`${a}-recipient`,type:"text",autoComplete:"name",maxLength:u.NAME_MAX,"aria-invalid":_||void 0,className:w(_),value:i.recipientName??"",onChange:e=>h({recipientName:e.target.value})})]}),f.parts.map((e,n)=>{let y=e.key==="addressLine1"||e.key==="addressLine2",R=ee(e.key),T=n===0?a:`${a}-${e.key}`;return(0,s.jsxs)("div",{className:y?"col-span-2":"col-span-2 sm:col-span-1",children:[(0,s.jsxs)("label",{htmlFor:T,className:b,children:[te(e.key,f,c),e.required?E:null]}),(0,s.jsx)(v,{id:T,type:"text",autoComplete:ne[e.key],maxLength:ae[e.key],placeholder:e.key==="postalCode"?f.postalExample:void 0,"aria-invalid":R||void 0,className:w(R),value:i[e.key]??"",onChange:se=>h({[e.key]:se.target.value})})]},e.key)})]})}export{ge as FormAddressField};
2
- //# sourceMappingURL=FormAddressField-C6VN7J6I.js.map
1
+ "use client";import{a as X,b as C}from"./chunk-BU7KUHZK.js";import"./chunk-A4DPHHAP.js";import{b as $,c as D,g as O}from"./chunk-N4BGAMWD.js";import{a as u,b as B,c as K,d as V,e as q,g as U}from"./chunk-K2XZKV3Q.js";import{k as G}from"./chunk-2H3LTDAA.js";import"./chunk-ARU5PTJV.js";import{a as v}from"./chunk-KDNGDR64.js";import"./chunk-D7K3YCBR.js";import"./chunk-VYSRVTYI.js";import"./chunk-UM74DXPE.js";import"./chunk-W63RJF6Q.js";import"./chunk-U7KVGD47.js";import"./chunk-ET57PWXC.js";import{ba as g}from"./chunk-S2NFWI7C.js";import{b as I}from"./chunk-AFNEGNVJ.js";import{a as x}from"./chunk-OU4IOHLN.js";import"./chunk-NSY72ZYX.js";import{a as re}from"./chunk-6LGTFWQS.js";import{c as k}from"./chunk-CDG7S4P5.js";var m=k(re());var s=k(x()),ne={addressLine1:"address-line1",addressLine2:"address-line2",locality:"address-level2",region:"address-level1",postalCode:"postal-code"},ae={addressLine1:u.LINE_MAX,addressLine2:u.LINE_MAX,locality:u.PART_MAX,region:u.PART_MAX,postalCode:u.POSTAL_MAX};function te(r,a,l){switch(r){case"addressLine1":return l.addressLine1;case"addressLine2":return l.addressLine2;case"locality":return l[`addressLocality_${a.localityType}`];case"region":return l[`addressRegion_${a.regionType}`];case"postalCode":return l[`addressPostal_${a.postalType}`]}}function z(r){return String.fromCodePoint(...[...r].map(a=>127462+a.charCodeAt(0)-65))}function ge({field:r,inputId:a,describedBy:l,invalid:F,value:P,labels:c,siteCountry:A,controlClassName:M,onChange:H,onFocus:j,onBlur:J}){let Q=I(),{ui:d,locale:p}=Q,t=(0,m.useMemo)(()=>{let e=B(),n=r.countries.filter(y=>K(y));return n.length>0?n:e},[r.countries]),L=(0,m.useMemo)(()=>{for(let e of[r.defaultCountry,A?.toUpperCase()])if(e&&t.includes(e))return e;return t.length===1?t[0]:""},[r.defaultCountry,A,t]),i=G(P)?P:{},o=i.countryCode&&t.includes(i.countryCode)?i.countryCode:L,f=V(o),W=(0,m.useMemo)(()=>{let e=new Intl.Collator(p||void 0);return t.map(n=>({value:n,label:C(n,p),leading:(0,s.jsx)("span",{"aria-hidden":!0,children:z(n)}),keywords:[n]})).sort((n,y)=>e.compare(n.label,y.label))},[t,p]),Y=(0,m.useMemo)(()=>[...new Set([L,A?.toUpperCase()??""].filter(e=>e&&t.includes(e)))],[L,A,t]),Z=(0,m.useMemo)(()=>({title:c.addressCountry,search:d.countrySearch,noMatch:d.countryNoMatch,pinned:d.countryGroupCommon,all:d.countryGroupAll}),[c.addressCountry,d.countrySearch,d.countryNoMatch,d.countryGroupCommon,d.countryGroupAll]),h=e=>{H({addressLine1:"",...i,countryCode:o,...e})},S=F?q({...i,countryCode:o}):null,N=S?U(S):null,ee=e=>!!(N&&(N.missing.includes(e)||e==="postalCode"&&N.postalCode)),_=F&&r.askRecipientName&&!i.recipientName?.trim(),w=e=>g("h-11 w-full",M,e&&O),b=g("mb-1 block text-sm",$),E=r.required?(0,s.jsx)("span",{"aria-hidden":!0,className:g("ml-0.5",D),children:"*"}):null;return(0,s.jsxs)("div",{role:"group","aria-describedby":l,className:"grid grid-cols-2 gap-x-3 gap-y-3",onFocus:j,onBlur:e=>{e.relatedTarget&&e.currentTarget.contains(e.relatedTarget)||J()},children:[(0,s.jsxs)("div",{className:"col-span-2",children:[(0,s.jsx)("span",{className:b,children:c.addressCountry}),(0,s.jsx)(X,{items:W,value:o||null,onChange:e=>h({countryCode:e}),labels:Z,pinnedValues:Y,disabled:t.length===1,error:F&&!o,triggerAriaLabel:o?`${c.addressCountry}: ${C(o,p)}`:c.addressCountry,triggerClassName:g("w-full justify-between",M),trigger:o?(0,s.jsxs)("span",{className:"flex min-w-0 items-center gap-2",children:[(0,s.jsx)("span",{"aria-hidden":!0,children:z(o)}),(0,s.jsx)("span",{className:"truncate",children:C(o,p)})]}):(0,s.jsx)("span",{className:"truncate text-zinc-400",children:d.selectCountry})})]}),r.askRecipientName&&(0,s.jsxs)("div",{className:"col-span-2",children:[(0,s.jsxs)("label",{htmlFor:`${a}-recipient`,className:b,children:[c.addressRecipient,E]}),(0,s.jsx)(v,{id:`${a}-recipient`,type:"text",autoComplete:"name",maxLength:u.NAME_MAX,"aria-invalid":_||void 0,className:w(_),value:i.recipientName??"",onChange:e=>h({recipientName:e.target.value})})]}),f.parts.map((e,n)=>{let y=e.key==="addressLine1"||e.key==="addressLine2",R=ee(e.key),T=n===0?a:`${a}-${e.key}`;return(0,s.jsxs)("div",{className:y?"col-span-2":"col-span-2 sm:col-span-1",children:[(0,s.jsxs)("label",{htmlFor:T,className:b,children:[te(e.key,f,c),e.required?E:null]}),(0,s.jsx)(v,{id:T,type:"text",autoComplete:ne[e.key],maxLength:ae[e.key],placeholder:e.key==="postalCode"?f.postalExample:void 0,"aria-invalid":R||void 0,className:w(R),value:i[e.key]??"",onChange:se=>h({[e.key]:se.target.value})})]},e.key)})]})}export{ge as FormAddressField};
2
+ //# sourceMappingURL=FormAddressField-Z5XT2ELO.js.map
@@ -0,0 +1,2 @@
1
+ "use client";import{FORM_FILE_EXT_BY_MIME,checkFormFile,formFileAcceptedMimes,uploadFormFile}from"./chunk-QF55WZDP.js";import{FORM_ACCENT_ICON,FORM_DANGER,FORM_FG,FORM_FG_MUTED,FORM_FIELD_BOX_COLORS,FORM_FIELD_FG_MUTED}from"./chunk-SVWEVSYJ.js";import{FORM_LIMITS}from"./chunk-APWDEDWM.js";import"./chunk-RG5JA44V.js";import"./chunk-FFAWYDLJ.js";import{TONE_BG_TINT,TONE_BG_TINT_STRONG_HOVER,TONE_BG_TRACK}from"./chunk-RKEHHJDU.js";import{CircleCheck,File,LoaderCircle,Paperclip,X}from"./chunk-33AQQY6T.js";import{cn}from"./chunk-VUTODQFX.js";import"./chunk-3ZTUZPSD.js";import{useCallback,useEffect,useRef,useState}from"react";import{jsx,jsxs}from"react/jsx-runtime";function acceptFor(field){const mimes=formFileAcceptedMimes(field);const exts=mimes.map(m=>FORM_FILE_EXT_BY_MIME[m]).filter(Boolean);return{attr:[...mimes,...exts].join(","),exts:exts.join(" ")}}function formatMb(bytes){return`${Math.round(bytes/(1024*1024))} MB`}function FormFileField({field,inputId,describedBy,invalid,labels,uploadUrl,protectionReady,getProtectionData,onChange,onUnavailableChange,onBusyChange,onFocus}){const[files,setFiles]=useState([]);const[unavailable,setUnavailable]=useState(false);const inputRef=useRef(null);const runningRef=useRef(new Map);const{attr,exts}=acceptFor(field);const canUpload=Boolean(uploadUrl);const busyReportedRef=useRef(false);useEffect(()=>{const ids=files.filter(f=>f.status==="done"&&f.uploadId).map(f=>f.uploadId);onChange(ids.length>0?ids:null);const busy=files.some(f=>f.status==="waiting"||f.status==="requesting"||f.status==="uploading");busyReportedRef.current=busy;onBusyChange(busy)},[files]);const onBusyChangeRef=useRef(onBusyChange);useEffect(()=>{onBusyChangeRef.current=onBusyChange},[onBusyChange]);useEffect(()=>{const running=runningRef.current;return()=>{for(const controller of running.values())controller.abort();running.clear();if(busyReportedRef.current)onBusyChangeRef.current(false)}},[]);useEffect(()=>{onUnavailableChange(unavailable)},[unavailable]);const patch=useCallback((localId,next)=>{setFiles(prev=>prev.map(f=>f.localId===localId?{...f,...next}:f))},[]);const upload=useCallback(async item=>{if(!uploadUrl||runningRef.current.has(item.localId))return;const controller=new AbortController;runningRef.current.set(item.localId,controller);patch(item.localId,{status:"requesting",progress:0});try{const result=await uploadFormFile({uploadUrl,fieldId:field.id,file:item.file,protection:getProtectionData(),onUploading:()=>patch(item.localId,{status:"uploading"}),onProgress:ratio=>patch(item.localId,{progress:ratio}),signal:controller.signal});if(!result.ok&&result.reason==="aborted")return;if(result.ok)patch(item.localId,{status:"done",progress:1,uploadId:result.uploadId});else if(result.reason==="file_too_large")patch(item.localId,{status:"error",errorKey:"fileTooLarge"});else if(result.reason==="file_type_not_allowed")patch(item.localId,{status:"error",errorKey:"fileTypeNotAllowed"});else if(result.reason==="unavailable"){setUnavailable(true);patch(item.localId,{status:"error",errorKey:"fileUnavailable"})}else patch(item.localId,{status:"error",errorKey:"fileUploadFailed"})}finally{if(runningRef.current.get(item.localId)===controller)runningRef.current.delete(item.localId)}},[uploadUrl,field.id,getProtectionData,patch]);useEffect(()=>{if(!protectionReady)return;for(const f of files){if(f.status==="waiting")void upload(f)}},[protectionReady,files,upload]);const handleSelect=useCallback(e=>{const picked=Array.from(e.target.files??[]);e.target.value="";if(picked.length===0)return;onFocus();setFiles(prev=>{const room=Math.max(0,field.maxFiles-prev.length);const additions=picked.slice(0,room).map(file=>{const localId=`${Date.now()}-${Math.random().toString(36).slice(2,8)}`;const problem=checkFormFile(field,file);if(problem==="file_type_not_allowed")return{localId,file,status:"error",progress:0,errorKey:"fileTypeNotAllowed"};if(problem==="file_too_large")return{localId,file,status:"error",progress:0,errorKey:"fileTooLarge"};return{localId,file,status:"waiting",progress:0}});return[...prev,...additions]})},[field,onFocus]);const remove=useCallback(localId=>{runningRef.current.get(localId)?.abort();runningRef.current.delete(localId);setFiles(prev=>prev.filter(f=>f.localId!==localId))},[]);const hint=labels.fileLimitHint.replace("{max}",String(field.maxFiles)).replace("{size}",formatMb(FORM_LIMITS.FILE_MAX_BYTES));const full=files.length>=field.maxFiles;return jsxs("div",{className:"space-y-2","aria-describedby":describedBy,children:[jsx("input",{ref:inputRef,id:inputId,type:"file",className:"sr-only",accept:attr,multiple:field.maxFiles>1,disabled:!canUpload||full,"aria-invalid":invalid||void 0,onChange:handleSelect}),jsxs("label",{htmlFor:inputId,className:cn("flex min-h-11 cursor-pointer items-center gap-2 rounded-lg border border-dashed px-3.5 py-3 text-sm transition",FORM_FIELD_BOX_COLORS,"hover:border-[var(--site-field-accent,var(--brand-color,#FF5733))]",invalid&&"border-red-400",(!canUpload||full)&&"cursor-not-allowed opacity-60 hover:border-[var(--site-field-border,rgb(0_0_0/0.15))]"),children:[jsx(Paperclip,{className:"h-4 w-4 shrink-0"}),jsx("span",{className:"flex-1",children:labels.fileChoose}),jsx("span",{className:cn("text-xs",FORM_FIELD_FG_MUTED),children:exts})]}),jsx("p",{className:cn("text-xs",FORM_FG_MUTED),children:hint}),unavailable&&jsx("p",{className:cn("text-xs",FORM_FG_MUTED),children:labels.fileUnavailable}),files.length>0&&jsx("ul",{className:"space-y-1.5",children:files.map(f=>jsxs("li",{className:cn("flex items-center gap-2 rounded-lg px-3 py-2 text-sm",TONE_BG_TINT),children:[f.status==="done"?jsx(CircleCheck,{className:cn("h-4 w-4 shrink-0",FORM_ACCENT_ICON)}):f.status==="error"?jsx(File,{className:cn("h-4 w-4 shrink-0",FORM_DANGER)}):jsx(LoaderCircle,{className:cn("h-4 w-4 shrink-0 animate-spin",FORM_FG_MUTED)}),jsxs("span",{className:"min-w-0 flex-1",children:[jsx("span",{className:cn("block truncate",FORM_FG),title:f.file.name,children:f.file.name}),jsx("span",{className:cn("block text-xs",f.status==="error"?FORM_DANGER:FORM_FG_MUTED),children:f.status==="error"&&f.errorKey?labels[f.errorKey]:f.status==="waiting"?labels.fileWaiting:f.status==="done"?`${(f.file.size/1024).toFixed(0)} KB`:`${labels.fileUploading} ${Math.round(f.progress*100)}%`}),(f.status==="uploading"||f.status==="requesting")&&jsx("span",{className:"mt-1 block h-1 overflow-hidden rounded "+TONE_BG_TRACK,children:jsx("span",{className:"block h-full bg-[var(--site-accent-line,var(--brand-color,#FF5733))] transition-[width]",style:{width:`${Math.round(f.progress*100)}%`}})})]}),jsx("button",{type:"button",onClick:()=>remove(f.localId),"aria-label":labels.fileRemove,className:cn("flex h-8 w-8 shrink-0 items-center justify-center rounded-md hover:text-[var(--site-fg,#18181b)]",FORM_FG_MUTED,TONE_BG_TINT_STRONG_HOVER),children:jsx(X,{className:"h-4 w-4"})})]},f.localId))})]})}export{FormFileField};
2
+ //# sourceMappingURL=FormFileField-5YFTKIRZ.js.map
@@ -0,0 +1,2 @@
1
+ "use client";import{a as z,b as Y,c as V,d as W}from"./chunk-RNRIZCZS.js";import{a as q,b as p,c as v,d as H,e as X,h as j}from"./chunk-N4BGAMWD.js";import{d as $}from"./chunk-2H3LTDAA.js";import"./chunk-D7K3YCBR.js";import{d as U,g as G,h as P}from"./chunk-2LOQXVFI.js";import"./chunk-UM74DXPE.js";import{A as B,G as S,Y as A,ba as s,l as C,t as K}from"./chunk-S2NFWI7C.js";import{a as D}from"./chunk-OU4IOHLN.js";import{a as ne}from"./chunk-6LGTFWQS.js";import{c as N}from"./chunk-CDG7S4P5.js";var o=N(ne());var t=N(D());function ie(l){let m=Y(l),g=m.map(F=>z[F]).filter(Boolean);return{attr:[...m,...g].join(","),exts:g.join(" ")}}function ce(l){return`${Math.round(l/(1024*1024))} MB`}function fe({field:l,inputId:m,describedBy:g,invalid:F,labels:c,uploadUrl:f,protectionReady:x,getProtectionData:M,onChange:J,onUnavailableChange:Q,onBusyChange:b,onFocus:w}){let[i,h]=(0,o.useState)([]),[_,Z]=(0,o.useState)(!1),ee=(0,o.useRef)(null),d=(0,o.useRef)(new Map),{attr:re,exts:te}=ie(l),T=!!f,E=(0,o.useRef)(!1);(0,o.useEffect)(()=>{let e=i.filter(r=>r.status==="done"&&r.uploadId).map(r=>r.uploadId);J(e.length>0?e:null);let a=i.some(r=>r.status==="waiting"||r.status==="requesting"||r.status==="uploading");E.current=a,b(a)},[i]);let R=(0,o.useRef)(b);(0,o.useEffect)(()=>{R.current=b},[b]),(0,o.useEffect)(()=>{let e=d.current;return()=>{for(let a of e.values())a.abort();e.clear(),E.current&&R.current(!1)}},[]),(0,o.useEffect)(()=>{Q(_)},[_]);let n=(0,o.useCallback)((e,a)=>{h(r=>r.map(u=>u.localId===e?{...u,...a}:u))},[]),L=(0,o.useCallback)(async e=>{if(!f||d.current.has(e.localId))return;let a=new AbortController;d.current.set(e.localId,a),n(e.localId,{status:"requesting",progress:0});try{let r=await W({uploadUrl:f,fieldId:l.id,file:e.file,protection:M(),onUploading:()=>n(e.localId,{status:"uploading"}),onProgress:u=>n(e.localId,{progress:u}),signal:a.signal});if(!r.ok&&r.reason==="aborted")return;r.ok?n(e.localId,{status:"done",progress:1,uploadId:r.uploadId}):r.reason==="file_too_large"?n(e.localId,{status:"error",errorKey:"fileTooLarge"}):r.reason==="file_type_not_allowed"?n(e.localId,{status:"error",errorKey:"fileTypeNotAllowed"}):r.reason==="unavailable"?(Z(!0),n(e.localId,{status:"error",errorKey:"fileUnavailable"})):n(e.localId,{status:"error",errorKey:"fileUploadFailed"})}finally{d.current.get(e.localId)===a&&d.current.delete(e.localId)}},[f,l.id,M,n]);(0,o.useEffect)(()=>{if(x)for(let e of i)e.status==="waiting"&&L(e)},[x,i,L]);let oe=(0,o.useCallback)(e=>{let a=Array.from(e.target.files??[]);e.target.value="",a.length!==0&&(w(),h(r=>{let u=Math.max(0,l.maxFiles-r.length),se=a.slice(0,u).map(y=>{let I=`${Date.now()}-${Math.random().toString(36).slice(2,8)}`,O=V(l,y);return O==="file_type_not_allowed"?{localId:I,file:y,status:"error",progress:0,errorKey:"fileTypeNotAllowed"}:O==="file_too_large"?{localId:I,file:y,status:"error",progress:0,errorKey:"fileTooLarge"}:{localId:I,file:y,status:"waiting",progress:0}});return[...r,...se]}))},[l,w]),ae=(0,o.useCallback)(e=>{d.current.get(e)?.abort(),d.current.delete(e),h(a=>a.filter(r=>r.localId!==e))},[]),le=c.fileLimitHint.replace("{max}",String(l.maxFiles)).replace("{size}",ce($.FILE_MAX_BYTES)),k=i.length>=l.maxFiles;return(0,t.jsxs)("div",{className:"space-y-2","aria-describedby":g,children:[(0,t.jsx)("input",{ref:ee,id:m,type:"file",className:"sr-only",accept:re,multiple:l.maxFiles>1,disabled:!T||k,"aria-invalid":F||void 0,onChange:oe}),(0,t.jsxs)("label",{htmlFor:m,className:s("flex min-h-11 cursor-pointer items-center gap-2 rounded-lg border border-dashed px-3.5 py-3 text-sm transition",X,"hover:border-[var(--site-field-accent,var(--brand-color,#FF5733))]",F&&"border-red-400",(!T||k)&&"cursor-not-allowed opacity-60 hover:border-[var(--site-field-border,rgb(0_0_0/0.15))]"),children:[(0,t.jsx)(S,{className:"h-4 w-4 shrink-0"}),(0,t.jsx)("span",{className:"flex-1",children:c.fileChoose}),(0,t.jsx)("span",{className:s("text-xs",j),children:te})]}),(0,t.jsx)("p",{className:s("text-xs",p),children:le}),_&&(0,t.jsx)("p",{className:s("text-xs",p),children:c.fileUnavailable}),i.length>0&&(0,t.jsx)("ul",{className:"space-y-1.5",children:i.map(e=>(0,t.jsxs)("li",{className:s("flex items-center gap-2 rounded-lg px-3 py-2 text-sm",U),children:[e.status==="done"?(0,t.jsx)(C,{className:s("h-4 w-4 shrink-0",H)}):e.status==="error"?(0,t.jsx)(K,{className:s("h-4 w-4 shrink-0",v)}):(0,t.jsx)(B,{className:s("h-4 w-4 shrink-0 animate-spin",p)}),(0,t.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,t.jsx)("span",{className:s("block truncate",q),title:e.file.name,children:e.file.name}),(0,t.jsx)("span",{className:s("block text-xs",e.status==="error"?v:p),children:e.status==="error"&&e.errorKey?c[e.errorKey]:e.status==="waiting"?c.fileWaiting:e.status==="done"?`${(e.file.size/1024).toFixed(0)} KB`:`${c.fileUploading} ${Math.round(e.progress*100)}%`}),(e.status==="uploading"||e.status==="requesting")&&(0,t.jsx)("span",{className:"mt-1 block h-1 overflow-hidden rounded "+P,children:(0,t.jsx)("span",{className:"block h-full bg-[var(--site-accent-line,var(--brand-color,#FF5733))] transition-[width]",style:{width:`${Math.round(e.progress*100)}%`}})})]}),(0,t.jsx)("button",{type:"button",onClick:()=>ae(e.localId),"aria-label":c.fileRemove,className:s("flex h-8 w-8 shrink-0 items-center justify-center rounded-md hover:text-[var(--site-fg,#18181b)]",p,G),children:(0,t.jsx)(A,{className:"h-4 w-4"})})]},e.localId))})]})}export{fe as FormFileField};
2
+ //# sourceMappingURL=FormFileField-D2XIGIML.js.map
@@ -1,2 +1,2 @@
1
- "use client";import{a as U,b as B,c as D,d as O,e as W}from"./chunk-PR2NRUEI.js";import{a as z,b as R}from"./chunk-BU7KUHZK.js";import{i as M}from"./chunk-GJY6AQIS.js";import"./chunk-A4DPHHAP.js";import{b as G,g as V}from"./chunk-N4BGAMWD.js";import"./chunk-ARU5PTJV.js";import{a as E}from"./chunk-KDNGDR64.js";import"./chunk-D7K3YCBR.js";import"./chunk-VYSRVTYI.js";import"./chunk-UM74DXPE.js";import"./chunk-W63RJF6Q.js";import"./chunk-U7KVGD47.js";import"./chunk-ET57PWXC.js";import{ba as b}from"./chunk-S2NFWI7C.js";import{b as _}from"./chunk-AFNEGNVJ.js";import{a as C}from"./chunk-OU4IOHLN.js";import"./chunk-NSY72ZYX.js";import{a as w}from"./chunk-6LGTFWQS.js";import{c as v}from"./chunk-CDG7S4P5.js";var I=v(w());var p=v(w());function H(e,n){return n?.toLowerCase().startsWith("zh")?e.provider:e.providerEn}var d=v(C()),Z=400;function q({country:e,type:n,value:T,lookup:i,onRegistryResolved:u}){let t=n??B(e)[0]??null,l=t?U(t):null,[m,L]=(0,p.useState)(null),[S,k]=(0,p.useState)(!1),h=(0,p.useRef)(i),F=(0,p.useRef)(u);(0,p.useEffect)(()=>{h.current=i,F.current=u});let a=t?D({country:e,type:t,value:T}):null,c=a?.ok?a.normalized:null;return(0,p.useEffect)(()=>{if(L(null),F.current?.(null),!c||!t||!h.current){k(!1);return}let y=!1;k(!0);let x=setTimeout(()=>{(h.current?.({country:e,type:t,value:c})??Promise.resolve(null)).catch(()=>null).then(o=>{y||(k(!1),o?.ok&&o.status==="VERIFIED"&&o.registry&&(L(o),F.current?.(o)))})},Z);return()=>{y=!0,clearTimeout(x)}},[c,t,e,!!i]),{type:t,inputProps:{inputMode:l?.inputMode??"text",maxLength:l?.maxLength??32,placeholder:l?.example(e)||void 0,autoComplete:"off",spellCheck:!1},checking:S,result:m}}function $({state:e,labels:n,locale:T,className:i="mt-1.5 text-xs text-neutral-500 dark:text-neutral-400"}){let u=e.result?.registry,t=u?.registryStatus==="SUSPENDED"||u?.registryStatus==="CLOSED",l=e.result?.attribution,m=l?H(l,T):null;return(0,d.jsxs)("div",{"aria-live":"polite",children:[e.checking&&(0,d.jsx)("p",{className:i,children:n.checking}),u&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("p",{className:i,children:n.registeredName.replace("{name}",u.name)}),t&&(0,d.jsx)("p",{className:i,children:n.inactive}),m&&(0,d.jsx)("p",{className:i,children:n.source.replace("{provider}",m)})]})]})}var s=v(C());function K(e){return String.fromCodePoint(...[...e].map(n=>127462+n.charCodeAt(0)-65))}function ge({field:e,inputId:n,describedBy:T,invalid:i,value:u,labels:t,siteCountry:l,controlClassName:m,lookup:L,onRegistryName:S,onChange:k,onFocus:h,onBlur:F}){let{ui:a,locale:c}=_(),g=(0,I.useMemo)(()=>O(e),[e]),y=(0,I.useMemo)(()=>W(e,l),[e,l]),x=M(u)?u:null,o=x?.countryCode&&g.includes(x.countryCode)?x.countryCode:y,N=x?.value??"",P=q({country:o,value:N,lookup:L,onRegistryResolved:r=>{r?.registry&&!r.registry.nameHasPrivateUse&&S?.(r.registry.name)}}),Y=(0,I.useMemo)(()=>{let r=new Intl.Collator(c||void 0);return g.map(f=>({value:f,label:R(f,c),leading:(0,s.jsx)("span",{"aria-hidden":!0,children:K(f)}),keywords:[f]})).sort((f,X)=>r.compare(f.label,X.label))},[g,c]),J=(0,I.useMemo)(()=>[...new Set([y,l?.toUpperCase()??""].filter(r=>r&&g.includes(r)))],[y,l,g]),Q=(0,I.useMemo)(()=>({title:t.addressCountry,search:a.countrySearch,noMatch:a.countryNoMatch,pinned:a.countryGroupCommon,all:a.countryGroupAll}),[t.addressCountry,a.countrySearch,a.countryNoMatch,a.countryGroupCommon,a.countryGroupAll]),A=r=>k({countryCode:o,value:N,...r});return(0,s.jsxs)("div",{role:"group","aria-describedby":T,className:"space-y-3",onFocus:h,onBlur:r=>{r.relatedTarget&&r.currentTarget.contains(r.relatedTarget)||F()},children:[g.length>1&&(0,s.jsx)(z,{items:Y,value:o||null,onChange:r=>A({countryCode:r}),labels:Q,pinnedValues:J,error:i&&!o,triggerAriaLabel:o?`${t.addressCountry}: ${R(o,c)}`:t.addressCountry,triggerClassName:b("w-full justify-between",m),trigger:o?(0,s.jsxs)("span",{className:"flex min-w-0 items-center gap-2",children:[(0,s.jsx)("span",{"aria-hidden":!0,children:K(o)}),(0,s.jsx)("span",{className:"truncate",children:R(o,c)})]}):(0,s.jsx)("span",{className:"truncate text-zinc-400",children:a.selectCountry})}),(0,s.jsxs)("div",{children:[(0,s.jsx)(E,{id:n,type:"text",...P.inputProps,"aria-invalid":i||void 0,"aria-busy":P.checking||void 0,className:b("h-11 w-full",m,i&&V),value:N,onChange:r=>A({value:r.target.value})}),(0,s.jsx)($,{state:P,locale:c,className:b("mt-1.5 text-xs",G),labels:{checking:t.taxIdChecking,registeredName:t.taxIdRegisteredName,inactive:t.taxIdInactive,source:t.taxIdSource}})]})]})}export{ge as FormTaxIdField};
2
- //# sourceMappingURL=FormTaxIdField-K34MDUPW.js.map
1
+ "use client";import{a as D,b as R}from"./chunk-BU7KUHZK.js";import"./chunk-A4DPHHAP.js";import{b as U,g as B}from"./chunk-N4BGAMWD.js";import{a as O,b as W,c as G,d as V,e as z}from"./chunk-PR2NRUEI.js";import{j as M}from"./chunk-2H3LTDAA.js";import"./chunk-ARU5PTJV.js";import{a as E}from"./chunk-KDNGDR64.js";import"./chunk-D7K3YCBR.js";import"./chunk-VYSRVTYI.js";import"./chunk-UM74DXPE.js";import"./chunk-W63RJF6Q.js";import"./chunk-U7KVGD47.js";import"./chunk-ET57PWXC.js";import{ba as b}from"./chunk-S2NFWI7C.js";import{b as _}from"./chunk-AFNEGNVJ.js";import{a as C}from"./chunk-OU4IOHLN.js";import"./chunk-NSY72ZYX.js";import{a as w}from"./chunk-6LGTFWQS.js";import{c as v}from"./chunk-CDG7S4P5.js";var I=v(w());var p=v(w());function H(e,n){return n?.toLowerCase().startsWith("zh")?e.provider:e.providerEn}var d=v(C()),Z=400;function q({country:e,type:n,value:T,lookup:i,onRegistryResolved:u}){let t=n??W(e)[0]??null,l=t?O(t):null,[m,L]=(0,p.useState)(null),[S,k]=(0,p.useState)(!1),h=(0,p.useRef)(i),F=(0,p.useRef)(u);(0,p.useEffect)(()=>{h.current=i,F.current=u});let a=t?G({country:e,type:t,value:T}):null,c=a?.ok?a.normalized:null;return(0,p.useEffect)(()=>{if(L(null),F.current?.(null),!c||!t||!h.current){k(!1);return}let y=!1;k(!0);let x=setTimeout(()=>{(h.current?.({country:e,type:t,value:c})??Promise.resolve(null)).catch(()=>null).then(o=>{y||(k(!1),o?.ok&&o.status==="VERIFIED"&&o.registry&&(L(o),F.current?.(o)))})},Z);return()=>{y=!0,clearTimeout(x)}},[c,t,e,!!i]),{type:t,inputProps:{inputMode:l?.inputMode??"text",maxLength:l?.maxLength??32,placeholder:l?.example(e)||void 0,autoComplete:"off",spellCheck:!1},checking:S,result:m}}function $({state:e,labels:n,locale:T,className:i="mt-1.5 text-xs text-neutral-500 dark:text-neutral-400"}){let u=e.result?.registry,t=u?.registryStatus==="SUSPENDED"||u?.registryStatus==="CLOSED",l=e.result?.attribution,m=l?H(l,T):null;return(0,d.jsxs)("div",{"aria-live":"polite",children:[e.checking&&(0,d.jsx)("p",{className:i,children:n.checking}),u&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("p",{className:i,children:n.registeredName.replace("{name}",u.name)}),t&&(0,d.jsx)("p",{className:i,children:n.inactive}),m&&(0,d.jsx)("p",{className:i,children:n.source.replace("{provider}",m)})]})]})}var s=v(C());function K(e){return String.fromCodePoint(...[...e].map(n=>127462+n.charCodeAt(0)-65))}function ge({field:e,inputId:n,describedBy:T,invalid:i,value:u,labels:t,siteCountry:l,controlClassName:m,lookup:L,onRegistryName:S,onChange:k,onFocus:h,onBlur:F}){let{ui:a,locale:c}=_(),g=(0,I.useMemo)(()=>V(e),[e]),y=(0,I.useMemo)(()=>z(e,l),[e,l]),x=M(u)?u:null,o=x?.countryCode&&g.includes(x.countryCode)?x.countryCode:y,N=x?.value??"",P=q({country:o,value:N,lookup:L,onRegistryResolved:r=>{r?.registry&&!r.registry.nameHasPrivateUse&&S?.(r.registry.name)}}),Y=(0,I.useMemo)(()=>{let r=new Intl.Collator(c||void 0);return g.map(f=>({value:f,label:R(f,c),leading:(0,s.jsx)("span",{"aria-hidden":!0,children:K(f)}),keywords:[f]})).sort((f,X)=>r.compare(f.label,X.label))},[g,c]),J=(0,I.useMemo)(()=>[...new Set([y,l?.toUpperCase()??""].filter(r=>r&&g.includes(r)))],[y,l,g]),Q=(0,I.useMemo)(()=>({title:t.addressCountry,search:a.countrySearch,noMatch:a.countryNoMatch,pinned:a.countryGroupCommon,all:a.countryGroupAll}),[t.addressCountry,a.countrySearch,a.countryNoMatch,a.countryGroupCommon,a.countryGroupAll]),A=r=>k({countryCode:o,value:N,...r});return(0,s.jsxs)("div",{role:"group","aria-describedby":T,className:"space-y-3",onFocus:h,onBlur:r=>{r.relatedTarget&&r.currentTarget.contains(r.relatedTarget)||F()},children:[g.length>1&&(0,s.jsx)(D,{items:Y,value:o||null,onChange:r=>A({countryCode:r}),labels:Q,pinnedValues:J,error:i&&!o,triggerAriaLabel:o?`${t.addressCountry}: ${R(o,c)}`:t.addressCountry,triggerClassName:b("w-full justify-between",m),trigger:o?(0,s.jsxs)("span",{className:"flex min-w-0 items-center gap-2",children:[(0,s.jsx)("span",{"aria-hidden":!0,children:K(o)}),(0,s.jsx)("span",{className:"truncate",children:R(o,c)})]}):(0,s.jsx)("span",{className:"truncate text-zinc-400",children:a.selectCountry})}),(0,s.jsxs)("div",{children:[(0,s.jsx)(E,{id:n,type:"text",...P.inputProps,"aria-invalid":i||void 0,"aria-busy":P.checking||void 0,className:b("h-11 w-full",m,i&&B),value:N,onChange:r=>A({value:r.target.value})}),(0,s.jsx)($,{state:P,locale:c,className:b("mt-1.5 text-xs",U),labels:{checking:t.taxIdChecking,registeredName:t.taxIdRegisteredName,inactive:t.taxIdInactive,source:t.taxIdSource}})]})]})}export{ge as FormTaxIdField};
2
+ //# sourceMappingURL=FormTaxIdField-GGBQOVZE.js.map
@@ -1,2 +1,2 @@
1
- "use client";import{getTaxIdFormat,listTaxIdTypes,resolveTaxIdCountry,taxIdCountriesOf,validateTaxIdFormat}from"./chunk-VKSYPXNL.js";import{SearchablePicker,getCountryDisplayName}from"./chunk-2FSD3N7F.js";import"./chunk-GZCED6V3.js";import{Input}from"./chunk-W32ZFOPN.js";import"./chunk-S7FE2XRA.js";import"./chunk-AQ6F6MIJ.js";import"./chunk-63XJWMJG.js";import{FORM_FG_MUTED,FORM_FIELD_INVALID_CLASS}from"./chunk-SVWEVSYJ.js";import{isFormTaxIdAnswer}from"./chunk-66XN5RR4.js";import"./chunk-RG5JA44V.js";import"./chunk-FFAWYDLJ.js";import"./chunk-C7HUM2EN.js";import"./chunk-33AQQY6T.js";import{cn}from"./chunk-VUTODQFX.js";import"./chunk-763LNERD.js";import{useSiteLabels}from"./chunk-U7H3W23Q.js";import"./chunk-3ZTUZPSD.js";import{useMemo}from"react";import{useEffect,useRef,useState}from"react";function registryProviderName(attribution,locale){return locale?.toLowerCase().startsWith("zh")?attribution.provider:attribution.providerEn}import{Fragment,jsx,jsxs}from"react/jsx-runtime";var LOOKUP_DEBOUNCE_MS=400;function useTaxIdLookup({country,type,value,lookup,onRegistryResolved}){const resolvedType=type??listTaxIdTypes(country)[0]??null;const format=resolvedType?getTaxIdFormat(resolvedType):null;const[result,setResult]=useState(null);const[checking,setChecking]=useState(false);const lookupRef=useRef(lookup);const resolvedRef=useRef(onRegistryResolved);useEffect(()=>{lookupRef.current=lookup;resolvedRef.current=onRegistryResolved});const checked=resolvedType?validateTaxIdFormat({country,type:resolvedType,value}):null;const normalized=checked?.ok?checked.normalized:null;const canLookup=Boolean(lookup);useEffect(()=>{setResult(null);resolvedRef.current?.(null);if(!normalized||!resolvedType||!lookupRef.current){setChecking(false);return}let cancelled=false;setChecking(true);const timer=setTimeout(()=>{void(lookupRef.current?.({country,type:resolvedType,value:normalized})??Promise.resolve(null)).catch(()=>null).then(response=>{if(cancelled)return;setChecking(false);if(response?.ok&&response.status==="VERIFIED"&&response.registry){setResult(response);resolvedRef.current?.(response)}})},LOOKUP_DEBOUNCE_MS);return()=>{cancelled=true;clearTimeout(timer)}},[normalized,resolvedType,country,canLookup]);return{type:resolvedType,inputProps:{inputMode:format?.inputMode??"text",maxLength:format?.maxLength??32,placeholder:format?.example(country)||void 0,autoComplete:"off",spellCheck:false},checking,result}}function TaxIdRegistryHint({state,labels,locale,className="mt-1.5 text-xs text-neutral-500 dark:text-neutral-400"}){const registry=state.result?.registry;const inactive=registry?.registryStatus==="SUSPENDED"||registry?.registryStatus==="CLOSED";const attribution=state.result?.attribution;const provider=attribution?registryProviderName(attribution,locale):null;return jsxs("div",{"aria-live":"polite",children:[state.checking&&jsx("p",{className,children:labels.checking}),registry&&jsxs(Fragment,{children:[jsx("p",{className,children:labels.registeredName.replace("{name}",registry.name)}),inactive&&jsx("p",{className,children:labels.inactive}),provider&&jsx("p",{className,children:labels.source.replace("{provider}",provider)})]})]})}import{jsx as jsx2,jsxs as jsxs2}from"react/jsx-runtime";function flagOf(code){return String.fromCodePoint(...[...code].map(ch=>127462+ch.charCodeAt(0)-65))}function FormTaxIdField({field,inputId,describedBy,invalid,value,labels,siteCountry,controlClassName,lookup,onRegistryName,onChange,onFocus,onBlur}){const{ui,locale}=useSiteLabels();const allowed=useMemo(()=>taxIdCountriesOf(field),[field]);const fallbackCountry=useMemo(()=>resolveTaxIdCountry(field,siteCountry),[field,siteCountry]);const current=isFormTaxIdAnswer(value)?value:null;const countryCode=current?.countryCode&&allowed.includes(current.countryCode)?current.countryCode:fallbackCountry;const text=current?.value??"";const state=useTaxIdLookup({country:countryCode,value:text,lookup,onRegistryResolved:result=>{if(result?.registry&&!result.registry.nameHasPrivateUse)onRegistryName?.(result.registry.name)}});const items=useMemo(()=>{const collator=new Intl.Collator(locale||void 0);return allowed.map(code=>({value:code,label:getCountryDisplayName(code,locale),leading:jsx2("span",{"aria-hidden":true,children:flagOf(code)}),keywords:[code]})).sort((a,b)=>collator.compare(a.label,b.label))},[allowed,locale]);const pinned=useMemo(()=>[...new Set([fallbackCountry,siteCountry?.toUpperCase()??""].filter(code=>code&&allowed.includes(code)))],[fallbackCountry,siteCountry,allowed]);const pickerLabels=useMemo(()=>({title:labels.addressCountry,search:ui.countrySearch,noMatch:ui.countryNoMatch,pinned:ui.countryGroupCommon,all:ui.countryGroupAll}),[labels.addressCountry,ui.countrySearch,ui.countryNoMatch,ui.countryGroupCommon,ui.countryGroupAll]);const update=patch=>onChange({countryCode,value:text,...patch});const handleGroupBlur=e=>{if(e.relatedTarget&&e.currentTarget.contains(e.relatedTarget))return;onBlur()};return jsxs2("div",{role:"group","aria-describedby":describedBy,className:"space-y-3",onFocus,onBlur:handleGroupBlur,children:[allowed.length>1&&jsx2(SearchablePicker,{items,value:countryCode||null,onChange:next=>update({countryCode:next}),labels:pickerLabels,pinnedValues:pinned,error:invalid&&!countryCode,triggerAriaLabel:countryCode?`${labels.addressCountry}: ${getCountryDisplayName(countryCode,locale)}`:labels.addressCountry,triggerClassName:cn("w-full justify-between",controlClassName),trigger:countryCode?jsxs2("span",{className:"flex min-w-0 items-center gap-2",children:[jsx2("span",{"aria-hidden":true,children:flagOf(countryCode)}),jsx2("span",{className:"truncate",children:getCountryDisplayName(countryCode,locale)})]}):jsx2("span",{className:"truncate text-zinc-400",children:ui.selectCountry})}),jsxs2("div",{children:[jsx2(Input,{id:inputId,type:"text",...state.inputProps,"aria-invalid":invalid||void 0,"aria-busy":state.checking||void 0,className:cn("h-11 w-full",controlClassName,invalid&&FORM_FIELD_INVALID_CLASS),value:text,onChange:e=>update({value:e.target.value})}),jsx2(TaxIdRegistryHint,{state,locale,className:cn("mt-1.5 text-xs",FORM_FG_MUTED),labels:{checking:labels.taxIdChecking,registeredName:labels.taxIdRegisteredName,inactive:labels.taxIdInactive,source:labels.taxIdSource}})]})]})}export{FormTaxIdField};
2
- //# sourceMappingURL=FormTaxIdField-XMK5WRQO.js.map
1
+ "use client";import{getTaxIdFormat,listTaxIdTypes,resolveTaxIdCountry,taxIdCountriesOf,validateTaxIdFormat}from"./chunk-VKSYPXNL.js";import{SearchablePicker,getCountryDisplayName}from"./chunk-2FSD3N7F.js";import"./chunk-GZCED6V3.js";import{Input}from"./chunk-W32ZFOPN.js";import"./chunk-S7FE2XRA.js";import"./chunk-AQ6F6MIJ.js";import"./chunk-63XJWMJG.js";import{FORM_FG_MUTED,FORM_FIELD_INVALID_CLASS}from"./chunk-SVWEVSYJ.js";import{isFormTaxIdAnswer}from"./chunk-APWDEDWM.js";import"./chunk-RG5JA44V.js";import"./chunk-FFAWYDLJ.js";import"./chunk-C7HUM2EN.js";import"./chunk-33AQQY6T.js";import{cn}from"./chunk-VUTODQFX.js";import"./chunk-763LNERD.js";import{useSiteLabels}from"./chunk-U7H3W23Q.js";import"./chunk-3ZTUZPSD.js";import{useMemo}from"react";import{useEffect,useRef,useState}from"react";function registryProviderName(attribution,locale){return locale?.toLowerCase().startsWith("zh")?attribution.provider:attribution.providerEn}import{Fragment,jsx,jsxs}from"react/jsx-runtime";var LOOKUP_DEBOUNCE_MS=400;function useTaxIdLookup({country,type,value,lookup,onRegistryResolved}){const resolvedType=type??listTaxIdTypes(country)[0]??null;const format=resolvedType?getTaxIdFormat(resolvedType):null;const[result,setResult]=useState(null);const[checking,setChecking]=useState(false);const lookupRef=useRef(lookup);const resolvedRef=useRef(onRegistryResolved);useEffect(()=>{lookupRef.current=lookup;resolvedRef.current=onRegistryResolved});const checked=resolvedType?validateTaxIdFormat({country,type:resolvedType,value}):null;const normalized=checked?.ok?checked.normalized:null;const canLookup=Boolean(lookup);useEffect(()=>{setResult(null);resolvedRef.current?.(null);if(!normalized||!resolvedType||!lookupRef.current){setChecking(false);return}let cancelled=false;setChecking(true);const timer=setTimeout(()=>{void(lookupRef.current?.({country,type:resolvedType,value:normalized})??Promise.resolve(null)).catch(()=>null).then(response=>{if(cancelled)return;setChecking(false);if(response?.ok&&response.status==="VERIFIED"&&response.registry){setResult(response);resolvedRef.current?.(response)}})},LOOKUP_DEBOUNCE_MS);return()=>{cancelled=true;clearTimeout(timer)}},[normalized,resolvedType,country,canLookup]);return{type:resolvedType,inputProps:{inputMode:format?.inputMode??"text",maxLength:format?.maxLength??32,placeholder:format?.example(country)||void 0,autoComplete:"off",spellCheck:false},checking,result}}function TaxIdRegistryHint({state,labels,locale,className="mt-1.5 text-xs text-neutral-500 dark:text-neutral-400"}){const registry=state.result?.registry;const inactive=registry?.registryStatus==="SUSPENDED"||registry?.registryStatus==="CLOSED";const attribution=state.result?.attribution;const provider=attribution?registryProviderName(attribution,locale):null;return jsxs("div",{"aria-live":"polite",children:[state.checking&&jsx("p",{className,children:labels.checking}),registry&&jsxs(Fragment,{children:[jsx("p",{className,children:labels.registeredName.replace("{name}",registry.name)}),inactive&&jsx("p",{className,children:labels.inactive}),provider&&jsx("p",{className,children:labels.source.replace("{provider}",provider)})]})]})}import{jsx as jsx2,jsxs as jsxs2}from"react/jsx-runtime";function flagOf(code){return String.fromCodePoint(...[...code].map(ch=>127462+ch.charCodeAt(0)-65))}function FormTaxIdField({field,inputId,describedBy,invalid,value,labels,siteCountry,controlClassName,lookup,onRegistryName,onChange,onFocus,onBlur}){const{ui,locale}=useSiteLabels();const allowed=useMemo(()=>taxIdCountriesOf(field),[field]);const fallbackCountry=useMemo(()=>resolveTaxIdCountry(field,siteCountry),[field,siteCountry]);const current=isFormTaxIdAnswer(value)?value:null;const countryCode=current?.countryCode&&allowed.includes(current.countryCode)?current.countryCode:fallbackCountry;const text=current?.value??"";const state=useTaxIdLookup({country:countryCode,value:text,lookup,onRegistryResolved:result=>{if(result?.registry&&!result.registry.nameHasPrivateUse)onRegistryName?.(result.registry.name)}});const items=useMemo(()=>{const collator=new Intl.Collator(locale||void 0);return allowed.map(code=>({value:code,label:getCountryDisplayName(code,locale),leading:jsx2("span",{"aria-hidden":true,children:flagOf(code)}),keywords:[code]})).sort((a,b)=>collator.compare(a.label,b.label))},[allowed,locale]);const pinned=useMemo(()=>[...new Set([fallbackCountry,siteCountry?.toUpperCase()??""].filter(code=>code&&allowed.includes(code)))],[fallbackCountry,siteCountry,allowed]);const pickerLabels=useMemo(()=>({title:labels.addressCountry,search:ui.countrySearch,noMatch:ui.countryNoMatch,pinned:ui.countryGroupCommon,all:ui.countryGroupAll}),[labels.addressCountry,ui.countrySearch,ui.countryNoMatch,ui.countryGroupCommon,ui.countryGroupAll]);const update=patch=>onChange({countryCode,value:text,...patch});const handleGroupBlur=e=>{if(e.relatedTarget&&e.currentTarget.contains(e.relatedTarget))return;onBlur()};return jsxs2("div",{role:"group","aria-describedby":describedBy,className:"space-y-3",onFocus,onBlur:handleGroupBlur,children:[allowed.length>1&&jsx2(SearchablePicker,{items,value:countryCode||null,onChange:next=>update({countryCode:next}),labels:pickerLabels,pinnedValues:pinned,error:invalid&&!countryCode,triggerAriaLabel:countryCode?`${labels.addressCountry}: ${getCountryDisplayName(countryCode,locale)}`:labels.addressCountry,triggerClassName:cn("w-full justify-between",controlClassName),trigger:countryCode?jsxs2("span",{className:"flex min-w-0 items-center gap-2",children:[jsx2("span",{"aria-hidden":true,children:flagOf(countryCode)}),jsx2("span",{className:"truncate",children:getCountryDisplayName(countryCode,locale)})]}):jsx2("span",{className:"truncate text-zinc-400",children:ui.selectCountry})}),jsxs2("div",{children:[jsx2(Input,{id:inputId,type:"text",...state.inputProps,"aria-invalid":invalid||void 0,"aria-busy":state.checking||void 0,className:cn("h-11 w-full",controlClassName,invalid&&FORM_FIELD_INVALID_CLASS),value:text,onChange:e=>update({value:e.target.value})}),jsx2(TaxIdRegistryHint,{state,locale,className:cn("mt-1.5 text-xs",FORM_FG_MUTED),labels:{checking:labels.taxIdChecking,registeredName:labels.taxIdRegisteredName,inactive:labels.taxIdInactive,source:labels.taxIdSource}})]})]})}export{FormTaxIdField};
2
+ //# sourceMappingURL=FormTaxIdField-XJSMW3II.js.map
@@ -0,0 +1,2 @@
1
+ "use client";import{a as c,b as d}from"./chunk-RTF2NUMK.js";import"./chunk-ARU5PTJV.js";import"./chunk-KW2CH7SS.js";import"./chunk-WJPCDZSL.js";import"./chunk-2J5XQK4H.js";import"./chunk-IDY2ZCXL.js";import"./chunk-GWUOOGNK.js";import"./chunk-CMYBXWO5.js";import"./chunk-QYTK2CW3.js";import"./chunk-MXGMJAWS.js";import"./chunk-BKNL7ZCI.js";import"./chunk-WP7UEAIB.js";import"./chunk-VYSRVTYI.js";import"./chunk-2LOQXVFI.js";import"./chunk-2E6RCDAA.js";import"./chunk-U7KVGD47.js";import"./chunk-ET57PWXC.js";import"./chunk-S2NFWI7C.js";import"./chunk-AFNEGNVJ.js";import"./chunk-OU4IOHLN.js";import{a,b}from"./chunk-DLJDYXKL.js";import"./chunk-OTK4YNSG.js";import"./chunk-H2XQYT62.js";import"./chunk-NSY72ZYX.js";import"./chunk-6LGTFWQS.js";import"./chunk-CDG7S4P5.js";export{d as KanorioAccount,a as LOGIN_EVENT,b as LOGOUT_EVENT,c as createBearerCustomerAuthTransport};
2
+ //# sourceMappingURL=KanorioAccount-GXRAMZCI.js.map
@@ -0,0 +1,2 @@
1
+ "use client";import{KanorioAccount,createBearerCustomerAuthTransport}from"./chunk-G5673RJK.js";import"./chunk-4OC7BRQS.js";import"./chunk-AQ6F6MIJ.js";import"./chunk-63XJWMJG.js";import"./chunk-R5M6FXXQ.js";import"./chunk-E77WGXYW.js";import"./chunk-C7HUM2EN.js";import{LOGIN_EVENT,LOGOUT_EVENT}from"./chunk-LWKCGUHS.js";import"./chunk-TEUQV3AT.js";import"./chunk-KYXZNMNA.js";import"./chunk-RKEHHJDU.js";import"./chunk-JH5D6YJX.js";import"./chunk-Z4A5NQWJ.js";import"./chunk-HFYLTH5B.js";import"./chunk-33AQQY6T.js";import"./chunk-VUTODQFX.js";import"./chunk-QRKYFFDH.js";import"./chunk-KNNN5V3T.js";import"./chunk-763LNERD.js";import"./chunk-U7H3W23Q.js";import"./chunk-RI64PHGM.js";import"./chunk-Q4APVE7S.js";import"./chunk-CU2JJTXI.js";import"./chunk-3ZTUZPSD.js";export{KanorioAccount,LOGIN_EVENT,LOGOUT_EVENT,createBearerCustomerAuthTransport};
2
+ //# sourceMappingURL=KanorioAccount-P6IIPIZ2.js.map
@@ -0,0 +1,2 @@
1
+ "use client";import{KanorioAnalytics,isExcludedPath,reportKanorioPageview}from"./chunk-WKKPZXK3.js";import"./chunk-RI64PHGM.js";import"./chunk-Q4APVE7S.js";import"./chunk-CU2JJTXI.js";import"./chunk-3ZTUZPSD.js";export{KanorioAnalytics,isExcludedPath,reportKanorioPageview};
2
+ //# sourceMappingURL=KanorioAnalytics-KYTK3T2L.js.map
@@ -0,0 +1,2 @@
1
+ "use client";import{s as p}from"./chunk-CMYBXWO5.js";import"./chunk-QYTK2CW3.js";import"./chunk-BKNL7ZCI.js";import"./chunk-OU4IOHLN.js";import{a as N}from"./chunk-6LGTFWQS.js";import{c as b}from"./chunk-CDG7S4P5.js";var i=b(N(),1);function _(e){return(typeof e=="string"?e.split(","):e??[]).map(t=>t.trim().replace(/\/+$/,"")).filter(t=>t.startsWith("/"))}function R(e,n){return _(n).some(t=>e===t||e.startsWith(`${t}/`))}var w=1800*1e3,g="kanorio-analytics-last",P=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gclid","fbclid","oppref"],U=200,f=null;function I(e=Date.now()){try{let n=window.sessionStorage.getItem(g),t=n?Number(n):NaN;return window.sessionStorage.setItem(g,String(e)),!Number.isFinite(t)||e-t>w}catch{let n=f===null||e-f>w;return f=e,n}}function L(){if(!(typeof document>"u"||!document.referrer))try{return new URL(document.referrer).hostname.toLowerCase()===window.location.hostname.toLowerCase()?void 0:document.referrer}catch{return}}function H(e){if(e)try{let n=new URLSearchParams(e),t={};for(let r of P){let o=n.get(r)?.trim();o&&(t[r]=o.slice(0,U))}return Object.keys(t).length>0?t:void 0}catch{return}}function O(e){let n=e.siteUrl.replace(/\/+$/,""),t=e.path.startsWith("/")?e.path:`/${e.path}`,r=`${n}/api/v1/analytics/pageview`,o=JSON.stringify({path:t,...e.title?{title:e.title}:{},...e.referrer?{referrer:e.referrer}:{},...e.entry!==void 0?{entry:e.entry}:{},...e.utm?{utm:e.utm}:{}});if(!e.fetch&&typeof navigator<"u"&&typeof navigator.sendBeacon=="function")try{if(navigator.sendBeacon(r,new Blob([o],{type:"text/plain;charset=UTF-8"})))return Promise.resolve(!0)}catch{}return(e.fetch??globalThis.fetch)(r,{method:"POST",headers:{"Content-Type":"text/plain;charset=UTF-8"},body:o,keepalive:!0}).then(s=>s.ok).catch(()=>!1)}var l="kanorio:navigation",v=!1;function x(){if(!(v||typeof window>"u"||typeof window.history>"u")){v=!0;for(let e of["pushState","replaceState"]){let n=window.history[e];typeof n=="function"&&(window.history[e]=function(...r){let o=n.apply(this,r);return window.dispatchEvent(new Event(l)),o})}}}function k({siteUrl:e,path:n,title:t,referrer:r,exclude:o}){let a=p(e),s=(0,i.useRef)(null),y=(0,i.useRef)(!1),d=(0,i.useRef)({title:t,referrer:r,exclude:o});return d.current={title:t,referrer:r,exclude:o},(0,i.useEffect)(()=>{if(typeof window>"u")return;x();let S=u=>{if(!u||s.current===u||(s.current=u,R(u,d.current.exclude)))return;let E=!y.current;y.current=!0;let h=I(),{title:A,referrer:T}=d.current,m=()=>{O({siteUrl:a,path:u,title:A??(typeof document<"u"?document.title:void 0),referrer:T??(E&&h?L():void 0),entry:h,utm:H(window.location.search)})};typeof window.requestAnimationFrame=="function"?window.requestAnimationFrame(m):setTimeout(m,0)},c=()=>S(n??window.location.pathname);return c(),window.addEventListener("popstate",c),window.addEventListener(l,c),()=>{window.removeEventListener("popstate",c),window.removeEventListener(l,c)}},[a,n]),null}export{k as KanorioAnalytics,R as isExcludedPath,O as reportKanorioPageview};
2
+ //# sourceMappingURL=KanorioAnalytics-XHKBWYTS.js.map
@@ -0,0 +1,2 @@
1
+ "use client";import{KanorioCurriculum}from"./chunk-CD7JDUB6.js";import"./chunk-5G3PQI25.js";import"./chunk-UITC3NFQ.js";import"./chunk-R5M6FXXQ.js";import"./chunk-4BEKWYEW.js";import"./chunk-OIKRLEW6.js";import"./chunk-33AQQY6T.js";import"./chunk-VUTODQFX.js";import"./chunk-QRKYFFDH.js";import"./chunk-KNNN5V3T.js";import"./chunk-763LNERD.js";import"./chunk-U7H3W23Q.js";import"./chunk-RI64PHGM.js";import"./chunk-Q4APVE7S.js";import"./chunk-CU2JJTXI.js";import"./chunk-3ZTUZPSD.js";export{KanorioCurriculum};
2
+ //# sourceMappingURL=KanorioCurriculum-3TLNLUL4.js.map
@@ -0,0 +1,2 @@
1
+ "use client";import"./chunk-IDY2ZCXL.js";import{a as A}from"./chunk-Y5JA6B5O.js";import{b as f}from"./chunk-GWUOOGNK.js";import{b as F,u as M}from"./chunk-CMYBXWO5.js";import"./chunk-QYTK2CW3.js";import"./chunk-BKNL7ZCI.js";import{a as R}from"./chunk-MWPRTK32.js";import{b as K}from"./chunk-2E6RCDAA.js";import{d as v}from"./chunk-LXNMHQFN.js";import"./chunk-6RZBXZFP.js";import"./chunk-ET57PWXC.js";import{B as T,J as $,h as E,q as L,s as O,w as U}from"./chunk-S2NFWI7C.js";import"./chunk-AFNEGNVJ.js";import{a as I}from"./chunk-OU4IOHLN.js";import{a as _}from"./chunk-6LGTFWQS.js";import{c as N}from"./chunk-CDG7S4P5.js";var m=N(_(),1);var e=N(I(),1);function G(d){return d==="video"?$:d==="audio"?U:d==="text"||d==="pdf"?O:L}function te({product:d,deliverable:k,outline:h,expandAll:C=!0,className:b,...j}){let l=M(j),[g,P]=(0,m.useState)(h??null),[q,z]=(0,m.useState)(!1),[a,w]=(0,m.useState)(null),[D,B]=(0,m.useState)(new Set);(0,m.useEffect)(()=>{if(h){P(h);return}let t=!1,s=F({siteUrl:l.siteUrl}),n=o=>s.get("/products/{slug}",{params:{slug:d},query:o?{locale:o}:{}});return n(l.locale).catch(o=>{if(o.code==="UNSUPPORTED_LOCALE")return n();throw o}).then(o=>{t||P(o.product.deliverables??[])}).catch(()=>{t||z(!0)}),()=>{t=!0}},[l.siteUrl,l.locale,d,h]);let H=async t=>{let s=await l.client.openUnit(t,"read");s.ok?w({unitId:t,url:s.url,mimeType:s.mimeType,title:s.title,hls:s.renditions?.find(n=>n.kind==="hls")?.url,thumbnails:s.thumbnails??s.renditions?.find(n=>n.kind==="thumbnails")?.url,captions:s.renditions?.flatMap(n=>n.kind==="captions"&&n.locale?[{locale:n.locale,url:n.url,source:n.source??"ai",edited:n.edited??!1}]:[]),chapters:s.renditions?.find(n=>n.kind==="chapters")?.url,poster:s.poster??void 0,partial:s.streaming==="partial"}):w({unitId:t,error:s.code})};if(!l.messages)return(0,e.jsx)(f,{context:l,className:b,loading:!0});let c=l.messages.account;if(q)return(0,e.jsx)(f,{context:l,className:b,children:(0,e.jsx)("p",{role:"alert",className:"text-sm text-(--site-fg-muted,#71717a)",children:c.contentLoadError})});if(!g)return(0,e.jsx)(f,{context:l,className:b,loading:!0,children:(0,e.jsx)("div",{className:"h-40 w-full animate-pulse rounded-(--media-radius,12px) bg-(--media-surface)"})});let S=k?g.filter(t=>t.id===k):g;return S.length===0?(0,e.jsx)(f,{context:l,className:b,children:(0,e.jsx)("p",{className:"text-sm text-(--site-fg-muted,#71717a)",children:c.contentNoUnits})}):(0,e.jsx)(f,{context:l,className:b,children:S.map(t=>{let s=t.units.filter(i=>i.parentId===null&&(i.kind==="chapter"||t.units.some(p=>p.parentId===i.id))),n=t.units.filter(i=>i.parentId===null&&!s.includes(i)),o=[...n.length?[{id:`${t.id}:loose`,title:null,units:n}]:[],...s.map(i=>({id:i.id,title:i.title,units:t.units.filter(p=>p.parentId===i.id).sort((p,x)=>p.order-x.order)}))];return(0,e.jsxs)("section",{className:"space-y-3",children:[(0,e.jsxs)("header",{className:"flex flex-wrap items-baseline justify-between gap-2",children:[(0,e.jsx)("h3",{className:"text-lg font-semibold text-(--site-fg,#18181b)",children:t.title}),(0,e.jsxs)("p",{className:"text-sm text-(--site-fg-muted,#71717a)",children:[K(c.contentUnitsCount,{count:String(t.unitCount)}),t.totalDurationSeconds?` \xB7 ${v(t.totalDurationSeconds)}`:""]})]}),t.authors&&t.authors.length>0&&(0,e.jsx)(R,{authors:t.authors}),(0,e.jsx)("ol",{className:"divide-y divide-(--site-border,rgba(0,0,0,0.1)) overflow-hidden rounded-(--media-radius,12px) border border-(--site-border,rgba(0,0,0,0.1))",children:o.map((i,p)=>{let x=D.has(i.id)||!C&&p>0&&!D.has(`open:${i.id}`);return(0,e.jsxs)("li",{children:[i.title!==null&&(0,e.jsxs)("button",{type:"button",onClick:()=>B(r=>{let u=new Set(r);return C?u.has(i.id)?u.delete(i.id):u.add(i.id):u.has(`open:${i.id}`)?u.delete(`open:${i.id}`):u.add(`open:${i.id}`),u}),"aria-expanded":!x,className:"flex w-full items-center justify-between gap-3 bg-(--media-surface) px-4 py-3 text-left text-sm font-medium text-(--site-fg,#18181b)",children:[(0,e.jsx)("span",{children:i.title}),(0,e.jsx)(E,{className:`h-4 w-4 transition-transform ${x?"":"rotate-180"}`,"aria-hidden":"true"})]}),!x&&(0,e.jsx)("ul",{children:i.units.map(r=>{let u=G(r.kind),y=a&&a.unitId===r.id;return(0,e.jsxs)("li",{className:"border-t border-(--site-border,rgba(0,0,0,0.06)) first:border-t-0",children:[(0,e.jsxs)("div",{className:"flex items-center gap-3 px-4 py-3 text-sm",children:[(0,e.jsx)(u,{className:"h-4 w-4 shrink-0 text-(--site-fg-muted,#71717a)","aria-hidden":"true"}),(0,e.jsx)("span",{className:"min-w-0 flex-1 truncate text-(--site-fg,#18181b)",children:r.title??r.kind}),r.countsTowardCompletion===!1?(0,e.jsx)("span",{className:"text-xs text-(--site-fg-muted,#71717a)",children:c.contentOptional}):null,r.duration?(0,e.jsx)("span",{className:"text-xs tabular-nums text-(--site-fg-muted,#71717a)",children:v(r.duration)}):null,r.pageCount?(0,e.jsxs)("span",{className:"text-xs tabular-nums text-(--site-fg-muted,#71717a)",children:[r.pageCount," p"]}):null,r.isPreview&&!(r.releaseAt&&new Date(r.releaseAt)>new Date)?(0,e.jsx)("button",{type:"button",onClick:()=>y?w(null):H(r.id),className:"rounded-full bg-(--brand-color,#18181b) px-2.5 py-1 text-xs font-medium text-(--brand-foreground,#ffffff)",children:c.contentPreviewBadge}):(0,e.jsx)(T,{className:"h-3.5 w-3.5 shrink-0 text-(--site-fg-muted,#71717a)","aria-label":c.contentLocked})]}),y&&a&&"url"in a&&(0,e.jsx)("div",{className:"px-4 pb-4",children:(0,e.jsx)(A,{src:a.url,hlsSrc:a.hls,thumbnails:a.thumbnails,captions:a.captions?.length?a.captions:void 0,chapters:a.chapters,streamingPartial:a.partial,thumbnailUrl:a.poster,mimeType:a.mimeType??"video/mp4",title:a.title??void 0,storageKey:`preview:${r.id}`})}),y&&a&&"error"in a&&(0,e.jsx)("p",{role:"alert",className:"px-4 pb-3 text-xs text-(--site-fg-muted,#71717a)",children:c.contentLoadError})]},r.id)})})]},i.id)})})]},t.id)})})}export{te as KanorioCurriculum};
2
+ //# sourceMappingURL=KanorioCurriculum-SQ4S3U5T.js.map
@@ -0,0 +1,2 @@
1
+ "use client";import{c as Ho,d as Ko}from"./chunk-RNRIZCZS.js";import{a as ye,b as ne,c as be,d as Bo,f as ie,g as At,i as Vo}from"./chunk-N4BGAMWD.js";import{a as W,b as Lo,c as Eo,d as ko,e as Mo,f as Uo,g as Rt,j as No,k as Oo,l as Do}from"./chunk-VGQ2N7JH.js";import{a as _o,b as So,e as Re,f as Ro,g as Ao,i as Io}from"./chunk-2H3LTDAA.js";import{a as Ct,b as wt,c as ge,d as To,e as Tt,f as _t,g as St,h as he,i as re}from"./chunk-WJPCDZSL.js";import{a as wo,b as Se}from"./chunk-GWUOOGNK.js";import{e as po,h as fo,j as go,l as ho,m as yo,n as bo,o as Fo,p as xt,q as Po,r as vo,s as xo,t as Co}from"./chunk-CMYBXWO5.js";import"./chunk-QYTK2CW3.js";import"./chunk-BKNL7ZCI.js";import"./chunk-D7K3YCBR.js";import{a as fe}from"./chunk-WP7UEAIB.js";import{a as Pt,b as _e,c as vt}from"./chunk-VYSRVTYI.js";import{c as lo,d as co,g as uo,i as mo}from"./chunk-2LOQXVFI.js";import{a as ao}from"./chunk-3NXF6SCJ.js";import"./chunk-2E6RCDAA.js";import"./chunk-UM74DXPE.js";import{a as bt,b as Ft}from"./chunk-LXNMHQFN.js";import"./chunk-6RZBXZFP.js";import{c as yt}from"./chunk-ET57PWXC.js";import{A as ro,S as no,T as io,ba as P,l as to,x as oo}from"./chunk-S2NFWI7C.js";import{c as so}from"./chunk-AFNEGNVJ.js";import{a as B}from"./chunk-OU4IOHLN.js";import{c as Ge}from"./chunk-DLJDYXKL.js";import"./chunk-OTK4YNSG.js";import"./chunk-H2XQYT62.js";import"./chunk-NSY72ZYX.js";import{a as j}from"./chunk-6LGTFWQS.js";import{c as S}from"./chunk-CDG7S4P5.js";var X=S(j(),1);var It=[1e3,3e3,1e4];function Nr(t){let e=t?JSON.stringify(t):null;return(0,X.useMemo)(()=>t??null,[e])}function Ye(t,e,o,n){let a=Co(t,{needsSite:!0}),{site:u,siteError:m,siteUrl:c}=a,F=Nr(o),[_,g]=(0,X.useState)(null),y=!u&&m,[b,f]=(0,X.useState)({siteUrl:c,count:0}),h=b.siteUrl===c?b.count:0;(0,X.useEffect)(()=>{if(!y)return;let v=It[h];if(v===void 0)return;let I=setTimeout(()=>{Fo(c).then(V=>{V===null&&f({siteUrl:c,count:h+1})})},v);return()=>clearTimeout(I)},[y,c,h]),(0,X.useEffect)(()=>{if(F||!e)return;let v=!1;return fetch(`${c}/api/v1/forms/${encodeURIComponent(e)}`).then(I=>I.ok?I.json():Promise.reject(new Error(`HTTP ${I.status}`))).then(I=>{if(v)return;let V=I&&typeof I=="object"&&"fields"in I?I:I?.form??null;g({siteUrl:c,formId:e,form:V??null})}).catch(()=>{v||g({siteUrl:c,formId:e,form:null})}),()=>{v=!0}},[c,e,F]);let C=_!==null&&_.siteUrl===c&&_.formId===e?_:null,E=F??C?.form??null,s=a.messages?.form,O=(0,X.useMemo)(()=>s||n?{...s??{},...n??{}}:void 0,[s,n]);return{ctx:a,form:E,loadFailed:!F&&C!==null&&C.form===null,siteUnavailable:!!y&&h>=It.length,textUnavailable:a.messages===null&&a.messagesError,mergedLabels:O,ready:!!(E&&a.messages&&u)}}var ar=S(j());var $o=S(j());var se=S(B());function Lt({type:t,className:e,...o}){let n=(0,$o.useRef)(null);return _e(n,o.onChange),(0,se.jsxs)("span",{className:P("relative inline-grid h-[18px] w-[18px] shrink-0 place-items-center",e),children:[(0,se.jsx)("input",{ref:n,type:t,className:P("peer col-start-1 row-start-1 m-0 h-[18px] w-[18px] cursor-pointer appearance-none border-2 transition-colors","bg-transparent "+mo,"checked:border-[var(--site-cta-brand-bg,var(--brand-color,#FF5733))] checked:bg-[var(--site-cta-brand-bg,var(--brand-color,#FF5733))]","focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--site-accent-text,var(--brand-text,var(--brand-color,#FF5733)))]","disabled:cursor-not-allowed disabled:opacity-50",t==="radio"?"rounded-full":"rounded-[4px]"),...o}),t==="checkbox"?(0,se.jsx)("svg",{"aria-hidden":!0,viewBox:"0 0 16 16",fill:"none",className:"pointer-events-none col-start-1 row-start-1 h-3.5 w-3.5 text-[var(--site-cta-brand-fg,var(--brand-foreground,#ffffff))] opacity-0 peer-checked:opacity-100 peer-disabled:peer-checked:opacity-50",children:(0,se.jsx)("path",{d:"M3.5 8.5l3 3 6-6.5",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round"})}):(0,se.jsx)("span",{"aria-hidden":!0,className:"pointer-events-none col-start-1 row-start-1 h-2 w-2 rounded-full bg-[var(--site-cta-brand-fg,var(--brand-foreground,#ffffff))] opacity-0 peer-checked:opacity-100 peer-disabled:peer-checked:opacity-50"})]})}var ze={mobile:1,tablet:2,desktop:2};var Or={1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6"},Dr={1:"sm:grid-cols-1",2:"sm:grid-cols-2",3:"sm:grid-cols-3",4:"sm:grid-cols-4",5:"sm:grid-cols-5",6:"sm:grid-cols-6"},Br={1:"md:grid-cols-1",2:"md:grid-cols-2",3:"md:grid-cols-3",4:"md:grid-cols-4",5:"md:grid-cols-5",6:"md:grid-cols-6"};function qo(t){return Math.max(1,Math.min(6,Math.round(t)))}function Wo(t,e){let o=m=>{let c=qo(m);return e==null?c:qo(Math.min(c,Math.max(1,e)))},n=o(t?.mobile??ze.mobile),a=o(t?.tablet??ze.tablet),u=o(t?.desktop??ze.desktop);return`${Or[n]} ${Dr[a]} ${Br[u]}`}var Et=S(j()),Go=(0,Et.createContext)(null),je=(0,Et.createContext)("");var Yo=S(j());var Ie=S(B());function Ae({failed:t,props:e}){let o=(0,Yo.useContext)(je),{inputId:n}=e;return(0,Ie.jsxs)("div",{children:[(0,Ie.jsx)("div",{id:n,tabIndex:n?-1:void 0,className:P("h-11 w-full",ie),"aria-busy":t?void 0:"true","data-field-unavailable":t?"":void 0}),t&&o&&(0,Ie.jsx)("p",{role:"alert",className:P("mt-1.5 text-xs",be),children:o})]})}var zo={PhoneInput:fe(()=>import("./phone-input-PXLNDXAB.js").then(t=>t.PhoneInput),Ae),FormAddressField:fe(()=>import("./FormAddressField-Z5XT2ELO.js").then(t=>t.FormAddressField),Ae),FormTaxIdField:fe(()=>import("./FormTaxIdField-GGBQOVZE.js").then(t=>t.FormTaxIdField),Ae),FormFileField:fe(()=>import("./FormFileField-D2XIGIML.js").then(t=>t.FormFileField),Ae),FormChoiceDropdown:fe(()=>import("./FormChoiceDropdown-SJXD26CC.js").then(t=>t.FormChoiceDropdown),Ae)};var kt="kanorio:form-event";var i=S(j());var Vr={date:{dateStyle:"medium"},dateLong:{dateStyle:"long"},dateTime:{dateStyle:"medium",timeStyle:"short"},dateTimeFull:{dateStyle:"full",timeStyle:"short"},time:{timeStyle:"short"},monthDay:{month:"short",day:"numeric"},monthDayTime:{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"},monthYear:{year:"numeric",month:"long"},dateWithZone:{year:"numeric",month:"long",day:"numeric",timeZoneName:"short"}},Hr=/^\d{4}-\d{2}-\d{2}$/;function Kr(t){return typeof t=="string"&&Hr.test(t)}function $r(t){if(t==null||t==="")return null;let e=t instanceof Date?t:new Date(t);return Number.isNaN(e.getTime())?null:e}function jo(t,e="date",o){if(!Kr(t))return Ft;let n=new Date(`${t}T00:00:00Z`);return Number.isNaN(n.getTime())?Ft:bt(o.locale,{...Vr[e],timeZone:"UTC"}).format(n)}function Zo(t,e){let o=$r(t);return o?bt("en-CA",{year:"numeric",month:"2-digit",day:"2-digit",timeZone:e}).format(o):""}var qr=6e4,Wr=60*qr,kn=24*Wr;var ae={...No},Mt=new Map,Xo={phone:()=>import("./forms-answers-phone-5PUB5WKD.js").then(t=>{ae.phone=t.validatePhoneAnswer}),address:()=>import("./forms-answers-address-BGBI445K.js").then(t=>{ae.address=t.validateAddressAnswer}),tax_id:()=>import("./forms-answers-tax-id-LSWOEHJ4.js").then(t=>{ae.tax_id=t.validateTaxIdAnswer})};function Jo(t){return Object.hasOwn(Xo,t)}function Ze(){return ae}function Ut(t){return!Jo(t)||ae[t]!==null}function Qo(t){for(let e of t)if(!Ut(e))return!1;return!0}function Nt(t){let e=[];for(let o of new Set(t)){if(!Jo(o)||ae[o])continue;let n=Mt.get(o);n||(n=Xo[o]().finally(()=>Mt.delete(o)),Mt.set(o,n)),e.push(n)}return Promise.all(e).then(()=>ae)}var er=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gclid","fbclid","oppref"],Gr=200,Yr=/[^\p{L}\p{N} _\-./:+%()&=|]/gu;function Ot(t){let e={};for(let o of er){let n=t(o);if(typeof n!="string"||!n)continue;let a=ao(n.replace(Yr,"").trim(),Gr);a&&(e[o]=a)}return Object.keys(e).length>0?e:null}var zr=/^[a-z0-9]([a-z0-9.-]{0,251}[a-z0-9])?$/,jr=500;function Zr(t){if(typeof t!="string")return;let e=t.trim().toLowerCase();return zr.test(e)?e:void 0}function Xr(t){if(typeof t!="string")return;let e=t.trim().split(/[?#]/)[0]??"";if(!(!e.startsWith("/")||e.startsWith("//")||/[\s\\\0]/.test(e)))return e.slice(0,jr)}function Dt(t){if(!t||typeof t!="object"||Array.isArray(t))return null;let e=t,o=e.utm&&typeof e.utm=="object"&&!Array.isArray(e.utm)?e.utm:{},n=Ot(c=>o[c]),a=Zr(e.referrerHost),u=Xr(e.landingPath),m={};return n&&(m.utm=n),a&&(m.referrerHost=a),u&&(m.landingPath=u),Object.keys(m).length>0?m:null}function tr(t){let e=null;try{let n=new URLSearchParams(t.search??"");e=Ot(a=>n.get(a))}catch{e=null}let o;try{o=t.referrer?new URL(t.referrer).hostname:void 0}catch{o=void 0}return Dt({utm:e??void 0,referrerHost:o,landingPath:t.path??void 0})}var Jr="kano-session-attribution";function Qr(){if(typeof window>"u")return null;try{let t=window.sessionStorage.getItem(Jr);return t?Dt(JSON.parse(t)):null}catch{return null}}function or(){if(typeof window>"u")return null;let t=Qr();if(t)return t;let e=null;try{e=document.referrer&&new URL(document.referrer).hostname.toLowerCase()!==window.location.hostname.toLowerCase()?document.referrer:null}catch{e=null}return tr({search:window.location.search,referrer:e,path:window.location.pathname})}var en=4e3,tn={submit:"Submit",submitting:"Submitting\u2026",success:"Thanks! We\u2019ll be in touch soon.",error:"Something went wrong. Please try again.",required:"This field is required.",invalidEmail:"Please enter a valid email address.",invalidPhone:"Please enter a valid phone number.",invalidDate:"Please enter a valid date.",invalidTime:"Please enter a valid time.",tooLong:"This answer is too long.",otherRequired:"Please specify your answer.",duplicate:"This email or phone number has already been used. Only one response per person is allowed.",temporarilyUnavailable:"This form isn\u2019t accepting responses right now. Please try again later.",rateLimited:"Too many submissions. Please wait a moment and try again.",verificationExpired:"Verification expired. Please verify again and resubmit.",outdated:"This form has changed since you opened it. Please refresh the page and submit again.",edgeChallenge:"Your browser didn\u2019t pass this site\u2019s security check. Please reload the page and submit again.",tooLarge:"Your answers are too long to send. Please shorten them and try again.",redirecting:"Taking you to the next page\u2026",invalid:"Please check this answer.",tooShort:"Please enter at least {min} characters.",invalidNumber:"Please enter a number.",notInteger:"Please enter a whole number.",numberMin:"Please enter {min} or more.",numberMax:"Please enter {max} or less.",numberRange:"Please enter a number from {min} to {max}.",invalidUrl:"Please enter a web address, such as example.com.",dateMin:"Please choose {min} or later.",dateMax:"Please choose {max} or earlier.",dateRange:"Please choose a date from {min} to {max}.",tooFewOptions:"Please select {min} or more.",tooManyOptions:"Please select no more than {max}.",selectPlaceholder:"Select an option",invalidAddress:"Please complete the address.",invalidTaxId:"Please check this tax ID.",taxIdChecking:"Looking up the public registry\u2026",taxIdRegisteredName:"Registered name: {name}",taxIdInactive:"The registry shows this business as suspended or closed. Please check the tax ID.",taxIdSource:"Source: {provider}",invalidPostalCode:"Please check the postal code.",addressCountry:"Country or region",addressRecipient:"Recipient name",addressLine1:"Address",addressLine2:"Apartment, suite, etc. (optional)",addressPostal_postal:"Postal code",addressPostal_zip:"ZIP code",addressPostal_pin:"PIN code",addressPostal_eircode:"Eircode",addressLocality_city:"City",addressLocality_district:"District",addressLocality_post_town:"Town or city",addressLocality_suburb:"Suburb",addressRegion_area:"Area",addressRegion_county:"County",addressRegion_department:"Department",addressRegion_district:"District",addressRegion_do_si:"Province or city",addressRegion_emirate:"Emirate",addressRegion_island:"Island",addressRegion_oblast:"Oblast",addressRegion_parish:"Parish",addressRegion_prefecture:"Prefecture",addressRegion_province:"Province",addressRegion_state:"State",marketingOptIn:"I\u2019d like to receive news and offers from {siteName} by email. I can unsubscribe from any email with one click.",subscribeOnSubmit:"By clicking \u201C{button}\u201D, you agree to receive news and offers from {siteName} by email. You can unsubscribe from any email with one click.",otherOption:"Other",otherPlaceholder:"Please specify",closed:"This form is closed.",notOpenYet:"This form isn\u2019t open yet.",full:"All spots have been filled. Thank you for your interest.",fileChoose:"Choose a file",fileLimitHint:"Up to {max} file(s), {size} each.",fileWaiting:"Waiting for verification\u2026",fileUploading:"Uploading\u2026",fileUploadFailed:"Upload failed. Please try again.",fileTooLarge:"This file is too large.",fileTypeNotAllowed:"This file type isn\u2019t supported.",fileUnavailable:"Attachments can\u2019t be uploaded right now. You can still submit the form.",fileRemove:"Remove",noFormSelected:"Select a form in the panel to display it here.",formNotFound:"The selected form no longer exists.",previewNotice:"Preview only \u2014 submissions are disabled here."};function J(t,e){return t.replaceAll("{min}",String(e.min??"")).replaceAll("{max}",String(e.max??""))}function on(t,e,{labels:o,today:n,locale:a}){switch(t){case"invalid_email":return o.invalidEmail;case"invalid_phone":return o.invalidPhone;case"invalid_date":return o.invalidDate;case"invalid_time":return o.invalidTime;case"too_long":return o.tooLong;case"too_short":return(e.type==="short_text"||e.type==="long_text")&&e.minLength!==void 0?J(o.tooShort,{min:e.minLength}):o.invalid;case"invalid_format":return e.type==="short_text"&&e.patternMessage?e.patternMessage:o.invalid;case"other_required":return o.otherRequired;case"too_few_options":return e.type==="choice"&&e.minSelections!==void 0?J(o.tooFewOptions,{min:e.minSelections}):o.invalid;case"too_many_options":return e.type==="choice"&&e.maxSelections!==void 0?J(o.tooManyOptions,{max:e.maxSelections}):o.invalid;case"invalid_number":return o.invalidNumber;case"not_integer":return o.notInteger;case"out_of_range":{if(e.type!=="number")return o.invalid;let{min:u,max:m}=e;return u!==void 0&&m!==void 0?J(o.numberRange,{min:u,max:m}):u!==void 0?J(o.numberMin,{min:u}):m!==void 0?J(o.numberMax,{max:m}):o.invalid}case"invalid_url":return o.invalidUrl;case"date_out_of_range":{if(e.type!=="date")return o.invalid;let u=Re(e.range?.min,n),m=Re(e.range?.max,n),c=F=>jo(F,"date",{locale:a});return u&&m?J(o.dateRange,{min:c(u),max:c(m)}):u?J(o.dateMin,{min:c(u)}):m?J(o.dateMax,{max:c(m)}):o.invalid}case"invalid_address":return o.invalidAddress;case"invalid_tax_id":return o.invalidTaxId;case"invalid_postal_code":return o.invalidPostalCode;case"invalid":return o.invalid;case"required":case"invalid_option":return o.required}}function rr(t){let e=new Date;if(t)try{let n=Zo(e,t);if(n)return n}catch{}let o=n=>String(n).padStart(2,"0");return`${e.getFullYear()}-${o(e.getMonth()+1)}-${o(e.getDate())}`}function rn(t,e){switch(t){case"outdated":return e.outdated;case"edge_challenge":return e.edgeChallenge;case"duplicate":return e.duplicate;case"daily_limit":case"temporarily_unavailable":return e.temporarilyUnavailable;case"rate_limited":return e.rateLimited;case"verification_expired":return e.verificationExpired;case"too_large":return e.tooLarge;case"invalid_answers":case"server_error":return e.error}}function nn(t){return t.replace(/["\\]/g,"\\$&")}function Xe(t){typeof window>"u"||window.dispatchEvent(new CustomEvent(kt,{detail:t}))}function Je(t,e){switch(t.type){case"short_text":return{type:"text",maxLength:t.maxLength,autoComplete:t.contactMapping==="name"?"name":void 0};case"email":return{type:"email",inputMode:"email",autoComplete:"email"};case"date":return{type:"date",min:Re(t.range?.min,e)??void 0,max:Re(t.range?.max,e)??void 0};case"time":return{type:"time"};case"number":return{type:"text",inputMode:t.integer&&(t.min??-1)>=0?"numeric":"decimal",autoComplete:"off"};case"url":return{type:"url",inputMode:"url",autoComplete:"url",autoCapitalize:"none",spellCheck:!1,placeholder:"https://"};default:return null}}function Qe(t){let{form:e,submitUrl:o,challengeUrl:n,altchaChallengeUrl:a,onSuccess:u,followRedirect:m=!0,hiddenValues:c,isEditing:F=!1,labels:_,locale:g,websiteName:y,botProtectionConfig:b,botProtectionPending:f=!1}=t,h=e?.id??t.formId??"",C=(0,i.useMemo)(()=>({...tn,..._}),[_]),E=e?.fields,s=(0,i.useMemo)(()=>(E??[]).filter(r=>So(r.type)),[E]),O=e?Ro(e.settings,C,y):null,v=!!o&&!F&&e!==null,[I,V]=(0,i.useState)(null),G=I??(e?_o(e):"open"),T=G!=="open",[L,N]=(0,i.useState)({}),[k,Q]=(0,i.useState)({}),H=(0,i.useRef)(L),K=(0,i.useRef)(k),R=(0,i.useRef)(!1),U=(0,i.useCallback)(r=>{let l=r(H.current);l!==H.current&&(H.current=l,N(l))},[]),[ee,Z]=(0,i.useState)({}),[Le,oe]=(0,i.useState)({}),w=Object.values(Le).some(Boolean),M=(0,i.useRef)({}),Ee=(0,i.useCallback)(()=>Object.values(M.current).some(r=>r>0),[]),ke=e?.settings.marketingConsent??"off",[mr,pr]=(0,i.useState)(!1),fr=(0,i.useCallback)(r=>{R.current=r,pr(r)},[]),[ot,Me]=(0,i.useState)({}),[rt,de]=(0,i.useState)(null),[Fe,gr]=(0,i.useState)("idle"),nt=(0,i.useRef)("idle"),me=(0,i.useCallback)(r=>{nt.current=r,gr(r)},[]),[hr,yr]=(0,i.useState)(null),[br,Fr]=(0,i.useState)(0),[Pr,vr]=(0,i.useState)(!1),Kt=e?.settings.hiddenFields,it=(0,i.useMemo)(()=>Kt??[],[Kt]),[$t,xr]=(0,i.useState)({}),qt=JSON.stringify(it.map(r=>r.id));(0,i.useEffect)(()=>{let r=JSON.parse(qt);if(r.length===0||typeof window>"u")return;let l=new URLSearchParams(window.location.search),p={};for(let x of r){let Y=l.get(x);Y&&(p[x]=Y)}xr(p)},[qt]);let Ue=(0,i.useMemo)(()=>({...$t,...c??{}}),[$t,c]),Wt=(0,i.useMemo)(()=>ko(s),[s]),Ne=(0,i.useCallback)(r=>{if(!Wt)return s;let l=Eo(s,{...Ue,...r});return s.filter(p=>l.has(p.id))},[Wt,s,Ue]),Oe=(0,i.useMemo)(()=>Ne(L),[Ne,L]),st=(0,i.useRef)(!1),De=(0,i.useRef)(!1),Gt=(0,i.useRef)(null),[at,Cr]=(0,i.useState)(null),wr=(0,i.useCallback)(r=>{Gt.current=r,Cr(r)},[]),Yt=`form-${(0,i.useId)().replace(/[^A-Za-z0-9_-]/g,"")}-field`,lt=(0,i.useCallback)(r=>`${Yt}-${r}`,[Yt]),q=re({variant:"full",context:h,entry:"forms",needsUploadToken:s.some(r=>r.type==="file"||r.type==="tax_id"),...n?{challengeUrl:n}:{},...a?{altchaChallengeUrl:a}:{},...b!==void 0?{config:b}:{}}),ct=q.isSubmittable&&!f,Be=q.isUploadReady&&!f,Ve=v&&o?o.replace(/\/submit$/,"/upload-request"):null,He=v&&o?o.replace(/\/submit$/,"/tax-id-lookup"):null,Tr=!!He&&Be,Pe=q.getUploadProtectionData,_r=(0,i.useCallback)(async(r,l)=>{if(!He)return null;try{let p=await fetch(He,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({fieldId:r,...l,...Pe()})});if(!p.ok)return null;let x=await p.json();return!x||x.ok===!1||typeof x.status!="string"?null:{...x,ok:!0}}catch{return null}},[He,Pe]);(0,i.useEffect)(()=>{if(!v||De.current||!at)return;let r=at;if(typeof IntersectionObserver>"u"){De.current=!0,Xe({type:"form_view",formId:h});return}let l=new IntersectionObserver(p=>{p.some(x=>x.isIntersecting)&&!De.current&&(De.current=!0,Xe({type:"form_view",formId:h}),l.disconnect())},{threshold:.3});return l.observe(r),()=>l.disconnect()},[v,h,at]);let ut=(0,i.useRef)(null),zt=(0,i.useRef)({status:Fe,visibleFields:Oe,answers:L});(0,i.useEffect)(()=>{zt.current={status:Fe,visibleFields:Oe,answers:L}},[Fe,Oe,L]),(0,i.useEffect)(()=>{if(!v||typeof window>"u")return;let r=!1,l=()=>{let p=zt.current;r||!st.current||p.status==="success"||(r=!0,Xe({type:"form_abandon",formId:h,lastFieldId:ut.current,answeredCount:Lo(p.visibleFields,p.answers)}))};return window.addEventListener("pagehide",l),()=>window.removeEventListener("pagehide",l)},[v,h]);let dt=(0,i.useCallback)(()=>{q.registerFocus(),!(st.current||!v)&&(st.current=!0,Xe({type:"form_start",formId:h}))},[q,v,h]),mt=(0,i.useCallback)(r=>{ut.current=r,dt()},[dt]),te=(0,i.useCallback)(r=>{Me(l=>{if(!W(l,r))return l;let p={...l};return delete p[r],p})},[]),Sr=(0,i.useCallback)((r,l)=>{ut.current=r,U(p=>({...p,[r]:l})),te(r),de(null)},[te,U]),Rr=(0,i.useCallback)((r,l)=>{K.current={...K.current,[r]:l},Q(K.current),te(r)},[te]),[ve,Ar]=(0,i.useState)(null),Ke=e?.timezone;(0,i.useEffect)(()=>{Ar(rr(Ke))},[Ke]);let xe=(0,i.useMemo)(()=>Array.from(new Set(s.map(r=>r.type))),[s]);(0,i.useEffect)(()=>{Nt(xe).catch(()=>{})},[xe]);let[jt,Zt]=(0,i.useState)(!1),pt=(0,i.useRef)(!1),$e=(0,i.useRef)(!1),Xt=e?.defaultPhoneCountry,qe=(0,i.useMemo)(()=>({defaultPhoneCountry:Xt,fileRequired:{exempt:Object.keys(ee).filter(r=>ee[r])},today:ve}),[Xt,ee,ve]),Jt=(0,i.useMemo)(()=>({labels:C,today:ve??rr(Ke),locale:g||(typeof navigator<"u"?navigator.language:"en")}),[C,ve,Ke,g]),ft=(0,i.useCallback)(r=>{if(!Ut(r.type))return;let l=Do(Ze(),r,{answers:H.current,otherText:K.current},qe);l&&l!=="required"?Me(p=>({...p,[r.id]:l})):te(r.id)},[qe,te]),Ir=(0,i.useCallback)(r=>{let l=s.find(p=>p.id===r);l&&ft(l)},[s,ft]),gt=(0,i.useCallback)(r=>{let l=Gt.current;if(l)for(let p of s){if(!r.includes(p.id))continue;let x=l.querySelector(`[id="${nn(lt(p.id))}"]`);if(x){x.scrollIntoView?.({behavior:"smooth",block:"center"}),x.focus({preventScroll:!0});return}}},[s,lt]),Ce=(0,i.useCallback)(async r=>{if(!v||!e||nt.current!=="idle"||T||w||Ee())return;let l=H.current,p=R.current,x=Oo(r,s,{answers:{...Ue,...l},otherText:K.current},{...qe,hiddenFields:it});if(!x.ok){Me(x.errors),gt(Object.keys(x.errors));return}me("submitting"),de(null);let Y=!1;try{$e.current||await q.prepare(),Y=!0;let pe=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({answers:x.answers,...ke==="submit"?{consent:"submit_statement",consentTextId:e.consentTextId}:ke==="checkbox"&&p?{consent:"checked",consentTextId:e.consentTextId}:{},locale:typeof navigator<"u"?navigator.language:void 0,...g?{pageLocale:g}:{},pagePath:typeof window<"u"?window.location.pathname:void 0,attribution:or()??void 0,...q.getProtectionData()})});if(pe.headers.get("cf-mitigated")==="challenge"){me("idle"),de("edge_challenge"),$e.current=!1,q.renewCaptcha();return}let A=Mo(pe.status===429?{ok:!1,error:"rate_limited"}:pe.status===503?{ok:!1,error:"temporarily_unavailable"}:await pe.json().catch(()=>null));me("idle");let we=!A.ok&&A.error==="temporarily_unavailable";if($e.current=we,(A.ok?A.state:!we)&&q.renewCaptcha(),A.ok){if(A.state){V(A.state);return}me("success");let D=A.redirectUrl??Io(e.redirectUrl,{maxLength:Ao})?.url,Ur={formId:e.id,...D?{redirectUrl:D}:{},...A.submissionId?{submissionId:A.submissionId}:{}};yr({...D?{redirectUrl:D}:{},...A.submissionId?{submissionId:A.submissionId}:{}}),u?.(Ur),D&&m&&(vr(!0),window.location.assign(D));return}let $=A.error==="invalid_answers"&&A.errors?Object.keys(A.errors):[],Te=new Set(Ne(l).map(D=>D.id));de($.some(D=>!Te.has(D))?"outdated":A.error),$.length>0&&(Me(A.errors),gt($)),(A.error==="verification_expired"||A.error==="duplicate")&&Fr(D=>D+1)}catch{me("idle"),de("server_error"),Y?$e.current=!0:q.renewCaptcha()}},[v,e,me,T,w,Ee,qe,gt,s,Ne,it,Ue,m,o,ke,g,q,u]),Qt=(0,i.useRef)(Ce);(0,i.useEffect)(()=>{Qt.current=Ce},[Ce]);let Lr=(0,i.useCallback)(async r=>{if(r?.preventDefault(),!v||nt.current!=="idle"||T||w||Ee()||pt.current||!ct)return;if(Qo(xe))return Ce(Ze());pt.current=!0,Zt(!0);let l;try{await Promise.race([Nt(xe),new Promise(p=>l=setTimeout(p,en))])}catch{}finally{clearTimeout(l),pt.current=!1,Zt(!1)}await Qt.current(Ze())},[v,T,w,Ee,ct,xe,Ce]),eo=(0,i.useRef)({}),Er=(0,i.useCallback)((r,l)=>{U(p=>{let x=p[r],Y=typeof x=="string"?x:"";return Y.trim()!==""&&Y!==eo.current[r]?p:(eo.current[r]=l,{...p,[r]:l})})},[U]),ht=(0,i.useCallback)((r,l)=>{Z(p=>p[r]===l?p:{...p,[r]:l})},[]),We=(0,i.useCallback)((r,l)=>{oe(p=>p[r]===l?p:{...p,[r]:l})},[]),kr=(0,i.useCallback)(async(r,l,p={})=>{let x=s.find($=>$.id===r);if(!x||x.type!=="file")return{ok:!1,reason:"not_a_file_question"};if(mt(r),!Ve||!Be)return{ok:!1,reason:"not_ready"};let Y=W(H.current,r),pe=Array.isArray(Y)?Y.length:0,A=W(M.current,r)??0;if(pe+A>=x.maxFiles)return{ok:!1,reason:"too_many_files"};let we=Ho(x,l);if(we)return{ok:!1,reason:we};M.current={...M.current,[r]:A+1},We(r,!0);try{let $=await Ko({uploadUrl:Ve,fieldId:r,file:l,protection:Pe(),onProgress:p.onProgress,signal:p.signal});return $.ok?(U(Te=>{let D=Array.isArray(Te[r])?Te[r]:[];return{...Te,[r]:[...D,$.uploadId]}}),te(r),de(null)):$.reason==="unavailable"&&ht(r,!0),$}finally{let $=Math.max(0,(W(M.current,r)??1)-1);M.current={...M.current,[r]:$},$===0&&We(r,!1)}},[s,Ve,Be,mt,We,Pe,U,te,ht]),Mr=(0,i.useCallback)(r=>{let l=W(ot,r);if(!l)return;let p=s.find(x=>x.id===r);return p?on(l,p,Jt):C.invalid},[ot,s,Jt,C.invalid]);return{form:e,formId:h,labels:C,fields:s,visibleFields:Oe,canSubmit:v,availability:G,isClosed:T,status:Fe,preparing:jt,redirecting:Pr,result:hr,successMessage:e?.settings.successMessage||C.success,answers:L,setAnswer:Sr,otherText:k,setOtherAnswer:Rr,errors:ot,errorMessage:Mr,validateField:Ir,validateOne:ft,submitError:rt,submitErrorMessage:rt?rn(rt,C):null,consentMode:ke,consentLabel:O,marketingOptIn:mr,setMarketingOptIn:fr,protection:q,altchaKey:br,today:ve,inputIdOf:lt,setRoot:wr,markStarted:dt,focusField:mt,handleSubmit:Lr,submitDisabled:!v||Fe==="submitting"||jt||!ct||w,uploadUrl:Ve,uploadReady:Be,getUploadProtectionData:Pe,setUploadUnavailable:ht,setUploadBusy:We,uploadFile:kr,lookupTaxId:Tr?_r:null,fillCompanyName:Er,phoneCountryOf:r=>r.type==="phone"?Uo(r,e?.defaultPhoneCountry):null,siteCountry:e?.defaultPhoneCountry??null}}var Bt=S(j());var Vt=S(B()),nr=(0,Bt.forwardRef)(function({onKeyDown:e,onCompositionStart:o,onCompositionEnd:n,...a},u){let m=Pt({onKeyDown:e,onCompositionStart:o,onCompositionEnd:n}),{ref:c,setRef:F}=vt(u);return _e(c,a.onChange),(0,Vt.jsx)("input",{...m.props,...a,ref:F})}),ir=(0,Bt.forwardRef)(function({onKeyDown:e,onCompositionStart:o,onCompositionEnd:n,...a},u){let m=Pt({onKeyDown:e,onCompositionStart:o,onCompositionEnd:n}),{ref:c,setRef:F}=vt(u);return _e(c,a.onChange),(0,Vt.jsx)("textarea",{...m.props,...a,ref:F})});var d=S(B());function sn(t){return t.type==="long_text"||t.type==="file"||t.type==="statement"||t.type==="address"}function et(t){return e=>{e.relatedTarget&&e.currentTarget.contains(e.relatedTarget)||t()}}var lr=P("w-full py-2.5",ie);function cr({form:t,maxColumns:e,submitUrl:o,challengeUrl:n,altchaChallengeUrl:a,onSuccess:u,followRedirect:m=!0,hiddenValues:c,isEditing:F=!1,labels:_,locale:g,websiteName:y,captchaTheme:b}){let f=Qe({form:t,submitUrl:o,challengeUrl:n,altchaChallengeUrl:a,onSuccess:u,followRedirect:m,hiddenValues:c,isEditing:F,labels:_,locale:g,websiteName:y}),{labels:h,visibleFields:C,availability:E,isClosed:s,status:O,preparing:v,redirecting:I,answers:V,otherText:G,consentMode:T,consentLabel:L,marketingOptIn:N,setMarketingOptIn:k,protection:Q,altchaKey:H,today:K,submitError:R,submitErrorMessage:U,uploadUrl:ee,lookupTaxId:Z}=f,Le=Wo(e,C.length),oe=F&&o===void 0;return(0,d.jsx)(je.Provider,{value:h.error,children:(0,d.jsx)("div",{ref:f.setRoot,className:"w-full min-w-0",children:s?(0,d.jsx)("p",{className:P("rounded-lg px-4 py-6 text-center text-sm",co,ne),children:E==="not_open"?h.notOpenYet:E==="full"?h.full:h.closed}):O==="success"?(0,d.jsxs)("div",{className:"flex flex-col items-center gap-3 py-8 text-center",children:[(0,d.jsx)(to,{className:P("h-10 w-10",Bo)}),(0,d.jsx)("p",{className:P("whitespace-pre-wrap text-base",ye),children:f.successMessage}),I&&(0,d.jsx)("p",{className:P("text-sm",ne),children:h.redirecting})]}):(0,d.jsxs)("form",{onSubmit:f.handleSubmit,noValidate:!0,className:P("grid gap-x-8 gap-y-7",Le),children:[(0,d.jsx)(he,{...Q.fieldProps,renderAltcha:!1}),C.map(w=>(0,d.jsx)(an,{inputId:f.inputIdOf(w.id),className:sn(w)?"col-span-full":void 0,field:w,value:W(V,w.id)??null,otherText:W(G,w.id)??"",onOtherTextChange:M=>f.setOtherAnswer(w.id,M),error:f.errorMessage(w.id),labels:h,today:K,phoneCountry:f.phoneCountryOf(w),siteCountry:f.siteCountry,onChange:M=>f.setAnswer(w.id,M),onFocus:()=>f.focusField(w.id),onBlur:()=>f.validateOne(w),upload:{url:ee,ready:f.uploadReady,getProtectionData:f.getUploadProtectionData,onUnavailableChange:M=>f.setUploadUnavailable(w.id,M),onBusyChange:M=>f.setUploadBusy(w.id,M)},taxId:w.type==="tax_id"?{lookup:Z?M=>Z(w.id,M):void 0,onRegistryName:w.companyNameFieldId?M=>f.fillCompanyName(w.companyNameFieldId,M):void 0}:void 0},w.id)),T==="checkbox"&&(0,d.jsxs)("label",{className:P("col-span-full flex cursor-pointer items-start gap-2.5 pt-1 text-sm",ye),children:[(0,d.jsx)(Lt,{type:"checkbox",className:"mt-0.5",checked:N,onFocus:f.markStarted,onChange:w=>k(w.target.checked)}),(0,d.jsx)("span",{children:L})]}),(0,d.jsx)(St,{...Q.challengeProps,locale:g,theme:b,className:"col-span-full sm:max-w-sm"},H),R&&(0,d.jsx)("p",{role:"alert",className:P("col-span-full text-sm",be),children:U}),(0,d.jsxs)("div",{className:"col-span-full flex flex-col gap-2 sm:flex-row sm:items-center sm:gap-4",children:[(0,d.jsxs)("button",{type:"submit",disabled:f.submitDisabled,className:P("inline-flex min-h-11 w-full items-center justify-center gap-2 rounded-lg px-5 py-2.5 text-[15px] font-medium transition sm:w-auto",Vo,"shadow-md hover:brightness-110 hover:shadow-lg","disabled:cursor-not-allowed disabled:opacity-60"),children:[(O==="submitting"||v)&&(0,d.jsx)(ro,{className:"h-4 w-4 animate-spin"}),O==="submitting"||v?h.submitting:t.settings.submitLabel||h.submit]}),oe&&(0,d.jsx)("p",{className:P("text-xs",ne),children:h.previewNotice})]}),T==="submit"&&(0,d.jsx)("p",{className:P("col-span-full -mt-4 text-xs leading-relaxed",ne),children:L})]})})})}function an({field:t,inputId:e,className:o,value:n,otherText:a,onOtherTextChange:u,error:m,labels:c,phoneCountry:F,today:_,siteCountry:g,onChange:y,onFocus:b,onBlur:f,upload:h,taxId:C}){let E=`${e}-error`,s=m?E:void 0;return t.type==="statement"?(0,d.jsxs)("div",{className:P("min-w-0 space-y-1.5",o),children:[(0,d.jsx)("p",{className:P("text-base font-semibold leading-snug",ye),children:t.label}),t.description&&(0,d.jsx)("p",{className:P("whitespace-pre-wrap text-sm leading-relaxed",ne),children:t.description})]}):(0,d.jsxs)("div",{className:P("min-w-0 space-y-2",o),children:[(0,d.jsxs)("label",{htmlFor:e,className:P("block text-base font-semibold leading-snug",ye),children:[t.label,t.required&&(0,d.jsx)("span",{"aria-hidden":!0,className:P("ml-0.5",be),children:"*"})]}),t.description&&(0,d.jsx)("p",{className:P("text-sm",ne),children:t.description}),(0,d.jsx)(ln,{field:t,inputId:e,describedBy:s,invalid:!!m,value:n,otherText:a,onOtherTextChange:u,labels:c,phoneCountry:F,today:_,siteCountry:g,onChange:y,onFocus:b,onBlur:f,upload:h,taxId:C}),m&&(0,d.jsx)("p",{id:E,role:"alert",className:P("text-xs",be),children:m})]})}function sr({className:t,placeholder:e,value:o,onFocus:n,onChange:a}){return(0,d.jsx)("input",{type:"text",className:P(lr,t),placeholder:e,"aria-label":e,value:o,onFocus:n,onChange:u=>a(u.target.value)})}function ln({field:t,inputId:e,describedBy:o,invalid:n,value:a,otherText:u,onOtherTextChange:m,labels:c,phoneCountry:F,today:_,siteCountry:g,onChange:y,onFocus:b,onBlur:f,upload:h,taxId:C}){let{PhoneInput:E,FormAddressField:s,FormTaxIdField:O,FormFileField:v,FormChoiceDropdown:I}=(0,ar.useContext)(Go)??zo,V={id:e,"aria-describedby":o,"aria-invalid":n||void 0,onFocus:b,onBlur:f,required:t.required,className:P(lr,n&&At)},G=Je(t,_);if(G)return(0,d.jsx)(nr,{...V,...G,value:typeof a=="string"?a:typeof a=="number"?String(a):"",onChange:T=>y(T.target.value)});switch(t.type){case"short_text":case"email":case"date":case"time":case"number":case"url":return null;case"long_text":return(0,d.jsx)(ir,{...V,rows:4,maxLength:t.maxLength,value:typeof a=="string"?a:"",onChange:T=>y(T.target.value)});case"phone":return(0,d.jsx)("div",{id:e,onFocus:b,onBlur:et(f),tabIndex:-1,className:"outline-none",children:(0,d.jsx)(E,{value:typeof a=="string"?a:"",onChange:T=>y(T??null),defaultCountry:F,error:n,controlClassName:P(ie,n&&At)})});case"statement":return null;case"tax_id":return(0,d.jsx)(O,{field:t,inputId:e,describedBy:o,invalid:n,value:a,labels:c,siteCountry:g,controlClassName:ie,lookup:C?.lookup,onRegistryName:C?.onRegistryName,onChange:y,onFocus:b,onBlur:f});case"address":return(0,d.jsx)(s,{field:t,inputId:e,describedBy:o,invalid:n,value:a,labels:c,siteCountry:g,controlClassName:ie,onChange:y,onFocus:b,onBlur:f});case"choice":{let T=Array.isArray(a)?a:typeof a=="string"&&a?[a]:[],L=[...t.options.map(k=>({id:k.id,label:k.label})),...t.allowOther?[{id:Rt,label:c.otherOption}]:[]],N=t.allowOther&&T.includes(Rt);return t.display==="dropdown"&&!t.allowMultiple?(0,d.jsxs)("div",{className:"space-y-2.5",onBlur:et(f),children:[(0,d.jsx)(I,{inputId:e,describedBy:o,invalid:n,value:T[0]||void 0,options:L,placeholder:c.selectPlaceholder,onChange:y,onFocus:b}),N&&(0,d.jsx)(sr,{placeholder:c.otherPlaceholder,value:u,onFocus:b,onChange:m})]}):(0,d.jsxs)("div",{role:t.allowMultiple?"group":"radiogroup","aria-describedby":o,className:"space-y-2.5 pt-0.5",onBlur:et(f),children:[L.map((k,Q)=>{let H=T.includes(k.id);return(0,d.jsxs)("label",{className:P("flex cursor-pointer items-center gap-2.5 text-[15px]",ye),children:[(0,d.jsx)(Lt,{id:Q===0?e:void 0,type:t.allowMultiple?"checkbox":"radio",name:e,checked:H,onFocus:b,onChange:()=>{t.allowMultiple?y(H?T.filter(K=>K!==k.id):[...T,k.id]):y(k.id)}}),(0,d.jsx)("span",{children:k.label})]},k.id)}),N&&(0,d.jsx)(sr,{className:"mt-1",placeholder:c.otherPlaceholder,value:u,onFocus:b,onChange:m})]})}case"rating":{let T=t.icon==="heart"?oo:t.icon==="thumb"?io:no,L=typeof a=="number"?a:0;return(0,d.jsx)("div",{role:"radiogroup","aria-describedby":o,className:"flex flex-wrap gap-1.5",onBlur:et(f),children:Array.from({length:t.max},(N,k)=>k+1).map(N=>{let k=N<=L;return(0,d.jsx)("button",{type:"button",role:"radio","aria-checked":L===N,"aria-label":String(N),id:N===1?e:void 0,onFocus:b,onClick:()=>y(L===N?null:N),className:P("flex h-10 w-10 items-center justify-center rounded-lg transition",uo),children:(0,d.jsx)(T,{className:P("h-6 w-6 transition",k?"fill-[var(--site-accent-text,var(--brand-text,var(--brand-color,#FF5733)))] text-[var(--site-accent-text,var(--brand-text,var(--brand-color,#FF5733)))]":lo)})},N)})})}case"file":return(0,d.jsx)(v,{field:t,inputId:e,describedBy:o,invalid:n,labels:c,uploadUrl:h.url,protectionReady:h.ready,getProtectionData:h.getProtectionData,onChange:y,onUnavailableChange:h.onUnavailableChange,onBusyChange:h.onBusyChange,onFocus:b})}}var le=S(j(),1);var tt=S(j());var cn=S(B()),Pi=(0,tt.createContext)(null);var z=S(B(),1);function dn(t={}){let e=xo(t.siteUrl),o=t.entry??"forms",n=wt(),a=t.config!==void 0?t.config:n,u=a===null&&t.config===void 0,{site:m,error:c}=xt(e,u),F=(0,le.useMemo)(()=>m?ge(m.botProtection):null,[m]),_=u&&F===null&&!c,g=re({...t,entry:o,config:u?F:a,variant:t.variant??"full",challengeUrl:`${e}/api/form-protection/challenge`,altchaChallengeUrl:`${e}/api/form-protection/altcha`}),y=g.challengeProps.captcha,b=(0,le.useMemo)(()=>({...g.fieldProps,captcha:y,pending:_}),[g.fieldProps,y,_]);return{...g,isReady:g.isReady&&!_,isSubmittable:g.isSubmittable&&!_,fieldProps:b}}var ur={botProtection:"Human verification",botProtectionLoading:"Loading human verification"};function mn(t,e,o){let n=vo(),a=wo(),u=yo(e??n?.locale),m=t??(n?.theme==="light"||n?.theme==="dark"?n.theme:null),c=a?null:m,F=o&&!a&&n!==null&&n.brand!==!1?ho(n.siteUrl):null,{site:_}=xt(F??"",F!==null),g=Po(_,u,F!==null),y=(0,le.useMemo)(()=>a?null:{className:fo,mark:E=>go(E,c,g)},[a,c,g]),b=so(),f=po(u).startsWith("en"),{messages:h}=bo(u,o&&b===null&&!f),C=(0,le.useMemo)(()=>{if(!b)return!h||f?ur:{botProtection:h.ui.botProtection,botProtectionLoading:h.ui.botProtectionLoading}},[b,h,f]);return(0,le.useEffect)(()=>{o&&To(u)},[o,u]),{scope:y,labels:C,locale:u,theme:c}}function Ht({theme:t,captcha:e,pending:o,...n}){return(0,z.jsxs)(z.Fragment,{children:[n.renderAltcha===!1?null:(0,z.jsx)(dr,{theme:t,captcha:e,pending:o,...n}),(0,z.jsx)(he,{...n,renderAltcha:!1})]})}function dr({theme:t,captcha:e,pending:o,...n}){let a=mn(t,n.locale,n.variant==="full"&&!e&&!o),{scope:u,labels:m,locale:c}=a;return o?null:e?(0,z.jsx)(yt,{value:u,children:(0,z.jsx)(Tt,{provider:e.provider,siteKey:e.siteKey,action:e.action,cData:e.cData,recaptchaVersion:e.recaptchaVersion,locale:c,theme:a.theme,generation:e.generation,onVerified:e.onVerified,onInvalidated:e.onInvalidated,registerExecutor:e.registerExecutor,className:n.className})}):(0,z.jsx)(yt,{value:u,children:(0,z.jsx)(_t,{...n,locale:c,labels:m})})}var ce=S(j(),1);function pn(t){let{formId:e,definition:o,siteName:n,labels:a,hiddenValues:u,followRedirect:m,onSuccess:c,siteUrl:F,locale:_}=t,g=Ye({siteUrl:F,locale:_},e,o,a),{ctx:y,form:b}=g,f=y.site,h=(0,ce.useMemo)(()=>f?ge(f.botProtection):null,[f]),C=(0,ce.useCallback)(R=>{typeof window<"u"&&window.dispatchEvent(new CustomEvent(Ge,{detail:R})),c?.(R)},[c]),E=b?`${y.siteUrl}/api/v1/forms/${encodeURIComponent(b.id)}/submit`:null,s=Qe({form:g.ready?b:null,formId:e,submitUrl:E,challengeUrl:`${y.siteUrl}/api/form-protection/challenge`,altchaChallengeUrl:`${y.siteUrl}/api/form-protection/altcha`,onSuccess:C,followRedirect:m,hiddenValues:u,labels:g.mergedLabels,locale:y.locale,websiteName:n??null,botProtectionConfig:h,botProtectionPending:f===null}),{inputIdOf:O,answers:v,errors:I,today:V,setAnswer:G,focusField:T,validateField:L}=s,N=(0,ce.useCallback)(R=>{let U=s.fields.find(oe=>oe.id===R),ee=O(R),Z=W(v,R);return{...U?Je(U,V)??(U.type==="long_text"?{maxLength:U.maxLength}:{}):{},id:ee,name:R,value:typeof Z=="string"?Z:typeof Z=="number"?String(Z):"",required:!!(U&&"required"in U&&U.required),...W(I,R)?{"aria-invalid":!0,"aria-describedby":`${ee}-error`}:{},onChange:oe=>G(R,oe.target.value),onFocus:()=>T(R),onBlur:()=>L(R)}},[s.fields,O,v,V,I,G,T,L]),k=f===null,Q=s.protection.challengeProps.captcha,H=(0,ce.createElement)(Ht,{key:s.altchaKey,...s.protection.fieldProps,captcha:Q,pending:k,locale:y.locale}),K=g.loadFailed||g.siteUnavailable||g.textUnavailable?"unavailable":g.ready?s.status==="success"?"success":s.status==="submitting"||s.preparing?"submitting":"ready":"loading";return{status:K,definition:g.ready?b:null,fields:s.visibleFields,availability:s.availability,values:v,setValue:G,otherText:s.otherText,setOtherText:s.setOtherAnswer,errors:I,errorMessage:s.errorMessage,validateField:L,getInputProps:N,getErrorProps:R=>({id:`${O(R)}-error`,role:"alert"}),formProps:{ref:s.setRoot,onSubmit:R=>{s.handleSubmit(R)},onFocus:s.markStarted,noValidate:!0},botProtection:H,consent:{mode:s.consentMode,text:b?.consentText??s.consentLabel,checked:s.marketingOptIn,setChecked:s.setMarketingOptIn},canSubmit:K==="ready"&&!s.isClosed&&!s.submitDisabled,submit:()=>s.handleSubmit(),submitError:s.submitError,submitErrorMessage:s.submitErrorMessage,result:s.result,successMessage:s.successMessage,uploadReady:s.uploadReady&&K==="ready",uploadFile:s.uploadFile,lookupTaxId:(R,U)=>s.lookupTaxId?s.lookupTaxId(R,U):Promise.resolve(null),labels:s.labels}}var ue=S(B(),1);function ts({formId:t,definition:e,maxColumns:o,siteName:n,labels:a,onSuccess:u,followRedirect:m,hiddenValues:c,className:F,..._}){let{ctx:g,form:y,loadFailed:b,siteUnavailable:f,mergedLabels:h,ready:C}=Ye(_,t,e,a),E=g.site,s=g.siteUrl;return b?(0,ue.jsx)(Se,{context:g,className:F,"data-kanorio-form-error":"load_failed",children:h?.temporarilyUnavailable??"This form isn\u2019t accepting responses right now."}):f?(0,ue.jsx)(Se,{context:g,className:F,"data-kanorio-form-error":"site_unavailable",children:h?.temporarilyUnavailable??"This form isn\u2019t accepting responses right now."}):!C||!y||!E?(0,ue.jsx)(Se,{context:g,className:F,"data-kanorio-form-loading":"",loading:!0}):(0,ue.jsx)(Se,{context:g,className:F,children:(0,ue.jsx)(Ct,{value:ge(E.botProtection),children:(0,ue.jsx)(cr,{form:y,maxColumns:o,submitUrl:`${s}/api/v1/forms/${encodeURIComponent(y.id)}/submit`,challengeUrl:`${s}/api/form-protection/challenge`,altchaChallengeUrl:`${s}/api/form-protection/altcha`,locale:g.locale,websiteName:n,captchaTheme:g.theme,labels:h,followRedirect:m,hiddenValues:c,onSuccess:O=>{typeof window<"u"&&window.dispatchEvent(new CustomEvent(Ge,{detail:O})),u?.(O)}})})})}export{ur as ENGLISH_ALTCHA_LABELS,Ge as FORM_SUBMIT_EVENT,Ht as KanorioBotProtection,dr as KanorioBotProtectionAltcha,ts as KanorioForm,It as SITE_RETRY_DELAYS_MS,dn as useKanorioBotProtection,pn as useKanorioForm};
2
+ //# sourceMappingURL=KanorioForm-FDS5UKUT.js.map
@@ -0,0 +1,2 @@
1
+ "use client";import{KanorioForm,SITE_RETRY_DELAYS_MS,useKanorioForm}from"./chunk-SB5665ZK.js";import"./chunk-D4KDA3KL.js";import"./chunk-QF55WZDP.js";import"./chunk-SVWEVSYJ.js";import"./chunk-APWDEDWM.js";import"./chunk-RG5JA44V.js";import"./chunk-FFAWYDLJ.js";import"./chunk-E77WGXYW.js";import"./chunk-C7HUM2EN.js";import{FORM_SUBMIT_EVENT}from"./chunk-LWKCGUHS.js";import"./chunk-TEUQV3AT.js";import{ENGLISH_ALTCHA_LABELS,KanorioBotProtection,KanorioBotProtectionAltcha,useKanorioBotProtection}from"./chunk-J5SMJRYC.js";import"./chunk-KYXZNMNA.js";import"./chunk-RKEHHJDU.js";import"./chunk-JH5D6YJX.js";import"./chunk-4BEKWYEW.js";import"./chunk-OIKRLEW6.js";import"./chunk-O2SYHUQF.js";import"./chunk-33AQQY6T.js";import"./chunk-VUTODQFX.js";import"./chunk-QRKYFFDH.js";import"./chunk-KNNN5V3T.js";import"./chunk-763LNERD.js";import"./chunk-U7H3W23Q.js";import"./chunk-RI64PHGM.js";import"./chunk-Q4APVE7S.js";import"./chunk-CU2JJTXI.js";import"./chunk-3ZTUZPSD.js";export{ENGLISH_ALTCHA_LABELS,FORM_SUBMIT_EVENT,KanorioBotProtection,KanorioBotProtectionAltcha,KanorioForm,SITE_RETRY_DELAYS_MS,useKanorioBotProtection,useKanorioForm};
2
+ //# sourceMappingURL=KanorioForm-K3H3YUQH.js.map
@@ -0,0 +1,2 @@
1
+ "use client";import{a as be}from"./chunk-2J5XQK4H.js";import{b as he}from"./chunk-GWUOOGNK.js";import{t as ge}from"./chunk-CMYBXWO5.js";import"./chunk-QYTK2CW3.js";import{a as It,b as de,c as wt,d as zt,e as me,f as Bt}from"./chunk-CTMHQZAU.js";import"./chunk-MXGMJAWS.js";import"./chunk-BKNL7ZCI.js";import{c as pe}from"./chunk-II7PVZWZ.js";import{s as Rt,t as ae,u as ue,v as le,w as fe}from"./chunk-65RP744E.js";import"./chunk-3NXF6SCJ.js";import"./chunk-2E6RCDAA.js";import{e as ce}from"./chunk-ET57PWXC.js";import{A as ee,P as ne,Y as oe,Z as re,_ as se,i as Jt,j as Yt,q as te}from"./chunk-S2NFWI7C.js";import{b as ie}from"./chunk-AFNEGNVJ.js";import{a as Lt}from"./chunk-OU4IOHLN.js";import{a as Ue}from"./chunk-NSY72ZYX.js";import{a as Dt}from"./chunk-6LGTFWQS.js";import{c as it}from"./chunk-CDG7S4P5.js";var dt=it(Dt(),1);var R=it(Dt()),Me=it(Ue());var Y=it(Dt(),1);function He(t){return Object.prototype.toString.call(t)==="[object Object]"}function ve(t){return He(t)||Array.isArray(t)}function ye(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function Et(t,e){let o=Object.keys(t),s=Object.keys(e);if(o.length!==s.length)return!1;let c=JSON.stringify(Object.keys(t.breakpoints||{})),r=JSON.stringify(Object.keys(e.breakpoints||{}));return c!==r?!1:o.every(n=>{let a=t[n],i=e[n];return typeof a=="function"?`${a}`==`${i}`:!ve(a)||!ve(i)?a===i:Et(a,i)})}function xe(t){return t.concat().sort((e,o)=>e.name>o.name?1:-1).map(e=>e.options)}function Se(t,e){if(t.length!==e.length)return!1;let o=xe(t),s=xe(e);return o.every((c,r)=>{let n=s[r];return Et(c,n)})}function $t(t){return typeof t=="number"}function Ft(t){return typeof t=="string"}function Nt(t){return typeof t=="boolean"}function Le(t){return Object.prototype.toString.call(t)==="[object Object]"}function B(t){return Math.abs(t)}function Ut(t){return Math.sign(t)}function gt(t,e){return B(t-e)}function je(t,e){if(t===0||e===0||B(t)<=B(e))return 0;let o=gt(B(t),B(e));return B(o/t)}function Ve(t){return Math.round(t*100)/100}function ht(t){return bt(t).map(Number)}function nt(t){return t[xt(t)]}function xt(t){return Math.max(0,t.length-1)}function Ht(t,e){return e===xt(t)}function Ie(t,e=0){return Array.from(Array(t),(o,s)=>e+s)}function bt(t){return Object.keys(t)}function we(t,e){return[t,e].reduce((o,s)=>(bt(s).forEach(c=>{let r=o[c],n=s[c],a=Le(r)&&Le(n);o[c]=a?we(r,n):n}),o),{})}function _t(t,e){return typeof e.MouseEvent<"u"&&t instanceof e.MouseEvent}function Ge(t,e){let o={start:s,center:c,end:r};function s(){return 0}function c(i){return r(i)/2}function r(i){return e-i}function n(i,u){return Ft(t)?o[t](i):t(e,i,u)}return{measure:n}}function vt(){let t=[];function e(c,r,n,a={passive:!0}){let i;if("addEventListener"in c)c.addEventListener(r,n,a),i=()=>c.removeEventListener(r,n,a);else{let u=c;u.addListener(n),i=()=>u.removeListener(n)}return t.push(i),s}function o(){t=t.filter(c=>c())}let s={add:e,clear:o};return s}function Ke(t,e,o,s){let c=vt(),r=1e3/60,n=null,a=0,i=0;function u(){c.add(t,"visibilitychange",()=>{t.hidden&&d()})}function b(){y(),c.clear()}function f(g){if(!i)return;n||(n=g,o(),o());let l=g-n;for(n=g,a+=l;a>=r;)o(),a-=r;let h=a/r;s(h),i&&(i=e.requestAnimationFrame(f))}function m(){i||(i=e.requestAnimationFrame(f))}function y(){e.cancelAnimationFrame(i),n=null,a=0,i=0}function d(){n=null,a=0}return{init:u,destroy:b,start:m,stop:y,update:o,render:s}}function qe(t,e){let o=e==="rtl",s=t==="y",c=s?"y":"x",r=s?"x":"y",n=!s&&o?-1:1,a=b(),i=f();function u(d){let{height:p,width:g}=d;return s?p:g}function b(){return s?"top":o?"right":"left"}function f(){return s?"bottom":o?"left":"right"}function m(d){return d*n}return{scroll:c,cross:r,startEdge:a,endEdge:i,measureSize:u,direction:m}}function lt(t=0,e=0){let o=B(t-e);function s(u){return u<t}function c(u){return u>e}function r(u){return s(u)||c(u)}function n(u){return r(u)?s(u)?t:e:u}function a(u){return o?u-o*Math.ceil((u-e)/o):u}return{length:o,max:e,min:t,constrain:n,reachedAny:r,reachedMax:c,reachedMin:s,removeOffset:a}}function Ee(t,e,o){let{constrain:s}=lt(0,t),c=t+1,r=n(e);function n(m){return o?B((c+m)%c):s(m)}function a(){return r}function i(m){return r=n(m),f}function u(m){return b().set(a()+m)}function b(){return Ee(t,a(),o)}let f={get:a,set:i,add:u,clone:b};return f}function Xe(t,e,o,s,c,r,n,a,i,u,b,f,m,y,d,p,g,l,h){let{cross:v,direction:P}=t,w=["INPUT","SELECT","TEXTAREA"],S={passive:!1},E=vt(),N=vt(),C=lt(50,225).constrain(y.measure(20)),z={mouse:300,touch:400},A={mouse:500,touch:600},H=d?43:25,K=!1,q=0,X=0,Z=!1,tt=!1,V=!1,j=!1;function at(x){if(!h)return;function D(L){(Nt(h)||h(x,L))&&st(L)}let F=e;E.add(F,"dragstart",L=>L.preventDefault(),S).add(F,"touchmove",()=>{},S).add(F,"touchend",()=>{}).add(F,"touchstart",D).add(F,"mousedown",D).add(F,"touchcancel",_).add(F,"contextmenu",_).add(F,"click",J,!0)}function W(){E.clear(),N.clear()}function ot(){let x=j?o:e;N.add(x,"touchmove",$,S).add(x,"touchend",_).add(x,"mousemove",$,S).add(x,"mouseup",_)}function rt(x){let D=x.nodeName||"";return w.includes(D)}function Q(){return(d?A:z)[j?"mouse":"touch"]}function et(x,D){let F=f.add(Ut(x)*-1),L=b.byDistance(x,!d).distance;return d||B(x)<C?L:g&&D?L*.5:b.byIndex(F.get(),0).distance}function st(x){let D=_t(x,s);j=D,V=d&&D&&!x.buttons&&K,K=gt(c.get(),n.get())>=2,!(D&&x.button!==0)&&(rt(x.target)||(Z=!0,r.pointerDown(x),u.useFriction(0).useDuration(0),c.set(n),ot(),q=r.readPoint(x),X=r.readPoint(x,v),m.emit("pointerDown")))}function $(x){if(!_t(x,s)&&x.touches.length>=2)return _(x);let F=r.readPoint(x),L=r.readPoint(x,v),I=gt(F,q),M=gt(L,X);if(!tt&&!j&&(!x.cancelable||(tt=I>M,!tt)))return _(x);let k=r.pointerMove(x);I>p&&(V=!0),u.useFriction(.3).useDuration(.75),a.start(),c.add(P(k)),x.preventDefault()}function _(x){let F=b.byDistance(0,!1).index!==f.get(),L=r.pointerUp(x)*Q(),I=et(P(L),F),M=je(L,I),k=H-10*M,G=l+M/50;tt=!1,Z=!1,N.clear(),u.useDuration(k).useFriction(G),i.distance(I,!d),j=!1,m.emit("pointerUp")}function J(x){V&&(x.stopPropagation(),x.preventDefault(),V=!1)}function U(){return Z}return{init:at,destroy:W,pointerDown:U}}function Ze(t,e){let s,c;function r(f){return f.timeStamp}function n(f,m){let d=`client${(m||t.scroll)==="x"?"X":"Y"}`;return(_t(f,e)?f:f.touches[0])[d]}function a(f){return s=f,c=f,n(f)}function i(f){let m=n(f)-n(c),y=r(f)-r(s)>170;return c=f,y&&(s=f),m}function u(f){if(!s||!c)return 0;let m=n(c)-n(s),y=r(f)-r(s),d=r(f)-r(c)>170,p=m/y;return y&&!d&&B(p)>.1?p:0}return{pointerDown:a,pointerMove:i,pointerUp:u,readPoint:n}}function We(){function t(o){let{offsetTop:s,offsetLeft:c,offsetWidth:r,offsetHeight:n}=o;return{top:s,right:c+r,bottom:s+n,left:c,width:r,height:n}}return{measure:t}}function Qe(t){function e(s){return t*(s/100)}return{measure:e}}function Je(t,e,o,s,c,r,n){let a=[t].concat(s),i,u,b=[],f=!1;function m(g){return c.measureSize(n.measure(g))}function y(g){if(!r)return;u=m(t),b=s.map(m);function l(h){for(let v of h){if(f)return;let P=v.target===t,w=s.indexOf(v.target),S=P?u:b[w],E=m(P?t:s[w]);if(B(E-S)>=.5){g.reInit(),e.emit("resize");break}}}i=new ResizeObserver(h=>{(Nt(r)||r(g,h))&&l(h)}),o.requestAnimationFrame(()=>{a.forEach(h=>i.observe(h))})}function d(){f=!0,i&&i.disconnect()}return{init:y,destroy:d}}function Ye(t,e,o,s,c,r){let n=0,a=0,i=c,u=r,b=t.get(),f=0;function m(){let S=s.get()-t.get(),E=!i,N=0;return E?(n=0,o.set(s),t.set(s),N=S):(o.set(t),n+=S/i,n*=u,b+=n,t.add(n),N=b-f),a=Ut(N),f=b,w}function y(){let S=s.get()-e.get();return B(S)<.001}function d(){return i}function p(){return a}function g(){return n}function l(){return v(c)}function h(){return P(r)}function v(S){return i=S,w}function P(S){return u=S,w}let w={direction:p,duration:d,velocity:g,seek:m,settled:y,useBaseFriction:h,useBaseDuration:l,useFriction:P,useDuration:v};return w}function tn(t,e,o,s,c){let r=c.measure(10),n=c.measure(50),a=lt(.1,.99),i=!1;function u(){return!(i||!t.reachedAny(o.get())||!t.reachedAny(e.get()))}function b(y){if(!u())return;let d=t.reachedMin(e.get())?"min":"max",p=B(t[d]-e.get()),g=o.get()-e.get(),l=a.constrain(p/n);o.subtract(g*l),!y&&B(g)<r&&(o.set(t.constrain(o.get())),s.useDuration(25).useBaseFriction())}function f(y){i=!y}return{shouldConstrain:u,constrain:b,toggleActive:f}}function en(t,e,o,s,c){let r=lt(-e+t,0),n=f(),a=b(),i=m();function u(d,p){return gt(d,p)<=1}function b(){let d=n[0],p=nt(n),g=n.lastIndexOf(d),l=n.indexOf(p)+1;return lt(g,l)}function f(){return o.map((d,p)=>{let{min:g,max:l}=r,h=r.constrain(d),v=!p,P=Ht(o,p);return v?l:P||u(g,h)?g:u(l,h)?l:h}).map(d=>parseFloat(d.toFixed(3)))}function m(){if(e<=t+c)return[r.max];if(s==="keepSnaps")return n;let{min:d,max:p}=a;return n.slice(d,p)}return{snapsContained:i,scrollContainLimit:a}}function nn(t,e,o){let s=e[0],c=o?s-t:nt(e);return{limit:lt(c,s)}}function on(t,e,o,s){let r=e.min+.1,n=e.max+.1,{reachedMin:a,reachedMax:i}=lt(r,n);function u(m){return m===1?i(o.get()):m===-1?a(o.get()):!1}function b(m){if(!u(m))return;let y=t*(m*-1);s.forEach(d=>d.add(y))}return{loop:b}}function rn(t){let{max:e,length:o}=t;function s(r){let n=r-e;return o?n/-o:0}return{get:s}}function sn(t,e,o,s,c){let{startEdge:r,endEdge:n}=t,{groupSlides:a}=c,i=f().map(e.measure),u=m(),b=y();function f(){return a(s).map(p=>nt(p)[n]-p[0][r]).map(B)}function m(){return s.map(p=>o[r]-p[r]).map(p=>-B(p))}function y(){return a(u).map(p=>p[0]).map((p,g)=>p+i[g])}return{snaps:u,snapsAligned:b}}function cn(t,e,o,s,c,r){let{groupSlides:n}=c,{min:a,max:i}=s,u=b();function b(){let m=n(r),y=!t||e==="keepSnaps";return o.length===1?[r]:y?m:m.slice(a,i).map((d,p,g)=>{let l=!p,h=Ht(g,p);if(l){let v=nt(g[0])+1;return Ie(v)}if(h){let v=xt(r)-nt(g)[0]+1;return Ie(v,nt(g)[0])}return d})}return{slideRegistry:u}}function an(t,e,o,s,c){let{reachedAny:r,removeOffset:n,constrain:a}=s;function i(d){return d.concat().sort((p,g)=>B(p)-B(g))[0]}function u(d){let p=t?n(d):a(d),g=e.map((h,v)=>({diff:b(h-p,0),index:v})).sort((h,v)=>B(h.diff)-B(v.diff)),{index:l}=g[0];return{index:l,distance:p}}function b(d,p){let g=[d,d+o,d-o];if(!t)return d;if(!p)return i(g);let l=g.filter(h=>Ut(h)===p);return l.length?i(l):nt(g)-o}function f(d,p){let g=e[d]-c.get(),l=b(g,p);return{index:d,distance:l}}function m(d,p){let g=c.get()+d,{index:l,distance:h}=u(g),v=!t&&r(g);if(!p||v)return{index:l,distance:d};let P=e[l]-h,w=d+b(P,0);return{index:l,distance:w}}return{byDistance:m,byIndex:f,shortcut:b}}function un(t,e,o,s,c,r,n){function a(f){let m=f.distance,y=f.index!==e.get();r.add(m),m&&(s.duration()?t.start():(t.update(),t.render(1),t.update())),y&&(o.set(e.get()),e.set(f.index),n.emit("select"))}function i(f,m){let y=c.byDistance(f,m);a(y)}function u(f,m){let y=e.clone().set(f),d=c.byIndex(y.get(),m);a(d)}return{distance:i,index:u}}function ln(t,e,o,s,c,r,n,a){let i={passive:!0,capture:!0},u=0;function b(y){if(!a)return;function d(p){if(new Date().getTime()-u>10)return;n.emit("slideFocusStart"),t.scrollLeft=0;let h=o.findIndex(v=>v.includes(p));$t(h)&&(c.useDuration(0),s.index(h,0),n.emit("slideFocus"))}r.add(document,"keydown",f,!1),e.forEach((p,g)=>{r.add(p,"focus",l=>{(Nt(a)||a(y,l))&&d(g)},i)})}function f(y){y.code==="Tab"&&(u=new Date().getTime())}return{init:b}}function pt(t){let e=t;function o(){return e}function s(i){e=n(i)}function c(i){e+=n(i)}function r(i){e-=n(i)}function n(i){return $t(i)?i:i.get()}return{get:o,set:s,add:c,subtract:r}}function Ne(t,e){let o=t.scroll==="x"?n:a,s=e.style,c=null,r=!1;function n(m){return`translate3d(${m}px,0px,0px)`}function a(m){return`translate3d(0px,${m}px,0px)`}function i(m){if(r)return;let y=Ve(t.direction(m));y!==c&&(s.transform=o(y),c=y)}function u(m){r=!m}function b(){r||(s.transform="",e.getAttribute("style")||e.removeAttribute("style"))}return{clear:b,to:i,toggleActive:u}}function fn(t,e,o,s,c,r,n,a,i){let b=ht(c),f=ht(c).reverse(),m=l().concat(h());function y(E,N){return E.reduce((C,z)=>C-c[z],N)}function d(E,N){return E.reduce((C,z)=>y(C,N)>0?C.concat([z]):C,[])}function p(E){return r.map((N,C)=>({start:N-s[C]+.5+E,end:N+e-.5+E}))}function g(E,N,C){let z=p(N);return E.map(A=>{let H=C?0:-o,K=C?o:0,q=C?"end":"start",X=z[A][q];return{index:A,loopPoint:X,slideLocation:pt(-1),translate:Ne(t,i[A]),target:()=>a.get()>X?H:K}})}function l(){let E=n[0],N=d(f,E);return g(N,o,!1)}function h(){let E=e-n[0]-1,N=d(b,E);return g(N,-o,!0)}function v(){return m.every(({index:E})=>{let N=b.filter(C=>C!==E);return y(N,e)<=.1})}function P(){m.forEach(E=>{let{target:N,translate:C,slideLocation:z}=E,A=N();A!==z.get()&&(C.to(A),z.set(A))})}function w(){m.forEach(E=>E.translate.clear())}return{canLoop:v,clear:w,loop:P,loopPoints:m}}function dn(t,e,o){let s,c=!1;function r(i){if(!o)return;function u(b){for(let f of b)if(f.type==="childList"){i.reInit(),e.emit("slidesChanged");break}}s=new MutationObserver(b=>{c||(Nt(o)||o(i,b))&&u(b)}),s.observe(t,{childList:!0})}function n(){s&&s.disconnect(),c=!0}return{init:r,destroy:n}}function mn(t,e,o,s){let c={},r=null,n=null,a,i=!1;function u(){a=new IntersectionObserver(d=>{i||(d.forEach(p=>{let g=e.indexOf(p.target);c[g]=p}),r=null,n=null,o.emit("slidesInView"))},{root:t.parentElement,threshold:s}),e.forEach(d=>a.observe(d))}function b(){a&&a.disconnect(),i=!0}function f(d){return bt(c).reduce((p,g)=>{let l=parseInt(g),{isIntersecting:h}=c[l];return(d&&h||!d&&!h)&&p.push(l),p},[])}function m(d=!0){if(d&&r)return r;if(!d&&n)return n;let p=f(d);return d&&(r=p),d||(n=p),p}return{init:u,destroy:b,get:m}}function pn(t,e,o,s,c,r){let{measureSize:n,startEdge:a,endEdge:i}=t,u=o[0]&&c,b=d(),f=p(),m=o.map(n),y=g();function d(){if(!u)return 0;let h=o[0];return B(e[a]-h[a])}function p(){if(!u)return 0;let h=r.getComputedStyle(nt(s));return parseFloat(h.getPropertyValue(`margin-${i}`))}function g(){return o.map((h,v,P)=>{let w=!v,S=Ht(P,v);return w?m[v]+b:S?m[v]+f:P[v+1][a]-h[a]}).map(B)}return{slideSizes:m,slideSizesWithGaps:y,startGap:b,endGap:f}}function gn(t,e,o,s,c,r,n,a,i){let{startEdge:u,endEdge:b,direction:f}=t,m=$t(o);function y(l,h){return ht(l).filter(v=>v%h===0).map(v=>l.slice(v,v+h))}function d(l){return l.length?ht(l).reduce((h,v,P)=>{let w=nt(h)||0,S=w===0,E=v===xt(l),N=c[u]-r[w][u],C=c[u]-r[v][b],z=!s&&S?f(n):0,A=!s&&E?f(a):0,H=B(C-A-(N+z));return P&&H>e+i&&h.push(v),E&&h.push(l.length),h},[]).map((h,v,P)=>{let w=Math.max(P[v-1]||0);return l.slice(w,h)}):[]}function p(l){return m?y(l,o):d(l)}return{groupSlides:p}}function hn(t,e,o,s,c,r,n){let{align:a,axis:i,direction:u,startIndex:b,loop:f,duration:m,dragFree:y,dragThreshold:d,inViewThreshold:p,slidesToScroll:g,skipSnaps:l,containScroll:h,watchResize:v,watchSlides:P,watchDrag:w,watchFocus:S}=r,E=2,N=We(),C=N.measure(e),z=o.map(N.measure),A=qe(i,u),H=A.measureSize(C),K=Qe(H),q=Ge(a,H),X=!f&&!!h,Z=f||!!h,{slideSizes:tt,slideSizesWithGaps:V,startGap:j,endGap:at}=pn(A,C,z,o,Z,c),W=gn(A,H,g,f,C,z,j,at,E),{snaps:ot,snapsAligned:rt}=sn(A,q,C,z,W),Q=-nt(ot)+nt(V),{snapsContained:et,scrollContainLimit:st}=en(H,Q,rt,h,E),$=X?et:rt,{limit:_}=nn(Q,$,f),J=Ee(xt($),b,f),U=J.clone(),O=ht(o),x=({dragHandler:ft,scrollBody:At,scrollBounds:Ot,options:{loop:St}})=>{St||Ot.constrain(ft.pointerDown()),At.seek()},D=({scrollBody:ft,translate:At,location:Ot,offsetLocation:St,previousLocation:Oe,scrollLooper:De,slideLooper:Re,dragHandler:ze,animation:Be,eventHandler:Kt,scrollBounds:Fe,options:{loop:qt}},Xt)=>{let Zt=ft.settled(),_e=!Fe.shouldConstrain(),Wt=qt?Zt:Zt&&_e,Qt=Wt&&!ze.pointerDown();Qt&&Be.stop();let $e=Ot.get()*Xt+Oe.get()*(1-Xt);St.set($e),qt&&(De.loop(ft.direction()),Re.loop()),At.to(St.get()),Qt&&Kt.emit("settle"),Wt||Kt.emit("scroll")},F=Ke(s,c,()=>x(Ct),ft=>D(Ct,ft)),L=.68,I=$[J.get()],M=pt(I),k=pt(I),G=pt(I),ut=pt(I),mt=Ye(M,G,k,ut,m,L),Pt=an(f,$,Q,_,ut),kt=un(F,J,U,mt,Pt,ut,n),jt=rn(_),Vt=vt(),Ce=mn(e,o,n,p),{slideRegistry:Gt}=cn(X,h,$,st,W,O),Ae=ln(t,o,Gt,kt,mt,Vt,n,S),Ct={ownerDocument:s,ownerWindow:c,eventHandler:n,containerRect:C,slideRects:z,animation:F,axis:A,dragHandler:Xe(A,t,s,c,ut,Ze(A,c),M,F,kt,mt,Pt,J,n,K,y,d,l,L,w),eventStore:Vt,percentOfView:K,index:J,indexPrevious:U,limit:_,location:M,offsetLocation:G,previousLocation:k,options:r,resizeHandler:Je(e,n,c,o,A,v,N),scrollBody:mt,scrollBounds:tn(_,G,ut,mt,K),scrollLooper:on(Q,_,G,[M,G,k,ut]),scrollProgress:jt,scrollSnapList:$.map(jt.get),scrollSnaps:$,scrollTarget:Pt,scrollTo:kt,slideLooper:fn(A,H,Q,tt,V,ot,$,G,o),slideFocus:Ae,slidesHandler:dn(e,n,P),slidesInView:Ce,slideIndexes:O,slideRegistry:Gt,slidesToScroll:W,target:ut,translate:Ne(A,e)};return Ct}function bn(){let t={},e;function o(u){e=u}function s(u){return t[u]||[]}function c(u){return s(u).forEach(b=>b(e,u)),i}function r(u,b){return t[u]=s(u).concat([b]),i}function n(u,b){return t[u]=s(u).filter(f=>f!==b),i}function a(){t={}}let i={init:o,emit:c,off:n,on:r,clear:a};return i}var vn={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function xn(t){function e(r,n){return we(r,n||{})}function o(r){let n=r.breakpoints||{},a=bt(n).filter(i=>t.matchMedia(i).matches).map(i=>n[i]).reduce((i,u)=>e(i,u),{});return e(r,a)}function s(r){return r.map(n=>bt(n.breakpoints||{})).reduce((n,a)=>n.concat(a),[]).map(t.matchMedia)}return{mergeOptions:e,optionsAtMedia:o,optionsMediaQueries:s}}function yn(t){let e=[];function o(r,n){return e=n.filter(({options:a})=>t.optionsAtMedia(a).active!==!1),e.forEach(a=>a.init(r,t)),n.reduce((a,i)=>Object.assign(a,{[i.name]:i}),{})}function s(){e=e.filter(r=>r.destroy())}return{init:o,destroy:s}}function yt(t,e,o){let s=t.ownerDocument,c=s.defaultView,r=xn(c),n=yn(r),a=vt(),i=bn(),{mergeOptions:u,optionsAtMedia:b,optionsMediaQueries:f}=r,{on:m,off:y,emit:d}=i,p=A,g=!1,l,h=u(vn,yt.globalOptions),v=u(h),P=[],w,S,E;function N(){let{container:O,slides:x}=v;S=(Ft(O)?t.querySelector(O):O)||t.children[0];let F=Ft(x)?S.querySelectorAll(x):x;E=[].slice.call(F||S.children)}function C(O){let x=hn(t,S,E,s,c,O,i);if(O.loop&&!x.slideLooper.canLoop()){let D=Object.assign({},O,{loop:!1});return C(D)}return x}function z(O,x){g||(h=u(h,O),v=b(h),P=x||P,N(),l=C(v),f([h,...P.map(({options:D})=>D)]).forEach(D=>a.add(D,"change",A)),v.active&&(l.translate.to(l.location.get()),l.animation.init(),l.slidesInView.init(),l.slideFocus.init(U),l.eventHandler.init(U),l.resizeHandler.init(U),l.slidesHandler.init(U),l.options.loop&&l.slideLooper.loop(),S.offsetParent&&E.length&&l.dragHandler.init(U),w=n.init(U,P)))}function A(O,x){let D=W();H(),z(u({startIndex:D},O),x),i.emit("reInit")}function H(){l.dragHandler.destroy(),l.eventStore.clear(),l.translate.clear(),l.slideLooper.clear(),l.resizeHandler.destroy(),l.slidesHandler.destroy(),l.slidesInView.destroy(),l.animation.destroy(),n.destroy(),a.clear()}function K(){g||(g=!0,a.clear(),H(),i.emit("destroy"),i.clear())}function q(O,x,D){!v.active||g||(l.scrollBody.useBaseFriction().useDuration(x===!0?0:v.duration),l.scrollTo.index(O,D||0))}function X(O){let x=l.index.add(1).get();q(x,O,-1)}function Z(O){let x=l.index.add(-1).get();q(x,O,1)}function tt(){return l.index.add(1).get()!==W()}function V(){return l.index.add(-1).get()!==W()}function j(){return l.scrollSnapList}function at(){return l.scrollProgress.get(l.offsetLocation.get())}function W(){return l.index.get()}function ot(){return l.indexPrevious.get()}function rt(){return l.slidesInView.get()}function Q(){return l.slidesInView.get(!1)}function et(){return w}function st(){return l}function $(){return t}function _(){return S}function J(){return E}let U={canScrollNext:tt,canScrollPrev:V,containerNode:_,internalEngine:st,destroy:K,off:y,on:m,emit:d,plugins:et,previousScrollSnap:ot,reInit:p,rootNode:$,scrollNext:X,scrollPrev:Z,scrollProgress:at,scrollSnapList:j,scrollTo:q,selectedScrollSnap:W,slideNodes:J,slidesInView:rt,slidesNotInView:Q};return z(e,o),setTimeout(()=>i.emit("init"),0),U}yt.globalOptions=void 0;function Mt(t={},e=[]){let o=(0,Y.useRef)(t),s=(0,Y.useRef)(e),[c,r]=(0,Y.useState)(),[n,a]=(0,Y.useState)(),i=(0,Y.useCallback)(()=>{c&&c.reInit(o.current,s.current)},[c]);return(0,Y.useEffect)(()=>{Et(o.current,t)||(o.current=t,i())},[t,i]),(0,Y.useEffect)(()=>{Se(s.current,e)||(s.current=e,i())},[e,i]),(0,Y.useEffect)(()=>{if(ye()&&n){yt.globalOptions=Mt.globalOptions;let u=yt(n,o.current,s.current);return r(u),()=>u.destroy()}else r(void 0)},[n,r]),[a,c]}Mt.globalOptions=void 0;var T=it(Lt()),Tt=2,Te=(0,R.forwardRef)(function({images:e,filenames:o,enableKeyboard:s=!1,onDownload:c,onShare:r,altPrefix:n="image",imageAlts:a,bottomOverlay:i,progressIndicatorColor:u},b){let{ui:f}=ie(),{protection:m}=fe(),y=ae(m),d=ue(m),p=be(),[g,l]=(0,R.useState)(!1);(0,R.useEffect)(()=>l(!0),[]);let[h,v]=Mt({align:"center",containScroll:"trimSnaps",dragFree:!1,loop:!1,watchDrag:!0},[]),{lightboxOpen:P,lightboxIndex:w,zoomLevel:S,position:E,isDraggingLightbox:N,openLightbox:C,closeLightbox:z,setLightboxIndex:A,prevImage:H,nextImage:K,zoomIn:q,zoomOut:X,resetZoom:Z,handleLightboxDragStart:tt,handleLightboxDrag:V,handleLightboxDragEnd:j,handleDownload:at,handleShare:W}=Bt({images:e,filenames:o,enableKeyboard:s,onDownload:c,onShare:r}),[ot,rt]=(0,R.useState)({}),Q=(0,R.useRef)({}),et=(0,R.useCallback)((L,I)=>{rt(M=>M[L]===I?M:{...M,[L]:I})},[]),st=(0,R.useMemo)(()=>{let L=new Set;for(let I=Math.max(0,w-Tt);I<=Math.min(e.length-1,w+Tt);I++)L.add(I);return Array.from(L)},[w,e.length]);(0,R.useEffect)(()=>{rt(L=>{let I={...L},M=!1;return st.forEach(k=>{I[k]===void 0&&(I[k]=!0,M=!0)}),M?I:L})},[st]),(0,R.useEffect)(()=>{let L=Q.current[w];L&&L.complete&&L.naturalWidth>0&&et(w,!1)},[w,et]),(0,R.useEffect)(()=>{rt(L=>{let I={};st.forEach(M=>{L[M]!==void 0&&(I[M]=L[M])});for(let M=Math.max(0,w-Tt);M<=Math.min(e.length-1,w+Tt);M++)L[M]===!1&&I[M]===void 0&&(I[M]=!1);return I})},[st,w,e.length]);let $=(0,R.useRef)(!1);(0,R.useEffect)(()=>{if(!v||!P){P||($.current=!1);return}$.current?v.selectedScrollSnap()!==w&&v.scrollTo(w,!0):(v.scrollTo(w,!0),$.current=!0);let L=()=>{let I=v.selectedScrollSnap();I!==w&&(A(I),Z())};return v.on("select",L),()=>{v.off("select",L)}},[v,P,w,A,Z]),(0,R.useImperativeHandle)(b,()=>({openLightbox:C}));let _=(0,R.useCallback)(()=>{S>1||N||z()},[S,N,z]),J=(0,R.useCallback)(L=>{L.stopPropagation()},[]),U=(0,R.useCallback)((L,I)=>{L.stopPropagation(),"preventDefault"in L&&L.preventDefault(),I(L)},[]),O=(0,R.useCallback)((L,I)=>{L.stopPropagation(),I()},[]);(0,R.useEffect)(()=>{if(!P||!N||S<=1)return;let L=G=>{V(G)},I=()=>{j()},M=G=>{G.preventDefault(),V(G)},k=()=>{j()};return window.addEventListener("mousemove",L),window.addEventListener("mouseup",I),window.addEventListener("touchmove",M,{passive:!1}),window.addEventListener("touchend",k),window.addEventListener("touchcancel",k),()=>{window.removeEventListener("mousemove",L),window.removeEventListener("mouseup",I),window.removeEventListener("touchmove",M),window.removeEventListener("touchend",k),window.removeEventListener("touchcancel",k)}},[P,N,S,V,j]);let x=p?p.slots.modal:g?document.body:null;if(!P||e.length===0||!x||!e[w])return null;let F=u||"var(--media-accent)";return(0,Me.createPortal)((0,T.jsx)(ce,{children:(0,T.jsxs)("div",{className:"pointer-events-auto fixed inset-0 z-[var(--z-dialog,200)] bg-black/95 flex items-center justify-center overflow-hidden",onClick:_,children:[(0,T.jsxs)("div",{className:"absolute top-0 left-0 right-0 z-10 flex items-center justify-between px-4 py-4 bg-gradient-to-b from-black/50 to-transparent",onClick:J,children:[(0,T.jsxs)("div",{className:"text-[var(--media-fg-muted)] text-sm font-medium",children:[w+1," / ",e.length]}),(0,T.jsxs)("div",{className:"flex items-center gap-1 md:gap-2",children:[(0,T.jsx)("button",{type:"button",onClick:X,disabled:S<=It,className:zt,"aria-label":f.zoomOut,children:(0,T.jsx)(se,{className:"w-5 h-5 md:w-6 md:h-6 text-[var(--media-fg)]"})}),(0,T.jsxs)("button",{type:"button",onClick:Z,disabled:S===It,className:me,title:S===It?void 0:f.resetZoom,"aria-label":`${Math.round(S*100)}% \xB7 ${f.resetZoom}`,children:[Math.round(S*100),"%"]}),(0,T.jsx)("button",{type:"button",onClick:q,disabled:S>=de,className:zt,"aria-label":f.zoomIn,children:(0,T.jsx)(re,{className:"w-5 h-5 md:w-6 md:h-6 text-[var(--media-fg)]"})}),(0,T.jsx)("div",{className:"w-px h-6 md:h-8 bg-[var(--media-track)] mx-1 md:mx-2"}),y?(0,T.jsx)("button",{onClick:at,className:wt,title:f.downloadImage,children:(0,T.jsx)(te,{className:"w-5 h-5 md:w-6 md:h-6 text-[var(--media-fg)]"})}):null,d?(0,T.jsx)("button",{onClick:W,className:wt,title:f.share,children:(0,T.jsx)(ne,{className:"w-5 h-5 md:w-6 md:h-6 text-[var(--media-fg)]"})}):null,y||d?(0,T.jsx)("div",{className:"w-px h-6 md:h-8 bg-[var(--media-track)] mx-1 md:mx-2"}):null,(0,T.jsx)("button",{onClick:z,className:wt,title:f.close,children:(0,T.jsx)(oe,{className:"w-5 h-5 md:w-6 md:h-6 text-[var(--media-fg)]"})})]})]}),(0,T.jsxs)("div",{className:"relative w-full h-full flex items-center justify-center overflow-hidden",onClick:_,children:[ot[w]===!0&&(0,T.jsx)("div",{className:"absolute inset-0 flex items-center justify-center z-10 pointer-events-none",children:(0,T.jsxs)("div",{className:"flex flex-col items-center gap-3",children:[(0,T.jsx)(ee,{className:"w-10 h-10 text-[var(--media-fg-muted)] animate-spin"}),(0,T.jsx)("span",{className:"text-[var(--media-fg-muted)] text-sm",children:f.loading})]})}),(0,T.jsx)("div",{ref:h,className:"w-full h-full overflow-hidden",children:(0,T.jsx)("div",{className:"flex w-full h-full",children:e.map((L,I)=>{let M=I===w;return(0,T.jsx)("div",{"data-embla-slide":!0,className:"flex-[0_0_100%] min-w-0 flex items-center justify-center",style:{width:"100%",height:"100%"},children:(0,T.jsx)("div",{className:"relative transition-transform duration-200 ease-out",style:{transform:M?`scale(${S}) translate(${E.x/S}px, ${E.y/S}px)`:"scale(1) translate(0, 0)",opacity:M&&ot[I]===!0?.3:1,transition:"opacity 0.2s ease-out, transform 0.2s ease-out",cursor:M&&S>1?N?"grabbing":"grab":"default",display:"flex",alignItems:"center",justifyContent:"center"},onClick:J,onMouseDown:M&&S>1?k=>U(k,tt):void 0,onMouseMove:M&&S>1&&N?k=>U(k,V):void 0,onMouseUp:M&&S>1?k=>{k.stopPropagation(),j()}:void 0,onMouseLeave:M&&S>1?k=>{k.stopPropagation(),j()}:void 0,onTouchStart:M&&S>1?k=>U(k,tt):void 0,onTouchMove:M&&S>1?k=>U(k,V):void 0,onTouchEnd:M&&S>1?k=>{k.stopPropagation(),j()}:void 0,children:(0,T.jsxs)("div",{className:"relative",style:{position:"relative"},children:[(0,T.jsx)(pe,{ref:k=>{Q.current[I]=k,k&&k.complete&&k.naturalWidth>0&&et(I,!1)},src:L,useCase:"lightbox-image",alt:a?.[I]?.trim()||`${n} ${I+1}`,priority:M,className:"select-none",style:{maxWidth:"95vw",maxHeight:"90vh",width:"auto",height:"auto",objectFit:"contain",imageRendering:"auto",WebkitBackfaceVisibility:"hidden",backfaceVisibility:"hidden",cursor:M&&S>1?N?"grabbing":"grab":"default"},onLoad:()=>{et(I,!1)},onError:()=>{et(I,!1)}}),i&&M&&S===1&&ot[I]!==!0&&(0,T.jsx)("div",{className:"absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/80 via-black/40 to-transparent px-6 py-8 text-[var(--media-fg)] z-10",children:i(I)})]})})},I)})})})]}),e.length>1&&(0,T.jsxs)(T.Fragment,{children:[w>0&&(0,T.jsx)("button",{onClick:L=>O(L,H),className:"absolute left-2 md:left-4 top-1/2 -translate-y-1/2 z-10 w-12 h-12 md:w-14 md:h-14 rounded-full bg-black/30 hover:bg-black/50 flex items-center justify-center transition-all",children:(0,T.jsx)(Jt,{className:"w-7 h-7 md:w-8 md:h-8 text-[var(--media-fg)]"})}),w<e.length-1&&(0,T.jsx)("button",{onClick:L=>O(L,K),className:"absolute right-2 md:right-4 top-1/2 -translate-y-1/2 z-10 w-12 h-12 md:w-14 md:h-14 rounded-full bg-black/30 hover:bg-black/50 flex items-center justify-center transition-all",children:(0,T.jsx)(Yt,{className:"w-7 h-7 md:w-8 md:h-8 text-[var(--media-fg)]"})})]}),e.length>1&&(0,T.jsx)("div",{className:"absolute bottom-4 md:bottom-6 left-1/2 -translate-x-1/2 z-10 flex -mx-1",children:e.map((L,I)=>(0,T.jsx)("button",{onClick:M=>{O(M,()=>{A(I),Z()})},className:"relative w-8 h-8 flex items-center justify-center",children:(0,T.jsx)("span",{className:`h-2 rounded-full transition-all ${I===w?"w-8":"w-2 bg-[var(--media-track)] hover:bg-[var(--media-fg-muted)]"}`,style:I===w?{backgroundColor:F}:void 0})},I))})]})}),x)});var Pe="https://app.kanorio.com";var ct=it(Lt(),1);function ke(t){t.target instanceof Element&&t.target.closest("img")&&t.preventDefault()}var qn=(0,dt.forwardRef)(function({images:e,alts:o,filenames:s,protection:c,websiteId:r,apiBase:n=Pe,renderTrigger:a,columns:i=3,className:u,locale:b,theme:f,siteUrl:m,brand:y},d){let p=ge({locale:b,theme:f,siteUrl:m,brand:y},{needsSite:c===void 0}),g=p.site,l=c===void 0&&g?{websiteId:g.id,protection:g.mediaProtection?Rt(g.mediaProtection):null}:null,h=(0,dt.useRef)(null);(0,dt.useImperativeHandle)(d,()=>({openLightbox:E=>h.current?.openLightbox(E)}),[]);let v=E=>h.current?.openLightbox(E);if(!p.messages)return null;let P=c===void 0?l?.protection??null:c?Rt(c):null,w=r??(c===void 0?l?.websiteId??null:null),S=P?.deterrence===!0;return(0,ct.jsx)(he,{context:p,className:u,"data-media-deterrence":S?"":void 0,onContextMenuCapture:S?ke:void 0,onDragStartCapture:S?ke:void 0,children:(0,ct.jsxs)(le,{protection:P,websiteId:w,apiBase:n,children:[a?a(v):(0,ct.jsx)("div",{className:"grid gap-2",style:{gridTemplateColumns:`repeat(${i}, minmax(0, 1fr))`},children:e.map((E,N)=>(0,ct.jsx)("button",{type:"button",onClick:()=>v(N),className:"block overflow-hidden rounded-(--media-radius,12px) focus:outline-none focus-visible:ring-2 focus-visible:ring-(--media-accent)",children:(0,ct.jsx)("img",{src:E,alt:o?.[N]??"",loading:"lazy",draggable:S?!1:void 0,className:"aspect-square h-full w-full object-cover"})},`${E}-${N}`))}),(0,ct.jsx)(Te,{ref:h,images:e,imageAlts:o,filenames:s})]})})});export{qn as KanorioLightbox};
2
+ //# sourceMappingURL=KanorioLightbox-QPJQJLNO.js.map
@@ -0,0 +1,2 @@
1
+ "use client";import{KanorioLightbox}from"./chunk-HAHAYDYM.js";import"./chunk-OLGITMLA.js";import"./chunk-L66F3USG.js";import"./chunk-L3BUSP27.js";import"./chunk-Z4A5NQWJ.js";import"./chunk-HFYLTH5B.js";import"./chunk-O2SYHUQF.js";import"./chunk-33AQQY6T.js";import"./chunk-VUTODQFX.js";import"./chunk-QRKYFFDH.js";import"./chunk-KNNN5V3T.js";import"./chunk-763LNERD.js";import"./chunk-U7H3W23Q.js";import"./chunk-RI64PHGM.js";import"./chunk-Q4APVE7S.js";import"./chunk-CU2JJTXI.js";import"./chunk-3ZTUZPSD.js";export{KanorioLightbox};
2
+ //# sourceMappingURL=KanorioLightbox-WBMR7MLG.js.map
@@ -0,0 +1,2 @@
1
+ "use client";import{b as t}from"./chunk-RTF2NUMK.js";import"./chunk-ARU5PTJV.js";import{e as n}from"./chunk-KW2CH7SS.js";import"./chunk-WJPCDZSL.js";import"./chunk-2J5XQK4H.js";import"./chunk-IDY2ZCXL.js";import"./chunk-GWUOOGNK.js";import"./chunk-CMYBXWO5.js";import"./chunk-QYTK2CW3.js";import"./chunk-MXGMJAWS.js";import"./chunk-BKNL7ZCI.js";import"./chunk-WP7UEAIB.js";import"./chunk-VYSRVTYI.js";import"./chunk-2LOQXVFI.js";import"./chunk-2E6RCDAA.js";import"./chunk-U7KVGD47.js";import"./chunk-ET57PWXC.js";import"./chunk-S2NFWI7C.js";import"./chunk-AFNEGNVJ.js";import{a as i}from"./chunk-OU4IOHLN.js";import{a as p}from"./chunk-DLJDYXKL.js";import"./chunk-OTK4YNSG.js";import"./chunk-H2XQYT62.js";import"./chunk-NSY72ZYX.js";import"./chunk-6LGTFWQS.js";import{c as r}from"./chunk-CDG7S4P5.js";var e=r(i(),1);function u(o,s){return n(o,s)}function g(o){return(0,e.jsx)(t,{...o})}export{g as KanorioLogin,p as LOGIN_EVENT,u as mapLoginErrorCode};
2
+ //# sourceMappingURL=KanorioLogin-JMHHBRU7.js.map
@@ -0,0 +1,2 @@
1
+ "use client";import{KanorioLogin,mapLoginErrorCode}from"./chunk-SGFVHVLE.js";import"./chunk-G5673RJK.js";import"./chunk-4OC7BRQS.js";import"./chunk-AQ6F6MIJ.js";import"./chunk-63XJWMJG.js";import"./chunk-R5M6FXXQ.js";import"./chunk-E77WGXYW.js";import"./chunk-C7HUM2EN.js";import{LOGIN_EVENT}from"./chunk-LWKCGUHS.js";import"./chunk-TEUQV3AT.js";import"./chunk-KYXZNMNA.js";import"./chunk-RKEHHJDU.js";import"./chunk-JH5D6YJX.js";import"./chunk-Z4A5NQWJ.js";import"./chunk-HFYLTH5B.js";import"./chunk-33AQQY6T.js";import"./chunk-VUTODQFX.js";import"./chunk-QRKYFFDH.js";import"./chunk-KNNN5V3T.js";import"./chunk-763LNERD.js";import"./chunk-U7H3W23Q.js";import"./chunk-RI64PHGM.js";import"./chunk-Q4APVE7S.js";import"./chunk-CU2JJTXI.js";import"./chunk-3ZTUZPSD.js";export{KanorioLogin,LOGIN_EVENT,mapLoginErrorCode};
2
+ //# sourceMappingURL=KanorioLogin-QMPBTK55.js.map
@@ -0,0 +1,2 @@
1
+ "use client";import{a as t}from"./chunk-Y5JA6B5O.js";import{b as r}from"./chunk-GWUOOGNK.js";import{u as n}from"./chunk-CMYBXWO5.js";import"./chunk-QYTK2CW3.js";import"./chunk-BKNL7ZCI.js";import"./chunk-2E6RCDAA.js";import"./chunk-ET57PWXC.js";import"./chunk-AFNEGNVJ.js";import{a as i}from"./chunk-OU4IOHLN.js";import"./chunk-6LGTFWQS.js";import{c as a}from"./chunk-CDG7S4P5.js";var e=a(i(),1);function P({locale:s,theme:d,siteUrl:m,brand:p,...l}){let o=n({locale:s,theme:d,siteUrl:m,brand:p});return o.messages?(0,e.jsx)(r,{context:o,children:(0,e.jsx)(t,{...l})}):(0,e.jsx)(r,{context:o,className:"aspect-video w-full animate-pulse rounded-(--media-radius,12px) bg-(--media-surface)",loading:!0})}export{P as KanorioMedia};
2
+ //# sourceMappingURL=KanorioMedia-5P63OK4U.js.map
@@ -0,0 +1,2 @@
1
+ "use client";import{KanorioMedia}from"./chunk-EGJ6SNTR.js";import"./chunk-UITC3NFQ.js";import"./chunk-QRKYFFDH.js";import"./chunk-KNNN5V3T.js";import"./chunk-763LNERD.js";import"./chunk-U7H3W23Q.js";import"./chunk-RI64PHGM.js";import"./chunk-Q4APVE7S.js";import"./chunk-CU2JJTXI.js";import"./chunk-3ZTUZPSD.js";export{KanorioMedia};
2
+ //# sourceMappingURL=KanorioMedia-LONTU7H2.js.map
@@ -0,0 +1,2 @@
1
+ "use client";import{r as C,s as k}from"./chunk-CMYBXWO5.js";import"./chunk-QYTK2CW3.js";import"./chunk-BKNL7ZCI.js";import{a as x}from"./chunk-OU4IOHLN.js";import{a as j}from"./chunk-6LGTFWQS.js";import{c as y}from"./chunk-CDG7S4P5.js";var o=y(j(),1);var e=y(x(),1);function E(r,t){if(!t)return r.slice(0,10);try{return new Intl.DateTimeFormat("en-CA",{timeZone:t,year:"numeric",month:"2-digit",day:"2-digit"}).format(new Date(r))}catch{return r.slice(0,10)}}function A({target:r,pageSize:t,loadMoreLabel:g,verifiedLabel:v,replyLabel:d,className:i,siteUrl:f,timeZone:u}){let s=k(f),w=C(),l=u!==void 0?u:w?.timeZone??null,[P,m]=(0,o.useState)([]),[R,p]=(0,o.useState)(null),[K,S]=(0,o.useState)(!1);async function U(n,c){let a=new URL("/api/v1/reviews",s);a.searchParams.set("target",r),t&&a.searchParams.set("limit",String(t)),n&&a.searchParams.set("cursor",n),S(!0);try{let h=await fetch(a.toString());if(!h.ok)throw new Error(String(h.status));let b=await h.json();m(N=>c?b.data??[]:[...N,...b.data??[]]),p(b.nextCursor??null)}catch{c&&m([]),p(null)}finally{S(!1)}}return(0,o.useEffect)(()=>{let n=!1,c=new URL("/api/v1/reviews",s);return c.searchParams.set("target",r),t&&c.searchParams.set("limit",String(t)),fetch(c.toString()).then(a=>a.ok?a.json():Promise.reject(new Error(String(a.status)))).then(a=>{n||(m(a.data??[]),p(a.nextCursor??null))}).catch(()=>{n||(m([]),p(null))}),()=>{n=!0}},[s,r,t]),P.length===0?null:(0,e.jsxs)("div",{className:i,"data-kanorio-reviews":r,children:[(0,e.jsx)("ul",{"data-kanorio-reviews-list":"",children:P.map(n=>(0,e.jsxs)("li",{"data-kanorio-review":"","data-rating":n.rating,"data-verified":n.verified?"":void 0,children:[(0,e.jsxs)("div",{"data-kanorio-review-head":"",children:[(0,e.jsx)("strong",{"data-kanorio-review-author":"",children:n.authorName}),(0,e.jsxs)("span",{"data-kanorio-review-rating":"","aria-label":`${n.rating} / 5`,children:[n.rating,"/5"]}),n.verified&&v?(0,e.jsx)("span",{"data-kanorio-review-verified":"",children:v}):null,(0,e.jsx)("time",{"data-kanorio-review-date":"",dateTime:n.publishedAt,children:E(n.publishedAt,l)})]}),n.content?(0,e.jsx)("p",{"data-kanorio-review-content":"",children:n.content}):null,n.reply?.body&&d?(0,e.jsxs)("div",{"data-kanorio-review-reply":"",children:[(0,e.jsx)("span",{"data-kanorio-review-reply-label":"",children:d}),(0,e.jsx)("p",{"data-kanorio-review-reply-body":"",children:n.reply.body})]}):null]},n.id))}),R&&g?(0,e.jsx)("button",{type:"button","data-kanorio-reviews-more":"",disabled:K,onClick:()=>{U(R,!1)},children:g}):null]})}function D({target:r,countLabel:t,className:g,siteUrl:v}){let d=k(v),[i,f]=(0,o.useState)(null);if((0,o.useEffect)(()=>{let s=!1,w=new URL("/api/v1/reviews/summary",d);return w.searchParams.set("target",r),fetch(w.toString()).then(l=>l.ok?l.json():Promise.reject(new Error(String(l.status)))).then(l=>{s||f(l)}).catch(()=>{s||f(null)}),()=>{s=!0}},[d,r]),!i||!i.visible||i.rating==null)return null;let u=Math.round(i.rating*10)/10;return(0,e.jsxs)("p",{className:g,"data-kanorio-rating":r,"data-rating":u,"data-count":i.count,children:[(0,e.jsx)("span",{"data-kanorio-rating-value":"","aria-label":`${u} / 5`,children:u.toFixed(1)}),(0,e.jsx)("span",{"data-kanorio-rating-count":"",children:t?t.replace("{count}",String(i.count)):i.count})]})}export{D as KanorioRating,A as KanorioReviews};
2
+ //# sourceMappingURL=KanorioReviews-AAQ27MYU.js.map
@@ -0,0 +1,2 @@
1
+ "use client";import{KanorioRating,KanorioReviews}from"./chunk-OWXGUUSI.js";import"./chunk-RI64PHGM.js";import"./chunk-Q4APVE7S.js";import"./chunk-CU2JJTXI.js";import"./chunk-3ZTUZPSD.js";export{KanorioRating,KanorioReviews};
2
+ //# sourceMappingURL=KanorioReviews-LUB4KF23.js.map
@@ -0,0 +1,2 @@
1
+ "use client";import{KanorioUnit,playerLabelsFrom}from"./chunk-CIVS7LYU.js";import"./chunk-MC63CLSM.js";import"./chunk-UITC3NFQ.js";import"./chunk-R5M6FXXQ.js";import"./chunk-QRKYFFDH.js";import"./chunk-KNNN5V3T.js";import"./chunk-763LNERD.js";import"./chunk-U7H3W23Q.js";import"./chunk-RI64PHGM.js";import"./chunk-Q4APVE7S.js";import"./chunk-CU2JJTXI.js";import"./chunk-3ZTUZPSD.js";export{KanorioUnit,playerLabelsFrom};
2
+ //# sourceMappingURL=KanorioUnit-ADFQ7POH.js.map
@@ -0,0 +1,2 @@
1
+ "use client";import"./chunk-IDY2ZCXL.js";import{b as E}from"./chunk-Y5JA6B5O.js";import{b as c}from"./chunk-GWUOOGNK.js";import{a as g,c as L,u as P}from"./chunk-CMYBXWO5.js";import"./chunk-QYTK2CW3.js";import"./chunk-BKNL7ZCI.js";import{a as k}from"./chunk-4DPSNQEI.js";import"./chunk-2E6RCDAA.js";import"./chunk-ET57PWXC.js";import"./chunk-AFNEGNVJ.js";import{a as x}from"./chunk-OU4IOHLN.js";import{a as I}from"./chunk-6LGTFWQS.js";import{c as v}from"./chunk-CDG7S4P5.js";var i=v(I(),1);var a=v(x(),1);function N(d){return k(d.account)}function O({deliverable:d,unit:h,onUnitChange:R,onProgress:m,renderUnauthenticated:C,tree:l,client:b,className:p,...U}){let e=P(U),y=!!(l&&b),[u,n]=(0,i.useState)(()=>l&&b?{status:"ready",tree:l}:{status:"loading"});(0,i.useEffect)(()=>{let r=!1;if(y){n({status:"ready",tree:l});return}if(!e.token){n({status:"unauthenticated"});return}return n({status:"loading"}),L({siteUrl:e.siteUrl,token:e.token}).get("/deliverables/{deliverableId}",{params:{deliverableId:d},query:{locale:e.locale}}).then(s=>{r||n({status:"ready",tree:s.deliverable})}).catch(s=>{if(!r){if(s instanceof g&&s.status===401){n({status:"unauthenticated"});return}n({status:"error",code:s instanceof g?s.code:"NETWORK_ERROR"})}}),()=>{r=!0}},[e.siteUrl,e.token,d,y,l]);let o=b??e.client,D=(0,i.useMemo)(()=>m?{openUnit:o.openUnit,submitQuiz:async r=>{let t=await o.submitQuiz(r);return t.ok&&m({unitId:r.unitId,percent:t.deliverable.percent,completed:t.deliverable.completed,deliverableJustCompleted:t.deliverableJustCompleted,coveredPercent:null}),t},getCertificate:o.getCertificate,getTranscript:o.getTranscript,reportProgress:async r=>{let t=await o.reportProgress(r);return t.ok&&t.deliverable&&m({unitId:r.unitId,percent:t.deliverable.percent,completed:t.deliverable.completed,deliverableJustCompleted:t.deliverableJustCompleted,coveredPercent:t.unitCoveredPercent??null}),t}}:o,[o,m]);if(!e.messages||u.status==="loading")return(0,a.jsx)(c,{context:e,className:p,loading:!0,children:(0,a.jsx)("div",{className:"h-64 w-full animate-pulse rounded-(--media-radius,12px) bg-(--media-surface)"})});let f=e.messages.account;return u.status==="unauthenticated"?(0,a.jsx)(c,{context:e,className:p,children:C?C():(0,a.jsx)("p",{className:"rounded-(--media-radius,12px) bg-(--media-surface) p-4 text-sm text-(--media-surface-fg)",children:f.contentLocked})}):u.status==="error"?(0,a.jsx)(c,{context:e,className:p,children:(0,a.jsx)("p",{role:"alert",className:"rounded-(--media-radius,12px) bg-(--media-surface) p-4 text-sm text-(--media-surface-fg)",children:u.code==="DELIVERABLE_NOT_FOUND"?f.contentEmptyTitle:f.contentLoadError})}):(0,a.jsx)(c,{context:e,className:p,children:(0,a.jsx)(E,{tree:u.tree,client:D,labels:N(e.messages),locale:e.locale,timeZone:e.timeZone,initialUnitId:h??null,onUnitChange:R})})}export{O as KanorioUnit,N as playerLabelsFrom};
2
+ //# sourceMappingURL=KanorioUnit-YBKFHGLB.js.map
@@ -1,2 +1,2 @@
1
- "use client";import{c as a}from"./chunk-DTBRUBPG.js";import"./chunk-UM74DXPE.js";import"./chunk-LXNMHQFN.js";import"./chunk-J37D44SX.js";import"./chunk-MQ7PBFUM.js";import"./chunk-W63RJF6Q.js";import"./chunk-U7KVGD47.js";import"./chunk-6RZBXZFP.js";import"./chunk-ET57PWXC.js";import"./chunk-S2NFWI7C.js";import"./chunk-AFNEGNVJ.js";import"./chunk-OU4IOHLN.js";import"./chunk-NSY72ZYX.js";import"./chunk-DXTWCLOM.js";import"./chunk-V4OWPVBD.js";import"./chunk-6LGTFWQS.js";import"./chunk-CDG7S4P5.js";export{a as MediaPlayer};
2
- //# sourceMappingURL=MediaPlayer-F43FPK4E.js.map
1
+ "use client";import{c as a}from"./chunk-56UUP6CI.js";import"./chunk-UM74DXPE.js";import"./chunk-LXNMHQFN.js";import"./chunk-J37D44SX.js";import"./chunk-MQ7PBFUM.js";import"./chunk-W63RJF6Q.js";import"./chunk-U7KVGD47.js";import"./chunk-6RZBXZFP.js";import"./chunk-ET57PWXC.js";import"./chunk-S2NFWI7C.js";import"./chunk-AFNEGNVJ.js";import"./chunk-OU4IOHLN.js";import"./chunk-NSY72ZYX.js";import"./chunk-DXTWCLOM.js";import"./chunk-V4OWPVBD.js";import"./chunk-6LGTFWQS.js";import"./chunk-CDG7S4P5.js";export{a as MediaPlayer};
2
+ //# sourceMappingURL=MediaPlayer-C5KI6N5V.js.map
@@ -1,2 +1,2 @@
1
- "use client";import{MediaPlayer}from"./chunk-K4VRRKYJ.js";import"./chunk-JREL5347.js";import"./chunk-CUQUEGX2.js";import"./chunk-S7FE2XRA.js";import"./chunk-ZDU7A7WZ.js";import"./chunk-F5NEDREL.js";import"./chunk-63XJWMJG.js";import"./chunk-FFAWYDLJ.js";import"./chunk-4BEKWYEW.js";import"./chunk-OIKRLEW6.js";import"./chunk-33AQQY6T.js";import"./chunk-VUTODQFX.js";import"./chunk-763LNERD.js";import"./chunk-U7H3W23Q.js";import"./chunk-3ZTUZPSD.js";export{MediaPlayer};
2
- //# sourceMappingURL=MediaPlayer-JHFZFOOG.js.map
1
+ "use client";import{MediaPlayer}from"./chunk-UDNUWN4W.js";import"./chunk-JREL5347.js";import"./chunk-CUQUEGX2.js";import"./chunk-S7FE2XRA.js";import"./chunk-ZDU7A7WZ.js";import"./chunk-F5NEDREL.js";import"./chunk-63XJWMJG.js";import"./chunk-FFAWYDLJ.js";import"./chunk-4BEKWYEW.js";import"./chunk-OIKRLEW6.js";import"./chunk-33AQQY6T.js";import"./chunk-VUTODQFX.js";import"./chunk-763LNERD.js";import"./chunk-U7H3W23Q.js";import"./chunk-3ZTUZPSD.js";export{MediaPlayer};
2
+ //# sourceMappingURL=MediaPlayer-PMAEZSCZ.js.map