omnigateway 0.4.8 → 0.4.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/package.json +1 -1
  2. package/public/assets/{CopyValue-CHZz2PLE.js → CopyValue-CcE2vXiA.js} +1 -1
  3. package/public/assets/{Rack-ziQuyb2l.js → Rack-Bbk1hAor.js} +2 -2
  4. package/public/assets/States-DtkkMzEu.js +54 -0
  5. package/public/assets/{Toggle-CNnMgEU1.js → Toggle-DGsa7LWV.js} +1 -1
  6. package/public/assets/{TokenBreakdown-hkwYCWT3.js → TokenBreakdown-Do_4AmfF.js} +1 -1
  7. package/public/assets/{_app-BD1K3SGD.js → _app-UpbTpRCt.js} +1 -1
  8. package/public/assets/_app.accounts-CPG3iaDT.js +64 -0
  9. package/public/assets/{_app.console-BtLYkvSQ.js → _app.console-BaGTRPEe.js} +1 -1
  10. package/public/assets/{_app.database-ByLAAKXX.js → _app.database-DA2aB-ij.js} +2 -2
  11. package/public/assets/_app.index-CDjVA5Ix.js +62 -0
  12. package/public/assets/{_app.keys-Ce6Xd1RK.js → _app.keys-Bf8HiloS.js} +1 -1
  13. package/public/assets/{_app.logs-CmDNhsU4.js → _app.logs-DTF9RDhN.js} +4 -4
  14. package/public/assets/{_app.models-mqdU56d8.js → _app.models-B6_6bC3z.js} +1 -1
  15. package/public/assets/{_app.plugins._pluginId-C0VWWCD2.js → _app.plugins._pluginId-Dl_jYunC.js} +1 -1
  16. package/public/assets/{_app.settings-BLJ-25xq.js → _app.settings-Dh6lrqws.js} +1 -1
  17. package/public/assets/{_app.usage-BaB40kku.js → _app.usage-D4TLCm9J.js} +4 -4
  18. package/public/assets/{index-C3Fp8XmZ.js → index-CJZIRJ43.js} +2 -2
  19. package/public/assets/{login-Bn1s6JI_.js → login-Bu6texfZ.js} +1 -1
  20. package/public/assets/plus-Z1kRC6KA.js +1 -0
  21. package/public/assets/{shared-DtfLcn24.js → shared-Cct_4xwp.js} +1 -1
  22. package/public/assets/{trash-2-B5fBDSkh.js → trash-2-5CCUKFQ0.js} +1 -1
  23. package/public/index.html +1 -1
  24. package/public/assets/States-Shs8nZi1.js +0 -54
  25. package/public/assets/_app.accounts-BDBEn5vF.js +0 -64
  26. package/public/assets/_app.index-3mAmJsCn.js +0 -62
  27. package/public/assets/plus-Cdyfj4uP.js +0 -1
@@ -1,4 +1,4 @@
1
- import{lt as e,mt as t,nt as n}from"./queries-CX9mStps.js";import{E as r,M as i}from"./States-Shs8nZi1.js";import*as a from"react";import{Component as o,cloneElement as s,createContext as c,createElement as l,forwardRef as u,isValidElement as d,memo as f,useCallback as p,useContext as m,useEffect as h,useImperativeHandle as g,useLayoutEffect as _,useMemo as v,useRef as y,useState as b}from"react";import{createPortal as x}from"react-dom";import S from"styled-components";var C=Object.create,w=Object.defineProperty,T=Object.getOwnPropertyDescriptor,E=Object.getOwnPropertyNames,D=Object.getPrototypeOf,O=Object.prototype.hasOwnProperty,k=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),A=(e,t)=>{let n={};for(var r in e)w(n,r,{get:e[r],enumerable:!0});return t||w(n,Symbol.toStringTag,{value:`Module`}),n},j=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=E(t),a=0,o=i.length,s;a<o;a++)s=i[a],!O.call(e,s)&&s!==n&&w(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=T(t,s))||r.enumerable});return e},M=(e,t,n)=>(n=e==null?{}:C(D(e)),j(t||!e||!e.__esModule||!O.call(e,`default`)?w(n,`default`,{value:e,enumerable:!0}):n,e));function N(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=N(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function P(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=N(e))&&(r&&(r+=` `),r+=t);return r}var ee=`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 te(e){return typeof e==`string`&&ee.includes(e)}var ne=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 re(e){return typeof e==`string`&&ne.has(e)}function ie(e){return typeof e==`string`&&e.startsWith(`data-`)}function ae(e){if(typeof e!=`object`||!e)return{};var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(re(n)||ie(n))&&(t[n]=e[n]);return t}function oe(e){if(e==null)return null;if(d(e)&&typeof e.props==`object`&&e.props!==null){var t=e.props;return ae(t)}return typeof e==`object`&&!Array.isArray(e)?ae(e):null}function se(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(re(n)||ie(n)||te(n))&&(t[n]=e[n]);return t}function ce(e){return e==null?null:d(e)?se(e.props):typeof e==`object`&&!Array.isArray(e)?se(e):null}var le=[`children`,`width`,`height`,`viewBox`,`className`,`style`,`title`,`desc`];function ue(){return ue=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ue.apply(null,arguments)}function de(e,t){if(e==null)return{};var n,r,i=fe(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function fe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var pe=u((e,t)=>{var n=e.children,r=e.width,i=e.height,o=e.viewBox,s=e.className,c=e.style,l=e.title,u=e.desc,d=de(e,le),f=o||{width:r,height:i,x:0,y:0},p=P(`recharts-surface`,s);return a.createElement(`svg`,ue({},se(d),{className:p,width:r,height:i,style:c,viewBox:`${f.x} ${f.y} ${f.width} ${f.height}`,ref:t}),a.createElement(`title`,null,l),a.createElement(`desc`,null,u),n)}),me=[`children`,`className`];function he(){return he=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},he.apply(null,arguments)}function ge(e,t){if(e==null)return{};var n,r,i=_e(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function _e(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var ve=a.forwardRef((e,t)=>{var n=e.children,r=e.className,i=ge(e,me),o=P(`recharts-layer`,r);return a.createElement(`g`,he({className:o},se(i),{ref:t}),n)});function ye(e){return e===`__proto__`}var be=/\.|(\[(?:[^[\]]*|(["'])(?:(?!\2)[^\\]|\\.)*?\2)\])/;function xe(e){switch(typeof e){case`number`:case`symbol`:return!1;case`string`:return e===``||e.startsWith(`.`)||e.endsWith(`.`)?!1:be.test(e);default:return!1}}function Se(e){return typeof e==`string`||typeof e==`symbol`?e:Object.is(e?.valueOf?.(),-0)?`-0`:String(e)}function Ce(e){if(e==null)return``;if(typeof e==`string`)return e;if(Array.isArray(e))return e.map(Ce).join(`,`);let t=String(e);return t===`0`&&Object.is(Number(e),-0)?`-0`:t}function we(e){if(Array.isArray(e))return e.map(Se);if(typeof e==`symbol`)return[e];e=Ce(e);let t=[],n=e.length;if(n===0)return t;let r=0,i=``,a=``,o=!1;for(e.charCodeAt(0)===46&&t.push(``);r<n;){let s=e[r];if(a)s===`\\`&&r+1<n?(r++,i+=e[r]):s===a?a=``:i+=s;else if(o)s===`"`||s===`'`?a=s:s===`]`?(o=!1,t.push(i),i=``):i+=s;else if(s===`[`)o=!0,i&&=(t.push(i),``);else if(s===`.`){i&&=(t.push(i),``);let n=e[r+1];(n===void 0||n===`.`)&&t.push(``)}else i+=s;r++}return i&&t.push(i),t}function Te(e,t,n){if(e==null)return n;switch(typeof t){case`string`:{if(ye(t))return n;let r=e[t];return r===void 0?xe(t)&&!Object.hasOwn(e,t)?Te(e,we(t),n):n:r}case`number`:case`symbol`:{typeof t==`number`&&(t=Se(t));let r=e[t];return r===void 0?n:r}default:{if(Array.isArray(t))return Ee(e,t,n);if(t=Object.is(t?.valueOf(),-0)?`-0`:String(t),ye(t))return n;let r=e[t];return r===void 0?n:r}}}function Ee(e,t,n){if(t.length===0)return n;let r=e;for(let e=0;e<t.length;e++){if(r==null||ye(t[e]))return n;r=r[t[e]]}return r===void 0?n:r}var De=4;function Oe(e){var t=10**(arguments.length>1&&arguments[1]!==void 0?arguments[1]:De),n=Math.round(e*t)/t;return Object.is(n,-0)?0:n}function ke(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+Oe(i)+n},``)}var Ae=e=>e===0?0:e>0?1:-1,je=e=>typeof e==`number`&&e!=+e,Me=e=>typeof e==`string`&&e.length>1&&e.indexOf(`%`)===e.length-1,F=e=>(typeof e==`number`||e instanceof Number)&&!je(e),Ne=e=>F(e)||typeof e==`string`,Pe=0,Fe=e=>{var t=++Pe;return`${e||``}${t}`},Ie=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(!F(e)&&typeof e!=`string`)return n;var i;if(Me(e)){if(t==null)return n;var a=e.indexOf(`%`);i=t*parseFloat(e.slice(0,a))/100}else i=+e;return je(i)&&(i=n),r&&t!=null&&i>t&&(i=t),i},Le=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r<t;r++)if(!n[String(e[r])])n[String(e[r])]=!0;else return!0;return!1};function Re(e,t,n){return F(e)&&F(t)?Oe(e+n*(t-e)):t}function ze(e,t,n){if(!(!e||!e.length))return e.find(e=>e&&(typeof t==`function`?t(e):Te(e,t))===n)}var I=e=>e==null,Be=e=>I(e)?e:`${e.charAt(0).toUpperCase()}${e.slice(1)}`;function Ve(e){return e!=null}function He(){}function Ue(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 We(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 Ge(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?We(Object(n),!0).forEach(function(t){Ke(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):We(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Ke(e,t,n){return(t=qe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qe(e){var t=Je(e,`string`);return typeof t==`symbol`?t:t+``}function Je(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var Ye=e=>{var t=e.viewBox,n=e.position,r=e.offset,i=r===void 0?0:r,a=e.parentViewBox,o=e.clamp,s=Ue(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`?Ge({x:h+C,y:l+u/2,horizontalAnchor:T,verticalAnchor:`middle`},j):n===`insideRight`?Ge({x:h+g-C,y:l+u/2,horizontalAnchor:w,verticalAnchor:`middle`},j):n===`insideTop`?Ge({x:p+d/2,y:l+y,horizontalAnchor:`middle`,verticalAnchor:x},j):n===`insideBottom`?Ge({x:m+f/2,y:l+u-y,horizontalAnchor:`middle`,verticalAnchor:b},j):n===`insideTopLeft`?Ge({x:p+C,y:l+y,horizontalAnchor:T,verticalAnchor:x},j):n===`insideTopRight`?Ge({x:p+d-C,y:l+y,horizontalAnchor:w,verticalAnchor:x},j):n===`insideBottomLeft`?Ge({x:m+C,y:l+u-y,horizontalAnchor:T,verticalAnchor:b},j):n===`insideBottomRight`?Ge({x:m+f-C,y:l+u-y,horizontalAnchor:w,verticalAnchor:b},j):n&&typeof n==`object`&&(F(n.x)||Me(n.x))&&(F(n.y)||Me(n.y))?Ge({x:c+Ie(n.x,g),y:l+Ie(n.y,u),horizontalAnchor:`end`,verticalAnchor:`end`},j):Ge({x:_,y:l+u/2,horizontalAnchor:`middle`,verticalAnchor:`middle`},j)},Xe=[`top`,`left`,`right`,`bottom`];function Ze(e){return e==null?!1:typeof e==`object`||Xe.includes(e)}var Qe=c(null);function L(e){return function(){return e}}var $e=Math.PI,et=2*$e,tt=1e-6,nt=et-tt;function rt(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function it(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return rt;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}var at=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?rt:it(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,i=+i,i<0)throw Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(d>tt)if(!(Math.abs(u*s-c*l)>tt)||!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(($e-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>tt&&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)>tt||Math.abs(this._y1-l)>tt)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%et+et),d>nt?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>tt&&this._append`A${n},${n},0,${+(d>=$e)},${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._}};at.prototype;function ot(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 at(t)}Array.prototype.slice;function st(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function ct(e){this._context=e}ct.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 lt(e){return new ct(e)}function ut(e){return e[0]}function dt(e){return e[1]}function ft(e,t){var n=L(!0),r=null,i=lt,a=null,o=ot(s);e=typeof e==`function`?e:e===void 0?ut:L(e),t=typeof t==`function`?t:t===void 0?dt:L(t);function s(s){var c,l=(s=st(s)).length,u,d=!1,f;for(r??(a=i(f=o())),c=0;c<=l;++c)!(c<l&&n(u=s[c],c,s))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(u,c,s),+t(u,c,s));if(f)return a=null,f+``||null}return s.x=function(t){return arguments.length?(e=typeof t==`function`?t:L(+t),s):e},s.y=function(e){return arguments.length?(t=typeof e==`function`?e:L(+e),s):t},s.defined=function(e){return arguments.length?(n=typeof e==`function`?e:L(!!e),s):n},s.curve=function(e){return arguments.length?(i=e,r!=null&&(a=i(r)),s):i},s.context=function(e){return arguments.length?(e==null?r=a=null:a=i(r=e),s):r},s}function pt(e,t,n){var r=null,i=L(!0),a=null,o=lt,s=null,c=ot(l);e=typeof e==`function`?e:e===void 0?ut:L(+e),t=typeof t==`function`?t:L(t===void 0?0:+t),n=typeof n==`function`?n:n===void 0?dt:L(+n);function l(l){var u,d,f,p=(l=st(l)).length,m,h=!1,g,_=Array(p),v=Array(p);for(a??(s=o(g=c())),u=0;u<=p;++u){if(!(u<p&&i(m=l[u],u,l))===h)if(h=!h)d=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),f=u-1;f>=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 ft().defined(i).curve(o).context(a)}return l.x=function(t){return arguments.length?(e=typeof t==`function`?t:L(+t),r=null,l):e},l.x0=function(t){return arguments.length?(e=typeof t==`function`?t:L(+t),l):e},l.x1=function(e){return arguments.length?(r=e==null?null:typeof e==`function`?e:L(+e),l):r},l.y=function(e){return arguments.length?(t=typeof e==`function`?e:L(+e),n=null,l):t},l.y0=function(e){return arguments.length?(t=typeof e==`function`?e:L(+e),l):t},l.y1=function(e){return arguments.length?(n=e==null?null:typeof e==`function`?e:L(+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:L(!!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 mt=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 ht(e){return new mt(e,!0)}function gt(e){return new mt(e,!1)}function _t(){}function vt(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 yt(e){this._context=e}yt.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:vt(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:vt(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function bt(e){return new yt(e)}function xt(e){this._context=e}xt.prototype={areaStart:_t,areaEnd:_t,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:vt(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function St(e){return new xt(e)}function Ct(e){this._context=e}Ct.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:vt(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function wt(e){return new Ct(e)}function Tt(e){this._context=e}Tt.prototype={areaStart:_t,areaEnd:_t,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 Et(e){return new Tt(e)}function Dt(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(Dt(a)+Dt(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function kt(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function At(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 jt(e){this._context=e}jt.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:At(this,this._t0,kt(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,At(this,kt(this,n=Ot(this,e,t)),n);break;default:At(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 Mt(e){this._context=new Nt(e)}(Mt.prototype=Object.create(jt.prototype)).point=function(e,t){jt.prototype.point.call(this,t,e)};function Nt(e){this._context=e}Nt.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 Pt(e){return new jt(e)}function Ft(e){return new Mt(e)}function It(e){this._context=e}It.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=Lt(e),i=Lt(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Lt(e){var t,n=e.length-1,r,i=Array(n),a=Array(n),o=Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function Rt(e){return new It(e)}function zt(e,t){this._context=e,this._t=t}zt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=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 Bt(e){return new zt(e,.5)}function Vt(e){return new zt(e,0)}function Ht(e){return new zt(e,1)}function Ut(e,t){if((o=e.length)>1)for(var n=1,r,i,a=e[t[0]],o,s=a.length;n<o;++n)for(i=a,a=e[t[n]],r=0;r<s;++r)a[r][1]+=a[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function Wt(e){for(var t=e.length,n=Array(t);--t>=0;)n[t]=t;return n}function Gt(e,t){return e[t]}function Kt(e){let t=[];return t.key=e,t}function qt(){var e=L([]),t=Wt,n=Ut,r=Gt;function i(i){var a=Array.from(e.apply(this,arguments),Kt),o,s=a.length,c=-1,l;for(let e of i)for(o=0,++c;o<s;++o)(a[o][c]=[0,+r(e,a[o].key,c,i)]).data=e;for(o=0,l=st(t(a));o<s;++o)a[l[o]].index=o;return n(a,l),a}return i.keys=function(t){return arguments.length?(e=typeof t==`function`?t:L(Array.from(t)),i):e},i.value=function(e){return arguments.length?(r=typeof e==`function`?e:L(+e),i):r},i.order=function(e){return arguments.length?(t=e==null?Wt:typeof e==`function`?e:L(Array.from(e)),i):t},i.offset=function(e){return arguments.length?(n=e??Ut,i):n},i}function Jt(e,t){if((r=e.length)>0){for(var n,r,i=0,a=e[0].length,o;i<a;++i){for(o=n=0;n<r;++n)o+=e[n][i][1]||0;if(o)for(n=0;n<r;++n)e[n][i][1]/=o}Ut(e,t)}}function Yt(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,a=r.length;n<a;++n){for(var o=0,s=0;o<i;++o)s+=e[o][n][1]||0;r[n][1]+=r[n][0]=-s/2}Ut(e,t)}}function Xt(e,t){if(!(!((o=e.length)>0)||!((a=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,a,o;r<a;++r){for(var s=0,c=0,l=0;s<o;++s){for(var u=e[t[s]],d=u[r][1]||0,f=(d-(u[r-1][1]||0))/2,p=0;p<s;++p){var m=e[t[p]],h=m[r][1]||0,g=m[r-1][1]||0;f+=h-g}c+=d,l+=f*d}i[r-1][1]+=i[r-1][0]=n,c&&(n-=l/c)}i[r-1][1]+=i[r-1][0]=n,Ut(e,t)}}var Zt=e=>`radius`in e&&`startAngle`in e&&`endAngle`in e,Qt=(e,t)=>{if(!e||typeof e==`function`||typeof e==`boolean`)return null;var n=e;if(d(e)&&(n=e.props),typeof n!=`object`&&typeof n!=`function`)return null;var r={};return Object.keys(n).forEach(e=>{te(e)&&typeof n[e]==`function`&&(r[e]=t||(t=>n[e](n,t)))}),r},$t=(e,t,n)=>r=>(e(t,n,r),null),en=(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];te(i)&&typeof a==`function`&&(r||={},r[i]=$t(a,t,n))}),r};function tn(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 nn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?tn(Object(n),!0).forEach(function(t){rn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tn(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function rn(e,t,n){return(t=an(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function an(e){var t=on(e,`string`);return typeof t==`symbol`?t:t+``}function on(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function sn(e,t){var n=nn({},e),r=t;return Object.keys(t).reduce((e,t)=>(e[t]===void 0&&r[t]!==void 0&&(e[t]=r[t]),e),n)}function cn(e,t){let n=new Map;for(let r=0;r<e.length;r++){let i=e[r],a=t(i,r,e);n.has(a)||n.set(a,i)}return Array.from(n.values())}function ln(e,t){return function(...n){return e.apply(this,n.slice(0,t))}}function un(e){return e}function dn(e){return function(t){return Te(t,e)}}function fn(e){return e==null||typeof e!=`object`&&typeof e!=`function`}function pn(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function mn(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function hn(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var gn=`[object RegExp]`,_n=`[object String]`,vn=`[object Number]`,yn=`[object Boolean]`,bn=`[object Arguments]`,xn=`[object Symbol]`,Sn=`[object Date]`,Cn=`[object Map]`,wn=`[object Set]`,Tn=`[object Array]`,En=`[object Function]`,Dn=`[object ArrayBuffer]`,On=`[object Object]`,kn=`[object Error]`,An=`[object DataView]`,jn=`[object Uint8Array]`,Mn=`[object Uint8ClampedArray]`,Nn=`[object Uint16Array]`,Pn=`[object Uint32Array]`,Fn=`[object BigUint64Array]`,In=`[object Int8Array]`,Ln=`[object Int16Array]`,Rn=`[object Int32Array]`,zn=`[object BigInt64Array]`,Bn=`[object Float32Array]`,Vn=`[object Float64Array]`,Hn=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window||typeof self==`object`&&self||typeof global==`object`&&global||(function(){return this})();function Un(e){return Hn.Buffer!==void 0&&Hn.Buffer.isBuffer(e)}function Wn(e,t){return Gn(e,void 0,e,new Map,t)}function Gn(e,t,n,r=new Map,i=void 0){let a=i?.(e,t,n,r);if(a!==void 0)return a;if(fn(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){let t=Array(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=Gn(e[a],a,n,r,i);return Object.hasOwn(e,`index`)&&(t.index=e.index),Object.hasOwn(e,`input`)&&(t.input=e.input),t}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){let t=new RegExp(e.source,e.flags);return t.lastIndex=e.lastIndex,t}if(e instanceof Map){let t=new Map;r.set(e,t);for(let[a,o]of e)t.set(a,Gn(o,a,n,r,i));return t}if(e instanceof Set){let t=new Set;r.set(e,t);for(let a of e)t.add(Gn(a,void 0,n,r,i));return t}if(Un(e))return e.subarray();if(pn(e)){let t=new(Object.getPrototypeOf(e)).constructor(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=Gn(e[a],a,n,r,i);return t}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){let t=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return r.set(e,t),Kn(t,e,n,r,i),t}if(typeof File<`u`&&e instanceof File){let t=new File([e],e.name,{type:e.type});return r.set(e,t),Kn(t,e,n,r,i),t}if(typeof Blob<`u`&&e instanceof Blob){let t=new Blob([e],{type:e.type});return r.set(e,t),Kn(t,e,n,r,i),t}if(e instanceof Error){let t=structuredClone(e);return r.set(e,t),t.message=e.message,t.name=e.name,t.stack=e.stack,t.cause=e.cause,t.constructor=e.constructor,Kn(t,e,n,r,i),t}if(e instanceof Boolean){let t=new Boolean(e.valueOf());return r.set(e,t),Kn(t,e,n,r,i),t}if(e instanceof Number){let t=new Number(e.valueOf());return r.set(e,t),Kn(t,e,n,r,i),t}if(e instanceof String){let t=new String(e.valueOf());return r.set(e,t),Kn(t,e,n,r,i),t}if(typeof e==`object`&&qn(e)){let t=Object.create(Object.getPrototypeOf(e));return r.set(e,t),Kn(t,e,n,r,i),t}return e}function Kn(e,t,n=e,r,i){let a=[...Object.keys(t),...mn(t)];for(let o=0;o<a.length;o++){let s=a[o],c=Object.getOwnPropertyDescriptor(e,s);(c==null||c.writable)&&(e[s]=Gn(t[s],s,n,r,i))}}function qn(e){switch(hn(e)){case bn:case Tn:case Dn:case An:case yn:case Sn:case Bn:case Vn:case In:case Ln:case Rn:case Cn:case vn:case On:case gn:case wn:case _n:case xn:case jn:case Mn:case Nn:case Pn:return!0;default:return!1}}function Jn(e){return Gn(e,void 0,e,new Map,void 0)}function Yn(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}function Xn(e){return e!==null&&(typeof e==`object`||typeof e==`function`)}function Zn(e,t,n){return typeof n==`function`?Qn(e,t,function e(t,r,i,a,o,s){let c=n(t,r,i,a,o,s);return c===void 0?Qn(t,r,e,s,!1):!!c},new Map,!0):Zn(e,t,()=>void 0)}function Qn(e,t,n,r,i=!1){if(t===e)return!0;switch(typeof t){case`object`:return $n(e,t,n,r);case`function`:return Object.keys(t).length>0?Qn(e,{...t},n,r,i):Yn(e,t);default:return Xn(e)&&i?typeof t!=`string`||t===``:Yn(e,t)}}function $n(e,t,n,r){if(t==null)return!0;if(Array.isArray(t))return tr(e,t,n,r);if(t instanceof Map)return er(e,t,n,r);if(t instanceof Set)return nr(e,t,n,r);let i=Object.keys(t);if(e==null||fn(e))return i.length===0;if(i.length===0)return!0;if(r?.has(t))return r.get(t)===e;r?.set(t,e);try{for(let a=0;a<i.length;a++){let o=i[a];if(!fn(e)&&!(o in e)||t[o]===void 0&&e[o]!==void 0||t[o]===null&&e[o]!==null||!n(e[o],t[o],o,e,t,r))return!1}return!0}finally{r?.delete(t)}}function er(e,t,n,r){if(t.size===0)return!0;if(!(e instanceof Map))return!1;for(let[i,a]of t.entries())if(n(e.get(i),a,i,e,t,r)===!1)return!1;return!0}function tr(e,t,n,r){if(t.length===0)return!0;if(!Array.isArray(e))return!1;let i=new Set;for(let a=0;a<t.length;a++){let o=t[a],s=!1;for(let c=0;c<e.length;c++){if(i.has(c))continue;let l=e[c],u=!1;if(n(l,o,a,e,t,r)&&(u=!0),u){i.add(c),s=!0;break}}if(!s)return!1}return!0}function nr(e,t,n,r){return t.size===0||e instanceof Set&&tr([...e],[...t],n,r)}function rr(e,t){return Zn(e,t,()=>void 0)}function ir(e){return e=Jn(e),t=>rr(t,e)}function ar(e,t){return Wn(e,(n,r,i,a)=>{let o=t?.(n,r,i,a);if(o!==void 0)return o;if(typeof e==`object`){if(hn(e)===`[object Object]`&&typeof e.constructor!=`function`){let t={};return a.set(e,t),Kn(t,e,i,a),t}switch(Object.prototype.toString.call(e)){case vn:case _n:case yn:{let t=new e.constructor(e?.valueOf());return Kn(t,e),t}case bn:{let t={};return Kn(t,e),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}default:return}}})}function or(e){return ar(e)}var sr=/^(?:0|[1-9]\d*)$/;function cr(e,t=2**53-1){switch(typeof e){case`number`:return Number.isInteger(e)&&e>=0&&e<t;case`symbol`:return!1;case`string`:return sr.test(e)}}function lr(e){return typeof e==`object`&&!!e&&hn(e)===`[object Arguments]`}function ur(e,t){let n;if(n=Array.isArray(t)?t:typeof t==`string`&&xe(t)&&!(t in Object(e))?we(t):[t],n.length===0)return!1;let r=e;for(let e=0;e<n.length;e++){let t=n[e];if((r==null||!Object.hasOwn(r,t))&&!((Array.isArray(r)||lr(r))&&cr(t)&&t<r.length))return!1;r=r[t]}return!0}function dr(e,t){switch(typeof e){case`object`:Object.is(e?.valueOf(),-0)&&(e=`-0`);break;case`number`:e=Se(e)}return t=or(t),function(n){let r=Te(n,e);return r===void 0?ur(n,e):t===void 0?r===void 0:rr(r,t)}}function fr(e){if(e==null)return un;switch(typeof e){case`function`:return e;case`object`:return Array.isArray(e)&&e.length===2?dr(e[0],e[1]):ir(e);case`string`:case`symbol`:case`number`:return dn(e)}}function pr(e){return Number.isSafeInteger(e)&&e>=0}function mr(e){return e!=null&&typeof e!=`function`&&pr(e.length)}function hr(e){return typeof e==`object`&&!!e}function gr(e){return hr(e)&&mr(e)}function _r(e,t=un){return gr(e)?cn(Array.from(e),ln(fr(t),1)):[]}function vr(e,t,n){return t===!0?_r(e,n):typeof t==`function`?_r(e,t):e}var yr=c(null),br=e=>e,R=()=>{var e=m(yr);return e?e.store.dispatch:br},xr=()=>{},Sr=()=>xr,Cr=(e,t)=>e===t;function z(e){var n=m(yr),r=v(()=>n?t=>{if(t!=null)return e(t)}:xr,[n,e]);return t(n?n.subscription.addNestedSub:Sr,n?n.store.getState:xr,n?n.store.getState:xr,r,Cr)}function wr(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!=`function`)throw TypeError(t)}function Tr(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 Er=e=>Array.isArray(e)?e:[e];function Dr(e){let t=Array.isArray(e[0])?e[0]:e;return Tr(t,`createSelector expects all input-selectors to be functions, but received the following types: `),t}function Or(e,t){let n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}var kr=class{constructor(e){this.value=e}deref(){return this.value}},Ar=typeof WeakRef>`u`?kr:WeakRef,jr=0,Mr=1;function Nr(){return{s:jr,v:void 0,o:null,p:null}}function Pr(e){return e instanceof Ar?e.deref():e}function Fr(e,t={}){let n=Nr(),{resultEqualityCheck:r}=t,i,a=0;function o(){let t=n,{length:o}=arguments;for(let e=0,n=o;e<n;e++){let n=arguments[e];if(typeof n==`function`||typeof n==`object`&&n){let e=t.o;e===null&&(t.o=e=new WeakMap);let r=e.get(n);r===void 0?(t=Nr(),e.set(n,t)):t=r}else{let e=t.p;e===null&&(t.p=e=new Map);let r=e.get(n);r===void 0?(t=Nr(),e.set(n,t)):t=r}}let s=t,c;if(t.s===Mr)c=t.v;else if(c=e.apply(null,arguments),a++,r){let e=Pr(i);e!=null&&r(e,c)&&(c=e,a!==0&&a--),i=typeof c==`object`&&c||typeof c==`function`?new Ar(c):c}return s.s=Mr,s.v=c,c}return o.clearCache=()=>{n=Nr(),o.resetResultsCount()},o.resultsCount=()=>a,o.resetResultsCount=()=>{a=0},o}function Ir(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()),wr(o,`createSelector expects an output function after the inputs, but received: [${typeof o}]`);let{memoize:s,memoizeOptions:c=[],argsMemoize:l=Fr,argsMemoizeOptions:u=[]}={...n,...a},d=Er(c),f=Er(u),p=Dr(e),m=s(function(){return t++,o.apply(null,arguments)},...d),h=l(function(){r++;let e=Or(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 B=Ir(Fr);function Lr(e,t=1){let n=[],r=Math.floor(t),i=(e,t)=>{for(let a=0;a<e.length;a++){let o=e[a];Array.isArray(o)&&t<r?i(o,t+1):n.push(o)}};return i(e,0),n}function Rr(e,t,n){return Xn(n)&&(typeof t==`number`&&mr(n)&&cr(t)&&t<n.length||typeof t==`string`&&t in n)?Yn(n[t],e):!1}function zr(e){return typeof e==`symbol`?1:e===null?2:e===void 0?3:e===e?0:4}var Br=(e,t,n)=>{if(e!==t){let r=zr(e),i=zr(t);if(r===i&&r===0){if(e<t)return n===`desc`?1:-1;if(e>t)return n===`desc`?-1:1}return n===`desc`?i-r:r-i}return 0};function Vr(e){return typeof e==`symbol`||e instanceof Symbol}var Hr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ur=/^\w*$/;function Wr(e,t){return Array.isArray(e)?!1:typeof e==`number`||typeof e==`boolean`||e==null||Vr(e)?!0:typeof e==`string`&&(Ur.test(e)||!Hr.test(e))||t!=null&&Object.hasOwn(t,e)}function Gr(e,t,n,r){if(e==null)return[];n=r?void 0:n,Array.isArray(e)||(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;for(let e=0;e<t.length&&n!=null;++e)n=n[t[e]];return n},a=(e,t)=>t==null||e==null?t: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):typeof t==`object`?t[e]:t,o=t.map(e=>(Array.isArray(e)&&e.length===1&&(e=e[0]),e==null||typeof e==`function`||Array.isArray(e)||Wr(e)?e:{key:e,path:we(e)}));return e.map(e=>({original:e,criteria:o.map(t=>a(t,e))})).slice().sort((e,t)=>{for(let r=0;r<o.length;r++){let i=Br(e.criteria[r],t.criteria[r],n[r]);if(i!==0)return i}return 0}).map(e=>e.original)}function Kr(e,...t){let n=t.length;return n>1&&Rr(e,t[0],t[1])?t=[]:n>2&&Rr(t[0],t[1],t[2])&&(t=[t[0]]),Gr(e,Lr(t),[`asc`])}var qr=e=>e.legend.settings,Jr=e=>e.legend.size;B([e=>e.legend.payload,qr],(e,t)=>{var n=t.itemSorter,r=e.flat(1);return n?Kr(r,n):r});function Yr(e,t){return ei(e)||$r(e,t)||Zr(e,t)||Xr()}function Xr(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{lt as e,mt as t,nt as n}from"./queries-CX9mStps.js";import{D as r,N as i}from"./States-DtkkMzEu.js";import*as a from"react";import{Component as o,cloneElement as s,createContext as c,createElement as l,forwardRef as u,isValidElement as d,memo as f,useCallback as p,useContext as m,useEffect as h,useImperativeHandle as g,useLayoutEffect as _,useMemo as v,useRef as y,useState as b}from"react";import{createPortal as x}from"react-dom";import S from"styled-components";var C=Object.create,w=Object.defineProperty,T=Object.getOwnPropertyDescriptor,E=Object.getOwnPropertyNames,D=Object.getPrototypeOf,O=Object.prototype.hasOwnProperty,k=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),A=(e,t)=>{let n={};for(var r in e)w(n,r,{get:e[r],enumerable:!0});return t||w(n,Symbol.toStringTag,{value:`Module`}),n},j=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=E(t),a=0,o=i.length,s;a<o;a++)s=i[a],!O.call(e,s)&&s!==n&&w(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=T(t,s))||r.enumerable});return e},M=(e,t,n)=>(n=e==null?{}:C(D(e)),j(t||!e||!e.__esModule||!O.call(e,`default`)?w(n,`default`,{value:e,enumerable:!0}):n,e));function N(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=N(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function P(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=N(e))&&(r&&(r+=` `),r+=t);return r}var ee=`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 te(e){return typeof e==`string`&&ee.includes(e)}var ne=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 re(e){return typeof e==`string`&&ne.has(e)}function ie(e){return typeof e==`string`&&e.startsWith(`data-`)}function ae(e){if(typeof e!=`object`||!e)return{};var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(re(n)||ie(n))&&(t[n]=e[n]);return t}function oe(e){if(e==null)return null;if(d(e)&&typeof e.props==`object`&&e.props!==null){var t=e.props;return ae(t)}return typeof e==`object`&&!Array.isArray(e)?ae(e):null}function se(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(re(n)||ie(n)||te(n))&&(t[n]=e[n]);return t}function ce(e){return e==null?null:d(e)?se(e.props):typeof e==`object`&&!Array.isArray(e)?se(e):null}var le=[`children`,`width`,`height`,`viewBox`,`className`,`style`,`title`,`desc`];function ue(){return ue=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ue.apply(null,arguments)}function de(e,t){if(e==null)return{};var n,r,i=fe(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function fe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var pe=u((e,t)=>{var n=e.children,r=e.width,i=e.height,o=e.viewBox,s=e.className,c=e.style,l=e.title,u=e.desc,d=de(e,le),f=o||{width:r,height:i,x:0,y:0},p=P(`recharts-surface`,s);return a.createElement(`svg`,ue({},se(d),{className:p,width:r,height:i,style:c,viewBox:`${f.x} ${f.y} ${f.width} ${f.height}`,ref:t}),a.createElement(`title`,null,l),a.createElement(`desc`,null,u),n)}),me=[`children`,`className`];function he(){return he=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},he.apply(null,arguments)}function ge(e,t){if(e==null)return{};var n,r,i=_e(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function _e(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var ve=a.forwardRef((e,t)=>{var n=e.children,r=e.className,i=ge(e,me),o=P(`recharts-layer`,r);return a.createElement(`g`,he({className:o},se(i),{ref:t}),n)});function ye(e){return e===`__proto__`}var be=/\.|(\[(?:[^[\]]*|(["'])(?:(?!\2)[^\\]|\\.)*?\2)\])/;function xe(e){switch(typeof e){case`number`:case`symbol`:return!1;case`string`:return e===``||e.startsWith(`.`)||e.endsWith(`.`)?!1:be.test(e);default:return!1}}function Se(e){return typeof e==`string`||typeof e==`symbol`?e:Object.is(e?.valueOf?.(),-0)?`-0`:String(e)}function Ce(e){if(e==null)return``;if(typeof e==`string`)return e;if(Array.isArray(e))return e.map(Ce).join(`,`);let t=String(e);return t===`0`&&Object.is(Number(e),-0)?`-0`:t}function we(e){if(Array.isArray(e))return e.map(Se);if(typeof e==`symbol`)return[e];e=Ce(e);let t=[],n=e.length;if(n===0)return t;let r=0,i=``,a=``,o=!1;for(e.charCodeAt(0)===46&&t.push(``);r<n;){let s=e[r];if(a)s===`\\`&&r+1<n?(r++,i+=e[r]):s===a?a=``:i+=s;else if(o)s===`"`||s===`'`?a=s:s===`]`?(o=!1,t.push(i),i=``):i+=s;else if(s===`[`)o=!0,i&&=(t.push(i),``);else if(s===`.`){i&&=(t.push(i),``);let n=e[r+1];(n===void 0||n===`.`)&&t.push(``)}else i+=s;r++}return i&&t.push(i),t}function Te(e,t,n){if(e==null)return n;switch(typeof t){case`string`:{if(ye(t))return n;let r=e[t];return r===void 0?xe(t)&&!Object.hasOwn(e,t)?Te(e,we(t),n):n:r}case`number`:case`symbol`:{typeof t==`number`&&(t=Se(t));let r=e[t];return r===void 0?n:r}default:{if(Array.isArray(t))return Ee(e,t,n);if(t=Object.is(t?.valueOf(),-0)?`-0`:String(t),ye(t))return n;let r=e[t];return r===void 0?n:r}}}function Ee(e,t,n){if(t.length===0)return n;let r=e;for(let e=0;e<t.length;e++){if(r==null||ye(t[e]))return n;r=r[t[e]]}return r===void 0?n:r}var De=4;function Oe(e){var t=10**(arguments.length>1&&arguments[1]!==void 0?arguments[1]:De),n=Math.round(e*t)/t;return Object.is(n,-0)?0:n}function ke(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+Oe(i)+n},``)}var Ae=e=>e===0?0:e>0?1:-1,je=e=>typeof e==`number`&&e!=+e,Me=e=>typeof e==`string`&&e.length>1&&e.indexOf(`%`)===e.length-1,F=e=>(typeof e==`number`||e instanceof Number)&&!je(e),Ne=e=>F(e)||typeof e==`string`,Pe=0,Fe=e=>{var t=++Pe;return`${e||``}${t}`},Ie=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(!F(e)&&typeof e!=`string`)return n;var i;if(Me(e)){if(t==null)return n;var a=e.indexOf(`%`);i=t*parseFloat(e.slice(0,a))/100}else i=+e;return je(i)&&(i=n),r&&t!=null&&i>t&&(i=t),i},Le=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r<t;r++)if(!n[String(e[r])])n[String(e[r])]=!0;else return!0;return!1};function Re(e,t,n){return F(e)&&F(t)?Oe(e+n*(t-e)):t}function ze(e,t,n){if(!(!e||!e.length))return e.find(e=>e&&(typeof t==`function`?t(e):Te(e,t))===n)}var I=e=>e==null,Be=e=>I(e)?e:`${e.charAt(0).toUpperCase()}${e.slice(1)}`;function Ve(e){return e!=null}function He(){}function Ue(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 We(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 Ge(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?We(Object(n),!0).forEach(function(t){Ke(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):We(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Ke(e,t,n){return(t=qe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qe(e){var t=Je(e,`string`);return typeof t==`symbol`?t:t+``}function Je(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var Ye=e=>{var t=e.viewBox,n=e.position,r=e.offset,i=r===void 0?0:r,a=e.parentViewBox,o=e.clamp,s=Ue(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`?Ge({x:h+C,y:l+u/2,horizontalAnchor:T,verticalAnchor:`middle`},j):n===`insideRight`?Ge({x:h+g-C,y:l+u/2,horizontalAnchor:w,verticalAnchor:`middle`},j):n===`insideTop`?Ge({x:p+d/2,y:l+y,horizontalAnchor:`middle`,verticalAnchor:x},j):n===`insideBottom`?Ge({x:m+f/2,y:l+u-y,horizontalAnchor:`middle`,verticalAnchor:b},j):n===`insideTopLeft`?Ge({x:p+C,y:l+y,horizontalAnchor:T,verticalAnchor:x},j):n===`insideTopRight`?Ge({x:p+d-C,y:l+y,horizontalAnchor:w,verticalAnchor:x},j):n===`insideBottomLeft`?Ge({x:m+C,y:l+u-y,horizontalAnchor:T,verticalAnchor:b},j):n===`insideBottomRight`?Ge({x:m+f-C,y:l+u-y,horizontalAnchor:w,verticalAnchor:b},j):n&&typeof n==`object`&&(F(n.x)||Me(n.x))&&(F(n.y)||Me(n.y))?Ge({x:c+Ie(n.x,g),y:l+Ie(n.y,u),horizontalAnchor:`end`,verticalAnchor:`end`},j):Ge({x:_,y:l+u/2,horizontalAnchor:`middle`,verticalAnchor:`middle`},j)},Xe=[`top`,`left`,`right`,`bottom`];function Ze(e){return e==null?!1:typeof e==`object`||Xe.includes(e)}var Qe=c(null);function L(e){return function(){return e}}var $e=Math.PI,et=2*$e,tt=1e-6,nt=et-tt;function rt(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function it(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return rt;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}var at=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?rt:it(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,i=+i,i<0)throw Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(d>tt)if(!(Math.abs(u*s-c*l)>tt)||!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(($e-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>tt&&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)>tt||Math.abs(this._y1-l)>tt)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%et+et),d>nt?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>tt&&this._append`A${n},${n},0,${+(d>=$e)},${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._}};at.prototype;function ot(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 at(t)}Array.prototype.slice;function st(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function ct(e){this._context=e}ct.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 lt(e){return new ct(e)}function ut(e){return e[0]}function dt(e){return e[1]}function ft(e,t){var n=L(!0),r=null,i=lt,a=null,o=ot(s);e=typeof e==`function`?e:e===void 0?ut:L(e),t=typeof t==`function`?t:t===void 0?dt:L(t);function s(s){var c,l=(s=st(s)).length,u,d=!1,f;for(r??(a=i(f=o())),c=0;c<=l;++c)!(c<l&&n(u=s[c],c,s))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(u,c,s),+t(u,c,s));if(f)return a=null,f+``||null}return s.x=function(t){return arguments.length?(e=typeof t==`function`?t:L(+t),s):e},s.y=function(e){return arguments.length?(t=typeof e==`function`?e:L(+e),s):t},s.defined=function(e){return arguments.length?(n=typeof e==`function`?e:L(!!e),s):n},s.curve=function(e){return arguments.length?(i=e,r!=null&&(a=i(r)),s):i},s.context=function(e){return arguments.length?(e==null?r=a=null:a=i(r=e),s):r},s}function pt(e,t,n){var r=null,i=L(!0),a=null,o=lt,s=null,c=ot(l);e=typeof e==`function`?e:e===void 0?ut:L(+e),t=typeof t==`function`?t:L(t===void 0?0:+t),n=typeof n==`function`?n:n===void 0?dt:L(+n);function l(l){var u,d,f,p=(l=st(l)).length,m,h=!1,g,_=Array(p),v=Array(p);for(a??(s=o(g=c())),u=0;u<=p;++u){if(!(u<p&&i(m=l[u],u,l))===h)if(h=!h)d=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),f=u-1;f>=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 ft().defined(i).curve(o).context(a)}return l.x=function(t){return arguments.length?(e=typeof t==`function`?t:L(+t),r=null,l):e},l.x0=function(t){return arguments.length?(e=typeof t==`function`?t:L(+t),l):e},l.x1=function(e){return arguments.length?(r=e==null?null:typeof e==`function`?e:L(+e),l):r},l.y=function(e){return arguments.length?(t=typeof e==`function`?e:L(+e),n=null,l):t},l.y0=function(e){return arguments.length?(t=typeof e==`function`?e:L(+e),l):t},l.y1=function(e){return arguments.length?(n=e==null?null:typeof e==`function`?e:L(+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:L(!!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 mt=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 ht(e){return new mt(e,!0)}function gt(e){return new mt(e,!1)}function _t(){}function vt(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 yt(e){this._context=e}yt.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:vt(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:vt(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function bt(e){return new yt(e)}function xt(e){this._context=e}xt.prototype={areaStart:_t,areaEnd:_t,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:vt(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function St(e){return new xt(e)}function Ct(e){this._context=e}Ct.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:vt(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function wt(e){return new Ct(e)}function Tt(e){this._context=e}Tt.prototype={areaStart:_t,areaEnd:_t,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 Et(e){return new Tt(e)}function Dt(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(Dt(a)+Dt(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function kt(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function At(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 jt(e){this._context=e}jt.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:At(this,this._t0,kt(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,At(this,kt(this,n=Ot(this,e,t)),n);break;default:At(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 Mt(e){this._context=new Nt(e)}(Mt.prototype=Object.create(jt.prototype)).point=function(e,t){jt.prototype.point.call(this,t,e)};function Nt(e){this._context=e}Nt.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 Pt(e){return new jt(e)}function Ft(e){return new Mt(e)}function It(e){this._context=e}It.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=Lt(e),i=Lt(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Lt(e){var t,n=e.length-1,r,i=Array(n),a=Array(n),o=Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function Rt(e){return new It(e)}function zt(e,t){this._context=e,this._t=t}zt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=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 Bt(e){return new zt(e,.5)}function Vt(e){return new zt(e,0)}function Ht(e){return new zt(e,1)}function Ut(e,t){if((o=e.length)>1)for(var n=1,r,i,a=e[t[0]],o,s=a.length;n<o;++n)for(i=a,a=e[t[n]],r=0;r<s;++r)a[r][1]+=a[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function Wt(e){for(var t=e.length,n=Array(t);--t>=0;)n[t]=t;return n}function Gt(e,t){return e[t]}function Kt(e){let t=[];return t.key=e,t}function qt(){var e=L([]),t=Wt,n=Ut,r=Gt;function i(i){var a=Array.from(e.apply(this,arguments),Kt),o,s=a.length,c=-1,l;for(let e of i)for(o=0,++c;o<s;++o)(a[o][c]=[0,+r(e,a[o].key,c,i)]).data=e;for(o=0,l=st(t(a));o<s;++o)a[l[o]].index=o;return n(a,l),a}return i.keys=function(t){return arguments.length?(e=typeof t==`function`?t:L(Array.from(t)),i):e},i.value=function(e){return arguments.length?(r=typeof e==`function`?e:L(+e),i):r},i.order=function(e){return arguments.length?(t=e==null?Wt:typeof e==`function`?e:L(Array.from(e)),i):t},i.offset=function(e){return arguments.length?(n=e??Ut,i):n},i}function Jt(e,t){if((r=e.length)>0){for(var n,r,i=0,a=e[0].length,o;i<a;++i){for(o=n=0;n<r;++n)o+=e[n][i][1]||0;if(o)for(n=0;n<r;++n)e[n][i][1]/=o}Ut(e,t)}}function Yt(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,a=r.length;n<a;++n){for(var o=0,s=0;o<i;++o)s+=e[o][n][1]||0;r[n][1]+=r[n][0]=-s/2}Ut(e,t)}}function Xt(e,t){if(!(!((o=e.length)>0)||!((a=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,a,o;r<a;++r){for(var s=0,c=0,l=0;s<o;++s){for(var u=e[t[s]],d=u[r][1]||0,f=(d-(u[r-1][1]||0))/2,p=0;p<s;++p){var m=e[t[p]],h=m[r][1]||0,g=m[r-1][1]||0;f+=h-g}c+=d,l+=f*d}i[r-1][1]+=i[r-1][0]=n,c&&(n-=l/c)}i[r-1][1]+=i[r-1][0]=n,Ut(e,t)}}var Zt=e=>`radius`in e&&`startAngle`in e&&`endAngle`in e,Qt=(e,t)=>{if(!e||typeof e==`function`||typeof e==`boolean`)return null;var n=e;if(d(e)&&(n=e.props),typeof n!=`object`&&typeof n!=`function`)return null;var r={};return Object.keys(n).forEach(e=>{te(e)&&typeof n[e]==`function`&&(r[e]=t||(t=>n[e](n,t)))}),r},$t=(e,t,n)=>r=>(e(t,n,r),null),en=(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];te(i)&&typeof a==`function`&&(r||={},r[i]=$t(a,t,n))}),r};function tn(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 nn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?tn(Object(n),!0).forEach(function(t){rn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tn(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function rn(e,t,n){return(t=an(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function an(e){var t=on(e,`string`);return typeof t==`symbol`?t:t+``}function on(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function sn(e,t){var n=nn({},e),r=t;return Object.keys(t).reduce((e,t)=>(e[t]===void 0&&r[t]!==void 0&&(e[t]=r[t]),e),n)}function cn(e,t){let n=new Map;for(let r=0;r<e.length;r++){let i=e[r],a=t(i,r,e);n.has(a)||n.set(a,i)}return Array.from(n.values())}function ln(e,t){return function(...n){return e.apply(this,n.slice(0,t))}}function un(e){return e}function dn(e){return function(t){return Te(t,e)}}function fn(e){return e==null||typeof e!=`object`&&typeof e!=`function`}function pn(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function mn(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function hn(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var gn=`[object RegExp]`,_n=`[object String]`,vn=`[object Number]`,yn=`[object Boolean]`,bn=`[object Arguments]`,xn=`[object Symbol]`,Sn=`[object Date]`,Cn=`[object Map]`,wn=`[object Set]`,Tn=`[object Array]`,En=`[object Function]`,Dn=`[object ArrayBuffer]`,On=`[object Object]`,kn=`[object Error]`,An=`[object DataView]`,jn=`[object Uint8Array]`,Mn=`[object Uint8ClampedArray]`,Nn=`[object Uint16Array]`,Pn=`[object Uint32Array]`,Fn=`[object BigUint64Array]`,In=`[object Int8Array]`,Ln=`[object Int16Array]`,Rn=`[object Int32Array]`,zn=`[object BigInt64Array]`,Bn=`[object Float32Array]`,Vn=`[object Float64Array]`,Hn=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window||typeof self==`object`&&self||typeof global==`object`&&global||(function(){return this})();function Un(e){return Hn.Buffer!==void 0&&Hn.Buffer.isBuffer(e)}function Wn(e,t){return Gn(e,void 0,e,new Map,t)}function Gn(e,t,n,r=new Map,i=void 0){let a=i?.(e,t,n,r);if(a!==void 0)return a;if(fn(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){let t=Array(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=Gn(e[a],a,n,r,i);return Object.hasOwn(e,`index`)&&(t.index=e.index),Object.hasOwn(e,`input`)&&(t.input=e.input),t}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){let t=new RegExp(e.source,e.flags);return t.lastIndex=e.lastIndex,t}if(e instanceof Map){let t=new Map;r.set(e,t);for(let[a,o]of e)t.set(a,Gn(o,a,n,r,i));return t}if(e instanceof Set){let t=new Set;r.set(e,t);for(let a of e)t.add(Gn(a,void 0,n,r,i));return t}if(Un(e))return e.subarray();if(pn(e)){let t=new(Object.getPrototypeOf(e)).constructor(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=Gn(e[a],a,n,r,i);return t}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){let t=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return r.set(e,t),Kn(t,e,n,r,i),t}if(typeof File<`u`&&e instanceof File){let t=new File([e],e.name,{type:e.type});return r.set(e,t),Kn(t,e,n,r,i),t}if(typeof Blob<`u`&&e instanceof Blob){let t=new Blob([e],{type:e.type});return r.set(e,t),Kn(t,e,n,r,i),t}if(e instanceof Error){let t=structuredClone(e);return r.set(e,t),t.message=e.message,t.name=e.name,t.stack=e.stack,t.cause=e.cause,t.constructor=e.constructor,Kn(t,e,n,r,i),t}if(e instanceof Boolean){let t=new Boolean(e.valueOf());return r.set(e,t),Kn(t,e,n,r,i),t}if(e instanceof Number){let t=new Number(e.valueOf());return r.set(e,t),Kn(t,e,n,r,i),t}if(e instanceof String){let t=new String(e.valueOf());return r.set(e,t),Kn(t,e,n,r,i),t}if(typeof e==`object`&&qn(e)){let t=Object.create(Object.getPrototypeOf(e));return r.set(e,t),Kn(t,e,n,r,i),t}return e}function Kn(e,t,n=e,r,i){let a=[...Object.keys(t),...mn(t)];for(let o=0;o<a.length;o++){let s=a[o],c=Object.getOwnPropertyDescriptor(e,s);(c==null||c.writable)&&(e[s]=Gn(t[s],s,n,r,i))}}function qn(e){switch(hn(e)){case bn:case Tn:case Dn:case An:case yn:case Sn:case Bn:case Vn:case In:case Ln:case Rn:case Cn:case vn:case On:case gn:case wn:case _n:case xn:case jn:case Mn:case Nn:case Pn:return!0;default:return!1}}function Jn(e){return Gn(e,void 0,e,new Map,void 0)}function Yn(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}function Xn(e){return e!==null&&(typeof e==`object`||typeof e==`function`)}function Zn(e,t,n){return typeof n==`function`?Qn(e,t,function e(t,r,i,a,o,s){let c=n(t,r,i,a,o,s);return c===void 0?Qn(t,r,e,s,!1):!!c},new Map,!0):Zn(e,t,()=>void 0)}function Qn(e,t,n,r,i=!1){if(t===e)return!0;switch(typeof t){case`object`:return $n(e,t,n,r);case`function`:return Object.keys(t).length>0?Qn(e,{...t},n,r,i):Yn(e,t);default:return Xn(e)&&i?typeof t!=`string`||t===``:Yn(e,t)}}function $n(e,t,n,r){if(t==null)return!0;if(Array.isArray(t))return tr(e,t,n,r);if(t instanceof Map)return er(e,t,n,r);if(t instanceof Set)return nr(e,t,n,r);let i=Object.keys(t);if(e==null||fn(e))return i.length===0;if(i.length===0)return!0;if(r?.has(t))return r.get(t)===e;r?.set(t,e);try{for(let a=0;a<i.length;a++){let o=i[a];if(!fn(e)&&!(o in e)||t[o]===void 0&&e[o]!==void 0||t[o]===null&&e[o]!==null||!n(e[o],t[o],o,e,t,r))return!1}return!0}finally{r?.delete(t)}}function er(e,t,n,r){if(t.size===0)return!0;if(!(e instanceof Map))return!1;for(let[i,a]of t.entries())if(n(e.get(i),a,i,e,t,r)===!1)return!1;return!0}function tr(e,t,n,r){if(t.length===0)return!0;if(!Array.isArray(e))return!1;let i=new Set;for(let a=0;a<t.length;a++){let o=t[a],s=!1;for(let c=0;c<e.length;c++){if(i.has(c))continue;let l=e[c],u=!1;if(n(l,o,a,e,t,r)&&(u=!0),u){i.add(c),s=!0;break}}if(!s)return!1}return!0}function nr(e,t,n,r){return t.size===0||e instanceof Set&&tr([...e],[...t],n,r)}function rr(e,t){return Zn(e,t,()=>void 0)}function ir(e){return e=Jn(e),t=>rr(t,e)}function ar(e,t){return Wn(e,(n,r,i,a)=>{let o=t?.(n,r,i,a);if(o!==void 0)return o;if(typeof e==`object`){if(hn(e)===`[object Object]`&&typeof e.constructor!=`function`){let t={};return a.set(e,t),Kn(t,e,i,a),t}switch(Object.prototype.toString.call(e)){case vn:case _n:case yn:{let t=new e.constructor(e?.valueOf());return Kn(t,e),t}case bn:{let t={};return Kn(t,e),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}default:return}}})}function or(e){return ar(e)}var sr=/^(?:0|[1-9]\d*)$/;function cr(e,t=2**53-1){switch(typeof e){case`number`:return Number.isInteger(e)&&e>=0&&e<t;case`symbol`:return!1;case`string`:return sr.test(e)}}function lr(e){return typeof e==`object`&&!!e&&hn(e)===`[object Arguments]`}function ur(e,t){let n;if(n=Array.isArray(t)?t:typeof t==`string`&&xe(t)&&!(t in Object(e))?we(t):[t],n.length===0)return!1;let r=e;for(let e=0;e<n.length;e++){let t=n[e];if((r==null||!Object.hasOwn(r,t))&&!((Array.isArray(r)||lr(r))&&cr(t)&&t<r.length))return!1;r=r[t]}return!0}function dr(e,t){switch(typeof e){case`object`:Object.is(e?.valueOf(),-0)&&(e=`-0`);break;case`number`:e=Se(e)}return t=or(t),function(n){let r=Te(n,e);return r===void 0?ur(n,e):t===void 0?r===void 0:rr(r,t)}}function fr(e){if(e==null)return un;switch(typeof e){case`function`:return e;case`object`:return Array.isArray(e)&&e.length===2?dr(e[0],e[1]):ir(e);case`string`:case`symbol`:case`number`:return dn(e)}}function pr(e){return Number.isSafeInteger(e)&&e>=0}function mr(e){return e!=null&&typeof e!=`function`&&pr(e.length)}function hr(e){return typeof e==`object`&&!!e}function gr(e){return hr(e)&&mr(e)}function _r(e,t=un){return gr(e)?cn(Array.from(e),ln(fr(t),1)):[]}function vr(e,t,n){return t===!0?_r(e,n):typeof t==`function`?_r(e,t):e}var yr=c(null),br=e=>e,R=()=>{var e=m(yr);return e?e.store.dispatch:br},xr=()=>{},Sr=()=>xr,Cr=(e,t)=>e===t;function z(e){var n=m(yr),r=v(()=>n?t=>{if(t!=null)return e(t)}:xr,[n,e]);return t(n?n.subscription.addNestedSub:Sr,n?n.store.getState:xr,n?n.store.getState:xr,r,Cr)}function wr(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!=`function`)throw TypeError(t)}function Tr(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 Er=e=>Array.isArray(e)?e:[e];function Dr(e){let t=Array.isArray(e[0])?e[0]:e;return Tr(t,`createSelector expects all input-selectors to be functions, but received the following types: `),t}function Or(e,t){let n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}var kr=class{constructor(e){this.value=e}deref(){return this.value}},Ar=typeof WeakRef>`u`?kr:WeakRef,jr=0,Mr=1;function Nr(){return{s:jr,v:void 0,o:null,p:null}}function Pr(e){return e instanceof Ar?e.deref():e}function Fr(e,t={}){let n=Nr(),{resultEqualityCheck:r}=t,i,a=0;function o(){let t=n,{length:o}=arguments;for(let e=0,n=o;e<n;e++){let n=arguments[e];if(typeof n==`function`||typeof n==`object`&&n){let e=t.o;e===null&&(t.o=e=new WeakMap);let r=e.get(n);r===void 0?(t=Nr(),e.set(n,t)):t=r}else{let e=t.p;e===null&&(t.p=e=new Map);let r=e.get(n);r===void 0?(t=Nr(),e.set(n,t)):t=r}}let s=t,c;if(t.s===Mr)c=t.v;else if(c=e.apply(null,arguments),a++,r){let e=Pr(i);e!=null&&r(e,c)&&(c=e,a!==0&&a--),i=typeof c==`object`&&c||typeof c==`function`?new Ar(c):c}return s.s=Mr,s.v=c,c}return o.clearCache=()=>{n=Nr(),o.resetResultsCount()},o.resultsCount=()=>a,o.resetResultsCount=()=>{a=0},o}function Ir(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()),wr(o,`createSelector expects an output function after the inputs, but received: [${typeof o}]`);let{memoize:s,memoizeOptions:c=[],argsMemoize:l=Fr,argsMemoizeOptions:u=[]}={...n,...a},d=Er(c),f=Er(u),p=Dr(e),m=s(function(){return t++,o.apply(null,arguments)},...d),h=l(function(){r++;let e=Or(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 B=Ir(Fr);function Lr(e,t=1){let n=[],r=Math.floor(t),i=(e,t)=>{for(let a=0;a<e.length;a++){let o=e[a];Array.isArray(o)&&t<r?i(o,t+1):n.push(o)}};return i(e,0),n}function Rr(e,t,n){return Xn(n)&&(typeof t==`number`&&mr(n)&&cr(t)&&t<n.length||typeof t==`string`&&t in n)?Yn(n[t],e):!1}function zr(e){return typeof e==`symbol`?1:e===null?2:e===void 0?3:e===e?0:4}var Br=(e,t,n)=>{if(e!==t){let r=zr(e),i=zr(t);if(r===i&&r===0){if(e<t)return n===`desc`?1:-1;if(e>t)return n===`desc`?-1:1}return n===`desc`?i-r:r-i}return 0};function Vr(e){return typeof e==`symbol`||e instanceof Symbol}var Hr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ur=/^\w*$/;function Wr(e,t){return Array.isArray(e)?!1:typeof e==`number`||typeof e==`boolean`||e==null||Vr(e)?!0:typeof e==`string`&&(Ur.test(e)||!Hr.test(e))||t!=null&&Object.hasOwn(t,e)}function Gr(e,t,n,r){if(e==null)return[];n=r?void 0:n,Array.isArray(e)||(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;for(let e=0;e<t.length&&n!=null;++e)n=n[t[e]];return n},a=(e,t)=>t==null||e==null?t: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):typeof t==`object`?t[e]:t,o=t.map(e=>(Array.isArray(e)&&e.length===1&&(e=e[0]),e==null||typeof e==`function`||Array.isArray(e)||Wr(e)?e:{key:e,path:we(e)}));return e.map(e=>({original:e,criteria:o.map(t=>a(t,e))})).slice().sort((e,t)=>{for(let r=0;r<o.length;r++){let i=Br(e.criteria[r],t.criteria[r],n[r]);if(i!==0)return i}return 0}).map(e=>e.original)}function Kr(e,...t){let n=t.length;return n>1&&Rr(e,t[0],t[1])?t=[]:n>2&&Rr(t[0],t[1],t[2])&&(t=[t[0]]),Gr(e,Lr(t),[`asc`])}var qr=e=>e.legend.settings,Jr=e=>e.legend.size;B([e=>e.legend.payload,qr],(e,t)=>{var n=t.itemSorter,r=e.flat(1);return n?Kr(r,n):r});function Yr(e,t){return ei(e)||$r(e,t)||Zr(e,t)||Xr()}function Xr(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Zr(e,t){if(e){if(typeof e==`string`)return Qr(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Qr(e,t):void 0}}function Qr(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function $r(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function ei(e){if(Array.isArray(e))return e}var ti=1;function ni(e,t){return Math.abs(e.height-t.height)>ti||Math.abs(e.left-t.left)>ti||Math.abs(e.top-t.top)>ti||Math.abs(e.width-t.width)>ti}function ri(e){var t=e.getBoundingClientRect();return{height:t.height,left:t.left,top:t.top,width:t.width}}function ii(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=Yr(b({height:0,left:0,top:0,width:0}),2),n=t[0],r=t[1],i=y(null),a=y(n);a.current=n;var o=p(e=>{if(i.current!=null&&(i.current.disconnect(),i.current=null),e!=null){var t=ri(e);if(ni(t,a.current)&&r(t),typeof ResizeObserver<`u`){var n=new ResizeObserver(()=>{var t=ri(e);ni(t,a.current)&&r(t)});n.observe(e),i.current=n}}},[...e]);return h(()=>()=>{var e;(e=i.current)==null||e.disconnect()},[]),[n,o]}function ai(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 oi=typeof Symbol==`function`&&Symbol.observable||`@@observable`,si=()=>Math.random().toString(36).substring(7).split(``).join(`.`),ci={INIT:`@@redux/INIT${si()}`,REPLACE:`@@redux/REPLACE${si()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${si()}`};function li(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 ui(e,t,n){if(typeof e!=`function`)throw Error(ai(2));if(typeof t==`function`&&typeof n==`function`||typeof n==`function`&&typeof arguments[3]==`function`)throw Error(ai(0));if(typeof t==`function`&&n===void 0&&(n=t,t=void 0),n!==void 0){if(typeof n!=`function`)throw Error(ai(1));return n(ui)(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(ai(3));return i}function d(e){if(typeof e!=`function`)throw Error(ai(4));if(c)throw Error(ai(5));let t=!0;l();let n=s++;return o.set(n,e),function(){if(t){if(c)throw Error(ai(6));t=!1,l(),o.delete(n),a=null}}}function f(e){if(!li(e))throw Error(ai(7));if(e.type===void 0)throw Error(ai(8));if(typeof e.type!=`string`)throw Error(ai(17));if(c)throw Error(ai(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(ai(10));r=e,f({type:ci.REPLACE})}function m(){let e=d;return{subscribe(t){if(typeof t!=`object`||!t)throw Error(ai(11));function n(){let e=t;e.next&&e.next(u())}return n(),{unsubscribe:e(n)}},[oi](){return this}}}return f({type:ci.INIT}),{dispatch:f,subscribe:d,getState:u,replaceReducer:p,[oi]:m}}function di(e){Object.keys(e).forEach(t=>{let n=e[t];if(n(void 0,{type:ci.INIT})===void 0)throw Error(ai(12));if(n(void 0,{type:ci.PROBE_UNKNOWN_ACTION()})===void 0)throw Error(ai(13))})}function fi(e){let t=Object.keys(e),n={};for(let r=0;r<t.length;r++){let i=t[r];typeof e[i]==`function`&&(n[i]=e[i])}let r=Object.keys(n),i;try{di(n)}catch(e){i=e}return function(e={},t){if(i)throw i;let a=!1,o={};for(let i=0;i<r.length;i++){let s=r[i],c=n[s],l=e[s],u=c(l,t);if(u===void 0)throw t&&t.type,Error(ai(14));o[s]=u,a||=u!==l}return a||=r.length!==Object.keys(e).length,a?o:e}}function pi(...e){return e.length===0?e=>e:e.length===1?e[0]:e.reduce((e,t)=>(...n)=>e(t(...n)))}function mi(...e){return t=>(n,r)=>{let i=t(n,r),a=()=>{throw Error(ai(15))},o={getState:i.getState,dispatch:(e,...t)=>a(e,...t)};return a=pi(...e.map(e=>e(o)))(i.dispatch),{...i,dispatch:a}}}function hi(e){return li(e)&&`type`in e&&typeof e.type==`string`}var gi=Symbol.for(`immer-nothing`),_i=Symbol.for(`immer-draftable`),vi=Symbol.for(`immer-state`);function yi(e,...t){throw Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var bi=Object,xi=bi.getPrototypeOf,Si=`constructor`,Ci=`prototype`,wi=`configurable`,Ti=`enumerable`,Ei=`writable`,Di=`value`,Oi=e=>!!e&&!!e[vi];function ki(e){return e?Mi(e)||zi(e)||!!e[_i]||!!e[Si]?.[_i]||Bi(e)||Vi(e):!1}var Ai=bi[Ci][Si].toString(),ji=new WeakMap;function Mi(e){if(!e||!Hi(e))return!1;let t=xi(e);if(t===null||t===bi[Ci])return!0;let n=bi.hasOwnProperty.call(t,Si)&&t[Si];if(n===Object)return!0;if(!Ui(n))return!1;let r=ji.get(n);return r===void 0&&(r=Function.toString.call(n),ji.set(n,r)),r===Ai}function Ni(e,t,n=!0){Pi(e)===0?(n?Reflect.ownKeys(e):bi.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Pi(e){let t=e[vi];return t?t.type_:zi(e)?1:Bi(e)?2:Vi(e)?3:0}var Fi=(e,t,n=Pi(e))=>n===2?e.has(t):bi[Ci].hasOwnProperty.call(e,t),Ii=(e,t,n=Pi(e))=>n===2?e.get(t):e[t],Li=(e,t,n,r=Pi(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function Ri(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}var zi=Array.isArray,Bi=e=>e instanceof Map,Vi=e=>e instanceof Set,Hi=e=>typeof e==`object`,Ui=e=>typeof e==`function`,Wi=e=>typeof e==`boolean`;function Gi(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var Ki=e=>e.copy_||e.base_,qi=e=>e.modified_?e.copy_:e.base_;function Ji(e,t){if(Bi(e))return new Map(e);if(Vi(e))return new Set(e);if(zi(e))return Array[Ci].slice.call(e);let n=Mi(e);if(t===!0||t===`class_only`&&!n){let t=bi.getOwnPropertyDescriptors(e);delete t[vi];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){let i=n[r],a=t[i];a[Ei]===!1&&(a[Ei]=!0,a[wi]=!0),(a.get||a.set)&&(t[i]={[wi]:!0,[Ei]:!0,[Ti]:a[Ti],[Di]:e[i]})}return bi.create(xi(e),t)}{let t=xi(e);if(t!==null&&n)return{...e};let r=bi.create(t);return bi.assign(r,e)}}function Yi(e,t=!1){return Qi(e)||Oi(e)||!ki(e)?e:(Pi(e)>1&&bi.defineProperties(e,{set:Zi,add:Zi,clear:Zi,delete:Zi}),bi.freeze(e),t&&Ni(e,(e,t)=>{Yi(t,!0)},!1),e)}function Xi(){yi(2)}var Zi={[Di]:Xi};function Qi(e){return e===null||!Hi(e)||bi.isFrozen(e)}var $i=`MapSet`,ea=`Patches`,ta=`ArrayMethods`,na={};function ra(e){let t=na[e];return t||yi(0,e),t}var ia=e=>!!na[e],aa,oa=()=>aa,sa=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:ia($i)?ra($i):void 0,arrayMethodsPlugin_:ia(ta)?ra(ta):void 0});function ca(e,t){t&&(e.patchPlugin_=ra(ea),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function la(e){ua(e),e.drafts_.forEach(fa),e.drafts_=null}function ua(e){e===aa&&(aa=e.parent_)}var da=e=>aa=sa(aa,e);function fa(e){let t=e[vi];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function pa(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[vi].modified_&&(la(t),yi(4)),ki(e)&&(e=ma(t,e));let{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[vi].base_,e,t)}else e=ma(t,n);return ha(t,e,!0),la(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===gi?void 0:e}function ma(e,t){if(Qi(t))return t;let n=t[vi];if(!n)return Ca(t,e.handledSet_,e);if(!_a(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);xa(n,e)}return n.copy_}function ha(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Yi(t,n)}function ga(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var _a=(e,t)=>e.scope_===t,va=[];function ya(e,t,n,r){let i=Ki(e),a=e.type_;if(r!==void 0&&Ii(i,r,a)===t){Li(i,r,n,a);return}if(!e.draftLocations_){let t=e.draftLocations_=new Map;Ni(i,(e,n)=>{if(Oi(n)){let r=t.get(n)||[];r.push(e),t.set(n,r)}})}let o=e.draftLocations_.get(t)??va;for(let e of o)Li(i,e,n,a)}function ba(e,t,n){e.callbacks_.push(function(r){let i=t;if(!i||!_a(i,r))return;r.mapSetPlugin_?.fixSetContents(i);let a=qi(i);ya(e,i.draft_??i,a,n),xa(i,r)})}function xa(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)}ga(e)}}function Sa(e,t,n){let{scope_:r}=e;if(Oi(n)){let i=n[vi];_a(i,r)&&i.callbacks_.push(function(){Ma(e),ya(e,n,qi(i),t)})}else ki(n)&&e.callbacks_.push(function(){let i=Ki(e);e.type_===3?i.has(n)&&Ca(n,r.handledSet_,r):Ii(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Ca(Ii(e.copy_,t,e.type_),r.handledSet_,r)})}function Ca(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||Oi(e)||t.has(e)||!ki(e)||Qi(e)?e:(t.add(e),Ni(e,(r,i)=>{if(Oi(i)){let t=i[vi];_a(t,n)&&(Li(e,r,qi(t),e.type_),ga(t))}else ki(i)&&Ca(i,t,n)}),e)}function wa(e,t){let n=zi(e),r={type_:+!!n,scope_:t?t.scope_:oa(),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=Ta;n&&(i=[r],a=Ea);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}var Ta={get(e,t){if(t===vi)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=Ki(e);if(!Fi(i,t,e.type_))return ka(e,i,t);let a=i[t];if(e.finalized_||!ki(a)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&Gi(t))return a;if(a===Da(e.base_,t)||Oa(e,t,a)){Ma(e);let n=e.type_===1?+t:t,r=Pa(e.scope_,a,e,n);return e.copy_[n]=r}return a},has(e,t){return t in Ki(e)},ownKeys(e){return Reflect.ownKeys(Ki(e))},set(e,t,n){let r=Aa(Ki(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=Da(Ki(e),t),i=r?.[vi];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(Ri(n,r)&&(n!==void 0||Fi(e.base_,t,e.type_)))return!0;Ma(e),ja(e)}return e.copy_[t]===n&&(n!==void 0||Fi(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])?!0:(e.copy_[t]=n,e.assigned_.set(t,!0),Sa(e,t,n),!0)},deleteProperty(e,t){return Ma(e),Da(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),ja(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=Ki(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[Ei]:!0,[wi]:e.type_!==1||t!==`length`,[Ti]:r[Ti],[Di]:n[t]}},defineProperty(){yi(11)},getPrototypeOf(e){return xi(e.base_)},setPrototypeOf(){yi(12)}},Ea={};for(let e in Ta){let t=Ta[e];Ea[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}Ea.deleteProperty=function(e,t){return Ea.set.call(this,e,t,void 0)},Ea.set=function(e,t,n){return Ta.set.call(this,e[0],t,n,e[0])};function Da(e,t){let n=e[vi];return(n?Ki(n):e)[t]}function Oa(e,t,n){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!ki(n)||n[vi]?!1:e.baseRefs_.has(n)}function ka(e,t,n){let r=Aa(t,n);return r?Di in r?r[Di]:r.get?.call(e.draft_):void 0}function Aa(e,t){if(!(t in e))return;let n=xi(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=xi(n)}}function ja(e){e.modified_||(e.modified_=!0,e.parent_&&ja(e.parent_))}function Ma(e){e.copy_||=(e.assigned_=new Map,Ji(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Na=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(Ui(e)&&!Ui(t)){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}Ui(t)||yi(6),n!==void 0&&!Ui(n)&&yi(7);let r;if(ki(e)){let i=da(this),a=Pa(i,e,void 0),o=!0;try{r=t(a),o=!1}finally{o?la(i):ua(i)}return ca(i,n),pa(r,i)}if(!e||!Hi(e)){if(r=t(e),r===void 0&&(r=e),r===gi&&(r=void 0),this.autoFreeze_&&Yi(r,!0),n){let t=[],i=[];ra(ea).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}yi(1,e)},this.produceWithPatches=(e,t)=>{if(Ui(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]},Wi(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),Wi(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),Wi(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){ki(e)||yi(8),Oi(e)&&(e=Fa(e));let t=da(this),n=Pa(t,e,void 0);return n[vi].isManual_=!0,ua(t),n}finishDraft(e,t){let n=e&&e[vi];(!n||!n.isManual_)&&yi(9);let{scope_:r}=n;return ca(r,t),pa(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=ra(ea).applyPatches_;return Oi(e)?r(e,t):this.produce(e,e=>r(e,t))}};function Pa(e,t,n,r){let[i,a]=Bi(t)?ra($i).proxyMap_(t,n):Vi(t)?ra($i).proxySet_(t,n):wa(t,n);return(n?.scope_??oa()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&r!==void 0?ba(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 Fa(e){return Oi(e)||yi(10,e),Ia(e)}function Ia(e){if(!ki(e)||Qi(e))return e;let t=e[vi],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Ji(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=Ji(e,!0);return Ni(n,(e,t)=>{Li(n,e,Ia(t))},r),t&&(t.finalized_=!1),n}var La=new Na().produce,V=e=>e;function Ra(e){return({dispatch:t,getState:n})=>r=>i=>typeof i==`function`?i(t,n,e):r(i)}var za=Ra(),Ba=Ra,Va=typeof window<`u`&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]==`object`?pi:pi.apply(null,arguments)};typeof window<`u`&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;function Ha(e,t){function n(...n){if(t){let r=t(...n);if(!r)throw Error(Zo(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=>hi(t)&&t.type===e,n}var Ua=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 Wa(e){return ki(e)?La(e,()=>{}):e}function Ga(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function Ka(e){return typeof e==`boolean`}var qa=()=>function(e){let{thunk:t=!0,immutableCheck:n=!0,serializableCheck:r=!0,actionCreatorCheck:i=!0}=e??{},a=new Ua;return t&&(Ka(t)?a.push(za):a.push(Ba(t.extraArgument))),a},Ja=`RTK_autoBatch`,H=()=>e=>({payload:e,meta:{[Ja]:!0}}),Ya=e=>t=>{setTimeout(t,e)},Xa=(e,t)=>n=>{let r=!1,i=()=>{r||(r=!0,cancelAnimationFrame(a),clearTimeout(o),n())},a=e(i),o=setTimeout(i,t)},Za=(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?Xa(window.requestAnimationFrame,100):Ya(10):e.type===`callback`?e.queueNotification:Ya(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?.[Ja],a=!i,a&&(o||(o=!0,c(l))),r.dispatch(e)}finally{i=!0}}})},Qa=e=>function(t){let{autoBatch:n=!0}=t??{},r=new Ua(e);return n&&r.push(Za(typeof n==`object`?n:void 0)),r};function $a(e){let t=qa(),{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(li(n))c=fi(n);else throw Error(Zo(1));let l;l=typeof r==`function`?r(t):t();let u=pi;i&&(u=Va({trace:!1,...typeof i==`object`&&i}));let d=Qa(mi(...l)),f=typeof s==`function`?s(d):d(),p=u(...f);return ui(c,o,p)}function eo(e){let t={},n=[],r,i={addCase(e,n){let r=typeof e==`string`?e:e.type;if(!r)throw Error(Zo(28));if(r in t)throw Error(Zo(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 to(e){return typeof e==`function`}function no(e,t){let[n,r,i]=eo(t),a;if(to(e))a=()=>Wa(e());else{let t=Wa(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(Oi(e)){let r=n(e,t);return r===void 0?e:r}else if(ki(e))return La(e,e=>n(e,t));else{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 ro=`ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW`,io=(e=21)=>{let t=``,n=e;for(;n--;)t+=ro[Math.random()*64|0];return t},ao=Symbol.for(`rtk-slice-createasyncthunk`);function oo(e,t){return`${e}/${t}`}function so({creators:e}={}){let t=e?.asyncThunk?.[ao];return function(e){let{name:n,reducerPath:r=n}=e;if(!n)throw Error(Zo(11));let i=(typeof e.reducers==`function`?e.reducers(uo()):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(Zo(12));if(n in o.sliceCaseReducersByType)throw Error(Zo(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:oo(n,r),createNotation:typeof e.reducers==`function`};po(a)?ho(o,a,s,t):fo(o,a,s)});function c(){let[t={},n=[],r=void 0]=typeof e.extraReducers==`function`?eo(e.extraReducers):[e.extraReducers],i={...t,...o.sliceCaseReducersByType};return no(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=Ga(d,r,m)),i}function i(t=l){return Ga(Ga(u,n,()=>new WeakMap),t,()=>{let r={};for(let[i,a]of Object.entries(e.selectors??{}))r[i]=co(a,t,()=>Ga(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 co(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 lo=so();function uo(){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 fo({type:e,reducerName:t,createNotation:n},r,i){let a,o;if(`reducer`in r){if(n&&!mo(r))throw Error(Zo(17));a=r.reducer,o=r.prepare}else a=r;i.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,o?Ha(e,o):Ha(e))}function po(e){return e._reducerDefinitionType===`asyncThunk`}function mo(e){return e._reducerDefinitionType===`reducerWithPrepare`}function ho({type:e,reducerName:t},n,r,i){if(!i)throw Error(Zo(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||go,pending:s||go,rejected:c||go,settled:l||go})}function go(){}var _o=`task`,vo=`listener`,yo=`completed`,bo=`cancelled`,xo=`task-${bo}`,So=`task-${yo}`,Co=`${vo}-${bo}`,wo=`${vo}-${yo}`,To=class{constructor(e){this.code=e,this.message=`${_o} ${bo} (reason: ${e})`}code;name=`TaskAbortError`;message},Eo=(e,t)=>{if(typeof e!=`function`)throw TypeError(Zo(32))},Do=()=>{},Oo=(e,t=Do)=>(e.catch(t),e),ko=(e,t)=>(e.addEventListener(`abort`,t,{once:!0}),()=>e.removeEventListener(`abort`,t)),Ao=e=>{if(e.aborted)throw new To(e.reason)};function jo(e,t){let n=Do;return new Promise((r,i)=>{let a=()=>i(new To(e.reason));if(e.aborted){a();return}n=ko(e,a),t.finally(()=>n()).then(r,i)}).finally(()=>{n=Do})}var Mo=async(e,t)=>{try{return await Promise.resolve(),{status:`ok`,value:await e()}}catch(e){return{status:e instanceof To?`cancelled`:`rejected`,error:e}}finally{t?.()}},No=e=>t=>Oo(jo(e,t).then(t=>(Ao(e),t))),Po=e=>{let t=No(e);return e=>t(new Promise(t=>setTimeout(t,e)))},{assign:Fo}=Object,Io={},Lo=`listenerMiddleware`,Ro=(e,t)=>{let n=t=>ko(e,()=>t.abort(e.reason));return(r,i)=>{Eo(r,`taskExecutor`);let a=new AbortController;n(a);let o=Mo(async()=>{Ao(e),Ao(a.signal);let t=await r({pause:No(a.signal),delay:Po(a.signal),signal:a.signal});return Ao(a.signal),t},()=>a.abort(So));return i?.autoJoin&&t.push(o.catch(Do)),{result:No(e)(o),cancel(){a.abort(xo)}}}},zo=(e,t)=>{let n=async(n,r)=>{Ao(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 jo(t,Promise.race(a));return Ao(t),e}finally{i()}};return((e,t)=>Oo(n(e,t)))},Bo=e=>{let{type:t,actionCreator:n,matcher:r,predicate:i,effect:a}=e;if(t)i=Ha(t).match;else if(n)t=n.type,i=n.match;else if(r)i=r;else if(!i)throw Error(Zo(21));return Eo(a,`options.listener`),{predicate:i,type:t,effect:a}},Vo=Fo(e=>{let{type:t,predicate:n,effect:r}=Bo(e);return{id:io(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw Error(Zo(22))}}},{withTypes:()=>Vo}),Ho=(e,t)=>{let{type:n,effect:r,predicate:i}=Bo(t);return Array.from(e.values()).find(e=>(typeof n==`string`?e.type===n:e.predicate===i)&&e.effect===r)},Uo=e=>{e.pending.forEach(e=>{e.abort(Co)})},Wo=(e,t)=>()=>{for(let e of t.keys())Uo(e);e.clear()},Go=(e,t,n)=>{try{e(t,n)}catch(e){setTimeout(()=>{throw e},0)}},Ko=Fo(Ha(`${Lo}/add`),{withTypes:()=>Ko}),qo=Ha(`${Lo}/removeAll`),Jo=Fo(Ha(`${Lo}/remove`),{withTypes:()=>Jo}),Yo=(...e)=>{console.error(`${Lo}/error`,...e)},Xo=(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=Yo}=e;Eo(o,`onError`);let s=e=>(e.unsubscribe=()=>t.delete(e.id),t.set(e.id,e),t=>{e.unsubscribe(),t?.cancelActive&&Uo(e)}),c=(e=>{let n=Ho(t,e)??Vo(e);return s(n)});Fo(c,{withTypes:()=>c});let l=e=>{let n=Ho(t,e);return n&&(n.unsubscribe(),e.cancelActive&&Uo(n)),!!n};Fo(l,{withTypes:()=>l});let u=async(e,n,s,l)=>{let u=new AbortController,d=zo(c,u.signal),f=[];try{e.pending.add(u),r(e),await Promise.resolve(e.effect(n,Fo({},s,{getOriginalState:l,condition:(e,t)=>d(e,t).then(Boolean),take:d,delay:Po(u.signal),pause:No(u.signal),extra:a,signal:u.signal,fork:Ro(u.signal,f),unsubscribe:e.unsubscribe,subscribe:()=>{t.set(e.id,e)},cancelActiveListeners:()=>{e.pending.forEach((e,t,n)=>{e!==u&&(e.abort(Co),n.delete(e))})},cancel:()=>{u.abort(Co),e.pending.delete(u)},throwIfCancelled:()=>{Ao(u.signal)}})))}catch(e){e instanceof To||Go(o,e,{raisedBy:`effect`})}finally{await Promise.all(f),u.abort(wo),i(e),e.pending.delete(u)}},d=Wo(t,n);return{middleware:e=>n=>r=>{if(!hi(r))return n(r);if(Ko.match(r))return c(r.payload);if(qo.match(r)){d();return}if(Jo.match(r))return l(r.payload);let i=e.getState(),a=()=>{if(i===Io)throw Error(Zo(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,Go(o,e,{raisedBy:`predicate`})}s&&u(t,r,e,a)}}}finally{i=Io}return s},startListening:c,stopListening:l,clearListeners:d}};function Zo(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 Qo=lo({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}}}),$o=Qo.actions,es=$o.setMargin,ts=$o.setLayout,ns=$o.setChartSize,rs=$o.setScale,is=Qo.reducer;function as(e,t,n){return Array.isArray(e)&&e&&t+n!==0?e.slice(t,n+1):e}function U(e){return Number.isFinite(e)}function os(e){return typeof e==`number`&&e>0&&Number.isFinite(e)}function ss(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 cs(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?ss(Object(n),!0).forEach(function(t){ls(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ss(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ls(e,t,n){return(t=us(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function us(e){var t=ds(e,`string`);return typeof t==`symbol`?t:t+``}function ds(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function W(e,t,n){return I(e)||I(t)?n:Ne(t)?Te(e,t,n):typeof t==`function`?t(e):n}var fs=(e,t,n)=>{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(Ze(c)){if(c===`top`&&F(e.top))return cs(cs({},e),{},{top:e.top+(i||0)+u});if(c===`bottom`&&F(e.bottom))return cs(cs({},e),{},{bottom:e.bottom+(i||0)+u});if(c===`left`&&F(e.left))return cs(cs({},e),{},{left:e.left+(r||0)+u});if(c===`right`&&F(e.right))return cs(cs({},e),{},{right:e.right+(r||0)+u})}return e}if((s===`vertical`||s===`horizontal`&&o===`middle`)&&a!==`center`&&F(e[a]))return cs(cs({},e),{},{[a]:e[a]+(r||0)});if((s===`horizontal`||s===`vertical`&&a===`center`)&&o!==`middle`&&F(e[o]))return cs(cs({},e),{},{[o]:e[o]+(i||0)})}return e},ps=(e,t)=>e===`horizontal`&&t===`xAxis`||e===`vertical`&&t===`yAxis`||e===`centric`&&t===`angleAxis`||e===`radial`&&t===`radiusAxis`,ms=(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},hs=(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?Ae(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 U(i)?{coordinate:i+h,value:e,offset:h,index:t}:null}).filter(Ve):c&&l?l.map((e,t)=>{var n=o.map(e);return U(n)?{coordinate:n+h,value:e,index:t,offset:h}:null}).filter(Ve):o.ticks&&!n&&u!=null?o.ticks(u).map((e,t)=>{var n=o.map(e);return U(n)?{coordinate:n+h,value:e,index:t,offset:h}:null}).filter(Ve):o.domain().map((e,t)=>{var n=o.map(e);return U(n)?{coordinate:n+h,value:r?r[e]:e,index:t,offset:h}:null}).filter(Ve)},gs={sign:e=>{var t=e.length;if(!(t<=0)){var n=e[0]?.length;if(!(n==null||n<=0))for(var r=0;r<n;++r)for(var i=0,a=0,o=0;o<t;++o){var s=e[o]?.[r];if(s!=null){var c=s[1],l=s[0],u=je(c)?l:c;u>=0?(s[0]=i,i+=u,s[1]=i):(s[0]=a,a+=u,s[1]=a)}}}},expand:Jt,none:Ut,silhouette:Yt,wiggle:Xt,positive:e=>{var t=e.length;if(!(t<=0)){var n=e[0]?.length;if(!(n==null||n<=0))for(var r=0;r<n;++r)for(var i=0,a=0;a<t;++a){var o=e[a]?.[r];if(o!=null){var s=je(o[1])?o[0]:o[1];s>=0?(o[0]=i,i+=s,o[1]=i):(o[0]=0,o[1]=0)}}}}},_s=(e,t,n)=>{var r=gs[n]??Ut,i=qt().keys(t).value((e,t)=>Number(W(e,t,0))).order(Wt).offset(r)(e);return i.forEach((n,r)=>{n.forEach((n,i)=>{var a=W(e[i],t[r],0);Array.isArray(a)&&a.length===2&&F(a[0])&&F(a[1])&&(n[0]=a[0],n[1]=a[1])})}),i};function vs(e){return e==null?void 0:String(e)}function ys(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&&!I(i[t.dataKey])){var s=ze(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=W(i,I(o)?t.dataKey:o),l=t.scale.map(c);return F(l)?l:null}var bs=e=>{var t=e.flat(2).filter(F);return[Math.min(...t),Math.max(...t)]},xs=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],Ss=(e,t,n)=>{if(e!=null&&Object.keys(e).length!==0)return xs(Object.keys(e).reduce((r,i)=>{var a=e[i];if(!a)return r;var o=a.stackedData.reduce((e,r)=>{var i=bs(as(r,t,n));return!U(i[0])||!U(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]))},Cs=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,ws=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Ts=(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=Kr(t,e=>e.coordinate),a=[],o=0,s=1,c=i.length;s<c;s++){var l=(i[s]?.coordinate||0)-(i[s-1]?.coordinate||0);a.push(l),o=Math.max(l,o)}var u=o*1e-4,d=1/0;for(var f of a)f>u&&(d=Math.min(f,d));return d===1/0?0:d}return n?void 0:0};function Es(e){var t=e.tooltipEntrySettings,n=e.dataKey,r=e.payload,i=e.value,a=e.name;return cs(cs({},t),{},{dataKey:n,payload:r,value:i,name:a})}function Ds(e,t){if(e!=null)return String(e);if(typeof t==`string`)return t}var Os=(e,t)=>{if(t===`horizontal`)return e.relativeX;if(t===`vertical`)return e.relativeY},ks=(e,t)=>t===`centric`?e.angle:e.radius,As=e=>e.layout.width,js=e=>e.layout.height,Ms=e=>e.layout.scale,Ns=e=>e.layout.margin,Ps=B(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),Fs=B(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),Is=`data-recharts-item-index`;function Ls(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 Rs(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Ls(Object(n),!0).forEach(function(t){zs(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ls(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function zs(e,t,n){return(t=Bs(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bs(e){var t=Vs(e,`string`);return typeof t==`symbol`?t:t+``}function Vs(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var Hs=e=>e.brush.height;function Us(e){return Fs(e).reduce((e,t)=>t.orientation===`left`&&!t.mirror&&!t.hide?e+(typeof t.width==`number`?t.width:60):e,0)}function Ws(e){return Fs(e).reduce((e,t)=>t.orientation===`right`&&!t.mirror&&!t.hide?e+(typeof t.width==`number`?t.width:60):e,0)}function Gs(e){return Ps(e).reduce((e,t)=>t.orientation===`top`&&!t.mirror&&!t.hide?e+(typeof t.height==`number`?t.height:30):e,0)}function Ks(e){return Ps(e).reduce((e,t)=>t.orientation===`bottom`&&!t.mirror&&!t.hide?e+(typeof t.height==`number`?t.height:30):e,0)}var qs=B([As,js,Ns,Hs,Us,Ws,Gs,Ks,qr,Jr],(e,t,n,r,i,a,o,s,c,l)=>{var u={left:(n.left||0)+i,right:(n.right||0)+a},d=Rs(Rs({},{top:(n.top||0)+o,bottom:(n.bottom||0)+s}),u),f=d.bottom;d.bottom+=r,d=fs(d,c,l);var p=e-d.left-d.right,m=t-d.top-d.bottom;return Rs(Rs({brushBottom:f},d),{},{width:Math.max(p,0),height:Math.max(m,0)})}),Js=B(qs,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),Ys=B(As,js,(e,t)=>({x:0,y:0,width:e,height:t})),Xs=c(null),Zs=()=>m(Xs)!=null,Qs=e=>e.brush,$s=B([Qs,qs,Ns],(e,t,n)=>({height:e.height,x:F(e.x)?e.x:t.left,y:F(e.y)?e.y:t.top+t.height+t.brushBottom-(n?.bottom||0),width:F(e.width)?e.width:t.width}));function ec(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 tc(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=ec(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)?(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 nc(e,t=0,n={}){let{leading:r=!0,trailing:i=!0}=n;return tc(e,t,{leading:r,maxWait:t,trailing:i})}var rc=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++]))}},ic={width:`100%`,height:`100%`,debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},ac=(e,t,n)=>{var r=n.width,i=r===void 0?ic.width:r,a=n.height,o=a===void 0?ic.height:a,s=n.aspect,c=n.maxHeight,l=Me(i)?e:Number(i),u=Me(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}},oc={width:0,height:0,overflow:`visible`},sc={width:0,overflowX:`visible`},cc={height:0,overflowY:`visible`},lc={},uc=e=>{var t=e.width,n=e.height,r=Me(t),i=Me(n);return r&&i?oc:r?sc:i?cc:lc};function dc(e){var t=e.width,n=e.height,r=e.aspect,i=t,a=n;return i===void 0&&a===void 0?(i=ic.width,a=ic.height):i===void 0?i=r&&r>0?void 0:ic.width:a===void 0&&(a=r&&r>0?void 0:ic.height),{width:i,height:a}}var fc=[`aspect`,`initialDimension`,`width`,`height`,`minWidth`,`minHeight`,`maxHeight`,`children`,`debounce`,`id`,`className`,`onResize`,`style`];function pc(){return pc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pc.apply(null,arguments)}function mc(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 hc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?mc(Object(n),!0).forEach(function(t){gc(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mc(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function gc(e,t,n){return(t=_c(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _c(e){var t=vc(e,`string`);return typeof t==`symbol`?t:t+``}function vc(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function yc(e,t){return wc(e)||Cc(e,t)||xc(e,t)||bc()}function bc(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
3
3
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xc(e,t){if(e){if(typeof e==`string`)return Sc(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Sc(e,t):void 0}}function Sc(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Cc(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function wc(e){if(Array.isArray(e))return e}function Tc(e,t){if(e==null)return{};var n,r,i=Ec(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Ec(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Dc=c(ic.initialDimension);function Oc(e){return os(e.width)&&os(e.height)}function kc(e){var t=e.children,n=e.width,r=e.height,i=v(()=>({width:n,height:r}),[n,r]);return Oc(i)?a.createElement(Dc.Provider,{value:i},t):null}var Ac=()=>m(Dc),jc=u((e,t)=>{var n=e.aspect,r=e.initialDimension,i=r===void 0?ic.initialDimension:r,o=e.width,s=e.height,c=e.minWidth,l=c===void 0?ic.minWidth:c,u=e.minHeight,d=e.maxHeight,f=e.children,m=e.debounce,_=m===void 0?ic.debounce:m,v=e.id,x=e.className,S=e.onResize,C=e.style,w=C===void 0?{}:C,T=Tc(e,fc),E=y(null),D=y();D.current=S,g(t,()=>E.current);var O=yc(b({containerWidth:i.width,containerHeight:i.height}),2),k=O[0],A=O[1],j=p((e,t)=>{A(n=>{var r=Math.round(e),i=Math.round(t);return n.containerWidth===r&&n.containerHeight===i?n:{containerWidth:r,containerHeight:i}})},[]);h(()=>{if(E.current==null||typeof ResizeObserver>`u`)return He;var e=e=>{var t,n=e[0];if(n!=null){var r=n.contentRect,i=r.width,a=r.height;j(i,a),(t=D.current)==null||t.call(D,i,a)}};_>0&&(e=nc(e,_,{trailing:!0,leading:!1}));var t=new ResizeObserver(e),n=E.current.getBoundingClientRect(),r=n.width,i=n.height;return j(r,i),t.observe(E.current),()=>{t.disconnect()}},[j,_]);var M=k.containerWidth,N=k.containerHeight;rc(!n||n>0,`The aspect(%s) must be greater than zero.`,n);var ee=ac(M,N,{width:o,height:s,aspect:n,maxHeight:d}),te=ee.calculatedWidth,ne=ee.calculatedHeight;return rc(M<0||N<0||te!=null&&te>0||ne!=null&&ne>0,`The width(%s) and height(%s) of chart should be greater than 0,
4
4
  please check the style of container, or the props width(%s) and height(%s),
@@ -1 +1 @@
1
- import{g as e}from"./Rack-ziQuyb2l.js";var t=e(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]);export{t};
1
+ import{g as e}from"./Rack-Bbk1hAor.js";var t=e(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]);export{t};
package/public/index.html CHANGED
@@ -9,7 +9,7 @@
9
9
  <link rel="icon" href="/favicon.svg" type="image/svg+xml" />
10
10
  <title>OmniGateway — One endpoint in front of the AI accounts you already pay for.</title>
11
11
  <script type="importmap">{"imports":{"react":"/shared/react.js","react/jsx-runtime":"/shared/jsx-runtime.js","react-dom":"/shared/react-dom.js","react-dom/client":"/shared/react-dom-client.js","styled-components":"/shared/styled-components.js","@tanstack/react-query":"/shared/react-query.js","@omnigateway/dashboard-sdk":"/shared/dashboard-sdk.js"}}</script>
12
- <script type="module" crossorigin src="/assets/index-C3Fp8XmZ.js"></script>
12
+ <script type="module" crossorigin src="/assets/index-CJZIRJ43.js"></script>
13
13
  <link rel="modulepreload" crossorigin href="/assets/queries-CX9mStps.js">
14
14
  <link rel="modulepreload" crossorigin href="/assets/matchContext-BOenO3J2.js">
15
15
  <link rel="modulepreload" crossorigin href="/assets/Match-BWa6L0L1.js">
@@ -1,54 +0,0 @@
1
- import{$ as e,lt as t,q as n}from"./queries-CX9mStps.js";import{jsx as r,jsxs as i}from"react/jsx-runtime";import a,{css as o,keyframes as s}from"styled-components";var c=new Intl.NumberFormat(`en-US`,{notation:`compact`,maximumFractionDigits:1}),l=new Intl.NumberFormat(`en-US`);function u(e){return Number.isFinite(e)?e<1e4?l.format(Math.round(e)):c.format(e).toLowerCase():`—`}function ee(e){return Number.isFinite(e)?e===0?`$0`:e<.01?`$${e.toFixed(4)}`:e<100?`$${e.toFixed(2)}`:`$${c.format(e).toLowerCase()}`:`—`}function d(e){return e==null||!Number.isFinite(e)?`—`:e<1e3?`${Math.round(e)}ms`:e<6e4?`${(e/1e3).toFixed(1)}s`:`${Math.round(e/6e4)}m`}function f(e,t=1){return Number.isFinite(e)?`${(e*100).toFixed(t)}%`:`—`}var p=[[6e4,1e3,`s`],[36e5,6e4,`m`],[864e5,36e5,`h`],[1/0,864e5,`d`]];function m(e){let t=Math.abs(e);if(t<1e3)return`0s`;let n=p.find(([e])=>t<e);return n===void 0?`—`:`${Math.floor(t/n[1])}${n[2]}`}function te(e,t=Date.now()){if(e==null||!Number.isFinite(e))return`—`;let n=e-t;return Math.abs(n)<5e3?`just now`:n<0?`${m(n)} ago`:`in ${m(n)}`}function h(e){return new Date(e).toLocaleTimeString(`en-GB`,{hour12:!1})}function ne(e){return e==null||!Number.isFinite(e)?`—`:new Date(e).toLocaleString(`en-GB`,{year:`numeric`,month:`short`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,hour12:!1})}var g=[`B`,`KiB`,`MiB`,`GiB`,`TiB`];function _(e){if(e==null||!Number.isFinite(e))return`—`;if(Math.abs(e)<1024)return`${Math.round(e)} B`;let t=e,n=0;for(;Math.abs(t)>=1024&&n<g.length-1;)t/=1024,n+=1;return`${t.toFixed(1)} ${g[n]}`}function v(e,t=8){return e.length<=t?e:`${e.slice(0,t)}…`}var y={fiveHour:18e6,daily:864e5,weekly:6048e5};function b(e,t){return t!==null&&t>0?t:y[e]}var re=6e4;function x(e,t){return e===null||t===null?e===t:Math.abs(e-t)<=re}function S(e,t){return t===void 0?`unknown`:e.observedAt>0&&t.stale?`stale`:t.ratePerHour===null||e.limit===null?`unknown`:t.survives===!1&&t.exhaustsAt!==null?`empty`:t.survives===!0?`ok`:`unknown`}function C(e,t){if(e.length===0)return null;let n=[...e].sort((e,t)=>e-t);return n[Math.min(n.length-1,Math.max(0,Math.ceil(t*n.length)-1))]??null}function w(e){return e.state===`pending`}function T(e){return e.filter(e=>!w(e))}function E(e){return w(e)?!1:e.status>=400||e.errorCode!==null}var D={ok:`●`,warn:`◐`,down:`○`,idle:`·`,live:`●`};function O(e){return w(e)?`live`:E(e)?`down`:`ok`}function k(e){return w(e)?`in flight`:E(e)?`failed with ${e.status}`:`succeeded`}function A(e,t){let n=T(e),r=[],i=0,a=0,o=0,s=0,c=0,l=0;for(let e of n)E(e)&&(i+=1),e.ttftMs!==null&&Number.isFinite(e.ttftMs)&&r.push(e.ttftMs),a+=e.costUsd,o+=e.inputTokens,s+=e.outputTokens,c+=e.cacheReadTokens,l+=e.cacheWriteTokens;let u=t/6e4;return{requests:n.length,errors:i,errorRate:n.length===0?0:i/n.length,ratePerMin:u<=0?0:n.length/u,ttftP50:C(r,.5),ttftP95:C(r,.95),costUsd:a,inputTokens:o,outputTokens:s,cacheReadTokens:c,cacheWriteTokens:l}}function j(e,t){let n=T(e),{now:r,spanMs:i,count:a}=t,o=i/a,s=r-i,c=Array.from({length:a},(e,t)=>({at:s+t*o,total:0,errors:0,costUsd:0,tokens:0,ttftMs:null})),l=Array.from({length:a},()=>[]);for(let e of n){if(e.at<s||e.at>r)continue;let t=Math.min(a-1,Math.floor((e.at-s)/o)),n=c[t];n!==void 0&&(n.total+=1,n.costUsd+=e.costUsd,n.tokens+=e.inputTokens+e.outputTokens+e.cacheReadTokens+e.cacheWriteTokens,E(e)&&(n.errors+=1),e.ttftMs!==null&&Number.isFinite(e.ttftMs)&&l[t]?.push(e.ttftMs))}for(let[e,t]of c.entries())t.ttftMs=C(l[e]??[],.5);return c}var M={tokenRejected:`reconnect needed — provider rejected the refresh token`,expiredNoRefresh:`reconnect needed — token expired with nothing to refresh from`};function N(e,t,n,r=null){if(!n){let e=r===`tokenRejected`||r===`expiredNoRefresh`;return{state:e?`down`:`idle`,note:e?M[r]:`disabled`,ttftMs:null,lastUsedAt:null,consecutiveFailures:0}}if(e.length===0)return{state:`idle`,note:`unused`,ttftMs:null,lastUsedAt:null,consecutiveFailures:0};let i=`ok`,a=``,o=null,s=null,c=0;for(let n of e){if(n.ewmaTtftMs!==null&&(o=o===null?n.ewmaTtftMs:Math.max(o,n.ewmaTtftMs)),n.lastUsedAt!==null&&(s=s===null?n.lastUsedAt:Math.max(s,n.lastUsedAt)),c=Math.max(c,n.consecutiveFailures),n.breakerState===`open`){i=`down`,a=`breaker open`;continue}if(n.rateLimitedUntil!==null&&n.rateLimitedUntil>t&&i!==`down`){i=`warn`,a=`rate limited`;continue}n.breakerState===`halfOpen`&&i===`ok`&&(i=`warn`,a=`probing`)}return{state:i,note:a,ttftMs:o,lastUsedAt:s,consecutiveFailures:c}}var P={fiveHour:`5h`,daily:`24h`,weekly:`7d`};function F(e){return Math.max(e,6e4)*3}function I(e,t,n){return e.observedAt<=0||t-e.observedAt>F(n)}function L(e,t){return e.find(e=>e.windowType===t)}function R(e,t,n,r,i){let a=P[e.windowType];if(e.observedAt<=0)return`${a} · never observed`;if(I(e,t,n))return`${a} · stale, read ${r(e.observedAt,t)}`;if(e.resetsAt===null)return a;let o=`resets ${r(e.resetsAt,t)}`;return i===void 0||i.stale||i.survives!==!1||i.exhaustsAt===null?`${a} · ${o}`:`${a} · ${i.exhaustsAt<=t?`empty now`:`empty ~${m(i.exhaustsAt-t)}`} · ${o}`}function z(e){let t=e.filter(e=>e.limit!==null&&e.limit>0).sort((e,t)=>e.observedAt-t.observedAt),n=[],r;for(let e of t){let t={at:e.observedAt,percent:Math.min(100,e.used/e.limit*100)},i={resetsAt:e.resetsAt,startsAt:e.resetsAt===null?null:e.resetsAt-b(e.windowType,e.windowMs)},a=n[n.length-1];a===void 0||r===void 0||!x(e.resetsAt,r.resetsAt)?n.push({key:`window-${n.length}`,points:[t],...i}):(a.points.push(t),a.resetsAt=i.resetsAt,a.startsAt=i.startsAt),r=e}return n}function B(e,t){let{limit:n,used:r,observedAt:i}=t;if(n===null||n<=0)return[...e];let a=e.findLastIndex(e=>x(e.resetsAt,t.resetsAt)),o=e[a];if(o===void 0)return[...e];let s=o.points[o.points.length-1];if(s===void 0||s.at>=i)return[...e];let c={at:i,percent:Math.min(100,r/n*100)};return e.map((e,t)=>t===a?{...e,points:[...e.points,c]}:e)}function ie(e){return e.startsAt===null||e.resetsAt===null?null:{from:{at:e.startsAt,percent:0},to:{at:e.resetsAt,percent:100}}}var V=36e5;function H(e,t){let{limit:n,resetsAt:r,observedAt:i,used:a}=e,o=t.ratePerHour;if(n===null||n<=0||r===null||o===null||o<=0)return null;let s=a/n*100,c=o/n*100;return{from:{at:i,percent:s},to:{at:r,percent:s+c*((r-i)/V)}}}var U={fiveHour:0,daily:1,weekly:2};function W(e){return e.filter(e=>e.limit!==null&&e.limit>0).map(e=>({window:e,fraction:Math.min(1,e.used/e.limit)})).sort((e,t)=>U[e.window.windowType]-U[t.window.windowType])}function G(e,t){let n=new Map;for(let r of e){let e=t(r),i=n.get(e);i===void 0?n.set(e,[r]):i.push(r)}return n}var K=s`
2
- 0%, 100% { opacity: 1; }
3
- 50% { opacity: 0.28; }
4
- `,q=o`
5
- color: ${({theme:e})=>e.color.ok};
6
- animation: ${K} 1.2s ease-in-out infinite;
7
-
8
- @media (prefers-reduced-motion: reduce) {
9
- animation: none;
10
- }
11
- `,J={ok:o`
12
- color: ${({theme:e})=>e.color.ok};
13
- `,warn:o`
14
- color: ${({theme:e})=>e.color.warn};
15
- `,down:o`
16
- color: ${({theme:e})=>e.color.down};
17
- `,idle:o`
18
- color: ${({theme:e})=>e.color.inkFaint};
19
- `,live:q},Y=a.span`
20
- font-family: ${({theme:e})=>e.font.mono};
21
- font-size: 12px;
22
- line-height: 1;
23
- flex: none;
24
- ${({$state:e})=>J[e]}
25
- `;function ae({state:e,label:t,className:n}){return r(Y,{$state:e,className:n,role:`img`,"aria-label":t,title:t,children:D[e]})}var X=a.div`
26
- display: flex;
27
- flex-direction: column;
28
- align-items: center;
29
- justify-content: center;
30
- gap: ${({theme:e})=>e.space(2)};
31
- padding: ${({theme:e})=>e.space(8)} ${({theme:e})=>e.space(4)};
32
- text-align: center;
33
- `,Z=a.p`
34
- max-width: 44ch;
35
- font-size: 13px;
36
- color: ${({theme:e})=>e.color.inkDim};
37
- `;function Q({legend:t,message:n,action:a}){return i(X,{children:[r(e,{children:t}),r(Z,{children:n}),a]})}var oe=a(Z)`
38
- color: ${({theme:e})=>e.color.down};
39
- `;function $(e){return e instanceof n||e instanceof Error?e.message:`The gateway did not answer.`}function se({legend:n=`Request failed`,error:a,onRetry:o}){return i(X,{children:[r(e,{children:n}),r(oe,{children:$(a)}),o===void 0?null:r(t,{type:`button`,$size:`sm`,onClick:o,children:`Try again`})]})}var ce=s`
40
- 0% { opacity: 0.35; }
41
- 50% { opacity: 0.7; }
42
- 100% { opacity: 0.35; }
43
- `,le=a.div`
44
- height: ${({$height:e})=>e??12}px;
45
- width: ${({$width:e})=>e??`100%`};
46
- border-radius: 2px;
47
- background: ${({theme:e})=>e.color.ruleStrong};
48
- animation: ${ce} 1.4s ease-in-out infinite;
49
- `,ue=a.div`
50
- display: flex;
51
- flex-direction: column;
52
- gap: ${({theme:e})=>e.space(2)};
53
- padding: ${({theme:e})=>e.space(1)} 0;
54
- `;function de({rows:e=4}){let t=Array.from({length:e},(e,t)=>`row-${t}:${t%3==0?`72%`:`100%`}`);return r(ue,{"aria-hidden":`true`,children:t.map(e=>r(le,{$width:e.split(`:`)[1]??`100%`},e))})}export{f as A,S as C,ne as D,u as E,ee as M,v as N,m as O,B as S,h as T,H as _,ae as a,W as b,ie as c,G as d,E as f,O as g,k as h,$ as i,te as j,d as k,L as l,I as m,se as n,P as o,w as p,de as r,j as s,Q as t,N as u,R as v,_ as w,A as x,z as y};
@@ -1,64 +0,0 @@
1
- import{A as e,C as t,E as n,J as r,T as i,Y as a,c as o,dt as s,t as c,w as l}from"./shared-DtfLcn24.js";import{$ as u,A as d,W as f,at as p,et as m,f as h,g,h as _,l as v,lt as y,nt as b,r as x,rt as S,u as C,ut as w,v as T,z as E}from"./queries-CX9mStps.js";import{a as D,g as O,o as k,s as ee,t as A}from"./Rack-ziQuyb2l.js";import{n as te,r as ne,t as re}from"./CopyValue-CHZz2PLE.js";import{t as j}from"./plus-Cdyfj4uP.js";import{t as M}from"./trash-2-B5fBDSkh.js";import{t as N}from"./Toggle-CNnMgEU1.js";import{C as P,E as F,O as I,S as L,T as ie,_ as ae,a as oe,b as se,c as ce,d as R,i as z,j as le,k as ue,l as de,m as fe,n as pe,o as me,r as he,t as ge,u as _e,v as ve,y as ye}from"./States-Shs8nZi1.js";import{t as be}from"./Chip-BltJSw8A.js";import{i as B,n as V,r as xe,t as H}from"./Field-B79Yxdit.js";import{t as Se}from"./Meter-stpt3vQu.js";import{t as U}from"./Panel-CoulMx6R.js";import{i as Ce,n as W,r as G,t as we}from"./Table-CVDZ69Zx.js";import{t as Te}from"./catalog-BBKm8Ih8.js";import*as Ee from"react";import{Fragment as De,forwardRef as Oe,useCallback as ke,useEffect as Ae,useState as K}from"react";import{Fragment as q,jsx as J,jsxs as Y}from"react/jsx-runtime";import X from"styled-components";var je=O(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),Me=Object.keys(Te);function Ne(e){return Te[e].authTypes}function Pe(e){return Ne(e).includes(`oauth`)?`oauth`:`apiKey`}var Fe={oauth:`Authorize in the browser`,apiKey:`Paste an API key`},Z={anthropic:`Anthropic`,openai:`OpenAI`,kimi:`Kimi`,kilo:`Kilo`,grok:`Grok`,custom:`OpenAI Compatible`},Ie={anthropic:`Authorize in the browser, then paste the code Anthropic shows you.`,openai:`Authorize in the browser. When it redirects to localhost, paste the whole URL.`,kimi:`Enter the code on Kimi's device page. This dialog finishes on its own.`,kilo:`Approve the code on Kilo's device page. This dialog finishes on its own.`,grok:`Authorize in the browser. When it redirects to 127.0.0.1, paste the whole URL.`,custom:`Enter endpoint metadata and API key.`},Le={openai:`http://localhost:1455/auth/callback?code=…`,grok:`http://127.0.0.1:56121/callback?code=…`},Re=X.ol`
2
- display: flex;
3
- flex-direction: column;
4
- gap: ${({theme:e})=>e.space(3)};
5
- `,ze=X.div`
6
- font-family: ${({theme:e})=>e.font.mono};
7
- font-size: 26px;
8
- letter-spacing: 0.22em;
9
- text-align: center;
10
- padding: ${({theme:e})=>e.space(3)};
11
- background: ${({theme:e})=>e.color.panelSunk};
12
- border: 1px solid ${({theme:e})=>e.color.ruleStrong};
13
- border-radius: ${({theme:e})=>e.radius.control};
14
- `,Be=X.p`
15
- font-size: 12px;
16
- color: ${({theme:e})=>e.color.down};
17
- `,Ve=X.p`
18
- font-size: 12px;
19
- color: ${({theme:e})=>e.color.inkDim};
20
- `;function He({open:e,credentials:t,onOpenChange:n,onConnected:r}){let[i,a]=K(`anthropic`),[o,s]=K(Pe(`anthropic`)),[c,l]=K(``),[d,f]=K(null),[m,g]=K(``),[_,S]=K(``),w=(t??[]).filter((e,t,n)=>e.provider===`custom`&&n.findIndex(t=>t.provider===`custom`&&t.providerData.endpointId===e.providerData.endpointId)===t),[T,E]=K(``),[D,O]=K(``),[k,A]=K(`chat_completions`),[te,ne]=K(``),[j,M]=K(null),N=C(),P=v(),F=h(),I=ke(()=>{f(null),g(``),S(``),E(``),O(``),A(`chat_completions`),ne(``),M(null),l(``),N.reset(),P.reset(),F.reset()},[N,P,F]),L=ke(e=>{e||I(),n(e)},[n,I]);return Ae(()=>{if(d===null||d.kind!==`device`)return;let e=!1,t=async()=>{try{let t=await x(d.flowId);if(e)return;if(t.status===`complete`){I(),n(!1),r();return}}catch(t){if(e)return;M(z(t)),f(null);return}e||(i=setTimeout(()=>void t(),d.pollIntervalMs))},i=setTimeout(()=>void t(),d.pollIntervalMs);return()=>{e=!0,clearTimeout(i)}},[d,r,n,I]),J(ee,{open:e,onOpenChange:L,title:`Connect an account`,description:`The gateway stores the resulting token encrypted. It is never shown again after this dialog.`,footer:d===null?Y(q,{children:[J(y,{type:`button`,onClick:()=>L(!1),children:`Cancel`}),J(y,{type:`button`,$variant:`primary`,disabled:N.isPending||F.isPending,onClick:()=>{if(M(null),o===`apiKey`){F.mutate({provider:i,apiKey:te,label:c.trim()||void 0,...i===`custom`?{endpointId:_,endpointLabel:T,origin:D,protocol:k}:{}},{onSuccess:()=>{I(),n(!1),r()},onError:e=>M(z(e))});return}N.mutate({provider:i,label:c.trim().length===0?Z[i]:c.trim()},{onSuccess:e=>f(e),onError:e=>M(z(e))})},children:o===`apiKey`?F.isPending?`Adding…`:`Add API key`:N.isPending?`Starting…`:`Start authorization`})]}):d.kind===`device`?J(y,{type:`button`,onClick:()=>L(!1),children:`Cancel`}):Y(q,{children:[J(y,{type:`button`,onClick:()=>L(!1),children:`Cancel`}),J(y,{type:`button`,$variant:`primary`,disabled:P.isPending||m.trim().length===0,onClick:()=>{d!==null&&(M(null),P.mutate({flowId:d.flowId,code:m.trim()},{onSuccess:()=>{I(),n(!1),r()},onError:e=>M(z(e))}))},children:P.isPending?`Finishing…`:`Finish connecting`})]}),children:Y(Re,{children:[d===null?Y(p,{$gap:3,children:[J(H,{label:`Provider`,children:e=>J(B,{...e,value:i,onChange:e=>{let t=e.target.value;a(t),s(Pe(t))},children:Me.map(e=>J(`option`,{value:e,children:Z[e]},e))})}),Ne(i).length>1?J(H,{label:`How to connect`,children:e=>J(B,{...e,value:o,onChange:e=>s(e.target.value),children:Ne(i).map(e=>J(`option`,{value:e,children:Fe[e]},e))})}):null,i===`custom`?Y(q,{children:[w.length===0?null:J(H,{label:`Existing endpoint`,children:e=>Y(B,{...e,value:_,onChange:e=>{let t=w.find(t=>t.providerData.endpointId===e.target.value);if(t===void 0){S(``),E(``),O(``),A(`chat_completions`);return}S(String(t.providerData.endpointId)),E(String(t.providerData.endpointLabel)),O(String(t.providerData.origin)),A(t.providerData.protocol===`responses`?`responses`:`chat_completions`)},children:[J(`option`,{value:``,children:`Create new endpoint`}),w.map(e=>J(`option`,{value:String(e.providerData.endpointId),children:String(e.providerData.endpointLabel)},String(e.providerData.endpointId)))]})}),J(H,{label:`Endpoint ID`,children:e=>J(V,{...e,value:_,onChange:e=>S(e.target.value)})}),J(H,{label:`Endpoint label`,children:e=>J(V,{...e,value:T,onChange:e=>E(e.target.value)})}),J(H,{label:`Server origin`,children:e=>J(V,{...e,value:D,placeholder:`https://server.example`,onChange:e=>O(e.target.value)})}),D.trim().toLowerCase().startsWith(`http://`)?J(Be,{children:`Plaintext transport sends prompts and API keys without TLS.`}):null,J(H,{label:`Protocol`,children:e=>Y(B,{...e,value:k,onChange:e=>A(e.target.value),children:[J(`option`,{value:`chat_completions`,children:`Chat Completions (/v1/chat/completions)`}),J(`option`,{value:`responses`,children:`Responses (/v1/responses)`})]})})]}):null,o===`apiKey`?J(H,{label:`API key`,children:e=>J(V,{...e,type:`password`,value:te,autoComplete:`off`,onChange:e=>ne(e.target.value)})}):null,J(H,{label:`Label`,hint:`How this account is named in the rack. Defaults to the provider.`,children:e=>J(V,{...e,value:c,placeholder:Z[i],onChange:e=>l(e.target.value)})})]}):Y(p,{$gap:3,children:[Y(p,{$gap:1,children:[J(u,{children:`Step 1 — authorize`}),J(b,{$gap:2,children:Y(y,{as:`a`,href:d.authorizeUrl,target:`_blank`,rel:`noreferrer noopener`,$variant:`primary`,$size:`sm`,children:[J(je,{}),`Open `,Z[i]]})}),J(re,{value:d.authorizeUrl,label:`Copy authorization link`})]}),d.userCode===null?null:Y(p,{$gap:1,children:[J(u,{children:`Step 2 — enter this code`}),J(ze,{children:d.userCode})]}),d.kind===`device`?Y(Ve,{children:[Ie[i],` Waiting for authorization…`]}):J(H,{label:`Authorization code`,hint:Ie[i],...j===null?{}:{problem:j},children:e=>J(V,{...e,value:m,autoFocus:!0,placeholder:Le[i]??`code#state`,onChange:e=>g(e.target.value)})})]}),j===null||d?.kind===`pkce`?null:J(Be,{children:j})]})})}var Ue=[`axis`],We=Oe((e,n)=>Ee.createElement(t,{chartName:`LineChart`,defaultTooltipEventType:`axis`,validateTooltipEventTypes:Ue,tooltipPayloadSearcher:a,categoricalChartProps:e,ref:n})),Ge=X(b)`
21
- gap: ${({theme:e})=>e.space(5)};
22
- flex-wrap: wrap;
23
- `,Q=X.div`
24
- display: flex;
25
- flex-direction: column;
26
- gap: 2px;
27
- `,$=X.span`
28
- font-size: 11.5px;
29
- color: ${({theme:e})=>e.color.inkDim};
30
- `,Ke={budget:`1 4`,projection:`6 4`},qe=`projected`;function Je(e){let t=new Map;for(let{key:n,points:r}of e)for(let e of r){let r=t.get(e.at)??{at:e.at};r[n]=e.percent,t.set(e.at,r)}return[...t.values()].sort((e,t)=>e.at-t.at)}function Ye(e,t,n){return[Math.min(e,...n.map(e=>e.pace.from.at)),Math.max(t,...n.map(e=>e.pace.to.at))]}function Xe(e,t){let n=t?.windowStartsAt??null;return n===null||e.resetsAt===null?null:n-(e.resetsAt-n)}function Ze({credentialId:e,windows:t,burn:n,pollIntervalMs:r,now:i}){let a=t.map(e=>{let t=de(n,e.windowType);return{window:e,estimate:t,since:Xe(e,t)}}),o=a.map(e=>e.since).filter(e=>e!==null),s=o.length===0?0:Math.min(...o),c=d({credentialId:e,since:s},o.length>0),l=c.data?.samples??[],u=c.data?.gatewayRates??[];return J(p,{$gap:4,children:a.map(e=>J($e,{window:e.window,estimate:e.estimate,since:e.since,samples:l.filter(t=>t.windowType===e.window.windowType&&t.observedAt>=(e.since??0)),gatewayRate:u.find(t=>t.windowType===e.window.windowType),pollIntervalMs:r,now:i},e.window.windowType))})}function Qe(e,t,n){let r=P(e,t);return r===`ok`?`lasts the window`:r!==`empty`||t.exhaustsAt===null?`unknown`:t.exhaustsAt<=n?`empty now`:`empty ~${I(t.exhaustsAt-n)} before it resets`}function $e({window:t,estimate:a,since:d,samples:f,gatewayRate:h,pollIntervalMs:g,now:_}){let v=me[t.windowType],y=t.limit===null?`${F(t.used)} used`:`${F(t.used)} of ${F(t.limit)} used`;if(a===void 0||a.stale||fe(t,_,g))return Y(p,{$gap:2,children:[Y(b,{$gap:2,$wrap:!0,children:[Y(u,{children:[v,` window`]}),J($,{children:y})]}),J($,{children:`reading is stale`})]});let x=L(ye(f),t),S=x.flatMap(e=>{let t=ce(e);return t===null?[]:[{key:`${e.key}-budget`,pace:t}]}),C=ae(t,a),w=Je([...x,...S.map(e=>({key:e.key,points:[e.pace.from,e.pace.to]})),...C===null?[]:[{key:qe,points:[C.from,C.to]}]]),T=new Set(x.map(e=>e.key)),E=Math.max(100,...C===null?[]:[C.from.percent,C.to.percent].map(e=>Math.ceil(e)));return Y(p,{$gap:2,children:[Y(b,{$gap:2,$wrap:!0,children:[Y(u,{children:[v,` window`]}),J($,{children:y})]}),Y(Ge,{children:[Y(Q,{children:[J(u,{children:`Window average`}),J(m,{children:a.ratePerHour===null?`unknown`:`${F(a.ratePerHour)}/h`})]}),Y(Q,{children:[J(u,{children:`Estimate`}),J(m,{children:Qe(t,a,_)})]}),Y(Q,{children:[J(u,{children:`Projected`}),J(m,{children:C===null?`unknown`:`${Math.round(C.to.percent)}% of limit by reset`})]}),Y(Q,{children:[J(u,{children:`This gateway accounts for`}),J(m,{children:h?.gatewayRatePerHour===void 0||h.gatewayRatePerHour===null?`unknown`:`${F(h.gatewayRatePerHour)} tokens/h`})]})]}),t.limit===null?J($,{children:`no ceiling reported`}):t.resetsAt===null||d===null?J($,{children:`no reset reported`}):x.length===0?J($,{children:`not yet observed`}):Y(q,{children:[J(u,{children:[`Used, this window and the one before`,...S.length===0?[]:[`budget dotted`],...C===null?[]:[`projection dashed`]].join(` · `)}),J(c,{$height:160,children:J(s,{width:`100%`,height:`100%`,children:Y(We,{data:w,margin:{top:4,right:8,bottom:4,left:4},children:[J(e,{stroke:`var(--rule)`,vertical:!1}),J(i,{dataKey:`at`,type:`number`,scale:`time`,domain:Ye(d,t.resetsAt,S),tickFormatter:e=>ie(e),tick:{fill:`var(--ink-faint)`,fontSize:10},stroke:`var(--rule-strong)`,minTickGap:40}),J(l,{domain:[0,E],allowDataOverflow:!0,tickFormatter:e=>`${Math.round(e)}%`,tick:{fill:`var(--ink-faint)`,fontSize:10},stroke:`var(--rule-strong)`,width:40}),J(r,{cursor:{stroke:`var(--rule-strong)`},content:({active:e,payload:t})=>{if(e!==!0||t===void 0||t.length===0)return null;let n=t.find(e=>T.has(String(e.dataKey)));if(n===void 0||typeof n.value!=`number`)return null;let r=n.payload.at;return Y(o,{children:[J(`div`,{children:ie(r)}),Y(`div`,{children:[n.value.toFixed(1),`% used`]})]})}}),x.map(e=>J(n,{type:`monotone`,dataKey:e.key,stroke:`var(--accent)`,strokeWidth:2,dot:e.points.length===1&&{r:2.5,fill:`var(--accent)`,stroke:`var(--accent)`},connectNulls:!0,isAnimationActive:!1},e.key)),S.map(e=>J(n,{type:`linear`,dataKey:e.key,stroke:`var(--ink-faint)`,strokeWidth:1.5,strokeDasharray:Ke.budget,dot:!1,connectNulls:!0,isAnimationActive:!1},e.key)),C===null?null:J(n,{type:`linear`,dataKey:qe,stroke:`var(--ink-dim)`,strokeWidth:1.5,strokeDasharray:Ke.projection,dot:!1,connectNulls:!0,isAnimationActive:!1})]})})})]})]})}var et=[`anthropic`,`openai`,`kimi`,`kilo`,`grok`,`custom`],tt={anthropic:`Anthropic`,openai:`OpenAI`,kimi:`Kimi`,kilo:`Kilo`,grok:`Grok`,custom:`OpenAI Compatible`},nt=X(U)`
31
- border-left: 3px solid ${({theme:e,$provider:t})=>e.provider[t]};
32
- `,rt=X(V)`
33
- width: 100%;
34
- min-width: 140px;
35
- height: 26px;
36
- font-family: ${({theme:e})=>e.font.sans};
37
- font-size: 12.5px;
38
- background: transparent;
39
- border-color: transparent;
40
-
41
- &:hover:not(:disabled),
42
- &:focus {
43
- background: ${({theme:e})=>e.color.panelSunk};
44
- border-color: ${({theme:e})=>e.color.ruleStrong};
45
- }
46
- `,it=X(xe)`
47
- width: 62px;
48
- height: 26px;
49
- `,at=X.span`
50
- display: block;
51
- padding-left: 9px;
52
- font-size: 11px;
53
- color: ${({theme:e})=>e.color.inkDim};
54
- `,ot=X.div`
55
- display: grid;
56
- grid-template-columns: 96px 1fr;
57
- align-items: center;
58
- min-width: 208px;
59
- gap: 6px;
60
- `,st=X.div`
61
- display: flex;
62
- flex-direction: column;
63
- gap: 4px;
64
- `;function ct(){let e=f();return{pending:e.isPending,commit:(t,n)=>{e.mutate({id:t,patch:n})}}}function lt(){let{cadence:e}=D(),t=g(),n=_(e(1e4)),r=E(),i=T(),{commit:a}=ct(),[o,s]=K(!1),[c,l]=K(null),[d,f]=K(new Set),m=e=>f(t=>{let n=new Set(t);return n.delete(e)||n.add(e),n}),h=Date.now(),v=t.data??[],x=R(n.data?.health??[],e=>e.credentialId),C=R(n.data?.quota??[],e=>e.credentialId),O=R(n.data?.burn??[],e=>e.credentialId),ee=r.data?.quotaPollIntervalMs??3e5,re=v.filter(e=>e.enabled).length,P=t.isLoading?`Reading connected accounts…`:v.length===0?`No provider credentials are connected, so every request fails at the router.`:`${re} of ${v.length} accounts are enabled and eligible for routing.`;return Y(q,{children:[J(A,{legend:`Accounts`,title:`Provider accounts`,summary:P,actions:Y(y,{type:`button`,$variant:`primary`,onClick:()=>s(!0),children:[J(j,{}),`Connect an account`]})}),t.isError?J(U,{legend:`Accounts`,children:J(pe,{error:t.error,onRetry:()=>void t.refetch()})}):t.isLoading?J(U,{legend:`Accounts`,children:J(he,{rows:5})}):v.length===0?J(U,{legend:`Accounts`,children:J(ge,{legend:`Nothing connected`,message:`Connect a provider account to give the router something to dispatch to. Tokens are encrypted at rest and never shown again.`,action:J(y,{type:`button`,$variant:`primary`,$size:`sm`,onClick:()=>s(!0),children:`Connect an account`})})}):J(p,{$gap:4,children:et.filter(e=>v.some(t=>t.provider===e)).map(e=>{let t=v.filter(t=>t.provider===e);return J(nt,{$provider:e,legend:tt[e],meta:`${t.length} account${t.length===1?``:`s`}`,flush:!0,children:J(S,{children:Y(we,{children:[J(`thead`,{children:Y(`tr`,{children:[J(G,{$width:`24%`,children:`Account`}),J(G,{$width:`20%`,children:`Sign-in`}),J(G,{$align:`right`,$width:`86px`,children:`Tier`}),J(G,{$align:`right`,$width:`94px`,children:`Weight`}),J(G,{$align:`center`,$width:`86px`,children:`Enabled`}),J(G,{$width:`240px`,children:`Quota`}),J(G,{$align:`right`,$width:`88px`,children:`TTFT`}),J(G,{$align:`right`,$width:`130px`,children:`Token expires`}),J(G,{$width:`76px`})]})}),J(`tbody`,{children:t.map(e=>{let t=_e(x.get(e.id)??[],h,e.enabled,e.disabledReason),n=C.get(e.id)??[],r=O.get(e.id)??[],i=se(n),o=d.has(e.id);return Y(De,{children:[Y(Ce,{children:[Y(W,{children:[Y(b,{$gap:2,children:[J(oe,{state:t.state,label:t.note===``?`healthy`:t.note}),J(rt,{defaultValue:e.label,"aria-label":`Label for ${e.label}`,onBlur:t=>{let n=t.target.value.trim();if(n.length===0||n===e.label){t.target.value=e.label;return}a(e.id,{label:n})}})]}),t.note===``?null:J(at,{children:t.note})]}),J(W,{children:Y(b,{$gap:1,children:[J(be,{children:e.authType===`oauth`?`oauth`:`api key`}),e.accountEmail===null?null:J(u,{children:e.accountEmail})]})}),J(W,{$align:`right`,children:J(it,{min:1,step:1,defaultValue:e.tier,"aria-label":`Tier for ${e.label}`,onBlur:t=>{let n=Number(t.target.value);if(!Number.isInteger(n)||n<1||n===e.tier){t.target.value=String(e.tier);return}a(e.id,{tier:n})}})}),J(W,{$align:`right`,children:J(it,{min:.1,step:.1,defaultValue:e.weight,"aria-label":`Weight for ${e.label}`,onBlur:t=>{let n=Number(t.target.value);if(!Number.isFinite(n)||n<=0||n===e.weight){t.target.value=String(e.weight);return}a(e.id,{weight:n})}})}),J(W,{$align:`center`,children:J(N,{checked:e.enabled,label:`Route to ${e.label}`,onCheckedChange:t=>a(e.id,{enabled:t})})}),J(W,{children:i.length===0?J(u,{children:`unknown`}):J(st,{children:i.map(({window:e,fraction:t})=>Y(ot,{children:[J(Se,{fraction:t,label:`${me[e.windowType]} window, ${Math.round(t*100)}% used`}),J(u,{children:ve(e,h,ee,le,de(r,e.windowType))})]},e.windowType))})}),J(W,{$align:`right`,$mono:!0,children:ue(t.ttftMs)}),J(W,{$align:`right`,$mono:!0,children:e.expiresAt===null?`never`:le(e.expiresAt,h)}),J(W,{$align:`right`,children:Y(b,{$gap:1,$justify:`flex-end`,children:[n.length===0?null:J(w,{type:`button`,$variant:`ghost`,$size:`sm`,"aria-expanded":o,"aria-label":`${o?`Hide`:`Show`} quota history for ${e.label}`,title:`${o?`Hide`:`Show`} quota history for ${e.label}`,onClick:()=>m(e.id),children:J(o?ne:te,{})}),J(w,{type:`button`,$variant:`ghost`,$size:`sm`,"aria-label":`Remove ${e.label}`,title:`Remove ${e.label}`,onClick:()=>l(e),children:J(M,{})})]})})]}),o?J(Ce,{children:J(W,{colSpan:9,children:J(Ze,{credentialId:e.id,windows:n,burn:r,pollIntervalMs:ee,now:h})})}):null]},e.id)})})]})})},e)})}),J(He,{open:o,credentials:t.data??[],onOpenChange:s,onConnected:()=>void t.refetch()}),J(k,{open:c!==null,onOpenChange:e=>{e||l(null)},title:`Remove account`,body:c===null?``:`Removing "${c.label}" deletes its stored token. Any model target pointing at ${tt[c.provider]} loses this account, and reconnecting means authorizing again.`,confirmLabel:`Remove account`,busy:i.isPending,onConfirm:()=>{c!==null&&i.mutate(c.id,{onSettled:()=>l(null)})}})]})}var ut=lt;export{ut as component};
@@ -1,62 +0,0 @@
1
- import{$ as e,D as t,G as n,O as r,Q as i,at as a,dt as o,et as s,g as c,h as l,it as u,lt as d,nt as f,ot as p,rt as m,z as h}from"./queries-CX9mStps.js";import{a as g,r as _,t as v}from"./Rack-ziQuyb2l.js";import{n as y,t as b}from"./TokenBreakdown-hkwYCWT3.js";import{A as x,E as S,M as C,T as w,a as T,b as E,d as D,g as ee,h as O,j as k,k as A,l as j,n as M,o as N,p as P,s as F,t as I,u as L,v as te,x as ne}from"./States-Shs8nZi1.js";import{n as re,t as R}from"./Chip-BltJSw8A.js";import{t as z}from"./Meter-stpt3vQu.js";import{t as B}from"./Panel-CoulMx6R.js";import{i as V,n as H,r as U,t as W}from"./Table-CVDZ69Zx.js";import{t as G}from"./Readout-D1XEfywe.js";import{Fragment as K,jsx as q,jsxs as J}from"react/jsx-runtime";import Y from"styled-components";var X=Y(p)`
2
- font-weight: 500;
3
- display: block;
4
- max-width: 24ch;
5
- `,Z=Y.span`
6
- font-size: 11px;
7
- color: ${({theme:e})=>e.color.inkDim};
8
- `,ie=Y.div`
9
- display: grid;
10
- grid-template-columns: 72px 1fr;
11
- align-items: center;
12
- gap: 6px;
13
- min-width: 172px;
14
- `,ae=Y.div`
15
- display: flex;
16
- flex-direction: column;
17
- gap: 4px;
18
- `;function oe(e){let t=null;for(let n of e)n.stale||n.survives!==!1||n.exhaustsAt===null||(t===null||n.exhaustsAt<t)&&(t=n.exhaustsAt);return t}function se(e,t){return e===null?t===null?0:1:t===null?-1:e-t}function ce({credentials:t,health:n,quota:r,burn:i,usage:a,quotaPollIntervalMs:s,now:c}){let l=D(n,e=>e.credentialId),u=D(r,e=>e.credentialId),p=D(i,e=>e.credentialId),h=new Map(a.map(e=>[e.key,e])),g={down:0,warn:1,ok:2,idle:3,live:3},_=t.map(e=>{let t=p.get(e.id)??[];return{credential:e,status:L(l.get(e.id)??[],c,e.enabled,e.disabledReason),quota:E(u.get(e.id)??[]),burn:t,exhaustsAt:oe(t),usage:h.get(e.id)}}).sort((e,t)=>g[e.status.state]-g[t.status.state]||se(e.exhaustsAt,t.exhaustsAt)||e.credential.tier-t.credential.tier);return q(B,{legend:`Accounts`,meta:`${t.length} connected`,flush:!0,actions:q(d,{as:o,to:`/accounts`,$size:`sm`,children:`Manage accounts`}),children:t.length===0?q(I,{legend:`No accounts`,message:`The gateway has no provider credentials, so every request will fail. Connect one to start routing.`,action:q(d,{as:o,to:`/accounts`,$variant:`primary`,$size:`sm`,children:`Connect an account`})}):q(m,{children:J(W,{children:[q(`thead`,{children:J(`tr`,{children:[q(U,{children:`Account`}),q(U,{children:`Provider`}),q(U,{$align:`right`,children:`Tier`}),q(U,{children:`Quota`}),q(U,{$align:`right`,children:`TTFT`}),q(U,{$align:`right`,children:`Requests`}),q(U,{$align:`right`,children:`Last used`})]})}),q(`tbody`,{children:_.map(({credential:t,status:n,quota:r,burn:i,usage:a})=>J(V,{children:[q(H,{children:J(f,{$gap:2,children:[q(T,{state:n.state,label:n.note===``?`healthy`:n.note}),J(`div`,{children:[q(X,{children:t.label}),n.note===``?null:q(Z,{children:n.note})]})]})}),q(H,{children:q(re,{provider:t.provider})}),q(H,{$align:`right`,$mono:!0,children:t.tier}),q(H,{children:r.length===0?q(Z,{children:`unknown`}):q(ae,{children:r.map(({window:t,fraction:n})=>J(ie,{children:[q(z,{fraction:n,label:`${N[t.windowType]} window, ${Math.round(n*100)}% used`}),q(e,{children:te(t,c,s,k,j(i,t.windowType))})]},t.windowType))})}),q(H,{$align:`right`,$mono:!0,children:A(n.ttftMs)}),q(H,{$align:`right`,$mono:!0,children:a===void 0?`—`:S(a.requests)}),q(H,{$align:`right`,$mono:!0,children:k(n.lastUsedAt,c)})]},t.id))})]})})})}var le=Y.ul`
19
- display: flex;
20
- flex-direction: column;
21
- `,ue=Y.li`
22
- display: flex;
23
- align-items: center;
24
- gap: ${({theme:e})=>e.space(2)};
25
- padding: 6px ${({theme:e})=>e.space(3)};
26
- border-bottom: 1px solid ${({theme:e})=>e.color.rule};
27
-
28
- &:last-child {
29
- border-bottom: 0;
30
- }
31
- `,de=Y(p)`
32
- font-family: ${({theme:e})=>e.font.mono};
33
- font-size: 12px;
34
- max-width: 30ch;
35
- `,fe=Y(s)`
36
- color: ${({theme:e})=>e.color.down};
37
- font-size: 11px;
38
- `;function pe({logs:e}){let t=e.slice(0,12);return q(B,{legend:`Activity`,meta:`most recent first`,flush:!0,actions:q(d,{as:o,to:`/logs`,$size:`sm`,children:`Open logs`}),children:t.length===0?q(I,{legend:`No traffic yet`,message:`Point a client at this gateway with an API key and the requests will appear here.`}):q(le,{children:t.map(e=>J(ue,{children:[q(T,{state:ee(e),label:O(e)}),q(s,{$dim:!0,children:w(e.at)}),q(de,{title:e.requestedModel,children:e.requestedModel||`—`}),e.resolvedProvider===null?null:q(s,{$dim:!0,style:{color:`var(--p-${e.resolvedProvider})`},children:e.resolvedProvider}),q(u,{}),P(e)?q(s,{$dim:!0,"aria-label":`processing`,children:q(b,{})}):J(K,{children:[e.errorCode===null?null:q(fe,{children:e.errorCode}),e.attempts>1?J(s,{$dim:!0,children:[e.attempts,`×`]}):null,q(s,{$dim:!0,children:q(y,{tokens:e})}),q(s,{$dim:!0,children:A(e.durationMs)}),q(s,{$dim:!0,children:C(e.costUsd)})]})]},e.id))})})}var me=Y.ul`
39
- display: flex;
40
- flex-direction: column;
41
- gap: ${({theme:e})=>e.space(3)};
42
- `,Q=Y(p)`
43
- font-family: ${({theme:e})=>e.font.mono};
44
- font-size: 12.5px;
45
- `,he=Y.div`
46
- display: flex;
47
- height: 5px;
48
- border-radius: 2px;
49
- overflow: hidden;
50
- background: ${({theme:e})=>e.color.panelSunk};
51
- border: 1px solid ${({theme:e})=>e.color.rule};
52
- `,ge=Y.div`
53
- flex: ${({$grow:e})=>e} 0 0;
54
- background: ${({$color:e})=>e};
55
- opacity: 0.8;
56
- `,_e=Y.div`
57
- flex: ${({$grow:e})=>e} 0 0;
58
- `;function ve({models:t,logs:n}){let r=new Map;for(let e of n){let t=r.get(e.requestedModel)??{requests:0,costUsd:0};t.requests+=1,t.costUsd+=e.costUsd,r.set(e.requestedModel,t)}let i=Math.max(1,...[...r.values()].map(e=>e.requests)),a=[...t].map(e=>({model:e,used:r.get(e.id)})).sort((e,t)=>(t.used?.requests??0)-(e.used?.requests??0)).slice(0,8);return q(B,{legend:`Models`,meta:`${t.length} configured`,actions:q(d,{as:o,to:`/models`,$size:`sm`,children:`Edit routing`}),children:t.length===0?q(I,{legend:`No models`,message:`Nothing is routable yet. Create a virtual model and point it at one or more provider targets.`,action:q(d,{as:o,to:`/models`,$variant:`primary`,$size:`sm`,children:`Create a model`})}):q(me,{children:a.map(({model:t,used:n})=>{let r=(n?.requests??0)/i,a=[...new Set(t.targets.map(e=>e.provider))];return J(`li`,{children:[J(f,{$gap:2,children:[q(Q,{title:t.id,children:t.id}),t.isAlias?q(R,{children:`alias`}):null,q(R,{$tone:`accent`,children:t.strategy}),q(u,{}),q(s,{$dim:!0,children:S(n?.requests??0)}),q(e,{children:`req`}),q(s,{$dim:!0,children:C(n?.costUsd??0)})]}),J(he,{style:{marginTop:6},title:`${Math.round(r*100)}% of the busiest model`,children:[a.map(e=>q(ge,{$color:`var(--p-${e})`,$grow:r/a.length},e)),q(_e,{$grow:Math.max(0,1-r)})]})]},t.id)})})})}var ye=Y.div`
59
- display: grid;
60
- grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
61
- gap: ${({theme:e})=>e.space(3)};
62
- `;function be({logs:e,windowMs:t,now:n}){let r=e.filter(e=>n-e.at<=t),i=ne(r,t),a=F(r,{now:n,spanMs:t,count:32}),o=i.errorRate>=.25?`down`:i.errorRate>=.05?`warn`:`ok`,s=i.inputTokens+i.outputTokens+i.cacheReadTokens+i.cacheWriteTokens;return J(ye,{children:[q(G,{legend:`Requests`,value:S(i.requests),unit:`${i.ratePerMin.toFixed(1)}/min`,trace:q(_,{values:a.map(e=>e.total),overlay:a.map(e=>e.errors),label:`${i.requests} requests, ${i.errors} of them failed`})}),q(G,{legend:`Error rate`,value:x(i.errorRate),unit:`${S(i.errors)} failed`,tone:i.requests===0?`ink`:o,trace:q(_,{values:a.map(e=>e.errors),scaleTo:Math.max(...a.map(e=>e.total)),color:`var(--down)`,label:`${i.errors} failed requests against ${i.requests} total`})}),q(G,{legend:`Total tokens`,value:S(s),unit:q(y,{tokens:i}),trace:q(_,{values:a.map(e=>e.tokens),label:`token volume over the window, ${s.toLocaleString(`en-US`)} total`})}),q(G,{legend:`Time to first token`,value:A(i.ttftP50),unit:`p95 ${A(i.ttftP95)}`,trace:q(_,{values:a.map(e=>e.ttftMs??0),color:`var(--ok)`,label:`median first-token latency, currently ${A(i.ttftP50)}`})}),q(G,{legend:`Spend`,value:C(i.costUsd),unit:`${S(i.inputTokens+i.outputTokens)} tokens`,trace:q(_,{values:a.map(e=>e.costUsd),color:`var(--warn)`,label:`spend over the window, ${C(i.costUsd)} total`})})]})}var $=36e5;function xe(){let{cadence:e}=g(),o=c(),s=l(e(1e4)),u=r(),d=t(500,e(1e4)),f=h(),p=Date.now(),m=Math.floor((p-$)/6e4)*6e4,_=n({groupBy:`credential`,since:m},e(6e4)),y=o.data??[],b=D(s.data?.health??[],e=>e.credentialId),x=y.filter(e=>L(b.get(e.id)??[],p,e.enabled,e.disabledReason).state===`down`),S=o.isLoading||d.isLoading?`Reading the gateway…`:y.length===0?`No accounts are connected, so every request fails at the router.`:x.length>0?`${x.length} account${x.length===1?` is`:`s are`} out of rotation.`:`All ${y.length} accounts are answering. Nothing needs attention.`;return J(K,{children:[q(v,{legend:`Rack`,title:`Gateway`,summary:S}),d.isError?q(B,{legend:`Traffic`,children:q(M,{legend:`The gateway did not answer`,error:d.error,onRetry:()=>void d.refetch()})}):J(a,{$gap:4,children:[q(be,{logs:d.data??[],windowMs:$,now:p}),q(ce,{credentials:y,health:s.data?.health??[],quota:s.data?.quota??[],burn:s.data?.burn??[],usage:_.data??[],quotaPollIntervalMs:f.data?.quotaPollIntervalMs??3e5,now:p}),J(i,{$min:`340px`,$gap:4,children:[q(ve,{models:u.data??[],logs:d.data??[]}),q(pe,{logs:d.data??[]})]})]})]})}var Se=xe;export{Se as component};
@@ -1 +0,0 @@
1
- import{g as e}from"./Rack-ziQuyb2l.js";var t=e(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]);export{t};