@sjvair/monitor-map 3.0.0 → 3.0.1

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 (137) hide show
  1. package/dist/lib/LoadScreen.js +73 -0
  2. package/dist/lib/actions.js +9 -0
  3. package/dist/lib/assets/icons/adjustment-horizontal.js +4 -0
  4. package/dist/lib/collocation-sites/CollocationTooltip.js +105 -0
  5. package/dist/lib/collocation-sites/collocations-icon-manager.svelte.js +21 -0
  6. package/dist/lib/collocation-sites/collocations-map-integration.svelte.js +84 -0
  7. package/dist/lib/collocation-sites/collocations.svelte.js +26 -0
  8. package/dist/lib/colors.js +25 -0
  9. package/dist/lib/components/DataBox.js +30 -0
  10. package/dist/lib/components/DisplayOption.js +10 -0
  11. package/dist/lib/components/MapLayersDisplayOptions.js +71 -0
  12. package/dist/lib/components/SegmentedControl.js +37 -0
  13. package/dist/lib/components/ToggleSwitch.js +17 -0
  14. package/dist/lib/components/ui/button/button.js +34 -0
  15. package/dist/lib/components/ui/range-calendar/range-calendar-caption.js +79 -0
  16. package/dist/lib/components/ui/range-calendar/range-calendar-cell.js +34 -0
  17. package/dist/lib/components/ui/range-calendar/range-calendar-day.js +34 -0
  18. package/dist/lib/components/ui/range-calendar/range-calendar-grid-body.js +26 -0
  19. package/dist/lib/components/ui/range-calendar/range-calendar-grid-head.js +26 -0
  20. package/dist/lib/components/ui/range-calendar/range-calendar-grid-row.js +34 -0
  21. package/dist/lib/components/ui/range-calendar/range-calendar-grid.js +34 -0
  22. package/dist/lib/components/ui/range-calendar/range-calendar-head-cell.js +34 -0
  23. package/dist/lib/components/ui/range-calendar/range-calendar-header.js +34 -0
  24. package/dist/lib/components/ui/range-calendar/range-calendar-month-select.js +61 -0
  25. package/dist/lib/components/ui/range-calendar/range-calendar-month.js +25 -0
  26. package/dist/lib/components/ui/range-calendar/range-calendar-months.js +25 -0
  27. package/dist/lib/components/ui/range-calendar/range-calendar-nav.js +25 -0
  28. package/dist/lib/components/ui/range-calendar/range-calendar-next-button.js +57 -0
  29. package/dist/lib/components/ui/range-calendar/range-calendar-prev-button.js +57 -0
  30. package/dist/lib/components/ui/range-calendar/range-calendar-year-select.js +59 -0
  31. package/dist/lib/components/ui/range-calendar/range-calendar.js +272 -0
  32. package/dist/lib/data-chart/DataChart.js +142 -0
  33. package/dist/lib/data-chart/DateRange.js +15 -0
  34. package/dist/lib/data-chart/chart-utils.js +99 -0
  35. package/dist/lib/data-chart/data-chart.svelte.js +28 -0
  36. package/dist/lib/data-chart/requests.js +30 -0
  37. package/dist/lib/data-chart/tooltip.js +101 -0
  38. package/dist/lib/hms/hms-fire-icon-manager.js +39 -0
  39. package/dist/lib/hms/hms-fire-map-integration.svelte.js +97 -0
  40. package/dist/lib/hms/hms-smoke-map-integration.svelte.js +84 -0
  41. package/dist/lib/hms/hms.svelte.js +78 -0
  42. package/dist/lib/index.js +19 -0
  43. package/dist/lib/map/Map.js +14 -0
  44. package/dist/lib/map/MapStyleDisplayOptions.js +43 -0
  45. package/dist/lib/map/Menu.js +45 -0
  46. package/dist/lib/map/icons.js +31 -0
  47. package/dist/lib/map/integrations/base-layer-seperator.js +12 -0
  48. package/dist/lib/map/integrations/click-manager.js +33 -0
  49. package/dist/lib/map/integrations/integrations-manager.js +12 -0
  50. package/dist/lib/map/integrations/map-display-option.svelte.js +17 -0
  51. package/dist/lib/map/integrations/map-geojson-integration.svelte.js +17 -0
  52. package/dist/lib/map/integrations/map-icon-manager.js +43 -0
  53. package/dist/lib/map/integrations/map-integration.svelte.js +5 -0
  54. package/dist/lib/map/integrations/map-layer-integration.svelte.js +23 -0
  55. package/dist/lib/map/integrations/tooltip.svelte.js +81 -0
  56. package/dist/lib/map/map.svelte.js +51 -0
  57. package/dist/lib/map/utils.js +30 -0
  58. package/dist/lib/monitors/components/MonitorClusterTooltip.js +83 -0
  59. package/dist/lib/monitors/components/MonitorSubscriptionManager.js +104 -0
  60. package/dist/lib/monitors/components/MonitorTooltip.js +59 -0
  61. package/dist/lib/monitors/components/MonitorWidgetModal.js +40 -0
  62. package/dist/lib/monitors/components/MonitorsDisplayOptions.js +67 -0
  63. package/dist/lib/monitors/monitor-utils.js +26 -0
  64. package/dist/lib/monitors/monitors-cluster-renderer.js +212 -0
  65. package/dist/lib/monitors/monitors-icon-manager.svelte.js +64 -0
  66. package/dist/lib/monitors/monitors-map-integration.svelte.js +264 -0
  67. package/dist/lib/monitors/monitors.svelte.js +68 -0
  68. package/dist/lib/node_modules/@internationalized/date/dist/private/CalendarDate.js +122 -0
  69. package/dist/lib/node_modules/@internationalized/date/dist/private/DateFormatter.js +84 -0
  70. package/dist/lib/node_modules/@internationalized/date/dist/private/calendars/GregorianCalendar.js +91 -0
  71. package/dist/lib/node_modules/@internationalized/date/dist/private/conversion.js +104 -0
  72. package/dist/lib/node_modules/@internationalized/date/dist/private/manipulation.js +159 -0
  73. package/dist/lib/node_modules/@internationalized/date/dist/private/queries.js +32 -0
  74. package/dist/lib/node_modules/@internationalized/date/dist/private/string.js +37 -0
  75. package/dist/lib/node_modules/@internationalized/date/dist/private/utils.js +6 -0
  76. package/dist/lib/node_modules/clsx/dist/clsx.js +16 -0
  77. package/dist/lib/node_modules/tailwind-merge/dist/bundle-mjs.js +1723 -0
  78. package/dist/lib/node_modules/tailwind-variants/dist/chunk-LQJYWU4O.js +70 -0
  79. package/dist/lib/node_modules/tailwind-variants/dist/chunk-RZF76H2U.js +166 -0
  80. package/dist/lib/node_modules/tailwind-variants/dist/index.js +19 -0
  81. package/dist/lib/node_modules/uplot/dist/uPlot.esm.js +2147 -0
  82. package/dist/lib/sjvair-air.avif +0 -0
  83. package/dist/lib/sjvair-air.png +0 -0
  84. package/dist/lib/sjvair-air.webp +0 -0
  85. package/dist/lib/sjvair-air2.avif +0 -0
  86. package/dist/lib/sjvair-air2.png +0 -0
  87. package/dist/lib/sjvair-air2.webp +0 -0
  88. package/dist/lib/sjvair-icon.avif +0 -0
  89. package/dist/lib/sjvair-icon.png +0 -0
  90. package/dist/lib/sjvair-icon.webp +0 -0
  91. package/dist/lib/sjvair-icon2.avif +0 -0
  92. package/dist/lib/sjvair-icon2.png +0 -0
  93. package/dist/lib/sjvair-icon2.webp +0 -0
  94. package/dist/lib/sjvair-sjv.avif +0 -0
  95. package/dist/lib/sjvair-sjv.png +0 -0
  96. package/dist/lib/sjvair-sjv.webp +0 -0
  97. package/dist/lib/sjvair-sjv2.avif +0 -0
  98. package/dist/lib/sjvair-sjv2.png +0 -0
  99. package/dist/lib/sjvair-sjv2.webp +0 -0
  100. package/dist/lib/src/MapView.js +7 -0
  101. package/dist/lib/src/MonitorDetailPanel.js +169 -0
  102. package/dist/lib/src/router.js +9 -0
  103. package/dist/lib/utils.js +8 -0
  104. package/dist/lib/weather.js +8 -0
  105. package/dist/lib/wind/wind.svelte.js +21 -0
  106. package/dist/monitor-map/MonitorDetailPanel.css +1 -0
  107. package/dist/monitor-map/assets/MonitorDetailPanel-DmN3xPui.js +15 -0
  108. package/dist/monitor-map/assets/validate-routes-CgbRa8fT.js +1 -0
  109. package/dist/monitor-map/inter-cyrillic-ext-wght-normal.woff2 +0 -0
  110. package/dist/monitor-map/inter-cyrillic-wght-normal.woff2 +0 -0
  111. package/dist/monitor-map/inter-greek-ext-wght-normal.woff2 +0 -0
  112. package/dist/monitor-map/inter-greek-wght-normal.woff2 +0 -0
  113. package/dist/monitor-map/inter-latin-ext-wght-normal.woff2 +0 -0
  114. package/dist/monitor-map/inter-latin-wght-normal.woff2 +0 -0
  115. package/dist/monitor-map/inter-vietnamese-wght-normal.woff2 +0 -0
  116. package/dist/monitor-map/lungs.svg +99 -0
  117. package/dist/monitor-map/sjvair-air.avif +0 -0
  118. package/dist/monitor-map/sjvair-air.png +0 -0
  119. package/dist/monitor-map/sjvair-air.webp +0 -0
  120. package/dist/monitor-map/sjvair-air2.avif +0 -0
  121. package/dist/monitor-map/sjvair-air2.png +0 -0
  122. package/dist/monitor-map/sjvair-air2.webp +0 -0
  123. package/dist/monitor-map/sjvair-icon.avif +0 -0
  124. package/dist/monitor-map/sjvair-icon.png +0 -0
  125. package/dist/monitor-map/sjvair-icon.webp +0 -0
  126. package/dist/monitor-map/sjvair-icon2.avif +0 -0
  127. package/dist/monitor-map/sjvair-icon2.png +0 -0
  128. package/dist/monitor-map/sjvair-icon2.webp +0 -0
  129. package/dist/monitor-map/sjvair-sjv.avif +0 -0
  130. package/dist/monitor-map/sjvair-sjv.png +0 -0
  131. package/dist/monitor-map/sjvair-sjv.webp +0 -0
  132. package/dist/monitor-map/sjvair-sjv2.avif +0 -0
  133. package/dist/monitor-map/sjvair-sjv2.png +0 -0
  134. package/dist/monitor-map/sjvair-sjv2.webp +0 -0
  135. package/dist/monitor-map/sjvairMonitorMap.css +1 -0
  136. package/dist/monitor-map/sjvairMonitorMap.js +4042 -0
  137. package/package.json +1 -1
@@ -0,0 +1,15 @@
1
+ import{$ as e,A as t,B as n,C as r,Ct as i,D as a,E as o,F as s,G as c,H as l,I as u,J as d,K as f,L as p,M as m,N as h,O as g,P as _,Q as v,R as y,S as b,St as x,T as S,Tt as C,U as w,V as T,W as E,X as D,Y as O,Z as k,_ as ee,_t as A,a as j,at as M,b as te,bt as N,c as P,ct as F,d as I,dt as L,et as ne,f as R,ft as z,g as B,gt as re,h as V,ht as H,i as ie,it as ae,j as oe,k as se,l as ce,lt as U,m as le,mt as ue,n as de,nt as fe,o as pe,ot as me,p as he,pt as W,q as G,r as ge,rt as _e,s as ve,st as ye,t as be,tt as K,u as xe,ut as q,v as Se,vt as Ce,w as we,wt as Te,x as Ee,xt as De,y as Oe,yt as J,z as ke}from"../sjvairMonitorMap.js";function Ae(e){let t={Accept:`application/json`,"Content-Type":`application/json`};return`USER`in globalThis||(t.Authorization=`Token ${e}`),t}async function je(e){return await Oe({url:`alerts/subscriptions`,init:{headers:Ae(e)}})}async function Me(e){let{monitorId:t,apiToken:n,level:r}=e;return await Se({url:`monitors/${t}/alerts/subscribe`,init:{method:`POST`,headers:Ae(n),body:JSON.stringify({level:r})}})}async function Ne(e){let{monitorId:t,apiToken:n,level:r}=e;return await ee({url:`monitors/${t}/alerts/unsubscribe`,init:{method:`POST`,headers:Ae(n),body:JSON.stringify({level:r})}})}function Pe(e){e=e instanceof Date?e:new Date(e);let t=e.getFullYear();if(isNaN(t))throw Error(`Invalid date provided`);return`${t}-${(e.getMonth()+1).toString().padStart(2,`0`)}-${e.getDate().toString().padStart(2,`0`)} ${e.getHours().toString().padStart(2,`0`)}:${e.getMinutes().toString().padStart(2,`0`)}:${e.getSeconds().toString().padStart(2,`0`)}`}function Fe(e){if(e instanceof Date||(e=new Date(e)),isNaN(e))throw Error(`Provided timestamp "${e}" cannot be used to construct a valid Date`);if(e>new Date)throw Error(`Provided timestamp "${e}" is greater than now`);return e}function Ie(e,t){return e=Fe(e),t=Fe(t),Math.abs(e.getTime()-t.getTime())<=300*1e3&&(e<t?(e.setHours(0,0,0,0),t.setHours(23,59,59,999)):(t.setHours(0,0,0,0),e.setHours(23,59,59,999))),[e,t].sort((e,t)=>e.getTime()-t.getTime()).reduce((e,t,n)=>(n===0?e.gte=t:e.lte=t,e),{})}function Le(e){let t=new Date(e);return t.setDate(e.getDate()-3),t.setHours(0,0,0,0),t}function Re(e,t){let n=e!==void 0,r=t!==void 0;if(!n&&!r)t=new Date,t.setHours(23,59,59,999),e=Le(t);else if(n&&!r)e=Fe(e),t=new Date(e),t.setDate(e.getDate()+3),t.setHours(23,59,59,999);else if(!n&&r)t=Fe(t),e=Le(t);else return Ie(e,t);return{gte:e,lte:t}}var ze=class{page;sensor;timestamp__gte;timestamp__lte;constructor(e){let t=Re(e.timestampGte,e.timestampLte);this.page=e.page?.toString()??`1`,this.sensor=e.sensor??``,this.timestamp__gte=Pe(t.gte),this.timestamp__lte=Pe(t.lte)}};async function Be(e){let t=new ze(e);return await Oe({url:`monitors/${e.monitorId}/entries/${e.entryType}`,searchParams:t})}function Ve(e){let t=Re(e.timestampGte,e.timestampLte),n={timestamp__gte:Pe(t.gte),timestamp__lte:Pe(t.lte)};return te(`monitors/${e.monitorId}/entries/${e.entryType}/csv`,n)}function He(e,t,n){let r=xe(e,n?.in);return isNaN(t)?I(n?.in||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function Ue(e,t,n){let r=xe(e,n?.in);return r.setTime(r.getTime()+t*he),r}function We(e,t,n){let[r,i]=ce(n?.in,e,t);return+P(r)==+P(i)}function Ge(e,t,n){let r=j(e,t)/he;return pe(n?.roundingMethod)(r)}function Ke(e,t){return xe(e*1e3,t?.in)}function qe(e){return Math.trunc(xe(e)/1e3)}function Je(e,t){return+xe(e)>+xe(t)}function Ye(e,t){return We(I(t?.in||e,e),ve(t?.in||e))}function Xe(e,t,n){return He(e,-t,n)}function Ze(e,t){let n=()=>I(t?.in,NaN),r=t?.additionalDigits??2,i=nt(e),a;if(i.date){let e=rt(i.date,r);a=it(e.restDateString,e.year)}if(!a||isNaN(+a))return n();let o=+a,s=0,c;if(i.time&&(s=ot(i.time),isNaN(s)))return n();if(i.timezone){if(c=ct(i.timezone),isNaN(c))return n()}else{let e=new Date(o+s),n=xe(0,t?.in);return n.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),n.setHours(e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),n}return xe(o+s+c,t?.in)}var Qe={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},$e=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,et=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,tt=/^([+-])(\d{2})(?::?(\d{2}))?$/;function nt(e){let t={},n=e.split(Qe.dateTimeDelimiter),r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],Qe.timeZoneDelimiter.test(t.date)&&(t.date=e.split(Qe.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){let e=Qe.timezone.exec(r);e?(t.time=r.replace(e[1],``),t.timezone=e[1]):t.time=r}return t}function rt(e,t){let n=RegExp(`^(?:(\\d{4}|[+-]\\d{`+(4+t)+`})|(\\d{2}|[+-]\\d{`+(2+t)+`})$)`),r=e.match(n);if(!r)return{year:NaN,restDateString:``};let i=r[1]?parseInt(r[1]):null,a=r[2]?parseInt(r[2]):null;return{year:a===null?i:a*100,restDateString:e.slice((r[1]||r[2]).length)}}function it(e,t){if(t===null)return new Date(NaN);let n=e.match($e);if(!n)return new Date(NaN);let r=!!n[4],i=at(n[1]),a=at(n[2])-1,o=at(n[3]),s=at(n[4]),c=at(n[5])-1;if(r)return mt(t,s,c)?lt(t,s,c):new Date(NaN);{let e=new Date(0);return!ft(t,a,o)||!pt(t,i)?new Date(NaN):(e.setUTCFullYear(t,a,Math.max(i,o)),e)}}function at(e){return e?parseInt(e):1}function ot(e){let t=e.match(et);if(!t)return NaN;let n=st(t[1]),r=st(t[2]),i=st(t[3]);return ht(n,r,i)?n*R+r*he+i*1e3:NaN}function st(e){return e&&parseFloat(e.replace(`,`,`.`))||0}function ct(e){if(e===`Z`)return 0;let t=e.match(tt);if(!t)return 0;let n=t[1]===`+`?-1:1,r=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return gt(r,i)?n*(r*R+i*he):NaN}function lt(e,t,n){let r=new Date(0);r.setUTCFullYear(e,0,4);let i=r.getUTCDay()||7,a=(t-1)*7+n+1-i;return r.setUTCDate(r.getUTCDate()+a),r}var ut=[31,null,31,30,31,30,31,31,30,31,30,31];function dt(e){return e%400==0||e%4==0&&e%100!=0}function ft(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(ut[t]||(dt(e)?29:28))}function pt(e,t){return t>=1&&t<=(dt(e)?366:365)}function mt(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function ht(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function gt(e,t){return t>=0&&t<=59}function _t(e){let t=document.getElementById(`SJVAirMonitorMap`);if(t)return t.appendChild(e),{destroy(){e.remove()}}}function vt(e,t){let n=o(t,[`$$slots`,`$$events`,`$$legacy`]),r=[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`}],[`path`,{d:`m15 8 2 2 4-4`}],[`path`,{d:`M16.8607 4.4824A6 6 0 0 0 6 8C6 12.499 4.589 13.956 3.262 15.326`}],[`path`,{d:`M3.262 15.326A1 1 0 0 0 4 17H20A1 1 0 0 0 20.74 15.327C20.209 14.779 19.665 14.218 19.203 13.454`}]];be(e,a({name:`bell-check`},()=>n,{get iconNode(){return r}}))}function yt(e,t){let n=o(t,[`$$slots`,`$$events`,`$$legacy`]),r=[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`}],[`path`,{d:`M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742`}],[`path`,{d:`m2 2 20 20`}],[`path`,{d:`M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05`}]];be(e,a({name:`bell-off`},()=>n,{get iconNode(){return r}}))}function bt(e,t){let n=o(t,[`$$slots`,`$$events`,`$$legacy`]),r=[[`path`,{d:`m6 9 6 6 6-6`}]];be(e,a({name:`chevron-down`},()=>n,{get iconNode(){return r}}))}function xt(e,t){let n=o(t,[`$$slots`,`$$events`,`$$legacy`]),r=[[`path`,{d:`m15 18-6-6 6-6`}]];be(e,a({name:`chevron-left`},()=>n,{get iconNode(){return r}}))}function St(e,t){let n=o(t,[`$$slots`,`$$events`,`$$legacy`]),r=[[`path`,{d:`m9 18 6-6-6-6`}]];be(e,a({name:`chevron-right`},()=>n,{get iconNode(){return r}}))}function Ct(e,t){let n=o(t,[`$$slots`,`$$events`,`$$legacy`]),r=[[`path`,{d:`M8 3H5a2 2 0 0 0-2 2v3`}],[`path`,{d:`M21 8V5a2 2 0 0 0-2-2h-3`}],[`path`,{d:`M3 16v3a2 2 0 0 0 2 2h3`}],[`path`,{d:`M16 21h3a2 2 0 0 0 2-2v-3`}]];be(e,a({name:`maximize`},()=>n,{get iconNode(){return r}}))}function wt(e,t){let n=o(t,[`$$slots`,`$$events`,`$$legacy`]),r=[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`}],[`path`,{d:`m15 9-6 6`}],[`path`,{d:`m9 9 6 6`}]];be(e,a({name:`square-x`},()=>n,{get iconNode(){return r}}))}var Tt=d(`<div class="select-none"><button class="cursor-pointer rounded border border-blue-400 bg-blue-500 px-3 py-1.5 text-sm font-semibold text-white hover:bg-blue-600">Get the widget!</button> <div><div class="m-4 flex max-w-[min(450px,calc(100vw-2rem))] flex-col items-center justify-center rounded bg-white p-4 shadow-lg"><button translate="no" class="cursor-pointer self-end"><!></button> <div translate="no"></div> <p class="mb-4 text-center">Copy the following code and paste it in your website</p> <div class="group relative flex w-full items-center overflow-hidden bg-neutral-800 hover:bg-neutral-600"><code class="cursor-text overflow-x-scroll bg-inherit text-gray-300 select-text"> </code> <div class="invisible absolute top-1/2 left-[calc(100%-3rem)] flex -translate-y-1/2 cursor-pointer items-center justify-center rounded-full bg-black/80 p-2 group-hover:visible"><button aria-label="Copy" translate="no" class="svg-icon content-copy cursor-pointer bg-gray-300"></button></div> <div>Copied to clipboard!</div></div></div></div></div>`);function Et(e,t){let n={overflow:`hidden`,width:`290px`,height:`390px`},r=W(!1),a=W(!1),o=H(()=>`${Ee}/widget/#/${t.monitorId}`),l=H(()=>`<iframe src="${K(o)}" frameborder="0" allowtransparency="true" style="overflow: ${n.overflow}; width: ${n.width}; height: ${n.height};"></iframe>`);function u(){navigator.clipboard.writeText(K(l)),z(a,!0),setTimeout(()=>{z(a,!1)},1e3*2)}function d(){z(r,!0),document.body.style.overflow=`hidden`}function p(){z(r,!1),document.body.style.overflow=`auto`}var m=Tt(),h=F(m),g=q(h,2),b=F(g),x=F(b);wt(F(x),{}),i(x);var S=q(x,2);T(S,()=>K(l),!0),i(S);var C=q(S,4),w=F(C),E=F(w,!0);i(w);var D=q(w,2),O=F(D);i(D);var k=q(D,2);i(C),i(b),i(g),y(g,e=>_t?.(e)),i(m),M(()=>{_(g,1,s([`fixed inset-0 z-9999 flex items-center justify-center bg-black/50 backdrop-blur-sm transition-all duration-200`,K(r)?`visible`:`invisible`])),c(E,K(l)),_(k,1,s([`absolute flex h-full w-full items-center justify-center bg-[#1fb9ef] text-white transition-all duration-200 [text-shadow:1px_2px_4px_#333]`,K(a)?`left-0`:`left-[120%]`]))}),v(`click`,h,d),v(`click`,x,p),v(`click`,O,u),f(e,m)}k([`click`]);var Dt=d(`<button class="cursor-pointer px-4 py-2 text-sm rounded-t w-full flex items-center justify-between border border-black/30 hover:bg-[#F5F5F3]">Unsubscribe <!></button>`),Ot=d(`<button><span> </span> <!></button>`),kt=d(`<button aria-label="Close" class="fixed inset-0 z-10"></button> <div class="absolute top-full left-0 z-20 mt-1 w-full overflow-hidden rounded shadow-lg"><!> <!></div>`,1),At=d(`<div class="relative select-none"><button> <!></button> <!></div>`);function jt(e,t){N(t,!0);let n=[`unhealthy_sensitive`,`unhealthy`,`very_unhealthy`,`hazardous`],r=W(!1),a=W(!1),o=W(!1),u=W(null),d=H(()=>{if(!B.meta)return[];try{return B.meta.entryType(`pm25`).asIter.levels.filter(e=>n.includes(e.name))}catch{return[]}});me(()=>{t.monitorId,z(r,!1),z(u,null),p()});async function p(){let e=t.monitorId;z(a,!0);try{let n=await je(``);if(e!==t.monitorId)return;z(u,n.find(t=>t.monitor===e)?.level??null,!0)}finally{e===t.monitorId&&z(a,!1)}}async function m(e){if(K(o)||!e)return;z(o,!0);let n=K(u);try{e===K(u)?(await Ne({monitorId:t.monitorId,apiToken:``,level:e}),z(u,null)):(await Me({monitorId:t.monitorId,apiToken:``,level:e}),z(u,e,!0))}catch{z(u,n,!0);return}finally{z(o,!1)}z(r,!1)}var g=At(),y=F(g),b=F(y),x=q(b);{let e=H(()=>[`transition-transform duration-300`,K(r)?`rotate-180`:``]);bt(x,{size:16,get class(){return K(e)}})}i(y);var S=q(y,2),C=e=>{var t=kt(),n=U(t),a=q(n,2),p=F(a),g=e=>{var t=Dt();yt(q(F(t)),{size:14}),i(t),v(`click`,t,()=>m(K(u))),f(e,t)};E(p,e=>{K(u)&&e(g)}),l(q(p,2),17,()=>K(d),e=>e.name,(e,t)=>{let n=H(()=>K(t).name===K(u));var r=Ot(),a=F(r),l=F(a,!0);i(a);var d=q(a,2),p=e=>{vt(e,{size:14})};E(d,e=>{K(n)&&e(p)}),i(r),M(()=>{_(r,1,s([`flex w-full items-center justify-between px-4 py-2 text-sm text-white last:rounded-b`,K(n)?``:`first:rounded-t hover:brightness-90 cursor-pointer`])),h(r,`background-color: ${K(t).color??``}`),r.disabled=K(o),c(l,K(t).label)}),v(`click`,r,function(...e){(K(n)?null:()=>m(K(t).name))?.apply(this,e)}),f(e,r)}),i(a),v(`click`,n,()=>z(r,!1)),f(e,t)};E(S,e=>{K(r)&&e(C)}),i(g),M(()=>{_(y,1,s([`flex w-full cursor-pointer items-center justify-center gap-2 rounded border px-3 py-1.5 text-sm font-semibold text-white`,K(u)?`border-green-700 bg-green-600 hover:bg-green-700`:`border-blue-600 bg-blue-500 hover:bg-blue-600`])),y.disabled=K(a),c(b,`${K(u)?`Manage Subscription`:`Subscribe to Alerts`} `)}),v(`click`,y,()=>z(r,!K(r))),f(e,g),J()}k([`click`]);function Mt(e,t){return e-t*Math.floor(e/t)}var Nt=1721426;function Pt(e,t,n,r){t=It(e,t);let i=t-1,a=-2;return n<=2?a=0:Ft(t)&&(a=-1),Nt-1+365*i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400)+Math.floor((367*n-362)/12+a+r)}function Ft(e){return e%4==0&&(e%100!=0||e%400==0)}function It(e,t){return e===`BC`?1-t:t}function Lt(e){let t=`AD`;return e<=0&&(t=`BC`,e=1-e),[t,e]}var Rt={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]},zt=class{fromJulianDay(e){let t=e,n=t-Nt,r=Math.floor(n/146097),i=Mt(n,146097),a=Math.floor(i/36524),o=Mt(i,36524),s=Math.floor(o/1461),c=Mt(o,1461),l=Math.floor(c/365),[u,d]=Lt(r*400+a*100+s*4+l+ +(a!==4&&l!==4)),f=t-Pt(u,d,1,1),p=2;t<Pt(u,d,3,1)?p=0:Ft(d)&&(p=1);let m=Math.floor(((f+p)*12+373)/367);return new dr(u,d,m,t-Pt(u,d,m,1)+1)}toJulianDay(e){return Pt(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return Rt[Ft(e.year)?`leapyear`:`standard`][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return Ft(e.year)?366:365}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 31}getYearsInEra(e){return 9999}getEras(){return[`BC`,`AD`]}isInverseEra(e){return e.era===`BC`}balanceDate(e){e.year<=0&&(e.era=e.era===`BC`?`AD`:`BC`,e.year=1-e.year)}constructor(){this.identifier=`gregory`}},Bt={"001":1,AD:1,AE:6,AF:6,AI:1,AL:1,AM:1,AN:1,AR:1,AT:1,AU:1,AX:1,AZ:1,BA:1,BE:1,BG:1,BH:6,BM:1,BN:1,BY:1,CH:1,CL:1,CM:1,CN:1,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DZ:6,EC:1,EE:1,EG:6,ES:1,FI:1,FJ:1,FO:1,FR:1,GB:1,GE:1,GF:1,GP:1,GR:1,HR:1,HU:1,IE:1,IQ:6,IR:6,IS:1,IT:1,JO:6,KG:1,KW:6,KZ:1,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MK:1,MN:1,MQ:1,MV:5,MY:1,NL:1,NO:1,NZ:1,OM:6,PL:1,QA:6,RE:1,RO:1,RS:1,RU:1,SD:6,SE:1,SI:1,SK:1,SM:1,SY:6,TJ:1,TM:1,TR:1,UA:1,UY:1,UZ:1,VA:1,VN:1,XK:1};function Vt(e,t){return t=wn(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function Ht(e,t){return t=wn(t,e.calendar),e=rn(e),t=rn(t),e.era===t.era&&e.year===t.year&&e.month===t.month}function Ut(e,t){return Wt(e.calendar,t.calendar)&&Ht(e,t)}function Wt(e,t){return e.isEqual?.(t)??t.isEqual?.(e)??e.identifier===t.identifier}function Gt(e,t){return Vt(e,Yt(t))}var Kt={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function qt(e,t,n){let r=e.calendar.toJulianDay(e),i=n?Kt[n]:ln(t),a=Math.ceil(r+1-i)%7;return a<0&&(a+=7),a}function Jt(e){return xn(Date.now(),e)}function Yt(e){return Sn(Jt(e))}function Xt(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function Zt(e,t){return Qt(e)-Qt(t)}function Qt(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}var $t=null,en=!1;function tn(){return $t??=new Intl.DateTimeFormat().resolvedOptions().timeZone,$t}function nn(){return en}function rn(e){return e.subtract({days:e.day-1})}function an(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}var on=new Map,sn=new Map;function cn(e){if(Intl.Locale){let t=on.get(e);return t||(t=new Intl.Locale(e).maximize().region,t&&on.set(e,t)),t}let t=e.split(`-`)[1];return t===`u`?void 0:t}function ln(e){let t=sn.get(e);if(!t){if(Intl.Locale){let n=new Intl.Locale(e);if(`getWeekInfo`in n&&(t=n.getWeekInfo(),t))return sn.set(e,t),t.firstDay}let n=cn(e);if(e.includes(`-fw-`)){let n=e.split(`-fw-`)[1].split(`-`)[0];t=n===`mon`?{firstDay:1}:n===`tue`?{firstDay:2}:n===`wed`?{firstDay:3}:n===`thu`?{firstDay:4}:n===`fri`?{firstDay:5}:n===`sat`?{firstDay:6}:{firstDay:0}}else t=e.includes(`-ca-iso8601`)?{firstDay:1}:{firstDay:n&&Bt[n]||0};sn.set(e,t)}return t.firstDay}function un(e){return e=wn(e,new zt),dn(It(e.era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function dn(e,t,n,r,i,a,o){let s=new Date;return s.setUTCHours(r,i,a,o),s.setUTCFullYear(e,t-1,n),s.getTime()}function fn(e,t){if(t===`UTC`)return 0;if(e>0&&t===tn()&&!nn())return new Date(e).getTimezoneOffset()*-6e4;let{year:n,month:r,day:i,hour:a,minute:o,second:s}=mn(e,t);return dn(n,r,i,a,o,s,0)-Math.floor(e/1e3)*1e3}var pn=new Map;function mn(e,t){let n=pn.get(t);n||(n=new Intl.DateTimeFormat(`en-US`,{timeZone:t,hour12:!1,era:`short`,year:`numeric`,month:`numeric`,day:`numeric`,hour:`numeric`,minute:`numeric`,second:`numeric`}),pn.set(t,n));let r=n.formatToParts(new Date(e)),i={};for(let e of r)e.type!==`literal`&&(i[e.type]=e.value);return{year:i.era===`BC`||i.era===`B`?-i.year+1:+i.year,month:+i.month,day:+i.day,hour:i.hour===`24`?0:+i.hour,minute:+i.minute,second:+i.second}}var hn=864e5;function gn(e,t){let n=un(e);return _n(e,t,n-fn(n-hn,t),n-fn(n+hn,t))}function _n(e,t,n,r){return(n===r?[n]:[n,r]).filter(n=>vn(e,t,n))}function vn(e,t,n){let r=mn(n,t);return e.year===r.year&&e.month===r.month&&e.day===r.day&&e.hour===r.hour&&e.minute===r.minute&&e.second===r.second}function yn(e,t,n=`compatible`){let r=Cn(e);if(t===`UTC`)return un(r);if(t===tn()&&n===`compatible`&&!nn()){r=wn(r,new zt);let e=new Date,t=It(r.era,r.year);return e.setFullYear(t,r.month-1,r.day),e.setHours(r.hour,r.minute,r.second,r.millisecond),e.getTime()}let i=un(r),a=fn(i-hn,t),o=fn(i+hn,t),s=_n(r,t,i-a,i-o);if(s.length===1)return s[0];if(s.length>1)switch(n){case`compatible`:case`earlier`:return s[0];case`later`:return s[s.length-1];case`reject`:throw RangeError(`Multiple possible absolute times found`)}switch(n){case`earlier`:return Math.min(i-a,i-o);case`compatible`:case`later`:return Math.max(i-a,i-o);case`reject`:throw RangeError(`No such absolute time found`)}}function bn(e,t,n=`compatible`){return new Date(yn(e,t,n))}function xn(e,t){let n=fn(e,t),r=new Date(e+n),i=r.getUTCFullYear(),a=r.getUTCMonth()+1,o=r.getUTCDate(),s=r.getUTCHours(),c=r.getUTCMinutes(),l=r.getUTCSeconds(),u=r.getUTCMilliseconds();return new pr(i<1?`BC`:`AD`,i<1?-i+1:i,a,o,t,n,s,c,l,u)}function Sn(e){return new dr(e.calendar,e.era,e.year,e.month,e.day)}function Cn(e,t){let n=0,r=0,i=0,a=0;if(`timeZone`in e)({hour:n,minute:r,second:i,millisecond:a}=e);else if(`hour`in e&&!t)return e;return t&&({hour:n,minute:r,second:i,millisecond:a}=t),new fr(e.calendar,e.era,e.year,e.month,e.day,n,r,i,a)}function wn(e,t){if(Wt(e.calendar,t))return e;let n=t.fromJulianDay(e.calendar.toJulianDay(e)),r=e.copy();return r.calendar=t,r.era=n.era,r.year=n.year,r.month=n.month,r.day=n.day,Pn(r),r}function Tn(e,t,n){return e instanceof pr?e.timeZone===t?e:Dn(e,t):xn(yn(e,t,n),t)}function En(e){let t=un(e)-e.offset;return new Date(t)}function Dn(e,t){return wn(xn(un(e)-e.offset,t),e.calendar)}var On=36e5;function kn(e,t){let n=e.copy(),r=`hour`in n?Hn(n,t):0;An(n,t.years||0),n.calendar.balanceYearMonth&&n.calendar.balanceYearMonth(n,e),n.month+=t.months||0,jn(n),Nn(n),n.day+=(t.weeks||0)*7,n.day+=t.days||0,n.day+=r,Mn(n),n.calendar.balanceDate&&n.calendar.balanceDate(n),n.year<1&&(n.year=1,n.month=1,n.day=1);let i=n.calendar.getYearsInEra(n);if(n.year>i){let e=n.calendar.isInverseEra?.(n);n.year=i,n.month=e?1:n.calendar.getMonthsInYear(n),n.day=e?1:n.calendar.getDaysInMonth(n)}n.month<1&&(n.month=1,n.day=1);let a=n.calendar.getMonthsInYear(n);return n.month>a&&(n.month=a,n.day=n.calendar.getDaysInMonth(n)),n.day=Math.max(1,Math.min(n.calendar.getDaysInMonth(n),n.day)),n}function An(e,t){e.calendar.isInverseEra?.(e)&&(t=-t),e.year+=t}function jn(e){for(;e.month<1;)An(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,An(e,1)}function Mn(e){for(;e.day<1;)e.month--,jn(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,jn(e)}function Nn(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))}function Pn(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),Nn(e)}function Fn(e){let t={};for(let n in e)typeof e[n]==`number`&&(t[n]=-e[n]);return t}function In(e,t){return kn(e,Fn(t))}function Ln(e,t){let n=e.copy();return t.era!=null&&(n.era=t.era),t.year!=null&&(n.year=t.year),t.month!=null&&(n.month=t.month),t.day!=null&&(n.day=t.day),Pn(n),n}function Rn(e,t){let n=e.copy();return t.hour!=null&&(n.hour=t.hour),t.minute!=null&&(n.minute=t.minute),t.second!=null&&(n.second=t.second),t.millisecond!=null&&(n.millisecond=t.millisecond),Bn(n),n}function zn(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=Vn(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=Vn(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=Vn(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=Vn(e.hour,24),t}function Bn(e){e.millisecond=Math.max(0,Math.min(e.millisecond,1e3)),e.second=Math.max(0,Math.min(e.second,59)),e.minute=Math.max(0,Math.min(e.minute,59)),e.hour=Math.max(0,Math.min(e.hour,23))}function Vn(e,t){let n=e%t;return n<0&&(n+=t),n}function Hn(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,zn(e)}function Un(e,t,n,r){let i=e.copy();switch(t){case`era`:{let t=e.calendar.getEras(),a=t.indexOf(e.era);if(a<0)throw Error(`Invalid era: `+e.era);a=Gn(a,n,0,t.length-1,r?.round),i.era=t[a],Pn(i);break}case`year`:i.calendar.isInverseEra?.(i)&&(n=-n),i.year=Gn(e.year,n,-1/0,9999,r?.round),i.year===-1/0&&(i.year=1),i.calendar.balanceYearMonth&&i.calendar.balanceYearMonth(i,e);break;case`month`:i.month=Gn(e.month,n,1,e.calendar.getMonthsInYear(e),r?.round);break;case`day`:i.day=Gn(e.day,n,1,e.calendar.getDaysInMonth(e),r?.round);break;default:throw Error(`Unsupported field `+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(i),Pn(i),i}function Wn(e,t,n,r){let i=e.copy();switch(t){case`hour`:{let t=e.hour,a=0,o=23;if(r?.hourCycle===12){let e=t>=12;a=e?12:0,o=e?23:11}i.hour=Gn(t,n,a,o,r?.round);break}case`minute`:i.minute=Gn(e.minute,n,0,59,r?.round);break;case`second`:i.second=Gn(e.second,n,0,59,r?.round);break;case`millisecond`:i.millisecond=Gn(e.millisecond,n,0,999,r?.round);break;default:throw Error(`Unsupported field `+t)}return i}function Gn(e,t,n,r,i=!1){if(i){e+=Math.sign(t),e<n&&(e=r);let i=Math.abs(t);e=t>0?Math.ceil(e/i)*i:Math.floor(e/i)*i,e>r&&(e=n)}else e+=t,e<n?e=r-(n-e-1):e>r&&(e=n+(e-r-1));return e}function Kn(e,t){let n;return n=t.years!=null&&t.years!==0||t.months!=null&&t.months!==0||t.weeks!=null&&t.weeks!==0||t.days!=null&&t.days!==0?yn(kn(Cn(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days}),e.timeZone):un(e)-e.offset,n+=t.milliseconds||0,n+=(t.seconds||0)*1e3,n+=(t.minutes||0)*6e4,n+=(t.hours||0)*36e5,wn(xn(n,e.timeZone),e.calendar)}function qn(e,t){return Kn(e,Fn(t))}function Jn(e,t,n,r){switch(t){case`hour`:{let t=0,i=23;if(r?.hourCycle===12){let n=e.hour>=12;t=n?12:0,i=n?23:11}let a=Cn(e),o=wn(Rn(a,{hour:t}),new zt),s=[yn(o,e.timeZone,`earlier`),yn(o,e.timeZone,`later`)].filter(t=>xn(t,e.timeZone).day===o.day)[0],c=wn(Rn(a,{hour:i}),new zt),l=[yn(c,e.timeZone,`earlier`),yn(c,e.timeZone,`later`)].filter(t=>xn(t,e.timeZone).day===c.day).pop(),u=un(e)-e.offset,d=Math.floor(u/On),f=u%On;return u=Gn(d,n,Math.floor(s/On),Math.floor(l/On),r?.round)*On+f,wn(xn(u,e.timeZone),e.calendar)}case`minute`:case`second`:case`millisecond`:return Wn(e,t,n,r);case`era`:case`year`:case`month`:case`day`:return wn(xn(yn(Un(Cn(e),t,n,r),e.timeZone),e.timeZone),e.calendar);default:throw Error(`Unsupported field `+t)}}function Yn(e,t,n){let r=Cn(e),i=Rn(Ln(r,t),t);return i.compare(r)===0?e:wn(xn(yn(i,e.timeZone,n),e.timeZone),e.calendar)}var Xn=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/,Zn=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/,Qn=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:([+-]\d{2})(?::?(\d{2}))?(?::?(\d{2}))?)?\[(.*?)\]$/,$n=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/;function er(e){let t=e.match(Xn);if(!t)throw $n.test(e)?Error(`Invalid ISO 8601 date string: ${e}. Use parseAbsolute() instead.`):Error(`Invalid ISO 8601 date string: `+e);let n=new dr(ir(t[1],0,9999),ir(t[2],1,12),1);return n.day=ir(t[3],1,n.calendar.getDaysInMonth(n)),n}function tr(e){let t=e.match(Zn);if(!t)throw $n.test(e)?Error(`Invalid ISO 8601 date time string: ${e}. Use parseAbsolute() instead.`):Error(`Invalid ISO 8601 date time string: `+e);let n=ir(t[1],-9999,9999),r=new fr(n<1?`BC`:`AD`,n<1?-n+1:n,ir(t[2],1,12),1,t[4]?ir(t[4],0,23):0,t[5]?ir(t[5],0,59):0,t[6]?ir(t[6],0,59):0,t[7]?ir(t[7],0,1/0)*1e3:0);return r.day=ir(t[3],0,r.calendar.getDaysInMonth(r)),r}function nr(e,t){let n=e.match(Qn);if(!n)throw Error(`Invalid ISO 8601 date time string: `+e);let r=ir(n[1],-9999,9999),i=new pr(r<1?`BC`:`AD`,r<1?-r+1:r,ir(n[2],1,12),1,n[11],0,n[4]?ir(n[4],0,23):0,n[5]?ir(n[5],0,59):0,n[6]?ir(n[6],0,59):0,n[7]?ir(n[7],0,1/0)*1e3:0);i.day=ir(n[3],0,i.calendar.getDaysInMonth(i));let a=Cn(i),o;if(n[8]){let e=ir(n[8],-23,23);if(i.offset=Math.sign(e)*(Math.abs(e)*36e5+ir(n[9]??`0`,0,59)*6e4+ir(n[10]??`0`,0,59)*1e3),o=un(i)-i.offset,!gn(a,i.timeZone).includes(o))throw Error(`Offset ${cr(i.offset)} is invalid for ${sr(i)} in ${i.timeZone}`)}else o=yn(Cn(a),i.timeZone,t);return xn(o,i.timeZone)}function rr(e,t){let n=e.match($n);if(!n)throw Error(`Invalid ISO 8601 date time string: `+e);let r=ir(n[1],-9999,9999),i=new pr(r<1?`BC`:`AD`,r<1?-r+1:r,ir(n[2],1,12),1,t,0,n[4]?ir(n[4],0,23):0,n[5]?ir(n[5],0,59):0,n[6]?ir(n[6],0,59):0,n[7]?ir(n[7],0,1/0)*1e3:0);return i.day=ir(n[3],0,i.calendar.getDaysInMonth(i)),n[8]&&(i.offset=ir(n[8],-23,23)*36e5+ir(n[9]??`0`,0,59)*6e4),Dn(i,t)}function ir(e,t,n){let r=Number(e);if(r<t||r>n)throw RangeError(`Value out of range: ${t} <= ${r} <= ${n}`);return r}function ar(e){return`${String(e.hour).padStart(2,`0`)}:${String(e.minute).padStart(2,`0`)}:${String(e.second).padStart(2,`0`)}${e.millisecond?String(e.millisecond/1e3).slice(1):``}`}function or(e){let t=wn(e,new zt),n;return n=t.era===`BC`?t.year===1?`0000`:`-`+String(Math.abs(1-t.year)).padStart(6,`00`):String(t.year).padStart(4,`0`),`${n}-${String(t.month).padStart(2,`0`)}-${String(t.day).padStart(2,`0`)}`}function sr(e){return`${or(e)}T${ar(e)}`}function cr(e){let t=Math.sign(e)<0?`-`:`+`;e=Math.abs(e);let n=Math.floor(e/36e5),r=Math.floor(e%36e5/6e4),i=Math.floor(e%36e5%6e4/1e3),a=`${t}${String(n).padStart(2,`0`)}:${String(r).padStart(2,`0`)}`;return i!==0&&(a+=`:${String(i).padStart(2,`0`)}`),a}function lr(e){return`${sr(e)}${cr(e.offset)}[${e.timeZone}]`}function ur(e){let t=typeof e[0]==`object`?e.shift():new zt,n;if(typeof e[0]==`string`)n=e.shift();else{let e=t.getEras();n=e[e.length-1]}let r=e.shift(),i=e.shift(),a=e.shift();return[t,n,r,i,a]}var dr=class e{constructor(...e){let[t,n,r,i,a]=ur(e);this.calendar=t,this.era=n,this.year=r,this.month=i,this.day=a,Pn(this)}copy(){return this.era?new e(this.calendar,this.era,this.year,this.month,this.day):new e(this.calendar,this.year,this.month,this.day)}add(e){return kn(this,e)}subtract(e){return In(this,e)}set(e){return Ln(this,e)}cycle(e,t,n){return Un(this,e,t,n)}toDate(e){return bn(this,e)}toString(){return or(this)}compare(e){return Xt(this,e)}},fr=class e{constructor(...e){let[t,n,r,i,a]=ur(e);this.calendar=t,this.era=n,this.year=r,this.month=i,this.day=a,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,Pn(this)}copy(){return this.era?new e(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new e(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return kn(this,e)}subtract(e){return In(this,e)}set(e){return Ln(Rn(this,e),e)}cycle(e,t,n){switch(e){case`era`:case`year`:case`month`:case`day`:return Un(this,e,t,n);default:return Wn(this,e,t,n)}}toDate(e,t){return bn(this,e,t)}toString(){return sr(this)}compare(e){let t=Xt(this,e);return t===0?Zt(this,Cn(e)):t}},pr=class e{constructor(...e){let[t,n,r,i,a]=ur(e),o=e.shift(),s=e.shift();this.calendar=t,this.era=n,this.year=r,this.month=i,this.day=a,this.timeZone=o,this.offset=s,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,Pn(this)}copy(){return this.era?new e(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new e(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(e){return Kn(this,e)}subtract(e){return qn(this,e)}set(e,t){return Yn(this,e,t)}cycle(e,t,n){return Jn(this,e,t,n)}toDate(){return En(this)}toString(){return lr(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(e){return this.toDate().getTime()-Tn(e,this.timeZone).toDate().getTime()}},mr=new Map,hr=class{constructor(e,t={}){this.formatter=_r(e,t),this.options=t}format(e){return this.formatter.format(e)}formatToParts(e){return this.formatter.formatToParts(e)}formatRange(e,t){if(typeof this.formatter.formatRange==`function`)return this.formatter.formatRange(e,t);if(t<e)throw RangeError(`End date must be >= start date`);return`${this.formatter.format(e)} \u{2013} ${this.formatter.format(t)}`}formatRangeToParts(e,t){if(typeof this.formatter.formatRangeToParts==`function`)return this.formatter.formatRangeToParts(e,t);if(t<e)throw RangeError(`End date must be >= start date`);let n=this.formatter.formatToParts(e),r=this.formatter.formatToParts(t);return[...n.map(e=>({...e,source:`startRange`})),{type:`literal`,value:` – `,source:`shared`},...r.map(e=>({...e,source:`endRange`}))]}resolvedOptions(){let e=this.formatter.resolvedOptions();return xr()&&(this.resolvedHourCycle||=Sr(e.locale,this.options),e.hourCycle=this.resolvedHourCycle,e.hour12=this.resolvedHourCycle===`h11`||this.resolvedHourCycle===`h12`),e.calendar===`ethiopic-amete-alem`&&(e.calendar=`ethioaa`),e}},gr={true:{ja:`h11`},false:{}};function _r(e,t={}){if(typeof t.hour12==`boolean`&&yr()){t={...t};let n=gr[String(t.hour12)][e.split(`-`)[0]],r=t.hour12?`h12`:`h23`;t.hourCycle=n??r,delete t.hour12}let n=e+(t?Object.entries(t).sort((e,t)=>e[0]<t[0]?-1:1).join():``);if(mr.has(n))return mr.get(n);let r=new Intl.DateTimeFormat(e,t);return mr.set(n,r),r}var vr=null;function yr(){return vr??=new Intl.DateTimeFormat(`en-US`,{hour:`numeric`,hour12:!1}).format(new Date(2020,2,3,0))===`24`,vr}var br=null;function xr(){return br??=new Intl.DateTimeFormat(`fr`,{hour:`numeric`,hour12:!1}).resolvedOptions().hourCycle===`h12`,br}function Sr(e,t){if(!t.timeStyle&&!t.hour)return;e=e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,``),e+=(e.includes(`-u-`)?``:`-u`)+`-nu-latn`;let n=_r(e,{...t,timeZone:void 0}),r=parseInt(n.formatToParts(new Date(2020,2,3,0)).find(e=>e.type===`hour`).value,10),i=parseInt(n.formatToParts(new Date(2020,2,3,23)).find(e=>e.type===`hour`).value,10);if(r===0&&i===23)return`h23`;if(r===24&&i===23)return`h24`;if(r===0&&i===11)return`h11`;if(r===12&&i===11)return`h12`;throw Error(`Unexpected hour cycle result`)}var Cr=!0,wr=`uplot`,Tr=`u-hz`,Er=`u-vt`,Dr=`u-title`,Or=`u-wrap`,kr=`u-under`,Ar=`u-over`,jr=`u-axis`,Mr=`u-off`,Nr=`u-select`,Pr=`u-cursor-x`,Fr=`u-cursor-y`,Ir=`u-cursor-pt`,Lr=`u-legend`,Rr=`u-live`,zr=`u-inline`,Br=`u-series`,Vr=`u-marker`,Hr=`u-label`,Ur=`u-value`,Wr=`width`,Gr=`height`,Kr=`top`,qr=`bottom`,Jr=`left`,Yr=`right`,Xr=`#000`,Zr=`#0000`,Qr=`mousemove`,$r=`mousedown`,ei=`mouseup`,ti=`mouseenter`,ni=`mouseleave`,ri=`dblclick`,ii=`resize`,ai=`scroll`,oi=`change`,si=`dppxchange`,ci=`--`,li=typeof window<`u`,ui=li?document:null,di=li?window:null,fi=li?navigator:null,pi,mi;function hi(){let e=devicePixelRatio;pi!=e&&(pi=e,mi&&Ai(oi,mi,hi),mi=matchMedia(`(min-resolution: ${pi-.001}dppx) and (max-resolution: ${pi+.001}dppx)`),ki(oi,mi,hi),di.dispatchEvent(new CustomEvent(si)))}function gi(e,t){if(t!=null){let n=e.classList;!n.contains(t)&&n.add(t)}}function _i(e,t){let n=e.classList;n.contains(t)&&n.remove(t)}function vi(e,t,n){e.style[t]=n+`px`}function yi(e,t,n,r){let i=ui.createElement(e);return t!=null&&gi(i,t),n?.insertBefore(i,r),i}function bi(e,t){return yi(`div`,e,t)}var xi=new WeakMap;function Si(e,t,n,r,i){let a=`translate(`+t+`px,`+n+`px)`;a!=xi.get(e)&&(e.style.transform=a,xi.set(e,a),t<0||n<0||t>r||n>i?gi(e,Mr):_i(e,Mr))}var Ci=new WeakMap;function wi(e,t,n){let r=t+n;r!=Ci.get(e)&&(Ci.set(e,r),e.style.background=t,e.style.borderColor=n)}var Ti=new WeakMap;function Ei(e,t,n,r){let i=t+``+n;i!=Ti.get(e)&&(Ti.set(e,i),e.style.height=n+`px`,e.style.width=t+`px`,e.style.marginLeft=r?-t/2+`px`:0,e.style.marginTop=r?-n/2+`px`:0)}var Di={passive:!0},Oi={...Di,capture:!0};function ki(e,t,n,r){t.addEventListener(e,n,r?Oi:Di)}function Ai(e,t,n,r){t.removeEventListener(e,n,Di)}li&&hi();function ji(e,t,n,r){let i;n||=0,r||=t.length-1;let a=r<=2147483647;for(;r-n>1;)i=a?n+r>>1:$i((n+r)/2),t[i]<e?n=i:r=i;return e-t[n]<=t[r]-e?n:r}function Mi(e){return(t,n,r)=>{let i=-1,a=-1;for(let a=n;a<=r;a++)if(e(t[a])){i=a;break}for(let i=r;i>=n;i--)if(e(t[i])){a=i;break}return[i,a]}}var Ni=e=>e!=null,Pi=e=>e!=null&&e>0,Fi=Mi(Ni),Ii=Mi(Pi);function Li(e,t,n,r=0,i=!1){let a=i?Ii:Fi,o=i?Pi:Ni;[t,n]=a(e,t,n);let s=e[t],c=e[t];if(t>-1)if(r==1)s=e[t],c=e[n];else if(r==-1)s=e[n],c=e[t];else for(let r=t;r<=n;r++){let t=e[r];o(t)&&(t<s?s=t:t>c&&(c=t))}return[s??ua,c??-ua]}function Ri(e,t,n,r){let i=aa(e),a=aa(t);e==t&&(i==-1?(e*=n,t/=n):(e/=n,t*=n));let o=n==10?oa:sa,s=i==1?$i:ta,c=a==1?ta:$i,l=s(o(Qi(e))),u=c(o(Qi(t))),d=ia(n,l),f=ia(n,u);return n==10&&(l<0&&(d=Ta(d,-l)),u<0&&(f=Ta(f,-u))),r||n==2?(e=d*i,t=f*a):(e=wa(e,d),t=Ca(t,f)),[e,t]}function zi(e,t,n,r){let i=Ri(e,t,n,r);return e==0&&(i[0]=0),t==0&&(i[1]=0),i}var Bi=.1,Vi={mode:3,pad:Bi},Hi={pad:0,soft:null,mode:0},Ui={min:Hi,max:Hi};function Wi(e,t,n,r){return Ia(n)?qi(e,t,n):(Hi.pad=n,Hi.soft=r?0:null,Hi.mode=r?3:0,qi(e,t,Ui))}function Gi(e,t){return e??t}function Ki(e,t,n){for(t=Gi(t,0),n=Gi(n,e.length-1);t<=n;){if(e[t]!=null)return!0;t++}return!1}function qi(e,t,n){let r=n.min,i=n.max,a=Gi(r.pad,0),o=Gi(i.pad,0),s=Gi(r.hard,-ua),c=Gi(i.hard,ua),l=Gi(r.soft,ua),u=Gi(i.soft,-ua),d=Gi(r.mode,0),f=Gi(i.mode,0),p=t-e,m=oa(p),h=ra(Qi(e),Qi(t)),g=Qi(oa(h)-m);(p<1e-24||g>10)&&(p=0,(e==0||t==0)&&(p=1e-24,d==2&&l!=ua&&(a=0),f==2&&u!=-ua&&(o=0)));let _=p||h||1e3,v=ia(10,$i(oa(_))),y=Ta(wa(e-_*(p==0?e==0?.1:1:a),v/10),24),b=e>=l&&(d==1||d==3&&y<=l||d==2&&y>=l)?l:ua,x=ra(s,y<b&&e>=b?b:na(b,y)),S=Ta(Ca(t+_*(p==0?t==0?.1:1:o),v/10),24),C=t<=u&&(f==1||f==3&&S>=u||f==2&&S<=u)?u:-ua,w=na(c,S>C&&t<=C?C:ra(C,S));return x==w&&x==0&&(w=100),[x,w]}var Ji=new Intl.NumberFormat(li?fi.language:`en-US`),Yi=e=>Ji.format(e),Xi=Math,Zi=Xi.PI,Qi=Xi.abs,$i=Xi.floor,ea=Xi.round,ta=Xi.ceil,na=Xi.min,ra=Xi.max,ia=Xi.pow,aa=Xi.sign,oa=Xi.log10,sa=Xi.log2,ca=(e,t=1)=>Xi.sinh(e)*t,la=(e,t=1)=>Xi.asinh(e/t),ua=1/0;function da(e){return(oa((e^e>>31)-(e>>31))|0)+1}function fa(e,t,n){return na(ra(e,t),n)}function pa(e){return typeof e==`function`}function Y(e){return pa(e)?e:()=>e}var ma=()=>{},ha=e=>e,ga=(e,t)=>t,_a=e=>null,va=e=>!0,ya=(e,t)=>e==t,ba=/\.\d*?(?=9{6,}|0{6,})/gm,xa=e=>{if(Na(e)||Ea.has(e))return e;let t=`${e}`,n=t.match(ba);if(n==null)return e;let r=n[0].length-1;if(t.indexOf(`e-`)!=-1){let[e,n]=t.split(`e`);return+`${xa(e)}e${n}`}return Ta(e,r)};function Sa(e,t){return xa(Ta(xa(e/t))*t)}function Ca(e,t){return xa(ta(xa(e/t))*t)}function wa(e,t){return xa($i(xa(e/t))*t)}function Ta(e,t=0){if(Na(e))return e;let n=10**t;return ea(e*n*(1+2**-52))/n}var Ea=new Map;function Da(e){return((``+e).split(`.`)[1]||``).length}function Oa(e,t,n,r){let i=[],a=r.map(Da);for(let o=t;o<n;o++){let t=Qi(o),n=Ta(ia(e,o),t);for(let s=0;s<r.length;s++){let c=e==10?+`${r[s]}e${o}`:r[s]*n,l=(o>=0?0:t)+(o>=a[s]?0:a[s]),u=e==10?c:Ta(c,l);i.push(u),Ea.set(u,l)}}return i}var ka={},Aa=[],ja=[null,null],Ma=Array.isArray,Na=Number.isInteger,Pa=e=>e===void 0;function Fa(e){return typeof e==`string`}function Ia(e){let t=!1;if(e!=null){let n=e.constructor;t=n==null||n==Object}return t}function La(e){return typeof e==`object`&&!!e}var Ra=Object.getPrototypeOf(Uint8Array),za=`__proto__`;function Ba(e,t=Ia){let n;if(Ma(e)){let r=e.find(e=>e!=null);if(Ma(r)||t(r)){n=Array(e.length);for(let r=0;r<e.length;r++)n[r]=Ba(e[r],t)}else n=e.slice()}else if(e instanceof Ra)n=e.slice();else if(t(e)){n={};for(let r in e)r!=za&&(n[r]=Ba(e[r],t))}else n=e;return n}function Va(e){let t=arguments;for(let n=1;n<t.length;n++){let r=t[n];for(let t in r)t!=za&&(Ia(e[t])?Va(e[t],Ba(r[t])):e[t]=Ba(r[t]))}return e}var Ha=0,Ua=1,Wa=2;function Ga(e,t,n){for(let r=0,i,a=-1;r<t.length;r++){let o=t[r];if(o>a){for(i=o-1;i>=0&&e[i]==null;)e[i--]=null;for(i=o+1;i<n&&e[i]==null;)e[a=i++]=null}}}function Ka(e,t){if(Ya(e)){let t=e[0].slice();for(let n=1;n<e.length;n++)t.push(...e[n].slice(1));return Xa(t[0])||(t=Ja(t)),t}let n=new Set;for(let t=0;t<e.length;t++){let r=e[t][0],i=r.length;for(let e=0;e<i;e++)n.add(r[e])}let r=[Array.from(n).sort((e,t)=>e-t)],i=r[0].length,a=new Map;for(let e=0;e<i;e++)a.set(r[0][e],e);for(let n=0;n<e.length;n++){let o=e[n],s=o[0];for(let e=1;e<o.length;e++){let c=o[e],l=Array(i).fill(void 0),u=t?t[n][e]:Ua,d=[];for(let e=0;e<c.length;e++){let t=c[e],n=a.get(s[e]);t===null?u!=Ha&&(l[n]=t,u==Wa&&d.push(n)):l[n]=t}Ga(l,d,i),r.push(l)}}return r}var qa=typeof queueMicrotask>`u`?e=>Promise.resolve().then(e):queueMicrotask;function Ja(e){let t=e[0],n=t.length,r=Array(n);for(let e=0;e<r.length;e++)r[e]=e;r.sort((e,n)=>t[e]-t[n]);let i=[];for(let t=0;t<e.length;t++){let a=e[t],o=Array(n);for(let e=0;e<n;e++)o[e]=a[r[e]];i.push(o)}return i}function Ya(e){let t=e[0][0],n=t.length;for(let r=1;r<e.length;r++){let i=e[r][0];if(i.length!=n)return!1;if(i!=t){for(let e=0;e<n;e++)if(i[e]!=t[e])return!1}}return!0}function Xa(e,t=100){let n=e.length;if(n<=1)return!0;let r=0,i=n-1;for(;r<=i&&e[r]==null;)r++;for(;i>=r&&e[i]==null;)i--;if(i<=r)return!0;let a=ra(1,$i((i-r+1)/t));for(let t=e[r],n=r+a;n<=i;n+=a){let r=e[n];if(r!=null){if(r<=t)return!1;t=r}}return!0}var Za=[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],Qa=[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`];function $a(e){return e.slice(0,3)}var eo=Qa.map($a),to={MMMM:Za,MMM:Za.map($a),WWWW:Qa,WWW:eo};function no(e){return(e<10?`0`:``)+e}function ro(e){return(e<10?`00`:e<100?`0`:``)+e}var io={YYYY:e=>e.getFullYear(),YY:e=>(e.getFullYear()+``).slice(2),MMMM:(e,t)=>t.MMMM[e.getMonth()],MMM:(e,t)=>t.MMM[e.getMonth()],MM:e=>no(e.getMonth()+1),M:e=>e.getMonth()+1,DD:e=>no(e.getDate()),D:e=>e.getDate(),WWWW:(e,t)=>t.WWWW[e.getDay()],WWW:(e,t)=>t.WWW[e.getDay()],HH:e=>no(e.getHours()),H:e=>e.getHours(),h:e=>{let t=e.getHours();return t==0?12:t>12?t-12:t},AA:e=>e.getHours()>=12?`PM`:`AM`,aa:e=>e.getHours()>=12?`pm`:`am`,a:e=>e.getHours()>=12?`p`:`a`,mm:e=>no(e.getMinutes()),m:e=>e.getMinutes(),ss:e=>no(e.getSeconds()),s:e=>e.getSeconds(),fff:e=>ro(e.getMilliseconds())};function ao(e,t){t||=to;let n=[],r=/\{([a-z]+)\}|[^{]+/gi,i;for(;i=r.exec(e);)n.push(i[0][0]==`{`?io[i[1]]:i[0]);return e=>{let r=``;for(let i=0;i<n.length;i++)r+=typeof n[i]==`string`?n[i]:n[i](e,t);return r}}var oo=new Intl.DateTimeFormat().resolvedOptions().timeZone;function so(e,t){let n;return t==`UTC`||t==`Etc/UTC`?n=new Date(+e+e.getTimezoneOffset()*6e4):t==oo?n=e:(n=new Date(e.toLocaleString(`en-US`,{timeZone:t})),n.setMilliseconds(e.getMilliseconds())),n}var co=e=>e%1==0,lo=[1,2,2.5,5],uo=Oa(10,-32,0,lo),fo=Oa(10,0,32,lo),po=fo.filter(co),mo=uo.concat(fo),ho=`{YYYY}`,go=`
2
+ {YYYY}`,_o=`{M}/{D}`,vo=`
3
+ {M}/{D}`,yo=`
4
+ {M}/{D}/{YY}`,bo=`{h}:{mm}{aa}`,xo=`
5
+ {h}:{mm}{aa}`,So=`:{ss}`,Co=null;function wo(e){let t=e*1e3,n=t*60,r=n*60,i=r*24,a=i*30,o=i*365,s=(e==1?Oa(10,0,3,lo).filter(co):Oa(10,-3,0,lo)).concat([t,t*5,t*10,t*15,t*30,n,n*5,n*10,n*15,n*30,r,r*2,r*3,r*4,r*6,r*8,r*12,i,i*2,i*3,i*4,i*5,i*6,i*7,i*8,i*9,i*10,i*15,a,a*2,a*3,a*4,a*6,o,o*2,o*5,o*10,o*25,o*50,o*100]),c=[[o,ho,Co,Co,Co,Co,Co,Co,1],[i*28,`{MMM}`,go,Co,Co,Co,Co,Co,1],[i,_o,go,Co,Co,Co,Co,Co,1],[r,`{h}{aa}`,yo,Co,vo,Co,Co,Co,1],[n,bo,yo,Co,vo,Co,Co,Co,1],[t,So,`
6
+ {M}/{D}/{YY} {h}:{mm}{aa}`,Co,`
7
+ {M}/{D} {h}:{mm}{aa}`,Co,xo,Co,1],[e,`:{ss}.{fff}`,`
8
+ {M}/{D}/{YY} {h}:{mm}{aa}`,Co,`
9
+ {M}/{D} {h}:{mm}{aa}`,Co,xo,Co,1]];function l(t){return(s,c,l,u,d,f)=>{let p=[],m=d>=o,h=d>=a&&d<o,g=t(l),_=Ta(g*e,3),v=Po(g.getFullYear(),m?0:g.getMonth(),h||m?1:g.getDate()),y=Ta(v*e,3);if(h||m){let n=h?d/a:0,r=m?d/o:0,i=_==y?_:Ta(Po(v.getFullYear()+r,v.getMonth()+n,1)*e,3),s=new Date(ea(i/e)),c=s.getFullYear(),l=s.getMonth();for(let a=0;i<=u;a++){let o=Po(c+r*a,l+n*a,1),s=o-t(Ta(o*e,3));i=Ta((+o+s)*e,3),i<=u&&p.push(i)}}else{let a=d>=i?i:d,o=y+($i(l)-$i(_))+Ca(_-y,a);p.push(o);let m=t(o),h=m.getHours()+m.getMinutes()/n+m.getSeconds()/r,g=d/r,v=f/s.axes[c]._space;for(;o=Ta(o+d,e==1?0:3),!(o>u);)if(g>1){let e=$i(Ta(h+g,6))%24,n=t(o).getHours()-e;n>1&&(n=-1),o-=n*r,h=(h+g)%24;let i=p[p.length-1];Ta((o-i)/d,3)*v>=.7&&p.push(o)}else p.push(o)}return p}}return[s,c,l]}var[To,Eo,Do]=wo(1),[Oo,ko,Ao]=wo(.001);Oa(2,-53,53,[1]);function jo(e,t){return e.map(e=>e.map((n,r)=>r==0||r==8||n==null?n:t(r==1||e[8]==0?n:e[1]+n)))}function Mo(e,t){return(n,r,i,a,o)=>{let s=t.find(e=>o>=e[0])||t[t.length-1],c,l,u,d,f,p;return r.map(t=>{let n=e(t),r=n.getFullYear(),i=n.getMonth(),a=n.getDate(),o=n.getHours(),m=n.getMinutes(),h=n.getSeconds(),g=r!=c&&s[2]||i!=l&&s[3]||a!=u&&s[4]||o!=d&&s[5]||m!=f&&s[6]||h!=p&&s[7]||s[1];return c=r,l=i,u=a,d=o,f=m,p=h,g(n)})}}function No(e,t){let n=ao(t);return(t,r,i,a,o)=>r.map(t=>n(e(t)))}function Po(e,t,n){return new Date(e,t,n)}function Fo(e,t){return t(e)}var Io=`{YYYY}-{MM}-{DD} {h}:{mm}{aa}`;function Lo(e,t){return(n,r,i,a)=>a==null?ci:t(e(r))}function Ro(e,t){let n=e.series[t];return n.width?n.stroke(e,t):n.points.width?n.points.stroke(e,t):null}function zo(e,t){return e.series[t].fill(e,t)}var Bo={show:!0,live:!0,isolate:!1,mount:ma,markers:{show:!0,width:2,stroke:Ro,fill:zo,dash:`solid`},idx:null,idxs:null,values:[]};function Vo(e,t){let n=e.cursor.points,r=bi(),i=n.size(e,t);vi(r,Wr,i),vi(r,Gr,i);let a=i/-2;vi(r,`marginLeft`,a),vi(r,`marginTop`,a);let o=n.width(e,t,i);return o&&vi(r,`borderWidth`,o),r}function Ho(e,t){let n=e.series[t].points;return n._fill||n._stroke}function Uo(e,t){let n=e.series[t].points;return n._stroke||n._fill}function Wo(e,t){return e.series[t].points.size}var Go=[0,0];function Ko(e,t,n){return Go[0]=t,Go[1]=n,Go}function qo(e,t,n,r=!0){return e=>{e.button==0&&(!r||e.target==t)&&n(e)}}function Jo(e,t,n,r=!0){return e=>{(!r||e.target==t)&&n(e)}}var Yo={show:!0,x:!0,y:!0,lock:!1,move:Ko,points:{one:!1,show:Vo,size:Wo,width:0,stroke:Uo,fill:Ho},bind:{mousedown:qo,mouseup:qo,click:qo,dblclick:qo,mousemove:Jo,mouseleave:Jo,mouseenter:Jo},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,click:(e,t)=>{t.stopPropagation(),t.stopImmediatePropagation()},_x:!1,_y:!1},focus:{dist:(e,t,n,r,i)=>r-i,prox:-1,bias:0},hover:{skip:[void 0],prox:null,bias:0},left:-10,top:-10,idx:null,dataIdx:null,idxs:null,event:null},Xo={show:!0,stroke:`rgba(0,0,0,0.07)`,width:2},Zo=Va({},Xo,{filter:ga}),Qo=Va({},Zo,{size:10}),$o=Va({},Xo,{show:!1}),es=`12px system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"`,ts=`bold 12px system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"`,ns=1.5,rs={show:!0,scale:`x`,stroke:Xr,space:50,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:ts,side:2,grid:Zo,ticks:Qo,border:$o,font:es,lineGap:ns,rotate:0},is=`Value`,as=`Time`,os={show:!0,scale:`x`,auto:!1,sorted:1,min:ua,max:-1/0,idxs:[]};function ss(e,t,n,r,i){return t.map(e=>e==null?``:Yi(e))}function cs(e,t,n,r,i,a,o){let s=[],c=Ea.get(i)||0;n=o?n:Ta(Ca(n,i),c);for(let e=n;e<=r;e=Ta(e+i,c))s.push(Object.is(e,-0)?0:e);return s}function ls(e,t,n,r,i,a,o){let s=[],c=e.scales[e.axes[t].scale].log;i=ia(c,$i((c==10?oa:sa)(n))),c==10&&(i=mo[ji(i,mo)]);let l=n,u=i*c;c==10&&(u=mo[ji(u,mo)]);do s.push(l),l+=i,c==10&&!Ea.has(l)&&(l=Ta(l,Ea.get(i))),l>=u&&(i=l,u=i*c,c==10&&(u=mo[ji(u,mo)]));while(l<=r);return s}function us(e,t,n,r,i,a,o){let s=e.scales[e.axes[t].scale].asinh,c=r>s?ls(e,t,ra(s,n),r,i):[s],l=r>=0&&n<=0?[0]:[];return(n<-s?ls(e,t,ra(s,-r),-n,i):[s]).reverse().map(e=>-e).concat(l,c)}var ds=/./,fs=/[12357]/,ps=/[125]/,ms=/1/,hs=(e,t,n,r)=>e.map((e,i)=>t==4&&e==0||i%r==0&&n.test(e.toExponential()[+(e<0)])?e:null);function gs(e,t,n,r,i){let a=e.axes[n],o=a.scale,s=e.scales[o],c=e.valToPos,l=a._space,u=c(10,o),d=c(9,o)-u>=l?ds:c(7,o)-u>=l?fs:c(5,o)-u>=l?ps:ms;if(d==ms){let e=Qi(c(1,o)-u);if(e<l)return hs(t.slice().reverse(),s.distr,d,ta(l/e)).reverse()}return hs(t,s.distr,d,1)}function _s(e,t,n,r,i){let a=e.axes[n],o=a.scale,s=a._space,c=e.valToPos,l=Qi(c(1,o)-c(2,o));return l<s?hs(t.slice().reverse(),3,ds,ta(s/l)).reverse():t}function vs(e,t,n,r){return r==null?ci:t==null?``:Yi(t)}var ys={show:!0,scale:`y`,stroke:Xr,space:30,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:ts,side:3,grid:Zo,ticks:Qo,border:$o,font:es,lineGap:ns,rotate:0};function bs(e,t){return Ta((3+(e||1)*2)*t,3)}function xs(e,t){let{scale:n,idxs:r}=e.series[0],i=e._data[0],a=e.valToPos(i[r[0]],n,!0),o=Qi(e.valToPos(i[r[1]],n,!0)-a)/(e.series[t].points.space*pi);return r[1]-r[0]<=o}var Ss={scale:null,auto:!0,sorted:0,min:ua,max:-1/0},Cs=(e,t,n,r,i)=>i,ws={show:!0,auto:!0,sorted:0,gaps:Cs,alpha:1,facets:[Va({},Ss,{scale:`x`}),Va({},Ss,{scale:`y`})]},Ts={scale:`y`,auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:Cs,alpha:1,points:{show:xs,filter:null},values:null,min:ua,max:-1/0,idxs:[],path:null,clip:null};function Es(e,t,n,r,i){return n/10}var Ds={time:Cr,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},Os=Va({},Ds,{time:!1,ori:1}),ks={};function As(e,t){let n=ks[e];return n||(n={key:e,plots:[],sub(e){n.plots.push(e)},unsub(e){n.plots=n.plots.filter(t=>t!=e)},pub(e,t,r,i,a,o,s){for(let c=0;c<n.plots.length;c++)n.plots[c]!=t&&n.plots[c].pub(e,t,r,i,a,o,s)}},e!=null&&(ks[e]=n)),n}var js=1,Ms=2;function Ns(e,t,n){let r=e.mode,i=e.series[t],a=r==2?e._data[t]:e._data,o=e.scales,s=e.bbox,c=a[0],l=r==2?a[1]:a[t],u=r==2?o[i.facets[0].scale]:o[e.series[0].scale],d=r==2?o[i.facets[1].scale]:o[i.scale],f=s.left,p=s.top,m=s.width,h=s.height,g=e.valToPosH,_=e.valToPosV;return u.ori==0?n(i,c,l,u,d,g,_,f,p,m,h,Hs,Ws,Ks,Js,Xs):n(i,c,l,u,d,_,g,p,f,h,m,Us,Gs,qs,Ys,Zs)}function Ps(e,t){let n=0,r=0,i=Gi(e.bands,Aa);for(let e=0;e<i.length;e++){let a=i[e];a.series[0]==t?n=a.dir:a.series[1]==t&&(a.dir==1?r|=1:r|=2)}return[n,r==1?-1:r==2?1:r==3?2:0]}function Fs(e,t,n,r,i){let a=e.mode,o=e.series[t],s=a==2?o.facets[1].scale:o.scale,c=e.scales[s];return i==-1?c.min:i==1?c.max:c.distr==3?c.dir==1?c.min:c.max:0}function Is(e,t,n,r,i,a){return Ns(e,t,(e,t,o,s,c,l,u,d,f,p,m)=>{let h=e.pxRound,g=s.dir*(s.ori==0?1:-1),_=s.ori==0?Ws:Gs,v,y;g==1?(v=n,y=r):(v=r,y=n);let b=h(l(t[v],s,p,d)),x=h(u(o[v],c,m,f)),S=h(l(t[y],s,p,d)),C=h(u(a==1?c.max:c.min,c,m,f)),w=new Path2D(i);return _(w,S,C),_(w,b,C),_(w,b,x),w})}function Ls(e,t,n,r,i,a){let o=null;if(e.length>0){o=new Path2D;let s=t==0?Ks:qs,c=n;for(let t=0;t<e.length;t++){let n=e[t];if(n[1]>n[0]){let e=n[0]-c;e>0&&s(o,c,r,e,r+a),c=n[1]}}let l=n+i-c;l>0&&s(o,c,r-10/2,l,r+a+10)}return o}function Rs(e,t,n){let r=e[e.length-1];r&&r[0]==t?r[1]=n:e.push([t,n])}function zs(e,t,n,r,i,a,o){let s=[],c=e.length;for(let l=i==1?n:r;l>=n&&l<=r;l+=i)if(t[l]===null){let u=l,d=l;if(i==1)for(;++l<=r&&t[l]===null;)d=l;else for(;--l>=n&&t[l]===null;)d=l;let f=a(e[u]),p=d==u?f:a(e[d]),m=u-i;f=o<=0&&m>=0&&m<c?a(e[m]):f;let h=d+i;p=o>=0&&h>=0&&h<c?a(e[h]):p,p>=f&&s.push([f,p])}return s}function Bs(e){return e==0?ha:e==1?ea:t=>Sa(t,e)}function Vs(e){let t=e==0?Hs:Us,n=e==0?(e,t,n,r,i,a)=>{e.arcTo(t,n,r,i,a)}:(e,t,n,r,i,a)=>{e.arcTo(n,t,i,r,a)},r=e==0?(e,t,n,r,i)=>{e.rect(t,n,r,i)}:(e,t,n,r,i)=>{e.rect(n,t,i,r)};return(e,i,a,o,s,c=0,l=0)=>{c==0&&l==0?r(e,i,a,o,s):(c=na(c,o/2,s/2),l=na(l,o/2,s/2),t(e,i+c,a),n(e,i+o,a,i+o,a+s,c),n(e,i+o,a+s,i,a+s,l),n(e,i,a+s,i,a,l),n(e,i,a,i+o,a,c),e.closePath())}}var Hs=(e,t,n)=>{e.moveTo(t,n)},Us=(e,t,n)=>{e.moveTo(n,t)},Ws=(e,t,n)=>{e.lineTo(t,n)},Gs=(e,t,n)=>{e.lineTo(n,t)},Ks=Vs(0),qs=Vs(1),Js=(e,t,n,r,i,a)=>{e.arc(t,n,r,i,a)},Ys=(e,t,n,r,i,a)=>{e.arc(n,t,r,i,a)},Xs=(e,t,n,r,i,a,o)=>{e.bezierCurveTo(t,n,r,i,a,o)},Zs=(e,t,n,r,i,a,o)=>{e.bezierCurveTo(n,t,i,r,o,a)};function Qs(e){return(e,t,n,r,i)=>Ns(e,t,(t,a,o,s,c,l,u,d,f,p,m)=>{let{pxRound:h,points:g}=t,_,v;s.ori==0?(_=Hs,v=Js):(_=Us,v=Ys);let y=Ta(g.width*pi,3),b=(g.size-g.width)/2*pi,x=Ta(b*2,3),S=new Path2D,C=new Path2D,{left:w,top:T,width:E,height:D}=e.bbox;Ks(C,w-x,T-x,E+x*2,D+x*2);let O=e=>{if(o[e]!=null){let t=h(l(a[e],s,p,d)),n=h(u(o[e],c,m,f));_(S,t+b,n),v(S,t,n,b,0,Zi*2)}};if(i)i.forEach(O);else for(let e=n;e<=r;e++)O(e);return{stroke:y>0?S:null,fill:S,clip:C,flags:3}})}function $s(e){return(t,n,r,i,a,o)=>{r!=i&&(a!=r&&o!=r&&e(t,n,r),a!=i&&o!=i&&e(t,n,i),e(t,n,o))}}var ec=$s(Ws),tc=$s(Gs);function nc(e){let t=Gi(e?.alignGaps,0);return(e,n,r,i)=>Ns(e,n,(a,o,s,c,l,u,d,f,p,m,h)=>{[r,i]=Fi(s,r,i);let g=a.pxRound,_=e=>g(u(e,c,m,f)),v=e=>g(d(e,l,h,p)),y,b;c.ori==0?(y=Ws,b=ec):(y=Gs,b=tc);let x=c.dir*(c.ori==0?1:-1),S={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:js},C=S.stroke,w=!1;if(i-r>=m*4){let t=t=>e.posToVal(t,c.key,!0),n=null,a=null,l,u,d=_(o[x==1?r:i]),f=_(o[r]),p=_(o[i]),m=t(x==1?f+1:p-1);for(let e=x==1?r:i;e>=r&&e<=i;e+=x){let r=o[e],i=(x==1?r<m:r>m)?d:_(r),c=s[e];i==d?c==null?c===null&&(w=!0):(u=c,n==null?(y(C,i,v(u)),l=n=a=u):u<n?n=u:u>a&&(a=u)):(n!=null&&b(C,d,v(n),v(a),v(l),v(u)),c==null?(n=a=null,c===null&&(w=!0)):(u=c,y(C,i,v(u)),n=a=l=u),d=i,m=t(d+x))}n!=null&&n!=a&&d!=null&&b(C,d,v(n),v(a),v(l),v(u))}else for(let e=x==1?r:i;e>=r&&e<=i;e+=x){let t=s[e];t===null?w=!0:t!=null&&y(C,_(o[e]),v(t))}let[T,E]=Ps(e,n);if(a.fill!=null||T!=0){let t=S.fill=new Path2D(C),s=v(a.fillTo(e,n,a.min,a.max,T)),c=_(o[r]),l=_(o[i]);x==-1&&([l,c]=[c,l]),y(t,l,s),y(t,c,s)}if(!a.spanGaps){let l=[];w&&l.push(...zs(o,s,r,i,x,_,t)),S.gaps=l=a.gaps(e,n,r,i,l),S.clip=Ls(l,c.ori,f,p,m,h)}return E!=0&&(S.band=E==2?[Is(e,n,r,i,C,-1),Is(e,n,r,i,C,1)]:Is(e,n,r,i,C,E)),S})}function rc(e){let t=Gi(e.align,1),n=Gi(e.ascDesc,!1),r=Gi(e.alignGaps,0),i=Gi(e.extend,!1);return(e,a,o,s)=>Ns(e,a,(c,l,u,d,f,p,m,h,g,_,v)=>{[o,s]=Fi(u,o,s);let y=c.pxRound,{left:b,width:x}=e.bbox,S=e=>y(p(e,d,_,h)),C=e=>y(m(e,f,v,g)),w=d.ori==0?Ws:Gs,T={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:js},E=T.stroke,D=d.dir*(d.ori==0?1:-1),O=C(u[D==1?o:s]),k=S(l[D==1?o:s]),ee=k,A=k;i&&t==-1&&(A=b,w(E,A,O)),w(E,k,O);for(let e=D==1?o:s;e>=o&&e<=s;e+=D){let n=u[e];if(n==null)continue;let r=S(l[e]),i=C(n);t==1?w(E,r,O):w(E,ee,i),w(E,r,i),O=i,ee=r}let j=ee;i&&t==1&&(j=b+x,w(E,j,O));let[M,te]=Ps(e,a);if(c.fill!=null||M!=0){let t=T.fill=new Path2D(E),n=C(c.fillTo(e,a,c.min,c.max,M));w(t,j,n),w(t,A,n)}if(!c.spanGaps){let i=[];i.push(...zs(l,u,o,s,D,S,r));let f=c.width*pi/2,p=n||t==1?f:-f,m=n||t==-1?-f:f;i.forEach(e=>{e[0]+=p,e[1]+=m}),T.gaps=i=c.gaps(e,a,o,s,i),T.clip=Ls(i,d.ori,h,g,_,v)}return te!=0&&(T.band=te==2?[Is(e,a,o,s,E,-1),Is(e,a,o,s,E,1)]:Is(e,a,o,s,E,te)),T})}function ic(e,t,n,r,i,a,o=ua){if(e.length>1){let s=null;for(let c=0,l=1/0;c<e.length;c++)if(t[c]!==void 0){if(s!=null){let t=Qi(e[c]-e[s]);t<l&&(l=t,o=Qi(n(e[c],r,i,a)-n(e[s],r,i,a)))}s=c}}return o}function ac(e){e||=ka;let t=Gi(e.size,[.6,ua,1]),n=e.align||0,r=e.gap||0,i=e.radius;i=i==null?[0,0]:typeof i==`number`?[i,0]:i;let a=Y(i),o=1-t[0],s=Gi(t[1],ua),c=Gi(t[2],1),l=Gi(e.disp,ka),u=Gi(e.each,e=>{}),{fill:d,stroke:f}=l;return(e,t,i,p)=>Ns(e,t,(m,h,g,_,v,y,b,x,S,C,w)=>{let T=m.pxRound,E=n,D=r*pi,O=s*pi,k=c*pi,ee,A;_.ori==0?[ee,A]=a(e,t):[A,ee]=a(e,t);let j=_.dir*(_.ori==0?1:-1),M=_.ori==0?Ks:qs,te=_.ori==0?u:(e,t,n,r,i,a,o)=>{u(e,t,n,i,r,o,a)},N=Gi(e.bands,Aa).find(e=>e.series[0]==t),P=N==null?0:N.dir,F=m.fillTo(e,t,m.min,m.max,P),I=T(b(F,v,w,S)),L,ne,R,z=C,B=T(m.width*pi),re=!1,V=null,H=null,ie=null,ae=null;d!=null&&(B==0||f!=null)&&(re=!0,V=d.values(e,t,i,p),H=new Map,new Set(V).forEach(e=>{e!=null&&H.set(e,new Path2D)}),B>0&&(ie=f.values(e,t,i,p),ae=new Map,new Set(ie).forEach(e=>{e!=null&&ae.set(e,new Path2D)})));let{x0:oe,size:se}=l;if(oe!=null&&se!=null){E=1,h=oe.values(e,t,i,p),oe.unit==2&&(h=h.map(t=>e.posToVal(x+t*C,_.key,!0)));let n=se.values(e,t,i,p);ne=se.unit==2?n[0]*C:y(n[0],_,C,x)-y(0,_,C,x),z=ic(h,g,y,_,C,x,z),R=z-ne+D}else z=ic(h,g,y,_,C,x,z),R=z*o+D,ne=z-R;R<1&&(R=0),B>=ne/2&&(B=0),R<5&&(T=ha);let ce=R>0,U=z-R-(ce?B:0);ne=T(fa(U,k,O)),L=(E==0?ne/2:E==j?0:ne)-E*j*((E==0?D/2:0)+(ce?B/2:0));let le={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:0},ue=re?null:new Path2D,de=null;if(N!=null)de=e.data[N.series[1]];else{let{y0:n,y1:r}=l;n!=null&&r!=null&&(g=r.values(e,t,i,p),de=n.values(e,t,i,p))}let fe=ee*ne,pe=A*ne;for(let n=j==1?i:p;n>=i&&n<=p;n+=j){let r=g[n];if(r==null)continue;if(de!=null){let e=de[n]??0;if(r-e==0)continue;I=b(e,v,w,S)}let i=y(_.distr!=2||l!=null?h[n]:n,_,C,x),a=b(Gi(r,F),v,w,S),o=T(i-L),s=T(ra(a,I)),c=T(na(a,I)),u=s-c;if(r!=null){let i=r<0?pe:fe,a=r<0?fe:pe;re?(B>0&&ie[n]!=null&&M(ae.get(ie[n]),o,c+$i(B/2),ne,ra(0,u-B),i,a),V[n]!=null&&M(H.get(V[n]),o,c+$i(B/2),ne,ra(0,u-B),i,a)):M(ue,o,c+$i(B/2),ne,ra(0,u-B),i,a),te(e,t,n,o-B/2,c,ne+B,u)}}return B>0?le.stroke=re?ae:ue:re||(le._fill=m.width==0?m._fill:m._stroke??m._fill,le.width=0),le.fill=re?H:ue,le})}function oc(e,t){let n=Gi(t?.alignGaps,0);return(t,r,i,a)=>Ns(t,r,(o,s,c,l,u,d,f,p,m,h,g)=>{[i,a]=Fi(c,i,a);let _=o.pxRound,v=e=>_(d(e,l,h,p)),y=e=>_(f(e,u,g,m)),b,x,S;l.ori==0?(b=Hs,S=Ws,x=Xs):(b=Us,S=Gs,x=Zs);let C=l.dir*(l.ori==0?1:-1),w=v(s[C==1?i:a]),T=w,E=[],D=[];for(let e=C==1?i:a;e>=i&&e<=a;e+=C)if(c[e]!=null){let t=s[e],n=v(t);E.push(T=n),D.push(y(c[e]))}let O={stroke:e(E,D,b,S,x,_),fill:null,clip:null,band:null,gaps:null,flags:js},k=O.stroke,[ee,A]=Ps(t,r);if(o.fill!=null||ee!=0){let e=O.fill=new Path2D(k),n=y(o.fillTo(t,r,o.min,o.max,ee));S(e,T,n),S(e,w,n)}if(!o.spanGaps){let e=[];e.push(...zs(s,c,i,a,C,v,n)),O.gaps=e=o.gaps(t,r,i,a,e),O.clip=Ls(e,l.ori,p,m,h,g)}return A!=0&&(O.band=A==2?[Is(t,r,i,a,k,-1),Is(t,r,i,a,k,1)]:Is(t,r,i,a,k,A)),O})}function sc(e){return oc(cc,e)}function cc(e,t,n,r,i,a){let o=e.length;if(o<2)return null;let s=new Path2D;if(n(s,e[0],t[0]),o==2)r(s,e[1],t[1]);else{let n=Array(o),r=Array(o-1),a=Array(o-1),c=Array(o-1);for(let n=0;n<o-1;n++)a[n]=t[n+1]-t[n],c[n]=e[n+1]-e[n],r[n]=a[n]/c[n];n[0]=r[0];for(let e=1;e<o-1;e++)r[e]===0||r[e-1]===0||r[e-1]>0!=r[e]>0?n[e]=0:(n[e]=3*(c[e-1]+c[e])/((2*c[e]+c[e-1])/r[e-1]+(c[e]+2*c[e-1])/r[e]),isFinite(n[e])||(n[e]=0));n[o-1]=r[o-2];for(let r=0;r<o-1;r++)i(s,e[r]+c[r]/3,t[r]+n[r]*c[r]/3,e[r+1]-c[r]/3,t[r+1]-n[r+1]*c[r]/3,e[r+1],t[r+1])}return s}var lc=new Set;function uc(){for(let e of lc)e.syncRect(!0)}li&&(ki(ii,di,uc),ki(ai,di,uc,!0),ki(si,di,()=>{Ec.pxRatio=pi}));var dc=nc(),fc=Qs();function pc(e,t,n,r){return(r?[e[0],e[1]].concat(e.slice(2)):[e[0]].concat(e.slice(1))).map((e,r)=>hc(e,r,t,n))}function mc(e,t){return e.map((e,n)=>n==0?{}:Va({},t,e))}function hc(e,t,n,r){return Va({},t==0?n:r,e)}function gc(e,t,n){return t==null?ja:[t,n]}var _c=gc;function vc(e,t,n){return t==null?ja:Wi(t,n,Bi,!0)}function yc(e,t,n,r){return t==null?ja:Ri(t,n,e.scales[r].log,!1)}var bc=yc;function xc(e,t,n,r){return t==null?ja:zi(t,n,e.scales[r].log,!1)}var Sc=xc;function Cc(e,t,n,r,i){let a=ra(da(e),da(t)),o=t-e,s=ji(i/r*o,n);do{let e=n[s],t=r*e/o;if(t>=i&&a+(e<5?Ea.get(e):0)<=17)return[e,t]}while(++s<n.length);return[0,0]}function wc(e){let t,n;return e=e.replace(/(\d+)px/,(e,r)=>(t=ea((n=+r)*pi))+`px`),[e,t,n]}function Tc(e){e.show&&[e.font,e.labelFont].forEach(e=>{let t=Ta(e[2]*pi,1);e[0]=e[0].replace(/[0-9.]+px/,t+`px`),e[1]=t})}function Ec(e,t,n){let r={mode:Gi(e.mode,1)},i=r.mode;function a(e,t,n,r){let i=t.valToPct(e);return r+n*(t.dir==-1?1-i:i)}function o(e,t,n,r){let i=t.valToPct(e);return r+n*(t.dir==-1?i:1-i)}function s(e,t,n,r){return t.ori==0?a(e,t,n,r):o(e,t,n,r)}r.valToPosH=a,r.valToPosV=o;let c=!1;r.status=0;let l=r.root=bi(wr);if(e.id!=null&&(l.id=e.id),gi(l,e.class),e.title){let t=bi(Dr,l);t.textContent=e.title}let u=yi(`canvas`),d=r.ctx=u.getContext(`2d`),f=bi(Or,l);ki(`click`,f,e=>{e.target===m&&($t!=Yt||en!=Xt)&&nn.click(r,e)},!0);let p=r.under=bi(kr,f);f.appendChild(u);let m=r.over=bi(Ar,f);e=Ba(e);let h=+Gi(e.pxAlign,1),g=Bs(h);(e.plugins||[]).forEach(t=>{t.opts&&(e=t.opts(r,e)||e)});let _=e.ms||.001,v=r.series=i==1?pc(e.series||[],os,Ts,!1):mc(e.series||[null],ws),y=r.axes=pc(e.axes||[],rs,ys,!0),b=r.scales={},x=r.bands=e.bands||[];x.forEach(e=>{e.fill=Y(e.fill||null),e.dir=Gi(e.dir,-1)});let S=i==2?v[1].facets[0].scale:v[0].scale,C={axes:Nt,series:St},w=(e.drawOrder||[`axes`,`series`]).map(e=>C[e]);function T(e){let t=e.distr==3?t=>oa(t>0?t:e.clamp(r,t,e.min,e.max,e.key)):e.distr==4?t=>la(t,e.asinh):e.distr==100?t=>e.fwd(t):e=>e;return n=>{let r=t(n),{_min:i,_max:a}=e,o=a-i;return(r-i)/o}}function E(t){let n=b[t];if(n==null){let r=(e.scales||ka)[t]||ka;if(r.from!=null){E(r.from);let e=Va({},b[r.from],r,{key:t});e.valToPct=T(e),b[t]=e}else{n=b[t]=Va({},t==S?Ds:Os,r),n.key=t;let e=n.time,a=n.range,o=Ma(a);if((t!=S||i==2&&!e)&&(o&&(a[0]==null||a[1]==null)&&(a={min:a[0]==null?Vi:{mode:1,hard:a[0],soft:a[0]},max:a[1]==null?Vi:{mode:1,hard:a[1],soft:a[1]}},o=!1),!o&&Ia(a))){let e=a;a=(t,n,r)=>n==null?ja:Wi(n,r,e)}n.range=Y(a||(e?_c:t==S?n.distr==3?bc:n.distr==4?Sc:gc:n.distr==3?yc:n.distr==4?xc:vc)),n.auto=Y(o?!1:n.auto),n.clamp=Y(n.clamp||Es),n._min=n._max=null,n.valToPct=T(n)}}}E(`x`),E(`y`),i==1&&v.forEach(e=>{E(e.scale)}),y.forEach(e=>{E(e.scale)});for(let t in e.scales)E(t);let D=b[S],O=D.distr,k,ee;D.ori==0?(gi(l,Tr),k=a,ee=o):(gi(l,Er),k=o,ee=a);let A={};for(let e in b){let t=b[e];(t.min!=null||t.max!=null)&&(A[e]={min:t.min,max:t.max},t.min=t.max=null)}let j=e.tzDate||(e=>new Date(ea(e/_))),M=e.fmtDate||ao,te=_==1?Do(j):Ao(j),N=Mo(j,jo(_==1?Eo:ko,M)),P=Lo(j,Fo(Io,M)),F=[],I=r.legend=Va({},Bo,e.legend),L=r.cursor=Va({},Yo,{drag:{y:i==2}},e.cursor),ne=I.show,R=L.show,z=I.markers;I.idxs=F,z.width=Y(z.width),z.dash=Y(z.dash),z.stroke=Y(z.stroke),z.fill=Y(z.fill);let B,re,V,H=[],ie=[],ae,oe=!1,se={};if(I.live){let e=v[1]?v[1].values:null;oe=e!=null,ae=oe?e(r,1,0):{_:0};for(let e in ae)se[e]=ci}if(ne)if(B=yi(`table`,Lr,l),V=yi(`tbody`,null,B),I.mount(r,B),oe){re=yi(`thead`,null,B,V);let e=yi(`tr`,null,re);for(var ce in yi(`th`,null,e),ae)yi(`th`,Hr,e).textContent=ce}else gi(B,zr),I.live&&gi(B,Rr);let U={show:!0},le={show:!1};function ue(e,t){if(t==0&&(oe||!I.live||i==2))return ja;let n=[],a=yi(`tr`,Br,V,V.childNodes[t]);gi(a,e.class),e.show||gi(a,Mr);let o=yi(`th`,null,a);if(z.show){let e=bi(Vr,o);if(t>0){let n=z.width(r,t);n&&(e.style.border=n+`px `+z.dash(r,t)+` `+z.stroke(r,t)),e.style.background=z.fill(r,t)}}let s=bi(Hr,o);for(var c in e.label instanceof HTMLElement?s.appendChild(e.label):s.textContent=e.label,t>0&&(z.show||(s.style.color=e.width>0?z.stroke(r,t):z.fill(r,t)),fe(`click`,o,t=>{if(L._lock)return;Fe(t);let n=v.indexOf(e);if((t.ctrlKey||t.metaKey)!=I.isolate){let e=v.some((e,t)=>t>0&&t!=n&&e.show);v.forEach((t,r)=>{r>0&&dn(r,e?r==n?U:le:U,!0,Xn.setSeries)})}else dn(n,{show:!e.show},!0,Xn.setSeries)},!1),Re&&fe(ti,o,t=>{L._lock||(Fe(t),dn(v.indexOf(e),yn,!0,Xn.setSeries))},!1)),ae){let e=yi(`td`,Ur,a);e.textContent=`--`,n.push(e)}return[a,n]}let de=new Map;function fe(e,t,n,i=!0){let a=de.get(t)||{},o=L.bind[e](r,t,n,i);o&&(ki(e,t,a[e]=o),de.set(t,a))}function pe(e,t,n){let r=de.get(t)||{};for(let n in r)(e==null||n==e)&&(Ai(n,t,r[n]),delete r[n]);e??de.delete(t)}let me=0,he=0,W=0,G=0,ge=0,_e=0,ve=ge,ye=_e,be=W,K=G,xe=0,q=0,Se=0,Ce=0;r.bbox={};let we=!1,Te=!1,Ee=!1,De=!1,Oe=!1,J=!1;function ke(e,t,n){(n||e!=r.width||t!=r.height)&&Ae(e,t),Pt(!1),Ee=!0,Te=!0,zt()}function Ae(e,t){r.width=me=W=e,r.height=he=G=t,ge=_e=0,Ne(),Pe();let n=r.bbox;xe=n.left=Sa(ge*pi,.5),q=n.top=Sa(_e*pi,.5),Se=n.width=Sa(W*pi,.5),Ce=n.height=Sa(G*pi,.5)}function je(){let e=!1,t=0;for(;!e;){t++;let n=jt(t),i=Mt(t);e=t==3||n&&i,e||(Ae(r.width,r.height),Te=!0)}}function Me({width:e,height:t}){ke(e,t)}r.setSize=Me;function Ne(){let e=!1,t=!1,n=!1,r=!1;y.forEach((i,a)=>{if(i.show&&i._show){let{side:a,_size:o}=i,s=a%2,c=o+(i.label==null?0:i.labelSize);c>0&&(s?(W-=c,a==3?(ge+=c,r=!0):n=!0):(G-=c,a==0?(_e+=c,e=!0):t=!0))}}),qe[0]=e,qe[1]=n,qe[2]=t,qe[3]=r,W-=Ze[1]+Ze[3],ge+=Ze[3],G-=Ze[2]+Ze[0],_e+=Ze[0]}function Pe(){let e=ge+W,t=_e+G,n=ge,r=_e;function i(i,a){switch(i){case 1:return e+=a,e-a;case 2:return t+=a,t-a;case 3:return n-=a,n+a;case 0:return r-=a,r+a}}y.forEach((e,t)=>{if(e.show&&e._show){let t=e.side;e._pos=i(t,e._size),e.label!=null&&(e._lpos=i(t,e.labelSize))}})}if(L.dataIdx==null){let e=L.hover,n=e.skip=new Set(e.skip??[]);n.add(void 0);let r=e.prox=Y(e.prox),i=e.bias??=0;L.dataIdx=(e,a,o,s)=>{if(a==0)return o;let c=o,l=r(e,a,o,s)??ua,u=l>=0&&l<ua,d=D.ori==0?W:G,f=L.left,p=t[0],m=t[a];if(n.has(m[o])){c=null;let e=null,t=null,r;if(i==0||i==-1)for(r=o;e==null&&r-- >0;)n.has(m[r])||(e=r);if(i==0||i==1)for(r=o;t==null&&r++<m.length;)n.has(m[r])||(t=r);if(e!=null||t!=null)if(u){let n=e==null?-1/0:k(p[e],D,d,0),r=t==null?1/0:k(p[t],D,d,0),i=f-n,a=r-f;i<=a?i<=l&&(c=e):a<=l&&(c=t)}else c=t==null?e:e==null?t:o-e<=t-o?e:t}else u&&Qi(f-k(p[o],D,d,0))>l&&(c=null);return c}}let Fe=e=>{L.event=e};L.idxs=F,L._lock=!1;let Ie=L.points;Ie.show=Y(Ie.show),Ie.size=Y(Ie.size),Ie.stroke=Y(Ie.stroke),Ie.width=Y(Ie.width),Ie.fill=Y(Ie.fill);let Le=r.focus=Va({},e.focus||{alpha:.3},L.focus),Re=Le.prox>=0,ze=Re&&Ie.one,Be=[],Ve=[],He=[];function Ue(e,t){let n=Ie.show(r,t);if(n instanceof HTMLElement)return gi(n,Ir),gi(n,e.class),Si(n,-10,-10,W,G),m.insertBefore(n,Be[t]),n}function We(e,t){if(i==1||t>0){let t=i==1&&b[e.scale].time,n=e.value;e.value=t?Fa(n)?Lo(j,Fo(n,M)):n||P:n||vs,e.label=e.label||(t?as:is)}if(ze||t>0){e.width=e.width==null?1:e.width,e.paths=e.paths||dc||_a,e.fillTo=Y(e.fillTo||Fs),e.pxAlign=+Gi(e.pxAlign,h),e.pxRound=Bs(e.pxAlign),e.stroke=Y(e.stroke||null),e.fill=Y(e.fill||null),e._stroke=e._fill=e._paths=e._focus=null;let t=bs(ra(1,e.width),1),n=e.points=Va({},{size:t,width:ra(1,t*.2),stroke:e.stroke,space:t*2,paths:fc,_stroke:null,_fill:null},e.points);n.show=Y(n.show),n.filter=Y(n.filter),n.fill=Y(n.fill),n.stroke=Y(n.stroke),n.paths=Y(n.paths),n.pxAlign=e.pxAlign}if(ne){let n=ue(e,t);H.splice(t,0,n[0]),ie.splice(t,0,n[1]),I.values.push(null)}if(R){F.splice(t,0,null);let n=null;ze?t==0&&(n=Ue(e,t)):t>0&&(n=Ue(e,t)),Be.splice(t,0,n),Ve.splice(t,0,0),He.splice(t,0,0)}Jn(`addSeries`,t)}function Ge(e,t){t??=v.length,e=i==1?hc(e,t,os,Ts):hc(e,t,{},ws),v.splice(t,0,e),We(v[t],t)}r.addSeries=Ge;function Ke(e){if(v.splice(e,1),ne){I.values.splice(e,1),ie.splice(e,1);let t=H.splice(e,1)[0];pe(null,t.firstChild),t.remove()}R&&(F.splice(e,1),Be.splice(e,1)[0].remove(),Ve.splice(e,1),He.splice(e,1)),Jn(`delSeries`,e)}r.delSeries=Ke;let qe=[!1,!1,!1,!1];function Je(e,t){if(e._show=e.show,e.show){let n=e.side%2,i=b[e.scale];i??=(e.scale=n?v[1].scale:S,b[e.scale]);let a=i.time;e.size=Y(e.size),e.space=Y(e.space),e.rotate=Y(e.rotate),Ma(e.incrs)&&e.incrs.forEach(e=>{!Ea.has(e)&&Ea.set(e,Da(e))}),e.incrs=Y(e.incrs||(i.distr==2?po:a?_==1?To:Oo:mo)),e.splits=Y(e.splits||(a&&i.distr==1?te:i.distr==3?ls:i.distr==4?us:cs)),e.stroke=Y(e.stroke),e.grid.stroke=Y(e.grid.stroke),e.ticks.stroke=Y(e.ticks.stroke),e.border.stroke=Y(e.border.stroke);let o=e.values;e.values=Ma(o)&&!Ma(o[0])?Y(o):a?Ma(o)?Mo(j,jo(o,M)):Fa(o)?No(j,o):o||N:o||ss,e.filter=Y(e.filter||(i.distr>=3&&i.log==10?gs:i.distr==3&&i.log==2?_s:ga)),e.font=wc(e.font),e.labelFont=wc(e.labelFont),e._size=e.size(r,null,t,0),e._space=e._rotate=e._incrs=e._found=e._splits=e._values=null,e._size>0&&(qe[t]=!0,e._el=bi(jr,f))}}function Ye(e,t,n,r){let[i,a,o,s]=n,c=t%2,l=0;return c==0&&(s||a)&&(l=t==0&&!i||t==2&&!o?ea(rs.size/3):0),c==1&&(i||o)&&(l=t==1&&!a||t==3&&!s?ea(ys.size/2):0),l}let Xe=r.padding=(e.padding||[Ye,Ye,Ye,Ye]).map(e=>Y(Gi(e,Ye))),Ze=r._padding=Xe.map((e,t)=>e(r,t,qe,0)),Qe,$e=null,et=null,tt=i==1?v[0].idxs:null,nt=null,rt=!1;function it(e,n){if(t=e??[],r.data=r._data=t,i==2){Qe=0;for(let e=1;e<v.length;e++)Qe+=t[e][0].length}else{t.length==0&&(r.data=r._data=t=[[]]),nt=t[0],Qe=nt.length;let e=t;if(O==2){e=t.slice();let n=e[0]=Array(Qe);for(let e=0;e<Qe;e++)n[e]=e}r._data=t=e}if(Pt(!0),Jn(`setData`),O==2&&(Ee=!0),n!==!1){let e=D;e.auto(r,rt)?at():un(S,e.min,e.max),De||=L.left>=0,J=!0,zt()}}r.setData=it;function at(){rt=!0;let e,n;i==1&&(Qe>0?($e=tt[0]=0,et=tt[1]=Qe-1,e=t[0][$e],n=t[0][et],O==2?(e=$e,n=et):e==n&&(O==3?[e,n]=Ri(e,e,D.log,!1):O==4?[e,n]=zi(e,e,D.log,!1):D.time?n=e+ea(86400/_):[e,n]=Wi(e,n,Bi,!0))):($e=tt[0]=e=null,et=tt[1]=n=null)),un(S,e,n)}let ot,st,ct,lt,ut,dt,ft,pt,mt,ht;function gt(e,t,n,r,i,a){e??=Zr,n??=Aa,r??=`butt`,i??=Zr,a??=`round`,e!=ot&&(d.strokeStyle=ot=e),i!=st&&(d.fillStyle=st=i),t!=ct&&(d.lineWidth=ct=t),a!=ut&&(d.lineJoin=ut=a),r!=dt&&(d.lineCap=dt=r),n!=lt&&d.setLineDash(lt=n)}function _t(e,t,n,r){t!=st&&(d.fillStyle=st=t),e!=ft&&(d.font=ft=e),n!=pt&&(d.textAlign=pt=n),r!=mt&&(d.textBaseline=mt=r)}function vt(e,t,n,i,a=0){if(i.length>0&&e.auto(r,rt)&&(t==null||t.min==null)){let t=Gi($e,0),r=Gi(et,i.length-1),o=n.min==null?Li(i,t,r,a,e.distr==3):[n.min,n.max];e.min=na(e.min,n.min=o[0]),e.max=ra(e.max,n.max=o[1])}}let yt={min:null,max:null};function bt(){for(let e in b){let t=b[e];A[e]==null&&(t.min==null||A[S]!=null&&t.auto(r,rt))&&(A[e]=yt)}for(let e in b){let t=b[e];A[e]==null&&t.from!=null&&A[t.from]!=null&&(A[e]=yt)}A[S]!=null&&Pt(!0);let e={};for(let t in A){let n=A[t];if(n!=null){let a=e[t]=Ba(b[t],La);if(n.min!=null)Va(a,n);else if(t!=S||i==2)if(Qe==0&&a.from==null){let e=a.range(r,null,null,t);a.min=e[0],a.max=e[1]}else a.min=ua,a.max=-1/0}}if(Qe>0){v.forEach((n,a)=>{if(i==1){let i=n.scale,o=A[i];if(o==null)return;let s=e[i];if(a==0){let e=s.range(r,s.min,s.max,i);s.min=e[0],s.max=e[1],$e=ji(s.min,t[0]),et=ji(s.max,t[0]),et-$e>1&&(t[0][$e]<s.min&&$e++,t[0][et]>s.max&&et--),n.min=nt[$e],n.max=nt[et]}else n.show&&n.auto&&vt(s,o,n,t[a],n.sorted);n.idxs[0]=$e,n.idxs[1]=et}else if(a>0&&n.show&&n.auto){let[r,i]=n.facets,o=r.scale,s=i.scale,[c,l]=t[a],u=e[o],d=e[s];u!=null&&vt(u,A[o],r,c,r.sorted),d!=null&&vt(d,A[s],i,l,i.sorted),n.min=i.min,n.max=i.max}});for(let t in e){let n=e[t],i=A[t];if(n.from==null&&(i==null||i.min==null)){let e=n.range(r,n.min==ua?null:n.min,n.max==-1/0?null:n.max,t);n.min=e[0],n.max=e[1]}}}for(let t in e){let n=e[t];if(n.from!=null){let i=e[n.from];if(i.min==null)n.min=n.max=null;else{let e=n.range(r,i.min,i.max,t);n.min=e[0],n.max=e[1]}}}let n={},a=!1;for(let t in e){let r=e[t],i=b[t];if(i.min!=r.min||i.max!=r.max){i.min=r.min,i.max=r.max;let e=i.distr;i._min=e==3?oa(i.min):e==4?la(i.min,i.asinh):e==100?i.fwd(i.min):i.min,i._max=e==3?oa(i.max):e==4?la(i.max,i.asinh):e==100?i.fwd(i.max):i.max,n[t]=a=!0}}if(a){v.forEach((e,t)=>{i==2?t>0&&n.y&&(e._paths=null):n[e.scale]&&(e._paths=null)});for(let e in n)Ee=!0,Jn(`setScale`,e);R&&L.left>=0&&(De=J=!0)}for(let e in A)A[e]=null}function xt(e){let t=fa($e-1,0,Qe-1),n=fa(et+1,0,Qe-1);for(;e[t]==null&&t>0;)t--;for(;e[n]==null&&n<Qe-1;)n++;return[t,n]}function St(){if(Qe>0){let e=v.some(e=>e._focus)&&ht!=Le.alpha;e&&(d.globalAlpha=ht=Le.alpha),v.forEach((e,n)=>{if(n>0&&e.show&&(Ct(n,!1),Ct(n,!0),e._paths==null)){let a=ht;ht!=e.alpha&&(d.globalAlpha=ht=e.alpha);let o=i==2?[0,t[n][0].length-1]:xt(t[n]);e._paths=e.paths(r,n,o[0],o[1]),ht!=a&&(d.globalAlpha=ht=a)}}),v.forEach((e,t)=>{if(t>0&&e.show){let n=ht;ht!=e.alpha&&(d.globalAlpha=ht=e.alpha),e._paths!=null&&wt(t,!1);{let n=e._paths==null?null:e._paths.gaps,i=e.points.show(r,t,$e,et,n),a=e.points.filter(r,t,i,n);(i||a)&&(e.points._paths=e.points.paths(r,t,$e,et,a),wt(t,!0))}ht!=n&&(d.globalAlpha=ht=n),Jn(`drawSeries`,t)}}),e&&(d.globalAlpha=ht=1)}}function Ct(e,t){let n=t?v[e].points:v[e];n._stroke=n.stroke(r,e),n._fill=n.fill(r,e)}function wt(e,t){let n=t?v[e].points:v[e],{stroke:r,fill:i,clip:a,flags:o,_stroke:s=n._stroke,_fill:c=n._fill,_width:l=n.width}=n._paths;l=Ta(l*pi,3);let u=null,f=l%2/2;t&&c==null&&(c=l>0?`#fff`:s);let p=n.pxAlign==1&&f>0;if(p&&d.translate(f,f),!t){let e=xe-l/2,t=q-l/2,n=Se+l,r=Ce+l;u=new Path2D,u.rect(e,t,n,r)}t?Et(s,l,n.dash,n.cap,c,r,i,o,a):Tt(e,s,l,n.dash,n.cap,c,r,i,o,u,a),p&&d.translate(-f,-f)}function Tt(e,n,i,a,o,s,c,l,u,d,f){let p=!1;u!=0&&x.forEach((m,h)=>{if(m.series[0]==e){let e=v[m.series[1]],g=t[m.series[1]],_=(e._paths||ka).band;Ma(_)&&(_=m.dir==1?_[0]:_[1]);let y,b=null;e.show&&_&&Ki(g,$e,et)?(b=m.fill(r,h)||s,y=e._paths.clip):_=null,Et(n,i,a,o,b,c,l,u,d,f,y,_),p=!0}}),p||Et(n,i,a,o,s,c,l,u,d,f)}function Et(e,t,n,r,i,a,o,s,c,l,u,f){gt(e,t,n,r,i),(c||l||f)&&(d.save(),c&&d.clip(c),l&&d.clip(l)),f?(s&3)==3?(d.clip(f),u&&d.clip(u),Ot(i,o),Dt(e,a,t)):s&Ms?(Ot(i,o),d.clip(f),Dt(e,a,t)):s&js&&(d.save(),d.clip(f),u&&d.clip(u),Ot(i,o),d.restore(),Dt(e,a,t)):(Ot(i,o),Dt(e,a,t)),(c||l||f)&&d.restore()}function Dt(e,t,n){n>0&&(t instanceof Map?t.forEach((e,t)=>{d.strokeStyle=ot=t,d.stroke(e)}):t!=null&&e&&d.stroke(t))}function Ot(e,t){t instanceof Map?t.forEach((e,t)=>{d.fillStyle=st=t,d.fill(e)}):t!=null&&e&&d.fill(t)}function kt(e,t,n,i){let a=y[e],o;if(i<=0)o=[0,0];else{let s=a._space=a.space(r,e,t,n,i);o=Cc(t,n,a._incrs=a.incrs(r,e,t,n,i,s),i,s)}return a._found=o}function At(e,t,n,r,i,a,o,s,c,l){let u=o%2/2;h==1&&d.translate(u,u),gt(s,o,c,l,s),d.beginPath();let f,p,m,g,_=i+(r==0||r==3?-a:a);n==0?(p=i,g=_):(f=i,m=_);for(let r=0;r<e.length;r++)t[r]!=null&&(n==0?f=m=e[r]:p=g=e[r],d.moveTo(f,p),d.lineTo(m,g));d.stroke(),h==1&&d.translate(-u,-u)}function jt(e){let t=!0;return y.forEach((n,i)=>{if(!n.show)return;let a=b[n.scale];if(a.min==null){n._show&&(t=!1,n._show=!1,Pt(!1));return}else n._show||(t=!1,n._show=!0,Pt(!1));let o=n.side,s=o%2,{min:c,max:l}=a,[u,d]=kt(i,c,l,s==0?W:G);if(d==0)return;let f=a.distr==2,p=n._splits=n.splits(r,i,c,l,u,d,f),m=a.distr==2?p.map(e=>nt[e]):p,h=a.distr==2?nt[p[1]]-nt[p[0]]:u,g=n._values=n.values(r,n.filter(r,m,i,d,h),i,d,h);n._rotate=o==2?n.rotate(r,g,i,d):0;let _=n._size;n._size=ta(n.size(r,g,i,e)),_!=null&&n._size!=_&&(t=!1)}),t}function Mt(e){let t=!0;return Xe.forEach((n,i)=>{let a=n(r,i,qe,e);a!=Ze[i]&&(t=!1),Ze[i]=a}),t}function Nt(){for(let e=0;e<y.length;e++){let t=y[e];if(!t.show||!t._show)continue;let n=t.side,i=n%2,a,o,c=t.stroke(r,e),l=n==0||n==3?-1:1,[u,f]=t._found;if(t.label!=null){let s=t.labelGap*l,p=ea((t._lpos+s)*pi);_t(t.labelFont[0],c,`center`,n==2?Kr:qr),d.save(),i==1?(a=o=0,d.translate(p,ea(q+Ce/2)),d.rotate((n==3?-Zi:Zi)/2)):(a=ea(xe+Se/2),o=p);let m=pa(t.label)?t.label(r,e,u,f):t.label;d.fillText(m,a,o),d.restore()}if(f==0)continue;let p=b[t.scale],m=i==0?Se:Ce,h=i==0?xe:q,_=t._splits,v=p.distr==2?_.map(e=>nt[e]):_,x=p.distr==2?nt[_[1]]-nt[_[0]]:u,S=t.ticks,C=t.border,w=S.show?S.size:0,T=ea(w*pi),E=ea((t.alignTo==2?t._size-w-t.gap:t.gap)*pi),D=t._rotate*-Zi/180,O=g(t._pos*pi),k=O+(T+E)*l;o=i==0?k:0,a=i==1?k:0;let ee=t.font[0];_t(ee,c,t.align==1?Jr:t.align==2?Yr:D>0?Jr:D<0?Yr:i==0?`center`:n==3?Yr:Jr,D||i==1?`middle`:n==2?Kr:qr);let A=t.font[1]*t.lineGap,j=_.map(e=>g(s(e,p,m,h))),M=t._values;for(let e=0;e<M.length;e++){let t=M[e];if(t!=null){i==0?a=j[e]:o=j[e],t=``+t;let n=t.indexOf(`
10
+ `)==-1?[t]:t.split(/\n/gm);for(let e=0;e<n.length;e++){let t=n[e];D?(d.save(),d.translate(a,o+e*A),d.rotate(D),d.fillText(t,0,0),d.restore()):d.fillText(t,a,o+e*A)}}}S.show&&At(j,S.filter(r,v,e,f,x),i,n,O,T,Ta(S.width*pi,3),S.stroke(r,e),S.dash,S.cap);let te=t.grid;te.show&&At(j,te.filter(r,v,e,f,x),i,i==0?2:1,i==0?q:xe,i==0?Ce:Se,Ta(te.width*pi,3),te.stroke(r,e),te.dash,te.cap),C.show&&At([O],[1],+(i==0),i==0?1:2,i==1?q:xe,i==1?Ce:Se,Ta(C.width*pi,3),C.stroke(r,e),C.dash,C.cap)}Jn(`drawAxes`)}function Pt(e){v.forEach((t,n)=>{n>0&&(t._paths=null,e&&(i==1?(t.min=null,t.max=null):t.facets.forEach(e=>{e.min=null,e.max=null})))})}let Ft=!1,It=!1,Lt=[];function Rt(){It=!1;for(let e=0;e<Lt.length;e++)Jn(...Lt[e]);Lt.length=0}function zt(){Ft||=(qa(Vt),!0)}function Bt(e,t=!1){Ft=!0,It=t,e(r),Vt(),t&&Lt.length>0&&queueMicrotask(Rt)}r.batch=Bt;function Vt(){if(we&&=(bt(),!1),Ee&&=(je(),!1),Te){if(vi(p,Jr,ge),vi(p,Kr,_e),vi(p,Wr,W),vi(p,Gr,G),vi(m,Jr,ge),vi(m,Kr,_e),vi(m,Wr,W),vi(m,Gr,G),vi(f,Wr,me),vi(f,Gr,he),u.width=ea(me*pi),u.height=ea(he*pi),y.forEach(({_el:e,_show:t,_size:n,_pos:r,side:i})=>{if(e!=null)if(t){let t=i===3||i===0?n:0,a=i%2==1;vi(e,a?`left`:`top`,r-t),vi(e,a?`width`:`height`,n),vi(e,a?`top`:`left`,a?_e:ge),vi(e,a?`height`:`width`,a?G:W),_i(e,Mr)}else gi(e,Mr)}),ot=st=ct=ut=dt=ft=pt=mt=lt=null,ht=1,Mn(!0),ge!=ve||_e!=ye||W!=be||G!=K){Pt(!1);let e=W/be,t=G/K;if(R&&!De&&L.left>=0){L.left*=e,L.top*=t,Gt&&Si(Gt,ea(L.left),0,W,G),Kt&&Si(Kt,0,ea(L.top),W,G);for(let n=0;n<Be.length;n++){let r=Be[n];r!=null&&(Ve[n]*=e,He[n]*=t,Si(r,ta(Ve[n]),ta(He[n]),W,G))}}if(on.show&&!Oe&&on.left>=0&&on.width>0){on.left*=e,on.width*=e,on.top*=t,on.height*=t;for(let e in Fn)vi(sn,e,on[e])}ve=ge,ye=_e,be=W,K=G}Jn(`setSize`),Te=!1}me>0&&he>0&&(d.clearRect(0,0,u.width,u.height),Jn(`drawClear`),w.forEach(e=>e()),Jn(`draw`)),on.show&&Oe&&(cn(on),Oe=!1),R&&De&&(An(null,!0,!1),De=!1),I.show&&I.live&&J&&(On(),J=!1),c||(c=!0,r.status=1,Jn(`ready`)),rt=!1,Ft=!1}r.redraw=(e,t)=>{Ee=t||!1,e===!1?zt():un(S,D.min,D.max)};function Ht(e,n){let i=b[e];if(i.from==null){if(Qe==0){let t=i.range(r,n.min,n.max,e);n.min=t[0],n.max=t[1]}if(n.min>n.max){let e=n.min;n.min=n.max,n.max=e}if(Qe>1&&n.min!=null&&n.max!=null&&n.max-n.min<1e-16)return;e==S&&i.distr==2&&Qe>0&&(n.min=ji(n.min,t[0]),n.max=ji(n.max,t[0]),n.min==n.max&&n.max++),A[e]=n,we=!0,zt()}}r.setScale=Ht;let Ut,Wt,Gt,Kt,qt,Jt,Yt,Xt,Zt,Qt,$t,en,tn=!1,nn=L.drag,rn=nn.x,an=nn.y;R&&(L.x&&(Ut=bi(Pr,m)),L.y&&(Wt=bi(Fr,m)),D.ori==0?(Gt=Ut,Kt=Wt):(Gt=Wt,Kt=Ut),$t=L.left,en=L.top);let on=r.select=Va({show:!0,over:!0,left:0,width:0,top:0,height:0},e.select),sn=on.show?bi(Nr,on.over?m:p):null;function cn(e,t){if(on.show){for(let t in e)on[t]=e[t],t in Fn&&vi(sn,t,e[t]);t!==!1&&Jn(`setSelect`)}}r.setSelect=cn;function ln(e){if(v[e].show)ne&&_i(H[e],Mr);else if(ne&&gi(H[e],Mr),R){let t=ze?Be[0]:Be[e];t!=null&&Si(t,-10,-10,W,G)}}function un(e,t,n){Ht(e,{min:t,max:n})}function dn(e,t,n,a){t.focus!=null&&bn(e),t.show!=null&&v.forEach((n,r)=>{r>0&&(e==r||e==null)&&(n.show=t.show,ln(r),i==2?(un(n.facets[0].scale,null,null),un(n.facets[1].scale,null,null)):un(n.scale,null,null),zt())}),n!==!1&&Jn(`setSeries`,e,t),a&&$n(`setSeries`,r,e,t)}r.setSeries=dn;function fn(e,t){Va(x[e],t)}function pn(e,t){e.fill=Y(e.fill||null),e.dir=Gi(e.dir,-1),t??=x.length,x.splice(t,0,e)}function mn(e){e==null?x.length=0:x.splice(e,1)}r.addBand=pn,r.setBand=fn,r.delBand=mn;function hn(e,t){v[e].alpha=t,R&&Be[e]!=null&&(Be[e].style.opacity=t),ne&&H[e]&&(H[e].style.opacity=t)}let gn,_n,vn,yn={focus:!0};function bn(e){if(e!=vn){let t=e==null,n=Le.alpha!=1;v.forEach((r,a)=>{if(i==1||a>0){let i=t||a==0||a==e;r._focus=t?null:i,n&&hn(a,i?1:Le.alpha)}}),vn=e,n&&zt()}}ne&&Re&&fe(ni,B,e=>{L._lock||(Fe(e),vn!=null&&dn(null,yn,!0,Xn.setSeries))});function xn(e,t,n){let r=b[t];n&&(e=e/pi-(r.ori==1?_e:ge));let i=W;r.ori==1&&(i=G,e=i-e),r.dir==-1&&(e=i-e);let a=r._min,o=r._max,s=e/i,c=a+(o-a)*s,l=r.distr;return l==3?ia(10,c):l==4?ca(c,r.asinh):l==100?r.bwd(c):c}function Sn(e,n){return ji(xn(e,S,n),t[0],$e,et)}r.valToIdx=e=>ji(e,t[0]),r.posToIdx=Sn,r.posToVal=xn,r.valToPos=(e,t,n)=>b[t].ori==0?a(e,b[t],n?Se:W,n?xe:0):o(e,b[t],n?Ce:G,n?q:0),r.setCursor=(e,t,n)=>{$t=e.left,en=e.top,An(null,t,n)};function Cn(e,t){vi(sn,Jr,on.left=e),vi(sn,Wr,on.width=t)}function wn(e,t){vi(sn,Kr,on.top=e),vi(sn,Gr,on.height=t)}let Tn=D.ori==0?Cn:wn,En=D.ori==1?Cn:wn;function Dn(){if(ne&&I.live)for(let e=+(i==2);e<v.length;e++){if(e==0&&oe)continue;let t=I.values[e],n=0;for(let r in t)ie[e][n++].firstChild.nodeValue=t[r]}}function On(e,t){if(e!=null&&(e.idxs?e.idxs.forEach((e,t)=>{F[t]=e}):Pa(e.idx)||F.fill(e.idx),I.idx=F[0]),ne&&I.live){for(let e=0;e<v.length;e++)(e>0||i==1&&!oe)&&kn(e,F[e]);Dn()}J=!1,t!==!1&&Jn(`setLegend`)}r.setLegend=On;function kn(e,n){let i=v[e],a=e==0&&O==2?nt:t[e],o;oe?o=i.values(r,e,n)??se:(o=i.value(r,n==null?null:a[n],e,n),o=o==null?se:{_:o}),I.values[e]=o}function An(e,n,a){Zt=$t,Qt=en,[$t,en]=L.move(r,$t,en),L.left=$t,L.top=en,R&&(Gt&&Si(Gt,ea($t),0,W,G),Kt&&Si(Kt,0,ea(en),W,G));let o,s=$e>et;gn=ua,_n=null;let c=D.ori==0?W:G,l=D.ori==1?W:G;if($t<0||Qe==0||s){o=L.idx=null;for(let e=0;e<v.length;e++){let t=Be[e];t!=null&&Si(t,-10,-10,W,G)}Re&&dn(null,yn,!0,e==null&&Xn.setSeries),I.live&&(F.fill(o),J=!0)}else{let e,n,a;i==1&&(e=D.ori==0?$t:en,n=xn(e,S),o=L.idx=ji(n,t[0],$e,et),a=k(t[0][o],D,c,0));let s=-10,u=-10,d=0,f=0,p=!0,m=``,h=``;for(let e=+(i==2);e<v.length;e++){let g=v[e],_=F[e],y=_==null?null:i==1?t[e][_]:t[e][1][_],x=L.dataIdx(r,e,o,n),S=x==null?null:i==1?t[e][x]:t[e][1][x];if(J=J||S!=y||x!=_,F[e]=x,e>0&&g.show){let n=x==null?-10:x==o?a:k(i==1?t[0][x]:t[e][0][x],D,c,0),_=S==null?-10:ee(S,i==1?b[g.scale]:b[g.facets[1].scale],l,0);if(Re&&S!=null){let t=D.ori==1?$t:en,n=Qi(Le.dist(r,e,x,_,t));if(n<gn){let r=Le.bias;if(r!=0){let i=xn(t,g.scale),a=S>=0?1:-1,o=i>=0?1:-1;o==a&&(o==1?r==1?S>=i:S<=i:r==1?S<=i:S>=i)&&(gn=n,_n=e)}else gn=n,_n=e}}if(J||ze){let t,i;D.ori==0?(t=n,i=_):(t=_,i=n);let a,o,c,l,g,v,y=!0,b=Ie.bbox;if(b!=null){y=!1;let t=b(r,e);c=t.left,l=t.top,a=t.width,o=t.height}else c=t,l=i,a=o=Ie.size(r,e);if(v=Ie.fill(r,e),g=Ie.stroke(r,e),ze)e==_n&&gn<=Le.prox&&(s=c,u=l,d=a,f=o,p=y,m=v,h=g);else{let t=Be[e];t!=null&&(Ve[e]=c,He[e]=l,Ei(t,a,o,y),wi(t,v,g),Si(t,ta(c),ta(l),W,G))}}}}if(ze){let e=Le.prox;if(J||(vn==null?gn<=e:gn>e||_n!=vn)){let e=Be[0];e!=null&&(Ve[0]=s,He[0]=u,Ei(e,d,f,p),wi(e,m,h),Si(e,ta(s),ta(u),W,G))}}}if(on.show&&tn)if(e!=null){let[t,n]=Xn.scales,[r,i]=Xn.match,[a,o]=e.cursor.sync.scales,s=e.cursor.drag;if(rn=s._x,an=s._y,rn||an){let{left:s,top:u,width:d,height:f}=e.select,p=e.scales[a].ori,m=e.posToVal,h,g,_,v,y,x=t!=null&&r(t,a),S=n!=null&&i(n,o);x&&rn?(p==0?(h=s,g=d):(h=u,g=f),_=b[t],v=k(m(h,a),_,c,0),y=k(m(h+g,a),_,c,0),Tn(na(v,y),Qi(y-v))):Tn(0,c),S&&an?(p==1?(h=s,g=d):(h=u,g=f),_=b[n],v=ee(m(h,o),_,l,0),y=ee(m(h+g,o),_,l,0),En(na(v,y),Qi(y-v))):En(0,l)}else In()}else{let e=Qi(Zt-qt),t=Qi(Qt-Jt);if(D.ori==1){let n=e;e=t,t=n}rn=nn.x&&e>=nn.dist,an=nn.y&&t>=nn.dist;let n=nn.uni;n==null?nn.x&&nn.y&&(rn||an)&&(rn=an=!0):rn&&an&&(rn=e>=n,an=t>=n,!rn&&!an&&(t>e?an=!0:rn=!0));let r,i;rn&&(D.ori==0?(r=Yt,i=$t):(r=Xt,i=en),Tn(na(r,i),Qi(i-r)),an||En(0,l)),an&&(D.ori==1?(r=Yt,i=$t):(r=Xt,i=en),En(na(r,i),Qi(i-r)),rn||Tn(0,c)),!rn&&!an&&(Tn(0,0),En(0,0))}if(nn._x=rn,nn._y=an,e==null){if(a){if(Zn!=null){let[e,t]=Xn.scales;Xn.values[0]=e==null?null:xn(D.ori==0?$t:en,e),Xn.values[1]=t==null?null:xn(D.ori==1?$t:en,t)}$n(Qr,r,$t,en,W,G,o)}if(Re){let e=a&&Xn.setSeries,t=Le.prox;vn==null?gn<=t&&dn(_n,yn,!0,e):gn>t?dn(null,yn,!0,e):_n!=vn&&dn(_n,yn,!0,e)}}J&&(I.idx=o,On()),n!==!1&&Jn(`setCursor`)}let jn=null;Object.defineProperty(r,"rect",{get(){return jn??Mn(!1),jn}});function Mn(e=!1){e?jn=null:(jn=m.getBoundingClientRect(),Jn(`syncRect`,jn))}function Nn(e,t,n,r,i,a,o){L._lock||tn&&e!=null&&e.movementX==0&&e.movementY==0||(Pn(e,t,n,r,i,a,o,!1,e!=null),e==null?An(t,!0,!1):An(null,!0,!0))}function Pn(e,t,n,i,a,o,c,l,u){if(jn??Mn(!1),Fe(e),e!=null)n=e.clientX-jn.left,i=e.clientY-jn.top;else{if(n<0||i<0){$t=-10,en=-10;return}let[e,r]=Xn.scales,c=t.cursor.sync,[l,u]=c.values,[d,f]=c.scales,[p,m]=Xn.match,h=t.axes[0].side%2==1,g=D.ori==0?W:G,_=D.ori==1?W:G,v=h?o:a,y=h?a:o,x=h?i:n,S=h?n:i;if(n=d==null?x/v*g:p(e,d)?s(l,b[e],g,0):-10,i=f==null?S/y*_:m(r,f)?s(u,b[r],_,0):-10,D.ori==1){let e=n;n=i,i=e}}u&&(t==null||t.cursor.event.type==Qr)&&((n<=1||n>=W-1)&&(n=Sa(n,W)),(i<=1||i>=G-1)&&(i=Sa(i,G))),l?(qt=n,Jt=i,[Yt,Xt]=L.move(r,n,i)):($t=n,en=i)}let Fn={width:0,height:0,left:0,top:0};function In(){cn(Fn,!1)}let Ln,Rn,zn,Bn;function Vn(e,t,n,i,a,o,s){tn=!0,rn=an=nn._x=nn._y=!1,Pn(e,t,n,i,a,o,s,!0,!1),e!=null&&(fe(ei,ui,Hn,!1),$n($r,r,Yt,Xt,W,G,null));let{left:c,top:l,width:u,height:d}=on;Ln=c,Rn=l,zn=u,Bn=d}function Hn(e,t,n,i,a,o,s){tn=nn._x=nn._y=!1,Pn(e,t,n,i,a,o,s,!1,!0);let{left:c,top:l,width:u,height:d}=on,f=u>0||d>0,p=Ln!=c||Rn!=l||zn!=u||Bn!=d;if(f&&p&&cn(on),nn.setScale&&f&&p){let e=c,t=u,n=l,r=d;if(D.ori==1&&(e=l,t=d,n=c,r=u),rn&&un(S,xn(e,S),xn(e+t,S)),an)for(let e in b){let t=b[e];e!=S&&t.from==null&&t.min!=ua&&un(e,xn(n+r,e),xn(n,e))}In()}else L.lock&&(L._lock=!L._lock,An(t,!0,e!=null));e!=null&&(pe(ei,ui),$n(ei,r,$t,en,W,G,null))}function Un(e,t,n,r,i,a,o){if(L._lock)return;Fe(e);let s=tn;if(tn){let e=!0,t=!0,n,r;D.ori==0?(n=rn,r=an):(n=an,r=rn),n&&r&&(e=$t<=10||$t>=W-10,t=en<=10||en>=G-10),n&&e&&($t=$t<Yt?0:W),r&&t&&(en=en<Xt?0:G),An(null,!0,!0),tn=!1}$t=-10,en=-10,F.fill(null),An(null,!0,!0),s&&(tn=s)}function Wn(e,t,n,i,a,o,s){L._lock||(Fe(e),at(),In(),e!=null&&$n(ri,r,$t,en,W,G,null))}function Gn(){y.forEach(Tc),ke(r.width,r.height,!0)}ki(si,di,Gn);let Kn={};Kn.mousedown=Vn,Kn.mousemove=Nn,Kn.mouseup=Hn,Kn.dblclick=Wn,Kn.setSeries=(e,t,n,i)=>{let a=Xn.match[2];n=a(r,t,n),n!=-1&&dn(n,i,!0,!1)},R&&(fe($r,m,Vn),fe(Qr,m,Nn),fe(ti,m,e=>{Fe(e),Mn(!1)}),fe(ni,m,Un),fe(ri,m,Wn),lc.add(r),r.syncRect=Mn);let qn=r.hooks=e.hooks||{};function Jn(e,t,n){It?Lt.push([e,t,n]):e in qn&&qn[e].forEach(e=>{e.call(null,r,t,n)})}(e.plugins||[]).forEach(e=>{for(let t in e.hooks)qn[t]=(qn[t]||[]).concat(e.hooks[t])});let Yn=(e,t,n)=>n,Xn=Va({key:null,setSeries:!1,filters:{pub:va,sub:va},scales:[S,v[1]?v[1].scale:null],match:[ya,ya,Yn],values:[null,null]},L.sync);Xn.match.length==2&&Xn.match.push(Yn),L.sync=Xn;let Zn=Xn.key,Qn=As(Zn);function $n(e,t,n,r,i,a,o){Xn.filters.pub(e,t,n,r,i,a,o)&&Qn.pub(e,t,n,r,i,a,o)}Qn.sub(r);function er(e,t,n,r,i,a,o){Xn.filters.sub(e,t,n,r,i,a,o)&&Kn[e](null,t,n,r,i,a,o)}r.pub=er;function tr(){Qn.unsub(r),lc.delete(r),de.clear(),Ai(si,di,Gn),l.remove(),B?.remove(),Jn(`destroy`)}r.destroy=tr;function nr(){Jn(`init`,e,t),it(t||e.data,!1),A[S]?Ht(S,A[S]):at(),Oe=on.show&&(on.width>0||on.height>0),De=J=!0,ke(e.width,e.height)}return v.forEach(We),y.forEach(Je),n?n instanceof HTMLElement?(n.appendChild(l),nr()):n(r,nr):nr(),r}Ec.assign=Va,Ec.fmtNum=Yi,Ec.rangeNum=Wi,Ec.rangeLog=Ri,Ec.rangeAsinh=zi,Ec.orient=Ns,Ec.pxRatio=pi,Ec.join=Ka,Ec.fmtDate=ao,Ec.tzDate=so,Ec.sync=As;{Ec.addGap=Rs,Ec.clipGaps=Ls;let e=Ec.paths={points:Qs};e.linear=nc,e.stepped=rc,e.bars=ac,e.spline=sc}function Dc(e){return typeof e==`object`&&!!e}var Oc=[`string`,`number`,`bigint`,`boolean`];function kc(e){return e==null||Oc.includes(typeof e)?!0:Array.isArray(e)?e.every(e=>kc(e)):typeof e==`object`?Object.getPrototypeOf(e)===Object.prototype:!1}var Ac=Symbol(`box`),jc=Symbol(`is-writable`);function X(e,t){let n=H(e);return t?{[Ac]:!0,[jc]:!0,get current(){return K(n)},set current(e){t(e)}}:{[Ac]:!0,get current(){return e()}}}function Mc(e){return Dc(e)&&Ac in e}function Nc(...e){return function(t){for(let n of e)if(n){if(t.defaultPrevented)return;typeof n==`function`?n.call(this,t):n.current?.call(this,t)}}}var Pc=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Fc=/\n/g,Ic=/^\s*/,Lc=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Rc=/^:\s*/,zc=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Bc=/^[;\s]*/,Vc=/^\s+|\s+$/g,Hc=`
11
+ `,Uc=`/`,Wc=`*`,Gc=``,Kc=`comment`,qc=`declaration`;function Jc(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var n=1,r=1;function i(e){var t=e.match(Fc);t&&(n+=t.length);var i=e.lastIndexOf(Hc);r=~i?e.length-i:r+e.length}function a(){var e={line:n,column:r};return function(t){return t.position=new o(e),l(),t}}function o(e){this.start=e,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function s(i){var a=Error(t.source+`:`+n+`:`+r+`: `+i);if(a.reason=i,a.filename=t.source,a.line=n,a.column=r,a.source=e,!t.silent)throw a}function c(t){var n=t.exec(e);if(n){var r=n[0];return i(r),e=e.slice(r.length),n}}function l(){c(Ic)}function u(e){var t;for(e||=[];t=d();)t!==!1&&e.push(t);return e}function d(){var t=a();if(!(Uc!=e.charAt(0)||Wc!=e.charAt(1))){for(var n=2;Gc!=e.charAt(n)&&(Wc!=e.charAt(n)||Uc!=e.charAt(n+1));)++n;if(n+=2,Gc===e.charAt(n-1))return s(`End of comment missing`);var o=e.slice(2,n-2);return r+=2,i(o),e=e.slice(n),r+=2,t({type:Kc,comment:o})}}function f(){var e=a(),t=c(Lc);if(t){if(d(),!c(Rc))return s(`property missing ':'`);var n=c(zc),r=e({type:qc,property:Yc(t[0].replace(Pc,Gc)),value:n?Yc(n[0].replace(Pc,Gc)):Gc});return c(Bc),r}}function p(){var e=[];u(e);for(var t;t=f();)t!==!1&&(e.push(t),u(e));return e}return l(),p()}function Yc(e){return e?e.replace(Vc,Gc):Gc}function Xc(e,t){let n=null;if(!e||typeof e!=`string`)return n;let r=Jc(e),i=typeof t==`function`;return r.forEach(e=>{if(e.type!==`declaration`)return;let{property:r,value:a}=e;i?t(r,a,e):a&&(n||={},n[r]=a)}),n}var Zc=/\d/,Qc=[`-`,`_`,`/`,`.`];function $c(e=``){if(!Zc.test(e))return e!==e.toLowerCase()}function el(e){let t=[],n=``,r,i;for(let a of e){let e=Qc.includes(a);if(e===!0){t.push(n),n=``,r=void 0;continue}let o=$c(a);if(i===!1){if(r===!1&&o===!0){t.push(n),n=a,r=o;continue}if(r===!0&&o===!1&&n.length>1){let e=n.at(-1);t.push(n.slice(0,Math.max(0,n.length-1))),n=e+a,r=o;continue}}n+=a,r=o,i=e}return t.push(n),t}function tl(e){return e?el(e).map(e=>rl(e)).join(``):``}function nl(e){return il(tl(e||``))}function rl(e){return e?e[0].toUpperCase()+e.slice(1):``}function il(e){return e?e[0].toLowerCase()+e.slice(1):``}function al(e){if(!e)return{};let t={};function n(e,n){if(e.startsWith(`-moz-`)||e.startsWith(`-webkit-`)||e.startsWith(`-ms-`)||e.startsWith(`-o-`)){t[tl(e)]=n;return}if(e.startsWith(`--`)){t[e]=n;return}t[nl(e)]=n}return Xc(e,n),t}function ol(...e){return(...t)=>{for(let n of e)typeof n==`function`&&n(...t)}}function sl(e,t){let n=RegExp(e,`g`);return e=>{if(typeof e!=`string`)throw TypeError(`expected an argument of type string, but got ${typeof e}`);return e.match(n)?e.replace(n,t):e}}var cl=sl(/[A-Z]/,e=>`-${e.toLowerCase()}`);function ll(e){if(!e||typeof e!=`object`||Array.isArray(e))throw TypeError(`expected an argument of type object, but got ${typeof e}`);return Object.keys(e).map(t=>`${cl(t)}: ${e[t]};`).join(`
12
+ `)}function ul(e={}){return ll(e).replace(`
13
+ `,` `)}var dl=new Set(`onabort.onanimationcancel.onanimationend.onanimationiteration.onanimationstart.onauxclick.onbeforeinput.onbeforetoggle.onblur.oncancel.oncanplay.oncanplaythrough.onchange.onclick.onclose.oncompositionend.oncompositionstart.oncompositionupdate.oncontextlost.oncontextmenu.oncontextrestored.oncopy.oncuechange.oncut.ondblclick.ondrag.ondragend.ondragenter.ondragleave.ondragover.ondragstart.ondrop.ondurationchange.onemptied.onended.onerror.onfocus.onfocusin.onfocusout.onformdata.ongotpointercapture.oninput.oninvalid.onkeydown.onkeypress.onkeyup.onload.onloadeddata.onloadedmetadata.onloadstart.onlostpointercapture.onmousedown.onmouseenter.onmouseleave.onmousemove.onmouseout.onmouseover.onmouseup.onpaste.onpause.onplay.onplaying.onpointercancel.onpointerdown.onpointerenter.onpointerleave.onpointermove.onpointerout.onpointerover.onpointerup.onprogress.onratechange.onreset.onresize.onscroll.onscrollend.onsecuritypolicyviolation.onseeked.onseeking.onselect.onselectionchange.onselectstart.onslotchange.onstalled.onsubmit.onsuspend.ontimeupdate.ontoggle.ontouchcancel.ontouchend.ontouchmove.ontouchstart.ontransitioncancel.ontransitionend.ontransitionrun.ontransitionstart.onvolumechange.onwaiting.onwebkitanimationend.onwebkitanimationiteration.onwebkitanimationstart.onwebkittransitionend.onwheel`.split(`.`));function fl(e){return dl.has(e)}function pl(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let r=e[n];if(r){for(let e of Object.keys(r)){let n=t[e],i=r[e],a=typeof n==`function`,o=typeof i==`function`;if(a&&typeof o&&fl(e))t[e]=Nc(n,i);else if(a&&o)t[e]=ol(n,i);else if(e===`class`){let r=kc(n),a=kc(i);r&&a?t[e]=u(n,i):r?t[e]=u(n):a&&(t[e]=u(i))}else if(e===`style`){let r=typeof n==`object`,a=typeof i==`object`,o=typeof n==`string`,s=typeof i==`string`;if(r&&a)t[e]={...n,...i};else if(r&&s){let r=al(i);t[e]={...n,...r}}else if(o&&a)t[e]={...al(n),...i};else if(o&&s){let r=al(n),a=al(i);t[e]={...r,...a}}else r?t[e]=n:a?t[e]=i:o?t[e]=n:s&&(t[e]=i)}else t[e]=i===void 0?n:i}for(let e of Object.getOwnPropertySymbols(r)){let n=t[e],i=r[e];t[e]=i===void 0?n:i}}}return typeof t.style==`object`&&(t.style=ul(t.style).replaceAll(`
14
+ `,` `)),t.hidden===!1&&(t.hidden=void 0,delete t.hidden),t.disabled===!1&&(t.disabled=void 0,delete t.disabled),t}var ml=ul({position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`,transform:`translateX(-100%)`}),hl=typeof window<`u`?window:void 0;typeof window<`u`&&window.document,typeof window<`u`&&window.navigator,typeof window<`u`&&window.location;function gl(e){let t=e.activeElement;for(;t?.shadowRoot;){let e=t.shadowRoot.activeElement;if(e===t)break;t=e}return t}new class{#e;#t;constructor(t={}){let{window:n=hl,document:r=n?.document}=t;n!==void 0&&(this.#e=r,this.#t=re(t=>{let r=e(n,`focusin`,t),i=e(n,`focusout`,t);return()=>{r(),i()}}))}get current(){return this.#t?.(),this.#e?gl(this.#e):null}};var _l=class{#e;#t;constructor(e){this.#e=e,this.#t=Symbol(e)}get key(){return this.#t}exists(){return Ce(this.#t)}get(){let e=A(this.#t);if(e===void 0)throw Error(`Context "${this.#e}" not found`);return e}getOr(e){let t=A(this.#t);return t===void 0?e:t}set(e){return De(this.#t,e)}};function vl(e,t){switch(e){case`post`:me(t);break;case`pre`:ye(t);break}}function yl(e,t,n,r={}){let{lazy:i=!1}=r,a=!i,o=Array.isArray(e)?[]:void 0;vl(t,()=>{let t=Array.isArray(e)?e.map(e=>e()):e();if(!a){a=!0,o=t;return}let r=_e(()=>n(t,o));return o=t,r})}function bl(e,t,n){let r=ae(()=>{let i=!1;yl(e,t,(e,t)=>{if(i){r();return}let a=n(e,t);return i=!0,a},{lazy:!0})});me(()=>r)}function xl(e,t,n){yl(e,`post`,t,n)}function Sl(e,t,n){yl(e,`pre`,t,n)}xl.pre=Sl;function Cl(e,t){bl(e,`post`,t)}function wl(e,t){bl(e,`pre`,t)}Cl.pre=wl;function Tl(e,t){let n,r=null;return(...i)=>new Promise(a=>{r&&r(void 0),r=a,clearTimeout(n),n=setTimeout(async()=>{let t=await e(...i);r&&=(r(t),null)},t)})}function El(e,t){let n=0,r=null;return(...i)=>{let a=Date.now();return n&&a-n<t?r??Promise.resolve(void 0):(n=a,r=e(...i),r)}}function Dl(e,t,n={},r){let{lazy:i=!1,once:a=!1,initialValue:o,debounce:s,throttle:c}=n,l=W(L(o)),u=W(!1),d=W(void 0),f=W(L([])),p=()=>{K(f).forEach(e=>e()),z(f,[],!0)},m=e=>{z(f,[...K(f),e],!0)},h=async(e,n,r=!1)=>{try{z(u,!0),z(d,void 0),p();let i=new AbortController;m(()=>i.abort());let a=await t(e,n,{data:K(l),refetching:r,onCleanup:m,signal:i.signal});return z(l,a,!0),a}catch(e){e instanceof DOMException&&e.name===`AbortError`||z(d,e,!0);return}finally{z(u,!1)}},g=s?Tl(h,s):c?El(h,c):h,_=Array.isArray(e)?e:[e],v;return r((t,n)=>{a&&v||(v=t,g(Array.isArray(e)?t:t[0],Array.isArray(e)?n:n?.[0]))},{lazy:i}),{get current(){return K(l)},get loading(){return K(u)},get error(){return K(d)},mutate:e=>{z(l,e,!0)},refetch:t=>{let n=_.map(e=>e());return g(Array.isArray(e)?n:n[0],Array.isArray(e)?n:n[0],t??!0)}}}function Ol(e,t,n){return Dl(e,t,n,(t,n)=>{let r=Array.isArray(e)?e:[e];xl(()=>r.map(e=>e()),(e,n)=>{t(e,n??[])},n)})}function kl(e,t,n){return Dl(e,t,n,(t,n)=>{let r=Array.isArray(e)?e:[e];xl.pre(()=>r.map(e=>e()),(e,n)=>{t(e,n??[])},n)})}Ol.pre=kl;function Al(e){fe().then(e)}var jl=9;function Ml(e){return Dc(e)&&e.nodeType===jl}function Nl(e){return Dc(e)&&e.constructor?.name===`VisualViewport`}function Pl(e){return Ml(e)?e:Nl(e)?e.document:e?.ownerDocument??document}function Fl(e){let t=e.activeElement;for(;t?.shadowRoot;){let e=t.shadowRoot.activeElement;if(e===t)break;t=e}return t}var Il=class{element;#e=H(()=>this.element.current?this.element.current.getRootNode()??document:document);get root(){return K(this.#e)}set root(e){z(this.#e,e)}constructor(e){typeof e==`function`?this.element=X(e):this.element=e}getDocument=()=>Pl(this.root);getWindow=()=>this.getDocument().defaultView??window;getActiveElement=()=>Fl(this.root);isActiveElement=e=>e===this.getActiveElement();getElementById(e){return this.root.getElementById(e)}querySelector=e=>this.root?this.root.querySelector(e):null;querySelectorAll=e=>this.root?this.root.querySelectorAll(e):[];setTimeout=(e,t)=>this.getWindow().setTimeout(e,t);clearTimeout=e=>this.getWindow().clearTimeout(e)};function Ll(e,t){return{[ne()]:n=>Mc(e)?(e.current=n,_e(()=>t?.(n)),()=>{`isConnected`in n&&n.isConnected||(e.current=null,t?.(null))}):(e(n),_e(()=>t?.(n)),()=>{`isConnected`in n&&n.isConnected||(e(null),t?.(null))})}}function Rl(e){return e?`true`:`false`}function zl(e){return e?``:void 0}var Bl=class{#e;#t;attrs;constructor(e){this.#e=e.getVariant?e.getVariant():null,this.#t=this.#e?`data-${this.#e}-`:`data-${e.component}-`,this.getAttr=this.getAttr.bind(this),this.selector=this.selector.bind(this),this.attrs=Object.fromEntries(e.parts.map(e=>[e,this.getAttr(e)]))}getAttr(e,t){return t?`data-${t}-${e}`:`${this.#t}${e}`}selector(e,t){return`[${this.getAttr(e,t)}]`}};function Vl(e){let t=new Bl(e);return{...t.attrs,selector:t.selector,getAttr:t.getAttr}}var Hl=`ArrowDown`,Ul=`ArrowLeft`,Wl=`ArrowRight`,Gl=`ArrowUp`,Kl=`Enter`,ql=typeof document<`u`;Jl();function Jl(){return ql&&window?.navigator?.userAgent&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||window?.navigator?.maxTouchPoints>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function Yl(e){return e instanceof HTMLElement}function Xl(){}function Zl(e,t){return t===void 0?`bits-${e}`:`bits-${e}-${t}`}var Ql=new _l(`BitsConfig`);function $l(){let e=new eu(null,{});return Ql.getOr(e).opts}var eu=class{opts;constructor(e,t){let n=tu(e,t);this.opts={defaultPortalTo:n(e=>e.defaultPortalTo),defaultLocale:n(e=>e.defaultLocale)}}};function tu(e,t){return n=>X(()=>{let r=n(t)?.current;if(r!==void 0)return r;if(e!==null)return n(e.opts)?.current})}function nu(e,t){return n=>{let r=$l();return X(()=>{let i=n();if(i!==void 0)return i;let a=e(r).current;return a===void 0?t:a})}}var ru=nu(e=>e.defaultLocale,`en`);function iu(e,t){if(t<=0)return[];let n=[];for(let r=0;r<e.length;r+=t)n.push(e.slice(r,r+t));return n}function au(e,t){return e>=0&&e<t.length}globalThis.bitsIdCounter??={current:0};function ou(e=`bits`){return globalThis.bitsIdCounter.current++,`${e}-${globalThis.bitsIdCounter.current}`}function su(e){if(!ql||!e)return null;let t=e.querySelector(`[data-bits-announcer]`),n=t=>{let n=e.createElement(`div`);return n.role=`log`,n.ariaLive=t,n.setAttribute(`aria-relevant`,`additions`),n};if(!Yl(t)){let r=e.createElement(`div`);r.style.cssText=ml,r.setAttribute(`data-bits-announcer`,``),r.appendChild(n(`assertive`)),r.appendChild(n(`polite`)),t=r,e.body.insertBefore(t,e.body.firstChild)}return{getLog:e=>{if(!Yl(t))return null;let n=t.querySelector(`[aria-live="${e}"]`);return Yl(n)?n:null}}}function cu(e){let t=su(e);function n(n,r=`assertive`,i=7500){if(!t||!ql||!e)return;let a=t.getLog(r),o=e.createElement(`div`);return n=typeof n==`number`?n.toString():n===null?`Empty`:n.trim(),o.innerText=n,r===`assertive`?a?.replaceChildren(o):a?.appendChild(o),setTimeout(()=>{o.remove()},i)}return{announce:n}}var lu={defaultValue:void 0,granularity:`day`};function uu(e){let{defaultValue:t,granularity:n,minValue:r,maxValue:i}={...lu,...e};if(Array.isArray(t)&&t.length)return t[t.length-1];if(t&&!Array.isArray(t))return t;{let e=new Date;r&&e<r.toDate(tn())?e=r.toDate(tn()):i&&e>i.toDate(tn())&&(e=i.toDate(tn()));let t=e.getFullYear(),a=e.getMonth()+1,o=e.getDate();return[`hour`,`minute`,`second`].includes(n??`day`)?new fr(t,a,o,0,0,0):new dr(t,a,o)}}function du(e,t){let n;return n=t instanceof pr?nr(e):t instanceof fr?tr(e):er(e),n.calendar===t.calendar?n:wn(n,t.calendar)}function fu(e,t=tn()){return e instanceof pr?e.toDate():e.toDate(t)}function pu(e){if(e instanceof dr)return`date`;if(e instanceof fr)return`datetime`;if(e instanceof pr)return`zoneddatetime`;throw Error(`Unknown date type`)}function mu(e,t){switch(t){case`date`:return er(e);case`datetime`:return tr(e);case`zoneddatetime`:return nr(e);default:throw Error(`Unknown date type: ${t}`)}}function hu(e){return e instanceof fr}function gu(e){return e instanceof pr}function _u(e){return hu(e)||gu(e)}function vu(e){if(e instanceof Date){let t=e.getFullYear(),n=e.getMonth()+1;return new Date(t,n,0).getDate()}else return e.set({day:100}).day}function yu(e,t){return e.compare(t)<0}function bu(e,t){return e.compare(t)>0}function xu(e,t){return e.compare(t)<=0}function Su(e,t){return e.compare(t)>=0}function Cu(e,t,n){return Su(e,t)&&xu(e,n)}function wu(e,t,n){let r=qt(e,n);return t>r?e.subtract({days:r+7-t}):t===r?e:e.subtract({days:r-t})}function Tu(e,t,n){let r=qt(e,n),i=t===0?6:t-1;return r===i?e:r>i?e.add({days:7-r+i}):e.add({days:i-r})}function Eu(e,t,n,r){if(n===void 0&&r===void 0)return!0;let i=e.add({days:1});if(r?.(i)||n?.(i))return!1;let a=t;for(;i.compare(a)<0;)if(i=i.add({days:1}),r?.(i)||n?.(i))return!1;return!0}var Du={year:`numeric`,month:`numeric`,day:`numeric`,hour:`numeric`,minute:`numeric`,second:`numeric`};function Ou(e){let t=e.initialLocale;function n(e){t=e}function r(){return t}function i(e,n){return new hr(t,n).format(e)}function a(e,t=!0){return _u(e)&&t?i(fu(e),{dateStyle:`long`,timeStyle:`long`}):i(fu(e),{dateStyle:`long`})}function o(n){return typeof e.monthFormat.current!=`function`&&typeof e.yearFormat.current!=`function`?new hr(t,{month:e.monthFormat.current,year:e.yearFormat.current}).format(n):`${typeof e.monthFormat.current==`function`?e.monthFormat.current(n.getMonth()+1):new hr(t,{month:e.monthFormat.current}).format(n)} ${typeof e.yearFormat.current==`function`?e.yearFormat.current(n.getFullYear()):new hr(t,{year:e.yearFormat.current}).format(n)}`}function s(e){return new hr(t,{month:`long`}).format(e)}function c(e){return new hr(t,{year:`numeric`}).format(e)}function l(e,n){return gu(e)?new hr(t,{...n,timeZone:e.timeZone}).formatToParts(fu(e)):new hr(t,n).formatToParts(fu(e))}function u(e,n=`narrow`){return new hr(t,{weekday:n}).format(e)}function d(e,n=void 0){return new hr(t,{hour:`numeric`,minute:`numeric`,hourCycle:n===24?`h23`:void 0}).formatToParts(e).find(e=>e.type===`dayPeriod`)?.value===`PM`?`PM`:`AM`}function f(e,t,n={}){let r=l(e,{...Du,...n}).find(e=>e.type===t);return r?r.value:``}return{setLocale:n,getLocale:r,fullMonth:s,fullYear:c,fullMonthAndYear:o,toParts:l,custom:i,part:f,dayPeriod:d,selectedDate:a,dayOfWeek:u}}function ku(e){return!(!Yl(e)||!e.hasAttribute(`data-bits-day`))}function Au(e,t){let n=[],r=e.add({days:1}),i=t;for(;r.compare(i)<0;)n.push(r),r=r.add({days:1});return n}function ju(e){let{dateObj:t,weekStartsOn:n,fixedWeeks:r,locale:i}=e,a=vu(t),o=Array.from({length:a},(e,n)=>t.set({day:n+1})),s=rn(t),c=an(t),l=n===void 0?wu(s,0,i):wu(s,n,`en-US`),u=n===void 0?Tu(c,0,i):Tu(c,n,`en-US`),d=Au(l.subtract({days:1}),s),f=Au(c,u.add({days:1})),p=d.length+o.length+f.length;if(r&&p<42){let e=42-p,n=f[f.length-1];n||=t.add({months:1}).set({day:1});let r=e;f.length===0&&(r=e-1,f.push(n));let i=Array.from({length:r},(e,t)=>{let r=t+1;return n.add({days:r})});f.push(...i)}let m=d.concat(o,f);return{value:t,dates:m,weeks:iu(m,7)}}function Mu(e){let{numberOfMonths:t,dateObj:n,...r}=e,i=[];if(!t||t===1)return i.push(ju({...r,dateObj:n})),i;i.push(ju({...r,dateObj:n}));for(let e=1;e<t;e++){let t=n.add({months:e});i.push(ju({...r,dateObj:t}))}return i}function Nu(e){return e?Array.from(e.querySelectorAll(`[data-bits-day]:not([data-disabled]):not([data-outside-visible-months])`)).filter(e=>Yl(e)):[]}function Pu(e,t){let n=e.getAttribute(`data-value`);n&&(t.current=du(n,t.current))}function Fu({node:e,add:t,placeholder:n,calendarNode:r,isPrevButtonDisabled:i,isNextButtonDisabled:a,months:o,numberOfMonths:s}){let c=Nu(r);if(!c.length)return;let l=c.indexOf(e)+t;if(au(l,c)){let e=c[l];return Pu(e,n),e.focus()}if(l<0){if(i)return;let e=o[0]?.value;if(!e)return;n.current=e.subtract({months:s}),Al(()=>{let e=Nu(r);if(!e.length)return;let t=e.length-Math.abs(l);if(au(t,e)){let r=e[t];return Pu(r,n),r.focus()}})}if(l>=c.length){if(a)return;let e=o[0]?.value;if(!e)return;n.current=e.add({months:s}),Al(()=>{let e=Nu(r);if(!e.length)return;let t=l-c.length;if(au(t,e))return e[t].focus()})}}var Iu=[Hl,Gl,Ul,Wl],Lu=[Kl,` `];function Ru({event:e,handleCellClick:t,shiftFocus:n,placeholderValue:r}){let i=e.target;if(!ku(i)||!Iu.includes(e.key)&&!Lu.includes(e.key))return;e.preventDefault();let a={[Hl]:7,[Gl]:-7,[Ul]:-1,[Wl]:1};if(Iu.includes(e.key)){let t=a[e.key];t!==void 0&&n(i,t)}if(Lu.includes(e.key)){let n=i.getAttribute(`data-value`);if(!n)return;t(e,du(n,r))}}function zu({months:e,setMonths:t,numberOfMonths:n,pagedNavigation:r,weekStartsOn:i,locale:a,fixedWeeks:o,setPlaceholder:s}){let c=e[0]?.value;if(c)if(r)s(c.add({months:n}));else{let e=c.add({months:1}),r=Mu({dateObj:e,weekStartsOn:i,locale:a,fixedWeeks:o,numberOfMonths:n});s(e),t(r)}}function Bu({months:e,setMonths:t,numberOfMonths:n,pagedNavigation:r,weekStartsOn:i,locale:a,fixedWeeks:o,setPlaceholder:s}){let c=e[0]?.value;if(c)if(r)s(c.subtract({months:n}));else{let e=c.subtract({months:1}),r=Mu({dateObj:e,weekStartsOn:i,locale:a,fixedWeeks:o,numberOfMonths:n});s(e),t(r)}}function Vu({months:e,formatter:t,weekdayFormat:n}){if(!e.length)return[];let r=e[0].weeks[0];return r?r.map(e=>t.dayOfWeek(fu(e),n)):[]}function Hu(e){me(()=>{let t=e.weekStartsOn.current,n=e.locale.current,r=e.fixedWeeks.current,i=e.numberOfMonths.current;_e(()=>{let a=e.placeholder.current;if(!a)return;let o={weekStartsOn:t,locale:n,fixedWeeks:r,numberOfMonths:i};e.setMonths(Mu({...o,dateObj:a}))})})}function Uu({placeholder:e,getVisibleMonths:t,weekStartsOn:n,locale:r,fixedWeeks:i,numberOfMonths:a,setMonths:o}){me(()=>{e.current,_e(()=>{t().some(t=>Ht(t,e.current))||o(Mu({weekStartsOn:n.current,locale:r.current,fixedWeeks:i.current,numberOfMonths:a.current,dateObj:e.current}))})})}function Wu({maxValue:e,months:t,disabled:n}){if(!e||!t.length)return!1;if(n)return!0;let r=t[t.length-1]?.value;return r?bu(r.add({months:1}).set({day:1}),e):!1}function Gu({minValue:e,months:t,disabled:n}){if(!e||!t.length)return!1;if(n)return!0;let r=t[0]?.value;return r?yu(r.subtract({months:1}).set({day:35}),e):!1}function Ku({months:e,locale:t,formatter:n}){if(!e.length)return``;if(t!==n.getLocale()&&n.setLocale(t),e.length===1){let t=fu(e[0].value);return`${n.fullMonthAndYear(t)}`}let r=fu(e[0].value),i=fu(e[e.length-1].value),a=n.fullMonth(r),o=n.fullMonth(i),s=n.fullYear(r),c=n.fullYear(i);return s===c?`${a} - ${o} ${c}`:`${a} ${s} - ${o} ${c}`}function qu({fullCalendarLabel:e,id:t,isInvalid:n,disabled:r,readonly:i}){return{id:t,role:`application`,"aria-label":e,"data-invalid":zl(n),"data-disabled":zl(r),"data-readonly":zl(i)}}function Ju(e){if(!ql)return;let t=Array.from(e.querySelectorAll(`[data-bits-day]:not([aria-disabled=true])`));if(t.length===0)return;let n=t[0],r=n?.getAttribute(`data-value`),i=n?.getAttribute(`data-type`);if(!(!r||!i))return mu(r,i)}function Yu({ref:e,placeholder:t,defaultPlaceholder:n,minValue:r,maxValue:i,isDateDisabled:a}){function o(e){return!!(a.current(e)||r.current&&yu(e,r.current)||i.current&&yu(i.current,e))}xl(()=>e.current,()=>{e.current&&t.current&&Vt(t.current,n)&&o(n)&&(t.current=Ju(e.current)??n)})}var Xu=Vl({component:`calendar`,parts:[`root`,`grid`,`cell`,`next-button`,`prev-button`,`day`,`grid-body`,`grid-head`,`grid-row`,`head-cell`,`header`,`heading`,`month-select`,`year-select`]});function Zu(e){let t=new Date().getFullYear(),n=Math.max(e.placeholderYear,t),r,i;if(e.minValue)r=e.minValue.year;else{let t=n-100;r=e.placeholderYear<t?e.placeholderYear-10:t}i=e.maxValue?e.maxValue.year:n+10,r>i&&(r=i);let a=i-r+1;return Array.from({length:a},(e,t)=>r+t)}var Qu=new _l(`Calendar.Root | RangeCalender.Root`);new _l(`Calendar.Cell | RangeCalendar.Cell`);var $u=class e{static create(t){return new e(t,Qu.get())}opts;root;#e=H(()=>this.root.isNextButtonDisabled);get isDisabled(){return K(this.#e)}set isDisabled(e){z(this.#e,e)}attachment;constructor(e,t){this.opts=e,this.root=t,this.onclick=this.onclick.bind(this),this.attachment=Ll(this.opts.ref)}onclick(e){this.isDisabled||this.root.nextPage()}#t=H(()=>({id:this.opts.id.current,role:`button`,type:`button`,"aria-label":`Next`,"aria-disabled":Rl(this.isDisabled),"data-disabled":zl(this.isDisabled),disabled:this.isDisabled,[this.root.getBitsAttr(`next-button`)]:``,onclick:this.onclick,...this.attachment}));get props(){return K(this.#t)}set props(e){z(this.#t,e)}},ed=class e{static create(t){return new e(t,Qu.get())}opts;root;#e=H(()=>this.root.isPrevButtonDisabled);get isDisabled(){return K(this.#e)}set isDisabled(e){z(this.#e,e)}attachment;constructor(e,t){this.opts=e,this.root=t,this.onclick=this.onclick.bind(this),this.attachment=Ll(this.opts.ref)}onclick(e){this.isDisabled||this.root.prevPage()}#t=H(()=>({id:this.opts.id.current,role:`button`,type:`button`,"aria-label":`Previous`,"aria-disabled":Rl(this.isDisabled),"data-disabled":zl(this.isDisabled),disabled:this.isDisabled,[this.root.getBitsAttr(`prev-button`)]:``,onclick:this.onclick,...this.attachment}));get props(){return K(this.#t)}set props(e){z(this.#t,e)}},td=class e{static create(t){return new e(t,Qu.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=Ll(this.opts.ref)}#e=H(()=>({id:this.opts.id.current,tabindex:-1,role:`grid`,"aria-readonly":Rl(this.root.opts.readonly.current),"aria-disabled":Rl(this.root.opts.disabled.current),"data-readonly":zl(this.root.opts.readonly.current),"data-disabled":zl(this.root.opts.disabled.current),[this.root.getBitsAttr(`grid`)]:``,...this.attachment}));get props(){return K(this.#e)}set props(e){z(this.#e,e)}},nd=class e{static create(t){return new e(t,Qu.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=Ll(this.opts.ref)}#e=H(()=>({id:this.opts.id.current,"data-disabled":zl(this.root.opts.disabled.current),"data-readonly":zl(this.root.opts.readonly.current),[this.root.getBitsAttr(`grid-body`)]:``,...this.attachment}));get props(){return K(this.#e)}set props(e){z(this.#e,e)}},rd=class e{static create(t){return new e(t,Qu.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=Ll(this.opts.ref)}#e=H(()=>({id:this.opts.id.current,"data-disabled":zl(this.root.opts.disabled.current),"data-readonly":zl(this.root.opts.readonly.current),[this.root.getBitsAttr(`grid-head`)]:``,...this.attachment}));get props(){return K(this.#e)}set props(e){z(this.#e,e)}},id=class e{static create(t){return new e(t,Qu.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=Ll(this.opts.ref)}#e=H(()=>({id:this.opts.id.current,"data-disabled":zl(this.root.opts.disabled.current),"data-readonly":zl(this.root.opts.readonly.current),[this.root.getBitsAttr(`grid-row`)]:``,...this.attachment}));get props(){return K(this.#e)}set props(e){z(this.#e,e)}},ad=class e{static create(t){return new e(t,Qu.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=Ll(this.opts.ref)}#e=H(()=>({id:this.opts.id.current,"data-disabled":zl(this.root.opts.disabled.current),"data-readonly":zl(this.root.opts.readonly.current),[this.root.getBitsAttr(`head-cell`)]:``,...this.attachment}));get props(){return K(this.#e)}set props(e){z(this.#e,e)}},od=class e{static create(t){return new e(t,Qu.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=Ll(this.opts.ref)}#e=H(()=>({id:this.opts.id.current,"data-disabled":zl(this.root.opts.disabled.current),"data-readonly":zl(this.root.opts.readonly.current),[this.root.getBitsAttr(`header`)]:``,...this.attachment}));get props(){return K(this.#e)}set props(e){z(this.#e,e)}},sd=class e{static create(t){return new e(t,Qu.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.onchange=this.onchange.bind(this),this.attachment=Ll(this.opts.ref)}#e=H(()=>{this.root.opts.locale.current;let e=this.opts.months.current,t=this.opts.monthFormat.current,n=[];for(let r of e){let e=this.root.opts.placeholder.current.set({month:r}),i;i=typeof t==`function`?t(r):this.root.formatter.custom(fu(e),{month:t}),n.push({value:r,label:i})}return n});get monthItems(){return K(this.#e)}set monthItems(e){z(this.#e,e)}#t=H(()=>this.root.opts.placeholder.current.month);get currentMonth(){return K(this.#t)}set currentMonth(e){z(this.#t,e)}#n=H(()=>this.root.opts.disabled.current||this.opts.disabled.current);get isDisabled(){return K(this.#n)}set isDisabled(e){z(this.#n,e)}#r=H(()=>({monthItems:this.monthItems,selectedMonthItem:this.monthItems.find(e=>e.value===this.currentMonth)}));get snippetProps(){return K(this.#r)}set snippetProps(e){z(this.#r,e)}onchange(e){if(this.isDisabled)return;let t=e.target,n=parseInt(t.value,10);isNaN(n)||(this.root.opts.placeholder.current=this.root.opts.placeholder.current.set({month:n}))}#i=H(()=>({id:this.opts.id.current,value:this.currentMonth,disabled:this.isDisabled,"data-disabled":zl(this.isDisabled),[this.root.getBitsAttr(`month-select`)]:``,onchange:this.onchange,...this.attachment}));get props(){return K(this.#i)}set props(e){z(this.#i,e)}},cd=class e{static create(t){return new e(t,Qu.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.onchange=this.onchange.bind(this),this.attachment=Ll(this.opts.ref)}#e=H(()=>this.opts.years.current&&this.opts.years.current.length?this.opts.years.current:this.root.defaultYears);get years(){return K(this.#e)}set years(e){z(this.#e,e)}#t=H(()=>{this.root.opts.locale.current;let e=this.opts.yearFormat.current,t=[];for(let n of this.years){let r=this.root.opts.placeholder.current.set({year:n}),i;i=typeof e==`function`?e(n):this.root.formatter.custom(fu(r),{year:e}),t.push({value:n,label:i})}return t});get yearItems(){return K(this.#t)}set yearItems(e){z(this.#t,e)}#n=H(()=>this.root.opts.placeholder.current.year);get currentYear(){return K(this.#n)}set currentYear(e){z(this.#n,e)}#r=H(()=>this.root.opts.disabled.current||this.opts.disabled.current);get isDisabled(){return K(this.#r)}set isDisabled(e){z(this.#r,e)}#i=H(()=>({yearItems:this.yearItems,selectedYearItem:this.yearItems.find(e=>e.value===this.currentYear)}));get snippetProps(){return K(this.#i)}set snippetProps(e){z(this.#i,e)}onchange(e){if(this.isDisabled)return;let t=e.target,n=parseInt(t.value,10);isNaN(n)||(this.root.opts.placeholder.current=this.root.opts.placeholder.current.set({year:n}))}#a=H(()=>({id:this.opts.id.current,value:this.currentYear,disabled:this.isDisabled,"data-disabled":zl(this.isDisabled),[this.root.getBitsAttr(`year-select`)]:``,onchange:this.onchange,...this.attachment}));get props(){return K(this.#a)}set props(e){z(this.#a,e)}},ld=d(`<table><!></table>`);function ud(e,r){let a=O();N(r,!0);let s=S(r,`ref`,15,null),c=S(r,`id`,19,()=>Zl(a)),l=o(r,[`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`ref`,`id`]),u=td.create({id:X(()=>c()),ref:X(()=>s(),e=>s(e))}),d=H(()=>pl(l,u.props));var p=G(),m=U(p),h=e=>{var t=G();n(U(t),()=>r.child,()=>({props:K(d)})),f(e,t)},g=e=>{var a=ld();t(a,()=>({...K(d)})),n(F(a),()=>r.children??C),i(a),f(e,a)};E(m,e=>{r.child?e(h):e(g,-1)}),f(e,p),J()}var dd=d(`<tbody><!></tbody>`);function fd(e,r){let a=O();N(r,!0);let s=S(r,`ref`,15,null),c=S(r,`id`,19,()=>Zl(a)),l=o(r,[`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`ref`,`id`]),u=nd.create({id:X(()=>c()),ref:X(()=>s(),e=>s(e))}),d=H(()=>pl(l,u.props));var p=G(),m=U(p),h=e=>{var t=G();n(U(t),()=>r.child,()=>({props:K(d)})),f(e,t)},g=e=>{var a=dd();t(a,()=>({...K(d)})),n(F(a),()=>r.children??C),i(a),f(e,a)};E(m,e=>{r.child?e(h):e(g,-1)}),f(e,p),J()}var pd=d(`<thead><!></thead>`);function md(e,r){let a=O();N(r,!0);let s=S(r,`ref`,15,null),c=S(r,`id`,19,()=>Zl(a)),l=o(r,[`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`ref`,`id`]),u=rd.create({id:X(()=>c()),ref:X(()=>s(),e=>s(e))}),d=H(()=>pl(l,u.props));var p=G(),m=U(p),h=e=>{var t=G();n(U(t),()=>r.child,()=>({props:K(d)})),f(e,t)},g=e=>{var a=pd();t(a,()=>({...K(d)})),n(F(a),()=>r.children??C),i(a),f(e,a)};E(m,e=>{r.child?e(h):e(g,-1)}),f(e,p),J()}var hd=d(`<th><!></th>`);function gd(e,r){let a=O();N(r,!0);let s=S(r,`ref`,15,null),c=S(r,`id`,19,()=>Zl(a)),l=o(r,[`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`ref`,`id`]),u=ad.create({id:X(()=>c()),ref:X(()=>s(),e=>s(e))}),d=H(()=>pl(l,u.props));var p=G(),m=U(p),h=e=>{var t=G();n(U(t),()=>r.child,()=>({props:K(d)})),f(e,t)},g=e=>{var a=hd();t(a,()=>({...K(d)})),n(F(a),()=>r.children??C),i(a),f(e,a)};E(m,e=>{r.child?e(h):e(g,-1)}),f(e,p),J()}var _d=d(`<tr><!></tr>`);function vd(e,r){let a=O();N(r,!0);let s=S(r,`ref`,15,null),c=S(r,`id`,19,()=>Zl(a)),l=o(r,[`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`ref`,`id`]),u=id.create({id:X(()=>c()),ref:X(()=>s(),e=>s(e))}),d=H(()=>pl(l,u.props));var p=G(),m=U(p),h=e=>{var t=G();n(U(t),()=>r.child,()=>({props:K(d)})),f(e,t)},g=e=>{var a=_d();t(a,()=>({...K(d)})),n(F(a),()=>r.children??C),i(a),f(e,a)};E(m,e=>{r.child?e(h):e(g,-1)}),f(e,p),J()}var yd=d(`<header><!></header>`);function bd(e,r){let a=O();N(r,!0);let s=S(r,`ref`,15,null),c=S(r,`id`,19,()=>Zl(a)),l=o(r,[`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`ref`,`id`]),u=od.create({id:X(()=>c()),ref:X(()=>s(),e=>s(e))}),d=H(()=>pl(l,u.props));var p=G(),m=U(p),h=e=>{var t=G();n(U(t),()=>r.child,()=>({props:K(d)})),f(e,t)},g=e=>{var a=yd();t(a,()=>({...K(d)})),n(F(a),()=>r.children??C),i(a),f(e,a)};E(m,e=>{r.child?e(h):e(g,-1)}),f(e,p),J()}var xd=d(`<option> </option>`),Sd=d(`<!>`,1),Cd=d(`<select><!></select>`);function wd(e,r){let a=O();N(r,!0);let s=S(r,`ref`,15,null),u=S(r,`id`,19,()=>Zl(a)),d=S(r,`months`,19,()=>[1,2,3,4,5,6,7,8,9,10,11,12]),p=S(r,`monthFormat`,3,`long`),h=S(r,`disabled`,3,!1),g=S(r,`aria-label`,3,`Select a month`),_=o(r,[`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`ref`,`id`,`months`,`monthFormat`,`disabled`,`aria-label`]),v=sd.create({id:X(()=>u()),ref:X(()=>s(),e=>s(e)),months:X(()=>d()),monthFormat:X(()=>p()),disabled:X(()=>!!h())}),y=H(()=>pl(_,v.props,{"aria-label":g()}));var b=G(),x=U(b),w=e=>{var t=G(),i=U(t);{let e=H(()=>({props:K(y),...v.snippetProps}));n(i,()=>r.child,()=>K(e))}f(e,t)},T=e=>{var a=Cd();t(a,()=>({...K(y)})),se(a,()=>{var e=F(a),t=Sd(),o=U(t),s=e=>{var t=G();n(U(t),()=>r.children??C,()=>v.snippetProps),f(e,t)},u=e=>{var t=G();l(U(t),17,()=>v.monthItems,e=>e.value,(e,t)=>{var n=xd(),r=F(n,!0);i(n);var a={};M(()=>{m(n,K(t).value===v.currentMonth),c(r,K(t).label),a!==(a=K(t).value)&&(n.value=(n.__value=K(t).value)??``)}),f(e,n)}),f(e,t)};E(o,e=>{r.children?e(s):e(u,-1)}),f(e,t)}),f(e,a)};E(x,e=>{r.child?e(w):e(T,-1)}),f(e,b),J()}var Td=d(`<button><!></button>`);function Ed(e,r){let a=O();N(r,!0);let s=S(r,`id`,19,()=>Zl(a)),c=S(r,`ref`,15,null),l=S(r,`tabindex`,3,0),u=o(r,[`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`id`,`ref`,`tabindex`]),d=$u.create({id:X(()=>s()),ref:X(()=>c(),e=>c(e))}),p=H(()=>pl(u,d.props,{tabindex:l()}));var m=G(),h=U(m),g=e=>{var t=G();n(U(t),()=>r.child,()=>({props:K(p)})),f(e,t)},_=e=>{var a=Td();t(a,()=>({...K(p)})),n(F(a),()=>r.children??C),i(a),f(e,a)};E(h,e=>{r.child?e(g):e(_,-1)}),f(e,m),J()}var Dd=d(`<button><!></button>`);function Od(e,r){let a=O();N(r,!0);let s=S(r,`id`,19,()=>Zl(a)),c=S(r,`ref`,15,null),l=S(r,`tabindex`,3,0),u=o(r,[`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`id`,`ref`,`tabindex`]),d=ed.create({id:X(()=>s()),ref:X(()=>c(),e=>c(e))}),p=H(()=>pl(u,d.props,{tabindex:l()}));var m=G(),h=U(m),g=e=>{var t=G();n(U(t),()=>r.child,()=>({props:K(p)})),f(e,t)},_=e=>{var a=Dd();t(a,()=>({...K(p)})),n(F(a),()=>r.children??C),i(a),f(e,a)};E(h,e=>{r.child?e(g):e(_,-1)}),f(e,m),J()}var kd=d(`<option> </option>`),Ad=d(`<!>`,1),jd=d(`<select><!></select>`);function Md(e,r){let a=O();N(r,!0);let s=S(r,`ref`,15,null),u=S(r,`id`,19,()=>Zl(a)),d=S(r,`yearFormat`,3,`numeric`),p=S(r,`disabled`,3,!1),h=S(r,`aria-label`,3,`Select a year`),g=o(r,[`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`ref`,`id`,`years`,`yearFormat`,`disabled`,`aria-label`]),_=cd.create({id:X(()=>u()),ref:X(()=>s(),e=>s(e)),years:X(()=>r.years),yearFormat:X(()=>d()),disabled:X(()=>!!p())}),v=H(()=>pl(g,_.props,{"aria-label":h()}));var y=G(),b=U(y),x=e=>{var t=G(),i=U(t);{let e=H(()=>({props:K(v),..._.snippetProps}));n(i,()=>r.child,()=>K(e))}f(e,t)},w=e=>{var a=jd();t(a,()=>({...K(v)})),se(a,()=>{var e=F(a),t=Ad(),o=U(t),s=e=>{var t=G();n(U(t),()=>r.children??C,()=>_.snippetProps),f(e,t)},u=e=>{var t=G();l(U(t),17,()=>_.yearItems,e=>e.value,(e,t)=>{var n=kd(),r=F(n,!0);i(n);var a={};M(()=>{m(n,K(t).value===_.currentYear),c(r,K(t).label),a!==(a=K(t).value)&&(n.value=(n.__value=K(t).value)??``)}),f(e,n)}),f(e,t)};E(o,e=>{r.children?e(s):e(u,-1)}),f(e,t)}),f(e,a)};E(b,e=>{r.child?e(x):e(w,-1)}),f(e,y),J()}var Nd=new _l(`RangeCalendar.Cell`),Pd=class e{static create(t){return Qu.set(new e(t))}opts;attachment;#e=H(()=>this.months.map(e=>e.value));get visibleMonths(){return K(this.#e)}set visibleMonths(e){z(this.#e,e)}#t=W(L([]));get months(){return K(this.#t)}set months(e){z(this.#t,e,!0)}announcer;formatter;accessibleHeadingId=ou();#n=W(void 0);get focusedValue(){return K(this.#n)}set focusedValue(e){z(this.#n,e,!0)}lastPressedDateValue=void 0;domContext;#r=H(()=>Vu({months:this.months,formatter:this.formatter,weekdayFormat:this.opts.weekdayFormat.current}));get weekdays(){return K(this.#r)}set weekdays(e){z(this.#r,e)}#i=H(()=>this.opts.startValue.current?this.isDateUnavailable(this.opts.startValue.current)||this.isDateDisabled(this.opts.startValue.current):!1);get isStartInvalid(){return K(this.#i)}set isStartInvalid(e){z(this.#i,e)}#a=H(()=>this.opts.endValue.current?this.isDateUnavailable(this.opts.endValue.current)||this.isDateDisabled(this.opts.endValue.current):!1);get isEndInvalid(){return K(this.#a)}set isEndInvalid(e){z(this.#a,e)}#o=H(()=>!!(this.isStartInvalid||this.isEndInvalid||this.opts.endValue.current&&this.opts.startValue.current&&yu(this.opts.endValue.current,this.opts.startValue.current)));get isInvalid(){return K(this.#o)}set isInvalid(e){z(this.#o,e)}#s=H(()=>Wu({maxValue:this.opts.maxValue.current,months:this.months,disabled:this.opts.disabled.current}));get isNextButtonDisabled(){return K(this.#s)}set isNextButtonDisabled(e){z(this.#s,e)}#c=H(()=>Gu({minValue:this.opts.minValue.current,months:this.months,disabled:this.opts.disabled.current}));get isPrevButtonDisabled(){return K(this.#c)}set isPrevButtonDisabled(e){z(this.#c,e)}#l=H(()=>(this.opts.monthFormat.current,this.opts.yearFormat.current,Ku({months:this.months,formatter:this.formatter,locale:this.opts.locale.current})));get headingValue(){return K(this.#l)}set headingValue(e){z(this.#l,e)}#u=H(()=>`${this.opts.calendarLabel.current} ${this.headingValue}`);get fullCalendarLabel(){return K(this.#u)}set fullCalendarLabel(e){z(this.#u,e)}#d=H(()=>{if(this.opts.startValue.current&&this.opts.endValue.current||!this.opts.startValue.current||!this.focusedValue)return null;let e=yu(this.opts.startValue.current,this.focusedValue),t=e?this.opts.startValue.current:this.focusedValue,n=e?this.focusedValue:this.opts.startValue.current,r={start:t,end:n};return Vt(t.add({days:1}),n)||Vt(t,n)||Eu(t,n,this.isDateUnavailable,this.isDateDisabled)?r:null});get highlightedRange(){return K(this.#d)}set highlightedRange(e){z(this.#d,e)}#f=H(()=>_e(()=>this.opts.placeholder.current.year));get initialPlaceholderYear(){return K(this.#f)}set initialPlaceholderYear(e){z(this.#f,e)}#p=H(()=>Zu({minValue:this.opts.minValue.current,maxValue:this.opts.maxValue.current,placeholderYear:this.initialPlaceholderYear}));get defaultYears(){return K(this.#p)}set defaultYears(e){z(this.#p,e)}constructor(e){this.opts=e,this.attachment=Ll(e.ref),this.domContext=new Il(e.ref),this.announcer=cu(null),this.formatter=Ou({initialLocale:this.opts.locale.current,monthFormat:this.opts.monthFormat,yearFormat:this.opts.yearFormat}),this.months=Mu({dateObj:this.opts.placeholder.current,weekStartsOn:this.opts.weekStartsOn.current,locale:this.opts.locale.current,fixedWeeks:this.opts.fixedWeeks.current,numberOfMonths:this.opts.numberOfMonths.current}),ye(()=>{this.formatter.getLocale()!==this.opts.locale.current&&this.formatter.setLocale(this.opts.locale.current)}),we(()=>{this.announcer=cu(this.domContext.getDocument())}),Uu({placeholder:this.opts.placeholder,getVisibleMonths:()=>this.visibleMonths,weekStartsOn:this.opts.weekStartsOn,locale:this.opts.locale,fixedWeeks:this.opts.fixedWeeks,numberOfMonths:this.opts.numberOfMonths,setMonths:this.setMonths}),Hu({fixedWeeks:this.opts.fixedWeeks,locale:this.opts.locale,numberOfMonths:this.opts.numberOfMonths,placeholder:this.opts.placeholder,setMonths:this.setMonths,weekStartsOn:this.opts.weekStartsOn}),me(()=>{let e=this.domContext.getElementById(this.accessibleHeadingId);e&&(e.textContent=this.fullCalendarLabel)}),xl(()=>this.opts.value.current,e=>{e.start&&e.end?(this.opts.startValue.current=e.start,this.opts.endValue.current=e.end):e.start?(this.opts.startValue.current=e.start,this.opts.endValue.current=void 0):e.start===void 0&&e.end===void 0&&(this.opts.startValue.current=void 0,this.opts.endValue.current=void 0)}),xl(()=>this.opts.value.current,e=>{let t=e.start;t&&this.opts.placeholder.current!==t&&(this.opts.placeholder.current=t)}),xl([()=>this.opts.startValue.current,()=>this.opts.endValue.current,()=>this.opts.excludeDisabled.current],([e,t,n])=>{!n||!e||!t||this.#C(e,t)&&(this.#h(void 0),this.#g(void 0),this.#v())}),xl([()=>this.opts.startValue.current,()=>this.opts.endValue.current],([e,t])=>{this.opts.value.current&&this.opts.value.current.start===e&&this.opts.value.current.end===t||(e&&t?this.#m(n=>{if(n.start===e&&n.end===t)return n;if(yu(t,e)){let n=e,r=t;return this.#h(r),this.#g(n),this.#_(t,e)?{start:t,end:e}:(this.#h(e),this.#g(void 0),{start:e,end:void 0})}else return this.#_(e,t)?{start:e,end:t}:(this.#h(t),this.#g(void 0),{start:t,end:void 0})}):this.opts.value.current&&this.opts.value.current.start&&this.opts.value.current.end&&(this.opts.value.current.start=void 0,this.opts.value.current.end=void 0))}),this.shiftFocus=this.shiftFocus.bind(this),this.handleCellClick=this.handleCellClick.bind(this),this.onkeydown=this.onkeydown.bind(this),this.nextPage=this.nextPage.bind(this),this.prevPage=this.prevPage.bind(this),this.nextYear=this.nextYear.bind(this),this.prevYear=this.prevYear.bind(this),this.setYear=this.setYear.bind(this),this.setMonth=this.setMonth.bind(this),this.isDateDisabled=this.isDateDisabled.bind(this),this.isDateUnavailable=this.isDateUnavailable.bind(this),this.isOutsideVisibleMonths=this.isOutsideVisibleMonths.bind(this),this.isSelected=this.isSelected.bind(this),Yu({placeholder:e.placeholder,defaultPlaceholder:e.defaultPlaceholder,isDateDisabled:e.isDateDisabled,maxValue:e.maxValue,minValue:e.minValue,ref:e.ref})}#m(e){let t=this.opts.value.current,n=e(t);this.opts.value.current=n,n.start&&n.end&&this.opts.onRangeSelect?.current?.()}#h(e){this.opts.startValue.current=e,this.#m(t=>({...t,start:e}))}#g(e){this.opts.endValue.current=e,this.#m(t=>({...t,end:e}))}setMonths=e=>{this.months=e};isOutsideVisibleMonths(e){return!this.visibleMonths.some(t=>Ht(e,t))}isDateDisabled(e){if(this.opts.isDateDisabled.current(e)||this.opts.disabled.current)return!0;let t=this.opts.minValue.current,n=this.opts.maxValue.current;return!!(t&&yu(e,t)||n&&bu(e,n))}isDateUnavailable(e){return!!this.opts.isDateUnavailable.current(e)}isSelectionStart(e){return this.opts.startValue.current?Vt(e,this.opts.startValue.current):!1}isSelectionEnd(e){return this.opts.endValue.current?Vt(e,this.opts.endValue.current):!1}isSelected(e){return this.opts.startValue.current&&Vt(this.opts.startValue.current,e)||this.opts.endValue.current&&Vt(this.opts.endValue.current,e)?!0:this.opts.startValue.current&&this.opts.endValue.current?Cu(e,this.opts.startValue.current,this.opts.endValue.current):!1}#_(e,t){let n=yu(t,e)?t:e,r=yu(t,e)?e:t,i=n.toDate(tn()),a=r.toDate(tn()).getTime()-i.getTime(),o=Math.floor(a/(1e3*60*60*24))+1;return!(this.opts.minDays.current&&o<this.opts.minDays.current||this.opts.maxDays.current&&o>this.opts.maxDays.current||this.opts.excludeDisabled.current&&this.#C(n,r))}shiftFocus(e,t){return Fu({node:e,add:t,placeholder:this.opts.placeholder,calendarNode:this.opts.ref.current,isPrevButtonDisabled:this.isPrevButtonDisabled,isNextButtonDisabled:this.isNextButtonDisabled,months:this.months,numberOfMonths:this.opts.numberOfMonths.current})}#v(){this.announcer.announce(`Selected date is now empty.`,`polite`)}#y(e){this.announcer.announce(`Selected Date: ${this.formatter.selectedDate(e,!1)}`,`polite`)}#b(e,t){this.announcer.announce(`Selected Dates: ${this.formatter.selectedDate(e,!1)} to ${this.formatter.selectedDate(t,!1)}`,`polite`)}handleCellClick(e,t){if(this.isDateDisabled(t)||this.isDateUnavailable(t))return;let n=this.lastPressedDateValue;if(this.lastPressedDateValue=t,this.opts.startValue.current&&this.highlightedRange===null)if(Vt(this.opts.startValue.current,t)&&!this.opts.preventDeselect.current&&!this.opts.endValue.current){this.#h(void 0),this.opts.placeholder.current=t,this.#v();return}else this.opts.endValue.current||(e.preventDefault(),n&&Vt(n,t)&&(this.#h(t),this.#y(t)));if(this.opts.startValue.current&&this.opts.endValue.current&&Vt(this.opts.endValue.current,t)&&!this.opts.preventDeselect.current){this.#h(void 0),this.#g(void 0),this.opts.placeholder.current=t,this.#v();return}if(!this.opts.startValue.current)this.#y(t),this.#h(t);else if(this.opts.endValue.current)this.opts.endValue.current&&this.opts.startValue.current&&(this.#g(void 0),this.#y(t),this.#h(t));else{let e=this.opts.startValue.current,n=t,r=yu(n,e)?n:e,i=yu(n,e)?e:n;this.#_(r,i)?yu(n,e)?(this.#h(n),this.#g(e),this.#b(n,e)):(this.#g(t),this.#b(this.opts.startValue.current,t)):(this.#h(t),this.#g(void 0),this.#y(t))}}onkeydown(e){return Ru({event:e,handleCellClick:this.handleCellClick,placeholderValue:this.opts.placeholder.current,shiftFocus:this.shiftFocus})}nextPage(){zu({fixedWeeks:this.opts.fixedWeeks.current,locale:this.opts.locale.current,numberOfMonths:this.opts.numberOfMonths.current,pagedNavigation:this.opts.pagedNavigation.current,setMonths:this.setMonths,setPlaceholder:e=>this.opts.placeholder.current=e,weekStartsOn:this.opts.weekStartsOn.current,months:this.months})}prevPage(){Bu({fixedWeeks:this.opts.fixedWeeks.current,locale:this.opts.locale.current,numberOfMonths:this.opts.numberOfMonths.current,pagedNavigation:this.opts.pagedNavigation.current,setMonths:this.setMonths,setPlaceholder:e=>this.opts.placeholder.current=e,weekStartsOn:this.opts.weekStartsOn.current,months:this.months})}nextYear(){this.opts.placeholder.current=this.opts.placeholder.current.add({years:1})}prevYear(){this.opts.placeholder.current=this.opts.placeholder.current.subtract({years:1})}setYear(e){this.opts.placeholder.current=this.opts.placeholder.current.set({year:e})}setMonth(e){this.opts.placeholder.current=this.opts.placeholder.current.set({month:e})}getBitsAttr=e=>Xu.getAttr(e,`range-calendar`);#x=H(()=>({months:this.months,weekdays:this.weekdays}));get snippetProps(){return K(this.#x)}set snippetProps(e){z(this.#x,e)}#S=H(()=>({...qu({fullCalendarLabel:this.fullCalendarLabel,id:this.opts.id.current,isInvalid:this.isInvalid,disabled:this.opts.disabled.current,readonly:this.opts.readonly.current}),[this.getBitsAttr(`root`)]:``,onkeydown:this.onkeydown,...this.attachment}));get props(){return K(this.#S)}set props(e){z(this.#S,e)}#C(e,t){for(let n=e;yu(n,t)||Vt(n,t);n=n.add({days:1}))if(this.isDateDisabled(n))return!0;return!1}},Fd=class e{static create(t){return Nd.set(new e(t,Qu.get()))}opts;root;attachment;#e=H(()=>fu(this.opts.date.current));get cellDate(){return K(this.#e)}set cellDate(e){z(this.#e,e)}#t=H(()=>!Ht(this.opts.date.current,this.opts.month.current));get isOutsideMonth(){return K(this.#t)}set isOutsideMonth(e){z(this.#t,e)}#n=H(()=>this.root.isDateDisabled(this.opts.date.current)||this.isOutsideMonth&&this.root.opts.disableDaysOutsideMonth.current);get isDisabled(){return K(this.#n)}set isDisabled(e){z(this.#n,e)}#r=H(()=>this.root.opts.isDateUnavailable.current(this.opts.date.current));get isUnavailable(){return K(this.#r)}set isUnavailable(e){z(this.#r,e)}#i=H(()=>Gt(this.opts.date.current,tn()));get isDateToday(){return K(this.#i)}set isDateToday(e){z(this.#i,e)}#a=H(()=>this.root.isOutsideVisibleMonths(this.opts.date.current));get isOutsideVisibleMonths(){return K(this.#a)}set isOutsideVisibleMonths(e){z(this.#a,e)}#o=H(()=>Vt(this.opts.date.current,this.root.opts.placeholder.current));get isFocusedDate(){return K(this.#o)}set isFocusedDate(e){z(this.#o,e)}#s=H(()=>this.root.isSelected(this.opts.date.current));get isSelectedDate(){return K(this.#s)}set isSelectedDate(e){z(this.#s,e)}#c=H(()=>this.root.isSelectionStart(this.opts.date.current));get isSelectionStart(){return K(this.#c)}set isSelectionStart(e){z(this.#c,e)}#l=H(()=>this.root.isSelectionStart(this.opts.date.current));get isRangeStart(){return K(this.#l)}set isRangeStart(e){z(this.#l,e)}#u=H(()=>this.root.opts.endValue.current?this.root.isSelectionEnd(this.opts.date.current):this.root.isSelectionStart(this.opts.date.current));get isRangeEnd(){return K(this.#u)}set isRangeEnd(e){z(this.#u,e)}#d=H(()=>this.isSelectionMiddle);get isRangeMiddle(){return K(this.#d)}set isRangeMiddle(e){z(this.#d,e)}#f=H(()=>this.isSelectedDate&&!this.isSelectionStart&&!this.isSelectionEnd);get isSelectionMiddle(){return K(this.#f)}set isSelectionMiddle(e){z(this.#f,e)}#p=H(()=>this.root.isSelectionEnd(this.opts.date.current));get isSelectionEnd(){return K(this.#p)}set isSelectionEnd(e){z(this.#p,e)}#m=H(()=>this.root.highlightedRange?Cu(this.opts.date.current,this.root.highlightedRange.start,this.root.highlightedRange.end):!1);get isHighlighted(){return K(this.#m)}set isHighlighted(e){z(this.#m,e)}#h=H(()=>this.root.formatter.custom(this.cellDate,{weekday:`long`,month:`long`,day:`numeric`,year:`numeric`}));get labelText(){return K(this.#h)}set labelText(e){z(this.#h,e)}constructor(e,t){this.opts=e,this.root=t,this.attachment=Ll(e.ref)}#g=H(()=>({disabled:this.isDisabled,unavailable:this.isUnavailable,selected:this.isSelectedDate}));get snippetProps(){return K(this.#g)}set snippetProps(e){z(this.#g,e)}#_=H(()=>this.isDisabled||this.isOutsideMonth&&this.root.opts.disableDaysOutsideMonth.current||this.isUnavailable);get ariaDisabled(){return K(this.#_)}set ariaDisabled(e){z(this.#_,e)}#v=H(()=>({"data-unavailable":zl(this.isUnavailable),"data-today":this.isDateToday?``:void 0,"data-outside-month":this.isOutsideMonth?``:void 0,"data-outside-visible-months":this.isOutsideVisibleMonths?``:void 0,"data-focused":this.isFocusedDate?``:void 0,"data-selection-start":this.isSelectionStart?``:void 0,"data-selection-end":this.isSelectionEnd?``:void 0,"data-range-start":this.isRangeStart?``:void 0,"data-range-end":this.isRangeEnd?``:void 0,"data-range-middle":this.isRangeMiddle?``:void 0,"data-highlighted":this.isHighlighted?``:void 0,"data-selected":zl(this.isSelectedDate),"data-value":this.opts.date.current.toString(),"data-type":pu(this.opts.date.current),"data-disabled":zl(this.isDisabled||this.isOutsideMonth&&this.root.opts.disableDaysOutsideMonth.current)}));get sharedDataAttrs(){return K(this.#v)}set sharedDataAttrs(e){z(this.#v,e)}#y=H(()=>({id:this.opts.id.current,role:`gridcell`,"aria-selected":Rl(this.isSelectedDate),"aria-disabled":Rl(this.ariaDisabled),...this.sharedDataAttrs,[this.root.getBitsAttr(`cell`)]:``,...this.attachment}));get props(){return K(this.#y)}set props(e){z(this.#y,e)}},Id=class e{static create(t){return new e(t,Nd.get())}opts;cell;attachment;constructor(e,t){this.opts=e,this.cell=t,this.attachment=Ll(e.ref),this.onclick=this.onclick.bind(this),this.onmouseenter=this.onmouseenter.bind(this),this.onfocusin=this.onfocusin.bind(this)}#e=H(()=>this.cell.isOutsideMonth&&this.cell.root.opts.disableDaysOutsideMonth.current||this.cell.isDisabled?void 0:this.cell.isFocusedDate?0:-1);onclick(e){this.cell.isDisabled||this.cell.root.handleCellClick(e,this.cell.opts.date.current)}onmouseenter(e){this.cell.isDisabled||(this.cell.root.focusedValue=this.cell.opts.date.current)}onfocusin(e){this.cell.isDisabled||(this.cell.root.focusedValue=this.cell.opts.date.current)}#t=H(()=>({disabled:this.cell.isDisabled,unavailable:this.cell.isUnavailable,selected:this.cell.isSelectedDate,day:`${this.cell.opts.date.current.day}`}));get snippetProps(){return K(this.#t)}set snippetProps(e){z(this.#t,e)}#n=H(()=>({id:this.opts.id.current,role:`button`,"aria-label":this.cell.labelText,"aria-disabled":Rl(this.cell.ariaDisabled),...this.cell.sharedDataAttrs,tabindex:K(this.#e),[this.cell.root.getBitsAttr(`day`)]:``,"data-bits-day":``,onclick:this.onclick,onmouseenter:this.onmouseenter,onfocusin:this.onfocusin,...this.attachment}));get props(){return K(this.#n)}set props(e){z(this.#n,e)}},Ld=d(`<td><!></td>`);function Rd(e,r){let a=O();N(r,!0);let s=S(r,`id`,19,()=>Zl(a)),c=S(r,`ref`,15,null),l=o(r,[`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`id`,`ref`,`date`,`month`]),u=Fd.create({id:X(()=>s()),ref:X(()=>c(),e=>c(e)),date:X(()=>r.date),month:X(()=>r.month)}),d=H(()=>pl(l,u.props));var p=G(),m=U(p),h=e=>{var t=G(),i=U(t);{let e=H(()=>({props:K(d),...u.snippetProps}));n(i,()=>r.child,()=>K(e))}f(e,t)},g=e=>{var a=Ld();t(a,()=>({...K(d)})),n(F(a),()=>r.children??C,()=>u.snippetProps),i(a),f(e,a)};E(m,e=>{r.child?e(h):e(g,-1)}),f(e,p),J()}var zd=d(`<div><!></div>`);function Bd(e,r){let a=O();N(r,!0);let s=S(r,`id`,19,()=>Zl(a)),l=S(r,`ref`,15,null),u=o(r,[`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`id`,`ref`]),d=Id.create({id:X(()=>s()),ref:X(()=>l(),e=>l(e))}),p=H(()=>pl(u,d.props));var m=G(),h=U(m),g=e=>{var t=G(),i=U(t);{let e=H(()=>({props:K(p),...d.snippetProps}));n(i,()=>r.child,()=>K(e))}f(e,t)},_=e=>{var a=zd();t(a,()=>({...K(p)}));var o=F(a),s=e=>{var t=G();n(U(t),()=>r.children??C,()=>d.snippetProps),f(e,t)},l=e=>{var t=D();M(()=>c(t,d.cell.opts.date.current.day)),f(e,t)};E(o,e=>{r.children?e(s):e(l,-1)}),i(a),f(e,a)};E(h,e=>{r.child?e(g):e(_,-1)}),f(e,m),J()}var Vd=d(`<div><!></div>`);function Hd(e,r){let a=O();N(r,!0);let s=S(r,`id`,19,()=>Zl(a)),c=S(r,`ref`,15,null),l=S(r,`value`,15),u=S(r,`onValueChange`,3,Xl),d=S(r,`placeholder`,15),p=S(r,`onPlaceholderChange`,3,Xl),m=S(r,`weekdayFormat`,3,`narrow`),h=S(r,`pagedNavigation`,3,!1),g=S(r,`isDateDisabled`,3,()=>!1),_=S(r,`isDateUnavailable`,3,()=>!1),v=S(r,`fixedWeeks`,3,!1),y=S(r,`numberOfMonths`,3,1),b=S(r,`calendarLabel`,3,`Event`),x=S(r,`disabled`,3,!1),w=S(r,`readonly`,3,!1),T=S(r,`minValue`,3,void 0),D=S(r,`maxValue`,3,void 0),k=S(r,`preventDeselect`,3,!1),ee=S(r,`disableDaysOutsideMonth`,3,!0),A=S(r,`onStartValueChange`,3,Xl),j=S(r,`onEndValueChange`,3,Xl),M=S(r,`excludeDisabled`,3,!1),te=S(r,`monthFormat`,3,`long`),P=S(r,`yearFormat`,3,`numeric`),I=o(r,`$$slots.$$events.$$legacy.children.child.id.ref.value.onValueChange.placeholder.onPlaceholderChange.weekdayFormat.weekStartsOn.pagedNavigation.isDateDisabled.isDateUnavailable.fixedWeeks.numberOfMonths.locale.calendarLabel.disabled.readonly.minValue.maxValue.preventDeselect.disableDaysOutsideMonth.minDays.maxDays.onStartValueChange.onEndValueChange.excludeDisabled.monthFormat.yearFormat`.split(`.`)),ne=W(L(l()?.start)),R=W(L(l()?.end)),B=uu({defaultValue:l()?.start,minValue:T(),maxValue:D()});function re(){d()===void 0&&d(B)}re(),xl.pre(()=>d(),()=>{re()});function V(){l()===void 0&&l({start:void 0,end:void 0})}V(),xl.pre(()=>l(),()=>{V()});let ie=Pd.create({id:X(()=>s()),ref:X(()=>c(),e=>c(e)),value:X(()=>l(),e=>{l(e),u()(e)}),placeholder:X(()=>d(),e=>{d(e),p()(e)}),disabled:X(()=>x()),readonly:X(()=>w()),preventDeselect:X(()=>k()),minValue:X(()=>T()),maxValue:X(()=>D()),isDateUnavailable:X(()=>_()),isDateDisabled:X(()=>g()),pagedNavigation:X(()=>h()),weekStartsOn:X(()=>r.weekStartsOn),weekdayFormat:X(()=>m()),numberOfMonths:X(()=>y()),locale:ru(()=>r.locale),calendarLabel:X(()=>b()),fixedWeeks:X(()=>v()),disableDaysOutsideMonth:X(()=>ee()),minDays:X(()=>r.minDays),maxDays:X(()=>r.maxDays),excludeDisabled:X(()=>M()),startValue:X(()=>K(ne),e=>{z(ne,e,!0),A()(e)}),endValue:X(()=>K(R),e=>{z(R,e,!0),j()(e)}),monthFormat:X(()=>te()),yearFormat:X(()=>P()),defaultPlaceholder:B}),ae=H(()=>pl(I,ie.props));var oe=G(),se=U(oe),ce=e=>{var t=G(),i=U(t);{let e=H(()=>({props:K(ae),...ie.snippetProps}));n(i,()=>r.child,()=>K(e))}f(e,t)},le=e=>{var a=Vd();t(a,()=>({...K(ae)})),n(F(a),()=>r.children??C,()=>ie.snippetProps),i(a),f(e,a)};E(se,e=>{r.child?e(ce):e(le,-1)}),f(e,oe),J()}var Ud=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Wd=(e,t)=>({classGroupId:e,validator:t}),Gd=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Kd=`-`,qd=[],Jd=`arbitrary..`,Yd=e=>{let t=Qd(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return Zd(e);let n=e.split(Kd);return Xd(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?Ud(i,t):t:i||qd}return n[e]||qd}}},Xd=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=Xd(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(Kd):e.slice(t).join(Kd),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},Zd=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?Jd+r:void 0})(),Qd=e=>{let{theme:t,classGroups:n}=e;return $d(n,t)},$d=(e,t)=>{let n=Gd();for(let r in e){let i=e[r];ef(i,n,r,t)}return n},ef=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];tf(i,t,n,r)}},tf=(e,t,n,r)=>{if(typeof e==`string`){nf(e,t,n);return}if(typeof e==`function`){rf(e,t,n,r);return}af(e,t,n,r)},nf=(e,t,n)=>{let r=e===``?t:of(t,e);r.classGroupId=n},rf=(e,t,n,r)=>{if(sf(e)){ef(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Wd(n,e))},af=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];ef(o,of(t,a),n,r)}},of=(e,t)=>{let n=e,r=t.split(Kd),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=Gd(),n.nextPart.set(t,i)),n=i}return n},sf=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,cf=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},lf=`!`,uf=`:`,df=[],ff=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),pf=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===uf){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(lf)?(c=s.slice(0,-1),l=!0):s.startsWith(lf)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return ff(t,l,c,u)};if(t){let e=t+uf,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):ff(df,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},mf=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},hf=e=>({cache:cf(e.cacheSize),parseClassName:pf(e),sortModifiers:mf(e),postfixLookupClassGroupIds:gf(e),...Yd(e)}),gf=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},_f=/\s+/,vf=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(_f),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+lf:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},yf=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=bf(n))&&(i&&(i+=` `),i+=r);return i},bf=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=bf(e[r]))&&(n&&(n+=` `),n+=t);return n},xf=(e,...t)=>{let n,r,i,a,o=o=>(n=hf(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=vf(e,n);return i(e,a),a};return a=o,(...e)=>a(yf(...e))},Sf=[],Cf=e=>{let t=t=>t[e]||Sf;return t.isThemeGetter=!0,t},wf=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Tf=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Ef=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Df=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Of=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,kf=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Af=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,jf=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Mf=e=>Ef.test(e),Z=e=>!!e&&!Number.isNaN(Number(e)),Nf=e=>!!e&&Number.isInteger(Number(e)),Pf=e=>e.endsWith(`%`)&&Z(e.slice(0,-1)),Ff=e=>Df.test(e),If=()=>!0,Lf=e=>Of.test(e)&&!kf.test(e),Rf=()=>!1,zf=e=>Af.test(e),Bf=e=>jf.test(e),Vf=e=>!Q(e)&&!$(e),Hf=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),Uf=e=>ip(e,cp,Rf),Q=e=>wf.test(e),Wf=e=>ip(e,lp,Lf),Gf=e=>ip(e,up,Z),Kf=e=>ip(e,fp,If),qf=e=>ip(e,dp,Rf),Jf=e=>ip(e,op,Rf),Yf=e=>ip(e,sp,Bf),Xf=e=>ip(e,pp,zf),$=e=>Tf.test(e),Zf=e=>ap(e,lp),Qf=e=>ap(e,dp),$f=e=>ap(e,op),ep=e=>ap(e,cp),tp=e=>ap(e,sp),np=e=>ap(e,pp,!0),rp=e=>ap(e,fp,!0),ip=(e,t,n)=>{let r=wf.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},ap=(e,t,n=!1)=>{let r=Tf.exec(e);return r?r[1]?t(r[1]):n:!1},op=e=>e===`position`||e===`percentage`,sp=e=>e===`image`||e===`url`,cp=e=>e===`length`||e===`size`||e===`bg-size`,lp=e=>e===`length`,up=e=>e===`number`,dp=e=>e===`family-name`,fp=e=>e===`number`||e===`weight`,pp=e=>e===`shadow`,mp=()=>{let e=Cf(`color`),t=Cf(`font`),n=Cf(`text`),r=Cf(`font-weight`),i=Cf(`tracking`),a=Cf(`leading`),o=Cf(`breakpoint`),s=Cf(`container`),c=Cf(`spacing`),l=Cf(`radius`),u=Cf(`shadow`),d=Cf(`inset-shadow`),f=Cf(`text-shadow`),p=Cf(`drop-shadow`),m=Cf(`blur`),h=Cf(`perspective`),g=Cf(`aspect`),_=Cf(`ease`),v=Cf(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),$,Q],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[$,Q,c],T=()=>[Mf,`full`,`auto`,...w()],E=()=>[Nf,`none`,`subgrid`,$,Q],D=()=>[`auto`,{span:[`full`,Nf,$,Q]},Nf,$,Q],O=()=>[Nf,`auto`,$,Q],k=()=>[`auto`,`min`,`max`,`fr`,$,Q],ee=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],A=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],j=()=>[`auto`,...w()],M=()=>[Mf,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],te=()=>[Mf,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],N=()=>[Mf,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],P=()=>[e,$,Q],F=()=>[...b(),$f,Jf,{position:[$,Q]}],I=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],L=()=>[`auto`,`cover`,`contain`,ep,Uf,{size:[$,Q]}],ne=()=>[Pf,Zf,Wf],R=()=>[``,`none`,`full`,l,$,Q],z=()=>[``,Z,Zf,Wf],B=()=>[`solid`,`dashed`,`dotted`,`double`],re=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],V=()=>[Z,Pf,$f,Jf],H=()=>[``,`none`,m,$,Q],ie=()=>[`none`,Z,$,Q],ae=()=>[`none`,Z,$,Q],oe=()=>[Z,$,Q],se=()=>[Mf,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[Ff],breakpoint:[Ff],color:[If],container:[Ff],"drop-shadow":[Ff],ease:[`in`,`out`,`in-out`],font:[Vf],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[Ff],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[Ff],shadow:[Ff],spacing:[`px`,Z],text:[Ff],"text-shadow":[Ff],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,Mf,Q,$,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,$,Q]}],"container-named":[Hf],columns:[{columns:[Z,Q,$,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[Nf,`auto`,$,Q]}],basis:[{basis:[Mf,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[Z,Mf,`auto`,`initial`,`none`,Q]}],grow:[{grow:[``,Z,$,Q]}],shrink:[{shrink:[``,Z,$,Q]}],order:[{order:[Nf,`first`,`last`,`none`,$,Q]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...ee(),`normal`]}],"justify-items":[{"justify-items":[...A(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...A()]}],"align-content":[{content:[`normal`,...ee()]}],"align-items":[{items:[...A(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...A(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":ee()}],"place-items":[{"place-items":[...A(),`baseline`]}],"place-self":[{"place-self":[`auto`,...A()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:j()}],mx:[{mx:j()}],my:[{my:j()}],ms:[{ms:j()}],me:[{me:j()}],mbs:[{mbs:j()}],mbe:[{mbe:j()}],mt:[{mt:j()}],mr:[{mr:j()}],mb:[{mb:j()}],ml:[{ml:j()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:M()}],"inline-size":[{inline:[`auto`,...te()]}],"min-inline-size":[{"min-inline":[`auto`,...te()]}],"max-inline-size":[{"max-inline":[`none`,...te()]}],"block-size":[{block:[`auto`,...N()]}],"min-block-size":[{"min-block":[`auto`,...N()]}],"max-block-size":[{"max-block":[`none`,...N()]}],w:[{w:[s,`screen`,...M()]}],"min-w":[{"min-w":[s,`screen`,`none`,...M()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...M()]}],h:[{h:[`screen`,`lh`,...M()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...M()]}],"max-h":[{"max-h":[`screen`,`lh`,...M()]}],"font-size":[{text:[`base`,n,Zf,Wf]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,rp,Kf]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,Pf,Q]}],"font-family":[{font:[Qf,qf,t]}],"font-features":[{"font-features":[Q]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,$,Q]}],"line-clamp":[{"line-clamp":[Z,`none`,$,Gf]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,$,Q]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,$,Q]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:P()}],"text-color":[{text:P()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...B(),`wavy`]}],"text-decoration-thickness":[{decoration:[Z,`from-font`,`auto`,$,Wf]}],"text-decoration-color":[{decoration:P()}],"underline-offset":[{"underline-offset":[Z,`auto`,$,Q]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[Nf,$,Q]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,$,Q]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,$,Q]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:F()}],"bg-repeat":[{bg:I()}],"bg-size":[{bg:L()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},Nf,$,Q],radial:[``,$,Q],conic:[Nf,$,Q]},tp,Yf]}],"bg-color":[{bg:P()}],"gradient-from-pos":[{from:ne()}],"gradient-via-pos":[{via:ne()}],"gradient-to-pos":[{to:ne()}],"gradient-from":[{from:P()}],"gradient-via":[{via:P()}],"gradient-to":[{to:P()}],rounded:[{rounded:R()}],"rounded-s":[{"rounded-s":R()}],"rounded-e":[{"rounded-e":R()}],"rounded-t":[{"rounded-t":R()}],"rounded-r":[{"rounded-r":R()}],"rounded-b":[{"rounded-b":R()}],"rounded-l":[{"rounded-l":R()}],"rounded-ss":[{"rounded-ss":R()}],"rounded-se":[{"rounded-se":R()}],"rounded-ee":[{"rounded-ee":R()}],"rounded-es":[{"rounded-es":R()}],"rounded-tl":[{"rounded-tl":R()}],"rounded-tr":[{"rounded-tr":R()}],"rounded-br":[{"rounded-br":R()}],"rounded-bl":[{"rounded-bl":R()}],"border-w":[{border:z()}],"border-w-x":[{"border-x":z()}],"border-w-y":[{"border-y":z()}],"border-w-s":[{"border-s":z()}],"border-w-e":[{"border-e":z()}],"border-w-bs":[{"border-bs":z()}],"border-w-be":[{"border-be":z()}],"border-w-t":[{"border-t":z()}],"border-w-r":[{"border-r":z()}],"border-w-b":[{"border-b":z()}],"border-w-l":[{"border-l":z()}],"divide-x":[{"divide-x":z()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":z()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...B(),`hidden`,`none`]}],"divide-style":[{divide:[...B(),`hidden`,`none`]}],"border-color":[{border:P()}],"border-color-x":[{"border-x":P()}],"border-color-y":[{"border-y":P()}],"border-color-s":[{"border-s":P()}],"border-color-e":[{"border-e":P()}],"border-color-bs":[{"border-bs":P()}],"border-color-be":[{"border-be":P()}],"border-color-t":[{"border-t":P()}],"border-color-r":[{"border-r":P()}],"border-color-b":[{"border-b":P()}],"border-color-l":[{"border-l":P()}],"divide-color":[{divide:P()}],"outline-style":[{outline:[...B(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[Z,$,Q]}],"outline-w":[{outline:[``,Z,Zf,Wf]}],"outline-color":[{outline:P()}],shadow:[{shadow:[``,`none`,u,np,Xf]}],"shadow-color":[{shadow:P()}],"inset-shadow":[{"inset-shadow":[`none`,d,np,Xf]}],"inset-shadow-color":[{"inset-shadow":P()}],"ring-w":[{ring:z()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:P()}],"ring-offset-w":[{"ring-offset":[Z,Wf]}],"ring-offset-color":[{"ring-offset":P()}],"inset-ring-w":[{"inset-ring":z()}],"inset-ring-color":[{"inset-ring":P()}],"text-shadow":[{"text-shadow":[`none`,f,np,Xf]}],"text-shadow-color":[{"text-shadow":P()}],opacity:[{opacity:[Z,$,Q]}],"mix-blend":[{"mix-blend":[...re(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":re()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[Z]}],"mask-image-linear-from-pos":[{"mask-linear-from":V()}],"mask-image-linear-to-pos":[{"mask-linear-to":V()}],"mask-image-linear-from-color":[{"mask-linear-from":P()}],"mask-image-linear-to-color":[{"mask-linear-to":P()}],"mask-image-t-from-pos":[{"mask-t-from":V()}],"mask-image-t-to-pos":[{"mask-t-to":V()}],"mask-image-t-from-color":[{"mask-t-from":P()}],"mask-image-t-to-color":[{"mask-t-to":P()}],"mask-image-r-from-pos":[{"mask-r-from":V()}],"mask-image-r-to-pos":[{"mask-r-to":V()}],"mask-image-r-from-color":[{"mask-r-from":P()}],"mask-image-r-to-color":[{"mask-r-to":P()}],"mask-image-b-from-pos":[{"mask-b-from":V()}],"mask-image-b-to-pos":[{"mask-b-to":V()}],"mask-image-b-from-color":[{"mask-b-from":P()}],"mask-image-b-to-color":[{"mask-b-to":P()}],"mask-image-l-from-pos":[{"mask-l-from":V()}],"mask-image-l-to-pos":[{"mask-l-to":V()}],"mask-image-l-from-color":[{"mask-l-from":P()}],"mask-image-l-to-color":[{"mask-l-to":P()}],"mask-image-x-from-pos":[{"mask-x-from":V()}],"mask-image-x-to-pos":[{"mask-x-to":V()}],"mask-image-x-from-color":[{"mask-x-from":P()}],"mask-image-x-to-color":[{"mask-x-to":P()}],"mask-image-y-from-pos":[{"mask-y-from":V()}],"mask-image-y-to-pos":[{"mask-y-to":V()}],"mask-image-y-from-color":[{"mask-y-from":P()}],"mask-image-y-to-color":[{"mask-y-to":P()}],"mask-image-radial":[{"mask-radial":[$,Q]}],"mask-image-radial-from-pos":[{"mask-radial-from":V()}],"mask-image-radial-to-pos":[{"mask-radial-to":V()}],"mask-image-radial-from-color":[{"mask-radial-from":P()}],"mask-image-radial-to-color":[{"mask-radial-to":P()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[Z]}],"mask-image-conic-from-pos":[{"mask-conic-from":V()}],"mask-image-conic-to-pos":[{"mask-conic-to":V()}],"mask-image-conic-from-color":[{"mask-conic-from":P()}],"mask-image-conic-to-color":[{"mask-conic-to":P()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:F()}],"mask-repeat":[{mask:I()}],"mask-size":[{mask:L()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,$,Q]}],filter:[{filter:[``,`none`,$,Q]}],blur:[{blur:H()}],brightness:[{brightness:[Z,$,Q]}],contrast:[{contrast:[Z,$,Q]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,np,Xf]}],"drop-shadow-color":[{"drop-shadow":P()}],grayscale:[{grayscale:[``,Z,$,Q]}],"hue-rotate":[{"hue-rotate":[Z,$,Q]}],invert:[{invert:[``,Z,$,Q]}],saturate:[{saturate:[Z,$,Q]}],sepia:[{sepia:[``,Z,$,Q]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,$,Q]}],"backdrop-blur":[{"backdrop-blur":H()}],"backdrop-brightness":[{"backdrop-brightness":[Z,$,Q]}],"backdrop-contrast":[{"backdrop-contrast":[Z,$,Q]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,Z,$,Q]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Z,$,Q]}],"backdrop-invert":[{"backdrop-invert":[``,Z,$,Q]}],"backdrop-opacity":[{"backdrop-opacity":[Z,$,Q]}],"backdrop-saturate":[{"backdrop-saturate":[Z,$,Q]}],"backdrop-sepia":[{"backdrop-sepia":[``,Z,$,Q]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,$,Q]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[Z,`initial`,$,Q]}],ease:[{ease:[`linear`,`initial`,_,$,Q]}],delay:[{delay:[Z,$,Q]}],animate:[{animate:[`none`,v,$,Q]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,$,Q]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:ie()}],"rotate-x":[{"rotate-x":ie()}],"rotate-y":[{"rotate-y":ie()}],"rotate-z":[{"rotate-z":ie()}],scale:[{scale:ae()}],"scale-x":[{"scale-x":ae()}],"scale-y":[{"scale-y":ae()}],"scale-z":[{"scale-z":ae()}],"scale-3d":[`scale-3d`],skew:[{skew:oe()}],"skew-x":[{"skew-x":oe()}],"skew-y":[{"skew-y":oe()}],transform:[{transform:[$,Q,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:se()}],"translate-x":[{"translate-x":se()}],"translate-y":[{"translate-y":se()}],"translate-z":[{"translate-z":se()}],"translate-none":[`translate-none`],zoom:[{zoom:[Nf,$,Q]}],accent:[{accent:P()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:P()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,$,Q]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":P()}],"scrollbar-track-color":[{"scrollbar-track":P()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,$,Q]}],fill:[{fill:[`none`,...P()]}],"stroke-w":[{stroke:[Z,Zf,Wf,Gf]}],stroke:[{stroke:[`none`,...P()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}},hp=(e,{cacheSize:t,prefix:n,experimentalParseClassName:r,extend:i={},override:a={}})=>(gp(e,`cacheSize`,t),gp(e,`prefix`,n),gp(e,`experimentalParseClassName`,r),_p(e.theme,a.theme),_p(e.classGroups,a.classGroups),_p(e.conflictingClassGroups,a.conflictingClassGroups),_p(e.conflictingClassGroupModifiers,a.conflictingClassGroupModifiers),gp(e,`postfixLookupClassGroups`,a.postfixLookupClassGroups),gp(e,`orderSensitiveModifiers`,a.orderSensitiveModifiers),vp(e.theme,i.theme),vp(e.classGroups,i.classGroups),vp(e.conflictingClassGroups,i.conflictingClassGroups),vp(e.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),yp(e,i,`postfixLookupClassGroups`),yp(e,i,`orderSensitiveModifiers`),e),gp=(e,t,n)=>{n!==void 0&&(e[t]=n)},_p=(e,t)=>{if(t)for(let n in t)gp(e,n,t[n])},vp=(e,t)=>{if(t)for(let n in t)yp(e,t,n)},yp=(e,t,n)=>{let r=t[n];r!==void 0&&(e[n]=e[n]?e[n].concat(r):r)},bp=(e,...t)=>typeof e==`function`?xf(mp,e,...t):xf(()=>hp(mp(),e),...t),xp=xf(mp);function Sp(...e){return xp(u(e))}var Cp=d(`<!> <!>`,1),wp=d(`<!> <!>`,1),Tp=d(`<!> <!>`,1),Ep=d(`<!> <!>`,1);function Dp(e,t){N(t,!0);let r=S(t,`ref`,15,null),i=S(t,`value`,15),s=S(t,`placeholder`,15),u=S(t,`weekdayFormat`,3,`short`),d=S(t,`buttonVariant`,3,`ghost`),p=S(t,`captionLayout`,3,`label`),m=S(t,`locale`,3,`en-US`),h=S(t,`yearFormat`,3,`numeric`),g=S(t,`disableDaysOutsideMonth`,3,!1),_=o(t,[`$$slots`,`$$events`,`$$legacy`,`ref`,`value`,`placeholder`,`weekdayFormat`,`class`,`buttonVariant`,`captionLayout`,`locale`,`months`,`years`,`monthFormat`,`yearFormat`,`day`,`disableDaysOutsideMonth`]),v=H(()=>t.monthFormat?t.monthFormat:p().startsWith(`dropdown`)?`short`:`long`);var y=G(),b=U(y);{let e=(e,r)=>{let i=()=>r?.().months,a=()=>r?.().weekdays;var o=G();ke(U(o),()=>Np,(e,r)=>{r(e,{children:(e,r)=>{var o=Ep(),u=U(o);ke(u,()=>gm,(e,t)=>{t(e,{children:(e,t)=>{var n=Cp(),r=U(n);ke(r,()=>nm,(e,t)=>{t(e,{get variant(){return d()}})}),ke(q(r,2),()=>tm,(e,t)=>{t(e,{get variant(){return d()}})}),f(e,n)},$$slots:{default:!0}})}),l(q(u,2),18,i,e=>e,(e,r,i)=>{var o=G();ke(U(o),()=>vm,(e,o)=>{o(e,{children:(e,o)=>{var u=Tp(),d=U(u);ke(d,()=>jp,(e,n)=>{n(e,{children:(e,n)=>{var a=G();ke(U(a),()=>mm,(e,n)=>{n(e,{get captionLayout(){return p()},get months(){return t.months},get monthFormat(){return K(v)},get years(){return t.years},get yearFormat(){return h()},get month(){return r.value},get locale(){return m()},get monthIndex(){return K(i)},get placeholder(){return s()},set placeholder(e){s(e)}})}),f(e,a)},$$slots:{default:!0}})}),ke(q(d,2),()=>Ap,(e,i)=>{i(e,{children:(e,i)=>{var o=wp(),s=U(o);ke(s,()=>bm,(e,t)=>{t(e,{children:(e,t)=>{var n=G();ke(U(n),()=>Pp,(e,t)=>{t(e,{class:`select-none`,children:(e,t)=>{var n=G();l(U(n),17,a,w,(e,t)=>{var n=G();ke(U(n),()=>Fp,(e,n)=>{n(e,{children:(e,n)=>{x();var r=D();M(e=>c(r,e),[()=>K(t).slice(0,2)]),f(e,r)},$$slots:{default:!0}})}),f(e,n)}),f(e,n)},$$slots:{default:!0}})}),f(e,n)},$$slots:{default:!0}})}),ke(q(s,2),()=>ym,(e,i)=>{i(e,{children:(e,i)=>{var a=G();l(U(a),16,()=>r.weeks,e=>e,(e,i)=>{var a=G();ke(U(a),()=>Pp,(e,a)=>{a(e,{class:`mt-2 w-full`,children:(e,a)=>{var o=G();l(U(o),16,()=>i,e=>e,(e,i)=>{var a=G();ke(U(a),()=>Op,(e,a)=>{a(e,{get date(){return i},get month(){return r.value},children:(e,a)=>{var o=G(),s=U(o),c=e=>{var a=G(),o=U(a);{let e=H(()=>({day:i,outsideMonth:!Ut(i,r.value)}));n(o,()=>t.day,()=>K(e))}f(e,a)},l=e=>{var t=G();ke(U(t),()=>kp,(e,t)=>{t(e,{})}),f(e,t)};E(s,e=>{t.day?e(c):e(l,-1)}),f(e,o)},$$slots:{default:!0}})}),f(e,a)}),f(e,o)},$$slots:{default:!0}})}),f(e,a)}),f(e,a)},$$slots:{default:!0}})}),f(e,o)},$$slots:{default:!0}})}),f(e,u)},$$slots:{default:!0}})}),f(e,o)}),f(e,o)},$$slots:{default:!0}})}),f(e,o)},o=H(()=>Sp(`bg-background group/calendar p-2 p-3 [--cell-radius:var(--radius-md)] [--cell-size:--spacing(7)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent`,t.class));ke(b,()=>Hd,(t,n)=>{n(t,a({get weekdayFormat(){return u()},get disableDaysOutsideMonth(){return g()},get class(){return K(o)},get locale(){return m()},get monthFormat(){return K(v)},get yearFormat(){return h()}},()=>_,{get ref(){return r()},set ref(e){r(e)},get value(){return i()},set value(e){i(e)},get placeholder(){return s()},set placeholder(e){s(e)},children:e,$$slots:{default:!0}}))})}f(e,y),J()}function Op(e,t){N(t,!0);let n=S(t,`ref`,15,null),r=o(t,[`$$slots`,`$$events`,`$$legacy`,`ref`,`class`]);var i=G(),s=U(i);{let e=H(()=>Sp(`dark:[&:has([data-range-start])]:hover:bg-accent dark:[&:has([data-range-end])]:hover:bg-accent [&:has([data-range-middle])]:bg-accent dark:[&:has([data-range-middle])]:hover:bg-accent/50 [&:has([data-selected])]:bg-accent relative size-(--cell-size) p-0 text-center text-sm focus-within:z-20 data-[range-middle]:rounded-e-(--cell-radius) [&:first-child[data-selected]_[data-bits-day]]:rounded-s-(--cell-radius) [&:has([data-range-end])]:rounded-e-(--cell-radius) [&:has([data-range-middle])]:rounded-none first:[&:has([data-range-middle])]:rounded-s-(--cell-radius) last:[&:has([data-range-middle])]:rounded-e-(--cell-radius) [&:has([data-range-start])]:rounded-s-(--cell-radius) [&:last-child[data-selected]_[data-bits-day]]:rounded-e-(--cell-radius)`,t.class));ke(s,()=>Rd,(t,i)=>{i(t,a({get class(){return K(e)}},()=>r,{get ref(){return n()},set ref(e){n(e)}}))})}f(e,i),J()}function kp(e,t){N(t,!0);let n=S(t,`ref`,15,null),r=o(t,[`$$slots`,`$$events`,`$$legacy`,`ref`,`class`]);var i=G(),s=U(i);{let e=H(()=>Sp(`flex size-(--cell-size) flex-col items-center justify-center gap-1 rounded-(--cell-radius) p-0 leading-none font-normal whitespace-nowrap select-none`,`not-data-selected:hover:bg-accent/50 not-data-selected:hover:text-accent-foreground`,`[&[data-today]:not([data-selected])]:bg-accent [&[data-today]:not([data-selected])]:text-accent-foreground [&[data-today][data-disabled]]:text-muted-foreground data-[range-middle]:rounded-none`,`data-[range-start]:bg-primary data-[range-start]:text-primary-foreground data-[range-start]:hover:text-foreground`,`data-[range-end]:bg-primary data-[range-end]:text-primary-foreground data-[range-end]:hover:text-foreground`,`[&[data-outside-month]:not([data-selected])]:text-muted-foreground [&[data-outside-month]:not([data-selected])]:hover:text-accent-foreground`,`data-[disabled]:text-muted-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,`data-[unavailable]:line-through`,`dark:data-[range-middle]:hover:bg-accent/0`,`focus:border-ring focus:ring-ring/50 focus:relative`,`[&>span]:text-xs [&>span]:opacity-70`,t.class));ke(s,()=>Bd,(t,i)=>{i(t,a({get class(){return K(e)}},()=>r,{get ref(){return n()},set ref(e){n(e)}}))})}f(e,i),J()}function Ap(e,t){N(t,!0);let n=S(t,`ref`,15,null),r=o(t,[`$$slots`,`$$events`,`$$legacy`,`ref`,`class`]);var i=G(),s=U(i);{let e=H(()=>Sp(`mt-4 flex w-full border-collapse flex-col gap-1`,t.class));ke(s,()=>ud,(t,i)=>{i(t,a({get class(){return K(e)}},()=>r,{get ref(){return n()},set ref(e){n(e)}}))})}f(e,i),J()}function jp(e,t){N(t,!0);let n=S(t,`ref`,15,null),r=o(t,[`$$slots`,`$$events`,`$$legacy`,`ref`,`class`]);var i=G(),s=U(i);{let e=H(()=>Sp(`flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium`,t.class));ke(s,()=>bd,(t,i)=>{i(t,a({get class(){return K(e)}},()=>r,{get ref(){return n()},set ref(e){n(e)}}))})}f(e,i),J()}var Mp=d(`<div><!></div>`);function Np(e,r){N(r,!0);let a=S(r,`ref`,15,null),s=o(r,[`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]);var c=Mp();t(c,e=>({class:e,...s}),[()=>Sp(`relative flex flex-col gap-4 md:flex-row`,r.class)]),n(F(c),()=>r.children??C),i(c),g(c,e=>a(e),()=>a()),f(e,c),J()}function Pp(e,t){N(t,!0);let n=S(t,`ref`,15,null),r=o(t,[`$$slots`,`$$events`,`$$legacy`,`ref`,`class`]);var i=G(),s=U(i);{let e=H(()=>Sp(`flex`,t.class));ke(s,()=>vd,(t,i)=>{i(t,a({get class(){return K(e)}},()=>r,{get ref(){return n()},set ref(e){n(e)}}))})}f(e,i),J()}function Fp(e,t){N(t,!0);let n=S(t,`ref`,15,null),r=o(t,[`$$slots`,`$$events`,`$$legacy`,`ref`,`class`]);var i=G(),s=U(i);{let e=H(()=>Sp(`text-muted-foreground w-(--cell-size) rounded-md text-[0.8rem] font-normal`,t.class));ke(s,()=>gd,(t,i)=>{i(t,a({get class(){return K(e)}},()=>r,{get ref(){return n()},set ref(e){n(e)}}))})}f(e,i),J()}var Ip=/\s+/g,Lp=e=>typeof e!=`string`||!e?e:e.replace(Ip,` `).trim(),Rp=(...e)=>{let t=[],n=e=>{if(!e&&e!==0&&e!==0n)return;if(Array.isArray(e)){for(let t=0,r=e.length;t<r;t++)n(e[t]);return}let r=typeof e;if(r===`string`||r===`number`||r===`bigint`){if(r===`number`&&e!==e)return;t.push(String(e))}else if(r===`object`){let n=Object.keys(e);for(let r=0,i=n.length;r<i;r++){let i=n[r];e[i]&&t.push(i)}}};for(let t=0,r=e.length;t<r;t++){let r=e[t];r!=null&&n(r)}return t.length>0?Lp(t.join(` `)):void 0},zp=e=>e===!1?`false`:e===!0?`true`:e===0?`0`:e,Bp=e=>{if(!e||typeof e!=`object`)return!0;for(let t in e)return!1;return!0},Vp=(e,t)=>{if(e===t)return!0;if(!e||!t)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i=0;i<n.length;i++){let a=n[i];if(!r.includes(a)||e[a]!==t[a])return!1}return!0},Hp=(e,t)=>{for(let n in t)if(Object.prototype.hasOwnProperty.call(t,n)){let r=t[n];n in e?e[n]=Rp(e[n],r):e[n]=r}return e},Up=(e,t)=>{for(let n=0;n<e.length;n++){let r=e[n];Array.isArray(r)?Up(r,t):r&&t.push(r)}},Wp=(...e)=>{let t=[];Up(e,t);let n=[];for(let e=0;e<t.length;e++)t[e]&&n.push(t[e]);return n},Gp=(e,t)=>{let n={};for(let r in e){let i=e[r];if(r in t){let e=t[r];Array.isArray(i)||Array.isArray(e)?n[r]=Wp(e,i):typeof i==`object`&&typeof e==`object`&&i&&e?n[r]=Gp(i,e):n[r]=e+` `+i}else n[r]=i}for(let r in t)r in e||(n[r]=t[r]);return n},Kp={twMerge:!0,twMergeConfig:{}};function qp(){let e=null,t={},n=!1;return{get cachedTwMerge(){return e},set cachedTwMerge(t){e=t},get cachedTwMergeConfig(){return t},set cachedTwMergeConfig(e){t=e},get didTwMergeConfigChange(){return n},set didTwMergeConfigChange(e){n=e},reset(){e=null,t={},n=!1}}}var Jp=qp(),Yp=e=>{let t=(t,n)=>{let{extend:r=null,slots:i={},variants:a={},compoundVariants:o=[],compoundSlots:s=[],defaultVariants:c={}}=t,l={...Kp,...n},u=r?.base?Rp(r.base,t?.base):t?.base,d=r?.variants&&!Bp(r.variants)?Gp(a,r.variants):a,f=r?.defaultVariants&&!Bp(r.defaultVariants)?{...r.defaultVariants,...c}:c;!Bp(l.twMergeConfig)&&!Vp(l.twMergeConfig,Jp.cachedTwMergeConfig)&&(Jp.didTwMergeConfigChange=!0,Jp.cachedTwMergeConfig=l.twMergeConfig);let p=Bp(r?.slots),m=Bp(i)?{}:{base:Rp(t?.base,p&&r?.base),...i},h=p?m:Hp({...r?.slots},Bp(m)?{base:t?.base}:m),g=Bp(r?.compoundVariants)?o:Wp(r?.compoundVariants,o),_=t=>{if(Bp(d)&&Bp(i)&&p)return e(u,t?.class,t?.className)(l);if(g&&!Array.isArray(g))throw TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof g}`);if(s&&!Array.isArray(s))throw TypeError(`The "compoundSlots" prop must be an array. Received: ${typeof s}`);let n=(e,n=d,r=null,i=null)=>{let a=n[e];if(!a||Bp(a))return null;let o=i?.[e]??t?.[e];if(o===null)return null;let s=zp(o);if(typeof s==`object`)return null;let c=f?.[e];return a[(s??zp(c))||`false`]},r=()=>{if(!d)return null;let e=Object.keys(d),t=[];for(let r=0;r<e.length;r++){let i=n(e[r],d);i&&t.push(i)}return t},a=(e,t)=>{if(!d||typeof d!=`object`)return null;let r=[];for(let i in d){let a=n(i,d,e,t),o=e===`base`&&typeof a==`string`?a:a&&a[e];o&&r.push(o)}return r},o={};for(let e in t){let n=t[e];n!==void 0&&(o[e]=n)}let c=(e,n)=>{let r=typeof t?.[e]==`object`?{[e]:t[e]?.initial}:{};return{...f,...o,...r,...n}},m=(e=[],t)=>{let n=[],r=e.length;for(let i=0;i<r;i++){let{class:r,className:a,...o}=e[i],s=!0,l=c(null,t);for(let e in o){let t=o[e],n=l[e];if(Array.isArray(t)){if(!t.includes(n)){s=!1;break}}else{if((t==null||t===!1)&&(n==null||n===!1))continue;if(n!==t){s=!1;break}}}s&&(r&&n.push(r),a&&n.push(a))}return n},_=t=>{let n=m(g,t);if(!Array.isArray(n))return n;let r={},i=e;for(let e=0;e<n.length;e++){let t=n[e];if(typeof t==`string`)r.base=i(r.base,t)(l);else if(typeof t==`object`)for(let e in t)r[e]=i(r[e],t[e])(l)}return r},v=e=>{if(s.length<1)return null;let t={},n=c(null,e);for(let e=0;e<s.length;e++){let{slots:r=[],class:i,className:a,...o}=s[e];if(!Bp(o)){let e=!0;for(let t in o){let r=n[t],i=o[t];if(r===void 0||(Array.isArray(i)?!i.includes(r):i!==r)){e=!1;break}}if(!e)continue}for(let e=0;e<r.length;e++){let n=r[e];t[n]||(t[n]=[]),t[n].push([i,a])}}return t};if(!Bp(i)||!p){let t={};if(typeof h==`object`&&!Bp(h)){let n=e;for(let e in h)t[e]=t=>{let r=_(t),i=v(t);return n(h[e],a(e,t),r?r[e]:void 0,i?i[e]:void 0,t?.class,t?.className)(l)}}return t}return e(u,r(),m(g),t?.class,t?.className)(l)};return _.variantKeys=(()=>{if(!(!d||typeof d!=`object`))return Object.keys(d)})(),_.extend=r,_.base=u,_.slots=h,_.variants=d,_.defaultVariants=f,_.compoundSlots=s,_.compoundVariants=g,_};return{tv:t,createTV:e=>(n,r)=>t(n,r?Gp(e,r):e)}},Xp=e=>Bp(e)?xp:bp({...e,extend:{theme:e.theme,classGroups:e.classGroups,conflictingClassGroupModifiers:e.conflictingClassGroupModifiers,conflictingClassGroups:e.conflictingClassGroups,...e.extend}}),Zp=(e,t)=>{let n=Rp(e);return!n||!(t?.twMerge??!0)?n:((!Jp.cachedTwMerge||Jp.didTwMergeConfigChange)&&(Jp.didTwMergeConfigChange=!1,Jp.cachedTwMerge=Xp(Jp.cachedTwMergeConfig)),Jp.cachedTwMerge(n)||void 0)},{createTV:Qp,tv:$p}=Yp((...e)=>t=>Zp(e,t)),em=$p({base:`focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-lg border border-transparent bg-clip-padding text-sm font-medium focus-visible:ring-3 active:not-aria-[haspopup]:translate-y-px aria-invalid:ring-3 [&_svg:not([class*='size-'])]:size-4 group/button inline-flex shrink-0 items-center justify-center whitespace-nowrap transition-all outline-none select-none disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0`,variants:{variant:{default:`bg-primary text-primary-foreground [a]:hover:bg-primary/80`,outline:`border-border bg-background hover:bg-muted hover:text-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 aria-expanded:bg-muted aria-expanded:text-foreground`,secondary:`bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground`,ghost:`hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground`,destructive:`bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,xs:`h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5`,lg:`h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,icon:`size-8`,"icon-xs":`size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg`,"icon-lg":`size-9`}},defaultVariants:{variant:`default`,size:`default`}});d(`<a><!></a>`),d(`<button><!></button>`);function tm(e,t){N(t,!0);let r=e=>{{let n=H(()=>Sp(`size-4`,t.class));St(e,{get class(){return K(n)}})}},i=S(t,`ref`,15,null),s=S(t,`variant`,3,`ghost`),c=o(t,[`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`,`variant`]);var l=G(),u=U(l);{let e=H(()=>Sp(em({variant:s()}),`size-(--cell-size) bg-transparent p-0 select-none disabled:opacity-50 rtl:rotate-180`,t.class));ke(u,()=>Ed,(o,s)=>{s(o,a({get class(){return K(e)}},()=>c,{get ref(){return i()},set ref(e){i(e)},children:(e,i)=>{var a=G(),o=U(a),s=e=>{var r=G();n(U(r),()=>t.children??C),f(e,r)},c=e=>{r(e)};E(o,e=>{t.children?e(s):e(c,-1)}),f(e,a)},$$slots:{default:!0}}))})}f(e,l),J()}function nm(e,t){N(t,!0);let r=e=>{{let n=H(()=>Sp(`size-4`,t.class));xt(e,{get class(){return K(n)}})}},i=S(t,`ref`,15,null),s=S(t,`variant`,3,`ghost`),c=o(t,[`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`,`variant`]);var l=G(),u=U(l);{let e=H(()=>Sp(em({variant:s()}),`size-(--cell-size) bg-transparent p-0 select-none disabled:opacity-50 rtl:rotate-180`,t.class));ke(u,()=>Od,(o,s)=>{s(o,a({get class(){return K(e)}},()=>c,{get ref(){return i()},set ref(e){i(e)},children:(e,i)=>{var a=G(),o=U(a),s=e=>{var r=G();n(U(r),()=>t.children??C),f(e,r)},c=e=>{r(e)};E(o,e=>{t.children?e(s):e(c,-1)}),f(e,a)},$$slots:{default:!0}}))})}f(e,l),J()}var rm=d(`<option> </option>`),im=d(`<select></select> <span class="[&amp;>svg]:text-muted-foreground flex h-(--cell-size) items-center gap-1 rounded-md ps-2 pe-1 text-sm font-medium select-none [&amp;>svg]:size-3.5" aria-hidden="true"> <!></span>`,1),am=d(`<span><!></span>`);function om(e,n){N(n,!0);let r=S(n,`ref`,15,null),u=o(n,[`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`value`,`onchange`]);var d=am(),p=F(d);{let e=(e,r)=>{let a=()=>r?.().props,o=()=>r?.().monthItems,s=()=>r?.().selectedMonthItem;var u=im(),d=U(u);t(d,()=>({...a(),value:n.value,onchange:n.onchange})),l(d,21,o,e=>e.value,(e,t)=>{var r=rm(),a=F(r,!0);i(r);var o={};M(()=>{m(r,n.value===void 0?K(t).value===s().value:K(t).value===n.value),c(a,K(t).label),o!==(o=K(t).value)&&(r.value=(r.__value=K(t).value)??``)}),f(e,r)}),i(d);var p=q(d,2),h=F(p),g=q(h);{let e=H(()=>Sp(`size-4`,n.class));bt(g,{get class(){return K(e)}})}i(p),M(e=>c(h,`${e??``} `),[()=>o().find(e=>e.value===n.value)?.label||s().label]),f(e,u)};ke(p,()=>wd,(t,n)=>{n(t,a({class:`absolute inset-0 opacity-0`},()=>u,{get ref(){return r()},set ref(e){r(e)},child:e,$$slots:{child:!0}}))})}i(d),M(e=>_(d,1,e),[()=>s(Sp(`has-focus:border-ring border-input has-focus:ring-ring/50 relative flex rounded-md border shadow-xs has-focus:ring-[3px]`,n.class))]),f(e,d),J()}var sm=d(`<option> </option>`),cm=d(`<select></select> <span class="[&amp;>svg]:text-muted-foreground flex h-(--cell-size) items-center gap-1 rounded-md ps-2 pe-1 text-sm font-medium select-none [&amp;>svg]:size-3.5" aria-hidden="true"> <!></span>`,1),lm=d(`<span><!></span>`);function um(e,n){N(n,!0);let r=S(n,`ref`,15,null),u=o(n,[`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`value`]);var d=lm(),p=F(d);{let e=(e,r)=>{let a=()=>r?.().props,o=()=>r?.().yearItems,s=()=>r?.().selectedYearItem;var u=cm(),d=U(u);t(d,()=>({...a(),value:n.value})),l(d,21,o,e=>e.value,(e,t)=>{var r=sm(),a=F(r,!0);i(r);var o={};M(()=>{m(r,n.value===void 0?K(t).value===s().value:K(t).value===n.value),c(a,K(t).label),o!==(o=K(t).value)&&(r.value=(r.__value=K(t).value)??``)}),f(e,r)}),i(d);var p=q(d,2),h=F(p),g=q(h);{let e=H(()=>Sp(`size-4`,n.class));bt(g,{get class(){return K(e)}})}i(p),M(e=>c(h,`${e??``} `),[()=>o().find(e=>e.value===n.value)?.label||s().label]),f(e,u)};ke(p,()=>Md,(t,n)=>{n(t,a({class:`absolute inset-0 opacity-0`},()=>u,{get ref(){return r()},set ref(e){r(e)},child:e,$$slots:{child:!0}}))})}i(d),M(e=>_(d,1,e),[()=>s(Sp(`has-focus:border-ring border-input has-focus:ring-ring/50 relative flex rounded-md border shadow-xs has-focus:ring-[3px]`,n.class))]),f(e,d),J()}var dm=d(`<!> <!>`,1),fm=d(`<!> <!>`,1),pm=d(`<!> <!>`,1);function mm(e,t){N(t,!0);let n=e=>{om(e,{get months(){return t.months},get monthFormat(){return t.monthFormat},get value(){return t.month.month},onchange:e=>{if(!i())return;let t=Number.parseInt(e.currentTarget.value);i(i().set({month:t}).subtract({months:a()}))}})},r=e=>{um(e,{get years(){return t.years},get yearFormat(){return t.yearFormat},get value(){return t.month.year}})},i=S(t,`placeholder`,15),a=S(t,`monthIndex`,3,0);function o(e){let n=e.toDate(tn());return typeof t.yearFormat==`function`?t.yearFormat(n.getFullYear()):new hr(t.locale,{year:t.yearFormat}).format(n)}function s(e){let n=e.toDate(tn());return typeof t.monthFormat==`function`?t.monthFormat(n.getMonth()+1):new hr(t.locale,{month:t.monthFormat}).format(n)}var l=G(),u=U(l),d=e=>{var t=dm(),i=U(t);n(i),r(q(i,2)),f(e,t)},p=e=>{var t=fm(),r=U(t);n(r);var a=q(r,2),s=e=>{var t=D();M(e=>c(t,e),[()=>o(i())]),f(e,t)};E(a,e=>{i()&&e(s)}),f(e,t)},m=e=>{var t=pm(),n=U(t),a=e=>{var t=D();M(e=>c(t,e),[()=>s(i())]),f(e,t)};E(n,e=>{i()&&e(a)}),r(q(n,2)),f(e,t)},h=e=>{var n=D();M((e,t)=>c(n,`${e??``} ${t??``}`),[()=>s(t.month),()=>o(t.month)]),f(e,n)};E(u,e=>{t.captionLayout===`dropdown`?e(d):t.captionLayout===`dropdown-months`?e(p,1):t.captionLayout===`dropdown-years`?e(m,2):e(h,-1)}),f(e,l),J()}var hm=d(`<nav><!></nav>`);function gm(e,r){N(r,!0);let a=S(r,`ref`,15,null),s=o(r,[`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]);var c=hm();t(c,e=>({...s,class:e}),[()=>Sp(`absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1`,r.class)]),n(F(c),()=>r.children??C),i(c),g(c,e=>a(e),()=>a()),f(e,c),J()}var _m=d(`<div><!></div>`);function vm(e,r){N(r,!0);let a=S(r,`ref`,15,null),s=o(r,[`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]);var c=_m();t(c,e=>({...s,class:e}),[()=>Sp(`flex flex-col`,r.class)]),n(F(c),()=>r.children??C),i(c),g(c,e=>a(e),()=>a()),f(e,c),J()}function ym(e,t){N(t,!0);let n=S(t,`ref`,15,null),r=o(t,[`$$slots`,`$$events`,`$$legacy`,`ref`]);var i=G();ke(U(i),()=>fd,(e,t)=>{t(e,a(()=>r,{get ref(){return n()},set ref(e){n(e)}}))}),f(e,i),J()}function bm(e,t){N(t,!0);let n=S(t,`ref`,15,null),r=o(t,[`$$slots`,`$$events`,`$$legacy`,`ref`]);var i=G();ke(U(i),()=>md,(e,t)=>{t(e,a(()=>r,{get ref(){return n()},set ref(e){n(e)}}))}),f(e,i),J()}function xm(e,t){if(!e||!t)return{start:P(Xe(new Date,1)).toISOString(),end:new Date().toISOString()};let n=P(new Date(e.year,e.month-1,e.day)),r=new Date(t.year,t.month-1,t.day);return r=Ye(r)?new Date:ie(r),{start:n.toISOString(),end:r.toISOString()}}var Sm=class{#e=W(L(xm()));get dateRange(){return K(this.#e)}set dateRange(e){z(this.#e,e,!0)}#t=W(L([]));get chartData(){return K(this.#t)}set chartData(e){z(this.#t,e,!0)}#n=W(!1);get loading(){return K(this.#n)}set loading(e){z(this.#n,e,!0)}};async function Cm(e,t){return await Be({entryType:B.pollutant??`pm25`,monitorId:e.id,timestampGte:t.start,timestampLte:t.end}).then(t=>{let n=[],r=e.data_source.name===`PurpleAir`?2:60,i=[];for(let e=t.length-1;e>=0;e--){let a=t[e];if(n.length>1){let e=Ze(a.timestamp),t=n[n.length-1];for(;Math.abs(Ge(e,t))>r+1;)t=Ue(t,r),wm(n,i,a,t)}wm(n,i,a)}return[n.map(e=>qe(e)),i]}).catch(e=>(console.error(`Failed to load chart data: `,e),[]))}function wm(e,t,n,r){e.push(r??Ze(n.timestamp));let i=parseFloat(n.value);t.push(r?null:i>=0?i:0)}function Tm(){return(B.levels??[]).map(e=>[e.range[0],e.color.replace(/^#/,``)])}var Em=-100,Dm=-100,Om={set:(e,t)=>{Em=e,Dm=t},get:()=>({left:Em,top:Dm,y:!1,points:{size:7,fill:(e,t)=>{let n=e.cursor.idxs[t],r=Tm();if(n!=null&&e.series.length>=2&&t===1){let i=e.data[t][n];for(let e=r.length-1;e>=0;e--){let t=r[e];if(i>=t[0])return`#${t[1]}`}}let i=e.series[t].stroke;return i(e,t)}}})},km={pointerEvents:`none`,whiteSpace:`nowrap`,position:`absolute`,backgroundColor:`white`,zIndex:`100`},Am={textAlign:`center`,backgroundColor:`#f5f5f5`,fontWeight:`600`,fontSize:`.8rem`,padding:`.5rem`},jm={margin:`.5rem`,fontSize:`.9rem`};function Mm(){let e,t,n;function r(r,i){let a=r.over;t=document.createElement(`p`),t.classList.add(`card-header`),Object.assign(t.style,Am),e=document.createElement(`div`),e.classList.add(`card`),Object.assign(e.style,km),e.appendChild(t),a.appendChild(e),n=i.series.map((t,n)=>{if(n===0)return;let i=t.stroke,a=document.createElement(`p`);return Object.assign(a.style,jm),a.style.color=i(r,n),n===1&&(a.style.fontWeight=`600`),e.appendChild(a),a});function o(){e.style.display=`none`,n.forEach((e,t)=>{t!=0&&(e.style.display=`none`)})}function s(){e.style.display=`block`,n.forEach((e,t)=>{if(t==0)return;let n=r.series[t];e.style.display=n.show?`block`:`none`})}a.addEventListener(`mouseleave`,()=>{r.cursor.lock||o()}),a.addEventListener(`mouseenter`,()=>{s()}),r.cursor.left<0?setTimeout(()=>o()):s()}function i(r){let{left:i,top:a,idx:o}=r.cursor;if(o==null)return;if(Om.set(i,a),n.forEach((e,n)=>{if(n!=0&&r.series[n].show){let i=r.data[0][o],a=r.data[n][o];if(a===null)e.style.display=`none`;else{e.style.display=`block`;let o=r.series[n].label;o=o?.substring(o.indexOf(`(`)+1,o.indexOf(`)`))||o,t.textContent=ge(Ke(i),`MMM d, yyyy h:mm a`),e.textContent=`${o}: ${a}`}}}),!n.slice(1,n.length).find(e=>e.style.display===`block`)){e.style.display=`none`;return}e.style.display=`block`;let s=e.offsetWidth,c=r.over.offsetWidth,l=i+15+s>c;e.style.left=l?`${i-15-s}px`:`${i+15}px`,e.style.top=a+`px`}return{hooks:{init:r,setCursor:i}}}var Nm=`3572b0`;function Pm(){let e=(B.levels??[]).map(e=>[e.range[0],e.color.replace(/^#/,``)]);return e.push([1/0,`000000`]),e}var Fm={},Im={show:!0,spanGaps:!1,width:1},Lm={...Im,label:`Real Time`,width:2,stroke:e=>Hm(e,`y`,1,Pm(),!0)},Rm={...Im,label:`60 Minute Average`,stroke:e=>Vm(e,Nm)};function zm(e,t,n,r){let i=Bm(e),a=(e,t)=>{let n=i[t].stroke;return n(e,t)};return{width:n,height:r,cursor:Om.get(),select:{show:!1},plugins:[Mm()],series:i,legend:{live:!1,markers:{fill:(e,t)=>a(e,t)}},scales:{x:{range:(e,t,n)=>{let r=Ke(n),i=new Date;return n=Ye(r)&&Je(i,r)?qe(i):n,[t,n]}},y:{range:{min:{mode:1,pad:.1},max:{mode:2,soft:0,pad:.1}}}},axes:[{grid:{show:!1}},{label:B.pollutant===`pm25`?`PM 2.5`:`Ozone`,side:3,values:(e,n)=>n.map(e=>e.toFixed(+(t<5)))}],hooks:{ready:[()=>document.querySelector(`.u-series`).remove()]}}}function Bm(e){let t=Object.assign({},Rm);switch(t.width=2,e){case`airnow`:case`aqview`:case`bam1022`:return[Fm,t];case`airgradient`:case`purpleair`:return[Fm,Lm]}}function Vm(e,t){return e.series.length>2?t:Hm(e,`y`,1,Pm(),!0)}function Hm(e,t,n,r,i=!1){let a=e.scales[t],o,s;for(let e=0;e<r.length;e++){let t=r[e][0];if((t<=a.min||o===void 0)&&(o=e),s=e,t>=a.max)break}if(o==s)return r[o][1];let c=r[o][0],l=r[s][0];c===-1/0&&(c=a.min||0),l===1/0&&(l=a.max||0);let u=e.valToPos(c,t,!0),d=e.valToPos(l,t,!0);if(!u||!d)return;let f=u-d,p,m,h,g;n==1?(p=h=0,m=u,g=d):(m=g=0,p=u,h=d);let _=e.ctx.createLinearGradient(p,m,h,g),v;for(let n=o;n<=s;n++){let a=r[n],c=(u-(n==o?u:n==s?d:e.valToPos(a[0],t,!0)))/f;i&&n>o&&_.addColorStop(c,v),_.addColorStop(c,v=`#${a[1]}`)}return _}var Um=d(`<div class="absolute top-full left-0 z-50 mt-1 rounded border border-gray-200 bg-white p-2 shadow-lg"><!></div>`),Wm=d(`<div class="absolute inset-0 flex flex-col items-center justify-center text-center text-2xl font-bold"><span> </span> <br/> </div>`),Gm=d(`<div><div><div class="flex items-center justify-between gap-2 p-1"><div><button class="cursor-pointer rounded border border-gray-300 px-2 py-1 text-xs hover:bg-gray-50"> </button> <!></div> <button>⬇ Download</button> <div><button class="cursor-pointer rounded p-0.5 hover:bg-gray-100"><!></button></div></div> <div class="chart-area relative svelte-1j6xa4t"><!> <h2> </h2> <button aria-label="Download"></button></div></div></div>`);function Km(e,t){N(t,!0);let n=new Sm,r=W(!1),a=W(L({start:rr(n.dateRange.start,`America/Los_Angeles`),end:rr(n.dateRange.end,`America/Los_Angeles`)})),o=W(void 0),l=W(!1),u=W(void 0),d=W(void 0),m=H(()=>ge(Ze(n.dateRange.start),`MMM d`)+` – `+ge(Ze(n.dateRange.end),`MMM d, yyyy`)),h=H(()=>!n.chartData.length),b=H(()=>n.loading?`Loading Data`:K(h)?`No Data Available For Selected Date Range`:``),x=H(()=>B.pollutant===`pm25`?`PM 2.5`:`Ozone`);me(()=>{t.monitor&&C()}),me(()=>{if(!K(l))return;function e(e){K(u)&&!K(u).contains(e.target)&&((!K(a)?.start||!K(a)?.end)&&z(a,K(o),!0),z(l,!1))}return document.addEventListener(`click`,e),()=>document.removeEventListener(`click`,e)}),me(()=>{n.chartData,K(d)?.()});let S=e=>{let r,i,a=()=>{if(!n.chartData.length)return;let{width:i,height:a}=e.getBoundingClientRect();if(!i||!a)return;let o=n.chartData.slice(1).flat().filter(e=>e!==null);if(!o.length)return;r?.destroy?.(),e.innerHTML=``;let s=Math.max(...o)-Math.min(...o);r=new Ec(zm(t.monitor.type,s,i,a),n.chartData,e)};z(d,a);let o=new ResizeObserver(()=>{cancelAnimationFrame(i),i=requestAnimationFrame(a)});return o.observe(e),()=>{z(d,void 0),cancelAnimationFrame(i),o.disconnect(),r?.destroy?.(),e.innerHTML=``}};async function C(){n.loading=!0,n.chartData=await Cm(t.monitor,n.dateRange),n.loading=!1}function w(){K(a)?.start&&K(a)?.end&&(z(o,K(a),!0),n.dateRange=xm(K(o).start,K(o).end),z(l,!1),C())}function T(){let e=Ve({monitorId:t.monitor.id,entryType:B.pollutant??`pm25`,timestampGte:n.dateRange.start,timestampLte:n.dateRange.end});window.open(e)}function D(e){if(!e.shiftKey)return;let r=e.currentTarget.querySelector(`canvas`);if(!r)return;let i=document.createElement(`a`);i.download=`${t.monitor.name.split(` `).join(`-`)}_${ge(Ze(n.dateRange.start),`dd.MMM.yyyy`)}-${ge(Ze(n.dateRange.end),`dd.MMM.yyyy`)}.png`,i.href=r.toDataURL(),i.click()}function O(e,t){let n=e.parentElement,r=e.nextElementSibling,i=document.getElementById(`SJVAirMonitorMap`);function a(t){n&&i&&(t?i.moveBefore(e,i.firstElementChild):n.moveBefore(e,r))}return a(t),{update:a,destroy(){}}}var k=Gm();let ee;var A=F(k);let j;var te=F(A),P=F(te),I=F(P),ne=F(I,!0);i(I);var R=q(I,2),re=e=>{var t=Um();Dp(F(t),{maxDays:31,onValueChange:w,get value(){return K(a)},set value(e){z(a,e,!0)}}),i(t),f(e,t)};E(R,e=>{K(l)&&e(re)}),i(P),g(P,e=>z(u,e),()=>K(u));var V=q(P,2),ie=q(V,2),ae=F(ie),se=F(ae),ce=e=>{wt(e,{})},U=e=>{Ct(e,{size:16})};E(se,e=>{K(r)?e(ce):e(U,-1)}),i(ae),i(ie),i(te);var le=q(te,2),ue=F(le),de=e=>{var t=Wm(),r=F(t);let a;var o=F(r,!0);i(r);var s=q(r,3);i(t),M(()=>{a=_(r,1,`svelte-1j6xa4t`,null,a,{spin:n.loading}),c(o,n.loading?`↻`:`⚠`),c(s,` ${K(b)??``}`)}),f(e,t)};E(ue,e=>{(n.loading||K(h))&&e(de)});var fe=q(ue,2);let pe;var he=F(fe);i(fe);var G=q(fe,2);let _e;p(G,()=>S),i(le),i(A),i(k),y(k,(e,t)=>O?.(e,t),()=>K(r)),M(()=>{ee=_(k,1,`backdrop svelte-1j6xa4t`,null,ee,{expanded:K(r)}),j=_(A,1,`chart-panel svelte-1j6xa4t`,null,j,{expanded:K(r)}),_(P,1,s([`relative`,{"flex-1":K(r)}])),oe(I,`aria-expanded`,K(l)),c(ne,K(m)),_(V,1,s([`cursor-pointer rounded border border-green-400 bg-green-500 px-2 py-1 text-xs font-semibold text-white hover:bg-green-600`,{"flex-none":K(r)}])),_(ie,1,s([`text-right`,{"flex-1":K(r)}])),oe(ae,`title`,K(r)?`Collapse`:`Expand Chart`),pe=_(fe,1,`text-center text-xl font-bold`,null,pe,{invisible:n.loading||K(h)}),c(he,`${K(x)??``} Readings`),_e=_(G,1,`chart-canvas svelte-1j6xa4t`,null,_e,{invisible:n.loading||K(h)})}),v(`click`,I,()=>z(l,!K(l))),v(`click`,V,T),v(`click`,ae,()=>z(r,!K(r))),v(`click`,G,D),f(e,k),J()}k([`click`]);async function qm(e){if(e.length!==2)throw Error(`Invalid coordinates provided for fetching temperature`);let t=`https://api.weather.gov/points/${e.toReversed().join(`,`)}`;return fetch(t).then(e=>e.json()).then(async e=>(await fetch(e.properties.forecastHourly).then(e=>e.json())).properties.periods[0].temperature)}var Jm={white:`ffffff`,gray:`969696`,black:`000000`,blue:`0000FF`,green:`00e400`,yellow:`ffff00`,orange:`ff7e00`,red:`ff0000`,purple:`8f3f97`,maroon:`7e0023`};function Ym(e,t){if(e>=t[t.length-1].min)return`#${t[t.length-1].color}`;if(e<=0)return`#${t[0].color}`;for(let n=0;n<t.length-1;n++)if(t[n+1].min>e){let r=t[n],i=t[n+1],a=r.min===-1/0?i.min:i.min-r.min,o=(a-(i.min-e))/a;return V(`#${r.color}`,`#${i.color}`,o)}return`#FFFFFF`}var Xm=(e,t=C,n=C,r)=>{let a=ue(()=>Te(r?.(),()=>({}),!0));var o=$m(),l=F(o),u=q(l,2),d=e=>{var t=Zm(),r=F(t,!0);i(t),M(()=>{oe(t,`href`,K(a).href),c(r,n())}),f(e,t)},p=e=>{var t=Qm(),r=F(t,!0);i(t),M(()=>{_(t,1,s([`text-xs whitespace-nowrap`,K(a).labelColorClass??`text-black/70`])),c(r,n())}),f(e,t)};E(u,e=>{K(a).href?e(d):e(p,-1)}),i(o),M(()=>{_(o,1,`flex items-center justify-center gap-1 rounded-sm border px-1 py-0.5
15
+ ${K(a).bgClass??`bg-neutral-100`??``}`),_(l,1,s([`svg-icon`,t(),K(a).iconColorClass??`bg-black/70`]))}),f(e,o)},Zm=d(`<a class="text-link text-xs" target="_blank" translate="no"> </a>`),Qm=d(`<span translate="no"> </span>`),$m=d(`<span><span></span> <!></span>`),eh=d(`<h2 class="text-center text-3xl font-semibold"> </h2> <div class="flex flex-wrap items-center justify-center gap-4"><!> <!> <!> <!> <!></div>`,1),th=d(`<a class="text-link" target="_blank"> </a>`),nh=d(`<span> </span>`),rh=d(`<li><!></li>`),ih=d(`<div class="flex w-full justify-around"><!> <!></div> <!> <!> <div class="w-full"><!></div> <div class="w-full"><h3 class="font-semibold">Data Provided Courtesy Of:</h3> <ul></ul></div>`,1),ah=d(`<div class="flex h-full w-full flex-col overflow-y-auto bg-white"><div class="flex flex-col items-center justify-center gap-8 border-b border-gray-200 p-4 shadow-lg"><button class="cursor-pointer self-end rounded border border-gray-300 px-2 py-1 text-sm hover:bg-gray-50">✕ Close</button> <!></div> <div class="flex flex-col items-center gap-12 overflow-y-auto p-5 pt-10"><!></div></div>`);function oh(e,t){N(t,!0);let n=H(()=>B.latest?.get(r.params.id??``)),a=W(void 0),o=H(()=>{if(!K(n)||!B.meta)return;let e=B.meta.entryType(K(n).latest.entry_type),t=le(K(n).latest.value,e.asIter.levels),r=B.meta.monitorType(K(n).type).expected_interval;return{color:t?.color??``,header:e.label,subheading:`(${r} avg)`,value:Math.round(parseInt(K(n).latest.value,10)).toString()}}),s=[{min:-1/0,color:Jm.blue},{min:65,color:Jm.green},{min:78,color:Jm.yellow},{min:95,color:Jm.red}];me(()=>{K(n)&&K(n).position&&qm(K(n).position.coordinates).then(e=>{z(a,{value:`${e}°F`,color:Ym(e,s)},!0)})});var u=ah(),d=F(u),p=F(d),m=q(p,2),h=e=>{var t=eh(),r=U(t),a=F(r,!0);i(r);var o=q(r,2),s=F(o),l=e=>{Xm(e,()=>`lungs`,()=>`SJVAir`,()=>({bgClass:`bg-aqua-haze`,iconColorClass:`bg-sky-600`,labelColorClass:`text-sky-600`}))};E(s,e=>{K(n).is_sjvair&&e(l)});var u=q(s,2);Xm(u,()=>`rss-feed`,()=>K(n).data_source.name,()=>({href:K(n).data_source.url}));var d=q(u,2);Xm(d,()=>`router`,()=>K(n).device);var p=q(d,2);Xm(p,()=>`location-on`,()=>K(n).county),Xm(q(p,2),()=>`location-searching`,()=>K(n).location),i(o),M(()=>c(a,K(n).name)),f(e,t)};E(m,e=>{K(n)&&e(h)}),i(d);var g=q(d,2),_=F(g),y=e=>{var t=ih(),r=U(t),s=F(r),u=e=>{de(e,{get color(){return K(a).color},header:`Temperature`,get value(){return K(a).value}})};E(s,e=>{K(a)&&e(u)});var d=q(s,2),p=e=>{de(e,{get color(){return K(o).color},get header(){return K(o).header},get subheading(){return K(o).subheading},get value(){return K(o).value}})};E(d,e=>{K(o)&&e(p)}),i(r);var m=q(r,2);Et(m,{get monitorId(){return K(n).id}});var h=q(m,2),g=e=>{jt(e,{get monitorId(){return K(n).id}})};E(h,e=>{globalThis.USER?.is_authenticated&&e(g)});var _=q(h,2);Km(F(_),{get monitor(){return K(n)}}),i(_);var v=q(_,2),y=q(F(v),2);l(y,21,()=>K(n).data_providers,w,(e,t)=>{var n=rh(),r=F(n),a=e=>{var n=th(),r=F(n,!0);i(n),M(()=>{oe(n,`href`,K(t).url),c(r,K(t).name)}),f(e,n)},o=e=>{var n=nh(),r=F(n,!0);i(n),M(()=>c(r,K(t).name)),f(e,n)};E(r,e=>{K(t).url?e(a):e(o,-1)}),i(n),f(e,n)}),i(y),i(v),f(e,t)};E(_,e=>{K(n)&&e(y)}),i(g),i(u),v(`click`,p,()=>b(`/`)),f(e,u),J()}k([`click`]);export{oh as default};
@@ -0,0 +1 @@
1
+ function e(e){let n=t(e),r=n.filter(e=>e.endsWith(`*`));for(let e of r){let t=e.slice(0,-1),r=n.find(e=>e!==`/`&&!e.endsWith(`*`)&&e.startsWith(t===``?`/:`:t)&&e.match(/:[^/]*$/g));r&&console.warn(`Router warning: Wildcard route \`${e}\` should not be at the same level as dynamic route \`${r}\`.`)}}function t(e){let n=[];for(let[r,i]of Object.entries(e))[`layout`,`hooks`,`meta`].includes(r)||(typeof i==`object`?n.push(...t(i).map(e=>e===`*`?r+`/*`:e===`/`?r:r+e)):n.push(r));return n}export{e as validateRoutes};