@airporting/tech-app 0.0.127 → 0.0.129

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 (199) hide show
  1. package/dist/mf/1.js +1 -0
  2. package/dist/mf/1659.js +1 -0
  3. package/dist/mf/{1330.1484499663.js → 2014.js} +3 -3
  4. package/dist/mf/{3235.0c4841ef2f.js → 2436.js} +3 -3
  5. package/dist/mf/{3711.906c609c43.js → 2588.js} +3 -3
  6. package/dist/mf/2880.js +1 -0
  7. package/dist/mf/3080.js +1 -0
  8. package/dist/mf/3364.js +14 -0
  9. package/dist/mf/3429.js +33 -0
  10. package/dist/mf/3724.js +1 -0
  11. package/dist/mf/5178.js +1 -0
  12. package/dist/mf/{5616.daffd848ee.js → 5732.js} +3 -3
  13. package/dist/mf/5772.js +10 -0
  14. package/dist/mf/6110.js +18 -0
  15. package/dist/mf/6548.js +10 -0
  16. package/dist/mf/7364.js +1 -0
  17. package/dist/mf/7378.js +10 -0
  18. package/dist/mf/7380.js +1 -0
  19. package/dist/mf/7541.js +1 -0
  20. package/dist/mf/7832.js +10 -0
  21. package/dist/mf/7906.js +1 -0
  22. package/dist/mf/8119.js +1 -0
  23. package/dist/mf/9186.js +1 -0
  24. package/dist/mf/9260.js +1 -0
  25. package/dist/mf/{409.46a4910f4b.js → 9439.js} +3 -3
  26. package/dist/mf/9669.js +10 -0
  27. package/dist/mf/__federation_expose_amex.js +10 -0
  28. package/dist/mf/__federation_expose_bnpp.js +10 -0
  29. package/dist/mf/__federation_expose_credmut.js +10 -0
  30. package/dist/mf/__federation_expose_dashboard.js +1 -0
  31. package/dist/mf/__federation_expose_etat_saisie.js +1 -0
  32. package/dist/mf/__federation_expose_finance_jobs.js +1 -0
  33. package/dist/mf/__federation_expose_github.js +1 -0
  34. package/dist/mf/__federation_expose_mcp_access.js +1 -0
  35. package/dist/mf/__federation_expose_payfit.js +10 -0
  36. package/dist/mf/__federation_expose_pipeline.js +1 -0
  37. package/dist/mf/__federation_expose_sales.js +1 -0
  38. package/dist/mf/__federation_expose_scrapers.js +1 -0
  39. package/dist/mf/__federation_expose_spendesk.js +10 -0
  40. package/dist/mf/__federation_expose_spreadsheet.js +1 -0
  41. package/dist/mf/__federation_expose_synchro.js +1 -0
  42. package/dist/mf/__federation_expose_usage.js +1 -0
  43. package/dist/mf/__federation_expose_wise.js +10 -0
  44. package/dist/mf/{9698.7298203f5a.css → index.css} +77 -105
  45. package/dist/mf/index.js +30 -0
  46. package/dist/mf/mf-manifest.json +228 -263
  47. package/dist/mf/mf-stats.json +232 -285
  48. package/dist/mf/tech_app.js +5 -0
  49. package/package.json +6 -6
  50. package/dist/mf/1558.e66a54e73d.js +0 -1
  51. package/dist/mf/2338.94e69795ff.js +0 -1
  52. package/dist/mf/2538.1c194a4bcd.js +0 -1
  53. package/dist/mf/2717.8f7084b540.js +0 -10
  54. package/dist/mf/2717.8f7084b540.js.LICENSE.txt +0 -9
  55. package/dist/mf/3548.a2ac3faf5f.js +0 -1
  56. package/dist/mf/3887.b05f65635e.js +0 -33
  57. package/dist/mf/5098.4ad55bcb49.js +0 -10
  58. package/dist/mf/5098.4ad55bcb49.js.LICENSE.txt +0 -9
  59. package/dist/mf/5105.2a1806dc50.js +0 -1
  60. package/dist/mf/537.b7edba1af9.js +0 -14
  61. package/dist/mf/5429.f4bca5be4b.js +0 -1
  62. package/dist/mf/5564.042f491bc7.js +0 -1
  63. package/dist/mf/6237.60683e513e.js +0 -10
  64. package/dist/mf/6237.60683e513e.js.LICENSE.txt +0 -9
  65. package/dist/mf/668.a271d6c3a3.js +0 -1
  66. package/dist/mf/6755.d44651735b.js +0 -1
  67. package/dist/mf/690.0d77cae419.js +0 -1
  68. package/dist/mf/7486.84364f2d01.js +0 -10
  69. package/dist/mf/758.f1fe1bef41.js +0 -10
  70. package/dist/mf/7770.9beba1af8b.js +0 -1
  71. package/dist/mf/7883.45585213d9.js +0 -1
  72. package/dist/mf/8083.a86dc5cbbe.js +0 -1
  73. package/dist/mf/8473.91f080bae1.js +0 -10
  74. package/dist/mf/854.1a1d1ce0ec.js +0 -10
  75. package/dist/mf/8853.20c1b87755.js +0 -18
  76. package/dist/mf/8949.3f7e30e10c.js +0 -10
  77. package/dist/mf/9415.f2a6811f8c.js +0 -1
  78. package/dist/mf/9698.34be02ab76.js +0 -26
  79. package/dist/mf/__federation_expose_amex.9b5f7a13cf.js +0 -10
  80. package/dist/mf/__federation_expose_bnpp.9e26515b6b.js +0 -10
  81. package/dist/mf/__federation_expose_credmut.e8f19cfe8a.js +0 -10
  82. package/dist/mf/__federation_expose_dashboard.be190d6c02.js +0 -10
  83. package/dist/mf/__federation_expose_etat_saisie.645bdc16bc.js +0 -10
  84. package/dist/mf/__federation_expose_finance_jobs.944394079e.js +0 -1
  85. package/dist/mf/__federation_expose_github.707a6236f7.js +0 -10
  86. package/dist/mf/__federation_expose_mcp_access.82a422dded.js +0 -10
  87. package/dist/mf/__federation_expose_mcp_access.82a422dded.js.LICENSE.txt +0 -9
  88. package/dist/mf/__federation_expose_payfit.515eac3595.js +0 -10
  89. package/dist/mf/__federation_expose_payfit.515eac3595.js.LICENSE.txt +0 -9
  90. package/dist/mf/__federation_expose_pipeline.48dbe478c4.js +0 -10
  91. package/dist/mf/__federation_expose_pipeline.48dbe478c4.js.LICENSE.txt +0 -9
  92. package/dist/mf/__federation_expose_sales.dfbee2c4e2.js +0 -10
  93. package/dist/mf/__federation_expose_sales.dfbee2c4e2.js.LICENSE.txt +0 -9
  94. package/dist/mf/__federation_expose_scrapers.ec2bebbb38.js +0 -10
  95. package/dist/mf/__federation_expose_scrapers.ec2bebbb38.js.LICENSE.txt +0 -9
  96. package/dist/mf/__federation_expose_spendesk.f36a6189d1.js +0 -10
  97. package/dist/mf/__federation_expose_spendesk.f36a6189d1.js.LICENSE.txt +0 -9
  98. package/dist/mf/__federation_expose_spreadsheet.552786fca7.js +0 -1
  99. package/dist/mf/__federation_expose_synchro.090ad23824.js +0 -10
  100. package/dist/mf/__federation_expose_synchro.090ad23824.js.LICENSE.txt +0 -9
  101. package/dist/mf/__federation_expose_usage.be52f862ad.js +0 -10
  102. package/dist/mf/__federation_expose_usage.be52f862ad.js.LICENSE.txt +0 -9
  103. package/dist/mf/__federation_expose_wise.b31a4dcd88.js +0 -10
  104. package/dist/mf/__federation_expose_wise.b31a4dcd88.js.LICENSE.txt +0 -9
  105. package/dist/mf/index.118cfb08b9.js +0 -6
  106. package/dist/mf/index.71e639cd3c.css +0 -2
  107. package/dist/mf/tech_app.e57897e310.js +0 -6
  108. /package/dist/mf/{1330.1484499663.js.LICENSE.txt → 2014.js.LICENSE.txt} +0 -0
  109. /package/dist/mf/{3235.0c4841ef2f.js.LICENSE.txt → 2436.js.LICENSE.txt} +0 -0
  110. /package/dist/mf/{3711.906c609c43.js.LICENSE.txt → 2588.js.LICENSE.txt} +0 -0
  111. /package/dist/mf/{3887.b05f65635e.js.LICENSE.txt → 3429.js.LICENSE.txt} +0 -0
  112. /package/dist/mf/{5616.daffd848ee.js.LICENSE.txt → 5732.js.LICENSE.txt} +0 -0
  113. /package/dist/mf/{7486.84364f2d01.js.LICENSE.txt → 5772.js.LICENSE.txt} +0 -0
  114. /package/dist/mf/{8853.20c1b87755.js.LICENSE.txt → 6110.js.LICENSE.txt} +0 -0
  115. /package/dist/mf/{758.f1fe1bef41.js.LICENSE.txt → 6548.js.LICENSE.txt} +0 -0
  116. /package/dist/mf/{8473.91f080bae1.js.LICENSE.txt → 7378.js.LICENSE.txt} +0 -0
  117. /package/dist/mf/{854.1a1d1ce0ec.js.LICENSE.txt → 7832.js.LICENSE.txt} +0 -0
  118. /package/dist/mf/{409.46a4910f4b.js.LICENSE.txt → 9439.js.LICENSE.txt} +0 -0
  119. /package/dist/mf/{8949.3f7e30e10c.js.LICENSE.txt → 9669.js.LICENSE.txt} +0 -0
  120. /package/dist/mf/{__federation_expose_amex.9b5f7a13cf.js.LICENSE.txt → __federation_expose_amex.js.LICENSE.txt} +0 -0
  121. /package/dist/mf/{__federation_expose_bnpp.9e26515b6b.js.LICENSE.txt → __federation_expose_bnpp.js.LICENSE.txt} +0 -0
  122. /package/dist/mf/{__federation_expose_credmut.e8f19cfe8a.js.LICENSE.txt → __federation_expose_credmut.js.LICENSE.txt} +0 -0
  123. /package/dist/mf/{__federation_expose_dashboard.be190d6c02.js.LICENSE.txt → __federation_expose_payfit.js.LICENSE.txt} +0 -0
  124. /package/dist/mf/{__federation_expose_etat_saisie.645bdc16bc.js.LICENSE.txt → __federation_expose_spendesk.js.LICENSE.txt} +0 -0
  125. /package/dist/mf/{__federation_expose_github.707a6236f7.js.LICENSE.txt → __federation_expose_wise.js.LICENSE.txt} +0 -0
  126. /package/dist/mf/{9698.34be02ab76.js.LICENSE.txt → index.js.LICENSE.txt} +0 -0
  127. /package/dist/mf/static/font/{HostGrotesk-VariableFont_wght.5248a50f8f.ttf → HostGrotesk-VariableFont_wght.ttf} +0 -0
  128. /package/dist/mf/static/font/{IBMPlexSans-VariableFont_wdth,wght.b9dbc346df.ttf → IBMPlexSans-VariableFont_wdth,wght.ttf} +0 -0
  129. /package/dist/mf/static/svg/{ad.b565cad3b9.svg → ad.svg} +0 -0
  130. /package/dist/mf/static/svg/{af.c6050ccd88.svg → af.svg} +0 -0
  131. /package/dist/mf/static/svg/{arab.979580f271.svg → arab.svg} +0 -0
  132. /package/dist/mf/static/svg/{as.01647fade1.svg → as.svg} +0 -0
  133. /package/dist/mf/static/svg/{aw.38f249536e.svg → aw.svg} +0 -0
  134. /package/dist/mf/static/svg/{bm.a27098d2f0.svg → bm.svg} +0 -0
  135. /package/dist/mf/static/svg/{bn.c13ab93d4e.svg → bn.svg} +0 -0
  136. /package/dist/mf/static/svg/{bo.9eafaa771a.svg → bo.svg} +0 -0
  137. /package/dist/mf/static/svg/{br.67a6502fcc.svg → br.svg} +0 -0
  138. /package/dist/mf/static/svg/{bt.1a35bb5790.svg → bt.svg} +0 -0
  139. /package/dist/mf/static/svg/{bz.07b1393a39.svg → bz.svg} +0 -0
  140. /package/dist/mf/static/svg/{cy.239da48548.svg → cy.svg} +0 -0
  141. /package/dist/mf/static/svg/{dg.2de1a54797.svg → dg.svg} +0 -0
  142. /package/dist/mf/static/svg/{dm.c3205e29a5.svg → dm.svg} +0 -0
  143. /package/dist/mf/static/svg/{do.5dff1c5f2d.svg → do.svg} +0 -0
  144. /package/dist/mf/static/svg/{eac.8d4776f547.svg → eac.svg} +0 -0
  145. /package/dist/mf/static/svg/{ec.fe749fb472.svg → ec.svg} +0 -0
  146. /package/dist/mf/static/svg/{eg.047d5d7822.svg → eg.svg} +0 -0
  147. /package/dist/mf/static/svg/{es-ga.13ecfea239.svg → es-ga.svg} +0 -0
  148. /package/dist/mf/static/svg/{es.b74b736606.svg → es.svg} +0 -0
  149. /package/dist/mf/static/svg/{fj.a7cdc5d921.svg → fj.svg} +0 -0
  150. /package/dist/mf/static/svg/{fk.2fa702939b.svg → fk.svg} +0 -0
  151. /package/dist/mf/static/svg/{gb-nir.8ec547f4f5.svg → gb-nir.svg} +0 -0
  152. /package/dist/mf/static/svg/{gb-wls.1cf3d9cc10.svg → gb-wls.svg} +0 -0
  153. /package/dist/mf/static/svg/{gq.c572f675c8.svg → gq.svg} +0 -0
  154. /package/dist/mf/static/svg/{gs.fe3374bb83.svg → gs.svg} +0 -0
  155. /package/dist/mf/static/svg/{gt.097451fc17.svg → gt.svg} +0 -0
  156. /package/dist/mf/static/svg/{gu.b033e7a688.svg → gu.svg} +0 -0
  157. /package/dist/mf/static/svg/{hr.f0c84cca2a.svg → hr.svg} +0 -0
  158. /package/dist/mf/static/svg/{ht.9f91507754.svg → ht.svg} +0 -0
  159. /package/dist/mf/static/svg/{im.479ad3e9b6.svg → im.svg} +0 -0
  160. /package/dist/mf/static/svg/{io.fc7eebc158.svg → io.svg} +0 -0
  161. /package/dist/mf/static/svg/{ir.801fbb847c.svg → ir.svg} +0 -0
  162. /package/dist/mf/static/svg/{je.2b7a276f75.svg → je.svg} +0 -0
  163. /package/dist/mf/static/svg/{kg.994fed1d50.svg → kg.svg} +0 -0
  164. /package/dist/mf/static/svg/{kh.e67aa6fd5c.svg → kh.svg} +0 -0
  165. /package/dist/mf/static/svg/{ki.9e4e595c2f.svg → ki.svg} +0 -0
  166. /package/dist/mf/static/svg/{ky.c6d5a8d576.svg → ky.svg} +0 -0
  167. /package/dist/mf/static/svg/{kz.07b60b89d0.svg → kz.svg} +0 -0
  168. /package/dist/mf/static/svg/{li.5cded3252c.svg → li.svg} +0 -0
  169. /package/dist/mf/static/svg/{lk.23166e8c77.svg → lk.svg} +0 -0
  170. /package/dist/mf/static/svg/{md.dba4c7fc54.svg → md.svg} +0 -0
  171. /package/dist/mf/static/svg/{me.7e20b942ca.svg → me.svg} +0 -0
  172. /package/dist/mf/static/svg/{mp.8842d0ea8c.svg → mp.svg} +0 -0
  173. /package/dist/mf/static/svg/{ms.2e19586bd0.svg → ms.svg} +0 -0
  174. /package/dist/mf/static/svg/{mt.b8ab0ef5e2.svg → mt.svg} +0 -0
  175. /package/dist/mf/static/svg/{mx.bc25957663.svg → mx.svg} +0 -0
  176. /package/dist/mf/static/svg/{nf.407d2ab842.svg → nf.svg} +0 -0
  177. /package/dist/mf/static/svg/{ni.bf7fcea52d.svg → ni.svg} +0 -0
  178. /package/dist/mf/static/svg/{om.449f75b209.svg → om.svg} +0 -0
  179. /package/dist/mf/static/svg/{pn.b4e1ab6aa7.svg → pn.svg} +0 -0
  180. /package/dist/mf/static/svg/{pt.acd403c018.svg → pt.svg} +0 -0
  181. /package/dist/mf/static/svg/{py.6523d7909b.svg → py.svg} +0 -0
  182. /package/dist/mf/static/svg/{rs.0f45ed27ff.svg → rs.svg} +0 -0
  183. /package/dist/mf/static/svg/{sa.9a769000dc.svg → sa.svg} +0 -0
  184. /package/dist/mf/static/svg/{sh-ac.103f8fd9a6.svg → sh-ac.svg} +0 -0
  185. /package/dist/mf/static/svg/{sh-hl.664afc561d.svg → sh-hl.svg} +0 -0
  186. /package/dist/mf/static/svg/{sh-ta.9e06bc08e4.svg → sh-ta.svg} +0 -0
  187. /package/dist/mf/static/svg/{sm.9f3be35f44.svg → sm.svg} +0 -0
  188. /package/dist/mf/static/svg/{sv.4a7ef34153.svg → sv.svg} +0 -0
  189. /package/dist/mf/static/svg/{sx.ba3ea51fe1.svg → sx.svg} +0 -0
  190. /package/dist/mf/static/svg/{sz.61ba2742e1.svg → sz.svg} +0 -0
  191. /package/dist/mf/static/svg/{tc.1d40ce70d6.svg → tc.svg} +0 -0
  192. /package/dist/mf/static/svg/{tm.6a8ec56b96.svg → tm.svg} +0 -0
  193. /package/dist/mf/static/svg/{un.98053442eb.svg → un.svg} +0 -0
  194. /package/dist/mf/static/svg/{va.959875d92d.svg → va.svg} +0 -0
  195. /package/dist/mf/static/svg/{vg.56b7d72255.svg → vg.svg} +0 -0
  196. /package/dist/mf/static/svg/{vi.aaeab1462a.svg → vi.svg} +0 -0
  197. /package/dist/mf/static/svg/{xk.961776b909.svg → xk.svg} +0 -0
  198. /package/dist/mf/static/svg/{zm.ef3a9aef9f.svg → zm.svg} +0 -0
  199. /package/dist/mf/static/svg/{zw.3e71d5a4d2.svg → zw.svg} +0 -0
@@ -1 +0,0 @@
1
- "use strict";(globalThis["chunk_tech_app "]||=[]).push([[5429],{196(__unused_rspack___webpack_module__,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__);var react_jsx_runtime__rspack_import_0=__webpack_require__(4848);var _mantine_core__rspack_import_1=__webpack_require__(4618);var _mantine_charts__rspack_import_2=__webpack_require__(7194);var _mantine_hooks__rspack_import_3=__webpack_require__(1810);var date_fns__rspack_import_4=__webpack_require__(8680);var lodash_es__rspack_import_5=__webpack_require__(7403);var radash__rspack_import_6=__webpack_require__(5551);var react__rspack_import_7=__webpack_require__(814);var react__rspack_import_7_default=/*#__PURE__*/__webpack_require__.n(react__rspack_import_7);var _tabler_icons_react__rspack_import_8=__webpack_require__(2638);var _tanstack_react_query__rspack_import_9=__webpack_require__(3411);var react_i18next__rspack_import_10=__webpack_require__(1751);function Circle({style,size,...rest}){return/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)(_mantine_core__rspack_import_1.Paper,{radius:"50%",bg:"dark.4",w:size,h:size,style:{display:"flex",flexWrap:"wrap",justifyContent:"center",alignContent:"center",...style},...rest})}function IconArrowUp({color="currentColor",size=24,rotate=0,...props}){return/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)("svg",{width:size,height:size,fill:"none",xmlns:"http://www.w3.org/2000/svg",transform:`rotate(${rotate})`,...props,children:/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)("path",{d:"M9 13.5L12 10.5L15 13.5",stroke:color,strokeWidth:"1.5",strokeLinecap:"square",strokeLinejoin:"round"})})}function IconCalculator({color="currentColor",size=24,...props}){return/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsxs)("svg",{width:size,height:size,fill:"none",xmlns:"http://www.w3.org/2000/svg",...props,children:[/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)("rect",{x:"4",y:"2",width:"16",height:"19",rx:"1",stroke:color,strokeWidth:"1.5"}),/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)("rect",{x:"7",y:"6",width:"10",height:"4",fill:color}),/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)("rect",{x:"7.5",y:"12.5",width:"1",height:"1",stroke:color}),/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)("rect",{x:"11.5",y:"12.5",width:"1",height:"1",stroke:color}),/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)("rect",{x:"15.5",y:"12.5",width:"1",height:"5",stroke:color}),/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)("rect",{x:"11.5",y:"16.5",width:"1",height:"1",stroke:color}),/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)("rect",{x:"7.5",y:"16.5",width:"1",height:"1",stroke:color})]})}function IconCheck({color="currentColor",size=16,...props}){return/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)("svg",{width:size,height:size,fill:"none",stroke:color,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",...props,children:/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)("path",{d:"M13.3346 4L6.0013 11.3333L2.66797 8",strokeWidth:"1.25",strokeLinecap:"square",strokeLinejoin:"round"})})}function IconCoin({color="currentColor",size=24,...props}){return/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsxs)("svg",{width:size,height:size,fill:"none",xmlns:"http://www.w3.org/2000/svg",...props,children:[/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)("ellipse",{cx:"12.0004",cy:"9.72212",rx:"10.0004",ry:"3.33345",stroke:color,strokeWidth:"1.5"}),/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)("path",{d:"M12.0004 18.6119C9.94456 18.6119 8.03366 18.4051 6.4446 18.0505M12.0004 18.6119V13.0561M12.0004 18.6119C14.0561 18.6119 15.9671 18.4051 17.5561 18.0505M2 9.72266V15.2784C2 16.4342 3.76454 17.4525 6.4446 18.0505M22.0007 9.72266V15.2784C22.0007 16.4342 20.2362 17.4525 17.5561 18.0505M6.4446 11.945V18.0505M17.5561 12.5005L17.5561 18.0505",stroke:color,strokeWidth:"1.5"})]})}function IconConnector({color="currentColor",size=24,...props}){return/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsxs)("svg",{width:size,height:size,fill:"none",xmlns:"http://www.w3.org/2000/svg",...props,children:[/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)("g",{clipPath:"url(#clip0_2605_1876)",children:/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.3688 0.797175C19.6952 -0.195659 21.5754 0.0747827 22.5682 1.40122C23.5611 2.72767 23.2906 4.60781 21.9642 5.60064C20.9814 6.33624 19.6947 6.37837 18.6901 5.81135L13.2118 10.3012C13.7118 11.0797 14.0019 12.0059 14.0019 12.9999C14.0019 13.77 13.8278 14.4994 13.5168 15.151L16.0949 17.8695C17.2392 17.3161 18.6561 17.5353 19.5775 18.5069C20.7177 19.7091 20.6673 21.6079 19.4651 22.748C18.2629 23.8882 16.3641 23.8378 15.224 22.6356C14.348 21.712 14.1748 20.3771 14.6867 19.291L12.2915 16.7654C11.4123 17.5341 10.2615 17.9999 9.00189 17.9999C6.24046 17.9999 4.00189 15.7613 4.00189 12.9999C4.00189 11.5656 4.60582 10.2723 5.57327 9.36057L4.35098 6.87732C3.01379 7.07665 1.6641 6.34735 1.13207 5.03948C0.507758 3.50476 1.24579 1.7545 2.78052 1.13019C4.31525 0.50587 6.06551 1.24391 6.68982 2.77864C7.14163 3.8893 6.87995 5.11283 6.11916 5.94081L7.28211 8.30351C7.81835 8.10709 8.3976 7.99989 9.00189 7.99989C10.0434 7.99989 11.0105 8.31833 11.8112 8.86316L17.376 4.30245C16.8897 3.0748 17.2609 1.62646 18.3688 0.797175ZM9.00189 15.9999C10.6587 15.9999 12.0019 14.6567 12.0019 12.9999C12.0019 11.343 10.6587 9.99989 9.00189 9.99989C7.34503 9.99989 6.00189 11.343 6.00189 12.9999C6.00189 14.6567 7.34503 15.9999 9.00189 15.9999Z",fill:color})}),/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)("defs",{children:/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)("clipPath",{id:"clip0_2605_1876",children:/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)("rect",{width:"24",height:"24",fill:"white"})})})]})}function IconCross({color="currentColor",size=16,...props}){return/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)("svg",{width:size,height:size,fill:"none",stroke:color,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",...props,children:/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)("path",{d:"M4 4L12 12M12 4L4 12",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})})}function IconDashboard({color="currentColor",size=24,...props}){return/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsxs)("svg",{width:size,height:size,fill:"none",xmlns:"http://www.w3.org/2000/svg",...props,children:[/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)("path",{d:"M19 3H5C3.89543 3 3 3.89543 3 5V19C3 20.1046 3.89543 21 5 21H19C20.1046 21 21 20.1046 21 19V5C21 3.89543 20.1046 3 19 3Z",stroke:color,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)("path",{d:"M3 9H21",stroke:color,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)("path",{d:"M9 21V9",stroke:color,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}function IconDoubleLeft({color="currentColor",size=24,...props}){return/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsxs)("svg",{width:size,height:size,fill:"none",xmlns:"http://www.w3.org/2000/svg",...props,children:[/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)("path",{d:"M11 15L8 12L11 9",stroke:color,strokeWidth:"1.5",strokeLinecap:"square",strokeLinejoin:"round"}),/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)("path",{d:"M16 15L13 12L16 9",stroke:color,strokeWidth:"1.5",strokeLinecap:"square",strokeLinejoin:"round"})]})}function IconExternalLink({color="currentColor",size=24,...props}){return/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)("svg",{width:size,height:size,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...props,children:/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)("path",{d:"M10 9L15 9M15 9L15 14M15 9L9 15",stroke:color,strokeWidth:"1.5",strokeLinecap:"square",strokeLinejoin:"round"})})}function IconLogo(props){return/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)("svg",{width:"88",height:"19",fill:"none",xmlns:"http://www.w3.org/2000/svg",...props,children:/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)("path",{d:"M0.038 14L4.883 0.699999H7.904L12.768 14H9.956L5.852 2.144H6.935L2.831 14H0.038ZM2.28 11.017L2.983 8.946H9.823L10.526 11.017H2.28ZM13.4867 14V4.576H16.1467V14H13.4867ZM13.6007 3.075V0.604999H16.0707V3.075H13.6007ZM17.5131 14V4.576H20.1731V6.001C20.4264 5.53233 20.7431 5.165 21.1231 4.899C21.5031 4.62033 21.9338 4.481 22.4151 4.481H23.5741V6.837H22.1491C21.6804 6.837 21.3004 6.95733 21.0091 7.198C20.7178 7.43867 20.5024 7.79967 20.3631 8.281C20.2364 8.74967 20.1731 9.326 20.1731 10.01V14H17.5131ZM24.7874 18.18V4.576H27.4474V5.868C27.7514 5.46267 28.1441 5.108 28.6254 4.804C29.1194 4.5 29.7528 4.348 30.5254 4.348C31.3994 4.348 32.1848 4.56333 32.8814 4.994C33.5781 5.42467 34.1291 6.01367 34.5344 6.761C34.9398 7.50833 35.1424 8.357 35.1424 9.307C35.1424 10.2443 34.9398 11.0867 34.5344 11.834C34.1291 12.5813 33.5781 13.1703 32.8814 13.601C32.1848 14.019 31.3994 14.228 30.5254 14.228C29.8288 14.228 29.2208 14.1013 28.7014 13.848C28.1948 13.5947 27.7768 13.24 27.4474 12.784V18.18H24.7874ZM29.8984 11.91C30.3924 11.91 30.8294 11.796 31.2094 11.568C31.6021 11.34 31.9061 11.0297 32.1214 10.637C32.3368 10.2443 32.4444 9.801 32.4444 9.307C32.4444 8.80033 32.3368 8.35067 32.1214 7.958C31.9061 7.55267 31.6021 7.236 31.2094 7.008C30.8294 6.78 30.3924 6.666 29.8984 6.666C29.4044 6.666 28.9674 6.78 28.5874 7.008C28.2074 7.236 27.9098 7.54633 27.6944 7.939C27.4791 8.33167 27.3714 8.78133 27.3714 9.288C27.3714 9.79467 27.4791 10.2443 27.6944 10.637C27.9098 11.0297 28.2074 11.34 28.5874 11.568C28.9674 11.796 29.4044 11.91 29.8984 11.91ZM40.9671 14.228C40.0171 14.228 39.1558 14.019 38.3831 13.601C37.6231 13.183 37.0151 12.6003 36.5591 11.853C36.1158 11.1057 35.8941 10.2507 35.8941 9.288C35.8941 8.31267 36.1158 7.45767 36.5591 6.723C37.0151 5.97567 37.6295 5.393 38.4021 4.975C39.1748 4.557 40.0298 4.348 40.9671 4.348C41.9171 4.348 42.7721 4.557 43.5321 4.975C44.3048 5.393 44.9128 5.97567 45.3561 6.723C45.8121 7.45767 46.0401 8.31267 46.0401 9.288C46.0401 10.2507 45.8121 11.1057 45.3561 11.853C44.9128 12.6003 44.3048 13.183 43.5321 13.601C42.7721 14.019 41.9171 14.228 40.9671 14.228ZM40.9671 11.929C41.3978 11.929 41.7905 11.834 42.1451 11.644C42.4998 11.4413 42.7785 11.1437 42.9811 10.751C43.1965 10.3583 43.3041 9.87067 43.3041 9.288C43.3041 8.70533 43.1965 8.21767 42.9811 7.825C42.7658 7.43233 42.4808 7.141 42.1261 6.951C41.7841 6.74833 41.4041 6.647 40.9861 6.647C40.5555 6.647 40.1628 6.74833 39.8081 6.951C39.4535 7.141 39.1685 7.43233 38.9531 7.825C38.7378 8.205 38.6301 8.69267 38.6301 9.288C38.6301 9.87067 38.7315 10.3583 38.9341 10.751C39.1495 11.1437 39.4345 11.4413 39.7891 11.644C40.1438 11.834 40.5365 11.929 40.9671 11.929ZM47.1264 14V4.576H49.7864V6.001C50.0397 5.53233 50.3564 5.165 50.7364 4.899C51.1164 4.62033 51.547 4.481 52.0284 4.481H53.1874V6.837H51.7624C51.2937 6.837 50.9137 6.95733 50.6224 7.198C50.331 7.43867 50.1157 7.79967 49.9764 8.281C49.8497 8.74967 49.7864 9.326 49.7864 10.01V14H47.1264ZM58.3717 14C57.713 14 57.1557 13.924 56.6997 13.772C56.2564 13.62 55.9207 13.3287 55.6927 12.898C55.4647 12.4547 55.3507 11.8213 55.3507 10.998V6.799H53.7357V4.576H55.3507V1.992H58.0107V4.576H60.3287V6.799H58.0107V10.675C58.0107 10.9663 58.0424 11.188 58.1057 11.34C58.169 11.492 58.283 11.5997 58.4477 11.663C58.625 11.7137 58.8594 11.739 59.1507 11.739H60.2717V14H58.3717ZM61.1166 14V4.576H63.7766V14H61.1166ZM61.2306 3.075V0.604999H63.7006V3.075H61.2306ZM65.143 14V4.576H67.803V5.963C68.107 5.469 68.5187 5.07633 69.038 4.785C69.57 4.49367 70.1907 4.348 70.9 4.348C72.0907 4.348 73.0027 4.728 73.636 5.488C74.2693 6.23533 74.586 7.31833 74.586 8.737V14H71.926V8.984C71.926 8.21133 71.7677 7.62233 71.451 7.217C71.147 6.799 70.6593 6.59 69.988 6.59C69.3547 6.59 68.829 6.818 68.411 7.274C68.0057 7.71733 67.803 8.338 67.803 9.136V14H65.143ZM81.2614 18.408C80.4634 18.408 79.6907 18.275 78.9434 18.009C78.2087 17.7557 77.5817 17.344 77.0624 16.774C76.543 16.204 76.2327 15.463 76.1314 14.551H78.7724C78.8737 15.0323 79.146 15.4123 79.5894 15.691C80.0454 15.9697 80.5837 16.109 81.2044 16.109C81.6477 16.109 82.0594 16.014 82.4394 15.824C82.8194 15.6467 83.1234 15.368 83.3514 14.988C83.5794 14.6207 83.6934 14.1457 83.6934 13.563V12.423C83.5034 12.7143 83.2627 12.9803 82.9714 13.221C82.68 13.4617 82.3317 13.658 81.9264 13.81C81.5337 13.9493 81.0777 14.019 80.5584 14.019C79.659 14.019 78.8484 13.81 78.1264 13.392C77.417 12.9613 76.8534 12.3787 76.4354 11.644C76.03 10.9093 75.8274 10.086 75.8274 9.174C75.8274 8.262 76.03 7.445 76.4354 6.723C76.8534 5.98833 77.417 5.412 78.1264 4.994C78.8484 4.56333 79.659 4.348 80.5584 4.348C81.255 4.348 81.8694 4.48733 82.4014 4.766C82.946 5.04467 83.3767 5.393 83.6934 5.811V4.576H86.3534V13.411C86.3534 14.513 86.119 15.4313 85.6504 16.166C85.1817 16.9133 84.561 17.4707 83.7884 17.838C83.0157 18.218 82.1734 18.408 81.2614 18.408ZM81.1094 11.72C81.6287 11.72 82.0784 11.606 82.4584 11.378C82.8384 11.15 83.136 10.846 83.3514 10.466C83.5667 10.086 83.6744 9.66167 83.6744 9.193C83.6744 8.71167 83.5667 8.281 83.3514 7.901C83.136 7.521 82.8384 7.22333 82.4584 7.008C82.0784 6.78 81.6287 6.666 81.1094 6.666C80.6027 6.666 80.153 6.78 79.7604 7.008C79.3804 7.22333 79.0827 7.521 78.8674 7.901C78.652 8.26833 78.5444 8.69267 78.5444 9.174C78.5444 9.64267 78.652 10.0733 78.8674 10.466C79.0827 10.846 79.3804 11.15 79.7604 11.378C80.153 11.606 80.6027 11.72 81.1094 11.72Z",fill:"#F3F3F3"})})}function IconLogOut({color="currentColor",size=24,...props}){return/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsxs)("svg",{width:size,height:size,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...props,children:[/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)("path",{d:"M9 21H5C4.46957 21 3.96086 20.7893 3.58579 20.4142C3.21071 20.0391 3 19.5304 3 19V5C3 4.46957 3.21071 3.96086 3.58579 3.58579C3.96086 3.21071 4.46957 3 5 3H9",stroke:color,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)("path",{d:"M16 17L21 12L16 7",stroke:color,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)("path",{d:"M21 12H9",stroke:color,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}function IconRepeat({color="currentColor",size=24,...props}){return/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsxs)("svg",{width:size,height:size,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...props,children:[/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)("path",{d:"M15 1L20 5L15 9",stroke:color,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)("path",{d:"M4 11V9C4 7.93913 4.3746 6.92172 5.0414 6.17157C5.70819 5.42143 6.61256 5 7.55556 5H20",stroke:color,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)("path",{d:"M9 23L4 19L9 15",stroke:color,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)("path",{d:"M20 13V15C20 16.0609 19.6254 17.0783 18.9586 17.8284C18.2918 18.5786 17.3874 19 16.4444 19H4",stroke:color,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}function IconStar({color="currentColor",size=24,...props}){return/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsxs)("svg",{width:size,height:size,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...props,children:[/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)("path",{d:"M17.0178 1.76042C17.1521 1.26989 17.8479 1.26989 17.9822 1.76042L18.4798 3.57689C18.5237 3.73719 18.6444 3.86519 18.8019 3.91844L20.5994 4.52635C21.0525 4.67958 21.0525 5.32042 20.5994 5.47365L18.8019 6.08156C18.6444 6.13481 18.5237 6.26281 18.4798 6.42311L17.9822 8.23958C17.8479 8.73011 17.1521 8.73011 17.0178 8.23958L16.5202 6.42311C16.4763 6.26281 16.3556 6.13481 16.1981 6.08156L14.4006 5.47365C13.9475 5.32042 13.9475 4.67958 14.4006 4.52635L16.1981 3.91844C16.3556 3.86519 16.4763 3.73719 16.5202 3.57689L17.0178 1.76042Z",fill:color}),/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)("path",{d:"M9.83203 3.12891L11.7554 10.4793L18.332 12.6289L11.7554 14.7785L9.83203 22.1289L7.9087 14.7785L1.33203 12.6289L7.9087 10.4793L9.83203 3.12891Z",stroke:color,strokeWidth:"1.5",strokeLinejoin:"round"})]})}function AirButton({children,href,onClick,rightSection,...rest}){return/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)(_mantine_core__rspack_import_1.Button,{size:"md",justify:"start",styles:{label:{flex:1}},rightSection:/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsxs)(react_jsx_runtime__rspack_import_0.Fragment,{children:[rightSection,href&&/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)(Circle,{bg:"dark.4",size:24,ml:"auto",children:/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)(IconExternalLink,{})})]}),onClick:e=>{onClick?.(e);if(href)open(href,"_blank")},...rest,children:children})}const THEME_COLORS=["green","blue","yellow","pink","cyan","orange","grape","teal"];const COLORS_EMOJI={red:"🔴",orange:"🟠",yellow:"🟡",green:"🟢",blue:"🔵",purple:"🟣",brown:"🟤"};function formatDateLocale(date,opts){if(!date)return null;return(0,date_fns__rspack_import_4.intlFormat)(date,{month:"2-digit",day:"2-digit",year:"numeric",...opts},{locale:"fr"})}function getLocaleDateFormat(locale){const getPatternForPart=part=>{switch(part.type){case"day":return"d".repeat(part.value.length);case"month":return"M".repeat(part.value.length);case"year":return"y".repeat(part.value.length);case"literal":return part.value}};return new Intl.DateTimeFormat(locale).formatToParts(new Date("2022-01-02")).map(getPatternForPart).join("")}function isoday(date){if(!date)return null;if(date instanceof Date&&isNaN(date.getTime()))return null;return(0,date_fns__rspack_import_4.formatISO)(date,{representation:"date"})}function parseDateFr(date){return(0,date_fns__rspack_import_4.parse)(date,"dd/MM/yyyy",new Date)}function parseDateLocale(date){if(!date)return null;const res=(0,date_fns__rspack_import_4.parse)(date,getLocaleDateFormat("fr"),new Date);if(!(0,date_fns__rspack_import_4.isValid)(res))return null;return res}var _computedKey,_computedKey1;_computedKey=0,_computedKey1=1;class RxState extends Array{[_computedKey];[_computedKey1];constructor(value,dispatch){super();this[0]=value;this[1]=dispatch}get value(){return this[0]}get dispatch(){return this[1]}set value(value){this.dispatch(value)}}function useRxState(value){const state=(0,react__rspack_import_7.useState)(value);return new RxState(state[0],state[1])}function useRxStateDebounced(from,delay=300){const debounced=useRxState(from.value);const handler=(0,react__rspack_import_7.useRef)(null);(0,react__rspack_import_7.useEffect)(()=>{if(handler.current)clearTimeout(handler.current);handler.current=setTimeout(()=>{from.value=debounced.value},delay);return()=>{if(handler.current)clearTimeout(handler.current)}},[debounced.value,delay]);return debounced}function useRxStateOr(state,or){const fallbackValue=useRxState(or);const fallback=or instanceof RxState?or:fallbackValue;return state??fallback}function nbhy(){return String.fromCharCode(8209)}function formatCurrency(value,opts){const formatted=new Intl.NumberFormat(navigator.language,{style:"currency",currency:"eur",signDisplay:"exceptZero",...opts}).format(value);return formatted.replaceAll("-",nbhy())}function formatCurrencyCompact(value,opts){return formatCurrency(value,{maximumFractionDigits:Math.abs(Number(value))>1e6||Math.abs(Number(value))<1e4?2:Math.abs(Number(value))<1e5?1:0,notation:"compact",...opts})}function formatPercent(value,opts){const formatted=new Intl.NumberFormat(navigator.language,{style:"percent",signDisplay:"exceptZero",...opts}).format(value);return formatted.replaceAll("-",nbhy())}var zIndex_ZIndex=/*#__PURE__*/function(ZIndex){ZIndex[ZIndex["TableHeader"]=1]="TableHeader";ZIndex[ZIndex["TableScrollbar"]=2]="TableScrollbar";ZIndex[ZIndex["ChartTooltip"]=3]="ChartTooltip";ZIndex[ZIndex["Loader"]=9999]="Loader";return ZIndex}({});const BankAccountsChartTooltip=/*#__PURE__*/(0,react__rspack_import_7.forwardRef)((props,ref)=>{const{balance,accounts,detailed}=props;const themed=(0,_mantine_core__rspack_import_1.useMantineTheme)();const d=isoday(parseDateLocale(balance.date));return/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsxs)(_mantine_core__rspack_import_1.Paper,{p:"xs",withBorder:true,shadow:"md",radius:"md",style:{maxHeight:600,overflow:"auto",filter:"drop-shadow(0 0 2px rgba(0, 0, 0, 0.5))",backdropFilter:"blur(6px)"},ref:ref,bg:(0,_mantine_core__rspack_import_1.alpha)(themed.colors.dark[9],.3),children:[(0,date_fns__rspack_import_4.isAfter)(d,new Date)?/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)(_mantine_core__rspack_import_1.Text,{fz:10,c:"dimmed",children:"prévisionnel"}):null,/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsxs)(_mantine_core__rspack_import_1.Group,{justify:"space-between",gap:4,mb:10,align:"center",children:[/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)(_mantine_core__rspack_import_1.Text,{fz:14,fw:"bold",children:balance.date}),/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)(_mantine_core__rspack_import_1.Text,{fz:14,fw:"bolder",c:balance.accounts.total>=0?"green":"red",children:formatCurrencyCompact(balance.accounts.total)})]}),detailed?Object.entries(balance.accounts).filter(([accountId,amount])=>"total"!=accountId&&0!=amount).map(([accountId,amount],i)=>{const account=accounts[accountId];if(!account)return;return/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsxs)(_mantine_core__rspack_import_1.Group,{mb:5,align:"center",children:[/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)(Circle,{bg:themed.colors[THEME_COLORS[(i+1)%THEME_COLORS.length]][9],size:10}),/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)(_mantine_core__rspack_import_1.Text,{c:"dimmed",children:account.display_name}),/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)(_mantine_core__rspack_import_1.Text,{fz:12,ml:"auto",children:formatCurrencyCompact(amount)})]},accountId)}):null]})});function BankAccountsChart(props){const{hovered:hoveredProps,showIndividualBalances,showReferenceLines="hover",showToday,legend,detail,xAxisProps,accounts,...rest}=props;const theme=(0,_mantine_core__rspack_import_1.useMantineTheme)();const hovered=useRxStateDebounced(useRxStateOr(hoveredProps,null),200);const tooltipref=(0,react__rspack_import_7.useRef)(null);(0,_mantine_hooks__rspack_import_3.useWindowEvent)("wheel",e=>{if(!tooltipref.current)return;e.preventDefault();tooltipref.current.scrollBy(0,e.deltaY)},{passive:false});const data=(0,react__rspack_import_7.useMemo)(()=>{const all=[];for(const[name,data]of(0,lodash_es__rspack_import_5.entries)(accounts)){const d=data;for(const[day,balance]of Object.entries(d.balance)){const date=formatDateLocale(day);let existing=all.find(x=>x.date===date);if(!existing){existing={date,label:new Date(isoday(day)).getTime(),accounts:{total:0,unassigned:0}};all.push(existing)}existing.accounts[name]=balance.amount;if(!(0,date_fns__rspack_import_4.isBefore)(day,(0,date_fns__rspack_import_4.startOfDay)(new Date)))existing.accounts.total_future=existing.accounts.total;if(!(0,date_fns__rspack_import_4.isAfter)(day,new Date))existing.accounts.total_past=existing.accounts.total}}return all},[accounts]);const{low,high}=(0,react__rspack_import_7.useMemo)(()=>{const values=[...Object.values(data).map(x=>x.accounts.total)];let low=(0,radash__rspack_import_6.min)(values)??0;low=low>0?.9*low:1.1*low;let high=(0,radash__rspack_import_6.max)(values)??0;high=high>0?1.05*high:.9*high;return{low,high}},[data.length]);return(0,react__rspack_import_7.useMemo)(()=>/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)(_mantine_charts__rspack_import_2.AreaChart,{data:data,dataKey:"label",xAxisProps:{tickFormatter:value=>(0,date_fns__rspack_import_4.formatDate)(new Date(value),"dd/MM"),...xAxisProps},strokeWidth:2,dotProps:{r:0,strokeWidth:1},activeDotProps:{r:3,strokeWidth:1},withXAxis:"high"==detail,withYAxis:true,gridAxis:"x",yAxisProps:high&&low?{allowDataOverflow:true,domain:[low,high]}:void 0,series:showIndividualBalances?Object.values(accounts).filter(x=>"total"!=x.accountId).map(x=>({name:"accounts."+x.accountId,color:THEME_COLORS[Object.values(accounts).indexOf(x)%THEME_COLORS.length],label:x.display_name})):[{name:"accounts.total_past",color:theme.primaryColor,label:"Solde"},{name:"accounts.total_future",color:theme.primaryColor,label:"Solde",strokeDasharray:"3 5"}],connectNulls:false,withLegend:legend,legendProps:{verticalAlign:"bottom"},curveType:"bump",type:"stacked",referenceLines:(0,radash__rspack_import_6.sift)([false!==showToday&&{x:new Date(isoday(new Date)).getTime(),color:(0,_mantine_core__rspack_import_1.alpha)(theme.colors.blue[5],1),label:"auj."},...("hover"!=showReferenceLines||hovered.value)&&"never"!=showReferenceLines&&data.length?[...(0,date_fns__rspack_import_4.eachMonthOfInterval)({start:parseDateLocale(data[0].date),end:parseDateLocale(data[data.length-1].date)}).map(x=>({x:new Date(isoday(x)).getTime(),color:(0,_mantine_core__rspack_import_1.alpha)(theme.colors.gray[5],.3),label:(0,date_fns__rspack_import_4.formatDate)(x,"MMMM"),labelPosition:"top"}))]:[]]),withGradient:true,fillOpacity:.1,valueFormatter:value=>formatCurrency(value,{notation:"compact"}),tooltipAnimationDuration:100,tooltipProps:{wrapperStyle:{zIndex:zIndex_ZIndex.ChartTooltip},content:props=>{const balance=props.payload?.[0]?.payload??null;setTimeout(()=>hovered.value=balance,100);if(!balance)return null;return/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)(BankAccountsChartTooltip,{balance:balance,accounts:accounts,detailed:showIndividualBalances,ref:tooltipref})}},...rest}),[JSON.stringify(Object.keys(accounts)),showIndividualBalances,tooltipref,showReferenceLines,high,low,legend,detail])}function BlurSpot({pos="bottom"}){const theme=(0,_mantine_core__rspack_import_1.useMantineTheme)();const spotStyle=options=>({position:"fixed",width:options.width??"800px",height:options.height??"800px",top:options.top,left:options.left,right:options.right,bottom:options.bottom,background:options.background??`radial-gradient(circle, ${theme.colors[theme.primaryColor][9]}, ${theme.colors[theme.primaryColor][6]} 50%, ${theme.colors[theme.primaryColor][9]})`,filter:`blur(${options.blur||150}px)`,transform:`rotate(${options.rotation||0}deg)`,pointerEvents:"none",zIndex:-1,opacity:options.opacity??.3});return/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsxs)("div",{style:{position:"fixed",mixBlendMode:"screen"},children:["bottom"==pos&&/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)("div",{className:"blur-spot",style:spotStyle({width:"700px",bottom:"-50%",left:"-10%",rotation:20})}),"top"==pos&&/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)("div",{className:"blur-spot",style:spotStyle({width:"300px",top:"-50%",right:"15%",rotation:-20,opacity:.2})})]})}const Logo=/*#__PURE__*/(0,react__rspack_import_7.forwardRef)(({url,...rest},ref)=>{const theme=(0,_mantine_core__rspack_import_1.useMantineTheme)();return/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)(_mantine_core__rspack_import_1.Image,{ref:ref,src:url.includes("img.logo.dev")||url.includes("media.airporting")?url:getLogo(url),radius:12,fit:"contain",bd:`3px solid ${(0,_mantine_core__rspack_import_1.alpha)(theme.white,.11)}`,w:20,style:{aspectRatio:1},...rest})});Logo.displayName="Logo";const getLogo=url=>`https://img.logo.dev/${url}?token=pk_BVN4OQv0Qs-bnqjdIgTppg`;const CompanyLogo=/*#__PURE__*/(0,react__rspack_import_7.forwardRef)(({slug,...rest},ref)=>/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)(Logo,{ref:ref,url:`https://s3.dualstack.eu-west-3.amazonaws.com/media.airporting/companies/${slug}.png`,fallbackSrc:"https://s3.dualstack.eu-west-3.amazonaws.com/media.airporting/companies/undefined.png",...rest}));CompanyLogo.displayName="CompanyLogo";class HttpClient{baseUrl="";securityData=null;securityWorker;abortControllers=new Map;customFetch=(...fetchParams)=>fetch(...fetchParams);baseApiParams={credentials:"same-origin",headers:{},redirect:"follow",referrerPolicy:"no-referrer"};constructor(apiConfig={}){Object.assign(this,apiConfig)}setSecurityData=data=>{this.securityData=data};encodeQueryParam(key,value){const encodedKey=encodeURIComponent(key);return`${encodedKey}=${encodeURIComponent("number"==typeof value?value:`${value}`)}`}addQueryParam(query,key){return this.encodeQueryParam(key,query[key])}addArrayQueryParam(query,key){const value=query[key];return value.map(v=>this.encodeQueryParam(key,v)).join("&")}toQueryString(rawQuery){const query=rawQuery||{};const keys=Object.keys(query).filter(key=>void 0!==query[key]);return keys.map(key=>Array.isArray(query[key])?this.addArrayQueryParam(query,key):this.addQueryParam(query,key)).join("&")}addQueryParams(rawQuery){const queryString=this.toQueryString(rawQuery);return queryString?`?${queryString}`:""}contentFormatters={["application/json"]:input=>null!==input&&("object"==typeof input||"string"==typeof input)?JSON.stringify(input):input,["application/vnd.api+json"]:input=>null!==input&&("object"==typeof input||"string"==typeof input)?JSON.stringify(input):input,["text/plain"]:input=>null!==input&&"string"!=typeof input?JSON.stringify(input):input,["multipart/form-data"]:input=>Object.keys(input||{}).reduce((formData,key)=>{const property=input[key];formData.append(key,property instanceof Blob?property:"object"==typeof property&&null!==property?JSON.stringify(property):`${property}`);return formData},new FormData),["application/x-www-form-urlencoded"]:input=>this.toQueryString(input)};mergeRequestParams(params1,params2){return{...this.baseApiParams,...params1,...params2||{},headers:{...this.baseApiParams.headers||{},...params1.headers||{},...params2&&params2.headers||{}}}}createAbortSignal=cancelToken=>{if(this.abortControllers.has(cancelToken)){const abortController=this.abortControllers.get(cancelToken);if(abortController)return abortController.signal;return}const abortController=new AbortController;this.abortControllers.set(cancelToken,abortController);return abortController.signal};abortRequest=cancelToken=>{const abortController=this.abortControllers.get(cancelToken);if(abortController){abortController.abort();this.abortControllers.delete(cancelToken)}};request=async({body,secure,path,type,query,format,baseUrl,cancelToken,...params})=>{const secureParams=("boolean"==typeof secure?secure:this.baseApiParams.secure)&&this.securityWorker&&await this.securityWorker(this.securityData)||{};const requestParams=this.mergeRequestParams(params,secureParams);const queryString=query&&this.toQueryString(query);const payloadFormatter=this.contentFormatters[type||"application/json"];const responseFormat=format||requestParams.format;return this.customFetch(`${baseUrl||this.baseUrl||""}${path}${queryString?`?${queryString}`:""}`,{...requestParams,headers:{...requestParams.headers||{},...type&&"multipart/form-data"!==type?{"Content-Type":type}:{}},signal:(cancelToken?this.createAbortSignal(cancelToken):requestParams.signal)||null,body:null==body?null:payloadFormatter(body)}).then(async response=>{const r=response.clone();r.data=null;r.error=null;const data=responseFormat?await response[responseFormat]().then(data=>{if(r.ok)r.data=data;else r.error=data;return r}).catch(e=>{r.error=e;return r}):r;if(cancelToken)this.abortControllers.delete(cancelToken);if(!response.ok)throw data;return data})}}class AppApi{http;constructor(http){this.http=http}getHello=(params={})=>this.http.request({path:"/",method:"GET",format:"json",...params});users={getMeV1:(params={})=>this.http.request({path:"/v1/users/me",method:"GET",secure:true,format:"json",...params})};chart={getCashBalanceAccountsV1:(query,params={})=>this.http.request({path:"/v1/chart/cash_balance/accounts",method:"GET",query:query,format:"json",...params})};dashboard={getDashboardV1:(companyId,params={})=>this.http.request({path:`/v1/dashboard/${companyId}`,method:"GET",format:"json",...params})};auth={authCallbackCredentialsCreate:(data,params={})=>this.http.request({path:"/v1/auth/callback/credentials",method:"POST",body:data,type:"application/x-www-form-urlencoded",...params}),authCsrfList:(params={})=>this.http.request({path:"/v1/auth/csrf",method:"GET",format:"json",...params}),authSessionList:(params={})=>this.http.request({path:"/v1/auth/session",method:"GET",format:"json",...params}),authSignoutCreate:(data,params={})=>this.http.request({path:"/v1/auth/signout",method:"POST",body:data,type:"application/x-www-form-urlencoded",format:"json",...params})}}function useApi(){const client=new HttpClient({baseUrl:{MODE:"production",DEV:false,PROD:true,SSR:false,BASE_URL:"/",ASSET_PREFIX:"https://app.airporting.com/mf/tech-app/0.0.127"}.PUBLIC_APP_API_URL,baseApiParams:{headers:{},credentials:"include"}});return new AppApi(client)}function useGetUsersMeQuery(){const api=useApi();const query=(0,_tanstack_react_query__rspack_import_9.useQuery)({queryKey:["users","me"],queryFn:async()=>await api.users.getMeV1().then(x=>x.data)});return query}const Field=({prop,val})=>{if(!val)return null;return/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsxs)(_mantine_core__rspack_import_1.Group,{justify:"space-between",children:[/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsxs)(_mantine_core__rspack_import_1.Text,{c:"dimmed",children:[prop,":"]}),/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsxs)(_mantine_core__rspack_import_1.Text,{children:[" ",val]})]})};function SearchBox({children,values,selected,onChange,showDetails}){const[search,setSearch]=(0,react__rspack_import_7.useState)("");const[preview,setPreview]=(0,react__rspack_import_7.useState)(selected??null);const itemElems=react__rspack_import_7_default().useRef(new Map);const scrollarea=(0,react__rspack_import_7.useRef)(null);const[popopen,setPopopen]=(0,react__rspack_import_7.useState)(false);const theme=(0,_mantine_core__rspack_import_1.useMantineTheme)();const filtered=values.filter(item=>item.label.toLowerCase().includes(search.toLowerCase().trim()));const options=filtered.map(item=>/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)(_mantine_core__rspack_import_1.Button,{ref:ref=>{if(ref)itemElems.current.set(item.value,ref)},variant:selected===item.value?"filled":preview===item.value?"light":"subtle",color:selected===item.value?theme.colors[theme.primaryColor][9]:"gray",size:"xs",justify:"start",onClick:()=>{clickItem(item.value)},onMouseEnter:()=>setPreview(item.value),children:item.label},item.value));function clickItem(value){onChange?.(value);setPreview(value);setPopopen(false)}(0,react__rspack_import_7.useEffect)(()=>{setPreview(filtered[0]?.value)},[search]);(0,react__rspack_import_7.useEffect)(()=>{if(preview)focusItem(preview)},[preview]);(0,react__rspack_import_7.useEffect)(()=>{setTimeout(()=>{if(preview)focusItem(preview)},200)},[popopen]);(0,react__rspack_import_7.useEffect)(()=>{setPreview(selected??null)},[selected]);function focusItem(value){const item=itemElems.current.get(value);if(item&&scrollarea.current){if(item.offsetTop+item.offsetHeight>scrollarea.current.offsetHeight+scrollarea.current.scrollTop)scrollarea.current.scrollTo({top:item.offsetTop+item.offsetHeight-scrollarea.current.offsetHeight});if(item.offsetTop<scrollarea.current.scrollTop||item.offsetTop+item.offsetHeight>scrollarea.current.offsetHeight+scrollarea.current.scrollTop)scrollarea.current.scrollTo({top:item.offsetTop})}}const content=/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsxs)(_mantine_core__rspack_import_1.Group,{align:"flex-start",wrap:"nowrap",children:[/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsxs)(_mantine_core__rspack_import_1.Stack,{children:[/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)(_mantine_core__rspack_import_1.TextInput,{value:search,onChange:event=>setSearch(event.currentTarget.value),placeholder:"Rechercher",autoFocus:true,onKeyDown:(0,_mantine_hooks__rspack_import_3.getHotkeyHandler)([["enter",()=>preview&&clickItem(preview)],["escape",()=>setSearch("")],["arrowUp",()=>setPreview(filtered[filtered.findIndex(x=>x.value===preview)-1]?.value)],["arrowDown",()=>setPreview(filtered[filtered.findIndex(x=>x.value===preview)+1]?.value)]])}),/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsxs)(_mantine_core__rspack_import_1.ScrollArea,{h:300,scrollbars:"y",type:"auto",viewportRef:scrollarea,children:[/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)(_mantine_core__rspack_import_1.Stack,{gap:0,children:options}),0===filtered.length&&/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)(_mantine_core__rspack_import_1.Text,{c:"dimmed",flex:1,ta:"center",children:"Aucun resultat"})]})]}),preview&&showDetails&&/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsxs)(react_jsx_runtime__rspack_import_0.Fragment,{children:[/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)(_mantine_core__rspack_import_1.Divider,{orientation:"vertical"}),showDetails(preview)]})]});if(!children)return content;return/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsxs)(_mantine_core__rspack_import_1.Popover,{opened:popopen,onChange:setPopopen,children:[/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)(_mantine_core__rspack_import_1.Popover.Target,{children:/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)("div",{onClick:()=>setPopopen(true),children:children})}),/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)(_mantine_core__rspack_import_1.Popover.Dropdown,{children:content})]})}function CompanySelector({children,selected,onChange}){const me=useGetUsersMeQuery();return/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)(SearchBox,{values:me.data?.companies.map(c=>({label:c.display_name,value:c.id.toString()}))??[],selected:selected,onChange:onChange,showDetails:x=>{const comp=me.data?.companies.find(c=>c.id.toString()===x);return/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsxs)(_mantine_core__rspack_import_1.Stack,{gap:4,children:[/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)(CompanyLogo,{slug:comp?.slug,w:48,mb:"md"}),/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)(Field,{prop:"Nom",val:comp?.display_name}),/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)(Field,{prop:"SIREN",val:comp?.siren_number}),/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)(Field,{prop:"Dirigeant",val:comp?.leader}),/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)(Field,{prop:"Adresse",val:comp?.address})]})},children:children??/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)(_mantine_core__rspack_import_1.Button,{flex:1,size:"md",variant:"subtle",color:"gray",leftSection:/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)(_tabler_icons_react__rspack_import_8.IconRepeat,{}),justify:"start",children:"Changer d'entreprise"})})}function IconMore({color="currentColor",size=24,...props}){return/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsxs)("svg",{width:size,height:size,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...props,children:[/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)("circle",{cx:"17.168",cy:"7.5",r:"1.5",fill:color}),/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)("circle",{cx:"17.168",cy:"12.5",r:"1.5",fill:color}),/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)("circle",{cx:"17.168",cy:"17.5",r:"1.5",fill:color})]})}function IconTrendingUp({color="currentColor",size=24,transform,...props}){return/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsxs)("svg",{width:size,height:size,viewBox:"0 0 24 24",fill:"none",style:{transform},xmlns:"http://www.w3.org/2000/svg",...props,children:[/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)("path",{d:"M23 6L13.5 15.5L8.5 10.5L1 18",stroke:color,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)("path",{d:"M17 6H23V12",stroke:color,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}function KPICard({children,title,subtitle,topSection,trend,menu,...rest}){const theme=(0,_mantine_core__rspack_import_1.useMantineTheme)();return/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)(_mantine_core__rspack_import_1.Card,{bg:"dark.4",miw:260,p:"sm",...rest,children:/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsxs)(_mantine_core__rspack_import_1.Stack,{gap:12,children:[/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsxs)(_mantine_core__rspack_import_1.Group,{justify:"space-between",align:"start",children:[/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsxs)(_mantine_core__rspack_import_1.Stack,{children:[title&&/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)(_mantine_core__rspack_import_1.Title,{order:4,children:title}),topSection]}),/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)(KPICardMenu,{parameters:menu?.parameters,children:/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)(IconMore,{color:theme.colors.gray[7],cursor:"pointer"})})]}),/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)(_mantine_core__rspack_import_1.Divider,{}),/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsxs)(_mantine_core__rspack_import_1.Group,{justify:"space-between",children:[/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsxs)(_mantine_core__rspack_import_1.Stack,{gap:6,flex:1,children:[trend&&/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)(IconTrendingUp,{transform:"down"==trend?"scaleY(-1)":void 0}),subtitle&&/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)(_mantine_core__rspack_import_1.Text,{fw:500,fz:16,c:theme.primaryColor,children:subtitle}),children]}),/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)(_tabler_icons_react__rspack_import_8.IconHelpCircle,{color:theme.colors.dark[0],style:{alignSelf:"flex-end"}})]})]})})}function KPICardMenu({parameters,children}){return/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsxs)(_mantine_core__rspack_import_1.Menu,{shadow:"md",width:200,children:[/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)(_mantine_core__rspack_import_1.Menu.Target,{children:children}),/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsxs)(_mantine_core__rspack_import_1.Menu.Dropdown,{children:[parameters&&/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsxs)(react_jsx_runtime__rspack_import_0.Fragment,{children:[/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)(_mantine_core__rspack_import_1.Menu.Label,{children:"Paramètres"}),parameters,/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)(_mantine_core__rspack_import_1.Menu.Divider,{})]}),/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)(_mantine_core__rspack_import_1.Menu.Label,{children:"Organisation"}),/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsxs)(_mantine_core__rspack_import_1.Menu.Sub,{children:[/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)(_mantine_core__rspack_import_1.Menu.Sub.Target,{children:/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)(_mantine_core__rspack_import_1.Menu.Sub.Item,{leftSection:/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)(_tabler_icons_react__rspack_import_8.IconArrowsMove,{size:14}),children:"Déplacer"})}),/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsxs)(_mantine_core__rspack_import_1.Menu.Sub.Dropdown,{children:[/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)(_mantine_core__rspack_import_1.Menu.Item,{leftSection:/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)(_tabler_icons_react__rspack_import_8.IconArrowBarLeft,{size:14}),children:"Gauche"}),/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)(_mantine_core__rspack_import_1.Menu.Item,{leftSection:/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)(_tabler_icons_react__rspack_import_8.IconArrowBarRight,{size:14}),children:"Droite"})]})]}),/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)(_mantine_core__rspack_import_1.Menu.Item,{color:"red",leftSection:/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)(_tabler_icons_react__rspack_import_8.IconTrash,{size:14}),children:"Supprimer ce KPI"})]})]})}function KPICardBankAccountsChart({accounts,...rest}){const detailed=useRxState(false);return/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)(KPICard,{title:"Cash position (k€)",w:"100%",menu:{parameters:[/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)(_mantine_core__rspack_import_1.Menu.Item,{children:/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)(_mantine_core__rspack_import_1.Checkbox,{label:"Détails par compte",checked:detailed.value,onChange:x=>detailed.value=x.target.checked})})]},...rest,children:accounts?/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)(BankAccountsChart,{showIndividualBalances:detailed.value,h:200,accounts:accounts,detail:"high",showToday:false,showReferenceLines:"never",xAxisProps:{ticks:(0,date_fns__rspack_import_4.eachMonthOfInterval)({start:(0,date_fns__rspack_import_4.subMonths)(new Date,6),end:new Date}).map(d=>new Date(isoday(d)).getTime()),tickFormatter:v=>{v=new Date(v);return(0,date_fns__rspack_import_4.intlFormat)(v,{month:"short"},{locale:"fr"})}}}):/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)(_mantine_core__rspack_import_1.Skeleton,{h:200,w:"100%"})})}const languages={en:{label:"English",flag:"us"},fr:{label:"Français",flag:"fr"},es:{label:"Español",flag:"es"}};const flag=lang=>/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)("span",{className:`fi fi-${languages[lang].flag}`});function LanguageSwitcher(props){const{i18n}=(0,react_i18next__rspack_import_10.useTranslation)();const lang=i18n.language;return/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)(_mantine_core__rspack_import_1.Group,{...props,children:/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsxs)(_mantine_core__rspack_import_1.Menu,{shadow:"md",width:180,children:[/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)(_mantine_core__rspack_import_1.Menu.Target,{children:/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)(_mantine_core__rspack_import_1.Button,{variant:"default",children:/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsxs)(_mantine_core__rspack_import_1.Group,{gap:"xs",children:[flag(lang)," ",lang.toUpperCase()]})})}),/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)(_mantine_core__rspack_import_1.Menu.Dropdown,{children:(0,radash__rspack_import_6.listify)(languages,(key,{label})=>/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)(_mantine_core__rspack_import_1.Menu.Item,{onClick:()=>i18n.changeLanguage(key),disabled:lang===key,children:/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsxs)(_mantine_core__rspack_import_1.Group,{children:[flag(key)," ",label]})},key))})]})})}function PillTrend({children,trend,...rest}){const theme=(0,_mantine_core__rspack_import_1.useMantineTheme)();return/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)(_mantine_core__rspack_import_1.Pill,{bg:(0,_mantine_core__rspack_import_1.alpha)(theme.colors["up"==trend?"teal":"red"][6],.3),...rest,children:/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsxs)(_mantine_core__rspack_import_1.Group,{gap:4,wrap:"nowrap",align:"center",children:["up"==trend?/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)(_tabler_icons_react__rspack_import_8.IconArrowBigUpFilled,{size:10,color:theme.colors.teal[2]}):/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)(_tabler_icons_react__rspack_import_8.IconArrowBigDownFilled,{size:10,color:theme.colors.red[5]}),children]})})}const theme_theme=(0,_mantine_core__rspack_import_1.createTheme)({primaryColor:"teal",fontFamily:"Host Grotesk",headings:{sizes:{h1:{fontSize:"28px",fontWeight:"500"},h2:{fontSize:"22px",fontWeight:"500"},h3:{fontSize:"18px",fontWeight:"500"},h4:{fontSize:"16px",fontWeight:"500"},h5:{fontSize:"14px",fontWeight:"500"},h6:{fontSize:"12px",fontWeight:"500"}}},fontSizes:{lg:"16px",md:"14px",sm:"12px",xs:"10px"},colors:{dark:["#a4a4a4",(0,_mantine_core__rspack_import_1.alpha)("var(--mantine-color-white)",.2),(0,_mantine_core__rspack_import_1.alpha)("var(--mantine-color-white)",.15),(0,_mantine_core__rspack_import_1.alpha)("var(--mantine-color-white)",.1),(0,_mantine_core__rspack_import_1.alpha)("var(--mantine-color-white)",.05),"#474747","#363636","#282828","#1e1e1e","#121212"]},components:{Button:_mantine_core__rspack_import_1.Button.extend({styles:(_theme,props)=>({root:{border:"filled"!=props.variant&&props.variant?void 0:"none"},label:{fontWeight:"500"}})}),Checkbox:_mantine_core__rspack_import_1.Checkbox.extend({styles:{input:{border:"none"}},defaultProps:{icon:props=>/*#__PURE__*/(0,react_jsx_runtime__rspack_import_0.jsx)(IconCheck,{...props})}}),TextInput:_mantine_core__rspack_import_1.TextInput.extend({styles:{label:{marginBottom:"8px"}}}),PasswordInput:_mantine_core__rspack_import_1.PasswordInput.extend({styles:{label:{marginBottom:"8px"}}}),Input:_mantine_core__rspack_import_1.Input.extend({styles:{input:{borderRadius:"10px",backgroundColor:"var(--mantine-color-body)"}}}),MenuDropdown:_mantine_core__rspack_import_1.MenuDropdown.extend({defaultProps:{bg:"var(--mantine-color-dark-7)"}}),Popover:_mantine_core__rspack_import_1.Popover.extend({defaultProps:{radius:"8px"},styles:{dropdown:{background:"var(--mantine-color-dark-7)",borderColor:"var(--mantine-color-dark-1)"}}}),Divider:_mantine_core__rspack_import_1.Divider.extend({defaultProps:{color:(0,_mantine_core__rspack_import_1.alpha)("var(--mantine-color-white)",.1)}}),Badge:_mantine_core__rspack_import_1.Badge.extend({styles:{root:{borderRadius:"4px",fontWeight:"400",fontFamily:"IBM Plex Sans"}}}),Modal:_mantine_core__rspack_import_1.Modal.extend({styles:{content:{borderRadius:10,backgroundColor:"var(--mantine-color-dark-9)"},header:{backgroundColor:"var(--mantine-color-dark-9)"}}}),Drawer:_mantine_core__rspack_import_1.Drawer.extend({styles:{content:{backgroundColor:"var(--mantine-color-dark-9)"},header:{backgroundColor:"var(--mantine-color-dark-9)"}}}),Paper:_mantine_core__rspack_import_1.Paper.extend({styles:{root:{backgroundColor:"var(--mantine-color-dark-8)"}}})}});const cssVarResolver=theme=>({variables:{},light:{"--mantine-color-text":"var(--mantine-color-black)"},dark:{"--mantine-radius-default":"10px","--checkbox-radius":"4px","--mantine-color-text":"var(--mantine-color-white)","--mantine-color-body":"#090909","--mantine-color-placeholder":"var(--mantine-color-dark-0)","--mantine-color-dimmed":"var(--mantine-color-dark-0)","--button-bg":`linear-gradient(90deg, ${(0,_mantine_core__rspack_import_1.darken)(theme.colors[theme.primaryColor][9],.3)} -10%, ${theme.colors[theme.primaryColor][8]} 100%)`,"--mantine-color-default":"var(--mantine-color-dark-3)","--mantine-color-default-border":"var(--mantine-color-dark-2)","--mantine-color-default-hover":"var(--mantine-color-dark-2)"}});__webpack_require__.d(__webpack_exports__,{AirButton:()=>AirButton,BankAccountsChart:()=>BankAccountsChart,BlurSpot:()=>BlurSpot,Circle:()=>Circle,CompanySelector:()=>CompanySelector,IconArrowUp:()=>IconArrowUp,IconCalculator:()=>IconCalculator,IconCheck:()=>IconCheck,IconCoin:()=>IconCoin,IconConnector:()=>IconConnector,IconCross:()=>IconCross,IconDashboard:()=>IconDashboard,IconDoubleLeft:()=>IconDoubleLeft,IconExternalLink:()=>IconExternalLink,IconLogOut:()=>IconLogOut,IconLogo:()=>IconLogo,IconRepeat:()=>IconRepeat,IconStar:()=>IconStar,KPICard:()=>KPICard,KPICardBankAccountsChart:()=>KPICardBankAccountsChart,LanguageSwitcher:()=>LanguageSwitcher,PillTrend:()=>PillTrend,RxState:()=>RxState,SearchBox:()=>SearchBox,ZIndex:()=>zIndex_ZIndex,formatCurrency:()=>formatCurrency,formatCurrencyCompact:()=>formatCurrencyCompact,formatDateLocale:()=>formatDateLocale,formatPercent:()=>formatPercent,getLocaleDateFormat:()=>getLocaleDateFormat,isoday:()=>isoday,nbhy:()=>nbhy,parseDateFr:()=>parseDateFr,parseDateLocale:()=>parseDateLocale,useRxState:()=>useRxState,useRxStateDebounced:()=>useRxStateDebounced,useRxStateOr:()=>useRxStateOr},{BankAccountsChartTooltip:BankAccountsChartTooltip,COLORS_EMOJI:COLORS_EMOJI,CompanyLogo:CompanyLogo,Field:Field,Logo:Logo,THEME_COLORS:THEME_COLORS,cssVarResolver:cssVarResolver,theme:theme_theme})}}]);
@@ -1 +0,0 @@
1
- "use strict";(globalThis["chunk_tech_app "]||=[]).push([[5564],{9799(__unused_rspack___webpack_module__,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__);__webpack_require__.d(__webpack_exports__,{add:()=>add,addBusinessDays:()=>addBusinessDays,addDays:()=>addDays,addHours:()=>addHours,addISOWeekYears:()=>addISOWeekYears,addMilliseconds:()=>addMilliseconds,addMinutes:()=>addMinutes,addMonths:()=>addMonths,addQuarters:()=>addQuarters,addSeconds:()=>addSeconds,addWeeks:()=>addWeeks,addYears:()=>addYears,areIntervalsOverlapping:()=>areIntervalsOverlapping,clamp:()=>clamp,closestIndexTo:()=>closestIndexTo,closestTo:()=>closestTo,compareAsc:()=>compareAsc,compareDesc:()=>compareDesc,constructFrom:()=>constructFrom,constructNow:()=>constructNow,daysToWeeks:()=>daysToWeeks,differenceInBusinessDays:()=>differenceInBusinessDays,differenceInCalendarDays:()=>differenceInCalendarDays,differenceInCalendarISOWeekYears:()=>differenceInCalendarISOWeekYears,differenceInCalendarISOWeeks:()=>differenceInCalendarISOWeeks,differenceInCalendarMonths:()=>differenceInCalendarMonths,differenceInCalendarQuarters:()=>differenceInCalendarQuarters,differenceInCalendarWeeks:()=>differenceInCalendarWeeks,differenceInCalendarYears:()=>differenceInCalendarYears,differenceInDays:()=>differenceInDays,differenceInHours:()=>differenceInHours,differenceInISOWeekYears:()=>differenceInISOWeekYears,differenceInMilliseconds:()=>differenceInMilliseconds,differenceInMinutes:()=>differenceInMinutes,differenceInMonths:()=>differenceInMonths,differenceInQuarters:()=>differenceInQuarters,differenceInSeconds:()=>differenceInSeconds,differenceInWeeks:()=>differenceInWeeks,differenceInYears:()=>differenceInYears,eachDayOfInterval:()=>eachDayOfInterval,eachHourOfInterval:()=>eachHourOfInterval,eachMinuteOfInterval:()=>eachMinuteOfInterval,eachMonthOfInterval:()=>eachMonthOfInterval,eachQuarterOfInterval:()=>eachQuarterOfInterval,eachWeekOfInterval:()=>eachWeekOfInterval,eachWeekendOfInterval:()=>eachWeekendOfInterval,eachWeekendOfMonth:()=>eachWeekendOfMonth,eachWeekendOfYear:()=>eachWeekendOfYear,eachYearOfInterval:()=>eachYearOfInterval,endOfDay:()=>endOfDay,endOfDecade:()=>endOfDecade,endOfHour:()=>endOfHour,endOfISOWeek:()=>endOfISOWeek,endOfISOWeekYear:()=>endOfISOWeekYear,endOfMinute:()=>endOfMinute,endOfMonth:()=>endOfMonth,endOfQuarter:()=>endOfQuarter,endOfSecond:()=>endOfSecond,endOfToday:()=>endOfToday,endOfTomorrow:()=>endOfTomorrow,endOfWeek:()=>endOfWeek,endOfYear:()=>endOfYear,endOfYesterday:()=>endOfYesterday,format:()=>format_format,formatDate:()=>format_format,formatDistance:()=>formatDistance_formatDistance,formatDistanceStrict:()=>formatDistanceStrict,formatDistanceToNow:()=>formatDistanceToNow,formatDistanceToNowStrict:()=>formatDistanceToNowStrict,formatDuration:()=>formatDuration,formatISO:()=>formatISO,formatISO9075:()=>formatISO9075,formatISODuration:()=>formatISODuration,formatRFC3339:()=>formatRFC3339,formatRFC7231:()=>formatRFC7231,formatRelative:()=>formatRelative_formatRelative,formatters:()=>formatters,fromUnixTime:()=>fromUnixTime,getDate:()=>getDate,getDay:()=>getDay,getDayOfYear:()=>getDayOfYear,getDaysInMonth:()=>getDaysInMonth,getDaysInYear:()=>getDaysInYear,getDecade:()=>getDecade,getDefaultOptions:()=>getDefaultOptions_getDefaultOptions,getHours:()=>getHours,getISODay:()=>getISODay,getISOWeek:()=>getISOWeek,getISOWeekYear:()=>getISOWeekYear,getISOWeeksInYear:()=>getISOWeeksInYear,getMilliseconds:()=>getMilliseconds,getMinutes:()=>getMinutes,getMonth:()=>getMonth,getOverlappingDaysInIntervals:()=>getOverlappingDaysInIntervals,getQuarter:()=>getQuarter,getSeconds:()=>getSeconds,getTime:()=>getTime,getUnixTime:()=>getUnixTime,getWeek:()=>getWeek,getWeekOfMonth:()=>getWeekOfMonth,getWeekYear:()=>getWeekYear,getWeeksInMonth:()=>getWeeksInMonth,getYear:()=>getYear,hoursToMilliseconds:()=>hoursToMilliseconds,hoursToMinutes:()=>hoursToMinutes,hoursToSeconds:()=>hoursToSeconds,interval:()=>interval_interval,intervalToDuration:()=>intervalToDuration,intlFormat:()=>intlFormat,intlFormatDistance:()=>intlFormatDistance,isAfter:()=>isAfter,isBefore:()=>isBefore,isDate:()=>isDate,isEqual:()=>isEqual,isExists:()=>isExists,isFirstDayOfMonth:()=>isFirstDayOfMonth,isFriday:()=>isFriday,isFuture:()=>isFuture,isLastDayOfMonth:()=>isLastDayOfMonth,isLeapYear:()=>isLeapYear_isLeapYear,isMatch:()=>isMatch,isMonday:()=>isMonday,isPast:()=>isPast,isSameDay:()=>isSameDay,isSameHour:()=>isSameHour,isSameISOWeek:()=>isSameISOWeek,isSameISOWeekYear:()=>isSameISOWeekYear,isSameMinute:()=>isSameMinute,isSameMonth:()=>isSameMonth,isSameQuarter:()=>isSameQuarter,isSameSecond:()=>isSameSecond,isSameWeek:()=>isSameWeek,isSameYear:()=>isSameYear,isSaturday:()=>isSaturday,isSunday:()=>isSunday,isThisHour:()=>isThisHour,isThisISOWeek:()=>isThisISOWeek,isThisMinute:()=>isThisMinute,isThisMonth:()=>isThisMonth,isThisQuarter:()=>isThisQuarter,isThisSecond:()=>isThisSecond,isThisWeek:()=>isThisWeek,isThisYear:()=>isThisYear,isThursday:()=>isThursday,isToday:()=>isToday,isTomorrow:()=>isTomorrow,isTuesday:()=>isTuesday,isValid:()=>isValid,isWednesday:()=>isWednesday,isWeekend:()=>isWeekend,isWithinInterval:()=>isWithinInterval,isYesterday:()=>isYesterday,lastDayOfDecade:()=>lastDayOfDecade,lastDayOfISOWeek:()=>lastDayOfISOWeek,lastDayOfISOWeekYear:()=>lastDayOfISOWeekYear,lastDayOfMonth:()=>lastDayOfMonth_lastDayOfMonth,lastDayOfQuarter:()=>lastDayOfQuarter,lastDayOfWeek:()=>lastDayOfWeek,lastDayOfYear:()=>lastDayOfYear,lightFormat:()=>lightFormat,lightFormatters:()=>lightFormatters,longFormatters:()=>longFormatters,max:()=>max,milliseconds:()=>milliseconds_milliseconds,millisecondsToHours:()=>millisecondsToHours,millisecondsToMinutes:()=>millisecondsToMinutes,millisecondsToSeconds:()=>millisecondsToSeconds,min:()=>min,minutesToHours:()=>minutesToHours,minutesToMilliseconds:()=>minutesToMilliseconds,minutesToSeconds:()=>minutesToSeconds,monthsToQuarters:()=>monthsToQuarters,monthsToYears:()=>monthsToYears,nextDay:()=>nextDay,nextFriday:()=>nextFriday,nextMonday:()=>nextMonday,nextSaturday:()=>nextSaturday,nextSunday:()=>nextSunday,nextThursday:()=>nextThursday,nextTuesday:()=>nextTuesday,nextWednesday:()=>nextWednesday,parse:()=>parse,parseISO:()=>parseISO,parseJSON:()=>parseJSON,parsers:()=>parsers,previousDay:()=>previousDay,previousFriday:()=>previousFriday,previousMonday:()=>previousMonday,previousSaturday:()=>previousSaturday,previousSunday:()=>previousSunday,previousThursday:()=>previousThursday,previousTuesday:()=>previousTuesday,previousWednesday:()=>previousWednesday,quartersToMonths:()=>quartersToMonths,quartersToYears:()=>quartersToYears,roundToNearestHours:()=>roundToNearestHours,roundToNearestMinutes:()=>roundToNearestMinutes,secondsToHours:()=>secondsToHours,secondsToMilliseconds:()=>secondsToMilliseconds,secondsToMinutes:()=>secondsToMinutes,set:()=>set,setDate:()=>setDate,setDay:()=>setDay,setDayOfYear:()=>setDayOfYear,setDefaultOptions:()=>setDefaultOptions_setDefaultOptions,setHours:()=>setHours,setISODay:()=>setISODay,setISOWeek:()=>setISOWeek,setISOWeekYear:()=>setISOWeekYear,setMilliseconds:()=>setMilliseconds,setMinutes:()=>setMinutes,setMonth:()=>setMonth,setQuarter:()=>setQuarter,setSeconds:()=>setSeconds,setWeek:()=>setWeek,setWeekYear:()=>setWeekYear,setYear:()=>setYear,startOfDay:()=>startOfDay,startOfDecade:()=>startOfDecade,startOfHour:()=>startOfHour,startOfISOWeek:()=>startOfISOWeek,startOfISOWeekYear:()=>startOfISOWeekYear,startOfMinute:()=>startOfMinute,startOfMonth:()=>startOfMonth,startOfQuarter:()=>startOfQuarter,startOfSecond:()=>startOfSecond,startOfToday:()=>startOfToday,startOfTomorrow:()=>startOfTomorrow,startOfWeek:()=>startOfWeek,startOfWeekYear:()=>startOfWeekYear,startOfYear:()=>startOfYear,startOfYesterday:()=>startOfYesterday,sub:()=>sub,subBusinessDays:()=>subBusinessDays,subDays:()=>subDays,subHours:()=>subHours,subISOWeekYears:()=>subISOWeekYears,subMilliseconds:()=>subMilliseconds,subMinutes:()=>subMinutes,subMonths:()=>subMonths,subQuarters:()=>subQuarters,subSeconds:()=>subSeconds,subWeeks:()=>subWeeks,subYears:()=>subYears,toDate:()=>toDate,transpose:()=>transpose,weeksToDays:()=>weeksToDays,yearsToDays:()=>yearsToDays,yearsToMonths:()=>yearsToMonths,yearsToQuarters:()=>yearsToQuarters});const daysInYear=365.2425;const millisecondsInWeek=6048e5;const millisecondsInDay=864e5;const millisecondsInHour=36e5;const secondsInHour=3600;const secondsInDay=24*secondsInHour;const secondsInYear=secondsInDay*daysInYear;const secondsInMonth=secondsInYear/12;const secondsInQuarter=3*secondsInMonth;const constructFromSymbol=Symbol.for("constructDateFrom");function constructFrom(date,value){if("function"==typeof date)return date(value);if(date&&"object"==typeof date&&constructFromSymbol in date)return date[constructFromSymbol](value);if(date instanceof Date)return new date.constructor(value);return new Date(value)}function toDate(argument,context){return constructFrom(context||argument,argument)}function addDays(date,amount,options){const _date=toDate(date,options?.in);if(isNaN(amount))return constructFrom(options?.in||date,NaN);if(!amount)return _date;_date.setDate(_date.getDate()+amount);return _date}function addMonths(date,amount,options){const _date=toDate(date,options?.in);if(isNaN(amount))return constructFrom(options?.in||date,NaN);if(!amount)return _date;const dayOfMonth=_date.getDate();const endOfDesiredMonth=constructFrom(options?.in||date,_date.getTime());endOfDesiredMonth.setMonth(_date.getMonth()+amount+1,0);const daysInMonth=endOfDesiredMonth.getDate();if(dayOfMonth>=daysInMonth)return endOfDesiredMonth;_date.setFullYear(endOfDesiredMonth.getFullYear(),endOfDesiredMonth.getMonth(),dayOfMonth);return _date}function add(date,duration,options){const{years=0,months=0,weeks=0,days=0,hours=0,minutes=0,seconds=0}=duration;const _date=toDate(date,options?.in);const dateWithMonths=months||years?addMonths(_date,months+12*years):_date;const dateWithDays=days||weeks?addDays(dateWithMonths,days+7*weeks):dateWithMonths;const minutesToAdd=minutes+60*hours;const secondsToAdd=seconds+60*minutesToAdd;const msToAdd=1e3*secondsToAdd;return constructFrom(options?.in||date,+dateWithDays+msToAdd)}function isSaturday(date,options){return 6===toDate(date,options?.in).getDay()}function isSunday(date,options){return 0===toDate(date,options?.in).getDay()}function isWeekend(date,options){const day=toDate(date,options?.in).getDay();return 0===day||6===day}function addBusinessDays(date,amount,options){const _date=toDate(date,options?.in);const startedOnWeekend=isWeekend(_date,options);if(isNaN(amount))return constructFrom(options?.in,NaN);const hours=_date.getHours();const sign=amount<0?-1:1;const fullWeeks=Math.trunc(amount/5);_date.setDate(_date.getDate()+7*fullWeeks);let restDays=Math.abs(amount%5);while(restDays>0){_date.setDate(_date.getDate()+sign);if(!isWeekend(_date,options))restDays-=1}if(startedOnWeekend&&isWeekend(_date,options)&&0!==amount){if(isSaturday(_date,options))_date.setDate(_date.getDate()+(sign<0?2:-1));if(isSunday(_date,options))_date.setDate(_date.getDate()+(sign<0?1:-2))}_date.setHours(hours);return _date}function addMilliseconds(date,amount,options){return constructFrom(options?.in||date,+toDate(date)+amount)}function addHours(date,amount,options){return addMilliseconds(date,amount*millisecondsInHour,options)}let defaultOptions_defaultOptions={};function getDefaultOptions(){return defaultOptions_defaultOptions}function setDefaultOptions(newOptions){defaultOptions_defaultOptions=newOptions}function startOfWeek(date,options){const defaultOptions=getDefaultOptions();const weekStartsOn=options?.weekStartsOn??options?.locale?.options?.weekStartsOn??defaultOptions.weekStartsOn??defaultOptions.locale?.options?.weekStartsOn??0;const _date=toDate(date,options?.in);const day=_date.getDay();const diff=(day<weekStartsOn?7:0)+day-weekStartsOn;_date.setDate(_date.getDate()-diff);_date.setHours(0,0,0,0);return _date}function startOfISOWeek(date,options){return startOfWeek(date,{...options,weekStartsOn:1})}function getISOWeekYear(date,options){const _date=toDate(date,options?.in);const year=_date.getFullYear();const fourthOfJanuaryOfNextYear=constructFrom(_date,0);fourthOfJanuaryOfNextYear.setFullYear(year+1,0,4);fourthOfJanuaryOfNextYear.setHours(0,0,0,0);const startOfNextYear=startOfISOWeek(fourthOfJanuaryOfNextYear);const fourthOfJanuaryOfThisYear=constructFrom(_date,0);fourthOfJanuaryOfThisYear.setFullYear(year,0,4);fourthOfJanuaryOfThisYear.setHours(0,0,0,0);const startOfThisYear=startOfISOWeek(fourthOfJanuaryOfThisYear);if(_date.getTime()>=startOfNextYear.getTime())return year+1;if(_date.getTime()>=startOfThisYear.getTime())return year;return year-1}function getTimezoneOffsetInMilliseconds(date){const _date=toDate(date);const utcDate=new Date(Date.UTC(_date.getFullYear(),_date.getMonth(),_date.getDate(),_date.getHours(),_date.getMinutes(),_date.getSeconds(),_date.getMilliseconds()));utcDate.setUTCFullYear(_date.getFullYear());return date-utcDate}function normalizeDates(context,...dates){const normalize=constructFrom.bind(null,context||dates.find(date=>"object"==typeof date));return dates.map(normalize)}function startOfDay(date,options){const _date=toDate(date,options?.in);_date.setHours(0,0,0,0);return _date}function differenceInCalendarDays(laterDate,earlierDate,options){const[laterDate_,earlierDate_]=normalizeDates(options?.in,laterDate,earlierDate);const laterStartOfDay=startOfDay(laterDate_);const earlierStartOfDay=startOfDay(earlierDate_);const laterTimestamp=laterStartOfDay-getTimezoneOffsetInMilliseconds(laterStartOfDay);const earlierTimestamp=earlierStartOfDay-getTimezoneOffsetInMilliseconds(earlierStartOfDay);return Math.round((laterTimestamp-earlierTimestamp)/millisecondsInDay)}function startOfISOWeekYear(date,options){const year=getISOWeekYear(date,options);const fourthOfJanuary=constructFrom(options?.in||date,0);fourthOfJanuary.setFullYear(year,0,4);fourthOfJanuary.setHours(0,0,0,0);return startOfISOWeek(fourthOfJanuary)}function setISOWeekYear(date,weekYear,options){let _date=toDate(date,options?.in);const diff=differenceInCalendarDays(_date,startOfISOWeekYear(_date,options));const fourthOfJanuary=constructFrom(options?.in||date,0);fourthOfJanuary.setFullYear(weekYear,0,4);fourthOfJanuary.setHours(0,0,0,0);_date=startOfISOWeekYear(fourthOfJanuary);_date.setDate(_date.getDate()+diff);return _date}function addISOWeekYears(date,amount,options){return setISOWeekYear(date,getISOWeekYear(date,options)+amount,options)}function addMinutes(date,amount,options){const _date=toDate(date,options?.in);_date.setTime(_date.getTime()+6e4*amount);return _date}function addQuarters(date,amount,options){return addMonths(date,3*amount,options)}function addSeconds(date,amount,options){return addMilliseconds(date,1e3*amount,options)}function addWeeks(date,amount,options){return addDays(date,7*amount,options)}function addYears(date,amount,options){return addMonths(date,12*amount,options)}function areIntervalsOverlapping(intervalLeft,intervalRight,options){const[leftStartTime,leftEndTime]=[+toDate(intervalLeft.start,options?.in),+toDate(intervalLeft.end,options?.in)].sort((a,b)=>a-b);const[rightStartTime,rightEndTime]=[+toDate(intervalRight.start,options?.in),+toDate(intervalRight.end,options?.in)].sort((a,b)=>a-b);if(options?.inclusive)return leftStartTime<=rightEndTime&&rightStartTime<=leftEndTime;return leftStartTime<rightEndTime&&rightStartTime<leftEndTime}function max(dates,options){let result;let context=options?.in;dates.forEach(date=>{if(!context&&"object"==typeof date)context=constructFrom.bind(null,date);const date_=toDate(date,context);if(!result||result<date_||isNaN(+date_))result=date_});return constructFrom(context,result||NaN)}function min(dates,options){let result;let context=options?.in;dates.forEach(date=>{if(!context&&"object"==typeof date)context=constructFrom.bind(null,date);const date_=toDate(date,context);if(!result||result>date_||isNaN(+date_))result=date_});return constructFrom(context,result||NaN)}function clamp(date,interval,options){const[date_,start,end]=normalizeDates(options?.in,date,interval.start,interval.end);return min([max([date_,start],options),end],options)}function closestIndexTo(dateToCompare,dates){const timeToCompare=+toDate(dateToCompare);if(isNaN(timeToCompare))return NaN;let result;let minDistance;dates.forEach((date,index)=>{const date_=toDate(date);if(isNaN(+date_)){result=NaN;minDistance=NaN;return}const distance=Math.abs(timeToCompare-date_);if(null==result||distance<minDistance){result=index;minDistance=distance}});return result}function closestTo(dateToCompare,dates,options){const[dateToCompare_,...dates_]=normalizeDates(options?.in,dateToCompare,...dates);const index=closestIndexTo(dateToCompare_,dates_);if("number"==typeof index&&isNaN(index))return constructFrom(dateToCompare_,NaN);if(void 0!==index)return dates_[index]}function compareAsc(dateLeft,dateRight){const diff=toDate(dateLeft)-toDate(dateRight);if(diff<0)return -1;if(diff>0)return 1;return diff}function compareDesc(dateLeft,dateRight){const diff=toDate(dateLeft)-toDate(dateRight);if(diff>0)return -1;if(diff<0)return 1;return diff}function constructNow(date){return constructFrom(date,Date.now())}function daysToWeeks(days){const result=Math.trunc(days/7);return 0===result?0:result}function isSameDay(laterDate,earlierDate,options){const[dateLeft_,dateRight_]=normalizeDates(options?.in,laterDate,earlierDate);return+startOfDay(dateLeft_)===+startOfDay(dateRight_)}function isDate(value){return value instanceof Date||"object"==typeof value&&"[object Date]"===Object.prototype.toString.call(value)}function isValid(date){return!(!isDate(date)&&"number"!=typeof date||isNaN(+toDate(date)))}function differenceInBusinessDays(laterDate,earlierDate,options){const[laterDate_,earlierDate_]=normalizeDates(options?.in,laterDate,earlierDate);if(!isValid(laterDate_)||!isValid(earlierDate_))return NaN;const diff=differenceInCalendarDays(laterDate_,earlierDate_);const sign=diff<0?-1:1;const weeks=Math.trunc(diff/7);let result=5*weeks;let movingDate=addDays(earlierDate_,7*weeks);while(!isSameDay(laterDate_,movingDate)){result+=isWeekend(movingDate,options)?0:sign;movingDate=addDays(movingDate,sign)}return 0===result?0:result}function differenceInCalendarISOWeekYears(laterDate,earlierDate,options){const[laterDate_,earlierDate_]=normalizeDates(options?.in,laterDate,earlierDate);return getISOWeekYear(laterDate_,options)-getISOWeekYear(earlierDate_,options)}function differenceInCalendarISOWeeks(laterDate,earlierDate,options){const[laterDate_,earlierDate_]=normalizeDates(options?.in,laterDate,earlierDate);const startOfISOWeekLeft=startOfISOWeek(laterDate_);const startOfISOWeekRight=startOfISOWeek(earlierDate_);const timestampLeft=startOfISOWeekLeft-getTimezoneOffsetInMilliseconds(startOfISOWeekLeft);const timestampRight=startOfISOWeekRight-getTimezoneOffsetInMilliseconds(startOfISOWeekRight);return Math.round((timestampLeft-timestampRight)/millisecondsInWeek)}function differenceInCalendarMonths(laterDate,earlierDate,options){const[laterDate_,earlierDate_]=normalizeDates(options?.in,laterDate,earlierDate);const yearsDiff=laterDate_.getFullYear()-earlierDate_.getFullYear();const monthsDiff=laterDate_.getMonth()-earlierDate_.getMonth();return 12*yearsDiff+monthsDiff}function getQuarter(date,options){const _date=toDate(date,options?.in);const quarter=Math.trunc(_date.getMonth()/3)+1;return quarter}function differenceInCalendarQuarters(laterDate,earlierDate,options){const[laterDate_,earlierDate_]=normalizeDates(options?.in,laterDate,earlierDate);const yearsDiff=laterDate_.getFullYear()-earlierDate_.getFullYear();const quartersDiff=getQuarter(laterDate_)-getQuarter(earlierDate_);return 4*yearsDiff+quartersDiff}function differenceInCalendarWeeks(laterDate,earlierDate,options){const[laterDate_,earlierDate_]=normalizeDates(options?.in,laterDate,earlierDate);const laterStartOfWeek=startOfWeek(laterDate_,options);const earlierStartOfWeek=startOfWeek(earlierDate_,options);const laterTimestamp=laterStartOfWeek-getTimezoneOffsetInMilliseconds(laterStartOfWeek);const earlierTimestamp=earlierStartOfWeek-getTimezoneOffsetInMilliseconds(earlierStartOfWeek);return Math.round((laterTimestamp-earlierTimestamp)/millisecondsInWeek)}function differenceInCalendarYears(laterDate,earlierDate,options){const[laterDate_,earlierDate_]=normalizeDates(options?.in,laterDate,earlierDate);return laterDate_.getFullYear()-earlierDate_.getFullYear()}function differenceInDays(laterDate,earlierDate,options){const[laterDate_,earlierDate_]=normalizeDates(options?.in,laterDate,earlierDate);const sign=compareLocalAsc(laterDate_,earlierDate_);const difference=Math.abs(differenceInCalendarDays(laterDate_,earlierDate_));laterDate_.setDate(laterDate_.getDate()-sign*difference);const isLastDayNotFull=Number(compareLocalAsc(laterDate_,earlierDate_)===-sign);const result=sign*(difference-isLastDayNotFull);return 0===result?0:result}function compareLocalAsc(laterDate,earlierDate){const diff=laterDate.getFullYear()-earlierDate.getFullYear()||laterDate.getMonth()-earlierDate.getMonth()||laterDate.getDate()-earlierDate.getDate()||laterDate.getHours()-earlierDate.getHours()||laterDate.getMinutes()-earlierDate.getMinutes()||laterDate.getSeconds()-earlierDate.getSeconds()||laterDate.getMilliseconds()-earlierDate.getMilliseconds();if(diff<0)return -1;if(diff>0)return 1;return diff}function getRoundingMethod(method){return number=>{const round=method?Math[method]:Math.trunc;const result=round(number);return 0===result?0:result}}function differenceInHours(laterDate,earlierDate,options){const[laterDate_,earlierDate_]=normalizeDates(options?.in,laterDate,earlierDate);const diff=(laterDate_-earlierDate_)/millisecondsInHour;return getRoundingMethod(options?.roundingMethod)(diff)}function subISOWeekYears(date,amount,options){return addISOWeekYears(date,-amount,options)}function differenceInISOWeekYears(laterDate,earlierDate,options){const[laterDate_,earlierDate_]=normalizeDates(options?.in,laterDate,earlierDate);const sign=compareAsc(laterDate_,earlierDate_);const diff=Math.abs(differenceInCalendarISOWeekYears(laterDate_,earlierDate_,options));const adjustedDate=subISOWeekYears(laterDate_,sign*diff,options);const isLastISOWeekYearNotFull=Number(compareAsc(adjustedDate,earlierDate_)===-sign);const result=sign*(diff-isLastISOWeekYearNotFull);return 0===result?0:result}function differenceInMilliseconds(laterDate,earlierDate){return toDate(laterDate)-toDate(earlierDate)}function differenceInMinutes(dateLeft,dateRight,options){const diff=differenceInMilliseconds(dateLeft,dateRight)/6e4;return getRoundingMethod(options?.roundingMethod)(diff)}function endOfDay(date,options){const _date=toDate(date,options?.in);_date.setHours(23,59,59,999);return _date}function endOfMonth(date,options){const _date=toDate(date,options?.in);const month=_date.getMonth();_date.setFullYear(_date.getFullYear(),month+1,0);_date.setHours(23,59,59,999);return _date}function isLastDayOfMonth(date,options){const _date=toDate(date,options?.in);return+endOfDay(_date,options)===+endOfMonth(_date,options)}function differenceInMonths(laterDate,earlierDate,options){const[laterDate_,workingLaterDate,earlierDate_]=normalizeDates(options?.in,laterDate,laterDate,earlierDate);const sign=compareAsc(workingLaterDate,earlierDate_);const difference=Math.abs(differenceInCalendarMonths(workingLaterDate,earlierDate_));if(difference<1)return 0;if(1===workingLaterDate.getMonth()&&workingLaterDate.getDate()>27)workingLaterDate.setDate(30);workingLaterDate.setMonth(workingLaterDate.getMonth()-sign*difference);let isLastMonthNotFull=compareAsc(workingLaterDate,earlierDate_)===-sign;if(isLastDayOfMonth(laterDate_)&&1===difference&&1===compareAsc(laterDate_,earlierDate_))isLastMonthNotFull=false;const result=sign*(difference-isLastMonthNotFull);return 0===result?0:result}function differenceInQuarters(laterDate,earlierDate,options){const diff=differenceInMonths(laterDate,earlierDate,options)/3;return getRoundingMethod(options?.roundingMethod)(diff)}function differenceInSeconds(laterDate,earlierDate,options){const diff=differenceInMilliseconds(laterDate,earlierDate)/1e3;return getRoundingMethod(options?.roundingMethod)(diff)}function differenceInWeeks(laterDate,earlierDate,options){const diff=differenceInDays(laterDate,earlierDate,options)/7;return getRoundingMethod(options?.roundingMethod)(diff)}function differenceInYears(laterDate,earlierDate,options){const[laterDate_,earlierDate_]=normalizeDates(options?.in,laterDate,earlierDate);const sign=compareAsc(laterDate_,earlierDate_);const diff=Math.abs(differenceInCalendarYears(laterDate_,earlierDate_));laterDate_.setFullYear(1584);earlierDate_.setFullYear(1584);const partial=compareAsc(laterDate_,earlierDate_)===-sign;const result=sign*(diff-partial);return 0===result?0:result}function normalizeInterval(context,interval){const[start,end]=normalizeDates(context,interval.start,interval.end);return{start,end}}function eachDayOfInterval(interval,options){const{start,end}=normalizeInterval(options?.in,interval);let reversed=+start>+end;const endTime=reversed?+start:+end;const date=reversed?end:start;date.setHours(0,0,0,0);let step=options?.step??1;if(!step)return[];if(step<0){step=-step;reversed=!reversed}const dates=[];while(+date<=endTime){dates.push(constructFrom(start,date));date.setDate(date.getDate()+step);date.setHours(0,0,0,0)}return reversed?dates.reverse():dates}function eachHourOfInterval(interval,options){const{start,end}=normalizeInterval(options?.in,interval);let reversed=+start>+end;const endTime=reversed?+start:+end;const date=reversed?end:start;date.setMinutes(0,0,0);let step=options?.step??1;if(!step)return[];if(step<0){step=-step;reversed=!reversed}const dates=[];while(+date<=endTime){dates.push(constructFrom(start,date));date.setHours(date.getHours()+step)}return reversed?dates.reverse():dates}function eachMinuteOfInterval(interval,options){const{start,end}=normalizeInterval(options?.in,interval);start.setSeconds(0,0);let reversed=+start>+end;const endTime=reversed?+start:+end;let date=reversed?end:start;let step=options?.step??1;if(!step)return[];if(step<0){step=-step;reversed=!reversed}const dates=[];while(+date<=endTime){dates.push(constructFrom(start,date));date=addMinutes(date,step)}return reversed?dates.reverse():dates}function eachMonthOfInterval(interval,options){const{start,end}=normalizeInterval(options?.in,interval);let reversed=+start>+end;const endTime=reversed?+start:+end;const date=reversed?end:start;date.setHours(0,0,0,0);date.setDate(1);let step=options?.step??1;if(!step)return[];if(step<0){step=-step;reversed=!reversed}const dates=[];while(+date<=endTime){dates.push(constructFrom(start,date));date.setMonth(date.getMonth()+step)}return reversed?dates.reverse():dates}function startOfQuarter(date,options){const _date=toDate(date,options?.in);const currentMonth=_date.getMonth();const month=currentMonth-currentMonth%3;_date.setMonth(month,1);_date.setHours(0,0,0,0);return _date}function eachQuarterOfInterval(interval,options){const{start,end}=normalizeInterval(options?.in,interval);let reversed=+start>+end;const endTime=reversed?+startOfQuarter(start):+startOfQuarter(end);let date=reversed?startOfQuarter(end):startOfQuarter(start);let step=options?.step??1;if(!step)return[];if(step<0){step=-step;reversed=!reversed}const dates=[];while(+date<=endTime){dates.push(constructFrom(start,date));date=addQuarters(date,step)}return reversed?dates.reverse():dates}function eachWeekOfInterval(interval,options){const{start,end}=normalizeInterval(options?.in,interval);let reversed=+start>+end;const startDateWeek=reversed?startOfWeek(end,options):startOfWeek(start,options);const endDateWeek=reversed?startOfWeek(start,options):startOfWeek(end,options);startDateWeek.setHours(15);endDateWeek.setHours(15);const endTime=+endDateWeek.getTime();let currentDate=startDateWeek;let step=options?.step??1;if(!step)return[];if(step<0){step=-step;reversed=!reversed}const dates=[];while(+currentDate<=endTime){currentDate.setHours(0);dates.push(constructFrom(start,currentDate));currentDate=addWeeks(currentDate,step);currentDate.setHours(15)}return reversed?dates.reverse():dates}function eachWeekendOfInterval(interval,options){const{start,end}=normalizeInterval(options?.in,interval);const dateInterval=eachDayOfInterval({start,end},options);const weekends=[];let index=0;while(index<dateInterval.length){const date=dateInterval[index++];if(isWeekend(date))weekends.push(constructFrom(start,date))}return weekends}function startOfMonth(date,options){const _date=toDate(date,options?.in);_date.setDate(1);_date.setHours(0,0,0,0);return _date}function eachWeekendOfMonth(date,options){const start=startOfMonth(date,options);const end=endOfMonth(date,options);return eachWeekendOfInterval({start,end},options)}function endOfYear(date,options){const _date=toDate(date,options?.in);const year=_date.getFullYear();_date.setFullYear(year+1,0,0);_date.setHours(23,59,59,999);return _date}function startOfYear(date,options){const date_=toDate(date,options?.in);date_.setFullYear(date_.getFullYear(),0,1);date_.setHours(0,0,0,0);return date_}function eachWeekendOfYear(date,options){const start=startOfYear(date,options);const end=endOfYear(date,options);return eachWeekendOfInterval({start,end},options)}function eachYearOfInterval(interval,options){const{start,end}=normalizeInterval(options?.in,interval);let reversed=+start>+end;const endTime=reversed?+start:+end;const date=reversed?end:start;date.setHours(0,0,0,0);date.setMonth(0,1);let step=options?.step??1;if(!step)return[];if(step<0){step=-step;reversed=!reversed}const dates=[];while(+date<=endTime){dates.push(constructFrom(start,date));date.setFullYear(date.getFullYear()+step)}return reversed?dates.reverse():dates}function endOfDecade(date,options){const _date=toDate(date,options?.in);const year=_date.getFullYear();const decade=9+10*Math.floor(year/10);_date.setFullYear(decade,11,31);_date.setHours(23,59,59,999);return _date}function endOfHour(date,options){const _date=toDate(date,options?.in);_date.setMinutes(59,59,999);return _date}function endOfWeek(date,options){const defaultOptions=getDefaultOptions();const weekStartsOn=options?.weekStartsOn??options?.locale?.options?.weekStartsOn??defaultOptions.weekStartsOn??defaultOptions.locale?.options?.weekStartsOn??0;const _date=toDate(date,options?.in);const day=_date.getDay();const diff=(day<weekStartsOn?-7:0)+6-(day-weekStartsOn);_date.setDate(_date.getDate()+diff);_date.setHours(23,59,59,999);return _date}function endOfISOWeek(date,options){return endOfWeek(date,{...options,weekStartsOn:1})}function endOfISOWeekYear(date,options){const year=getISOWeekYear(date,options);const fourthOfJanuaryOfNextYear=constructFrom(options?.in||date,0);fourthOfJanuaryOfNextYear.setFullYear(year+1,0,4);fourthOfJanuaryOfNextYear.setHours(0,0,0,0);const _date=startOfISOWeek(fourthOfJanuaryOfNextYear,options);_date.setMilliseconds(_date.getMilliseconds()-1);return _date}function endOfMinute(date,options){const _date=toDate(date,options?.in);_date.setSeconds(59,999);return _date}function endOfQuarter(date,options){const _date=toDate(date,options?.in);const currentMonth=_date.getMonth();const month=currentMonth-currentMonth%3+3;_date.setMonth(month,0);_date.setHours(23,59,59,999);return _date}function endOfSecond(date,options){const _date=toDate(date,options?.in);_date.setMilliseconds(999);return _date}function endOfToday(options){return endOfDay(Date.now(),options)}function endOfTomorrow(options){const now=constructNow(options?.in);const year=now.getFullYear();const month=now.getMonth();const day=now.getDate();const date=constructNow(options?.in);date.setFullYear(year,month,day+1);date.setHours(23,59,59,999);return options?.in?options.in(date):date}function endOfYesterday(options){const now=constructNow(options?.in);const date=constructFrom(options?.in,0);date.setFullYear(now.getFullYear(),now.getMonth(),now.getDate()-1);date.setHours(23,59,59,999);return date}const formatDistanceLocale={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};const formatDistance=(token,count,options)=>{let result;const tokenValue=formatDistanceLocale[token];result="string"==typeof tokenValue?tokenValue:1===count?tokenValue.one:tokenValue.other.replace("{{count}}",count.toString());if(options?.addSuffix)if(options.comparison&&options.comparison>0)return"in "+result;else return result+" ago";return result};function buildFormatLongFn(args){return (options={})=>{const width=options.width?String(options.width):args.defaultWidth;const format=args.formats[width]||args.formats[args.defaultWidth];return format}}const dateFormats={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"};const timeFormats={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"};const dateTimeFormats={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"};const formatLong_formatLong={date:buildFormatLongFn({formats:dateFormats,defaultWidth:"full"}),time:buildFormatLongFn({formats:timeFormats,defaultWidth:"full"}),dateTime:buildFormatLongFn({formats:dateTimeFormats,defaultWidth:"full"})};const formatRelativeLocale={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};const formatRelative=(token,_date,_baseDate,_options)=>formatRelativeLocale[token];function buildLocalizeFn(args){return(value,options)=>{const context=options?.context?String(options.context):"standalone";let valuesArray;if("formatting"===context&&args.formattingValues){const defaultWidth=args.defaultFormattingWidth||args.defaultWidth;const width=options?.width?String(options.width):defaultWidth;valuesArray=args.formattingValues[width]||args.formattingValues[defaultWidth]}else{const defaultWidth=args.defaultWidth;const width=options?.width?String(options.width):args.defaultWidth;valuesArray=args.values[width]||args.values[defaultWidth]}const index=args.argumentCallback?args.argumentCallback(value):value;return valuesArray[index]}}const eraValues={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]};const quarterValues={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]};const monthValues={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]};const dayValues={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]};const dayPeriodValues={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}};const formattingDayPeriodValues={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}};const ordinalNumber=(dirtyNumber,_options)=>{const number=Number(dirtyNumber);const rem100=number%100;if(rem100>20||rem100<10)switch(rem100%10){case 1:return number+"st";case 2:return number+"nd";case 3:return number+"rd"}return number+"th"};const localize_localize={ordinalNumber,era:buildLocalizeFn({values:eraValues,defaultWidth:"wide"}),quarter:buildLocalizeFn({values:quarterValues,defaultWidth:"wide",argumentCallback:quarter=>quarter-1}),month:buildLocalizeFn({values:monthValues,defaultWidth:"wide"}),day:buildLocalizeFn({values:dayValues,defaultWidth:"wide"}),dayPeriod:buildLocalizeFn({values:dayPeriodValues,defaultWidth:"wide",formattingValues:formattingDayPeriodValues,defaultFormattingWidth:"wide"})};function buildMatchFn(args){return(string,options={})=>{const width=options.width;const matchPattern=width&&args.matchPatterns[width]||args.matchPatterns[args.defaultMatchWidth];const matchResult=string.match(matchPattern);if(!matchResult)return null;const matchedString=matchResult[0];const parsePatterns=width&&args.parsePatterns[width]||args.parsePatterns[args.defaultParseWidth];const key=Array.isArray(parsePatterns)?findIndex(parsePatterns,pattern=>pattern.test(matchedString)):findKey(parsePatterns,pattern=>pattern.test(matchedString));let value;value=args.valueCallback?args.valueCallback(key):key;value=options.valueCallback?options.valueCallback(value):value;const rest=string.slice(matchedString.length);return{value,rest}}}function findKey(object,predicate){for(const key in object)if(Object.prototype.hasOwnProperty.call(object,key)&&predicate(object[key]))return key}function findIndex(array,predicate){for(let key=0;key<array.length;key++)if(predicate(array[key]))return key}function buildMatchPatternFn(args){return(string,options={})=>{const matchResult=string.match(args.matchPattern);if(!matchResult)return null;const matchedString=matchResult[0];const parseResult=string.match(args.parsePattern);if(!parseResult)return null;let value=args.valueCallback?args.valueCallback(parseResult[0]):parseResult[0];value=options.valueCallback?options.valueCallback(value):value;const rest=string.slice(matchedString.length);return{value,rest}}}const matchOrdinalNumberPattern=/^(\d+)(th|st|nd|rd)?/i;const parseOrdinalNumberPattern=/\d+/i;const matchEraPatterns={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i};const parseEraPatterns={any:[/^b/i,/^(a|c)/i]};const matchQuarterPatterns={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i};const parseQuarterPatterns={any:[/1/i,/2/i,/3/i,/4/i]};const matchMonthPatterns={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i};const parseMonthPatterns={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]};const matchDayPatterns={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i};const parseDayPatterns={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]};const matchDayPeriodPatterns={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i};const parseDayPeriodPatterns={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}};const match_match={ordinalNumber:buildMatchPatternFn({matchPattern:matchOrdinalNumberPattern,parsePattern:parseOrdinalNumberPattern,valueCallback:value=>parseInt(value,10)}),era:buildMatchFn({matchPatterns:matchEraPatterns,defaultMatchWidth:"wide",parsePatterns:parseEraPatterns,defaultParseWidth:"any"}),quarter:buildMatchFn({matchPatterns:matchQuarterPatterns,defaultMatchWidth:"wide",parsePatterns:parseQuarterPatterns,defaultParseWidth:"any",valueCallback:index=>index+1}),month:buildMatchFn({matchPatterns:matchMonthPatterns,defaultMatchWidth:"wide",parsePatterns:parseMonthPatterns,defaultParseWidth:"any"}),day:buildMatchFn({matchPatterns:matchDayPatterns,defaultMatchWidth:"wide",parsePatterns:parseDayPatterns,defaultParseWidth:"any"}),dayPeriod:buildMatchFn({matchPatterns:matchDayPeriodPatterns,defaultMatchWidth:"any",parsePatterns:parseDayPeriodPatterns,defaultParseWidth:"any"})};const enUS={code:"en-US",formatDistance:formatDistance,formatLong:formatLong_formatLong,formatRelative:formatRelative,localize:localize_localize,match:match_match,options:{weekStartsOn:0,firstWeekContainsDate:1}};function getDayOfYear(date,options){const _date=toDate(date,options?.in);const diff=differenceInCalendarDays(_date,startOfYear(_date));const dayOfYear=diff+1;return dayOfYear}function getISOWeek(date,options){const _date=toDate(date,options?.in);const diff=startOfISOWeek(_date)-startOfISOWeekYear(_date);return Math.round(diff/millisecondsInWeek)+1}function getWeekYear(date,options){const _date=toDate(date,options?.in);const year=_date.getFullYear();const defaultOptions=getDefaultOptions();const firstWeekContainsDate=options?.firstWeekContainsDate??options?.locale?.options?.firstWeekContainsDate??defaultOptions.firstWeekContainsDate??defaultOptions.locale?.options?.firstWeekContainsDate??1;const firstWeekOfNextYear=constructFrom(options?.in||date,0);firstWeekOfNextYear.setFullYear(year+1,0,firstWeekContainsDate);firstWeekOfNextYear.setHours(0,0,0,0);const startOfNextYear=startOfWeek(firstWeekOfNextYear,options);const firstWeekOfThisYear=constructFrom(options?.in||date,0);firstWeekOfThisYear.setFullYear(year,0,firstWeekContainsDate);firstWeekOfThisYear.setHours(0,0,0,0);const startOfThisYear=startOfWeek(firstWeekOfThisYear,options);if(+_date>=+startOfNextYear)return year+1;if(+_date>=+startOfThisYear)return year;return year-1}function startOfWeekYear(date,options){const defaultOptions=getDefaultOptions();const firstWeekContainsDate=options?.firstWeekContainsDate??options?.locale?.options?.firstWeekContainsDate??defaultOptions.firstWeekContainsDate??defaultOptions.locale?.options?.firstWeekContainsDate??1;const year=getWeekYear(date,options);const firstWeek=constructFrom(options?.in||date,0);firstWeek.setFullYear(year,0,firstWeekContainsDate);firstWeek.setHours(0,0,0,0);const _date=startOfWeek(firstWeek,options);return _date}function getWeek(date,options){const _date=toDate(date,options?.in);const diff=startOfWeek(_date,options)-startOfWeekYear(_date,options);return Math.round(diff/millisecondsInWeek)+1}function addLeadingZeros(number,targetLength){const sign=number<0?"-":"";const output=Math.abs(number).toString().padStart(targetLength,"0");return sign+output}const lightFormatters={y(date,token){const signedYear=date.getFullYear();const year=signedYear>0?signedYear:1-signedYear;return addLeadingZeros("yy"===token?year%100:year,token.length)},M(date,token){const month=date.getMonth();return"M"===token?String(month+1):addLeadingZeros(month+1,2)},d(date,token){return addLeadingZeros(date.getDate(),token.length)},a(date,token){const dayPeriodEnumValue=date.getHours()/12>=1?"pm":"am";switch(token){case"a":case"aa":return dayPeriodEnumValue.toUpperCase();case"aaa":return dayPeriodEnumValue;case"aaaaa":return dayPeriodEnumValue[0];case"aaaa":default:return"am"===dayPeriodEnumValue?"a.m.":"p.m."}},h(date,token){return addLeadingZeros(date.getHours()%12||12,token.length)},H(date,token){return addLeadingZeros(date.getHours(),token.length)},m(date,token){return addLeadingZeros(date.getMinutes(),token.length)},s(date,token){return addLeadingZeros(date.getSeconds(),token.length)},S(date,token){const numberOfDigits=token.length;const milliseconds=date.getMilliseconds();const fractionalSeconds=Math.trunc(milliseconds*Math.pow(10,numberOfDigits-3));return addLeadingZeros(fractionalSeconds,token.length)}};const dayPeriodEnum={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"};const formatters={G:function(date,token,localize){const era=date.getFullYear()>0?1:0;switch(token){case"G":case"GG":case"GGG":return localize.era(era,{width:"abbreviated"});case"GGGGG":return localize.era(era,{width:"narrow"});case"GGGG":default:return localize.era(era,{width:"wide"})}},y:function(date,token,localize){if("yo"===token){const signedYear=date.getFullYear();const year=signedYear>0?signedYear:1-signedYear;return localize.ordinalNumber(year,{unit:"year"})}return lightFormatters.y(date,token)},Y:function(date,token,localize,options){const signedWeekYear=getWeekYear(date,options);const weekYear=signedWeekYear>0?signedWeekYear:1-signedWeekYear;if("YY"===token){const twoDigitYear=weekYear%100;return addLeadingZeros(twoDigitYear,2)}if("Yo"===token)return localize.ordinalNumber(weekYear,{unit:"year"});return addLeadingZeros(weekYear,token.length)},R:function(date,token){const isoWeekYear=getISOWeekYear(date);return addLeadingZeros(isoWeekYear,token.length)},u:function(date,token){const year=date.getFullYear();return addLeadingZeros(year,token.length)},Q:function(date,token,localize){const quarter=Math.ceil((date.getMonth()+1)/3);switch(token){case"Q":return String(quarter);case"QQ":return addLeadingZeros(quarter,2);case"Qo":return localize.ordinalNumber(quarter,{unit:"quarter"});case"QQQ":return localize.quarter(quarter,{width:"abbreviated",context:"formatting"});case"QQQQQ":return localize.quarter(quarter,{width:"narrow",context:"formatting"});case"QQQQ":default:return localize.quarter(quarter,{width:"wide",context:"formatting"})}},q:function(date,token,localize){const quarter=Math.ceil((date.getMonth()+1)/3);switch(token){case"q":return String(quarter);case"qq":return addLeadingZeros(quarter,2);case"qo":return localize.ordinalNumber(quarter,{unit:"quarter"});case"qqq":return localize.quarter(quarter,{width:"abbreviated",context:"standalone"});case"qqqqq":return localize.quarter(quarter,{width:"narrow",context:"standalone"});case"qqqq":default:return localize.quarter(quarter,{width:"wide",context:"standalone"})}},M:function(date,token,localize){const month=date.getMonth();switch(token){case"M":case"MM":return lightFormatters.M(date,token);case"Mo":return localize.ordinalNumber(month+1,{unit:"month"});case"MMM":return localize.month(month,{width:"abbreviated",context:"formatting"});case"MMMMM":return localize.month(month,{width:"narrow",context:"formatting"});case"MMMM":default:return localize.month(month,{width:"wide",context:"formatting"})}},L:function(date,token,localize){const month=date.getMonth();switch(token){case"L":return String(month+1);case"LL":return addLeadingZeros(month+1,2);case"Lo":return localize.ordinalNumber(month+1,{unit:"month"});case"LLL":return localize.month(month,{width:"abbreviated",context:"standalone"});case"LLLLL":return localize.month(month,{width:"narrow",context:"standalone"});case"LLLL":default:return localize.month(month,{width:"wide",context:"standalone"})}},w:function(date,token,localize,options){const week=getWeek(date,options);if("wo"===token)return localize.ordinalNumber(week,{unit:"week"});return addLeadingZeros(week,token.length)},I:function(date,token,localize){const isoWeek=getISOWeek(date);if("Io"===token)return localize.ordinalNumber(isoWeek,{unit:"week"});return addLeadingZeros(isoWeek,token.length)},d:function(date,token,localize){if("do"===token)return localize.ordinalNumber(date.getDate(),{unit:"date"});return lightFormatters.d(date,token)},D:function(date,token,localize){const dayOfYear=getDayOfYear(date);if("Do"===token)return localize.ordinalNumber(dayOfYear,{unit:"dayOfYear"});return addLeadingZeros(dayOfYear,token.length)},E:function(date,token,localize){const dayOfWeek=date.getDay();switch(token){case"E":case"EE":case"EEE":return localize.day(dayOfWeek,{width:"abbreviated",context:"formatting"});case"EEEEE":return localize.day(dayOfWeek,{width:"narrow",context:"formatting"});case"EEEEEE":return localize.day(dayOfWeek,{width:"short",context:"formatting"});case"EEEE":default:return localize.day(dayOfWeek,{width:"wide",context:"formatting"})}},e:function(date,token,localize,options){const dayOfWeek=date.getDay();const localDayOfWeek=(dayOfWeek-options.weekStartsOn+8)%7||7;switch(token){case"e":return String(localDayOfWeek);case"ee":return addLeadingZeros(localDayOfWeek,2);case"eo":return localize.ordinalNumber(localDayOfWeek,{unit:"day"});case"eee":return localize.day(dayOfWeek,{width:"abbreviated",context:"formatting"});case"eeeee":return localize.day(dayOfWeek,{width:"narrow",context:"formatting"});case"eeeeee":return localize.day(dayOfWeek,{width:"short",context:"formatting"});case"eeee":default:return localize.day(dayOfWeek,{width:"wide",context:"formatting"})}},c:function(date,token,localize,options){const dayOfWeek=date.getDay();const localDayOfWeek=(dayOfWeek-options.weekStartsOn+8)%7||7;switch(token){case"c":return String(localDayOfWeek);case"cc":return addLeadingZeros(localDayOfWeek,token.length);case"co":return localize.ordinalNumber(localDayOfWeek,{unit:"day"});case"ccc":return localize.day(dayOfWeek,{width:"abbreviated",context:"standalone"});case"ccccc":return localize.day(dayOfWeek,{width:"narrow",context:"standalone"});case"cccccc":return localize.day(dayOfWeek,{width:"short",context:"standalone"});case"cccc":default:return localize.day(dayOfWeek,{width:"wide",context:"standalone"})}},i:function(date,token,localize){const dayOfWeek=date.getDay();const isoDayOfWeek=0===dayOfWeek?7:dayOfWeek;switch(token){case"i":return String(isoDayOfWeek);case"ii":return addLeadingZeros(isoDayOfWeek,token.length);case"io":return localize.ordinalNumber(isoDayOfWeek,{unit:"day"});case"iii":return localize.day(dayOfWeek,{width:"abbreviated",context:"formatting"});case"iiiii":return localize.day(dayOfWeek,{width:"narrow",context:"formatting"});case"iiiiii":return localize.day(dayOfWeek,{width:"short",context:"formatting"});case"iiii":default:return localize.day(dayOfWeek,{width:"wide",context:"formatting"})}},a:function(date,token,localize){const hours=date.getHours();const dayPeriodEnumValue=hours/12>=1?"pm":"am";switch(token){case"a":case"aa":return localize.dayPeriod(dayPeriodEnumValue,{width:"abbreviated",context:"formatting"});case"aaa":return localize.dayPeriod(dayPeriodEnumValue,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return localize.dayPeriod(dayPeriodEnumValue,{width:"narrow",context:"formatting"});case"aaaa":default:return localize.dayPeriod(dayPeriodEnumValue,{width:"wide",context:"formatting"})}},b:function(date,token,localize){const hours=date.getHours();let dayPeriodEnumValue;dayPeriodEnumValue=12===hours?dayPeriodEnum.noon:0===hours?dayPeriodEnum.midnight:hours/12>=1?"pm":"am";switch(token){case"b":case"bb":return localize.dayPeriod(dayPeriodEnumValue,{width:"abbreviated",context:"formatting"});case"bbb":return localize.dayPeriod(dayPeriodEnumValue,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return localize.dayPeriod(dayPeriodEnumValue,{width:"narrow",context:"formatting"});case"bbbb":default:return localize.dayPeriod(dayPeriodEnumValue,{width:"wide",context:"formatting"})}},B:function(date,token,localize){const hours=date.getHours();let dayPeriodEnumValue;dayPeriodEnumValue=hours>=17?dayPeriodEnum.evening:hours>=12?dayPeriodEnum.afternoon:hours>=4?dayPeriodEnum.morning:dayPeriodEnum.night;switch(token){case"B":case"BB":case"BBB":return localize.dayPeriod(dayPeriodEnumValue,{width:"abbreviated",context:"formatting"});case"BBBBB":return localize.dayPeriod(dayPeriodEnumValue,{width:"narrow",context:"formatting"});case"BBBB":default:return localize.dayPeriod(dayPeriodEnumValue,{width:"wide",context:"formatting"})}},h:function(date,token,localize){if("ho"===token){let hours=date.getHours()%12;if(0===hours)hours=12;return localize.ordinalNumber(hours,{unit:"hour"})}return lightFormatters.h(date,token)},H:function(date,token,localize){if("Ho"===token)return localize.ordinalNumber(date.getHours(),{unit:"hour"});return lightFormatters.H(date,token)},K:function(date,token,localize){const hours=date.getHours()%12;if("Ko"===token)return localize.ordinalNumber(hours,{unit:"hour"});return addLeadingZeros(hours,token.length)},k:function(date,token,localize){let hours=date.getHours();if(0===hours)hours=24;if("ko"===token)return localize.ordinalNumber(hours,{unit:"hour"});return addLeadingZeros(hours,token.length)},m:function(date,token,localize){if("mo"===token)return localize.ordinalNumber(date.getMinutes(),{unit:"minute"});return lightFormatters.m(date,token)},s:function(date,token,localize){if("so"===token)return localize.ordinalNumber(date.getSeconds(),{unit:"second"});return lightFormatters.s(date,token)},S:function(date,token){return lightFormatters.S(date,token)},X:function(date,token,_localize){const timezoneOffset=date.getTimezoneOffset();if(0===timezoneOffset)return"Z";switch(token){case"X":return formatTimezoneWithOptionalMinutes(timezoneOffset);case"XXXX":case"XX":return formatTimezone(timezoneOffset);case"XXXXX":case"XXX":default:return formatTimezone(timezoneOffset,":")}},x:function(date,token,_localize){const timezoneOffset=date.getTimezoneOffset();switch(token){case"x":return formatTimezoneWithOptionalMinutes(timezoneOffset);case"xxxx":case"xx":return formatTimezone(timezoneOffset);case"xxxxx":case"xxx":default:return formatTimezone(timezoneOffset,":")}},O:function(date,token,_localize){const timezoneOffset=date.getTimezoneOffset();switch(token){case"O":case"OO":case"OOO":return"GMT"+formatTimezoneShort(timezoneOffset,":");case"OOOO":default:return"GMT"+formatTimezone(timezoneOffset,":")}},z:function(date,token,_localize){const timezoneOffset=date.getTimezoneOffset();switch(token){case"z":case"zz":case"zzz":return"GMT"+formatTimezoneShort(timezoneOffset,":");case"zzzz":default:return"GMT"+formatTimezone(timezoneOffset,":")}},t:function(date,token,_localize){const timestamp=Math.trunc(date/1e3);return addLeadingZeros(timestamp,token.length)},T:function(date,token,_localize){return addLeadingZeros(+date,token.length)}};function formatTimezoneShort(offset,delimiter=""){const sign=offset>0?"-":"+";const absOffset=Math.abs(offset);const hours=Math.trunc(absOffset/60);const minutes=absOffset%60;if(0===minutes)return sign+String(hours);return sign+String(hours)+delimiter+addLeadingZeros(minutes,2)}function formatTimezoneWithOptionalMinutes(offset,delimiter){if(offset%60===0){const sign=offset>0?"-":"+";return sign+addLeadingZeros(Math.abs(offset)/60,2)}return formatTimezone(offset,delimiter)}function formatTimezone(offset,delimiter=""){const sign=offset>0?"-":"+";const absOffset=Math.abs(offset);const hours=addLeadingZeros(Math.trunc(absOffset/60),2);const minutes=addLeadingZeros(absOffset%60,2);return sign+hours+delimiter+minutes}const dateLongFormatter=(pattern,formatLong)=>{switch(pattern){case"P":return formatLong.date({width:"short"});case"PP":return formatLong.date({width:"medium"});case"PPP":return formatLong.date({width:"long"});case"PPPP":default:return formatLong.date({width:"full"})}};const timeLongFormatter=(pattern,formatLong)=>{switch(pattern){case"p":return formatLong.time({width:"short"});case"pp":return formatLong.time({width:"medium"});case"ppp":return formatLong.time({width:"long"});case"pppp":default:return formatLong.time({width:"full"})}};const dateTimeLongFormatter=(pattern,formatLong)=>{const matchResult=pattern.match(/(P+)(p+)?/)||[];const datePattern=matchResult[1];const timePattern=matchResult[2];if(!timePattern)return dateLongFormatter(pattern,formatLong);let dateTimeFormat;switch(datePattern){case"P":dateTimeFormat=formatLong.dateTime({width:"short"});break;case"PP":dateTimeFormat=formatLong.dateTime({width:"medium"});break;case"PPP":dateTimeFormat=formatLong.dateTime({width:"long"});break;case"PPPP":default:dateTimeFormat=formatLong.dateTime({width:"full"});break}return dateTimeFormat.replace("{{date}}",dateLongFormatter(datePattern,formatLong)).replace("{{time}}",timeLongFormatter(timePattern,formatLong))};const longFormatters={p:timeLongFormatter,P:dateTimeLongFormatter};const dayOfYearTokenRE=/^D+$/;const weekYearTokenRE=/^Y+$/;const throwTokens=["D","DD","YY","YYYY"];function isProtectedDayOfYearToken(token){return dayOfYearTokenRE.test(token)}function isProtectedWeekYearToken(token){return weekYearTokenRE.test(token)}function warnOrThrowProtectedError(token,format,input){const _message=message(token,format,input);console.warn(_message);if(throwTokens.includes(token))throw new RangeError(_message)}function message(token,format,input){const subject="Y"===token[0]?"years":"days of the month";return`Use \`${token.toLowerCase()}\` instead of \`${token}\` (in \`${format}\`) for formatting ${subject} to the input \`${input}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const formattingTokensRegExp=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g;const longFormattingTokensRegExp=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;const escapedStringRegExp=/^'([^]*?)'?$/;const doubleQuoteRegExp=/''/g;const unescapedLatinCharacterRegExp=/[a-zA-Z]/;function format_format(date,formatStr,options){const defaultOptions=getDefaultOptions();const locale=options?.locale??defaultOptions.locale??enUS;const firstWeekContainsDate=options?.firstWeekContainsDate??options?.locale?.options?.firstWeekContainsDate??defaultOptions.firstWeekContainsDate??defaultOptions.locale?.options?.firstWeekContainsDate??1;const weekStartsOn=options?.weekStartsOn??options?.locale?.options?.weekStartsOn??defaultOptions.weekStartsOn??defaultOptions.locale?.options?.weekStartsOn??0;const originalDate=toDate(date,options?.in);if(!isValid(originalDate))throw new RangeError("Invalid time value");let parts=formatStr.match(longFormattingTokensRegExp).map(substring=>{const firstCharacter=substring[0];if("p"===firstCharacter||"P"===firstCharacter){const longFormatter=longFormatters[firstCharacter];return longFormatter(substring,locale.formatLong)}return substring}).join("").match(formattingTokensRegExp).map(substring=>{if("''"===substring)return{isToken:false,value:"'"};const firstCharacter=substring[0];if("'"===firstCharacter)return{isToken:false,value:cleanEscapedString(substring)};if(formatters[firstCharacter])return{isToken:true,value:substring};if(firstCharacter.match(unescapedLatinCharacterRegExp))throw new RangeError("Format string contains an unescaped latin alphabet character `"+firstCharacter+"`");return{isToken:false,value:substring}});if(locale.localize.preprocessor)parts=locale.localize.preprocessor(originalDate,parts);const formatterOptions={firstWeekContainsDate,weekStartsOn,locale};return parts.map(part=>{if(!part.isToken)return part.value;const token=part.value;if(!options?.useAdditionalWeekYearTokens&&isProtectedWeekYearToken(token)||!options?.useAdditionalDayOfYearTokens&&isProtectedDayOfYearToken(token))warnOrThrowProtectedError(token,formatStr,String(date));const formatter=formatters[token[0]];return formatter(originalDate,token,locale.localize,formatterOptions)}).join("")}function cleanEscapedString(input){const matched=input.match(escapedStringRegExp);if(!matched)return input;return matched[1].replace(doubleQuoteRegExp,"'")}function formatDistance_formatDistance(laterDate,earlierDate,options){const defaultOptions=getDefaultOptions();const locale=options?.locale??defaultOptions.locale??enUS;const minutesInAlmostTwoDays=2520;const comparison=compareAsc(laterDate,earlierDate);if(isNaN(comparison))throw new RangeError("Invalid time value");const localizeOptions=Object.assign({},options,{addSuffix:options?.addSuffix,comparison:comparison});const[laterDate_,earlierDate_]=normalizeDates(options?.in,...comparison>0?[earlierDate,laterDate]:[laterDate,earlierDate]);const seconds=differenceInSeconds(earlierDate_,laterDate_);const offsetInSeconds=(getTimezoneOffsetInMilliseconds(earlierDate_)-getTimezoneOffsetInMilliseconds(laterDate_))/1e3;const minutes=Math.round((seconds-offsetInSeconds)/60);let months;if(minutes<2)if(options?.includeSeconds)if(seconds<5)return locale.formatDistance("lessThanXSeconds",5,localizeOptions);else if(seconds<10)return locale.formatDistance("lessThanXSeconds",10,localizeOptions);else if(seconds<20)return locale.formatDistance("lessThanXSeconds",20,localizeOptions);else if(seconds<40)return locale.formatDistance("halfAMinute",0,localizeOptions);else if(seconds<60)return locale.formatDistance("lessThanXMinutes",1,localizeOptions);else return locale.formatDistance("xMinutes",1,localizeOptions);else if(0===minutes)return locale.formatDistance("lessThanXMinutes",1,localizeOptions);else return locale.formatDistance("xMinutes",minutes,localizeOptions);if(minutes<45)return locale.formatDistance("xMinutes",minutes,localizeOptions);if(minutes<90)return locale.formatDistance("aboutXHours",1,localizeOptions);if(minutes<1440){const hours=Math.round(minutes/60);return locale.formatDistance("aboutXHours",hours,localizeOptions)}if(minutes<minutesInAlmostTwoDays)return locale.formatDistance("xDays",1,localizeOptions);else if(minutes<43200){const days=Math.round(minutes/1440);return locale.formatDistance("xDays",days,localizeOptions)}else if(minutes<86400){months=Math.round(minutes/43200);return locale.formatDistance("aboutXMonths",months,localizeOptions)}months=differenceInMonths(earlierDate_,laterDate_);if(months<12){const nearestMonth=Math.round(minutes/43200);return locale.formatDistance("xMonths",nearestMonth,localizeOptions)}{const monthsSinceStartOfYear=months%12;const years=Math.trunc(months/12);if(monthsSinceStartOfYear<3)return locale.formatDistance("aboutXYears",years,localizeOptions);if(monthsSinceStartOfYear<9)return locale.formatDistance("overXYears",years,localizeOptions);return locale.formatDistance("almostXYears",years+1,localizeOptions)}}function formatDistanceStrict(laterDate,earlierDate,options){const defaultOptions=getDefaultOptions();const locale=options?.locale??defaultOptions.locale??enUS;const comparison=compareAsc(laterDate,earlierDate);if(isNaN(comparison))throw new RangeError("Invalid time value");const localizeOptions=Object.assign({},options,{addSuffix:options?.addSuffix,comparison:comparison});const[laterDate_,earlierDate_]=normalizeDates(options?.in,...comparison>0?[earlierDate,laterDate]:[laterDate,earlierDate]);const roundingMethod=getRoundingMethod(options?.roundingMethod??"round");const milliseconds=earlierDate_.getTime()-laterDate_.getTime();const minutes=milliseconds/6e4;const timezoneOffset=getTimezoneOffsetInMilliseconds(earlierDate_)-getTimezoneOffsetInMilliseconds(laterDate_);const dstNormalizedMinutes=(milliseconds-timezoneOffset)/6e4;const defaultUnit=options?.unit;let unit;unit=defaultUnit?defaultUnit:minutes<1?"second":minutes<60?"minute":minutes<1440?"hour":dstNormalizedMinutes<43200?"day":dstNormalizedMinutes<525600?"month":"year";if("second"===unit){const seconds=roundingMethod(milliseconds/1e3);return locale.formatDistance("xSeconds",seconds,localizeOptions)}if("minute"===unit){const roundedMinutes=roundingMethod(minutes);return locale.formatDistance("xMinutes",roundedMinutes,localizeOptions)}if("hour"===unit){const hours=roundingMethod(minutes/60);return locale.formatDistance("xHours",hours,localizeOptions)}if("day"===unit){const days=roundingMethod(dstNormalizedMinutes/1440);return locale.formatDistance("xDays",days,localizeOptions)}if("month"===unit){const months=roundingMethod(dstNormalizedMinutes/43200);return 12===months&&"month"!==defaultUnit?locale.formatDistance("xYears",1,localizeOptions):locale.formatDistance("xMonths",months,localizeOptions)}else{const years=roundingMethod(dstNormalizedMinutes/525600);return locale.formatDistance("xYears",years,localizeOptions)}}function formatDistanceToNow(date,options){return formatDistance_formatDistance(date,constructNow(date),options)}function formatDistanceToNowStrict(date,options){return formatDistanceStrict(date,constructNow(date),options)}const defaultFormat=["years","months","weeks","days","hours","minutes","seconds"];function formatDuration(duration,options){const defaultOptions=getDefaultOptions();const locale=options?.locale??defaultOptions.locale??enUS;const format=options?.format??defaultFormat;const zero=options?.zero??false;const delimiter=options?.delimiter??" ";if(!locale.formatDistance)return"";const result=format.reduce((acc,unit)=>{const token=`x${unit.replace(/(^.)/,m=>m.toUpperCase())}`;const value=duration[unit];if(void 0!==value&&(zero||duration[unit]))return acc.concat(locale.formatDistance(token,value));return acc},[]).join(delimiter);return result}function formatISO(date,options){const date_=toDate(date,options?.in);if(isNaN(+date_))throw new RangeError("Invalid time value");const format=options?.format??"extended";const representation=options?.representation??"complete";let result="";let tzOffset="";const dateDelimiter="extended"===format?"-":"";const timeDelimiter="extended"===format?":":"";if("time"!==representation){const day=addLeadingZeros(date_.getDate(),2);const month=addLeadingZeros(date_.getMonth()+1,2);const year=addLeadingZeros(date_.getFullYear(),4);result=`${year}${dateDelimiter}${month}${dateDelimiter}${day}`}if("date"!==representation){const offset=date_.getTimezoneOffset();if(0!==offset){const absoluteOffset=Math.abs(offset);const hourOffset=addLeadingZeros(Math.trunc(absoluteOffset/60),2);const minuteOffset=addLeadingZeros(absoluteOffset%60,2);const sign=offset<0?"+":"-";tzOffset=`${sign}${hourOffset}:${minuteOffset}`}else tzOffset="Z";const hour=addLeadingZeros(date_.getHours(),2);const minute=addLeadingZeros(date_.getMinutes(),2);const second=addLeadingZeros(date_.getSeconds(),2);const separator=""===result?"":"T";const time=[hour,minute,second].join(timeDelimiter);result=`${result}${separator}${time}${tzOffset}`}return result}function formatISO9075(date,options){const date_=toDate(date,options?.in);if(!isValid(date_))throw new RangeError("Invalid time value");const format=options?.format??"extended";const representation=options?.representation??"complete";let result="";const dateDelimiter="extended"===format?"-":"";const timeDelimiter="extended"===format?":":"";if("time"!==representation){const day=addLeadingZeros(date_.getDate(),2);const month=addLeadingZeros(date_.getMonth()+1,2);const year=addLeadingZeros(date_.getFullYear(),4);result=`${year}${dateDelimiter}${month}${dateDelimiter}${day}`}if("date"!==representation){const hour=addLeadingZeros(date_.getHours(),2);const minute=addLeadingZeros(date_.getMinutes(),2);const second=addLeadingZeros(date_.getSeconds(),2);const separator=""===result?"":" ";result=`${result}${separator}${hour}${timeDelimiter}${minute}${timeDelimiter}${second}`}return result}function formatISODuration(duration){const{years=0,months=0,days=0,hours=0,minutes=0,seconds=0}=duration;return`P${years}Y${months}M${days}DT${hours}H${minutes}M${seconds}S`}function formatRFC3339(date,options){const date_=toDate(date,options?.in);if(!isValid(date_))throw new RangeError("Invalid time value");const fractionDigits=options?.fractionDigits??0;const day=addLeadingZeros(date_.getDate(),2);const month=addLeadingZeros(date_.getMonth()+1,2);const year=date_.getFullYear();const hour=addLeadingZeros(date_.getHours(),2);const minute=addLeadingZeros(date_.getMinutes(),2);const second=addLeadingZeros(date_.getSeconds(),2);let fractionalSecond="";if(fractionDigits>0){const milliseconds=date_.getMilliseconds();const fractionalSeconds=Math.trunc(milliseconds*Math.pow(10,fractionDigits-3));fractionalSecond="."+addLeadingZeros(fractionalSeconds,fractionDigits)}let offset="";const tzOffset=date_.getTimezoneOffset();if(0!==tzOffset){const absoluteOffset=Math.abs(tzOffset);const hourOffset=addLeadingZeros(Math.trunc(absoluteOffset/60),2);const minuteOffset=addLeadingZeros(absoluteOffset%60,2);const sign=tzOffset<0?"+":"-";offset=`${sign}${hourOffset}:${minuteOffset}`}else offset="Z";return`${year}-${month}-${day}T${hour}:${minute}:${second}${fractionalSecond}${offset}`}const formatRFC7231_days=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];const formatRFC7231_months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function formatRFC7231(date){const _date=toDate(date);if(!isValid(_date))throw new RangeError("Invalid time value");const dayName=formatRFC7231_days[_date.getUTCDay()];const dayOfMonth=addLeadingZeros(_date.getUTCDate(),2);const monthName=formatRFC7231_months[_date.getUTCMonth()];const year=_date.getUTCFullYear();const hour=addLeadingZeros(_date.getUTCHours(),2);const minute=addLeadingZeros(_date.getUTCMinutes(),2);const second=addLeadingZeros(_date.getUTCSeconds(),2);return`${dayName}, ${dayOfMonth} ${monthName} ${year} ${hour}:${minute}:${second} GMT`}function formatRelative_formatRelative(date,baseDate,options){const[date_,baseDate_]=normalizeDates(options?.in,date,baseDate);const defaultOptions=getDefaultOptions();const locale=options?.locale??defaultOptions.locale??enUS;const weekStartsOn=options?.weekStartsOn??options?.locale?.options?.weekStartsOn??defaultOptions.weekStartsOn??defaultOptions.locale?.options?.weekStartsOn??0;const diff=differenceInCalendarDays(date_,baseDate_);if(isNaN(diff))throw new RangeError("Invalid time value");let token;token=diff<-6?"other":diff<-1?"lastWeek":diff<0?"yesterday":diff<1?"today":diff<2?"tomorrow":diff<7?"nextWeek":"other";const formatStr=locale.formatRelative(token,date_,baseDate_,{locale,weekStartsOn});return format_format(date_,formatStr,{locale,weekStartsOn})}function fromUnixTime(unixTime,options){return toDate(1e3*unixTime,options?.in)}function getDate(date,options){return toDate(date,options?.in).getDate()}function getDay(date,options){return toDate(date,options?.in).getDay()}function getDaysInMonth(date,options){const _date=toDate(date,options?.in);const year=_date.getFullYear();const monthIndex=_date.getMonth();const lastDayOfMonth=constructFrom(_date,0);lastDayOfMonth.setFullYear(year,monthIndex+1,0);lastDayOfMonth.setHours(0,0,0,0);return lastDayOfMonth.getDate()}function isLeapYear_isLeapYear(date,options){const _date=toDate(date,options?.in);const year=_date.getFullYear();return year%400===0||year%4===0&&year%100!==0}function getDaysInYear(date,options){const _date=toDate(date,options?.in);if(Number.isNaN(+_date))return NaN;return isLeapYear_isLeapYear(_date)?366:365}function getDecade(date,options){const _date=toDate(date,options?.in);const year=_date.getFullYear();const decade=10*Math.floor(year/10);return decade}function getDefaultOptions_getDefaultOptions(){return Object.assign({},getDefaultOptions())}function getHours(date,options){return toDate(date,options?.in).getHours()}function getISODay(date,options){const day=toDate(date,options?.in).getDay();return 0===day?7:day}function getISOWeeksInYear(date,options){const thisYear=startOfISOWeekYear(date,options);const nextYear=startOfISOWeekYear(addWeeks(thisYear,60));const diff=nextYear-thisYear;return Math.round(diff/millisecondsInWeek)}function getMilliseconds(date){return toDate(date).getMilliseconds()}function getMinutes(date,options){return toDate(date,options?.in).getMinutes()}function getMonth(date,options){return toDate(date,options?.in).getMonth()}function getOverlappingDaysInIntervals(intervalLeft,intervalRight){const[leftStart,leftEnd]=[+toDate(intervalLeft.start),+toDate(intervalLeft.end)].sort((a,b)=>a-b);const[rightStart,rightEnd]=[+toDate(intervalRight.start),+toDate(intervalRight.end)].sort((a,b)=>a-b);const isOverlapping=leftStart<rightEnd&&rightStart<leftEnd;if(!isOverlapping)return 0;const overlapLeft=rightStart<leftStart?leftStart:rightStart;const left=overlapLeft-getTimezoneOffsetInMilliseconds(overlapLeft);const overlapRight=rightEnd>leftEnd?leftEnd:rightEnd;const right=overlapRight-getTimezoneOffsetInMilliseconds(overlapRight);return Math.ceil((right-left)/millisecondsInDay)}function getSeconds(date){return toDate(date).getSeconds()}function getTime(date){return+toDate(date)}function getUnixTime(date){return Math.trunc(toDate(date)/1e3)}function getWeekOfMonth(date,options){const defaultOptions=getDefaultOptions();const weekStartsOn=options?.weekStartsOn??options?.locale?.options?.weekStartsOn??defaultOptions.weekStartsOn??defaultOptions.locale?.options?.weekStartsOn??0;const currentDayOfMonth=getDate(toDate(date,options?.in));if(isNaN(currentDayOfMonth))return NaN;const startWeekDay=getDay(startOfMonth(date,options));let lastDayOfFirstWeek=weekStartsOn-startWeekDay;if(lastDayOfFirstWeek<=0)lastDayOfFirstWeek+=7;const remainingDaysAfterFirstWeek=currentDayOfMonth-lastDayOfFirstWeek;return Math.ceil(remainingDaysAfterFirstWeek/7)+1}function lastDayOfMonth_lastDayOfMonth(date,options){const _date=toDate(date,options?.in);const month=_date.getMonth();_date.setFullYear(_date.getFullYear(),month+1,0);_date.setHours(0,0,0,0);return toDate(_date,options?.in)}function getWeeksInMonth(date,options){const contextDate=toDate(date,options?.in);return differenceInCalendarWeeks(lastDayOfMonth_lastDayOfMonth(contextDate,options),startOfMonth(contextDate,options),options)+1}function getYear(date,options){return toDate(date,options?.in).getFullYear()}function hoursToMilliseconds(hours){return Math.trunc(hours*millisecondsInHour)}function hoursToMinutes(hours){return Math.trunc(60*hours)}function hoursToSeconds(hours){return Math.trunc(3600*hours)}function interval_interval(start,end,options){const[_start,_end]=normalizeDates(options?.in,start,end);if(isNaN(+_start))throw new TypeError("Start date is invalid");if(isNaN(+_end))throw new TypeError("End date is invalid");if(options?.assertPositive&&+_start>+_end)throw new TypeError("End date must be after start date");return{start:_start,end:_end}}function intervalToDuration(interval,options){const{start,end}=normalizeInterval(options?.in,interval);const duration={};const years=differenceInYears(end,start);if(years)duration.years=years;const remainingMonths=add(start,{years:duration.years});const months=differenceInMonths(end,remainingMonths);if(months)duration.months=months;const remainingDays=add(remainingMonths,{months:duration.months});const days=differenceInDays(end,remainingDays);if(days)duration.days=days;const remainingHours=add(remainingDays,{days:duration.days});const hours=differenceInHours(end,remainingHours);if(hours)duration.hours=hours;const remainingMinutes=add(remainingHours,{hours:duration.hours});const minutes=differenceInMinutes(end,remainingMinutes);if(minutes)duration.minutes=minutes;const remainingSeconds=add(remainingMinutes,{minutes:duration.minutes});const seconds=differenceInSeconds(end,remainingSeconds);if(seconds)duration.seconds=seconds;return duration}function intlFormat(date,formatOrLocale,localeOptions){let formatOptions;if(isFormatOptions(formatOrLocale))formatOptions=formatOrLocale;else localeOptions=formatOrLocale;return new Intl.DateTimeFormat(localeOptions?.locale,formatOptions).format(toDate(date))}function isFormatOptions(opts){return void 0!==opts&&!("locale"in opts)}function intlFormatDistance(laterDate,earlierDate,options){let value=0;let unit;const[laterDate_,earlierDate_]=normalizeDates(options?.in,laterDate,earlierDate);if(options?.unit){unit=options?.unit;if("second"===unit)value=differenceInSeconds(laterDate_,earlierDate_);else if("minute"===unit)value=differenceInMinutes(laterDate_,earlierDate_);else if("hour"===unit)value=differenceInHours(laterDate_,earlierDate_);else if("day"===unit)value=differenceInCalendarDays(laterDate_,earlierDate_);else if("week"===unit)value=differenceInCalendarWeeks(laterDate_,earlierDate_);else if("month"===unit)value=differenceInCalendarMonths(laterDate_,earlierDate_);else if("quarter"===unit)value=differenceInCalendarQuarters(laterDate_,earlierDate_);else if("year"===unit)value=differenceInCalendarYears(laterDate_,earlierDate_)}else{const diffInSeconds=differenceInSeconds(laterDate_,earlierDate_);if(Math.abs(diffInSeconds)<60){value=differenceInSeconds(laterDate_,earlierDate_);unit="second"}else if(Math.abs(diffInSeconds)<3600){value=differenceInMinutes(laterDate_,earlierDate_);unit="minute"}else if(Math.abs(diffInSeconds)<86400&&Math.abs(differenceInCalendarDays(laterDate_,earlierDate_))<1){value=differenceInHours(laterDate_,earlierDate_);unit="hour"}else if(Math.abs(diffInSeconds)<604800&&(value=differenceInCalendarDays(laterDate_,earlierDate_))&&Math.abs(value)<7)unit="day";else if(Math.abs(diffInSeconds)<secondsInMonth){value=differenceInCalendarWeeks(laterDate_,earlierDate_);unit="week"}else if(Math.abs(diffInSeconds)<secondsInQuarter){value=differenceInCalendarMonths(laterDate_,earlierDate_);unit="month"}else if(Math.abs(diffInSeconds)<secondsInYear)if(differenceInCalendarQuarters(laterDate_,earlierDate_)<4){value=differenceInCalendarQuarters(laterDate_,earlierDate_);unit="quarter"}else{value=differenceInCalendarYears(laterDate_,earlierDate_);unit="year"}else{value=differenceInCalendarYears(laterDate_,earlierDate_);unit="year"}}const rtf=new Intl.RelativeTimeFormat(options?.locale,{numeric:"auto",...options});return rtf.format(value,unit)}function isAfter(date,dateToCompare){return+toDate(date)>+toDate(dateToCompare)}function isBefore(date,dateToCompare){return+toDate(date)<+toDate(dateToCompare)}function isEqual(leftDate,rightDate){return+toDate(leftDate)===+toDate(rightDate)}function isExists(year,month,day){const date=new Date(year,month,day);return date.getFullYear()===year&&date.getMonth()===month&&date.getDate()===day}function isFirstDayOfMonth(date,options){return 1===toDate(date,options?.in).getDate()}function isFriday(date,options){return 5===toDate(date,options?.in).getDay()}function isFuture(date){return+toDate(date)>Date.now()}function transpose(date,constructor){const date_=isConstructor(constructor)?new constructor(0):constructFrom(constructor,0);date_.setFullYear(date.getFullYear(),date.getMonth(),date.getDate());date_.setHours(date.getHours(),date.getMinutes(),date.getSeconds(),date.getMilliseconds());return date_}function isConstructor(constructor){return"function"==typeof constructor&&constructor.prototype?.constructor===constructor}const TIMEZONE_UNIT_PRIORITY=10;class Setter{subPriority=0;validate(_utcDate,_options){return true}}class ValueSetter extends Setter{constructor(value,validateValue,setValue,priority,subPriority){super();this.value=value;this.validateValue=validateValue;this.setValue=setValue;this.priority=priority;if(subPriority)this.subPriority=subPriority}validate(date,options){return this.validateValue(date,this.value,options)}set(date,flags,options){return this.setValue(date,flags,this.value,options)}}class DateTimezoneSetter extends Setter{priority=TIMEZONE_UNIT_PRIORITY;subPriority=-1;constructor(context,reference){super();this.context=context||(date=>constructFrom(reference,date))}set(date,flags){if(flags.timestampIsSet)return date;return constructFrom(date,transpose(date,this.context))}}class Parser{run(dateString,token,match,options){const result=this.parse(dateString,token,match,options);if(!result)return null;return{setter:new ValueSetter(result.value,this.validate,this.set,this.priority,this.subPriority),rest:result.rest}}validate(_utcDate,_value,_options){return true}}class EraParser extends Parser{priority=140;parse(dateString,token,match){switch(token){case"G":case"GG":case"GGG":return match.era(dateString,{width:"abbreviated"})||match.era(dateString,{width:"narrow"});case"GGGGG":return match.era(dateString,{width:"narrow"});case"GGGG":default:return match.era(dateString,{width:"wide"})||match.era(dateString,{width:"abbreviated"})||match.era(dateString,{width:"narrow"})}}set(date,flags,value){flags.era=value;date.setFullYear(value,0,1);date.setHours(0,0,0,0);return date}incompatibleTokens=["R","u","t","T"]}const numericPatterns={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/};const timezonePatterns={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function mapValue(parseFnResult,mapFn){if(!parseFnResult)return parseFnResult;return{value:mapFn(parseFnResult.value),rest:parseFnResult.rest}}function parseNumericPattern(pattern,dateString){const matchResult=dateString.match(pattern);if(!matchResult)return null;return{value:parseInt(matchResult[0],10),rest:dateString.slice(matchResult[0].length)}}function parseTimezonePattern(pattern,dateString){const matchResult=dateString.match(pattern);if(!matchResult)return null;if("Z"===matchResult[0])return{value:0,rest:dateString.slice(1)};const sign="+"===matchResult[1]?1:-1;const hours=matchResult[2]?parseInt(matchResult[2],10):0;const minutes=matchResult[3]?parseInt(matchResult[3],10):0;const seconds=matchResult[5]?parseInt(matchResult[5],10):0;return{value:sign*(hours*millisecondsInHour+6e4*minutes+1e3*seconds),rest:dateString.slice(matchResult[0].length)}}function parseAnyDigitsSigned(dateString){return parseNumericPattern(numericPatterns.anyDigitsSigned,dateString)}function parseNDigits(n,dateString){switch(n){case 1:return parseNumericPattern(numericPatterns.singleDigit,dateString);case 2:return parseNumericPattern(numericPatterns.twoDigits,dateString);case 3:return parseNumericPattern(numericPatterns.threeDigits,dateString);case 4:return parseNumericPattern(numericPatterns.fourDigits,dateString);default:return parseNumericPattern(new RegExp("^\\d{1,"+n+"}"),dateString)}}function parseNDigitsSigned(n,dateString){switch(n){case 1:return parseNumericPattern(numericPatterns.singleDigitSigned,dateString);case 2:return parseNumericPattern(numericPatterns.twoDigitsSigned,dateString);case 3:return parseNumericPattern(numericPatterns.threeDigitsSigned,dateString);case 4:return parseNumericPattern(numericPatterns.fourDigitsSigned,dateString);default:return parseNumericPattern(new RegExp("^-?\\d{1,"+n+"}"),dateString)}}function dayPeriodEnumToHours(dayPeriod){switch(dayPeriod){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function normalizeTwoDigitYear(twoDigitYear,currentYear){const isCommonEra=currentYear>0;const absCurrentYear=isCommonEra?currentYear:1-currentYear;let result;if(absCurrentYear<=50)result=twoDigitYear||100;else{const rangeEnd=absCurrentYear+50;const rangeEndCentury=100*Math.trunc(rangeEnd/100);const isPreviousCentury=twoDigitYear>=rangeEnd%100;result=twoDigitYear+rangeEndCentury-(isPreviousCentury?100:0)}return isCommonEra?result:1-result}function isLeapYearIndex(year){return year%400===0||year%4===0&&year%100!==0}class YearParser extends Parser{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(dateString,token,match){const valueCallback=year=>({year,isTwoDigitYear:"yy"===token});switch(token){case"y":return mapValue(parseNDigits(4,dateString),valueCallback);case"yo":return mapValue(match.ordinalNumber(dateString,{unit:"year"}),valueCallback);default:return mapValue(parseNDigits(token.length,dateString),valueCallback)}}validate(_date,value){return value.isTwoDigitYear||value.year>0}set(date,flags,value){const currentYear=date.getFullYear();if(value.isTwoDigitYear){const normalizedTwoDigitYear=normalizeTwoDigitYear(value.year,currentYear);date.setFullYear(normalizedTwoDigitYear,0,1);date.setHours(0,0,0,0);return date}const year="era"in flags&&1!==flags.era?1-value.year:value.year;date.setFullYear(year,0,1);date.setHours(0,0,0,0);return date}}class LocalWeekYearParser extends Parser{priority=130;parse(dateString,token,match){const valueCallback=year=>({year,isTwoDigitYear:"YY"===token});switch(token){case"Y":return mapValue(parseNDigits(4,dateString),valueCallback);case"Yo":return mapValue(match.ordinalNumber(dateString,{unit:"year"}),valueCallback);default:return mapValue(parseNDigits(token.length,dateString),valueCallback)}}validate(_date,value){return value.isTwoDigitYear||value.year>0}set(date,flags,value,options){const currentYear=getWeekYear(date,options);if(value.isTwoDigitYear){const normalizedTwoDigitYear=normalizeTwoDigitYear(value.year,currentYear);date.setFullYear(normalizedTwoDigitYear,0,options.firstWeekContainsDate);date.setHours(0,0,0,0);return startOfWeek(date,options)}const year="era"in flags&&1!==flags.era?1-value.year:value.year;date.setFullYear(year,0,options.firstWeekContainsDate);date.setHours(0,0,0,0);return startOfWeek(date,options)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]}class ISOWeekYearParser extends Parser{priority=130;parse(dateString,token){if("R"===token)return parseNDigitsSigned(4,dateString);return parseNDigitsSigned(token.length,dateString)}set(date,_flags,value){const firstWeekOfYear=constructFrom(date,0);firstWeekOfYear.setFullYear(value,0,4);firstWeekOfYear.setHours(0,0,0,0);return startOfISOWeek(firstWeekOfYear)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]}class ExtendedYearParser extends Parser{priority=130;parse(dateString,token){if("u"===token)return parseNDigitsSigned(4,dateString);return parseNDigitsSigned(token.length,dateString)}set(date,_flags,value){date.setFullYear(value,0,1);date.setHours(0,0,0,0);return date}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]}class QuarterParser extends Parser{priority=120;parse(dateString,token,match){switch(token){case"Q":case"QQ":return parseNDigits(token.length,dateString);case"Qo":return match.ordinalNumber(dateString,{unit:"quarter"});case"QQQ":return match.quarter(dateString,{width:"abbreviated",context:"formatting"})||match.quarter(dateString,{width:"narrow",context:"formatting"});case"QQQQQ":return match.quarter(dateString,{width:"narrow",context:"formatting"});case"QQQQ":default:return match.quarter(dateString,{width:"wide",context:"formatting"})||match.quarter(dateString,{width:"abbreviated",context:"formatting"})||match.quarter(dateString,{width:"narrow",context:"formatting"})}}validate(_date,value){return value>=1&&value<=4}set(date,_flags,value){date.setMonth((value-1)*3,1);date.setHours(0,0,0,0);return date}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]}class StandAloneQuarterParser extends Parser{priority=120;parse(dateString,token,match){switch(token){case"q":case"qq":return parseNDigits(token.length,dateString);case"qo":return match.ordinalNumber(dateString,{unit:"quarter"});case"qqq":return match.quarter(dateString,{width:"abbreviated",context:"standalone"})||match.quarter(dateString,{width:"narrow",context:"standalone"});case"qqqqq":return match.quarter(dateString,{width:"narrow",context:"standalone"});case"qqqq":default:return match.quarter(dateString,{width:"wide",context:"standalone"})||match.quarter(dateString,{width:"abbreviated",context:"standalone"})||match.quarter(dateString,{width:"narrow",context:"standalone"})}}validate(_date,value){return value>=1&&value<=4}set(date,_flags,value){date.setMonth((value-1)*3,1);date.setHours(0,0,0,0);return date}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]}class MonthParser extends Parser{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(dateString,token,match){const valueCallback=value=>value-1;switch(token){case"M":return mapValue(parseNumericPattern(numericPatterns.month,dateString),valueCallback);case"MM":return mapValue(parseNDigits(2,dateString),valueCallback);case"Mo":return mapValue(match.ordinalNumber(dateString,{unit:"month"}),valueCallback);case"MMM":return match.month(dateString,{width:"abbreviated",context:"formatting"})||match.month(dateString,{width:"narrow",context:"formatting"});case"MMMMM":return match.month(dateString,{width:"narrow",context:"formatting"});case"MMMM":default:return match.month(dateString,{width:"wide",context:"formatting"})||match.month(dateString,{width:"abbreviated",context:"formatting"})||match.month(dateString,{width:"narrow",context:"formatting"})}}validate(_date,value){return value>=0&&value<=11}set(date,_flags,value){date.setMonth(value,1);date.setHours(0,0,0,0);return date}}class StandAloneMonthParser extends Parser{priority=110;parse(dateString,token,match){const valueCallback=value=>value-1;switch(token){case"L":return mapValue(parseNumericPattern(numericPatterns.month,dateString),valueCallback);case"LL":return mapValue(parseNDigits(2,dateString),valueCallback);case"Lo":return mapValue(match.ordinalNumber(dateString,{unit:"month"}),valueCallback);case"LLL":return match.month(dateString,{width:"abbreviated",context:"standalone"})||match.month(dateString,{width:"narrow",context:"standalone"});case"LLLLL":return match.month(dateString,{width:"narrow",context:"standalone"});case"LLLL":default:return match.month(dateString,{width:"wide",context:"standalone"})||match.month(dateString,{width:"abbreviated",context:"standalone"})||match.month(dateString,{width:"narrow",context:"standalone"})}}validate(_date,value){return value>=0&&value<=11}set(date,_flags,value){date.setMonth(value,1);date.setHours(0,0,0,0);return date}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]}function setWeek(date,week,options){const date_=toDate(date,options?.in);const diff=getWeek(date_,options)-week;date_.setDate(date_.getDate()-7*diff);return toDate(date_,options?.in)}class LocalWeekParser extends Parser{priority=100;parse(dateString,token,match){switch(token){case"w":return parseNumericPattern(numericPatterns.week,dateString);case"wo":return match.ordinalNumber(dateString,{unit:"week"});default:return parseNDigits(token.length,dateString)}}validate(_date,value){return value>=1&&value<=53}set(date,_flags,value,options){return startOfWeek(setWeek(date,value,options),options)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]}function setISOWeek(date,week,options){const _date=toDate(date,options?.in);const diff=getISOWeek(_date,options)-week;_date.setDate(_date.getDate()-7*diff);return _date}class ISOWeekParser extends Parser{priority=100;parse(dateString,token,match){switch(token){case"I":return parseNumericPattern(numericPatterns.week,dateString);case"Io":return match.ordinalNumber(dateString,{unit:"week"});default:return parseNDigits(token.length,dateString)}}validate(_date,value){return value>=1&&value<=53}set(date,_flags,value){return startOfISOWeek(setISOWeek(date,value))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]}const DAYS_IN_MONTH=[31,28,31,30,31,30,31,31,30,31,30,31];const DAYS_IN_MONTH_LEAP_YEAR=[31,29,31,30,31,30,31,31,30,31,30,31];class DateParser extends Parser{priority=90;subPriority=1;parse(dateString,token,match){switch(token){case"d":return parseNumericPattern(numericPatterns.date,dateString);case"do":return match.ordinalNumber(dateString,{unit:"date"});default:return parseNDigits(token.length,dateString)}}validate(date,value){const year=date.getFullYear();const isLeapYear=isLeapYearIndex(year);const month=date.getMonth();if(isLeapYear)return value>=1&&value<=DAYS_IN_MONTH_LEAP_YEAR[month];return value>=1&&value<=DAYS_IN_MONTH[month]}set(date,_flags,value){date.setDate(value);date.setHours(0,0,0,0);return date}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]}class DayOfYearParser extends Parser{priority=90;subpriority=1;parse(dateString,token,match){switch(token){case"D":case"DD":return parseNumericPattern(numericPatterns.dayOfYear,dateString);case"Do":return match.ordinalNumber(dateString,{unit:"date"});default:return parseNDigits(token.length,dateString)}}validate(date,value){const year=date.getFullYear();const isLeapYear=isLeapYearIndex(year);if(isLeapYear)return value>=1&&value<=366;return value>=1&&value<=365}set(date,_flags,value){date.setMonth(0,value);date.setHours(0,0,0,0);return date}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]}function setDay(date,day,options){const defaultOptions=getDefaultOptions();const weekStartsOn=options?.weekStartsOn??options?.locale?.options?.weekStartsOn??defaultOptions.weekStartsOn??defaultOptions.locale?.options?.weekStartsOn??0;const date_=toDate(date,options?.in);const currentDay=date_.getDay();const remainder=day%7;const dayIndex=(remainder+7)%7;const delta=7-weekStartsOn;const diff=day<0||day>6?day-(currentDay+delta)%7:(dayIndex+delta)%7-(currentDay+delta)%7;return addDays(date_,diff,options)}class DayParser extends Parser{priority=90;parse(dateString,token,match){switch(token){case"E":case"EE":case"EEE":return match.day(dateString,{width:"abbreviated",context:"formatting"})||match.day(dateString,{width:"short",context:"formatting"})||match.day(dateString,{width:"narrow",context:"formatting"});case"EEEEE":return match.day(dateString,{width:"narrow",context:"formatting"});case"EEEEEE":return match.day(dateString,{width:"short",context:"formatting"})||match.day(dateString,{width:"narrow",context:"formatting"});case"EEEE":default:return match.day(dateString,{width:"wide",context:"formatting"})||match.day(dateString,{width:"abbreviated",context:"formatting"})||match.day(dateString,{width:"short",context:"formatting"})||match.day(dateString,{width:"narrow",context:"formatting"})}}validate(_date,value){return value>=0&&value<=6}set(date,_flags,value,options){date=setDay(date,value,options);date.setHours(0,0,0,0);return date}incompatibleTokens=["D","i","e","c","t","T"]}class LocalDayParser extends Parser{priority=90;parse(dateString,token,match,options){const valueCallback=value=>{const wholeWeekDays=7*Math.floor((value-1)/7);return(value+options.weekStartsOn+6)%7+wholeWeekDays};switch(token){case"e":case"ee":return mapValue(parseNDigits(token.length,dateString),valueCallback);case"eo":return mapValue(match.ordinalNumber(dateString,{unit:"day"}),valueCallback);case"eee":return match.day(dateString,{width:"abbreviated",context:"formatting"})||match.day(dateString,{width:"short",context:"formatting"})||match.day(dateString,{width:"narrow",context:"formatting"});case"eeeee":return match.day(dateString,{width:"narrow",context:"formatting"});case"eeeeee":return match.day(dateString,{width:"short",context:"formatting"})||match.day(dateString,{width:"narrow",context:"formatting"});case"eeee":default:return match.day(dateString,{width:"wide",context:"formatting"})||match.day(dateString,{width:"abbreviated",context:"formatting"})||match.day(dateString,{width:"short",context:"formatting"})||match.day(dateString,{width:"narrow",context:"formatting"})}}validate(_date,value){return value>=0&&value<=6}set(date,_flags,value,options){date=setDay(date,value,options);date.setHours(0,0,0,0);return date}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]}class StandAloneLocalDayParser extends Parser{priority=90;parse(dateString,token,match,options){const valueCallback=value=>{const wholeWeekDays=7*Math.floor((value-1)/7);return(value+options.weekStartsOn+6)%7+wholeWeekDays};switch(token){case"c":case"cc":return mapValue(parseNDigits(token.length,dateString),valueCallback);case"co":return mapValue(match.ordinalNumber(dateString,{unit:"day"}),valueCallback);case"ccc":return match.day(dateString,{width:"abbreviated",context:"standalone"})||match.day(dateString,{width:"short",context:"standalone"})||match.day(dateString,{width:"narrow",context:"standalone"});case"ccccc":return match.day(dateString,{width:"narrow",context:"standalone"});case"cccccc":return match.day(dateString,{width:"short",context:"standalone"})||match.day(dateString,{width:"narrow",context:"standalone"});case"cccc":default:return match.day(dateString,{width:"wide",context:"standalone"})||match.day(dateString,{width:"abbreviated",context:"standalone"})||match.day(dateString,{width:"short",context:"standalone"})||match.day(dateString,{width:"narrow",context:"standalone"})}}validate(_date,value){return value>=0&&value<=6}set(date,_flags,value,options){date=setDay(date,value,options);date.setHours(0,0,0,0);return date}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]}function setISODay(date,day,options){const date_=toDate(date,options?.in);const currentDay=getISODay(date_,options);const diff=day-currentDay;return addDays(date_,diff,options)}class ISODayParser extends Parser{priority=90;parse(dateString,token,match){const valueCallback=value=>{if(0===value)return 7;return value};switch(token){case"i":case"ii":return parseNDigits(token.length,dateString);case"io":return match.ordinalNumber(dateString,{unit:"day"});case"iii":return mapValue(match.day(dateString,{width:"abbreviated",context:"formatting"})||match.day(dateString,{width:"short",context:"formatting"})||match.day(dateString,{width:"narrow",context:"formatting"}),valueCallback);case"iiiii":return mapValue(match.day(dateString,{width:"narrow",context:"formatting"}),valueCallback);case"iiiiii":return mapValue(match.day(dateString,{width:"short",context:"formatting"})||match.day(dateString,{width:"narrow",context:"formatting"}),valueCallback);case"iiii":default:return mapValue(match.day(dateString,{width:"wide",context:"formatting"})||match.day(dateString,{width:"abbreviated",context:"formatting"})||match.day(dateString,{width:"short",context:"formatting"})||match.day(dateString,{width:"narrow",context:"formatting"}),valueCallback)}}validate(_date,value){return value>=1&&value<=7}set(date,_flags,value){date=setISODay(date,value);date.setHours(0,0,0,0);return date}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]}class AMPMParser extends Parser{priority=80;parse(dateString,token,match){switch(token){case"a":case"aa":case"aaa":return match.dayPeriod(dateString,{width:"abbreviated",context:"formatting"})||match.dayPeriod(dateString,{width:"narrow",context:"formatting"});case"aaaaa":return match.dayPeriod(dateString,{width:"narrow",context:"formatting"});case"aaaa":default:return match.dayPeriod(dateString,{width:"wide",context:"formatting"})||match.dayPeriod(dateString,{width:"abbreviated",context:"formatting"})||match.dayPeriod(dateString,{width:"narrow",context:"formatting"})}}set(date,_flags,value){date.setHours(dayPeriodEnumToHours(value),0,0,0);return date}incompatibleTokens=["b","B","H","k","t","T"]}class AMPMMidnightParser extends Parser{priority=80;parse(dateString,token,match){switch(token){case"b":case"bb":case"bbb":return match.dayPeriod(dateString,{width:"abbreviated",context:"formatting"})||match.dayPeriod(dateString,{width:"narrow",context:"formatting"});case"bbbbb":return match.dayPeriod(dateString,{width:"narrow",context:"formatting"});case"bbbb":default:return match.dayPeriod(dateString,{width:"wide",context:"formatting"})||match.dayPeriod(dateString,{width:"abbreviated",context:"formatting"})||match.dayPeriod(dateString,{width:"narrow",context:"formatting"})}}set(date,_flags,value){date.setHours(dayPeriodEnumToHours(value),0,0,0);return date}incompatibleTokens=["a","B","H","k","t","T"]}class DayPeriodParser extends Parser{priority=80;parse(dateString,token,match){switch(token){case"B":case"BB":case"BBB":return match.dayPeriod(dateString,{width:"abbreviated",context:"formatting"})||match.dayPeriod(dateString,{width:"narrow",context:"formatting"});case"BBBBB":return match.dayPeriod(dateString,{width:"narrow",context:"formatting"});case"BBBB":default:return match.dayPeriod(dateString,{width:"wide",context:"formatting"})||match.dayPeriod(dateString,{width:"abbreviated",context:"formatting"})||match.dayPeriod(dateString,{width:"narrow",context:"formatting"})}}set(date,_flags,value){date.setHours(dayPeriodEnumToHours(value),0,0,0);return date}incompatibleTokens=["a","b","t","T"]}class Hour1to12Parser extends Parser{priority=70;parse(dateString,token,match){switch(token){case"h":return parseNumericPattern(numericPatterns.hour12h,dateString);case"ho":return match.ordinalNumber(dateString,{unit:"hour"});default:return parseNDigits(token.length,dateString)}}validate(_date,value){return value>=1&&value<=12}set(date,_flags,value){const isPM=date.getHours()>=12;if(isPM&&value<12)date.setHours(value+12,0,0,0);else if(isPM||12!==value)date.setHours(value,0,0,0);else date.setHours(0,0,0,0);return date}incompatibleTokens=["H","K","k","t","T"]}class Hour0to23Parser extends Parser{priority=70;parse(dateString,token,match){switch(token){case"H":return parseNumericPattern(numericPatterns.hour23h,dateString);case"Ho":return match.ordinalNumber(dateString,{unit:"hour"});default:return parseNDigits(token.length,dateString)}}validate(_date,value){return value>=0&&value<=23}set(date,_flags,value){date.setHours(value,0,0,0);return date}incompatibleTokens=["a","b","h","K","k","t","T"]}class Hour0To11Parser extends Parser{priority=70;parse(dateString,token,match){switch(token){case"K":return parseNumericPattern(numericPatterns.hour11h,dateString);case"Ko":return match.ordinalNumber(dateString,{unit:"hour"});default:return parseNDigits(token.length,dateString)}}validate(_date,value){return value>=0&&value<=11}set(date,_flags,value){const isPM=date.getHours()>=12;if(isPM&&value<12)date.setHours(value+12,0,0,0);else date.setHours(value,0,0,0);return date}incompatibleTokens=["h","H","k","t","T"]}class Hour1To24Parser extends Parser{priority=70;parse(dateString,token,match){switch(token){case"k":return parseNumericPattern(numericPatterns.hour24h,dateString);case"ko":return match.ordinalNumber(dateString,{unit:"hour"});default:return parseNDigits(token.length,dateString)}}validate(_date,value){return value>=1&&value<=24}set(date,_flags,value){const hours=value<=24?value%24:value;date.setHours(hours,0,0,0);return date}incompatibleTokens=["a","b","h","H","K","t","T"]}class MinuteParser extends Parser{priority=60;parse(dateString,token,match){switch(token){case"m":return parseNumericPattern(numericPatterns.minute,dateString);case"mo":return match.ordinalNumber(dateString,{unit:"minute"});default:return parseNDigits(token.length,dateString)}}validate(_date,value){return value>=0&&value<=59}set(date,_flags,value){date.setMinutes(value,0,0);return date}incompatibleTokens=["t","T"]}class SecondParser extends Parser{priority=50;parse(dateString,token,match){switch(token){case"s":return parseNumericPattern(numericPatterns.second,dateString);case"so":return match.ordinalNumber(dateString,{unit:"second"});default:return parseNDigits(token.length,dateString)}}validate(_date,value){return value>=0&&value<=59}set(date,_flags,value){date.setSeconds(value,0);return date}incompatibleTokens=["t","T"]}class FractionOfSecondParser extends Parser{priority=30;parse(dateString,token){const valueCallback=value=>Math.trunc(value*Math.pow(10,-token.length+3));return mapValue(parseNDigits(token.length,dateString),valueCallback)}set(date,_flags,value){date.setMilliseconds(value);return date}incompatibleTokens=["t","T"]}class ISOTimezoneWithZParser extends Parser{priority=10;parse(dateString,token){switch(token){case"X":return parseTimezonePattern(timezonePatterns.basicOptionalMinutes,dateString);case"XX":return parseTimezonePattern(timezonePatterns.basic,dateString);case"XXXX":return parseTimezonePattern(timezonePatterns.basicOptionalSeconds,dateString);case"XXXXX":return parseTimezonePattern(timezonePatterns.extendedOptionalSeconds,dateString);case"XXX":default:return parseTimezonePattern(timezonePatterns.extended,dateString)}}set(date,flags,value){if(flags.timestampIsSet)return date;return constructFrom(date,date.getTime()-getTimezoneOffsetInMilliseconds(date)-value)}incompatibleTokens=["t","T","x"]}class ISOTimezoneParser extends Parser{priority=10;parse(dateString,token){switch(token){case"x":return parseTimezonePattern(timezonePatterns.basicOptionalMinutes,dateString);case"xx":return parseTimezonePattern(timezonePatterns.basic,dateString);case"xxxx":return parseTimezonePattern(timezonePatterns.basicOptionalSeconds,dateString);case"xxxxx":return parseTimezonePattern(timezonePatterns.extendedOptionalSeconds,dateString);case"xxx":default:return parseTimezonePattern(timezonePatterns.extended,dateString)}}set(date,flags,value){if(flags.timestampIsSet)return date;return constructFrom(date,date.getTime()-getTimezoneOffsetInMilliseconds(date)-value)}incompatibleTokens=["t","T","X"]}class TimestampSecondsParser extends Parser{priority=40;parse(dateString){return parseAnyDigitsSigned(dateString)}set(date,_flags,value){return[constructFrom(date,1e3*value),{timestampIsSet:true}]}incompatibleTokens="*"}class TimestampMillisecondsParser extends Parser{priority=20;parse(dateString){return parseAnyDigitsSigned(dateString)}set(date,_flags,value){return[constructFrom(date,value),{timestampIsSet:true}]}incompatibleTokens="*"}const parsers={G:new EraParser,y:new YearParser,Y:new LocalWeekYearParser,R:new ISOWeekYearParser,u:new ExtendedYearParser,Q:new QuarterParser,q:new StandAloneQuarterParser,M:new MonthParser,L:new StandAloneMonthParser,w:new LocalWeekParser,I:new ISOWeekParser,d:new DateParser,D:new DayOfYearParser,E:new DayParser,e:new LocalDayParser,c:new StandAloneLocalDayParser,i:new ISODayParser,a:new AMPMParser,b:new AMPMMidnightParser,B:new DayPeriodParser,h:new Hour1to12Parser,H:new Hour0to23Parser,K:new Hour0To11Parser,k:new Hour1To24Parser,m:new MinuteParser,s:new SecondParser,S:new FractionOfSecondParser,X:new ISOTimezoneWithZParser,x:new ISOTimezoneParser,t:new TimestampSecondsParser,T:new TimestampMillisecondsParser};const parse_formattingTokensRegExp=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g;const parse_longFormattingTokensRegExp=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;const parse_escapedStringRegExp=/^'([^]*?)'?$/;const parse_doubleQuoteRegExp=/''/g;const notWhitespaceRegExp=/\S/;const parse_unescapedLatinCharacterRegExp=/[a-zA-Z]/;function parse(dateStr,formatStr,referenceDate,options){const invalidDate=()=>constructFrom(options?.in||referenceDate,NaN);const defaultOptions=getDefaultOptions_getDefaultOptions();const locale=options?.locale??defaultOptions.locale??enUS;const firstWeekContainsDate=options?.firstWeekContainsDate??options?.locale?.options?.firstWeekContainsDate??defaultOptions.firstWeekContainsDate??defaultOptions.locale?.options?.firstWeekContainsDate??1;const weekStartsOn=options?.weekStartsOn??options?.locale?.options?.weekStartsOn??defaultOptions.weekStartsOn??defaultOptions.locale?.options?.weekStartsOn??0;if(!formatStr)return dateStr?invalidDate():toDate(referenceDate,options?.in);const subFnOptions={firstWeekContainsDate,weekStartsOn,locale};const setters=[new DateTimezoneSetter(options?.in,referenceDate)];const tokens=formatStr.match(parse_longFormattingTokensRegExp).map(substring=>{const firstCharacter=substring[0];if(firstCharacter in longFormatters){const longFormatter=longFormatters[firstCharacter];return longFormatter(substring,locale.formatLong)}return substring}).join("").match(parse_formattingTokensRegExp);const usedTokens=[];for(let token of tokens){if(!options?.useAdditionalWeekYearTokens&&isProtectedWeekYearToken(token))warnOrThrowProtectedError(token,formatStr,dateStr);if(!options?.useAdditionalDayOfYearTokens&&isProtectedDayOfYearToken(token))warnOrThrowProtectedError(token,formatStr,dateStr);const firstCharacter=token[0];const parser=parsers[firstCharacter];if(parser){const{incompatibleTokens}=parser;if(Array.isArray(incompatibleTokens)){const incompatibleToken=usedTokens.find(usedToken=>incompatibleTokens.includes(usedToken.token)||usedToken.token===firstCharacter);if(incompatibleToken)throw new RangeError(`The format string mustn't contain \`${incompatibleToken.fullToken}\` and \`${token}\` at the same time`)}else if("*"===parser.incompatibleTokens&&usedTokens.length>0)throw new RangeError(`The format string mustn't contain \`${token}\` and any other token at the same time`);usedTokens.push({token:firstCharacter,fullToken:token});const parseResult=parser.run(dateStr,token,locale.match,subFnOptions);if(!parseResult)return invalidDate();setters.push(parseResult.setter);dateStr=parseResult.rest}else{if(firstCharacter.match(parse_unescapedLatinCharacterRegExp))throw new RangeError("Format string contains an unescaped latin alphabet character `"+firstCharacter+"`");if("''"===token)token="'";else if("'"===firstCharacter)token=parse_cleanEscapedString(token);if(0!==dateStr.indexOf(token))return invalidDate();dateStr=dateStr.slice(token.length)}}if(dateStr.length>0&&notWhitespaceRegExp.test(dateStr))return invalidDate();const uniquePrioritySetters=setters.map(setter=>setter.priority).sort((a,b)=>b-a).filter((priority,index,array)=>array.indexOf(priority)===index).map(priority=>setters.filter(setter=>setter.priority===priority).sort((a,b)=>b.subPriority-a.subPriority)).map(setterArray=>setterArray[0]);let date=toDate(referenceDate,options?.in);if(isNaN(+date))return invalidDate();const flags={};for(const setter of uniquePrioritySetters){if(!setter.validate(date,subFnOptions))return invalidDate();const result=setter.set(date,flags,subFnOptions);if(Array.isArray(result)){date=result[0];Object.assign(flags,result[1])}else date=result}return date}function parse_cleanEscapedString(input){return input.match(parse_escapedStringRegExp)[1].replace(parse_doubleQuoteRegExp,"'")}function isMatch(dateStr,formatStr,options){return isValid(parse(dateStr,formatStr,new Date,options))}function isMonday(date,options){return 1===toDate(date,options?.in).getDay()}function isPast(date){return+toDate(date)<Date.now()}function startOfHour(date,options){const _date=toDate(date,options?.in);_date.setMinutes(0,0,0);return _date}function isSameHour(dateLeft,dateRight,options){const[dateLeft_,dateRight_]=normalizeDates(options?.in,dateLeft,dateRight);return+startOfHour(dateLeft_)===+startOfHour(dateRight_)}function isSameWeek(laterDate,earlierDate,options){const[laterDate_,earlierDate_]=normalizeDates(options?.in,laterDate,earlierDate);return+startOfWeek(laterDate_,options)===+startOfWeek(earlierDate_,options)}function isSameISOWeek(laterDate,earlierDate,options){return isSameWeek(laterDate,earlierDate,{...options,weekStartsOn:1})}function isSameISOWeekYear(laterDate,earlierDate,options){const[laterDate_,earlierDate_]=normalizeDates(options?.in,laterDate,earlierDate);return+startOfISOWeekYear(laterDate_)===+startOfISOWeekYear(earlierDate_)}function startOfMinute(date,options){const date_=toDate(date,options?.in);date_.setSeconds(0,0);return date_}function isSameMinute(laterDate,earlierDate){return+startOfMinute(laterDate)===+startOfMinute(earlierDate)}function isSameMonth(laterDate,earlierDate,options){const[laterDate_,earlierDate_]=normalizeDates(options?.in,laterDate,earlierDate);return laterDate_.getFullYear()===earlierDate_.getFullYear()&&laterDate_.getMonth()===earlierDate_.getMonth()}function isSameQuarter(laterDate,earlierDate,options){const[dateLeft_,dateRight_]=normalizeDates(options?.in,laterDate,earlierDate);return+startOfQuarter(dateLeft_)===+startOfQuarter(dateRight_)}function startOfSecond(date,options){const date_=toDate(date,options?.in);date_.setMilliseconds(0);return date_}function isSameSecond(laterDate,earlierDate){return+startOfSecond(laterDate)===+startOfSecond(earlierDate)}function isSameYear(laterDate,earlierDate,options){const[laterDate_,earlierDate_]=normalizeDates(options?.in,laterDate,earlierDate);return laterDate_.getFullYear()===earlierDate_.getFullYear()}function isThisHour(date,options){return isSameHour(toDate(date,options?.in),constructNow(options?.in||date))}function isThisISOWeek(date,options){return isSameISOWeek(constructFrom(options?.in||date,date),constructNow(options?.in||date))}function isThisMinute(date){return isSameMinute(date,constructNow(date))}function isThisMonth(date,options){return isSameMonth(constructFrom(options?.in||date,date),constructNow(options?.in||date))}function isThisQuarter(date,options){return isSameQuarter(constructFrom(options?.in||date,date),constructNow(options?.in||date))}function isThisSecond(date){return isSameSecond(date,constructNow(date))}function isThisWeek(date,options){return isSameWeek(constructFrom(options?.in||date,date),constructNow(options?.in||date),options)}function isThisYear(date,options){return isSameYear(constructFrom(options?.in||date,date),constructNow(options?.in||date))}function isThursday(date,options){return 4===toDate(date,options?.in).getDay()}function isToday(date,options){return isSameDay(constructFrom(options?.in||date,date),constructNow(options?.in||date))}function isTomorrow(date,options){return isSameDay(date,addDays(constructNow(options?.in||date),1),options)}function isTuesday(date,options){return 2===toDate(date,options?.in).getDay()}function isWednesday(date,options){return 3===toDate(date,options?.in).getDay()}function isWithinInterval(date,interval,options){const time=+toDate(date,options?.in);const[startTime,endTime]=[+toDate(interval.start,options?.in),+toDate(interval.end,options?.in)].sort((a,b)=>a-b);return time>=startTime&&time<=endTime}function subDays(date,amount,options){return addDays(date,-amount,options)}function isYesterday(date,options){return isSameDay(constructFrom(options?.in||date,date),subDays(constructNow(options?.in||date),1))}function lastDayOfDecade(date,options){const _date=toDate(date,options?.in);const year=_date.getFullYear();const decade=9+10*Math.floor(year/10);_date.setFullYear(decade+1,0,0);_date.setHours(0,0,0,0);return toDate(_date,options?.in)}function lastDayOfWeek(date,options){const defaultOptions=getDefaultOptions();const weekStartsOn=options?.weekStartsOn??options?.locale?.options?.weekStartsOn??defaultOptions.weekStartsOn??defaultOptions.locale?.options?.weekStartsOn??0;const _date=toDate(date,options?.in);const day=_date.getDay();const diff=(day<weekStartsOn?-7:0)+6-(day-weekStartsOn);_date.setHours(0,0,0,0);_date.setDate(_date.getDate()+diff);return _date}function lastDayOfISOWeek(date,options){return lastDayOfWeek(date,{...options,weekStartsOn:1})}function lastDayOfISOWeekYear(date,options){const year=getISOWeekYear(date,options);const fourthOfJanuary=constructFrom(options?.in||date,0);fourthOfJanuary.setFullYear(year+1,0,4);fourthOfJanuary.setHours(0,0,0,0);const date_=startOfISOWeek(fourthOfJanuary,options);date_.setDate(date_.getDate()-1);return date_}function lastDayOfQuarter(date,options){const date_=toDate(date,options?.in);const currentMonth=date_.getMonth();const month=currentMonth-currentMonth%3+3;date_.setMonth(month,0);date_.setHours(0,0,0,0);return date_}function lastDayOfYear(date,options){const date_=toDate(date,options?.in);const year=date_.getFullYear();date_.setFullYear(year+1,0,0);date_.setHours(0,0,0,0);return date_}const lightFormat_formattingTokensRegExp=/(\w)\1*|''|'(''|[^'])+('|$)|./g;const lightFormat_escapedStringRegExp=/^'([^]*?)'?$/;const lightFormat_doubleQuoteRegExp=/''/g;const lightFormat_unescapedLatinCharacterRegExp=/[a-zA-Z]/;function lightFormat(date,formatStr){const date_=toDate(date);if(!isValid(date_))throw new RangeError("Invalid time value");const tokens=formatStr.match(lightFormat_formattingTokensRegExp);if(!tokens)return"";const result=tokens.map(substring=>{if("''"===substring)return"'";const firstCharacter=substring[0];if("'"===firstCharacter)return lightFormat_cleanEscapedString(substring);const formatter=lightFormatters[firstCharacter];if(formatter)return formatter(date_,substring);if(firstCharacter.match(lightFormat_unescapedLatinCharacterRegExp))throw new RangeError("Format string contains an unescaped latin alphabet character `"+firstCharacter+"`");return substring}).join("");return result}function lightFormat_cleanEscapedString(input){const matches=input.match(lightFormat_escapedStringRegExp);if(!matches)return input;return matches[1].replace(lightFormat_doubleQuoteRegExp,"'")}function milliseconds_milliseconds({years,months,weeks,days,hours,minutes,seconds}){let totalDays=0;if(years)totalDays+=years*daysInYear;if(months)totalDays+=daysInYear/12*months;if(weeks)totalDays+=7*weeks;if(days)totalDays+=days;let totalSeconds=24*totalDays*3600;if(hours)totalSeconds+=60*hours*60;if(minutes)totalSeconds+=60*minutes;if(seconds)totalSeconds+=seconds;return Math.trunc(1e3*totalSeconds)}function millisecondsToHours(milliseconds){const hours=milliseconds/millisecondsInHour;return Math.trunc(hours)}function millisecondsToMinutes(milliseconds){const minutes=milliseconds/6e4;return Math.trunc(minutes)}function millisecondsToSeconds(milliseconds){const seconds=milliseconds/1e3;return Math.trunc(seconds)}function minutesToHours(minutes){const hours=minutes/60;return Math.trunc(hours)}function minutesToMilliseconds(minutes){return Math.trunc(6e4*minutes)}function minutesToSeconds(minutes){return Math.trunc(60*minutes)}function monthsToQuarters(months){const quarters=months/3;return Math.trunc(quarters)}function monthsToYears(months){const years=months/12;return Math.trunc(years)}function nextDay(date,day,options){let delta=day-getDay(date,options);if(delta<=0)delta+=7;return addDays(date,delta,options)}function nextFriday(date,options){return nextDay(date,5,options)}function nextMonday(date,options){return nextDay(date,1,options)}function nextSaturday(date,options){return nextDay(date,6,options)}function nextSunday(date,options){return nextDay(date,0,options)}function nextThursday(date,options){return nextDay(date,4,options)}function nextTuesday(date,options){return nextDay(date,2,options)}function nextWednesday(date,options){return nextDay(date,3,options)}function parseISO(argument,options){const invalidDate=()=>constructFrom(options?.in,NaN);const additionalDigits=options?.additionalDigits??2;const dateStrings=splitDateString(argument);let date;if(dateStrings.date){const parseYearResult=parseYear(dateStrings.date,additionalDigits);date=parseDate(parseYearResult.restDateString,parseYearResult.year)}if(!date||isNaN(+date))return invalidDate();const timestamp=+date;let time=0;let offset;if(dateStrings.time){time=parseTime(dateStrings.time);if(isNaN(time))return invalidDate()}if(dateStrings.timezone){offset=parseTimezone(dateStrings.timezone);if(isNaN(offset))return invalidDate()}else{const tmpDate=new Date(timestamp+time);const result=toDate(0,options?.in);result.setFullYear(tmpDate.getUTCFullYear(),tmpDate.getUTCMonth(),tmpDate.getUTCDate());result.setHours(tmpDate.getUTCHours(),tmpDate.getUTCMinutes(),tmpDate.getUTCSeconds(),tmpDate.getUTCMilliseconds());return result}return toDate(timestamp+time+offset,options?.in)}const patterns={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/};const dateRegex=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/;const timeRegex=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/;const timezoneRegex=/^([+-])(\d{2})(?::?(\d{2}))?$/;function splitDateString(dateString){const dateStrings={};const array=dateString.split(patterns.dateTimeDelimiter);let timeString;if(array.length>2)return dateStrings;if(/:/.test(array[0]))timeString=array[0];else{dateStrings.date=array[0];timeString=array[1];if(patterns.timeZoneDelimiter.test(dateStrings.date)){dateStrings.date=dateString.split(patterns.timeZoneDelimiter)[0];timeString=dateString.substr(dateStrings.date.length,dateString.length)}}if(timeString){const token=patterns.timezone.exec(timeString);if(token){dateStrings.time=timeString.replace(token[1],"");dateStrings.timezone=token[1]}else dateStrings.time=timeString}return dateStrings}function parseYear(dateString,additionalDigits){const regex=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+additionalDigits)+"})|(\\d{2}|[+-]\\d{"+(2+additionalDigits)+"})$)");const captures=dateString.match(regex);if(!captures)return{year:NaN,restDateString:""};const year=captures[1]?parseInt(captures[1]):null;const century=captures[2]?parseInt(captures[2]):null;return{year:null===century?year:100*century,restDateString:dateString.slice((captures[1]||captures[2]).length)}}function parseDate(dateString,year){if(null===year)return new Date(NaN);const captures=dateString.match(dateRegex);if(!captures)return new Date(NaN);const isWeekDate=!!captures[4];const dayOfYear=parseDateUnit(captures[1]);const month=parseDateUnit(captures[2])-1;const day=parseDateUnit(captures[3]);const week=parseDateUnit(captures[4]);const dayOfWeek=parseDateUnit(captures[5])-1;if(isWeekDate){if(!validateWeekDate(year,week,dayOfWeek))return new Date(NaN);return dayOfISOWeekYear(year,week,dayOfWeek)}{const date=new Date(0);if(!validateDate(year,month,day)||!validateDayOfYearDate(year,dayOfYear))return new Date(NaN);date.setUTCFullYear(year,month,Math.max(dayOfYear,day));return date}}function parseDateUnit(value){return value?parseInt(value):1}function parseTime(timeString){const captures=timeString.match(timeRegex);if(!captures)return NaN;const hours=parseTimeUnit(captures[1]);const minutes=parseTimeUnit(captures[2]);const seconds=parseTimeUnit(captures[3]);if(!validateTime(hours,minutes,seconds))return NaN;return hours*millisecondsInHour+6e4*minutes+1e3*seconds}function parseTimeUnit(value){return value&&parseFloat(value.replace(",","."))||0}function parseTimezone(timezoneString){if("Z"===timezoneString)return 0;const captures=timezoneString.match(timezoneRegex);if(!captures)return 0;const sign="+"===captures[1]?-1:1;const hours=parseInt(captures[2]);const minutes=captures[3]&&parseInt(captures[3])||0;if(!validateTimezone(hours,minutes))return NaN;return sign*(hours*millisecondsInHour+6e4*minutes)}function dayOfISOWeekYear(isoWeekYear,week,day){const date=new Date(0);date.setUTCFullYear(isoWeekYear,0,4);const fourthOfJanuaryDay=date.getUTCDay()||7;const diff=(week-1)*7+day+1-fourthOfJanuaryDay;date.setUTCDate(date.getUTCDate()+diff);return date}const daysInMonths=[31,null,31,30,31,30,31,31,30,31,30,31];function parseISO_isLeapYearIndex(year){return year%400===0||year%4===0&&year%100!==0}function validateDate(year,month,date){return month>=0&&month<=11&&date>=1&&date<=(daysInMonths[month]||(parseISO_isLeapYearIndex(year)?29:28))}function validateDayOfYearDate(year,dayOfYear){return dayOfYear>=1&&dayOfYear<=(parseISO_isLeapYearIndex(year)?366:365)}function validateWeekDate(_year,week,day){return week>=1&&week<=53&&day>=0&&day<=6}function validateTime(hours,minutes,seconds){if(24===hours)return 0===minutes&&0===seconds;return seconds>=0&&seconds<60&&minutes>=0&&minutes<60&&hours>=0&&hours<25}function validateTimezone(_hours,minutes){return minutes>=0&&minutes<=59}function parseJSON(dateStr,options){const parts=dateStr.match(/(\d{4})-(\d{2})-(\d{2})[T ](\d{2}):(\d{2}):(\d{2})(?:\.(\d{0,7}))?(?:Z|(.)(\d{2}):?(\d{2})?)?/);if(!parts)return toDate(NaN,options?.in);return toDate(Date.UTC(+parts[1],parts[2]-1,+parts[3],parts[4]-(+parts[9]||0)*("-"==parts[8]?-1:1),parts[5]-(+parts[10]||0)*("-"==parts[8]?-1:1),+parts[6],+((parts[7]||"0")+"00").substring(0,3)),options?.in)}function previousDay(date,day,options){let delta=getDay(date,options)-day;if(delta<=0)delta+=7;return subDays(date,delta,options)}function previousFriday(date,options){return previousDay(date,5,options)}function previousMonday(date,options){return previousDay(date,1,options)}function previousSaturday(date,options){return previousDay(date,6,options)}function previousSunday(date,options){return previousDay(date,0,options)}function previousThursday(date,options){return previousDay(date,4,options)}function previousTuesday(date,options){return previousDay(date,2,options)}function previousWednesday(date,options){return previousDay(date,3,options)}function quartersToMonths(quarters){return Math.trunc(3*quarters)}function quartersToYears(quarters){const years=quarters/4;return Math.trunc(years)}function roundToNearestHours(date,options){const nearestTo=options?.nearestTo??1;if(nearestTo<1||nearestTo>12)return constructFrom(options?.in||date,NaN);const date_=toDate(date,options?.in);const fractionalMinutes=date_.getMinutes()/60;const fractionalSeconds=date_.getSeconds()/60/60;const fractionalMilliseconds=date_.getMilliseconds()/1e3/60/60;const hours=date_.getHours()+fractionalMinutes+fractionalSeconds+fractionalMilliseconds;const method=options?.roundingMethod??"round";const roundingMethod=getRoundingMethod(method);const roundedHours=roundingMethod(hours/nearestTo)*nearestTo;date_.setHours(roundedHours,0,0,0);return date_}function roundToNearestMinutes(date,options){const nearestTo=options?.nearestTo??1;if(nearestTo<1||nearestTo>30)return constructFrom(date,NaN);const date_=toDate(date,options?.in);const fractionalSeconds=date_.getSeconds()/60;const fractionalMilliseconds=date_.getMilliseconds()/1e3/60;const minutes=date_.getMinutes()+fractionalSeconds+fractionalMilliseconds;const method=options?.roundingMethod??"round";const roundingMethod=getRoundingMethod(method);const roundedMinutes=roundingMethod(minutes/nearestTo)*nearestTo;date_.setMinutes(roundedMinutes,0,0);return date_}function secondsToHours(seconds){const hours=seconds/3600;return Math.trunc(hours)}function secondsToMilliseconds(seconds){return 1e3*seconds}function secondsToMinutes(seconds){const minutes=seconds/60;return Math.trunc(minutes)}function setMonth(date,month,options){const _date=toDate(date,options?.in);const year=_date.getFullYear();const day=_date.getDate();const midMonth=constructFrom(options?.in||date,0);midMonth.setFullYear(year,month,15);midMonth.setHours(0,0,0,0);const daysInMonth=getDaysInMonth(midMonth);_date.setMonth(month,Math.min(day,daysInMonth));return _date}function set(date,values,options){let _date=toDate(date,options?.in);if(isNaN(+_date))return constructFrom(options?.in||date,NaN);if(null!=values.year)_date.setFullYear(values.year);if(null!=values.month)_date=setMonth(_date,values.month);if(null!=values.date)_date.setDate(values.date);if(null!=values.hours)_date.setHours(values.hours);if(null!=values.minutes)_date.setMinutes(values.minutes);if(null!=values.seconds)_date.setSeconds(values.seconds);if(null!=values.milliseconds)_date.setMilliseconds(values.milliseconds);return _date}function setDate(date,dayOfMonth,options){const _date=toDate(date,options?.in);_date.setDate(dayOfMonth);return _date}function setDayOfYear(date,dayOfYear,options){const date_=toDate(date,options?.in);date_.setMonth(0);date_.setDate(dayOfYear);return date_}function setDefaultOptions_setDefaultOptions(options){const result={};const defaultOptions=getDefaultOptions();for(const property in defaultOptions)if(Object.prototype.hasOwnProperty.call(defaultOptions,property))result[property]=defaultOptions[property];for(const property in options)if(Object.prototype.hasOwnProperty.call(options,property))if(void 0===options[property])delete result[property];else result[property]=options[property];setDefaultOptions(result)}function setHours(date,hours,options){const _date=toDate(date,options?.in);_date.setHours(hours);return _date}function setMilliseconds(date,milliseconds,options){const _date=toDate(date,options?.in);_date.setMilliseconds(milliseconds);return _date}function setMinutes(date,minutes,options){const date_=toDate(date,options?.in);date_.setMinutes(minutes);return date_}function setQuarter(date,quarter,options){const date_=toDate(date,options?.in);const oldQuarter=Math.trunc(date_.getMonth()/3)+1;const diff=quarter-oldQuarter;return setMonth(date_,date_.getMonth()+3*diff)}function setSeconds(date,seconds,options){const _date=toDate(date,options?.in);_date.setSeconds(seconds);return _date}function setWeekYear(date,weekYear,options){const defaultOptions=getDefaultOptions();const firstWeekContainsDate=options?.firstWeekContainsDate??options?.locale?.options?.firstWeekContainsDate??defaultOptions.firstWeekContainsDate??defaultOptions.locale?.options?.firstWeekContainsDate??1;const diff=differenceInCalendarDays(toDate(date,options?.in),startOfWeekYear(date,options),options);const firstWeek=constructFrom(options?.in||date,0);firstWeek.setFullYear(weekYear,0,firstWeekContainsDate);firstWeek.setHours(0,0,0,0);const date_=startOfWeekYear(firstWeek,options);date_.setDate(date_.getDate()+diff);return date_}function setYear(date,year,options){const date_=toDate(date,options?.in);if(isNaN(+date_))return constructFrom(options?.in||date,NaN);date_.setFullYear(year);return date_}function startOfDecade(date,options){const _date=toDate(date,options?.in);const year=_date.getFullYear();const decade=10*Math.floor(year/10);_date.setFullYear(decade,0,1);_date.setHours(0,0,0,0);return _date}function startOfToday(options){return startOfDay(Date.now(),options)}function startOfTomorrow(options){const now=constructNow(options?.in);const year=now.getFullYear();const month=now.getMonth();const day=now.getDate();const date=constructFrom(options?.in,0);date.setFullYear(year,month,day+1);date.setHours(0,0,0,0);return date}function startOfYesterday(options){const now=constructNow(options?.in);const year=now.getFullYear();const month=now.getMonth();const day=now.getDate();const date=constructNow(options?.in);date.setFullYear(year,month,day-1);date.setHours(0,0,0,0);return date}function subMonths(date,amount,options){return addMonths(date,-amount,options)}function sub(date,duration,options){const{years=0,months=0,weeks=0,days=0,hours=0,minutes=0,seconds=0}=duration;const withoutMonths=subMonths(date,months+12*years,options);const withoutDays=subDays(withoutMonths,days+7*weeks,options);const minutesToSub=minutes+60*hours;const secondsToSub=seconds+60*minutesToSub;const msToSub=1e3*secondsToSub;return constructFrom(options?.in||date,withoutDays-msToSub)}function subBusinessDays(date,amount,options){return addBusinessDays(date,-amount,options)}function subHours(date,amount,options){return addHours(date,-amount,options)}function subMilliseconds(date,amount,options){return addMilliseconds(date,-amount,options)}function subMinutes(date,amount,options){return addMinutes(date,-amount,options)}function subQuarters(date,amount,options){return addQuarters(date,-amount,options)}function subSeconds(date,amount,options){return addSeconds(date,-amount,options)}function subWeeks(date,amount,options){return addWeeks(date,-amount,options)}function subYears(date,amount,options){return addYears(date,-amount,options)}function weeksToDays(weeks){return Math.trunc(7*weeks)}function yearsToDays(years){return Math.trunc(years*daysInYear)}function yearsToMonths(years){return Math.trunc(12*years)}function yearsToQuarters(years){return Math.trunc(4*years)}}}]);
@@ -1,10 +0,0 @@
1
- /*! LICENSE: 6237.60683e513e.js.LICENSE.txt */
2
- "use strict";(globalThis["chunk_tech_app "]||=[]).push([[6237],{9869(__unused_rspack_module,exports){/**
3
- * @license React
4
- * react.production.js
5
- *
6
- * Copyright (c) Meta Platforms, Inc. and affiliates.
7
- *
8
- * This source code is licensed under the MIT license found in the
9
- * LICENSE file in the root directory of this source tree.
10
- */var REACT_ELEMENT_TYPE=Symbol.for("react.transitional.element"),REACT_PORTAL_TYPE=Symbol.for("react.portal"),REACT_FRAGMENT_TYPE=Symbol.for("react.fragment"),REACT_STRICT_MODE_TYPE=Symbol.for("react.strict_mode"),REACT_PROFILER_TYPE=Symbol.for("react.profiler"),REACT_CONSUMER_TYPE=Symbol.for("react.consumer"),REACT_CONTEXT_TYPE=Symbol.for("react.context"),REACT_FORWARD_REF_TYPE=Symbol.for("react.forward_ref"),REACT_SUSPENSE_TYPE=Symbol.for("react.suspense"),REACT_MEMO_TYPE=Symbol.for("react.memo"),REACT_LAZY_TYPE=Symbol.for("react.lazy"),REACT_ACTIVITY_TYPE=Symbol.for("react.activity"),MAYBE_ITERATOR_SYMBOL=Symbol.iterator;function getIteratorFn(maybeIterable){if(null===maybeIterable||"object"!=typeof maybeIterable)return null;maybeIterable=MAYBE_ITERATOR_SYMBOL&&maybeIterable[MAYBE_ITERATOR_SYMBOL]||maybeIterable["@@iterator"];return"function"==typeof maybeIterable?maybeIterable:null}var ReactNoopUpdateQueue={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},assign=Object.assign,emptyObject={};function Component(props,context,updater){this.props=props;this.context=context;this.refs=emptyObject;this.updater=updater||ReactNoopUpdateQueue}Component.prototype.isReactComponent={};Component.prototype.setState=function(partialState,callback){if("object"!=typeof partialState&&"function"!=typeof partialState&&null!=partialState)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,partialState,callback,"setState")};Component.prototype.forceUpdate=function(callback){this.updater.enqueueForceUpdate(this,callback,"forceUpdate")};function ComponentDummy(){}ComponentDummy.prototype=Component.prototype;function PureComponent(props,context,updater){this.props=props;this.context=context;this.refs=emptyObject;this.updater=updater||ReactNoopUpdateQueue}var pureComponentPrototype=PureComponent.prototype=new ComponentDummy;pureComponentPrototype.constructor=PureComponent;assign(pureComponentPrototype,Component.prototype);pureComponentPrototype.isPureReactComponent=!0;var isArrayImpl=Array.isArray;function noop(){}var ReactSharedInternals={H:null,A:null,T:null,S:null},hasOwnProperty=Object.prototype.hasOwnProperty;function ReactElement(type,key,props){var refProp=props.ref;return{$$typeof:REACT_ELEMENT_TYPE,type:type,key:key,ref:void 0!==refProp?refProp:null,props:props}}function cloneAndReplaceKey(oldElement,newKey){return ReactElement(oldElement.type,newKey,oldElement.props)}function isValidElement(object){return"object"==typeof object&&null!==object&&object.$$typeof===REACT_ELEMENT_TYPE}function escape(key){var escaperLookup={"=":"=0",":":"=2"};return"$"+key.replace(/[=:]/g,function(match){return escaperLookup[match]})}var userProvidedKeyEscapeRegex=/\/+/g;function getElementKey(element,index){return"object"==typeof element&&null!==element&&null!=element.key?escape(""+element.key):index.toString(36)}function resolveThenable(thenable){switch(thenable.status){case"fulfilled":return thenable.value;case"rejected":throw thenable.reason;default:switch("string"==typeof thenable.status?thenable.then(noop,noop):(thenable.status="pending",thenable.then(function(fulfilledValue){"pending"===thenable.status&&(thenable.status="fulfilled",thenable.value=fulfilledValue)},function(error){"pending"===thenable.status&&(thenable.status="rejected",thenable.reason=error)})),thenable.status){case"fulfilled":return thenable.value;case"rejected":throw thenable.reason}}throw thenable}function mapIntoArray(children,array,escapedPrefix,nameSoFar,callback){var type=typeof children;if("undefined"===type||"boolean"===type)children=null;var invokeCallback=!1;if(null===children)invokeCallback=!0;else switch(type){case"bigint":case"string":case"number":invokeCallback=!0;break;case"object":switch(children.$$typeof){case REACT_ELEMENT_TYPE:case REACT_PORTAL_TYPE:invokeCallback=!0;break;case REACT_LAZY_TYPE:return invokeCallback=children._init,mapIntoArray(invokeCallback(children._payload),array,escapedPrefix,nameSoFar,callback)}}if(invokeCallback)return callback=callback(children),invokeCallback=""===nameSoFar?"."+getElementKey(children,0):nameSoFar,isArrayImpl(callback)?(escapedPrefix="",null!=invokeCallback&&(escapedPrefix=invokeCallback.replace(userProvidedKeyEscapeRegex,"$&/")+"/"),mapIntoArray(callback,array,escapedPrefix,"",function(c){return c})):null!=callback&&(isValidElement(callback)&&(callback=cloneAndReplaceKey(callback,escapedPrefix+(null==callback.key||children&&children.key===callback.key?"":(""+callback.key).replace(userProvidedKeyEscapeRegex,"$&/")+"/")+invokeCallback)),array.push(callback)),1;invokeCallback=0;var nextNamePrefix=""===nameSoFar?".":nameSoFar+":";if(isArrayImpl(children))for(var i=0;i<children.length;i++)nameSoFar=children[i],type=nextNamePrefix+getElementKey(nameSoFar,i),invokeCallback+=mapIntoArray(nameSoFar,array,escapedPrefix,type,callback);else if(i=getIteratorFn(children),"function"==typeof i)for(children=i.call(children),i=0;!(nameSoFar=children.next()).done;)nameSoFar=nameSoFar.value,type=nextNamePrefix+getElementKey(nameSoFar,i++),invokeCallback+=mapIntoArray(nameSoFar,array,escapedPrefix,type,callback);else if("object"===type){if("function"==typeof children.then)return mapIntoArray(resolveThenable(children),array,escapedPrefix,nameSoFar,callback);array=String(children);throw Error("Objects are not valid as a React child (found: "+("[object Object]"===array?"object with keys {"+Object.keys(children).join(", ")+"}":array)+"). If you meant to render a collection of children, use an array instead.")}return invokeCallback}function mapChildren(children,func,context){if(null==children)return children;var result=[],count=0;mapIntoArray(children,result,"","",function(child){return func.call(context,child,count++)});return result}function lazyInitializer(payload){if(-1===payload._status){var ctor=payload._result;ctor=ctor();ctor.then(function(moduleObject){if(0===payload._status||-1===payload._status)payload._status=1,payload._result=moduleObject},function(error){if(0===payload._status||-1===payload._status)payload._status=2,payload._result=error});-1===payload._status&&(payload._status=0,payload._result=ctor)}if(1===payload._status)return payload._result.default;throw payload._result}var reportGlobalError="function"==typeof reportError?reportError:function(error){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var event=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof error&&null!==error&&"string"==typeof error.message?String(error.message):String(error),error:error});if(!window.dispatchEvent(event))return}else if("object"==typeof process&&"function"==typeof process.emit)return void process.emit("uncaughtException",error);console.error(error)},Children={map:mapChildren,forEach:function(children,forEachFunc,forEachContext){mapChildren(children,function(){forEachFunc.apply(this,arguments)},forEachContext)},count:function(children){var n=0;mapChildren(children,function(){n++});return n},toArray:function(children){return mapChildren(children,function(child){return child})||[]},only:function(children){if(!isValidElement(children))throw Error("React.Children.only expected to receive a single React element child.");return children}};exports.Activity=REACT_ACTIVITY_TYPE;exports.Children=Children;exports.Component=Component;exports.Fragment=REACT_FRAGMENT_TYPE;exports.Profiler=REACT_PROFILER_TYPE;exports.PureComponent=PureComponent;exports.StrictMode=REACT_STRICT_MODE_TYPE;exports.Suspense=REACT_SUSPENSE_TYPE;exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=ReactSharedInternals;exports.__COMPILER_RUNTIME={__proto__:null,c:function(size){return ReactSharedInternals.H.useMemoCache(size)}};exports.cache=function(fn){return function(){return fn.apply(null,arguments)}};exports.cacheSignal=function(){return null};exports.cloneElement=function(element,config,children){if(null==element)throw Error("The argument must be a React element, but you passed "+element+".");var props=assign({},element.props),key=element.key;if(null!=config)for(propName in void 0!==config.key&&(key=""+config.key),config)hasOwnProperty.call(config,propName)&&"key"!==propName&&"__self"!==propName&&"__source"!==propName&&("ref"!==propName||void 0!==config.ref)&&(props[propName]=config[propName]);var propName=arguments.length-2;if(1===propName)props.children=children;else if(1<propName){for(var childArray=Array(propName),i=0;i<propName;i++)childArray[i]=arguments[i+2];props.children=childArray}return ReactElement(element.type,key,props)};exports.createContext=function(defaultValue){defaultValue={$$typeof:REACT_CONTEXT_TYPE,_currentValue:defaultValue,_currentValue2:defaultValue,_threadCount:0,Provider:null,Consumer:null};defaultValue.Provider=defaultValue;defaultValue.Consumer={$$typeof:REACT_CONSUMER_TYPE,_context:defaultValue};return defaultValue};exports.createElement=function(type,config,children){var propName,props={},key=null;if(null!=config)for(propName in void 0!==config.key&&(key=""+config.key),config)hasOwnProperty.call(config,propName)&&"key"!==propName&&"__self"!==propName&&"__source"!==propName&&(props[propName]=config[propName]);var childrenLength=arguments.length-2;if(1===childrenLength)props.children=children;else if(1<childrenLength){for(var childArray=Array(childrenLength),i=0;i<childrenLength;i++)childArray[i]=arguments[i+2];props.children=childArray}if(type&&type.defaultProps)for(propName in childrenLength=type.defaultProps)void 0===props[propName]&&(props[propName]=childrenLength[propName]);return ReactElement(type,key,props)};exports.createRef=function(){return{current:null}};exports.forwardRef=function(render){return{$$typeof:REACT_FORWARD_REF_TYPE,render:render}};exports.isValidElement=isValidElement;exports.lazy=function(ctor){return{$$typeof:REACT_LAZY_TYPE,_payload:{_status:-1,_result:ctor},_init:lazyInitializer}};exports.memo=function(type,compare){return{$$typeof:REACT_MEMO_TYPE,type:type,compare:void 0===compare?null:compare}};exports.startTransition=function(scope){var prevTransition=ReactSharedInternals.T,currentTransition={};ReactSharedInternals.T=currentTransition;try{var returnValue=scope(),onStartTransitionFinish=ReactSharedInternals.S;null!==onStartTransitionFinish&&onStartTransitionFinish(currentTransition,returnValue);"object"==typeof returnValue&&null!==returnValue&&"function"==typeof returnValue.then&&returnValue.then(noop,reportGlobalError)}catch(error){reportGlobalError(error)}finally{null!==prevTransition&&null!==currentTransition.types&&(prevTransition.types=currentTransition.types),ReactSharedInternals.T=prevTransition}};exports.unstable_useCacheRefresh=function(){return ReactSharedInternals.H.useCacheRefresh()};exports.use=function(usable){return ReactSharedInternals.H.use(usable)};exports.useActionState=function(action,initialState,permalink){return ReactSharedInternals.H.useActionState(action,initialState,permalink)};exports.useCallback=function(callback,deps){return ReactSharedInternals.H.useCallback(callback,deps)};exports.useContext=function(Context){return ReactSharedInternals.H.useContext(Context)};exports.useDebugValue=function(){};exports.useDeferredValue=function(value,initialValue){return ReactSharedInternals.H.useDeferredValue(value,initialValue)};exports.useEffect=function(create,deps){return ReactSharedInternals.H.useEffect(create,deps)};exports.useEffectEvent=function(callback){return ReactSharedInternals.H.useEffectEvent(callback)};exports.useId=function(){return ReactSharedInternals.H.useId()};exports.useImperativeHandle=function(ref,create,deps){return ReactSharedInternals.H.useImperativeHandle(ref,create,deps)};exports.useInsertionEffect=function(create,deps){return ReactSharedInternals.H.useInsertionEffect(create,deps)};exports.useLayoutEffect=function(create,deps){return ReactSharedInternals.H.useLayoutEffect(create,deps)};exports.useMemo=function(create,deps){return ReactSharedInternals.H.useMemo(create,deps)};exports.useOptimistic=function(passthrough,reducer){return ReactSharedInternals.H.useOptimistic(passthrough,reducer)};exports.useReducer=function(reducer,initialArg,init){return ReactSharedInternals.H.useReducer(reducer,initialArg,init)};exports.useRef=function(initialValue){return ReactSharedInternals.H.useRef(initialValue)};exports.useState=function(initialState){return ReactSharedInternals.H.useState(initialState)};exports.useSyncExternalStore=function(subscribe,getSnapshot,getServerSnapshot){return ReactSharedInternals.H.useSyncExternalStore(subscribe,getSnapshot,getServerSnapshot)};exports.useTransition=function(){return ReactSharedInternals.H.useTransition()};exports.version="19.2.8"},6540(module,__unused_rspack_exports,__webpack_require__){module.exports=__webpack_require__(9869)}}]);
@@ -1,9 +0,0 @@
1
- /**
2
- * @license React
3
- * react.production.js
4
- *
5
- * Copyright (c) Meta Platforms, Inc. and affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */