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

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/chunks/{2l4pfo_tsvn5w.js → 065x9wl2mga3m.js} +2 -2
  67. package/out/_next/static/chunks/{3l1zucp3a411p.js → 07evy5u8ldd1y.js} +2 -2
  68. package/out/_next/static/chunks/{2cmaw01_r48ot.js → 0_o5motvr7gdv.js} +7 -7
  69. package/out/_next/static/chunks/{13__7-sf28ub5.js → 0b28h3157pjxr.js} +2 -2
  70. package/out/_next/static/chunks/{1r7dh_p70r7o8.js → 0bd_--7-52ko6.js} +3 -3
  71. package/out/_next/static/chunks/{2e0dz59httb-e.js → 0bg4_y1qh5y5h.js} +4 -0
  72. package/out/_next/static/chunks/{2d1zehr8zc3vb.js → 0e7hhok2eawc3.js} +2 -2
  73. package/out/_next/static/chunks/{0qq_lp3pk8bjf.js → 0el-98_f_r8ex.js} +4 -4
  74. package/out/_next/static/chunks/{0-cyinqk2ne8t.js → 0g2igd8sj5-gg.js} +3 -3
  75. package/out/_next/static/chunks/{0qh0vqpui2alf.js → 0gx9t6j5kx_ho.js} +2 -2
  76. package/out/_next/static/chunks/{3ulbhhqw8rxd8.js → 0iebz0rtddbw8.js} +3 -3
  77. package/out/_next/static/chunks/0iy11ws57hzzr.js +99 -0
  78. package/out/_next/static/chunks/{1fvr9k_o63j_m.js → 0l4eldqr95f75.js} +3 -3
  79. package/out/_next/static/chunks/{3idwjqiel9n9v.js → 0ld6wd2it3xix.js} +5 -5
  80. package/out/_next/static/chunks/{3wy5jhrulhwb9.js → 0lzvfs3koqtzr.js} +3 -3
  81. package/out/_next/static/chunks/{0kwf2vel2xmdi.js → 0pgpevl26rrte.js} +3 -3
  82. package/out/_next/static/chunks/0r5wwinf72z4g.js +1 -0
  83. package/out/_next/static/chunks/{3m2yam5_cs1h7.js → 0s165pqd53i2e.js} +3 -3
  84. package/out/_next/static/chunks/{3v38tvcona4gy.js → 0v0928tdjepyk.js} +2 -2
  85. package/out/_next/static/chunks/{1qwid0d89bzpw.js → 0x97pf4va0tdj.js} +3 -3
  86. package/out/_next/static/chunks/{0fv1w56e25gt5.js → 10u71-qve349q.js} +3 -3
  87. package/out/_next/static/chunks/{1imv5a-ymrj2t.js → 10vpdjjvq7u53.js} +3 -3
  88. package/out/_next/static/chunks/{355nca7if7l9n.js → 13pcz259h-_kj.js} +2 -2
  89. package/out/_next/static/chunks/{0dewly3vo-mcq.js → 1a5z9hqww-usq.js} +3 -3
  90. package/out/_next/static/chunks/{19ou9pxeiwehs.js → 1feyuu-4twwai.js} +3 -3
  91. package/out/_next/static/chunks/{0sc71p-6lnm1e.js → 1i8wb5lh3jac1.js} +2 -2
  92. package/out/_next/static/chunks/{0nga8f0q2d0bl.js → 1ngpcnj86ohnv.js} +3 -3
  93. package/out/_next/static/chunks/{2nm_wdmfjcbyc.js → 1ocvneidf1syf.js} +4 -4
  94. package/out/_next/static/chunks/{42p2hm8ca34f6.js → 1p639idox1vll.js} +3 -3
  95. package/out/_next/static/chunks/{00tf1qsuwqywe.js → 1q5b4oexneef5.js} +3 -3
  96. package/out/_next/static/chunks/{2v57_n8he320z.js → 1rkg8vhvo8vgz.js} +1 -1
  97. package/out/_next/static/chunks/{0om7fxf5bczpu.js → 1s8vxngh_0xfn.js} +3 -3
  98. package/out/_next/static/chunks/{326rk3t0gtxp_.js → 1tkaly-z0eb-q.js} +3 -3
  99. package/out/_next/static/chunks/{2_l14rwu6kgzl.js → 1z1jxtjhg_5v6.js} +2 -2
  100. package/out/_next/static/chunks/{0208v89kdo_s9.js → 205q4wv45jomk.js} +3 -3
  101. package/out/_next/static/chunks/{3_dqxs_vhmfqd.js → 20usp87kxiivk.js} +3 -3
  102. package/out/_next/static/chunks/{2tm822rgn8g7-.js → 21g3gg4lmatce.js} +5 -5
  103. package/out/_next/static/chunks/{2540mqfxc7ehr.js → 224p31baeu3c3.js} +3 -3
  104. package/out/_next/static/chunks/{3hqec4-3one07.js → 22mj125470p07.js} +3 -3
  105. package/out/_next/static/chunks/{3ls4kv54f3x8u.js → 22ud9v8dzixqk.js} +3 -3
  106. package/out/_next/static/chunks/{339y1tm7s80tn.js → 24mbze45k4evy.js} +9 -9
  107. package/out/_next/static/chunks/{11oq6l46lynfn.js → 26mue2l4069m0.js} +3 -3
  108. package/out/_next/static/chunks/{0_xtedn8e1vu_.js → 26yksvb45bfug.js} +3 -3
  109. package/out/_next/static/chunks/{19pi48hqksvo9.js → 29m1e34-eyni_.js} +2 -2
  110. package/out/_next/static/chunks/{1dqgs827_hiod.js → 2__i5ksblcvil.js} +3 -3
  111. package/out/_next/static/chunks/{3cp9qqljcytup.js → 2d_tll2e3tyei.js} +2 -2
  112. package/out/_next/static/chunks/{0ij8fs6-w0pr_.js → 2dnjzvnx4dg-n.js} +6 -6
  113. package/out/_next/static/chunks/{1rw6681ieb3-5.js → 2f16josk9b_cl.js} +2 -2
  114. package/out/_next/static/chunks/{32te9ivrk54l0.js → 2g7t-73faoik2.js} +3 -3
  115. package/out/_next/static/chunks/{1184evhxs01_c.js → 2hg887w-4-saz.js} +2 -2
  116. package/out/_next/static/chunks/{447b5tn4-avdv.js → 2j3p_ne416507.js} +3 -3
  117. package/out/_next/static/chunks/{1h_o__x8jw8gt.js → 2k5rg3rwz2qz1.js} +3 -3
  118. package/out/_next/static/chunks/2kjux30i3gg-c.js +5 -0
  119. package/out/_next/static/chunks/{3doujqxnfq19f.js → 2lal4ruoql8-s.js} +3 -3
  120. package/out/_next/static/chunks/{0p09_ncs0g7m2.js → 2m4su5mqey5cb.js} +3 -3
  121. package/out/_next/static/chunks/{40s6ngsexc737.js → 2on7of8c32boh.js} +2 -2
  122. package/out/_next/static/chunks/{3il9u-mfrp2sn.js → 2skfzjx2g9hkk.js} +6 -2
  123. package/out/_next/static/chunks/{3grllla8v0ctl.js → 2sw8wfufjrcpb.js} +3 -3
  124. package/out/_next/static/chunks/{11zynllx8mmh5.js → 2szj6o9fr-rib.js} +3 -3
  125. package/out/_next/static/chunks/{0q6-fplpae_ie.js → 2zynam_mr2g6y.js} +9 -9
  126. package/out/_next/static/chunks/{3uytb2p7vzafp.js → 3-xi25w8-k-02.js} +3 -3
  127. package/out/_next/static/chunks/{2-7e3ttj92hfr.js → 32gi2dpw3twz7.js} +3 -3
  128. package/out/_next/static/chunks/348d_4lpnrkzq.js +100 -0
  129. package/out/_next/static/chunks/{0b33bcf7x5rgy.js → 35mb--fw85e9-.js} +3 -3
  130. package/out/_next/static/chunks/{2ork76jhxvxke.js → 360g4b1clnt45.js} +4 -0
  131. package/out/_next/static/chunks/{1fg6jbuxeuj0w.js → 38kjuo_3xeof3.js} +3 -3
  132. package/out/_next/static/chunks/{2t-_fecnp5yzr.js → 3krpx72smyufn.js} +3 -3
  133. package/out/_next/static/chunks/{224ovcn90ebcs.js → 3m2hre_c-kclo.js} +4 -4
  134. package/out/_next/static/chunks/3om1fkw-lrmng.js +1 -0
  135. package/out/_next/static/chunks/{14c_mq04p7pu0.js → 3p0ir-pqcslbi.js} +9 -5
  136. package/out/_next/static/chunks/{2u8ns-x384r3i.js → 3pr477_ci25mm.js} +3 -3
  137. package/out/_next/static/chunks/{2ou2_nhvunq72.js → 3r54d1b_uyq95.js} +5 -5
  138. package/out/_next/static/chunks/{0nlirgt-x5pqr.js → 3rh3nigvg06yu.js} +17 -17
  139. package/out/_next/static/chunks/{2le8e8u2nvp0j.js → 3sc7jsyx25g08.js} +3 -3
  140. package/out/_next/static/chunks/{3yvmkdc088aly.js → 3vjgbl76cgrmt.js} +1 -1
  141. package/out/_next/static/chunks/{3o23w25lfn4mo.js → 3z3k6qx61arup.js} +4 -4
  142. package/out/_next/static/chunks/{1o4hor3cwzcxc.js → 42x9tn0uff92o.js} +3 -3
  143. package/out/_next/static/chunks/{1cfjbvjo0o9fx.js → 446p1gk5cy4da.js} +1 -1
  144. package/out/_next/static/chunks/{turbopack-2w9_vscbr0eag.js → turbopack-02-k6w2e9_3af.js} +1 -1
  145. package/out/_next/static/chunks/{turbopack-05rmr02n9n2u0.js → turbopack-03fj2scz_09ul.js} +1 -1
  146. package/out/_next/static/chunks/{turbopack-3a196kafnj312.js → turbopack-0_42u9tky4zng.js} +1 -1
  147. package/out/_next/static/chunks/{turbopack-2q65pei-ck559.js → turbopack-0gnmdx6ye6n_e.js} +1 -1
  148. package/out/_next/static/chunks/turbopack-0iozo8xy34oiw.js +1 -0
  149. package/out/_next/static/chunks/{turbopack-1azvbmrq_bxq7.js → turbopack-0rb_mm-wnau-3.js} +1 -1
  150. package/out/_next/static/chunks/{turbopack-1rdxfvyldfwrq.js → turbopack-0v5-op7r79bhf.js} +1 -1
  151. package/out/_next/static/chunks/{turbopack-3a6igydfvv1_v.js → turbopack-0zf_85we0x_rs.js} +1 -1
  152. package/out/_next/static/chunks/{turbopack-0k8oea6xmzbjh.js → turbopack-1-ukcimwb2wq1.js} +1 -1
  153. package/out/_next/static/chunks/{turbopack-0xgswwqf_4vrt.js → turbopack-10anz7o9kcb98.js} +1 -1
  154. package/out/_next/static/chunks/{turbopack-1g8mmayckmfib.js → turbopack-12-4lgc8wbnmx.js} +1 -1
  155. package/out/_next/static/chunks/{turbopack-2z2joyd6mdhpo.js → turbopack-14bpgd3qmna2b.js} +1 -1
  156. package/out/_next/static/chunks/{turbopack-0s-h1cgwrfgo-.js → turbopack-16ecm5pf7vta6.js} +1 -1
  157. package/out/_next/static/chunks/{turbopack-425nfopoa8wxd.js → turbopack-16gej7p33tsw5.js} +1 -1
  158. package/out/_next/static/chunks/{turbopack-0qxkaq0f9ka24.js → turbopack-1iglf5syrme2d.js} +1 -1
  159. package/out/_next/static/chunks/{turbopack-0dj-aua684j9c.js → turbopack-1l2mxrtt6fj2q.js} +1 -1
  160. package/out/_next/static/chunks/{turbopack-298vdad77pw5z.js → turbopack-1nwkuzx-97xdl.js} +1 -1
  161. package/out/_next/static/chunks/{turbopack-3bnkwdcrz_ts-.js → turbopack-1od40dnbx8fg3.js} +1 -1
  162. package/out/_next/static/chunks/{turbopack-3r17oio1oe7jw.js → turbopack-1orl_72rr-ky-.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-3d9zuhypuljic.js +1 -0
  190. package/out/_next/static/chunks/{turbopack-1td004byboyz2.js → turbopack-3dl00zga30bss.js} +1 -1
  191. package/out/_next/static/chunks/{turbopack-35awx_qvevnch.js → turbopack-3f06s1e12y6j9.js} +1 -1
  192. package/out/_next/static/chunks/{turbopack-14rn07-ki7f_7.js → turbopack-3g98_iakkqypg.js} +1 -1
  193. package/out/_next/static/chunks/{turbopack-1r_uprn020kr7.js → turbopack-3j4bdo8-ldea5.js} +1 -1
  194. package/out/_next/static/chunks/{turbopack-3458e7jmj1e27.js → turbopack-3l3o1x7j1z_63.js} +1 -1
  195. package/out/_next/static/chunks/{turbopack-1330tdm8r390q.js → turbopack-3lm631px3s8-4.js} +1 -1
  196. package/out/_next/static/chunks/{turbopack-0m1qzkhnpuk2j.js → turbopack-3mwf6he42ff9n.js} +1 -1
  197. package/out/_next/static/chunks/{turbopack-1csu0s9cycwgo.js → turbopack-3oih6rrmvb7t3.js} +1 -1
  198. package/out/_next/static/chunks/{turbopack-338xrj-0fpsqu.js → turbopack-3oq88d3632ksa.js} +1 -1
  199. package/out/_next/static/chunks/{turbopack-2t6ex34_bkvoe.js → turbopack-3q1s32jzw2pnu.js} +1 -1
  200. package/out/_next/static/chunks/{turbopack-351l-va10h8kw.js → turbopack-3snas0eww9sey.js} +1 -1
  201. package/out/_next/static/chunks/{turbopack-3tntqotcyx6oq.js → turbopack-3tg-pp9_bemtn.js} +1 -1
  202. package/out/_next/static/chunks/{turbopack-0n73ad0fad4yl.js → turbopack-3tlngjwse53m1.js} +1 -1
  203. package/out/_next/static/chunks/{turbopack-0b-g0lpiikryt.js → turbopack-3tp3s3o8o9e-_.js} +1 -1
  204. package/out/_next/static/chunks/{turbopack-1hty_7i5tzg63.js → turbopack-3tyhe6yjnx5h6.js} +1 -1
  205. package/out/_next/static/chunks/{turbopack-3uvfl95p1ubqn.js → turbopack-3v3wnwaeu0os5.js} +1 -1
  206. package/out/_next/static/chunks/{turbopack-2mbsjg411_ndq.js → turbopack-3xc_rmnnnzfkm.js} +1 -1
  207. package/out/_next/static/chunks/{turbopack-1bjaxey2pj8nn.js → turbopack-4592lth1oe0jg.js} +1 -1
  208. package/out/_next/static/{hH8h6SzcZWEUFySYqRPbW → iR5ImdUZrRG-KyLitg8YP}/_buildManifest.js +63 -63
  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 → iR5ImdUZrRG-KyLitg8YP}/_clientMiddlewareManifest.js +0 -0
  281. /package/out/_next/static/{hH8h6SzcZWEUFySYqRPbW → iR5ImdUZrRG-KyLitg8YP}/_ssgManifest.js +0 -0
package/dist/ui.js CHANGED
@@ -1,20 +1,19 @@
1
- import { useFormatDateTime_default } from './chunk-2RTX42IE.js';
2
- import { clsx, clsx_default, ChevronUpIcon_default, ChevronDownIcon_default, SubmitButton_default, TagInputField_default, Badge_default } from './chunk-MSPWYMDY.js';
3
- export { Badge_default as Badge, HelpText_default as HelpText, JSONView_default as JSONView, Tab_default as Tab, TagInput_default as TagInput } from './chunk-MSPWYMDY.js';
1
+ import { clsx, clsx_default, ChevronUpIcon_default, ChevronDownIcon_default, SubmitButton_default, TagInputField_default, Badge_default } from './chunk-SDA2A6TP.js';
2
+ export { Badge_default as Badge, HelpText_default as HelpText, JSONView_default as JSONView, Tab_default as Tab, TagInput_default as TagInput } from './chunk-SDA2A6TP.js';
4
3
  import { DefaultLimit, LimitSteps } from './chunk-VDKQGOMV.js';
5
4
  import { useForm_default } from './chunk-Q6S3LBUF.js';
6
- import { FormContext_default } from './chunk-7PPOGX7R.js';
7
- import './chunk-YZGQJJCD.js';
5
+ import { FormContext_default, toDate, isValid, millisecondsInWeek, constructFrom, startOfDay, millisecondsInDay } from './chunk-6ZZIMVID.js';
8
6
  import { NoSymbolIcon_default, PlusIcon_default, CheckCircleIcon_default, XCircleIcon_default, InformationCircleIcon_default, PhotoIcon_default, UserCircleIcon_default } from './chunk-XJBPMIC4.js';
9
7
  import { useModal_default } from './chunk-XHOCXPD5.js';
8
+ import { init_react, react_exports } from './chunk-2ARWAOZW.js';
10
9
  import './chunk-RVG6IOFC.js';
11
- import './chunk-JAVEZY3Q.js';
10
+ import { useShopInfo_default, AppContext_default } from './chunk-JAVEZY3Q.js';
12
11
  import './chunk-ELPURWDC.js';
13
12
  import './chunk-RAQV2GYF.js';
14
13
  import './chunk-54DKBWXV.js';
15
14
  import './chunk-GY2DRQGW.js';
16
15
  import './chunk-IAQPLRXZ.js';
17
- import { __commonJS, __require, __toESM, __export } from './chunk-4VNS5WPM.js';
16
+ import { __commonJS, __toCommonJS, __toESM, __export } from './chunk-WPLOTFGW.js';
18
17
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
19
18
  import { useRouter } from 'next/router';
20
19
  import { useIntl, FormattedMessage } from 'react-intl';
@@ -34,7 +33,7 @@ var require_use_sync_external_store_shim_development = __commonJS({
34
33
  return x2 === y2 && (0 !== x2 || 1 / x2 === 1 / y2) || x2 !== x2 && y2 !== y2;
35
34
  }
36
35
  function useSyncExternalStore$2(subscribe, getSnapshot) {
37
- didWarnOld18Alpha || void 0 === React17.startTransition || (didWarnOld18Alpha = true, console.error(
36
+ didWarnOld18Alpha || void 0 === React19.startTransition || (didWarnOld18Alpha = true, console.error(
38
37
  "You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
39
38
  ));
40
39
  var value = getSnapshot();
@@ -44,7 +43,7 @@ var require_use_sync_external_store_shim_development = __commonJS({
44
43
  "The result of getSnapshot should be cached to avoid an infinite loop"
45
44
  ), didWarnUncachedGetSnapshot = true);
46
45
  }
47
- cachedValue = useState13({
46
+ cachedValue = useState14({
48
47
  inst: { value, getSnapshot }
49
48
  });
50
49
  var inst = cachedValue[0].inst, forceUpdate = cachedValue[1];
@@ -56,7 +55,7 @@ var require_use_sync_external_store_shim_development = __commonJS({
56
55
  },
57
56
  [subscribe, value, getSnapshot]
58
57
  );
59
- useEffect12(
58
+ useEffect13(
60
59
  function() {
61
60
  checkIfSnapshotChanged(inst) && forceUpdate({ inst });
62
61
  return subscribe(function() {
@@ -82,8 +81,8 @@ var require_use_sync_external_store_shim_development = __commonJS({
82
81
  return getSnapshot();
83
82
  }
84
83
  "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
85
- var React17 = __require("react"), objectIs = "function" === typeof Object.is ? Object.is : is2, useState13 = React17.useState, useEffect12 = React17.useEffect, useLayoutEffect2 = React17.useLayoutEffect, useDebugValue = React17.useDebugValue, didWarnOld18Alpha = false, didWarnUncachedGetSnapshot = false, shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
86
- exports.useSyncExternalStore = void 0 !== React17.useSyncExternalStore ? React17.useSyncExternalStore : shim;
84
+ var React19 = (init_react(), __toCommonJS(react_exports)), objectIs = "function" === typeof Object.is ? Object.is : is2, useState14 = React19.useState, useEffect13 = React19.useEffect, useLayoutEffect2 = React19.useLayoutEffect, useDebugValue = React19.useDebugValue, didWarnOld18Alpha = false, didWarnUncachedGetSnapshot = false, shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
85
+ exports.useSyncExternalStore = void 0 !== React19.useSyncExternalStore ? React19.useSyncExternalStore : shim;
87
86
  "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
88
87
  })();
89
88
  }
@@ -106,7 +105,7 @@ var require_with_selector_development = __commonJS({
106
105
  return x2 === y2 && (0 !== x2 || 1 / x2 === 1 / y2) || x2 !== x2 && y2 !== y2;
107
106
  }
108
107
  "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
109
- var React17 = __require("react"), shim = require_shim(), objectIs = "function" === typeof Object.is ? Object.is : is2, useSyncExternalStore = shim.useSyncExternalStore, useRef7 = React17.useRef, useEffect12 = React17.useEffect, useMemo6 = React17.useMemo, useDebugValue = React17.useDebugValue;
108
+ var React19 = (init_react(), __toCommonJS(react_exports)), shim = require_shim(), objectIs = "function" === typeof Object.is ? Object.is : is2, useSyncExternalStore = shim.useSyncExternalStore, useRef7 = React19.useRef, useEffect13 = React19.useEffect, useMemo6 = React19.useMemo, useDebugValue = React19.useDebugValue;
110
109
  exports.useSyncExternalStoreWithSelector = function(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
111
110
  var instRef = useRef7(null);
112
111
  if (null === instRef.current) {
@@ -149,7 +148,7 @@ var require_with_selector_development = __commonJS({
149
148
  [getSnapshot, getServerSnapshot, selector, isEqual]
150
149
  );
151
150
  var value = useSyncExternalStore(subscribe, instRef[0], instRef[1]);
152
- useEffect12(
151
+ useEffect13(
153
152
  function() {
154
153
  inst.hasValue = true;
155
154
  inst.value = value;
@@ -1396,6 +1395,15 @@ var Button = ({
1396
1395
  var Button_default = Button;
1397
1396
 
1398
1397
  // src/modules/common/utils/utils.ts
1398
+ var getSortKeys = (sort) => {
1399
+ return sort && sort?.split(",").reduce((acc, curr) => {
1400
+ const [key = null, value = null] = (curr || "")?.split("_") || [];
1401
+ return {
1402
+ ...acc,
1403
+ [key]: value
1404
+ };
1405
+ }, null) || {};
1406
+ };
1399
1407
  var normalizeObjectToString = (object) => {
1400
1408
  return Object.keys(object)?.map((key) => [key, object[key]].join("="))?.join("&");
1401
1409
  };
@@ -1638,7 +1646,7 @@ var Loading = () => {
1638
1646
  ] }) });
1639
1647
  };
1640
1648
  var Loading_default = Loading;
1641
- var NoData = ({ message, className = "", Icon = null }) => {
1649
+ var NoData = ({ message: message2, className = "", Icon = null }) => {
1642
1650
  return /* @__PURE__ */ jsx(
1643
1651
  "div",
1644
1652
  {
@@ -1660,7 +1668,7 @@ var NoData = ({ message, className = "", Icon = null }) => {
1660
1668
  chunks,
1661
1669
  " "
1662
1670
  ] }),
1663
- message
1671
+ message: message2
1664
1672
  }
1665
1673
  }
1666
1674
  )
@@ -2584,63 +2592,2140 @@ var ErrorBoundary = class extends React8__default.Component {
2584
2592
  super(props);
2585
2593
  this.state = { hasError: false, error: null };
2586
2594
  }
2587
- static getDerivedStateFromError(error) {
2588
- return { hasError: true, error };
2595
+ static getDerivedStateFromError(error) {
2596
+ return { hasError: true, error };
2597
+ }
2598
+ componentDidCatch(error, errorInfo) {
2599
+ console.error({ error, errorInfo });
2600
+ }
2601
+ render() {
2602
+ if (this.state.hasError) {
2603
+ return /* @__PURE__ */ jsx(
2604
+ ErrorFallback_default,
2605
+ {
2606
+ error: this.state.error,
2607
+ resetError: () => this.setState({ hasError: false, error: null })
2608
+ }
2609
+ );
2610
+ }
2611
+ return this.props.children;
2612
+ }
2613
+ };
2614
+ var ErrorBoundary_default = ErrorBoundary;
2615
+ var DateInputField = ({
2616
+ id,
2617
+ label,
2618
+ value,
2619
+ onChange,
2620
+ placeholder,
2621
+ min: min2,
2622
+ max: max2,
2623
+ className,
2624
+ containerClassName
2625
+ }) => {
2626
+ return /* @__PURE__ */ jsxs("div", { className: clsx_default("flex flex-col gap-1", containerClassName), children: [
2627
+ label && /* @__PURE__ */ jsx("label", { htmlFor: id, className: "text-sm font-medium text-text-secondary", children: label }),
2628
+ /* @__PURE__ */ jsx(
2629
+ "input",
2630
+ {
2631
+ type: "date",
2632
+ id,
2633
+ value: value || "",
2634
+ onChange: (e) => {
2635
+ const val = e.target.value;
2636
+ onChange(val ? val : null);
2637
+ },
2638
+ placeholder,
2639
+ min: min2,
2640
+ max: max2,
2641
+ className: clsx_default(
2642
+ "w-full rounded-md border-1 border-border-default bg-surface-input px-3 py-2 text-sm shadow-xs text-text-primary focus:outline-hidden focus:ring-2 focus:ring-focus-ring dark:[color-scheme:dark]",
2643
+ className
2644
+ )
2645
+ }
2646
+ )
2647
+ ] });
2648
+ };
2649
+ var DateInput_default = DateInputField;
2650
+
2651
+ // ../node_modules/date-fns/_lib/defaultOptions.js
2652
+ var defaultOptions = {};
2653
+ function getDefaultOptions() {
2654
+ return defaultOptions;
2655
+ }
2656
+
2657
+ // ../node_modules/date-fns/startOfWeek.js
2658
+ function startOfWeek(date2, options) {
2659
+ const defaultOptions2 = getDefaultOptions();
2660
+ const weekStartsOn = options?.weekStartsOn ?? options?.locale?.options?.weekStartsOn ?? defaultOptions2.weekStartsOn ?? defaultOptions2.locale?.options?.weekStartsOn ?? 0;
2661
+ const _date = toDate(date2, options?.in);
2662
+ const day = _date.getDay();
2663
+ const diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
2664
+ _date.setDate(_date.getDate() - diff);
2665
+ _date.setHours(0, 0, 0, 0);
2666
+ return _date;
2667
+ }
2668
+
2669
+ // ../node_modules/date-fns/startOfISOWeek.js
2670
+ function startOfISOWeek(date2, options) {
2671
+ return startOfWeek(date2, { ...options, weekStartsOn: 1 });
2672
+ }
2673
+
2674
+ // ../node_modules/date-fns/getISOWeekYear.js
2675
+ function getISOWeekYear(date2, options) {
2676
+ const _date = toDate(date2, options?.in);
2677
+ const year = _date.getFullYear();
2678
+ const fourthOfJanuaryOfNextYear = constructFrom(_date, 0);
2679
+ fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4);
2680
+ fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0);
2681
+ const startOfNextYear = startOfISOWeek(fourthOfJanuaryOfNextYear);
2682
+ const fourthOfJanuaryOfThisYear = constructFrom(_date, 0);
2683
+ fourthOfJanuaryOfThisYear.setFullYear(year, 0, 4);
2684
+ fourthOfJanuaryOfThisYear.setHours(0, 0, 0, 0);
2685
+ const startOfThisYear = startOfISOWeek(fourthOfJanuaryOfThisYear);
2686
+ if (_date.getTime() >= startOfNextYear.getTime()) {
2687
+ return year + 1;
2688
+ } else if (_date.getTime() >= startOfThisYear.getTime()) {
2689
+ return year;
2690
+ } else {
2691
+ return year - 1;
2692
+ }
2693
+ }
2694
+
2695
+ // ../node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js
2696
+ function getTimezoneOffsetInMilliseconds(date2) {
2697
+ const _date = toDate(date2);
2698
+ const utcDate2 = new Date(
2699
+ Date.UTC(
2700
+ _date.getFullYear(),
2701
+ _date.getMonth(),
2702
+ _date.getDate(),
2703
+ _date.getHours(),
2704
+ _date.getMinutes(),
2705
+ _date.getSeconds(),
2706
+ _date.getMilliseconds()
2707
+ )
2708
+ );
2709
+ utcDate2.setUTCFullYear(_date.getFullYear());
2710
+ return +date2 - +utcDate2;
2711
+ }
2712
+
2713
+ // ../node_modules/date-fns/_lib/normalizeDates.js
2714
+ function normalizeDates(context, ...dates) {
2715
+ const normalize2 = constructFrom.bind(
2716
+ null,
2717
+ dates.find((date2) => typeof date2 === "object")
2718
+ );
2719
+ return dates.map(normalize2);
2720
+ }
2721
+
2722
+ // ../node_modules/date-fns/differenceInCalendarDays.js
2723
+ function differenceInCalendarDays(laterDate, earlierDate, options) {
2724
+ const [laterDate_, earlierDate_] = normalizeDates(
2725
+ options?.in,
2726
+ laterDate,
2727
+ earlierDate
2728
+ );
2729
+ const laterStartOfDay = startOfDay(laterDate_);
2730
+ const earlierStartOfDay = startOfDay(earlierDate_);
2731
+ const laterTimestamp = +laterStartOfDay - getTimezoneOffsetInMilliseconds(laterStartOfDay);
2732
+ const earlierTimestamp = +earlierStartOfDay - getTimezoneOffsetInMilliseconds(earlierStartOfDay);
2733
+ return Math.round((laterTimestamp - earlierTimestamp) / millisecondsInDay);
2734
+ }
2735
+
2736
+ // ../node_modules/date-fns/startOfISOWeekYear.js
2737
+ function startOfISOWeekYear(date2, options) {
2738
+ const year = getISOWeekYear(date2, options);
2739
+ const fourthOfJanuary = constructFrom(date2, 0);
2740
+ fourthOfJanuary.setFullYear(year, 0, 4);
2741
+ fourthOfJanuary.setHours(0, 0, 0, 0);
2742
+ return startOfISOWeek(fourthOfJanuary);
2743
+ }
2744
+
2745
+ // ../node_modules/date-fns/startOfYear.js
2746
+ function startOfYear(date2, options) {
2747
+ const date_ = toDate(date2, options?.in);
2748
+ date_.setFullYear(date_.getFullYear(), 0, 1);
2749
+ date_.setHours(0, 0, 0, 0);
2750
+ return date_;
2751
+ }
2752
+
2753
+ // ../node_modules/date-fns/locale/en-US/_lib/formatDistance.js
2754
+ var formatDistanceLocale = {
2755
+ lessThanXSeconds: {
2756
+ one: "less than a second",
2757
+ other: "less than {{count}} seconds"
2758
+ },
2759
+ xSeconds: {
2760
+ one: "1 second",
2761
+ other: "{{count}} seconds"
2762
+ },
2763
+ halfAMinute: "half a minute",
2764
+ lessThanXMinutes: {
2765
+ one: "less than a minute",
2766
+ other: "less than {{count}} minutes"
2767
+ },
2768
+ xMinutes: {
2769
+ one: "1 minute",
2770
+ other: "{{count}} minutes"
2771
+ },
2772
+ aboutXHours: {
2773
+ one: "about 1 hour",
2774
+ other: "about {{count}} hours"
2775
+ },
2776
+ xHours: {
2777
+ one: "1 hour",
2778
+ other: "{{count}} hours"
2779
+ },
2780
+ xDays: {
2781
+ one: "1 day",
2782
+ other: "{{count}} days"
2783
+ },
2784
+ aboutXWeeks: {
2785
+ one: "about 1 week",
2786
+ other: "about {{count}} weeks"
2787
+ },
2788
+ xWeeks: {
2789
+ one: "1 week",
2790
+ other: "{{count}} weeks"
2791
+ },
2792
+ aboutXMonths: {
2793
+ one: "about 1 month",
2794
+ other: "about {{count}} months"
2795
+ },
2796
+ xMonths: {
2797
+ one: "1 month",
2798
+ other: "{{count}} months"
2799
+ },
2800
+ aboutXYears: {
2801
+ one: "about 1 year",
2802
+ other: "about {{count}} years"
2803
+ },
2804
+ xYears: {
2805
+ one: "1 year",
2806
+ other: "{{count}} years"
2807
+ },
2808
+ overXYears: {
2809
+ one: "over 1 year",
2810
+ other: "over {{count}} years"
2811
+ },
2812
+ almostXYears: {
2813
+ one: "almost 1 year",
2814
+ other: "almost {{count}} years"
2815
+ }
2816
+ };
2817
+ var formatDistance = (token, count, options) => {
2818
+ let result;
2819
+ const tokenValue = formatDistanceLocale[token];
2820
+ if (typeof tokenValue === "string") {
2821
+ result = tokenValue;
2822
+ } else if (count === 1) {
2823
+ result = tokenValue.one;
2824
+ } else {
2825
+ result = tokenValue.other.replace("{{count}}", count.toString());
2826
+ }
2827
+ if (options?.addSuffix) {
2828
+ if (options.comparison && options.comparison > 0) {
2829
+ return "in " + result;
2830
+ } else {
2831
+ return result + " ago";
2832
+ }
2833
+ }
2834
+ return result;
2835
+ };
2836
+
2837
+ // ../node_modules/date-fns/locale/_lib/buildFormatLongFn.js
2838
+ function buildFormatLongFn(args) {
2839
+ return (options = {}) => {
2840
+ const width = options.width ? String(options.width) : args.defaultWidth;
2841
+ const format4 = args.formats[width] || args.formats[args.defaultWidth];
2842
+ return format4;
2843
+ };
2844
+ }
2845
+
2846
+ // ../node_modules/date-fns/locale/en-US/_lib/formatLong.js
2847
+ var dateFormats = {
2848
+ full: "EEEE, MMMM do, y",
2849
+ long: "MMMM do, y",
2850
+ medium: "MMM d, y",
2851
+ short: "MM/dd/yyyy"
2852
+ };
2853
+ var timeFormats = {
2854
+ full: "h:mm:ss a zzzz",
2855
+ long: "h:mm:ss a z",
2856
+ medium: "h:mm:ss a",
2857
+ short: "h:mm a"
2858
+ };
2859
+ var dateTimeFormats = {
2860
+ full: "{{date}} 'at' {{time}}",
2861
+ long: "{{date}} 'at' {{time}}",
2862
+ medium: "{{date}}, {{time}}",
2863
+ short: "{{date}}, {{time}}"
2864
+ };
2865
+ var formatLong = {
2866
+ date: buildFormatLongFn({
2867
+ formats: dateFormats,
2868
+ defaultWidth: "full"
2869
+ }),
2870
+ time: buildFormatLongFn({
2871
+ formats: timeFormats,
2872
+ defaultWidth: "full"
2873
+ }),
2874
+ dateTime: buildFormatLongFn({
2875
+ formats: dateTimeFormats,
2876
+ defaultWidth: "full"
2877
+ })
2878
+ };
2879
+
2880
+ // ../node_modules/date-fns/locale/en-US/_lib/formatRelative.js
2881
+ var formatRelativeLocale = {
2882
+ lastWeek: "'last' eeee 'at' p",
2883
+ yesterday: "'yesterday at' p",
2884
+ today: "'today at' p",
2885
+ tomorrow: "'tomorrow at' p",
2886
+ nextWeek: "eeee 'at' p",
2887
+ other: "P"
2888
+ };
2889
+ var formatRelative = (token, _date, _baseDate, _options) => formatRelativeLocale[token];
2890
+
2891
+ // ../node_modules/date-fns/locale/_lib/buildLocalizeFn.js
2892
+ function buildLocalizeFn(args) {
2893
+ return (value, options) => {
2894
+ const context = options?.context ? String(options.context) : "standalone";
2895
+ let valuesArray;
2896
+ if (context === "formatting" && args.formattingValues) {
2897
+ const defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
2898
+ const width = options?.width ? String(options.width) : defaultWidth;
2899
+ valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
2900
+ } else {
2901
+ const defaultWidth = args.defaultWidth;
2902
+ const width = options?.width ? String(options.width) : args.defaultWidth;
2903
+ valuesArray = args.values[width] || args.values[defaultWidth];
2904
+ }
2905
+ const index = args.argumentCallback ? args.argumentCallback(value) : value;
2906
+ return valuesArray[index];
2907
+ };
2908
+ }
2909
+
2910
+ // ../node_modules/date-fns/locale/en-US/_lib/localize.js
2911
+ var eraValues = {
2912
+ narrow: ["B", "A"],
2913
+ abbreviated: ["BC", "AD"],
2914
+ wide: ["Before Christ", "Anno Domini"]
2915
+ };
2916
+ var quarterValues = {
2917
+ narrow: ["1", "2", "3", "4"],
2918
+ abbreviated: ["Q1", "Q2", "Q3", "Q4"],
2919
+ wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
2920
+ };
2921
+ var monthValues = {
2922
+ narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
2923
+ abbreviated: [
2924
+ "Jan",
2925
+ "Feb",
2926
+ "Mar",
2927
+ "Apr",
2928
+ "May",
2929
+ "Jun",
2930
+ "Jul",
2931
+ "Aug",
2932
+ "Sep",
2933
+ "Oct",
2934
+ "Nov",
2935
+ "Dec"
2936
+ ],
2937
+ wide: [
2938
+ "January",
2939
+ "February",
2940
+ "March",
2941
+ "April",
2942
+ "May",
2943
+ "June",
2944
+ "July",
2945
+ "August",
2946
+ "September",
2947
+ "October",
2948
+ "November",
2949
+ "December"
2950
+ ]
2951
+ };
2952
+ var dayValues = {
2953
+ narrow: ["S", "M", "T", "W", "T", "F", "S"],
2954
+ short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
2955
+ abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
2956
+ wide: [
2957
+ "Sunday",
2958
+ "Monday",
2959
+ "Tuesday",
2960
+ "Wednesday",
2961
+ "Thursday",
2962
+ "Friday",
2963
+ "Saturday"
2964
+ ]
2965
+ };
2966
+ var dayPeriodValues = {
2967
+ narrow: {
2968
+ am: "a",
2969
+ pm: "p",
2970
+ midnight: "mi",
2971
+ noon: "n",
2972
+ morning: "morning",
2973
+ afternoon: "afternoon",
2974
+ evening: "evening",
2975
+ night: "night"
2976
+ },
2977
+ abbreviated: {
2978
+ am: "AM",
2979
+ pm: "PM",
2980
+ midnight: "midnight",
2981
+ noon: "noon",
2982
+ morning: "morning",
2983
+ afternoon: "afternoon",
2984
+ evening: "evening",
2985
+ night: "night"
2986
+ },
2987
+ wide: {
2988
+ am: "a.m.",
2989
+ pm: "p.m.",
2990
+ midnight: "midnight",
2991
+ noon: "noon",
2992
+ morning: "morning",
2993
+ afternoon: "afternoon",
2994
+ evening: "evening",
2995
+ night: "night"
2996
+ }
2997
+ };
2998
+ var formattingDayPeriodValues = {
2999
+ narrow: {
3000
+ am: "a",
3001
+ pm: "p",
3002
+ midnight: "mi",
3003
+ noon: "n",
3004
+ morning: "in the morning",
3005
+ afternoon: "in the afternoon",
3006
+ evening: "in the evening",
3007
+ night: "at night"
3008
+ },
3009
+ abbreviated: {
3010
+ am: "AM",
3011
+ pm: "PM",
3012
+ midnight: "midnight",
3013
+ noon: "noon",
3014
+ morning: "in the morning",
3015
+ afternoon: "in the afternoon",
3016
+ evening: "in the evening",
3017
+ night: "at night"
3018
+ },
3019
+ wide: {
3020
+ am: "a.m.",
3021
+ pm: "p.m.",
3022
+ midnight: "midnight",
3023
+ noon: "noon",
3024
+ morning: "in the morning",
3025
+ afternoon: "in the afternoon",
3026
+ evening: "in the evening",
3027
+ night: "at night"
3028
+ }
3029
+ };
3030
+ var ordinalNumber = (dirtyNumber, _options) => {
3031
+ const number4 = Number(dirtyNumber);
3032
+ const rem100 = number4 % 100;
3033
+ if (rem100 > 20 || rem100 < 10) {
3034
+ switch (rem100 % 10) {
3035
+ case 1:
3036
+ return number4 + "st";
3037
+ case 2:
3038
+ return number4 + "nd";
3039
+ case 3:
3040
+ return number4 + "rd";
3041
+ }
3042
+ }
3043
+ return number4 + "th";
3044
+ };
3045
+ var localize = {
3046
+ ordinalNumber,
3047
+ era: buildLocalizeFn({
3048
+ values: eraValues,
3049
+ defaultWidth: "wide"
3050
+ }),
3051
+ quarter: buildLocalizeFn({
3052
+ values: quarterValues,
3053
+ defaultWidth: "wide",
3054
+ argumentCallback: (quarter) => quarter - 1
3055
+ }),
3056
+ month: buildLocalizeFn({
3057
+ values: monthValues,
3058
+ defaultWidth: "wide"
3059
+ }),
3060
+ day: buildLocalizeFn({
3061
+ values: dayValues,
3062
+ defaultWidth: "wide"
3063
+ }),
3064
+ dayPeriod: buildLocalizeFn({
3065
+ values: dayPeriodValues,
3066
+ defaultWidth: "wide",
3067
+ formattingValues: formattingDayPeriodValues,
3068
+ defaultFormattingWidth: "wide"
3069
+ })
3070
+ };
3071
+
3072
+ // ../node_modules/date-fns/locale/_lib/buildMatchFn.js
3073
+ function buildMatchFn(args) {
3074
+ return (string, options = {}) => {
3075
+ const width = options.width;
3076
+ const matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
3077
+ const matchResult = string.match(matchPattern);
3078
+ if (!matchResult) {
3079
+ return null;
3080
+ }
3081
+ const matchedString = matchResult[0];
3082
+ const parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
3083
+ const key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, (pattern) => pattern.test(matchedString)) : (
3084
+ // [TODO] -- I challenge you to fix the type
3085
+ findKey(parsePatterns, (pattern) => pattern.test(matchedString))
3086
+ );
3087
+ let value;
3088
+ value = args.valueCallback ? args.valueCallback(key) : key;
3089
+ value = options.valueCallback ? (
3090
+ // [TODO] -- I challenge you to fix the type
3091
+ options.valueCallback(value)
3092
+ ) : value;
3093
+ const rest = string.slice(matchedString.length);
3094
+ return { value, rest };
3095
+ };
3096
+ }
3097
+ function findKey(object, predicate) {
3098
+ for (const key in object) {
3099
+ if (Object.prototype.hasOwnProperty.call(object, key) && predicate(object[key])) {
3100
+ return key;
3101
+ }
3102
+ }
3103
+ return void 0;
3104
+ }
3105
+ function findIndex(array, predicate) {
3106
+ for (let key = 0; key < array.length; key++) {
3107
+ if (predicate(array[key])) {
3108
+ return key;
3109
+ }
3110
+ }
3111
+ return void 0;
3112
+ }
3113
+
3114
+ // ../node_modules/date-fns/locale/_lib/buildMatchPatternFn.js
3115
+ function buildMatchPatternFn(args) {
3116
+ return (string, options = {}) => {
3117
+ const matchResult = string.match(args.matchPattern);
3118
+ if (!matchResult) return null;
3119
+ const matchedString = matchResult[0];
3120
+ const parseResult = string.match(args.parsePattern);
3121
+ if (!parseResult) return null;
3122
+ let value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
3123
+ value = options.valueCallback ? options.valueCallback(value) : value;
3124
+ const rest = string.slice(matchedString.length);
3125
+ return { value, rest };
3126
+ };
3127
+ }
3128
+
3129
+ // ../node_modules/date-fns/locale/en-US/_lib/match.js
3130
+ var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
3131
+ var parseOrdinalNumberPattern = /\d+/i;
3132
+ var matchEraPatterns = {
3133
+ narrow: /^(b|a)/i,
3134
+ abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
3135
+ wide: /^(before christ|before common era|anno domini|common era)/i
3136
+ };
3137
+ var parseEraPatterns = {
3138
+ any: [/^b/i, /^(a|c)/i]
3139
+ };
3140
+ var matchQuarterPatterns = {
3141
+ narrow: /^[1234]/i,
3142
+ abbreviated: /^q[1234]/i,
3143
+ wide: /^[1234](th|st|nd|rd)? quarter/i
3144
+ };
3145
+ var parseQuarterPatterns = {
3146
+ any: [/1/i, /2/i, /3/i, /4/i]
3147
+ };
3148
+ var matchMonthPatterns = {
3149
+ narrow: /^[jfmasond]/i,
3150
+ abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
3151
+ wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
3152
+ };
3153
+ var parseMonthPatterns = {
3154
+ narrow: [
3155
+ /^j/i,
3156
+ /^f/i,
3157
+ /^m/i,
3158
+ /^a/i,
3159
+ /^m/i,
3160
+ /^j/i,
3161
+ /^j/i,
3162
+ /^a/i,
3163
+ /^s/i,
3164
+ /^o/i,
3165
+ /^n/i,
3166
+ /^d/i
3167
+ ],
3168
+ any: [
3169
+ /^ja/i,
3170
+ /^f/i,
3171
+ /^mar/i,
3172
+ /^ap/i,
3173
+ /^may/i,
3174
+ /^jun/i,
3175
+ /^jul/i,
3176
+ /^au/i,
3177
+ /^s/i,
3178
+ /^o/i,
3179
+ /^n/i,
3180
+ /^d/i
3181
+ ]
3182
+ };
3183
+ var matchDayPatterns = {
3184
+ narrow: /^[smtwf]/i,
3185
+ short: /^(su|mo|tu|we|th|fr|sa)/i,
3186
+ abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
3187
+ wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
3188
+ };
3189
+ var parseDayPatterns = {
3190
+ narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
3191
+ any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
3192
+ };
3193
+ var matchDayPeriodPatterns = {
3194
+ narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
3195
+ any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
3196
+ };
3197
+ var parseDayPeriodPatterns = {
3198
+ any: {
3199
+ am: /^a/i,
3200
+ pm: /^p/i,
3201
+ midnight: /^mi/i,
3202
+ noon: /^no/i,
3203
+ morning: /morning/i,
3204
+ afternoon: /afternoon/i,
3205
+ evening: /evening/i,
3206
+ night: /night/i
3207
+ }
3208
+ };
3209
+ var match = {
3210
+ ordinalNumber: buildMatchPatternFn({
3211
+ matchPattern: matchOrdinalNumberPattern,
3212
+ parsePattern: parseOrdinalNumberPattern,
3213
+ valueCallback: (value) => parseInt(value, 10)
3214
+ }),
3215
+ era: buildMatchFn({
3216
+ matchPatterns: matchEraPatterns,
3217
+ defaultMatchWidth: "wide",
3218
+ parsePatterns: parseEraPatterns,
3219
+ defaultParseWidth: "any"
3220
+ }),
3221
+ quarter: buildMatchFn({
3222
+ matchPatterns: matchQuarterPatterns,
3223
+ defaultMatchWidth: "wide",
3224
+ parsePatterns: parseQuarterPatterns,
3225
+ defaultParseWidth: "any",
3226
+ valueCallback: (index) => index + 1
3227
+ }),
3228
+ month: buildMatchFn({
3229
+ matchPatterns: matchMonthPatterns,
3230
+ defaultMatchWidth: "wide",
3231
+ parsePatterns: parseMonthPatterns,
3232
+ defaultParseWidth: "any"
3233
+ }),
3234
+ day: buildMatchFn({
3235
+ matchPatterns: matchDayPatterns,
3236
+ defaultMatchWidth: "wide",
3237
+ parsePatterns: parseDayPatterns,
3238
+ defaultParseWidth: "any"
3239
+ }),
3240
+ dayPeriod: buildMatchFn({
3241
+ matchPatterns: matchDayPeriodPatterns,
3242
+ defaultMatchWidth: "any",
3243
+ parsePatterns: parseDayPeriodPatterns,
3244
+ defaultParseWidth: "any"
3245
+ })
3246
+ };
3247
+
3248
+ // ../node_modules/date-fns/locale/en-US.js
3249
+ var enUS = {
3250
+ code: "en-US",
3251
+ formatDistance,
3252
+ formatLong,
3253
+ formatRelative,
3254
+ localize,
3255
+ match,
3256
+ options: {
3257
+ weekStartsOn: 0,
3258
+ firstWeekContainsDate: 1
3259
+ }
3260
+ };
3261
+
3262
+ // ../node_modules/date-fns/getDayOfYear.js
3263
+ function getDayOfYear(date2, options) {
3264
+ const _date = toDate(date2, options?.in);
3265
+ const diff = differenceInCalendarDays(_date, startOfYear(_date));
3266
+ const dayOfYear = diff + 1;
3267
+ return dayOfYear;
3268
+ }
3269
+
3270
+ // ../node_modules/date-fns/getISOWeek.js
3271
+ function getISOWeek(date2, options) {
3272
+ const _date = toDate(date2, options?.in);
3273
+ const diff = +startOfISOWeek(_date) - +startOfISOWeekYear(_date);
3274
+ return Math.round(diff / millisecondsInWeek) + 1;
3275
+ }
3276
+
3277
+ // ../node_modules/date-fns/getWeekYear.js
3278
+ function getWeekYear(date2, options) {
3279
+ const _date = toDate(date2, options?.in);
3280
+ const year = _date.getFullYear();
3281
+ const defaultOptions2 = getDefaultOptions();
3282
+ const firstWeekContainsDate = options?.firstWeekContainsDate ?? options?.locale?.options?.firstWeekContainsDate ?? defaultOptions2.firstWeekContainsDate ?? defaultOptions2.locale?.options?.firstWeekContainsDate ?? 1;
3283
+ const firstWeekOfNextYear = constructFrom(options?.in || date2, 0);
3284
+ firstWeekOfNextYear.setFullYear(year + 1, 0, firstWeekContainsDate);
3285
+ firstWeekOfNextYear.setHours(0, 0, 0, 0);
3286
+ const startOfNextYear = startOfWeek(firstWeekOfNextYear, options);
3287
+ const firstWeekOfThisYear = constructFrom(options?.in || date2, 0);
3288
+ firstWeekOfThisYear.setFullYear(year, 0, firstWeekContainsDate);
3289
+ firstWeekOfThisYear.setHours(0, 0, 0, 0);
3290
+ const startOfThisYear = startOfWeek(firstWeekOfThisYear, options);
3291
+ if (+_date >= +startOfNextYear) {
3292
+ return year + 1;
3293
+ } else if (+_date >= +startOfThisYear) {
3294
+ return year;
3295
+ } else {
3296
+ return year - 1;
3297
+ }
3298
+ }
3299
+
3300
+ // ../node_modules/date-fns/startOfWeekYear.js
3301
+ function startOfWeekYear(date2, options) {
3302
+ const defaultOptions2 = getDefaultOptions();
3303
+ const firstWeekContainsDate = options?.firstWeekContainsDate ?? options?.locale?.options?.firstWeekContainsDate ?? defaultOptions2.firstWeekContainsDate ?? defaultOptions2.locale?.options?.firstWeekContainsDate ?? 1;
3304
+ const year = getWeekYear(date2, options);
3305
+ const firstWeek = constructFrom(options?.in || date2, 0);
3306
+ firstWeek.setFullYear(year, 0, firstWeekContainsDate);
3307
+ firstWeek.setHours(0, 0, 0, 0);
3308
+ const _date = startOfWeek(firstWeek, options);
3309
+ return _date;
3310
+ }
3311
+
3312
+ // ../node_modules/date-fns/getWeek.js
3313
+ function getWeek(date2, options) {
3314
+ const _date = toDate(date2, options?.in);
3315
+ const diff = +startOfWeek(_date, options) - +startOfWeekYear(_date, options);
3316
+ return Math.round(diff / millisecondsInWeek) + 1;
3317
+ }
3318
+
3319
+ // ../node_modules/date-fns/_lib/addLeadingZeros.js
3320
+ function addLeadingZeros(number4, targetLength) {
3321
+ const sign2 = number4 < 0 ? "-" : "";
3322
+ const output = Math.abs(number4).toString().padStart(targetLength, "0");
3323
+ return sign2 + output;
3324
+ }
3325
+
3326
+ // ../node_modules/date-fns/_lib/format/lightFormatters.js
3327
+ var lightFormatters = {
3328
+ // Year
3329
+ y(date2, token) {
3330
+ const signedYear = date2.getFullYear();
3331
+ const year = signedYear > 0 ? signedYear : 1 - signedYear;
3332
+ return addLeadingZeros(token === "yy" ? year % 100 : year, token.length);
3333
+ },
3334
+ // Month
3335
+ M(date2, token) {
3336
+ const month = date2.getMonth();
3337
+ return token === "M" ? String(month + 1) : addLeadingZeros(month + 1, 2);
3338
+ },
3339
+ // Day of the month
3340
+ d(date2, token) {
3341
+ return addLeadingZeros(date2.getDate(), token.length);
3342
+ },
3343
+ // AM or PM
3344
+ a(date2, token) {
3345
+ const dayPeriodEnumValue = date2.getHours() / 12 >= 1 ? "pm" : "am";
3346
+ switch (token) {
3347
+ case "a":
3348
+ case "aa":
3349
+ return dayPeriodEnumValue.toUpperCase();
3350
+ case "aaa":
3351
+ return dayPeriodEnumValue;
3352
+ case "aaaaa":
3353
+ return dayPeriodEnumValue[0];
3354
+ case "aaaa":
3355
+ default:
3356
+ return dayPeriodEnumValue === "am" ? "a.m." : "p.m.";
3357
+ }
3358
+ },
3359
+ // Hour [1-12]
3360
+ h(date2, token) {
3361
+ return addLeadingZeros(date2.getHours() % 12 || 12, token.length);
3362
+ },
3363
+ // Hour [0-23]
3364
+ H(date2, token) {
3365
+ return addLeadingZeros(date2.getHours(), token.length);
3366
+ },
3367
+ // Minute
3368
+ m(date2, token) {
3369
+ return addLeadingZeros(date2.getMinutes(), token.length);
3370
+ },
3371
+ // Second
3372
+ s(date2, token) {
3373
+ return addLeadingZeros(date2.getSeconds(), token.length);
3374
+ },
3375
+ // Fraction of second
3376
+ S(date2, token) {
3377
+ const numberOfDigits = token.length;
3378
+ const milliseconds2 = date2.getMilliseconds();
3379
+ const fractionalSeconds = Math.trunc(
3380
+ milliseconds2 * Math.pow(10, numberOfDigits - 3)
3381
+ );
3382
+ return addLeadingZeros(fractionalSeconds, token.length);
3383
+ }
3384
+ };
3385
+
3386
+ // ../node_modules/date-fns/_lib/format/formatters.js
3387
+ var dayPeriodEnum = {
3388
+ midnight: "midnight",
3389
+ noon: "noon",
3390
+ morning: "morning",
3391
+ afternoon: "afternoon",
3392
+ evening: "evening",
3393
+ night: "night"
3394
+ };
3395
+ var formatters = {
3396
+ // Era
3397
+ G: function(date2, token, localize2) {
3398
+ const era = date2.getFullYear() > 0 ? 1 : 0;
3399
+ switch (token) {
3400
+ // AD, BC
3401
+ case "G":
3402
+ case "GG":
3403
+ case "GGG":
3404
+ return localize2.era(era, { width: "abbreviated" });
3405
+ // A, B
3406
+ case "GGGGG":
3407
+ return localize2.era(era, { width: "narrow" });
3408
+ // Anno Domini, Before Christ
3409
+ case "GGGG":
3410
+ default:
3411
+ return localize2.era(era, { width: "wide" });
3412
+ }
3413
+ },
3414
+ // Year
3415
+ y: function(date2, token, localize2) {
3416
+ if (token === "yo") {
3417
+ const signedYear = date2.getFullYear();
3418
+ const year = signedYear > 0 ? signedYear : 1 - signedYear;
3419
+ return localize2.ordinalNumber(year, { unit: "year" });
3420
+ }
3421
+ return lightFormatters.y(date2, token);
3422
+ },
3423
+ // Local week-numbering year
3424
+ Y: function(date2, token, localize2, options) {
3425
+ const signedWeekYear = getWeekYear(date2, options);
3426
+ const weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;
3427
+ if (token === "YY") {
3428
+ const twoDigitYear = weekYear % 100;
3429
+ return addLeadingZeros(twoDigitYear, 2);
3430
+ }
3431
+ if (token === "Yo") {
3432
+ return localize2.ordinalNumber(weekYear, { unit: "year" });
3433
+ }
3434
+ return addLeadingZeros(weekYear, token.length);
3435
+ },
3436
+ // ISO week-numbering year
3437
+ R: function(date2, token) {
3438
+ const isoWeekYear = getISOWeekYear(date2);
3439
+ return addLeadingZeros(isoWeekYear, token.length);
3440
+ },
3441
+ // Extended year. This is a single number designating the year of this calendar system.
3442
+ // The main difference between `y` and `u` localizers are B.C. years:
3443
+ // | Year | `y` | `u` |
3444
+ // |------|-----|-----|
3445
+ // | AC 1 | 1 | 1 |
3446
+ // | BC 1 | 1 | 0 |
3447
+ // | BC 2 | 2 | -1 |
3448
+ // Also `yy` always returns the last two digits of a year,
3449
+ // while `uu` pads single digit years to 2 characters and returns other years unchanged.
3450
+ u: function(date2, token) {
3451
+ const year = date2.getFullYear();
3452
+ return addLeadingZeros(year, token.length);
3453
+ },
3454
+ // Quarter
3455
+ Q: function(date2, token, localize2) {
3456
+ const quarter = Math.ceil((date2.getMonth() + 1) / 3);
3457
+ switch (token) {
3458
+ // 1, 2, 3, 4
3459
+ case "Q":
3460
+ return String(quarter);
3461
+ // 01, 02, 03, 04
3462
+ case "QQ":
3463
+ return addLeadingZeros(quarter, 2);
3464
+ // 1st, 2nd, 3rd, 4th
3465
+ case "Qo":
3466
+ return localize2.ordinalNumber(quarter, { unit: "quarter" });
3467
+ // Q1, Q2, Q3, Q4
3468
+ case "QQQ":
3469
+ return localize2.quarter(quarter, {
3470
+ width: "abbreviated",
3471
+ context: "formatting"
3472
+ });
3473
+ // 1, 2, 3, 4 (narrow quarter; could be not numerical)
3474
+ case "QQQQQ":
3475
+ return localize2.quarter(quarter, {
3476
+ width: "narrow",
3477
+ context: "formatting"
3478
+ });
3479
+ // 1st quarter, 2nd quarter, ...
3480
+ case "QQQQ":
3481
+ default:
3482
+ return localize2.quarter(quarter, {
3483
+ width: "wide",
3484
+ context: "formatting"
3485
+ });
3486
+ }
3487
+ },
3488
+ // Stand-alone quarter
3489
+ q: function(date2, token, localize2) {
3490
+ const quarter = Math.ceil((date2.getMonth() + 1) / 3);
3491
+ switch (token) {
3492
+ // 1, 2, 3, 4
3493
+ case "q":
3494
+ return String(quarter);
3495
+ // 01, 02, 03, 04
3496
+ case "qq":
3497
+ return addLeadingZeros(quarter, 2);
3498
+ // 1st, 2nd, 3rd, 4th
3499
+ case "qo":
3500
+ return localize2.ordinalNumber(quarter, { unit: "quarter" });
3501
+ // Q1, Q2, Q3, Q4
3502
+ case "qqq":
3503
+ return localize2.quarter(quarter, {
3504
+ width: "abbreviated",
3505
+ context: "standalone"
3506
+ });
3507
+ // 1, 2, 3, 4 (narrow quarter; could be not numerical)
3508
+ case "qqqqq":
3509
+ return localize2.quarter(quarter, {
3510
+ width: "narrow",
3511
+ context: "standalone"
3512
+ });
3513
+ // 1st quarter, 2nd quarter, ...
3514
+ case "qqqq":
3515
+ default:
3516
+ return localize2.quarter(quarter, {
3517
+ width: "wide",
3518
+ context: "standalone"
3519
+ });
3520
+ }
3521
+ },
3522
+ // Month
3523
+ M: function(date2, token, localize2) {
3524
+ const month = date2.getMonth();
3525
+ switch (token) {
3526
+ case "M":
3527
+ case "MM":
3528
+ return lightFormatters.M(date2, token);
3529
+ // 1st, 2nd, ..., 12th
3530
+ case "Mo":
3531
+ return localize2.ordinalNumber(month + 1, { unit: "month" });
3532
+ // Jan, Feb, ..., Dec
3533
+ case "MMM":
3534
+ return localize2.month(month, {
3535
+ width: "abbreviated",
3536
+ context: "formatting"
3537
+ });
3538
+ // J, F, ..., D
3539
+ case "MMMMM":
3540
+ return localize2.month(month, {
3541
+ width: "narrow",
3542
+ context: "formatting"
3543
+ });
3544
+ // January, February, ..., December
3545
+ case "MMMM":
3546
+ default:
3547
+ return localize2.month(month, { width: "wide", context: "formatting" });
3548
+ }
3549
+ },
3550
+ // Stand-alone month
3551
+ L: function(date2, token, localize2) {
3552
+ const month = date2.getMonth();
3553
+ switch (token) {
3554
+ // 1, 2, ..., 12
3555
+ case "L":
3556
+ return String(month + 1);
3557
+ // 01, 02, ..., 12
3558
+ case "LL":
3559
+ return addLeadingZeros(month + 1, 2);
3560
+ // 1st, 2nd, ..., 12th
3561
+ case "Lo":
3562
+ return localize2.ordinalNumber(month + 1, { unit: "month" });
3563
+ // Jan, Feb, ..., Dec
3564
+ case "LLL":
3565
+ return localize2.month(month, {
3566
+ width: "abbreviated",
3567
+ context: "standalone"
3568
+ });
3569
+ // J, F, ..., D
3570
+ case "LLLLL":
3571
+ return localize2.month(month, {
3572
+ width: "narrow",
3573
+ context: "standalone"
3574
+ });
3575
+ // January, February, ..., December
3576
+ case "LLLL":
3577
+ default:
3578
+ return localize2.month(month, { width: "wide", context: "standalone" });
3579
+ }
3580
+ },
3581
+ // Local week of year
3582
+ w: function(date2, token, localize2, options) {
3583
+ const week = getWeek(date2, options);
3584
+ if (token === "wo") {
3585
+ return localize2.ordinalNumber(week, { unit: "week" });
3586
+ }
3587
+ return addLeadingZeros(week, token.length);
3588
+ },
3589
+ // ISO week of year
3590
+ I: function(date2, token, localize2) {
3591
+ const isoWeek = getISOWeek(date2);
3592
+ if (token === "Io") {
3593
+ return localize2.ordinalNumber(isoWeek, { unit: "week" });
3594
+ }
3595
+ return addLeadingZeros(isoWeek, token.length);
3596
+ },
3597
+ // Day of the month
3598
+ d: function(date2, token, localize2) {
3599
+ if (token === "do") {
3600
+ return localize2.ordinalNumber(date2.getDate(), { unit: "date" });
3601
+ }
3602
+ return lightFormatters.d(date2, token);
3603
+ },
3604
+ // Day of year
3605
+ D: function(date2, token, localize2) {
3606
+ const dayOfYear = getDayOfYear(date2);
3607
+ if (token === "Do") {
3608
+ return localize2.ordinalNumber(dayOfYear, { unit: "dayOfYear" });
3609
+ }
3610
+ return addLeadingZeros(dayOfYear, token.length);
3611
+ },
3612
+ // Day of week
3613
+ E: function(date2, token, localize2) {
3614
+ const dayOfWeek = date2.getDay();
3615
+ switch (token) {
3616
+ // Tue
3617
+ case "E":
3618
+ case "EE":
3619
+ case "EEE":
3620
+ return localize2.day(dayOfWeek, {
3621
+ width: "abbreviated",
3622
+ context: "formatting"
3623
+ });
3624
+ // T
3625
+ case "EEEEE":
3626
+ return localize2.day(dayOfWeek, {
3627
+ width: "narrow",
3628
+ context: "formatting"
3629
+ });
3630
+ // Tu
3631
+ case "EEEEEE":
3632
+ return localize2.day(dayOfWeek, {
3633
+ width: "short",
3634
+ context: "formatting"
3635
+ });
3636
+ // Tuesday
3637
+ case "EEEE":
3638
+ default:
3639
+ return localize2.day(dayOfWeek, {
3640
+ width: "wide",
3641
+ context: "formatting"
3642
+ });
3643
+ }
3644
+ },
3645
+ // Local day of week
3646
+ e: function(date2, token, localize2, options) {
3647
+ const dayOfWeek = date2.getDay();
3648
+ const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
3649
+ switch (token) {
3650
+ // Numerical value (Nth day of week with current locale or weekStartsOn)
3651
+ case "e":
3652
+ return String(localDayOfWeek);
3653
+ // Padded numerical value
3654
+ case "ee":
3655
+ return addLeadingZeros(localDayOfWeek, 2);
3656
+ // 1st, 2nd, ..., 7th
3657
+ case "eo":
3658
+ return localize2.ordinalNumber(localDayOfWeek, { unit: "day" });
3659
+ case "eee":
3660
+ return localize2.day(dayOfWeek, {
3661
+ width: "abbreviated",
3662
+ context: "formatting"
3663
+ });
3664
+ // T
3665
+ case "eeeee":
3666
+ return localize2.day(dayOfWeek, {
3667
+ width: "narrow",
3668
+ context: "formatting"
3669
+ });
3670
+ // Tu
3671
+ case "eeeeee":
3672
+ return localize2.day(dayOfWeek, {
3673
+ width: "short",
3674
+ context: "formatting"
3675
+ });
3676
+ // Tuesday
3677
+ case "eeee":
3678
+ default:
3679
+ return localize2.day(dayOfWeek, {
3680
+ width: "wide",
3681
+ context: "formatting"
3682
+ });
3683
+ }
3684
+ },
3685
+ // Stand-alone local day of week
3686
+ c: function(date2, token, localize2, options) {
3687
+ const dayOfWeek = date2.getDay();
3688
+ const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
3689
+ switch (token) {
3690
+ // Numerical value (same as in `e`)
3691
+ case "c":
3692
+ return String(localDayOfWeek);
3693
+ // Padded numerical value
3694
+ case "cc":
3695
+ return addLeadingZeros(localDayOfWeek, token.length);
3696
+ // 1st, 2nd, ..., 7th
3697
+ case "co":
3698
+ return localize2.ordinalNumber(localDayOfWeek, { unit: "day" });
3699
+ case "ccc":
3700
+ return localize2.day(dayOfWeek, {
3701
+ width: "abbreviated",
3702
+ context: "standalone"
3703
+ });
3704
+ // T
3705
+ case "ccccc":
3706
+ return localize2.day(dayOfWeek, {
3707
+ width: "narrow",
3708
+ context: "standalone"
3709
+ });
3710
+ // Tu
3711
+ case "cccccc":
3712
+ return localize2.day(dayOfWeek, {
3713
+ width: "short",
3714
+ context: "standalone"
3715
+ });
3716
+ // Tuesday
3717
+ case "cccc":
3718
+ default:
3719
+ return localize2.day(dayOfWeek, {
3720
+ width: "wide",
3721
+ context: "standalone"
3722
+ });
3723
+ }
3724
+ },
3725
+ // ISO day of week
3726
+ i: function(date2, token, localize2) {
3727
+ const dayOfWeek = date2.getDay();
3728
+ const isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;
3729
+ switch (token) {
3730
+ // 2
3731
+ case "i":
3732
+ return String(isoDayOfWeek);
3733
+ // 02
3734
+ case "ii":
3735
+ return addLeadingZeros(isoDayOfWeek, token.length);
3736
+ // 2nd
3737
+ case "io":
3738
+ return localize2.ordinalNumber(isoDayOfWeek, { unit: "day" });
3739
+ // Tue
3740
+ case "iii":
3741
+ return localize2.day(dayOfWeek, {
3742
+ width: "abbreviated",
3743
+ context: "formatting"
3744
+ });
3745
+ // T
3746
+ case "iiiii":
3747
+ return localize2.day(dayOfWeek, {
3748
+ width: "narrow",
3749
+ context: "formatting"
3750
+ });
3751
+ // Tu
3752
+ case "iiiiii":
3753
+ return localize2.day(dayOfWeek, {
3754
+ width: "short",
3755
+ context: "formatting"
3756
+ });
3757
+ // Tuesday
3758
+ case "iiii":
3759
+ default:
3760
+ return localize2.day(dayOfWeek, {
3761
+ width: "wide",
3762
+ context: "formatting"
3763
+ });
3764
+ }
3765
+ },
3766
+ // AM or PM
3767
+ a: function(date2, token, localize2) {
3768
+ const hours = date2.getHours();
3769
+ const dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am";
3770
+ switch (token) {
3771
+ case "a":
3772
+ case "aa":
3773
+ return localize2.dayPeriod(dayPeriodEnumValue, {
3774
+ width: "abbreviated",
3775
+ context: "formatting"
3776
+ });
3777
+ case "aaa":
3778
+ return localize2.dayPeriod(dayPeriodEnumValue, {
3779
+ width: "abbreviated",
3780
+ context: "formatting"
3781
+ }).toLowerCase();
3782
+ case "aaaaa":
3783
+ return localize2.dayPeriod(dayPeriodEnumValue, {
3784
+ width: "narrow",
3785
+ context: "formatting"
3786
+ });
3787
+ case "aaaa":
3788
+ default:
3789
+ return localize2.dayPeriod(dayPeriodEnumValue, {
3790
+ width: "wide",
3791
+ context: "formatting"
3792
+ });
3793
+ }
3794
+ },
3795
+ // AM, PM, midnight, noon
3796
+ b: function(date2, token, localize2) {
3797
+ const hours = date2.getHours();
3798
+ let dayPeriodEnumValue;
3799
+ if (hours === 12) {
3800
+ dayPeriodEnumValue = dayPeriodEnum.noon;
3801
+ } else if (hours === 0) {
3802
+ dayPeriodEnumValue = dayPeriodEnum.midnight;
3803
+ } else {
3804
+ dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am";
3805
+ }
3806
+ switch (token) {
3807
+ case "b":
3808
+ case "bb":
3809
+ return localize2.dayPeriod(dayPeriodEnumValue, {
3810
+ width: "abbreviated",
3811
+ context: "formatting"
3812
+ });
3813
+ case "bbb":
3814
+ return localize2.dayPeriod(dayPeriodEnumValue, {
3815
+ width: "abbreviated",
3816
+ context: "formatting"
3817
+ }).toLowerCase();
3818
+ case "bbbbb":
3819
+ return localize2.dayPeriod(dayPeriodEnumValue, {
3820
+ width: "narrow",
3821
+ context: "formatting"
3822
+ });
3823
+ case "bbbb":
3824
+ default:
3825
+ return localize2.dayPeriod(dayPeriodEnumValue, {
3826
+ width: "wide",
3827
+ context: "formatting"
3828
+ });
3829
+ }
3830
+ },
3831
+ // in the morning, in the afternoon, in the evening, at night
3832
+ B: function(date2, token, localize2) {
3833
+ const hours = date2.getHours();
3834
+ let dayPeriodEnumValue;
3835
+ if (hours >= 17) {
3836
+ dayPeriodEnumValue = dayPeriodEnum.evening;
3837
+ } else if (hours >= 12) {
3838
+ dayPeriodEnumValue = dayPeriodEnum.afternoon;
3839
+ } else if (hours >= 4) {
3840
+ dayPeriodEnumValue = dayPeriodEnum.morning;
3841
+ } else {
3842
+ dayPeriodEnumValue = dayPeriodEnum.night;
3843
+ }
3844
+ switch (token) {
3845
+ case "B":
3846
+ case "BB":
3847
+ case "BBB":
3848
+ return localize2.dayPeriod(dayPeriodEnumValue, {
3849
+ width: "abbreviated",
3850
+ context: "formatting"
3851
+ });
3852
+ case "BBBBB":
3853
+ return localize2.dayPeriod(dayPeriodEnumValue, {
3854
+ width: "narrow",
3855
+ context: "formatting"
3856
+ });
3857
+ case "BBBB":
3858
+ default:
3859
+ return localize2.dayPeriod(dayPeriodEnumValue, {
3860
+ width: "wide",
3861
+ context: "formatting"
3862
+ });
3863
+ }
3864
+ },
3865
+ // Hour [1-12]
3866
+ h: function(date2, token, localize2) {
3867
+ if (token === "ho") {
3868
+ let hours = date2.getHours() % 12;
3869
+ if (hours === 0) hours = 12;
3870
+ return localize2.ordinalNumber(hours, { unit: "hour" });
3871
+ }
3872
+ return lightFormatters.h(date2, token);
3873
+ },
3874
+ // Hour [0-23]
3875
+ H: function(date2, token, localize2) {
3876
+ if (token === "Ho") {
3877
+ return localize2.ordinalNumber(date2.getHours(), { unit: "hour" });
3878
+ }
3879
+ return lightFormatters.H(date2, token);
3880
+ },
3881
+ // Hour [0-11]
3882
+ K: function(date2, token, localize2) {
3883
+ const hours = date2.getHours() % 12;
3884
+ if (token === "Ko") {
3885
+ return localize2.ordinalNumber(hours, { unit: "hour" });
3886
+ }
3887
+ return addLeadingZeros(hours, token.length);
3888
+ },
3889
+ // Hour [1-24]
3890
+ k: function(date2, token, localize2) {
3891
+ let hours = date2.getHours();
3892
+ if (hours === 0) hours = 24;
3893
+ if (token === "ko") {
3894
+ return localize2.ordinalNumber(hours, { unit: "hour" });
3895
+ }
3896
+ return addLeadingZeros(hours, token.length);
3897
+ },
3898
+ // Minute
3899
+ m: function(date2, token, localize2) {
3900
+ if (token === "mo") {
3901
+ return localize2.ordinalNumber(date2.getMinutes(), { unit: "minute" });
3902
+ }
3903
+ return lightFormatters.m(date2, token);
3904
+ },
3905
+ // Second
3906
+ s: function(date2, token, localize2) {
3907
+ if (token === "so") {
3908
+ return localize2.ordinalNumber(date2.getSeconds(), { unit: "second" });
3909
+ }
3910
+ return lightFormatters.s(date2, token);
3911
+ },
3912
+ // Fraction of second
3913
+ S: function(date2, token) {
3914
+ return lightFormatters.S(date2, token);
3915
+ },
3916
+ // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
3917
+ X: function(date2, token, _localize) {
3918
+ const timezoneOffset = date2.getTimezoneOffset();
3919
+ if (timezoneOffset === 0) {
3920
+ return "Z";
3921
+ }
3922
+ switch (token) {
3923
+ // Hours and optional minutes
3924
+ case "X":
3925
+ return formatTimezoneWithOptionalMinutes(timezoneOffset);
3926
+ // Hours, minutes and optional seconds without `:` delimiter
3927
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
3928
+ // so this token always has the same output as `XX`
3929
+ case "XXXX":
3930
+ case "XX":
3931
+ return formatTimezone(timezoneOffset);
3932
+ // Hours, minutes and optional seconds with `:` delimiter
3933
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
3934
+ // so this token always has the same output as `XXX`
3935
+ case "XXXXX":
3936
+ case "XXX":
3937
+ // Hours and minutes with `:` delimiter
3938
+ default:
3939
+ return formatTimezone(timezoneOffset, ":");
3940
+ }
3941
+ },
3942
+ // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
3943
+ x: function(date2, token, _localize) {
3944
+ const timezoneOffset = date2.getTimezoneOffset();
3945
+ switch (token) {
3946
+ // Hours and optional minutes
3947
+ case "x":
3948
+ return formatTimezoneWithOptionalMinutes(timezoneOffset);
3949
+ // Hours, minutes and optional seconds without `:` delimiter
3950
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
3951
+ // so this token always has the same output as `xx`
3952
+ case "xxxx":
3953
+ case "xx":
3954
+ return formatTimezone(timezoneOffset);
3955
+ // Hours, minutes and optional seconds with `:` delimiter
3956
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
3957
+ // so this token always has the same output as `xxx`
3958
+ case "xxxxx":
3959
+ case "xxx":
3960
+ // Hours and minutes with `:` delimiter
3961
+ default:
3962
+ return formatTimezone(timezoneOffset, ":");
3963
+ }
3964
+ },
3965
+ // Timezone (GMT)
3966
+ O: function(date2, token, _localize) {
3967
+ const timezoneOffset = date2.getTimezoneOffset();
3968
+ switch (token) {
3969
+ // Short
3970
+ case "O":
3971
+ case "OO":
3972
+ case "OOO":
3973
+ return "GMT" + formatTimezoneShort(timezoneOffset, ":");
3974
+ // Long
3975
+ case "OOOO":
3976
+ default:
3977
+ return "GMT" + formatTimezone(timezoneOffset, ":");
3978
+ }
3979
+ },
3980
+ // Timezone (specific non-location)
3981
+ z: function(date2, token, _localize) {
3982
+ const timezoneOffset = date2.getTimezoneOffset();
3983
+ switch (token) {
3984
+ // Short
3985
+ case "z":
3986
+ case "zz":
3987
+ case "zzz":
3988
+ return "GMT" + formatTimezoneShort(timezoneOffset, ":");
3989
+ // Long
3990
+ case "zzzz":
3991
+ default:
3992
+ return "GMT" + formatTimezone(timezoneOffset, ":");
3993
+ }
3994
+ },
3995
+ // Seconds timestamp
3996
+ t: function(date2, token, _localize) {
3997
+ const timestamp = Math.trunc(+date2 / 1e3);
3998
+ return addLeadingZeros(timestamp, token.length);
3999
+ },
4000
+ // Milliseconds timestamp
4001
+ T: function(date2, token, _localize) {
4002
+ return addLeadingZeros(+date2, token.length);
4003
+ }
4004
+ };
4005
+ function formatTimezoneShort(offset, delimiter = "") {
4006
+ const sign2 = offset > 0 ? "-" : "+";
4007
+ const absOffset = Math.abs(offset);
4008
+ const hours = Math.trunc(absOffset / 60);
4009
+ const minutes = absOffset % 60;
4010
+ if (minutes === 0) {
4011
+ return sign2 + String(hours);
4012
+ }
4013
+ return sign2 + String(hours) + delimiter + addLeadingZeros(minutes, 2);
4014
+ }
4015
+ function formatTimezoneWithOptionalMinutes(offset, delimiter) {
4016
+ if (offset % 60 === 0) {
4017
+ const sign2 = offset > 0 ? "-" : "+";
4018
+ return sign2 + addLeadingZeros(Math.abs(offset) / 60, 2);
4019
+ }
4020
+ return formatTimezone(offset, delimiter);
4021
+ }
4022
+ function formatTimezone(offset, delimiter = "") {
4023
+ const sign2 = offset > 0 ? "-" : "+";
4024
+ const absOffset = Math.abs(offset);
4025
+ const hours = addLeadingZeros(Math.trunc(absOffset / 60), 2);
4026
+ const minutes = addLeadingZeros(absOffset % 60, 2);
4027
+ return sign2 + hours + delimiter + minutes;
4028
+ }
4029
+
4030
+ // ../node_modules/date-fns/_lib/format/longFormatters.js
4031
+ var dateLongFormatter = (pattern, formatLong2) => {
4032
+ switch (pattern) {
4033
+ case "P":
4034
+ return formatLong2.date({ width: "short" });
4035
+ case "PP":
4036
+ return formatLong2.date({ width: "medium" });
4037
+ case "PPP":
4038
+ return formatLong2.date({ width: "long" });
4039
+ case "PPPP":
4040
+ default:
4041
+ return formatLong2.date({ width: "full" });
4042
+ }
4043
+ };
4044
+ var timeLongFormatter = (pattern, formatLong2) => {
4045
+ switch (pattern) {
4046
+ case "p":
4047
+ return formatLong2.time({ width: "short" });
4048
+ case "pp":
4049
+ return formatLong2.time({ width: "medium" });
4050
+ case "ppp":
4051
+ return formatLong2.time({ width: "long" });
4052
+ case "pppp":
4053
+ default:
4054
+ return formatLong2.time({ width: "full" });
4055
+ }
4056
+ };
4057
+ var dateTimeLongFormatter = (pattern, formatLong2) => {
4058
+ const matchResult = pattern.match(/(P+)(p+)?/) || [];
4059
+ const datePattern = matchResult[1];
4060
+ const timePattern = matchResult[2];
4061
+ if (!timePattern) {
4062
+ return dateLongFormatter(pattern, formatLong2);
4063
+ }
4064
+ let dateTimeFormat;
4065
+ switch (datePattern) {
4066
+ case "P":
4067
+ dateTimeFormat = formatLong2.dateTime({ width: "short" });
4068
+ break;
4069
+ case "PP":
4070
+ dateTimeFormat = formatLong2.dateTime({ width: "medium" });
4071
+ break;
4072
+ case "PPP":
4073
+ dateTimeFormat = formatLong2.dateTime({ width: "long" });
4074
+ break;
4075
+ case "PPPP":
4076
+ default:
4077
+ dateTimeFormat = formatLong2.dateTime({ width: "full" });
4078
+ break;
4079
+ }
4080
+ return dateTimeFormat.replace("{{date}}", dateLongFormatter(datePattern, formatLong2)).replace("{{time}}", timeLongFormatter(timePattern, formatLong2));
4081
+ };
4082
+ var longFormatters = {
4083
+ p: timeLongFormatter,
4084
+ P: dateTimeLongFormatter
4085
+ };
4086
+
4087
+ // ../node_modules/date-fns/_lib/protectedTokens.js
4088
+ var dayOfYearTokenRE = /^D+$/;
4089
+ var weekYearTokenRE = /^Y+$/;
4090
+ var throwTokens = ["D", "DD", "YY", "YYYY"];
4091
+ function isProtectedDayOfYearToken(token) {
4092
+ return dayOfYearTokenRE.test(token);
4093
+ }
4094
+ function isProtectedWeekYearToken(token) {
4095
+ return weekYearTokenRE.test(token);
4096
+ }
4097
+ function warnOrThrowProtectedError(token, format4, input) {
4098
+ const _message = message(token, format4, input);
4099
+ console.warn(_message);
4100
+ if (throwTokens.includes(token)) throw new RangeError(_message);
4101
+ }
4102
+ function message(token, format4, input) {
4103
+ const subject = token[0] === "Y" ? "years" : "days of the month";
4104
+ return `Use \`${token.toLowerCase()}\` instead of \`${token}\` (in \`${format4}\`) for formatting ${subject} to the input \`${input}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
4105
+ }
4106
+
4107
+ // ../node_modules/date-fns/format.js
4108
+ var formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g;
4109
+ var longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;
4110
+ var escapedStringRegExp = /^'([^]*?)'?$/;
4111
+ var doubleQuoteRegExp = /''/g;
4112
+ var unescapedLatinCharacterRegExp = /[a-zA-Z]/;
4113
+ function format(date2, formatStr, options) {
4114
+ const defaultOptions2 = getDefaultOptions();
4115
+ const locale3 = defaultOptions2.locale ?? enUS;
4116
+ const firstWeekContainsDate = defaultOptions2.firstWeekContainsDate ?? defaultOptions2.locale?.options?.firstWeekContainsDate ?? 1;
4117
+ const weekStartsOn = defaultOptions2.weekStartsOn ?? defaultOptions2.locale?.options?.weekStartsOn ?? 0;
4118
+ const originalDate = toDate(date2, options?.in);
4119
+ if (!isValid(originalDate)) {
4120
+ throw new RangeError("Invalid time value");
4121
+ }
4122
+ let parts = formatStr.match(longFormattingTokensRegExp).map((substring) => {
4123
+ const firstCharacter = substring[0];
4124
+ if (firstCharacter === "p" || firstCharacter === "P") {
4125
+ const longFormatter = longFormatters[firstCharacter];
4126
+ return longFormatter(substring, locale3.formatLong);
4127
+ }
4128
+ return substring;
4129
+ }).join("").match(formattingTokensRegExp).map((substring) => {
4130
+ if (substring === "''") {
4131
+ return { isToken: false, value: "'" };
4132
+ }
4133
+ const firstCharacter = substring[0];
4134
+ if (firstCharacter === "'") {
4135
+ return { isToken: false, value: cleanEscapedString(substring) };
4136
+ }
4137
+ if (formatters[firstCharacter]) {
4138
+ return { isToken: true, value: substring };
4139
+ }
4140
+ if (firstCharacter.match(unescapedLatinCharacterRegExp)) {
4141
+ throw new RangeError(
4142
+ "Format string contains an unescaped latin alphabet character `" + firstCharacter + "`"
4143
+ );
4144
+ }
4145
+ return { isToken: false, value: substring };
4146
+ });
4147
+ if (locale3.localize.preprocessor) {
4148
+ parts = locale3.localize.preprocessor(originalDate, parts);
4149
+ }
4150
+ const formatterOptions = {
4151
+ firstWeekContainsDate,
4152
+ weekStartsOn,
4153
+ locale: locale3
4154
+ };
4155
+ return parts.map((part) => {
4156
+ if (!part.isToken) return part.value;
4157
+ const token = part.value;
4158
+ if (isProtectedWeekYearToken(token) || isProtectedDayOfYearToken(token)) {
4159
+ warnOrThrowProtectedError(token, formatStr, String(date2));
4160
+ }
4161
+ const formatter = formatters[token[0]];
4162
+ return formatter(originalDate, token, locale3.localize, formatterOptions);
4163
+ }).join("");
4164
+ }
4165
+ function cleanEscapedString(input) {
4166
+ const matched = input.match(escapedStringRegExp);
4167
+ if (!matched) {
4168
+ return input;
4169
+ }
4170
+ return matched[1].replace(doubleQuoteRegExp, "'");
4171
+ }
4172
+
4173
+ // ../node_modules/date-fns-tz/dist/esm/_lib/tzTokenizeDate/index.js
4174
+ function tzTokenizeDate(date2, timeZone) {
4175
+ const dtf = getDateTimeFormat(timeZone);
4176
+ return "formatToParts" in dtf ? partsOffset(dtf, date2) : hackyOffset(dtf, date2);
4177
+ }
4178
+ var typeToPos = {
4179
+ year: 0,
4180
+ month: 1,
4181
+ day: 2,
4182
+ hour: 3,
4183
+ minute: 4,
4184
+ second: 5
4185
+ };
4186
+ function partsOffset(dtf, date2) {
4187
+ try {
4188
+ const formatted = dtf.formatToParts(date2);
4189
+ const filled = [];
4190
+ for (let i = 0; i < formatted.length; i++) {
4191
+ const pos = typeToPos[formatted[i].type];
4192
+ if (pos !== void 0) {
4193
+ filled[pos] = parseInt(formatted[i].value, 10);
4194
+ }
4195
+ }
4196
+ return filled;
4197
+ } catch (error) {
4198
+ if (error instanceof RangeError) {
4199
+ return [NaN];
4200
+ }
4201
+ throw error;
4202
+ }
4203
+ }
4204
+ function hackyOffset(dtf, date2) {
4205
+ const formatted = dtf.format(date2);
4206
+ const parsed = /(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(formatted);
4207
+ return [
4208
+ parseInt(parsed[3], 10),
4209
+ parseInt(parsed[1], 10),
4210
+ parseInt(parsed[2], 10),
4211
+ parseInt(parsed[4], 10),
4212
+ parseInt(parsed[5], 10),
4213
+ parseInt(parsed[6], 10)
4214
+ ];
4215
+ }
4216
+ var dtfCache = {};
4217
+ var testDateFormatted = new Intl.DateTimeFormat("en-US", {
4218
+ hourCycle: "h23",
4219
+ timeZone: "America/New_York",
4220
+ year: "numeric",
4221
+ month: "2-digit",
4222
+ day: "2-digit",
4223
+ hour: "2-digit",
4224
+ minute: "2-digit",
4225
+ second: "2-digit"
4226
+ }).format(/* @__PURE__ */ new Date("2014-06-25T04:00:00.123Z"));
4227
+ var hourCycleSupported = testDateFormatted === "06/25/2014, 00:00:00" || testDateFormatted === "\u200E06\u200E/\u200E25\u200E/\u200E2014\u200E \u200E00\u200E:\u200E00\u200E:\u200E00";
4228
+ function getDateTimeFormat(timeZone) {
4229
+ if (!dtfCache[timeZone]) {
4230
+ dtfCache[timeZone] = hourCycleSupported ? new Intl.DateTimeFormat("en-US", {
4231
+ hourCycle: "h23",
4232
+ timeZone,
4233
+ year: "numeric",
4234
+ month: "numeric",
4235
+ day: "2-digit",
4236
+ hour: "2-digit",
4237
+ minute: "2-digit",
4238
+ second: "2-digit"
4239
+ }) : new Intl.DateTimeFormat("en-US", {
4240
+ hour12: false,
4241
+ timeZone,
4242
+ year: "numeric",
4243
+ month: "numeric",
4244
+ day: "2-digit",
4245
+ hour: "2-digit",
4246
+ minute: "2-digit",
4247
+ second: "2-digit"
4248
+ });
4249
+ }
4250
+ return dtfCache[timeZone];
4251
+ }
4252
+
4253
+ // ../node_modules/date-fns-tz/dist/esm/_lib/newDateUTC/index.js
4254
+ function newDateUTC(fullYear, month, day, hour, minute, second2, millisecond2) {
4255
+ const utcDate2 = /* @__PURE__ */ new Date(0);
4256
+ utcDate2.setUTCFullYear(fullYear, month, day);
4257
+ utcDate2.setUTCHours(hour, minute, second2, millisecond2);
4258
+ return utcDate2;
4259
+ }
4260
+
4261
+ // ../node_modules/date-fns-tz/dist/esm/_lib/tzParseTimezone/index.js
4262
+ var MILLISECONDS_IN_HOUR = 36e5;
4263
+ var MILLISECONDS_IN_MINUTE = 6e4;
4264
+ var patterns = {
4265
+ timezoneZ: /^(Z)$/,
4266
+ timezoneHH: /^([+-]\d{2})$/,
4267
+ timezoneHHMM: /^([+-])(\d{2}):?(\d{2})$/
4268
+ };
4269
+ function tzParseTimezone(timezoneString, date2, isUtcDate) {
4270
+ if (!timezoneString) {
4271
+ return 0;
4272
+ }
4273
+ let token = patterns.timezoneZ.exec(timezoneString);
4274
+ if (token) {
4275
+ return 0;
4276
+ }
4277
+ let hours;
4278
+ let absoluteOffset;
4279
+ token = patterns.timezoneHH.exec(timezoneString);
4280
+ if (token) {
4281
+ hours = parseInt(token[1], 10);
4282
+ if (!validateTimezone(hours)) {
4283
+ return NaN;
4284
+ }
4285
+ return -(hours * MILLISECONDS_IN_HOUR);
4286
+ }
4287
+ token = patterns.timezoneHHMM.exec(timezoneString);
4288
+ if (token) {
4289
+ hours = parseInt(token[2], 10);
4290
+ const minutes = parseInt(token[3], 10);
4291
+ if (!validateTimezone(hours, minutes)) {
4292
+ return NaN;
4293
+ }
4294
+ absoluteOffset = Math.abs(hours) * MILLISECONDS_IN_HOUR + minutes * MILLISECONDS_IN_MINUTE;
4295
+ return token[1] === "+" ? -absoluteOffset : absoluteOffset;
4296
+ }
4297
+ if (isValidTimezoneIANAString(timezoneString)) {
4298
+ date2 = new Date(date2 || Date.now());
4299
+ const utcDate2 = toUtcDate(date2);
4300
+ const offset = calcOffset(utcDate2, timezoneString);
4301
+ const fixedOffset = fixOffset(date2, offset, timezoneString);
4302
+ return -fixedOffset;
4303
+ }
4304
+ return NaN;
4305
+ }
4306
+ function toUtcDate(date2) {
4307
+ return newDateUTC(date2.getFullYear(), date2.getMonth(), date2.getDate(), date2.getHours(), date2.getMinutes(), date2.getSeconds(), date2.getMilliseconds());
4308
+ }
4309
+ function calcOffset(date2, timezoneString) {
4310
+ const tokens = tzTokenizeDate(date2, timezoneString);
4311
+ const asUTC = newDateUTC(tokens[0], tokens[1] - 1, tokens[2], tokens[3] % 24, tokens[4], tokens[5], 0).getTime();
4312
+ let asTS = date2.getTime();
4313
+ const over = asTS % 1e3;
4314
+ asTS -= over >= 0 ? over : 1e3 + over;
4315
+ return asUTC - asTS;
4316
+ }
4317
+ function fixOffset(date2, offset, timezoneString) {
4318
+ const localTS = date2.getTime();
4319
+ let utcGuess = localTS - offset;
4320
+ const o2 = calcOffset(new Date(utcGuess), timezoneString);
4321
+ if (offset === o2) {
4322
+ return offset;
4323
+ }
4324
+ utcGuess -= o2 - offset;
4325
+ const o3 = calcOffset(new Date(utcGuess), timezoneString);
4326
+ if (o2 === o3) {
4327
+ return o2;
4328
+ }
4329
+ return Math.max(o2, o3);
4330
+ }
4331
+ function validateTimezone(hours, minutes) {
4332
+ return -23 <= hours && hours <= 23 && (minutes == null || 0 <= minutes && minutes <= 59);
4333
+ }
4334
+ var validIANATimezoneCache = {};
4335
+ function isValidTimezoneIANAString(timeZoneString) {
4336
+ if (validIANATimezoneCache[timeZoneString])
4337
+ return true;
4338
+ try {
4339
+ new Intl.DateTimeFormat(void 0, { timeZone: timeZoneString });
4340
+ validIANATimezoneCache[timeZoneString] = true;
4341
+ return true;
4342
+ } catch (error) {
4343
+ return false;
4344
+ }
4345
+ }
4346
+
4347
+ // ../node_modules/date-fns-tz/dist/esm/_lib/getTimezoneOffsetInMilliseconds/index.js
4348
+ function getTimezoneOffsetInMilliseconds2(date2) {
4349
+ const utcDate2 = new Date(Date.UTC(date2.getFullYear(), date2.getMonth(), date2.getDate(), date2.getHours(), date2.getMinutes(), date2.getSeconds(), date2.getMilliseconds()));
4350
+ utcDate2.setUTCFullYear(date2.getFullYear());
4351
+ return +date2 - +utcDate2;
4352
+ }
4353
+
4354
+ // ../node_modules/date-fns-tz/dist/esm/_lib/tzPattern/index.js
4355
+ var tzPattern = /(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/;
4356
+
4357
+ // ../node_modules/date-fns-tz/dist/esm/toDate/index.js
4358
+ var MILLISECONDS_IN_HOUR2 = 36e5;
4359
+ var MILLISECONDS_IN_MINUTE3 = 6e4;
4360
+ var DEFAULT_ADDITIONAL_DIGITS = 2;
4361
+ var patterns2 = {
4362
+ dateTimePattern: /^([0-9W+-]+)(T| )(.*)/,
4363
+ datePattern: /^([0-9W+-]+)(.*)/,
4364
+ // year tokens
4365
+ YY: /^(\d{2})$/,
4366
+ YYY: [
4367
+ /^([+-]\d{2})$/,
4368
+ // 0 additional digits
4369
+ /^([+-]\d{3})$/,
4370
+ // 1 additional digit
4371
+ /^([+-]\d{4})$/
4372
+ // 2 additional digits
4373
+ ],
4374
+ YYYY: /^(\d{4})/,
4375
+ YYYYY: [
4376
+ /^([+-]\d{4})/,
4377
+ // 0 additional digits
4378
+ /^([+-]\d{5})/,
4379
+ // 1 additional digit
4380
+ /^([+-]\d{6})/
4381
+ // 2 additional digits
4382
+ ],
4383
+ // date tokens
4384
+ MM: /^-(\d{2})$/,
4385
+ DDD: /^-?(\d{3})$/,
4386
+ MMDD: /^-?(\d{2})-?(\d{2})$/,
4387
+ Www: /^-?W(\d{2})$/,
4388
+ WwwD: /^-?W(\d{2})-?(\d{1})$/,
4389
+ HH: /^(\d{2}([.,]\d*)?)$/,
4390
+ HHMM: /^(\d{2}):?(\d{2}([.,]\d*)?)$/,
4391
+ HHMMSS: /^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,
4392
+ // time zone tokens (to identify the presence of a tz)
4393
+ timeZone: tzPattern
4394
+ };
4395
+ function toDate2(argument, options = {}) {
4396
+ if (arguments.length < 1) {
4397
+ throw new TypeError("1 argument required, but only " + arguments.length + " present");
4398
+ }
4399
+ if (argument === null) {
4400
+ return /* @__PURE__ */ new Date(NaN);
4401
+ }
4402
+ const additionalDigits = options.additionalDigits == null ? DEFAULT_ADDITIONAL_DIGITS : Number(options.additionalDigits);
4403
+ if (additionalDigits !== 2 && additionalDigits !== 1 && additionalDigits !== 0) {
4404
+ throw new RangeError("additionalDigits must be 0, 1 or 2");
4405
+ }
4406
+ if (argument instanceof Date || typeof argument === "object" && Object.prototype.toString.call(argument) === "[object Date]") {
4407
+ return new Date(argument.getTime());
4408
+ } else if (typeof argument === "number" || Object.prototype.toString.call(argument) === "[object Number]") {
4409
+ return new Date(argument);
4410
+ } else if (!(Object.prototype.toString.call(argument) === "[object String]")) {
4411
+ return /* @__PURE__ */ new Date(NaN);
4412
+ }
4413
+ const dateStrings = splitDateString(argument);
4414
+ const { year, restDateString } = parseYear(dateStrings.date, additionalDigits);
4415
+ const date2 = parseDate(restDateString, year);
4416
+ if (date2 === null || isNaN(date2.getTime())) {
4417
+ return /* @__PURE__ */ new Date(NaN);
4418
+ }
4419
+ if (date2) {
4420
+ const timestamp = date2.getTime();
4421
+ let time2 = 0;
4422
+ let offset;
4423
+ if (dateStrings.time) {
4424
+ time2 = parseTime(dateStrings.time);
4425
+ if (time2 === null || isNaN(time2)) {
4426
+ return /* @__PURE__ */ new Date(NaN);
4427
+ }
4428
+ }
4429
+ if (dateStrings.timeZone || options.timeZone) {
4430
+ offset = tzParseTimezone(dateStrings.timeZone || options.timeZone, new Date(timestamp + time2));
4431
+ if (isNaN(offset)) {
4432
+ return /* @__PURE__ */ new Date(NaN);
4433
+ }
4434
+ } else {
4435
+ offset = getTimezoneOffsetInMilliseconds2(new Date(timestamp + time2));
4436
+ offset = getTimezoneOffsetInMilliseconds2(new Date(timestamp + time2 + offset));
4437
+ }
4438
+ return new Date(timestamp + time2 + offset);
4439
+ } else {
4440
+ return /* @__PURE__ */ new Date(NaN);
4441
+ }
4442
+ }
4443
+ function splitDateString(dateString) {
4444
+ const dateStrings = {};
4445
+ let parts = patterns2.dateTimePattern.exec(dateString);
4446
+ let timeString;
4447
+ if (!parts) {
4448
+ parts = patterns2.datePattern.exec(dateString);
4449
+ if (parts) {
4450
+ dateStrings.date = parts[1];
4451
+ timeString = parts[2];
4452
+ } else {
4453
+ dateStrings.date = null;
4454
+ timeString = dateString;
4455
+ }
4456
+ } else {
4457
+ dateStrings.date = parts[1];
4458
+ timeString = parts[3];
4459
+ }
4460
+ if (timeString) {
4461
+ const token = patterns2.timeZone.exec(timeString);
4462
+ if (token) {
4463
+ dateStrings.time = timeString.replace(token[1], "");
4464
+ dateStrings.timeZone = token[1].trim();
4465
+ } else {
4466
+ dateStrings.time = timeString;
4467
+ }
4468
+ }
4469
+ return dateStrings;
4470
+ }
4471
+ function parseYear(dateString, additionalDigits) {
4472
+ if (dateString) {
4473
+ const patternYYY = patterns2.YYY[additionalDigits];
4474
+ const patternYYYYY = patterns2.YYYYY[additionalDigits];
4475
+ let token = patterns2.YYYY.exec(dateString) || patternYYYYY.exec(dateString);
4476
+ if (token) {
4477
+ const yearString = token[1];
4478
+ return {
4479
+ year: parseInt(yearString, 10),
4480
+ restDateString: dateString.slice(yearString.length)
4481
+ };
4482
+ }
4483
+ token = patterns2.YY.exec(dateString) || patternYYY.exec(dateString);
4484
+ if (token) {
4485
+ const centuryString = token[1];
4486
+ return {
4487
+ year: parseInt(centuryString, 10) * 100,
4488
+ restDateString: dateString.slice(centuryString.length)
4489
+ };
4490
+ }
4491
+ }
4492
+ return {
4493
+ year: null
4494
+ };
4495
+ }
4496
+ function parseDate(dateString, year) {
4497
+ if (year === null) {
4498
+ return null;
2589
4499
  }
2590
- componentDidCatch(error, errorInfo) {
2591
- console.error({ error, errorInfo });
4500
+ let date2;
4501
+ let month;
4502
+ let week;
4503
+ if (!dateString || !dateString.length) {
4504
+ date2 = /* @__PURE__ */ new Date(0);
4505
+ date2.setUTCFullYear(year);
4506
+ return date2;
2592
4507
  }
2593
- render() {
2594
- if (this.state.hasError) {
2595
- return /* @__PURE__ */ jsx(
2596
- ErrorFallback_default,
2597
- {
2598
- error: this.state.error,
2599
- resetError: () => this.setState({ hasError: false, error: null })
2600
- }
2601
- );
4508
+ let token = patterns2.MM.exec(dateString);
4509
+ if (token) {
4510
+ date2 = /* @__PURE__ */ new Date(0);
4511
+ month = parseInt(token[1], 10) - 1;
4512
+ if (!validateDate(year, month)) {
4513
+ return /* @__PURE__ */ new Date(NaN);
2602
4514
  }
2603
- return this.props.children;
4515
+ date2.setUTCFullYear(year, month);
4516
+ return date2;
4517
+ }
4518
+ token = patterns2.DDD.exec(dateString);
4519
+ if (token) {
4520
+ date2 = /* @__PURE__ */ new Date(0);
4521
+ const dayOfYear = parseInt(token[1], 10);
4522
+ if (!validateDayOfYearDate(year, dayOfYear)) {
4523
+ return /* @__PURE__ */ new Date(NaN);
4524
+ }
4525
+ date2.setUTCFullYear(year, 0, dayOfYear);
4526
+ return date2;
4527
+ }
4528
+ token = patterns2.MMDD.exec(dateString);
4529
+ if (token) {
4530
+ date2 = /* @__PURE__ */ new Date(0);
4531
+ month = parseInt(token[1], 10) - 1;
4532
+ const day = parseInt(token[2], 10);
4533
+ if (!validateDate(year, month, day)) {
4534
+ return /* @__PURE__ */ new Date(NaN);
4535
+ }
4536
+ date2.setUTCFullYear(year, month, day);
4537
+ return date2;
4538
+ }
4539
+ token = patterns2.Www.exec(dateString);
4540
+ if (token) {
4541
+ week = parseInt(token[1], 10) - 1;
4542
+ if (!validateWeekDate(week)) {
4543
+ return /* @__PURE__ */ new Date(NaN);
4544
+ }
4545
+ return dayOfISOWeekYear(year, week);
4546
+ }
4547
+ token = patterns2.WwwD.exec(dateString);
4548
+ if (token) {
4549
+ week = parseInt(token[1], 10) - 1;
4550
+ const dayOfWeek = parseInt(token[2], 10) - 1;
4551
+ if (!validateWeekDate(week, dayOfWeek)) {
4552
+ return /* @__PURE__ */ new Date(NaN);
4553
+ }
4554
+ return dayOfISOWeekYear(year, week, dayOfWeek);
4555
+ }
4556
+ return null;
4557
+ }
4558
+ function parseTime(timeString) {
4559
+ let hours;
4560
+ let minutes;
4561
+ let token = patterns2.HH.exec(timeString);
4562
+ if (token) {
4563
+ hours = parseFloat(token[1].replace(",", "."));
4564
+ if (!validateTime(hours)) {
4565
+ return NaN;
4566
+ }
4567
+ return hours % 24 * MILLISECONDS_IN_HOUR2;
4568
+ }
4569
+ token = patterns2.HHMM.exec(timeString);
4570
+ if (token) {
4571
+ hours = parseInt(token[1], 10);
4572
+ minutes = parseFloat(token[2].replace(",", "."));
4573
+ if (!validateTime(hours, minutes)) {
4574
+ return NaN;
4575
+ }
4576
+ return hours % 24 * MILLISECONDS_IN_HOUR2 + minutes * MILLISECONDS_IN_MINUTE3;
4577
+ }
4578
+ token = patterns2.HHMMSS.exec(timeString);
4579
+ if (token) {
4580
+ hours = parseInt(token[1], 10);
4581
+ minutes = parseInt(token[2], 10);
4582
+ const seconds2 = parseFloat(token[3].replace(",", "."));
4583
+ if (!validateTime(hours, minutes, seconds2)) {
4584
+ return NaN;
4585
+ }
4586
+ return hours % 24 * MILLISECONDS_IN_HOUR2 + minutes * MILLISECONDS_IN_MINUTE3 + seconds2 * 1e3;
4587
+ }
4588
+ return null;
4589
+ }
4590
+ function dayOfISOWeekYear(isoWeekYear, week, day) {
4591
+ week = week || 0;
4592
+ day = day || 0;
4593
+ const date2 = /* @__PURE__ */ new Date(0);
4594
+ date2.setUTCFullYear(isoWeekYear, 0, 4);
4595
+ const fourthOfJanuaryDay = date2.getUTCDay() || 7;
4596
+ const diff = week * 7 + day + 1 - fourthOfJanuaryDay;
4597
+ date2.setUTCDate(date2.getUTCDate() + diff);
4598
+ return date2;
4599
+ }
4600
+ var DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
4601
+ var DAYS_IN_MONTH_LEAP_YEAR = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
4602
+ function isLeapYearIndex(year) {
4603
+ return year % 400 === 0 || year % 4 === 0 && year % 100 !== 0;
4604
+ }
4605
+ function validateDate(year, month, date2) {
4606
+ if (month < 0 || month > 11) {
4607
+ return false;
4608
+ }
4609
+ if (date2 != null) {
4610
+ if (date2 < 1) {
4611
+ return false;
4612
+ }
4613
+ const isLeapYear = isLeapYearIndex(year);
4614
+ if (isLeapYear && date2 > DAYS_IN_MONTH_LEAP_YEAR[month]) {
4615
+ return false;
4616
+ }
4617
+ if (!isLeapYear && date2 > DAYS_IN_MONTH[month]) {
4618
+ return false;
4619
+ }
4620
+ }
4621
+ return true;
4622
+ }
4623
+ function validateDayOfYearDate(year, dayOfYear) {
4624
+ if (dayOfYear < 1) {
4625
+ return false;
4626
+ }
4627
+ const isLeapYear = isLeapYearIndex(year);
4628
+ if (isLeapYear && dayOfYear > 366) {
4629
+ return false;
4630
+ }
4631
+ if (!isLeapYear && dayOfYear > 365) {
4632
+ return false;
4633
+ }
4634
+ return true;
4635
+ }
4636
+ function validateWeekDate(week, day) {
4637
+ if (week < 0 || week > 52) {
4638
+ return false;
4639
+ }
4640
+ if (day != null && (day < 0 || day > 6)) {
4641
+ return false;
4642
+ }
4643
+ return true;
4644
+ }
4645
+ function validateTime(hours, minutes, seconds2) {
4646
+ if (hours < 0 || hours >= 25) {
4647
+ return false;
4648
+ }
4649
+ if (minutes != null && (minutes < 0 || minutes >= 60)) {
4650
+ return false;
4651
+ }
4652
+ if (seconds2 != null && (seconds2 < 0 || seconds2 >= 60)) {
4653
+ return false;
4654
+ }
4655
+ return true;
4656
+ }
4657
+
4658
+ // ../node_modules/date-fns-tz/dist/esm/fromZonedTime/index.js
4659
+ function fromZonedTime(date2, timeZone, options) {
4660
+ if (typeof date2 === "string" && !date2.match(tzPattern)) {
4661
+ return toDate2(date2, { ...options, timeZone });
4662
+ }
4663
+ date2 = toDate2(date2, options);
4664
+ const utc = newDateUTC(date2.getFullYear(), date2.getMonth(), date2.getDate(), date2.getHours(), date2.getMinutes(), date2.getSeconds(), date2.getMilliseconds()).getTime();
4665
+ const offsetMilliseconds = tzParseTimezone(timeZone, new Date(utc));
4666
+ return new Date(utc + offsetMilliseconds);
4667
+ }
4668
+ var resolveDateTimeLocale = (uiLocale, countryCode, selectedLocale) => {
4669
+ if (selectedLocale) {
4670
+ try {
4671
+ return new Intl.Locale(selectedLocale).toString();
4672
+ } catch {
4673
+ }
4674
+ }
4675
+ const locale3 = new Intl.Locale(uiLocale || "en");
4676
+ if (locale3.region || !countryCode) return locale3.toString();
4677
+ try {
4678
+ return new Intl.Locale(locale3, {
4679
+ region: countryCode.toUpperCase()
4680
+ }).toString();
4681
+ } catch {
4682
+ return locale3.toString();
2604
4683
  }
2605
4684
  };
2606
- var ErrorBoundary_default = ErrorBoundary;
2607
- var DateInputField = ({
2608
- id,
2609
- label,
2610
- value,
2611
- onChange,
2612
- placeholder,
2613
- min: min2,
2614
- max: max2,
2615
- className,
2616
- containerClassName
2617
- }) => {
2618
- return /* @__PURE__ */ jsxs("div", { className: clsx_default("flex flex-col gap-1", containerClassName), children: [
2619
- label && /* @__PURE__ */ jsx("label", { htmlFor: id, className: "text-sm font-medium text-text-secondary", children: label }),
2620
- /* @__PURE__ */ jsx(
2621
- "input",
2622
- {
2623
- type: "date",
2624
- id,
2625
- value: value || "",
2626
- onChange: (e) => {
2627
- const val = e.target.value;
2628
- onChange(val ? val : null);
2629
- },
2630
- placeholder,
2631
- min: min2,
2632
- max: max2,
2633
- className: clsx_default(
2634
- "w-full rounded-md border-1 border-border-default bg-surface-input px-3 py-2 text-sm shadow-xs text-text-primary focus:outline-hidden focus:ring-2 focus:ring-focus-ring dark:[color-scheme:dark]",
2635
- className
2636
- )
4685
+ var useFormatDateTime = () => {
4686
+ const { locale: uiLocale } = useIntl();
4687
+ const { shopInfo } = useShopInfo_default();
4688
+ const appContext = useContext(AppContext_default);
4689
+ const locale3 = resolveDateTimeLocale(
4690
+ uiLocale,
4691
+ shopInfo?.country?.isoCode,
4692
+ appContext?.selectedLocale
4693
+ );
4694
+ const formatDateTime = (date2, options = {}) => {
4695
+ if (typeof date2 !== "string" && typeof date2 !== "number" && !(date2 instanceof Date) || date2 === "")
4696
+ return "n/a";
4697
+ const timestamp = new Date(date2).getTime();
4698
+ if (Number.isNaN(timestamp)) return "n/a";
4699
+ return new Intl.DateTimeFormat(locale3, options).format(timestamp);
4700
+ };
4701
+ const getDateFormatPattern = () => {
4702
+ const getPatternForPart = (part) => {
4703
+ switch (part.type) {
4704
+ case "day":
4705
+ return "d".repeat(part.value.length);
4706
+ case "month":
4707
+ return "M".repeat(part.value.length);
4708
+ case "year":
4709
+ return "y".repeat(part.value.length);
4710
+ case "literal":
4711
+ return part.value;
4712
+ default:
4713
+ return "dd.mm.yyyy";
2637
4714
  }
2638
- )
2639
- ] });
4715
+ };
4716
+ return new Intl.DateTimeFormat(locale3).formatToParts(/* @__PURE__ */ new Date()).map(getPatternForPart).join("");
4717
+ };
4718
+ const parseDate2 = (value) => {
4719
+ return format(
4720
+ fromZonedTime(value, Intl.DateTimeFormat().resolvedOptions().timeZone),
4721
+ "yyyy-MM-dd"
4722
+ );
4723
+ };
4724
+ return { formatDateTime, getDateFormatPattern, parseDate: parseDate2, locale: locale3 };
2640
4725
  };
2641
- var DateInput_default = DateInputField;
4726
+ var useFormatDateTime_default = useFormatDateTime;
2642
4727
  var DateRangeFilterInput = () => {
2643
- const { parseDate } = useFormatDateTime_default();
4728
+ const { parseDate: parseDate2 } = useFormatDateTime_default();
2644
4729
  const { formatMessage } = useIntl();
2645
4730
  const router = useRouter();
2646
4731
  return /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center", children: [
@@ -2667,7 +4752,7 @@ var DateRangeFilterInput = () => {
2667
4752
  id: "start_date",
2668
4753
  defaultMessage: "Start date"
2669
4754
  }),
2670
- value: router?.query?.start ? parseDate(router?.query?.start) : null,
4755
+ value: router?.query?.start ? parseDate2(router?.query?.start) : null,
2671
4756
  containerClassName: "w-full"
2672
4757
  }
2673
4758
  ),
@@ -2694,7 +4779,7 @@ var DateRangeFilterInput = () => {
2694
4779
  id: "end_date",
2695
4780
  defaultMessage: "End Date"
2696
4781
  }),
2697
- value: router?.query?.end ? parseDate(router?.query?.end) : parseDate(/* @__PURE__ */ new Date()),
4782
+ value: router?.query?.end ? parseDate2(router?.query?.end) : parseDate2(/* @__PURE__ */ new Date()),
2698
4783
  containerClassName: "w-full"
2699
4784
  }
2700
4785
  )
@@ -9648,18 +11733,12 @@ function createAction(type, prepareAction) {
9648
11733
  function actionCreator(...args) {
9649
11734
  if (prepareAction) {
9650
11735
  let prepared = prepareAction(...args);
9651
- if (!prepared) {
9652
- throw new Error("prepareAction did not return an object");
9653
- }
11736
+ if (!prepared) throw new Error("prepareAction did not return an object");
9654
11737
  return {
9655
11738
  type,
9656
11739
  payload: prepared.payload,
9657
- ..."meta" in prepared && {
9658
- meta: prepared.meta
9659
- },
9660
- ..."error" in prepared && {
9661
- error: prepared.error
9662
- }
11740
+ ..."meta" in prepared && { meta: prepared.meta },
11741
+ ..."error" in prepared && { error: prepared.error }
9663
11742
  };
9664
11743
  }
9665
11744
  return {
@@ -9683,9 +11762,7 @@ function getOrInsertComputed(map2, key, compute) {
9683
11762
  var SHOULD_AUTOBATCH = "RTK_autoBatch";
9684
11763
  var prepareAutoBatched = () => (payload) => ({
9685
11764
  payload,
9686
- meta: {
9687
- [SHOULD_AUTOBATCH]: true
9688
- }
11765
+ meta: { [SHOULD_AUTOBATCH]: true }
9689
11766
  });
9690
11767
  function executeReducerBuilderCallback(builderCallback) {
9691
11768
  const actionsMap = {};
@@ -9694,28 +11771,18 @@ function executeReducerBuilderCallback(builderCallback) {
9694
11771
  const builder = {
9695
11772
  addCase(typeOrActionCreator, reducer) {
9696
11773
  {
9697
- if (actionMatchers.length > 0) {
9698
- throw new Error("`builder.addCase` should only be called before calling `builder.addMatcher`");
9699
- }
9700
- if (defaultCaseReducer) {
9701
- throw new Error("`builder.addCase` should only be called before calling `builder.addDefaultCase`");
9702
- }
11774
+ if (actionMatchers.length > 0) throw new Error("`builder.addCase` should only be called before calling `builder.addMatcher`");
11775
+ if (defaultCaseReducer) throw new Error("`builder.addCase` should only be called before calling `builder.addDefaultCase`");
9703
11776
  }
9704
11777
  const type = typeof typeOrActionCreator === "string" ? typeOrActionCreator : typeOrActionCreator.type;
9705
- if (!type) {
9706
- throw new Error("`builder.addCase` cannot be called with an empty action type");
9707
- }
9708
- if (type in actionsMap) {
9709
- throw new Error(`\`builder.addCase\` cannot be called with two reducers for the same action type '${type}'`);
9710
- }
11778
+ if (!type) throw new Error("`builder.addCase` cannot be called with an empty action type");
11779
+ if (type in actionsMap) throw new Error(`\`builder.addCase\` cannot be called with two reducers for the same action type '${type}'`);
9711
11780
  actionsMap[type] = reducer;
9712
11781
  return builder;
9713
11782
  },
9714
11783
  addAsyncThunk(asyncThunk, reducers) {
9715
11784
  {
9716
- if (defaultCaseReducer) {
9717
- throw new Error("`builder.addAsyncThunk` should only be called before calling `builder.addDefaultCase`");
9718
- }
11785
+ if (defaultCaseReducer) throw new Error("`builder.addAsyncThunk` should only be called before calling `builder.addDefaultCase`");
9719
11786
  }
9720
11787
  if (reducers.pending) actionsMap[asyncThunk.pending.type] = reducers.pending;
9721
11788
  if (reducers.rejected) actionsMap[asyncThunk.rejected.type] = reducers.rejected;
@@ -9728,9 +11795,7 @@ function executeReducerBuilderCallback(builderCallback) {
9728
11795
  },
9729
11796
  addMatcher(matcher, reducer) {
9730
11797
  {
9731
- if (defaultCaseReducer) {
9732
- throw new Error("`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");
9733
- }
11798
+ if (defaultCaseReducer) throw new Error("`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");
9734
11799
  }
9735
11800
  actionMatchers.push({
9736
11801
  matcher,
@@ -9740,66 +11805,52 @@ function executeReducerBuilderCallback(builderCallback) {
9740
11805
  },
9741
11806
  addDefaultCase(reducer) {
9742
11807
  {
9743
- if (defaultCaseReducer) {
9744
- throw new Error("`builder.addDefaultCase` can only be called once");
9745
- }
11808
+ if (defaultCaseReducer) throw new Error("`builder.addDefaultCase` can only be called once");
9746
11809
  }
9747
11810
  defaultCaseReducer = reducer;
9748
11811
  return builder;
9749
11812
  }
9750
11813
  };
9751
11814
  builderCallback(builder);
9752
- return [actionsMap, actionMatchers, defaultCaseReducer];
11815
+ return [
11816
+ actionsMap,
11817
+ actionMatchers,
11818
+ defaultCaseReducer
11819
+ ];
9753
11820
  }
9754
11821
  function isStateFunction(x2) {
9755
11822
  return typeof x2 === "function";
9756
11823
  }
9757
11824
  function createReducer(initialState3, mapOrBuilderCallback) {
9758
11825
  {
9759
- if (typeof mapOrBuilderCallback === "object") {
9760
- throw new Error("The object notation for `createReducer` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createReducer");
9761
- }
11826
+ if (typeof mapOrBuilderCallback === "object") throw new Error("The object notation for `createReducer` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createReducer");
9762
11827
  }
9763
11828
  let [actionsMap, finalActionMatchers, finalDefaultCaseReducer] = executeReducerBuilderCallback(mapOrBuilderCallback);
9764
11829
  let getInitialState;
9765
- if (isStateFunction(initialState3)) {
9766
- getInitialState = () => freezeDraftable(initialState3());
9767
- } else {
11830
+ if (isStateFunction(initialState3)) getInitialState = () => freezeDraftable(initialState3());
11831
+ else {
9768
11832
  const frozenInitialState = freezeDraftable(initialState3);
9769
11833
  getInitialState = () => frozenInitialState;
9770
11834
  }
9771
11835
  function reducer(state = getInitialState(), action) {
9772
- let caseReducers = [actionsMap[action.type], ...finalActionMatchers.filter(({
9773
- matcher
9774
- }) => matcher(action)).map(({
9775
- reducer: reducer2
9776
- }) => reducer2)];
9777
- if (caseReducers.filter((cr) => !!cr).length === 0) {
9778
- caseReducers = [finalDefaultCaseReducer];
9779
- }
11836
+ let caseReducers = [actionsMap[action.type], ...finalActionMatchers.filter(({ matcher }) => matcher(action)).map(({ reducer: reducer2 }) => reducer2)];
11837
+ if (caseReducers.filter((cr) => !!cr).length === 0) caseReducers = [finalDefaultCaseReducer];
9780
11838
  return caseReducers.reduce((previousState, caseReducer) => {
9781
11839
  if (caseReducer) {
9782
11840
  if (isDraft(previousState)) {
9783
- const draft = previousState;
9784
- const result = caseReducer(draft, action);
9785
- if (result === void 0) {
9786
- return previousState;
9787
- }
11841
+ const result = caseReducer(previousState, action);
11842
+ if (result === void 0) return previousState;
9788
11843
  return result;
9789
11844
  } else if (!isDraftable(previousState)) {
9790
11845
  const result = caseReducer(previousState, action);
9791
11846
  if (result === void 0) {
9792
- if (previousState === null) {
9793
- return previousState;
9794
- }
9795
- throw Error("A case reducer on a non-draftable value must not return undefined");
11847
+ if (previousState === null) return previousState;
11848
+ throw new Error("A case reducer on a non-draftable value must not return undefined");
9796
11849
  }
9797
11850
  return result;
9798
- } else {
9799
- return produce(previousState, (draft) => {
9800
- return caseReducer(draft, action);
9801
- });
9802
- }
11851
+ } else return produce(previousState, (draft) => {
11852
+ return caseReducer(draft, action);
11853
+ });
9803
11854
  }
9804
11855
  return previousState;
9805
11856
  }, state);
@@ -9811,22 +11862,13 @@ var asyncThunkSymbol = /* @__PURE__ */ Symbol.for("rtk-slice-createasyncthunk");
9811
11862
  function getType(slice2, actionKey) {
9812
11863
  return `${slice2}/${actionKey}`;
9813
11864
  }
9814
- function buildCreateSlice({
9815
- creators
9816
- } = {}) {
11865
+ function buildCreateSlice({ creators } = {}) {
9817
11866
  const cAT = creators?.asyncThunk?.[asyncThunkSymbol];
9818
11867
  return function createSlice2(options) {
9819
- const {
9820
- name,
9821
- reducerPath = name
9822
- } = options;
9823
- if (!name) {
9824
- throw new Error("`name` is a required option for createSlice");
9825
- }
11868
+ const { name, reducerPath = name } = options;
11869
+ if (!name) throw new Error("`name` is a required option for createSlice");
9826
11870
  if (typeof process !== "undefined" && true) {
9827
- if (options.initialState === void 0) {
9828
- console.error("You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`");
9829
- }
11871
+ if (options.initialState === void 0) console.error("You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`");
9830
11872
  }
9831
11873
  const reducers = (typeof options.reducers === "function" ? options.reducers(buildReducerCreators()) : options.reducers) || {};
9832
11874
  const reducerNames = Object.keys(reducers);
@@ -9839,12 +11881,8 @@ function buildCreateSlice({
9839
11881
  const contextMethods = {
9840
11882
  addCase(typeOrActionCreator, reducer2) {
9841
11883
  const type = typeof typeOrActionCreator === "string" ? typeOrActionCreator : typeOrActionCreator.type;
9842
- if (!type) {
9843
- throw new Error("`context.addCase` cannot be called with an empty action type");
9844
- }
9845
- if (type in context.sliceCaseReducersByType) {
9846
- throw new Error("`context.addCase` cannot be called with two reducers for the same action type: " + type);
9847
- }
11884
+ if (!type) throw new Error("`context.addCase` cannot be called with an empty action type");
11885
+ if (type in context.sliceCaseReducersByType) throw new Error("`context.addCase` cannot be called with two reducers for the same action type: " + type);
9848
11886
  context.sliceCaseReducersByType[type] = reducer2;
9849
11887
  return contextMethods;
9850
11888
  },
@@ -9871,17 +11909,12 @@ function buildCreateSlice({
9871
11909
  type: getType(name, reducerName),
9872
11910
  createNotation: typeof options.reducers === "function"
9873
11911
  };
9874
- if (isAsyncThunkSliceReducerDefinition(reducerDefinition)) {
9875
- handleThunkCaseReducerDefinition(reducerDetails, reducerDefinition, contextMethods, cAT);
9876
- } else {
9877
- handleNormalReducerDefinition(reducerDetails, reducerDefinition, contextMethods);
9878
- }
11912
+ if (isAsyncThunkSliceReducerDefinition(reducerDefinition)) handleThunkCaseReducerDefinition(reducerDetails, reducerDefinition, contextMethods, cAT);
11913
+ else handleNormalReducerDefinition(reducerDetails, reducerDefinition, contextMethods);
9879
11914
  });
9880
11915
  function buildReducer() {
9881
11916
  {
9882
- if (typeof options.extraReducers === "object") {
9883
- throw new Error("The object notation for `createSlice.extraReducers` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createSlice");
9884
- }
11917
+ if (typeof options.extraReducers === "object") throw new Error("The object notation for `createSlice.extraReducers` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createSlice");
9885
11918
  }
9886
11919
  const [extraReducers = {}, actionMatchers = [], defaultCaseReducer = void 0] = typeof options.extraReducers === "function" ? executeReducerBuilderCallback(options.extraReducers) : [options.extraReducers];
9887
11920
  const finalCaseReducers = {
@@ -9889,18 +11922,10 @@ function buildCreateSlice({
9889
11922
  ...context.sliceCaseReducersByType
9890
11923
  };
9891
11924
  return createReducer(options.initialState, (builder) => {
9892
- for (let key in finalCaseReducers) {
9893
- builder.addCase(key, finalCaseReducers[key]);
9894
- }
9895
- for (let sM of context.sliceMatchers) {
9896
- builder.addMatcher(sM.matcher, sM.reducer);
9897
- }
9898
- for (let m of actionMatchers) {
9899
- builder.addMatcher(m.matcher, m.reducer);
9900
- }
9901
- if (defaultCaseReducer) {
9902
- builder.addDefaultCase(defaultCaseReducer);
9903
- }
11925
+ for (let key in finalCaseReducers) builder.addCase(key, finalCaseReducers[key]);
11926
+ for (let sM of context.sliceMatchers) builder.addMatcher(sM.matcher, sM.reducer);
11927
+ for (let m of actionMatchers) builder.addMatcher(m.matcher, m.reducer);
11928
+ if (defaultCaseReducer) builder.addDefaultCase(defaultCaseReducer);
9904
11929
  });
9905
11930
  }
9906
11931
  const selectSelf = (state) => state;
@@ -9919,21 +11944,15 @@ function buildCreateSlice({
9919
11944
  function selectSlice(state) {
9920
11945
  let sliceState = state[reducerPath2];
9921
11946
  if (typeof sliceState === "undefined") {
9922
- if (injected) {
9923
- sliceState = getOrInsertComputed(injectedStateCache, selectSlice, getInitialState);
9924
- } else {
9925
- throw new Error("selectSlice returned undefined for an uninjected slice reducer");
9926
- }
11947
+ if (injected) sliceState = getOrInsertComputed(injectedStateCache, selectSlice, getInitialState);
11948
+ else throw new Error("selectSlice returned undefined for an uninjected slice reducer");
9927
11949
  }
9928
11950
  return sliceState;
9929
11951
  }
9930
11952
  function getSelectors(selectState = selectSelf) {
9931
- const selectorCache = getOrInsertComputed(injectedSelectorCache, injected, () => /* @__PURE__ */ new WeakMap());
9932
- return getOrInsertComputed(selectorCache, selectState, () => {
11953
+ return getOrInsertComputed(getOrInsertComputed(injectedSelectorCache, injected, () => /* @__PURE__ */ new WeakMap()), selectState, () => {
9933
11954
  const map2 = {};
9934
- for (const [name2, selector] of Object.entries(options.selectors ?? {})) {
9935
- map2[name2] = wrapSelector(selector, selectState, () => getOrInsertComputed(injectedStateCache, selectState, getInitialState), injected);
9936
- }
11955
+ for (const [name2, selector] of Object.entries(options.selectors ?? {})) map2[name2] = wrapSelector(selector, selectState, () => getOrInsertComputed(injectedStateCache, selectState, getInitialState), injected);
9937
11956
  return map2;
9938
11957
  });
9939
11958
  }
@@ -9953,10 +11972,7 @@ function buildCreateSlice({
9953
11972
  caseReducers: context.sliceCaseReducersByName,
9954
11973
  getInitialState,
9955
11974
  ...makeSelectorProps(reducerPath),
9956
- injectInto(injectable, {
9957
- reducerPath: pathOpt,
9958
- ...config
9959
- } = {}) {
11975
+ injectInto(injectable, { reducerPath: pathOpt, ...config } = {}) {
9960
11976
  const newReducerPath = pathOpt ?? reducerPath;
9961
11977
  injectable.inject({
9962
11978
  reducerPath: newReducerPath,
@@ -9975,11 +11991,8 @@ function wrapSelector(selector, selectState, getInitialState, injected) {
9975
11991
  function wrapper(rootState, ...args) {
9976
11992
  let sliceState = selectState(rootState);
9977
11993
  if (typeof sliceState === "undefined") {
9978
- if (injected) {
9979
- sliceState = getInitialState();
9980
- } else {
9981
- throw new Error("selectState returned undefined for an uninjected slice reducer");
9982
- }
11994
+ if (injected) sliceState = getInitialState();
11995
+ else throw new Error("selectState returned undefined for an uninjected slice reducer");
9983
11996
  }
9984
11997
  return selector(sliceState, ...args);
9985
11998
  }
@@ -9998,16 +12011,9 @@ function buildReducerCreators() {
9998
12011
  asyncThunk.withTypes = () => asyncThunk;
9999
12012
  return {
10000
12013
  reducer(caseReducer) {
10001
- return Object.assign({
10002
- // hack so the wrapping function has the same name as the original
10003
- // we need to create a wrapper so the `reducerDefinitionType` is not assigned to the original
10004
- [caseReducer.name](...args) {
10005
- return caseReducer(...args);
10006
- }
10007
- }[caseReducer.name], {
10008
- _reducerDefinitionType: "reducer"
10009
- /* reducer */
10010
- });
12014
+ return Object.assign({ [caseReducer.name](...args) {
12015
+ return caseReducer(...args);
12016
+ } }[caseReducer.name], { _reducerDefinitionType: "reducer" });
10011
12017
  },
10012
12018
  preparedReducer(prepare, reducer) {
10013
12019
  return {
@@ -10019,22 +12025,14 @@ function buildReducerCreators() {
10019
12025
  asyncThunk
10020
12026
  };
10021
12027
  }
10022
- function handleNormalReducerDefinition({
10023
- type,
10024
- reducerName,
10025
- createNotation
10026
- }, maybeReducerWithPrepare, context) {
12028
+ function handleNormalReducerDefinition({ type, reducerName, createNotation }, maybeReducerWithPrepare, context) {
10027
12029
  let caseReducer;
10028
12030
  let prepareCallback;
10029
12031
  if ("reducer" in maybeReducerWithPrepare) {
10030
- if (createNotation && !isCaseReducerWithPrepareDefinition(maybeReducerWithPrepare)) {
10031
- throw new Error("Please use the `create.preparedReducer` notation for prepared action creators with the `create` notation.");
10032
- }
12032
+ if (createNotation && !isCaseReducerWithPrepareDefinition(maybeReducerWithPrepare)) throw new Error("Please use the `create.preparedReducer` notation for prepared action creators with the `create` notation.");
10033
12033
  caseReducer = maybeReducerWithPrepare.reducer;
10034
12034
  prepareCallback = maybeReducerWithPrepare.prepare;
10035
- } else {
10036
- caseReducer = maybeReducerWithPrepare;
10037
- }
12035
+ } else caseReducer = maybeReducerWithPrepare;
10038
12036
  context.addCase(type, caseReducer).exposeCaseReducer(reducerName, caseReducer).exposeAction(reducerName, prepareCallback ? createAction(type, prepareCallback) : createAction(type));
10039
12037
  }
10040
12038
  function isAsyncThunkSliceReducerDefinition(reducerDefinition) {
@@ -10043,43 +12041,23 @@ function isAsyncThunkSliceReducerDefinition(reducerDefinition) {
10043
12041
  function isCaseReducerWithPrepareDefinition(reducerDefinition) {
10044
12042
  return reducerDefinition._reducerDefinitionType === "reducerWithPrepare";
10045
12043
  }
10046
- function handleThunkCaseReducerDefinition({
10047
- type,
10048
- reducerName
10049
- }, reducerDefinition, context, cAT) {
10050
- if (!cAT) {
10051
- throw new Error("Cannot use `create.asyncThunk` in the built-in `createSlice`. Use `buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator } })` to create a customised version of `createSlice`.");
10052
- }
10053
- const {
10054
- payloadCreator,
10055
- fulfilled,
10056
- pending,
10057
- rejected,
10058
- settled,
10059
- options
10060
- } = reducerDefinition;
12044
+ function handleThunkCaseReducerDefinition({ type, reducerName }, reducerDefinition, context, cAT) {
12045
+ if (!cAT) throw new Error("Cannot use `create.asyncThunk` in the built-in `createSlice`. Use `buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator } })` to create a customised version of `createSlice`.");
12046
+ const { payloadCreator, fulfilled, pending, rejected, settled, options } = reducerDefinition;
10061
12047
  const thunk = cAT(type, payloadCreator, options);
10062
12048
  context.exposeAction(reducerName, thunk);
10063
- if (fulfilled) {
10064
- context.addCase(thunk.fulfilled, fulfilled);
10065
- }
10066
- if (pending) {
10067
- context.addCase(thunk.pending, pending);
10068
- }
10069
- if (rejected) {
10070
- context.addCase(thunk.rejected, rejected);
10071
- }
10072
- if (settled) {
10073
- context.addMatcher(thunk.settled, settled);
10074
- }
12049
+ if (fulfilled) context.addCase(thunk.fulfilled, fulfilled);
12050
+ if (pending) context.addCase(thunk.pending, pending);
12051
+ if (rejected) context.addCase(thunk.rejected, rejected);
12052
+ if (settled) context.addMatcher(thunk.settled, settled);
10075
12053
  context.exposeCaseReducer(reducerName, {
10076
- fulfilled: fulfilled || noop3,
10077
- pending: pending || noop3,
10078
- rejected: rejected || noop3,
10079
- settled: settled || noop3
12054
+ fulfilled: fulfilled || noop$1,
12055
+ pending: pending || noop$1,
12056
+ rejected: rejected || noop$1,
12057
+ settled: settled || noop$1
10080
12058
  });
10081
12059
  }
10082
- function noop3() {
12060
+ function noop$1() {
10083
12061
  }
10084
12062
 
10085
12063
  // ../node_modules/recharts/es6/util/getSliced.js
@@ -10598,20 +12576,20 @@ function throttle(func, throttleMs = 0, options = {}) {
10598
12576
  trailing
10599
12577
  });
10600
12578
  }
10601
- var warn = function warn2(condition, format2) {
12579
+ var warn = function warn2(condition, format4) {
10602
12580
  for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
10603
12581
  args[_key - 2] = arguments[_key];
10604
12582
  }
10605
12583
  if (typeof console !== "undefined" && console.warn) {
10606
- if (format2 === void 0) {
12584
+ if (format4 === void 0) {
10607
12585
  console.warn("LogUtils requires an error message argument");
10608
12586
  }
10609
12587
  if (!condition) {
10610
- if (format2 === void 0) {
12588
+ if (format4 === void 0) {
10611
12589
  console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");
10612
12590
  } else {
10613
12591
  var argIndex = 0;
10614
- console.warn(format2.replace(/%s/g, () => args[argIndex++]));
12592
+ console.warn(format4.replace(/%s/g, () => args[argIndex++]));
10615
12593
  }
10616
12594
  }
10617
12595
  }
@@ -12906,11 +14884,11 @@ function parseNumericalUserDomain(userDomain, dataDomain, allowDataOverflow) {
12906
14884
  } catch (_unused2) {
12907
14885
  }
12908
14886
  } else if (typeof providedMin === "string" && MIN_VALUE_REG.test(providedMin)) {
12909
- var match = MIN_VALUE_REG.exec(providedMin);
12910
- if (match == null || match[1] == null || dataDomain == null) {
14887
+ var match2 = MIN_VALUE_REG.exec(providedMin);
14888
+ if (match2 == null || match2[1] == null || dataDomain == null) {
12911
14889
  finalMin = void 0;
12912
14890
  } else {
12913
- var value = +match[1];
14891
+ var value = +match2[1];
12914
14892
  finalMin = dataDomain[0] - value;
12915
14893
  }
12916
14894
  } else {
@@ -14259,10 +16237,10 @@ function color_formatHsl() {
14259
16237
  function color_formatRgb() {
14260
16238
  return this.rgb().formatRgb();
14261
16239
  }
14262
- function color(format2) {
16240
+ function color(format4) {
14263
16241
  var m, l;
14264
- format2 = (format2 + "").trim().toLowerCase();
14265
- return (m = reHex.exec(format2)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) : l === 3 ? new Rgb(m >> 8 & 15 | m >> 4 & 240, m >> 4 & 15 | m & 240, (m & 15) << 4 | m & 15, 1) : l === 8 ? rgba(m >> 24 & 255, m >> 16 & 255, m >> 8 & 255, (m & 255) / 255) : l === 4 ? rgba(m >> 12 & 15 | m >> 8 & 240, m >> 8 & 15 | m >> 4 & 240, m >> 4 & 15 | m & 240, ((m & 15) << 4 | m & 15) / 255) : null) : (m = reRgbInteger.exec(format2)) ? new Rgb(m[1], m[2], m[3], 1) : (m = reRgbPercent.exec(format2)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) : (m = reRgbaInteger.exec(format2)) ? rgba(m[1], m[2], m[3], m[4]) : (m = reRgbaPercent.exec(format2)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) : (m = reHslPercent.exec(format2)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) : (m = reHslaPercent.exec(format2)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) : named.hasOwnProperty(format2) ? rgbn(named[format2]) : format2 === "transparent" ? new Rgb(NaN, NaN, NaN, 0) : null;
16242
+ format4 = (format4 + "").trim().toLowerCase();
16243
+ return (m = reHex.exec(format4)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) : l === 3 ? new Rgb(m >> 8 & 15 | m >> 4 & 240, m >> 4 & 15 | m & 240, (m & 15) << 4 | m & 15, 1) : l === 8 ? rgba(m >> 24 & 255, m >> 16 & 255, m >> 8 & 255, (m & 255) / 255) : l === 4 ? rgba(m >> 12 & 15 | m >> 8 & 240, m >> 8 & 15 | m >> 4 & 240, m >> 4 & 15 | m & 240, ((m & 15) << 4 | m & 15) / 255) : null) : (m = reRgbInteger.exec(format4)) ? new Rgb(m[1], m[2], m[3], 1) : (m = reRgbPercent.exec(format4)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) : (m = reRgbaInteger.exec(format4)) ? rgba(m[1], m[2], m[3], m[4]) : (m = reRgbaPercent.exec(format4)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) : (m = reHslPercent.exec(format4)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) : (m = reHslaPercent.exec(format4)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) : named.hasOwnProperty(format4) ? rgbn(named[format4]) : format4 === "transparent" ? new Rgb(NaN, NaN, NaN, 0) : null;
14266
16244
  }
14267
16245
  function rgbn(n) {
14268
16246
  return new Rgb(n >> 16 & 255, n >> 8 & 255, n & 255, 1);
@@ -14709,19 +16687,19 @@ function formatNumerals_default(numerals) {
14709
16687
  // ../node_modules/d3-format/src/formatSpecifier.js
14710
16688
  var re = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
14711
16689
  function formatSpecifier(specifier) {
14712
- if (!(match = re.exec(specifier))) throw new Error("invalid format: " + specifier);
14713
- var match;
16690
+ if (!(match2 = re.exec(specifier))) throw new Error("invalid format: " + specifier);
16691
+ var match2;
14714
16692
  return new FormatSpecifier({
14715
- fill: match[1],
14716
- align: match[2],
14717
- sign: match[3],
14718
- symbol: match[4],
14719
- zero: match[5],
14720
- width: match[6],
14721
- comma: match[7],
14722
- precision: match[8] && match[8].slice(1),
14723
- trim: match[9],
14724
- type: match[10]
16693
+ fill: match2[1],
16694
+ align: match2[2],
16695
+ sign: match2[3],
16696
+ symbol: match2[4],
16697
+ zero: match2[5],
16698
+ width: match2[6],
16699
+ comma: match2[7],
16700
+ precision: match2[8] && match2[8].slice(1),
16701
+ trim: match2[9],
16702
+ type: match2[10]
14725
16703
  });
14726
16704
  }
14727
16705
  formatSpecifier.prototype = FormatSpecifier.prototype;
@@ -14814,7 +16792,7 @@ function locale_default(locale3) {
14814
16792
  var prefix = (options && options.prefix !== void 0 ? options.prefix : "") + (symbol === "$" ? currencyPrefix : symbol === "#" && /[boxX]/.test(type) ? "0" + type.toLowerCase() : ""), suffix = (symbol === "$" ? currencySuffix : /[%p]/.test(type) ? percent : "") + (options && options.suffix !== void 0 ? options.suffix : "");
14815
16793
  var formatType = formatTypes_default[type], maybeSuffix = /[defgprs%]/.test(type);
14816
16794
  precision = precision === void 0 ? 6 : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision)) : Math.max(0, Math.min(20, precision));
14817
- function format2(value) {
16795
+ function format4(value) {
14818
16796
  var valuePrefix = prefix, valueSuffix = suffix, i, n, c;
14819
16797
  if (type === "c") {
14820
16798
  valueSuffix = formatType(value) + valueSuffix;
@@ -14857,10 +16835,10 @@ function locale_default(locale3) {
14857
16835
  }
14858
16836
  return numerals(value);
14859
16837
  }
14860
- format2.toString = function() {
16838
+ format4.toString = function() {
14861
16839
  return specifier + "";
14862
16840
  };
14863
- return format2;
16841
+ return format4;
14864
16842
  }
14865
16843
  function formatPrefix2(specifier, value) {
14866
16844
  var e = Math.max(-8, Math.min(8, Math.floor(exponent_default(value) / 3))) * 3, k = Math.pow(10, -e), f = newFormat((specifier = formatSpecifier(specifier), specifier.type = "f", specifier), { suffix: prefixes[8 + e / 3] });
@@ -14876,7 +16854,7 @@ function locale_default(locale3) {
14876
16854
 
14877
16855
  // ../node_modules/d3-format/src/defaultLocale.js
14878
16856
  var locale;
14879
- var format;
16857
+ var format3;
14880
16858
  var formatPrefix;
14881
16859
  defaultLocale({
14882
16860
  thousands: ",",
@@ -14885,7 +16863,7 @@ defaultLocale({
14885
16863
  });
14886
16864
  function defaultLocale(definition) {
14887
16865
  locale = locale_default(definition);
14888
- format = locale.format;
16866
+ format3 = locale.format;
14889
16867
  formatPrefix = locale.formatPrefix;
14890
16868
  return locale;
14891
16869
  }
@@ -14930,7 +16908,7 @@ function tickFormat(start, stop, count, specifier) {
14930
16908
  break;
14931
16909
  }
14932
16910
  }
14933
- return format(specifier);
16911
+ return format3(specifier);
14934
16912
  }
14935
16913
 
14936
16914
  // ../node_modules/d3-scale/src/linear.js
@@ -15109,7 +17087,7 @@ function loggish(transform) {
15109
17087
  if (specifier == null) specifier = base === 10 ? "s" : ",";
15110
17088
  if (typeof specifier !== "function") {
15111
17089
  if (!(base % 1) && (specifier = formatSpecifier(specifier)).precision == null) specifier.trim = true;
15112
- specifier = format(specifier);
17090
+ specifier = format3(specifier);
15113
17091
  }
15114
17092
  if (count === Infinity) return specifier;
15115
17093
  const k = Math.max(1, base * count / scale.ticks().length);
@@ -15769,7 +17747,7 @@ function formatLocale(locale3) {
15769
17747
  "d": parseDayOfMonth,
15770
17748
  "e": parseDayOfMonth,
15771
17749
  "f": parseMicroseconds,
15772
- "g": parseYear,
17750
+ "g": parseYear2,
15773
17751
  "G": parseFullYear,
15774
17752
  "H": parseHour24,
15775
17753
  "I": parseHour24,
@@ -15789,7 +17767,7 @@ function formatLocale(locale3) {
15789
17767
  "W": parseWeekNumberMonday,
15790
17768
  "x": parseLocaleDate,
15791
17769
  "X": parseLocaleTime,
15792
- "y": parseYear,
17770
+ "y": parseYear2,
15793
17771
  "Y": parseFullYear,
15794
17772
  "Z": parseZone,
15795
17773
  "%": parseLiteralPercent
@@ -15802,14 +17780,14 @@ function formatLocale(locale3) {
15802
17780
  utcFormats.c = newFormat(locale_dateTime, utcFormats);
15803
17781
  function newFormat(specifier, formats2) {
15804
17782
  return function(date2) {
15805
- var string = [], i = -1, j = 0, n = specifier.length, c, pad2, format2;
17783
+ var string = [], i = -1, j = 0, n = specifier.length, c, pad2, format4;
15806
17784
  if (!(date2 instanceof Date)) date2 = /* @__PURE__ */ new Date(+date2);
15807
17785
  while (++i < n) {
15808
17786
  if (specifier.charCodeAt(i) === 37) {
15809
17787
  string.push(specifier.slice(j, i));
15810
17788
  if ((pad2 = pads[c = specifier.charAt(++i)]) != null) c = specifier.charAt(++i);
15811
17789
  else pad2 = c === "e" ? " " : "0";
15812
- if (format2 = formats2[c]) c = format2(date2, pad2);
17790
+ if (format4 = formats2[c]) c = format4(date2, pad2);
15813
17791
  string.push(c);
15814
17792
  j = i + 1;
15815
17793
  }
@@ -16011,7 +17989,7 @@ function parseFullYear(d, string, i) {
16011
17989
  var n = numberRe.exec(string.slice(i, i + 4));
16012
17990
  return n ? (d.y = +n[0], i + n[0].length) : -1;
16013
17991
  }
16014
- function parseYear(d, string, i) {
17992
+ function parseYear2(d, string, i) {
16015
17993
  var n = numberRe.exec(string.slice(i, i + 2));
16016
17994
  return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2e3), i + n[0].length) : -1;
16017
17995
  }
@@ -16240,9 +18218,9 @@ function date(t) {
16240
18218
  function number3(t) {
16241
18219
  return t instanceof Date ? +t : +/* @__PURE__ */ new Date(+t);
16242
18220
  }
16243
- function calendar(ticks2, tickInterval, year, month, week, day, hour, minute, second2, format2) {
18221
+ function calendar(ticks2, tickInterval, year, month, week, day, hour, minute, second2, format4) {
16244
18222
  var scale = continuous(), invert = scale.invert, domain = scale.domain;
16245
- var formatMillisecond = format2(".%L"), formatSecond = format2(":%S"), formatMinute = format2("%I:%M"), formatHour = format2("%I %p"), formatDay = format2("%a %d"), formatWeek = format2("%b %d"), formatMonth = format2("%B"), formatYear2 = format2("%Y");
18223
+ var formatMillisecond = format4(".%L"), formatSecond = format4(":%S"), formatMinute = format4("%I:%M"), formatHour = format4("%I %p"), formatDay = format4("%a %d"), formatWeek = format4("%b %d"), formatMonth = format4("%B"), formatYear2 = format4("%Y");
16246
18224
  function tickFormat2(date2) {
16247
18225
  return (second2(date2) < date2 ? formatMillisecond : minute(date2) < date2 ? formatSecond : hour(date2) < date2 ? formatMinute : day(date2) < date2 ? formatHour : month(date2) < date2 ? week(date2) < date2 ? formatDay : formatWeek : year(date2) < date2 ? formatMonth : formatYear2)(date2);
16248
18226
  }
@@ -16257,7 +18235,7 @@ function calendar(ticks2, tickInterval, year, month, week, day, hour, minute, se
16257
18235
  return ticks2(d[0], d[d.length - 1], interval == null ? 10 : interval);
16258
18236
  };
16259
18237
  scale.tickFormat = function(count, specifier) {
16260
- return specifier == null ? tickFormat2 : format2(specifier);
18238
+ return specifier == null ? tickFormat2 : format4(specifier);
16261
18239
  };
16262
18240
  scale.nice = function(interval) {
16263
18241
  var d = domain();
@@ -16265,7 +18243,7 @@ function calendar(ticks2, tickInterval, year, month, week, day, hour, minute, se
16265
18243
  return interval ? domain(nice(d, interval)) : scale;
16266
18244
  };
16267
18245
  scale.copy = function() {
16268
- return copy(scale, calendar(ticks2, tickInterval, year, month, week, day, hour, minute, second2, format2));
18246
+ return copy(scale, calendar(ticks2, tickInterval, year, month, week, day, hour, minute, second2, format4));
16269
18247
  };
16270
18248
  return scale;
16271
18249
  }
@@ -19327,6 +21305,183 @@ function getPayloadConfigFromPayload(config, payload, key) {
19327
21305
  }
19328
21306
  return config[key];
19329
21307
  }
21308
+ var getNextSortDirection = (direction) => {
21309
+ if (!direction) return "ASC";
21310
+ if (direction === "ASC") return "DESC";
21311
+ return null;
21312
+ };
21313
+ var SortButton = ({ onSort, sortDirection }) => {
21314
+ if (!sortDirection)
21315
+ return /* @__PURE__ */ jsx(
21316
+ "svg",
21317
+ {
21318
+ xmlns: "http://www.w3.org/2000/svg",
21319
+ fill: "none",
21320
+ viewBox: "0 0 24 24",
21321
+ strokeWidth: 1.5,
21322
+ stroke: "currentColor",
21323
+ className: "ml-2 w-6 h-6",
21324
+ onClick: onSort,
21325
+ children: /* @__PURE__ */ jsx(
21326
+ "path",
21327
+ {
21328
+ strokeLinecap: "round",
21329
+ strokeLinejoin: "round",
21330
+ d: "M8.25 15L12 18.75 15.75 15m-7.5-6L12 5.25 15.75 9"
21331
+ }
21332
+ )
21333
+ }
21334
+ );
21335
+ return sortDirection === "ASC" ? /* @__PURE__ */ jsx(ChevronUpIcon_default, { className: "ml-2 w-5 h-5 text-slate-700", onClick: onSort }) : /* @__PURE__ */ jsx(ChevronDownIcon_default, { className: "ml-2 w-5 h-5 text-slate-700", onClick: onSort });
21336
+ };
21337
+ var TableCell = ({
21338
+ className = "",
21339
+ header = false,
21340
+ enablesort = false,
21341
+ children,
21342
+ sortKey = null,
21343
+ defaultSortDirection = null,
21344
+ ...props
21345
+ }) => {
21346
+ const router = useRouter();
21347
+ const sortKeys = getSortKeys(router.query?.sort);
21348
+ const onSort = (event) => {
21349
+ event.preventDefault();
21350
+ const next = getNextSortDirection(sortKeys[sortKey]);
21351
+ let newSortKeys;
21352
+ if (!next && sortKeys[sortKey]) {
21353
+ delete sortKeys[sortKey];
21354
+ newSortKeys = sortKeys;
21355
+ } else {
21356
+ newSortKeys = {
21357
+ ...sortKeys,
21358
+ [sortKey]: sortKeys[sortKey] === "ASC" ? "DESC" : "ASC"
21359
+ };
21360
+ }
21361
+ const sort = Object.entries(newSortKeys).map(([key, value]) => [key, value].join("_")).join(",");
21362
+ const { sort: currentSort, ...rest } = router.query;
21363
+ const newRest = Object.keys(rest).map((key) => [key, rest[key]].join("=")).join("&");
21364
+ const newURL = Object.keys(rest).length === 0 ? `${router.basePath}?sort=${sort}` : `${router.basePath}?${newRest}&sort=${sort}`;
21365
+ if (sort) router.push(newURL);
21366
+ else
21367
+ router.push({
21368
+ query: normalizeQuery(rest)
21369
+ });
21370
+ };
21371
+ const Td = header ? "th" : "td";
21372
+ return /* @__PURE__ */ jsx(
21373
+ Td,
21374
+ {
21375
+ className: clsx_default(
21376
+ header ? "px-4 py-3 text-left text-text-muted" : "whitespace-nowrap px-4 py-3 text-text-muted border-b dark:border-slate-300 last:border-b-0 sm:border-b-0 text-left flex items-center sm:table-cell",
21377
+ className
21378
+ ),
21379
+ ...props,
21380
+ children: /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
21381
+ children,
21382
+ Td === "th" && enablesort && sortKey && /* @__PURE__ */ jsx(
21383
+ SortButton,
21384
+ {
21385
+ onSort,
21386
+ sortDirection: Object.keys(sortKeys).length ? sortKeys[sortKey] : defaultSortDirection
21387
+ }
21388
+ )
21389
+ ] })
21390
+ }
21391
+ );
21392
+ };
21393
+ var TableCell_default = TableCell;
21394
+ var TableRow = ({
21395
+ className = "",
21396
+ children = [],
21397
+ header = false,
21398
+ enablesort = false,
21399
+ ...props
21400
+ }) => {
21401
+ const clone = (cell) => React8__default?.cloneElement(cell || /* @__PURE__ */ jsx("span", {}), { header, enablesort });
21402
+ const cells = React8__default.Children.map(children, clone);
21403
+ return /* @__PURE__ */ jsx(
21404
+ "tr",
21405
+ {
21406
+ className: clsx_default(
21407
+ "grid grid-cols-1 auto-rows-fr border border-border-subtle sm:border-0 rounded-md sm:mb-0 sm:table-row sm:rounded-none bg-surface sm:bg-inherit dark:sm:bg-inherit",
21408
+ className
21409
+ ),
21410
+ ...props,
21411
+ children: cells
21412
+ }
21413
+ );
21414
+ };
21415
+ var TableRow_default = TableRow;
21416
+ var buildRows = (props) => {
21417
+ const header = [];
21418
+ const body = [];
21419
+ const footer = [];
21420
+ React8__default.Children.forEach(props.children, (row) => {
21421
+ if (row?.props?.header) {
21422
+ header.push(row);
21423
+ } else if (row?.props?.footer) {
21424
+ footer.push(row);
21425
+ } else {
21426
+ body.push(row);
21427
+ }
21428
+ });
21429
+ return { header, footer, body };
21430
+ };
21431
+ var Table = ({ className = "", ...props }) => {
21432
+ const [rows, setRows] = useState(buildRows(props));
21433
+ const { formatMessage } = useIntl();
21434
+ const rowsWithSort = {
21435
+ ...rows,
21436
+ header: React8__default.Children.map(rows.header, (c) => React8__default.cloneElement(c))
21437
+ };
21438
+ useEffect(() => {
21439
+ setRows(buildRows(props));
21440
+ }, [props.children]);
21441
+ return rowsWithSort.header.length || rowsWithSort.body.length ? /* @__PURE__ */ jsxs(
21442
+ "table",
21443
+ {
21444
+ className: clsx_default(
21445
+ "overflow-hidden my-3 flex w-full flex-row flex-nowrap divide-y divide-slate-200 dark:divide-slate-600 shadow-sm sm:rounded-lg sm:bg-white dark:bg-slate-950",
21446
+ className
21447
+ ),
21448
+ ...props,
21449
+ children: [
21450
+ /* @__PURE__ */ jsx("thead", { className: "hidden sm:table-header-group bg-surface-raised text-sm text-text-secondary", children: rowsWithSort.header }),
21451
+ rowsWithSort.body.length ? /* @__PURE__ */ jsx("tbody", { className: "space-y-4 sm:space-y-0 flex-1 sm:divide-y divide-slate-200 dark:divide-slate-700 sm:bg-white dark:sm:bg-slate-800 sm:flex-none", children: rowsWithSort.body }) : null,
21452
+ rowsWithSort.footer.length ? /* @__PURE__ */ jsx("tfoot", { children: rowsWithSort.footer }) : null
21453
+ ]
21454
+ }
21455
+ ) : /* @__PURE__ */ jsx(
21456
+ NoData_default,
21457
+ {
21458
+ message: formatMessage({
21459
+ id: "data",
21460
+ defaultMessage: "Data"
21461
+ })
21462
+ }
21463
+ );
21464
+ };
21465
+ Table.Row = TableRow_default;
21466
+ Table.Cell = TableCell_default;
21467
+ var Table_default = Table;
21468
+ var MediaAvatar = ({ file, className = "" }) => {
21469
+ const { formatMessage } = useIntl();
21470
+ return /* @__PURE__ */ jsx("div", { className: clsx_default("h-10 w-10 shrink-0", className), children: file ? /* @__PURE__ */ jsx(
21471
+ ImageWithFallback_default,
21472
+ {
21473
+ className: "relative h-10 w-10 rounded-sm",
21474
+ src: file.url,
21475
+ width: 100,
21476
+ height: 100,
21477
+ alt: formatMessage({
21478
+ id: "image_not_available",
21479
+ defaultMessage: "Image not available"
21480
+ })
21481
+ }
21482
+ ) : /* @__PURE__ */ jsx(NoImage_default, {}) });
21483
+ };
21484
+ var MediaAvatar_default = MediaAvatar;
19330
21485
  /*! Bundled license information:
19331
21486
 
19332
21487
  use-sync-external-store/cjs/use-sync-external-store-shim.development.js:
@@ -19355,4 +21510,4 @@ decimal.js-light/decimal.js:
19355
21510
  (*! decimal.js-light v2.5.1 https://github.com/MikeMcl/decimal.js-light/LICENCE *)
19356
21511
  */
19357
21512
 
19358
- export { Accordion_default as Accordion, AccordionHeader_default as AccordionHeader, AccordionItem_default as AccordionItem, ActiveInActive_default as ActiveInActive, AnimatedCounter_default as AnimatedCounter, BreadCrumbs_default as BreadCrumbs, Button_default as Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ChartContainer, ChartStyle, ChartTooltip, ChartTooltipContent, CopyableText_default as CopyableText, DateInput_default as DateInput, DateRangeFilterInput_default as DateRangeFilterInput, DetailHeader_default as DetailHeader, DraggableIcon_default as DraggableIcon, ErrorBoundary_default as ErrorBoundary, ErrorFallback_default as ErrorFallback, ImageWithFallback_default as ImageWithFallback, InfoTextBanner_default as InfoTextBanner, ListHeader_default as ListHeader, Loading_default as Loading, NoData_default as NoData, NoImage_default as NoImage, NoImageSvg_default as NoImageSvg, PageHeader_default as PageHeader, Pagination_default as Pagination, Portal_default as Portal, SaveAndCancelButtons_default as SaveAndCancelButtons, SearchField_default as SearchField, TagList_default as TagList, TagListForm_default as TagListForm, Toggle_default as Toggle, ToolTip_default as ToolTip };
21513
+ export { Accordion_default as Accordion, AccordionHeader_default as AccordionHeader, AccordionItem_default as AccordionItem, ActiveInActive_default as ActiveInActive, AnimatedCounter_default as AnimatedCounter, BreadCrumbs_default as BreadCrumbs, Button_default as Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ChartContainer, ChartStyle, ChartTooltip, ChartTooltipContent, CopyableText_default as CopyableText, DateInput_default as DateInput, DateRangeFilterInput_default as DateRangeFilterInput, DetailHeader_default as DetailHeader, DraggableIcon_default as DraggableIcon, ErrorBoundary_default as ErrorBoundary, ErrorFallback_default as ErrorFallback, ImageWithFallback_default as ImageWithFallback, InfoTextBanner_default as InfoTextBanner, ListHeader_default as ListHeader, Loading_default as Loading, MediaAvatar_default as MediaAvatar, NoData_default as NoData, NoImage_default as NoImage, NoImageSvg_default as NoImageSvg, PageHeader_default as PageHeader, Pagination_default as Pagination, Portal_default as Portal, SaveAndCancelButtons_default as SaveAndCancelButtons, SearchField_default as SearchField, Table_default as Table, TagList_default as TagList, TagListForm_default as TagListForm, Toggle_default as Toggle, ToolTip_default as ToolTip };