@unchainedshop/admin-ui 5.0.0-alpha.7 → 5.0.0-alpha.8

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 (281) hide show
  1. package/dist/chunk-2ARWAOZW.js +17 -0
  2. package/dist/{chunk-7PPOGX7R.js → chunk-6ZZIMVID.js} +36 -3
  3. package/dist/{chunk-KCN7DDPH.js → chunk-A3WBMBUF.js} +3 -2
  4. package/dist/{chunk-QNLGYFV7.js → chunk-IYKPRAWC.js} +4 -0
  5. package/dist/{chunk-F2TCVEQX.js → chunk-QVKXUZEC.js} +1 -1
  6. package/dist/{chunk-MSPWYMDY.js → chunk-SDA2A6TP.js} +1 -1
  7. package/dist/{chunk-4VNS5WPM.js → chunk-WPLOTFGW.js} +7 -8
  8. package/dist/components/ui/form/ChoicesField.d.ts.map +1 -1
  9. package/dist/components/ui/index.d.ts +2 -0
  10. package/dist/components/ui/index.d.ts.map +1 -1
  11. package/dist/form.js +377 -314
  12. package/dist/gql/operation-types.d.ts +20 -0
  13. package/dist/gql/operation-types.d.ts.map +1 -1
  14. package/dist/gql/schema-types.d.ts +1 -0
  15. package/dist/gql/schema-types.d.ts.map +1 -1
  16. package/dist/hooks.js +2 -3
  17. package/dist/modal.js +4 -3
  18. package/dist/modules/accounts.js +1 -1
  19. package/dist/modules/assortment.js +1 -1
  20. package/dist/modules/common/components/MediaAvatar.d.ts +6 -0
  21. package/dist/modules/common/components/MediaAvatar.d.ts.map +1 -0
  22. package/dist/modules/common/components/Table.d.ts +25 -0
  23. package/dist/modules/common/components/Table.d.ts.map +1 -0
  24. package/dist/modules/common/components/TableCell.d.ts +12 -0
  25. package/dist/modules/common/components/TableCell.d.ts.map +1 -0
  26. package/dist/modules/common/components/TableRow.d.ts +10 -0
  27. package/dist/modules/common/components/TableRow.d.ts.map +1 -0
  28. package/dist/modules/country.js +1 -1
  29. package/dist/modules/currency.js +1 -1
  30. package/dist/modules/delivery-provider.js +1 -1
  31. package/dist/modules/enrollment.js +1 -1
  32. package/dist/modules/event.js +1 -1
  33. package/dist/modules/filter.js +1 -1
  34. package/dist/modules/language.js +1 -1
  35. package/dist/modules/order.js +1 -1
  36. package/dist/modules/payment-providers.js +1 -1
  37. package/dist/modules/product-review.js +1 -1
  38. package/dist/modules/product.js +2 -2
  39. package/dist/modules/quotation.js +1 -1
  40. package/dist/modules/token.js +2 -2
  41. package/dist/modules/warehousing-providers.js +1 -1
  42. package/dist/modules/work.js +6 -10
  43. package/dist/plugins.js +1 -1
  44. package/dist/providers.js +4 -3
  45. package/dist/shims/admin-ui-plugins.js +1 -1
  46. package/dist/shims/apollo-client-react.js +1 -1
  47. package/dist/shims/apollo-client.js +1 -1
  48. package/dist/shims/next-head.js +1 -1
  49. package/dist/shims/next-image.js +1 -1
  50. package/dist/shims/next-link.js +1 -1
  51. package/dist/shims/next-router.js +1 -1
  52. package/dist/shims/react-dom-client.js +1 -1
  53. package/dist/shims/react-dom.js +1 -1
  54. package/dist/shims/react-hook-form.js +1 -1
  55. package/dist/shims/react-intl.js +1 -1
  56. package/dist/shims/react-jsx-runtime.js +1 -1
  57. package/dist/shims/react-toastify.js +1 -1
  58. package/dist/shims/react.js +1 -1
  59. package/dist/theme.js +1 -1
  60. package/dist/ui.js +2434 -279
  61. package/out/403/index.html +2 -2
  62. package/out/404/index.html +2 -2
  63. package/out/404.html +2 -2
  64. package/out/423/index.html +2 -2
  65. package/out/500/index.html +2 -2
  66. package/out/_next/static/{hH8h6SzcZWEUFySYqRPbW → 9EKCOng_3jDFmFdZSuNp0}/_buildManifest.js +63 -63
  67. package/out/_next/static/chunks/{2l4pfo_tsvn5w.js → 065x9wl2mga3m.js} +2 -2
  68. package/out/_next/static/chunks/{3l1zucp3a411p.js → 07evy5u8ldd1y.js} +2 -2
  69. package/out/_next/static/chunks/{2cmaw01_r48ot.js → 0_o5motvr7gdv.js} +7 -7
  70. package/out/_next/static/chunks/{13__7-sf28ub5.js → 0b28h3157pjxr.js} +2 -2
  71. package/out/_next/static/chunks/{1r7dh_p70r7o8.js → 0bd_--7-52ko6.js} +3 -3
  72. package/out/_next/static/chunks/{2e0dz59httb-e.js → 0bg4_y1qh5y5h.js} +4 -0
  73. package/out/_next/static/chunks/{2d1zehr8zc3vb.js → 0e7hhok2eawc3.js} +2 -2
  74. package/out/_next/static/chunks/{0qq_lp3pk8bjf.js → 0el-98_f_r8ex.js} +4 -4
  75. package/out/_next/static/chunks/{0-cyinqk2ne8t.js → 0g2igd8sj5-gg.js} +3 -3
  76. package/out/_next/static/chunks/{0qh0vqpui2alf.js → 0gx9t6j5kx_ho.js} +2 -2
  77. package/out/_next/static/chunks/{3ulbhhqw8rxd8.js → 0iebz0rtddbw8.js} +3 -3
  78. package/out/_next/static/chunks/0iy11ws57hzzr.js +99 -0
  79. package/out/_next/static/chunks/{1fvr9k_o63j_m.js → 0l4eldqr95f75.js} +3 -3
  80. package/out/_next/static/chunks/{3idwjqiel9n9v.js → 0ld6wd2it3xix.js} +5 -5
  81. package/out/_next/static/chunks/{3wy5jhrulhwb9.js → 0lzvfs3koqtzr.js} +3 -3
  82. package/out/_next/static/chunks/{0kwf2vel2xmdi.js → 0pgpevl26rrte.js} +3 -3
  83. package/out/_next/static/chunks/0r5wwinf72z4g.js +1 -0
  84. package/out/_next/static/chunks/{3m2yam5_cs1h7.js → 0s165pqd53i2e.js} +3 -3
  85. package/out/_next/static/chunks/{3v38tvcona4gy.js → 0v0928tdjepyk.js} +2 -2
  86. package/out/_next/static/chunks/{1qwid0d89bzpw.js → 0x97pf4va0tdj.js} +3 -3
  87. package/out/_next/static/chunks/{0fv1w56e25gt5.js → 10u71-qve349q.js} +3 -3
  88. package/out/_next/static/chunks/{1imv5a-ymrj2t.js → 10vpdjjvq7u53.js} +3 -3
  89. package/out/_next/static/chunks/{355nca7if7l9n.js → 13pcz259h-_kj.js} +2 -2
  90. package/out/_next/static/chunks/{0dewly3vo-mcq.js → 1a5z9hqww-usq.js} +3 -3
  91. package/out/_next/static/chunks/{19ou9pxeiwehs.js → 1feyuu-4twwai.js} +3 -3
  92. package/out/_next/static/chunks/{0sc71p-6lnm1e.js → 1i8wb5lh3jac1.js} +2 -2
  93. package/out/_next/static/chunks/{0nga8f0q2d0bl.js → 1ngpcnj86ohnv.js} +3 -3
  94. package/out/_next/static/chunks/{2nm_wdmfjcbyc.js → 1ocvneidf1syf.js} +4 -4
  95. package/out/_next/static/chunks/{42p2hm8ca34f6.js → 1p639idox1vll.js} +3 -3
  96. package/out/_next/static/chunks/{00tf1qsuwqywe.js → 1q5b4oexneef5.js} +3 -3
  97. package/out/_next/static/chunks/{2v57_n8he320z.js → 1rkg8vhvo8vgz.js} +1 -1
  98. package/out/_next/static/chunks/{0om7fxf5bczpu.js → 1s8vxngh_0xfn.js} +3 -3
  99. package/out/_next/static/chunks/{326rk3t0gtxp_.js → 1tkaly-z0eb-q.js} +3 -3
  100. package/out/_next/static/chunks/{1cfjbvjo0o9fx.js → 1tvr-10z5x0by.js} +1 -1
  101. package/out/_next/static/chunks/{2_l14rwu6kgzl.js → 1z1jxtjhg_5v6.js} +2 -2
  102. package/out/_next/static/chunks/{2tm822rgn8g7-.js → 1zgah7t55d46v.js} +5 -5
  103. package/out/_next/static/chunks/{0208v89kdo_s9.js → 205q4wv45jomk.js} +3 -3
  104. package/out/_next/static/chunks/{3_dqxs_vhmfqd.js → 20usp87kxiivk.js} +3 -3
  105. package/out/_next/static/chunks/{2540mqfxc7ehr.js → 224p31baeu3c3.js} +3 -3
  106. package/out/_next/static/chunks/{3hqec4-3one07.js → 22mj125470p07.js} +3 -3
  107. package/out/_next/static/chunks/{3ls4kv54f3x8u.js → 22ud9v8dzixqk.js} +3 -3
  108. package/out/_next/static/chunks/{339y1tm7s80tn.js → 24mbze45k4evy.js} +9 -9
  109. package/out/_next/static/chunks/{11oq6l46lynfn.js → 26mue2l4069m0.js} +3 -3
  110. package/out/_next/static/chunks/{0_xtedn8e1vu_.js → 26yksvb45bfug.js} +3 -3
  111. package/out/_next/static/chunks/{19pi48hqksvo9.js → 29m1e34-eyni_.js} +2 -2
  112. package/out/_next/static/chunks/{1dqgs827_hiod.js → 2__i5ksblcvil.js} +3 -3
  113. package/out/_next/static/chunks/{3cp9qqljcytup.js → 2d_tll2e3tyei.js} +2 -2
  114. package/out/_next/static/chunks/{0ij8fs6-w0pr_.js → 2dnjzvnx4dg-n.js} +6 -6
  115. package/out/_next/static/chunks/{1rw6681ieb3-5.js → 2f16josk9b_cl.js} +2 -2
  116. package/out/_next/static/chunks/{32te9ivrk54l0.js → 2g7t-73faoik2.js} +3 -3
  117. package/out/_next/static/chunks/{1184evhxs01_c.js → 2hg887w-4-saz.js} +2 -2
  118. package/out/_next/static/chunks/{447b5tn4-avdv.js → 2j3p_ne416507.js} +3 -3
  119. package/out/_next/static/chunks/{1h_o__x8jw8gt.js → 2k5rg3rwz2qz1.js} +3 -3
  120. package/out/_next/static/chunks/2kjux30i3gg-c.js +5 -0
  121. package/out/_next/static/chunks/{3doujqxnfq19f.js → 2lal4ruoql8-s.js} +3 -3
  122. package/out/_next/static/chunks/{0p09_ncs0g7m2.js → 2m4su5mqey5cb.js} +3 -3
  123. package/out/_next/static/chunks/{40s6ngsexc737.js → 2on7of8c32boh.js} +2 -2
  124. package/out/_next/static/chunks/{3il9u-mfrp2sn.js → 2skfzjx2g9hkk.js} +6 -2
  125. package/out/_next/static/chunks/{3grllla8v0ctl.js → 2sw8wfufjrcpb.js} +3 -3
  126. package/out/_next/static/chunks/{11zynllx8mmh5.js → 2szj6o9fr-rib.js} +3 -3
  127. package/out/_next/static/chunks/{0q6-fplpae_ie.js → 2zynam_mr2g6y.js} +9 -9
  128. package/out/_next/static/chunks/{3uytb2p7vzafp.js → 3-xi25w8-k-02.js} +3 -3
  129. package/out/_next/static/chunks/{2-7e3ttj92hfr.js → 32gi2dpw3twz7.js} +3 -3
  130. package/out/_next/static/chunks/348d_4lpnrkzq.js +100 -0
  131. package/out/_next/static/chunks/{0b33bcf7x5rgy.js → 35mb--fw85e9-.js} +3 -3
  132. package/out/_next/static/chunks/{2ork76jhxvxke.js → 360g4b1clnt45.js} +4 -0
  133. package/out/_next/static/chunks/{1fg6jbuxeuj0w.js → 38kjuo_3xeof3.js} +3 -3
  134. package/out/_next/static/chunks/{2t-_fecnp5yzr.js → 3krpx72smyufn.js} +3 -3
  135. package/out/_next/static/chunks/{224ovcn90ebcs.js → 3m2hre_c-kclo.js} +4 -4
  136. package/out/_next/static/chunks/3om1fkw-lrmng.js +1 -0
  137. package/out/_next/static/chunks/{14c_mq04p7pu0.js → 3p0ir-pqcslbi.js} +9 -5
  138. package/out/_next/static/chunks/{2u8ns-x384r3i.js → 3pr477_ci25mm.js} +3 -3
  139. package/out/_next/static/chunks/{2ou2_nhvunq72.js → 3r54d1b_uyq95.js} +5 -5
  140. package/out/_next/static/chunks/{0nlirgt-x5pqr.js → 3rh3nigvg06yu.js} +17 -17
  141. package/out/_next/static/chunks/{2le8e8u2nvp0j.js → 3sc7jsyx25g08.js} +3 -3
  142. package/out/_next/static/chunks/{3yvmkdc088aly.js → 3vjgbl76cgrmt.js} +1 -1
  143. package/out/_next/static/chunks/{3o23w25lfn4mo.js → 3z3k6qx61arup.js} +4 -4
  144. package/out/_next/static/chunks/{1o4hor3cwzcxc.js → 42x9tn0uff92o.js} +3 -3
  145. package/out/_next/static/chunks/{turbopack-2w9_vscbr0eag.js → turbopack-02-k6w2e9_3af.js} +1 -1
  146. package/out/_next/static/chunks/{turbopack-05rmr02n9n2u0.js → turbopack-03fj2scz_09ul.js} +1 -1
  147. package/out/_next/static/chunks/{turbopack-3a196kafnj312.js → turbopack-0_42u9tky4zng.js} +1 -1
  148. package/out/_next/static/chunks/{turbopack-2q65pei-ck559.js → turbopack-0gnmdx6ye6n_e.js} +1 -1
  149. package/out/_next/static/chunks/turbopack-0iozo8xy34oiw.js +1 -0
  150. package/out/_next/static/chunks/{turbopack-1azvbmrq_bxq7.js → turbopack-0rb_mm-wnau-3.js} +1 -1
  151. package/out/_next/static/chunks/{turbopack-1rdxfvyldfwrq.js → turbopack-0v5-op7r79bhf.js} +1 -1
  152. package/out/_next/static/chunks/{turbopack-3a6igydfvv1_v.js → turbopack-0zf_85we0x_rs.js} +1 -1
  153. package/out/_next/static/chunks/{turbopack-0k8oea6xmzbjh.js → turbopack-1-ukcimwb2wq1.js} +1 -1
  154. package/out/_next/static/chunks/{turbopack-0xgswwqf_4vrt.js → turbopack-10anz7o9kcb98.js} +1 -1
  155. package/out/_next/static/chunks/{turbopack-1g8mmayckmfib.js → turbopack-12-4lgc8wbnmx.js} +1 -1
  156. package/out/_next/static/chunks/{turbopack-2z2joyd6mdhpo.js → turbopack-14bpgd3qmna2b.js} +1 -1
  157. package/out/_next/static/chunks/{turbopack-0s-h1cgwrfgo-.js → turbopack-16ecm5pf7vta6.js} +1 -1
  158. package/out/_next/static/chunks/{turbopack-425nfopoa8wxd.js → turbopack-16gej7p33tsw5.js} +1 -1
  159. package/out/_next/static/chunks/{turbopack-0qxkaq0f9ka24.js → turbopack-1iglf5syrme2d.js} +1 -1
  160. package/out/_next/static/chunks/{turbopack-0dj-aua684j9c.js → turbopack-1l2mxrtt6fj2q.js} +1 -1
  161. package/out/_next/static/chunks/{turbopack-298vdad77pw5z.js → turbopack-1nwkuzx-97xdl.js} +1 -1
  162. package/out/_next/static/chunks/{turbopack-3bnkwdcrz_ts-.js → turbopack-1od40dnbx8fg3.js} +1 -1
  163. package/out/_next/static/chunks/{turbopack-02cmv-knpzk52.js → turbopack-1qg_72lzl6ek8.js} +1 -1
  164. package/out/_next/static/chunks/{turbopack-2gehqsln39zg1.js → turbopack-1rmjnbaunrx2u.js} +1 -1
  165. package/out/_next/static/chunks/{turbopack-1p11xfz8qe15i.js → turbopack-1wpa09idv1cyh.js} +1 -1
  166. package/out/_next/static/chunks/{turbopack-3vncwrj5x9j44.js → turbopack-1ykuk8u3enawr.js} +1 -1
  167. package/out/_next/static/chunks/{turbopack-07fw0g9aver98.js → turbopack-21_p8k9zs76-x.js} +1 -1
  168. package/out/_next/static/chunks/{turbopack-2it1jk212m2ud.js → turbopack-220rj632xmu2e.js} +1 -1
  169. package/out/_next/static/chunks/{turbopack-2sqnlbl-ardf7.js → turbopack-22p012gdqk61c.js} +1 -1
  170. package/out/_next/static/chunks/{turbopack-3yk72bgipb8hc.js → turbopack-25j7jj4dskbwu.js} +1 -1
  171. package/out/_next/static/chunks/{turbopack-0ricnx7znhztj.js → turbopack-27pc-r2lunwha.js} +1 -1
  172. package/out/_next/static/chunks/{turbopack-3uc-2ah0uehj3.js → turbopack-2bb143jjb45b6.js} +1 -1
  173. package/out/_next/static/chunks/{turbopack-3nta8sa99guti.js → turbopack-2esinq43hb-vc.js} +1 -1
  174. package/out/_next/static/chunks/{turbopack-3hsu2nw8qlox4.js → turbopack-2g3vf-v8r3qd2.js} +1 -1
  175. package/out/_next/static/chunks/{turbopack-2l-gbnaw39ht4.js → turbopack-2gxln6h99_6pp.js} +1 -1
  176. package/out/_next/static/chunks/{turbopack-3wxlut7e7jmsi.js → turbopack-2j5sxbr_zaxjf.js} +1 -1
  177. package/out/_next/static/chunks/{turbopack-08x92457_z4ve.js → turbopack-2j61phdts4xpn.js} +1 -1
  178. package/out/_next/static/chunks/{turbopack-0a2sfur4bx222.js → turbopack-2nd6qjscj3z2p.js} +1 -1
  179. package/out/_next/static/chunks/{turbopack-3r9uyzwi0dtwb.js → turbopack-2o76al0gsswxo.js} +1 -1
  180. package/out/_next/static/chunks/{turbopack-2n2ksqygaakbh.js → turbopack-2pe-c3nyyswmm.js} +1 -1
  181. package/out/_next/static/chunks/{turbopack-0h5lj7lnf9_tb.js → turbopack-2tz1t67cqt8ex.js} +1 -1
  182. package/out/_next/static/chunks/{turbopack-1y3x6n223v6d1.js → turbopack-2u-4w10t8mu6i.js} +1 -1
  183. package/out/_next/static/chunks/{turbopack-2068cl63o32re.js → turbopack-2u879ap4um9kt.js} +1 -1
  184. package/out/_next/static/chunks/{turbopack-3iiyu2cek78ut.js → turbopack-2ubl1vyufevbf.js} +1 -1
  185. package/out/_next/static/chunks/{turbopack-2d5v28yt0xnri.js → turbopack-2x85w-5txf7i5.js} +1 -1
  186. package/out/_next/static/chunks/{turbopack-3ww1zabqxbxit.js → turbopack-32oolm1x2hqm8.js} +1 -1
  187. package/out/_next/static/chunks/{turbopack-2hj-ffuco6-u7.js → turbopack-32unbrrzdhim9.js} +1 -1
  188. package/out/_next/static/chunks/{turbopack-2dicmowo2x4t1.js → turbopack-37e-e484qmc03.js} +1 -1
  189. package/out/_next/static/chunks/{turbopack-3r17oio1oe7jw.js → turbopack-3aa45-9tjh99k.js} +1 -1
  190. package/out/_next/static/chunks/turbopack-3d9zuhypuljic.js +1 -0
  191. package/out/_next/static/chunks/{turbopack-1td004byboyz2.js → turbopack-3dl00zga30bss.js} +1 -1
  192. package/out/_next/static/chunks/{turbopack-35awx_qvevnch.js → turbopack-3f06s1e12y6j9.js} +1 -1
  193. package/out/_next/static/chunks/{turbopack-14rn07-ki7f_7.js → turbopack-3g98_iakkqypg.js} +1 -1
  194. package/out/_next/static/chunks/{turbopack-1r_uprn020kr7.js → turbopack-3j4bdo8-ldea5.js} +1 -1
  195. package/out/_next/static/chunks/{turbopack-3458e7jmj1e27.js → turbopack-3l3o1x7j1z_63.js} +1 -1
  196. package/out/_next/static/chunks/{turbopack-1330tdm8r390q.js → turbopack-3lm631px3s8-4.js} +1 -1
  197. package/out/_next/static/chunks/{turbopack-0m1qzkhnpuk2j.js → turbopack-3mwf6he42ff9n.js} +1 -1
  198. package/out/_next/static/chunks/{turbopack-1csu0s9cycwgo.js → turbopack-3oih6rrmvb7t3.js} +1 -1
  199. package/out/_next/static/chunks/{turbopack-338xrj-0fpsqu.js → turbopack-3oq88d3632ksa.js} +1 -1
  200. package/out/_next/static/chunks/{turbopack-2t6ex34_bkvoe.js → turbopack-3q1s32jzw2pnu.js} +1 -1
  201. package/out/_next/static/chunks/{turbopack-351l-va10h8kw.js → turbopack-3snas0eww9sey.js} +1 -1
  202. package/out/_next/static/chunks/{turbopack-3tntqotcyx6oq.js → turbopack-3tg-pp9_bemtn.js} +1 -1
  203. package/out/_next/static/chunks/{turbopack-0n73ad0fad4yl.js → turbopack-3tlngjwse53m1.js} +1 -1
  204. package/out/_next/static/chunks/{turbopack-0b-g0lpiikryt.js → turbopack-3tp3s3o8o9e-_.js} +1 -1
  205. package/out/_next/static/chunks/{turbopack-1hty_7i5tzg63.js → turbopack-3tyhe6yjnx5h6.js} +1 -1
  206. package/out/_next/static/chunks/{turbopack-3uvfl95p1ubqn.js → turbopack-3v3wnwaeu0os5.js} +1 -1
  207. package/out/_next/static/chunks/{turbopack-2mbsjg411_ndq.js → turbopack-3xc_rmnnnzfkm.js} +1 -1
  208. package/out/_next/static/chunks/{turbopack-1bjaxey2pj8nn.js → turbopack-4592lth1oe0jg.js} +1 -1
  209. package/out/_offline/index.html +2 -2
  210. package/out/account/forgot-password/index.html +2 -2
  211. package/out/account/index.html +2 -2
  212. package/out/assortments/AssortmentDetailPage/index.html +2 -2
  213. package/out/assortments/index.html +2 -2
  214. package/out/assortments/new/index.html +2 -2
  215. package/out/copilot/index.html +2 -2
  216. package/out/country/CountryDetailPage/index.html +2 -2
  217. package/out/country/index.html +2 -2
  218. package/out/country/new/index.html +2 -2
  219. package/out/currency/CurrencyDetailPage/index.html +2 -2
  220. package/out/currency/index.html +2 -2
  221. package/out/currency/new/index.html +2 -2
  222. package/out/delivery-provider/DeliveryProviderDetailPage/index.html +2 -2
  223. package/out/delivery-provider/index.html +2 -2
  224. package/out/delivery-provider/new/index.html +2 -2
  225. package/out/enrollments/EnrollmentDetailPage/index.html +2 -2
  226. package/out/enrollments/index.html +2 -2
  227. package/out/events/EventDetailPage/index.html +2 -2
  228. package/out/events/index.html +2 -2
  229. package/out/exports/index.html +2 -2
  230. package/out/ext/[[...slug]]/index.html +2 -2
  231. package/out/external/index.html +2 -2
  232. package/out/filters/FilterDetailPage/index.html +2 -2
  233. package/out/filters/index.html +2 -2
  234. package/out/filters/new/index.html +2 -2
  235. package/out/index.html +2 -2
  236. package/out/install/index.html +2 -2
  237. package/out/language/LanguageDetailPage/index.html +2 -2
  238. package/out/language/index.html +2 -2
  239. package/out/language/new/index.html +2 -2
  240. package/out/log-in/index.html +2 -2
  241. package/out/orders/OrderDetailPage/index.html +2 -2
  242. package/out/orders/index.html +2 -2
  243. package/out/payment-provider/PaymentProviderDetailPage/index.html +2 -2
  244. package/out/payment-provider/index.html +2 -2
  245. package/out/payment-provider/new/index.html +2 -2
  246. package/out/products/ProductDetailPage/index.html +2 -2
  247. package/out/products/index.html +2 -2
  248. package/out/products/new/index.html +2 -2
  249. package/out/quotations/QuotationDetailPage/index.html +2 -2
  250. package/out/quotations/index.html +2 -2
  251. package/out/reset-password/index.html +2 -2
  252. package/out/sign-up/index.html +2 -2
  253. package/out/styleguide/index.html +2 -2
  254. package/out/tokens/TokenDetailPage/index.html +2 -2
  255. package/out/tokens/index.html +2 -2
  256. package/out/users/UserDetailPage/index.html +2 -2
  257. package/out/users/index.html +2 -2
  258. package/out/users/new/index.html +2 -2
  259. package/out/verify-email/index.html +2 -2
  260. package/out/warehousing-provider/WarehousingProviderDetailPage/index.html +2 -2
  261. package/out/warehousing-provider/index.html +2 -2
  262. package/out/warehousing-provider/new/index.html +2 -2
  263. package/out/works/WorkDetailPage/index.html +2 -2
  264. package/out/works/WorkQueueListView/index.html +2 -2
  265. package/out/works/index.html +2 -2
  266. package/out/works/management/index.html +2 -2
  267. package/package.json +1 -1
  268. package/src/sdk/README.md +1 -1
  269. package/src/sdk/plugin-build.mjs +4 -2
  270. package/src/sdk/plugin-build.test.mjs +33 -1
  271. package/dist/chunk-2RTX42IE.js +0 -2083
  272. package/dist/chunk-YZGQJJCD.js +0 -37
  273. package/out/_next/static/chunks/2_vu2hve2j-6g.js +0 -5
  274. package/out/_next/static/chunks/2dvrbmh97duba.js +0 -1
  275. package/out/_next/static/chunks/2pf0d3jgcae7b.js +0 -99
  276. package/out/_next/static/chunks/2rve5gtfjiz-p.js +0 -100
  277. package/out/_next/static/chunks/3cq123yj25_36.js +0 -1
  278. package/out/_next/static/chunks/turbopack-3rgdcfralfvsa.js +0 -1
  279. package/out/_next/static/chunks/turbopack-4025_4zwqnrk-.js +0 -1
  280. /package/out/_next/static/{hH8h6SzcZWEUFySYqRPbW → 9EKCOng_3jDFmFdZSuNp0}/_clientMiddlewareManifest.js +0 -0
  281. /package/out/_next/static/{hH8h6SzcZWEUFySYqRPbW → 9EKCOng_3jDFmFdZSuNp0}/_ssgManifest.js +0 -0
@@ -1,4 +1,4 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,62274,72419,23745,e=>{"use strict";var s=e.i(91398),a=e.i(91788);let t=a.forwardRef(function({title:e,titleId:s,...t},l){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:l,"aria-labelledby":s},t),e?a.createElement("title",{id:s},e):null,a.createElement("path",{fillRule:"evenodd",d:"M1 4a1 1 0 0 1 1-1h16a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V4Zm12 4a3 3 0 1 1-6 0 3 3 0 0 1 6 0ZM4 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm13-1a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM1.75 14.5a.75.75 0 0 0 0 1.5c4.417 0 8.693.603 12.749 1.73 1.111.309 2.251-.512 2.251-1.696v-.784a.75.75 0 0 0-1.5 0v.784a.272.272 0 0 1-.35.25A49.043 49.043 0 0 0 1.75 14.5Z",clipRule:"evenodd"}))});var l=e.i(27572),d=e.i(64710);let r=a.forwardRef(function({title:e,titleId:s,...t},l){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:l,"aria-labelledby":s},t),e?a.createElement("title",{id:s},e):null,a.createElement("path",{fillRule:"evenodd",d:"M10 1a4.5 4.5 0 0 0-4.5 4.5V9H5a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-6a2 2 0 0 0-2-2h-.5V5.5A4.5 4.5 0 0 0 10 1Zm3 8V5.5a3 3 0 1 0-6 0V9h6Z",clipRule:"evenodd"}))});var i=e.i(61113),n=e.i(76929),u=e.i(94330);let o=a.forwardRef(function({title:e,titleId:s,...t},l){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:l,"aria-labelledby":s},t),e?a.createElement("title",{id:s},e):null,a.createElement("path",{d:"M1 1.75A.75.75 0 0 1 1.75 1h1.628a1.75 1.75 0 0 1 1.734 1.51L5.18 3a65.25 65.25 0 0 1 13.36 1.412.75.75 0 0 1 .58.875 48.645 48.645 0 0 1-1.618 6.2.75.75 0 0 1-.712.513H6a2.503 2.503 0 0 0-2.292 1.5H17.25a.75.75 0 0 1 0 1.5H2.76a.75.75 0 0 1-.748-.807 4.002 4.002 0 0 1 2.716-3.486L3.626 2.716a.25.25 0 0 0-.248-.216H1.75A.75.75 0 0 1 1 1.75ZM6 17.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0ZM15.5 19a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"}))}),c=a.forwardRef(function({title:e,titleId:s,...t},l){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:l,"aria-labelledby":s},t),e?a.createElement("title",{id:s},e):null,a.createElement("path",{d:"M10 8a3 3 0 1 0 0-6 3 3 0 0 0 0 6ZM3.465 14.493a1.23 1.23 0 0 0 .41 1.412A9.957 9.957 0 0 0 10 18c2.31 0 4.438-.784 6.131-2.1.43-.333.604-.903.408-1.41a7.002 7.002 0 0 0-13.074.003Z"}))}),m=a.forwardRef(function({title:e,titleId:s,...t},l){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:l,"aria-labelledby":s},t),e?a.createElement("title",{id:s},e):null,a.createElement("path",{d:"M10.75 10.818v2.614A3.13 3.13 0 0 0 11.888 13c.482-.315.612-.648.612-.875 0-.227-.13-.56-.612-.875a3.13 3.13 0 0 0-1.138-.432ZM8.33 8.62c.053.055.115.11.184.164.208.16.46.284.736.363V6.603a2.45 2.45 0 0 0-.35.13c-.14.065-.27.143-.386.233-.377.292-.514.627-.514.909 0 .184.058.39.202.592.037.051.08.102.128.152Z"}),a.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-8-6a.75.75 0 0 1 .75.75v.316a3.78 3.78 0 0 1 1.653.713c.426.33.744.74.925 1.2a.75.75 0 0 1-1.395.55 1.35 1.35 0 0 0-.447-.563 2.187 2.187 0 0 0-.736-.363V9.3c.698.093 1.383.32 1.959.696.787.514 1.29 1.27 1.29 2.13 0 .86-.504 1.616-1.29 2.13-.576.377-1.261.603-1.96.696v.299a.75.75 0 1 1-1.5 0v-.3c-.697-.092-1.382-.318-1.958-.695-.482-.315-.857-.717-1.078-1.188a.75.75 0 1 1 1.359-.636c.08.173.245.376.54.569.313.205.706.353 1.138.432v-2.748a3.782 3.782 0 0 1-1.653-.713C6.9 9.433 6.5 8.681 6.5 7.875c0-.805.4-1.558 1.097-2.096a3.78 3.78 0 0 1 1.653-.713V4.75A.75.75 0 0 1 10 4Z",clipRule:"evenodd"}))}),f=a.forwardRef(function({title:e,titleId:s,...t},l){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:l,"aria-labelledby":s},t),e?a.createElement("title",{id:s},e):null,a.createElement("path",{fillRule:"evenodd",d:"M15.988 3.012A2.25 2.25 0 0 1 18 5.25v6.5A2.25 2.25 0 0 1 15.75 14H13.5v-3.379a3 3 0 0 0-.879-2.121l-3.12-3.121a3 3 0 0 0-1.402-.791 2.252 2.252 0 0 1 1.913-1.576A2.25 2.25 0 0 1 12.25 1h1.5a2.25 2.25 0 0 1 2.238 2.012ZM11.5 3.25a.75.75 0 0 1 .75-.75h1.5a.75.75 0 0 1 .75.75v.25h-3v-.25Z",clipRule:"evenodd"}),a.createElement("path",{d:"M3.5 6A1.5 1.5 0 0 0 2 7.5v9A1.5 1.5 0 0 0 3.5 18h7a1.5 1.5 0 0 0 1.5-1.5v-5.879a1.5 1.5 0 0 0-.44-1.06L8.44 6.439A1.5 1.5 0 0 0 7.378 6H3.5Z"}))});var x=e.i(69322);e.i(51523);var g=e.i(19518),h=e.i(13534),p=e.i(70475),b=e.i(31494),v=e.i(84818),w=e.i(83147);let j=({label:e,value:a})=>(0,s.jsxs)("div",{className:"flex flex-col md:flex-row md:items-center md:justify-between mb-3",children:[(0,s.jsx)("label",{className:"text-sm text-text-secondary mb-1 md:mb-0 md:mr-4",children:e}),(0,s.jsx)("span",{className:"text-sm text-right text-text-primary",children:a})]}),y=({loginData:e})=>{let{formatMessage:a,locale:t}=(0,x.useIntl)(),{formatDateTime:l}=(0,v.default)();return e?(0,s.jsxs)("div",{className:"bg-surface rounded-lg shadow-sm overflow-hidden mt-4 p-4",children:[(0,s.jsx)(j,{label:a({id:"country",defaultMessage:"Country"}),value:e?.countryCode&&(0,w.normalizeCountryISOCode)(t,e?.countryCode)}),(0,s.jsx)(j,{label:a({id:"language",defaultMessage:"Language"}),value:e?.locale&&(0,w.normalizeLanguageISOCode)(t,e.locale?.split("_")[0])}),(0,s.jsx)(j,{label:a({id:"browser",defaultMessage:"Browser"}),value:e.userAgent}),(0,s.jsx)(j,{label:a({id:"ip",defaultMessage:"IP Address"}),value:e.remoteAddress}),(0,s.jsx)(j,{label:a({id:"time",defaultMessage:"Time"}),value:e.timestamp?l(e?.timestamp,{dateStyle:"short",timeStyle:"short"}):"n/a"})]}):null},N=({firstName:e,lastName:a,company:t,addressLine:l,addressLine2:d,postalCode:r,countryCode:i,regionCode:n,city:u})=>{let{formatMessage:o,locale:c}=(0,x.useIntl)();return(0,s.jsxs)("div",{className:"bg-surface rounded-lg shadow-sm overflow-hidden mt-4 p-4",children:[(0,s.jsx)(j,{label:o({id:"fullName",defaultMessage:"FullName"}),value:`${e||""} ${a||""}`}),(0,s.jsx)(j,{label:o({id:"company",defaultMessage:"Company"}),value:t}),(0,s.jsx)(j,{label:o({id:"address",defaultMessage:"Address"}),value:l}),(0,s.jsx)(j,{label:o({id:"address2",defaultMessage:"Address 2"}),value:d}),(0,s.jsx)(j,{label:o({id:"postal_code",defaultMessage:"Postal/ZIP code"}),value:r}),(0,s.jsx)(j,{label:o({id:"country",defaultMessage:"Country"}),value:(0,w.normalizeCountryISOCode)(c,i)}),(0,s.jsx)(j,{label:o({id:"city",defaultMessage:"City"}),value:u}),(0,s.jsx)(j,{label:o({id:"region",defaultMessage:"Region"}),value:n})]})},M=({lastBillingAddress:e,lastLogin:a})=>(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"row",children:(0,s.jsx)(y,{loginData:a})}),(0,s.jsx)("div",{className:"row",children:(0,s.jsx)(N,{...e})})]});var _=e.i(53576),I=e.i(56779),C=e.i(59080),A=e.i(32171),k=g,$=e.i(54529),U=e.i(57561);let S=C.gql`
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,62274,72419,23745,e=>{"use strict";var s=e.i(91398),a=e.i(91788);let t=a.forwardRef(function({title:e,titleId:s,...t},l){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:l,"aria-labelledby":s},t),e?a.createElement("title",{id:s},e):null,a.createElement("path",{fillRule:"evenodd",d:"M1 4a1 1 0 0 1 1-1h16a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V4Zm12 4a3 3 0 1 1-6 0 3 3 0 0 1 6 0ZM4 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm13-1a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM1.75 14.5a.75.75 0 0 0 0 1.5c4.417 0 8.693.603 12.749 1.73 1.111.309 2.251-.512 2.251-1.696v-.784a.75.75 0 0 0-1.5 0v.784a.272.272 0 0 1-.35.25A49.043 49.043 0 0 0 1.75 14.5Z",clipRule:"evenodd"}))});var l=e.i(27572),r=e.i(64710);let d=a.forwardRef(function({title:e,titleId:s,...t},l){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:l,"aria-labelledby":s},t),e?a.createElement("title",{id:s},e):null,a.createElement("path",{fillRule:"evenodd",d:"M10 1a4.5 4.5 0 0 0-4.5 4.5V9H5a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-6a2 2 0 0 0-2-2h-.5V5.5A4.5 4.5 0 0 0 10 1Zm3 8V5.5a3 3 0 1 0-6 0V9h6Z",clipRule:"evenodd"}))});var i=e.i(61113),n=e.i(76929),u=e.i(94330);let o=a.forwardRef(function({title:e,titleId:s,...t},l){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:l,"aria-labelledby":s},t),e?a.createElement("title",{id:s},e):null,a.createElement("path",{d:"M1 1.75A.75.75 0 0 1 1.75 1h1.628a1.75 1.75 0 0 1 1.734 1.51L5.18 3a65.25 65.25 0 0 1 13.36 1.412.75.75 0 0 1 .58.875 48.645 48.645 0 0 1-1.618 6.2.75.75 0 0 1-.712.513H6a2.503 2.503 0 0 0-2.292 1.5H17.25a.75.75 0 0 1 0 1.5H2.76a.75.75 0 0 1-.748-.807 4.002 4.002 0 0 1 2.716-3.486L3.626 2.716a.25.25 0 0 0-.248-.216H1.75A.75.75 0 0 1 1 1.75ZM6 17.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0ZM15.5 19a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"}))}),c=a.forwardRef(function({title:e,titleId:s,...t},l){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:l,"aria-labelledby":s},t),e?a.createElement("title",{id:s},e):null,a.createElement("path",{d:"M10 8a3 3 0 1 0 0-6 3 3 0 0 0 0 6ZM3.465 14.493a1.23 1.23 0 0 0 .41 1.412A9.957 9.957 0 0 0 10 18c2.31 0 4.438-.784 6.131-2.1.43-.333.604-.903.408-1.41a7.002 7.002 0 0 0-13.074.003Z"}))}),m=a.forwardRef(function({title:e,titleId:s,...t},l){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:l,"aria-labelledby":s},t),e?a.createElement("title",{id:s},e):null,a.createElement("path",{d:"M10.75 10.818v2.614A3.13 3.13 0 0 0 11.888 13c.482-.315.612-.648.612-.875 0-.227-.13-.56-.612-.875a3.13 3.13 0 0 0-1.138-.432ZM8.33 8.62c.053.055.115.11.184.164.208.16.46.284.736.363V6.603a2.45 2.45 0 0 0-.35.13c-.14.065-.27.143-.386.233-.377.292-.514.627-.514.909 0 .184.058.39.202.592.037.051.08.102.128.152Z"}),a.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-8-6a.75.75 0 0 1 .75.75v.316a3.78 3.78 0 0 1 1.653.713c.426.33.744.74.925 1.2a.75.75 0 0 1-1.395.55 1.35 1.35 0 0 0-.447-.563 2.187 2.187 0 0 0-.736-.363V9.3c.698.093 1.383.32 1.959.696.787.514 1.29 1.27 1.29 2.13 0 .86-.504 1.616-1.29 2.13-.576.377-1.261.603-1.96.696v.299a.75.75 0 1 1-1.5 0v-.3c-.697-.092-1.382-.318-1.958-.695-.482-.315-.857-.717-1.078-1.188a.75.75 0 1 1 1.359-.636c.08.173.245.376.54.569.313.205.706.353 1.138.432v-2.748a3.782 3.782 0 0 1-1.653-.713C6.9 9.433 6.5 8.681 6.5 7.875c0-.805.4-1.558 1.097-2.096a3.78 3.78 0 0 1 1.653-.713V4.75A.75.75 0 0 1 10 4Z",clipRule:"evenodd"}))}),f=a.forwardRef(function({title:e,titleId:s,...t},l){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:l,"aria-labelledby":s},t),e?a.createElement("title",{id:s},e):null,a.createElement("path",{fillRule:"evenodd",d:"M15.988 3.012A2.25 2.25 0 0 1 18 5.25v6.5A2.25 2.25 0 0 1 15.75 14H13.5v-3.379a3 3 0 0 0-.879-2.121l-3.12-3.121a3 3 0 0 0-1.402-.791 2.252 2.252 0 0 1 1.913-1.576A2.25 2.25 0 0 1 12.25 1h1.5a2.25 2.25 0 0 1 2.238 2.012ZM11.5 3.25a.75.75 0 0 1 .75-.75h1.5a.75.75 0 0 1 .75.75v.25h-3v-.25Z",clipRule:"evenodd"}),a.createElement("path",{d:"M3.5 6A1.5 1.5 0 0 0 2 7.5v9A1.5 1.5 0 0 0 3.5 18h7a1.5 1.5 0 0 0 1.5-1.5v-5.879a1.5 1.5 0 0 0-.44-1.06L8.44 6.439A1.5 1.5 0 0 0 7.378 6H3.5Z"}))});var x=e.i(69322);e.i(51523);var g=e.i(19518),h=e.i(13534),p=e.i(70475),b=e.i(31494),v=e.i(84818),w=e.i(83147);let j=({label:e,value:a})=>(0,s.jsxs)("div",{className:"flex flex-col md:flex-row md:items-center md:justify-between mb-3",children:[(0,s.jsx)("label",{className:"text-sm text-text-secondary mb-1 md:mb-0 md:mr-4",children:e}),(0,s.jsx)("span",{className:"text-sm text-right text-text-primary",children:a})]}),y=({loginData:e})=>{let{formatMessage:a,locale:t}=(0,x.useIntl)(),{formatDateTime:l}=(0,v.default)();return e?(0,s.jsxs)("div",{className:"bg-surface rounded-lg shadow-sm overflow-hidden mt-4 p-4",children:[(0,s.jsx)(j,{label:a({id:"country",defaultMessage:"Country"}),value:e?.countryCode&&(0,w.normalizeCountryISOCode)(t,e?.countryCode)}),(0,s.jsx)(j,{label:a({id:"language",defaultMessage:"Language"}),value:e?.locale&&(0,w.normalizeLanguageISOCode)(t,e.locale?.split("_")[0])}),(0,s.jsx)(j,{label:a({id:"browser",defaultMessage:"Browser"}),value:e.userAgent}),(0,s.jsx)(j,{label:a({id:"ip",defaultMessage:"IP Address"}),value:e.remoteAddress}),(0,s.jsx)(j,{label:a({id:"time",defaultMessage:"Time"}),value:e.timestamp?l(e?.timestamp,{dateStyle:"short",timeStyle:"short"}):"n/a"})]}):null},N=({firstName:e,lastName:a,company:t,addressLine:l,addressLine2:r,postalCode:d,countryCode:i,regionCode:n,city:u})=>{let{formatMessage:o,locale:c}=(0,x.useIntl)();return(0,s.jsxs)("div",{className:"bg-surface rounded-lg shadow-sm overflow-hidden mt-4 p-4",children:[(0,s.jsx)(j,{label:o({id:"fullName",defaultMessage:"FullName"}),value:`${e||""} ${a||""}`}),(0,s.jsx)(j,{label:o({id:"company",defaultMessage:"Company"}),value:t}),(0,s.jsx)(j,{label:o({id:"address",defaultMessage:"Address"}),value:l}),(0,s.jsx)(j,{label:o({id:"address2",defaultMessage:"Address 2"}),value:r}),(0,s.jsx)(j,{label:o({id:"postal_code",defaultMessage:"Postal/ZIP code"}),value:d}),(0,s.jsx)(j,{label:o({id:"country",defaultMessage:"Country"}),value:(0,w.normalizeCountryISOCode)(c,i)}),(0,s.jsx)(j,{label:o({id:"city",defaultMessage:"City"}),value:u}),(0,s.jsx)(j,{label:o({id:"region",defaultMessage:"Region"}),value:n})]})},M=({lastBillingAddress:e,lastLogin:a})=>(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"row",children:(0,s.jsx)(y,{loginData:a})}),(0,s.jsx)("div",{className:"row",children:(0,s.jsx)(N,{...e})})]});var _=e.i(53576),I=e.i(56779),C=e.i(59080),A=e.i(32171),k=g,$=e.i(54529),U=e.i(57561);let S=C.gql`
2
2
  query UserProductReviews(
3
3
  $userId: ID!
4
4
  $limit: Int
@@ -37,7 +37,7 @@
37
37
  }
38
38
  }
39
39
  ${$.default}
40
- `;var E=e.i(2194),R=e.i(66859);let P=({reviews:e,className:a="",enableDelete:t=!1,showProduct:l=!1})=>{let{formatMessage:d}=(0,x.useIntl)();return e&&e.length?(0,s.jsx)("div",{className:`${a||""} `,children:e.map(e=>(0,s.jsx)(R.default,{showProduct:l,review:e,enableDelete:t},e._id))}):(0,s.jsx)(E.default,{message:d({id:"reviews",defaultMessage:"Reviews"})})};var q=e.i(21623);let V=({_id:e})=>{let{formatMessage:a}=(0,x.useIntl)(),{reviews:t,loadMore:l,reviewsCount:d}=(({userId:e=null,limit:s=10,offset:a=0,sort:t=[{key:"created",value:k.ISortDirection.Desc}]})=>{let{selectedLocale:l}=(0,U.default)(),{data:d,loading:r,error:i,fetchMore:n}=(0,A.useQuery)(S,{skip:!e,variables:{userId:e,limit:s,offset:a,sort:t,forceLocale:l}}),u=d?.user,o=u?.reviews||[];return{reviews:o,loading:r,error:i,loadMore:()=>{n({variables:{offset:o?.length}})},reviewsCount:u?.reviewsCount||0}})({userId:e});return(0,s.jsxs)("div",{className:"space-y-4 mt-4",children:[(0,s.jsx)(P,{reviews:t,enableDelete:!0,showProduct:!0}),d>t?.length?(0,s.jsx)(q.default,{text:a({id:"load-more-reviews",defaultMessage:"Load reviews"}),className:"",onClick:l}):null]})};var L=e.i(58971),D=e.i(60195),T=e.i(51870),O=e.i(28401),F=e.i(69211),Z=e.i(63094),W=e.i(56985),Q=e.i(21128),B=e.i(98949),z=e.i(76204);let H=C.gql`
40
+ `;var E=e.i(2194),R=e.i(66859);let P=({reviews:e,className:a="",enableDelete:t=!1,showProduct:l=!1})=>{let{formatMessage:r}=(0,x.useIntl)();return e&&e.length?(0,s.jsx)("div",{className:`${a||""} `,children:e.map(e=>(0,s.jsx)(R.default,{showProduct:l,review:e,enableDelete:t},e._id))}):(0,s.jsx)(E.default,{message:r({id:"reviews",defaultMessage:"Reviews"})})};var q=e.i(21623);let V=({_id:e})=>{let{formatMessage:a}=(0,x.useIntl)(),{reviews:t,loadMore:l,reviewsCount:r}=(({userId:e=null,limit:s=10,offset:a=0,sort:t=[{key:"created",value:k.ISortDirection.Desc}]})=>{let{selectedLocale:l}=(0,U.default)(),{data:r,loading:d,error:i,fetchMore:n}=(0,A.useQuery)(S,{skip:!e,variables:{userId:e,limit:s,offset:a,sort:t,forceLocale:l}}),u=r?.user,o=u?.reviews||[];return{reviews:o,loading:d,error:i,loadMore:()=>{n({variables:{offset:o?.length}})},reviewsCount:u?.reviewsCount||0}})({userId:e});return(0,s.jsxs)("div",{className:"space-y-4 mt-4",children:[(0,s.jsx)(P,{reviews:t,enableDelete:!0,showProduct:!0}),r>t?.length?(0,s.jsx)(q.default,{text:a({id:"load-more-reviews",defaultMessage:"Load reviews"}),className:"",onClick:l}):null]})};var L=e.i(58971),D=e.i(60195),T=e.i(51870),O=e.i(28401),F=e.i(69211),Z=e.i(63094),W=e.i(56985),Q=e.i(21128),B=e.i(98949),z=e.i(76204);let H=C.gql`
41
41
  mutation ChangePassword($oldPassword: String!, $newPassword: String!) {
42
42
  changePassword(oldPassword: $oldPassword, newPassword: $newPassword) {
43
43
  success
@@ -61,39 +61,39 @@
61
61
  success
62
62
  }
63
63
  }
64
- `;var es=e.i(6607),ea=e.i(15971),et=e.i(46758),el=e.i(24557);let ed=({emails:e,userId:a,enableVerification:t,emailBodyContainer:l,canUpdate:d=!1,canSendVerification:r=!1})=>{let{removeEmail:i}=(()=>{let[e]=(0,z.useMutation)(X);return{removeEmail:async({email:s,userId:a})=>e({variables:{email:s,userId:a},refetchQueries:["UserPermissions","User","CurrentUser"]})}})(),{sendVerificationEmail:n}=(()=>{let[e]=(0,z.useMutation)(ee);return{sendVerificationEmail:async({email:s})=>e({variables:{email:s}})}})(),{addEmail:u}=(()=>{let[e]=(0,z.useMutation)(J);return{addEmail:async({email:s,userId:a})=>e({variables:{email:s,userId:a},refetchQueries:["UserPermissions","User","CurrentUser"]})}})(),{formatMessage:o}=(0,x.useIntl)(),{setModal:c}=(0,es.default)(),m=async({email:e})=>(await u({email:e,userId:a}),{success:!0}),f=async({email:e})=>{await c((0,s.jsx)(ea.default,{onCancelClick:async()=>c(""),message:o({id:"delete_email_confirmation",defaultMessage:"This action might cause inconsistencies with other data that relates to it. Are you sure you want to delete this email? "}),onOkClick:async()=>{c("");try{await i({email:e,userId:a}),O.toast.success(o({id:"email_deleted",defaultMessage:"email {id} deleted successfully"},{id:a}))}catch(s){let e=s?.errors?.[0];O.toast.error(e?.message||s.message)}},okText:o({id:"delete_email",defaultMessage:"Delete email"})}))},g=async({email:e})=>{try{let{data:s}=await n({email:e});s.sendVerificationEmail.success?O.toast.success(o({id:"verification_sent_success",defaultMessage:"Verification email sent successfully "})):O.toast.error(o({id:"verification_sent_error",defaultMessage:"Error occurred while sending verification email, please try again"}))}catch(s){let e=s?.errors?.[0];O.toast.error(e?.message||s.message)}},h=o({id:"email_added",defaultMessage:"Email added successfully!"}),p=(0,B.default)({submit:m,successMessage:h,enableReinitialize:!0,initialValues:{email:""}});return(0,s.jsxs)("div",{className:(0,K.default)("rounded-md shadow-sm px-4 py-5 sm:p-6 bg-surface",l),children:[(0,s.jsx)("ul",{className:"-my-5 divide-y divide-slate-200 dark:divide-slate-700",children:(e||[]).map(({address:e,verified:a})=>(0,s.jsx)("li",{className:"py-4",children:(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between",children:[(0,s.jsxs)("div",{className:"mr-2 flex max-w-md flex-wrap items-center space-x-2",children:[(0,s.jsx)("div",{className:"truncate text-sm font-medium text-text-primary",children:e}),(0,s.jsx)(et.default,{isActive:a,activeText:o({id:"verified",defaultMessage:"Verified"}),inActiveText:o({id:"unverified",defaultMessage:"Unverified"})})]}),(0,s.jsxs)("div",{className:"my-1 flex items-center cursor-pointer",children:[t&&!a&&r&&(0,s.jsx)("a",{id:"send_verification_mail",onClick:async()=>{await g({email:e})},className:"inline-flex items-center rounded-md dark:text-slate-500 dark:hover:text-slate-200 border border-border-default bg-surface px-4 py-2 text-sm font-medium text-slate-700 shadow-xs hover:bg-slate-50 focus:outline-hidden focus:ring-2 focus:ring-focus-ring focus:ring-offset-2",children:o({id:"send_verification_mail",defaultMessage:"Send verification mail"})}),d&&(0,s.jsx)(q.default,{variant:"danger",size:"xs",rounded:"full",icon:(0,s.jsx)(el.TrashIcon,{className:"h-5 w-5"}),className:"ml-2",onClick:()=>f({email:e})})]})]})},e))}),d&&(0,s.jsxs)(F.default,{form:p,children:[(0,s.jsx)("div",{className:"mt-4 border-t border-t-border-subtle",children:(0,s.jsxs)("div",{className:"items-between mt-4 flex space-x-4",children:[(0,s.jsx)(Y.default,{className:"mt-0",name:"email",required:!0,label:o({id:"email",defaultMessage:"Email"})}),(0,s.jsx)("span",{className:"shrink-0 flex items-end",children:(0,s.jsx)(Q.default,{className:"py-2 leading-5",label:o({id:"add_email",defaultMessage:"Add email"})})})]})}),(0,s.jsx)(Z.default,{})]})]})};var er=e.i(21056);let ei=C.gql`
64
+ `;var es=e.i(6607),ea=e.i(15971),et=e.i(46758),el=e.i(24557);let er=({emails:e,userId:a,enableVerification:t,emailBodyContainer:l,canUpdate:r=!1,canSendVerification:d=!1})=>{let{removeEmail:i}=(()=>{let[e]=(0,z.useMutation)(X);return{removeEmail:async({email:s,userId:a})=>e({variables:{email:s,userId:a},refetchQueries:["UserPermissions","User","CurrentUser"]})}})(),{sendVerificationEmail:n}=(()=>{let[e]=(0,z.useMutation)(ee);return{sendVerificationEmail:async({email:s})=>e({variables:{email:s}})}})(),{addEmail:u}=(()=>{let[e]=(0,z.useMutation)(J);return{addEmail:async({email:s,userId:a})=>e({variables:{email:s,userId:a},refetchQueries:["UserPermissions","User","CurrentUser"]})}})(),{formatMessage:o}=(0,x.useIntl)(),{setModal:c}=(0,es.default)(),m=async({email:e})=>(await u({email:e,userId:a}),{success:!0}),f=async({email:e})=>{await c((0,s.jsx)(ea.default,{onCancelClick:async()=>c(""),message:o({id:"delete_email_confirmation",defaultMessage:"This action might cause inconsistencies with other data that relates to it. Are you sure you want to delete this email? "}),onOkClick:async()=>{c("");try{await i({email:e,userId:a}),O.toast.success(o({id:"email_deleted",defaultMessage:"email {id} deleted successfully"},{id:a}))}catch(s){let e=s?.errors?.[0];O.toast.error(e?.message||s.message)}},okText:o({id:"delete_email",defaultMessage:"Delete email"})}))},g=async({email:e})=>{try{let{data:s}=await n({email:e});s.sendVerificationEmail.success?O.toast.success(o({id:"verification_sent_success",defaultMessage:"Verification email sent successfully "})):O.toast.error(o({id:"verification_sent_error",defaultMessage:"Error occurred while sending verification email, please try again"}))}catch(s){let e=s?.errors?.[0];O.toast.error(e?.message||s.message)}},h=o({id:"email_added",defaultMessage:"Email added successfully!"}),p=(0,B.default)({submit:m,successMessage:h,enableReinitialize:!0,initialValues:{email:""}});return(0,s.jsxs)("div",{className:(0,K.default)("rounded-md shadow-sm px-4 py-5 sm:p-6 bg-surface",l),children:[(0,s.jsx)("ul",{className:"-my-5 divide-y divide-slate-200 dark:divide-slate-700",children:(e||[]).map(({address:e,verified:a})=>(0,s.jsx)("li",{className:"py-4",children:(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between",children:[(0,s.jsxs)("div",{className:"mr-2 flex max-w-md flex-wrap items-center space-x-2",children:[(0,s.jsx)("div",{className:"truncate text-sm font-medium text-text-primary",children:e}),(0,s.jsx)(et.default,{isActive:a,activeText:o({id:"verified",defaultMessage:"Verified"}),inActiveText:o({id:"unverified",defaultMessage:"Unverified"})})]}),(0,s.jsxs)("div",{className:"my-1 flex items-center cursor-pointer",children:[t&&!a&&d&&(0,s.jsx)("a",{id:"send_verification_mail",onClick:async()=>{await g({email:e})},className:"inline-flex items-center rounded-md dark:text-slate-500 dark:hover:text-slate-200 border border-border-default bg-surface px-4 py-2 text-sm font-medium text-slate-700 shadow-xs hover:bg-slate-50 focus:outline-hidden focus:ring-2 focus:ring-focus-ring focus:ring-offset-2",children:o({id:"send_verification_mail",defaultMessage:"Send verification mail"})}),r&&(0,s.jsx)(q.default,{variant:"danger",size:"xs",rounded:"full",icon:(0,s.jsx)(el.TrashIcon,{className:"h-5 w-5"}),className:"ml-2",onClick:()=>f({email:e})})]})]})},e))}),r&&(0,s.jsxs)(F.default,{form:p,children:[(0,s.jsx)("div",{className:"mt-4 border-t border-t-border-subtle",children:(0,s.jsxs)("div",{className:"items-between mt-4 flex space-x-4",children:[(0,s.jsx)(Y.default,{className:"mt-0",name:"email",required:!0,label:o({id:"email",defaultMessage:"Email"})}),(0,s.jsx)("span",{className:"shrink-0 flex items-end",children:(0,s.jsx)(Q.default,{className:"py-2 leading-5",label:o({id:"add_email",defaultMessage:"Add email"})})})]})}),(0,s.jsx)(Z.default,{})]})]})};var ed=e.i(21056);let ei=C.gql`
65
65
  mutation SetPassword($newPlainPassword: String!, $userId: ID!) {
66
66
  setPassword(newPassword: $newPlainPassword, userId: $userId) {
67
67
  _id
68
68
  }
69
69
  }
70
- `,en=({userId:e,isInitialPassword:a,primaryEmail:t,canUpdate:l=!1,canSendEnrollmentEmail:d=!1})=>{let{setPassword:r}=(()=>{let[e]=(0,z.useMutation)(ei);return{setPassword:async({newPlainPassword:s,userId:a})=>e({variables:{newPlainPassword:s,userId:a},refetchQueries:["UserPermissions","User","CurrentUser"]})}})(),{formatMessage:i}=(0,x.useIntl)(),{sendEnrollmentEmail:n}=(0,er.default)(),u=async({newPassword:s})=>{let{data:a}=await r({newPlainPassword:s,userId:e});return{success:!0,data:a?.setPassword}},o=async()=>{try{let{data:e}=await n({email:t.address});e?.sendEnrollmentEmail?.success?O.toast.success(i({id:"enrollment_success",defaultMessage:"Email sent to the user successfully"})):O.toast.error(i({id:"enrollment_error",defaultMessage:"Failed sending email, please try again"}))}catch(s){let e=s?.errors?.[0];O.toast.error(e?.message||s.message)}},c=(0,B.default)({submit:u,enableReinitialize:!0,onSubmitSuccess:()=>(O.toast.success(i({id:"password_success",defaultMessage:"Password changed successfully."})),null),initialValues:{newPassword:""}});return(0,s.jsxs)(F.default,{form:c,children:[(0,s.jsxs)("div",{className:"relative max-w-full space-y-6 sm:p-6",children:[(0,s.jsx)(W.default,{label:i({id:"new_password",defaultMessage:"New password"}),placeholder:i({id:"new_password",defaultMessage:"New password"}),name:"newPassword",id:"newPassword",required:!0,className:"text-sm"}),(0,s.jsx)(Z.default,{})]}),(0,s.jsxs)("div",{className:"border-t-slate-100 border-t align-baseline flex items-center justify-between dark:border-t-slate-700 space-y-6 bg-surface text-right sm:p-6",children:[a&&d&&(0,s.jsx)(q.default,{text:i({id:"send__enrollment_email_button",defaultMessage:"Send enrollment Email"}),className:"mt-4",onClick:o}),l&&(0,s.jsx)(Q.default,{label:i({id:"change_password",defaultMessage:"Change password"})})]})]})},eu=C.gql`
70
+ `,en=({userId:e,isInitialPassword:a,primaryEmail:t,canUpdate:l=!1,canSendEnrollmentEmail:r=!1})=>{let{setPassword:d}=(()=>{let[e]=(0,z.useMutation)(ei);return{setPassword:async({newPlainPassword:s,userId:a})=>e({variables:{newPlainPassword:s,userId:a},refetchQueries:["UserPermissions","User","CurrentUser"]})}})(),{formatMessage:i}=(0,x.useIntl)(),{sendEnrollmentEmail:n}=(0,ed.default)(),u=async({newPassword:s})=>{let{data:a}=await d({newPlainPassword:s,userId:e});return{success:!0,data:a?.setPassword}},o=async()=>{try{let{data:e}=await n({email:t.address});e?.sendEnrollmentEmail?.success?O.toast.success(i({id:"enrollment_success",defaultMessage:"Email sent to the user successfully"})):O.toast.error(i({id:"enrollment_error",defaultMessage:"Failed sending email, please try again"}))}catch(s){let e=s?.errors?.[0];O.toast.error(e?.message||s.message)}},c=(0,B.default)({submit:u,enableReinitialize:!0,onSubmitSuccess:()=>(O.toast.success(i({id:"password_success",defaultMessage:"Password changed successfully."})),null),initialValues:{newPassword:""}});return(0,s.jsxs)(F.default,{form:c,children:[(0,s.jsxs)("div",{className:"relative max-w-full space-y-6 sm:p-6",children:[(0,s.jsx)(W.default,{label:i({id:"new_password",defaultMessage:"New password"}),placeholder:i({id:"new_password",defaultMessage:"New password"}),name:"newPassword",id:"newPassword",required:!0,className:"text-sm"}),(0,s.jsx)(Z.default,{})]}),(0,s.jsxs)("div",{className:"border-t-slate-100 border-t align-baseline flex items-center justify-between dark:border-t-slate-700 space-y-6 bg-surface text-right sm:p-6",children:[a&&r&&(0,s.jsx)(q.default,{text:i({id:"send__enrollment_email_button",defaultMessage:"Send enrollment Email"}),className:"mt-4",onClick:o}),l&&(0,s.jsx)(Q.default,{label:i({id:"change_password",defaultMessage:"Change password"})})]})]})},eu=C.gql`
71
71
  mutation SetUsername($username: String!, $userId: ID!) {
72
72
  setUsername(username: $username, userId: $userId) {
73
73
  _id
74
74
  }
75
75
  }
76
- `,eo=({_id:e,username:t,canEdit:l=!1})=>{let{setUserName:d}=(()=>{let[e]=(0,z.useMutation)(eu);return{setUserName:async({username:s,userId:a})=>e({variables:{username:s,userId:a},refetchQueries:["UserPermissions","User","CurrentUser"]})}})(),[r,i]=(0,a.useState)(!1),{formatMessage:n}=(0,x.useIntl)(),u=async({username:s})=>{let a=await d({username:s,userId:e});return i(!1),{success:!0,data:a}},o=n({id:"username_updated",defaultMessage:"Username updated successfully!"}),c=(0,B.default)({submit:u,getSubmitErrorMessage:e=>e?.message?.toLowerCase().includes("duplicate")?n({id:"username_exists_error",defaultMessage:"Username is taken please provide another"}):e?.message||"",successMessage:o,initialValues:{username:t}});return(0,s.jsx)(F.default,{form:c,children:(0,s.jsx)("dl",{className:"divide-y divide-slate-200",children:(0,s.jsxs)("div",{className:"flex flex-wrap justify-between items-center sm:gap-4",children:[(0,s.jsxs)("div",{className:"flex flex-wrap justify-between items-center sm:gap-4 text-sm text-text-muted",children:[!r&&n({id:"username",defaultMessage:"Username"}),(0,s.jsx)("span",{className:"grow",children:r?(0,s.jsx)(Y.default,{className:"mt-0",name:"username",required:!0,label:n({id:"username",defaultMessage:"Username"})}):(0,s.jsx)("div",{className:"text-base font-medium text-text-primary",children:t})})]}),(0,s.jsxs)("div",{className:"flex flex-wrap items-baseline gap-4 text-sm sm:col-span-2 sm:mt-0 sm:gap-0",children:[(0,s.jsx)(Z.default,{}),l&&(0,s.jsxs)("span",{className:"flex shrink-0 items-center space-x-4",children:[(0,s.jsx)("button",{"data-id":"cancel_update",onClick:()=>i(!r),type:"button",className:(0,K.default)(r?"":"focus:ring-focus-ring","inline-flex items-center rounded-md border border-border-default bg-surface px-4 py-2 text-sm font-medium text-text-secondary shadow-xs hover:bg-surface-raised focus:outline-hidden focus:ring-2 focus:ring-focus-ring focus:ring-offset-2"),children:r?n({id:"cancel",defaultMessage:"Cancel"}):n({id:"update",defaultMessage:"Update"})}),r&&(0,s.jsx)("button",{type:"submit",className:"inline-flex items-center rounded-md border border-transparent bg-accent px-4 py-2 text-sm font-medium text-text-on-accent shadow-xs hover:bg-accent-hover focus:outline-hidden focus:ring-2 focus:ring-focus-ring focus:ring-offset-2",children:n({id:"save",defaultMessage:"Save"})})]})]})]})})})},ec=C.gql`
76
+ `,eo=({_id:e,username:t,canEdit:l=!1})=>{let{setUserName:r}=(()=>{let[e]=(0,z.useMutation)(eu);return{setUserName:async({username:s,userId:a})=>e({variables:{username:s,userId:a},refetchQueries:["UserPermissions","User","CurrentUser"]})}})(),[d,i]=(0,a.useState)(!1),{formatMessage:n}=(0,x.useIntl)(),u=async({username:s})=>{let a=await r({username:s,userId:e});return i(!1),{success:!0,data:a}},o=n({id:"username_updated",defaultMessage:"Username updated successfully!"}),c=(0,B.default)({submit:u,getSubmitErrorMessage:e=>e?.message?.toLowerCase().includes("duplicate")?n({id:"username_exists_error",defaultMessage:"Username is taken please provide another"}):e?.message||"",successMessage:o,initialValues:{username:t}});return(0,s.jsx)(F.default,{form:c,children:(0,s.jsx)("dl",{className:"divide-y divide-slate-200",children:(0,s.jsxs)("div",{className:"flex flex-wrap justify-between items-center sm:gap-4",children:[(0,s.jsxs)("div",{className:"flex flex-wrap justify-between items-center sm:gap-4 text-sm text-text-muted",children:[!d&&n({id:"username",defaultMessage:"Username"}),(0,s.jsx)("span",{className:"grow",children:d?(0,s.jsx)(Y.default,{className:"mt-0",name:"username",required:!0,label:n({id:"username",defaultMessage:"Username"})}):(0,s.jsx)("div",{className:"text-base font-medium text-text-primary",children:t})})]}),(0,s.jsxs)("div",{className:"flex flex-wrap items-baseline gap-4 text-sm sm:col-span-2 sm:mt-0 sm:gap-0",children:[(0,s.jsx)(Z.default,{}),l&&(0,s.jsxs)("span",{className:"flex shrink-0 items-center space-x-4",children:[(0,s.jsx)("button",{"data-id":"cancel_update",onClick:()=>i(!d),type:"button",className:(0,K.default)(d?"":"focus:ring-focus-ring","inline-flex items-center rounded-md border border-border-default bg-surface px-4 py-2 text-sm font-medium text-text-secondary shadow-xs hover:bg-surface-raised focus:outline-hidden focus:ring-2 focus:ring-focus-ring focus:ring-offset-2"),children:d?n({id:"cancel",defaultMessage:"Cancel"}):n({id:"update",defaultMessage:"Update"})}),d&&(0,s.jsx)("button",{type:"submit",className:"inline-flex items-center rounded-md border border-transparent bg-accent px-4 py-2 text-sm font-medium text-text-on-accent shadow-xs hover:bg-accent-hover focus:outline-hidden focus:ring-2 focus:ring-focus-ring focus:ring-offset-2",children:n({id:"save",defaultMessage:"Save"})})]})]})]})})})},ec=C.gql`
77
77
  query SystemRoles {
78
78
  shopInfo {
79
79
  _id
80
80
  userRoles
81
81
  }
82
82
  }
83
- `;var em=e.i(60741);let ef=({multiple:e,options:a,...t})=>{let l=(0,em.default)({multiple:e,options:a,...t}),{choiceClassName:d="col-md-6 col-lg-4'",choiceContainerClassName:r="",labelClassName:i="",inputClassName:n=""}=t,u="string"==typeof l.value?[l.value]:l.value,{className:o,hideLabel:c}=t;return(0,s.jsxs)("div",{className:(0,K.default)("container",o,{"is-invalid":!!l.error,disabled:l.disabled,required:l.required}),children:[(0,s.jsx)("label",{className:(0,K.default)("text-sm",o,{"text-rose-600":!!l.error,"sr-only":c}),children:l.label}),(0,s.jsx)("div",{className:(0,K.default)(`row flex flex-row gap-3 ${r}`,o),children:Object.entries(l.options).map(([e,a])=>(0,s.jsx)("div",{className:(0,K.default)(`-ml-2 ${d}`,o),children:(0,s.jsxs)("label",{htmlFor:`${l.name}-${e}`,className:(0,K.default)("",i),children:[(0,s.jsx)("input",{value:e,checked:u.includes(e),className:(0,K.default)("mr-2 h-4 w-4 rounded-sm border-border-default bg-white dark:!bg-slate-800 text-slate-950 focus:ring-focus-ring",n),disabled:l.disabled,id:`${l.name}-${e}`,name:l.name,onChange:l.onChange,type:l.multiple?"checkbox":"radio"}),(0,s.jsx)("span",{children:a})]})},e))})]})},ex=C.gql`
83
+ `;var em=e.i(60741);let ef=({multiple:e,options:a,...t})=>{let l=(0,em.default)({multiple:e,options:a,...t}),{choiceClassName:r="col-md-6 col-lg-4'",choiceContainerClassName:d="",labelClassName:i="",inputClassName:n=""}=t,u="string"==typeof l.value?[l.value]:Array.isArray(l.value)?l.value:[],o=e=>{if(l.multiple){let s=e.target.value,a=e.target.checked?[...u,s]:u.filter(e=>e!==s);l.setValue(a,!0)}else l.onChange(e)},{className:c,hideLabel:m}=t;return(0,s.jsxs)("div",{className:(0,K.default)("container",c,{"is-invalid":!!l.error,disabled:l.disabled,required:l.required}),children:[(0,s.jsx)("label",{className:(0,K.default)("text-sm",c,{"text-rose-600":!!l.error,"sr-only":m}),children:l.label}),(0,s.jsx)("div",{className:(0,K.default)(`row flex flex-row gap-3 ${d}`,c),children:Object.entries(l.options).map(([e,a])=>(0,s.jsx)("div",{className:(0,K.default)(`-ml-2 ${r}`,c),children:(0,s.jsxs)("label",{htmlFor:`${l.name}-${e}`,className:(0,K.default)("",i),children:[(0,s.jsx)("input",{value:e,checked:u.includes(e),className:(0,K.default)("mr-2 h-4 w-4 rounded-sm border-border-default bg-white dark:!bg-slate-800 text-slate-950 focus:ring-focus-ring",n),disabled:l.disabled,id:`${l.name}-${e}`,name:l.name,onChange:o,type:l.multiple?"checkbox":"radio"}),(0,s.jsx)("span",{children:a})]})},e))})]})},ex=C.gql`
84
84
  mutation SetRoles($roles: [String!]!, $userId: ID!) {
85
85
  setRoles(roles: $roles, userId: $userId) {
86
86
  _id
87
87
  }
88
88
  }
89
- `;var eg=e.i(22422);let eh=(e,s)=>{let a=eg.CombinedGraphQLErrors.is(e)?e.errors[0]:e;return a?.extensions?.code==="LastAdminError"?s({id:"last_admin_required",defaultMessage:"You can't delete the only active administrator or revoke their admin role. Assign the admin role to another active user first."}):a?.message||s({id:"error-something-went-wrong",defaultMessage:"Unable to complete the task successfully. Please try again."})};e.s(["default",0,eh],72419);let ep=({roles:e,userId:a,canEdit:t=!1})=>{let{formatMessage:l}=(0,x.useIntl)(),{setRoles:d}=(()=>{let[e]=(0,z.useMutation)(ex);return{setRoles:async({roles:s=[],userId:a=null})=>e({variables:{roles:s,userId:a},refetchQueries:["UserPermissions","User","CurrentUser"]})}})(),{systemRoles:r}=(()=>{let{data:e,loading:s,error:a}=(0,A.useQuery)(ec);return{systemRoles:e?.shopInfo?.userRoles||[],loading:s,error:a}})(),i=async({updatedRoles:e})=>(await d({roles:e,userId:a}),{success:!0}),n=l({id:"role_updated",defaultMessage:"Role updated successfully!"}),u=(0,B.default)({submit:i,successMessage:n,getSubmitErrorMessage:e=>eh(e,l),initialValues:{updatedRoles:[...e||[]]}});return(0,s.jsxs)(F.default,{form:u,className:"flex justify-between align-top gap-4",children:[(0,s.jsx)(ef,{name:"updatedRoles",labelClassName:"flex items-center mt-1",choiceContainerClassName:"flex flex-wrap",inputClassName:"ml-2",options:Object.fromEntries((r||[]).map(e=>[e,e])),label:l({id:"select_role",defaultMessage:"Select role"}),placeholder:l({id:"select_role",defaultMessage:"Select role"}),multiple:!0,disabled:!t},"user-roles"),(0,s.jsx)(Z.default,{}),t&&(0,s.jsx)(Q.default,{label:l({id:"update_role",defaultMessage:"Update role"})})]})},eb=C.gql`
89
+ `;var eg=e.i(22422);let eh=(e,s)=>{let a=eg.CombinedGraphQLErrors.is(e)?e.errors[0]:e;return a?.extensions?.code==="LastAdminError"?s({id:"last_admin_required",defaultMessage:"You can't delete the only active administrator or revoke their admin role. Assign the admin role to another active user first."}):a?.message||s({id:"error-something-went-wrong",defaultMessage:"Unable to complete the task successfully. Please try again."})};e.s(["default",0,eh],72419);let ep=({roles:e,userId:a,canEdit:t=!1})=>{let{formatMessage:l}=(0,x.useIntl)(),{setRoles:r}=(()=>{let[e]=(0,z.useMutation)(ex);return{setRoles:async({roles:s=[],userId:a=null})=>e({variables:{roles:s,userId:a},refetchQueries:["UserPermissions","User","CurrentUser"]})}})(),{systemRoles:d}=(()=>{let{data:e,loading:s,error:a}=(0,A.useQuery)(ec);return{systemRoles:e?.shopInfo?.userRoles||[],loading:s,error:a}})(),i=async({updatedRoles:e})=>(await r({roles:e,userId:a}),{success:!0}),n=l({id:"role_updated",defaultMessage:"Role updated successfully!"}),u=(0,B.default)({submit:i,successMessage:n,getSubmitErrorMessage:e=>eh(e,l),initialValues:{updatedRoles:[...e||[]]}});return(0,s.jsxs)(F.default,{form:u,className:"flex justify-between align-top gap-4",children:[(0,s.jsx)(ef,{name:"updatedRoles",labelClassName:"flex items-center mt-1",choiceContainerClassName:"flex flex-wrap",inputClassName:"ml-2",options:Object.fromEntries((d||[]).map(e=>[e,e])),label:l({id:"select_role",defaultMessage:"Select role"}),placeholder:l({id:"select_role",defaultMessage:"Select role"}),multiple:!0,disabled:!t},"user-roles"),(0,s.jsx)(Z.default,{}),t&&(0,s.jsx)(Q.default,{label:l({id:"update_role",defaultMessage:"Update role"})})]})},eb=C.gql`
90
90
  mutation SetUserTags($tags: [LowerCaseString]!, $userId: ID!) {
91
91
  setUserTags(tags: $tags, userId: $userId) {
92
92
  _id
93
93
  tags
94
94
  }
95
95
  }
96
- `;var ev=e.i(34948);let ew=({tags:e=[],userId:a,canEdit:t=!1})=>{let{setUserTags:l}=(()=>{let[e]=(0,z.useMutation)(eb);return{setUserTags:async({tags:s=[],userId:a=null})=>e({variables:{tags:s,userId:a},refetchQueries:["Users","UserPermissions","User","CurrentUser","ShopStatus","ShopInfo"]})}})(),{shopInfo:d}=(0,U.default)(),r=async({tags:e})=>{await l({tags:e,userId:a})};return(0,s.jsx)(ev.default,{defaultValue:e,onSubmit:r,enableEdit:t,availableTagOptions:d?.adminUiConfig?.userTags?.filter(s=>!(e||[])?.includes(s))?.map(e=>({label:e,value:e}))||[]})};var ej=e.i(2228),ey=e.i(73298);let eN=C.gql`
96
+ `;var ev=e.i(34948);let ew=({tags:e=[],userId:a,canEdit:t=!1})=>{let{setUserTags:l}=(()=>{let[e]=(0,z.useMutation)(eb);return{setUserTags:async({tags:s=[],userId:a=null})=>e({variables:{tags:s,userId:a},refetchQueries:["Users","UserPermissions","User","CurrentUser","ShopStatus","ShopInfo"]})}})(),{shopInfo:r}=(0,U.default)(),d=async({tags:e})=>{await l({tags:e,userId:a})};return(0,s.jsx)(ev.default,{defaultValue:e,onSubmit:d,enableEdit:t,availableTagOptions:r?.adminUiConfig?.userTags?.filter(s=>!(e||[])?.includes(s))?.map(e=>({label:e,value:e}))||[]})};var ej=e.i(2228),ey=e.i(73298);let eN=C.gql`
97
97
  mutation AddWebAuthnCredentials($credentials: JSON!) {
98
98
  addWebAuthnCredentials(credentials: $credentials) {
99
99
  ...UserFragment
@@ -133,7 +133,7 @@
133
133
  }
134
134
  }
135
135
  ${ej.default}
136
- `;var eC=e.i(42469),eA=e.i(87284),ek=e.i(16509);let e$=({_id:e,aaguid:a,counter:t,created:l,md5Metadata:d,onRemoveCredential:r,removeDisabled:i})=>{let{formatMessage:n}=(0,x.useIntl)(),{formatDateTime:u}=(0,v.default)();return(0,s.jsxs)("li",{className:"col-span-1 flex shadow-xs rounded-md ",children:[d?.icon&&(0,s.jsx)("div",{className:"shrink-0 flex items-center justify-center w-16 text-sm font-medium rounded-l-md",children:(0,s.jsx)(eA.default,{className:"inline-block h-10 w-10 rounded-full border-1",src:d?.icon,loader:ek.default,width:36,height:36,alt:n({id:"web_auth_icon",defaultMessage:"Auth icon"})})}),(0,s.jsxs)("div",{className:"flex-1 flex items-center justify-between border-t border-r border-b border-slate-300 dark:bg-slate-800 bg-white rounded-r-md truncate dark:text-slate-200",children:[(0,s.jsxs)("div",{className:"flex-1 px-4 py-2 text-sm truncate",children:[(0,s.jsx)("span",{className:"text-text-primary font-medium ",children:a}),(0,s.jsx)("div",{className:"mt-1 mb-1",children:d?.description}),(0,s.jsx)("div",{children:(0,s.jsx)(eC.default,{text:t})})]}),(0,s.jsxs)("div",{className:"shrink-0 pr-2 justify-between h-100 text-right",children:[(0,s.jsx)("div",{children:u(l)}),!i&&(0,s.jsx)("div",{className:"align-bottom",children:(0,s.jsx)(q.default,{variant:"danger",size:"xs",rounded:"full",icon:(0,s.jsx)(el.TrashIcon,{className:"h-5 w-5"}),onClick:()=>r(e)})})]})]})]})},eU=({userId:e})=>{let{formatMessage:t}=(0,x.useIntl)(),{currentUser:l}=(0,T.default)(),{addWebAuthnCredentials:d}=(()=>{let[e]=(0,z.useMutation)(eN);return{addWebAuthnCredentials:async({credentials:s})=>e({variables:{credentials:s}})}})(),{webAuthnCredentials:r}=(({userId:e})=>{let{data:s,loading:a,error:t}=(0,A.useQuery)(eI,{variables:{userId:e}});return{webAuthnCredentials:s?.user?.webAuthnCredentials,loading:a,error:t}})({userId:e}),{setModal:i}=(0,es.default)(),{generateWebAuthCredentials:n}=(0,eM.default)(),{removeWebAuthCredentials:u}=(()=>{let[e]=(0,z.useMutation)(e_);return{removeWebAuthCredentials:async({credentialsId:s})=>e({variables:{credentialsId:s}})}})(),o=async e=>{await i((0,s.jsx)(ea.default,{onCancelClick:async()=>i(""),message:t({id:"delete_web_auth_credential",defaultMessage:"Are you sure you want to unlink this device from your account?"}),onOkClick:async()=>{i(""),await u({credentialsId:e}),O.toast.success(t({id:"web_auth_credential_removed",defaultMessage:"Credential removed successfully"}))}}))},c=async()=>{if(!l.username)return void O.toast.error(t({id:"web_auth_username_required",defaultMessage:"A username is required to use WebAuthn"}));let e=await n({username:l.username});await d({credentials:e})};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{children:(0,s.jsx)("ul",{className:"border-slate-300 divide-slate-200",children:r?.map(s=>(0,a.createElement)(e$,{md5Metadata:s?.mdsMetadata,...s,key:s?._id,onRemoveCredential:o,removeDisabled:e!==l?._id}))})}),(0,s.jsx)("button",{type:"button",disabled:e!==l?._id,className:(0,K.default)("inline-flex cursor-pointer ml-4 justify-center rounded-md border border-transparent px-4 py-2 text-center text-sm font-medium leading-5 text-white shadow-xs focus:ring-focus-ring bg-slate-800 hover:bg-slate-950 focus:outline-hidden focus:ring-2 focus:ring-offset-2",{"focus:ring-focus-ring bg-slate-400 hover:bg-slate-300":e!==l?._id}),onClick:c,children:t({id:"add_web_auth",defaultMessage:"Add WebAuth"})})]})},eS=C.gql`
136
+ `;var eC=e.i(42469),eA=e.i(87284),ek=e.i(16509);let e$=({_id:e,aaguid:a,counter:t,created:l,md5Metadata:r,onRemoveCredential:d,removeDisabled:i})=>{let{formatMessage:n}=(0,x.useIntl)(),{formatDateTime:u}=(0,v.default)();return(0,s.jsxs)("li",{className:"col-span-1 flex shadow-xs rounded-md ",children:[r?.icon&&(0,s.jsx)("div",{className:"shrink-0 flex items-center justify-center w-16 text-sm font-medium rounded-l-md",children:(0,s.jsx)(eA.default,{className:"inline-block h-10 w-10 rounded-full border-1",src:r?.icon,loader:ek.default,width:36,height:36,alt:n({id:"web_auth_icon",defaultMessage:"Auth icon"})})}),(0,s.jsxs)("div",{className:"flex-1 flex items-center justify-between border-t border-r border-b border-slate-300 dark:bg-slate-800 bg-white rounded-r-md truncate dark:text-slate-200",children:[(0,s.jsxs)("div",{className:"flex-1 px-4 py-2 text-sm truncate",children:[(0,s.jsx)("span",{className:"text-text-primary font-medium ",children:a}),(0,s.jsx)("div",{className:"mt-1 mb-1",children:r?.description}),(0,s.jsx)("div",{children:(0,s.jsx)(eC.default,{text:t})})]}),(0,s.jsxs)("div",{className:"shrink-0 pr-2 justify-between h-100 text-right",children:[(0,s.jsx)("div",{children:u(l)}),!i&&(0,s.jsx)("div",{className:"align-bottom",children:(0,s.jsx)(q.default,{variant:"danger",size:"xs",rounded:"full",icon:(0,s.jsx)(el.TrashIcon,{className:"h-5 w-5"}),onClick:()=>d(e)})})]})]})]})},eU=({userId:e})=>{let{formatMessage:t}=(0,x.useIntl)(),{currentUser:l}=(0,T.default)(),{addWebAuthnCredentials:r}=(()=>{let[e]=(0,z.useMutation)(eN);return{addWebAuthnCredentials:async({credentials:s})=>e({variables:{credentials:s}})}})(),{webAuthnCredentials:d}=(({userId:e})=>{let{data:s,loading:a,error:t}=(0,A.useQuery)(eI,{variables:{userId:e}});return{webAuthnCredentials:s?.user?.webAuthnCredentials,loading:a,error:t}})({userId:e}),{setModal:i}=(0,es.default)(),{generateWebAuthCredentials:n}=(0,eM.default)(),{removeWebAuthCredentials:u}=(()=>{let[e]=(0,z.useMutation)(e_);return{removeWebAuthCredentials:async({credentialsId:s})=>e({variables:{credentialsId:s}})}})(),o=async e=>{await i((0,s.jsx)(ea.default,{onCancelClick:async()=>i(""),message:t({id:"delete_web_auth_credential",defaultMessage:"Are you sure you want to unlink this device from your account?"}),onOkClick:async()=>{i(""),await u({credentialsId:e}),O.toast.success(t({id:"web_auth_credential_removed",defaultMessage:"Credential removed successfully"}))}}))},c=async()=>{if(!l.username)return void O.toast.error(t({id:"web_auth_username_required",defaultMessage:"A username is required to use WebAuthn"}));let e=await n({username:l.username});await r({credentials:e})};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{children:(0,s.jsx)("ul",{className:"border-slate-300 divide-slate-200",children:d?.map(s=>(0,a.createElement)(e$,{md5Metadata:s?.mdsMetadata,...s,key:s?._id,onRemoveCredential:o,removeDisabled:e!==l?._id}))})}),(0,s.jsx)("button",{type:"button",disabled:e!==l?._id,className:(0,K.default)("inline-flex cursor-pointer ml-4 justify-center rounded-md border border-transparent px-4 py-2 text-center text-sm font-medium leading-5 text-white shadow-xs focus:ring-focus-ring bg-slate-800 hover:bg-slate-950 focus:outline-hidden focus:ring-2 focus:ring-offset-2",{"focus:ring-focus-ring bg-slate-400 hover:bg-slate-300":e!==l?._id}),onClick:c,children:t({id:"add_web_auth",defaultMessage:"Add WebAuth"})})]})},eS=C.gql`
137
137
  mutation RemoveWeb3Address($address: String!) {
138
138
  removeWeb3Address(address: $address) {
139
139
  ...UserFragment
@@ -154,13 +154,13 @@
154
154
  }
155
155
  }
156
156
  ${ey.default}
157
- `,eV=({nonce:e,address:a,close:t})=>{let{formatMessage:l}=(0,x.useIntl)(),{verifyWeb3Address:d}=(()=>{let[e]=(0,z.useMutation)(eq);return{verifyWeb3Address:async({address:s,hash:a})=>e({variables:{address:s,hash:a}})}})(),r=l({id:"web3_verified_success",defaultMessage:"Address verified successfully!"}),i=async({hash:e})=>(await d({hash:e,address:a}),t(),{success:!0}),n=(0,B.default)({submit:i,successMessage:r,enableReinitialize:!0,getSubmitErrorMessage:e=>(e?.message?.toLowerCase().includes("signature does not match web3 account")&&n.api.setFieldError("hash",l({id:"signature_not_match_error",defaultMessage:"Signature does not match"})),e?.message?.toLowerCase().includes("invalid signature length")&&n.api.setFieldError("hash",l({id:"invalid_signature_length",defaultMessage:"Invalid signature"})),l({id:"invalid_signature_length",defaultMessage:"Invalid signature"})),initialValues:{hash:""}});return(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"border-b border-slate-300 bg-white mb",children:(0,s.jsxs)("div",{className:"-ml-4 -mt-4 flex flex-wrap items-center justify-between sm:flex-nowrap",children:[(0,s.jsxs)("div",{className:"ml-4 mt-4",children:[(0,s.jsx)("h3",{className:"text-lg font-medium leading-6 text-slate-900",children:l({id:"sign_address_header",defaultMessage:"Sign address"})}),(0,s.jsx)("p",{className:"mt-1 text-sm text-slate-500 mb-4",children:(0,s.jsx)(x.FormattedMessage,{id:"web3_address_signature_instruction",defaultMessage:"<p>Copy the following nonce <b> ({nonce})</b> and past the signature on the space provided below </p>",values:{p:e=>(0,s.jsxs)("p",{children:[e," "]}),b:e=>(0,s.jsxs)("b",{className:"border-l text-2xl",children:[e," "]}),nonce:e}})})]}),(0,s.jsx)("div",{className:"ml-4 mt-4 shrink-0",children:(0,s.jsx)(eR.default,{text:e})})]})}),(0,s.jsxs)(F.default,{form:n,children:[(0,s.jsx)(eP.default,{required:!0,name:"hash",label:l({id:"signature_hash",defaultMessage:"Signature hash"}),placeholder:l({id:"signature_hash",defaultMessage:"Signature hash"})}),(0,s.jsxs)("div",{className:"mt-5 sm:mt-4 sm:flex sm:flex-row-reverse justify-between",children:[(0,s.jsx)(Q.default,{label:l({id:"register-with-web3",defaultMessage:"Register"})}),(0,s.jsx)("button",{id:"danger_cancel",onClick:t,type:"button",className:"mt-3 inline-flex w-full justify-center rounded-md border border-slate-300 bg-white px-4 py-2 text-base font-medium text-slate-700 shadow-xs hover:bg-slate-50 focus:outline-hidden focus:ring-2 focus:ring-focus-ring focus:ring-offset-2 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm",children:l({id:"cancel",defaultMessage:"Cancel"})})]})]})]})},eL=({web3Addresses:e})=>{let{removeWeb3Address:a}=(()=>{let[e]=(0,z.useMutation)(eS);return{removeWeb3Address:async({address:s})=>e({variables:{address:s}})}})(),{addWeb3Address:t}=(()=>{let[e]=(0,z.useMutation)(eE);return{addWeb3Address:async({address:s})=>e({variables:{address:s}})}})(),{formatMessage:l}=(0,x.useIntl)(),{setModal:d}=(0,es.default)(),r=async({address:e})=>(await t({address:e}),{success:!0}),i=async({address:e})=>{await d((0,s.jsx)(ea.default,{onCancelClick:async()=>d(""),message:l({id:"delete_web3_address_confirmation",defaultMessage:"This action might cause inconsistencies with other data that relates to it. Are you sure you want to delete this address? "}),onOkClick:async()=>{d(""),await a({address:e}),O.toast.success(l({id:"web3_address_deleted",defaultMessage:"Address deleted successfully"}))},okText:l({id:"delete_web3_address",defaultMessage:"Delete address?"})}))},n=async({address:e,nonce:a})=>{await d((0,s.jsx)(eV,{address:e,nonce:a,close:async()=>d("")}))},u=l({id:"web3_address_added",defaultMessage:"Address added successfully!"}),o=(0,B.default)({submit:r,successMessage:u,enableReinitialize:!0,initialValues:{address:""}});return(0,s.jsxs)("div",{className:"rounded-md shadow-sm px-4 py-5 sm:p-6 bg-surface",children:[(0,s.jsx)("ul",{className:"-my-5 divide-y divide-slate-200 dark:divide-slate-700",children:(e||[]).map(({address:e,verified:a,nonce:t})=>(0,s.jsx)("li",{className:"py-4",children:(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between",children:[(0,s.jsxs)("div",{className:"mr-2 flex max-w-md flex-wrap items-center space-x-2",children:[(0,s.jsx)("div",{className:"truncate text-sm font-medium text-text-primary",children:e}),(0,s.jsx)(et.default,{isActive:a})]}),(0,s.jsxs)("div",{className:"my-1 flex items-center cursor-pointer",children:[!a&&(0,s.jsx)("a",{id:"send_verification_mail",onClick:async()=>{await n({address:e,nonce:t})},className:"inline-flex items-center rounded-md border border-slate-300 bg-white px-4 py-2 text-sm font-medium text-slate-700 shadow-xs hover:bg-slate-50 focus:outline-hidden focus:ring-2 focus:ring-focus-ring focus:ring-offset-2",children:l({id:"verification_web3_address",defaultMessage:"Verify"})}),(0,s.jsx)(q.default,{variant:"danger",size:"xs",rounded:"full",icon:(0,s.jsx)(el.TrashIcon,{className:"h-5 w-5"}),onClick:()=>i({address:e}),className:"ml-2"})]})]})},e))}),(0,s.jsx)(F.default,{form:o,children:(0,s.jsx)("div",{className:"mt-4",children:(0,s.jsxs)("div",{className:"items-between mt-4 flex space-x-4",children:[(0,s.jsx)(Y.default,{className:"mt-0",name:"address",required:!0,validators:[{isValid:e=>e.match(/^0x/)&&42===e.length,intlMessageDescriptor:{id:"invalid-web3-address",defaultMessage:"Invalid {label} "}}],label:l({id:"web3_address",defaultMessage:"Web3 Address"})}),(0,s.jsx)("span",{className:"shrink-0 flex items-end",children:(0,s.jsx)(Q.default,{className:"py-2 leading-5",label:l({id:"add_web3_address",defaultMessage:"Add address"})})})]})})})]})};var eD=e.i(3828),eT=e.i(98926);let eO=a.forwardRef(function({title:e,titleId:s,...t},l){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:l,"aria-labelledby":s},t),e?a.createElement("title",{id:s},e):null,a.createElement("path",{fillRule:"evenodd",d:"M3 4.25A2.25 2.25 0 0 1 5.25 2h5.5A2.25 2.25 0 0 1 13 4.25v2a.75.75 0 0 1-1.5 0v-2a.75.75 0 0 0-.75-.75h-5.5a.75.75 0 0 0-.75.75v11.5c0 .414.336.75.75.75h5.5a.75.75 0 0 0 .75-.75v-2a.75.75 0 0 1 1.5 0v2A2.25 2.25 0 0 1 10.75 18h-5.5A2.25 2.25 0 0 1 3 15.75V4.25Z",clipRule:"evenodd"}),a.createElement("path",{fillRule:"evenodd",d:"M6 10a.75.75 0 0 1 .75-.75h9.546l-1.048-.943a.75.75 0 1 1 1.004-1.114l2.5 2.25a.75.75 0 0 1 0 1.114l-2.5 2.25a.75.75 0 1 1-1.004-1.114l1.048-.943H6.75A.75.75 0 0 1 6 10Z",clipRule:"evenodd"}))}),eF=C.gql`
157
+ `,eV=({nonce:e,address:a,close:t})=>{let{formatMessage:l}=(0,x.useIntl)(),{verifyWeb3Address:r}=(()=>{let[e]=(0,z.useMutation)(eq);return{verifyWeb3Address:async({address:s,hash:a})=>e({variables:{address:s,hash:a}})}})(),d=l({id:"web3_verified_success",defaultMessage:"Address verified successfully!"}),i=async({hash:e})=>(await r({hash:e,address:a}),t(),{success:!0}),n=(0,B.default)({submit:i,successMessage:d,enableReinitialize:!0,getSubmitErrorMessage:e=>(e?.message?.toLowerCase().includes("signature does not match web3 account")&&n.api.setFieldError("hash",l({id:"signature_not_match_error",defaultMessage:"Signature does not match"})),e?.message?.toLowerCase().includes("invalid signature length")&&n.api.setFieldError("hash",l({id:"invalid_signature_length",defaultMessage:"Invalid signature"})),l({id:"invalid_signature_length",defaultMessage:"Invalid signature"})),initialValues:{hash:""}});return(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"border-b border-slate-300 bg-white mb",children:(0,s.jsxs)("div",{className:"-ml-4 -mt-4 flex flex-wrap items-center justify-between sm:flex-nowrap",children:[(0,s.jsxs)("div",{className:"ml-4 mt-4",children:[(0,s.jsx)("h3",{className:"text-lg font-medium leading-6 text-slate-900",children:l({id:"sign_address_header",defaultMessage:"Sign address"})}),(0,s.jsx)("p",{className:"mt-1 text-sm text-slate-500 mb-4",children:(0,s.jsx)(x.FormattedMessage,{id:"web3_address_signature_instruction",defaultMessage:"<p>Copy the following nonce <b> ({nonce})</b> and past the signature on the space provided below </p>",values:{p:e=>(0,s.jsxs)("p",{children:[e," "]}),b:e=>(0,s.jsxs)("b",{className:"border-l text-2xl",children:[e," "]}),nonce:e}})})]}),(0,s.jsx)("div",{className:"ml-4 mt-4 shrink-0",children:(0,s.jsx)(eR.default,{text:e})})]})}),(0,s.jsxs)(F.default,{form:n,children:[(0,s.jsx)(eP.default,{required:!0,name:"hash",label:l({id:"signature_hash",defaultMessage:"Signature hash"}),placeholder:l({id:"signature_hash",defaultMessage:"Signature hash"})}),(0,s.jsxs)("div",{className:"mt-5 sm:mt-4 sm:flex sm:flex-row-reverse justify-between",children:[(0,s.jsx)(Q.default,{label:l({id:"register-with-web3",defaultMessage:"Register"})}),(0,s.jsx)("button",{id:"danger_cancel",onClick:t,type:"button",className:"mt-3 inline-flex w-full justify-center rounded-md border border-slate-300 bg-white px-4 py-2 text-base font-medium text-slate-700 shadow-xs hover:bg-slate-50 focus:outline-hidden focus:ring-2 focus:ring-focus-ring focus:ring-offset-2 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm",children:l({id:"cancel",defaultMessage:"Cancel"})})]})]})]})},eL=({web3Addresses:e})=>{let{removeWeb3Address:a}=(()=>{let[e]=(0,z.useMutation)(eS);return{removeWeb3Address:async({address:s})=>e({variables:{address:s}})}})(),{addWeb3Address:t}=(()=>{let[e]=(0,z.useMutation)(eE);return{addWeb3Address:async({address:s})=>e({variables:{address:s}})}})(),{formatMessage:l}=(0,x.useIntl)(),{setModal:r}=(0,es.default)(),d=async({address:e})=>(await t({address:e}),{success:!0}),i=async({address:e})=>{await r((0,s.jsx)(ea.default,{onCancelClick:async()=>r(""),message:l({id:"delete_web3_address_confirmation",defaultMessage:"This action might cause inconsistencies with other data that relates to it. Are you sure you want to delete this address? "}),onOkClick:async()=>{r(""),await a({address:e}),O.toast.success(l({id:"web3_address_deleted",defaultMessage:"Address deleted successfully"}))},okText:l({id:"delete_web3_address",defaultMessage:"Delete address?"})}))},n=async({address:e,nonce:a})=>{await r((0,s.jsx)(eV,{address:e,nonce:a,close:async()=>r("")}))},u=l({id:"web3_address_added",defaultMessage:"Address added successfully!"}),o=(0,B.default)({submit:d,successMessage:u,enableReinitialize:!0,initialValues:{address:""}});return(0,s.jsxs)("div",{className:"rounded-md shadow-sm px-4 py-5 sm:p-6 bg-surface",children:[(0,s.jsx)("ul",{className:"-my-5 divide-y divide-slate-200 dark:divide-slate-700",children:(e||[]).map(({address:e,verified:a,nonce:t})=>(0,s.jsx)("li",{className:"py-4",children:(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between",children:[(0,s.jsxs)("div",{className:"mr-2 flex max-w-md flex-wrap items-center space-x-2",children:[(0,s.jsx)("div",{className:"truncate text-sm font-medium text-text-primary",children:e}),(0,s.jsx)(et.default,{isActive:a})]}),(0,s.jsxs)("div",{className:"my-1 flex items-center cursor-pointer",children:[!a&&(0,s.jsx)("a",{id:"send_verification_mail",onClick:async()=>{await n({address:e,nonce:t})},className:"inline-flex items-center rounded-md border border-slate-300 bg-white px-4 py-2 text-sm font-medium text-slate-700 shadow-xs hover:bg-slate-50 focus:outline-hidden focus:ring-2 focus:ring-focus-ring focus:ring-offset-2",children:l({id:"verification_web3_address",defaultMessage:"Verify"})}),(0,s.jsx)(q.default,{variant:"danger",size:"xs",rounded:"full",icon:(0,s.jsx)(el.TrashIcon,{className:"h-5 w-5"}),onClick:()=>i({address:e}),className:"ml-2"})]})]})},e))}),(0,s.jsx)(F.default,{form:o,children:(0,s.jsx)("div",{className:"mt-4",children:(0,s.jsxs)("div",{className:"items-between mt-4 flex space-x-4",children:[(0,s.jsx)(Y.default,{className:"mt-0",name:"address",required:!0,validators:[{isValid:e=>e.match(/^0x/)&&42===e.length,intlMessageDescriptor:{id:"invalid-web3-address",defaultMessage:"Invalid {label} "}}],label:l({id:"web3_address",defaultMessage:"Web3 Address"})}),(0,s.jsx)("span",{className:"shrink-0 flex items-end",children:(0,s.jsx)(Q.default,{className:"py-2 leading-5",label:l({id:"add_web3_address",defaultMessage:"Add address"})})})]})})})]})};var eD=e.i(3828),eT=e.i(98926);let eO=a.forwardRef(function({title:e,titleId:s,...t},l){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:l,"aria-labelledby":s},t),e?a.createElement("title",{id:s},e):null,a.createElement("path",{fillRule:"evenodd",d:"M3 4.25A2.25 2.25 0 0 1 5.25 2h5.5A2.25 2.25 0 0 1 13 4.25v2a.75.75 0 0 1-1.5 0v-2a.75.75 0 0 0-.75-.75h-5.5a.75.75 0 0 0-.75.75v11.5c0 .414.336.75.75.75h5.5a.75.75 0 0 0 .75-.75v-2a.75.75 0 0 1 1.5 0v2A2.25 2.25 0 0 1 10.75 18h-5.5A2.25 2.25 0 0 1 3 15.75V4.25Z",clipRule:"evenodd"}),a.createElement("path",{fillRule:"evenodd",d:"M6 10a.75.75 0 0 1 .75-.75h9.546l-1.048-.943a.75.75 0 1 1 1.004-1.114l2.5 2.25a.75.75 0 0 1 0 1.114l-2.5 2.25a.75.75 0 1 1-1.004-1.114l1.048-.943H6.75A.75.75 0 0 1 6 10Z",clipRule:"evenodd"}))}),eF=C.gql`
158
158
  mutation LogoutAllSessions($userId: ID) {
159
159
  logoutAllSessions(userId: $userId) {
160
160
  success
161
161
  }
162
162
  }
163
- `,eZ=({userId:e})=>{let{formatMessage:a}=(0,x.useIntl)(),{currentUser:t}=(0,T.default)(),{logoutAllSessions:l}=(()=>{let[e]=(0,z.useMutation)(eF);return{logoutAllSessions:async({userId:s}={})=>e({variables:{userId:s}})}})(),{setModal:d}=(0,es.default)(),r=(0,eT.useApolloClient)(),i=(0,eD.useRouter)(),n=t?._id===e,u=async()=>{await d((0,s.jsx)(ea.default,{onCancelClick:async()=>d(""),message:a({id:"logout_all_sessions_confirmation",defaultMessage:"You will be signed out on this and every other device. Continue?"}),onOkClick:async()=>{d(""),await l();try{await r.resetStore()}catch(e){if(e?.name!=="AbortError")throw e}i.push("/log-in")},okText:a({id:"logout_everywhere",defaultMessage:"Log out everywhere"})}))},o=async()=>{await d((0,s.jsx)(ea.default,{onCancelClick:async()=>d(""),message:a({id:"force_logout_confirmation",defaultMessage:"All active sessions of this user will be invalidated and the user will have to sign in again. Continue?"}),onOkClick:async()=>{d(""),await l({userId:e}),O.toast.success(a({id:"force_logout_success",defaultMessage:"All sessions of the user have been terminated"}))},okText:a({id:"force_logout",defaultMessage:"Force logout"})}))};return(0,s.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,s.jsx)("p",{className:"text-sm text-text-muted",children:n?a({id:"logout_all_sessions_own_description",defaultMessage:"Sign out of all sessions on every device, including this one."}):a({id:"logout_all_sessions_admin_description",defaultMessage:"Invalidate all active sessions of this user, for example if the account might be compromised."})}),(0,s.jsx)(q.default,{variant:"danger",fullWidth:!0,icon:(0,s.jsx)(eO,{className:"h-5 w-5"}),onClick:n?u:o,text:n?a({id:"logout_everywhere",defaultMessage:"Log out everywhere"}):a({id:"force_logout",defaultMessage:"Force logout"})})]})},eW=({_id:e,emails:a,web3Addresses:t,username:l,roles:d,tags:r,isInitialPassword:i,primaryEmail:n,viewerAllowedActions:u})=>{let{formatMessage:o}=(0,x.useIntl)(),{currentUser:c}=(0,T.default)(),{hasRole:m}=(0,L.default)(),f=c?._id===e,h=e=>u?.includes(e)??!1,p=h(g.IRoleAction.ViewUserPrivateInfos),b=h(g.IRoleAction.ViewUserRoles),v=h(g.IRoleAction.UpdateUser),w=h(g.IRoleAction.ManageUsers);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(D.default,{documentationLabel:o({id:"account",defaultMessage:"Account"}),documentation:o({id:"account_notice",defaultMessage:"This information will be displayed publicly so be careful what you share."}),children:(0,s.jsx)("div",{className:"overflow-hidden rounded-md p-3 shadow-sm bg-surface sm:p-6",children:(0,s.jsx)(eo,{username:l,_id:e,canEdit:h(g.IRoleAction.UpdateUsername)})})}),p&&(0,s.jsx)(D.default,{documentationLabel:o({id:"email_addresses",defaultMessage:"Email addresses"}),children:(0,s.jsx)("div",{className:"rounded-md border-border-default shadow-xs",children:(0,s.jsx)(ed,{emails:a,enableVerification:!0,userId:e,emailBodyContainer:"rounded-md shadow-sm",canUpdate:v,canSendVerification:f||m(g.IRoleAction.SendEmail)})})}),f&&(0,s.jsx)(D.default,{documentationLabel:o({id:"web3_addresses",defaultMessage:"Web3 addresses"}),documentation:(0,s.jsx)(x.FormattedMessage,{id:"web3_address_verify_link",defaultMessage:"<p> Go to <a> etherscan </a> to verify address </p>",values:{p:e=>(0,s.jsx)("p",{className:"text-sm",children:e}),a:e=>(0,s.jsx)("a",{href:"https://etherscan.io/verifiedSignatures",target:"__blank",className:"text-sm text-slate-900 hover:text-sky-600 dark:text-slate-800 dark:hover:text-slate-400",children:e})}}),children:(0,s.jsx)("div",{className:"rounded-md border-border-default shaodw-sm",children:(0,s.jsx)(eL,{web3Addresses:t})})}),p&&(0,s.jsx)(D.default,{documentationLabel:o({id:"tags",defaultMessage:"Tags"}),children:(0,s.jsx)("div",{className:"my-2 rounded-md px-4 py-5 shadow-sm bg-surface sm:p-6",children:(0,s.jsx)(ew,{tags:r,userId:e,canEdit:w})})}),b?(0,s.jsx)(D.default,{documentationLabel:o({id:"roles",defaultMessage:"Roles"}),children:(0,s.jsx)("div",{className:"overflow-hidden rounded-md border-b bg-surface text-text-primary border-border-default px-4 py-5 shadow-sm sm:p-6",children:(0,s.jsx)(ep,{roles:d,userId:e,canEdit:w})})}):null,v&&!f?(0,s.jsx)(D.default,{documentationLabel:o({id:"set_password",defaultMessage:"Set password"}),children:(0,s.jsx)("div",{className:"overflow-hidden rounded-md border-b bg-surface text-text-primary border-border-default shadow-sm",children:(0,s.jsx)(en,{userId:e,isInitialPassword:i,primaryEmail:n,canUpdate:v,canSendEnrollmentEmail:m(g.IRoleAction.SendEmail)})})}):null,f&&(0,s.jsx)(D.default,{documentationLabel:o({id:"change_password",defaultMessage:"Change password"}),children:(0,s.jsx)("div",{className:"overflow-hidden rounded-md border-b bg-surface text-text-primary border-border-default shadow-sm",children:(0,s.jsx)(G,{})})}),f&&(0,s.jsx)(D.default,{documentationLabel:o({id:"web_authentication",defaultMessage:"Web Authentication"}),children:(0,s.jsx)("div",{className:"text-end overflow-hidden rounded-md border-b bg-surface text-text-primary border-border-default px-4 py-5 shadow-sm sm:p-6",children:(0,s.jsx)(eU,{userId:e})})}),h(g.IRoleAction.LogoutAllSessions)&&(0,s.jsx)(D.default,{documentationLabel:o({id:"sessions",defaultMessage:"Sessions"}),children:(0,s.jsx)("div",{className:"overflow-hidden rounded-md border-b bg-surface text-text-primary border-border-default px-4 py-5 shadow-sm sm:p-6",children:(0,s.jsx)(eZ,{userId:e})})})]})},eQ=({paymentCredentials:e})=>{let{formatMessage:a}=(0,x.useIntl)();return(0,s.jsx)("div",{className:"flex w-full min-w-full flex-row flex-nowrap divide-y divide-slate-200 overflow-hidden rounded-lg text-text-primary shadow-sm dark:shadow-none",children:e?.length?(0,s.jsx)("ul",{className:"-my-5 divide-y divide-slate-200 dark:divide-slate-700",children:(e||[]).map(({_id:e,isPreferred:t,isActive:l,isValid:d})=>(0,s.jsx)("li",{className:"py-4",children:(0,s.jsxs)("div",{className:" flex items-center space-x-4",children:[(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)("p",{className:"truncate text-sm",children:e}),t&&(0,s.jsx)("p",{className:"truncate text-sm text-text-muted",children:(0,s.jsx)(eC.default,{text:a({id:"preferred",defaultMessage:"Preferred"}),color:"sky",square:!0})})]}),(0,s.jsx)("div",{children:l?(0,s.jsx)(eC.default,{text:a({id:"active",defaultMessage:"Active"}),color:"emerald",square:!0}):(0,s.jsx)(eC.default,{text:a({id:"in_active",defaultMessage:"In-Active"}),color:"amber",square:!0})}),(0,s.jsx)("div",{children:d?(0,s.jsx)(eC.default,{text:a({id:"valid",defaultMessage:"Valid"}),color:"emerald",square:!0}):(0,s.jsx)(eC.default,{text:a({id:"in_valid",defaultMessage:"InValid"}),color:"red",square:!0})})]})},e))}):(0,s.jsx)(E.default,{message:a({id:"payment_credentials",defaultMessage:"Payment credentials"})})})};var eB=e.i(97776),ez=e.i(10685),eH=e.i(64479),eG=e.i(93994);let eK=C.gql`
163
+ `,eZ=({userId:e})=>{let{formatMessage:a}=(0,x.useIntl)(),{currentUser:t}=(0,T.default)(),{logoutAllSessions:l}=(()=>{let[e]=(0,z.useMutation)(eF);return{logoutAllSessions:async({userId:s}={})=>e({variables:{userId:s}})}})(),{setModal:r}=(0,es.default)(),d=(0,eT.useApolloClient)(),i=(0,eD.useRouter)(),n=t?._id===e,u=async()=>{await r((0,s.jsx)(ea.default,{onCancelClick:async()=>r(""),message:a({id:"logout_all_sessions_confirmation",defaultMessage:"You will be signed out on this and every other device. Continue?"}),onOkClick:async()=>{r(""),await l();try{await d.resetStore()}catch(e){if(e?.name!=="AbortError")throw e}i.push("/log-in")},okText:a({id:"logout_everywhere",defaultMessage:"Log out everywhere"})}))},o=async()=>{await r((0,s.jsx)(ea.default,{onCancelClick:async()=>r(""),message:a({id:"force_logout_confirmation",defaultMessage:"All active sessions of this user will be invalidated and the user will have to sign in again. Continue?"}),onOkClick:async()=>{r(""),await l({userId:e}),O.toast.success(a({id:"force_logout_success",defaultMessage:"All sessions of the user have been terminated"}))},okText:a({id:"force_logout",defaultMessage:"Force logout"})}))};return(0,s.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,s.jsx)("p",{className:"text-sm text-text-muted",children:n?a({id:"logout_all_sessions_own_description",defaultMessage:"Sign out of all sessions on every device, including this one."}):a({id:"logout_all_sessions_admin_description",defaultMessage:"Invalidate all active sessions of this user, for example if the account might be compromised."})}),(0,s.jsx)(q.default,{variant:"danger",fullWidth:!0,icon:(0,s.jsx)(eO,{className:"h-5 w-5"}),onClick:n?u:o,text:n?a({id:"logout_everywhere",defaultMessage:"Log out everywhere"}):a({id:"force_logout",defaultMessage:"Force logout"})})]})},eW=({_id:e,emails:a,web3Addresses:t,username:l,roles:r,tags:d,isInitialPassword:i,primaryEmail:n,viewerAllowedActions:u})=>{let{formatMessage:o}=(0,x.useIntl)(),{currentUser:c}=(0,T.default)(),{hasRole:m}=(0,L.default)(),f=c?._id===e,h=e=>u?.includes(e)??!1,p=h(g.IRoleAction.ViewUserPrivateInfos),b=h(g.IRoleAction.ViewUserRoles),v=h(g.IRoleAction.UpdateUser),w=h(g.IRoleAction.ManageUsers);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(D.default,{documentationLabel:o({id:"account",defaultMessage:"Account"}),documentation:o({id:"account_notice",defaultMessage:"This information will be displayed publicly so be careful what you share."}),children:(0,s.jsx)("div",{className:"overflow-hidden rounded-md p-3 shadow-sm bg-surface sm:p-6",children:(0,s.jsx)(eo,{username:l,_id:e,canEdit:h(g.IRoleAction.UpdateUsername)})})}),p&&(0,s.jsx)(D.default,{documentationLabel:o({id:"email_addresses",defaultMessage:"Email addresses"}),children:(0,s.jsx)("div",{className:"rounded-md border-border-default shadow-xs",children:(0,s.jsx)(er,{emails:a,enableVerification:!0,userId:e,emailBodyContainer:"rounded-md shadow-sm",canUpdate:v,canSendVerification:f||m(g.IRoleAction.SendEmail)})})}),f&&(0,s.jsx)(D.default,{documentationLabel:o({id:"web3_addresses",defaultMessage:"Web3 addresses"}),documentation:(0,s.jsx)(x.FormattedMessage,{id:"web3_address_verify_link",defaultMessage:"<p> Go to <a> etherscan </a> to verify address </p>",values:{p:e=>(0,s.jsx)("p",{className:"text-sm",children:e}),a:e=>(0,s.jsx)("a",{href:"https://etherscan.io/verifiedSignatures",target:"__blank",className:"text-sm text-slate-900 hover:text-sky-600 dark:text-slate-800 dark:hover:text-slate-400",children:e})}}),children:(0,s.jsx)("div",{className:"rounded-md border-border-default shaodw-sm",children:(0,s.jsx)(eL,{web3Addresses:t})})}),p&&(0,s.jsx)(D.default,{documentationLabel:o({id:"tags",defaultMessage:"Tags"}),children:(0,s.jsx)("div",{className:"my-2 rounded-md px-4 py-5 shadow-sm bg-surface sm:p-6",children:(0,s.jsx)(ew,{tags:d,userId:e,canEdit:w})})}),b?(0,s.jsx)(D.default,{documentationLabel:o({id:"roles",defaultMessage:"Roles"}),children:(0,s.jsx)("div",{className:"overflow-hidden rounded-md border-b bg-surface text-text-primary border-border-default px-4 py-5 shadow-sm sm:p-6",children:(0,s.jsx)(ep,{roles:r,userId:e,canEdit:w})})}):null,v&&!f?(0,s.jsx)(D.default,{documentationLabel:o({id:"set_password",defaultMessage:"Set password"}),children:(0,s.jsx)("div",{className:"overflow-hidden rounded-md border-b bg-surface text-text-primary border-border-default shadow-sm",children:(0,s.jsx)(en,{userId:e,isInitialPassword:i,primaryEmail:n,canUpdate:v,canSendEnrollmentEmail:m(g.IRoleAction.SendEmail)})})}):null,f&&(0,s.jsx)(D.default,{documentationLabel:o({id:"change_password",defaultMessage:"Change password"}),children:(0,s.jsx)("div",{className:"overflow-hidden rounded-md border-b bg-surface text-text-primary border-border-default shadow-sm",children:(0,s.jsx)(G,{})})}),f&&(0,s.jsx)(D.default,{documentationLabel:o({id:"web_authentication",defaultMessage:"Web Authentication"}),children:(0,s.jsx)("div",{className:"text-end overflow-hidden rounded-md border-b bg-surface text-text-primary border-border-default px-4 py-5 shadow-sm sm:p-6",children:(0,s.jsx)(eU,{userId:e})})}),h(g.IRoleAction.LogoutAllSessions)&&(0,s.jsx)(D.default,{documentationLabel:o({id:"sessions",defaultMessage:"Sessions"}),children:(0,s.jsx)("div",{className:"overflow-hidden rounded-md border-b bg-surface text-text-primary border-border-default px-4 py-5 shadow-sm sm:p-6",children:(0,s.jsx)(eZ,{userId:e})})})]})},eQ=({paymentCredentials:e})=>{let{formatMessage:a}=(0,x.useIntl)();return(0,s.jsx)("div",{className:"flex w-full min-w-full flex-row flex-nowrap divide-y divide-slate-200 overflow-hidden rounded-lg text-text-primary shadow-sm dark:shadow-none",children:e?.length?(0,s.jsx)("ul",{className:"-my-5 divide-y divide-slate-200 dark:divide-slate-700",children:(e||[]).map(({_id:e,isPreferred:t,isActive:l,isValid:r})=>(0,s.jsx)("li",{className:"py-4",children:(0,s.jsxs)("div",{className:" flex items-center space-x-4",children:[(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)("p",{className:"truncate text-sm",children:e}),t&&(0,s.jsx)("p",{className:"truncate text-sm text-text-muted",children:(0,s.jsx)(eC.default,{text:a({id:"preferred",defaultMessage:"Preferred"}),color:"sky",square:!0})})]}),(0,s.jsx)("div",{children:l?(0,s.jsx)(eC.default,{text:a({id:"active",defaultMessage:"Active"}),color:"emerald",square:!0}):(0,s.jsx)(eC.default,{text:a({id:"in_active",defaultMessage:"In-Active"}),color:"amber",square:!0})}),(0,s.jsx)("div",{children:r?(0,s.jsx)(eC.default,{text:a({id:"valid",defaultMessage:"Valid"}),color:"emerald",square:!0}):(0,s.jsx)(eC.default,{text:a({id:"in_valid",defaultMessage:"InValid"}),color:"red",square:!0})})]})},e))}):(0,s.jsx)(E.default,{message:a({id:"payment_credentials",defaultMessage:"Payment credentials"})})})};var eB=e.i(97776),ez=e.i(10685),eH=e.i(64479),eG=e.i(93994);let eK=C.gql`
164
164
  mutation PrepareUserAvatarUpload($mediaName: String!, $userId: ID) {
165
165
  prepareUserAvatarUpload(mediaName: $mediaName, userId: $userId) {
166
166
  _id
@@ -174,7 +174,7 @@
174
174
  _id
175
175
  }
176
176
  }
177
- `;var eJ=e.i(35429);let eX=({isEdit:e,address:a,setIsEdit:t})=>{let{formatMessage:l}=(0,x.useIntl)();return(0,s.jsxs)("dl",{className:"space-y-4 -mb-6",children:[(0,s.jsxs)("div",{children:[!e&&(0,s.jsx)("label",{className:"text-sm text-text-muted",children:l({id:"full_name",defaultMessage:"Full name"})}),(0,s.jsx)("div",{className:"flex text-sm text-text-primary sm:col-span-2 sm:mt-0",children:e?(0,s.jsxs)("div",{className:"flex w-full gap-2",children:[(0,s.jsx)(Y.default,{className:"w-full",labelClassName:"text-sm text-text-muted",name:"firstName",label:l({id:"first_name",defaultMessage:"First name"})}),(0,s.jsx)(Y.default,{className:"w-full",labelClassName:"text-sm text-text-muted",name:"lastName",label:l({id:"last_Name",defaultMessage:"Last name"})})]}):(0,s.jsxs)("span",{className:"grow",children:[a?.firstName," ",a?.lastName," "]})})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"text-sm text-text-muted",children:!e&&l({id:"company",defaultMessage:"Company"})}),(0,s.jsx)("div",{className:"mt-1 flex text-sm text-text-primary sm:mt-0",children:e?(0,s.jsx)(Y.default,{className:"mt-0 w-full",name:"company",label:l({id:"company",defaultMessage:"Company"})}):(0,s.jsx)("span",{className:"grow",children:a?.company})})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"text-sm text-text-muted",children:!e&&l({id:"address_line_1",defaultMessage:"Address line 1 (Street, House no)"})}),(0,s.jsx)("div",{className:"mt-1 flex text-sm text-text-primary sm:mt-0",children:e?(0,s.jsx)(Y.default,{className:"mt-0 w-full",name:"addressLine",label:l({id:"address_line_1",defaultMessage:"Address line 1 (Street, House no)"})}):(0,s.jsx)("span",{className:"grow",children:a?.addressLine})})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"text-sm text-text-muted",children:!e&&l({id:"address_line_2",defaultMessage:"Address line 2"})}),(0,s.jsx)("div",{className:"mt-1 flex text-sm text-text-primary sm:mt-0",children:e?(0,s.jsx)(Y.default,{className:"mt-0 w-full",name:"addressLine2",label:l({id:"address_line_2",defaultMessage:"Address line 2"})}):(0,s.jsx)("span",{className:"grow",children:a?.addressLine2})})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-x-2 sm:grid-cols-2",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"text-sm text-text-muted",children:!e&&l({id:"region",defaultMessage:"Region"})}),(0,s.jsx)("div",{className:"mt-1 flex text-sm text-text-primary sm:mt-0",children:e?(0,s.jsx)(Y.default,{className:"mt-0 w-full",name:"regionCode",label:l({id:"region_Code",defaultMessage:"Region"})}):a?.regionCode})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"text-sm text-text-muted",children:!e&&l({id:"postal_code",defaultMessage:"Postal/ZIP code"})}),(0,s.jsx)("div",{className:"mt-1 w-full text-sm text-text-primary sm:mt-0",children:e?(0,s.jsx)(Y.default,{className:"mt-0 w-full",name:"postalCode",label:l({id:"postal_code",defaultMessage:"Postal/ZIP code"})}):a?.postalCode})]}),(0,s.jsxs)("div",{className:"mt-4",children:[(0,s.jsx)("label",{className:"text-sm text-text-muted",children:!e&&l({id:"city",defaultMessage:"City"})}),(0,s.jsx)("div",{className:"mt-1 text-sm text-text-primary sm:mt-0",children:e?(0,s.jsx)(Y.default,{className:"mt-0 w-full",name:"city",label:l({id:"city",defaultMessage:"City"})}):a?.city})]}),(0,s.jsxs)("div",{className:"mt-4",children:[(0,s.jsx)("label",{className:"text-sm text-text-muted",children:!e&&l({id:"country_code",defaultMessage:"Country code"})}),(0,s.jsx)("div",{className:"mt-1 text-sm text-text-primary sm:mt-0",children:e?(0,s.jsx)(Y.default,{className:"mt-0 w-full",name:"countryCode",label:l({id:"country_code",defaultMessage:"Country code"})}):a?.countryCode})]})]}),(0,s.jsx)("div",{className:"border-t border-t-border-subtle mt-3 -mx-6 -mb-6 bg-surface flex shrink-0 items-center justify-end space-x-4 pr-5",children:e?(0,s.jsx)(eJ.default,{onCancel:()=>t(!e)}):null})]})};var e0=e.i(67912),e1=e.i(5505),e5=e.i(82226);let e2=({profile:e,avatar:t,_id:l,viewerAllowedActions:d})=>{let{address:r}=e||{},i=(0,a.useRef)(void 0),{formatMessage:n}=(0,x.useIntl)(),{formatDateTime:u}=(0,v.default)(),{updateUserProfile:o}=(()=>{let[e]=(0,z.useMutation)(eY);return{updateUserProfile:async({profile:s,userId:a=null})=>e({variables:{profile:s,userId:a},refetchQueries:["UserPermissions","User","CurrentUser"]})}})(),{updateUserAvatar:c}=(()=>{let[e]=(0,z.useMutation)(eK),{confirmMediaUpload:s}=(0,eH.default)({refetchQueries:["User","CurrentUser"]});return{updateUserAvatar:async({avatar:a,userId:t=null})=>{let{data:l}=await e({variables:{mediaName:a.name,userId:t}}),{prepareUserAvatarUpload:d}=l;await (0,eG.default)(a,d.putURL),await s({mediaUploadTicketId:d._id,size:a.size,type:a.type})}}})(),m=d?.includes(g.IRoleAction.UpdateUser),f=d?.includes(g.IRoleAction.UploadUserAvatar),h=d?.includes(g.IRoleAction.ViewUserPrivateInfos),p=m&&h,[b,w]=(0,a.useState)(!1),j=async e=>{let{displayName:s,phoneMobile:a,birthday:t,gender:d}=e,{firstName:r,lastName:i,company:n,addressLine:u,addressLine2:c,postalCode:m,regionCode:f,countryCode:x,city:g}=e,h=await o({profile:{displayName:s,phoneMobile:a,birthday:t,gender:d,address:{firstName:r,lastName:i,company:n,addressLine:u,addressLine2:c,postalCode:m,regionCode:f,countryCode:x,city:g}},userId:l});return w(!1),{success:!0,data:h}},y=async({target:e})=>{let[s]=e.files;return await c({userId:l,avatar:s}),!0},N=n({id:"profile_updated",defaultMessage:"Profile updated successfully!"}),M=(0,B.default)({submit:j,successMessage:N,initialValues:{birthday:null,displayName:null,gender:null,phoneMobile:null,firstName:null,lastName:null,city:null,company:null,addressLine:null,addressLine2:null,postalCode:null,countryCode:null,regionCode:null}});return(0,a.useEffect)(()=>{Object.keys(e||{}).length&&M.api.setValues({birthday:e?.birthday?new Date(e?.birthday):null,displayName:e?.displayName,gender:e?.gender,phoneMobile:e?.phoneMobile,firstName:r?.firstName,lastName:r?.lastName,city:r?.city,company:r?.company,addressLine:r?.addressLine,addressLine2:r?.addressLine2,postalCode:r?.postalCode,countryCode:r?.countryCode,regionCode:r?.regionCode})},[e]),(0,s.jsx)(e1.default,{className:"shadow-none",children:(0,s.jsx)(F.default,{form:M,children:(0,s.jsxs)("div",{className:"overflow-hidden rounded-md bg-surface-subtle",children:[(0,s.jsxs)("div",{className:"lg:grid lg:grid-cols-3",children:[(0,s.jsxs)("div",{className:"mb-5 lg:col-span-1 lg:pr-5",children:[(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("h3",{className:"text-lg text-text-primary",children:n({id:"profile",defaultMessage:"Profile"})}),(0,s.jsx)("p",{className:"mt-3 divide-y divide-slate-200 text-slate-600 dark:divide-slate-700 dark:text-slate-400 mr-4",children:n({id:"profile_notice",defaultMessage:"This information will be displayed publicly so be careful what you share."})})]}),p&&(0,s.jsx)(eJ.default,{showSubmit:b,onCancel:()=>w(!b),showCancel:!0,cancelText:n(b?{id:"cancel",defaultMessage:"Cancel"}:{id:"update_profile",defaultMessage:"Update profile / address"})})]}),(0,s.jsxs)("div",{className:"col-span-2 ml-auto rounded-md px-6 shadow-sm dark:shadow-none lg:w-full bg-surface",children:[(0,s.jsxs)("div",{className:"py-4",children:[(0,s.jsxs)("div",{className:"py-4 sm:grid sm:py-2",children:[(0,s.jsx)("label",{className:"text-sm text-text-muted",children:n({id:"photo",defaultMessage:"Photo"})}),(0,s.jsxs)("div",{className:"mt-2 flex items-center space-x-5 text-sm sm:col-span-2",children:[(0,s.jsxs)("span",{className:"",children:[(0,s.jsx)("input",{onChange:y,multiple:!1,ref:i,type:"file",hidden:!0}),t?(0,s.jsx)(eA.default,{src:t?.url,width:100,height:100,alt:n({id:"unchained_logo",defaultMessage:"Unchained Logo"})},t?.url):(0,s.jsx)("span",{className:"inline-block h-12 w-12 overflow-hidden rounded-full",children:(0,s.jsx)(e0.UserCircleIcon,{className:"h-full w-full text-slate-800 dark:text-slate-500"})})]}),f&&(0,s.jsx)("span",{className:"mt-1 ml-4 flex shrink-0 items-start space-x-4",children:(0,s.jsx)("button",{onClick:()=>{i?.current?.click&&i?.current?.click()},type:"button",className:"rounded-md border border-border-default bg-white dark:bg-slate-600 py-2 px-3 text-sm font-medium leading-4 text-text-secondary shadow-xs hover:bg-slate-50 focus:outline-hidden focus:ring-2 focus:ring-focus-ring focus:ring-offset-2",children:n({id:"change",defaultMessage:"Change"})})})]})]}),(0,s.jsxs)("div",{className:"py-4 sm:grid sm:py-2",children:[(0,s.jsx)("label",{className:"text-sm text-text-muted",children:!b&&n({id:"displayName",defaultMessage:"Display Name"})}),(0,s.jsx)("div",{className:"mt-1 flex text-sm text-text-primary sm:mt-0",children:b?(0,s.jsx)(Y.default,{className:"mt-0 w-full",name:"displayName",label:n({id:"displayName",defaultMessage:"Display Name"})}):(0,s.jsx)("span",{className:"grow",children:e?.displayName})})]}),(0,s.jsxs)("div",{className:"py-4 sm:grid sm:py-2",children:[(0,s.jsx)("label",{className:"text-sm text-text-muted",children:!b&&n({id:"gender",defaultMessage:"Gender"})}),(0,s.jsx)("div",{className:"mt-1 flex text-sm text-text-primary sm:mt-0",children:b?(0,s.jsx)(ez.default,{className:"mt-0 w-full",label:n({id:"gender",defaultMessage:"Gender"}),name:"gender",options:{M:n({id:"male",defaultMessage:"Male"}),F:n({id:"female",defaultMessage:"Female"})}}):(0,s.jsx)("span",{className:"grow",children:e?.gender||"n/a"})})]}),h&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"py-4 sm:grid sm:py-2",children:[(0,s.jsx)("label",{className:"text-sm text-text-muted",children:!b&&n({id:"birthday",defaultMessage:"Birthday"})}),(0,s.jsx)("div",{className:"mt-1 flex text-sm text-text-primary sm:mt-0",children:b?(0,s.jsx)(eB.default,{label:n({id:"birthday",defaultMessage:"Birthday"}),className:"mt-0 w-full",name:"birthday",validators:[e5.validateBirthdate]}):(0,s.jsx)("span",{className:"grow",children:u(e?.birthday,{dateStyle:"short"})})})]}),(0,s.jsxs)("div",{className:"py-4 sm:grid sm:py-2",children:[(0,s.jsx)("label",{className:"text-sm text-text-muted",children:!b&&n({id:"mobile_phone",defaultMessage:"Mobile phone"})}),(0,s.jsx)("div",{className:"mt-1 flex text-sm text-text-primary sm:mt-0",children:b?(0,s.jsx)(Y.default,{className:"mt-0 w-full",name:"phoneMobile",label:n({id:"mobile_phone",defaultMessage:"Mobile phone"})}):(0,s.jsx)("span",{className:"grow",children:e?.phoneMobile||"n/a"})})]})]})]}),(0,s.jsx)("div",{className:"-mx-6 bg-surface flex shrink-0 items-center justify-end space-x-4 pr-5",children:b?(0,s.jsx)(eJ.default,{onCancel:()=>w(!b)}):null})]})]}),(0,s.jsxs)("div",{className:"my-7 dark:border-t-slate-800 pt-6 lg:grid lg:grid-cols-3",children:[(0,s.jsxs)("div",{className:"col-span-1 space-y-1 py-3 lg:py-0",children:[(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("h3",{className:"text-lg text-text-primary",children:n({id:"address",defaultMessage:"Address"})}),(0,s.jsx)("p",{className:"mt-3 divide-y divide-slate-200 text-slate-600 dark:divide-slate-700 dark:text-slate-400 mr-4",children:n({id:"address_notice",defaultMessage:"This information will be displayed publicly so be careful what you share."})})]}),p&&(0,s.jsx)(eJ.default,{showSubmit:b,onCancel:()=>w(!b),showCancel:!0,cancelText:n(b?{id:"cancel",defaultMessage:"Cancel"}:{id:"update_profile",defaultMessage:"Update profile / address"})})]}),(0,s.jsx)("div",{className:"col-span-2 w-full border-border-default px-6 py-6 rounded-md shadow-sm dark:shadow-none lg:ml-auto lg:w-full bg-surface ",children:(0,s.jsx)(eX,{isEdit:b,address:r,setIsEdit:w})})]})]})})})};var e3=e.i(41158),e4=e.i(88737);let e7=C.gql`
177
+ `;var eJ=e.i(35429);let eX=({isEdit:e,address:a,setIsEdit:t})=>{let{formatMessage:l}=(0,x.useIntl)();return(0,s.jsxs)("dl",{className:"space-y-4 -mb-6",children:[(0,s.jsxs)("div",{children:[!e&&(0,s.jsx)("label",{className:"text-sm text-text-muted",children:l({id:"full_name",defaultMessage:"Full name"})}),(0,s.jsx)("div",{className:"flex text-sm text-text-primary sm:col-span-2 sm:mt-0",children:e?(0,s.jsxs)("div",{className:"flex w-full gap-2",children:[(0,s.jsx)(Y.default,{className:"w-full",labelClassName:"text-sm text-text-muted",name:"firstName",label:l({id:"first_name",defaultMessage:"First name"})}),(0,s.jsx)(Y.default,{className:"w-full",labelClassName:"text-sm text-text-muted",name:"lastName",label:l({id:"last_Name",defaultMessage:"Last name"})})]}):(0,s.jsxs)("span",{className:"grow",children:[a?.firstName," ",a?.lastName," "]})})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"text-sm text-text-muted",children:!e&&l({id:"company",defaultMessage:"Company"})}),(0,s.jsx)("div",{className:"mt-1 flex text-sm text-text-primary sm:mt-0",children:e?(0,s.jsx)(Y.default,{className:"mt-0 w-full",name:"company",label:l({id:"company",defaultMessage:"Company"})}):(0,s.jsx)("span",{className:"grow",children:a?.company})})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"text-sm text-text-muted",children:!e&&l({id:"address_line_1",defaultMessage:"Address line 1 (Street, House no)"})}),(0,s.jsx)("div",{className:"mt-1 flex text-sm text-text-primary sm:mt-0",children:e?(0,s.jsx)(Y.default,{className:"mt-0 w-full",name:"addressLine",label:l({id:"address_line_1",defaultMessage:"Address line 1 (Street, House no)"})}):(0,s.jsx)("span",{className:"grow",children:a?.addressLine})})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"text-sm text-text-muted",children:!e&&l({id:"address_line_2",defaultMessage:"Address line 2"})}),(0,s.jsx)("div",{className:"mt-1 flex text-sm text-text-primary sm:mt-0",children:e?(0,s.jsx)(Y.default,{className:"mt-0 w-full",name:"addressLine2",label:l({id:"address_line_2",defaultMessage:"Address line 2"})}):(0,s.jsx)("span",{className:"grow",children:a?.addressLine2})})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-x-2 sm:grid-cols-2",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"text-sm text-text-muted",children:!e&&l({id:"region",defaultMessage:"Region"})}),(0,s.jsx)("div",{className:"mt-1 flex text-sm text-text-primary sm:mt-0",children:e?(0,s.jsx)(Y.default,{className:"mt-0 w-full",name:"regionCode",label:l({id:"region_Code",defaultMessage:"Region"})}):a?.regionCode})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"text-sm text-text-muted",children:!e&&l({id:"postal_code",defaultMessage:"Postal/ZIP code"})}),(0,s.jsx)("div",{className:"mt-1 w-full text-sm text-text-primary sm:mt-0",children:e?(0,s.jsx)(Y.default,{className:"mt-0 w-full",name:"postalCode",label:l({id:"postal_code",defaultMessage:"Postal/ZIP code"})}):a?.postalCode})]}),(0,s.jsxs)("div",{className:"mt-4",children:[(0,s.jsx)("label",{className:"text-sm text-text-muted",children:!e&&l({id:"city",defaultMessage:"City"})}),(0,s.jsx)("div",{className:"mt-1 text-sm text-text-primary sm:mt-0",children:e?(0,s.jsx)(Y.default,{className:"mt-0 w-full",name:"city",label:l({id:"city",defaultMessage:"City"})}):a?.city})]}),(0,s.jsxs)("div",{className:"mt-4",children:[(0,s.jsx)("label",{className:"text-sm text-text-muted",children:!e&&l({id:"country_code",defaultMessage:"Country code"})}),(0,s.jsx)("div",{className:"mt-1 text-sm text-text-primary sm:mt-0",children:e?(0,s.jsx)(Y.default,{className:"mt-0 w-full",name:"countryCode",label:l({id:"country_code",defaultMessage:"Country code"})}):a?.countryCode})]})]}),(0,s.jsx)("div",{className:"border-t border-t-border-subtle mt-3 -mx-6 -mb-6 bg-surface flex shrink-0 items-center justify-end space-x-4 pr-5",children:e?(0,s.jsx)(eJ.default,{onCancel:()=>t(!e)}):null})]})};var e0=e.i(67912),e1=e.i(5505),e5=e.i(82226);let e2=({profile:e,avatar:t,_id:l,viewerAllowedActions:r})=>{let{address:d}=e||{},i=(0,a.useRef)(void 0),{formatMessage:n}=(0,x.useIntl)(),{formatDateTime:u}=(0,v.default)(),{updateUserProfile:o}=(()=>{let[e]=(0,z.useMutation)(eY);return{updateUserProfile:async({profile:s,userId:a=null})=>e({variables:{profile:s,userId:a},refetchQueries:["UserPermissions","User","CurrentUser"]})}})(),{updateUserAvatar:c}=(()=>{let[e]=(0,z.useMutation)(eK),{confirmMediaUpload:s}=(0,eH.default)({refetchQueries:["User","CurrentUser"]});return{updateUserAvatar:async({avatar:a,userId:t=null})=>{let{data:l}=await e({variables:{mediaName:a.name,userId:t}}),{prepareUserAvatarUpload:r}=l;await (0,eG.default)(a,r.putURL),await s({mediaUploadTicketId:r._id,size:a.size,type:a.type})}}})(),m=r?.includes(g.IRoleAction.UpdateUser),f=r?.includes(g.IRoleAction.UploadUserAvatar),h=r?.includes(g.IRoleAction.ViewUserPrivateInfos),p=m&&h,[b,w]=(0,a.useState)(!1),j=async e=>{let{displayName:s,phoneMobile:a,birthday:t,gender:r}=e,{firstName:d,lastName:i,company:n,addressLine:u,addressLine2:c,postalCode:m,regionCode:f,countryCode:x,city:g}=e,h=await o({profile:{displayName:s,phoneMobile:a,birthday:t,gender:r,address:{firstName:d,lastName:i,company:n,addressLine:u,addressLine2:c,postalCode:m,regionCode:f,countryCode:x,city:g}},userId:l});return w(!1),{success:!0,data:h}},y=async({target:e})=>{let[s]=e.files;return await c({userId:l,avatar:s}),!0},N=n({id:"profile_updated",defaultMessage:"Profile updated successfully!"}),M=(0,B.default)({submit:j,successMessage:N,initialValues:{birthday:null,displayName:null,gender:null,phoneMobile:null,firstName:null,lastName:null,city:null,company:null,addressLine:null,addressLine2:null,postalCode:null,countryCode:null,regionCode:null}});return(0,a.useEffect)(()=>{Object.keys(e||{}).length&&M.api.setValues({birthday:e?.birthday?new Date(e?.birthday):null,displayName:e?.displayName,gender:e?.gender,phoneMobile:e?.phoneMobile,firstName:d?.firstName,lastName:d?.lastName,city:d?.city,company:d?.company,addressLine:d?.addressLine,addressLine2:d?.addressLine2,postalCode:d?.postalCode,countryCode:d?.countryCode,regionCode:d?.regionCode})},[e]),(0,s.jsx)(e1.default,{className:"shadow-none",children:(0,s.jsx)(F.default,{form:M,children:(0,s.jsxs)("div",{className:"overflow-hidden rounded-md bg-surface-subtle",children:[(0,s.jsxs)("div",{className:"lg:grid lg:grid-cols-3",children:[(0,s.jsxs)("div",{className:"mb-5 lg:col-span-1 lg:pr-5",children:[(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("h3",{className:"text-lg text-text-primary",children:n({id:"profile",defaultMessage:"Profile"})}),(0,s.jsx)("p",{className:"mt-3 divide-y divide-slate-200 text-slate-600 dark:divide-slate-700 dark:text-slate-400 mr-4",children:n({id:"profile_notice",defaultMessage:"This information will be displayed publicly so be careful what you share."})})]}),p&&(0,s.jsx)(eJ.default,{showSubmit:b,onCancel:()=>w(!b),showCancel:!0,cancelText:n(b?{id:"cancel",defaultMessage:"Cancel"}:{id:"update_profile",defaultMessage:"Update profile / address"})})]}),(0,s.jsxs)("div",{className:"col-span-2 ml-auto rounded-md px-6 shadow-sm dark:shadow-none lg:w-full bg-surface",children:[(0,s.jsxs)("div",{className:"py-4",children:[(0,s.jsxs)("div",{className:"py-4 sm:grid sm:py-2",children:[(0,s.jsx)("label",{className:"text-sm text-text-muted",children:n({id:"photo",defaultMessage:"Photo"})}),(0,s.jsxs)("div",{className:"mt-2 flex items-center space-x-5 text-sm sm:col-span-2",children:[(0,s.jsxs)("span",{className:"",children:[(0,s.jsx)("input",{onChange:y,multiple:!1,ref:i,type:"file",hidden:!0}),t?(0,s.jsx)(eA.default,{src:t?.url,width:100,height:100,alt:n({id:"unchained_logo",defaultMessage:"Unchained Logo"})},t?.url):(0,s.jsx)("span",{className:"inline-block h-12 w-12 overflow-hidden rounded-full",children:(0,s.jsx)(e0.UserCircleIcon,{className:"h-full w-full text-slate-800 dark:text-slate-500"})})]}),f&&(0,s.jsx)("span",{className:"mt-1 ml-4 flex shrink-0 items-start space-x-4",children:(0,s.jsx)("button",{onClick:()=>{i?.current?.click&&i?.current?.click()},type:"button",className:"rounded-md border border-border-default bg-white dark:bg-slate-600 py-2 px-3 text-sm font-medium leading-4 text-text-secondary shadow-xs hover:bg-slate-50 focus:outline-hidden focus:ring-2 focus:ring-focus-ring focus:ring-offset-2",children:n({id:"change",defaultMessage:"Change"})})})]})]}),(0,s.jsxs)("div",{className:"py-4 sm:grid sm:py-2",children:[(0,s.jsx)("label",{className:"text-sm text-text-muted",children:!b&&n({id:"displayName",defaultMessage:"Display Name"})}),(0,s.jsx)("div",{className:"mt-1 flex text-sm text-text-primary sm:mt-0",children:b?(0,s.jsx)(Y.default,{className:"mt-0 w-full",name:"displayName",label:n({id:"displayName",defaultMessage:"Display Name"})}):(0,s.jsx)("span",{className:"grow",children:e?.displayName})})]}),(0,s.jsxs)("div",{className:"py-4 sm:grid sm:py-2",children:[(0,s.jsx)("label",{className:"text-sm text-text-muted",children:!b&&n({id:"gender",defaultMessage:"Gender"})}),(0,s.jsx)("div",{className:"mt-1 flex text-sm text-text-primary sm:mt-0",children:b?(0,s.jsx)(ez.default,{className:"mt-0 w-full",label:n({id:"gender",defaultMessage:"Gender"}),name:"gender",options:{M:n({id:"male",defaultMessage:"Male"}),F:n({id:"female",defaultMessage:"Female"})}}):(0,s.jsx)("span",{className:"grow",children:e?.gender||"n/a"})})]}),h&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"py-4 sm:grid sm:py-2",children:[(0,s.jsx)("label",{className:"text-sm text-text-muted",children:!b&&n({id:"birthday",defaultMessage:"Birthday"})}),(0,s.jsx)("div",{className:"mt-1 flex text-sm text-text-primary sm:mt-0",children:b?(0,s.jsx)(eB.default,{label:n({id:"birthday",defaultMessage:"Birthday"}),className:"mt-0 w-full",name:"birthday",validators:[e5.validateBirthdate]}):(0,s.jsx)("span",{className:"grow",children:u(e?.birthday,{dateStyle:"short"})})})]}),(0,s.jsxs)("div",{className:"py-4 sm:grid sm:py-2",children:[(0,s.jsx)("label",{className:"text-sm text-text-muted",children:!b&&n({id:"mobile_phone",defaultMessage:"Mobile phone"})}),(0,s.jsx)("div",{className:"mt-1 flex text-sm text-text-primary sm:mt-0",children:b?(0,s.jsx)(Y.default,{className:"mt-0 w-full",name:"phoneMobile",label:n({id:"mobile_phone",defaultMessage:"Mobile phone"})}):(0,s.jsx)("span",{className:"grow",children:e?.phoneMobile||"n/a"})})]})]})]}),(0,s.jsx)("div",{className:"-mx-6 bg-surface flex shrink-0 items-center justify-end space-x-4 pr-5",children:b?(0,s.jsx)(eJ.default,{onCancel:()=>w(!b)}):null})]})]}),(0,s.jsxs)("div",{className:"my-7 dark:border-t-slate-800 pt-6 lg:grid lg:grid-cols-3",children:[(0,s.jsxs)("div",{className:"col-span-1 space-y-1 py-3 lg:py-0",children:[(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("h3",{className:"text-lg text-text-primary",children:n({id:"address",defaultMessage:"Address"})}),(0,s.jsx)("p",{className:"mt-3 divide-y divide-slate-200 text-slate-600 dark:divide-slate-700 dark:text-slate-400 mr-4",children:n({id:"address_notice",defaultMessage:"This information will be displayed publicly so be careful what you share."})})]}),p&&(0,s.jsx)(eJ.default,{showSubmit:b,onCancel:()=>w(!b),showCancel:!0,cancelText:n(b?{id:"cancel",defaultMessage:"Cancel"}:{id:"update_profile",defaultMessage:"Update profile / address"})})]}),(0,s.jsx)("div",{className:"col-span-2 w-full border-border-default px-6 py-6 rounded-md shadow-sm dark:shadow-none lg:ml-auto lg:w-full bg-surface ",children:(0,s.jsx)(eX,{isEdit:b,address:d,setIsEdit:w})})]})]})})})};var e3=e.i(41158),e4=e.i(88737);let e7=C.gql`
178
178
  query UserCart($userId: ID) {
179
179
  user(userId: $userId) {
180
180
  _id
@@ -222,7 +222,7 @@
222
222
  }
223
223
  }
224
224
  }
225
- `;var e6=e.i(1880);let e8=({_id:e})=>{let{formatMessage:a}=(0,x.useIntl)(),{formatDateTime:t}=(0,v.default)(),{formatPrice:l}=(0,w.useFormatPrice)(),{hasRole:d}=(0,L.default)(),{cart:r,loading:i}=(({userId:e=null}={})=>{let{data:s,loading:a,error:t}=(0,A.useQuery)(e7,{skip:!e,variables:{userId:e}});return{cart:s?.user?.cart,loading:a,error:t}})({userId:e});return i?(0,s.jsx)(_.default,{}):r?(0,s.jsx)("div",{className:"mt-4",children:(0,s.jsxs)("div",{className:"rounded-md border border-border-default bg-surface shadow-sm",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2 border-b border-border-default px-4 py-3",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)(e4.ShoppingCartIcon,{className:"h-5 w-5 text-text-muted"}),(0,s.jsx)("span",{className:"text-sm text-text-muted",children:a({id:"cart_last_updated",defaultMessage:"Last updated {date}"},{date:t(r.updated||r.created,{dateStyle:"medium",timeStyle:"short"})})}),r.country?.isoCode&&(0,s.jsxs)("span",{className:"text-sm text-text-muted",children:[r.country?.flagEmoji," ",r.country.isoCode]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-4",children:[(0,s.jsx)("span",{className:"text-sm font-medium text-text-primary",children:l(r.total)}),d(g.IRoleAction.ViewOrders)&&(0,s.jsx)(e3.default,{href:`/orders?orderId=${r._id}`,className:"text-sm text-accent hover:underline",children:a({id:"view_cart",defaultMessage:"View cart"})})]})]}),(0,s.jsxs)("ul",{className:"divide-y divide-border-default",children:[r.items?.map(e=>(0,s.jsxs)("li",{className:"flex items-center gap-4 px-4 py-3",children:[(0,s.jsx)("div",{className:"h-12 w-12 shrink-0 overflow-hidden rounded-md border border-border-subtle",children:(0,s.jsx)(eA.default,{src:e.product?.media?.[0]?.file?.url,width:48,height:48,className:"h-12 w-12 object-cover"})}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)(e3.default,{href:`/products?slug=${(0,e6.default)(e.product)}`,className:"block truncate text-sm font-medium text-text-primary hover:underline",children:e.product?.texts?.title||e.product?.texts?.subtitle||e.product?._id}),(0,s.jsxs)("span",{className:"text-sm text-text-muted",children:[e.quantity," × ",l(e.unitPrice)]})]}),(0,s.jsx)("span",{className:"text-sm font-medium text-text-primary",children:l(e.total)})]},e._id)),!r.items?.length&&(0,s.jsx)("li",{className:"px-4 py-3 text-sm text-text-muted",children:a({id:"cart_empty",defaultMessage:"Cart is empty"})})]})]})}):(0,s.jsx)("div",{className:"mt-4",children:(0,s.jsx)(E.default,{message:a({id:"active_cart",defaultMessage:"Active cart"}),Icon:(0,s.jsx)(e4.ShoppingCartIcon,{className:"h-6 w-6"})})})};var e9=e.i(35793),se=e.i(77930);let ss=C.gql`
225
+ `;var e6=e.i(1880);let e8=({_id:e})=>{let{formatMessage:a}=(0,x.useIntl)(),{formatDateTime:t}=(0,v.default)(),{formatPrice:l}=(0,w.useFormatPrice)(),{hasRole:r}=(0,L.default)(),{cart:d,loading:i}=(({userId:e=null}={})=>{let{data:s,loading:a,error:t}=(0,A.useQuery)(e7,{skip:!e,variables:{userId:e}});return{cart:s?.user?.cart,loading:a,error:t}})({userId:e});return i?(0,s.jsx)(_.default,{}):d?(0,s.jsx)("div",{className:"mt-4",children:(0,s.jsxs)("div",{className:"rounded-md border border-border-default bg-surface shadow-sm",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2 border-b border-border-default px-4 py-3",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)(e4.ShoppingCartIcon,{className:"h-5 w-5 text-text-muted"}),(0,s.jsx)("span",{className:"text-sm text-text-muted",children:a({id:"cart_last_updated",defaultMessage:"Last updated {date}"},{date:t(d.updated||d.created,{dateStyle:"medium",timeStyle:"short"})})}),d.country?.isoCode&&(0,s.jsxs)("span",{className:"text-sm text-text-muted",children:[d.country?.flagEmoji," ",d.country.isoCode]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-4",children:[(0,s.jsx)("span",{className:"text-sm font-medium text-text-primary",children:l(d.total)}),r(g.IRoleAction.ViewOrders)&&(0,s.jsx)(e3.default,{href:`/orders?orderId=${d._id}`,className:"text-sm text-accent hover:underline",children:a({id:"view_cart",defaultMessage:"View cart"})})]})]}),(0,s.jsxs)("ul",{className:"divide-y divide-border-default",children:[d.items?.map(e=>(0,s.jsxs)("li",{className:"flex items-center gap-4 px-4 py-3",children:[(0,s.jsx)("div",{className:"h-12 w-12 shrink-0 overflow-hidden rounded-md border border-border-subtle",children:(0,s.jsx)(eA.default,{src:e.product?.media?.[0]?.file?.url,width:48,height:48,className:"h-12 w-12 object-cover"})}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)(e3.default,{href:`/products?slug=${(0,e6.default)(e.product)}`,className:"block truncate text-sm font-medium text-text-primary hover:underline",children:e.product?.texts?.title||e.product?.texts?.subtitle||e.product?._id}),(0,s.jsxs)("span",{className:"text-sm text-text-muted",children:[e.quantity," × ",l(e.unitPrice)]})]}),(0,s.jsx)("span",{className:"text-sm font-medium text-text-primary",children:l(e.total)})]},e._id)),!d.items?.length&&(0,s.jsx)("li",{className:"px-4 py-3 text-sm text-text-muted",children:a({id:"cart_empty",defaultMessage:"Cart is empty"})})]})]})}):(0,s.jsx)("div",{className:"mt-4",children:(0,s.jsx)(E.default,{message:a({id:"active_cart",defaultMessage:"Active cart"}),Icon:(0,s.jsx)(e4.ShoppingCartIcon,{className:"h-6 w-6"})})})};var e9=e.i(35793),se=e.i(77930);let ss=C.gql`
226
226
  query UserEnrollments($userId: ID!, $queryString: String) {
227
227
  user(userId: $userId) {
228
228
  _id
@@ -253,7 +253,7 @@
253
253
  }
254
254
  }
255
255
  }
256
- `,sa=({_id:e})=>{let{query:a,push:t}=(0,eD.useRouter)(),{queryString:l,...d}=a,{enrollments:r}=(({userId:e=null,queryString:s=""})=>{let{data:a,loading:t,error:l}=(0,A.useQuery)(ss,{skip:!e,variables:{userId:e,queryString:s}});return{enrollments:a?.user?.enrollments||[],loading:t,error:l}})({userId:e,queryString:l});return(0,s.jsxs)("div",{className:"space-y-4 mt-4",children:[(0,s.jsx)(e9.default,{defaultValue:l,onInputChange:e=>{let{skip:s,...a}=d;e?t({query:{...a,queryString:e}}):t({query:{...d}})}}),(0,s.jsx)(se.default,{enrollments:r})]})};var st=e.i(44959);let sl=C.gql`
256
+ `,sa=({_id:e})=>{let{query:a,push:t}=(0,eD.useRouter)(),{queryString:l,...r}=a,{enrollments:d}=(({userId:e=null,queryString:s=""})=>{let{data:a,loading:t,error:l}=(0,A.useQuery)(ss,{skip:!e,variables:{userId:e,queryString:s}});return{enrollments:a?.user?.enrollments||[],loading:t,error:l}})({userId:e,queryString:l});return(0,s.jsxs)("div",{className:"space-y-4 mt-4",children:[(0,s.jsx)(e9.default,{defaultValue:l,onInputChange:e=>{let{skip:s,...a}=r;e?t({query:{...a,queryString:e}}):t({query:{...r}})}}),(0,s.jsx)(se.default,{enrollments:d})]})};var st=e.i(44959);let sl=C.gql`
257
257
  query UserOrder(
258
258
  $userId: ID
259
259
  $queryString: String
@@ -277,7 +277,7 @@
277
277
  }
278
278
  }
279
279
  }
280
- `;var sd=e.i(6634);let sr=({_id:e})=>{let{formatMessage:a}=(0,x.useIntl)(),{query:t,push:l}=(0,eD.useRouter)(),{queryString:d,...r}=t,i=t?.sort,n=(0,w.convertSortFieldsToQueryFormat)(i),u=t?.includeCarts==="true",{orders:o,loading:c}=(({userId:e=null,queryString:s="",sort:a=[],includeCarts:t=!1}={})=>{let{data:l,loading:d,error:r}=(0,A.useQuery)(sl,{skip:!e,variables:{userId:e,queryString:s,includeCarts:t,sort:a.length?a:[{key:"ordered",value:g.ISortDirection.Desc}]}});return{orders:l?.user?.orders,loading:d,error:r}})({userId:e,queryString:d,sort:n,includeCarts:u});return(0,s.jsxs)("div",{className:"space-y-4 mt-4",children:[(0,s.jsx)(sd.default,{toggleText:a({id:"show_carts",defaultMessage:"Show carts"}),toggleKey:"includeCarts",active:u}),(0,s.jsx)(e9.default,{defaultValue:d,onInputChange:e=>{let{skip:s,...a}=r;e?l({query:{...a,queryString:e}}):l({query:{...r}})}}),(0,s.jsx)(st.default,{loading:c,orders:o,showUser:!1,sortable:!0})]})};var si=e.i(71805);let sn=C.gql`
280
+ `;var sr=e.i(6634);let sd=({_id:e})=>{let{formatMessage:a}=(0,x.useIntl)(),{query:t,push:l}=(0,eD.useRouter)(),{queryString:r,...d}=t,i=t?.sort,n=(0,w.convertSortFieldsToQueryFormat)(i),u=t?.includeCarts==="true",{orders:o,loading:c}=(({userId:e=null,queryString:s="",sort:a=[],includeCarts:t=!1}={})=>{let{data:l,loading:r,error:d}=(0,A.useQuery)(sl,{skip:!e,variables:{userId:e,queryString:s,includeCarts:t,sort:a.length?a:[{key:"ordered",value:g.ISortDirection.Desc}]}});return{orders:l?.user?.orders,loading:r,error:d}})({userId:e,queryString:r,sort:n,includeCarts:u});return(0,s.jsxs)("div",{className:"space-y-4 mt-4",children:[(0,s.jsx)(sr.default,{toggleText:a({id:"show_carts",defaultMessage:"Show carts"}),toggleKey:"includeCarts",active:u}),(0,s.jsx)(e9.default,{defaultValue:r,onInputChange:e=>{let{skip:s,...a}=d;e?l({query:{...a,queryString:e}}):l({query:{...d}})}}),(0,s.jsx)(st.default,{loading:c,orders:o,showUser:!1,sortable:!0})]})};var si=e.i(71805);let sn=C.gql`
281
281
  query UserQuotations($userId: ID!, $queryString: String) {
282
282
  user(userId: $userId) {
283
283
  _id
@@ -307,7 +307,7 @@
307
307
  }
308
308
  }
309
309
  }
310
- `,su=({_id:e})=>{let{query:a,push:t}=(0,eD.useRouter)(),{queryString:l,...d}=a,{quotations:r,loading:i}=(({userId:e=null,queryString:s=""})=>{let{data:a,loading:t,error:l}=(0,A.useQuery)(sn,{skip:!e,variables:{userId:e,queryString:s}});return{quotations:a?.user?.quotations||[],loading:t,error:l}})({userId:e,queryString:l});return i?(0,s.jsx)(_.default,{}):(0,s.jsxs)("div",{className:"space-y-4 mt-4",children:[(0,s.jsx)(e9.default,{defaultValue:l,onInputChange:e=>{let{skip:s,...a}=d;e?t({query:{...a,queryString:e}}):t({query:{...d}})}}),(0,s.jsx)(si.default,{quotations:r})]})};var so=e.i(15356);let sc=C.gql`
310
+ `,su=({_id:e})=>{let{query:a,push:t}=(0,eD.useRouter)(),{queryString:l,...r}=a,{quotations:d,loading:i}=(({userId:e=null,queryString:s=""})=>{let{data:a,loading:t,error:l}=(0,A.useQuery)(sn,{skip:!e,variables:{userId:e,queryString:s}});return{quotations:a?.user?.quotations||[],loading:t,error:l}})({userId:e,queryString:l});return i?(0,s.jsx)(_.default,{}):(0,s.jsxs)("div",{className:"space-y-4 mt-4",children:[(0,s.jsx)(e9.default,{defaultValue:l,onInputChange:e=>{let{skip:s,...a}=r;e?t({query:{...a,queryString:e}}):t({query:{...r}})}}),(0,s.jsx)(si.default,{quotations:d})]})};var so=e.i(15356);let sc=C.gql`
311
311
  query UserTokens($userId: ID!, $forceLocale: Locale) {
312
312
  user(userId: $userId) {
313
313
  _id
@@ -328,7 +328,7 @@
328
328
  }
329
329
  }
330
330
  ${$.default}
331
- `;var sm=e.i(56599);let sf={CENTRALIZED:"purple",EXPORTING:"yellow",DECENTRALIZED:"green"},sx=({_id:e})=>{let{tokens:a,loading:t}=(({userId:e=null})=>{let{data:s,loading:a,error:t}=(0,A.useQuery)(sc,{variables:{userId:e}});return{tokens:s?.user?.tokens||[],loading:a,error:t}})({userId:e}),{formatMessage:l}=(0,x.useIntl)(),{formatPrice:d}=(0,w.useFormatPrice)();return t?(0,s.jsx)(_.default,{}):a.length?(0,s.jsx)("div",{className:"bg-white",children:(0,s.jsx)("div",{className:"mt-5 -mx-px grid grid-cols-1 border-l border-slate-300 sm:mx-0 sm:grid-cols-2 lg:grid-cols-3",children:a?.map(({_id:e,walletAddress:a,chainId:t,tokenSerialNumber:r,product:i,status:n})=>(0,s.jsxs)("div",{className:"group relative border-r border-b border-slate-300 p-4 sm:p-6",children:[(0,s.jsxs)(e3.default,{href:`/products?slug=${(0,e6.default)(i)}`,className:"aspect-w-1 aspect-h-1 overflow-hidden rounded-lg bg-slate-200 group-hover:opacity-75",children:[(0,s.jsx)("div",{children:(0,s.jsx)(eA.default,{src:i?.media?.length&&i.media[0].file?.url||"/no-image.jpg",loader:ek.default,alt:l({id:"product-image",defaultMessage:"Product image"}),width:100,height:100,layout:"responsive",className:" h-full w-full "})}),(0,s.jsxs)("div",{className:"pt-2",children:[(0,s.jsx)("h3",{className:"text-lg font-medium text-slate-900",children:i?.texts?.title}),(0,s.jsx)("p",{children:l({id:"token-id",defaultMessage:"Token Serial Number {tokenSerialNumber}"},{tokenSerialNumber:r})}),a?(0,s.jsx)("div",{children:l({id:"wallet-address",defaultMessage:"Wallet {walletAddress}"},{walletAddress:(0,so.default)(a)})}):null,(0,s.jsx)("p",{children:l({id:"chain-id",defaultMessage:"Chain ID {chainId}"},{chainId:t})}),(0,s.jsx)("p",{children:l({id:"token-id",defaultMessage:"Token Serial Number {tokenSerialNumber}"},{tokenSerialNumber:r})}),(0,s.jsx)("p",{className:"mt-2 text-base font-medium text-slate-900",children:d(i?.simulatedPrice)}),(0,s.jsx)("div",{className:"mt-2 mb-8",children:(0,s.jsx)("div",{className:"",children:(0,s.jsx)(eC.default,{text:"CENTRALIZED"===n?"Off-Chain 🏛":"On-Chain ⛓",color:sf[n]})})})]})]}),"DECENTRALIZED"!==n&&(0,s.jsx)("div",{className:"mt-3 flex items-center justify-between",children:(0,s.jsx)(sm.default,{tokenId:e,tokenStatus:n})})]},e))})}):(0,s.jsx)(E.default,{message:l({id:"tokens",defaultMessage:"Tokens"})})},sg=(e,s)=>e?.viewerAllowedActions?.includes(s)??!1,sh=(e,s)=>!e.requiredRole||s(e.requiredRole),sp=({user:e,selectedView:a,...t})=>{let{hasRole:l}=(0,L.default)();if(!e)return(0,s.jsx)(_.default,{});if("profile"===a)return(0,s.jsx)(e2,{...e});if("account"===a)return(0,s.jsx)(eW,{...e});if("orders"===a&&sg(e,g.IRoleAction.ViewUserOrders))return(0,s.jsx)(sr,{...e});if("cart"===a&&sg(e,g.IRoleAction.ViewUserOrders))return(0,s.jsx)(e8,{...e});if("quotations"===a&&sg(e,g.IRoleAction.ViewUserQuotations))return(0,s.jsx)(su,{...e});if("enrollments"===a&&sg(e,g.IRoleAction.ViewUserEnrollments))return(0,s.jsx)(sa,{...e});if("reviews"===a&&sg(e,g.IRoleAction.ViewUserProductReviews))return(0,s.jsx)(V,{...e});if("payment_credentials"===a&&sg(e,g.IRoleAction.ViewUserPrivateInfos))return(0,s.jsx)(eQ,{...e});if("tokens"===a&&sg(e,g.IRoleAction.ViewUserTokens))return(0,s.jsx)(sx,{...e});if("extended"===a)return(0,s.jsx)(b.default,{data:t});if("logs"===a&&sg(e,g.IRoleAction.ViewUserPrivateInfos))return(0,s.jsx)(M,{...e});if(a?.startsWith("plugin:")){let t=a.replace("plugin:","");return(0,s.jsx)(p.default,{slot:"user:tabs",entityId:e?._id,children:(a,d)=>d.component===t&&sh(d,l)?(0,s.jsx)(a,{entityId:e?._id,entity:e}):null})}return(0,s.jsx)(e2,{...e})};e.s(["default",0,({user:e,extendedData:a})=>{let{formatMessage:p}=(0,x.useIntl)(),{hasRole:b}=(0,L.default)(),{getSlotPlugins:v}=(0,h.usePlugins)(),w=[{id:"profile",title:p({id:"profile",defaultMessage:"Profile"}),Icon:(0,s.jsx)(c,{className:"h-5 w-5"})},{id:"account",title:p({id:"account",defaultMessage:"Account"}),Icon:(0,s.jsx)(r,{className:"h-5 w-5"})},sg(e,g.IRoleAction.ViewUserOrders)&&{id:"orders",title:p({id:"orders",defaultMessage:"Orders"}),Icon:(0,s.jsx)(u.ShoppingBagIcon,{className:"h-5 w-5"})},sg(e,g.IRoleAction.ViewUserOrders)&&{id:"cart",title:p({id:"cart",defaultMessage:"Cart"}),Icon:(0,s.jsx)(o,{className:"h-5 w-5"})},sg(e,g.IRoleAction.ViewUserQuotations)&&{id:"quotations",title:p({id:"quotations",defaultMessage:"Quotations"}),Icon:(0,s.jsx)(t,{className:"h-5 w-5"})},sg(e,g.IRoleAction.ViewUserEnrollments)&&{id:"enrollments",title:p({id:"enrollments",defaultMessage:"Enrollments"}),Icon:(0,s.jsx)(l.ClipboardDocumentListIcon,{className:"h-5 w-5"})},sg(e,g.IRoleAction.ViewUserPrivateInfos)&&{id:"payment_credentials",title:p({id:"payment_credentials",defaultMessage:"Payment credentials"}),Icon:(0,s.jsx)(d.CreditCardIcon,{className:"h-5 w-5"})},sg(e,g.IRoleAction.ViewUserTokens)&&{id:"tokens",title:p({id:"tokens",defaultMessage:"Tokens"}),Icon:(0,s.jsx)(m,{className:"h-5 w-5"})},sg(e,g.IRoleAction.ViewUserProductReviews)&&{id:"reviews",title:p({id:"reviews",defaultMessage:"Reviews"}),Icon:(0,s.jsx)(i.StarIcon,{className:"h-5 w-5"})},sg(e,g.IRoleAction.ViewUserPrivateInfos)&&{id:"logs",title:p({id:"user-activities",defaultMessage:"Activity"}),Icon:(0,s.jsx)(f,{className:"h-5 w-5"})},null!==a&&{id:"extended",title:p({id:"extended-fields",defaultMessage:"Extended"}),Icon:(0,s.jsx)(n.PuzzlePieceIcon,{className:"h-5 w-5"})},...v("user:tabs").filter(({config:e})=>sh(e,b)).map(({config:e})=>({id:`plugin:${e.component}`,title:e.label,Icon:(0,s.jsx)(n.PuzzlePieceIcon,{className:"h-5 w-5"})}))].filter(Boolean);return(0,s.jsx)(I.default,{tabItems:w,defaultTab:"profile",children:(0,s.jsx)(sp,{user:e,...a})})}],62274);let sb=C.gql`
331
+ `;var sm=e.i(56599);let sf={CENTRALIZED:"purple",EXPORTING:"yellow",DECENTRALIZED:"green"},sx=({_id:e})=>{let{tokens:a,loading:t}=(({userId:e=null})=>{let{data:s,loading:a,error:t}=(0,A.useQuery)(sc,{variables:{userId:e}});return{tokens:s?.user?.tokens||[],loading:a,error:t}})({userId:e}),{formatMessage:l}=(0,x.useIntl)(),{formatPrice:r}=(0,w.useFormatPrice)();return t?(0,s.jsx)(_.default,{}):a.length?(0,s.jsx)("div",{className:"bg-white",children:(0,s.jsx)("div",{className:"mt-5 -mx-px grid grid-cols-1 border-l border-slate-300 sm:mx-0 sm:grid-cols-2 lg:grid-cols-3",children:a?.map(({_id:e,walletAddress:a,chainId:t,tokenSerialNumber:d,product:i,status:n})=>(0,s.jsxs)("div",{className:"group relative border-r border-b border-slate-300 p-4 sm:p-6",children:[(0,s.jsxs)(e3.default,{href:`/products?slug=${(0,e6.default)(i)}`,className:"aspect-w-1 aspect-h-1 overflow-hidden rounded-lg bg-slate-200 group-hover:opacity-75",children:[(0,s.jsx)("div",{children:(0,s.jsx)(eA.default,{src:i?.media?.length&&i.media[0].file?.url||"/no-image.jpg",loader:ek.default,alt:l({id:"product-image",defaultMessage:"Product image"}),width:100,height:100,layout:"responsive",className:" h-full w-full "})}),(0,s.jsxs)("div",{className:"pt-2",children:[(0,s.jsx)("h3",{className:"text-lg font-medium text-slate-900",children:i?.texts?.title}),(0,s.jsx)("p",{children:l({id:"token-id",defaultMessage:"Token Serial Number {tokenSerialNumber}"},{tokenSerialNumber:d})}),a?(0,s.jsx)("div",{children:l({id:"wallet-address",defaultMessage:"Wallet {walletAddress}"},{walletAddress:(0,so.default)(a)})}):null,(0,s.jsx)("p",{children:l({id:"chain-id",defaultMessage:"Chain ID {chainId}"},{chainId:t})}),(0,s.jsx)("p",{children:l({id:"token-id",defaultMessage:"Token Serial Number {tokenSerialNumber}"},{tokenSerialNumber:d})}),(0,s.jsx)("p",{className:"mt-2 text-base font-medium text-slate-900",children:r(i?.simulatedPrice)}),(0,s.jsx)("div",{className:"mt-2 mb-8",children:(0,s.jsx)("div",{className:"",children:(0,s.jsx)(eC.default,{text:"CENTRALIZED"===n?"Off-Chain 🏛":"On-Chain ⛓",color:sf[n]})})})]})]}),"DECENTRALIZED"!==n&&(0,s.jsx)("div",{className:"mt-3 flex items-center justify-between",children:(0,s.jsx)(sm.default,{tokenId:e,tokenStatus:n})})]},e))})}):(0,s.jsx)(E.default,{message:l({id:"tokens",defaultMessage:"Tokens"})})},sg=(e,s)=>e?.viewerAllowedActions?.includes(s)??!1,sh=(e,s)=>!e.requiredRole||s(e.requiredRole),sp=({user:e,selectedView:a,...t})=>{let{hasRole:l}=(0,L.default)();if(!e)return(0,s.jsx)(_.default,{});if("profile"===a)return(0,s.jsx)(e2,{...e});if("account"===a)return(0,s.jsx)(eW,{...e});if("orders"===a&&sg(e,g.IRoleAction.ViewUserOrders))return(0,s.jsx)(sd,{...e});if("cart"===a&&sg(e,g.IRoleAction.ViewUserOrders))return(0,s.jsx)(e8,{...e});if("quotations"===a&&sg(e,g.IRoleAction.ViewUserQuotations))return(0,s.jsx)(su,{...e});if("enrollments"===a&&sg(e,g.IRoleAction.ViewUserEnrollments))return(0,s.jsx)(sa,{...e});if("reviews"===a&&sg(e,g.IRoleAction.ViewUserProductReviews))return(0,s.jsx)(V,{...e});if("payment_credentials"===a&&sg(e,g.IRoleAction.ViewUserPrivateInfos))return(0,s.jsx)(eQ,{...e});if("tokens"===a&&sg(e,g.IRoleAction.ViewUserTokens))return(0,s.jsx)(sx,{...e});if("extended"===a)return(0,s.jsx)(b.default,{data:t});if("logs"===a&&sg(e,g.IRoleAction.ViewUserPrivateInfos))return(0,s.jsx)(M,{...e});if(a?.startsWith("plugin:")){let t=a.replace("plugin:","");return(0,s.jsx)(p.default,{slot:"user:tabs",entityId:e?._id,children:(a,r)=>r.component===t&&sh(r,l)?(0,s.jsx)(a,{entityId:e?._id,entity:e}):null})}return(0,s.jsx)(e2,{...e})};e.s(["default",0,({user:e,extendedData:a})=>{let{formatMessage:p}=(0,x.useIntl)(),{hasRole:b}=(0,L.default)(),{getSlotPlugins:v}=(0,h.usePlugins)(),w=[{id:"profile",title:p({id:"profile",defaultMessage:"Profile"}),Icon:(0,s.jsx)(c,{className:"h-5 w-5"})},{id:"account",title:p({id:"account",defaultMessage:"Account"}),Icon:(0,s.jsx)(d,{className:"h-5 w-5"})},sg(e,g.IRoleAction.ViewUserOrders)&&{id:"orders",title:p({id:"orders",defaultMessage:"Orders"}),Icon:(0,s.jsx)(u.ShoppingBagIcon,{className:"h-5 w-5"})},sg(e,g.IRoleAction.ViewUserOrders)&&{id:"cart",title:p({id:"cart",defaultMessage:"Cart"}),Icon:(0,s.jsx)(o,{className:"h-5 w-5"})},sg(e,g.IRoleAction.ViewUserQuotations)&&{id:"quotations",title:p({id:"quotations",defaultMessage:"Quotations"}),Icon:(0,s.jsx)(t,{className:"h-5 w-5"})},sg(e,g.IRoleAction.ViewUserEnrollments)&&{id:"enrollments",title:p({id:"enrollments",defaultMessage:"Enrollments"}),Icon:(0,s.jsx)(l.ClipboardDocumentListIcon,{className:"h-5 w-5"})},sg(e,g.IRoleAction.ViewUserPrivateInfos)&&{id:"payment_credentials",title:p({id:"payment_credentials",defaultMessage:"Payment credentials"}),Icon:(0,s.jsx)(r.CreditCardIcon,{className:"h-5 w-5"})},sg(e,g.IRoleAction.ViewUserTokens)&&{id:"tokens",title:p({id:"tokens",defaultMessage:"Tokens"}),Icon:(0,s.jsx)(m,{className:"h-5 w-5"})},sg(e,g.IRoleAction.ViewUserProductReviews)&&{id:"reviews",title:p({id:"reviews",defaultMessage:"Reviews"}),Icon:(0,s.jsx)(i.StarIcon,{className:"h-5 w-5"})},sg(e,g.IRoleAction.ViewUserPrivateInfos)&&{id:"logs",title:p({id:"user-activities",defaultMessage:"Activity"}),Icon:(0,s.jsx)(f,{className:"h-5 w-5"})},null!==a&&{id:"extended",title:p({id:"extended-fields",defaultMessage:"Extended"}),Icon:(0,s.jsx)(n.PuzzlePieceIcon,{className:"h-5 w-5"})},...v("user:tabs").filter(({config:e})=>sh(e,b)).map(({config:e})=>({id:`plugin:${e.component}`,title:e.label,Icon:(0,s.jsx)(n.PuzzlePieceIcon,{className:"h-5 w-5"})}))].filter(Boolean);return(0,s.jsx)(I.default,{tabItems:w,defaultTab:"profile",children:(0,s.jsx)(sp,{user:e,...a})})}],62274);let sb=C.gql`
332
332
  mutation DeleteUser($userId: ID) {
333
333
  removeUser(userId: $userId) {
334
334
  _id
@@ -3,14 +3,14 @@ __turbopack_load_page_chunks__("/warehousing-provider", [
3
3
  "static/chunks/1k4ep4igedo8p.js",
4
4
  "static/chunks/17b4rvj5k8ye2.js",
5
5
  "static/chunks/1rtv3c_klo0jk.js",
6
- "static/chunks/3yvmkdc088aly.js",
6
+ "static/chunks/3vjgbl76cgrmt.js",
7
7
  "static/chunks/1_5ba1obzc231.js",
8
8
  "static/chunks/0rqjr_lmrk4pz.js",
9
- "static/chunks/3cq123yj25_36.js",
9
+ "static/chunks/3om1fkw-lrmng.js",
10
10
  "static/chunks/252jebodi67kg.js",
11
11
  "static/chunks/0jeddko6bac8h.js",
12
12
  "static/chunks/05-ui58k9illr.js",
13
13
  "static/chunks/41e2wlkp9_pvk.js",
14
14
  "static/chunks/33emlry70k-lv.js",
15
- "static/chunks/turbopack-351l-va10h8kw.js"
15
+ "static/chunks/turbopack-3snas0eww9sey.js"
16
16
  ])