From a49052bcceec47354e558daab02e2d6f41af5c85 Mon Sep 17 00:00:00 2001 From: caigee-cmd <210803857+caigee-cmd@users.noreply.github.com> Date: Sun, 25 Oct 2026 23:14:28 +0800 Subject: [PATCH] =?UTF-8?q?fix(console):=20=E4=BF=AE=E5=A4=8D=E7=A7=BB?= =?UTF-8?q?=E5=8A=A8=E7=AB=AF=E6=89=B9=E9=87=8F=E5=AF=BC=E5=85=A5=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E9=80=89=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit iOS Safari 会忽略对 display:none 的 file input 的 programmatic click(HeroUI onPress)。 改为 label + sr-only input,确认弹层适配小屏,并同步 embedded static。 --- .../accounts-batch-import-mobile.md | 7 ++ .../account/BatchImportConfirmModal.tsx | 9 +- frontend/src/pages/AccountsPage.tsx | 37 ++++--- ...hart-ByvZPuVI.js => AreaChart-D9uwr1Qd.js} | 2 +- ...2tRdU6bd.js => CartesianChart-DUbE36z1.js} | 2 +- ...hart-BwZuNP1w.js => CostChart-jLwcvRCp.js} | 2 +- ...-HyfslqFR.js => LiveSparkline-MAgciRTL.js} | 2 +- ...t-C3cS3fry.js => TrafficChart-BV8Trn2n.js} | 2 +- .../{XAxis-DHlPOGh6.js => XAxis-NsyDzica.js} | 2 +- .../webui/static/assets/index-B4dA6dPq.js | 96 ------------------- ...{index-dkcaNT1r.css => index-CQ4oknL6.css} | 2 +- .../webui/static/assets/index-DzVBd5P3.js | 96 +++++++++++++++++++ internal/webui/static/index.html | 4 +- 13 files changed, 139 insertions(+), 124 deletions(-) create mode 100644 changelog/unreleased/accounts-batch-import-mobile.md rename internal/webui/static/assets/{AreaChart-ByvZPuVI.js => AreaChart-D9uwr1Qd.js} (60%) rename internal/webui/static/assets/{CartesianChart-2tRdU6bd.js => CartesianChart-DUbE36z1.js} (99%) rename internal/webui/static/assets/{CostChart-BwZuNP1w.js => CostChart-jLwcvRCp.js} (93%) rename internal/webui/static/assets/{LiveSparkline-HyfslqFR.js => LiveSparkline-MAgciRTL.js} (73%) rename internal/webui/static/assets/{TrafficChart-C3cS3fry.js => TrafficChart-BV8Trn2n.js} (98%) rename internal/webui/static/assets/{XAxis-DHlPOGh6.js => XAxis-NsyDzica.js} (99%) delete mode 100644 internal/webui/static/assets/index-B4dA6dPq.js rename internal/webui/static/assets/{index-dkcaNT1r.css => index-CQ4oknL6.css} (88%) create mode 100644 internal/webui/static/assets/index-DzVBd5P3.js diff --git a/changelog/unreleased/accounts-batch-import-mobile.md b/changelog/unreleased/accounts-batch-import-mobile.md new file mode 100644 index 00000000..80416e59 --- /dev/null +++ b/changelog/unreleased/accounts-batch-import-mobile.md @@ -0,0 +1,7 @@ +### English + +- Accounts batch import opens the file picker on mobile again (Safari no longer ignores the hidden-input click), and the confirm sheet fits small screens. + +### 中文 + +- 账号页批量导入在移动端可再次打开文件选择器(Safari 不再忽略隐藏 input 的 click),确认弹层也适配小屏。 diff --git a/frontend/src/components/account/BatchImportConfirmModal.tsx b/frontend/src/components/account/BatchImportConfirmModal.tsx index 8e54f8b8..15ffc5b9 100644 --- a/frontend/src/components/account/BatchImportConfirmModal.tsx +++ b/frontend/src/components/account/BatchImportConfirmModal.tsx @@ -62,12 +62,12 @@ export function BatchImportConfirmModal({ }} > - +
{t('batchImportConfirmTitle')} -

+

{fileName ? t('batchImportConfirmHint', { file: fileName }) : t('batchImportConfirmHintNoFile')} @@ -122,13 +122,14 @@ export function BatchImportConfirmModal({ ) : null} - - {supported ? ( - - + {/* + Mobile Safari ignores programmatic input.click() from React Aria + onPress when the file input is display:none. Associate a real + label with an sr-only input so the picker opens from a direct + user gesture (same detect → confirm → WorkBuddy path). + */} + void onBatchImportFile(event)} /> +

diff --git a/internal/webui/static/assets/AreaChart-ByvZPuVI.js b/internal/webui/static/assets/AreaChart-D9uwr1Qd.js similarity index 60% rename from internal/webui/static/assets/AreaChart-ByvZPuVI.js rename to internal/webui/static/assets/AreaChart-D9uwr1Qd.js index 2417e246..3141ef47 100644 --- a/internal/webui/static/assets/AreaChart-ByvZPuVI.js +++ b/internal/webui/static/assets/AreaChart-D9uwr1Qd.js @@ -1 +1 @@ -import{f as e,h as t}from"./index-B4dA6dPq.js";import{L as n,t as r}from"./CartesianChart-2tRdU6bd.js";var i=t(e()),a=[`axis`],o=(0,i.forwardRef)((e,t)=>i.createElement(r,{chartName:`AreaChart`,defaultTooltipEventType:`axis`,validateTooltipEventTypes:a,tooltipPayloadSearcher:n,categoricalChartProps:e,ref:t}));export{o as t}; \ No newline at end of file +import{f as e,h as t}from"./index-DzVBd5P3.js";import{L as n,t as r}from"./CartesianChart-DUbE36z1.js";var i=t(e()),a=[`axis`],o=(0,i.forwardRef)((e,t)=>i.createElement(r,{chartName:`AreaChart`,defaultTooltipEventType:`axis`,validateTooltipEventTypes:a,tooltipPayloadSearcher:n,categoricalChartProps:e,ref:t}));export{o as t}; \ No newline at end of file diff --git a/internal/webui/static/assets/CartesianChart-2tRdU6bd.js b/internal/webui/static/assets/CartesianChart-DUbE36z1.js similarity index 99% rename from internal/webui/static/assets/CartesianChart-2tRdU6bd.js rename to internal/webui/static/assets/CartesianChart-DUbE36z1.js index 9335eab3..7b42d653 100644 --- a/internal/webui/static/assets/CartesianChart-2tRdU6bd.js +++ b/internal/webui/static/assets/CartesianChart-DUbE36z1.js @@ -1,4 +1,4 @@ -import{c as e,d as t,f as n,h as r,m as i,p as a,u as o}from"./index-B4dA6dPq.js";var s=r(n()),c=`dangerouslySetInnerHTML.onCopy.onCopyCapture.onCut.onCutCapture.onPaste.onPasteCapture.onCompositionEnd.onCompositionEndCapture.onCompositionStart.onCompositionStartCapture.onCompositionUpdate.onCompositionUpdateCapture.onFocus.onFocusCapture.onBlur.onBlurCapture.onChange.onChangeCapture.onBeforeInput.onBeforeInputCapture.onInput.onInputCapture.onReset.onResetCapture.onSubmit.onSubmitCapture.onInvalid.onInvalidCapture.onLoad.onLoadCapture.onError.onErrorCapture.onKeyDown.onKeyDownCapture.onKeyPress.onKeyPressCapture.onKeyUp.onKeyUpCapture.onAbort.onAbortCapture.onCanPlay.onCanPlayCapture.onCanPlayThrough.onCanPlayThroughCapture.onDurationChange.onDurationChangeCapture.onEmptied.onEmptiedCapture.onEncrypted.onEncryptedCapture.onEnded.onEndedCapture.onLoadedData.onLoadedDataCapture.onLoadedMetadata.onLoadedMetadataCapture.onLoadStart.onLoadStartCapture.onPause.onPauseCapture.onPlay.onPlayCapture.onPlaying.onPlayingCapture.onProgress.onProgressCapture.onRateChange.onRateChangeCapture.onSeeked.onSeekedCapture.onSeeking.onSeekingCapture.onStalled.onStalledCapture.onSuspend.onSuspendCapture.onTimeUpdate.onTimeUpdateCapture.onVolumeChange.onVolumeChangeCapture.onWaiting.onWaitingCapture.onAuxClick.onAuxClickCapture.onClick.onClickCapture.onContextMenu.onContextMenuCapture.onDoubleClick.onDoubleClickCapture.onDrag.onDragCapture.onDragEnd.onDragEndCapture.onDragEnter.onDragEnterCapture.onDragExit.onDragExitCapture.onDragLeave.onDragLeaveCapture.onDragOver.onDragOverCapture.onDragStart.onDragStartCapture.onDrop.onDropCapture.onMouseDown.onMouseDownCapture.onMouseEnter.onMouseLeave.onMouseMove.onMouseMoveCapture.onMouseOut.onMouseOutCapture.onMouseOver.onMouseOverCapture.onMouseUp.onMouseUpCapture.onSelect.onSelectCapture.onTouchCancel.onTouchCancelCapture.onTouchEnd.onTouchEndCapture.onTouchMove.onTouchMoveCapture.onTouchStart.onTouchStartCapture.onPointerDown.onPointerDownCapture.onPointerMove.onPointerMoveCapture.onPointerUp.onPointerUpCapture.onPointerCancel.onPointerCancelCapture.onPointerEnter.onPointerEnterCapture.onPointerLeave.onPointerLeaveCapture.onPointerOver.onPointerOverCapture.onPointerOut.onPointerOutCapture.onGotPointerCapture.onGotPointerCaptureCapture.onLostPointerCapture.onLostPointerCaptureCapture.onScroll.onScrollCapture.onWheel.onWheelCapture.onAnimationStart.onAnimationStartCapture.onAnimationEnd.onAnimationEndCapture.onAnimationIteration.onAnimationIterationCapture.onTransitionEnd.onTransitionEndCapture`.split(`.`);function l(e){return typeof e==`string`&&c.includes(e)}var u=new Set(`aria-activedescendant.aria-atomic.aria-autocomplete.aria-busy.aria-checked.aria-colcount.aria-colindex.aria-colspan.aria-controls.aria-current.aria-describedby.aria-details.aria-disabled.aria-errormessage.aria-expanded.aria-flowto.aria-haspopup.aria-hidden.aria-invalid.aria-keyshortcuts.aria-label.aria-labelledby.aria-level.aria-live.aria-modal.aria-multiline.aria-multiselectable.aria-orientation.aria-owns.aria-placeholder.aria-posinset.aria-pressed.aria-readonly.aria-relevant.aria-required.aria-roledescription.aria-rowcount.aria-rowindex.aria-rowspan.aria-selected.aria-setsize.aria-sort.aria-valuemax.aria-valuemin.aria-valuenow.aria-valuetext.className.color.height.id.lang.max.media.method.min.name.style.target.width.role.tabIndex.accentHeight.accumulate.additive.alignmentBaseline.allowReorder.alphabetic.amplitude.arabicForm.ascent.attributeName.attributeType.autoReverse.azimuth.baseFrequency.baselineShift.baseProfile.bbox.begin.bias.by.calcMode.capHeight.clip.clipPath.clipPathUnits.clipRule.colorInterpolation.colorInterpolationFilters.colorProfile.colorRendering.contentScriptType.contentStyleType.cursor.cx.cy.d.decelerate.descent.diffuseConstant.direction.display.divisor.dominantBaseline.dur.dx.dy.edgeMode.elevation.enableBackground.end.exponent.externalResourcesRequired.fill.fillOpacity.fillRule.filter.filterRes.filterUnits.floodColor.floodOpacity.focusable.fontFamily.fontSize.fontSizeAdjust.fontStretch.fontStyle.fontVariant.fontWeight.format.from.fx.fy.g1.g2.glyphName.glyphOrientationHorizontal.glyphOrientationVertical.glyphRef.gradientTransform.gradientUnits.hanging.horizAdvX.horizOriginX.href.ideographic.imageRendering.in2.in.intercept.k1.k2.k3.k4.k.kernelMatrix.kernelUnitLength.kerning.keyPoints.keySplines.keyTimes.lengthAdjust.letterSpacing.lightingColor.limitingConeAngle.local.markerEnd.markerHeight.markerMid.markerStart.markerUnits.markerWidth.mask.maskContentUnits.maskUnits.mathematical.mode.numOctaves.offset.opacity.operator.order.orient.orientation.origin.overflow.overlinePosition.overlineThickness.paintOrder.panose1.pathLength.patternContentUnits.patternTransform.patternUnits.pointerEvents.pointsAtX.pointsAtY.pointsAtZ.preserveAlpha.preserveAspectRatio.primitiveUnits.r.radius.refX.refY.renderingIntent.repeatCount.repeatDur.requiredExtensions.requiredFeatures.restart.result.rotate.rx.ry.seed.shapeRendering.slope.spacing.specularConstant.specularExponent.speed.spreadMethod.startOffset.stdDeviation.stemh.stemv.stitchTiles.stopColor.stopOpacity.strikethroughPosition.strikethroughThickness.string.stroke.strokeDasharray.strokeDashoffset.strokeLinecap.strokeLinejoin.strokeMiterlimit.strokeOpacity.strokeWidth.surfaceScale.systemLanguage.tableValues.targetX.targetY.textAnchor.textDecoration.textLength.textRendering.to.transform.u1.u2.underlinePosition.underlineThickness.unicode.unicodeBidi.unicodeRange.unitsPerEm.vAlphabetic.values.vectorEffect.version.vertAdvY.vertOriginX.vertOriginY.vHanging.vIdeographic.viewTarget.visibility.vMathematical.widths.wordSpacing.writingMode.x1.x2.x.xChannelSelector.xHeight.xlinkActuate.xlinkArcrole.xlinkHref.xlinkRole.xlinkShow.xlinkTitle.xlinkType.xmlBase.xmlLang.xmlns.xmlnsXlink.xmlSpace.y1.y2.y.yChannelSelector.z.zoomAndPan.ref.key.angle`.split(`.`));function d(e){return typeof e==`string`&&u.has(e)}function f(e){return typeof e==`string`&&e.startsWith(`data-`)}function p(e){if(typeof e!=`object`||!e)return{};var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(d(n)||f(n))&&(t[n]=e[n]);return t}function m(e){if(e==null)return null;if((0,s.isValidElement)(e)&&typeof e.props==`object`&&e.props!==null){var t=e.props;return p(t)}return typeof e==`object`&&!Array.isArray(e)?p(e):null}function h(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(d(n)||f(n)||l(n))&&(t[n]=e[n]);return t}function g(e){return e==null?null:(0,s.isValidElement)(e)?h(e.props):typeof e==`object`&&!Array.isArray(e)?h(e):null}var _=r(t()),v=[`children`,`width`,`height`,`viewBox`,`className`,`style`,`title`,`desc`];function y(){return y=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var n=e.children,r=e.width,i=e.height,a=e.viewBox,c=e.className,l=e.style,u=e.title,d=e.desc,f=b(e,v),p=a||{width:r,height:i,x:0,y:0},m=o(`recharts-surface`,c);return s.createElement(`svg`,y({},h(f),{className:m,width:r,height:i,style:l,viewBox:`${p.x} ${p.y} ${p.width} ${p.height}`,ref:t}),s.createElement(`title`,null,u),s.createElement(`desc`,null,d),n)}),C=[`children`,`className`];function w(){return w=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var n=e.children,r=e.className,i=T(e,C),a=o(`recharts-layer`,r);return s.createElement(`g`,w({className:a},h(i),{ref:t}),n)});function O(e){return e===`__proto__`}var k=/\.|(\[(?:[^[\]]*|(["'])(?:(?!\2)[^\\]|\\.)*?\2)\])/;function A(e){switch(typeof e){case`number`:case`symbol`:return!1;case`string`:return e===``||e.startsWith(`.`)||e.endsWith(`.`)?!1:k.test(e);default:return!1}}function j(e){return typeof e==`string`||typeof e==`symbol`?e:Object.is(e?.valueOf?.(),-0)?`-0`:String(e)}function M(e){return typeof e==`symbol`||e instanceof Symbol}function N(e){return e==null?``:ee(e)}function ee(e){if(typeof e==`string`)return e;if(Array.isArray(e))return e.map(ee).join(`,`);if(M(e))return e.toString();let t=e+``;return t===`0`&&Object.is(Number(e),-0)?`-0`:t}function te(e){if(Array.isArray(e))return e.map(j);if(typeof e==`symbol`)return[e];e=N(e);let t=[],n=e.length;if(n===0)return t;let r=0,i=``,a=``,o=!1,s=!1,c=/^-?\d+(?:\.\d+)?$/;for(e.charCodeAt(0)===46&&t.push(``);r1&&arguments[1]!==void 0?arguments[1]:ie),n=Math.round(e*t)/t;return Object.is(n,-0)?0:n}function oe(e){var t=[...arguments].slice(1);return e.reduce((e,n,r)=>{var i=t[r-1];return typeof i==`string`?e+i+n:i===void 0?e+n:e+ae(i)+n},``)}var se=e=>e===0?0:e>0?1:-1,ce=e=>typeof e==`number`&&e!=+e,le=e=>typeof e==`string`&&e.length>1&&e.indexOf(`%`)===e.length-1,P=e=>(typeof e==`number`||e instanceof Number)&&!ce(e),ue=e=>P(e)||typeof e==`string`,de=0,fe=e=>{var t=++de;return`${e||``}${t}`},pe=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,r=arguments.length>3&&arguments[3]!==void 0&&arguments[3];if(!P(e)&&typeof e!=`string`)return n;var i;if(le(e)){if(t==null)return n;var a=e.indexOf(`%`);i=t*parseFloat(e.slice(0,a))/100}else i=+e;return ce(i)&&(i=n),r&&t!=null&&i>t&&(i=t),i},me=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;re&&(typeof t==`function`?t(e):ne(e,t))===n)}var _e=e=>e==null,ve=e=>_e(e)?e:`${e.charAt(0).toUpperCase()}${e.slice(1)}`;function ye(e){return e!=null}function be(){}function xe(e){if(e)return{x:e.x,y:e.y,upperWidth:`upperWidth`in e?e.upperWidth:e.width,lowerWidth:`lowerWidth`in e?e.lowerWidth:e.width,width:e.width,height:e.height}}function Se(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ce(e){for(var t=1;t{var t=e.viewBox,n=e.position,r=e.offset,i=r===void 0?0:r,a=e.parentViewBox,o=e.clamp,s=xe(t),c=s.x,l=s.y,u=s.height,d=s.upperWidth,f=s.lowerWidth,p=c,m=c+(d-f)/2,h=(p+m)/2,g=(d+f)/2,_=p+d/2,v=u>=0?1:-1,y=v*i,b=v>0?`end`:`start`,x=v>0?`start`:`end`,S=d>=0?1:-1,C=S*i,w=S>0?`end`:`start`,T=S>0?`start`:`end`,E=a;if(n===`top`){var D={x:p+d/2,y:l-y,horizontalAnchor:`middle`,verticalAnchor:b};return o&&E&&(D.height=Math.max(l-E.y,0),D.width=d),D}if(n===`bottom`){var O={x:m+f/2,y:l+u+y,horizontalAnchor:`middle`,verticalAnchor:x};return o&&E&&(O.height=Math.max(E.y+E.height-(l+u),0),O.width=f),O}if(n===`left`){var k={x:h-C,y:l+u/2,horizontalAnchor:w,verticalAnchor:`middle`};return o&&E&&(k.width=Math.max(k.x-E.x,0),k.height=u),k}if(n===`right`){var A={x:h+g+C,y:l+u/2,horizontalAnchor:T,verticalAnchor:`middle`};return o&&E&&(A.width=Math.max(E.x+E.width-A.x,0),A.height=u),A}var j=o&&E?{width:g,height:u}:{};return n===`insideLeft`?Ce({x:h+C,y:l+u/2,horizontalAnchor:T,verticalAnchor:`middle`},j):n===`insideRight`?Ce({x:h+g-C,y:l+u/2,horizontalAnchor:w,verticalAnchor:`middle`},j):n===`insideTop`?Ce({x:p+d/2,y:l+y,horizontalAnchor:`middle`,verticalAnchor:x},j):n===`insideBottom`?Ce({x:m+f/2,y:l+u-y,horizontalAnchor:`middle`,verticalAnchor:b},j):n===`insideTopLeft`?Ce({x:p+C,y:l+y,horizontalAnchor:T,verticalAnchor:x},j):n===`insideTopRight`?Ce({x:p+d-C,y:l+y,horizontalAnchor:w,verticalAnchor:x},j):n===`insideBottomLeft`?Ce({x:m+C,y:l+u-y,horizontalAnchor:T,verticalAnchor:b},j):n===`insideBottomRight`?Ce({x:m+f-C,y:l+u-y,horizontalAnchor:w,verticalAnchor:b},j):n&&typeof n==`object`&&(P(n.x)||le(n.x))&&(P(n.y)||le(n.y))?Ce({x:c+pe(n.x,g),y:l+pe(n.y,u),horizontalAnchor:`end`,verticalAnchor:`end`},j):Ce({x:_,y:l+u/2,horizontalAnchor:`middle`,verticalAnchor:`middle`},j)},Oe=[`top`,`left`,`right`,`bottom`];function ke(e){return e==null?!1:typeof e==`object`||Oe.includes(e)}var Ae=(0,s.createContext)(null);function F(e){return function(){return e}}var je=Math.PI,Me=2*je,Ne=1e-6,Pe=Me-Ne;function Fe(e){this._+=e[0];for(let t=1,n=e.length;t=0))throw Error(`invalid digits: ${e}`);if(t>15)return Fe;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;tNe){if(!(Math.abs(u*s-c*l)>Ne)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((je-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>Ne&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>Ne||Math.abs(this._y1-l)>Ne)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%Me+Me),d>Pe?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>Ne&&this._append`A${n},${n},0,${+(d>=je)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};Le.prototype;function Re(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new Le(t)}Array.prototype.slice;function ze(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function Be(e){this._context=e}Be.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};function Ve(e){return new Be(e)}function He(e){return e[0]}function Ue(e){return e[1]}function We(e,t){var n=F(!0),r=null,i=Ve,a=null,o=Re(s);e=typeof e==`function`?e:e===void 0?He:F(e),t=typeof t==`function`?t:t===void 0?Ue:F(t);function s(s){var c,l=(s=ze(s)).length,u,d=!1,f;for(r??(a=i(f=o())),c=0;c<=l;++c)!(c=d;--f)s.point(_[f],v[f]);s.lineEnd(),s.areaEnd()}}h&&(_[u]=+e(m,u,l),v[u]=+t(m,u,l),s.point(r?+r(m,u,l):_[u],n?+n(m,u,l):v[u]))}if(g)return s=null,g+``||null}function u(){return We().defined(i).curve(o).context(a)}return l.x=function(t){return arguments.length?(e=typeof t==`function`?t:F(+t),r=null,l):e},l.x0=function(t){return arguments.length?(e=typeof t==`function`?t:F(+t),l):e},l.x1=function(e){return arguments.length?(r=e==null?null:typeof e==`function`?e:F(+e),l):r},l.y=function(e){return arguments.length?(t=typeof e==`function`?e:F(+e),n=null,l):t},l.y0=function(e){return arguments.length?(t=typeof e==`function`?e:F(+e),l):t},l.y1=function(e){return arguments.length?(n=e==null?null:typeof e==`function`?e:F(+e),l):n},l.lineX0=l.lineY0=function(){return u().x(e).y(t)},l.lineY1=function(){return u().x(e).y(n)},l.lineX1=function(){return u().x(r).y(t)},l.defined=function(e){return arguments.length?(i=typeof e==`function`?e:F(!!e),l):i},l.curve=function(e){return arguments.length?(o=e,a!=null&&(s=o(a)),l):o},l.context=function(e){return arguments.length?(e==null?a=s=null:s=o(a=e),l):a},l}var Ke=class{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t)}this._x0=e,this._y0=t}};function qe(e){return new Ke(e,!0)}function Je(e){return new Ke(e,!1)}function Ye(){}function Xe(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function Ze(e){this._context=e}Ze.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Xe(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Xe(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Qe(e){return new Ze(e)}function $e(e){this._context=e}$e.prototype={areaStart:Ye,areaEnd:Ye,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Xe(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function et(e){return new $e(e)}function tt(e){this._context=e}tt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:Xe(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function nt(e){return new tt(e)}function rt(e){this._context=e}rt.prototype={areaStart:Ye,areaEnd:Ye,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function it(e){return new rt(e)}function at(e){return e<0?-1:1}function ot(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(at(a)+at(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function st(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function ct(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function lt(e){this._context=e}lt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:ct(this,this._t0,st(this,this._t0))}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,e!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,ct(this,st(this,n=ot(this,e,t)),n);break;default:ct(this,this._t0,n=ot(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function ut(e){this._context=new dt(e)}(ut.prototype=Object.create(lt.prototype)).point=function(e,t){lt.prototype.point.call(this,t,e)};function dt(e){this._context=e}dt.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function ft(e){return new lt(e)}function pt(e){return new ut(e)}function mt(e){this._context=e}mt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n){if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=ht(e),i=ht(t),a=0,o=1;o=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};function vt(e){return new _t(e,.5)}function yt(e){return new _t(e,0)}function bt(e){return new _t(e,1)}function xt(e,t){if((o=e.length)>1)for(var n=1,r,i,a=e[t[0]],o,s=a.length;n=0;)n[t]=t;return n}function Ct(e,t){return e[t]}function wt(e){let t=[];return t.key=e,t}function Tt(){var e=F([]),t=St,n=xt,r=Ct;function i(i){var a=Array.from(e.apply(this,arguments),wt),o,s=a.length,c=-1,l;for(let e of i)for(o=0,++c;o0){for(var n,r,i=0,a=e[0].length,o;i0){for(var n=0,r=e[t[0]],i,a=r.length;n0)||!((a=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,a,o;r`radius`in e&&`startAngle`in e&&`endAngle`in e,At=(e,t)=>{if(!e||typeof e==`function`||typeof e==`boolean`)return null;var n=e;if((0,s.isValidElement)(e)&&(n=e.props),typeof n!=`object`&&typeof n!=`function`)return null;var r={};return Object.keys(n).forEach(e=>{l(e)&&typeof n[e]==`function`&&(r[e]=t||(t=>n[e](n,t)))}),r},jt=(e,t,n)=>r=>(e(t,n,r),null),Mt=(e,t,n)=>{if(e===null||typeof e!=`object`&&typeof e!=`function`)return null;var r=null;return Object.keys(e).forEach(i=>{var a=e[i];l(i)&&typeof a==`function`&&(r||={},r[i]=jt(a,t,n))}),r};function Nt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Pt(e){for(var t=1;t(e[t]===void 0&&r[t]!==void 0&&(e[t]=r[t]),e),n)}function zt(e){return Number.isSafeInteger(e)&&e>=0}function Bt(e){return e!=null&&typeof e!=`function`&&zt(e.length)}function Vt(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function Ht(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var Ut=`[object RegExp]`,Wt=`[object String]`,Gt=`[object Number]`,Kt=`[object Boolean]`,qt=`[object Arguments]`,Jt=`[object Symbol]`,Yt=`[object Date]`,Xt=`[object Map]`,Zt=`[object Set]`,Qt=`[object Array]`,$t=`[object Function]`,en=`[object ArrayBuffer]`,tn=`[object Object]`,nn=`[object Error]`,rn=`[object DataView]`,an=`[object Uint8Array]`,on=`[object Uint8ClampedArray]`,sn=`[object Uint16Array]`,cn=`[object Uint32Array]`,ln=`[object BigUint64Array]`,un=`[object Int8Array]`,dn=`[object Int16Array]`,fn=`[object Int32Array]`,pn=`[object BigInt64Array]`,mn=`[object Float32Array]`,hn=`[object Float64Array]`,gn=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window||typeof self==`object`&&self||typeof global==`object`&&global||(function(){return this})();function _n(e){return gn.Buffer!==void 0&&gn.Buffer.isBuffer(e)}function vn(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}function yn(e){return e!==null&&(typeof e==`object`||typeof e==`function`)}var bn=/^(?:0|[1-9]\d*)$/;function xn(e,t=2**53-1){switch(typeof e){case`number`:return Number.isInteger(e)&&e>=0&&e{var r=n(),i=e();function a(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var o=typeof Object.is==`function`?Object.is:a,s=i.useSyncExternalStore,c=r.useRef,l=r.useEffect,u=r.useMemo,d=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var a=c(null);if(a.current===null){var f={hasValue:!1,value:null};a.current=f}else f=a.current;a=u(function(){function e(e){if(!a){if(a=!0,s=e,e=r(e),i!==void 0&&f.hasValue){var t=f.value;if(i(t,e))return c=t}return c=e}if(t=c,o(s,e))return t;var n=r(e);return i!==void 0&&i(t,n)?(s=e,t):(s=e,c=n)}var a=!1,s,c,l=n===void 0?null:n;return[function(){return e(t())},l===null?void 0:function(){return e(l())}]},[t,n,r,i]);var p=s(e,a[0],a[1]);return l(function(){f.hasValue=!0,f.value=p},[p]),d(p),p}})),Cn=a(((e,t)=>{t.exports=Sn()}))(),wn=(0,s.createContext)(null),Tn=e=>e,I=()=>{var e=(0,s.useContext)(wn);return e?e.store.dispatch:Tn},En=()=>{},Dn=()=>En,On=(e,t)=>e===t;function L(e){var t=(0,s.useContext)(wn),n=(0,s.useMemo)(()=>t?t=>{if(t!=null)return e(t)}:En,[t,e]);return(0,Cn.useSyncExternalStoreWithSelector)(t?t.subscription.addNestedSub:Dn,t?t.store.getState:En,t?t.store.getState:En,n,On)}function kn(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!=`function`)throw TypeError(t)}function An(e,t=`expected all items to be functions, instead received the following types: `){if(!e.every(e=>typeof e==`function`)){let n=e.map(e=>typeof e==`function`?`function ${e.name||`unnamed`}()`:typeof e).join(`, `);throw TypeError(`${t}[${n}]`)}}var jn=e=>Array.isArray(e)?e:[e];function Mn(e){let t=Array.isArray(e[0])?e[0]:e;return An(t,`createSelector expects all input-selectors to be functions, but received the following types: `),t}function Nn(e,t){let n=[],{length:r}=e;for(let i=0;i`u`?Pn:WeakRef,In=0,Ln=1;function Rn(){return{s:In,v:void 0,o:null,p:null}}function zn(e){return e instanceof Fn?e.deref():e}function Bn(e,t={}){let n=Rn(),{resultEqualityCheck:r}=t,i,a=0;function o(){let t=n,{length:o}=arguments;for(let e=0,n=o;e{n=Rn(),o.resetResultsCount()},o.resultsCount=()=>a,o.resetResultsCount=()=>{a=0},o}function Vn(e,...t){let n=typeof e==`function`?{memoize:e,memoizeOptions:t}:e,r=(...e)=>{let t=0,r=0,i,a={},o=e.pop();typeof o==`object`&&(a=o,o=e.pop()),kn(o,`createSelector expects an output function after the inputs, but received: [${typeof o}]`);let{memoize:s,memoizeOptions:c=[],argsMemoize:l=Bn,argsMemoizeOptions:u=[]}={...n,...a},d=jn(c),f=jn(u),p=Mn(e),m=s(function(){return t++,o.apply(null,arguments)},...d),h=l(function(){r++;let e=Nn(p,arguments);return i=m.apply(null,e),i},...f);return Object.assign(h,{resultFunc:o,memoizedResultFunc:m,dependencies:p,dependencyRecomputations:()=>r,resetDependencyRecomputations:()=>{r=0},lastResult:()=>i,recomputations:()=>t,resetRecomputations:()=>{t=0},memoize:s,argsMemoize:l})};return Object.assign(r,{withTypes:()=>r}),r}var R=Vn(Bn);function Hn(e,t=1){let n=[],r=Math.floor(t),i=(e,t)=>{for(let a=0;a{if(e!==t){let r=Wn(e),i=Wn(t);if(r===i&&r===0){if(et)return n===`desc`?-1:1}return n===`desc`?i-r:r-i}return 0},Kn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,qn=/^\w*$/;function Jn(e,t){return Array.isArray(e)?!1:typeof e==`number`||typeof e==`boolean`||e==null||M(e)?!0:typeof e==`string`&&(qn.test(e)||!Kn.test(e))||t!=null&&Object.hasOwn(t,e)}function Yn(e,t,n,r){if(e==null)return[];n=r?void 0:n,Array.isArray(e)||(e=Bt(e)?Array.from(e):Object.values(e)),Array.isArray(t)||(t=t==null?[null]:[t]),t.length===0&&(t=[null]),Array.isArray(n)||(n=n==null?[]:[n]),n=n.map(e=>String(e));let i=(e,t)=>{let n=e,r=0;for(;r0&&r===t.length?n:void 0},a=(e,t)=>{if(e==null)return t;if(t!=null)return typeof e==`object`&&`key`in e?Object.hasOwn(t,e.key)?t[e.key]:i(t,e.path):typeof e==`function`?e(t):Array.isArray(e)?i(t,e):t[e]},o=t.map(e=>(Array.isArray(e)&&e.length===1&&(e=e[0]),e==null||typeof e==`function`||Array.isArray(e)||Jn(e)?e:{key:e,path:te(e)}));return e.map(e=>({original:e,criteria:o.map(t=>a(t,e))})).slice().sort((e,t)=>{for(let r=0;re.original)}function Xn(e,...t){let n=t.length;return n>1&&Un(e,t[0],t[1])?t=[]:n>2&&Un(t[0],t[1],t[2])&&(t=[t[0]]),Yn(e,Hn(t),[`asc`])}var Zn=e=>e.legend.settings,Qn=e=>e.legend.size;R([e=>e.legend.payload,Zn],(e,t)=>{var n=t.itemSorter,r=e.flat(1);return n?Xn(r,n):r});function z(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var $n=typeof Symbol==`function`&&Symbol.observable||`@@observable`,er=()=>Math.random().toString(36).substring(7).split(``).join(`.`),tr={INIT:`@@redux/INIT${er()}`,REPLACE:`@@redux/REPLACE${er()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${er()}`};function nr(e){if(typeof e!=`object`||!e)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function rr(e,t,n){if(typeof e!=`function`)throw Error(z(2));if(typeof t==`function`&&typeof n==`function`||typeof n==`function`&&typeof arguments[3]==`function`)throw Error(z(0));if(typeof t==`function`&&n===void 0&&(n=t,t=void 0),n!==void 0){if(typeof n!=`function`)throw Error(z(1));return n(rr)(e,t)}let r=e,i=t,a=new Map,o=a,s=0,c=!1;function l(){o===a&&(o=new Map,a.forEach((e,t)=>{o.set(t,e)}))}function u(){if(c)throw Error(z(3));return i}function d(e){if(typeof e!=`function`)throw Error(z(4));if(c)throw Error(z(5));let t=!0;l();let n=s++;return o.set(n,e),function(){if(t){if(c)throw Error(z(6));t=!1,l(),o.delete(n),a=null}}}function f(e){if(!nr(e))throw Error(z(7));if(e.type===void 0)throw Error(z(8));if(typeof e.type!=`string`)throw Error(z(17));if(c)throw Error(z(9));try{c=!0,i=r(i,e)}finally{c=!1}return(a=o).forEach(e=>{e()}),e}function p(e){if(typeof e!=`function`)throw Error(z(10));r=e,f({type:tr.REPLACE})}function m(){let e=d;return{subscribe(t){if(typeof t!=`object`||!t)throw Error(z(11));function n(){let e=t;e.next&&e.next(u())}return n(),{unsubscribe:e(n)}},[$n](){return this}}}return f({type:tr.INIT}),{dispatch:f,subscribe:d,getState:u,replaceReducer:p,[$n]:m}}function ir(e){Object.keys(e).forEach(t=>{let n=e[t];if(n(void 0,{type:tr.INIT})===void 0)throw Error(z(12));if(n(void 0,{type:tr.PROBE_UNKNOWN_ACTION()})===void 0)throw Error(z(13))})}function ar(e){let t=Object.keys(e),n={};for(let r=0;re:e.length===1?e[0]:e.reduce((e,t)=>(...n)=>e(t(...n)))}function sr(...e){return t=>(n,r)=>{let i=t(n,r),a=()=>{throw Error(z(15))},o={getState:i.getState,dispatch:(e,...t)=>a(e,...t)};return a=or(...e.map(e=>e(o)))(i.dispatch),{...i,dispatch:a}}}function cr(e){return nr(e)&&`type`in e&&typeof e.type==`string`}var lr=Symbol.for(`immer-nothing`),ur=Symbol.for(`immer-draftable`),dr=Symbol.for(`immer-state`);function fr(e,...t){throw Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var pr=Object,mr=pr.getPrototypeOf,hr=`constructor`,gr=`prototype`,_r=`configurable`,vr=`enumerable`,yr=`writable`,br=`value`,xr=e=>!!e&&!!e[dr];function Sr(e){return e?Tr(e)||Mr(e)||!!e[ur]||!!e[hr]?.[ur]||Nr(e)||Pr(e):!1}var Cr=pr[gr][hr].toString(),wr=new WeakMap;function Tr(e){if(!e||!Fr(e))return!1;let t=mr(e);if(t===null||t===pr[gr])return!0;let n=pr.hasOwnProperty.call(t,hr)&&t[hr];if(n===Object)return!0;if(!Ir(n))return!1;let r=wr.get(n);return r===void 0&&(r=Function.toString.call(n),wr.set(n,r)),r===Cr}function Er(e,t,n=!0){Dr(e)===0?(n?Reflect.ownKeys(e):pr.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Dr(e){let t=e[dr];return t?t.type_:Mr(e)?1:Nr(e)?2:Pr(e)?3:0}var Or=(e,t,n=Dr(e))=>n===2?e.has(t):pr[gr].hasOwnProperty.call(e,t),kr=(e,t,n=Dr(e))=>n===2?e.get(t):e[t],Ar=(e,t,n,r=Dr(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function jr(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}var Mr=Array.isArray,Nr=e=>e instanceof Map,Pr=e=>e instanceof Set,Fr=e=>typeof e==`object`,Ir=e=>typeof e==`function`,Lr=e=>typeof e==`boolean`;function Rr(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var zr=e=>e.copy_||e.base_,Br=e=>e.modified_?e.copy_:e.base_;function Vr(e,t){if(Nr(e))return new Map(e);if(Pr(e))return new Set(e);if(Mr(e))return Array[gr].slice.call(e);let n=Tr(e);if(t===!0||t===`class_only`&&!n){let t=pr.getOwnPropertyDescriptors(e);delete t[dr];let n=Reflect.ownKeys(t);for(let r=0;r1&&pr.defineProperties(e,{set:Wr,add:Wr,clear:Wr,delete:Wr}),pr.freeze(e),t&&Er(e,(e,t)=>{Hr(t,!0)},!1),e)}function Ur(){fr(2)}var Wr={[br]:Ur};function Gr(e){return e===null||!Fr(e)||pr.isFrozen(e)}var Kr=`MapSet`,qr=`Patches`,Jr=`ArrayMethods`,Yr={};function Xr(e){let t=Yr[e];return t||fr(0,e),t}var Zr=e=>!!Yr[e],Qr,$r=()=>Qr,ei=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Zr(Kr)?Xr(Kr):void 0,arrayMethodsPlugin_:Zr(Jr)?Xr(Jr):void 0});function ti(e,t){t&&(e.patchPlugin_=Xr(qr),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function ni(e){ri(e),e.drafts_.forEach(ai),e.drafts_=null}function ri(e){e===Qr&&(Qr=e.parent_)}var ii=e=>Qr=ei(Qr,e);function ai(e){let t=e[dr];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function oi(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[dr].modified_&&(ni(t),fr(4)),Sr(e)&&(e=si(t,e));let{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[dr].base_,e,t)}else e=si(t,n);return ci(t,e,!0),ni(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===lr?void 0:e}function si(e,t){if(Gr(t))return t;let n=t[dr];if(!n)return gi(t,e.handledSet_,e);if(!ui(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){let{callbacks_:t}=n;if(t)for(;t.length>0;)t.pop()(e);mi(n,e)}return n.copy_}function ci(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Hr(t,n)}function li(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var ui=(e,t)=>e.scope_===t,di=[];function fi(e,t,n,r){let i=zr(e),a=e.type_;if(r!==void 0&&kr(i,r,a)===t){Ar(i,r,n,a);return}if(!e.draftLocations_){let t=e.draftLocations_=new Map;Er(i,(e,n)=>{if(xr(n)){let r=t.get(n)||[];r.push(e),t.set(n,r)}})}let o=e.draftLocations_.get(t)??di;for(let e of o)Ar(i,e,n,a)}function pi(e,t,n){e.callbacks_.push(function(r){let i=t;if(!i||!ui(i,r))return;r.mapSetPlugin_?.fixSetContents(i);let a=Br(i);fi(e,i.draft_??i,a,n),mi(i,r)})}function mi(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let r=n.getPath(e);r&&n.generatePatches_(e,r,t)}li(e)}}function hi(e,t,n){let{scope_:r}=e;if(xr(n)){let i=n[dr];ui(i,r)&&i.callbacks_.push(function(){Ti(e),fi(e,n,Br(i),t)})}else Sr(n)&&e.callbacks_.push(function(){let i=zr(e);e.type_===3?i.has(n)&&gi(n,r.handledSet_,r):kr(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&gi(kr(e.copy_,t,e.type_),r.handledSet_,r)})}function gi(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||xr(e)||t.has(e)||!Sr(e)||Gr(e)?e:(t.add(e),Er(e,(r,i)=>{if(xr(i)){let t=i[dr];ui(t,n)&&(Ar(e,r,Br(t),e.type_),li(t))}else Sr(i)&&gi(i,t,n)}),e)}function _i(e,t){let n=Mr(e),r={type_:+!!n,scope_:t?t.scope_:$r(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},i=r,a=vi;n&&(i=[r],a=yi);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}var vi={get(e,t){if(t===dr)return e;let n=e.scope_.arrayMethodsPlugin_,r=e.type_===1&&typeof t==`string`;if(r&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);let i=zr(e);if(!Or(i,t,e.type_))return Si(e,i,t);let a=i[t];if(e.finalized_||!Sr(a)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&Rr(t))return a;if(a===bi(e.base_,t)||xi(e,t,a)){Ti(e);let n=e.type_===1?+t:t,r=Di(e.scope_,a,e,n);return e.copy_[n]=r}return a},has(e,t){return t in zr(e)},ownKeys(e){return Reflect.ownKeys(zr(e))},set(e,t,n){let r=Ci(zr(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=bi(zr(e),t),i=r?.[dr];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(jr(n,r)&&(n!==void 0||Or(e.base_,t,e.type_)))return!0;Ti(e),wi(e)}return e.copy_[t]===n&&(n!==void 0||Or(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])?!0:(e.copy_[t]=n,e.assigned_.set(t,!0),hi(e,t,n),!0)},deleteProperty(e,t){return Ti(e),bi(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),wi(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=zr(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[yr]:!0,[_r]:e.type_!==1||t!==`length`,[vr]:r[vr],[br]:n[t]}},defineProperty(){fr(11)},getPrototypeOf(e){return mr(e.base_)},setPrototypeOf(){fr(12)}},yi={};for(let e in vi){let t=vi[e];yi[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}yi.deleteProperty=function(e,t){return yi.set.call(this,e,t,void 0)},yi.set=function(e,t,n){return vi.set.call(this,e[0],t,n,e[0])};function bi(e,t){let n=e[dr];return(n?zr(n):e)[t]}function xi(e,t,n){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!Sr(n)||n[dr]?!1:e.baseRefs_.has(n)}function Si(e,t,n){let r=Ci(t,n);return r?br in r?r[br]:r.get?.call(e.draft_):void 0}function Ci(e,t){if(!(t in e))return;let n=mr(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=mr(n)}}function wi(e){e.modified_||(e.modified_=!0,e.parent_&&wi(e.parent_))}function Ti(e){e.copy_||=(e.assigned_=new Map,Vr(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Ei=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(Ir(e)&&!Ir(t)){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}Ir(t)||fr(6),n!==void 0&&!Ir(n)&&fr(7);let r;if(Sr(e)){let i=ii(this),a=Di(i,e,void 0),o=!0;try{r=t(a),o=!1}finally{o?ni(i):ri(i)}return ti(i,n),oi(r,i)}if(!e||!Fr(e)){if(r=t(e),r===void 0&&(r=e),r===lr&&(r=void 0),this.autoFreeze_&&Hr(r,!0),n){let t=[],i=[];Xr(qr).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}fr(1,e)},this.produceWithPatches=(e,t)=>{if(Ir(e))return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;return[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},Lr(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),Lr(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),Lr(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Sr(e)||fr(8),xr(e)&&(e=Oi(e));let t=ii(this),n=Di(t,e,void 0);return n[dr].isManual_=!0,ri(t),n}finishDraft(e,t){let n=e&&e[dr];(!n||!n.isManual_)&&fr(9);let{scope_:r}=n;return ti(r,t),oi(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let r=t[n];if(r.path.length===0&&r.op===`replace`){e=r.value;break}}n>-1&&(t=t.slice(n+1));let r=Xr(qr).applyPatches_;return xr(e)?r(e,t):this.produce(e,e=>r(e,t))}};function Di(e,t,n,r){let[i,a]=Nr(t)?Xr(Kr).proxyMap_(t,n):Pr(t)?Xr(Kr).proxySet_(t,n):_i(t,n);return(n?.scope_??$r()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&r!==void 0?pi(n,a,r):a.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(a);let{patchPlugin_:t}=e;a.modified_&&t&&t.generatePatches_(a,[],e)}),i}function Oi(e){return xr(e)||fr(10,e),ki(e)}function ki(e){if(!Sr(e)||Gr(e))return e;let t=e[dr],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Vr(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=Vr(e,!0);return Er(n,(e,t)=>{Ar(n,e,ki(t))},r),t&&(t.finalized_=!1),n}globalThis.Iterator?.from;var Ai=new Ei().produce,B=e=>e;function ji(e){return({dispatch:t,getState:n})=>r=>i=>typeof i==`function`?i(t,n,e):r(i)}var Mi=ji(),Ni=ji,Pi=typeof window<`u`&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]==`object`?or:or.apply(null,arguments)};typeof window<`u`&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;function Fi(e,t){function n(...n){if(t){let r=t(...n);if(!r)throw Error(Ua(0));return{type:e,payload:r.payload,...`meta`in r&&{meta:r.meta},...`error`in r&&{error:r.error}}}return{type:e,payload:n[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=t=>cr(t)&&t.type===e,n}var Ii=class e extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,e.prototype)}static get[Symbol.species](){return e}concat(...e){return super.concat.apply(this,e)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new e(...t[0].concat(this)):new e(...t.concat(this))}};function Li(e){return Sr(e)?Ai(e,()=>{}):e}function Ri(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function zi(e){return typeof e==`boolean`}var Bi=()=>function(e){let{thunk:t=!0,immutableCheck:n=!0,serializableCheck:r=!0,actionCreatorCheck:i=!0}=e??{},a=new Ii;return t&&(zi(t)?a.push(Mi):a.push(Ni(t.extraArgument))),a},Vi=`RTK_autoBatch`,V=()=>e=>({payload:e,meta:{[Vi]:!0}}),Hi=e=>t=>{setTimeout(t,e)},Ui=(e,t)=>n=>{let r=!1,i=()=>{r||(r=!0,cancelAnimationFrame(a),clearTimeout(o),n())},a=e(i),o=setTimeout(i,t)},Wi=(e={type:`raf`})=>t=>(...n)=>{let r=t(...n),i=!0,a=!1,o=!1,s=new Set,c=e.type===`tick`?queueMicrotask:e.type===`raf`?typeof window<`u`&&window.requestAnimationFrame?Ui(window.requestAnimationFrame,100):Hi(10):e.type===`callback`?e.queueNotification:Hi(e.timeout),l=()=>{o=!1,a&&(a=!1,s.forEach(e=>e()))};return Object.assign({},r,{subscribe(e){let t=r.subscribe(()=>i&&e());return s.add(e),()=>{t(),s.delete(e)}},dispatch(e){try{return i=!e?.meta?.[Vi],a=!i,a&&(o||(o=!0,c(l))),r.dispatch(e)}finally{i=!0}}})},Gi=e=>function(t){let{autoBatch:n=!0}=t??{},r=new Ii(e);return n&&r.push(Wi(typeof n==`object`?n:void 0)),r};function Ki(e){let t=Bi(),{reducer:n=void 0,middleware:r,devTools:i=!0,duplicateMiddlewareCheck:a=!0,preloadedState:o=void 0,enhancers:s=void 0}=e||{},c;if(typeof n==`function`)c=n;else if(nr(n))c=ar(n);else throw Error(Ua(1));let l;l=typeof r==`function`?r(t):t();let u=or;i&&(u=Pi({trace:!1,...typeof i==`object`&&i}));let d=Gi(sr(...l)),f=typeof s==`function`?s(d):d(),p=u(...f);return rr(c,o,p)}function qi(e){let t={},n=[],r,i={addCase(e,n){let r=typeof e==`string`?e:e.type;if(!r)throw Error(Ua(28));if(r in t)throw Error(Ua(29));return t[r]=n,i},addAsyncThunk(e,r){return r.pending&&(t[e.pending.type]=r.pending),r.rejected&&(t[e.rejected.type]=r.rejected),r.fulfilled&&(t[e.fulfilled.type]=r.fulfilled),r.settled&&n.push({matcher:e.settled,reducer:r.settled}),i},addMatcher(e,t){return n.push({matcher:e,reducer:t}),i},addDefaultCase(e){return r=e,i}};return e(i),[t,n,r]}function Ji(e){return typeof e==`function`}function Yi(e,t){let[n,r,i]=qi(t),a;if(Ji(e))a=()=>Li(e());else{let t=Li(e);a=()=>t}function o(e=a(),t){let o=[n[t.type],...r.filter(({matcher:e})=>e(t)).map(({reducer:e})=>e)];return o.filter(e=>!!e).length===0&&(o=[i]),o.reduce((e,n)=>{if(n){if(xr(e)){let r=n(e,t);return r===void 0?e:r}if(Sr(e))return Ai(e,e=>n(e,t));{let r=n(e,t);if(r===void 0){if(e===null)return e;throw Error(`A case reducer on a non-draftable value must not return undefined`)}return r}}return e},e)}return o.getInitialState=a,o}var Xi=`ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW`,Zi=(e=21)=>{let t=``,n=e;for(;n--;)t+=Xi[Math.random()*64|0];return t},Qi=Symbol.for(`rtk-slice-createasyncthunk`);function $i(e,t){return`${e}/${t}`}function ea({creators:e}={}){let t=e?.asyncThunk?.[Qi];return function(e){let{name:n,reducerPath:r=n}=e;if(!n)throw Error(Ua(11));let i=(typeof e.reducers==`function`?e.reducers(ra()):e.reducers)||{},a=Object.keys(i),o={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(e,t){let n=typeof e==`string`?e:e.type;if(!n)throw Error(Ua(12));if(n in o.sliceCaseReducersByType)throw Error(Ua(13));return o.sliceCaseReducersByType[n]=t,s},addMatcher(e,t){return o.sliceMatchers.push({matcher:e,reducer:t}),s},exposeAction(e,t){return o.actionCreators[e]=t,s},exposeCaseReducer(e,t){return o.sliceCaseReducersByName[e]=t,s}};a.forEach(r=>{let a=i[r],o={reducerName:r,type:$i(n,r),createNotation:typeof e.reducers==`function`};aa(a)?sa(o,a,s,t):ia(o,a,s)});function c(){let[t={},n=[],r=void 0]=typeof e.extraReducers==`function`?qi(e.extraReducers):[e.extraReducers],i={...t,...o.sliceCaseReducersByType};return Yi(e.initialState,e=>{for(let t in i)e.addCase(t,i[t]);for(let t of o.sliceMatchers)e.addMatcher(t.matcher,t.reducer);for(let t of n)e.addMatcher(t.matcher,t.reducer);r&&e.addDefaultCase(r)})}let l=e=>e,u=new Map,d=new WeakMap,f;function p(e,t){return f||=c(),f(e,t)}function m(){return f||=c(),f.getInitialState()}function h(t,n=!1){function r(e){let i=e[t];return i===void 0&&n&&(i=Ri(d,r,m)),i}function i(t=l){return Ri(Ri(u,n,()=>new WeakMap),t,()=>{let r={};for(let[i,a]of Object.entries(e.selectors??{}))r[i]=ta(a,t,()=>Ri(d,t,m),n);return r})}return{reducerPath:t,getSelectors:i,get selectors(){return i(r)},selectSlice:r}}let g={name:n,reducer:p,actions:o.actionCreators,caseReducers:o.sliceCaseReducersByName,getInitialState:m,...h(r),injectInto(e,{reducerPath:t,...n}={}){let i=t??r;return e.inject({reducerPath:i,reducer:p},n),{...g,...h(i,!0)}}};return g}}function ta(e,t,n,r){function i(i,...a){let o=t(i);return o===void 0&&r&&(o=n()),e(o,...a)}return i.unwrapped=e,i}var na=ea();function ra(){function e(e,t){return{_reducerDefinitionType:`asyncThunk`,payloadCreator:e,...t}}return e.withTypes=()=>e,{reducer(e){return Object.assign({[e.name](...t){return e(...t)}}[e.name],{_reducerDefinitionType:`reducer`})},preparedReducer(e,t){return{_reducerDefinitionType:`reducerWithPrepare`,prepare:e,reducer:t}},asyncThunk:e}}function ia({type:e,reducerName:t,createNotation:n},r,i){let a,o;if(`reducer`in r){if(n&&!oa(r))throw Error(Ua(17));a=r.reducer,o=r.prepare}else a=r;i.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,o?Fi(e,o):Fi(e))}function aa(e){return e._reducerDefinitionType===`asyncThunk`}function oa(e){return e._reducerDefinitionType===`reducerWithPrepare`}function sa({type:e,reducerName:t},n,r,i){if(!i)throw Error(Ua(18));let{payloadCreator:a,fulfilled:o,pending:s,rejected:c,settled:l,options:u}=n,d=i(e,a,u);r.exposeAction(t,d),o&&r.addCase(d.fulfilled,o),s&&r.addCase(d.pending,s),c&&r.addCase(d.rejected,c),l&&r.addMatcher(d.settled,l),r.exposeCaseReducer(t,{fulfilled:o||ca,pending:s||ca,rejected:c||ca,settled:l||ca})}function ca(){}var la=`task`,ua=`listener`,da=`completed`,fa=`cancelled`,pa=`task-${fa}`,ma=`task-${da}`,ha=`${ua}-${fa}`,ga=`${ua}-${da}`,_a=class{constructor(e){this.code=e,this.message=`${la} ${fa} (reason: ${e})`}code;name=`TaskAbortError`;message},va=(e,t)=>{if(typeof e!=`function`)throw TypeError(Ua(32))},ya=()=>{},ba=(e,t=ya)=>(e.catch(t),e),xa=(e,t)=>(e.addEventListener(`abort`,t,{once:!0}),()=>e.removeEventListener(`abort`,t)),Sa=e=>{if(e.aborted)throw new _a(e.reason)};function Ca(e,t){let n=ya;return new Promise((r,i)=>{let a=()=>i(new _a(e.reason));if(e.aborted){a();return}n=xa(e,a),t.finally(()=>n()).then(r,i)}).finally(()=>{n=ya})}var wa=async(e,t)=>{try{return await Promise.resolve(),{status:`ok`,value:await e()}}catch(e){return{status:e instanceof _a?`cancelled`:`rejected`,error:e}}finally{t?.()}},Ta=e=>t=>ba(Ca(e,t).then(t=>(Sa(e),t))),Ea=e=>{let t=Ta(e);return e=>t(new Promise(t=>setTimeout(t,e)))},{assign:Da}=Object,Oa={},ka=`listenerMiddleware`,Aa=(e,t)=>{let n=t=>xa(e,()=>t.abort(e.reason));return(r,i)=>{va(r,`taskExecutor`);let a=new AbortController;n(a);let o=wa(async()=>{Sa(e),Sa(a.signal);let t=await r({pause:Ta(a.signal),delay:Ea(a.signal),signal:a.signal});return Sa(a.signal),t},()=>a.abort(ma));return i?.autoJoin&&t.push(o.catch(ya)),{result:Ta(e)(o),cancel(){a.abort(pa)}}}},ja=(e,t)=>{let n=async(n,r)=>{Sa(t);let i=()=>{},a=[new Promise((t,r)=>{let a=e({predicate:n,effect:(e,n)=>{n.unsubscribe(),t([e,n.getState(),n.getOriginalState()])}});i=()=>{a(),r()}})];r!=null&&a.push(new Promise(e=>setTimeout(e,r,null)));try{let e=await Ca(t,Promise.race(a));return Sa(t),e}finally{i()}};return((e,t)=>ba(n(e,t)))},Ma=e=>{let{type:t,actionCreator:n,matcher:r,predicate:i,effect:a}=e;if(t)i=Fi(t).match;else if(n)t=n.type,i=n.match;else if(r)i=r;else if(!i)throw Error(Ua(21));return va(a,`options.listener`),{predicate:i,type:t,effect:a}},Na=Da(e=>{let{type:t,predicate:n,effect:r}=Ma(e);return{id:Zi(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw Error(Ua(22))}}},{withTypes:()=>Na}),Pa=(e,t)=>{let{type:n,effect:r,predicate:i}=Ma(t);return Array.from(e.values()).find(e=>(typeof n==`string`?e.type===n:e.predicate===i)&&e.effect===r)},Fa=e=>{e.pending.forEach(e=>{e.abort(ha)})},Ia=(e,t)=>()=>{for(let e of t.keys())Fa(e);e.clear()},La=(e,t,n)=>{try{e(t,n)}catch(e){setTimeout(()=>{throw e},0)}},Ra=Da(Fi(`${ka}/add`),{withTypes:()=>Ra}),za=Fi(`${ka}/removeAll`),Ba=Da(Fi(`${ka}/remove`),{withTypes:()=>Ba}),Va=(...e)=>{console.error(`${ka}/error`,...e)},Ha=(e={})=>{let t=new Map,n=new Map,r=e=>{let t=n.get(e)??0;n.set(e,t+1)},i=e=>{let t=n.get(e)??1;t===1?n.delete(e):n.set(e,t-1)},{extra:a,onError:o=Va}=e;va(o,`onError`);let s=e=>(e.unsubscribe=()=>t.delete(e.id),t.set(e.id,e),t=>{e.unsubscribe(),t?.cancelActive&&Fa(e)}),c=(e=>{let n=Pa(t,e)??Na(e);return s(n)});Da(c,{withTypes:()=>c});let l=e=>{let n=Pa(t,e);return n&&(n.unsubscribe(),e.cancelActive&&Fa(n)),!!n};Da(l,{withTypes:()=>l});let u=async(e,n,s,l)=>{let u=new AbortController,d=ja(c,u.signal),f=[];try{e.pending.add(u),r(e),await Promise.resolve(e.effect(n,Da({},s,{getOriginalState:l,condition:(e,t)=>d(e,t).then(Boolean),take:d,delay:Ea(u.signal),pause:Ta(u.signal),extra:a,signal:u.signal,fork:Aa(u.signal,f),unsubscribe:e.unsubscribe,subscribe:()=>{t.set(e.id,e)},cancelActiveListeners:()=>{e.pending.forEach((e,t,n)=>{e!==u&&(e.abort(ha),n.delete(e))})},cancel:()=>{u.abort(ha),e.pending.delete(u)},throwIfCancelled:()=>{Sa(u.signal)}})))}catch(e){e instanceof _a||La(o,e,{raisedBy:`effect`})}finally{await Promise.all(f),u.abort(ga),i(e),e.pending.delete(u)}},d=Ia(t,n);return{middleware:e=>n=>r=>{if(!cr(r))return n(r);if(Ra.match(r))return c(r.payload);if(za.match(r)){d();return}if(Ba.match(r))return l(r.payload);let i=e.getState(),a=()=>{if(i===Oa)throw Error(Ua(23));return i},s;try{if(s=n(r),t.size>0){let n=e.getState(),s=Array.from(t.values());for(let t of s){let s=!1;try{s=t.predicate(r,n,i)}catch(e){s=!1,La(o,e,{raisedBy:`predicate`})}s&&u(t,r,e,a)}}}finally{i=Oa}return s},startListening:c,stopListening:l,clearListeners:d}};function Ua(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Wa=na({name:`chartLayout`,initialState:{layoutType:`horizontal`,width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){e.margin.top=t.payload.top??0,e.margin.right=t.payload.right??0,e.margin.bottom=t.payload.bottom??0,e.margin.left=t.payload.left??0},setScale(e,t){e.scale=t.payload}}}),Ga=Wa.actions,Ka=Ga.setMargin,qa=Ga.setLayout,Ja=Ga.setChartSize,Ya=Ga.setScale,Xa=Wa.reducer;function Za(e,t,n){return Array.isArray(e)&&e&&t+n!==0?e.slice(t,n+1):e}function H(e){return Number.isFinite(e)}function Qa(e){return typeof e==`number`&&e>0&&Number.isFinite(e)}function $a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function eo(e){for(var t=1;t{if(t&&n){var r=n.width,i=n.height,a=t.align,o=t.verticalAlign,s=t.layout,c=t.position,l=t.offset,u=l===void 0?0:l;if(c!=null){if(ke(c)){if(c===`top`&&P(e.top))return eo(eo({},e),{},{top:e.top+(i||0)+u});if(c===`bottom`&&P(e.bottom))return eo(eo({},e),{},{bottom:e.bottom+(i||0)+u});if(c===`left`&&P(e.left))return eo(eo({},e),{},{left:e.left+(r||0)+u});if(c===`right`&&P(e.right))return eo(eo({},e),{},{right:e.right+(r||0)+u})}return e}if((s===`vertical`||s===`horizontal`&&o===`middle`)&&a!==`center`&&P(e[a]))return eo(eo({},e),{},{[a]:e[a]+(r||0)});if((s===`horizontal`||s===`vertical`&&a===`center`)&&o!==`middle`&&P(e[o]))return eo(eo({},e),{},{[o]:e[o]+(i||0)})}return e},ao=(e,t)=>e===`horizontal`&&t===`xAxis`||e===`vertical`&&t===`yAxis`||e===`centric`&&t===`angleAxis`||e===`radial`&&t===`radiusAxis`,oo=(e,t,n,r)=>{if(r)return e.map(e=>e.coordinate);var i,a,o=e.map(e=>(e.coordinate===t&&(i=!0),e.coordinate===n&&(a=!0),e.coordinate));return i||o.push(t),a||o.push(n),o},so=(e,t,n)=>{if(!e)return null;var r=e.duplicateDomain,i=e.type,a=e.range,o=e.scale,s=e.realScaleType,c=e.isCategorical,l=e.categoricalDomain,u=e.tickCount,d=e.ticks,f=e.niceTicks,p=e.axisType;if(!o)return null;var m=s===`scaleBand`&&o.bandwidth?o.bandwidth()/2:2,h=(t||n)&&i===`category`&&o.bandwidth?o.bandwidth()/m:0;return h=p===`angleAxis`&&a&&a.length>=2?se(a[0]-a[1])*2*h:h,t&&(d||f)?(d||f||[]).map((e,t)=>{var n=r?r.indexOf(e):e,i=o.map(n);return H(i)?{coordinate:i+h,value:e,offset:h,index:t}:null}).filter(ye):c&&l?l.map((e,t)=>{var n=o.map(e);return H(n)?{coordinate:n+h,value:e,index:t,offset:h}:null}).filter(ye):o.ticks&&!n&&u!=null?o.ticks(u).map((e,t)=>{var n=o.map(e);return H(n)?{coordinate:n+h,value:e,index:t,offset:h}:null}).filter(ye):o.domain().map((e,t)=>{var n=o.map(e);return H(n)?{coordinate:n+h,value:r?r[e]:e,index:t,offset:h}:null}).filter(ye)},co={sign:e=>{var t=e.length;if(!(t<=0)){var n=e[0]?.length;if(!(n==null||n<=0))for(var r=0;r=0?(s[0]=i,i+=u,s[1]=i):(s[0]=a,a+=u,s[1]=a)}}}},expand:Et,none:xt,silhouette:Dt,wiggle:Ot,positive:e=>{var t=e.length;if(!(t<=0)){var n=e[0]?.length;if(!(n==null||n<=0))for(var r=0;r=0?(o[0]=i,i+=s,o[1]=i):(o[0]=0,o[1]=0)}}}}},lo=(e,t,n)=>{var r=co[n]??xt,i=Tt().keys(t).value((e,t)=>Number(U(e,t,0))).order(St).offset(r)(e);return i.forEach((n,r)=>{n.forEach((n,i)=>{var a=U(e[i],t[r],0);Array.isArray(a)&&a.length===2&&P(a[0])&&P(a[1])&&(n[0]=a[0],n[1]=a[1])})}),i};function uo(e){return e==null?void 0:String(e)}function fo(e){var t=e.axis,n=e.ticks,r=e.bandSize,i=e.entry,a=e.index,o=e.dataKey;if(t.type===`category`){if(!t.allowDuplicatedCategory&&t.dataKey&&!_e(i[t.dataKey])){var s=ge(n,`value`,i[t.dataKey]);if(s)return s.coordinate+r/2}return n!=null&&n[a]?n[a].coordinate+r/2:null}var c=U(i,_e(o)?t.dataKey:o),l=t.scale.map(c);return P(l)?l:null}var po=e=>{var t=e.flat(2).filter(P);return[Math.min(...t),Math.max(...t)]},mo=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],ho=(e,t,n)=>{if(e!=null&&Object.keys(e).length!==0)return mo(Object.keys(e).reduce((r,i)=>{var a=e[i];if(!a)return r;var o=a.stackedData.reduce((e,r)=>{var i=po(Za(r,t,n));return!H(i[0])||!H(i[1])?e:[Math.min(e[0],i[0]),Math.max(e[1],i[1])]},[1/0,-1/0]);return[Math.min(o[0],r[0]),Math.max(o[1],r[1])]},[1/0,-1/0]))},go=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,_o=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,vo=(e,t,n)=>{if(e&&e.scale&&e.scale.bandwidth){var r=e.scale.bandwidth();if(!n||r>0)return r}if(e&&t&&t.length>=2){for(var i=Xn(t,e=>e.coordinate),a=[],o=0,s=1,c=i.length;su&&(d=Math.min(f,d));return d===1/0?0:d}return n?void 0:0};function yo(e){var t=e.tooltipEntrySettings,n=e.dataKey,r=e.payload,i=e.value,a=e.name;return eo(eo({},t),{},{dataKey:n,payload:r,value:i,name:a})}function bo(e,t){if(e!=null)return String(e);if(typeof t==`string`)return t}var xo=(e,t)=>{if(t===`horizontal`)return e.relativeX;if(t===`vertical`)return e.relativeY},So=(e,t)=>t===`centric`?e.angle:e.radius,Co=e=>e.layout.width,wo=e=>e.layout.height,To=e=>e.layout.scale,Eo=e=>e.layout.margin,Do=R(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),Oo=R(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),ko=`data-recharts-item-index`;function Ao(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function jo(e){for(var t=1;te.brush.height;function Io(e){return Oo(e).reduce((e,t)=>t.orientation===`left`&&!t.mirror&&!t.hide?e+(typeof t.width==`number`?t.width:60):e,0)}function Lo(e){return Oo(e).reduce((e,t)=>t.orientation===`right`&&!t.mirror&&!t.hide?e+(typeof t.width==`number`?t.width:60):e,0)}function Ro(e){return Do(e).reduce((e,t)=>t.orientation===`top`&&!t.mirror&&!t.hide?e+(typeof t.height==`number`?t.height:30):e,0)}function zo(e){return Do(e).reduce((e,t)=>t.orientation===`bottom`&&!t.mirror&&!t.hide?e+(typeof t.height==`number`?t.height:30):e,0)}var Bo=R([Co,wo,Eo,Fo,Io,Lo,Ro,zo,Zn,Qn],(e,t,n,r,i,a,o,s,c,l)=>{var u={left:(n.left||0)+i,right:(n.right||0)+a},d=jo(jo({},{top:(n.top||0)+o,bottom:(n.bottom||0)+s}),u),f=d.bottom;d.bottom+=r,d=io(d,c,l);var p=e-d.left-d.right,m=t-d.top-d.bottom;return jo(jo({brushBottom:f},d),{},{width:Math.max(p,0),height:Math.max(m,0)})}),Vo=R(Bo,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),Ho=R(Co,wo,(e,t)=>({x:0,y:0,width:e,height:t})),Uo=(0,s.createContext)(null),Wo=()=>(0,s.useContext)(Uo)!=null,Go=e=>e.brush,Ko=R([Go,Bo,Eo],(e,t,n)=>({height:e.height,x:P(e.x)?e.x:t.left,y:P(e.y)?e.y:t.top+t.height+t.brushBottom-(n?.bottom||0),width:P(e.width)?e.width:t.width}));function qo(e,t,{signal:n,edges:r}={}){let i,a=null,o=r!=null&&r.includes(`leading`),s=r==null||r.includes(`trailing`),c=()=>{a!==null&&(e.apply(i,a),i=void 0,a=null)},l=()=>{s&&c(),p()},u=null,d=()=>{u!=null&&clearTimeout(u),u=setTimeout(()=>{u=null,l()},t)},f=()=>{u!==null&&(clearTimeout(u),u=null)},p=()=>{f(),i=void 0,a=null},m=()=>{c()},h=function(...e){if(n?.aborted)return;i=this,a=e;let t=u==null;d(),o&&t&&c()};return h.schedule=d,h.cancel=p,h.flush=m,n?.addEventListener(`abort`,p,{once:!0}),h}function Jo(e,t=0,n={}){typeof n!=`object`&&(n={});let{leading:r=!1,trailing:i=!0,maxWait:a}=n,o=[,,];r&&(o[0]=`leading`),i&&(o[1]=`trailing`);let s,c=null,l=qo(function(...t){s=e.apply(this,t),c=null},t,{edges:o}),u=function(...t){return a!=null&&(c===null&&(c=Date.now()),Date.now()-c>=a)?((r||i)&&(s=e.apply(this,t)),c=Date.now(),l.cancel(),l.schedule(),s):(l.apply(this,t),s)};return u.cancel=l.cancel,u.flush=()=>(l.flush(),s),u}function Yo(e,t=0,n={}){let{leading:r=!0,trailing:i=!0}=n;return Jo(e,t,{leading:r,maxWait:t,trailing:i})}var Xo=function(e,t){var n=[...arguments].slice(2);if(typeof console<`u`&&console.warn&&(t===void 0&&console.warn(`LogUtils requires an error message argument`),!e)){if(t===void 0)console.warn(`Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.`);else{var r=0;console.warn(t.replace(/%s/g,()=>n[r++]))}}},Zo={width:`100%`,height:`100%`,debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},Qo=(e,t,n)=>{var r=n.width,i=r===void 0?Zo.width:r,a=n.height,o=a===void 0?Zo.height:a,s=n.aspect,c=n.maxHeight,l=le(i)?e:Number(i),u=le(o)?t:Number(o);return s&&s>0&&(l?u=l/s:u&&(l=u*s),c&&u!=null&&u>c&&(u=c)),{calculatedWidth:l,calculatedHeight:u}},$o={width:0,height:0,overflow:`visible`},es={width:0,overflowX:`visible`},ts={height:0,overflowY:`visible`},ns={},rs=e=>{var t=e.width,n=e.height,r=le(t),i=le(n);return r&&i?$o:r?es:i?ts:ns};function is(e){var t=e.width,n=e.height,r=e.aspect,i=t,a=n;return i===void 0&&a===void 0?(i=Zo.width,a=Zo.height):i===void 0?i=r&&r>0?void 0:Zo.width:a===void 0&&(a=r&&r>0?void 0:Zo.height),{width:i,height:a}}var as=[`aspect`,`initialDimension`,`width`,`height`,`minWidth`,`minHeight`,`maxHeight`,`children`,`debounce`,`id`,`className`,`onResize`,`style`];function os(){return os=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var n=e.children,r=e.width,i=e.height,a=e.viewBox,c=e.className,l=e.style,u=e.title,d=e.desc,f=b(e,v),p=a||{width:r,height:i,x:0,y:0},m=o(`recharts-surface`,c);return s.createElement(`svg`,y({},h(f),{className:m,width:r,height:i,style:l,viewBox:`${p.x} ${p.y} ${p.width} ${p.height}`,ref:t}),s.createElement(`title`,null,u),s.createElement(`desc`,null,d),n)}),C=[`children`,`className`];function w(){return w=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var n=e.children,r=e.className,i=T(e,C),a=o(`recharts-layer`,r);return s.createElement(`g`,w({className:a},h(i),{ref:t}),n)});function O(e){return e===`__proto__`}var k=/\.|(\[(?:[^[\]]*|(["'])(?:(?!\2)[^\\]|\\.)*?\2)\])/;function A(e){switch(typeof e){case`number`:case`symbol`:return!1;case`string`:return e===``||e.startsWith(`.`)||e.endsWith(`.`)?!1:k.test(e);default:return!1}}function j(e){return typeof e==`string`||typeof e==`symbol`?e:Object.is(e?.valueOf?.(),-0)?`-0`:String(e)}function M(e){return typeof e==`symbol`||e instanceof Symbol}function N(e){return e==null?``:ee(e)}function ee(e){if(typeof e==`string`)return e;if(Array.isArray(e))return e.map(ee).join(`,`);if(M(e))return e.toString();let t=e+``;return t===`0`&&Object.is(Number(e),-0)?`-0`:t}function te(e){if(Array.isArray(e))return e.map(j);if(typeof e==`symbol`)return[e];e=N(e);let t=[],n=e.length;if(n===0)return t;let r=0,i=``,a=``,o=!1,s=!1,c=/^-?\d+(?:\.\d+)?$/;for(e.charCodeAt(0)===46&&t.push(``);r1&&arguments[1]!==void 0?arguments[1]:ie),n=Math.round(e*t)/t;return Object.is(n,-0)?0:n}function oe(e){var t=[...arguments].slice(1);return e.reduce((e,n,r)=>{var i=t[r-1];return typeof i==`string`?e+i+n:i===void 0?e+n:e+ae(i)+n},``)}var se=e=>e===0?0:e>0?1:-1,ce=e=>typeof e==`number`&&e!=+e,le=e=>typeof e==`string`&&e.length>1&&e.indexOf(`%`)===e.length-1,P=e=>(typeof e==`number`||e instanceof Number)&&!ce(e),ue=e=>P(e)||typeof e==`string`,de=0,fe=e=>{var t=++de;return`${e||``}${t}`},pe=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,r=arguments.length>3&&arguments[3]!==void 0&&arguments[3];if(!P(e)&&typeof e!=`string`)return n;var i;if(le(e)){if(t==null)return n;var a=e.indexOf(`%`);i=t*parseFloat(e.slice(0,a))/100}else i=+e;return ce(i)&&(i=n),r&&t!=null&&i>t&&(i=t),i},me=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;re&&(typeof t==`function`?t(e):ne(e,t))===n)}var _e=e=>e==null,ve=e=>_e(e)?e:`${e.charAt(0).toUpperCase()}${e.slice(1)}`;function ye(e){return e!=null}function be(){}function xe(e){if(e)return{x:e.x,y:e.y,upperWidth:`upperWidth`in e?e.upperWidth:e.width,lowerWidth:`lowerWidth`in e?e.lowerWidth:e.width,width:e.width,height:e.height}}function Se(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ce(e){for(var t=1;t{var t=e.viewBox,n=e.position,r=e.offset,i=r===void 0?0:r,a=e.parentViewBox,o=e.clamp,s=xe(t),c=s.x,l=s.y,u=s.height,d=s.upperWidth,f=s.lowerWidth,p=c,m=c+(d-f)/2,h=(p+m)/2,g=(d+f)/2,_=p+d/2,v=u>=0?1:-1,y=v*i,b=v>0?`end`:`start`,x=v>0?`start`:`end`,S=d>=0?1:-1,C=S*i,w=S>0?`end`:`start`,T=S>0?`start`:`end`,E=a;if(n===`top`){var D={x:p+d/2,y:l-y,horizontalAnchor:`middle`,verticalAnchor:b};return o&&E&&(D.height=Math.max(l-E.y,0),D.width=d),D}if(n===`bottom`){var O={x:m+f/2,y:l+u+y,horizontalAnchor:`middle`,verticalAnchor:x};return o&&E&&(O.height=Math.max(E.y+E.height-(l+u),0),O.width=f),O}if(n===`left`){var k={x:h-C,y:l+u/2,horizontalAnchor:w,verticalAnchor:`middle`};return o&&E&&(k.width=Math.max(k.x-E.x,0),k.height=u),k}if(n===`right`){var A={x:h+g+C,y:l+u/2,horizontalAnchor:T,verticalAnchor:`middle`};return o&&E&&(A.width=Math.max(E.x+E.width-A.x,0),A.height=u),A}var j=o&&E?{width:g,height:u}:{};return n===`insideLeft`?Ce({x:h+C,y:l+u/2,horizontalAnchor:T,verticalAnchor:`middle`},j):n===`insideRight`?Ce({x:h+g-C,y:l+u/2,horizontalAnchor:w,verticalAnchor:`middle`},j):n===`insideTop`?Ce({x:p+d/2,y:l+y,horizontalAnchor:`middle`,verticalAnchor:x},j):n===`insideBottom`?Ce({x:m+f/2,y:l+u-y,horizontalAnchor:`middle`,verticalAnchor:b},j):n===`insideTopLeft`?Ce({x:p+C,y:l+y,horizontalAnchor:T,verticalAnchor:x},j):n===`insideTopRight`?Ce({x:p+d-C,y:l+y,horizontalAnchor:w,verticalAnchor:x},j):n===`insideBottomLeft`?Ce({x:m+C,y:l+u-y,horizontalAnchor:T,verticalAnchor:b},j):n===`insideBottomRight`?Ce({x:m+f-C,y:l+u-y,horizontalAnchor:w,verticalAnchor:b},j):n&&typeof n==`object`&&(P(n.x)||le(n.x))&&(P(n.y)||le(n.y))?Ce({x:c+pe(n.x,g),y:l+pe(n.y,u),horizontalAnchor:`end`,verticalAnchor:`end`},j):Ce({x:_,y:l+u/2,horizontalAnchor:`middle`,verticalAnchor:`middle`},j)},Oe=[`top`,`left`,`right`,`bottom`];function ke(e){return e==null?!1:typeof e==`object`||Oe.includes(e)}var Ae=(0,s.createContext)(null);function F(e){return function(){return e}}var je=Math.PI,Me=2*je,Ne=1e-6,Pe=Me-Ne;function Fe(e){this._+=e[0];for(let t=1,n=e.length;t=0))throw Error(`invalid digits: ${e}`);if(t>15)return Fe;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;tNe){if(!(Math.abs(u*s-c*l)>Ne)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((je-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>Ne&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>Ne||Math.abs(this._y1-l)>Ne)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%Me+Me),d>Pe?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>Ne&&this._append`A${n},${n},0,${+(d>=je)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};Le.prototype;function Re(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new Le(t)}Array.prototype.slice;function ze(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function Be(e){this._context=e}Be.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};function Ve(e){return new Be(e)}function He(e){return e[0]}function Ue(e){return e[1]}function We(e,t){var n=F(!0),r=null,i=Ve,a=null,o=Re(s);e=typeof e==`function`?e:e===void 0?He:F(e),t=typeof t==`function`?t:t===void 0?Ue:F(t);function s(s){var c,l=(s=ze(s)).length,u,d=!1,f;for(r??(a=i(f=o())),c=0;c<=l;++c)!(c=d;--f)s.point(_[f],v[f]);s.lineEnd(),s.areaEnd()}}h&&(_[u]=+e(m,u,l),v[u]=+t(m,u,l),s.point(r?+r(m,u,l):_[u],n?+n(m,u,l):v[u]))}if(g)return s=null,g+``||null}function u(){return We().defined(i).curve(o).context(a)}return l.x=function(t){return arguments.length?(e=typeof t==`function`?t:F(+t),r=null,l):e},l.x0=function(t){return arguments.length?(e=typeof t==`function`?t:F(+t),l):e},l.x1=function(e){return arguments.length?(r=e==null?null:typeof e==`function`?e:F(+e),l):r},l.y=function(e){return arguments.length?(t=typeof e==`function`?e:F(+e),n=null,l):t},l.y0=function(e){return arguments.length?(t=typeof e==`function`?e:F(+e),l):t},l.y1=function(e){return arguments.length?(n=e==null?null:typeof e==`function`?e:F(+e),l):n},l.lineX0=l.lineY0=function(){return u().x(e).y(t)},l.lineY1=function(){return u().x(e).y(n)},l.lineX1=function(){return u().x(r).y(t)},l.defined=function(e){return arguments.length?(i=typeof e==`function`?e:F(!!e),l):i},l.curve=function(e){return arguments.length?(o=e,a!=null&&(s=o(a)),l):o},l.context=function(e){return arguments.length?(e==null?a=s=null:s=o(a=e),l):a},l}var Ke=class{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t)}this._x0=e,this._y0=t}};function qe(e){return new Ke(e,!0)}function Je(e){return new Ke(e,!1)}function Ye(){}function Xe(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function Ze(e){this._context=e}Ze.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Xe(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Xe(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Qe(e){return new Ze(e)}function $e(e){this._context=e}$e.prototype={areaStart:Ye,areaEnd:Ye,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Xe(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function et(e){return new $e(e)}function tt(e){this._context=e}tt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:Xe(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function nt(e){return new tt(e)}function rt(e){this._context=e}rt.prototype={areaStart:Ye,areaEnd:Ye,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function it(e){return new rt(e)}function at(e){return e<0?-1:1}function ot(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(at(a)+at(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function st(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function ct(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function lt(e){this._context=e}lt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:ct(this,this._t0,st(this,this._t0))}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,e!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,ct(this,st(this,n=ot(this,e,t)),n);break;default:ct(this,this._t0,n=ot(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function ut(e){this._context=new dt(e)}(ut.prototype=Object.create(lt.prototype)).point=function(e,t){lt.prototype.point.call(this,t,e)};function dt(e){this._context=e}dt.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function ft(e){return new lt(e)}function pt(e){return new ut(e)}function mt(e){this._context=e}mt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n){if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=ht(e),i=ht(t),a=0,o=1;o=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};function vt(e){return new _t(e,.5)}function yt(e){return new _t(e,0)}function bt(e){return new _t(e,1)}function xt(e,t){if((o=e.length)>1)for(var n=1,r,i,a=e[t[0]],o,s=a.length;n=0;)n[t]=t;return n}function Ct(e,t){return e[t]}function wt(e){let t=[];return t.key=e,t}function Tt(){var e=F([]),t=St,n=xt,r=Ct;function i(i){var a=Array.from(e.apply(this,arguments),wt),o,s=a.length,c=-1,l;for(let e of i)for(o=0,++c;o0){for(var n,r,i=0,a=e[0].length,o;i0){for(var n=0,r=e[t[0]],i,a=r.length;n0)||!((a=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,a,o;r`radius`in e&&`startAngle`in e&&`endAngle`in e,At=(e,t)=>{if(!e||typeof e==`function`||typeof e==`boolean`)return null;var n=e;if((0,s.isValidElement)(e)&&(n=e.props),typeof n!=`object`&&typeof n!=`function`)return null;var r={};return Object.keys(n).forEach(e=>{l(e)&&typeof n[e]==`function`&&(r[e]=t||(t=>n[e](n,t)))}),r},jt=(e,t,n)=>r=>(e(t,n,r),null),Mt=(e,t,n)=>{if(e===null||typeof e!=`object`&&typeof e!=`function`)return null;var r=null;return Object.keys(e).forEach(i=>{var a=e[i];l(i)&&typeof a==`function`&&(r||={},r[i]=jt(a,t,n))}),r};function Nt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Pt(e){for(var t=1;t(e[t]===void 0&&r[t]!==void 0&&(e[t]=r[t]),e),n)}function zt(e){return Number.isSafeInteger(e)&&e>=0}function Bt(e){return e!=null&&typeof e!=`function`&&zt(e.length)}function Vt(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function Ht(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var Ut=`[object RegExp]`,Wt=`[object String]`,Gt=`[object Number]`,Kt=`[object Boolean]`,qt=`[object Arguments]`,Jt=`[object Symbol]`,Yt=`[object Date]`,Xt=`[object Map]`,Zt=`[object Set]`,Qt=`[object Array]`,$t=`[object Function]`,en=`[object ArrayBuffer]`,tn=`[object Object]`,nn=`[object Error]`,rn=`[object DataView]`,an=`[object Uint8Array]`,on=`[object Uint8ClampedArray]`,sn=`[object Uint16Array]`,cn=`[object Uint32Array]`,ln=`[object BigUint64Array]`,un=`[object Int8Array]`,dn=`[object Int16Array]`,fn=`[object Int32Array]`,pn=`[object BigInt64Array]`,mn=`[object Float32Array]`,hn=`[object Float64Array]`,gn=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window||typeof self==`object`&&self||typeof global==`object`&&global||(function(){return this})();function _n(e){return gn.Buffer!==void 0&&gn.Buffer.isBuffer(e)}function vn(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}function yn(e){return e!==null&&(typeof e==`object`||typeof e==`function`)}var bn=/^(?:0|[1-9]\d*)$/;function xn(e,t=2**53-1){switch(typeof e){case`number`:return Number.isInteger(e)&&e>=0&&e{var r=n(),i=e();function a(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var o=typeof Object.is==`function`?Object.is:a,s=i.useSyncExternalStore,c=r.useRef,l=r.useEffect,u=r.useMemo,d=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var a=c(null);if(a.current===null){var f={hasValue:!1,value:null};a.current=f}else f=a.current;a=u(function(){function e(e){if(!a){if(a=!0,s=e,e=r(e),i!==void 0&&f.hasValue){var t=f.value;if(i(t,e))return c=t}return c=e}if(t=c,o(s,e))return t;var n=r(e);return i!==void 0&&i(t,n)?(s=e,t):(s=e,c=n)}var a=!1,s,c,l=n===void 0?null:n;return[function(){return e(t())},l===null?void 0:function(){return e(l())}]},[t,n,r,i]);var p=s(e,a[0],a[1]);return l(function(){f.hasValue=!0,f.value=p},[p]),d(p),p}})),Cn=a(((e,t)=>{t.exports=Sn()}))(),wn=(0,s.createContext)(null),Tn=e=>e,I=()=>{var e=(0,s.useContext)(wn);return e?e.store.dispatch:Tn},En=()=>{},Dn=()=>En,On=(e,t)=>e===t;function L(e){var t=(0,s.useContext)(wn),n=(0,s.useMemo)(()=>t?t=>{if(t!=null)return e(t)}:En,[t,e]);return(0,Cn.useSyncExternalStoreWithSelector)(t?t.subscription.addNestedSub:Dn,t?t.store.getState:En,t?t.store.getState:En,n,On)}function kn(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!=`function`)throw TypeError(t)}function An(e,t=`expected all items to be functions, instead received the following types: `){if(!e.every(e=>typeof e==`function`)){let n=e.map(e=>typeof e==`function`?`function ${e.name||`unnamed`}()`:typeof e).join(`, `);throw TypeError(`${t}[${n}]`)}}var jn=e=>Array.isArray(e)?e:[e];function Mn(e){let t=Array.isArray(e[0])?e[0]:e;return An(t,`createSelector expects all input-selectors to be functions, but received the following types: `),t}function Nn(e,t){let n=[],{length:r}=e;for(let i=0;i`u`?Pn:WeakRef,In=0,Ln=1;function Rn(){return{s:In,v:void 0,o:null,p:null}}function zn(e){return e instanceof Fn?e.deref():e}function Bn(e,t={}){let n=Rn(),{resultEqualityCheck:r}=t,i,a=0;function o(){let t=n,{length:o}=arguments;for(let e=0,n=o;e{n=Rn(),o.resetResultsCount()},o.resultsCount=()=>a,o.resetResultsCount=()=>{a=0},o}function Vn(e,...t){let n=typeof e==`function`?{memoize:e,memoizeOptions:t}:e,r=(...e)=>{let t=0,r=0,i,a={},o=e.pop();typeof o==`object`&&(a=o,o=e.pop()),kn(o,`createSelector expects an output function after the inputs, but received: [${typeof o}]`);let{memoize:s,memoizeOptions:c=[],argsMemoize:l=Bn,argsMemoizeOptions:u=[]}={...n,...a},d=jn(c),f=jn(u),p=Mn(e),m=s(function(){return t++,o.apply(null,arguments)},...d),h=l(function(){r++;let e=Nn(p,arguments);return i=m.apply(null,e),i},...f);return Object.assign(h,{resultFunc:o,memoizedResultFunc:m,dependencies:p,dependencyRecomputations:()=>r,resetDependencyRecomputations:()=>{r=0},lastResult:()=>i,recomputations:()=>t,resetRecomputations:()=>{t=0},memoize:s,argsMemoize:l})};return Object.assign(r,{withTypes:()=>r}),r}var R=Vn(Bn);function Hn(e,t=1){let n=[],r=Math.floor(t),i=(e,t)=>{for(let a=0;a{if(e!==t){let r=Wn(e),i=Wn(t);if(r===i&&r===0){if(et)return n===`desc`?-1:1}return n===`desc`?i-r:r-i}return 0},Kn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,qn=/^\w*$/;function Jn(e,t){return Array.isArray(e)?!1:typeof e==`number`||typeof e==`boolean`||e==null||M(e)?!0:typeof e==`string`&&(qn.test(e)||!Kn.test(e))||t!=null&&Object.hasOwn(t,e)}function Yn(e,t,n,r){if(e==null)return[];n=r?void 0:n,Array.isArray(e)||(e=Bt(e)?Array.from(e):Object.values(e)),Array.isArray(t)||(t=t==null?[null]:[t]),t.length===0&&(t=[null]),Array.isArray(n)||(n=n==null?[]:[n]),n=n.map(e=>String(e));let i=(e,t)=>{let n=e,r=0;for(;r0&&r===t.length?n:void 0},a=(e,t)=>{if(e==null)return t;if(t!=null)return typeof e==`object`&&`key`in e?Object.hasOwn(t,e.key)?t[e.key]:i(t,e.path):typeof e==`function`?e(t):Array.isArray(e)?i(t,e):t[e]},o=t.map(e=>(Array.isArray(e)&&e.length===1&&(e=e[0]),e==null||typeof e==`function`||Array.isArray(e)||Jn(e)?e:{key:e,path:te(e)}));return e.map(e=>({original:e,criteria:o.map(t=>a(t,e))})).slice().sort((e,t)=>{for(let r=0;re.original)}function Xn(e,...t){let n=t.length;return n>1&&Un(e,t[0],t[1])?t=[]:n>2&&Un(t[0],t[1],t[2])&&(t=[t[0]]),Yn(e,Hn(t),[`asc`])}var Zn=e=>e.legend.settings,Qn=e=>e.legend.size;R([e=>e.legend.payload,Zn],(e,t)=>{var n=t.itemSorter,r=e.flat(1);return n?Xn(r,n):r});function z(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var $n=typeof Symbol==`function`&&Symbol.observable||`@@observable`,er=()=>Math.random().toString(36).substring(7).split(``).join(`.`),tr={INIT:`@@redux/INIT${er()}`,REPLACE:`@@redux/REPLACE${er()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${er()}`};function nr(e){if(typeof e!=`object`||!e)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function rr(e,t,n){if(typeof e!=`function`)throw Error(z(2));if(typeof t==`function`&&typeof n==`function`||typeof n==`function`&&typeof arguments[3]==`function`)throw Error(z(0));if(typeof t==`function`&&n===void 0&&(n=t,t=void 0),n!==void 0){if(typeof n!=`function`)throw Error(z(1));return n(rr)(e,t)}let r=e,i=t,a=new Map,o=a,s=0,c=!1;function l(){o===a&&(o=new Map,a.forEach((e,t)=>{o.set(t,e)}))}function u(){if(c)throw Error(z(3));return i}function d(e){if(typeof e!=`function`)throw Error(z(4));if(c)throw Error(z(5));let t=!0;l();let n=s++;return o.set(n,e),function(){if(t){if(c)throw Error(z(6));t=!1,l(),o.delete(n),a=null}}}function f(e){if(!nr(e))throw Error(z(7));if(e.type===void 0)throw Error(z(8));if(typeof e.type!=`string`)throw Error(z(17));if(c)throw Error(z(9));try{c=!0,i=r(i,e)}finally{c=!1}return(a=o).forEach(e=>{e()}),e}function p(e){if(typeof e!=`function`)throw Error(z(10));r=e,f({type:tr.REPLACE})}function m(){let e=d;return{subscribe(t){if(typeof t!=`object`||!t)throw Error(z(11));function n(){let e=t;e.next&&e.next(u())}return n(),{unsubscribe:e(n)}},[$n](){return this}}}return f({type:tr.INIT}),{dispatch:f,subscribe:d,getState:u,replaceReducer:p,[$n]:m}}function ir(e){Object.keys(e).forEach(t=>{let n=e[t];if(n(void 0,{type:tr.INIT})===void 0)throw Error(z(12));if(n(void 0,{type:tr.PROBE_UNKNOWN_ACTION()})===void 0)throw Error(z(13))})}function ar(e){let t=Object.keys(e),n={};for(let r=0;re:e.length===1?e[0]:e.reduce((e,t)=>(...n)=>e(t(...n)))}function sr(...e){return t=>(n,r)=>{let i=t(n,r),a=()=>{throw Error(z(15))},o={getState:i.getState,dispatch:(e,...t)=>a(e,...t)};return a=or(...e.map(e=>e(o)))(i.dispatch),{...i,dispatch:a}}}function cr(e){return nr(e)&&`type`in e&&typeof e.type==`string`}var lr=Symbol.for(`immer-nothing`),ur=Symbol.for(`immer-draftable`),dr=Symbol.for(`immer-state`);function fr(e,...t){throw Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var pr=Object,mr=pr.getPrototypeOf,hr=`constructor`,gr=`prototype`,_r=`configurable`,vr=`enumerable`,yr=`writable`,br=`value`,xr=e=>!!e&&!!e[dr];function Sr(e){return e?Tr(e)||Mr(e)||!!e[ur]||!!e[hr]?.[ur]||Nr(e)||Pr(e):!1}var Cr=pr[gr][hr].toString(),wr=new WeakMap;function Tr(e){if(!e||!Fr(e))return!1;let t=mr(e);if(t===null||t===pr[gr])return!0;let n=pr.hasOwnProperty.call(t,hr)&&t[hr];if(n===Object)return!0;if(!Ir(n))return!1;let r=wr.get(n);return r===void 0&&(r=Function.toString.call(n),wr.set(n,r)),r===Cr}function Er(e,t,n=!0){Dr(e)===0?(n?Reflect.ownKeys(e):pr.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Dr(e){let t=e[dr];return t?t.type_:Mr(e)?1:Nr(e)?2:Pr(e)?3:0}var Or=(e,t,n=Dr(e))=>n===2?e.has(t):pr[gr].hasOwnProperty.call(e,t),kr=(e,t,n=Dr(e))=>n===2?e.get(t):e[t],Ar=(e,t,n,r=Dr(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function jr(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}var Mr=Array.isArray,Nr=e=>e instanceof Map,Pr=e=>e instanceof Set,Fr=e=>typeof e==`object`,Ir=e=>typeof e==`function`,Lr=e=>typeof e==`boolean`;function Rr(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var zr=e=>e.copy_||e.base_,Br=e=>e.modified_?e.copy_:e.base_;function Vr(e,t){if(Nr(e))return new Map(e);if(Pr(e))return new Set(e);if(Mr(e))return Array[gr].slice.call(e);let n=Tr(e);if(t===!0||t===`class_only`&&!n){let t=pr.getOwnPropertyDescriptors(e);delete t[dr];let n=Reflect.ownKeys(t);for(let r=0;r1&&pr.defineProperties(e,{set:Wr,add:Wr,clear:Wr,delete:Wr}),pr.freeze(e),t&&Er(e,(e,t)=>{Hr(t,!0)},!1),e)}function Ur(){fr(2)}var Wr={[br]:Ur};function Gr(e){return e===null||!Fr(e)||pr.isFrozen(e)}var Kr=`MapSet`,qr=`Patches`,Jr=`ArrayMethods`,Yr={};function Xr(e){let t=Yr[e];return t||fr(0,e),t}var Zr=e=>!!Yr[e],Qr,$r=()=>Qr,ei=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Zr(Kr)?Xr(Kr):void 0,arrayMethodsPlugin_:Zr(Jr)?Xr(Jr):void 0});function ti(e,t){t&&(e.patchPlugin_=Xr(qr),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function ni(e){ri(e),e.drafts_.forEach(ai),e.drafts_=null}function ri(e){e===Qr&&(Qr=e.parent_)}var ii=e=>Qr=ei(Qr,e);function ai(e){let t=e[dr];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function oi(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[dr].modified_&&(ni(t),fr(4)),Sr(e)&&(e=si(t,e));let{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[dr].base_,e,t)}else e=si(t,n);return ci(t,e,!0),ni(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===lr?void 0:e}function si(e,t){if(Gr(t))return t;let n=t[dr];if(!n)return gi(t,e.handledSet_,e);if(!ui(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){let{callbacks_:t}=n;if(t)for(;t.length>0;)t.pop()(e);mi(n,e)}return n.copy_}function ci(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Hr(t,n)}function li(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var ui=(e,t)=>e.scope_===t,di=[];function fi(e,t,n,r){let i=zr(e),a=e.type_;if(r!==void 0&&kr(i,r,a)===t){Ar(i,r,n,a);return}if(!e.draftLocations_){let t=e.draftLocations_=new Map;Er(i,(e,n)=>{if(xr(n)){let r=t.get(n)||[];r.push(e),t.set(n,r)}})}let o=e.draftLocations_.get(t)??di;for(let e of o)Ar(i,e,n,a)}function pi(e,t,n){e.callbacks_.push(function(r){let i=t;if(!i||!ui(i,r))return;r.mapSetPlugin_?.fixSetContents(i);let a=Br(i);fi(e,i.draft_??i,a,n),mi(i,r)})}function mi(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let r=n.getPath(e);r&&n.generatePatches_(e,r,t)}li(e)}}function hi(e,t,n){let{scope_:r}=e;if(xr(n)){let i=n[dr];ui(i,r)&&i.callbacks_.push(function(){Ti(e),fi(e,n,Br(i),t)})}else Sr(n)&&e.callbacks_.push(function(){let i=zr(e);e.type_===3?i.has(n)&&gi(n,r.handledSet_,r):kr(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&gi(kr(e.copy_,t,e.type_),r.handledSet_,r)})}function gi(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||xr(e)||t.has(e)||!Sr(e)||Gr(e)?e:(t.add(e),Er(e,(r,i)=>{if(xr(i)){let t=i[dr];ui(t,n)&&(Ar(e,r,Br(t),e.type_),li(t))}else Sr(i)&&gi(i,t,n)}),e)}function _i(e,t){let n=Mr(e),r={type_:+!!n,scope_:t?t.scope_:$r(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},i=r,a=vi;n&&(i=[r],a=yi);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}var vi={get(e,t){if(t===dr)return e;let n=e.scope_.arrayMethodsPlugin_,r=e.type_===1&&typeof t==`string`;if(r&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);let i=zr(e);if(!Or(i,t,e.type_))return Si(e,i,t);let a=i[t];if(e.finalized_||!Sr(a)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&Rr(t))return a;if(a===bi(e.base_,t)||xi(e,t,a)){Ti(e);let n=e.type_===1?+t:t,r=Di(e.scope_,a,e,n);return e.copy_[n]=r}return a},has(e,t){return t in zr(e)},ownKeys(e){return Reflect.ownKeys(zr(e))},set(e,t,n){let r=Ci(zr(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=bi(zr(e),t),i=r?.[dr];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(jr(n,r)&&(n!==void 0||Or(e.base_,t,e.type_)))return!0;Ti(e),wi(e)}return e.copy_[t]===n&&(n!==void 0||Or(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])?!0:(e.copy_[t]=n,e.assigned_.set(t,!0),hi(e,t,n),!0)},deleteProperty(e,t){return Ti(e),bi(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),wi(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=zr(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[yr]:!0,[_r]:e.type_!==1||t!==`length`,[vr]:r[vr],[br]:n[t]}},defineProperty(){fr(11)},getPrototypeOf(e){return mr(e.base_)},setPrototypeOf(){fr(12)}},yi={};for(let e in vi){let t=vi[e];yi[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}yi.deleteProperty=function(e,t){return yi.set.call(this,e,t,void 0)},yi.set=function(e,t,n){return vi.set.call(this,e[0],t,n,e[0])};function bi(e,t){let n=e[dr];return(n?zr(n):e)[t]}function xi(e,t,n){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!Sr(n)||n[dr]?!1:e.baseRefs_.has(n)}function Si(e,t,n){let r=Ci(t,n);return r?br in r?r[br]:r.get?.call(e.draft_):void 0}function Ci(e,t){if(!(t in e))return;let n=mr(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=mr(n)}}function wi(e){e.modified_||(e.modified_=!0,e.parent_&&wi(e.parent_))}function Ti(e){e.copy_||=(e.assigned_=new Map,Vr(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Ei=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(Ir(e)&&!Ir(t)){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}Ir(t)||fr(6),n!==void 0&&!Ir(n)&&fr(7);let r;if(Sr(e)){let i=ii(this),a=Di(i,e,void 0),o=!0;try{r=t(a),o=!1}finally{o?ni(i):ri(i)}return ti(i,n),oi(r,i)}if(!e||!Fr(e)){if(r=t(e),r===void 0&&(r=e),r===lr&&(r=void 0),this.autoFreeze_&&Hr(r,!0),n){let t=[],i=[];Xr(qr).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}fr(1,e)},this.produceWithPatches=(e,t)=>{if(Ir(e))return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;return[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},Lr(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),Lr(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),Lr(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Sr(e)||fr(8),xr(e)&&(e=Oi(e));let t=ii(this),n=Di(t,e,void 0);return n[dr].isManual_=!0,ri(t),n}finishDraft(e,t){let n=e&&e[dr];(!n||!n.isManual_)&&fr(9);let{scope_:r}=n;return ti(r,t),oi(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let r=t[n];if(r.path.length===0&&r.op===`replace`){e=r.value;break}}n>-1&&(t=t.slice(n+1));let r=Xr(qr).applyPatches_;return xr(e)?r(e,t):this.produce(e,e=>r(e,t))}};function Di(e,t,n,r){let[i,a]=Nr(t)?Xr(Kr).proxyMap_(t,n):Pr(t)?Xr(Kr).proxySet_(t,n):_i(t,n);return(n?.scope_??$r()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&r!==void 0?pi(n,a,r):a.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(a);let{patchPlugin_:t}=e;a.modified_&&t&&t.generatePatches_(a,[],e)}),i}function Oi(e){return xr(e)||fr(10,e),ki(e)}function ki(e){if(!Sr(e)||Gr(e))return e;let t=e[dr],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Vr(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=Vr(e,!0);return Er(n,(e,t)=>{Ar(n,e,ki(t))},r),t&&(t.finalized_=!1),n}globalThis.Iterator?.from;var Ai=new Ei().produce,B=e=>e;function ji(e){return({dispatch:t,getState:n})=>r=>i=>typeof i==`function`?i(t,n,e):r(i)}var Mi=ji(),Ni=ji,Pi=typeof window<`u`&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]==`object`?or:or.apply(null,arguments)};typeof window<`u`&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;function Fi(e,t){function n(...n){if(t){let r=t(...n);if(!r)throw Error(Ua(0));return{type:e,payload:r.payload,...`meta`in r&&{meta:r.meta},...`error`in r&&{error:r.error}}}return{type:e,payload:n[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=t=>cr(t)&&t.type===e,n}var Ii=class e extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,e.prototype)}static get[Symbol.species](){return e}concat(...e){return super.concat.apply(this,e)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new e(...t[0].concat(this)):new e(...t.concat(this))}};function Li(e){return Sr(e)?Ai(e,()=>{}):e}function Ri(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function zi(e){return typeof e==`boolean`}var Bi=()=>function(e){let{thunk:t=!0,immutableCheck:n=!0,serializableCheck:r=!0,actionCreatorCheck:i=!0}=e??{},a=new Ii;return t&&(zi(t)?a.push(Mi):a.push(Ni(t.extraArgument))),a},Vi=`RTK_autoBatch`,V=()=>e=>({payload:e,meta:{[Vi]:!0}}),Hi=e=>t=>{setTimeout(t,e)},Ui=(e,t)=>n=>{let r=!1,i=()=>{r||(r=!0,cancelAnimationFrame(a),clearTimeout(o),n())},a=e(i),o=setTimeout(i,t)},Wi=(e={type:`raf`})=>t=>(...n)=>{let r=t(...n),i=!0,a=!1,o=!1,s=new Set,c=e.type===`tick`?queueMicrotask:e.type===`raf`?typeof window<`u`&&window.requestAnimationFrame?Ui(window.requestAnimationFrame,100):Hi(10):e.type===`callback`?e.queueNotification:Hi(e.timeout),l=()=>{o=!1,a&&(a=!1,s.forEach(e=>e()))};return Object.assign({},r,{subscribe(e){let t=r.subscribe(()=>i&&e());return s.add(e),()=>{t(),s.delete(e)}},dispatch(e){try{return i=!e?.meta?.[Vi],a=!i,a&&(o||(o=!0,c(l))),r.dispatch(e)}finally{i=!0}}})},Gi=e=>function(t){let{autoBatch:n=!0}=t??{},r=new Ii(e);return n&&r.push(Wi(typeof n==`object`?n:void 0)),r};function Ki(e){let t=Bi(),{reducer:n=void 0,middleware:r,devTools:i=!0,duplicateMiddlewareCheck:a=!0,preloadedState:o=void 0,enhancers:s=void 0}=e||{},c;if(typeof n==`function`)c=n;else if(nr(n))c=ar(n);else throw Error(Ua(1));let l;l=typeof r==`function`?r(t):t();let u=or;i&&(u=Pi({trace:!1,...typeof i==`object`&&i}));let d=Gi(sr(...l)),f=typeof s==`function`?s(d):d(),p=u(...f);return rr(c,o,p)}function qi(e){let t={},n=[],r,i={addCase(e,n){let r=typeof e==`string`?e:e.type;if(!r)throw Error(Ua(28));if(r in t)throw Error(Ua(29));return t[r]=n,i},addAsyncThunk(e,r){return r.pending&&(t[e.pending.type]=r.pending),r.rejected&&(t[e.rejected.type]=r.rejected),r.fulfilled&&(t[e.fulfilled.type]=r.fulfilled),r.settled&&n.push({matcher:e.settled,reducer:r.settled}),i},addMatcher(e,t){return n.push({matcher:e,reducer:t}),i},addDefaultCase(e){return r=e,i}};return e(i),[t,n,r]}function Ji(e){return typeof e==`function`}function Yi(e,t){let[n,r,i]=qi(t),a;if(Ji(e))a=()=>Li(e());else{let t=Li(e);a=()=>t}function o(e=a(),t){let o=[n[t.type],...r.filter(({matcher:e})=>e(t)).map(({reducer:e})=>e)];return o.filter(e=>!!e).length===0&&(o=[i]),o.reduce((e,n)=>{if(n){if(xr(e)){let r=n(e,t);return r===void 0?e:r}if(Sr(e))return Ai(e,e=>n(e,t));{let r=n(e,t);if(r===void 0){if(e===null)return e;throw Error(`A case reducer on a non-draftable value must not return undefined`)}return r}}return e},e)}return o.getInitialState=a,o}var Xi=`ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW`,Zi=(e=21)=>{let t=``,n=e;for(;n--;)t+=Xi[Math.random()*64|0];return t},Qi=Symbol.for(`rtk-slice-createasyncthunk`);function $i(e,t){return`${e}/${t}`}function ea({creators:e}={}){let t=e?.asyncThunk?.[Qi];return function(e){let{name:n,reducerPath:r=n}=e;if(!n)throw Error(Ua(11));let i=(typeof e.reducers==`function`?e.reducers(ra()):e.reducers)||{},a=Object.keys(i),o={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(e,t){let n=typeof e==`string`?e:e.type;if(!n)throw Error(Ua(12));if(n in o.sliceCaseReducersByType)throw Error(Ua(13));return o.sliceCaseReducersByType[n]=t,s},addMatcher(e,t){return o.sliceMatchers.push({matcher:e,reducer:t}),s},exposeAction(e,t){return o.actionCreators[e]=t,s},exposeCaseReducer(e,t){return o.sliceCaseReducersByName[e]=t,s}};a.forEach(r=>{let a=i[r],o={reducerName:r,type:$i(n,r),createNotation:typeof e.reducers==`function`};aa(a)?sa(o,a,s,t):ia(o,a,s)});function c(){let[t={},n=[],r=void 0]=typeof e.extraReducers==`function`?qi(e.extraReducers):[e.extraReducers],i={...t,...o.sliceCaseReducersByType};return Yi(e.initialState,e=>{for(let t in i)e.addCase(t,i[t]);for(let t of o.sliceMatchers)e.addMatcher(t.matcher,t.reducer);for(let t of n)e.addMatcher(t.matcher,t.reducer);r&&e.addDefaultCase(r)})}let l=e=>e,u=new Map,d=new WeakMap,f;function p(e,t){return f||=c(),f(e,t)}function m(){return f||=c(),f.getInitialState()}function h(t,n=!1){function r(e){let i=e[t];return i===void 0&&n&&(i=Ri(d,r,m)),i}function i(t=l){return Ri(Ri(u,n,()=>new WeakMap),t,()=>{let r={};for(let[i,a]of Object.entries(e.selectors??{}))r[i]=ta(a,t,()=>Ri(d,t,m),n);return r})}return{reducerPath:t,getSelectors:i,get selectors(){return i(r)},selectSlice:r}}let g={name:n,reducer:p,actions:o.actionCreators,caseReducers:o.sliceCaseReducersByName,getInitialState:m,...h(r),injectInto(e,{reducerPath:t,...n}={}){let i=t??r;return e.inject({reducerPath:i,reducer:p},n),{...g,...h(i,!0)}}};return g}}function ta(e,t,n,r){function i(i,...a){let o=t(i);return o===void 0&&r&&(o=n()),e(o,...a)}return i.unwrapped=e,i}var na=ea();function ra(){function e(e,t){return{_reducerDefinitionType:`asyncThunk`,payloadCreator:e,...t}}return e.withTypes=()=>e,{reducer(e){return Object.assign({[e.name](...t){return e(...t)}}[e.name],{_reducerDefinitionType:`reducer`})},preparedReducer(e,t){return{_reducerDefinitionType:`reducerWithPrepare`,prepare:e,reducer:t}},asyncThunk:e}}function ia({type:e,reducerName:t,createNotation:n},r,i){let a,o;if(`reducer`in r){if(n&&!oa(r))throw Error(Ua(17));a=r.reducer,o=r.prepare}else a=r;i.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,o?Fi(e,o):Fi(e))}function aa(e){return e._reducerDefinitionType===`asyncThunk`}function oa(e){return e._reducerDefinitionType===`reducerWithPrepare`}function sa({type:e,reducerName:t},n,r,i){if(!i)throw Error(Ua(18));let{payloadCreator:a,fulfilled:o,pending:s,rejected:c,settled:l,options:u}=n,d=i(e,a,u);r.exposeAction(t,d),o&&r.addCase(d.fulfilled,o),s&&r.addCase(d.pending,s),c&&r.addCase(d.rejected,c),l&&r.addMatcher(d.settled,l),r.exposeCaseReducer(t,{fulfilled:o||ca,pending:s||ca,rejected:c||ca,settled:l||ca})}function ca(){}var la=`task`,ua=`listener`,da=`completed`,fa=`cancelled`,pa=`task-${fa}`,ma=`task-${da}`,ha=`${ua}-${fa}`,ga=`${ua}-${da}`,_a=class{constructor(e){this.code=e,this.message=`${la} ${fa} (reason: ${e})`}code;name=`TaskAbortError`;message},va=(e,t)=>{if(typeof e!=`function`)throw TypeError(Ua(32))},ya=()=>{},ba=(e,t=ya)=>(e.catch(t),e),xa=(e,t)=>(e.addEventListener(`abort`,t,{once:!0}),()=>e.removeEventListener(`abort`,t)),Sa=e=>{if(e.aborted)throw new _a(e.reason)};function Ca(e,t){let n=ya;return new Promise((r,i)=>{let a=()=>i(new _a(e.reason));if(e.aborted){a();return}n=xa(e,a),t.finally(()=>n()).then(r,i)}).finally(()=>{n=ya})}var wa=async(e,t)=>{try{return await Promise.resolve(),{status:`ok`,value:await e()}}catch(e){return{status:e instanceof _a?`cancelled`:`rejected`,error:e}}finally{t?.()}},Ta=e=>t=>ba(Ca(e,t).then(t=>(Sa(e),t))),Ea=e=>{let t=Ta(e);return e=>t(new Promise(t=>setTimeout(t,e)))},{assign:Da}=Object,Oa={},ka=`listenerMiddleware`,Aa=(e,t)=>{let n=t=>xa(e,()=>t.abort(e.reason));return(r,i)=>{va(r,`taskExecutor`);let a=new AbortController;n(a);let o=wa(async()=>{Sa(e),Sa(a.signal);let t=await r({pause:Ta(a.signal),delay:Ea(a.signal),signal:a.signal});return Sa(a.signal),t},()=>a.abort(ma));return i?.autoJoin&&t.push(o.catch(ya)),{result:Ta(e)(o),cancel(){a.abort(pa)}}}},ja=(e,t)=>{let n=async(n,r)=>{Sa(t);let i=()=>{},a=[new Promise((t,r)=>{let a=e({predicate:n,effect:(e,n)=>{n.unsubscribe(),t([e,n.getState(),n.getOriginalState()])}});i=()=>{a(),r()}})];r!=null&&a.push(new Promise(e=>setTimeout(e,r,null)));try{let e=await Ca(t,Promise.race(a));return Sa(t),e}finally{i()}};return((e,t)=>ba(n(e,t)))},Ma=e=>{let{type:t,actionCreator:n,matcher:r,predicate:i,effect:a}=e;if(t)i=Fi(t).match;else if(n)t=n.type,i=n.match;else if(r)i=r;else if(!i)throw Error(Ua(21));return va(a,`options.listener`),{predicate:i,type:t,effect:a}},Na=Da(e=>{let{type:t,predicate:n,effect:r}=Ma(e);return{id:Zi(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw Error(Ua(22))}}},{withTypes:()=>Na}),Pa=(e,t)=>{let{type:n,effect:r,predicate:i}=Ma(t);return Array.from(e.values()).find(e=>(typeof n==`string`?e.type===n:e.predicate===i)&&e.effect===r)},Fa=e=>{e.pending.forEach(e=>{e.abort(ha)})},Ia=(e,t)=>()=>{for(let e of t.keys())Fa(e);e.clear()},La=(e,t,n)=>{try{e(t,n)}catch(e){setTimeout(()=>{throw e},0)}},Ra=Da(Fi(`${ka}/add`),{withTypes:()=>Ra}),za=Fi(`${ka}/removeAll`),Ba=Da(Fi(`${ka}/remove`),{withTypes:()=>Ba}),Va=(...e)=>{console.error(`${ka}/error`,...e)},Ha=(e={})=>{let t=new Map,n=new Map,r=e=>{let t=n.get(e)??0;n.set(e,t+1)},i=e=>{let t=n.get(e)??1;t===1?n.delete(e):n.set(e,t-1)},{extra:a,onError:o=Va}=e;va(o,`onError`);let s=e=>(e.unsubscribe=()=>t.delete(e.id),t.set(e.id,e),t=>{e.unsubscribe(),t?.cancelActive&&Fa(e)}),c=(e=>{let n=Pa(t,e)??Na(e);return s(n)});Da(c,{withTypes:()=>c});let l=e=>{let n=Pa(t,e);return n&&(n.unsubscribe(),e.cancelActive&&Fa(n)),!!n};Da(l,{withTypes:()=>l});let u=async(e,n,s,l)=>{let u=new AbortController,d=ja(c,u.signal),f=[];try{e.pending.add(u),r(e),await Promise.resolve(e.effect(n,Da({},s,{getOriginalState:l,condition:(e,t)=>d(e,t).then(Boolean),take:d,delay:Ea(u.signal),pause:Ta(u.signal),extra:a,signal:u.signal,fork:Aa(u.signal,f),unsubscribe:e.unsubscribe,subscribe:()=>{t.set(e.id,e)},cancelActiveListeners:()=>{e.pending.forEach((e,t,n)=>{e!==u&&(e.abort(ha),n.delete(e))})},cancel:()=>{u.abort(ha),e.pending.delete(u)},throwIfCancelled:()=>{Sa(u.signal)}})))}catch(e){e instanceof _a||La(o,e,{raisedBy:`effect`})}finally{await Promise.all(f),u.abort(ga),i(e),e.pending.delete(u)}},d=Ia(t,n);return{middleware:e=>n=>r=>{if(!cr(r))return n(r);if(Ra.match(r))return c(r.payload);if(za.match(r)){d();return}if(Ba.match(r))return l(r.payload);let i=e.getState(),a=()=>{if(i===Oa)throw Error(Ua(23));return i},s;try{if(s=n(r),t.size>0){let n=e.getState(),s=Array.from(t.values());for(let t of s){let s=!1;try{s=t.predicate(r,n,i)}catch(e){s=!1,La(o,e,{raisedBy:`predicate`})}s&&u(t,r,e,a)}}}finally{i=Oa}return s},startListening:c,stopListening:l,clearListeners:d}};function Ua(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Wa=na({name:`chartLayout`,initialState:{layoutType:`horizontal`,width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){e.margin.top=t.payload.top??0,e.margin.right=t.payload.right??0,e.margin.bottom=t.payload.bottom??0,e.margin.left=t.payload.left??0},setScale(e,t){e.scale=t.payload}}}),Ga=Wa.actions,Ka=Ga.setMargin,qa=Ga.setLayout,Ja=Ga.setChartSize,Ya=Ga.setScale,Xa=Wa.reducer;function Za(e,t,n){return Array.isArray(e)&&e&&t+n!==0?e.slice(t,n+1):e}function H(e){return Number.isFinite(e)}function Qa(e){return typeof e==`number`&&e>0&&Number.isFinite(e)}function $a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function eo(e){for(var t=1;t{if(t&&n){var r=n.width,i=n.height,a=t.align,o=t.verticalAlign,s=t.layout,c=t.position,l=t.offset,u=l===void 0?0:l;if(c!=null){if(ke(c)){if(c===`top`&&P(e.top))return eo(eo({},e),{},{top:e.top+(i||0)+u});if(c===`bottom`&&P(e.bottom))return eo(eo({},e),{},{bottom:e.bottom+(i||0)+u});if(c===`left`&&P(e.left))return eo(eo({},e),{},{left:e.left+(r||0)+u});if(c===`right`&&P(e.right))return eo(eo({},e),{},{right:e.right+(r||0)+u})}return e}if((s===`vertical`||s===`horizontal`&&o===`middle`)&&a!==`center`&&P(e[a]))return eo(eo({},e),{},{[a]:e[a]+(r||0)});if((s===`horizontal`||s===`vertical`&&a===`center`)&&o!==`middle`&&P(e[o]))return eo(eo({},e),{},{[o]:e[o]+(i||0)})}return e},ao=(e,t)=>e===`horizontal`&&t===`xAxis`||e===`vertical`&&t===`yAxis`||e===`centric`&&t===`angleAxis`||e===`radial`&&t===`radiusAxis`,oo=(e,t,n,r)=>{if(r)return e.map(e=>e.coordinate);var i,a,o=e.map(e=>(e.coordinate===t&&(i=!0),e.coordinate===n&&(a=!0),e.coordinate));return i||o.push(t),a||o.push(n),o},so=(e,t,n)=>{if(!e)return null;var r=e.duplicateDomain,i=e.type,a=e.range,o=e.scale,s=e.realScaleType,c=e.isCategorical,l=e.categoricalDomain,u=e.tickCount,d=e.ticks,f=e.niceTicks,p=e.axisType;if(!o)return null;var m=s===`scaleBand`&&o.bandwidth?o.bandwidth()/2:2,h=(t||n)&&i===`category`&&o.bandwidth?o.bandwidth()/m:0;return h=p===`angleAxis`&&a&&a.length>=2?se(a[0]-a[1])*2*h:h,t&&(d||f)?(d||f||[]).map((e,t)=>{var n=r?r.indexOf(e):e,i=o.map(n);return H(i)?{coordinate:i+h,value:e,offset:h,index:t}:null}).filter(ye):c&&l?l.map((e,t)=>{var n=o.map(e);return H(n)?{coordinate:n+h,value:e,index:t,offset:h}:null}).filter(ye):o.ticks&&!n&&u!=null?o.ticks(u).map((e,t)=>{var n=o.map(e);return H(n)?{coordinate:n+h,value:e,index:t,offset:h}:null}).filter(ye):o.domain().map((e,t)=>{var n=o.map(e);return H(n)?{coordinate:n+h,value:r?r[e]:e,index:t,offset:h}:null}).filter(ye)},co={sign:e=>{var t=e.length;if(!(t<=0)){var n=e[0]?.length;if(!(n==null||n<=0))for(var r=0;r=0?(s[0]=i,i+=u,s[1]=i):(s[0]=a,a+=u,s[1]=a)}}}},expand:Et,none:xt,silhouette:Dt,wiggle:Ot,positive:e=>{var t=e.length;if(!(t<=0)){var n=e[0]?.length;if(!(n==null||n<=0))for(var r=0;r=0?(o[0]=i,i+=s,o[1]=i):(o[0]=0,o[1]=0)}}}}},lo=(e,t,n)=>{var r=co[n]??xt,i=Tt().keys(t).value((e,t)=>Number(U(e,t,0))).order(St).offset(r)(e);return i.forEach((n,r)=>{n.forEach((n,i)=>{var a=U(e[i],t[r],0);Array.isArray(a)&&a.length===2&&P(a[0])&&P(a[1])&&(n[0]=a[0],n[1]=a[1])})}),i};function uo(e){return e==null?void 0:String(e)}function fo(e){var t=e.axis,n=e.ticks,r=e.bandSize,i=e.entry,a=e.index,o=e.dataKey;if(t.type===`category`){if(!t.allowDuplicatedCategory&&t.dataKey&&!_e(i[t.dataKey])){var s=ge(n,`value`,i[t.dataKey]);if(s)return s.coordinate+r/2}return n!=null&&n[a]?n[a].coordinate+r/2:null}var c=U(i,_e(o)?t.dataKey:o),l=t.scale.map(c);return P(l)?l:null}var po=e=>{var t=e.flat(2).filter(P);return[Math.min(...t),Math.max(...t)]},mo=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],ho=(e,t,n)=>{if(e!=null&&Object.keys(e).length!==0)return mo(Object.keys(e).reduce((r,i)=>{var a=e[i];if(!a)return r;var o=a.stackedData.reduce((e,r)=>{var i=po(Za(r,t,n));return!H(i[0])||!H(i[1])?e:[Math.min(e[0],i[0]),Math.max(e[1],i[1])]},[1/0,-1/0]);return[Math.min(o[0],r[0]),Math.max(o[1],r[1])]},[1/0,-1/0]))},go=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,_o=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,vo=(e,t,n)=>{if(e&&e.scale&&e.scale.bandwidth){var r=e.scale.bandwidth();if(!n||r>0)return r}if(e&&t&&t.length>=2){for(var i=Xn(t,e=>e.coordinate),a=[],o=0,s=1,c=i.length;su&&(d=Math.min(f,d));return d===1/0?0:d}return n?void 0:0};function yo(e){var t=e.tooltipEntrySettings,n=e.dataKey,r=e.payload,i=e.value,a=e.name;return eo(eo({},t),{},{dataKey:n,payload:r,value:i,name:a})}function bo(e,t){if(e!=null)return String(e);if(typeof t==`string`)return t}var xo=(e,t)=>{if(t===`horizontal`)return e.relativeX;if(t===`vertical`)return e.relativeY},So=(e,t)=>t===`centric`?e.angle:e.radius,Co=e=>e.layout.width,wo=e=>e.layout.height,To=e=>e.layout.scale,Eo=e=>e.layout.margin,Do=R(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),Oo=R(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),ko=`data-recharts-item-index`;function Ao(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function jo(e){for(var t=1;te.brush.height;function Io(e){return Oo(e).reduce((e,t)=>t.orientation===`left`&&!t.mirror&&!t.hide?e+(typeof t.width==`number`?t.width:60):e,0)}function Lo(e){return Oo(e).reduce((e,t)=>t.orientation===`right`&&!t.mirror&&!t.hide?e+(typeof t.width==`number`?t.width:60):e,0)}function Ro(e){return Do(e).reduce((e,t)=>t.orientation===`top`&&!t.mirror&&!t.hide?e+(typeof t.height==`number`?t.height:30):e,0)}function zo(e){return Do(e).reduce((e,t)=>t.orientation===`bottom`&&!t.mirror&&!t.hide?e+(typeof t.height==`number`?t.height:30):e,0)}var Bo=R([Co,wo,Eo,Fo,Io,Lo,Ro,zo,Zn,Qn],(e,t,n,r,i,a,o,s,c,l)=>{var u={left:(n.left||0)+i,right:(n.right||0)+a},d=jo(jo({},{top:(n.top||0)+o,bottom:(n.bottom||0)+s}),u),f=d.bottom;d.bottom+=r,d=io(d,c,l);var p=e-d.left-d.right,m=t-d.top-d.bottom;return jo(jo({brushBottom:f},d),{},{width:Math.max(p,0),height:Math.max(m,0)})}),Vo=R(Bo,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),Ho=R(Co,wo,(e,t)=>({x:0,y:0,width:e,height:t})),Uo=(0,s.createContext)(null),Wo=()=>(0,s.useContext)(Uo)!=null,Go=e=>e.brush,Ko=R([Go,Bo,Eo],(e,t,n)=>({height:e.height,x:P(e.x)?e.x:t.left,y:P(e.y)?e.y:t.top+t.height+t.brushBottom-(n?.bottom||0),width:P(e.width)?e.width:t.width}));function qo(e,t,{signal:n,edges:r}={}){let i,a=null,o=r!=null&&r.includes(`leading`),s=r==null||r.includes(`trailing`),c=()=>{a!==null&&(e.apply(i,a),i=void 0,a=null)},l=()=>{s&&c(),p()},u=null,d=()=>{u!=null&&clearTimeout(u),u=setTimeout(()=>{u=null,l()},t)},f=()=>{u!==null&&(clearTimeout(u),u=null)},p=()=>{f(),i=void 0,a=null},m=()=>{c()},h=function(...e){if(n?.aborted)return;i=this,a=e;let t=u==null;d(),o&&t&&c()};return h.schedule=d,h.cancel=p,h.flush=m,n?.addEventListener(`abort`,p,{once:!0}),h}function Jo(e,t=0,n={}){typeof n!=`object`&&(n={});let{leading:r=!1,trailing:i=!0,maxWait:a}=n,o=[,,];r&&(o[0]=`leading`),i&&(o[1]=`trailing`);let s,c=null,l=qo(function(...t){s=e.apply(this,t),c=null},t,{edges:o}),u=function(...t){return a!=null&&(c===null&&(c=Date.now()),Date.now()-c>=a)?((r||i)&&(s=e.apply(this,t)),c=Date.now(),l.cancel(),l.schedule(),s):(l.apply(this,t),s)};return u.cancel=l.cancel,u.flush=()=>(l.flush(),s),u}function Yo(e,t=0,n={}){let{leading:r=!0,trailing:i=!0}=n;return Jo(e,t,{leading:r,maxWait:t,trailing:i})}var Xo=function(e,t){var n=[...arguments].slice(2);if(typeof console<`u`&&console.warn&&(t===void 0&&console.warn(`LogUtils requires an error message argument`),!e)){if(t===void 0)console.warn(`Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.`);else{var r=0;console.warn(t.replace(/%s/g,()=>n[r++]))}}},Zo={width:`100%`,height:`100%`,debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},Qo=(e,t,n)=>{var r=n.width,i=r===void 0?Zo.width:r,a=n.height,o=a===void 0?Zo.height:a,s=n.aspect,c=n.maxHeight,l=le(i)?e:Number(i),u=le(o)?t:Number(o);return s&&s>0&&(l?u=l/s:u&&(l=u*s),c&&u!=null&&u>c&&(u=c)),{calculatedWidth:l,calculatedHeight:u}},$o={width:0,height:0,overflow:`visible`},es={width:0,overflowX:`visible`},ts={height:0,overflowY:`visible`},ns={},rs=e=>{var t=e.width,n=e.height,r=le(t),i=le(n);return r&&i?$o:r?es:i?ts:ns};function is(e){var t=e.width,n=e.height,r=e.aspect,i=t,a=n;return i===void 0&&a===void 0?(i=Zo.width,a=Zo.height):i===void 0?i=r&&r>0?void 0:Zo.width:a===void 0&&(a=r&&r>0?void 0:Zo.height),{width:i,height:a}}var as=[`aspect`,`initialDimension`,`width`,`height`,`minWidth`,`minHeight`,`maxHeight`,`children`,`debounce`,`id`,`className`,`onResize`,`style`];function os(){return os=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n({width:n,height:r}),[n,r]);return xs(i)?s.createElement(bs.Provider,{value:i},t):null}var Cs=()=>(0,s.useContext)(bs),ws=(0,s.forwardRef)((e,t)=>{var n=e.aspect,r=e.initialDimension,i=r===void 0?Zo.initialDimension:r,a=e.width,c=e.height,l=e.minWidth,u=l===void 0?Zo.minWidth:l,d=e.minHeight,f=e.maxHeight,p=e.children,m=e.debounce,h=m===void 0?Zo.debounce:m,g=e.id,_=e.className,v=e.onResize,y=e.style,b=y===void 0?{}:y,x=vs(e,as),S=(0,s.useRef)(null),C=(0,s.useRef)();C.current=v,(0,s.useImperativeHandle)(t,()=>S.current);var w=fs((0,s.useState)({containerWidth:i.width,containerHeight:i.height}),2),T=w[0],E=w[1],D=(0,s.useCallback)((e,t)=>{E(n=>{var r=Math.round(e),i=Math.round(t);return n.containerWidth===r&&n.containerHeight===i?n:{containerWidth:r,containerHeight:i}})},[]);(0,s.useEffect)(()=>{if(S.current==null||typeof ResizeObserver>`u`)return be;var e=e=>{var t,n=e[0];if(n!=null){var r=n.contentRect,i=r.width,a=r.height;D(i,a),(t=C.current)==null||t.call(C,i,a)}};h>0&&(e=Yo(e,h,{trailing:!0,leading:!1}));var t=new ResizeObserver(e),n=S.current.getBoundingClientRect(),r=n.width,i=n.height;return D(r,i),t.observe(S.current),()=>{t.disconnect()}},[D,h]);var O=T.containerWidth,k=T.containerHeight;Xo(!n||n>0,`The aspect(%s) must be greater than zero.`,n);var A=Qo(O,k,{width:a,height:c,aspect:n,maxHeight:f}),j=A.calculatedWidth,M=A.calculatedHeight;return Xo(O<0||k<0||j!=null&&j>0||M!=null&&M>0,`The width(%s) and height(%s) of chart should be greater than 0, please check the style of container, or the props width(%s) and height(%s), or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the diff --git a/internal/webui/static/assets/CostChart-BwZuNP1w.js b/internal/webui/static/assets/CostChart-jLwcvRCp.js similarity index 93% rename from internal/webui/static/assets/CostChart-BwZuNP1w.js rename to internal/webui/static/assets/CostChart-jLwcvRCp.js index 6904f6dd..e0339559 100644 --- a/internal/webui/static/assets/CostChart-BwZuNP1w.js +++ b/internal/webui/static/assets/CostChart-jLwcvRCp.js @@ -1 +1 @@ -import{a as e,f as t,h as n,i as r,l as i,r as a}from"./index-B4dA6dPq.js";import{i as o,n as s,wt as c}from"./CartesianChart-2tRdU6bd.js";import{n as l,r as u,t as d}from"./XAxis-DHlPOGh6.js";import{t as f}from"./AreaChart-ByvZPuVI.js";var p=n(t(),1),m=i(),h=[`var(--accent)`,`var(--muted)`,`var(--success)`,`var(--warning)`];function g(e,t,n){let r=new Date(e);return Number.isFinite(r.getTime())?new Intl.DateTimeFormat(n===`zh`?`zh-CN`:`en-US`,t?{month:`short`,day:`numeric`}:{month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`,hour12:!1}).format(r):``}function _(e,t){return t===`credits`?e.per_model_credits??{}:t===`tokens`?e.per_model_tokens??{}:e.per_model??{}}function v(t,n){return n===`cost`?a(t):n===`tokens`?r(t):e(t)}function y(t,n){return n===`cost`?`¥${t>=10?Math.round(t):Number(t.toFixed(1))}`:n===`tokens`?r(t):e(t)}function b({active:e,payload:t,label:n,daily:r,lang:i,models:a,totalLabel:o,metric:s}){if(!e||!t?.length)return null;let c=new Map(a.map(e=>[e.id,e.label])),l=t.filter(e=>(e.value??0)>0).sort((e,t)=>t.value-e.value),u=t.reduce((e,t)=>e+(t.value??0),0);return(0,m.jsxs)(`div`,{className:`rounded-xl bg-overlay px-3 py-2 text-caption text-overlay-foreground shadow-overlay`,children:[(0,m.jsx)(`div`,{className:`mono text-muted`,children:g(String(n),r,i)}),(0,m.jsxs)(`div`,{className:`mt-1.5 grid gap-1`,children:[l.map(e=>(0,m.jsxs)(`div`,{className:`flex items-center justify-between gap-6`,children:[(0,m.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,m.jsx)(`span`,{className:`size-1.5 rounded-full`,style:{background:h[a.findIndex(t=>t.id===e.dataKey)%h.length]}}),c.get(e.dataKey)||e.dataKey]}),(0,m.jsx)(`span`,{className:`mono font-medium`,children:v(e.value,s)})]},e.dataKey)),(0,m.jsxs)(`div`,{className:`flex items-center justify-between gap-6 border-t border-separator pt-1`,children:[(0,m.jsx)(`span`,{className:`text-muted`,children:o}),(0,m.jsx)(`span`,{className:`mono font-medium`,children:v(u,s)})]})]})]})}function x({series:e,models:t,lang:n,emptyLabel:r,totalLabel:i,metric:a=`credits`}){let v=(0,p.useMemo)(()=>t.map(e=>e.id),[t]),x=(0,p.useMemo)(()=>e.map(e=>{let t=_(e,a),n={at:e.at};for(let e of v){let r=Number(t[e]??0);n[e]=a===`tokens`?r:Number(r.toFixed(4))}return n}),[e,v,a]),S=Math.max(0,...x.map(e=>v.reduce((t,n)=>t+Number(e[n]??0),0)))>0,C=(x.length>1?Date.parse(x[x.length-1].at)-Date.parse(x[0].at):0)>1728e5;return!e.length||!S?(0,m.jsx)(`div`,{className:`grid min-h-56 place-items-center px-6 py-12 text-center text-sm text-muted`,children:r}):(0,m.jsxs)(`div`,{className:`min-w-0`,children:[(0,m.jsx)(`div`,{className:`h-72 w-full`,children:(0,m.jsx)(c,{width:`100%`,height:`100%`,children:(0,m.jsxs)(f,{data:x,margin:{top:8,right:8,bottom:0,left:0},children:[(0,m.jsx)(`defs`,{children:v.map((e,t)=>(0,m.jsxs)(`linearGradient`,{id:`cost-${a}-${e}`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,m.jsx)(`stop`,{offset:`0%`,stopColor:h[t%h.length],stopOpacity:.32}),(0,m.jsx)(`stop`,{offset:`100%`,stopColor:h[t%h.length],stopOpacity:.04})]},e))}),(0,m.jsx)(l,{vertical:!1,stroke:`var(--separator)`,strokeDasharray:`3 6`}),(0,m.jsx)(d,{dataKey:`at`,tickLine:!1,axisLine:!1,minTickGap:28,tick:{fill:`var(--muted)`,fontSize:10,fontFamily:`var(--font-mono)`},tickFormatter:e=>g(e,C,n)}),(0,m.jsx)(s,{width:52,tickLine:!1,axisLine:!1,tick:{fill:`var(--muted)`,fontSize:10,fontFamily:`var(--font-mono)`},tickFormatter:e=>y(e,a)}),(0,m.jsx)(u,{cursor:{stroke:`var(--border)`,strokeDasharray:`3 3`},content:(0,m.jsx)(b,{daily:C,lang:n,models:t,totalLabel:i,metric:a})}),v.map((e,t)=>(0,m.jsx)(o,{type:`monotone`,dataKey:e,stackId:`usage`,stroke:h[t%h.length],strokeWidth:1.5,fill:`url(#cost-${a}-${e})`,isAnimationActive:!1,dot:!1,activeDot:{r:3,strokeWidth:1.2}},e))]})})}),(0,m.jsx)(`div`,{className:`mt-2 flex flex-wrap items-center gap-x-4 gap-y-1 text-[10px] text-muted`,children:t.map((e,t)=>(0,m.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,m.jsx)(`span`,{className:`size-1.5 rounded-full`,style:{background:h[t%h.length]}}),e.label]},e.id))})]})}export{x as CostChart}; \ No newline at end of file +import{a as e,f as t,h as n,i as r,l as i,r as a}from"./index-DzVBd5P3.js";import{i as o,n as s,wt as c}from"./CartesianChart-DUbE36z1.js";import{n as l,r as u,t as d}from"./XAxis-NsyDzica.js";import{t as f}from"./AreaChart-D9uwr1Qd.js";var p=n(t(),1),m=i(),h=[`var(--accent)`,`var(--muted)`,`var(--success)`,`var(--warning)`];function g(e,t,n){let r=new Date(e);return Number.isFinite(r.getTime())?new Intl.DateTimeFormat(n===`zh`?`zh-CN`:`en-US`,t?{month:`short`,day:`numeric`}:{month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`,hour12:!1}).format(r):``}function _(e,t){return t===`credits`?e.per_model_credits??{}:t===`tokens`?e.per_model_tokens??{}:e.per_model??{}}function v(t,n){return n===`cost`?a(t):n===`tokens`?r(t):e(t)}function y(t,n){return n===`cost`?`¥${t>=10?Math.round(t):Number(t.toFixed(1))}`:n===`tokens`?r(t):e(t)}function b({active:e,payload:t,label:n,daily:r,lang:i,models:a,totalLabel:o,metric:s}){if(!e||!t?.length)return null;let c=new Map(a.map(e=>[e.id,e.label])),l=t.filter(e=>(e.value??0)>0).sort((e,t)=>t.value-e.value),u=t.reduce((e,t)=>e+(t.value??0),0);return(0,m.jsxs)(`div`,{className:`rounded-xl bg-overlay px-3 py-2 text-caption text-overlay-foreground shadow-overlay`,children:[(0,m.jsx)(`div`,{className:`mono text-muted`,children:g(String(n),r,i)}),(0,m.jsxs)(`div`,{className:`mt-1.5 grid gap-1`,children:[l.map(e=>(0,m.jsxs)(`div`,{className:`flex items-center justify-between gap-6`,children:[(0,m.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,m.jsx)(`span`,{className:`size-1.5 rounded-full`,style:{background:h[a.findIndex(t=>t.id===e.dataKey)%h.length]}}),c.get(e.dataKey)||e.dataKey]}),(0,m.jsx)(`span`,{className:`mono font-medium`,children:v(e.value,s)})]},e.dataKey)),(0,m.jsxs)(`div`,{className:`flex items-center justify-between gap-6 border-t border-separator pt-1`,children:[(0,m.jsx)(`span`,{className:`text-muted`,children:o}),(0,m.jsx)(`span`,{className:`mono font-medium`,children:v(u,s)})]})]})]})}function x({series:e,models:t,lang:n,emptyLabel:r,totalLabel:i,metric:a=`credits`}){let v=(0,p.useMemo)(()=>t.map(e=>e.id),[t]),x=(0,p.useMemo)(()=>e.map(e=>{let t=_(e,a),n={at:e.at};for(let e of v){let r=Number(t[e]??0);n[e]=a===`tokens`?r:Number(r.toFixed(4))}return n}),[e,v,a]),S=Math.max(0,...x.map(e=>v.reduce((t,n)=>t+Number(e[n]??0),0)))>0,C=(x.length>1?Date.parse(x[x.length-1].at)-Date.parse(x[0].at):0)>1728e5;return!e.length||!S?(0,m.jsx)(`div`,{className:`grid min-h-56 place-items-center px-6 py-12 text-center text-sm text-muted`,children:r}):(0,m.jsxs)(`div`,{className:`min-w-0`,children:[(0,m.jsx)(`div`,{className:`h-72 w-full`,children:(0,m.jsx)(c,{width:`100%`,height:`100%`,children:(0,m.jsxs)(f,{data:x,margin:{top:8,right:8,bottom:0,left:0},children:[(0,m.jsx)(`defs`,{children:v.map((e,t)=>(0,m.jsxs)(`linearGradient`,{id:`cost-${a}-${e}`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,m.jsx)(`stop`,{offset:`0%`,stopColor:h[t%h.length],stopOpacity:.32}),(0,m.jsx)(`stop`,{offset:`100%`,stopColor:h[t%h.length],stopOpacity:.04})]},e))}),(0,m.jsx)(l,{vertical:!1,stroke:`var(--separator)`,strokeDasharray:`3 6`}),(0,m.jsx)(d,{dataKey:`at`,tickLine:!1,axisLine:!1,minTickGap:28,tick:{fill:`var(--muted)`,fontSize:10,fontFamily:`var(--font-mono)`},tickFormatter:e=>g(e,C,n)}),(0,m.jsx)(s,{width:52,tickLine:!1,axisLine:!1,tick:{fill:`var(--muted)`,fontSize:10,fontFamily:`var(--font-mono)`},tickFormatter:e=>y(e,a)}),(0,m.jsx)(u,{cursor:{stroke:`var(--border)`,strokeDasharray:`3 3`},content:(0,m.jsx)(b,{daily:C,lang:n,models:t,totalLabel:i,metric:a})}),v.map((e,t)=>(0,m.jsx)(o,{type:`monotone`,dataKey:e,stackId:`usage`,stroke:h[t%h.length],strokeWidth:1.5,fill:`url(#cost-${a}-${e})`,isAnimationActive:!1,dot:!1,activeDot:{r:3,strokeWidth:1.2}},e))]})})}),(0,m.jsx)(`div`,{className:`mt-2 flex flex-wrap items-center gap-x-4 gap-y-1 text-[10px] text-muted`,children:t.map((e,t)=>(0,m.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,m.jsx)(`span`,{className:`size-1.5 rounded-full`,style:{background:h[t%h.length]}}),e.label]},e.id))})]})}export{x as CostChart}; \ No newline at end of file diff --git a/internal/webui/static/assets/LiveSparkline-HyfslqFR.js b/internal/webui/static/assets/LiveSparkline-MAgciRTL.js similarity index 73% rename from internal/webui/static/assets/LiveSparkline-HyfslqFR.js rename to internal/webui/static/assets/LiveSparkline-MAgciRTL.js index 0dffbc41..c3655b19 100644 --- a/internal/webui/static/assets/LiveSparkline-HyfslqFR.js +++ b/internal/webui/static/assets/LiveSparkline-MAgciRTL.js @@ -1 +1 @@ -import{l as e}from"./index-B4dA6dPq.js";import{i as t,n,wt as r}from"./CartesianChart-2tRdU6bd.js";import{t as i}from"./AreaChart-ByvZPuVI.js";var a=e();function o({samples:e,capacity:o,label:s}){let c=e.length?e:[{at:0,value:0}],l=Math.max(1,o,...c.map(e=>e.value));return(0,a.jsx)(`div`,{className:`h-6 w-[120px] shrink-0`,role:`img`,"aria-label":s,children:(0,a.jsx)(r,{width:`100%`,height:`100%`,children:(0,a.jsxs)(i,{data:c,margin:{top:1,right:0,bottom:1,left:0},children:[(0,a.jsx)(n,{hide:!0,domain:[0,l]}),(0,a.jsx)(t,{type:`monotone`,dataKey:`value`,stroke:`var(--foreground)`,strokeOpacity:.7,strokeWidth:1.25,fill:`var(--foreground)`,fillOpacity:.08,isAnimationActive:!1,dot:!1})]})})})}export{o as LiveSparkline}; \ No newline at end of file +import{l as e}from"./index-DzVBd5P3.js";import{i as t,n,wt as r}from"./CartesianChart-DUbE36z1.js";import{t as i}from"./AreaChart-D9uwr1Qd.js";var a=e();function o({samples:e,capacity:o,label:s}){let c=e.length?e:[{at:0,value:0}],l=Math.max(1,o,...c.map(e=>e.value));return(0,a.jsx)(`div`,{className:`h-6 w-[120px] shrink-0`,role:`img`,"aria-label":s,children:(0,a.jsx)(r,{width:`100%`,height:`100%`,children:(0,a.jsxs)(i,{data:c,margin:{top:1,right:0,bottom:1,left:0},children:[(0,a.jsx)(n,{hide:!0,domain:[0,l]}),(0,a.jsx)(t,{type:`monotone`,dataKey:`value`,stroke:`var(--foreground)`,strokeOpacity:.7,strokeWidth:1.25,fill:`var(--foreground)`,fillOpacity:.08,isAnimationActive:!1,dot:!1})]})})})}export{o as LiveSparkline}; \ No newline at end of file diff --git a/internal/webui/static/assets/TrafficChart-C3cS3fry.js b/internal/webui/static/assets/TrafficChart-BV8Trn2n.js similarity index 98% rename from internal/webui/static/assets/TrafficChart-C3cS3fry.js rename to internal/webui/static/assets/TrafficChart-BV8Trn2n.js index f1572932..9d07dae4 100644 --- a/internal/webui/static/assets/TrafficChart-C3cS3fry.js +++ b/internal/webui/static/assets/TrafficChart-BV8Trn2n.js @@ -1 +1 @@ -import{f as e,h as t,i as n,l as r,n as i,o as a,s as o,t as s,u as c}from"./index-B4dA6dPq.js";import{A as l,An as u,C as d,Cn as f,D as p,E as m,Et as h,L as g,Lt as _,M as v,Mn as y,Mt as b,N as x,Nt as S,O as C,Ot as w,P as T,Pt as E,Q as D,Rt as O,S as k,T as A,Z as j,_t as M,a as N,bn as P,bt as ee,ct as te,d as F,et as ne,f as re,g as ie,gt as ae,h as oe,hn as I,i as se,j as ce,jn as L,k as le,kt as R,m as ue,n as de,nt as fe,o as pe,p as me,pt as he,s as ge,st as z,t as _e,vn as B,w as ve,wn as ye,wt as be,x as xe,yn as V,z as H,zt as U}from"./CartesianChart-2tRdU6bd.js";import{i as Se,n as Ce,r as we,t as Te}from"./XAxis-DHlPOGh6.js";var Ee=class{constructor(e){var t=e.x,n=e.y;this.xAxisScale=t,this.yAxisScale=n}map(e,t){var n=t.position;return{x:this.xAxisScale.map(e.x,{position:n})??0,y:this.yAxisScale.map(e.y,{position:n})??0}}mapWithFallback(e,t){var n=t.position,r=t.fallback,i=r===`rangeMin`?this.yAxisScale.rangeMin():r===`rangeMax`?this.yAxisScale.rangeMax():0,a=r===`rangeMin`?this.xAxisScale.rangeMin():r===`rangeMax`?this.xAxisScale.rangeMax():0;return{x:this.xAxisScale.map(e.x,{position:n})??a,y:this.yAxisScale.map(e.y,{position:n})??i}}isInRange(e){var t=e.x,n=e.y,r=t==null||this.xAxisScale.isInRange(t),i=n==null||this.yAxisScale.isInRange(n);return r&&i}},W=t(e());function G(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function K(e){for(var t=1;t{var s=o.x1,c=o.x2,l=o.y1,u=o.y2;if(i==null||a==null)return null;var d=new Ee({x:i,y:a}),f={x:e?i.map(s,{position:`start`})??null:i.rangeMin(),y:n?a.map(l,{position:`start`})??null:a.rangeMin()},p={x:t?i.map(c,{position:`end`})??null:i.rangeMax(),y:r?a.map(u,{position:`end`})??null:a.rangeMax()};return o.ifOverflow===`discard`&&(!d.isInRange(f)||!d.isInRange(p))?null:ue(f,p)},je=(e,t)=>W.isValidElement(e)?W.cloneElement(e,t):typeof e==`function`?e(t):W.createElement(Se,q({},t,{className:`recharts-reference-area-rect`}));function Me(e){var t=O();return(0,W.useEffect)(()=>(t(re(e)),()=>{t(me(e))})),null}function Ne(e){var t=e.x1,n=e.x2,r=e.y1,i=e.y2,a=e.className,o=e.shape,s=e.xAxisId,l=e.yAxisId,d=F(),f=h(),p=U(e=>j(e,`xAxis`,s,f)),m=U(e=>j(e,`yAxis`,l,f));if(p==null||m==null)return null;var g=P(t),_=P(n),v=P(r),y=P(i);if(!g&&!_&&!v&&!y&&!o)return null;var b=Ae(g,_,v,y,p,m,e);if(!b&&!o)return null;var S=e.ifOverflow===`hidden`?`url(#${d})`:void 0;return W.createElement(H,{zIndex:e.zIndex},W.createElement(u,{className:c(`recharts-reference-area`,a)},je(o,K(K({clipPath:S},L(e)),b)),b!=null&&W.createElement(x,q({},b,{lowerWidth:b.width,upperWidth:b.width}),W.createElement(T,{label:e.label}),e.children)))}var Pe={ifOverflow:`discard`,xAxisId:0,yAxisId:0,radius:0,fill:`#ccc`,label:!1,fillOpacity:.5,stroke:`none`,strokeWidth:1,zIndex:z.area};function Fe(e){var t=I(e,Pe);return W.createElement(W.Fragment,null,W.createElement(Me,{yAxisId:t.yAxisId,xAxisId:t.xAxisId,ifOverflow:t.ifOverflow,x1:t.x1,x2:t.x2,y1:t.y1,y2:t.y2}),W.createElement(Ne,t))}Fe.displayName=`ReferenceArea`;var Ie=[`animationElapsedTime`,`isAnimating`,`isEntrance`,`visibleLength`,`strokeDasharray`,`connectNulls`];function J(){return J=Object.assign?Object.assign.bind():function(e){for(var t=1;te+t,0);if(!i)return Be(t,e);for(var a=Math.floor(e/i),o=e%i,s=[],c=0,l=0;co){s=[...r.slice(0,c),o-l];break}}var f=s.length%2==0?[0,t]:[t];return[...He(r,a),...s,...f].map(e=>`${e}px`).join(`, `)}function We(e,t,n){return e?Ue(n,t,`${e}`.split(/[,\s]+/gim).map(e=>parseFloat(e))):Be(t,n)}function Ge(e){e.animationElapsedTime,e.isAnimating,e.isEntrance;var t=e.visibleLength,n=e.strokeDasharray,r=e.connectNulls,i=Le(e,Ie),a=r??!1,o;if(t!=null){var s=i.pathRef;o=We(n,ze(s?.current??null),t)}else n!=null&&(o=String(n));return W.createElement(he,J({},i,{connectNulls:a,strokeDasharray:o}))}function Ke(e){var t=(0,W.useRef)(0),n=(0,W.useRef)(0),r=(0,W.useRef)(!1),i=(0,W.useRef)(e);return i.current!==e&&(t.current=n.current,i.current=e),(0,W.useCallback)((e,i)=>{if(r.current)return null;var a=Math.min(ye(t.current+e*i),i);return e>0&&i>0&&(n.current=Math.max(n.current,a),a>=i)?(r.current=!0,null):a},[])}var qe=[`children`];function Je(e,t){if(e==null)return{};var n,r,i=Ye(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r({x:0,y:0,value:0}),errorBarOffset:0});function Ze(e){var t=e.children,n=Je(e,qe);return W.createElement(Xe.Provider,{value:n},t)}var Qe=(e,t,n,r)=>D(e,`xAxis`,t,r),$e=(e,t,n,r)=>ne(e,`xAxis`,t,r),et=(e,t,n,r)=>D(e,`yAxis`,n,r),tt=(e,t,n,r)=>ne(e,`yAxis`,n,r),nt=_([M,Qe,et,$e,tt],(e,t,n,r,i)=>E(e,`xAxis`)?w(t,r,!1):w(n,i,!1)),rt=(e,t,n,r,i)=>i;function it(e){return e.type===`line`}var at=_([fe,rt],(e,t)=>e.filter(it).find(e=>e.id===t)),ot=_([M,Qe,et,$e,tt,at,nt,te],(e,t,n,r,i,a,o,s)=>{var c=s.chartData,l=s.dataStartIndex,u=s.dataEndIndex;if(!(a==null||t==null||n==null||r==null||i==null||r.length===0||i.length===0||o==null||e!==`horizontal`&&e!==`vertical`)){var d=a.dataKey,f=a.data,p=f!=null&&f.length>0?f:c?.slice(l,u+1);if(p!=null)return Dt({layout:e,xAxis:t,yAxis:n,xAxisTicks:r,yAxisTicks:i,dataKey:d,bandSize:o,displayedData:p})}}),st=[`id`],ct=[`type`,`layout`,`connectNulls`,`needClip`,`shape`,`strokeDasharray`],lt=[`activeDot`,`animateNewValues`,`animationBegin`,`animationDuration`,`animationEasing`,`connectNulls`,`dot`,`hide`,`isAnimationActive`,`label`,`legendType`,`xAxisId`,`yAxisId`,`id`];function Y(){return Y=Object.assign?Object.assign.bind():function(e){for(var t=1;t0?t/n:0}var Q={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:`ease`,animationInterpolateFn:(e,t)=>{if(e==null)return[];if(t===1)return e.flatMap(e=>e.status===`removed`?[]:[e.next]);var n=gt(e),r=[];for(var i of e)if(i.status===`matched`)r.push(Z(Z({},i.next),{},{x:B(i.prev.x,i.next.x,t),y:B(i.prev.y,i.next.y,t)}));else if(i.status===`added`){if(i.next.x!=null){var a=i.next.x-n;r.push(Z(Z({},i.next),{},{x:B(a,i.next.x,t),y:i.next.y}))}else r.push(i.next)}else if(i.status===`removed`&&i.prev.x!=null){var o=i.prev.x+n;r.push(Z(Z({},i.prev),{},{x:B(i.prev.x,o,t),y:i.prev.y}))}return r},animationMatchBy:m,connectNulls:!1,dot:!0,fill:`#fff`,hide:!1,isAnimationActive:`auto`,label:!1,legendType:`line`,shape:Ge,stroke:`#3182bd`,strokeWidth:1,xAxisId:0,yAxisId:0,zIndex:z.line,type:`linear`},_t=e=>{var t=e.dataKey,n=e.name,r=e.stroke,i=e.legendType;return[{inactive:e.hide,dataKey:t,type:i,color:r,value:b(n,t),payload:e}]},vt=W.memo(e=>{var t=e.dataKey,n=e.data,r=e.stroke,i=e.strokeWidth,a=e.fill,o=e.name,s=e.hide,c=e.unit,l=e.formatter,u=e.tooltipType,d=e.id,p={dataDefinedOnItem:n,getPosition:f,settings:{stroke:r,strokeWidth:i,fill:a,dataKey:t,nameKey:void 0,name:b(o,t),hide:s,type:u,color:r,unit:c,formatter:l,graphicalItemId:d}};return W.createElement(C,{tooltipEntrySettings:p})});function yt(e){var t=e.clipPathId,n=e.points,r=e.props,i=r.dot,a=r.dataKey,o=r.needClip;r.id;var s=X(r,st),c=y(s);return W.createElement(xe,{points:n,dot:i,className:`recharts-line-dots`,dotClassName:`recharts-line-dot`,dataKey:a,baseProps:c,needClip:o,clipPathId:t})}function bt(e){var t=e.showLabels,n=e.children,r=e.points,i=(0,W.useMemo)(()=>r?.map(e=>{var t={x:e.x??0,y:e.y??0,width:0,lowerWidth:0,upperWidth:0,height:0};return Z(Z({},t),{},{value:e.value,payload:e.payload,viewBox:t,parentViewBox:void 0,fill:void 0})}),[r]);return W.createElement(ce,{value:t?i:void 0},n)}function xt(e){var t=e.clipPathId,n=e.pathRef,r=e.points,i=e.props,a=e.animationElapsedTime,o=e.isAnimating,s=e.isEntrance,c=e.visibleLength,l=i.type,u=i.layout,d=i.connectNulls,f=i.needClip,p=i.shape,m=i.strokeDasharray,h=X(i,ct),g=Z(Z({},L(h)),{},{fill:`none`,className:`recharts-line-curve`,clipPath:f?`url(#clipPath-${t})`:void 0,points:r,type:l,layout:u,connectNulls:d,strokeDasharray:m??i.strokeDasharray,pathRef:n,animationElapsedTime:a,isAnimating:o,isEntrance:i.animateNewValues?s:!1,visibleLength:c});return W.createElement(W.Fragment,null,r?.length>1&&W.createElement(le,{option:p,DefaultShape:Q.shape,shapeProps:g}),W.createElement(yt,{points:r,clipPathId:t,props:i}))}function St(e){var t=e.clipPathId,n=e.props,r=e.pathRef,i=e.previousPointsRef,a=n.points,o=n.isAnimationActive,s=n.animationBegin,c=n.animationDuration,l=n.animationEasing,u=n.animationMatchBy,d=n.animationInterpolateFn,f=n.layout,p=ht(r.current),m=A(n.onAnimationStart,n.onAnimationEnd),h=m.isAnimating,g=m.handleAnimationStart,_=m.handleAnimationEnd,y=!h,b=Ke(a),x=(0,W.useCallback)(e=>e>0&&p>0,[p]);return W.createElement(bt,{points:a,showLabels:y},n.children,W.createElement(ve,{animationInput:a,animationIdPrefix:`recharts-line-`,items:a,previousItemsRef:i,isAnimationActive:o,animationBegin:s,animationDuration:c,animationEasing:l,onAnimationStart:g,onAnimationEnd:_,animationInterpolateFn:d,animationMatchBy:u,shouldUpdatePreviousRef:x,layout:f},(e,i,a)=>{var o=h||i<1,s=o?b(i,p):null;return W.createElement(xt,{props:n,points:e,clipPathId:t,pathRef:r,animationElapsedTime:i,isAnimating:o,isEntrance:a,visibleLength:s})}),W.createElement(v,{label:n.label}))}function Ct(e){var t=e.clipPathId,n=e.props,r=(0,W.useRef)(null),i=(0,W.useRef)(null);return W.createElement(St,{props:n,clipPathId:t,previousPointsRef:r,pathRef:i})}var wt=(e,t)=>({x:e.x??void 0,y:e.y??void 0,value:e.value,errorVal:S(e.payload,t)}),Tt=class extends W.Component{render(){var e=this.props,t=e.hide,n=e.dot,r=e.points,i=e.className,a=e.xAxisId,o=e.yAxisId,s=e.top,d=e.left,f=e.width,p=e.height,m=e.id,h=e.needClip,g=e.zIndex;if(t)return null;var _=c(`recharts-line`,i),v=m,y=N(n),b=y.r,x=y.strokeWidth,S=l(n),C=b*2+x,w=h?`url(#clipPath-${S?``:`dots-`}${v})`:void 0;return W.createElement(H,{zIndex:g},W.createElement(u,{className:_},h&&W.createElement(`defs`,null,W.createElement(pe,{clipPathId:v,xAxisId:a,yAxisId:o}),!S&&W.createElement(`clipPath`,{id:`clipPath-dots-${v}`},W.createElement(`rect`,{x:d-C/2,y:s-C/2,width:f+C,height:p+C}))),W.createElement(Ze,{xAxisId:a,yAxisId:o,data:r,dataPointFormatter:wt,errorBarOffset:0},W.createElement(Ct,{props:this.props,clipPathId:v}))),W.createElement(oe,{activeDot:this.props.activeDot,points:r,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:w}))}};function Et(e){var t=I(e,Q),n=t.activeDot,r=t.animateNewValues,i=t.animationBegin,a=t.animationDuration,o=t.animationEasing,s=t.connectNulls,c=t.dot,l=t.hide,u=t.isAnimationActive,d=t.label,f=t.legendType,p=t.xAxisId,m=t.yAxisId,g=t.id,_=X(t,lt),v=ge(p,m).needClip,y=ie(),b=ee(),x=h(),S=U(e=>ot(e,p,m,x,g));if(b!==`horizontal`&&b!==`vertical`||S==null||y==null)return null;var C=y.height,w=y.width,T=y.x,E=y.y;return W.createElement(Tt,Y({},_,{id:g,connectNulls:s,dot:c,activeDot:n,animateNewValues:r,animationBegin:i,animationDuration:a,animationEasing:o,isAnimationActive:u,hide:l,label:d,legendType:f,xAxisId:p,yAxisId:m,points:S,layout:b,height:C,width:w,left:T,top:E,needClip:v}))}function Dt(e){var t=e.layout,n=e.xAxis,r=e.yAxis,i=e.xAxisTicks,a=e.yAxisTicks,o=e.dataKey,s=e.bandSize;return e.displayedData.map((e,c)=>{var l=S(e,o);if(t===`horizontal`)return{x:R({axis:n,ticks:i,bandSize:s,entry:e,index:c}),y:(V(l)?null:r.scale.map(l))??null,value:l,payload:e};var u=V(l)?null:n.scale.map(l),d=R({axis:r,ticks:a,bandSize:s,entry:e,index:c});return u==null||d==null?null:{x:u,y:d,value:l,payload:e}}).filter(Boolean)}function Ot(e){var t=I(e,Q),n=h();return W.createElement(d,{id:t.id,type:`line`},e=>W.createElement(W.Fragment,null,W.createElement(p,{legendPayload:_t(t)}),W.createElement(vt,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,formatter:t.formatter,tooltipType:t.tooltipType,id:e}),W.createElement(k,{type:`line`,id:e,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,hide:t.hide,isPanorama:n}),W.createElement(Et,Y({},t,{id:e}))))}var kt=W.memo(Ot,ae);kt.displayName=`Line`;var At=[`axis`],jt=(0,W.forwardRef)((e,t)=>W.createElement(_e,{chartName:`ComposedChart`,defaultTooltipEventType:`axis`,validateTooltipEventTypes:At,tooltipPayloadSearcher:g,categoricalChartProps:e,ref:t})),Mt={metric:24,title:18,section:15,body:13,xs:12,caption:12},$=r();function Nt(e,t,n){let r=new Date(e);return Number.isFinite(r.getTime())?new Intl.DateTimeFormat(n===`zh`?`zh-CN`:`en-US`,t?{month:`short`,day:`numeric`}:{hour:`2-digit`,minute:`2-digit`,hour12:!1}).format(r):``}function Pt(e){if(e<=1)return 1;let t=10**Math.floor(Math.log10(e)),n=e/t;return(n<=1?1:n<=2?2:n<=5?5:10)*t}function Ft(e){let t=Math.max(0,e.ok??e.requests-e.error),n=Math.min(Math.max(0,e.requests-t),Math.max(0,e.requests));return{...e,okCount:t,errorCount:n,inputTokens:e.prompt_tokens??0,outputTokens:e.completion_tokens??0,cacheTokens:e.cache_read_tokens??0,p50:e.latency_p50_ms??null,p95:e.latency_p95_ms??null}}function It({active:e,payload:t,daily:n,lang:r,specs:i,format:a,totalLabel:o,total:s}){if(!e||!t?.[0])return null;let c=t[0].payload;return(0,$.jsxs)(`div`,{className:`rounded-xl bg-overlay px-3 py-2 text-caption text-overlay-foreground shadow-overlay`,children:[(0,$.jsx)(`div`,{className:`mono text-muted`,children:Nt(c.at,n,r)}),(0,$.jsxs)(`div`,{className:`mt-1.5 grid gap-1`,children:[i.map(e=>(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-6`,children:[(0,$.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,$.jsx)(`span`,{className:`size-1.5 rounded-full`,style:{background:e.color}}),e.label]}),(0,$.jsx)(`span`,{className:`mono font-medium`,children:a(c[e.key])})]},String(e.key))),s&&o?(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-6 pt-1`,children:[(0,$.jsx)(`span`,{className:`text-muted`,children:o}),(0,$.jsx)(`span`,{className:`mono font-medium`,children:a(s(c))})]}):null]})]})}function Lt({series:e,lang:t,emptyLabel:r,okLabel:c,errorLabel:l,onSelectRange:u,selectHint:d,labels:f,initialMetric:p=`requests`}){let[m,h]=(0,W.useState)(p),[g,_]=(0,W.useState)(null),[v,y]=(0,W.useState)(null),b=(0,W.useRef)(!1),x=(0,W.useRef)(null),S=(0,W.useMemo)(()=>e.map(Ft),[e]),C=S[0],w=S[S.length-1],T=(C&&w?Date.parse(w.at)-Date.parse(C.at):0)>1728e5,E=f??{requests:`Requests`,tokens:`Tokens`,latency:`p95 latency`,input:`input`,output:`output`,cacheRead:`cache read`,p50:`p50`,p95:`p95`,total:`total`},D=m===`tokens`?[{key:`inputTokens`,label:E.input,color:`var(--foreground)`,area:!0,width:1.5,opacity:.75},{key:`outputTokens`,label:E.output,color:`var(--success)`,area:!0,width:1.5},{key:`cacheTokens`,label:E.cacheRead,color:`var(--muted)`,width:1.25,opacity:.8}]:m===`latency`?[{key:`p95`,label:E.p95,color:`var(--warning)`,area:!0,width:1.75},{key:`p50`,label:E.p50,color:`var(--muted)`,width:1.25,opacity:.85}]:[{key:`okCount`,label:c,color:`var(--success)`,area:!0,width:1.75},{key:`errorCount`,label:l,color:`var(--danger)`,area:!0,width:1.25,opacity:.7}],O=e=>e==null?`—`:m===`latency`?a(e):n(e),k=m===`requests`?e=>e.requests:m===`tokens`?e=>e.inputTokens+e.outputTokens:void 0,A=S.flatMap(e=>D.map(t=>Number(e[t.key]??0))),j=m===`requests`?Math.max(0,...S.map(e=>e.requests)):Math.max(0,...A),M=Pt(j),N=S.some(e=>e.requests>0),P=S.map(e=>`${e.at}:${e.requests}:${e.error}`).join(`|`);(0,W.useLayoutEffect)(()=>{let e=x.current;if(!e||!N||b.current)return;let t=!1,n=null,r=o.context(()=>{let r=o.matchMedia(),i=()=>{let t=o.utils.toArray(`.recharts-area-area`,e),n=o.utils.toArray(`.recharts-line-curve`,e);return!t.length&&!n.length?!1:(r.add(`(prefers-reduced-motion: reduce)`,()=>{o.set(n,{clearProps:`strokeDashoffset,strokeDasharray`}),o.set(t,{clearProps:`autoAlpha`})}),r.add(`(prefers-reduced-motion: no-preference)`,()=>{o.fromTo(t,{autoAlpha:0},{autoAlpha:1,duration:.45,ease:`power2.out`,stagger:.05}),n.forEach((e,t)=>{let n=e.getTotalLength();o.fromTo(e,{strokeDasharray:n,strokeDashoffset:n},{strokeDashoffset:0,duration:.7,delay:t*.05,ease:`power2.out`})})}),!0)};if(i()){t=!0,b.current=!0;return}n=new MutationObserver(()=>{t||i()&&(t=!0,b.current=!0,n?.disconnect())}),n.observe(e,{childList:!0,subtree:!0})},e);return()=>{n?.disconnect(),r.revert()}},[N,P]);let ee=S.length>1?Date.parse(S[1].at)-Date.parse(S[0].at):36e5,te=()=>{if(g&&v&&u){let e=Date.parse(g),t=Date.parse(v);if(Number.isFinite(e)&&Number.isFinite(t)){let n=Math.min(e,t),r=Math.max(e,t)+ee;u(new Date(n).toISOString(),new Date(r).toISOString())}}_(null),y(null)},F=e=>{let t=e?.activeLabel;return t==null?null:String(t)};return!e.length||!N?(0,$.jsx)(i,{emptyLabel:r}):(0,$.jsxs)(`div`,{ref:x,className:`min-w-0`,children:[(0,$.jsx)(`div`,{className:`mb-3 flex justify-end`,children:(0,$.jsx)(s,{value:m,onChange:e=>h(e),ariaLabel:E.requests,options:[{id:`requests`,label:E.requests},{id:`tokens`,label:E.tokens},{id:`latency`,label:E.latency}]})}),(0,$.jsx)(`div`,{className:`h-56 w-full`,children:(0,$.jsx)(be,{width:`100%`,height:`100%`,children:(0,$.jsxs)(jt,{data:S,margin:{top:8,right:8,bottom:0,left:0},style:u?{cursor:`crosshair`,userSelect:`none`}:void 0,onMouseDown:u?e=>{let t=F(e);t&&(_(t),y(t))}:void 0,onMouseMove:u?e=>{if(!g)return;let t=F(e);t&&y(t)}:void 0,onMouseUp:u?te:void 0,onMouseLeave:u?()=>{_(null),y(null)}:void 0,children:[(0,$.jsx)(`defs`,{children:D.filter(e=>e.area).map(e=>(0,$.jsxs)(`linearGradient`,{id:`traffic-fill-${String(e.key)}`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,$.jsx)(`stop`,{offset:`0%`,stopColor:e.color,stopOpacity:.22}),(0,$.jsx)(`stop`,{offset:`100%`,stopColor:e.color,stopOpacity:.02})]},String(e.key)))}),(0,$.jsx)(Ce,{vertical:!1,stroke:`var(--separator)`,strokeDasharray:`3 6`}),(0,$.jsx)(Te,{dataKey:`at`,tickLine:!1,axisLine:!1,minTickGap:28,tick:{fill:`var(--muted)`,fontSize:Mt.caption,fontFamily:`var(--font-mono)`},tickFormatter:e=>Nt(e,T,t)}),(0,$.jsx)(de,{width:m===`latency`?44:36,domain:[0,M],tickLine:!1,axisLine:!1,allowDecimals:!1,tick:{fill:`var(--muted)`,fontSize:Mt.caption,fontFamily:`var(--font-mono)`},tickFormatter:e=>m===`latency`?a(e):n(e)}),(0,$.jsx)(we,{cursor:{stroke:`var(--border)`,strokeDasharray:`3 3`},content:(0,$.jsx)(It,{daily:T,lang:t,specs:D,format:O,totalLabel:E.total,total:k})}),D.filter(e=>e.area).map(e=>(0,$.jsx)(se,{type:`monotone`,dataKey:e.key,stroke:`none`,fill:`url(#traffic-fill-${String(e.key)})`,isAnimationActive:!1,activeDot:!1,dot:!1,connectNulls:!0},`area-${String(e.key)}`)),D.map(e=>(0,$.jsx)(kt,{type:`monotone`,dataKey:e.key,stroke:e.color,strokeWidth:e.width??1.5,strokeOpacity:e.opacity??1,dot:!1,isAnimationActive:!1,connectNulls:!0,activeDot:{r:4,fill:`var(--surface)`,stroke:e.color,strokeWidth:1.5}},`line-${String(e.key)}`)),g&&v?(0,$.jsx)(Fe,{x1:g,x2:v,fill:`var(--foreground)`,fillOpacity:.06,stroke:`none`,ifOverflow:`visible`}):null]})})}),(0,$.jsxs)(`div`,{className:`mt-2 flex min-h-5 items-center justify-between gap-3 text-caption text-muted`,children:[(0,$.jsx)(`div`,{className:`flex items-center gap-3`,children:D.map(e=>(0,$.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,$.jsx)(`span`,{className:`size-1.5 rounded-full`,style:{background:e.color}}),e.label]},String(e.key)))}),(0,$.jsxs)(`span`,{className:`flex items-center gap-3`,children:[u&&d?(0,$.jsx)(`span`,{children:d}):null,(0,$.jsxs)(`span`,{className:`mono`,children:[O(j),` peak`]})]})]})]})}export{Lt as TrafficChart}; \ No newline at end of file +import{f as e,h as t,i as n,l as r,n as i,o as a,s as o,t as s,u as c}from"./index-DzVBd5P3.js";import{A as l,An as u,C as d,Cn as f,D as p,E as m,Et as h,L as g,Lt as _,M as v,Mn as y,Mt as b,N as x,Nt as S,O as C,Ot as w,P as T,Pt as E,Q as D,Rt as O,S as k,T as A,Z as j,_t as M,a as N,bn as P,bt as ee,ct as te,d as F,et as ne,f as re,g as ie,gt as ae,h as oe,hn as I,i as se,j as ce,jn as L,k as le,kt as R,m as ue,n as de,nt as fe,o as pe,p as me,pt as he,s as ge,st as z,t as _e,vn as B,w as ve,wn as ye,wt as be,x as xe,yn as V,z as H,zt as U}from"./CartesianChart-DUbE36z1.js";import{i as Se,n as Ce,r as we,t as Te}from"./XAxis-NsyDzica.js";var Ee=class{constructor(e){var t=e.x,n=e.y;this.xAxisScale=t,this.yAxisScale=n}map(e,t){var n=t.position;return{x:this.xAxisScale.map(e.x,{position:n})??0,y:this.yAxisScale.map(e.y,{position:n})??0}}mapWithFallback(e,t){var n=t.position,r=t.fallback,i=r===`rangeMin`?this.yAxisScale.rangeMin():r===`rangeMax`?this.yAxisScale.rangeMax():0,a=r===`rangeMin`?this.xAxisScale.rangeMin():r===`rangeMax`?this.xAxisScale.rangeMax():0;return{x:this.xAxisScale.map(e.x,{position:n})??a,y:this.yAxisScale.map(e.y,{position:n})??i}}isInRange(e){var t=e.x,n=e.y,r=t==null||this.xAxisScale.isInRange(t),i=n==null||this.yAxisScale.isInRange(n);return r&&i}},W=t(e());function G(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function K(e){for(var t=1;t{var s=o.x1,c=o.x2,l=o.y1,u=o.y2;if(i==null||a==null)return null;var d=new Ee({x:i,y:a}),f={x:e?i.map(s,{position:`start`})??null:i.rangeMin(),y:n?a.map(l,{position:`start`})??null:a.rangeMin()},p={x:t?i.map(c,{position:`end`})??null:i.rangeMax(),y:r?a.map(u,{position:`end`})??null:a.rangeMax()};return o.ifOverflow===`discard`&&(!d.isInRange(f)||!d.isInRange(p))?null:ue(f,p)},je=(e,t)=>W.isValidElement(e)?W.cloneElement(e,t):typeof e==`function`?e(t):W.createElement(Se,q({},t,{className:`recharts-reference-area-rect`}));function Me(e){var t=O();return(0,W.useEffect)(()=>(t(re(e)),()=>{t(me(e))})),null}function Ne(e){var t=e.x1,n=e.x2,r=e.y1,i=e.y2,a=e.className,o=e.shape,s=e.xAxisId,l=e.yAxisId,d=F(),f=h(),p=U(e=>j(e,`xAxis`,s,f)),m=U(e=>j(e,`yAxis`,l,f));if(p==null||m==null)return null;var g=P(t),_=P(n),v=P(r),y=P(i);if(!g&&!_&&!v&&!y&&!o)return null;var b=Ae(g,_,v,y,p,m,e);if(!b&&!o)return null;var S=e.ifOverflow===`hidden`?`url(#${d})`:void 0;return W.createElement(H,{zIndex:e.zIndex},W.createElement(u,{className:c(`recharts-reference-area`,a)},je(o,K(K({clipPath:S},L(e)),b)),b!=null&&W.createElement(x,q({},b,{lowerWidth:b.width,upperWidth:b.width}),W.createElement(T,{label:e.label}),e.children)))}var Pe={ifOverflow:`discard`,xAxisId:0,yAxisId:0,radius:0,fill:`#ccc`,label:!1,fillOpacity:.5,stroke:`none`,strokeWidth:1,zIndex:z.area};function Fe(e){var t=I(e,Pe);return W.createElement(W.Fragment,null,W.createElement(Me,{yAxisId:t.yAxisId,xAxisId:t.xAxisId,ifOverflow:t.ifOverflow,x1:t.x1,x2:t.x2,y1:t.y1,y2:t.y2}),W.createElement(Ne,t))}Fe.displayName=`ReferenceArea`;var Ie=[`animationElapsedTime`,`isAnimating`,`isEntrance`,`visibleLength`,`strokeDasharray`,`connectNulls`];function J(){return J=Object.assign?Object.assign.bind():function(e){for(var t=1;te+t,0);if(!i)return Be(t,e);for(var a=Math.floor(e/i),o=e%i,s=[],c=0,l=0;co){s=[...r.slice(0,c),o-l];break}}var f=s.length%2==0?[0,t]:[t];return[...He(r,a),...s,...f].map(e=>`${e}px`).join(`, `)}function We(e,t,n){return e?Ue(n,t,`${e}`.split(/[,\s]+/gim).map(e=>parseFloat(e))):Be(t,n)}function Ge(e){e.animationElapsedTime,e.isAnimating,e.isEntrance;var t=e.visibleLength,n=e.strokeDasharray,r=e.connectNulls,i=Le(e,Ie),a=r??!1,o;if(t!=null){var s=i.pathRef;o=We(n,ze(s?.current??null),t)}else n!=null&&(o=String(n));return W.createElement(he,J({},i,{connectNulls:a,strokeDasharray:o}))}function Ke(e){var t=(0,W.useRef)(0),n=(0,W.useRef)(0),r=(0,W.useRef)(!1),i=(0,W.useRef)(e);return i.current!==e&&(t.current=n.current,i.current=e),(0,W.useCallback)((e,i)=>{if(r.current)return null;var a=Math.min(ye(t.current+e*i),i);return e>0&&i>0&&(n.current=Math.max(n.current,a),a>=i)?(r.current=!0,null):a},[])}var qe=[`children`];function Je(e,t){if(e==null)return{};var n,r,i=Ye(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r({x:0,y:0,value:0}),errorBarOffset:0});function Ze(e){var t=e.children,n=Je(e,qe);return W.createElement(Xe.Provider,{value:n},t)}var Qe=(e,t,n,r)=>D(e,`xAxis`,t,r),$e=(e,t,n,r)=>ne(e,`xAxis`,t,r),et=(e,t,n,r)=>D(e,`yAxis`,n,r),tt=(e,t,n,r)=>ne(e,`yAxis`,n,r),nt=_([M,Qe,et,$e,tt],(e,t,n,r,i)=>E(e,`xAxis`)?w(t,r,!1):w(n,i,!1)),rt=(e,t,n,r,i)=>i;function it(e){return e.type===`line`}var at=_([fe,rt],(e,t)=>e.filter(it).find(e=>e.id===t)),ot=_([M,Qe,et,$e,tt,at,nt,te],(e,t,n,r,i,a,o,s)=>{var c=s.chartData,l=s.dataStartIndex,u=s.dataEndIndex;if(!(a==null||t==null||n==null||r==null||i==null||r.length===0||i.length===0||o==null||e!==`horizontal`&&e!==`vertical`)){var d=a.dataKey,f=a.data,p=f!=null&&f.length>0?f:c?.slice(l,u+1);if(p!=null)return Dt({layout:e,xAxis:t,yAxis:n,xAxisTicks:r,yAxisTicks:i,dataKey:d,bandSize:o,displayedData:p})}}),st=[`id`],ct=[`type`,`layout`,`connectNulls`,`needClip`,`shape`,`strokeDasharray`],lt=[`activeDot`,`animateNewValues`,`animationBegin`,`animationDuration`,`animationEasing`,`connectNulls`,`dot`,`hide`,`isAnimationActive`,`label`,`legendType`,`xAxisId`,`yAxisId`,`id`];function Y(){return Y=Object.assign?Object.assign.bind():function(e){for(var t=1;t0?t/n:0}var Q={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:`ease`,animationInterpolateFn:(e,t)=>{if(e==null)return[];if(t===1)return e.flatMap(e=>e.status===`removed`?[]:[e.next]);var n=gt(e),r=[];for(var i of e)if(i.status===`matched`)r.push(Z(Z({},i.next),{},{x:B(i.prev.x,i.next.x,t),y:B(i.prev.y,i.next.y,t)}));else if(i.status===`added`){if(i.next.x!=null){var a=i.next.x-n;r.push(Z(Z({},i.next),{},{x:B(a,i.next.x,t),y:i.next.y}))}else r.push(i.next)}else if(i.status===`removed`&&i.prev.x!=null){var o=i.prev.x+n;r.push(Z(Z({},i.prev),{},{x:B(i.prev.x,o,t),y:i.prev.y}))}return r},animationMatchBy:m,connectNulls:!1,dot:!0,fill:`#fff`,hide:!1,isAnimationActive:`auto`,label:!1,legendType:`line`,shape:Ge,stroke:`#3182bd`,strokeWidth:1,xAxisId:0,yAxisId:0,zIndex:z.line,type:`linear`},_t=e=>{var t=e.dataKey,n=e.name,r=e.stroke,i=e.legendType;return[{inactive:e.hide,dataKey:t,type:i,color:r,value:b(n,t),payload:e}]},vt=W.memo(e=>{var t=e.dataKey,n=e.data,r=e.stroke,i=e.strokeWidth,a=e.fill,o=e.name,s=e.hide,c=e.unit,l=e.formatter,u=e.tooltipType,d=e.id,p={dataDefinedOnItem:n,getPosition:f,settings:{stroke:r,strokeWidth:i,fill:a,dataKey:t,nameKey:void 0,name:b(o,t),hide:s,type:u,color:r,unit:c,formatter:l,graphicalItemId:d}};return W.createElement(C,{tooltipEntrySettings:p})});function yt(e){var t=e.clipPathId,n=e.points,r=e.props,i=r.dot,a=r.dataKey,o=r.needClip;r.id;var s=X(r,st),c=y(s);return W.createElement(xe,{points:n,dot:i,className:`recharts-line-dots`,dotClassName:`recharts-line-dot`,dataKey:a,baseProps:c,needClip:o,clipPathId:t})}function bt(e){var t=e.showLabels,n=e.children,r=e.points,i=(0,W.useMemo)(()=>r?.map(e=>{var t={x:e.x??0,y:e.y??0,width:0,lowerWidth:0,upperWidth:0,height:0};return Z(Z({},t),{},{value:e.value,payload:e.payload,viewBox:t,parentViewBox:void 0,fill:void 0})}),[r]);return W.createElement(ce,{value:t?i:void 0},n)}function xt(e){var t=e.clipPathId,n=e.pathRef,r=e.points,i=e.props,a=e.animationElapsedTime,o=e.isAnimating,s=e.isEntrance,c=e.visibleLength,l=i.type,u=i.layout,d=i.connectNulls,f=i.needClip,p=i.shape,m=i.strokeDasharray,h=X(i,ct),g=Z(Z({},L(h)),{},{fill:`none`,className:`recharts-line-curve`,clipPath:f?`url(#clipPath-${t})`:void 0,points:r,type:l,layout:u,connectNulls:d,strokeDasharray:m??i.strokeDasharray,pathRef:n,animationElapsedTime:a,isAnimating:o,isEntrance:i.animateNewValues?s:!1,visibleLength:c});return W.createElement(W.Fragment,null,r?.length>1&&W.createElement(le,{option:p,DefaultShape:Q.shape,shapeProps:g}),W.createElement(yt,{points:r,clipPathId:t,props:i}))}function St(e){var t=e.clipPathId,n=e.props,r=e.pathRef,i=e.previousPointsRef,a=n.points,o=n.isAnimationActive,s=n.animationBegin,c=n.animationDuration,l=n.animationEasing,u=n.animationMatchBy,d=n.animationInterpolateFn,f=n.layout,p=ht(r.current),m=A(n.onAnimationStart,n.onAnimationEnd),h=m.isAnimating,g=m.handleAnimationStart,_=m.handleAnimationEnd,y=!h,b=Ke(a),x=(0,W.useCallback)(e=>e>0&&p>0,[p]);return W.createElement(bt,{points:a,showLabels:y},n.children,W.createElement(ve,{animationInput:a,animationIdPrefix:`recharts-line-`,items:a,previousItemsRef:i,isAnimationActive:o,animationBegin:s,animationDuration:c,animationEasing:l,onAnimationStart:g,onAnimationEnd:_,animationInterpolateFn:d,animationMatchBy:u,shouldUpdatePreviousRef:x,layout:f},(e,i,a)=>{var o=h||i<1,s=o?b(i,p):null;return W.createElement(xt,{props:n,points:e,clipPathId:t,pathRef:r,animationElapsedTime:i,isAnimating:o,isEntrance:a,visibleLength:s})}),W.createElement(v,{label:n.label}))}function Ct(e){var t=e.clipPathId,n=e.props,r=(0,W.useRef)(null),i=(0,W.useRef)(null);return W.createElement(St,{props:n,clipPathId:t,previousPointsRef:r,pathRef:i})}var wt=(e,t)=>({x:e.x??void 0,y:e.y??void 0,value:e.value,errorVal:S(e.payload,t)}),Tt=class extends W.Component{render(){var e=this.props,t=e.hide,n=e.dot,r=e.points,i=e.className,a=e.xAxisId,o=e.yAxisId,s=e.top,d=e.left,f=e.width,p=e.height,m=e.id,h=e.needClip,g=e.zIndex;if(t)return null;var _=c(`recharts-line`,i),v=m,y=N(n),b=y.r,x=y.strokeWidth,S=l(n),C=b*2+x,w=h?`url(#clipPath-${S?``:`dots-`}${v})`:void 0;return W.createElement(H,{zIndex:g},W.createElement(u,{className:_},h&&W.createElement(`defs`,null,W.createElement(pe,{clipPathId:v,xAxisId:a,yAxisId:o}),!S&&W.createElement(`clipPath`,{id:`clipPath-dots-${v}`},W.createElement(`rect`,{x:d-C/2,y:s-C/2,width:f+C,height:p+C}))),W.createElement(Ze,{xAxisId:a,yAxisId:o,data:r,dataPointFormatter:wt,errorBarOffset:0},W.createElement(Ct,{props:this.props,clipPathId:v}))),W.createElement(oe,{activeDot:this.props.activeDot,points:r,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:w}))}};function Et(e){var t=I(e,Q),n=t.activeDot,r=t.animateNewValues,i=t.animationBegin,a=t.animationDuration,o=t.animationEasing,s=t.connectNulls,c=t.dot,l=t.hide,u=t.isAnimationActive,d=t.label,f=t.legendType,p=t.xAxisId,m=t.yAxisId,g=t.id,_=X(t,lt),v=ge(p,m).needClip,y=ie(),b=ee(),x=h(),S=U(e=>ot(e,p,m,x,g));if(b!==`horizontal`&&b!==`vertical`||S==null||y==null)return null;var C=y.height,w=y.width,T=y.x,E=y.y;return W.createElement(Tt,Y({},_,{id:g,connectNulls:s,dot:c,activeDot:n,animateNewValues:r,animationBegin:i,animationDuration:a,animationEasing:o,isAnimationActive:u,hide:l,label:d,legendType:f,xAxisId:p,yAxisId:m,points:S,layout:b,height:C,width:w,left:T,top:E,needClip:v}))}function Dt(e){var t=e.layout,n=e.xAxis,r=e.yAxis,i=e.xAxisTicks,a=e.yAxisTicks,o=e.dataKey,s=e.bandSize;return e.displayedData.map((e,c)=>{var l=S(e,o);if(t===`horizontal`)return{x:R({axis:n,ticks:i,bandSize:s,entry:e,index:c}),y:(V(l)?null:r.scale.map(l))??null,value:l,payload:e};var u=V(l)?null:n.scale.map(l),d=R({axis:r,ticks:a,bandSize:s,entry:e,index:c});return u==null||d==null?null:{x:u,y:d,value:l,payload:e}}).filter(Boolean)}function Ot(e){var t=I(e,Q),n=h();return W.createElement(d,{id:t.id,type:`line`},e=>W.createElement(W.Fragment,null,W.createElement(p,{legendPayload:_t(t)}),W.createElement(vt,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,formatter:t.formatter,tooltipType:t.tooltipType,id:e}),W.createElement(k,{type:`line`,id:e,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,hide:t.hide,isPanorama:n}),W.createElement(Et,Y({},t,{id:e}))))}var kt=W.memo(Ot,ae);kt.displayName=`Line`;var At=[`axis`],jt=(0,W.forwardRef)((e,t)=>W.createElement(_e,{chartName:`ComposedChart`,defaultTooltipEventType:`axis`,validateTooltipEventTypes:At,tooltipPayloadSearcher:g,categoricalChartProps:e,ref:t})),Mt={metric:24,title:18,section:15,body:13,xs:12,caption:12},$=r();function Nt(e,t,n){let r=new Date(e);return Number.isFinite(r.getTime())?new Intl.DateTimeFormat(n===`zh`?`zh-CN`:`en-US`,t?{month:`short`,day:`numeric`}:{hour:`2-digit`,minute:`2-digit`,hour12:!1}).format(r):``}function Pt(e){if(e<=1)return 1;let t=10**Math.floor(Math.log10(e)),n=e/t;return(n<=1?1:n<=2?2:n<=5?5:10)*t}function Ft(e){let t=Math.max(0,e.ok??e.requests-e.error),n=Math.min(Math.max(0,e.requests-t),Math.max(0,e.requests));return{...e,okCount:t,errorCount:n,inputTokens:e.prompt_tokens??0,outputTokens:e.completion_tokens??0,cacheTokens:e.cache_read_tokens??0,p50:e.latency_p50_ms??null,p95:e.latency_p95_ms??null}}function It({active:e,payload:t,daily:n,lang:r,specs:i,format:a,totalLabel:o,total:s}){if(!e||!t?.[0])return null;let c=t[0].payload;return(0,$.jsxs)(`div`,{className:`rounded-xl bg-overlay px-3 py-2 text-caption text-overlay-foreground shadow-overlay`,children:[(0,$.jsx)(`div`,{className:`mono text-muted`,children:Nt(c.at,n,r)}),(0,$.jsxs)(`div`,{className:`mt-1.5 grid gap-1`,children:[i.map(e=>(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-6`,children:[(0,$.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,$.jsx)(`span`,{className:`size-1.5 rounded-full`,style:{background:e.color}}),e.label]}),(0,$.jsx)(`span`,{className:`mono font-medium`,children:a(c[e.key])})]},String(e.key))),s&&o?(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-6 pt-1`,children:[(0,$.jsx)(`span`,{className:`text-muted`,children:o}),(0,$.jsx)(`span`,{className:`mono font-medium`,children:a(s(c))})]}):null]})]})}function Lt({series:e,lang:t,emptyLabel:r,okLabel:c,errorLabel:l,onSelectRange:u,selectHint:d,labels:f,initialMetric:p=`requests`}){let[m,h]=(0,W.useState)(p),[g,_]=(0,W.useState)(null),[v,y]=(0,W.useState)(null),b=(0,W.useRef)(!1),x=(0,W.useRef)(null),S=(0,W.useMemo)(()=>e.map(Ft),[e]),C=S[0],w=S[S.length-1],T=(C&&w?Date.parse(w.at)-Date.parse(C.at):0)>1728e5,E=f??{requests:`Requests`,tokens:`Tokens`,latency:`p95 latency`,input:`input`,output:`output`,cacheRead:`cache read`,p50:`p50`,p95:`p95`,total:`total`},D=m===`tokens`?[{key:`inputTokens`,label:E.input,color:`var(--foreground)`,area:!0,width:1.5,opacity:.75},{key:`outputTokens`,label:E.output,color:`var(--success)`,area:!0,width:1.5},{key:`cacheTokens`,label:E.cacheRead,color:`var(--muted)`,width:1.25,opacity:.8}]:m===`latency`?[{key:`p95`,label:E.p95,color:`var(--warning)`,area:!0,width:1.75},{key:`p50`,label:E.p50,color:`var(--muted)`,width:1.25,opacity:.85}]:[{key:`okCount`,label:c,color:`var(--success)`,area:!0,width:1.75},{key:`errorCount`,label:l,color:`var(--danger)`,area:!0,width:1.25,opacity:.7}],O=e=>e==null?`—`:m===`latency`?a(e):n(e),k=m===`requests`?e=>e.requests:m===`tokens`?e=>e.inputTokens+e.outputTokens:void 0,A=S.flatMap(e=>D.map(t=>Number(e[t.key]??0))),j=m===`requests`?Math.max(0,...S.map(e=>e.requests)):Math.max(0,...A),M=Pt(j),N=S.some(e=>e.requests>0),P=S.map(e=>`${e.at}:${e.requests}:${e.error}`).join(`|`);(0,W.useLayoutEffect)(()=>{let e=x.current;if(!e||!N||b.current)return;let t=!1,n=null,r=o.context(()=>{let r=o.matchMedia(),i=()=>{let t=o.utils.toArray(`.recharts-area-area`,e),n=o.utils.toArray(`.recharts-line-curve`,e);return!t.length&&!n.length?!1:(r.add(`(prefers-reduced-motion: reduce)`,()=>{o.set(n,{clearProps:`strokeDashoffset,strokeDasharray`}),o.set(t,{clearProps:`autoAlpha`})}),r.add(`(prefers-reduced-motion: no-preference)`,()=>{o.fromTo(t,{autoAlpha:0},{autoAlpha:1,duration:.45,ease:`power2.out`,stagger:.05}),n.forEach((e,t)=>{let n=e.getTotalLength();o.fromTo(e,{strokeDasharray:n,strokeDashoffset:n},{strokeDashoffset:0,duration:.7,delay:t*.05,ease:`power2.out`})})}),!0)};if(i()){t=!0,b.current=!0;return}n=new MutationObserver(()=>{t||i()&&(t=!0,b.current=!0,n?.disconnect())}),n.observe(e,{childList:!0,subtree:!0})},e);return()=>{n?.disconnect(),r.revert()}},[N,P]);let ee=S.length>1?Date.parse(S[1].at)-Date.parse(S[0].at):36e5,te=()=>{if(g&&v&&u){let e=Date.parse(g),t=Date.parse(v);if(Number.isFinite(e)&&Number.isFinite(t)){let n=Math.min(e,t),r=Math.max(e,t)+ee;u(new Date(n).toISOString(),new Date(r).toISOString())}}_(null),y(null)},F=e=>{let t=e?.activeLabel;return t==null?null:String(t)};return!e.length||!N?(0,$.jsx)(i,{emptyLabel:r}):(0,$.jsxs)(`div`,{ref:x,className:`min-w-0`,children:[(0,$.jsx)(`div`,{className:`mb-3 flex justify-end`,children:(0,$.jsx)(s,{value:m,onChange:e=>h(e),ariaLabel:E.requests,options:[{id:`requests`,label:E.requests},{id:`tokens`,label:E.tokens},{id:`latency`,label:E.latency}]})}),(0,$.jsx)(`div`,{className:`h-56 w-full`,children:(0,$.jsx)(be,{width:`100%`,height:`100%`,children:(0,$.jsxs)(jt,{data:S,margin:{top:8,right:8,bottom:0,left:0},style:u?{cursor:`crosshair`,userSelect:`none`}:void 0,onMouseDown:u?e=>{let t=F(e);t&&(_(t),y(t))}:void 0,onMouseMove:u?e=>{if(!g)return;let t=F(e);t&&y(t)}:void 0,onMouseUp:u?te:void 0,onMouseLeave:u?()=>{_(null),y(null)}:void 0,children:[(0,$.jsx)(`defs`,{children:D.filter(e=>e.area).map(e=>(0,$.jsxs)(`linearGradient`,{id:`traffic-fill-${String(e.key)}`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,$.jsx)(`stop`,{offset:`0%`,stopColor:e.color,stopOpacity:.22}),(0,$.jsx)(`stop`,{offset:`100%`,stopColor:e.color,stopOpacity:.02})]},String(e.key)))}),(0,$.jsx)(Ce,{vertical:!1,stroke:`var(--separator)`,strokeDasharray:`3 6`}),(0,$.jsx)(Te,{dataKey:`at`,tickLine:!1,axisLine:!1,minTickGap:28,tick:{fill:`var(--muted)`,fontSize:Mt.caption,fontFamily:`var(--font-mono)`},tickFormatter:e=>Nt(e,T,t)}),(0,$.jsx)(de,{width:m===`latency`?44:36,domain:[0,M],tickLine:!1,axisLine:!1,allowDecimals:!1,tick:{fill:`var(--muted)`,fontSize:Mt.caption,fontFamily:`var(--font-mono)`},tickFormatter:e=>m===`latency`?a(e):n(e)}),(0,$.jsx)(we,{cursor:{stroke:`var(--border)`,strokeDasharray:`3 3`},content:(0,$.jsx)(It,{daily:T,lang:t,specs:D,format:O,totalLabel:E.total,total:k})}),D.filter(e=>e.area).map(e=>(0,$.jsx)(se,{type:`monotone`,dataKey:e.key,stroke:`none`,fill:`url(#traffic-fill-${String(e.key)})`,isAnimationActive:!1,activeDot:!1,dot:!1,connectNulls:!0},`area-${String(e.key)}`)),D.map(e=>(0,$.jsx)(kt,{type:`monotone`,dataKey:e.key,stroke:e.color,strokeWidth:e.width??1.5,strokeOpacity:e.opacity??1,dot:!1,isAnimationActive:!1,connectNulls:!0,activeDot:{r:4,fill:`var(--surface)`,stroke:e.color,strokeWidth:1.5}},`line-${String(e.key)}`)),g&&v?(0,$.jsx)(Fe,{x1:g,x2:v,fill:`var(--foreground)`,fillOpacity:.06,stroke:`none`,ifOverflow:`visible`}):null]})})}),(0,$.jsxs)(`div`,{className:`mt-2 flex min-h-5 items-center justify-between gap-3 text-caption text-muted`,children:[(0,$.jsx)(`div`,{className:`flex items-center gap-3`,children:D.map(e=>(0,$.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,$.jsx)(`span`,{className:`size-1.5 rounded-full`,style:{background:e.color}}),e.label]},String(e.key)))}),(0,$.jsxs)(`span`,{className:`flex items-center gap-3`,children:[u&&d?(0,$.jsx)(`span`,{children:d}):null,(0,$.jsxs)(`span`,{className:`mono`,children:[O(j),` peak`]})]})]})]})}export{Lt as TrafficChart}; \ No newline at end of file diff --git a/internal/webui/static/assets/XAxis-DHlPOGh6.js b/internal/webui/static/assets/XAxis-NsyDzica.js similarity index 99% rename from internal/webui/static/assets/XAxis-DHlPOGh6.js rename to internal/webui/static/assets/XAxis-NsyDzica.js index f165a96c..56a3a13c 100644 --- a/internal/webui/static/assets/XAxis-DHlPOGh6.js +++ b/internal/webui/static/assets/XAxis-NsyDzica.js @@ -1,4 +1,4 @@ -import{d as e,f as t,h as n,u as r}from"./index-B4dA6dPq.js";import{$ as i,$t as a,At as o,B as s,Bt as c,Ct as l,Dn as u,Dt as d,En as f,Et as p,F as m,Ft as h,G as g,Gt as _,H as v,Ht as y,I as b,It as x,J as S,Jt as C,K as w,Kt as T,Mn as E,Nn as D,On as O,Ot as k,Qt as A,R as ee,Rt as j,Sn as M,St as N,Tn as P,Tt as te,U as ne,Ut as re,V as ie,Vt as ae,W as oe,Wt as se,X as F,Xt as ce,Y as I,Yt as le,Zt as ue,_ as de,_n as L,an as fe,at as pe,b as me,bn as he,bt as ge,c as _e,cn as ve,dn as ye,dt as be,en as xe,fn as Se,ft as Ce,gn as we,hn as R,ht as Te,in as Ee,it as De,jn as Oe,jt as ke,kn as Ae,l as z,ln as je,lt as Me,mn as Ne,mt as Pe,nn as Fe,on as Ie,ot as Le,pn as Re,pt as ze,q as Be,qt as Ve,r as He,rn as Ue,rt as We,sn as Ge,st as B,tn as Ke,tt as qe,u as Je,un as Ye,ut as V,v as Xe,vn as Ze,vt as Qe,wn as H,xn as U,xt as $e,y as et,yn as tt,yt as nt,z as rt,zt as W}from"./CartesianChart-2tRdU6bd.js";function it(e,t){let n=new Map;for(let r=0;rvoid 0)}function mt(e,t,n,r,i=!1){if(t===e)return!0;switch(typeof t){case`object`:return ht(e,t,n,r,i);case`function`:return Object.keys(t).length>0?mt(e,{...t},n,r,i):y(e,t);default:return ae(e)&&i?typeof t!=`string`||t===``:y(e,t)}}function ht(e,t,n,r,i=!1){if(t==null)return!0;if(Array.isArray(t))return _t(e,t,n,r);if(t instanceof Map)return gt(e,t,n,r);if(t instanceof Set)return vt(e,t,n,r);let a=Object.keys(t);if(e==null)return i&&a.length===0;if(i)ct(e)&&(e=Object(e));else{let t=Se(e);if(t!==`[object Object]`&&t!==`[object Arguments]`)return!1}if(a.length===0)return!0;if(r?.has(t))return r.get(t)===e;r?.set(t,e);try{for(let i=0;ivoid 0)}function bt(e){return e=ft(e),t=>yt(t,e)}function xt(e,t){return ut(e,(n,r,i,a)=>{let o=t?.(n,r,i,a);if(o!==void 0)return o;if(typeof e==`object`){if(Se(e)===`[object Object]`&&typeof e.constructor!=`function`){let t={};return a.set(e,t),K(t,e,i,a),t}switch(Object.prototype.toString.call(e)){case Fe:case Ie:case Ve:{let t=new e.constructor(e?.valueOf());return K(t,e),t}case se:{let t={};return K(t,e),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}default:return}}})}function St(e){return xt(e)}function Ct(e){return typeof e==`object`&&!!e&&Se(e)===`[object Arguments]`}function wt(e,t){let n;if(n=Array.isArray(t)?t:typeof t==`string`&&Ae(t)&&!(t in Object(e))?u(t):[t],n.length===0)return!1;let r=e;for(let e=0;evoid 0)}function mt(e,t,n,r,i=!1){if(t===e)return!0;switch(typeof t){case`object`:return ht(e,t,n,r,i);case`function`:return Object.keys(t).length>0?mt(e,{...t},n,r,i):y(e,t);default:return ae(e)&&i?typeof t!=`string`||t===``:y(e,t)}}function ht(e,t,n,r,i=!1){if(t==null)return!0;if(Array.isArray(t))return _t(e,t,n,r);if(t instanceof Map)return gt(e,t,n,r);if(t instanceof Set)return vt(e,t,n,r);let a=Object.keys(t);if(e==null)return i&&a.length===0;if(i)ct(e)&&(e=Object(e));else{let t=Se(e);if(t!==`[object Object]`&&t!==`[object Arguments]`)return!1}if(a.length===0)return!0;if(r?.has(t))return r.get(t)===e;r?.set(t,e);try{for(let i=0;ivoid 0)}function bt(e){return e=ft(e),t=>yt(t,e)}function xt(e,t){return ut(e,(n,r,i,a)=>{let o=t?.(n,r,i,a);if(o!==void 0)return o;if(typeof e==`object`){if(Se(e)===`[object Object]`&&typeof e.constructor!=`function`){let t={};return a.set(e,t),K(t,e,i,a),t}switch(Object.prototype.toString.call(e)){case Fe:case Ie:case Ve:{let t=new e.constructor(e?.valueOf());return K(t,e),t}case se:{let t={};return K(t,e),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}default:return}}})}function St(e){return xt(e)}function Ct(e){return typeof e==`object`&&!!e&&Se(e)===`[object Arguments]`}function wt(e,t){let n;if(n=Array.isArray(t)?t:typeof t==`string`&&Ae(t)&&!(t in Object(e))?u(t):[t],n.length===0)return!1;let r=e;for(let e=0;ee.length)&&(t=e.length);for(var n=0,r=Array(t);nLt||Math.abs(e.left-t.left)>Lt||Math.abs(e.top-t.top)>Lt||Math.abs(e.width-t.width)>Lt}function zt(e){var t=e.getBoundingClientRect();return{height:t.height,left:t.left,top:t.top,width:t.width}}function Bt(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=jt((0,q.useState)({height:0,left:0,top:0,width:0}),2),n=t[0],r=t[1],i=(0,q.useRef)(null),a=(0,q.useRef)(n);a.current=n;var o=(0,q.useCallback)(e=>{if(i.current!=null&&(i.current.disconnect(),i.current=null),e!=null){var t=zt(e);if(Rt(t,a.current)&&r(t),typeof ResizeObserver<`u`){var n=new ResizeObserver(()=>{var t=zt(e);Rt(t,a.current)&&r(t)});n.observe(e),i.current=n}}},[...e]);return(0,q.useEffect)(()=>()=>{var e;(e=i.current)==null||e.disconnect()},[]),[n,o]}function Vt(){return Vt=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n{var t=e.separator,n=t===void 0?J.separator:t,i=e.contentStyle,a=e.itemStyle,o=e.labelStyle,s=o===void 0?J.labelStyle:o,c=e.payload,l=e.formatter,u=e.itemSorter,d=e.wrapperClassName,f=e.labelClassName,p=e.label,m=e.labelFormatter,h=e.accessibilityLayer,g=h===void 0?J.accessibilityLayer:h,_=()=>{if(c&&c.length){var e={padding:0,margin:0},t=en(c,u).map((e,t)=>{if(!e||e.type===`none`)return null;var r=e.formatter||l||$t,i=e.value,o=e.name,s=i,u=o;if(r){var d=r(i,o,e,t,c);if(Array.isArray(d)){var f=qt(d,2);s=f[0],u=f[1]}else if(d!=null)s=d;else return null}var p=Ut(Ut({},J.itemStyle),{},{color:e.color||J.itemStyle.color},a);return q.createElement(`li`,{className:`recharts-tooltip-item`,key:`tooltip-item-${t}`,style:p},he(u)?q.createElement(`span`,{className:`recharts-tooltip-item-name`},u):null,he(u)?q.createElement(`span`,{className:`recharts-tooltip-item-separator`},n):null,q.createElement(`span`,{className:`recharts-tooltip-item-value`},s),q.createElement(`span`,{className:`recharts-tooltip-item-unit`},e.unit||``))});return q.createElement(`ul`,{className:`recharts-tooltip-item-list`,style:e},t)}return null},v=Ut(Ut({},J.contentStyle),i),y=Ut({margin:0},s),b=!tt(p),x=b?p:``,S=r(`recharts-default-tooltip`,d),C=r(`recharts-tooltip-label`,f);b&&m&&c!=null&&(x=m(p,c));var w=g?{role:`status`,"aria-live":`assertive`}:{};return q.createElement(`div`,Vt({className:S,style:v},w),q.createElement(`p`,{className:C,style:y},q.isValidElement(x)?x:`${x}`),_())},nn=`recharts-tooltip-wrapper`,rn={visibility:`hidden`};function an(e){var t=e.coordinate,n=e.translateX,i=e.translateY;return r(nn,{[`${nn}-right`]:U(n)&&t&&U(t.x)&&n>=t.x,[`${nn}-left`]:U(n)&&t&&U(t.x)&&n=t.y,[`${nn}-top`]:U(i)&&t&&U(t.y)&&i0?i:0),d=n[r]+i;if(t[r])return o[r]?u:d;var f=c[r];return f==null?0:o[r]?Math.max(uf+l?Math.max(u,f):Math.max(d,f)}function sn(e){var t=e.translateX,n=e.translateY;return{transform:e.useTranslate3d?`translate3d(${t}px, ${n}px, 0)`:`translate(${t}px, ${n}px)`}}function cn(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTop,i=e.offsetLeft,a=e.position,o=e.reverseDirection,s=e.tooltipBox,c=e.useTranslate3d,l=e.viewBox,u,d,f;return s&&s.height>0&&s.width>0&&n?(d=on({allowEscapeViewBox:t,coordinate:n,key:`x`,offset:i,position:a,reverseDirection:o,tooltipDimension:s.width,viewBox:l,viewBoxDimension:l.width}),f=on({allowEscapeViewBox:t,coordinate:n,key:`y`,offset:r,position:a,reverseDirection:o,tooltipDimension:s.height,viewBox:l,viewBoxDimension:l.height}),u=sn({translateX:d,translateY:f,useTranslate3d:c})):u=rn,{cssProperties:u,cssClasses:an({translateX:d,translateY:f,coordinate:n})}}function ln(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Y(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}})),2),r=n[0],i=n[1];q.useEffect(()=>{var t=t=>{t.key===`Escape`&&i({dismissed:!0,dismissedAtCoordinate:{x:e.coordinate?.x??0,y:e.coordinate?.y??0}})};return document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`keydown`,t)}},[e.coordinate?.x,e.coordinate?.y]),r.dismissed&&((e.coordinate?.x??0)!==r.dismissedAtCoordinate.x||(e.coordinate?.y??0)!==r.dismissedAtCoordinate.y)&&i(Y(Y({},r),{},{dismissed:!1}));var a=cn({allowEscapeViewBox:e.allowEscapeViewBox,coordinate:e.coordinate,offsetLeft:typeof e.offset==`number`?e.offset:e.offset.x,offsetTop:typeof e.offset==`number`?e.offset:e.offset.y,position:e.position,reverseDirection:e.reverseDirection,tooltipBox:e.lastBoundingBox,useTranslate3d:e.useTranslate3d,viewBox:e.viewBox}),o=a.cssClasses,s=a.cssProperties,c=Y(Y({},e.hasPortalFromProps?{}:Y(Y({transition:yn({prefersReducedMotion:t,isAnimationActive:e.isAnimationActive,active:e.active,animationDuration:e.animationDuration,animationEasing:e.animationEasing})},s),{},{pointerEvents:`none`,position:`absolute`,top:0,left:0})),{},{visibility:!r.dismissed&&e.active&&e.hasPayload?`visible`:`hidden`},e.wrapperStyle);return q.createElement(`div`,{xmlns:`http://www.w3.org/1999/xhtml`,tabIndex:-1,className:o,style:c,ref:e.innerRef},e.children)}var xn=q.memo(bn),Sn=[`x`,`y`,`top`,`left`,`width`,`height`,`className`];function Cn(){return Cn=Object.assign?Object.assign.bind():function(e){for(var t=1;t`M${e},${i}v${r}M${a},${t}h${n}`,Mn=e=>{var t=e.x,n=t===void 0?0:t,i=e.y,a=i===void 0?0:i,o=e.top,s=o===void 0?0:o,c=e.left,l=c===void 0?0:c,u=e.width,d=u===void 0?0:u,f=e.height,p=f===void 0?0:f,m=e.className,h=kn(e,Sn),g=Tn({x:n,y:a,top:s,left:l,width:d,height:p},h);return!U(n)||!U(a)||!U(d)||!U(p)||!U(s)||!U(l)?null:q.createElement(`path`,Cn({},Oe(g),{className:r(`recharts-cross`,m),d:jn(n,a,d,p,s,l)}))};function Nn(e,t,n,r){var i=r/2;return{stroke:`none`,fill:`#ccc`,x:e===`horizontal`?t.x-i:n.left+.5,y:e===`horizontal`?n.top+.5:t.y-i,width:e===`horizontal`?r:n.width-1,height:e===`horizontal`?n.height-1:r}}var Pn=e=>e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`),Fn=(e,t,n)=>e.map(e=>`${Pn(e)} ${t}ms ${n}`).join(`,`),In=[`radius`],Ln=[`radius`],Rn,zn,Bn,Vn,Hn,Un,Wn,Gn,Kn,qn;function Jn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Yn(e){for(var t=1;ti.map(i=>d[i]); -var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;li[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,o)=>(o=n==null?{}:e(i(n)),c(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var u=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function N(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u{t.exports=u()})),f=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0>>1,a=e[r];if(0>>1;ri(c,n))li(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(li(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-Tt&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),p=o(((e,t)=>{t.exports=f()})),m=o((e=>{var t=d();function n(e){var t=`https://react.dev/errors/`+e;if(1{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=m()})),g=o((e=>{var t=p(),n=d(),r=h();function i(e){var t=`https://react.dev/errors/`+e;if(1ne||(e.current=te[ne],te[ne]=null,ne--)}function re(e,t){ne++,te[ne]=e.current,e.current=t}var ie=R(null),ae=R(null),B=R(null),oe=R(null);function se(e,t){switch(re(B,t),re(ae,e),re(ie,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Jd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Jd(t),e=Yd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}z(ie),re(ie,e)}function ce(){z(ie),z(ae),z(B)}function le(e){e.memoizedState!==null&&re(oe,e);var t=ie.current,n=Yd(t,e.type);t!==n&&(re(ae,e),re(ie,n))}function ue(e){ae.current===e&&(z(ie),z(ae)),oe.current===e&&(z(oe),ip._currentValue=L)}var de,fe;function pe(e){if(de===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);de=t&&t[1]||``,fe=-1)`:-1i||c[r]!==l[i]){var u=` -`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(``)&&(u=u.replace(``,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{me=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?pe(n):``}function ge(e,t){switch(e.tag){case 26:case 27:case 5:return pe(e.type);case 16:return pe(`Lazy`);case 13:return e.child!==t&&t!==null?pe(`Suspense Fallback`):pe(`Suspense`);case 19:return pe(`SuspenseList`);case 0:case 15:return he(e.type,!1);case 11:return he(e.type.render,!1);case 1:return he(e.type,!0);case 31:return pe(`Activity`);default:return``}}function _e(e){try{var t=``,n=null;do t+=ge(e,n),n=e,e=e.return;while(e);return t}catch(e){return` -Error generating stack: `+e.message+` -`+e.stack}}var ve=Object.prototype.hasOwnProperty,ye=t.unstable_scheduleCallback,be=t.unstable_cancelCallback,xe=t.unstable_shouldYield,Se=t.unstable_requestPaint,Ce=t.unstable_now,we=t.unstable_getCurrentPriorityLevel,Te=t.unstable_ImmediatePriority,Ee=t.unstable_UserBlockingPriority,De=t.unstable_NormalPriority,Oe=t.unstable_LowPriority,ke=t.unstable_IdlePriority,Ae=t.log,je=t.unstable_setDisableYieldValue,Me=null,Ne=null;function Pe(e){if(typeof Ae==`function`&&je(e),Ne&&typeof Ne.setStrictMode==`function`)try{Ne.setStrictMode(Me,e)}catch{}}var Fe=Math.clz32?Math.clz32:Re,Ie=Math.log,Le=Math.LN2;function Re(e){return e>>>=0,e===0?32:31-(Ie(e)/Le|0)|0}var ze=256,Be=262144,Ve=4194304;function He(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ue(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=He(n))):i=He(o):i=He(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=He(n))):i=He(o)):i=He(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function We(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ge(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ke(){var e=Ve;return Ve<<=1,!(Ve&62914560)&&(Ve=4194304),e}function qe(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Je(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ye(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0`u`||window.document===void 0||window.document.createElement===void 0),cn=!1;if(sn)try{var ln={};Object.defineProperty(ln,"passive",{get:function(){cn=!0}}),window.addEventListener(`test`,ln,ln),window.removeEventListener(`test`,ln,ln)}catch{cn=!1}var un=null,dn=null,fn=null;function pn(){if(fn)return fn;var e,t=dn,n=t.length,r,i=`value`in un?un.value:un.textContent,a=i.length;for(e=0;e=Gn),Jn=` `,Yn=!1;function Xn(e,t){switch(e){case`keyup`:return Un.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Zn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Qn=!1;function $n(e,t){switch(e){case`compositionend`:return Zn(t);case`keypress`:return t.which===32?(Yn=!0,Jn):null;case`textInput`:return e=t.data,e===Jn&&Yn?null:e;default:return null}}function er(e,t){if(Qn)return e===`compositionend`||!Wn&&Xn(e,t)?(e=pn(),fn=dn=un=null,Qn=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Sr(n)}}function wr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?wr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Tr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Pt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Pt(e.document)}return t}function Er(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Dr=sn&&`documentMode`in document&&11>=document.documentMode,Or=null,kr=null,Ar=null,jr=!1;function Mr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;jr||Or==null||Or!==Pt(r)||(r=Or,`selectionStart`in r&&Er(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Ar&&xr(Ar,r)||(Ar=r,r=Md(kr,`onSelect`),0>=o,i-=o,wi=1<<32-Fe(t)+i|n<h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),Ni&&Ei(i,h),l;if(d===null){for(;hg?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),Ni&&Ei(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return Ni&&Ei(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),Ni&&Ei(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===y&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case _:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===y){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===O&&Da(l)===r.type){n(e,r.sibling),c=a(r,o.props),Pa(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===y?(c=di(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=ui(o.type,o.key,o.props,null,e.mode,c),Pa(c,o),c.return=e,e=c)}return s(e);case v:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=mi(o,e.mode,c),c.return=e,e=c}return s(e);case O:return o=Da(o),b(e,r,o,c)}if(ee(o))return h(e,r,o,c);if(M(o)){if(l=M(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,Na(o),c);if(o.$$typeof===C)return b(e,r,ta(e,o),c);Fa(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=fi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Ma=0;var i=b(e,t,n,r);return ja=null,i}catch(t){if(t===xa||t===Ca)throw t;var a=oi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var La=Ia(!0),Ra=Ia(!1),za=!1;function Ba(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Va(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ha(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ua(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,zl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ri(e),ni(e,null,n),t}return $r(e,r,t,n),ri(e)}function Wa(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ze(e,n)}}function Ga(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ka=!1;function qa(){if(Ka){var e=fa;if(e!==null)throw e}}function Ja(e,t,n,r){Ka=!1;var i=e.updateQueue;za=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(Hl&f)===f:(r&f)===f){f!==0&&f===da&&(Ka=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,f);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h==`function`?h.call(_,d,f):h,f==null)break a;d=m({},d,f);break a;case 2:za=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Xl|=o,e.lanes=o,e.memoizedState=d}}function Ya(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Xa(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ea?a:8;var o=F.T,s={};F.T=s,Ps(e,!1,t,n);try{var c=i(),l=F.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ns(e,t,ha(c,r),vu(e)):Ns(e,t,r,vu(e))}catch(n){Ns(e,t,{then:function(){},status:`rejected`,reason:n},vu())}finally{I.p=a,o!==null&&s.types!==null&&(o.types=s.types),F.T=o}}function ws(){}function Ts(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Es(e).queue;H(e,a,t,L,n===null?ws:function(){return Ds(e),n(r)})}function Es(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:L,baseState:L,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ro,lastRenderedState:L},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ro,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ds(e){var t=Es(e);t.next===null&&(t=e.alternate.memoizedState),Ns(e,t.next.queue,{},vu())}function Os(){return ea(ip)}function ks(){return No().memoizedState}function U(){return No().memoizedState}function As(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=vu();e=Ha(n);var r=Ua(t,e,n);r!==null&&(bu(r,t,n),Wa(r,t,n)),t={cache:sa()},e.payload=t;return}t=t.return}}function js(e,t,n){var r=vu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Fs(e)?Is(t,n):(n=ei(e,t,n,r),n!==null&&(bu(n,e,r),Ls(n,t,r)))}function Ms(e,t,n){Ns(e,t,n,vu())}function Ns(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Fs(e))Is(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,br(s,o))return $r(e,t,i,0),Bl===null&&Qr(),!1}catch{}if(n=ei(e,t,i,r),n!==null)return bu(n,e,r),Ls(n,t,r),!0}return!1}function Ps(e,t,n,r){if(r={lane:2,revertLane:gd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Fs(e)){if(t)throw Error(i(479))}else t=ei(e,n,r,2),t!==null&&bu(t,e,2)}function Fs(e){var t=e.alternate;return e===po||t!==null&&t===po}function Is(e,t){_o=go=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ls(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ze(e,n)}}var Rs={readContext:ea,use:Io,useCallback:Co,useContext:Co,useEffect:Co,useImperativeHandle:Co,useLayoutEffect:Co,useInsertionEffect:Co,useMemo:Co,useReducer:Co,useRef:Co,useState:Co,useDebugValue:Co,useDeferredValue:Co,useTransition:Co,useSyncExternalStore:Co,useId:Co,useHostTransitionStatus:Co,useFormState:Co,useActionState:Co,useOptimistic:Co,useMemoCache:Co,useCacheRefresh:Co};Rs.useEffectEvent=Co;var zs={readContext:ea,use:Io,useCallback:function(e,t){return Mo().memoizedState=[e,t===void 0?null:t],e},useContext:ea,useEffect:fs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),us(4194308,4,_s.bind(null,t,e),n)},useLayoutEffect:function(e,t){return us(4194308,4,e,t)},useInsertionEffect:function(e,t){us(4,2,e,t)},useMemo:function(e,t){var n=Mo();t=t===void 0?null:t;var r=e();if(vo){Pe(!0);try{e()}finally{Pe(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Mo();if(n!==void 0){var i=n(t);if(vo){Pe(!0);try{n(t)}finally{Pe(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=js.bind(null,po,e),[r.memoizedState,e]},useRef:function(e){var t=Mo();return e={current:e},t.memoizedState=e},useState:function(e){e=Jo(e);var t=e.queue,n=Ms.bind(null,po,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:ys,useDeferredValue:function(e,t){return Ss(Mo(),e,t)},useTransition:function(){var e=Jo(!1);return e=H.bind(null,po,e.queue,!0,!1),Mo().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=po,a=Mo();if(Ni){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Bl===null)throw Error(i(349));Hl&127||Uo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,fs(Go.bind(null,r,o,e),[e]),r.flags|=2048,cs(9,{destroy:void 0},Wo.bind(null,r,o,n,t),null),n},useId:function(){var e=Mo(),t=Bl.identifierPrefix;if(Ni){var n=Ti,r=wi;n=(r&~(1<<32-Fe(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=yo++,0<\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[it]=t,o[at]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Vd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Nc(t)}}return Ic(t),W(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Nc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=B.current,Bi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=ji,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[it]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Rd(e.nodeValue,n)),e||Li(t,!0)}else e=qd(e).createTextNode(r),e[it]=t,t.stateNode=e}return Ic(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Bi(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[it]=t}else Vi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ic(t),e=!1}else n=Hi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(co(t),t):(co(t),null);if(t.flags&128)throw Error(i(558))}return Ic(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Bi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[it]=t}else Vi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ic(t),a=!1}else a=Hi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(co(t),t):(co(t),null)}return co(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Fc(t,t.updateQueue),Ic(t),null);case 4:return ce(),e===null&&Od(t.stateNode.containerInfo),Ic(t),null;case 10:return Ji(t.type),Ic(t),null;case 19:if(z(lo),r=t.memoizedState,r===null)return Ic(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)G(r,!1);else{if(Yl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=uo(e),o!==null){for(t.flags|=128,G(r,!1),e=o.updateQueue,t.updateQueue=e,Fc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)li(n,e),n=n.sibling;return re(lo,lo.current&1|2),Ni&&Ei(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ce()>ou&&(t.flags|=128,a=!0,G(r,!1),t.lanes=4194304)}}else{if(!a){if(e=uo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Fc(t,e),G(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!Ni)return Ic(t),null}else 2*Ce()-r.renderingStartTime>ou&&n!==536870912&&(t.flags|=128,a=!0,G(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Ic(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ce(),e.sibling=null,n=lo.current,re(lo,a?n&1|2:n&1),Ni&&Ei(t,r.treeForkCount),e);case 22:case 23:return co(t),to(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Ic(t),t.subtreeFlags&6&&(t.flags|=8192)):Ic(t),n=t.updateQueue,n!==null&&Fc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&z(_a),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Ji(oa),Ic(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Rc(e,t){switch(ki(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ji(oa),ce(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ue(t),null;case 31:if(t.memoizedState!==null){if(co(t),t.alternate===null)throw Error(i(340));Vi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(co(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Vi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return z(lo),null;case 4:return ce(),null;case 10:return Ji(t.type),null;case 22:case 23:return co(t),to(),e!==null&&z(_a),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ji(oa),null;case 25:return null;default:return null}}function zc(e,t){switch(ki(t),t.tag){case 3:Ji(oa),ce();break;case 26:case 27:case 5:ue(t);break;case 4:ce();break;case 31:t.memoizedState!==null&&co(t);break;case 13:co(t);break;case 19:z(lo);break;case 10:Ji(t.type);break;case 22:case 23:co(t),to(),e!==null&&z(_a);break;case 24:Ji(oa)}}function Bc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Yu(t,t.return,e)}}function Vc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Yu(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Yu(t,t.return,e)}}function Hc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Xa(t,n)}catch(t){Yu(e,e.return,t)}}}function Uc(e,t,n){n.props=Ks(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Yu(e,t,n)}}function Wc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Yu(e,t,n)}}function Gc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){Yu(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Yu(e,t,n)}else n.current=null}}function Kc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Yu(e,e.return,t)}}function qc(e,t,n){try{var r=e.stateNode;Hd(r,e.type,n,t),r[at]=t}catch(t){Yu(e,e.return,t)}}function Jc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&af(e.type)||e.tag===4}function Yc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Jc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&af(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Xc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Zt));else if(r!==4&&(r===27&&af(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Xc(e,t,n),e=e.sibling;e!==null;)Xc(e,t,n),e=e.sibling}function Zc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&af(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Zc(e,t,n),e=e.sibling;e!==null;)Zc(e,t,n),e=e.sibling}function Qc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Vd(t,r,n),t[it]=e,t[at]=n}catch(t){Yu(e,e.return,t)}}var $c=!1,el=!1,tl=!1,nl=typeof WeakSet==`function`?WeakSet:Set,rl=null;function il(e,t){if(e=e.containerInfo,Gd=pp,e=Tr(e),Er(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Kd={focusedElem:e,selectionRange:n},pp=!1,rl=t;rl!==null;)if(t=rl,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,rl=e;else for(;rl!==null;){switch(t=rl,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n title`))),Vd(o,r,n),o[it]=e,_t(o),r=o;break a;case`link`:var s=qf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;cg&&(o=g,g=h,h=o);var _=Cr(s,h),v=Cr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;sn?32:n,F.T=null,n=mu,mu=null;var o=uu,s=fu;if(lu=0,du=uu=null,fu=0,zl&6)throw Error(i(331));var c=zl;if(zl|=4,Pl(o.current),El(o,o.current,s,n),zl=c,ld(0,!1),Ne&&typeof Ne.onPostCommitFiberRoot==`function`)try{Ne.onPostCommitFiberRoot(Me,o)}catch{}return!0}finally{I.p=a,F.T=r,Ku(e,t)}}function Ju(e,t,n){t=gi(n,t),t=Qs(e.stateNode,t,2),e=Ua(e,t,2),e!==null&&(Je(e,2),cd(e))}function Yu(e,t,n){if(e.tag===3)Ju(e,e,n);else for(;t!==null;){if(t.tag===3){Ju(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(cu===null||!cu.has(r))){e=gi(n,e),n=$s(2),r=Ua(t,n,2),r!==null&&(ec(n,r,t,e),Je(r,2),cd(r));break}}t=t.return}}function Xu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Rl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(ql=!0,i.add(n),e=Zu.bind(null,e,t,n),t.then(e,e))}function Zu(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Bl===e&&(Hl&n)===n&&(Yl===4||Yl===3&&(Hl&62914560)===Hl&&300>Ce()-iu?!(zl&2)&&Du(e,0):Ql|=n,eu===Hl&&(eu=0)),cd(e)}function Qu(e,t){t===0&&(t=Ke()),e=ti(e,t),e!==null&&(Je(e,t),cd(e))}function $u(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Qu(e,n)}function ed(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),Qu(e,n)}function td(e,t){return ye(e,t)}var nd=null,rd=null,id=!1,ad=!1,od=!1,sd=0;function cd(e){e!==rd&&e.next===null&&(rd===null?nd=rd=e:rd=rd.next=e),ad=!0,id||(id=!0,hd())}function ld(e,t){if(!od&&ad){od=!0;do for(var n=!1,r=nd;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Fe(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,md(r,a))}else a=Hl,a=Ue(r,r===Bl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||We(r,a)||(n=!0,md(r,a))}r=r.next}while(n);od=!1}}function ud(){dd()}function dd(){ad=id=!1;var e=0;sd!==0&&Qd()&&(e=sd);for(var t=Ce(),n=null,r=nd;r!==null;){var i=r.next,a=fd(r,t);a===0?(r.next=null,n===null?nd=i:n.next=i,i===null&&(rd=n)):(n=r,(e!==0||a&3)&&(ad=!0)),r=i}lu!==0&&lu!==5||ld(e,!1),sd!==0&&(sd=0)}function fd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0s)break;var u=c.transferSize,d=c.initiatorType;u&&Ud(d)&&(c=c.responseEnd,o+=u*(c`u`?null:document;function Of(e,t,n){var r=Df;if(r&&typeof t==`string`&&t){var i=It(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Sf.has(i)||(Sf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Vd(t,`link`,e),_t(t),r.head.appendChild(t)))}}function kf(e){wf.D(e),Of(`dns-prefetch`,e,null)}function Af(e,t){wf.C(e,t),Of(`preconnect`,e,t)}function jf(e,t,n){wf.L(e,t,n);var r=Df;if(r&&e&&t){var i=`link[rel="preload"][as="`+It(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+It(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+It(n.imageSizes)+`"]`)):i+=`[href="`+It(e)+`"]`;var a=i;switch(t){case`style`:a=Lf(e);break;case`script`:a=Bf(e)}xf.has(a)||(e=m({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),xf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Rf(a))||t===`script`&&r.querySelector(Vf(a))||(t=r.createElement(`link`),Vd(t,`link`,e),_t(t),r.head.appendChild(t)))}}function Mf(e,t){wf.m(e,t);var n=Df;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+It(r)+`"][href="`+It(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Bf(e)}if(!xf.has(a)&&(e=m({rel:`modulepreload`,href:e},t),xf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Vf(a)))return}r=n.createElement(`link`),Vd(r,`link`,e),_t(r),n.head.appendChild(r)}}}function Nf(e,t,n){wf.S(e,t,n);var r=Df;if(r&&e){var i=gt(r).hoistableStyles,a=Lf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Rf(a)))s.loading=5;else{e=m({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=xf.get(a))&&Wf(e,n);var c=o=r.createElement(`link`);_t(c),Vd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Uf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Pf(e,t){wf.X(e,t);var n=Df;if(n&&e){var r=gt(n).hoistableScripts,i=Bf(e),a=r.get(i);a||(a=n.querySelector(Vf(i)),a||(e=m({src:e,async:!0},t),(t=xf.get(i))&&Gf(e,t),a=n.createElement(`script`),_t(a),Vd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Ff(e,t){wf.M(e,t);var n=Df;if(n&&e){var r=gt(n).hoistableScripts,i=Bf(e),a=r.get(i);a||(a=n.querySelector(Vf(i)),a||(e=m({src:e,async:!0,type:`module`},t),(t=xf.get(i))&&Gf(e,t),a=n.createElement(`script`),_t(a),Vd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function If(e,t,n,r){var a=(a=B.current)?Cf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Lf(n.href),n=gt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Lf(n.href);var o=gt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Rf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),xf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},xf.set(e,n),o||q(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Bf(n),n=gt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Lf(e){return`href="`+It(e)+`"`}function Rf(e){return`link[rel="stylesheet"][`+e+`]`}function zf(e){return m({},e,{"data-precedence":e.precedence,precedence:null})}function q(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Vd(t,`link`,n),_t(t),e.head.appendChild(t))}function Bf(e){return`[src="`+It(e)+`"]`}function Vf(e){return`script[async]`+e}function Hf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+It(n.href)+`"]`);if(r)return t.instance=r,_t(r),r;var a=m({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),_t(r),Vd(r,`style`,a),Uf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Lf(n.href);var o=e.querySelector(Rf(a));if(o)return t.state.loading|=4,t.instance=o,_t(o),o;r=zf(n),(a=xf.get(a))&&Wf(r,a),o=(e.ownerDocument||e).createElement(`link`),_t(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Vd(o,`link`,r),t.state.loading|=4,Uf(o,n.precedence,e),t.instance=o;case`script`:return o=Bf(n.src),(a=e.querySelector(Vf(o)))?(t.instance=a,_t(a),a):(r=n,(a=xf.get(o))&&(r=m({},n),Gf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),_t(a),Vd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Uf(r,n.precedence,e));return t.instance}function Uf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o title`):null)}function Yf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Xf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Zf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Lf(r.href),a=t.querySelector(Rf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=ep.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,_t(a);return}a=t.ownerDocument||t,r=zf(r),(i=xf.get(i))&&Wf(r,i),a=a.createElement(`link`),_t(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Vd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=ep.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Qf=0;function $f(e,t){return e.stylesheets&&e.count===0&&np(e,e.stylesheets),0Qf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function ep(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)np(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var tp=null;function np(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,tp=new Map,t.forEach(rp,e),tp=null,ep.call(e))}function rp(e,t){if(!(t.state.loading&4)){var n=tp.get(e);if(n)var r=n.get(null);else{n=new Map,tp.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=g()})),v=l(d(),1),y=_(),b=`modulepreload`,x=function(e){return`/`+e},S={},C=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=x(t,n),t=s(t),t in S)return;S[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:b,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},w=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,T=/^[\\/]{2}/;function E(e,t){return t+e.replace(/\\/g,`/`)}var D=`popstate`;function O(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function k(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return P(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:ee(t)}return I(t,n,null,e)}function A(e,t){if(e===!1||e==null)throw Error(t)}function j(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function M(){return Math.random().toString(36).substring(2,10)}function N(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function P(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?F(t):t,state:n,key:t&&t.key||r||M(),mask:i}}function ee({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function F(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function I(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=O(e)?e:P(h.location,e,t);n&&n(r,e),l=u()+1;let d=N(r,l),f=h.createHref(r.mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=O(e)?e:P(h.location,e,t);n&&n(r,e),l=u();let i=N(r,l),d=h.createHref(r.mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return L(i,e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(D,d),c=e,()=>{i.removeEventListener(D,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function L(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),A(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:ee(t);return i=i.replace(/ $/,`%20`),!n&&T.test(i)&&(i=r+i),new URL(i,r)}function te(e,t,n=`/`){return ne(e,t,n,!1)}function ne(e,t,n,r,i){let a=ve((typeof t==`string`?F(t):t).pathname||`/`,n);if(a==null)return null;let o=i??R(e),s=null,c=_e(a);for(let e=0;s==null&&e{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;A(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=Ee([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(A(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),z(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:de(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=ge(e.relativePath,e.caseSensitive,t===u.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of re(e.path))a(e,t,!0,n)}),t}function re(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=re(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function ie(e){e.sort((e,t)=>e.score===t.score?fe(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var ae=/^:[\w-]+$/,B=3,oe=2,se=1,ce=10,le=-2,ue=e=>e===`*`;function de(e,t){let n=e.split(`/`),r=n.length;return n.some(ue)&&(r+=le),t&&(r+=oe),n.filter(e=>!ue(e)).reduce((e,t)=>e+(ae.test(t)?B:t===``?se:ce),r)}function fe(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function pe(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=s[r];return e[t]=n&&!i?void 0:(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function ge(e,t=!1,n=!0){j(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function _e(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return j(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function ve(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function ye(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?F(e):e,a;return n?(n=Te(n),a=n.startsWith(`/`)?be(n.substring(1),`/`):be(n,t)):a=t,{pathname:a,search:ke(r),hash:Ae(i)}}function be(e,t){let n=De(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function xe(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function Se(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function Ce(e){let t=Se(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function we(e,t,n,r=!1){let i;typeof e==`string`?i=F(e):(i={...e},A(!i.pathname||!i.pathname.includes(`?`),xe(`?`,`pathname`,`search`,i)),A(!i.pathname||!i.pathname.includes(`#`),xe(`#`,`pathname`,`hash`,i)),A(!i.search||!i.search.includes(`#`),xe(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=ye(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var Te=e=>e.replace(/[\\/]{2,}/g,`/`),Ee=e=>Te(e.join(`/`)),De=e=>e.replace(/\/+$/,``),Oe=e=>De(e).replace(/^\/*/,`/`),ke=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,Ae=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,je=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Me(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function Ne(e){return Ee(e.map(e=>e.route.path).filter(Boolean))||`/`}var Pe=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Fe(e,t){let n=e;if(typeof n!=`string`||!w.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(Pe)try{let e=new URL(window.location.href),r=T.test(n)?new URL(E(n,e.protocol)):new URL(n),a=ve(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{j(!1,` contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var Ie=[`POST`,`PUT`,`PATCH`,`DELETE`];new Set(Ie);var Le=[`GET`,...Ie];new Set(Le);var Re=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function ze(e){try{return Re.includes(new URL(e).protocol)}catch{return!1}}var Be=v.createContext(null);Be.displayName=`DataRouter`;var Ve=v.createContext(null);Ve.displayName=`DataRouterState`;var He=v.createContext(!1);function Ue(){return v.useContext(He)}var We=v.createContext({isTransitioning:!1});We.displayName=`ViewTransition`;var Ge=v.createContext(new Map);Ge.displayName=`Fetchers`;var Ke=v.createContext(null);Ke.displayName=`Await`;var qe=v.createContext(null);qe.displayName=`Navigation`;var Je=v.createContext(null);Je.displayName=`Location`;var Ye=v.createContext({outlet:null,matches:[],isDataRoute:!1});Ye.displayName=`Route`;var Xe=v.createContext(null);Xe.displayName=`RouteError`;var Ze=`REACT_ROUTER_ERROR`,Qe=`REDIRECT`,$e=`ROUTE_ERROR_RESPONSE`;function et(e){if(e.startsWith(`${Ze}:${Qe}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function tt(e){if(e.startsWith(`${Ze}:${$e}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new je(t.status,t.statusText,t.data)}catch{}}function nt(e,{relative:t}={}){A(rt(),`useHref() may be used only in the context of a component.`);let{basename:n,navigator:r}=v.useContext(qe),{hash:i,pathname:a,search:o}=dt(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:Ee([n,a])),r.createHref({pathname:s,search:o,hash:i})}function rt(){return v.useContext(Je)!=null}function it(){return A(rt(),`useLocation() may be used only in the context of a component.`),v.useContext(Je).location}var at=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function ot(e){v.useContext(qe).static||v.useLayoutEffect(e)}function st(){let{isDataRoute:e}=v.useContext(Ye);return e?Ot():ct()}function ct(){A(rt(),`useNavigate() may be used only in the context of a component.`);let e=v.useContext(Be),{basename:t,navigator:n}=v.useContext(qe),{matches:r}=v.useContext(Ye),{pathname:i}=it(),a=JSON.stringify(Ce(r)),o=v.useRef(!1);return ot(()=>{o.current=!0}),v.useCallback((r,s={})=>{if(j(o.current,at),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=we(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:Ee([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}var lt=v.createContext(null);function ut(e){let t=v.useContext(Ye).outlet;return v.useMemo(()=>t&&v.createElement(lt.Provider,{value:e},t),[t,e])}function dt(e,{relative:t}={}){let{matches:n}=v.useContext(Ye),{pathname:r}=it(),i=JSON.stringify(Ce(n));return v.useMemo(()=>we(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function ft(e,t){return pt(e,t)}function pt(e,t,n){A(rt(),`useRoutes() may be used only in the context of a component.`);let{navigator:r}=v.useContext(qe),{matches:i}=v.useContext(Ye),a=i[i.length-1],o=a?a.params:{},s=a?a.pathname:`/`,c=a?a.pathnameBase:`/`,l=a&&a.route;{let e=l&&l.path||``;At(s,!l||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant (or called \`useRoutes()\`) at "${s}" (under ) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. - -Please change the parent to .`)}let u=it(),d;if(t){let e=typeof t==`string`?F(t):t;A(c===`/`||e.pathname?.startsWith(c),`When overriding the location using \`\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${e.pathname}" was given in the \`location\` prop.`),d=e}else d=u;let f=d.pathname||`/`,p=f;if(c!==`/`){let e=c.replace(/^\//,``).split(`/`);p=`/`+f.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let m=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):te(e,{pathname:p});j(l||m!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),j(m==null||m[m.length-1].route.element!==void 0||m[m.length-1].route.Component!==void 0||m[m.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an with a null value by default resulting in an "empty" page.`);let h=bt(m&&m.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:Ee([c,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?c:Ee([c,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&h?v.createElement(Je.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...d},navigationType:`POP`}},h):h}function mt(){let e=Dt(),t=Me(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,i={padding:`0.5rem`,backgroundColor:r},a={padding:`2px 4px`,backgroundColor:r},o=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),o=v.createElement(v.Fragment,null,v.createElement(`p`,null,`💿 Hey developer 👋`),v.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,v.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,v.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),v.createElement(v.Fragment,null,v.createElement(`h2`,null,`Unexpected Application Error!`),v.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?v.createElement(`pre`,{style:i},n):null,o)}var ht=v.createElement(mt,null),gt=class extends v.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=tt(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:v.createElement(Ye.Provider,{value:this.props.routeContext},v.createElement(Xe.Provider,{value:e,children:this.props.component}));return this.context?v.createElement(vt,{error:e},t):t}};gt.contextType=He;var _t=new WeakMap;function vt({children:e,error:t}){let{basename:n}=v.useContext(qe);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=et(t.digest);if(e){let r=_t.get(t);if(r)throw r;let i=Fe(e.location,n),a=i.absoluteURL||i.to;if(ze(a))throw Error(`Invalid redirect location`);if(Pe&&!_t.get(t)){if(i.isExternal||e.reloadDocument)window.location.href=a;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw _t.set(t,n),n}}return v.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${a}`})}}return e}function yt({routeContext:e,match:t,children:n}){let r=v.useContext(Be);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),v.createElement(Ye.Provider,{value:e},n)}function bt(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);A(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:Ne(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let u,d=!1,f=null,p=null;r&&(u=a&&n.route.id?a[n.route.id]:void 0,f=n.route.errorElement||ht,o&&(s<0&&c===0?(At(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):s===c&&(d=!0,p=n.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,c+1)),h=()=>{let t;return t=u?f:d?p:n.route.Component?v.createElement(n.route.Component,null):n.route.element?n.route.element:e,v.createElement(yt,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?v.createElement(gt,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function xt(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function St(e){let t=v.useContext(Be);return A(t,xt(e)),t}function Ct(e){let t=v.useContext(Ve);return A(t,xt(e)),t}function wt(e){let t=v.useContext(Ye);return A(t,xt(e)),t}function Tt(e){let t=wt(e),n=t.matches[t.matches.length-1];return A(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function Et(){return Tt(`useRouteId`)}function Dt(){let e=v.useContext(Xe),t=Ct(`useRouteError`),n=Tt(`useRouteError`);return e===void 0?t.errors?.[n]:e}function Ot(){let{router:e}=St(`useNavigate`),t=Tt(`useNavigate`),n=v.useRef(!1);return ot(()=>{n.current=!0}),v.useCallback(async(r,i={})=>{j(n.current,at),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var kt={};function At(e,t,n){!t&&!kt[e]&&(kt[e]=!0,j(!1,n))}v.memo(jt);function jt({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return pt(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function Mt({to:e,replace:t,state:n,relative:r}){A(rt(),` may be used only in the context of a component.`);let{static:i}=v.useContext(qe);j(!i,` must not be used on the initial render in a . This is a no-op, but you should modify your code so the is only ever rendered in response to some user interaction or state change.`);let{matches:a}=v.useContext(Ye),{pathname:o}=it(),s=st(),c=we(e,Ce(a),o,r===`path`),l=JSON.stringify(c);return v.useEffect(()=>{s(JSON.parse(l),{replace:t,state:n,relative:r})},[s,l,r,t,n]),null}function Nt(e){return ut(e.context)}function Pt(e){A(!1,`A is only ever to be used as the child of element, never rendered directly. Please wrap your in a .`)}function Ft({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){A(!rt(),`You cannot render a inside another . You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=v.useMemo(()=>({basename:s,navigator:i,static:a,useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=F(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`,mask:m}=n,h=v.useMemo(()=>{let e=ve(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:p,mask:m},navigationType:r}},[s,l,u,d,f,p,r,m]);return j(h!=null,` is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the won't render anything.`),h==null?null:v.createElement(qe.Provider,{value:c},v.createElement(Je.Provider,{children:t,value:h}))}function It({children:e,location:t}){return ft(Lt(e),t)}v.Component;function Lt(e,t=[]){let n=[];return v.Children.forEach(e,(e,r)=>{if(!v.isValidElement(e))return;let i=[...t,r];if(e.type===v.Fragment){n.push.apply(n,Lt(e.props.children,i));return}A(e.type===Pt,`[${typeof e.type==`string`?e.type:e.type.name}] is not a component. All component children of must be a or `),A(!e.props.index||!e.props.children,`An index route cannot have child routes.`);let a={id:e.props.id||i.join(`-`),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:e.props.hasErrorBoundary===!0||e.props.ErrorBoundary!=null||e.props.errorElement!=null,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=Lt(e.props.children,i)),n.push(a)}),n}var Rt=`get`,zt=`application/x-www-form-urlencoded`;function Bt(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function Vt(e){return Bt(e)&&e.tagName.toLowerCase()===`button`}function Ht(e){return Bt(e)&&e.tagName.toLowerCase()===`form`}function Ut(e){return Bt(e)&&e.tagName.toLowerCase()===`input`}function Wt(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Gt(e,t){return e.button===0&&(!t||t===`_self`)&&!Wt(e)}function Kt(e=``){return new URLSearchParams(typeof e==`string`||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}function qt(e,t){let n=Kt(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var Jt=null;function Yt(){if(Jt===null)try{new FormData(document.createElement(`form`),0),Jt=!1}catch{Jt=!0}return Jt}var Xt=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function Zt(e){return e!=null&&!Xt.has(e)?(j(!1,`"${e}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${zt}"`),null):e}function Qt(e,t){let n,r,i,a,o;if(Ht(e)){let o=e.getAttribute(`action`);r=o?ve(o,t):null,n=e.getAttribute(`method`)||Rt,i=Zt(e.getAttribute(`enctype`))||zt,a=new FormData(e)}else if(Vt(e)||Ut(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a