streamlit-nightly 1.45.1.dev20250504__py3-none-any.whl → 1.45.1.dev20250506__py3-none-any.whl

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 (139) hide show
  1. streamlit/__init__.py +4 -1
  2. streamlit/column_config.py +11 -9
  3. streamlit/commands/execution_control.py +5 -6
  4. streamlit/commands/logo.py +7 -2
  5. streamlit/components/v1/components.py +1 -1
  6. streamlit/connections/__init__.py +2 -2
  7. streamlit/connections/base_connection.py +2 -2
  8. streamlit/connections/snowflake_connection.py +4 -3
  9. streamlit/dataframe_util.py +2 -1
  10. streamlit/delta_generator.py +17 -37
  11. streamlit/elements/alert.py +1 -1
  12. streamlit/elements/arrow.py +3 -3
  13. streamlit/elements/deck_gl_json_chart.py +1 -1
  14. streamlit/elements/exception.py +5 -1
  15. streamlit/elements/json.py +1 -1
  16. streamlit/elements/layouts.py +3 -9
  17. streamlit/elements/lib/built_in_chart_utils.py +14 -6
  18. streamlit/elements/lib/column_config_utils.py +1 -3
  19. streamlit/elements/lib/column_types.py +2 -2
  20. streamlit/elements/lib/dialog.py +2 -1
  21. streamlit/elements/lib/file_uploader_utils.py +7 -2
  22. streamlit/elements/lib/js_number.py +4 -4
  23. streamlit/elements/lib/options_selector_utils.py +9 -6
  24. streamlit/elements/media.py +8 -7
  25. streamlit/elements/metric.py +4 -4
  26. streamlit/elements/progress.py +1 -1
  27. streamlit/elements/vega_charts.py +2 -2
  28. streamlit/elements/widgets/button.py +5 -6
  29. streamlit/elements/widgets/number_input.py +81 -28
  30. streamlit/elements/widgets/slider.py +87 -35
  31. streamlit/elements/widgets/time_widgets.py +43 -0
  32. streamlit/errors.py +9 -6
  33. streamlit/proto/DateInput_pb2.py +4 -3
  34. streamlit/proto/DateInput_pb2.pyi +8 -2
  35. streamlit/proto/TimeInput_pb2.py +4 -3
  36. streamlit/proto/TimeInput_pb2.pyi +9 -2
  37. streamlit/runtime/__init__.py +1 -1
  38. streamlit/runtime/caching/__init__.py +6 -6
  39. streamlit/runtime/caching/cache_data_api.py +7 -9
  40. streamlit/runtime/caching/hashing.py +1 -1
  41. streamlit/runtime/caching/storage/cache_storage_protocol.py +1 -1
  42. streamlit/runtime/connection_factory.py +1 -1
  43. streamlit/runtime/credentials.py +4 -4
  44. streamlit/runtime/fragment.py +2 -2
  45. streamlit/runtime/metrics_util.py +2 -2
  46. streamlit/runtime/runtime.py +1 -1
  47. streamlit/runtime/runtime_util.py +2 -1
  48. streamlit/runtime/scriptrunner/__init__.py +4 -4
  49. streamlit/runtime/scriptrunner/script_runner.py +6 -9
  50. streamlit/runtime/scriptrunner_utils/script_run_context.py +1 -0
  51. streamlit/runtime/secrets.py +15 -8
  52. streamlit/runtime/state/__init__.py +5 -5
  53. streamlit/runtime/state/query_params.py +8 -8
  54. streamlit/runtime/state/session_state.py +8 -1
  55. streamlit/static/index.html +1 -1
  56. streamlit/static/static/js/{ErrorOutline.esm.Bp4VdNOc.js → ErrorOutline.esm.BgsGCsV4.js} +1 -1
  57. streamlit/static/static/js/{FileDownload.esm.hVzDDDNS.js → FileDownload.esm.CCKezPn5.js} +1 -1
  58. streamlit/static/static/js/{FileHelper.BGcyDQ_S.js → FileHelper.CprSF_kT.js} +1 -1
  59. streamlit/static/static/js/{FormClearHelper.a0IiSXcn.js → FormClearHelper.DiwQ0EtT.js} +1 -1
  60. streamlit/static/static/js/{Hooks.C2dZkryw.js → Hooks.DDqhyZ1_.js} +1 -1
  61. streamlit/static/static/js/{InputInstructions.Cn0WICoN.js → InputInstructions.BCEZxme4.js} +1 -1
  62. streamlit/static/static/js/{ProgressBar.VRmRPHtW.js → ProgressBar.CGdY94g_.js} +1 -1
  63. streamlit/static/static/js/{RenderInPortalIfExists.CZa97lrw.js → RenderInPortalIfExists.uGJp_Q0v.js} +1 -1
  64. streamlit/static/static/js/{Toolbar.DJZBBDvl.js → Toolbar.hTlw0-K1.js} +1 -1
  65. streamlit/static/static/js/{base-input.CzerGAEH.js → base-input.mGTY3-qU.js} +1 -1
  66. streamlit/static/static/js/{checkbox.C6Sj4eVw.js → checkbox.Cg-5cKAh.js} +1 -1
  67. streamlit/static/static/js/{createSuper.C7yhRETi.js → createSuper.-HPb1oYT.js} +1 -1
  68. streamlit/static/static/js/{data-grid-overlay-editor.DAgcbVks.js → data-grid-overlay-editor.BpNYxiTp.js} +1 -1
  69. streamlit/static/static/js/{downloader.B8HL-u_1.js → downloader.DS9891pS.js} +1 -1
  70. streamlit/static/static/js/{es6.BxAW_jrO.js → es6.CU1PEL2w.js} +2 -2
  71. streamlit/static/static/js/{iframeResizer.contentWindow.CS8fz-W7.js → iframeResizer.contentWindow.CgJE2bJN.js} +1 -1
  72. streamlit/static/static/js/{index.BwnckS8e.js → index.B209tswL.js} +1 -1
  73. streamlit/static/static/js/{index.C7t1-CQQ.js → index.BC0ueJ8H.js} +1 -1
  74. streamlit/static/static/js/{index.DWb5kgxt.js → index.BHVQ94t4.js} +1 -1
  75. streamlit/static/static/js/{index.DgOrPDFa.js → index.BT0p7gAu.js} +1 -1
  76. streamlit/static/static/js/{index.uOOdkOMl.js → index.BTTj6ld4.js} +1 -1
  77. streamlit/static/static/js/{index.CG2pASlR.js → index.BVjgrQ4R.js} +1 -1
  78. streamlit/static/static/js/{index.6jptdEp6.js → index.BXYstdPh.js} +1 -1
  79. streamlit/static/static/js/{index.Dt0FtS-M.js → index.BZ9mqzEJ.js} +1 -1
  80. streamlit/static/static/js/{index.CSAdYIt3.js → index.Bb-Ukg41.js} +1 -1
  81. streamlit/static/static/js/{index.B2tTSlE1.js → index.BhTok8vt.js} +1 -1
  82. streamlit/static/static/js/{index.DIZcktIN.js → index.Bph6ZoI5.js} +1 -1
  83. streamlit/static/static/js/{index.B7UKH_JX.js → index.CJPcdxPe.js} +1 -1
  84. streamlit/static/static/js/{index.D6KElXAI.js → index.CMOA-8Q2.js} +1 -1
  85. streamlit/static/static/js/{index.Cxp7siQJ.js → index.CN91oQMB.js} +5 -5
  86. streamlit/static/static/js/{index.Cr1JUXmf.js → index.CtoDsUtq.js} +1 -1
  87. streamlit/static/static/js/{index.C4KrRG3c.js → index.CvFsF3FD.js} +1 -1
  88. streamlit/static/static/js/{index.DDCep3pE.js → index.CyGuL4If.js} +1 -1
  89. streamlit/static/static/js/{index.ChOkUAuD.js → index.CzGUd4IN.js} +1 -1
  90. streamlit/static/static/js/{index.A_t8lw--.js → index.DAxf3_iz.js} +1 -1
  91. streamlit/static/static/js/{index.DG9Swsby.js → index.DJHUlWgy.js} +1 -1
  92. streamlit/static/static/js/{index.CHL4u91M.js → index.DLTqo4pp.js} +1 -1
  93. streamlit/static/static/js/{index.o12m2E2P.js → index.DPJBu2uZ.js} +1 -1
  94. streamlit/static/static/js/{index.CLFopaXS.js → index.DVpzZJNg.js} +1 -1
  95. streamlit/static/static/js/{index.vdE-PayY.js → index.DWV80Vyw.js} +1 -1
  96. streamlit/static/static/js/{index.DR2lTx8N.js → index.DZ6oX-v9.js} +5 -5
  97. streamlit/static/static/js/{index.DtY8dAVN.js → index.Dh4RKl-F.js} +1 -1
  98. streamlit/static/static/js/{index.BRtyx04t.js → index.Dn76KVNf.js} +1 -1
  99. streamlit/static/static/js/{index.qMnAjj-G.js → index.DtqvdV-p.js} +1 -1
  100. streamlit/static/static/js/{index.BwlA1Cf_.js → index.ErkF0SoX.js} +1 -1
  101. streamlit/static/static/js/{index.QdRaJV_a.js → index.GSYBrzVp.js} +1 -1
  102. streamlit/static/static/js/{index.CSPC2m_c.js → index.OngWTN39.js} +1 -1
  103. streamlit/static/static/js/{index.CGzwdjEF.js → index.PSwG8ayC.js} +1 -1
  104. streamlit/static/static/js/{index.D_0HKLRm.js → index.UTlCdasa.js} +1 -1
  105. streamlit/static/static/js/{index.aBgCjIEX.js → index.eR_vQpeg.js} +1 -1
  106. streamlit/static/static/js/{index.BBClg-gm.js → index.fLsU9uCJ.js} +1 -1
  107. streamlit/static/static/js/{index.BDzCUpOG.js → index.hPjr68pz.js} +1 -1
  108. streamlit/static/static/js/{index.CgzjjllY.js → index.kXOZCC_6.js} +1 -1
  109. streamlit/static/static/js/{input.qNZgmgfK.js → input.DY17i94N.js} +1 -1
  110. streamlit/static/static/js/{memory.DifcSUze.js → memory.DsIIcbSd.js} +1 -1
  111. streamlit/static/static/js/{mergeWith.Bykfc0n-.js → mergeWith.cRgGdgvI.js} +1 -1
  112. streamlit/static/static/js/{number-overlay-editor.D_L9PQiU.js → number-overlay-editor.B8Xi2dYq.js} +1 -1
  113. streamlit/static/static/js/{possibleConstructorReturn.Cyeph4pU.js → possibleConstructorReturn.BgDi5nUm.js} +1 -1
  114. streamlit/static/static/js/{sandbox.DT6zcSKI.js → sandbox.BH9emp13.js} +1 -1
  115. streamlit/static/static/js/{textarea.C46FrViu.js → textarea.DAyShsGG.js} +1 -1
  116. streamlit/static/static/js/{timepicker.N6lFakQJ.js → timepicker.CCH2R2Y0.js} +1 -1
  117. streamlit/static/static/js/{toConsumableArray.DwaNiLbv.js → toConsumableArray.CNffSDCu.js} +1 -1
  118. streamlit/static/static/js/{uniqueId.bNZuA9Mz.js → uniqueId.B49CstkV.js} +1 -1
  119. streamlit/static/static/js/{useBasicWidgetState.qUuCVRZV.js → useBasicWidgetState.CkThOkF9.js} +1 -1
  120. streamlit/static/static/js/{useOnInputChange.CylEhpc7.js → useOnInputChange.BqEq0xFZ.js} +1 -1
  121. streamlit/static/static/js/{withFullScreenWrapper.BQay_j7X.js → withFullScreenWrapper.UsvF_Jwr.js} +1 -1
  122. streamlit/string_util.py +8 -5
  123. streamlit/web/bootstrap.py +5 -4
  124. streamlit/web/cli.py +2 -1
  125. streamlit/web/server/__init__.py +2 -2
  126. streamlit/web/server/browser_websocket_handler.py +3 -2
  127. streamlit/web/server/component_request_handler.py +7 -7
  128. streamlit/web/server/media_file_handler.py +2 -2
  129. streamlit/web/server/oauth_authlib_routes.py +3 -3
  130. streamlit/web/server/routes.py +2 -2
  131. streamlit/web/server/server.py +4 -4
  132. streamlit/web/server/upload_file_request_handler.py +4 -3
  133. streamlit/web/server/websocket_headers.py +1 -1
  134. {streamlit_nightly-1.45.1.dev20250504.dist-info → streamlit_nightly-1.45.1.dev20250506.dist-info}/METADATA +1 -1
  135. {streamlit_nightly-1.45.1.dev20250504.dist-info → streamlit_nightly-1.45.1.dev20250506.dist-info}/RECORD +139 -139
  136. {streamlit_nightly-1.45.1.dev20250504.data → streamlit_nightly-1.45.1.dev20250506.data}/scripts/streamlit.cmd +0 -0
  137. {streamlit_nightly-1.45.1.dev20250504.dist-info → streamlit_nightly-1.45.1.dev20250506.dist-info}/WHEEL +0 -0
  138. {streamlit_nightly-1.45.1.dev20250504.dist-info → streamlit_nightly-1.45.1.dev20250506.dist-info}/entry_points.txt +0 -0
  139. {streamlit_nightly-1.45.1.dev20250504.dist-info → streamlit_nightly-1.45.1.dev20250506.dist-info}/top_level.txt +0 -0
@@ -1,4 +1,4 @@
1
- import{aw as Ve,at as h,aU as p,g as Rt,cn as qt,bx as Qt,c1 as Bt,bY as jt,r as We,by as Gt}from"./index.DR2lTx8N.js";import{e as Xt,_ as M,b as T,a as D}from"./possibleConstructorReturn.Cyeph4pU.js";import{_ as O}from"./createSuper.C7yhRETi.js";function C(o){if(o===null||o===!0||o===!1)return NaN;var a=Number(o);return isNaN(a)?a:a<0?Math.ceil(a):Math.floor(a)}function d(o,a){if(a.length<o)throw new TypeError(o+" argument"+(o>1?"s":"")+" required, but only "+a.length+" present")}function f(o){d(1,arguments);var a=Object.prototype.toString.call(o);return o instanceof Date||Ve(o)==="object"&&a==="[object Date]"?new Date(o.getTime()):typeof o=="number"||a==="[object Number]"?new Date(o):((typeof o=="string"||a==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function qe(o,a){d(2,arguments);var r=f(o),t=C(a);return isNaN(t)?new Date(NaN):(t&&r.setDate(r.getDate()+t),r)}function _e(o,a){d(2,arguments);var r=f(o).getTime(),t=C(a);return new Date(r+t)}function zt(o,a){d(2,arguments);var r=C(a);return _e(o,r*1e3)}var Vt=6e4;function Zt(o,a){d(2,arguments);var r=C(a);return _e(o,r*Vt)}var Jt=36e5;function Kt(o,a){d(2,arguments);var r=C(a);return _e(o,r*Jt)}function er(o,a){d(2,arguments);var r=C(a),t=r*7;return qe(o,t)}function Oe(o,a){d(2,arguments);var r=f(o),t=C(a);if(isNaN(t))return new Date(NaN);if(!t)return r;var e=r.getDate(),n=new Date(r.getTime());n.setMonth(r.getMonth()+t+1,0);var i=n.getDate();return e>=i?n:(r.setFullYear(n.getFullYear(),n.getMonth(),e),r)}function st(o,a){d(2,arguments);var r=C(a);return Oe(o,r*12)}function tr(o,a){d(2,arguments);var r=f(o),t=f(a);return r.getFullYear()-t.getFullYear()}function he(o,a){d(2,arguments);var r=f(o),t=f(a),e=r.getTime()-t.getTime();return e<0?-1:e>0?1:e}function rr(o,a){d(2,arguments);var r=f(o),t=f(a),e=he(r,t),n=Math.abs(tr(r,t));r.setFullYear(1584),t.setFullYear(1584);var i=he(r,t)===-e,u=e*(n-Number(i));return u===0?0:u}function ar(o,a){d(2,arguments);var r=f(o),t=f(a),e=r.getFullYear()-t.getFullYear(),n=r.getMonth()-t.getMonth();return e*12+n}function Qe(o){d(1,arguments);var a=f(o);return a.setHours(23,59,59,999),a}function Be(o){d(1,arguments);var a=f(o),r=a.getMonth();return a.setFullYear(a.getFullYear(),r+1,0),a.setHours(23,59,59,999),a}function nr(o){d(1,arguments);var a=f(o);return Qe(a).getTime()===Be(a).getTime()}function Mt(o,a){d(2,arguments);var r=f(o),t=f(a),e=he(r,t),n=Math.abs(ar(r,t)),i;if(n<1)i=0;else{r.getMonth()===1&&r.getDate()>27&&r.setDate(30),r.setMonth(r.getMonth()-e*n);var u=he(r,t)===-e;nr(f(o))&&n===1&&he(o,t)===1&&(u=!1),i=e*(n-Number(u))}return i===0?0:i}var lt={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(a){return a<0?Math.ceil(a):Math.floor(a)}},ir="trunc";function me(o){return o?lt[o]:lt[ir]}function or(o,a,r){d(2,arguments);var t=Mt(o,a)/3;return me(void 0)(t)}function Pe(o){var a=new Date(Date.UTC(o.getFullYear(),o.getMonth(),o.getDate(),o.getHours(),o.getMinutes(),o.getSeconds(),o.getMilliseconds()));return a.setUTCFullYear(o.getFullYear()),o.getTime()-a.getTime()}function ie(o){d(1,arguments);var a=f(o);return a.setHours(0,0,0,0),a}var ur=864e5;function sr(o,a){d(2,arguments);var r=ie(o),t=ie(a),e=r.getTime()-Pe(r),n=t.getTime()-Pe(t);return Math.round((e-n)/ur)}function ct(o,a){var r=o.getFullYear()-a.getFullYear()||o.getMonth()-a.getMonth()||o.getDate()-a.getDate()||o.getHours()-a.getHours()||o.getMinutes()-a.getMinutes()||o.getSeconds()-a.getSeconds()||o.getMilliseconds()-a.getMilliseconds();return r<0?-1:r>0?1:r}function Ot(o,a){d(2,arguments);var r=f(o),t=f(a),e=ct(r,t),n=Math.abs(sr(r,t));r.setDate(r.getDate()-e*n);var i=+(ct(r,t)===-e),u=e*(n-i);return u===0?0:u}function lr(o,a,r){d(2,arguments);var t=Ot(o,a)/7;return me(void 0)(t)}var Ye=6e4,Ee=36e5,cr=1e3;function Ne(o,a){return d(2,arguments),f(o).getTime()-f(a).getTime()}function dr(o,a,r){d(2,arguments);var t=Ne(o,a)/Ee;return me(void 0)(t)}function fr(o,a,r){d(2,arguments);var t=Ne(o,a)/Ye;return me(void 0)(t)}function vr(o,a,r){d(2,arguments);var t=Ne(o,a)/1e3;return me(void 0)(t)}function hr(o,a){var r;d(1,arguments);var t=o||{},e=f(t.start),n=f(t.end),i=n.getTime();if(!(e.getTime()<=i))throw new RangeError("Invalid interval");var u=[],s=e;s.setHours(0,0,0,0);var l=Number((r=void 0)!==null&&r!==void 0?r:1);if(l<1||isNaN(l))throw new RangeError("`options.step` must be a number greater than 1");for(;s.getTime()<=i;)u.push(f(s)),s.setDate(s.getDate()+l),s.setHours(0,0,0,0);return u}var mr={};function J(){return mr}function Ie(o,a){var r,t,e,n,i,u,s,l;d(1,arguments);var c=J(),v=C((r=(t=(e=(n=a==null?void 0:a.weekStartsOn)!==null&&n!==void 0?n:a==null||(i=a.locale)===null||i===void 0||(u=i.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&e!==void 0?e:c.weekStartsOn)!==null&&t!==void 0?t:(s=c.locale)===null||s===void 0||(l=s.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&r!==void 0?r:0);if(!(v>=0&&v<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var g=f(o),w=g.getDay(),y=(w<v?-7:0)+6-(w-v);return g.setDate(g.getDate()+y),g.setHours(23,59,59,999),g}function Ae(o){d(1,arguments);var a=f(o),r=a.getFullYear();return a.setFullYear(r+1,0,0),a.setHours(23,59,59,999),a}function pr(o){return d(1,arguments),o instanceof Date||Ve(o)==="object"&&Object.prototype.toString.call(o)==="[object Date]"}function Pt(o){if(d(1,arguments),!pr(o)&&typeof o!="number")return!1;var a=f(o);return!isNaN(Number(a))}function Ct(o,a){d(2,arguments);var r=C(a);return _e(o,-r)}var gr=864e5;function wr(o){d(1,arguments);var a=f(o),r=a.getTime();a.setUTCMonth(0,1),a.setUTCHours(0,0,0,0);var t=a.getTime(),e=r-t;return Math.floor(e/gr)+1}function oe(o){d(1,arguments);var a=1,r=f(o),t=r.getUTCDay(),e=(t<a?7:0)+t-a;return r.setUTCDate(r.getUTCDate()-e),r.setUTCHours(0,0,0,0),r}function xt(o){d(1,arguments);var a=f(o),r=a.getUTCFullYear(),t=new Date(0);t.setUTCFullYear(r+1,0,4),t.setUTCHours(0,0,0,0);var e=oe(t),n=new Date(0);n.setUTCFullYear(r,0,4),n.setUTCHours(0,0,0,0);var i=oe(n);return a.getTime()>=e.getTime()?r+1:a.getTime()>=i.getTime()?r:r-1}function yr(o){d(1,arguments);var a=xt(o),r=new Date(0);r.setUTCFullYear(a,0,4),r.setUTCHours(0,0,0,0);var t=oe(r);return t}var br=6048e5;function kt(o){d(1,arguments);var a=f(o),r=oe(a).getTime()-yr(a).getTime();return Math.round(r/br)+1}function re(o,a){var r,t,e,n,i,u,s,l;d(1,arguments);var c=J(),v=C((r=(t=(e=(n=a==null?void 0:a.weekStartsOn)!==null&&n!==void 0?n:a==null||(i=a.locale)===null||i===void 0||(u=i.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&e!==void 0?e:c.weekStartsOn)!==null&&t!==void 0?t:(s=c.locale)===null||s===void 0||(l=s.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&r!==void 0?r:0);if(!(v>=0&&v<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var g=f(o),w=g.getUTCDay(),y=(w<v?7:0)+w-v;return g.setUTCDate(g.getUTCDate()-y),g.setUTCHours(0,0,0,0),g}function Ze(o,a){var r,t,e,n,i,u,s,l;d(1,arguments);var c=f(o),v=c.getUTCFullYear(),g=J(),w=C((r=(t=(e=(n=a==null?void 0:a.firstWeekContainsDate)!==null&&n!==void 0?n:a==null||(i=a.locale)===null||i===void 0||(u=i.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&e!==void 0?e:g.firstWeekContainsDate)!==null&&t!==void 0?t:(s=g.locale)===null||s===void 0||(l=s.options)===null||l===void 0?void 0:l.firstWeekContainsDate)!==null&&r!==void 0?r:1);if(!(w>=1&&w<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var y=new Date(0);y.setUTCFullYear(v+1,0,w),y.setUTCHours(0,0,0,0);var E=re(y,a),_=new Date(0);_.setUTCFullYear(v,0,w),_.setUTCHours(0,0,0,0);var S=re(_,a);return c.getTime()>=E.getTime()?v+1:c.getTime()>=S.getTime()?v:v-1}function Tr(o,a){var r,t,e,n,i,u,s,l;d(1,arguments);var c=J(),v=C((r=(t=(e=(n=a==null?void 0:a.firstWeekContainsDate)!==null&&n!==void 0?n:a==null||(i=a.locale)===null||i===void 0||(u=i.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&e!==void 0?e:c.firstWeekContainsDate)!==null&&t!==void 0?t:(s=c.locale)===null||s===void 0||(l=s.options)===null||l===void 0?void 0:l.firstWeekContainsDate)!==null&&r!==void 0?r:1),g=Ze(o,a),w=new Date(0);w.setUTCFullYear(g,0,v),w.setUTCHours(0,0,0,0);var y=re(w,a);return y}var Dr=6048e5;function _t(o,a){d(1,arguments);var r=f(o),t=re(r,a).getTime()-Tr(r,a).getTime();return Math.round(t/Dr)+1}function b(o,a){for(var r=o<0?"-":"",t=Math.abs(o).toString();t.length<a;)t="0"+t;return r+t}var Z={y:function(a,r){var t=a.getUTCFullYear(),e=t>0?t:1-t;return b(r==="yy"?e%100:e,r.length)},M:function(a,r){var t=a.getUTCMonth();return r==="M"?String(t+1):b(t+1,2)},d:function(a,r){return b(a.getUTCDate(),r.length)},a:function(a,r){var t=a.getUTCHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return t.toUpperCase();case"aaa":return t;case"aaaaa":return t[0];case"aaaa":default:return t==="am"?"a.m.":"p.m."}},h:function(a,r){return b(a.getUTCHours()%12||12,r.length)},H:function(a,r){return b(a.getUTCHours(),r.length)},m:function(a,r){return b(a.getUTCMinutes(),r.length)},s:function(a,r){return b(a.getUTCSeconds(),r.length)},S:function(a,r){var t=r.length,e=a.getUTCMilliseconds(),n=Math.floor(e*Math.pow(10,t-3));return b(n,r.length)}},ae={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Mr={G:function(a,r,t){var e=a.getUTCFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return t.era(e,{width:"abbreviated"});case"GGGGG":return t.era(e,{width:"narrow"});case"GGGG":default:return t.era(e,{width:"wide"})}},y:function(a,r,t){if(r==="yo"){var e=a.getUTCFullYear(),n=e>0?e:1-e;return t.ordinalNumber(n,{unit:"year"})}return Z.y(a,r)},Y:function(a,r,t,e){var n=Ze(a,e),i=n>0?n:1-n;if(r==="YY"){var u=i%100;return b(u,2)}return r==="Yo"?t.ordinalNumber(i,{unit:"year"}):b(i,r.length)},R:function(a,r){var t=xt(a);return b(t,r.length)},u:function(a,r){var t=a.getUTCFullYear();return b(t,r.length)},Q:function(a,r,t){var e=Math.ceil((a.getUTCMonth()+1)/3);switch(r){case"Q":return String(e);case"QQ":return b(e,2);case"Qo":return t.ordinalNumber(e,{unit:"quarter"});case"QQQ":return t.quarter(e,{width:"abbreviated",context:"formatting"});case"QQQQQ":return t.quarter(e,{width:"narrow",context:"formatting"});case"QQQQ":default:return t.quarter(e,{width:"wide",context:"formatting"})}},q:function(a,r,t){var e=Math.ceil((a.getUTCMonth()+1)/3);switch(r){case"q":return String(e);case"qq":return b(e,2);case"qo":return t.ordinalNumber(e,{unit:"quarter"});case"qqq":return t.quarter(e,{width:"abbreviated",context:"standalone"});case"qqqqq":return t.quarter(e,{width:"narrow",context:"standalone"});case"qqqq":default:return t.quarter(e,{width:"wide",context:"standalone"})}},M:function(a,r,t){var e=a.getUTCMonth();switch(r){case"M":case"MM":return Z.M(a,r);case"Mo":return t.ordinalNumber(e+1,{unit:"month"});case"MMM":return t.month(e,{width:"abbreviated",context:"formatting"});case"MMMMM":return t.month(e,{width:"narrow",context:"formatting"});case"MMMM":default:return t.month(e,{width:"wide",context:"formatting"})}},L:function(a,r,t){var e=a.getUTCMonth();switch(r){case"L":return String(e+1);case"LL":return b(e+1,2);case"Lo":return t.ordinalNumber(e+1,{unit:"month"});case"LLL":return t.month(e,{width:"abbreviated",context:"standalone"});case"LLLLL":return t.month(e,{width:"narrow",context:"standalone"});case"LLLL":default:return t.month(e,{width:"wide",context:"standalone"})}},w:function(a,r,t,e){var n=_t(a,e);return r==="wo"?t.ordinalNumber(n,{unit:"week"}):b(n,r.length)},I:function(a,r,t){var e=kt(a);return r==="Io"?t.ordinalNumber(e,{unit:"week"}):b(e,r.length)},d:function(a,r,t){return r==="do"?t.ordinalNumber(a.getUTCDate(),{unit:"date"}):Z.d(a,r)},D:function(a,r,t){var e=wr(a);return r==="Do"?t.ordinalNumber(e,{unit:"dayOfYear"}):b(e,r.length)},E:function(a,r,t){var e=a.getUTCDay();switch(r){case"E":case"EE":case"EEE":return t.day(e,{width:"abbreviated",context:"formatting"});case"EEEEE":return t.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return t.day(e,{width:"short",context:"formatting"});case"EEEE":default:return t.day(e,{width:"wide",context:"formatting"})}},e:function(a,r,t,e){var n=a.getUTCDay(),i=(n-e.weekStartsOn+8)%7||7;switch(r){case"e":return String(i);case"ee":return b(i,2);case"eo":return t.ordinalNumber(i,{unit:"day"});case"eee":return t.day(n,{width:"abbreviated",context:"formatting"});case"eeeee":return t.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return t.day(n,{width:"short",context:"formatting"});case"eeee":default:return t.day(n,{width:"wide",context:"formatting"})}},c:function(a,r,t,e){var n=a.getUTCDay(),i=(n-e.weekStartsOn+8)%7||7;switch(r){case"c":return String(i);case"cc":return b(i,r.length);case"co":return t.ordinalNumber(i,{unit:"day"});case"ccc":return t.day(n,{width:"abbreviated",context:"standalone"});case"ccccc":return t.day(n,{width:"narrow",context:"standalone"});case"cccccc":return t.day(n,{width:"short",context:"standalone"});case"cccc":default:return t.day(n,{width:"wide",context:"standalone"})}},i:function(a,r,t){var e=a.getUTCDay(),n=e===0?7:e;switch(r){case"i":return String(n);case"ii":return b(n,r.length);case"io":return t.ordinalNumber(n,{unit:"day"});case"iii":return t.day(e,{width:"abbreviated",context:"formatting"});case"iiiii":return t.day(e,{width:"narrow",context:"formatting"});case"iiiiii":return t.day(e,{width:"short",context:"formatting"});case"iiii":default:return t.day(e,{width:"wide",context:"formatting"})}},a:function(a,r,t){var e=a.getUTCHours(),n=e/12>=1?"pm":"am";switch(r){case"a":case"aa":return t.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return t.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return t.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaa":default:return t.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(a,r,t){var e=a.getUTCHours(),n;switch(e===12?n=ae.noon:e===0?n=ae.midnight:n=e/12>=1?"pm":"am",r){case"b":case"bb":return t.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return t.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return t.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbb":default:return t.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(a,r,t){var e=a.getUTCHours(),n;switch(e>=17?n=ae.evening:e>=12?n=ae.afternoon:e>=4?n=ae.morning:n=ae.night,r){case"B":case"BB":case"BBB":return t.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return t.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBB":default:return t.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(a,r,t){if(r==="ho"){var e=a.getUTCHours()%12;return e===0&&(e=12),t.ordinalNumber(e,{unit:"hour"})}return Z.h(a,r)},H:function(a,r,t){return r==="Ho"?t.ordinalNumber(a.getUTCHours(),{unit:"hour"}):Z.H(a,r)},K:function(a,r,t){var e=a.getUTCHours()%12;return r==="Ko"?t.ordinalNumber(e,{unit:"hour"}):b(e,r.length)},k:function(a,r,t){var e=a.getUTCHours();return e===0&&(e=24),r==="ko"?t.ordinalNumber(e,{unit:"hour"}):b(e,r.length)},m:function(a,r,t){return r==="mo"?t.ordinalNumber(a.getUTCMinutes(),{unit:"minute"}):Z.m(a,r)},s:function(a,r,t){return r==="so"?t.ordinalNumber(a.getUTCSeconds(),{unit:"second"}):Z.s(a,r)},S:function(a,r){return Z.S(a,r)},X:function(a,r,t,e){var n=e._originalDate||a,i=n.getTimezoneOffset();if(i===0)return"Z";switch(r){case"X":return ft(i);case"XXXX":case"XX":return te(i);case"XXXXX":case"XXX":default:return te(i,":")}},x:function(a,r,t,e){var n=e._originalDate||a,i=n.getTimezoneOffset();switch(r){case"x":return ft(i);case"xxxx":case"xx":return te(i);case"xxxxx":case"xxx":default:return te(i,":")}},O:function(a,r,t,e){var n=e._originalDate||a,i=n.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+dt(i,":");case"OOOO":default:return"GMT"+te(i,":")}},z:function(a,r,t,e){var n=e._originalDate||a,i=n.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+dt(i,":");case"zzzz":default:return"GMT"+te(i,":")}},t:function(a,r,t,e){var n=e._originalDate||a,i=Math.floor(n.getTime()/1e3);return b(i,r.length)},T:function(a,r,t,e){var n=e._originalDate||a,i=n.getTime();return b(i,r.length)}};function dt(o,a){var r=o>0?"-":"+",t=Math.abs(o),e=Math.floor(t/60),n=t%60;if(n===0)return r+String(e);var i=a;return r+String(e)+i+b(n,2)}function ft(o,a){if(o%60===0){var r=o>0?"-":"+";return r+b(Math.abs(o)/60,2)}return te(o,a)}function te(o,a){var r=a||"",t=o>0?"-":"+",e=Math.abs(o),n=b(Math.floor(e/60),2),i=b(e%60,2);return t+n+r+i}var vt=function(a,r){switch(a){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},Yt=function(a,r){switch(a){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},Or=function(a,r){var t=a.match(/(P+)(p+)?/)||[],e=t[1],n=t[2];if(!n)return vt(a,r);var i;switch(e){case"P":i=r.dateTime({width:"short"});break;case"PP":i=r.dateTime({width:"medium"});break;case"PPP":i=r.dateTime({width:"long"});break;case"PPPP":default:i=r.dateTime({width:"full"});break}return i.replace("{{date}}",vt(e,r)).replace("{{time}}",Yt(n,r))},je={p:Yt,P:Or},Pr=["D","DD"],Cr=["YY","YYYY"];function Et(o){return Pr.indexOf(o)!==-1}function Nt(o){return Cr.indexOf(o)!==-1}function Ce(o,a,r){if(o==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(a,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(o==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(a,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(o==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(a,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(o==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(a,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var xr={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"}},kr=function(a,r,t){var e,n=xr[a];return typeof n=="string"?e=n:r===1?e=n.one:e=n.other.replace("{{count}}",r.toString()),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"in "+e:e+" ago":e};function $e(o){return function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=a.width?String(a.width):o.defaultWidth,t=o.formats[r]||o.formats[o.defaultWidth];return t}}var _r={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Yr={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Er={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Nr={date:$e({formats:_r,defaultWidth:"full"}),time:$e({formats:Yr,defaultWidth:"full"}),dateTime:$e({formats:Er,defaultWidth:"full"})},Ur={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Sr=function(a,r,t,e){return Ur[a]};function de(o){return function(a,r){var t=r!=null&&r.context?String(r.context):"standalone",e;if(t==="formatting"&&o.formattingValues){var n=o.defaultFormattingWidth||o.defaultWidth,i=r!=null&&r.width?String(r.width):n;e=o.formattingValues[i]||o.formattingValues[n]}else{var u=o.defaultWidth,s=r!=null&&r.width?String(r.width):o.defaultWidth;e=o.values[s]||o.values[u]}var l=o.argumentCallback?o.argumentCallback(a):a;return e[l]}}var Hr={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Wr={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Ir={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"]},Ar={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"]},$r={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"}},Lr={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"}},Fr=function(a,r){var t=Number(a),e=t%100;if(e>20||e<10)switch(e%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},Rr={ordinalNumber:Fr,era:de({values:Hr,defaultWidth:"wide"}),quarter:de({values:Wr,defaultWidth:"wide",argumentCallback:function(a){return a-1}}),month:de({values:Ir,defaultWidth:"wide"}),day:de({values:Ar,defaultWidth:"wide"}),dayPeriod:de({values:$r,defaultWidth:"wide",formattingValues:Lr,defaultFormattingWidth:"wide"})};function fe(o){return function(a){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=r.width,e=t&&o.matchPatterns[t]||o.matchPatterns[o.defaultMatchWidth],n=a.match(e);if(!n)return null;var i=n[0],u=t&&o.parsePatterns[t]||o.parsePatterns[o.defaultParseWidth],s=Array.isArray(u)?Qr(u,function(v){return v.test(i)}):qr(u,function(v){return v.test(i)}),l;l=o.valueCallback?o.valueCallback(s):s,l=r.valueCallback?r.valueCallback(l):l;var c=a.slice(i.length);return{value:l,rest:c}}}function qr(o,a){for(var r in o)if(o.hasOwnProperty(r)&&a(o[r]))return r}function Qr(o,a){for(var r=0;r<o.length;r++)if(a(o[r]))return r}function Br(o){return function(a){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=a.match(o.matchPattern);if(!t)return null;var e=t[0],n=a.match(o.parsePattern);if(!n)return null;var i=o.valueCallback?o.valueCallback(n[0]):n[0];i=r.valueCallback?r.valueCallback(i):i;var u=a.slice(e.length);return{value:i,rest:u}}}var jr=/^(\d+)(th|st|nd|rd)?/i,Gr=/\d+/i,Xr={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},zr={any:[/^b/i,/^(a|c)/i]},Vr={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Zr={any:[/1/i,/2/i,/3/i,/4/i]},Jr={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},Kr={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]},ea={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},ta={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]},ra={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},aa={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}},na={ordinalNumber:Br({matchPattern:jr,parsePattern:Gr,valueCallback:function(a){return parseInt(a,10)}}),era:fe({matchPatterns:Xr,defaultMatchWidth:"wide",parsePatterns:zr,defaultParseWidth:"any"}),quarter:fe({matchPatterns:Vr,defaultMatchWidth:"wide",parsePatterns:Zr,defaultParseWidth:"any",valueCallback:function(a){return a+1}}),month:fe({matchPatterns:Jr,defaultMatchWidth:"wide",parsePatterns:Kr,defaultParseWidth:"any"}),day:fe({matchPatterns:ea,defaultMatchWidth:"wide",parsePatterns:ta,defaultParseWidth:"any"}),dayPeriod:fe({matchPatterns:ra,defaultMatchWidth:"any",parsePatterns:aa,defaultParseWidth:"any"})},Je={code:"en-US",formatDistance:kr,formatLong:Nr,formatRelative:Sr,localize:Rr,match:na,options:{weekStartsOn:0,firstWeekContainsDate:1}},ia=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,oa=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ua=/^'([^]*?)'?$/,sa=/''/g,la=/[a-zA-Z]/;function ca(o,a,r){var t,e,n,i,u,s,l,c,v,g,w,y,E,_,S,A,B,L;d(2,arguments);var K=String(a),I=J(),F=(t=(e=r==null?void 0:r.locale)!==null&&e!==void 0?e:I.locale)!==null&&t!==void 0?t:Je,X=C((n=(i=(u=(s=r==null?void 0:r.firstWeekContainsDate)!==null&&s!==void 0?s:r==null||(l=r.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&u!==void 0?u:I.firstWeekContainsDate)!==null&&i!==void 0?i:(v=I.locale)===null||v===void 0||(g=v.options)===null||g===void 0?void 0:g.firstWeekContainsDate)!==null&&n!==void 0?n:1);if(!(X>=1&&X<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var z=C((w=(y=(E=(_=r==null?void 0:r.weekStartsOn)!==null&&_!==void 0?_:r==null||(S=r.locale)===null||S===void 0||(A=S.options)===null||A===void 0?void 0:A.weekStartsOn)!==null&&E!==void 0?E:I.weekStartsOn)!==null&&y!==void 0?y:(B=I.locale)===null||B===void 0||(L=B.options)===null||L===void 0?void 0:L.weekStartsOn)!==null&&w!==void 0?w:0);if(!(z>=0&&z<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!F.localize)throw new RangeError("locale must contain localize property");if(!F.formatLong)throw new RangeError("locale must contain formatLong property");var V=f(o);if(!Pt(V))throw new RangeError("Invalid time value");var ue=Pe(V),se=Ct(V,ue),le={firstWeekContainsDate:X,weekStartsOn:z,locale:F,_originalDate:V},Ue=K.match(oa).map(function(W){var $=W[0];if($==="p"||$==="P"){var ee=je[$];return ee(W,F.formatLong)}return W}).join("").match(ia).map(function(W){if(W==="''")return"'";var $=W[0];if($==="'")return da(W);var ee=Mr[$];if(ee)return!(r!=null&&r.useAdditionalWeekYearTokens)&&Nt(W)&&Ce(W,a,String(o)),!(r!=null&&r.useAdditionalDayOfYearTokens)&&Et(W)&&Ce(W,a,String(o)),ee(se,W,F.localize,le);if($.match(la))throw new RangeError("Format string contains an unescaped latin alphabet character `"+$+"`");return W}).join("");return Ue}function da(o){var a=o.match(ua);return a?a[1].replace(sa,"'"):o}function fa(o){d(1,arguments);var a=f(o),r=a.getDate();return r}function va(o){d(1,arguments);var a=f(o),r=a.getDay();return r}function Ut(o){d(1,arguments);var a=f(o),r=a.getFullYear(),t=a.getMonth(),e=new Date(0);return e.setFullYear(r,t+1,0),e.setHours(0,0,0,0),e.getDate()}function ha(o){d(1,arguments);var a=f(o),r=a.getHours();return r}function ma(o){d(1,arguments);var a=f(o),r=a.getMinutes();return r}function pa(o){d(1,arguments);var a=f(o),r=a.getMonth();return r}function ga(o){d(1,arguments);var a=f(o),r=a.getSeconds();return r}function wa(o){return d(1,arguments),f(o).getFullYear()}function ye(o,a){d(2,arguments);var r=f(o),t=f(a);return r.getTime()>t.getTime()}function ne(o,a){d(2,arguments);var r=f(o),t=f(a);return r.getTime()<t.getTime()}function ya(o,a){d(2,arguments);var r=f(o),t=f(a);return r.getTime()===t.getTime()}function ba(o,a){d(2,arguments);var r=ie(o),t=ie(a);return r.getTime()===t.getTime()}function Ta(o,a){d(2,arguments);var r=f(o),t=f(a);return r.getFullYear()===t.getFullYear()}function Da(o,a){d(2,arguments);var r=f(o),t=f(a);return r.getFullYear()===t.getFullYear()&&r.getMonth()===t.getMonth()}function ht(o){d(1,arguments);var a=f(o);return a.setMinutes(0,0,0),a}function Ma(o,a){d(2,arguments);var r=ht(o),t=ht(a);return r.getTime()===t.getTime()}function mt(o,a){var r=typeof Symbol<"u"&&o[Symbol.iterator]||o["@@iterator"];if(!r){if(Array.isArray(o)||(r=Xt(o))||a){r&&(o=r);var t=0,e=function(){};return{s:e,n:function(){return t>=o.length?{done:!0}:{done:!1,value:o[t++]}},e:function(l){throw l},f:e}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
1
+ import{aw as Ve,at as h,aU as p,g as Rt,cn as qt,bx as Qt,c1 as Bt,bY as jt,r as We,by as Gt}from"./index.DZ6oX-v9.js";import{e as Xt,_ as M,b as T,a as D}from"./possibleConstructorReturn.BgDi5nUm.js";import{_ as O}from"./createSuper.-HPb1oYT.js";function C(o){if(o===null||o===!0||o===!1)return NaN;var a=Number(o);return isNaN(a)?a:a<0?Math.ceil(a):Math.floor(a)}function d(o,a){if(a.length<o)throw new TypeError(o+" argument"+(o>1?"s":"")+" required, but only "+a.length+" present")}function f(o){d(1,arguments);var a=Object.prototype.toString.call(o);return o instanceof Date||Ve(o)==="object"&&a==="[object Date]"?new Date(o.getTime()):typeof o=="number"||a==="[object Number]"?new Date(o):((typeof o=="string"||a==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function qe(o,a){d(2,arguments);var r=f(o),t=C(a);return isNaN(t)?new Date(NaN):(t&&r.setDate(r.getDate()+t),r)}function _e(o,a){d(2,arguments);var r=f(o).getTime(),t=C(a);return new Date(r+t)}function zt(o,a){d(2,arguments);var r=C(a);return _e(o,r*1e3)}var Vt=6e4;function Zt(o,a){d(2,arguments);var r=C(a);return _e(o,r*Vt)}var Jt=36e5;function Kt(o,a){d(2,arguments);var r=C(a);return _e(o,r*Jt)}function er(o,a){d(2,arguments);var r=C(a),t=r*7;return qe(o,t)}function Oe(o,a){d(2,arguments);var r=f(o),t=C(a);if(isNaN(t))return new Date(NaN);if(!t)return r;var e=r.getDate(),n=new Date(r.getTime());n.setMonth(r.getMonth()+t+1,0);var i=n.getDate();return e>=i?n:(r.setFullYear(n.getFullYear(),n.getMonth(),e),r)}function st(o,a){d(2,arguments);var r=C(a);return Oe(o,r*12)}function tr(o,a){d(2,arguments);var r=f(o),t=f(a);return r.getFullYear()-t.getFullYear()}function he(o,a){d(2,arguments);var r=f(o),t=f(a),e=r.getTime()-t.getTime();return e<0?-1:e>0?1:e}function rr(o,a){d(2,arguments);var r=f(o),t=f(a),e=he(r,t),n=Math.abs(tr(r,t));r.setFullYear(1584),t.setFullYear(1584);var i=he(r,t)===-e,u=e*(n-Number(i));return u===0?0:u}function ar(o,a){d(2,arguments);var r=f(o),t=f(a),e=r.getFullYear()-t.getFullYear(),n=r.getMonth()-t.getMonth();return e*12+n}function Qe(o){d(1,arguments);var a=f(o);return a.setHours(23,59,59,999),a}function Be(o){d(1,arguments);var a=f(o),r=a.getMonth();return a.setFullYear(a.getFullYear(),r+1,0),a.setHours(23,59,59,999),a}function nr(o){d(1,arguments);var a=f(o);return Qe(a).getTime()===Be(a).getTime()}function Mt(o,a){d(2,arguments);var r=f(o),t=f(a),e=he(r,t),n=Math.abs(ar(r,t)),i;if(n<1)i=0;else{r.getMonth()===1&&r.getDate()>27&&r.setDate(30),r.setMonth(r.getMonth()-e*n);var u=he(r,t)===-e;nr(f(o))&&n===1&&he(o,t)===1&&(u=!1),i=e*(n-Number(u))}return i===0?0:i}var lt={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(a){return a<0?Math.ceil(a):Math.floor(a)}},ir="trunc";function me(o){return o?lt[o]:lt[ir]}function or(o,a,r){d(2,arguments);var t=Mt(o,a)/3;return me(void 0)(t)}function Pe(o){var a=new Date(Date.UTC(o.getFullYear(),o.getMonth(),o.getDate(),o.getHours(),o.getMinutes(),o.getSeconds(),o.getMilliseconds()));return a.setUTCFullYear(o.getFullYear()),o.getTime()-a.getTime()}function ie(o){d(1,arguments);var a=f(o);return a.setHours(0,0,0,0),a}var ur=864e5;function sr(o,a){d(2,arguments);var r=ie(o),t=ie(a),e=r.getTime()-Pe(r),n=t.getTime()-Pe(t);return Math.round((e-n)/ur)}function ct(o,a){var r=o.getFullYear()-a.getFullYear()||o.getMonth()-a.getMonth()||o.getDate()-a.getDate()||o.getHours()-a.getHours()||o.getMinutes()-a.getMinutes()||o.getSeconds()-a.getSeconds()||o.getMilliseconds()-a.getMilliseconds();return r<0?-1:r>0?1:r}function Ot(o,a){d(2,arguments);var r=f(o),t=f(a),e=ct(r,t),n=Math.abs(sr(r,t));r.setDate(r.getDate()-e*n);var i=+(ct(r,t)===-e),u=e*(n-i);return u===0?0:u}function lr(o,a,r){d(2,arguments);var t=Ot(o,a)/7;return me(void 0)(t)}var Ye=6e4,Ee=36e5,cr=1e3;function Ne(o,a){return d(2,arguments),f(o).getTime()-f(a).getTime()}function dr(o,a,r){d(2,arguments);var t=Ne(o,a)/Ee;return me(void 0)(t)}function fr(o,a,r){d(2,arguments);var t=Ne(o,a)/Ye;return me(void 0)(t)}function vr(o,a,r){d(2,arguments);var t=Ne(o,a)/1e3;return me(void 0)(t)}function hr(o,a){var r;d(1,arguments);var t=o||{},e=f(t.start),n=f(t.end),i=n.getTime();if(!(e.getTime()<=i))throw new RangeError("Invalid interval");var u=[],s=e;s.setHours(0,0,0,0);var l=Number((r=void 0)!==null&&r!==void 0?r:1);if(l<1||isNaN(l))throw new RangeError("`options.step` must be a number greater than 1");for(;s.getTime()<=i;)u.push(f(s)),s.setDate(s.getDate()+l),s.setHours(0,0,0,0);return u}var mr={};function J(){return mr}function Ie(o,a){var r,t,e,n,i,u,s,l;d(1,arguments);var c=J(),v=C((r=(t=(e=(n=a==null?void 0:a.weekStartsOn)!==null&&n!==void 0?n:a==null||(i=a.locale)===null||i===void 0||(u=i.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&e!==void 0?e:c.weekStartsOn)!==null&&t!==void 0?t:(s=c.locale)===null||s===void 0||(l=s.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&r!==void 0?r:0);if(!(v>=0&&v<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var g=f(o),w=g.getDay(),y=(w<v?-7:0)+6-(w-v);return g.setDate(g.getDate()+y),g.setHours(23,59,59,999),g}function Ae(o){d(1,arguments);var a=f(o),r=a.getFullYear();return a.setFullYear(r+1,0,0),a.setHours(23,59,59,999),a}function pr(o){return d(1,arguments),o instanceof Date||Ve(o)==="object"&&Object.prototype.toString.call(o)==="[object Date]"}function Pt(o){if(d(1,arguments),!pr(o)&&typeof o!="number")return!1;var a=f(o);return!isNaN(Number(a))}function Ct(o,a){d(2,arguments);var r=C(a);return _e(o,-r)}var gr=864e5;function wr(o){d(1,arguments);var a=f(o),r=a.getTime();a.setUTCMonth(0,1),a.setUTCHours(0,0,0,0);var t=a.getTime(),e=r-t;return Math.floor(e/gr)+1}function oe(o){d(1,arguments);var a=1,r=f(o),t=r.getUTCDay(),e=(t<a?7:0)+t-a;return r.setUTCDate(r.getUTCDate()-e),r.setUTCHours(0,0,0,0),r}function xt(o){d(1,arguments);var a=f(o),r=a.getUTCFullYear(),t=new Date(0);t.setUTCFullYear(r+1,0,4),t.setUTCHours(0,0,0,0);var e=oe(t),n=new Date(0);n.setUTCFullYear(r,0,4),n.setUTCHours(0,0,0,0);var i=oe(n);return a.getTime()>=e.getTime()?r+1:a.getTime()>=i.getTime()?r:r-1}function yr(o){d(1,arguments);var a=xt(o),r=new Date(0);r.setUTCFullYear(a,0,4),r.setUTCHours(0,0,0,0);var t=oe(r);return t}var br=6048e5;function kt(o){d(1,arguments);var a=f(o),r=oe(a).getTime()-yr(a).getTime();return Math.round(r/br)+1}function re(o,a){var r,t,e,n,i,u,s,l;d(1,arguments);var c=J(),v=C((r=(t=(e=(n=a==null?void 0:a.weekStartsOn)!==null&&n!==void 0?n:a==null||(i=a.locale)===null||i===void 0||(u=i.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&e!==void 0?e:c.weekStartsOn)!==null&&t!==void 0?t:(s=c.locale)===null||s===void 0||(l=s.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&r!==void 0?r:0);if(!(v>=0&&v<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var g=f(o),w=g.getUTCDay(),y=(w<v?7:0)+w-v;return g.setUTCDate(g.getUTCDate()-y),g.setUTCHours(0,0,0,0),g}function Ze(o,a){var r,t,e,n,i,u,s,l;d(1,arguments);var c=f(o),v=c.getUTCFullYear(),g=J(),w=C((r=(t=(e=(n=a==null?void 0:a.firstWeekContainsDate)!==null&&n!==void 0?n:a==null||(i=a.locale)===null||i===void 0||(u=i.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&e!==void 0?e:g.firstWeekContainsDate)!==null&&t!==void 0?t:(s=g.locale)===null||s===void 0||(l=s.options)===null||l===void 0?void 0:l.firstWeekContainsDate)!==null&&r!==void 0?r:1);if(!(w>=1&&w<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var y=new Date(0);y.setUTCFullYear(v+1,0,w),y.setUTCHours(0,0,0,0);var E=re(y,a),_=new Date(0);_.setUTCFullYear(v,0,w),_.setUTCHours(0,0,0,0);var S=re(_,a);return c.getTime()>=E.getTime()?v+1:c.getTime()>=S.getTime()?v:v-1}function Tr(o,a){var r,t,e,n,i,u,s,l;d(1,arguments);var c=J(),v=C((r=(t=(e=(n=a==null?void 0:a.firstWeekContainsDate)!==null&&n!==void 0?n:a==null||(i=a.locale)===null||i===void 0||(u=i.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&e!==void 0?e:c.firstWeekContainsDate)!==null&&t!==void 0?t:(s=c.locale)===null||s===void 0||(l=s.options)===null||l===void 0?void 0:l.firstWeekContainsDate)!==null&&r!==void 0?r:1),g=Ze(o,a),w=new Date(0);w.setUTCFullYear(g,0,v),w.setUTCHours(0,0,0,0);var y=re(w,a);return y}var Dr=6048e5;function _t(o,a){d(1,arguments);var r=f(o),t=re(r,a).getTime()-Tr(r,a).getTime();return Math.round(t/Dr)+1}function b(o,a){for(var r=o<0?"-":"",t=Math.abs(o).toString();t.length<a;)t="0"+t;return r+t}var Z={y:function(a,r){var t=a.getUTCFullYear(),e=t>0?t:1-t;return b(r==="yy"?e%100:e,r.length)},M:function(a,r){var t=a.getUTCMonth();return r==="M"?String(t+1):b(t+1,2)},d:function(a,r){return b(a.getUTCDate(),r.length)},a:function(a,r){var t=a.getUTCHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return t.toUpperCase();case"aaa":return t;case"aaaaa":return t[0];case"aaaa":default:return t==="am"?"a.m.":"p.m."}},h:function(a,r){return b(a.getUTCHours()%12||12,r.length)},H:function(a,r){return b(a.getUTCHours(),r.length)},m:function(a,r){return b(a.getUTCMinutes(),r.length)},s:function(a,r){return b(a.getUTCSeconds(),r.length)},S:function(a,r){var t=r.length,e=a.getUTCMilliseconds(),n=Math.floor(e*Math.pow(10,t-3));return b(n,r.length)}},ae={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Mr={G:function(a,r,t){var e=a.getUTCFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return t.era(e,{width:"abbreviated"});case"GGGGG":return t.era(e,{width:"narrow"});case"GGGG":default:return t.era(e,{width:"wide"})}},y:function(a,r,t){if(r==="yo"){var e=a.getUTCFullYear(),n=e>0?e:1-e;return t.ordinalNumber(n,{unit:"year"})}return Z.y(a,r)},Y:function(a,r,t,e){var n=Ze(a,e),i=n>0?n:1-n;if(r==="YY"){var u=i%100;return b(u,2)}return r==="Yo"?t.ordinalNumber(i,{unit:"year"}):b(i,r.length)},R:function(a,r){var t=xt(a);return b(t,r.length)},u:function(a,r){var t=a.getUTCFullYear();return b(t,r.length)},Q:function(a,r,t){var e=Math.ceil((a.getUTCMonth()+1)/3);switch(r){case"Q":return String(e);case"QQ":return b(e,2);case"Qo":return t.ordinalNumber(e,{unit:"quarter"});case"QQQ":return t.quarter(e,{width:"abbreviated",context:"formatting"});case"QQQQQ":return t.quarter(e,{width:"narrow",context:"formatting"});case"QQQQ":default:return t.quarter(e,{width:"wide",context:"formatting"})}},q:function(a,r,t){var e=Math.ceil((a.getUTCMonth()+1)/3);switch(r){case"q":return String(e);case"qq":return b(e,2);case"qo":return t.ordinalNumber(e,{unit:"quarter"});case"qqq":return t.quarter(e,{width:"abbreviated",context:"standalone"});case"qqqqq":return t.quarter(e,{width:"narrow",context:"standalone"});case"qqqq":default:return t.quarter(e,{width:"wide",context:"standalone"})}},M:function(a,r,t){var e=a.getUTCMonth();switch(r){case"M":case"MM":return Z.M(a,r);case"Mo":return t.ordinalNumber(e+1,{unit:"month"});case"MMM":return t.month(e,{width:"abbreviated",context:"formatting"});case"MMMMM":return t.month(e,{width:"narrow",context:"formatting"});case"MMMM":default:return t.month(e,{width:"wide",context:"formatting"})}},L:function(a,r,t){var e=a.getUTCMonth();switch(r){case"L":return String(e+1);case"LL":return b(e+1,2);case"Lo":return t.ordinalNumber(e+1,{unit:"month"});case"LLL":return t.month(e,{width:"abbreviated",context:"standalone"});case"LLLLL":return t.month(e,{width:"narrow",context:"standalone"});case"LLLL":default:return t.month(e,{width:"wide",context:"standalone"})}},w:function(a,r,t,e){var n=_t(a,e);return r==="wo"?t.ordinalNumber(n,{unit:"week"}):b(n,r.length)},I:function(a,r,t){var e=kt(a);return r==="Io"?t.ordinalNumber(e,{unit:"week"}):b(e,r.length)},d:function(a,r,t){return r==="do"?t.ordinalNumber(a.getUTCDate(),{unit:"date"}):Z.d(a,r)},D:function(a,r,t){var e=wr(a);return r==="Do"?t.ordinalNumber(e,{unit:"dayOfYear"}):b(e,r.length)},E:function(a,r,t){var e=a.getUTCDay();switch(r){case"E":case"EE":case"EEE":return t.day(e,{width:"abbreviated",context:"formatting"});case"EEEEE":return t.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return t.day(e,{width:"short",context:"formatting"});case"EEEE":default:return t.day(e,{width:"wide",context:"formatting"})}},e:function(a,r,t,e){var n=a.getUTCDay(),i=(n-e.weekStartsOn+8)%7||7;switch(r){case"e":return String(i);case"ee":return b(i,2);case"eo":return t.ordinalNumber(i,{unit:"day"});case"eee":return t.day(n,{width:"abbreviated",context:"formatting"});case"eeeee":return t.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return t.day(n,{width:"short",context:"formatting"});case"eeee":default:return t.day(n,{width:"wide",context:"formatting"})}},c:function(a,r,t,e){var n=a.getUTCDay(),i=(n-e.weekStartsOn+8)%7||7;switch(r){case"c":return String(i);case"cc":return b(i,r.length);case"co":return t.ordinalNumber(i,{unit:"day"});case"ccc":return t.day(n,{width:"abbreviated",context:"standalone"});case"ccccc":return t.day(n,{width:"narrow",context:"standalone"});case"cccccc":return t.day(n,{width:"short",context:"standalone"});case"cccc":default:return t.day(n,{width:"wide",context:"standalone"})}},i:function(a,r,t){var e=a.getUTCDay(),n=e===0?7:e;switch(r){case"i":return String(n);case"ii":return b(n,r.length);case"io":return t.ordinalNumber(n,{unit:"day"});case"iii":return t.day(e,{width:"abbreviated",context:"formatting"});case"iiiii":return t.day(e,{width:"narrow",context:"formatting"});case"iiiiii":return t.day(e,{width:"short",context:"formatting"});case"iiii":default:return t.day(e,{width:"wide",context:"formatting"})}},a:function(a,r,t){var e=a.getUTCHours(),n=e/12>=1?"pm":"am";switch(r){case"a":case"aa":return t.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return t.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return t.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaa":default:return t.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(a,r,t){var e=a.getUTCHours(),n;switch(e===12?n=ae.noon:e===0?n=ae.midnight:n=e/12>=1?"pm":"am",r){case"b":case"bb":return t.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return t.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return t.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbb":default:return t.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(a,r,t){var e=a.getUTCHours(),n;switch(e>=17?n=ae.evening:e>=12?n=ae.afternoon:e>=4?n=ae.morning:n=ae.night,r){case"B":case"BB":case"BBB":return t.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return t.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBB":default:return t.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(a,r,t){if(r==="ho"){var e=a.getUTCHours()%12;return e===0&&(e=12),t.ordinalNumber(e,{unit:"hour"})}return Z.h(a,r)},H:function(a,r,t){return r==="Ho"?t.ordinalNumber(a.getUTCHours(),{unit:"hour"}):Z.H(a,r)},K:function(a,r,t){var e=a.getUTCHours()%12;return r==="Ko"?t.ordinalNumber(e,{unit:"hour"}):b(e,r.length)},k:function(a,r,t){var e=a.getUTCHours();return e===0&&(e=24),r==="ko"?t.ordinalNumber(e,{unit:"hour"}):b(e,r.length)},m:function(a,r,t){return r==="mo"?t.ordinalNumber(a.getUTCMinutes(),{unit:"minute"}):Z.m(a,r)},s:function(a,r,t){return r==="so"?t.ordinalNumber(a.getUTCSeconds(),{unit:"second"}):Z.s(a,r)},S:function(a,r){return Z.S(a,r)},X:function(a,r,t,e){var n=e._originalDate||a,i=n.getTimezoneOffset();if(i===0)return"Z";switch(r){case"X":return ft(i);case"XXXX":case"XX":return te(i);case"XXXXX":case"XXX":default:return te(i,":")}},x:function(a,r,t,e){var n=e._originalDate||a,i=n.getTimezoneOffset();switch(r){case"x":return ft(i);case"xxxx":case"xx":return te(i);case"xxxxx":case"xxx":default:return te(i,":")}},O:function(a,r,t,e){var n=e._originalDate||a,i=n.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+dt(i,":");case"OOOO":default:return"GMT"+te(i,":")}},z:function(a,r,t,e){var n=e._originalDate||a,i=n.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+dt(i,":");case"zzzz":default:return"GMT"+te(i,":")}},t:function(a,r,t,e){var n=e._originalDate||a,i=Math.floor(n.getTime()/1e3);return b(i,r.length)},T:function(a,r,t,e){var n=e._originalDate||a,i=n.getTime();return b(i,r.length)}};function dt(o,a){var r=o>0?"-":"+",t=Math.abs(o),e=Math.floor(t/60),n=t%60;if(n===0)return r+String(e);var i=a;return r+String(e)+i+b(n,2)}function ft(o,a){if(o%60===0){var r=o>0?"-":"+";return r+b(Math.abs(o)/60,2)}return te(o,a)}function te(o,a){var r=a||"",t=o>0?"-":"+",e=Math.abs(o),n=b(Math.floor(e/60),2),i=b(e%60,2);return t+n+r+i}var vt=function(a,r){switch(a){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},Yt=function(a,r){switch(a){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},Or=function(a,r){var t=a.match(/(P+)(p+)?/)||[],e=t[1],n=t[2];if(!n)return vt(a,r);var i;switch(e){case"P":i=r.dateTime({width:"short"});break;case"PP":i=r.dateTime({width:"medium"});break;case"PPP":i=r.dateTime({width:"long"});break;case"PPPP":default:i=r.dateTime({width:"full"});break}return i.replace("{{date}}",vt(e,r)).replace("{{time}}",Yt(n,r))},je={p:Yt,P:Or},Pr=["D","DD"],Cr=["YY","YYYY"];function Et(o){return Pr.indexOf(o)!==-1}function Nt(o){return Cr.indexOf(o)!==-1}function Ce(o,a,r){if(o==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(a,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(o==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(a,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(o==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(a,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(o==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(a,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var xr={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"}},kr=function(a,r,t){var e,n=xr[a];return typeof n=="string"?e=n:r===1?e=n.one:e=n.other.replace("{{count}}",r.toString()),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"in "+e:e+" ago":e};function $e(o){return function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=a.width?String(a.width):o.defaultWidth,t=o.formats[r]||o.formats[o.defaultWidth];return t}}var _r={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Yr={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Er={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Nr={date:$e({formats:_r,defaultWidth:"full"}),time:$e({formats:Yr,defaultWidth:"full"}),dateTime:$e({formats:Er,defaultWidth:"full"})},Ur={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Sr=function(a,r,t,e){return Ur[a]};function de(o){return function(a,r){var t=r!=null&&r.context?String(r.context):"standalone",e;if(t==="formatting"&&o.formattingValues){var n=o.defaultFormattingWidth||o.defaultWidth,i=r!=null&&r.width?String(r.width):n;e=o.formattingValues[i]||o.formattingValues[n]}else{var u=o.defaultWidth,s=r!=null&&r.width?String(r.width):o.defaultWidth;e=o.values[s]||o.values[u]}var l=o.argumentCallback?o.argumentCallback(a):a;return e[l]}}var Hr={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Wr={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Ir={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"]},Ar={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"]},$r={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"}},Lr={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"}},Fr=function(a,r){var t=Number(a),e=t%100;if(e>20||e<10)switch(e%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},Rr={ordinalNumber:Fr,era:de({values:Hr,defaultWidth:"wide"}),quarter:de({values:Wr,defaultWidth:"wide",argumentCallback:function(a){return a-1}}),month:de({values:Ir,defaultWidth:"wide"}),day:de({values:Ar,defaultWidth:"wide"}),dayPeriod:de({values:$r,defaultWidth:"wide",formattingValues:Lr,defaultFormattingWidth:"wide"})};function fe(o){return function(a){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=r.width,e=t&&o.matchPatterns[t]||o.matchPatterns[o.defaultMatchWidth],n=a.match(e);if(!n)return null;var i=n[0],u=t&&o.parsePatterns[t]||o.parsePatterns[o.defaultParseWidth],s=Array.isArray(u)?Qr(u,function(v){return v.test(i)}):qr(u,function(v){return v.test(i)}),l;l=o.valueCallback?o.valueCallback(s):s,l=r.valueCallback?r.valueCallback(l):l;var c=a.slice(i.length);return{value:l,rest:c}}}function qr(o,a){for(var r in o)if(o.hasOwnProperty(r)&&a(o[r]))return r}function Qr(o,a){for(var r=0;r<o.length;r++)if(a(o[r]))return r}function Br(o){return function(a){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=a.match(o.matchPattern);if(!t)return null;var e=t[0],n=a.match(o.parsePattern);if(!n)return null;var i=o.valueCallback?o.valueCallback(n[0]):n[0];i=r.valueCallback?r.valueCallback(i):i;var u=a.slice(e.length);return{value:i,rest:u}}}var jr=/^(\d+)(th|st|nd|rd)?/i,Gr=/\d+/i,Xr={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},zr={any:[/^b/i,/^(a|c)/i]},Vr={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Zr={any:[/1/i,/2/i,/3/i,/4/i]},Jr={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},Kr={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]},ea={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},ta={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]},ra={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},aa={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}},na={ordinalNumber:Br({matchPattern:jr,parsePattern:Gr,valueCallback:function(a){return parseInt(a,10)}}),era:fe({matchPatterns:Xr,defaultMatchWidth:"wide",parsePatterns:zr,defaultParseWidth:"any"}),quarter:fe({matchPatterns:Vr,defaultMatchWidth:"wide",parsePatterns:Zr,defaultParseWidth:"any",valueCallback:function(a){return a+1}}),month:fe({matchPatterns:Jr,defaultMatchWidth:"wide",parsePatterns:Kr,defaultParseWidth:"any"}),day:fe({matchPatterns:ea,defaultMatchWidth:"wide",parsePatterns:ta,defaultParseWidth:"any"}),dayPeriod:fe({matchPatterns:ra,defaultMatchWidth:"any",parsePatterns:aa,defaultParseWidth:"any"})},Je={code:"en-US",formatDistance:kr,formatLong:Nr,formatRelative:Sr,localize:Rr,match:na,options:{weekStartsOn:0,firstWeekContainsDate:1}},ia=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,oa=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ua=/^'([^]*?)'?$/,sa=/''/g,la=/[a-zA-Z]/;function ca(o,a,r){var t,e,n,i,u,s,l,c,v,g,w,y,E,_,S,A,B,L;d(2,arguments);var K=String(a),I=J(),F=(t=(e=r==null?void 0:r.locale)!==null&&e!==void 0?e:I.locale)!==null&&t!==void 0?t:Je,X=C((n=(i=(u=(s=r==null?void 0:r.firstWeekContainsDate)!==null&&s!==void 0?s:r==null||(l=r.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&u!==void 0?u:I.firstWeekContainsDate)!==null&&i!==void 0?i:(v=I.locale)===null||v===void 0||(g=v.options)===null||g===void 0?void 0:g.firstWeekContainsDate)!==null&&n!==void 0?n:1);if(!(X>=1&&X<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var z=C((w=(y=(E=(_=r==null?void 0:r.weekStartsOn)!==null&&_!==void 0?_:r==null||(S=r.locale)===null||S===void 0||(A=S.options)===null||A===void 0?void 0:A.weekStartsOn)!==null&&E!==void 0?E:I.weekStartsOn)!==null&&y!==void 0?y:(B=I.locale)===null||B===void 0||(L=B.options)===null||L===void 0?void 0:L.weekStartsOn)!==null&&w!==void 0?w:0);if(!(z>=0&&z<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!F.localize)throw new RangeError("locale must contain localize property");if(!F.formatLong)throw new RangeError("locale must contain formatLong property");var V=f(o);if(!Pt(V))throw new RangeError("Invalid time value");var ue=Pe(V),se=Ct(V,ue),le={firstWeekContainsDate:X,weekStartsOn:z,locale:F,_originalDate:V},Ue=K.match(oa).map(function(W){var $=W[0];if($==="p"||$==="P"){var ee=je[$];return ee(W,F.formatLong)}return W}).join("").match(ia).map(function(W){if(W==="''")return"'";var $=W[0];if($==="'")return da(W);var ee=Mr[$];if(ee)return!(r!=null&&r.useAdditionalWeekYearTokens)&&Nt(W)&&Ce(W,a,String(o)),!(r!=null&&r.useAdditionalDayOfYearTokens)&&Et(W)&&Ce(W,a,String(o)),ee(se,W,F.localize,le);if($.match(la))throw new RangeError("Format string contains an unescaped latin alphabet character `"+$+"`");return W}).join("");return Ue}function da(o){var a=o.match(ua);return a?a[1].replace(sa,"'"):o}function fa(o){d(1,arguments);var a=f(o),r=a.getDate();return r}function va(o){d(1,arguments);var a=f(o),r=a.getDay();return r}function Ut(o){d(1,arguments);var a=f(o),r=a.getFullYear(),t=a.getMonth(),e=new Date(0);return e.setFullYear(r,t+1,0),e.setHours(0,0,0,0),e.getDate()}function ha(o){d(1,arguments);var a=f(o),r=a.getHours();return r}function ma(o){d(1,arguments);var a=f(o),r=a.getMinutes();return r}function pa(o){d(1,arguments);var a=f(o),r=a.getMonth();return r}function ga(o){d(1,arguments);var a=f(o),r=a.getSeconds();return r}function wa(o){return d(1,arguments),f(o).getFullYear()}function ye(o,a){d(2,arguments);var r=f(o),t=f(a);return r.getTime()>t.getTime()}function ne(o,a){d(2,arguments);var r=f(o),t=f(a);return r.getTime()<t.getTime()}function ya(o,a){d(2,arguments);var r=f(o),t=f(a);return r.getTime()===t.getTime()}function ba(o,a){d(2,arguments);var r=ie(o),t=ie(a);return r.getTime()===t.getTime()}function Ta(o,a){d(2,arguments);var r=f(o),t=f(a);return r.getFullYear()===t.getFullYear()}function Da(o,a){d(2,arguments);var r=f(o),t=f(a);return r.getFullYear()===t.getFullYear()&&r.getMonth()===t.getMonth()}function ht(o){d(1,arguments);var a=f(o);return a.setMinutes(0,0,0),a}function Ma(o,a){d(2,arguments);var r=ht(o),t=ht(a);return r.getTime()===t.getTime()}function mt(o,a){var r=typeof Symbol<"u"&&o[Symbol.iterator]||o["@@iterator"];if(!r){if(Array.isArray(o)||(r=Xt(o))||a){r&&(o=r);var t=0,e=function(){};return{s:e,n:function(){return t>=o.length?{done:!0}:{done:!1,value:o[t++]}},e:function(l){throw l},f:e}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var n,i=!0,u=!1;return{s:function(){r=r.call(o)},n:function(){var l=r.next();return i=l.done,l},e:function(l){u=!0,n=l},f:function(){try{i||r.return==null||r.return()}finally{if(u)throw n}}}}function Oa(o,a){if(o==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(o[r]=a[r]);return o}var Pa=10,St=function(){function o(){T(this,o),h(this,"priority",void 0),h(this,"subPriority",0)}return D(o,[{key:"validate",value:function(r,t){return!0}}]),o}(),Ca=function(o){M(r,o);var a=O(r);function r(t,e,n,i,u){var s;return T(this,r),s=a.call(this),s.value=t,s.validateValue=e,s.setValue=n,s.priority=i,u&&(s.subPriority=u),s}return D(r,[{key:"validate",value:function(e,n){return this.validateValue(e,this.value,n)}},{key:"set",value:function(e,n,i){return this.setValue(e,n,this.value,i)}}]),r}(St),xa=function(o){M(r,o);var a=O(r);function r(){var t;T(this,r);for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return t=a.call.apply(a,[this].concat(n)),h(p(t),"priority",Pa),h(p(t),"subPriority",-1),t}return D(r,[{key:"set",value:function(e,n){if(n.timestampIsSet)return e;var i=new Date(0);return i.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),i.setHours(e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),i}}]),r}(St),P=function(){function o(){T(this,o),h(this,"incompatibleTokens",void 0),h(this,"priority",void 0),h(this,"subPriority",void 0)}return D(o,[{key:"run",value:function(r,t,e,n){var i=this.parse(r,t,e,n);return i?{setter:new Ca(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}},{key:"validate",value:function(r,t,e){return!0}}]),o}(),ka=function(o){M(r,o);var a=O(r);function r(){var t;T(this,r);for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return t=a.call.apply(a,[this].concat(n)),h(p(t),"priority",140),h(p(t),"incompatibleTokens",["R","u","t","T"]),t}return D(r,[{key:"parse",value:function(e,n,i){switch(n){case"G":case"GG":case"GGG":return i.era(e,{width:"abbreviated"})||i.era(e,{width:"narrow"});case"GGGGG":return i.era(e,{width:"narrow"});case"GGGG":default:return i.era(e,{width:"wide"})||i.era(e,{width:"abbreviated"})||i.era(e,{width:"narrow"})}}},{key:"set",value:function(e,n,i){return n.era=i,e.setUTCFullYear(i,0,1),e.setUTCHours(0,0,0,0),e}}]),r}(P),N={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}/},j={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 U(o,a){return o&&{value:a(o.value),rest:o.rest}}function k(o,a){var r=a.match(o);return r?{value:parseInt(r[0],10),rest:a.slice(r[0].length)}:null}function G(o,a){var r=a.match(o);if(!r)return null;if(r[0]==="Z")return{value:0,rest:a.slice(1)};var t=r[1]==="+"?1:-1,e=r[2]?parseInt(r[2],10):0,n=r[3]?parseInt(r[3],10):0,i=r[5]?parseInt(r[5],10):0;return{value:t*(e*Ee+n*Ye+i*cr),rest:a.slice(r[0].length)}}function Ht(o){return k(N.anyDigitsSigned,o)}function Y(o,a){switch(o){case 1:return k(N.singleDigit,a);case 2:return k(N.twoDigits,a);case 3:return k(N.threeDigits,a);case 4:return k(N.fourDigits,a);default:return k(new RegExp("^\\d{1,"+o+"}"),a)}}function xe(o,a){switch(o){case 1:return k(N.singleDigitSigned,a);case 2:return k(N.twoDigitsSigned,a);case 3:return k(N.threeDigitsSigned,a);case 4:return k(N.fourDigitsSigned,a);default:return k(new RegExp("^-?\\d{1,"+o+"}"),a)}}function Ke(o){switch(o){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 Wt(o,a){var r=a>0,t=r?a:1-a,e;if(t<=50)e=o||100;else{var n=t+50,i=Math.floor(n/100)*100,u=o>=n%100;e=o+i-(u?100:0)}return r?e:1-e}function It(o){return o%400===0||o%4===0&&o%100!==0}var _a=function(o){M(r,o);var a=O(r);function r(){var t;T(this,r);for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return t=a.call.apply(a,[this].concat(n)),h(p(t),"priority",130),h(p(t),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),t}return D(r,[{key:"parse",value:function(e,n,i){var u=function(l){return{year:l,isTwoDigitYear:n==="yy"}};switch(n){case"y":return U(Y(4,e),u);case"yo":return U(i.ordinalNumber(e,{unit:"year"}),u);default:return U(Y(n.length,e),u)}}},{key:"validate",value:function(e,n){return n.isTwoDigitYear||n.year>0}},{key:"set",value:function(e,n,i){var u=e.getUTCFullYear();if(i.isTwoDigitYear){var s=Wt(i.year,u);return e.setUTCFullYear(s,0,1),e.setUTCHours(0,0,0,0),e}var l=!("era"in n)||n.era===1?i.year:1-i.year;return e.setUTCFullYear(l,0,1),e.setUTCHours(0,0,0,0),e}}]),r}(P),Ya=function(o){M(r,o);var a=O(r);function r(){var t;T(this,r);for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return t=a.call.apply(a,[this].concat(n)),h(p(t),"priority",130),h(p(t),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),t}return D(r,[{key:"parse",value:function(e,n,i){var u=function(l){return{year:l,isTwoDigitYear:n==="YY"}};switch(n){case"Y":return U(Y(4,e),u);case"Yo":return U(i.ordinalNumber(e,{unit:"year"}),u);default:return U(Y(n.length,e),u)}}},{key:"validate",value:function(e,n){return n.isTwoDigitYear||n.year>0}},{key:"set",value:function(e,n,i,u){var s=Ze(e,u);if(i.isTwoDigitYear){var l=Wt(i.year,s);return e.setUTCFullYear(l,0,u.firstWeekContainsDate),e.setUTCHours(0,0,0,0),re(e,u)}var c=!("era"in n)||n.era===1?i.year:1-i.year;return e.setUTCFullYear(c,0,u.firstWeekContainsDate),e.setUTCHours(0,0,0,0),re(e,u)}}]),r}(P),Ea=function(o){M(r,o);var a=O(r);function r(){var t;T(this,r);for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return t=a.call.apply(a,[this].concat(n)),h(p(t),"priority",130),h(p(t),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),t}return D(r,[{key:"parse",value:function(e,n){return xe(n==="R"?4:n.length,e)}},{key:"set",value:function(e,n,i){var u=new Date(0);return u.setUTCFullYear(i,0,4),u.setUTCHours(0,0,0,0),oe(u)}}]),r}(P),Na=function(o){M(r,o);var a=O(r);function r(){var t;T(this,r);for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return t=a.call.apply(a,[this].concat(n)),h(p(t),"priority",130),h(p(t),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),t}return D(r,[{key:"parse",value:function(e,n){return xe(n==="u"?4:n.length,e)}},{key:"set",value:function(e,n,i){return e.setUTCFullYear(i,0,1),e.setUTCHours(0,0,0,0),e}}]),r}(P),Ua=function(o){M(r,o);var a=O(r);function r(){var t;T(this,r);for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return t=a.call.apply(a,[this].concat(n)),h(p(t),"priority",120),h(p(t),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),t}return D(r,[{key:"parse",value:function(e,n,i){switch(n){case"Q":case"QQ":return Y(n.length,e);case"Qo":return i.ordinalNumber(e,{unit:"quarter"});case"QQQ":return i.quarter(e,{width:"abbreviated",context:"formatting"})||i.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return i.quarter(e,{width:"narrow",context:"formatting"});case"QQQQ":default:return i.quarter(e,{width:"wide",context:"formatting"})||i.quarter(e,{width:"abbreviated",context:"formatting"})||i.quarter(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,n){return n>=1&&n<=4}},{key:"set",value:function(e,n,i){return e.setUTCMonth((i-1)*3,1),e.setUTCHours(0,0,0,0),e}}]),r}(P),Sa=function(o){M(r,o);var a=O(r);function r(){var t;T(this,r);for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return t=a.call.apply(a,[this].concat(n)),h(p(t),"priority",120),h(p(t),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),t}return D(r,[{key:"parse",value:function(e,n,i){switch(n){case"q":case"qq":return Y(n.length,e);case"qo":return i.ordinalNumber(e,{unit:"quarter"});case"qqq":return i.quarter(e,{width:"abbreviated",context:"standalone"})||i.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return i.quarter(e,{width:"narrow",context:"standalone"});case"qqqq":default:return i.quarter(e,{width:"wide",context:"standalone"})||i.quarter(e,{width:"abbreviated",context:"standalone"})||i.quarter(e,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(e,n){return n>=1&&n<=4}},{key:"set",value:function(e,n,i){return e.setUTCMonth((i-1)*3,1),e.setUTCHours(0,0,0,0),e}}]),r}(P),Ha=function(o){M(r,o);var a=O(r);function r(){var t;T(this,r);for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return t=a.call.apply(a,[this].concat(n)),h(p(t),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),h(p(t),"priority",110),t}return D(r,[{key:"parse",value:function(e,n,i){var u=function(l){return l-1};switch(n){case"M":return U(k(N.month,e),u);case"MM":return U(Y(2,e),u);case"Mo":return U(i.ordinalNumber(e,{unit:"month"}),u);case"MMM":return i.month(e,{width:"abbreviated",context:"formatting"})||i.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return i.month(e,{width:"narrow",context:"formatting"});case"MMMM":default:return i.month(e,{width:"wide",context:"formatting"})||i.month(e,{width:"abbreviated",context:"formatting"})||i.month(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,n){return n>=0&&n<=11}},{key:"set",value:function(e,n,i){return e.setUTCMonth(i,1),e.setUTCHours(0,0,0,0),e}}]),r}(P),Wa=function(o){M(r,o);var a=O(r);function r(){var t;T(this,r);for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return t=a.call.apply(a,[this].concat(n)),h(p(t),"priority",110),h(p(t),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),t}return D(r,[{key:"parse",value:function(e,n,i){var u=function(l){return l-1};switch(n){case"L":return U(k(N.month,e),u);case"LL":return U(Y(2,e),u);case"Lo":return U(i.ordinalNumber(e,{unit:"month"}),u);case"LLL":return i.month(e,{width:"abbreviated",context:"standalone"})||i.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return i.month(e,{width:"narrow",context:"standalone"});case"LLLL":default:return i.month(e,{width:"wide",context:"standalone"})||i.month(e,{width:"abbreviated",context:"standalone"})||i.month(e,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(e,n){return n>=0&&n<=11}},{key:"set",value:function(e,n,i){return e.setUTCMonth(i,1),e.setUTCHours(0,0,0,0),e}}]),r}(P);function Ia(o,a,r){d(2,arguments);var t=f(o),e=C(a),n=_t(t,r)-e;return t.setUTCDate(t.getUTCDate()-n*7),t}var Aa=function(o){M(r,o);var a=O(r);function r(){var t;T(this,r);for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return t=a.call.apply(a,[this].concat(n)),h(p(t),"priority",100),h(p(t),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),t}return D(r,[{key:"parse",value:function(e,n,i){switch(n){case"w":return k(N.week,e);case"wo":return i.ordinalNumber(e,{unit:"week"});default:return Y(n.length,e)}}},{key:"validate",value:function(e,n){return n>=1&&n<=53}},{key:"set",value:function(e,n,i,u){return re(Ia(e,i,u),u)}}]),r}(P);function $a(o,a){d(2,arguments);var r=f(o),t=C(a),e=kt(r)-t;return r.setUTCDate(r.getUTCDate()-e*7),r}var La=function(o){M(r,o);var a=O(r);function r(){var t;T(this,r);for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return t=a.call.apply(a,[this].concat(n)),h(p(t),"priority",100),h(p(t),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),t}return D(r,[{key:"parse",value:function(e,n,i){switch(n){case"I":return k(N.week,e);case"Io":return i.ordinalNumber(e,{unit:"week"});default:return Y(n.length,e)}}},{key:"validate",value:function(e,n){return n>=1&&n<=53}},{key:"set",value:function(e,n,i){return oe($a(e,i))}}]),r}(P),Fa=[31,28,31,30,31,30,31,31,30,31,30,31],Ra=[31,29,31,30,31,30,31,31,30,31,30,31],qa=function(o){M(r,o);var a=O(r);function r(){var t;T(this,r);for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return t=a.call.apply(a,[this].concat(n)),h(p(t),"priority",90),h(p(t),"subPriority",1),h(p(t),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),t}return D(r,[{key:"parse",value:function(e,n,i){switch(n){case"d":return k(N.date,e);case"do":return i.ordinalNumber(e,{unit:"date"});default:return Y(n.length,e)}}},{key:"validate",value:function(e,n){var i=e.getUTCFullYear(),u=It(i),s=e.getUTCMonth();return u?n>=1&&n<=Ra[s]:n>=1&&n<=Fa[s]}},{key:"set",value:function(e,n,i){return e.setUTCDate(i),e.setUTCHours(0,0,0,0),e}}]),r}(P),Qa=function(o){M(r,o);var a=O(r);function r(){var t;T(this,r);for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return t=a.call.apply(a,[this].concat(n)),h(p(t),"priority",90),h(p(t),"subpriority",1),h(p(t),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),t}return D(r,[{key:"parse",value:function(e,n,i){switch(n){case"D":case"DD":return k(N.dayOfYear,e);case"Do":return i.ordinalNumber(e,{unit:"date"});default:return Y(n.length,e)}}},{key:"validate",value:function(e,n){var i=e.getUTCFullYear(),u=It(i);return u?n>=1&&n<=366:n>=1&&n<=365}},{key:"set",value:function(e,n,i){return e.setUTCMonth(0,i),e.setUTCHours(0,0,0,0),e}}]),r}(P);function et(o,a,r){var t,e,n,i,u,s,l,c;d(2,arguments);var v=J(),g=C((t=(e=(n=(i=r==null?void 0:r.weekStartsOn)!==null&&i!==void 0?i:r==null||(u=r.locale)===null||u===void 0||(s=u.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&n!==void 0?n:v.weekStartsOn)!==null&&e!==void 0?e:(l=v.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&t!==void 0?t:0);if(!(g>=0&&g<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var w=f(o),y=C(a),E=w.getUTCDay(),_=y%7,S=(_+7)%7,A=(S<g?7:0)+y-E;return w.setUTCDate(w.getUTCDate()+A),w}var Ba=function(o){M(r,o);var a=O(r);function r(){var t;T(this,r);for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return t=a.call.apply(a,[this].concat(n)),h(p(t),"priority",90),h(p(t),"incompatibleTokens",["D","i","e","c","t","T"]),t}return D(r,[{key:"parse",value:function(e,n,i){switch(n){case"E":case"EE":case"EEE":return i.day(e,{width:"abbreviated",context:"formatting"})||i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return i.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"});case"EEEE":default:return i.day(e,{width:"wide",context:"formatting"})||i.day(e,{width:"abbreviated",context:"formatting"})||i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,n){return n>=0&&n<=6}},{key:"set",value:function(e,n,i,u){return e=et(e,i,u),e.setUTCHours(0,0,0,0),e}}]),r}(P),ja=function(o){M(r,o);var a=O(r);function r(){var t;T(this,r);for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return t=a.call.apply(a,[this].concat(n)),h(p(t),"priority",90),h(p(t),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),t}return D(r,[{key:"parse",value:function(e,n,i,u){var s=function(c){var v=Math.floor((c-1)/7)*7;return(c+u.weekStartsOn+6)%7+v};switch(n){case"e":case"ee":return U(Y(n.length,e),s);case"eo":return U(i.ordinalNumber(e,{unit:"day"}),s);case"eee":return i.day(e,{width:"abbreviated",context:"formatting"})||i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"});case"eeeee":return i.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"});case"eeee":default:return i.day(e,{width:"wide",context:"formatting"})||i.day(e,{width:"abbreviated",context:"formatting"})||i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,n){return n>=0&&n<=6}},{key:"set",value:function(e,n,i,u){return e=et(e,i,u),e.setUTCHours(0,0,0,0),e}}]),r}(P),Ga=function(o){M(r,o);var a=O(r);function r(){var t;T(this,r);for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return t=a.call.apply(a,[this].concat(n)),h(p(t),"priority",90),h(p(t),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),t}return D(r,[{key:"parse",value:function(e,n,i,u){var s=function(c){var v=Math.floor((c-1)/7)*7;return(c+u.weekStartsOn+6)%7+v};switch(n){case"c":case"cc":return U(Y(n.length,e),s);case"co":return U(i.ordinalNumber(e,{unit:"day"}),s);case"ccc":return i.day(e,{width:"abbreviated",context:"standalone"})||i.day(e,{width:"short",context:"standalone"})||i.day(e,{width:"narrow",context:"standalone"});case"ccccc":return i.day(e,{width:"narrow",context:"standalone"});case"cccccc":return i.day(e,{width:"short",context:"standalone"})||i.day(e,{width:"narrow",context:"standalone"});case"cccc":default:return i.day(e,{width:"wide",context:"standalone"})||i.day(e,{width:"abbreviated",context:"standalone"})||i.day(e,{width:"short",context:"standalone"})||i.day(e,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(e,n){return n>=0&&n<=6}},{key:"set",value:function(e,n,i,u){return e=et(e,i,u),e.setUTCHours(0,0,0,0),e}}]),r}(P);function Xa(o,a){d(2,arguments);var r=C(a);r%7===0&&(r=r-7);var t=1,e=f(o),n=e.getUTCDay(),i=r%7,u=(i+7)%7,s=(u<t?7:0)+r-n;return e.setUTCDate(e.getUTCDate()+s),e}var za=function(o){M(r,o);var a=O(r);function r(){var t;T(this,r);for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return t=a.call.apply(a,[this].concat(n)),h(p(t),"priority",90),h(p(t),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),t}return D(r,[{key:"parse",value:function(e,n,i){var u=function(l){return l===0?7:l};switch(n){case"i":case"ii":return Y(n.length,e);case"io":return i.ordinalNumber(e,{unit:"day"});case"iii":return U(i.day(e,{width:"abbreviated",context:"formatting"})||i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"}),u);case"iiiii":return U(i.day(e,{width:"narrow",context:"formatting"}),u);case"iiiiii":return U(i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"}),u);case"iiii":default:return U(i.day(e,{width:"wide",context:"formatting"})||i.day(e,{width:"abbreviated",context:"formatting"})||i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"}),u)}}},{key:"validate",value:function(e,n){return n>=1&&n<=7}},{key:"set",value:function(e,n,i){return e=Xa(e,i),e.setUTCHours(0,0,0,0),e}}]),r}(P),Va=function(o){M(r,o);var a=O(r);function r(){var t;T(this,r);for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return t=a.call.apply(a,[this].concat(n)),h(p(t),"priority",80),h(p(t),"incompatibleTokens",["b","B","H","k","t","T"]),t}return D(r,[{key:"parse",value:function(e,n,i){switch(n){case"a":case"aa":case"aaa":return i.dayPeriod(e,{width:"abbreviated",context:"formatting"})||i.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return i.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaa":default:return i.dayPeriod(e,{width:"wide",context:"formatting"})||i.dayPeriod(e,{width:"abbreviated",context:"formatting"})||i.dayPeriod(e,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(e,n,i){return e.setUTCHours(Ke(i),0,0,0),e}}]),r}(P),Za=function(o){M(r,o);var a=O(r);function r(){var t;T(this,r);for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return t=a.call.apply(a,[this].concat(n)),h(p(t),"priority",80),h(p(t),"incompatibleTokens",["a","B","H","k","t","T"]),t}return D(r,[{key:"parse",value:function(e,n,i){switch(n){case"b":case"bb":case"bbb":return i.dayPeriod(e,{width:"abbreviated",context:"formatting"})||i.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return i.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbb":default:return i.dayPeriod(e,{width:"wide",context:"formatting"})||i.dayPeriod(e,{width:"abbreviated",context:"formatting"})||i.dayPeriod(e,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(e,n,i){return e.setUTCHours(Ke(i),0,0,0),e}}]),r}(P),Ja=function(o){M(r,o);var a=O(r);function r(){var t;T(this,r);for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return t=a.call.apply(a,[this].concat(n)),h(p(t),"priority",80),h(p(t),"incompatibleTokens",["a","b","t","T"]),t}return D(r,[{key:"parse",value:function(e,n,i){switch(n){case"B":case"BB":case"BBB":return i.dayPeriod(e,{width:"abbreviated",context:"formatting"})||i.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return i.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBB":default:return i.dayPeriod(e,{width:"wide",context:"formatting"})||i.dayPeriod(e,{width:"abbreviated",context:"formatting"})||i.dayPeriod(e,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(e,n,i){return e.setUTCHours(Ke(i),0,0,0),e}}]),r}(P),Ka=function(o){M(r,o);var a=O(r);function r(){var t;T(this,r);for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return t=a.call.apply(a,[this].concat(n)),h(p(t),"priority",70),h(p(t),"incompatibleTokens",["H","K","k","t","T"]),t}return D(r,[{key:"parse",value:function(e,n,i){switch(n){case"h":return k(N.hour12h,e);case"ho":return i.ordinalNumber(e,{unit:"hour"});default:return Y(n.length,e)}}},{key:"validate",value:function(e,n){return n>=1&&n<=12}},{key:"set",value:function(e,n,i){var u=e.getUTCHours()>=12;return u&&i<12?e.setUTCHours(i+12,0,0,0):!u&&i===12?e.setUTCHours(0,0,0,0):e.setUTCHours(i,0,0,0),e}}]),r}(P),en=function(o){M(r,o);var a=O(r);function r(){var t;T(this,r);for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return t=a.call.apply(a,[this].concat(n)),h(p(t),"priority",70),h(p(t),"incompatibleTokens",["a","b","h","K","k","t","T"]),t}return D(r,[{key:"parse",value:function(e,n,i){switch(n){case"H":return k(N.hour23h,e);case"Ho":return i.ordinalNumber(e,{unit:"hour"});default:return Y(n.length,e)}}},{key:"validate",value:function(e,n){return n>=0&&n<=23}},{key:"set",value:function(e,n,i){return e.setUTCHours(i,0,0,0),e}}]),r}(P),tn=function(o){M(r,o);var a=O(r);function r(){var t;T(this,r);for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return t=a.call.apply(a,[this].concat(n)),h(p(t),"priority",70),h(p(t),"incompatibleTokens",["h","H","k","t","T"]),t}return D(r,[{key:"parse",value:function(e,n,i){switch(n){case"K":return k(N.hour11h,e);case"Ko":return i.ordinalNumber(e,{unit:"hour"});default:return Y(n.length,e)}}},{key:"validate",value:function(e,n){return n>=0&&n<=11}},{key:"set",value:function(e,n,i){var u=e.getUTCHours()>=12;return u&&i<12?e.setUTCHours(i+12,0,0,0):e.setUTCHours(i,0,0,0),e}}]),r}(P),rn=function(o){M(r,o);var a=O(r);function r(){var t;T(this,r);for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return t=a.call.apply(a,[this].concat(n)),h(p(t),"priority",70),h(p(t),"incompatibleTokens",["a","b","h","H","K","t","T"]),t}return D(r,[{key:"parse",value:function(e,n,i){switch(n){case"k":return k(N.hour24h,e);case"ko":return i.ordinalNumber(e,{unit:"hour"});default:return Y(n.length,e)}}},{key:"validate",value:function(e,n){return n>=1&&n<=24}},{key:"set",value:function(e,n,i){var u=i<=24?i%24:i;return e.setUTCHours(u,0,0,0),e}}]),r}(P),an=function(o){M(r,o);var a=O(r);function r(){var t;T(this,r);for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return t=a.call.apply(a,[this].concat(n)),h(p(t),"priority",60),h(p(t),"incompatibleTokens",["t","T"]),t}return D(r,[{key:"parse",value:function(e,n,i){switch(n){case"m":return k(N.minute,e);case"mo":return i.ordinalNumber(e,{unit:"minute"});default:return Y(n.length,e)}}},{key:"validate",value:function(e,n){return n>=0&&n<=59}},{key:"set",value:function(e,n,i){return e.setUTCMinutes(i,0,0),e}}]),r}(P),nn=function(o){M(r,o);var a=O(r);function r(){var t;T(this,r);for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return t=a.call.apply(a,[this].concat(n)),h(p(t),"priority",50),h(p(t),"incompatibleTokens",["t","T"]),t}return D(r,[{key:"parse",value:function(e,n,i){switch(n){case"s":return k(N.second,e);case"so":return i.ordinalNumber(e,{unit:"second"});default:return Y(n.length,e)}}},{key:"validate",value:function(e,n){return n>=0&&n<=59}},{key:"set",value:function(e,n,i){return e.setUTCSeconds(i,0),e}}]),r}(P),on=function(o){M(r,o);var a=O(r);function r(){var t;T(this,r);for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return t=a.call.apply(a,[this].concat(n)),h(p(t),"priority",30),h(p(t),"incompatibleTokens",["t","T"]),t}return D(r,[{key:"parse",value:function(e,n){var i=function(s){return Math.floor(s*Math.pow(10,-n.length+3))};return U(Y(n.length,e),i)}},{key:"set",value:function(e,n,i){return e.setUTCMilliseconds(i),e}}]),r}(P),un=function(o){M(r,o);var a=O(r);function r(){var t;T(this,r);for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return t=a.call.apply(a,[this].concat(n)),h(p(t),"priority",10),h(p(t),"incompatibleTokens",["t","T","x"]),t}return D(r,[{key:"parse",value:function(e,n){switch(n){case"X":return G(j.basicOptionalMinutes,e);case"XX":return G(j.basic,e);case"XXXX":return G(j.basicOptionalSeconds,e);case"XXXXX":return G(j.extendedOptionalSeconds,e);case"XXX":default:return G(j.extended,e)}}},{key:"set",value:function(e,n,i){return n.timestampIsSet?e:new Date(e.getTime()-i)}}]),r}(P),sn=function(o){M(r,o);var a=O(r);function r(){var t;T(this,r);for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return t=a.call.apply(a,[this].concat(n)),h(p(t),"priority",10),h(p(t),"incompatibleTokens",["t","T","X"]),t}return D(r,[{key:"parse",value:function(e,n){switch(n){case"x":return G(j.basicOptionalMinutes,e);case"xx":return G(j.basic,e);case"xxxx":return G(j.basicOptionalSeconds,e);case"xxxxx":return G(j.extendedOptionalSeconds,e);case"xxx":default:return G(j.extended,e)}}},{key:"set",value:function(e,n,i){return n.timestampIsSet?e:new Date(e.getTime()-i)}}]),r}(P),ln=function(o){M(r,o);var a=O(r);function r(){var t;T(this,r);for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return t=a.call.apply(a,[this].concat(n)),h(p(t),"priority",40),h(p(t),"incompatibleTokens","*"),t}return D(r,[{key:"parse",value:function(e){return Ht(e)}},{key:"set",value:function(e,n,i){return[new Date(i*1e3),{timestampIsSet:!0}]}}]),r}(P),cn=function(o){M(r,o);var a=O(r);function r(){var t;T(this,r);for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return t=a.call.apply(a,[this].concat(n)),h(p(t),"priority",20),h(p(t),"incompatibleTokens","*"),t}return D(r,[{key:"parse",value:function(e){return Ht(e)}},{key:"set",value:function(e,n,i){return[new Date(i),{timestampIsSet:!0}]}}]),r}(P),dn={G:new ka,y:new _a,Y:new Ya,R:new Ea,u:new Na,Q:new Ua,q:new Sa,M:new Ha,L:new Wa,w:new Aa,I:new La,d:new qa,D:new Qa,E:new Ba,e:new ja,c:new Ga,i:new za,a:new Va,b:new Za,B:new Ja,h:new Ka,H:new en,K:new tn,k:new rn,m:new an,s:new nn,S:new on,X:new un,x:new sn,t:new ln,T:new cn},fn=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,vn=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,hn=/^'([^]*?)'?$/,mn=/''/g,pn=/\S/,gn=/[a-zA-Z]/;function wn(o,a,r,t){var e,n,i,u,s,l,c,v,g,w,y,E,_,S,A,B,L,K;d(3,arguments);var I=String(o),F=String(a),X=J(),z=(e=(n=t==null?void 0:t.locale)!==null&&n!==void 0?n:X.locale)!==null&&e!==void 0?e:Je;if(!z.match)throw new RangeError("locale must contain match property");var V=C((i=(u=(s=(l=t==null?void 0:t.firstWeekContainsDate)!==null&&l!==void 0?l:t==null||(c=t.locale)===null||c===void 0||(v=c.options)===null||v===void 0?void 0:v.firstWeekContainsDate)!==null&&s!==void 0?s:X.firstWeekContainsDate)!==null&&u!==void 0?u:(g=X.locale)===null||g===void 0||(w=g.options)===null||w===void 0?void 0:w.firstWeekContainsDate)!==null&&i!==void 0?i:1);if(!(V>=1&&V<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var ue=C((y=(E=(_=(S=t==null?void 0:t.weekStartsOn)!==null&&S!==void 0?S:t==null||(A=t.locale)===null||A===void 0||(B=A.options)===null||B===void 0?void 0:B.weekStartsOn)!==null&&_!==void 0?_:X.weekStartsOn)!==null&&E!==void 0?E:(L=X.locale)===null||L===void 0||(K=L.options)===null||K===void 0?void 0:K.weekStartsOn)!==null&&y!==void 0?y:0);if(!(ue>=0&&ue<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(F==="")return I===""?f(r):new Date(NaN);var se={firstWeekContainsDate:V,weekStartsOn:ue,locale:z},le=[new xa],Ue=F.match(vn).map(function(H){var x=H[0];if(x in je){var R=je[x];return R(H,z.formatLong)}return H}).join("").match(fn),W=[],$=mt(Ue),ee;try{var Lt=function(){var x=ee.value;!(t!=null&&t.useAdditionalWeekYearTokens)&&Nt(x)&&Ce(x,F,o),!(t!=null&&t.useAdditionalDayOfYearTokens)&&Et(x)&&Ce(x,F,o);var R=x[0],we=dn[R];if(we){var it=we.incompatibleTokens;if(Array.isArray(it)){var ot=W.find(function(ut){return it.includes(ut.token)||ut.token===R});if(ot)throw new RangeError("The format string mustn't contain `".concat(ot.fullToken,"` and `").concat(x,"` at the same time"))}else if(we.incompatibleTokens==="*"&&W.length>0)throw new RangeError("The format string mustn't contain `".concat(x,"` and any other token at the same time"));W.push({token:R,fullToken:x});var He=we.run(I,x,z.match,se);if(!He)return{v:new Date(NaN)};le.push(He.setter),I=He.rest}else{if(R.match(gn))throw new RangeError("Format string contains an unescaped latin alphabet character `"+R+"`");if(x==="''"?x="'":R==="'"&&(x=yn(x)),I.indexOf(x)===0)I=I.slice(x.length);else return{v:new Date(NaN)}}};for($.s();!(ee=$.n()).done;){var tt=Lt();if(Ve(tt)==="object")return tt.v}}catch(H){$.e(H)}finally{$.f()}if(I.length>0&&pn.test(I))return new Date(NaN);var Ft=le.map(function(H){return H.priority}).sort(function(H,x){return x-H}).filter(function(H,x,R){return R.indexOf(H)===x}).map(function(H){return le.filter(function(x){return x.priority===H}).sort(function(x,R){return R.subPriority-x.subPriority})}).map(function(H){return H[0]}),Se=f(r);if(isNaN(Se.getTime()))return new Date(NaN);var ce=Ct(Se,Pe(Se)),rt={},pe=mt(Ft),at;try{for(pe.s();!(at=pe.n()).done;){var nt=at.value;if(!nt.validate(ce,se))return new Date(NaN);var ge=nt.set(ce,rt,se);Array.isArray(ge)?(ce=ge[0],Oa(rt,ge[1])):ce=ge}}catch(H){pe.e(H)}finally{pe.f()}return ce}function yn(o){return o.match(hn)[1].replace(mn,"'")}function bn(o,a){d(2,arguments);var r=f(o),t=C(a);return r.setDate(t),r}function Tn(o,a){d(2,arguments);var r=f(o),t=C(a);return r.setHours(t),r}function Dn(o,a){d(2,arguments);var r=f(o),t=C(a);return r.setMinutes(t),r}function Mn(o,a){d(2,arguments);var r=f(o),t=C(a),e=r.getFullYear(),n=r.getDate(),i=new Date(0);i.setFullYear(e,t,15),i.setHours(0,0,0,0);var u=Ut(i);return r.setMonth(t,Math.min(n,u)),r}function On(o,a){d(2,arguments);var r=f(o),t=C(a);return r.setSeconds(t),r}function Pn(o,a){d(2,arguments);var r=f(o),t=C(a);return isNaN(r.getTime())?new Date(NaN):(r.setFullYear(t),r)}function be(o){d(1,arguments);var a=f(o);return a.setDate(1),a.setHours(0,0,0,0),a}function Le(o,a){var r,t,e,n,i,u,s,l;d(1,arguments);var c=J(),v=C((r=(t=(e=(n=a==null?void 0:a.weekStartsOn)!==null&&n!==void 0?n:a==null||(i=a.locale)===null||i===void 0||(u=i.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&e!==void 0?e:c.weekStartsOn)!==null&&t!==void 0?t:(s=c.locale)===null||s===void 0||(l=s.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&r!==void 0?r:0);if(!(v>=0&&v<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var g=f(o),w=g.getDay(),y=(w<v?7:0)+w-v;return g.setDate(g.getDate()-y),g.setHours(0,0,0,0),g}function Te(o){d(1,arguments);var a=f(o),r=new Date(0);return r.setFullYear(a.getFullYear(),0,1),r.setHours(0,0,0,0),r}function Cn(o,a){var r;d(1,arguments);var t=C((r=void 0)!==null&&r!==void 0?r:2);if(t!==2&&t!==1&&t!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(!(typeof o=="string"||Object.prototype.toString.call(o)==="[object String]"))return new Date(NaN);var e=Yn(o),n;if(e.date){var i=En(e.date,t);n=Nn(i.restDateString,i.year)}if(!n||isNaN(n.getTime()))return new Date(NaN);var u=n.getTime(),s=0,l;if(e.time&&(s=Un(e.time),isNaN(s)))return new Date(NaN);if(e.timezone){if(l=Sn(e.timezone),isNaN(l))return new Date(NaN)}else{var c=new Date(u+s),v=new Date(0);return v.setFullYear(c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()),v.setHours(c.getUTCHours(),c.getUTCMinutes(),c.getUTCSeconds(),c.getUTCMilliseconds()),v}return new Date(u+s+l)}var De={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},xn=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,kn=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,_n=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Yn(o){var a={},r=o.split(De.dateTimeDelimiter),t;if(r.length>2)return a;if(/:/.test(r[0])?t=r[0]:(a.date=r[0],t=r[1],De.timeZoneDelimiter.test(a.date)&&(a.date=o.split(De.timeZoneDelimiter)[0],t=o.substr(a.date.length,o.length))),t){var e=De.timezone.exec(t);e?(a.time=t.replace(e[1],""),a.timezone=e[1]):a.time=t}return a}function En(o,a){var r=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+a)+"})|(\\d{2}|[+-]\\d{"+(2+a)+"})$)"),t=o.match(r);if(!t)return{year:NaN,restDateString:""};var e=t[1]?parseInt(t[1]):null,n=t[2]?parseInt(t[2]):null;return{year:n===null?e:n*100,restDateString:o.slice((t[1]||t[2]).length)}}function Nn(o,a){if(a===null)return new Date(NaN);var r=o.match(xn);if(!r)return new Date(NaN);var t=!!r[4],e=ve(r[1]),n=ve(r[2])-1,i=ve(r[3]),u=ve(r[4]),s=ve(r[5])-1;if(t)return $n(a,u,s)?Hn(a,u,s):new Date(NaN);var l=new Date(0);return!In(a,n,i)||!An(a,e)?new Date(NaN):(l.setUTCFullYear(a,n,Math.max(e,i)),l)}function ve(o){return o?parseInt(o):1}function Un(o){var a=o.match(kn);if(!a)return NaN;var r=Fe(a[1]),t=Fe(a[2]),e=Fe(a[3]);return Ln(r,t,e)?r*Ee+t*Ye+e*1e3:NaN}function Fe(o){return o&&parseFloat(o.replace(",","."))||0}function Sn(o){if(o==="Z")return 0;var a=o.match(_n);if(!a)return 0;var r=a[1]==="+"?-1:1,t=parseInt(a[2]),e=a[3]&&parseInt(a[3])||0;return Fn(t,e)?r*(t*Ee+e*Ye):NaN}function Hn(o,a,r){var t=new Date(0);t.setUTCFullYear(o,0,4);var e=t.getUTCDay()||7,n=(a-1)*7+r+1-e;return t.setUTCDate(t.getUTCDate()+n),t}var Wn=[31,null,31,30,31,30,31,31,30,31,30,31];function At(o){return o%400===0||o%4===0&&o%100!==0}function In(o,a,r){return a>=0&&a<=11&&r>=1&&r<=(Wn[a]||(At(o)?29:28))}function An(o,a){return a>=1&&a<=(At(o)?366:365)}function $n(o,a,r){return a>=1&&a<=53&&r>=0&&r<=6}function Ln(o,a,r){return o===24?a===0&&r===0:r>=0&&r<60&&a>=0&&a<60&&o>=0&&o<25}function Fn(o,a){return a>=0&&a<=59}function Rn(o,a){var r,t;d(1,arguments);var e=f(o);if(isNaN(e.getTime()))throw new RangeError("Invalid time value");var n=String((r=a==null?void 0:a.format)!==null&&r!==void 0?r:"extended"),i=String((t=a==null?void 0:a.representation)!==null&&t!==void 0?t:"complete");if(n!=="extended"&&n!=="basic")throw new RangeError("format must be 'extended' or 'basic'");if(i!=="date"&&i!=="time"&&i!=="complete")throw new RangeError("representation must be 'date', 'time', or 'complete'");var u="",s="",l=n==="extended"?"-":"",c=n==="extended"?":":"";if(i!=="time"){var v=b(e.getDate(),2),g=b(e.getMonth()+1,2),w=b(e.getFullYear(),4);u="".concat(w).concat(l).concat(g).concat(l).concat(v)}if(i!=="date"){var y=e.getTimezoneOffset();if(y!==0){var E=Math.abs(y),_=b(Math.floor(E/60),2),S=b(E%60,2),A=y<0?"+":"-";s="".concat(A).concat(_,":").concat(S)}else s="Z";var B=b(e.getHours(),2),L=b(e.getMinutes(),2),K=b(e.getSeconds(),2),I=u===""?"":"T",F=[B,L,K].join(c);u="".concat(u).concat(I).concat(F).concat(s)}return u}function qn(o,a){d(2,arguments);var r=f(o).getTime(),t=f(a.start).getTime(),e=f(a.end).getTime();if(!(t<=e))throw new RangeError("Invalid interval");return r>=t&&r<=e}var Me={exports:{}},pt;function Qn(){return pt||(pt=1,function(o,a){Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var r=function(s,l){switch(s){case"P":return l.date({width:"short"});case"PP":return l.date({width:"medium"});case"PPP":return l.date({width:"long"});case"PPPP":default:return l.date({width:"full"})}},t=function(s,l){switch(s){case"p":return l.time({width:"short"});case"pp":return l.time({width:"medium"});case"ppp":return l.time({width:"long"});case"pppp":default:return l.time({width:"full"})}},e=function(s,l){var c=s.match(/(P+)(p+)?/)||[],v=c[1],g=c[2];if(!g)return r(s,l);var w;switch(v){case"P":w=l.dateTime({width:"short"});break;case"PP":w=l.dateTime({width:"medium"});break;case"PPP":w=l.dateTime({width:"long"});break;case"PPPP":default:w=l.dateTime({width:"full"});break}return w.replace("{{date}}",r(v,l)).replace("{{time}}",t(g,l))},n={p:t,P:e},i=n;a.default=i,o.exports=a.default}(Me,Me.exports)),Me.exports}var Bn=Qn();const jn=Rt(Bn),Gn={dayOfMonth:"d",fullDate:"PP",fullDateWithWeekday:"PPPP",fullDateTime:"PP p",fullDateTime12h:"PP hh:mm aaa",fullDateTime24h:"PP HH:mm",fullTime:"p",fullTime12h:"hh:mm aaa",fullTime24h:"HH:mm",hours12h:"hh",hours24h:"HH",keyboardDate:"P",keyboardDateTime:"P p",keyboardDateTime12h:"P hh:mm aaa",keyboardDateTime24h:"P HH:mm",minutes:"mm",month:"LLLL",monthAndDate:"MMMM d",monthAndYear:"LLLL yyyy",monthShort:"MMM",weekday:"EEEE",weekdayShort:"EEE",normalDate:"d MMMM",normalDateWithWeekday:"EEE, MMM d",seconds:"ss",shortDate:"MMM d",year:"yyyy"};class Xn{constructor({locale:a,formats:r}={}){this.lib="date-fns",this.is12HourCycleInCurrentLocale=()=>{var t;return this.locale?/a/.test((t=this.locale.formatLong)===null||t===void 0?void 0:t.time()):!0},this.getFormatHelperText=t=>{var e,n;const i=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,u=this.locale||Je;return(n=(e=t.match(i))===null||e===void 0?void 0:e.map(s=>{const l=s[0];if(l==="p"||l==="P"){const c=jn[l];return c(s,u.formatLong,{})}return s}).join("").replace(/(aaa|aa|a)/g,"(a|p)m").toLocaleLowerCase())!==null&&n!==void 0?n:t},this.parseISO=t=>Cn(t),this.toISO=t=>Rn(t,{format:"extended"}),this.getCurrentLocaleCode=()=>{var t;return((t=this.locale)===null||t===void 0?void 0:t.code)||"en-US"},this.addSeconds=(t,e)=>zt(t,e),this.addMinutes=(t,e)=>Zt(t,e),this.addHours=(t,e)=>Kt(t,e),this.addDays=(t,e)=>qe(t,e),this.addWeeks=(t,e)=>er(t,e),this.addMonths=(t,e)=>Oe(t,e),this.addYears=(t,e)=>st(t,e),this.isValid=t=>Pt(this.date(t)),this.getDiff=(t,e,n)=>{var i;const u=(i=this.date(e))!==null&&i!==void 0?i:t;if(!this.isValid(u))return 0;switch(n){case"years":return rr(t,u);case"quarters":return or(t,u);case"months":return Mt(t,u);case"weeks":return lr(t,u);case"days":return Ot(t,u);case"hours":return dr(t,u);case"minutes":return fr(t,u);case"seconds":return vr(t,u);default:return Ne(t,u)}},this.isAfter=(t,e)=>ye(t,e),this.isBefore=(t,e)=>ne(t,e),this.startOfDay=t=>ie(t),this.endOfDay=t=>Qe(t),this.getHours=t=>ha(t),this.setHours=(t,e)=>Tn(t,e),this.setMinutes=(t,e)=>Dn(t,e),this.getSeconds=t=>ga(t),this.setSeconds=(t,e)=>On(t,e),this.isSameDay=(t,e)=>ba(t,e),this.isSameMonth=(t,e)=>Da(t,e),this.isSameYear=(t,e)=>Ta(t,e),this.isSameHour=(t,e)=>Ma(t,e),this.startOfYear=t=>Te(t),this.endOfYear=t=>Ae(t),this.startOfMonth=t=>be(t),this.endOfMonth=t=>Be(t),this.startOfWeek=t=>Le(t,{locale:this.locale}),this.endOfWeek=t=>Ie(t,{locale:this.locale}),this.getYear=t=>wa(t),this.setYear=(t,e)=>Pn(t,e),this.date=t=>typeof t>"u"?new Date:t===null?null:new Date(t),this.toJsDate=t=>t,this.parse=(t,e)=>t===""?null:wn(t,e,new Date,{locale:this.locale}),this.format=(t,e)=>this.formatByString(t,this.formats[e]),this.formatByString=(t,e)=>ca(t,e,{locale:this.locale}),this.isEqual=(t,e)=>t===null&&e===null?!0:ya(t,e),this.isNull=t=>t===null,this.isAfterDay=(t,e)=>ye(t,Qe(e)),this.isBeforeDay=(t,e)=>ne(t,ie(e)),this.isBeforeYear=(t,e)=>ne(t,Te(e)),this.isAfterYear=(t,e)=>ye(t,Ae(e)),this.isWithinRange=(t,[e,n])=>qn(t,{start:e,end:n}),this.formatNumber=t=>t,this.getMinutes=t=>ma(t),this.getDate=t=>fa(t),this.setDate=(t,e)=>bn(t,e),this.getMonth=t=>pa(t),this.getDaysInMonth=t=>Ut(t),this.setMonth=(t,e)=>Mn(t,e),this.getMeridiemText=t=>t==="am"?"AM":"PM",this.getNextMonth=t=>Oe(t,1),this.getPreviousMonth=t=>Oe(t,-1),this.getMonthArray=t=>{const n=[Te(t)];for(;n.length<12;){const i=n[n.length-1];n.push(this.getNextMonth(i))}return n},this.mergeDateAndTime=(t,e)=>this.setSeconds(this.setMinutes(this.setHours(t,this.getHours(e)),this.getMinutes(e)),this.getSeconds(e)),this.getWeekdays=()=>{const t=new Date;return hr({start:Le(t,{locale:this.locale}),end:Ie(t,{locale:this.locale})}).map(e=>this.formatByString(e,"EEEEEE"))},this.getWeekArray=t=>{const e=Le(be(t),{locale:this.locale}),n=Ie(Be(t),{locale:this.locale});let i=0,u=e;const s=[];let l=null;for(;ne(u,n);){const c=Math.floor(i/7);s[c]=s[c]||[];const v=va(u);l!==v&&(l=v,s[c].push(u),i+=1),u=qe(u,1)}return s},this.getYearRange=(t,e)=>{const n=Te(t),i=Ae(e),u=[];let s=n;for(;ne(s,i);)u.push(s),s=st(s,1);return u},this.locale=a,this.formats=Object.assign({},Gn,r)}isBeforeMonth(a,r){return ne(a,be(r))}isAfterMonth(a,r){return ye(a,be(r))}}var zn=new Xn({});function Vn(o,a){return ei(o)||Kn(o,a)||Jn(o,a)||Zn()}function Zn(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3
3
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Jn(o,a){if(o){if(typeof o=="string")return gt(o,a);var r=Object.prototype.toString.call(o).slice(8,-1);if(r==="Object"&&o.constructor&&(r=o.constructor.name),r==="Map"||r==="Set")return Array.from(o);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return gt(o,a)}}function gt(o,a){(a==null||a>o.length)&&(a=o.length);for(var r=0,t=new Array(a);r<a;r++)t[r]=o[r];return t}function Kn(o,a){var r=o==null?null:typeof Symbol<"u"&&o[Symbol.iterator]||o["@@iterator"];if(r!=null){var t=[],e=!0,n=!1,i,u;try{for(r=r.call(o);!(e=(i=r.next()).done)&&(t.push(i.value),!(a&&t.length===a));e=!0);}catch(s){n=!0,u=s}finally{try{!e&&r.return!=null&&r.return()}finally{if(n)throw u}}return t}}function ei(o){if(Array.isArray(o))return o}function wt(o,a){var r=Object.keys(o);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(o);a&&(t=t.filter(function(e){return Object.getOwnPropertyDescriptor(o,e).enumerable})),r.push.apply(r,t)}return r}function yt(o){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?wt(Object(r),!0).forEach(function(t){m(o,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(r)):wt(Object(r)).forEach(function(t){Object.defineProperty(o,t,Object.getOwnPropertyDescriptor(r,t))})}return o}function ti(o,a,r){return Object.defineProperty(o,"prototype",{writable:!1}),o}function ri(o,a){if(!(o instanceof a))throw new TypeError("Cannot call a class as a function")}function m(o,a,r){return a in o?Object.defineProperty(o,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):o[a]=r,o}var $t=60,ai=$t*60,bt=ti(function o(a){var r=this;ri(this,o),m(this,"adapter",void 0),m(this,"cloneAdapter",function(t,e){var n={MomentUtils:{formats:{monthNumber:"M",dayOfMonthNumber:"D",fullOrdinalWeek:"dddd, MMMM Do YYYY",slashDate:"YYYY/MM/DD",weekday:"dddd",weekdaymin:"dd",quarter:"[Q]Q"}},DateFnsUtils:{formats:{monthNumber:"M",dayOfMonthNumber:"d",weekday:"EEEE",weekdaymin:"EEEEEE",slashDate:"yyyy/MM/dd",fullOrdinalWeek:"EEEE, MMMM do yyyy",quarter:"QQQ"}},LuxonUtils:{formats:{monthNumber:"M",dayOfMonthNumber:"d",weekday:"EEEE",weekdaymin:"EEEEE",slashDate:"yyyy/MM/dd",fullOrdinalWeek:"EEEE, MMMM dd yyyy",quarter:"Qq"}}},i=function(_){return{formats:_.formats,locale:_.locale}},u=e||i,s=t.constructor,l=t.constructor.name,c=n[l]||n.DateFnsUtils,v=c.getOptions,g=v===void 0?i:v,w=c.formats,y=g(t);return new s(Object.assign({},u(Object.assign({},y,{formats:Object.assign({},y.formats,w)}))))}),m(this,"format",function(t,e,n){var i=n?r.getAdapterWithNewLocale(n):r.adapter;return i.format(t,e)}),m(this,"getAdapterWithNewLocale",function(t){return r.cloneAdapter(r.adapter,function(e){return yt(yt({},e),{},{locale:t})})}),m(this,"date",function(t){return r.adapter.date(t)}),m(this,"dateToSeconds",function(t){var e=r.adapter.getSeconds(t),n=r.adapter.getMinutes(t)*$t,i=r.adapter.getHours(t)*ai;return e+n+i}),m(this,"secondsToHourMinute",function(t){var e=r.adapter.toJsDate(r.adapter.date(t*1e3));return[e.getUTCHours(),e.getUTCMinutes()]}),m(this,"differenceInCalendarMonths",function(t,e){var n=r.adapter.getYear(t)-r.adapter.getYear(e),i=r.adapter.getMonth(t)-r.adapter.getMonth(e);return n*12+i}),m(this,"getStartOfWeek",function(t,e){var n=e?r.getAdapterWithNewLocale(e):r.adapter;return n.startOfWeek(n.date(t))}),m(this,"formatDate",function(t,e,n){var i=n?r.getAdapterWithNewLocale(n):r.adapter;return i.formatByString(t,e)}),m(this,"getWeekdayMinInLocale",function(t,e){return r.getAdapterWithNewLocale(e).format(t,"weekdaymin")}),m(this,"getMonthInLocale",function(t,e){var n=r.getAdapterWithNewLocale(e);return n.format(n.setMonth(n.date(),t),"month")}),m(this,"getWeekdayInLocale",function(t,e){return r.getAdapterWithNewLocale(e).format(t,"weekday")}),m(this,"getQuarterInLocale",function(t,e){var n=r.getAdapterWithNewLocale(e);return n.format(n.setMonth(n.date(),t*3),"quarter")}),m(this,"getEndOfWeek",function(t){return r.adapter.endOfWeek(t)}),m(this,"getDay",function(t){return Number(r.adapter.formatByString(t,"e"))-1}),m(this,"addWeeks",function(t,e){return r.adapter.addDays(t,e*7)}),m(this,"subWeeks",function(t,e){return r.addWeeks(t,e*-1)}),m(this,"addYears",function(t,e){return r.adapter.addMonths(t,e*12)}),m(this,"subYears",function(t,e){return r.addYears(t,e*-1)}),m(this,"isSameYear",function(t,e){return t&&e?r.adapter.isSameYear(t,e):!1}),m(this,"isStartOfMonth",function(t){return r.adapter.isSameDay(t,r.adapter.startOfMonth(t))}),m(this,"isEndOfMonth",function(t){return r.adapter.isSameDay(t,r.adapter.endOfMonth(t))}),m(this,"isDayInRange",function(t,e,n){return r.adapter.isWithinRange(t,[e,n])}),m(this,"isSameDay",function(t,e){return t&&e?r.adapter.isSameDay(t,e):!1}),m(this,"isSameMonth",function(t,e){return t&&e?r.adapter.isSameMonth(t,e):!1}),m(this,"dateRangeIncludesDates",function(t,e){var n=Vn(t,2),i=n[0],u=n[1];if(i&&u&&Array.isArray(e)&&e.length)for(var s=0;s<e.length;s++){var l=e[s];if(r.isDayInRange(l,i,u))return!0}return!1}),m(this,"subDays",function(t,e){return r.adapter.addDays(t,e*-1)}),m(this,"subMonths",function(t,e){return r.adapter.addMonths(t,e*-1)}),m(this,"min",function(t){return t.reduce(function(e,n){return r.adapter.isBefore(n,e)?n:e})}),m(this,"max",function(t){return t.reduce(function(e,n){return r.adapter.isAfter(n,e)?n:e})}),m(this,"getEffectiveMinDate",function(t){var e=t.minDate,n=t.includeDates;if(n&&e){var i=n.filter(function(u){return r.isOnOrAfterDay(u,e)});return r.min(i)}else{if(n&&n.length)return r.min(n);if(!(n&&n.length)&&e)return e}return r.adapter.date()}),m(this,"getEffectiveMaxDate",function(t){var e=t.maxDate,n=t.includeDates;if(n&&e){var i=n.filter(function(u){return r.isOnOrBeforeDay(u,e)});return r.max(i)}else{if(n)return r.max(n);if(!n&&e)return e}return r.adapter.date()}),m(this,"monthDisabledBefore",function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.minDate,i=e.includeDates,u=r.subMonths(t,1);return!!n&&r.differenceInCalendarMonths(n,u)>0||!!i&&i.every(function(s){return r.differenceInCalendarMonths(s,u)>0})||!1}),m(this,"monthDisabledAfter",function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.maxDate,i=e.includeDates,u=r.adapter.addMonths(t,1);return!!n&&r.differenceInCalendarMonths(u,n)>0||!!i&&i.every(function(s){return r.differenceInCalendarMonths(u,s)>0})||!1}),m(this,"setDate",function(t,e){var n=r.adapter.startOfMonth(t),i=r.adapter.mergeDateAndTime(n,t),u=r.adapter.setSeconds(i,r.adapter.getSeconds(t));return r.adapter.addDays(u,e-1)}),m(this,"getDate",function(t){return Number(r.adapter.format(t,"dayOfMonthNumber"))}),m(this,"applyDateToTime",function(t,e){if(!t)return e;var n=r.adapter.getYear(e),i=r.adapter.getMonth(e),u=r.getDate(e),s=r.adapter.setYear(t,n),l=r.adapter.setMonth(s,i);return r.setDate(l,u)}),m(this,"applyTimeToDate",function(t,e){return t?r.adapter.setSeconds(r.adapter.mergeDateAndTime(t,e),0):e}),m(this,"isDayDisabled",function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.minDate,i=e.maxDate,u=e.excludeDates,s=e.includeDates,l=e.filterDate;return r.isOutOfBounds(t,{minDate:n,maxDate:i})||u&&u.some(function(c){return r.adapter.isSameDay(t,c)})||s&&!s.some(function(c){return r.adapter.isSameDay(t,c)})||l&&!l(t)||!1}),m(this,"isOnOrAfterDay",function(t,e){return r.adapter.isSameDay(t,e)?!0:r.adapter.isAfter(t,e)}),m(this,"isOnOrBeforeDay",function(t,e){return r.adapter.isSameDay(t,e)?!0:r.adapter.isBefore(t,e)}),m(this,"isOutOfBounds",function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.minDate,i=e.maxDate;return!!n&&!r.isOnOrAfterDay(t,n)||!!i&&!r.isOnOrBeforeDay(t,i)}),m(this,"parseString",function(t,e,n){var i=n?r.getAdapterWithNewLocale(n):r.adapter;return i.parse(t,e)}),m(this,"parse",function(t,e,n){var i=n?r.getAdapterWithNewLocale(n):r.adapter;return i.parse(t,i.formats[e])}),m(this,"setMilliseconds",function(t,e){return r.adapter.date(r.adapter.getSeconds(r.adapter.startOfDay(t))*1e3+e)}),m(this,"set",function(t,e){var n=t;return e.year!=null&&(n=r.setYear(n,e.year)),e.month!=null&&(n=r.setMonth(n,e.month)),e.date!=null&&(n=r.setDate(n,Number(e.date))),e.hours!=null&&(n=r.setHours(n,Number(e.hours))),e.minutes!=null&&(n=r.setMinutes(n,Number(e.minutes))),e.seconds!=null&&(n=r.setSeconds(n,Number(e.seconds))),n}),m(this,"getQuarter",function(t){return Math.floor(r.getMonth(t)/3)+1}),m(this,"setSeconds",function(t,e){return r.adapter.setSeconds(t,e)}),m(this,"setMinutes",function(t,e){return r.adapter.setMinutes(t,e)}),m(this,"setHours",function(t,e){return r.adapter.setHours(t,e)}),m(this,"setMonth",function(t,e){return r.adapter.setMonth(t,e)}),m(this,"setYear",function(t,e){return r.adapter.setYear(t,e)}),m(this,"getMinutes",function(t){return r.adapter.getMinutes(t)}),m(this,"getHours",function(t){return r.adapter.getHours(t)}),m(this,"getMonth",function(t){return r.adapter.getMonth(t)}),m(this,"getYear",function(t){return r.adapter.getYear(t)}),m(this,"getStartOfMonth",function(t){return r.adapter.startOfMonth(t)}),m(this,"getEndOfMonth",function(t){return r.adapter.endOfMonth(t)}),m(this,"addDays",function(t,e){return r.adapter.addDays(t,e)}),m(this,"addMonths",function(t,e){return r.adapter.addMonths(t,e)}),m(this,"isBefore",function(t,e){return r.adapter.isBefore(t,e)}),m(this,"isAfter",function(t,e){return r.adapter.isAfter(t,e)}),m(this,"isEqual",function(t,e){return r.adapter.isEqual(t,e)}),m(this,"isValid",function(t){return r.adapter.isValid(t)}),this.adapter=this.cloneAdapter(a)});function Ge(o){"@babel/helpers - typeof";return Ge=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},Ge(o)}function Xe(){return Xe=Object.assign?Object.assign.bind():function(o){for(var a=1;a<arguments.length;a++){var r=arguments[a];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(o[t]=r[t])}return o},Xe.apply(this,arguments)}function Re(o,a){return ui(o)||oi(o,a)||ii(o,a)||ni()}function ni(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
4
4
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ii(o,a){if(o){if(typeof o=="string")return Tt(o,a);var r=Object.prototype.toString.call(o).slice(8,-1);if(r==="Object"&&o.constructor&&(r=o.constructor.name),r==="Map"||r==="Set")return Array.from(o);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Tt(o,a)}}function Tt(o,a){(a==null||a>o.length)&&(a=o.length);for(var r=0,t=new Array(a);r<a;r++)t[r]=o[r];return t}function oi(o,a){var r=o==null?null:typeof Symbol<"u"&&o[Symbol.iterator]||o["@@iterator"];if(r!=null){var t=[],e=!0,n=!1,i,u;try{for(r=r.call(o);!(e=(i=r.next()).done)&&(t.push(i.value),!(a&&t.length===a));e=!0);}catch(s){n=!0,u=s}finally{try{!e&&r.return!=null&&r.return()}finally{if(n)throw u}}return t}}function ui(o){if(Array.isArray(o))return o}function si(o,a){if(!(o instanceof a))throw new TypeError("Cannot call a class as a function")}function li(o,a){for(var r=0;r<a.length;r++){var t=a[r];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(o,t.key,t)}}function ci(o,a,r){return a&&li(o.prototype,a),Object.defineProperty(o,"prototype",{writable:!1}),o}function di(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),Object.defineProperty(o,"prototype",{writable:!1}),a&&ze(o,a)}function ze(o,a){return ze=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ze(o,a)}function fi(o){var a=hi();return function(){var t=ke(o),e;if(a){var n=ke(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return vi(this,e)}}function vi(o,a){if(a&&(Ge(a)==="object"||typeof a=="function"))return a;if(a!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return q(o)}function q(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}function hi(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ke(o){return ke=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ke(o)}function Q(o,a,r){return a in o?Object.defineProperty(o,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):o[a]=r,o}var mi=60,pi=mi*60,gi=pi*24,Dt=gi/2,wi=function(o){di(r,o);var a=fi(r);function r(t){var e;return si(this,r),e=a.call(this,t),Q(q(e),"dateHelpers",void 0),Q(q(e),"state",{steps:[],value:null}),Q(q(e),"onChange",function(n){if(e.setState({value:n.value[0]}),n.value.length===0){e.props.nullable&&e.props.onChange&&e.props.onChange(null);return}var i=typeof n.value[0].id=="string"?parseInt(n.value[0].id,10):n.value[0].id||0;e.handleChange(i)}),Q(q(e),"secondsToLabel",function(n,i){var u=e.dateHelpers.secondsToHourMinute(n),s=Re(u,2),l=s[0],c=s[1],v=function(y){return y<10?"0".concat(y):y};if(i==="12"){var g=n>=Dt;return g&&(l-=12),l===0&&(l=12),"".concat(l,":").concat(v(c)," ").concat(g?"PM":"AM")}return"".concat(v(l),":").concat(v(c))}),Q(q(e),"stringToOptions",function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"12",u=/^(1[0-2]|0?[1-9]):([0-5][0-9]) ?([AaPp][Mm]?)?$/,s=/^([0-9]|0[0-9]|1[0-9]|2[0-3]):([0-5][0-9])$/,l=i==="12"?u:s,c=n.match(l);if(!c)return[];var v=Number(c[1]),g=Number(c[2]),w=[];switch(i){case"24":{w=[{hours:v,minutes:g}];break}case"12":default:{var y=v%12,E=c[3];if(!E)w=[{hours:y,minutes:g},{hours:y+12,minutes:g}];else{var _=E.toLowerCase()[0]==="a"?y:y+12;w=[{hours:_,minutes:g}]}break}}return w.map(function(S){var A=S.hours,B=S.minutes,L=A*3600+B*60;return{id:L,label:e.secondsToLabel(L,i)}})}),Q(q(e),"handleChange",function(n){var i=e.dateHelpers.secondsToHourMinute(n),u=Re(i,2),s=u[0],l=u[1],c=e.setTime(e.props.value,s,l,0);e.props.onChange&&e.props.onChange(c)}),Q(q(e),"setTime",function(n,i,u,s){var l=e.dateHelpers,c=l.setSeconds,v=l.setMinutes,g=l.setHours,w=e.props.adapter.startOfDay(e.props.adapter.date(n||void 0));return c(v(g(w,i),u),s)}),Q(q(e),"getTimeWindowInSeconds",function(n){var i=e.props,u=i.minTime,s=i.maxTime,l=i.ignoreMinMaxDateComponent,c=e.setTime(e.props.value,0,0,0),v=e.setTime(e.props.value,24,0,0);!u||e.props.adapter.isBefore(u,c)&&!l?u=c:u=e.setTime(e.props.value,e.props.adapter.getHours(u),e.props.adapter.getMinutes(u),e.props.adapter.getSeconds(u)),!s||e.props.adapter.isAfter(s,v)&&!l?s=v:s=e.setTime(e.props.value,e.props.adapter.getHours(s),e.props.adapter.getMinutes(s),e.props.adapter.getSeconds(s)+1);var g=e.props.adapter.toJsDate(u),w=e.props.adapter.toJsDate(s),y=e.props.adapter.toJsDate(c);return{start:(g-y)/1e3,end:(w-y)/1e3}}),Q(q(e),"buildSteps",function(){var n=e.props.step,i=n===void 0?900:n,u=e.getTimeWindowInSeconds(i);(u.end-u.start)/i;for(var s=[],l=u.start;l<u.end;l+=i)s.push(l);return s}),Q(q(e),"creatableFilterOptions",function(n,i,u,s){var l=e.stringToOptions(i,e.props.format);return l.length?l:qt(n,i,u,s)}),Q(q(e),"buildSelectedOption",function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"12",u=e.dateHelpers.dateToSeconds(n);return{id:u,label:e.secondsToLabel(u,i||"12")}}),e.dateHelpers=new bt(t.adapter),e}return ci(r,[{key:"componentDidMount",value:function(){var e=this.buildSteps();if(this.props.value&&this.props.adapter.isValid(this.props.value))this.setState({steps:e,value:this.buildSelectedOption(this.props.value,this.props.format)});else{var n=this.dateHelpers.dateToSeconds(this.props.adapter.date()),i=Dt;e.forEach(function(u){Math.abs(u-n)<Math.abs(i-n)&&(i=u)}),this.setState({steps:e,value:this.props.nullable?void 0:{id:i,label:this.secondsToLabel(i,this.props.format)}}),(this.props.value||!this.props.nullable&&!this.props.value)&&this.handleChange(i)}}},{key:"componentDidUpdate",value:function(e){var n=e.format!==this.props.format,i=e.step!==this.props.step,u=e.adapter!==this.props.adapter,s=e.minTime!==this.props.minTime,l=e.maxTime!==this.props.maxTime;if(u&&(this.dateHelpers=new bt(this.props.adapter)),n||i||s||l){var c=this.buildSteps();this.setState({steps:c})}e.value&&!this.props.value&&this.setState({value:null})}},{key:"render",value:function(){var e=this,n=this.props,i=n.format,u=n.overrides,s=u===void 0?{}:u,l=n.adapter,c=Qt(s.Select,Bt),v=Re(c,2),g=v[0],w=v[1];w.overrides=jt({Dropdown:{style:{maxHeight:"126px"}}},w.overrides);var y=this.props.value&&l.isValid(this.props.value)?this.buildSelectedOption(this.props.value,this.props.format):this.state.value;return We.createElement(Gt.Consumer,null,function(E){var _=i==="12"?E.datepicker.timePickerAriaLabel12Hour:E.datepicker.timePickerAriaLabel24Hour;return We.createElement(g,Xe({"aria-label":_,disabled:e.props.disabled,error:e.props.error,positive:e.props.positive,size:e.props.size,placeholder:e.props.placeholder||"HH:mm",options:e.state.steps.map(function(S){return{id:S,label:e.secondsToLabel(S,e.props.format)}}),filterOptions:e.props.creatable?e.creatableFilterOptions:void 0,onChange:e.onChange,value:y&&[y],clearable:!1,backspaceRemoves:!1,valueKey:"label"},w))})}}]),r}(We.Component);Q(wi,"defaultProps",{format:"12",step:900,creatable:!1,adapter:zn,ignoreMinMaxDateComponent:!1});export{bt as D,wi as T,zn as a};
@@ -1,3 +1,3 @@
1
- import{r as a,E as m,_ as d}from"./index.DR2lTx8N.js";import{e as f,f as b}from"./possibleConstructorReturn.Cyeph4pU.js";var p=a.forwardRef(function(r,t){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return a.createElement(m,d({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},r,{ref:t}),a.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),a.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"}))});p.displayName="Close";function h(r){if(Array.isArray(r))return r}function A(r,t){var e=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(e!=null){var i,u,s,o,l=[],n=!0,c=!1;try{if(s=(e=e.call(r)).next,t===0){if(Object(e)!==e)return;n=!1}else for(;!(n=(i=s.call(e)).done)&&(l.push(i.value),l.length!==t);n=!0);}catch(y){c=!0,u=y}finally{try{if(!n&&e.return!=null&&(o=e.return(),Object(o)!==o))return}finally{if(c)throw u}}return l}}function _(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{r as a,E as m,_ as d}from"./index.DZ6oX-v9.js";import{e as f,f as b}from"./possibleConstructorReturn.BgDi5nUm.js";var p=a.forwardRef(function(r,t){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return a.createElement(m,d({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},r,{ref:t}),a.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),a.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"}))});p.displayName="Close";function h(r){if(Array.isArray(r))return r}function A(r,t){var e=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(e!=null){var i,u,s,o,l=[],n=!0,c=!1;try{if(s=(e=e.call(r)).next,t===0){if(Object(e)!==e)return;n=!1}else for(;!(n=(i=s.call(e)).done)&&(l.push(i.value),l.length!==t);n=!0);}catch(y){c=!0,u=y}finally{try{if(!n&&e.return!=null&&(o=e.return(),Object(o)!==o))return}finally{if(c)throw u}}return l}}function _(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function T(r,t){return h(r)||A(r,t)||f(r,t)||_()}function v(r){if(Array.isArray(r))return b(r)}function w(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function E(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
3
3
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function x(r){return v(r)||w(r)||f(r)||E()}export{p as C,T as _,x as a};
@@ -1 +1 @@
1
- import{K as a,g as d}from"./index.DR2lTx8N.js";var r,u;function q(){if(u)return r;u=1;var e=a(),i=0;function n(t){var o=++i;return e(t)+o}return r=n,r}var s=q();const I=d(s);export{I as u};
1
+ import{K as a,g as d}from"./index.DZ6oX-v9.js";var r,u;function q(){if(u)return r;u=1;var e=a(),i=0;function n(t){var o=++i;return e(t)+o}return r=n,r}var s=q();const I=d(s);export{I as u};
@@ -1 +1 @@
1
- import{r as t,M as h}from"./index.DR2lTx8N.js";import{u as p}from"./FormClearHelper.a0IiSXcn.js";function v({getStateFromWidgetMgr:n,getDefaultState:c,updateWidgetMgrState:i,element:s,widgetMgr:u,fragmentId:l,onFormCleared:r}){const[V,o]=t.useState(()=>n(u,s)??c(u,s)),[f,a]=t.useState({value:V,fromUi:!1});t.useEffect(()=>{h(f)||(a(null),o(f.value),i(s,u,f,l))},[f,i,s,u,l]);const e=t.useCallback(()=>{a({value:c(u,s),fromUi:!0}),r==null||r()},[a,s,c,u,r]);return p({widgetMgr:u,element:s,onFormCleared:e}),[V,a]}function S({getStateFromWidgetMgr:n,getDefaultStateFromProto:c,getCurrStateFromProto:i,updateWidgetMgrState:s,element:u,widgetMgr:l,fragmentId:r,onFormCleared:V}){const o=t.useCallback((e,x)=>c(x),[c]),[f,a]=v({getStateFromWidgetMgr:n,getDefaultState:o,updateWidgetMgrState:s,element:u,widgetMgr:l,fragmentId:r,onFormCleared:V});return t.useEffect(()=>{u.setValue&&(u.setValue=!1,a({value:i(u),fromUi:!1}))},[u,i,a]),[f,a]}export{S as a,v as u};
1
+ import{r as t,M as h}from"./index.DZ6oX-v9.js";import{u as p}from"./FormClearHelper.DiwQ0EtT.js";function v({getStateFromWidgetMgr:n,getDefaultState:c,updateWidgetMgrState:i,element:s,widgetMgr:u,fragmentId:l,onFormCleared:r}){const[V,o]=t.useState(()=>n(u,s)??c(u,s)),[f,a]=t.useState({value:V,fromUi:!1});t.useEffect(()=>{h(f)||(a(null),o(f.value),i(s,u,f,l))},[f,i,s,u,l]);const e=t.useCallback(()=>{a({value:c(u,s),fromUi:!0}),r==null||r()},[a,s,c,u,r]);return p({widgetMgr:u,element:s,onFormCleared:e}),[V,a]}function S({getStateFromWidgetMgr:n,getDefaultStateFromProto:c,getCurrStateFromProto:i,updateWidgetMgrState:s,element:u,widgetMgr:l,fragmentId:r,onFormCleared:V}){const o=t.useCallback((e,x)=>c(x),[c]),[f,a]=v({getStateFromWidgetMgr:n,getDefaultState:o,updateWidgetMgrState:s,element:u,widgetMgr:l,fragmentId:r,onFormCleared:V});return t.useEffect(()=>{u.setValue&&(u.setValue=!1,a({value:i(u),fromUi:!1}))},[u,i,a]),[f,a]}export{S as a,v as u};
@@ -1 +1 @@
1
- import{r as o,ct as i}from"./index.DR2lTx8N.js";import{i as c}from"./inputUtils.CQWz5UKz.js";function E(r,t,s,n){o.useEffect(()=>{n||r!==t&&s(r)},[r,t,n,s])}function l(r,t,s,n,u,f=!1){return o.useCallback(e=>{const a=f?e.metaKey||e.ctrlKey:!0;!c(e)||!a||(e.preventDefault(),s&&t(),n.allowFormEnterToSubmit(r)&&n.submitForm(r,u))},[r,u,s,t,n,f])}function F({formId:r,maxChars:t,setDirty:s,setUiValue:n,setValueWithSource:u}){return o.useCallback(f=>{const{value:e}=f.target;t!==0&&e.length>t||(s(!0),n(e),i({formId:r})&&u({value:e,fromUi:!0}))},[r,t,s,n,u])}export{F as a,l as b,E as u};
1
+ import{r as o,ct as i}from"./index.DZ6oX-v9.js";import{i as c}from"./inputUtils.CQWz5UKz.js";function E(r,t,s,n){o.useEffect(()=>{n||r!==t&&s(r)},[r,t,n,s])}function l(r,t,s,n,u,f=!1){return o.useCallback(e=>{const a=f?e.metaKey||e.ctrlKey:!0;!c(e)||!a||(e.preventDefault(),s&&t(),n.allowFormEnterToSubmit(r)&&n.submitForm(r,u))},[r,u,s,t,n,f])}function F({formId:r,maxChars:t,setDirty:s,setUiValue:n,setValueWithSource:u}){return o.useCallback(f=>{const{value:e}=f.target;t!==0&&e.length>t||(s(!0),n(e),i({formId:r})&&u({value:e,fromUi:!0}))},[r,t,s,n,u])}export{F as a,l as b,E as u};
@@ -1 +1 @@
1
- import{n as p,r as n,aE as x,aD as h,bh as y,z as C,bi as w,j as i,a_ as b}from"./index.DR2lTx8N.js";const F=p("div",{target:"e1q5ojhd0"})(({theme:e,isExpanded:t})=>({width:"100%",...t?{position:"fixed",top:0,left:0,bottom:0,right:0,background:e.colors.bgColor,zIndex:e.zIndices.fullscreenWrapper,padding:e.spacing.md,paddingTop:e.sizes.fullScreenHeaderHeight,overflow:"auto",display:"flex",alignItems:"center",justifyContent:"center"}:{}})),f=n.createContext(null);f.displayName="ElementFullscreenContext";const S=()=>{const{setFullScreen:e}=n.useContext(x),[t,c]=n.useState(!1),{fullHeight:s,fullWidth:u}=h(y),l=n.useCallback(r=>{c(r),e(r)},[e]),d=n.useCallback(()=>{document.body.style.overflow="hidden",l(!0)},[l]),o=n.useCallback(()=>{document.body.style.overflow="unset",l(!1)},[l]),a=n.useCallback(r=>{r.keyCode===27&&t&&o()},[o,t]);return n.useEffect(()=>(document.addEventListener("keydown",a,!1),()=>{document.removeEventListener("keydown",a,!1)}),[a]),n.useMemo(()=>({expanded:t,zoomIn:d,zoomOut:o,fullHeight:s,fullWidth:u}),[t,d,o,s,u])},g=({children:e,height:t})=>{const c=C(),{expanded:s,fullHeight:u,fullWidth:l,zoomIn:d,zoomOut:o}=S(),[a,r]=w(),m=n.useMemo(()=>({width:s?l:a,height:s?u:t,expanded:s,expand:d,collapse:o}),[s,u,l,t,a,d,o]);return i(f.Provider,{value:m,children:i(F,{ref:r,isExpanded:s,"data-testid":"stFullScreenFrame",theme:c,children:e})})};function v(e){const t=c=>i(g,{children:i(e,{...c})});return t.displayName=`withFullScreenWrapper(${e.displayName||e.name})`,b(t,e)}export{f as E,v as w};
1
+ import{n as p,r as n,aE as x,aD as h,bh as y,z as C,bi as w,j as i,a_ as b}from"./index.DZ6oX-v9.js";const F=p("div",{target:"e1q5ojhd0"})(({theme:e,isExpanded:t})=>({width:"100%",...t?{position:"fixed",top:0,left:0,bottom:0,right:0,background:e.colors.bgColor,zIndex:e.zIndices.fullscreenWrapper,padding:e.spacing.md,paddingTop:e.sizes.fullScreenHeaderHeight,overflow:"auto",display:"flex",alignItems:"center",justifyContent:"center"}:{}})),f=n.createContext(null);f.displayName="ElementFullscreenContext";const S=()=>{const{setFullScreen:e}=n.useContext(x),[t,c]=n.useState(!1),{fullHeight:s,fullWidth:u}=h(y),l=n.useCallback(r=>{c(r),e(r)},[e]),d=n.useCallback(()=>{document.body.style.overflow="hidden",l(!0)},[l]),o=n.useCallback(()=>{document.body.style.overflow="unset",l(!1)},[l]),a=n.useCallback(r=>{r.keyCode===27&&t&&o()},[o,t]);return n.useEffect(()=>(document.addEventListener("keydown",a,!1),()=>{document.removeEventListener("keydown",a,!1)}),[a]),n.useMemo(()=>({expanded:t,zoomIn:d,zoomOut:o,fullHeight:s,fullWidth:u}),[t,d,o,s,u])},g=({children:e,height:t})=>{const c=C(),{expanded:s,fullHeight:u,fullWidth:l,zoomIn:d,zoomOut:o}=S(),[a,r]=w(),m=n.useMemo(()=>({width:s?l:a,height:s?u:t,expanded:s,expand:d,collapse:o}),[s,u,l,t,a,d,o]);return i(f.Provider,{value:m,children:i(F,{ref:r,isExpanded:s,"data-testid":"stFullScreenFrame",theme:c,children:e})})};function v(e){const t=c=>i(g,{children:i(e,{...c})});return t.displayName=`withFullScreenWrapper(${e.displayName||e.name})`,b(t,e)}export{f as E,v as w};
streamlit/string_util.py CHANGED
@@ -72,7 +72,8 @@ def validate_emoji(maybe_emoji: str | None) -> str:
72
72
  return maybe_emoji
73
73
  else:
74
74
  raise StreamlitAPIException(
75
- f'The value "{maybe_emoji}" is not a valid emoji. Shortcodes are not allowed, please use a single character instead.'
75
+ f'The value "{maybe_emoji}" is not a valid emoji. Shortcodes are not allowed, '
76
+ "please use a single character instead."
76
77
  )
77
78
 
78
79
 
@@ -97,8 +98,9 @@ def validate_material_icon(maybe_material_icon: str | None) -> str:
97
98
 
98
99
  if not icon_match:
99
100
  raise StreamlitAPIException(
100
- f'The value `"{maybe_material_icon.replace("/", invisible_white_space + "/")}"` is not a valid Material icon. '
101
- f"Please use a Material icon shortcode like **`:material{invisible_white_space}/thumb_up:`**"
101
+ f'The value `"{maybe_material_icon.replace("/", invisible_white_space + "/")}"` is '
102
+ "not a valid Material icon. Please use a Material icon shortcode like "
103
+ f"**`:material{invisible_white_space}/thumb_up:`**"
102
104
  )
103
105
 
104
106
  pack_name, icon_name = icon_match.groups()
@@ -109,8 +111,9 @@ def validate_material_icon(maybe_material_icon: str | None) -> str:
109
111
  or not is_material_icon(icon_name)
110
112
  ):
111
113
  raise StreamlitAPIException(
112
- f'The value `"{maybe_material_icon.replace("/", invisible_white_space + "/")}"` is not a valid Material icon.'
113
- f" Please use a Material icon shortcode like **`:material{invisible_white_space}/thumb_up:`**. "
114
+ f'The value `"{maybe_material_icon.replace("/", invisible_white_space + "/")}"` is not a '
115
+ "valid Material icon. Please use a Material icon shortcode like "
116
+ f"**`:material{invisible_white_space}/thumb_up:`**."
114
117
  )
115
118
 
116
119
  return f":{pack_name}/{icon_name}:"
@@ -98,7 +98,7 @@ def _fix_sys_argv(main_script_path: str, args: list[str]) -> None:
98
98
  """
99
99
  import sys
100
100
 
101
- sys.argv = [main_script_path] + list(args)
101
+ sys.argv = [main_script_path, *list(args)]
102
102
 
103
103
 
104
104
  def _on_server_start(server: Server) -> None:
@@ -112,8 +112,8 @@ def _on_server_start(server: Server) -> None:
112
112
  # errors and display them here.
113
113
  try:
114
114
  secrets.load_if_toml_exists()
115
- except Exception as ex:
116
- _LOGGER.error("Failed to load secrets.toml file", exc_info=ex)
115
+ except Exception:
116
+ _LOGGER.exception("Failed to load secrets.toml file")
117
117
 
118
118
  def maybe_open_browser():
119
119
  if config.get_option("server.headless"):
@@ -346,7 +346,8 @@ def run(
346
346
  # Check if we're already in an event loop
347
347
  if asyncio.get_running_loop().is_running():
348
348
  # Use `asyncio.create_task` if we're in an async context
349
- asyncio.create_task(main())
349
+ # TODO(lukasmasuch): Do we have to store a reference for the task here?
350
+ asyncio.create_task(main()) # noqa: RUF006
350
351
  else:
351
352
  # Otherwise, use `asyncio.run`
352
353
  asyncio.run(main())
streamlit/web/cli.py CHANGED
@@ -213,7 +213,8 @@ def main_run(target: str, args=None, **kwargs):
213
213
  if extension[1:] not in ACCEPTED_FILE_EXTENSIONS:
214
214
  if extension[1:] == "":
215
215
  raise click.BadArgumentUsage(
216
- "Streamlit requires raw Python (.py) files, but the provided file has no extension.\nFor more information, please see https://docs.streamlit.io"
216
+ "Streamlit requires raw Python (.py) files, but the provided file has no extension.\n"
217
+ "For more information, please see https://docs.streamlit.io"
217
218
  )
218
219
  else:
219
220
  raise click.BadArgumentUsage(
@@ -19,8 +19,8 @@ from streamlit.web.server.stats_request_handler import StatsRequestHandler
19
19
 
20
20
  __all__ = [
21
21
  "ComponentRequestHandler",
22
- "allow_cross_origin_requests",
23
22
  "Server",
24
- "server_address_is_unix_socket",
25
23
  "StatsRequestHandler",
24
+ "allow_cross_origin_requests",
25
+ "server_address_is_unix_socket",
26
26
  ]
@@ -115,7 +115,8 @@ class BrowserWebSocketHandler(WebSocketHandler, SessionClient):
115
115
 
116
116
  else:
117
117
  _LOGGER.error(
118
- "Origin mismatch, the origin of websocket request is not the same origin of redirect_uri in secrets.toml",
118
+ "Origin mismatch, the origin of websocket request is not the "
119
+ "same origin of redirect_uri in secrets.toml",
119
120
  )
120
121
 
121
122
  return user_info
@@ -212,7 +213,7 @@ class BrowserWebSocketHandler(WebSocketHandler, SessionClient):
212
213
  if isinstance(payload, str):
213
214
  # Sanity check. (The frontend should only be sending us bytes;
214
215
  # Protobuf.ParseFromString does not accept str input.)
215
- raise RuntimeError(
216
+ raise TypeError( # noqa: TRY301
216
217
  "WebSocket received an unexpected `str` message. "
217
218
  "(We expect `bytes` only.)"
218
219
  )
@@ -55,9 +55,10 @@ class ComponentRequestHandler(tornado.web.RequestHandler):
55
55
  try:
56
56
  with open(abspath, "rb") as file:
57
57
  contents = file.read()
58
- except OSError as e:
59
- _LOGGER.error(
60
- "ComponentRequestHandler: GET %s read error", abspath, exc_info=e
58
+ except OSError:
59
+ sanitized_abspath = abspath.replace("\n", "").replace("\r", "")
60
+ _LOGGER.exception(
61
+ "ComponentRequestHandler: GET %s read error", sanitized_abspath
61
62
  )
62
63
  self.write("read error")
63
64
  self.set_status(404)
@@ -102,13 +103,12 @@ class ComponentRequestHandler(tornado.web.RequestHandler):
102
103
  # As of 2015-07-21 there is no bzip2 encoding defined at
103
104
  # http://www.iana.org/assignments/media-types/media-types.xhtml
104
105
  # So for that (and any other encoding), use octet-stream.
105
- elif encoding is not None:
106
+ if encoding is not None:
106
107
  return "application/octet-stream"
107
- elif mime_type is not None:
108
+ if mime_type is not None:
108
109
  return mime_type
109
110
  # if mime_type not detected, use application/octet-stream
110
- else:
111
- return "application/octet-stream"
111
+ return "application/octet-stream"
112
112
 
113
113
  @staticmethod
114
114
  def get_url(file_id: str) -> str:
@@ -87,7 +87,7 @@ class MediaFileHandler(tornado.web.StaticFileHandler):
87
87
  try:
88
88
  self._storage.get_file(absolute_path)
89
89
  except MediaFileStorageError:
90
- _LOGGER.error("MediaFileHandler: Missing file %s", absolute_path)
90
+ _LOGGER.exception("MediaFileHandler: Missing file %s", absolute_path)
91
91
  raise tornado.web.HTTPError(404, "not found")
92
92
 
93
93
  return absolute_path
@@ -121,7 +121,7 @@ class MediaFileHandler(tornado.web.StaticFileHandler):
121
121
  # abspath is the hash as used `get_absolute_path`
122
122
  media_file = cls._storage.get_file(abspath)
123
123
  except Exception:
124
- _LOGGER.error("MediaFileHandler: Missing file %s", abspath)
124
+ _LOGGER.exception("MediaFileHandler: Missing file %s", abspath)
125
125
  return None
126
126
 
127
127
  _LOGGER.debug(
@@ -110,9 +110,9 @@ class AuthLoginHandler(AuthHandlerMixin, tornado.web.RequestHandler):
110
110
 
111
111
  def _parse_provider_token(self) -> str | None:
112
112
  provider_token = self.get_argument("provider", None)
113
+ if provider_token is None:
114
+ return None
113
115
  try:
114
- if provider_token is None:
115
- raise StreamlitAuthError("Missing provider token")
116
116
  payload = decode_provider_token(provider_token)
117
117
  except StreamlitAuthError:
118
118
  return None
@@ -180,7 +180,7 @@ class AuthCallbackHandler(AuthHandlerMixin, tornado.web.RequestHandler):
180
180
  _, _, recorded_provider, code = key.split("_")
181
181
  state_provider_mapping[code] = recorded_provider
182
182
 
183
- provider: str | None = state_provider_mapping.get(state_code_from_url, None)
183
+ provider: str | None = state_provider_mapping.get(state_code_from_url)
184
184
  return provider
185
185
 
186
186
  def _get_origin_from_secrets(self) -> str | None:
@@ -78,13 +78,13 @@ class StaticFileHandler(tornado.web.StaticFileHandler):
78
78
  if os.path.sep != "/":
79
79
  url_path = url_path.replace(os.path.sep, "/")
80
80
  if any(url_path.endswith(x) for x in self._reserved_paths):
81
- raise e
81
+ raise
82
82
 
83
83
  self.path = self.parse_url_path(self.default_filename or "index.html")
84
84
  absolute_path = self.get_absolute_path(self.root, self.path)
85
85
  return super().validate_absolute_path(root, absolute_path)
86
86
 
87
- raise e
87
+ raise
88
88
 
89
89
  def write_error(self, status_code: int, **kwargs) -> None:
90
90
  if status_code == 404: