@dudousxd/nestjs-telescope-ui 4.2.0 → 5.0.0
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.
- package/CHANGELOG.md +28 -0
- package/README.md +6 -0
- package/dist/client/index.d.ts +1 -1
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/telescope-client.d.ts +25 -19
- package/dist/client/telescope-client.d.ts.map +1 -1
- package/dist/client/telescope-client.js +14 -18
- package/dist/client/telescope-client.js.map +1 -1
- package/dist/client/types.d.ts +37 -11
- package/dist/client/types.d.ts.map +1 -1
- package/dist/react/components/batch-timeline.d.ts +1 -1
- package/dist/react/components/batch-timeline.d.ts.map +1 -1
- package/dist/react/components/cache-badge.d.ts +1 -1
- package/dist/react/components/cache-badge.d.ts.map +1 -1
- package/dist/react/components/charts/area-chart-card.d.ts +2 -2
- package/dist/react/components/charts/area-chart-card.d.ts.map +1 -1
- package/dist/react/components/charts/area-chart-card.js +1 -1
- package/dist/react/components/charts/bar-chart-card.d.ts +2 -2
- package/dist/react/components/charts/bar-chart-card.d.ts.map +1 -1
- package/dist/react/components/charts/bar-chart-card.js +1 -1
- package/dist/react/components/charts/breakdown-card.d.ts +1 -2
- package/dist/react/components/charts/breakdown-card.d.ts.map +1 -1
- package/dist/react/components/charts/chart-card.d.ts +2 -2
- package/dist/react/components/charts/chart-card.d.ts.map +1 -1
- package/dist/react/components/charts/chart-card.js +1 -1
- package/dist/react/components/charts/chart-card.js.map +1 -1
- package/dist/react/components/charts/chart-theme.d.ts +1 -1
- package/dist/react/components/charts/chart-theme.d.ts.map +1 -1
- package/dist/react/components/charts/chart-theme.js +1 -1
- package/dist/react/components/charts/chart-theme.js.map +1 -1
- package/dist/react/components/charts/distribution-chart-card.d.ts +1 -2
- package/dist/react/components/charts/distribution-chart-card.d.ts.map +1 -1
- package/dist/react/components/charts/distribution-chart-card.js +1 -1
- package/dist/react/components/charts/gauge-card.d.ts +1 -2
- package/dist/react/components/charts/gauge-card.d.ts.map +1 -1
- package/dist/react/components/charts/stacked-area-chart-card.d.ts +2 -2
- package/dist/react/components/charts/stacked-area-chart-card.d.ts.map +1 -1
- package/dist/react/components/charts/stacked-area-chart-card.js +1 -1
- package/dist/react/components/entries-table.d.ts +1 -1
- package/dist/react/components/entries-table.d.ts.map +1 -1
- package/dist/react/components/entries-table.js +3 -2
- package/dist/react/components/entries-table.js.map +1 -1
- package/dist/react/components/entry-detail.d.ts +1 -1
- package/dist/react/components/entry-detail.d.ts.map +1 -1
- package/dist/react/components/entry-detail.js +11 -11
- package/dist/react/components/entry-detail.js.map +1 -1
- package/dist/react/components/entry-insights.d.ts +1 -1
- package/dist/react/components/entry-insights.d.ts.map +1 -1
- package/dist/react/components/entry-insights.js +6 -6
- package/dist/react/components/entry-insights.js.map +1 -1
- package/dist/react/components/export-json-toolbar.d.ts +1 -1
- package/dist/react/components/export-json-toolbar.d.ts.map +1 -1
- package/dist/react/components/extensions/panel-actions.d.ts +3 -3
- package/dist/react/components/extensions/panel-actions.d.ts.map +1 -1
- package/dist/react/components/extensions/panel-column-menu.d.ts +1 -2
- package/dist/react/components/extensions/panel-column-menu.d.ts.map +1 -1
- package/dist/react/components/extensions/panel-renderer.d.ts +1 -2
- package/dist/react/components/extensions/panel-renderer.d.ts.map +1 -1
- package/dist/react/components/extensions/panel-renderer.js +14 -13
- package/dist/react/components/extensions/panel-renderer.js.map +1 -1
- package/dist/react/components/extensions/panel-table-header.d.ts +2 -3
- package/dist/react/components/extensions/panel-table-header.d.ts.map +1 -1
- package/dist/react/components/extensions/panel-table.d.ts +1 -2
- package/dist/react/components/extensions/panel-table.d.ts.map +1 -1
- package/dist/react/components/extensions/stat-card.d.ts +1 -2
- package/dist/react/components/extensions/stat-card.d.ts.map +1 -1
- package/dist/react/components/extensions/stat-card.js +2 -2
- package/dist/react/components/extensions/stat-card.js.map +1 -1
- package/dist/react/components/extensions/table-columns.js +1 -1
- package/dist/react/components/extensions/table-columns.js.map +1 -1
- package/dist/react/components/extensions/table-query.d.ts +23 -18
- package/dist/react/components/extensions/table-query.d.ts.map +1 -1
- package/dist/react/components/extensions/table-query.js +27 -21
- package/dist/react/components/extensions/table-query.js.map +1 -1
- package/dist/react/components/flamegraph-view.d.ts +1 -2
- package/dist/react/components/flamegraph-view.d.ts.map +1 -1
- package/dist/react/components/flamegraph-view.js +1 -1
- package/dist/react/components/flamegraph-view.js.map +1 -1
- package/dist/react/components/inertia-badge.d.ts +1 -1
- package/dist/react/components/inertia-badge.d.ts.map +1 -1
- package/dist/react/components/inertia-body.d.ts +1 -1
- package/dist/react/components/inertia-body.d.ts.map +1 -1
- package/dist/react/components/inertia-body.js +9 -9
- package/dist/react/components/inertia-body.js.map +1 -1
- package/dist/react/components/official-event.d.ts +1 -1
- package/dist/react/components/official-event.d.ts.map +1 -1
- package/dist/react/components/official-event.js +1 -1
- package/dist/react/components/official-event.js.map +1 -1
- package/dist/react/components/pulse-panel.d.ts +1 -1
- package/dist/react/components/pulse-panel.d.ts.map +1 -1
- package/dist/react/components/pulse-panel.js +2 -2
- package/dist/react/components/pulse-panel.js.map +1 -1
- package/dist/react/components/queue-sparkline.d.ts +2 -2
- package/dist/react/components/queue-sparkline.d.ts.map +1 -1
- package/dist/react/components/queue-sparkline.js +1 -1
- package/dist/react/components/queue-sparkline.js.map +1 -1
- package/dist/react/components/queues/EnqueueJobForm.d.ts +1 -1
- package/dist/react/components/queues/EnqueueJobForm.d.ts.map +1 -1
- package/dist/react/components/queues/EnqueueJobForm.js +1 -1
- package/dist/react/components/queues/EnqueueJobForm.js.map +1 -1
- package/dist/react/components/queues/JobActions.d.ts +3 -3
- package/dist/react/components/queues/JobActions.d.ts.map +1 -1
- package/dist/react/components/queues/JobDetailDrawer.d.ts +1 -1
- package/dist/react/components/queues/JobDetailDrawer.d.ts.map +1 -1
- package/dist/react/components/queues/JobDetailDrawer.js +4 -4
- package/dist/react/components/queues/JobDetailDrawer.js.map +1 -1
- package/dist/react/components/queues/JobTable.d.ts +1 -1
- package/dist/react/components/queues/JobTable.d.ts.map +1 -1
- package/dist/react/components/queues/JobTable.js +0 -0
- package/dist/react/components/queues/JobTable.js.map +1 -1
- package/dist/react/components/queues/QueueList.d.ts +1 -1
- package/dist/react/components/queues/QueueList.d.ts.map +1 -1
- package/dist/react/components/queues/QueueList.js +2 -2
- package/dist/react/components/queues/QueueList.js.map +1 -1
- package/dist/react/components/queues/QueueStateTabs.d.ts +1 -1
- package/dist/react/components/queues/QueueStateTabs.d.ts.map +1 -1
- package/dist/react/components/queues-panel.d.ts +1 -1
- package/dist/react/components/queues-panel.d.ts.map +1 -1
- package/dist/react/components/request-timeline.d.ts +1 -1
- package/dist/react/components/request-timeline.d.ts.map +1 -1
- package/dist/react/components/retention-indicator.d.ts +1 -1
- package/dist/react/components/retention-indicator.d.ts.map +1 -1
- package/dist/react/components/retention-indicator.js +1 -1
- package/dist/react/components/retention-indicator.js.map +1 -1
- package/dist/react/components/sparkline.d.ts +1 -1
- package/dist/react/components/sparkline.d.ts.map +1 -1
- package/dist/react/components/stacked-bars.d.ts +1 -1
- package/dist/react/components/stacked-bars.d.ts.map +1 -1
- package/dist/react/components/tag-autocomplete.d.ts +1 -1
- package/dist/react/components/tag-autocomplete.d.ts.map +1 -1
- package/dist/react/components/tag-autocomplete.js +1 -1
- package/dist/react/components/tag-autocomplete.js.map +1 -1
- package/dist/react/components/waterfall-view.d.ts +1 -1
- package/dist/react/components/waterfall-view.d.ts.map +1 -1
- package/dist/react/components/waterfall-view.js +1 -1
- package/dist/react/components/waterfall-view.js.map +1 -1
- package/dist/react/components/window-select.d.ts +1 -1
- package/dist/react/components/window-select.d.ts.map +1 -1
- package/dist/react/telescope-context.d.ts +1 -1
- package/dist/react/telescope-context.d.ts.map +1 -1
- package/dist/react/ui/badge.d.ts +1 -1
- package/dist/react/ui/badge.d.ts.map +1 -1
- package/dist/react/ui/chart.d.ts +5 -5
- package/dist/react/ui/chart.d.ts.map +1 -1
- package/dist/react/ui/chart.js +2 -2
- package/dist/react/ui/chart.js.map +1 -1
- package/dist/react/ui/select.d.ts.map +1 -1
- package/dist/react/ui/select.js +1 -1
- package/dist/react/ui/select.js.map +1 -1
- package/dist/react/ui/table.js +1 -1
- package/dist/react/ui/table.js.map +1 -1
- package/dist/react/use-telescope-queries.d.ts +14 -35
- package/dist/react/use-telescope-queries.d.ts.map +1 -1
- package/dist/react/use-telescope-queries.js +17 -18
- package/dist/react/use-telescope-queries.js.map +1 -1
- package/dist/server/console-shell.d.ts +53 -0
- package/dist/server/console-shell.d.ts.map +1 -0
- package/dist/server/console-shell.js +130 -0
- package/dist/server/console-shell.js.map +1 -0
- package/dist/server/index.d.ts +1 -0
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +2 -0
- package/dist/server/index.js.map +1 -1
- package/dist/server/telescope-ui.controller.d.ts +2 -1
- package/dist/server/telescope-ui.controller.d.ts.map +1 -1
- package/dist/server/telescope-ui.controller.js +30 -11
- package/dist/server/telescope-ui.controller.js.map +1 -1
- package/dist/server/telescope-ui.options.d.ts +25 -0
- package/dist/server/telescope-ui.options.d.ts.map +1 -1
- package/dist/server/telescope-ui.options.js.map +1 -1
- package/dist/spa/assets/index-C2zgCbqj.css +1 -0
- package/dist/spa/assets/index-ovRjwT9F.js +228 -0
- package/dist/spa/assets/jetbrains-mono-latin-400-normal-6-qcROiO.woff +0 -0
- package/dist/spa/assets/jetbrains-mono-latin-400-normal-V6pRDFza.woff2 +0 -0
- package/dist/spa/assets/jetbrains-mono-latin-500-normal-BWZEU5yA.woff2 +0 -0
- package/dist/spa/assets/jetbrains-mono-latin-500-normal-CJOVTJB7.woff +0 -0
- package/dist/spa/assets/jetbrains-mono-latin-600-normal-BfsvjouI.woff +0 -0
- package/dist/spa/assets/jetbrains-mono-latin-600-normal-C8RAYTDA.woff2 +0 -0
- package/dist/spa/assets/sora-latin-400-normal-CRt88UEn.woff2 +0 -0
- package/dist/spa/assets/sora-latin-400-normal-OW7qkl5a.woff +0 -0
- package/dist/spa/assets/sora-latin-500-normal-01eiPEn0.woff2 +0 -0
- package/dist/spa/assets/sora-latin-500-normal-w58xtEt9.woff +0 -0
- package/dist/spa/assets/sora-latin-600-normal-1_7fyUAY.woff +0 -0
- package/dist/spa/assets/sora-latin-600-normal-Cdg4DaK0.woff2 +0 -0
- package/dist/spa/assets/sora-latin-700-normal-9waGdLWo.woff2 +0 -0
- package/dist/spa/assets/sora-latin-700-normal-BKPfQAnC.woff +0 -0
- package/dist/spa/index.html +8 -2
- package/package.json +19 -13
- package/dist/spa/assets/index-BNCovQ2Z.js +0 -159
- package/dist/spa/assets/index-DdEYuSwo.css +0 -1
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
var Qq=Object.defineProperty;var T_=e=>{throw TypeError(e)};var Zq=(e,t,n)=>t in e?Qq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Be=(e,t,n)=>Zq(e,typeof t!="symbol"?t+"":t,n),V0=(e,t,n)=>t.has(e)||T_("Cannot "+n);var F=(e,t,n)=>(V0(e,t,"read from private field"),n?n.call(e):t.get(e)),Te=(e,t,n)=>t.has(e)?T_("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),me=(e,t,n,r)=>(V0(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),He=(e,t,n)=>(V0(e,t,"access private method"),n);var Gm=(e,t,n,r)=>({set _(i){me(e,t,i,n)},get _(){return F(e,t,r)}});function Jq(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const a=Object.getOwnPropertyDescriptor(r,i);a&&Object.defineProperty(e,i,a.get?a:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}})();var Km=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function vt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ck={exports:{}},Lb={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var eV=Symbol.for("react.transitional.element"),tV=Symbol.for("react.fragment");function fk(e,t,n){var r=null;if(n!==void 0&&(r=""+n),t.key!==void 0&&(r=""+t.key),"key"in t){n={};for(var i in t)i!=="key"&&(n[i]=t[i])}else n=t;return t=n.ref,{$$typeof:eV,type:e,key:r,ref:t!==void 0?t:null,props:n}}Lb.Fragment=tV;Lb.jsx=fk;Lb.jsxs=fk;ck.exports=Lb;var c=ck.exports,dk={exports:{}},ze={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react.production.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var IE=Symbol.for("react.transitional.element"),nV=Symbol.for("react.portal"),rV=Symbol.for("react.fragment"),iV=Symbol.for("react.strict_mode"),aV=Symbol.for("react.profiler"),oV=Symbol.for("react.consumer"),sV=Symbol.for("react.context"),lV=Symbol.for("react.forward_ref"),uV=Symbol.for("react.suspense"),cV=Symbol.for("react.memo"),pk=Symbol.for("react.lazy"),fV=Symbol.for("react.activity"),dV=Symbol.for("react.view_transition"),A_=Symbol.iterator;function pV(e){return e===null||typeof e!="object"?null:(e=A_&&e[A_]||e["@@iterator"],typeof e=="function"?e:null)}var hk={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},mk=Object.assign,gk={};function od(e,t,n){this.props=e,this.context=t,this.refs=gk,this.updater=n||hk}od.prototype.isReactComponent={};od.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};od.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function vk(){}vk.prototype=od.prototype;function kE(e,t,n){this.props=e,this.context=t,this.refs=gk,this.updater=n||hk}var LE=kE.prototype=new vk;LE.constructor=kE;mk(LE,od.prototype);LE.isPureReactComponent=!0;var C_=Array.isArray;function k1(){}var It={H:null,A:null,T:null,S:null},yk=Object.prototype.hasOwnProperty;function BE(e,t,n){var r=n.ref;return{$$typeof:IE,type:e,key:t,ref:r!==void 0?r:null,props:n}}function hV(e,t){return BE(e.type,t,e.props)}function zE(e){return typeof e=="object"&&e!==null&&e.$$typeof===IE}function mV(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var __=/\/+/g;function G0(e,t){return typeof e=="object"&&e!==null&&e.key!=null?mV(""+e.key):t.toString(36)}function gV(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(k1,k1):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function Ju(e,t,n,r,i){var a=typeof e;(a==="undefined"||a==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(a){case"bigint":case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case IE:case nV:o=!0;break;case pk:return o=e._init,Ju(o(e._payload),t,n,r,i)}}if(o)return i=i(e),o=r===""?"."+G0(e,0):r,C_(i)?(n="",o!=null&&(n=o.replace(__,"$&/")+"/"),Ju(i,t,n,"",function(u){return u})):i!=null&&(zE(i)&&(i=hV(i,n+(i.key==null||e&&e.key===i.key?"":(""+i.key).replace(__,"$&/")+"/")+o)),t.push(i)),1;o=0;var s=r===""?".":r+":";if(C_(e))for(var l=0;l<e.length;l++)r=e[l],a=s+G0(r,l),o+=Ju(r,t,n,a,i);else if(l=pV(e),typeof l=="function")for(e=l.call(e),l=0;!(r=e.next()).done;)r=r.value,a=s+G0(r,l++),o+=Ju(r,t,n,a,i);else if(a==="object"){if(typeof e.then=="function")return Ju(gV(e),t,n,r,i);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return o}function Ym(e,t,n){if(e==null)return e;var r=[],i=0;return Ju(e,r,"","",function(a){return t.call(n,a,i++)}),r}function vV(e){if(e._status===-1){var t=e._result,n=t();n.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r,n.status===void 0&&(n.status="fulfilled",n.value=r))},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r,n.status===void 0&&(n.status="rejected",n.reason=r))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var N_=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function bk(e){var t=It.T,n={};n.types=t!==null?t.types:null,It.T=n;try{var r=e(),i=It.S;i!==null&&i(n,r),typeof r=="object"&&r!==null&&typeof r.then=="function"&&r.then(k1,N_)}catch(a){N_(a)}finally{t!==null&&n.types!==null&&(t.types=n.types),It.T=t}}function xk(e){var t=It.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else bk(xk.bind(null,e))}var yV={map:Ym,forEach:function(e,t,n){Ym(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Ym(e,function(){t++}),t},toArray:function(e){return Ym(e,function(t){return t})||[]},only:function(e){if(!zE(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ze.Activity=fV;ze.Children=yV;ze.Component=od;ze.Fragment=rV;ze.Profiler=aV;ze.PureComponent=kE;ze.StrictMode=iV;ze.Suspense=uV;ze.ViewTransition=dV;ze.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=It;ze.__COMPILER_RUNTIME={__proto__:null,c:function(e){return It.H.useMemoCache(e)}};ze.addTransitionType=xk;ze.cache=function(e){return function(){return e.apply(null,arguments)}};ze.cacheSignal=function(){return null};ze.cloneElement=function(e,t,n){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var r=mk({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=""+t.key),t)!yk.call(t,a)||a==="key"||a==="__self"||a==="__source"||a==="ref"&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return BE(e.type,i,r)};ze.createContext=function(e){return e={$$typeof:sV,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:oV,_context:e},e};ze.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=""+t.key),t)yk.call(t,r)&&r!=="key"&&r!=="__self"&&r!=="__source"&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),l=0;l<o;l++)s[l]=arguments[l+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return BE(e,a,i)};ze.createRef=function(){return{current:null}};ze.forwardRef=function(e){return{$$typeof:lV,render:e}};ze.isValidElement=zE;ze.lazy=function(e){return{$$typeof:pk,_payload:{_status:-1,_result:e},_init:vV}};ze.memo=function(e,t){return{$$typeof:cV,type:e,compare:t===void 0?null:t}};ze.startTransition=bk;ze.unstable_useCacheRefresh=function(){return It.H.useCacheRefresh()};ze.use=function(e){return It.H.use(e)};ze.useActionState=function(e,t,n){return It.H.useActionState(e,t,n)};ze.useCallback=function(e,t){return It.H.useCallback(e,t)};ze.useContext=function(e){return It.H.useContext(e)};ze.useDebugValue=function(){};ze.useDeferredValue=function(e,t){return It.H.useDeferredValue(e,t)};ze.useEffect=function(e,t){return It.H.useEffect(e,t)};ze.useEffectEvent=function(e){return It.H.useEffectEvent(e)};ze.useId=function(){return It.H.useId()};ze.useImperativeHandle=function(e,t,n){return It.H.useImperativeHandle(e,t,n)};ze.useInsertionEffect=function(e,t){return It.H.useInsertionEffect(e,t)};ze.useLayoutEffect=function(e,t){return It.H.useLayoutEffect(e,t)};ze.useMemo=function(e,t){return It.H.useMemo(e,t)};ze.useOptimistic=function(e,t){return It.H.useOptimistic(e,t)};ze.useReducer=function(e,t,n){return It.H.useReducer(e,t,n)};ze.useRef=function(e){return It.H.useRef(e)};ze.useState=function(e){return It.H.useState(e)};ze.useSyncExternalStore=function(e,t,n){return It.H.useSyncExternalStore(e,t,n)};ze.useTransition=function(){return It.H.useTransition()};ze.version="19.3.1";dk.exports=ze;var x=dk.exports;const z=vt(x),Bb=Jq({__proto__:null,default:z},[x]);var wk={exports:{}},zb={},Sk={exports:{}},Ok={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/(function(e){function t(P,B){var L=P.length;P.push(B);e:for(;0<L;){var k=L-1>>>1,I=P[k];if(0<i(I,B))P[k]=B,P[L]=I,L=k;else break e}}function n(P){return P.length===0?null:P[0]}function r(P){if(P.length===0)return null;var B=P[0],L=P.pop();if(L!==B){P[0]=L;e:for(var k=0,I=P.length,V=I>>>1;k<V;){var M=2*(k+1)-1,q=P[M],G=M+1,U=P[G];if(0>i(q,L))G<I&&0>i(U,q)?(P[k]=U,P[G]=L,k=G):(P[k]=q,P[M]=L,k=M);else if(G<I&&0>i(U,L))P[k]=U,P[G]=L,k=G;else break e}}return B}function i(P,B){var L=P.sortIndex-B.sortIndex;return L!==0?L:P.id-B.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var l=[],u=[],f=1,d=null,p=3,h=!1,b=!1,m=!1,g=!1,y=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;function S(P){for(var B=n(u);B!==null;){if(B.callback===null)r(u);else if(B.startTime<=P)r(u),B.sortIndex=B.expirationTime,t(l,B);else break;B=n(u)}}function O(P){if(m=!1,S(P),!b)if(n(l)!==null)b=!0,j||(j=!0,N());else{var B=n(u);B!==null&&$(O,B.startTime-P)}}var j=!1,E=-1,T=5,A=-1;function C(){return g?!0:!(e.unstable_now()-A<T)}function _(){if(g=!1,j){var P=e.unstable_now();A=P;var B=!0;try{e:{b=!1,m&&(m=!1,v(E),E=-1),h=!0;var L=p;try{t:{for(S(P),d=n(l);d!==null&&!(d.expirationTime>P&&C());){var k=d.callback;if(typeof k=="function"){d.callback=null,p=d.priorityLevel;var I=k(d.expirationTime<=P);if(P=e.unstable_now(),typeof I=="function"){d.callback=I,S(P),B=!0;break t}d===n(l)&&r(l),S(P)}else r(l);d=n(l)}if(d!==null)B=!0;else{var V=n(u);V!==null&&$(O,V.startTime-P),B=!1}}break e}finally{d=null,p=L,h=!1}B=void 0}}finally{B?N():j=!1}}}var N;if(typeof w=="function")N=function(){w(_)};else if(typeof MessageChannel<"u"){var D=new MessageChannel,R=D.port2;D.port1.onmessage=_,N=function(){R.postMessage(null)}}else N=function(){y(_,0)};function $(P,B){E=y(function(){P(e.unstable_now())},B)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(P){P.callback=null},e.unstable_forceFrameRate=function(P){0>P||125<P?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):T=0<P?Math.floor(1e3/P):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_next=function(P){switch(p){case 1:case 2:case 3:var B=3;break;default:B=p}var L=p;p=B;try{return P()}finally{p=L}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(P,B){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var L=p;p=P;try{return B()}finally{p=L}},e.unstable_scheduleCallback=function(P,B,L){var k=e.unstable_now();switch(typeof L=="object"&&L!==null?(L=L.delay,L=typeof L=="number"&&0<L?k+L:k):L=k,P){case 1:var I=-1;break;case 2:I=250;break;case 5:I=1073741823;break;case 4:I=1e4;break;default:I=5e3}return I=L+I,P={id:f++,callback:B,priorityLevel:P,startTime:L,expirationTime:I,sortIndex:-1},L>k?(P.sortIndex=L,t(u,P),n(l)===null&&P===n(u)&&(m?(v(E),E=-1):m=!0,$(O,L-k))):(P.sortIndex=I,t(l,P),b||h||(b=!0,j||(j=!0,N()))),P},e.unstable_shouldYield=C,e.unstable_wrapCallback=function(P){var B=p;return function(){var L=p;p=B;try{return P.apply(this,arguments)}finally{p=L}}}})(Ok);Sk.exports=Ok;var bV=Sk.exports,jk={exports:{}},sr={};/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var xV=x;function Ek(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function Uo(){}var xr={d:{f:Uo,r:function(){throw Error(Ek(522))},D:Uo,C:Uo,L:Uo,m:Uo,X:Uo,S:Uo,M:Uo},p:0,findDOMNode:null},wV=Symbol.for("react.portal"),SV=Symbol.for("react.recoverable"),R_=Symbol.for("react.optimistic_key");function OV(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:wV,key:r==null?null:r===R_?R_:""+r,children:e,containerInfo:t,implementation:n}}var jp=xV.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function Fb(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}sr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=xr;sr.browser=function(e){return{$$typeof:SV,_reason:e}};sr.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(Ek(299));return OV(e,t,null,n)};sr.flushSync=function(e){var t=jp.T,n=xr.p;try{if(jp.T=null,xr.p=2,e)return e()}finally{jp.T=t,xr.p=n,xr.d.f()}};sr.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,xr.d.C(e,t))};sr.prefetchDNS=function(e){typeof e=="string"&&xr.d.D(e)};sr.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var n=t.as,r=Fb(n,t.crossOrigin),i=typeof t.integrity=="string"?t.integrity:void 0,a=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;n==="style"?xr.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:a}):n==="script"&&xr.d.X(e,{crossOrigin:r,integrity:i,fetchPriority:a,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};sr.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var n=Fb(t.as,t.crossOrigin);xr.d.M(e,{crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0})}}else t==null&&xr.d.M(e)};sr.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var n=t.as,r=Fb(n,t.crossOrigin);xr.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,type:typeof t.type=="string"?t.type:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy=="string"?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet=="string"?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes=="string"?t.imageSizes:void 0,media:typeof t.media=="string"?t.media:void 0})}};sr.preloadModule=function(e,t){if(typeof e=="string")if(t){var n=Fb(t.as,t.crossOrigin);xr.d.m(e,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0})}else xr.d.m(e)};sr.requestFormReset=function(e){xr.d.r(e)};sr.unstable_batchedUpdates=function(e,t){return e(t)};sr.useFormState=function(e,t,n){return jp.H.useFormState(e,t,n)};sr.useFormStatus=function(){return jp.H.useHostTransitionStatus()};sr.version="19.3.1";function Tk(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Tk)}catch(e){console.error(e)}}Tk(),jk.exports=sr;var Ni=jk.exports;const jV=vt(Ni);/**
|
|
34
|
+
* @license React
|
|
35
|
+
* react-dom-client.production.js
|
|
36
|
+
*
|
|
37
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the MIT license found in the
|
|
40
|
+
* LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/var On=bV,Ak=x,EV=Ni;function ne(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function Ck(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function fm(e){for(var t=e,n=t;n&&!n.alternate;)t=n,t.flags&4098&&(e=t.return),n=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function _k(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Nk(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function M_(e){if(fm(e)!==e)throw Error(ne(188))}function TV(e){var t=e.alternate;if(!t){if(t=fm(e),t===null)throw Error(ne(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var a=i.alternate;if(a===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return M_(i),e;if(a===r)return M_(i),t;a=a.sibling}throw Error(ne(188))}if(n.return!==r.return)n=i,r=a;else{for(var o=!1,s=i.child;s;){if(s===n){o=!0,n=i,r=a;break}if(s===r){o=!0,r=i,n=a;break}s=s.sibling}if(!o){for(s=a.child;s;){if(s===n){o=!0,n=a,r=i;break}if(s===r){o=!0,r=a,n=i;break}s=s.sibling}if(!o)throw Error(ne(189))}}if(n.alternate!==r)throw Error(ne(190))}if(n.tag!==3)throw Error(ne(188));return n.stateNode.current===n?e:t}function Rk(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=Rk(e),t!==null)return t;e=e.sibling}return null}function kr(e,t,n,r,i,a){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&n(e,r,i,a)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&kr(e.child,t,n,r,i,a))return!0;e=e.sibling}return!1}function Su(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function P_(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),!(e.tag===3||e.tag===5||e.tag===27));)e=e.return;return t}function Mk(e){var t=[null,null],n=Su(e);return n===null||Pk(t,e,n.child,{foundSelf:!1}),t}function Pk(e,t,n,r){for(;n!==null;){if(n===t)r.foundSelf=!0;else if(n.tag===5||n.tag===27||n.tag===6){if(r.foundSelf)return e[1]=n,!0;e[0]=n}else if((n.tag!==22||n.memoizedState===null)&&Pk(e,t,n.child,r))return!0;n=n.sibling}return!1}function wn(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(ne(559))}}var oc=null,L1=null;function AV(e,t,n){return e===n?!0:e===t?(oc=e,!0):!1}function CV(e,t,n){return e===n?(L1=e,!1):e===t?(L1!==null&&(oc=e),!0):!1}function $_(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function B1(e,t,n){for(var r=0,i=e;i;i=n(i))r++;i=0;for(var a=t;a;a=n(a))i++;for(;0<r-i;)e=n(e),r--;for(;0<i-r;)t=n(t),i--;for(;r--;){if(e===t||t!==null&&e===t.alternate)return e;e=n(e),t=n(t)}return null}var Rt=Object.assign,_V=Symbol.for("react.element"),Xm=Symbol.for("react.transitional.element"),fp=Symbol.for("react.portal"),sc=Symbol.for("react.fragment"),$k=Symbol.for("react.strict_mode"),z1=Symbol.for("react.profiler"),Dk=Symbol.for("react.consumer"),da=Symbol.for("react.context"),FE=Symbol.for("react.forward_ref"),F1=Symbol.for("react.suspense"),U1=Symbol.for("react.suspense_list"),UE=Symbol.for("react.memo"),Wo=Symbol.for("react.lazy"),H1=Symbol.for("react.activity"),NV=Symbol.for("react.legacy_hidden"),RV=Symbol.for("react.memo_cache_sentinel"),q1=Symbol.for("react.view_transition"),MV=Symbol.for("react.recoverable"),D_=Symbol.iterator;function Fd(e){return e===null||typeof e!="object"?null:(e=D_&&e[D_]||e["@@iterator"],typeof e=="function"?e:null)}var PV=Symbol.for("react.client.reference");function V1(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===PV?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case sc:return"Fragment";case z1:return"Profiler";case $k:return"StrictMode";case F1:return"Suspense";case U1:return"SuspenseList";case H1:return"Activity";case q1:return"ViewTransition"}if(typeof e=="object")switch(e.$$typeof){case fp:return"Portal";case da:return e.displayName||"Context";case Dk:return(e._context.displayName||"Context")+".Consumer";case FE:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case UE:return t=e.displayName||null,t!==null?t:V1(e.type)||"Memo";case Wo:t=e._payload,e=e._init;try{return V1(e(t))}catch{}}return null}var dp=Array.isArray,Pe=Ak.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,pt=EV.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Fl={pending:!1,data:null,method:null,action:null},G1=[],lc=-1;function _a(e){return{current:e}}function Vn(e){0>lc||(e.current=G1[lc],G1[lc]=null,lc--)}function kt(e,t){lc++,G1[lc]=e.current,e.current=t}var ba=_a(null),Xp=_a(null),bs=_a(null),$v=_a(null);function Dv(e,t){switch(kt(bs,t),kt(Xp,e),kt(ba,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?YN(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=YN(t),e=r5(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Vn(ba),kt(ba,e)}function uf(){Vn(ba),Vn(Xp),Vn(bs)}function K1(e){var t=e.memoizedState;t!==null&&(bf._currentValue=t.memoizedState,kt($v,e)),t=ba.current;var n=r5(t,e.type);t!==n&&(kt(Xp,e),kt(ba,n))}function Iv(e){Xp.current===e&&(Vn(ba),Vn(Xp)),$v.current===e&&(Vn($v),bf._currentValue=Fl)}var K0,I_;function Vo(e){if(K0===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);K0=t&&t[1]||"",I_=-1<n.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+K0+e+I_}var Y0=!1;function X0(e,t){if(!e||Y0)return"";Y0=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var d=function(){throw Error()};if(Object.defineProperty(d.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(d,[])}catch(b){var p=b}Reflect.construct(e,[],d)}else{try{d.call()}catch(b){p=b}d=!1;try{var h=Object.getOwnPropertyDescriptor(e.prototype,"props");Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),d=!0,new e}finally{d&&(h!==void 0?Object.defineProperty(e.prototype,"props",h):delete e.prototype.props)}}}else{try{throw Error()}catch(b){p=b}(d=e())&&typeof d.catch=="function"&&d.catch(function(){})}}catch(b){if(b&&p&&typeof b.stack=="string")return[b.stack,p.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var l=o.split(`
|
|
44
|
+
`),u=s.split(`
|
|
45
|
+
`);for(i=r=0;r<l.length&&!l[r].includes("DetermineComponentFrameRoot");)r++;for(;i<u.length&&!u[i].includes("DetermineComponentFrameRoot");)i++;if(r===l.length||i===u.length)for(r=l.length-1,i=u.length-1;1<=r&&0<=i&&l[r]!==u[i];)i--;for(;1<=r&&0<=i;r--,i--)if(l[r]!==u[i]){if(r!==1||i!==1)do if(r--,i--,0>i||l[r]!==u[i]){var f=`
|
|
46
|
+
`+l[r].replace(" at new "," at ");return e.displayName&&f.includes("<anonymous>")&&(f=f.replace("<anonymous>",e.displayName)),f}while(1<=r&&0<=i);break}}}finally{Y0=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Vo(n):""}function $V(e,t){switch(e.tag){case 26:case 27:case 5:return Vo(e.type);case 16:return Vo("Lazy");case 13:return e.child!==t&&t!==null?Vo("Suspense Fallback"):Vo("Suspense");case 19:return Vo("SuspenseList");case 0:case 15:return X0(e.type,!1);case 11:return X0(e.type.render,!1);case 1:return X0(e.type,!0);case 31:return Vo("Activity");case 30:return Vo("ViewTransition");default:return""}}function k_(e){try{var t="",n=null;do t+=$V(e,n),n=e,e=e.return;while(e);return t}catch(r){return`
|
|
47
|
+
Error generating stack: `+r.message+`
|
|
48
|
+
`+r.stack}}var Y1=Object.prototype.hasOwnProperty,HE=On.unstable_scheduleCallback,W0=On.unstable_cancelCallback,DV=On.unstable_shouldYield,IV=On.unstable_requestPaint,Qr=On.unstable_now,kV=On.unstable_getCurrentPriorityLevel,Ik=On.unstable_ImmediatePriority,kk=On.unstable_UserBlockingPriority,kv=On.unstable_NormalPriority,LV=On.unstable_LowPriority,Lk=On.unstable_IdlePriority,BV=On.log,zV=On.unstable_setDisableYieldValue,dm=null,Zr=null;function us(e){if(typeof BV=="function"&&zV(e),Zr&&typeof Zr.setStrictMode=="function")try{Zr.setStrictMode(dm,e)}catch{}}var Jr=Math.clz32?Math.clz32:HV,FV=Math.log,UV=Math.LN2;function HV(e){return e>>>=0,e===0?32:31-(FV(e)/UV|0)|0}var Wm=256,Qm=262144,Zm=4194304;function ml(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ub(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s!==0?(r=s&~a,r!==0?i=ml(r):(o&=s,o!==0?i=ml(o):n||(n=s&~e,n!==0&&(i=ml(n))))):(s=r&~a,s!==0?i=ml(s):o!==0?i=ml(o):n||(n=r&~e,n!==0&&(i=ml(n)))),i===0?0:t!==0&&t!==i&&!(t&a)&&(a=i&-i,n=t&-t,a>=n||a===32&&(n&4194048)!==0)?t:i}function pm(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Bk(e,t){t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var r=31-Jr(n),i=1<<r;t|=e[r],n&=~i}return t}function qV(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function zk(){var e=Zm;return Zm<<=1,!(Zm&62914560)&&(Zm=4194304),e}function Q0(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function hm(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function VV(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,l=e.expirationTimes,u=e.hiddenUpdates;for(n=o&~n;0<n;){var f=31-Jr(n),d=1<<f;s[f]=0,l[f]=-1;var p=u[f];if(p!==null)for(u[f]=null,f=0;f<p.length;f++){var h=p[f];h!==null&&(h.lane&=-536870913)}n&=~d}r!==0&&Fk(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function Fk(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Jr(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function Uk(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Jr(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function Hk(e,t){var n=t&-t;return n=n&42?1:qE(n),n&(e.suspendedLanes|t)?0:n}function qE(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function VE(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function qk(){var e=pt.p;return e!==0?e:(e=window.event,e===void 0?32:j5(e.type))}function L_(e,t){var n=pt.p;try{return pt.p=e,t()}finally{pt.p=n}}var To=Math.random().toString(36).slice(2),Hn="__reactFiber$"+To,Lr="__reactProps$"+To,sd="__reactContainer$"+To,B_="__reactEvents$"+To,GV="__reactListeners$"+To,KV="__reactHandles$"+To,z_="__reactResources$"+To,mm="__reactMarker$"+To,Lv="__reactLoad$"+To;function Hb(e){delete e[Hn],delete e[Lr],delete e[GV],delete e[KV]}function Sl(e){var t;if(t=e[Hn])return t;for(var n=e.parentNode;n;){if(t=n[sd]||n[Hn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=nR(e);e!==null;){if(n=e[Hn])return n;e=nR(e)}return t}e=n,n=e.parentNode}return null}function ld(e){if(e=e[Hn]||e[sd]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function pp(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(ne(33))}function Ec(e){var t=e[z_];return t||(t=e[z_]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Nn(e){e[mm]=!0}function Vk(e){e[Lv]=void 0}var Gk=new Set,Kk={};function Ou(e,t){cf(e,t),cf(e+"Capture",t)}function cf(e,t){for(Kk[e]=t,e=0;e<t.length;e++)Gk.add(t[e])}var YV=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),F_={},U_={};function XV(e){return Y1.call(U_,e)?!0:Y1.call(F_,e)?!1:YV.test(e)?U_[e]=!0:(F_[e]=!0,!1)}var lt=!1;function H_(){var e=lt;return lt=!1,e}function rv(e,t,n){if(XV(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var r=t.toLowerCase().slice(0,5);if(r!=="data-"&&r!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,n)}}function Jm(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,n)}}function ka(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,r)}}function Vr(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Yk(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function WV(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){n=""+o,a.call(this,o)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function X1(e){if(!e._valueTracker){var t=Yk(e)?"checked":"value";e._valueTracker=WV(e,t,""+e[t])}}function Xk(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Yk(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}var QV=/[\n"\\]/g;function bi(e){return e.replace(QV,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function W1(e,t,n,r,i,a,o,s){e.name="",o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?e.type=o:e.removeAttribute("type"),t!=null?o==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Vr(t)):e.value!==""+Vr(t)&&(e.value=""+Vr(t)):o!=="submit"&&o!=="reset"||e.removeAttribute("value"),t!=null?o==="number"&&e.value==t?Z0(e,Vr(e.value)):Z0(e,Vr(t)):n!=null?Z0(e,Vr(n)):r!=null&&e.removeAttribute("value"),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!="function"&&typeof i!="symbol"),s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"?e.name=""+Vr(s):e.removeAttribute("name")}function Wk(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!="function"&&typeof a!="symbol"&&typeof a!="boolean"&&(e.type=a),t!=null||n!=null){if(!(a!=="submit"&&a!=="reset"||t!=null)){X1(e);return}n=n!=null?""+Vr(n):"",t=t!=null?""+Vr(t):n,s||t===e.value||(e.value=t),e.defaultValue=t}r=r??i,r=typeof r!="function"&&typeof r!="symbol"&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.name=o),X1(e)}function Z0(e,t){e.defaultValue!==""+t&&(e.defaultValue=""+t)}function Tc(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Vr(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Qk(e,t,n){if(t!=null&&(t=""+Vr(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Vr(n):""}function Zk(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(ne(92));if(dp(r)){if(1<r.length)throw Error(ne(93));r=r[0]}n=r}n==null&&(n=""),t=n}n=Vr(t),e.defaultValue=n,r=e.textContent,r===n&&r!==""&&r!==null&&(e.value=r),X1(e)}function ff(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ZV=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function q_(e,t,n){var r=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?r?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":r?e.setProperty(t,n):typeof n!="number"||n===0||ZV.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function Jk(e,t,n){if(t!=null&&typeof t!="object")throw Error(ne(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf("--")===0?e.setProperty(r,""):r==="float"?e.cssFloat="":e[r]="",lt=!0);for(var i in t)r=t[i],t.hasOwnProperty(i)&&n[i]!==r&&(q_(e,i,r),lt=!0)}else for(var a in t)t.hasOwnProperty(a)&&q_(e,a,t[a])}function GE(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var JV=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["maskType","mask-type"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),eG=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function iv(e){return eG.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function pa(){}var Q1=null;function KE(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var uc=null,Ac=null;function V_(e){var t=ld(e);if(t&&(e=t.stateNode)){var n=e[Lr]||null;e:switch(e=t.stateNode,t.type){case"input":if(W1(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+bi(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=r[Lr]||null;if(!i)throw Error(ne(90));W1(r,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Xk(r)}break e;case"textarea":Qk(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&Tc(e,!!n.multiple,t,!1)}}}var J0=!1;function eL(e,t,n){if(J0)return e(t,n);J0=!0;try{var r=e(t);return r}finally{if(J0=!1,(uc!==null||Ac!==null)&&(rx(),uc&&(t=uc,e=Ac,Ac=uc=null,V_(t),e)))for(t=0;t<e.length;t++)V_(e[t])}}function Wp(e,t){var n=e.stateNode;if(n===null)return null;var r=n[Lr]||null;if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(ne(231,t,typeof n));return n}var fo=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Z1=!1;if(fo)try{var Ud={};Object.defineProperty(Ud,"passive",{get:function(){Z1=!0}}),window.addEventListener("test",Ud,Ud),window.removeEventListener("test",Ud,Ud)}catch{Z1=!1}var cs=null,YE=null,av=null;function tL(){if(av)return av;var e,t=YE,n=t.length,r,i="value"in cs?cs.value:cs.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return av=i.slice(e,1<r?1-r:void 0)}function ov(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function eg(){return!0}function G_(){return!1}function Or(e){function t(n,r,i,a,o){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=a,this.target=o,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(n=e[s],this[s]=n?n(a):a[s]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?eg:G_,this.isPropagationStopped=G_,this}return Rt(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=eg)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=eg)},persist:function(){},isPersistent:eg}),t}var qs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},qb=Or(qs),gm=Rt({},qs,{view:0,detail:0}),tG=Or(gm),ew,tw,Hd,Vb=Rt({},gm,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:XE,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Hd&&(Hd&&e.type==="mousemove"?(ew=e.screenX-Hd.screenX,tw=e.screenY-Hd.screenY):tw=ew=0,Hd=e),ew)},movementY:function(e){return"movementY"in e?e.movementY:tw}}),K_=Or(Vb),nG=Rt({},Vb,{dataTransfer:0}),rG=Or(nG),iG=Rt({},gm,{relatedTarget:0}),nw=Or(iG),aG=Rt({},qs,{animationName:0,elapsedTime:0,pseudoElement:0}),oG=Or(aG),sG=Rt({},qs,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),lG=Or(sG),uG=Rt({},qs,{data:0}),Y_=Or(uG),cG={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},fG={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},dG={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function pG(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=dG[e])?!!t[e]:!1}function XE(){return pG}var hG=Rt({},gm,{key:function(e){if(e.key){var t=cG[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ov(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?fG[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:XE,charCode:function(e){return e.type==="keypress"?ov(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ov(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),mG=Or(hG),gG=Rt({},Vb,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),X_=Or(gG),vG=Rt({},qs,{submitter:0}),yG=Or(vG),bG=Rt({},gm,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:XE}),xG=Or(bG),wG=Rt({},qs,{propertyName:0,elapsedTime:0,pseudoElement:0}),SG=Or(wG),OG=Rt({},Vb,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),jG=Or(OG),EG=Rt({},qs,{newState:0,oldState:0,source:0}),TG=Or(EG),AG=[9,13,27,32],WE=fo&&"CompositionEvent"in window,Ep=null;fo&&"documentMode"in document&&(Ep=document.documentMode);var CG=fo&&"TextEvent"in window&&!Ep,nL=fo&&(!WE||Ep&&8<Ep&&11>=Ep),W_=" ",Q_=!1;function rL(e,t){switch(e){case"keyup":return AG.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function iL(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var cc=!1;function _G(e,t){switch(e){case"compositionend":return iL(t);case"keypress":return t.which!==32?null:(Q_=!0,W_);case"textInput":return e=t.data,e===W_&&Q_?null:e;default:return null}}function NG(e,t){if(cc)return e==="compositionend"||!WE&&rL(e,t)?(e=tL(),av=YE=cs=null,cc=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return nL&&t.locale!=="ko"?null:t.data;default:return null}}var RG={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Z_(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!RG[e.type]:t==="textarea"}function aL(e,t,n,r){uc?Ac?Ac.push(r):Ac=[r]:uc=r,t=oy(t,"onChange"),0<t.length&&(n=new qb("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Tp=null,Qp=null;function MG(e){e5(e,0)}function Gb(e){var t=pp(e);if(Xk(t))return e}function J_(e,t){if(e==="change")return t}var oL=!1;if(fo){var rw;if(fo){var iw="oninput"in document;if(!iw){var eN=document.createElement("div");eN.setAttribute("oninput","return;"),iw=typeof eN.oninput=="function"}rw=iw}else rw=!1;oL=rw&&(!document.documentMode||9<document.documentMode)}function tN(){Tp&&(Tp.detachEvent("onpropertychange",sL),Qp=Tp=null)}function sL(e){if(e.propertyName==="value"&&Gb(Qp)){var t=[];aL(t,Qp,e,KE(e)),eL(MG,t)}}function PG(e,t,n){e==="focusin"?(tN(),Tp=t,Qp=n,Tp.attachEvent("onpropertychange",sL)):e==="focusout"&&tN()}function $G(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Gb(Qp)}function DG(e,t){if(e==="click")return Gb(t)}function IG(e,t){if(e==="input"||e==="change")return Gb(t)}function kG(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ri=typeof Object.is=="function"?Object.is:kG;function Zp(e,t){if(ri(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Y1.call(t,i)||!ri(e[i],t[i]))return!1}return!0}function J1(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function nN(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function rN(e,t){var n=nN(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=nN(n)}}function lL(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?lL(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function uL(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=J1(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=J1(e.document)}return t}function QE(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var LG=fo&&"documentMode"in document&&11>=document.documentMode,fc=null,eS=null,Ap=null,tS=!1;function iN(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;tS||fc==null||fc!==J1(r)||(r=fc,"selectionStart"in r&&QE(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Ap&&Zp(Ap,r)||(Ap=r,r=oy(eS,"onSelect"),0<r.length&&(t=new qb("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=fc)))}function ll(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var dc={animationend:ll("Animation","AnimationEnd"),animationiteration:ll("Animation","AnimationIteration"),animationstart:ll("Animation","AnimationStart"),transitionrun:ll("Transition","TransitionRun"),transitionstart:ll("Transition","TransitionStart"),transitioncancel:ll("Transition","TransitionCancel"),transitionend:ll("Transition","TransitionEnd")},aw={},cL={};fo&&(cL=document.createElement("div").style,"AnimationEvent"in window||(delete dc.animationend.animation,delete dc.animationiteration.animation,delete dc.animationstart.animation),"TransitionEvent"in window||delete dc.transitionend.transition);function ju(e){if(aw[e])return aw[e];if(!dc[e])return e;var t=dc[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in cL)return aw[e]=t[n];return e}var fL=ju("animationend"),dL=ju("animationiteration"),pL=ju("animationstart"),BG=ju("transitionrun"),zG=ju("transitionstart"),FG=ju("transitioncancel"),hL=ju("transitionend"),mL=new Map,nS="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");nS.push("scrollEnd");function Xi(e,t){mL.set(e,t),Ou(t,[e])}var UG=0;function po(e,t){if(e.name!=null&&e.name!=="auto")return e.name;if(t.autoName!==null)return t.autoName;e=Ui.identifierPrefix;var n=UG++;return e="_"+e+"t_"+n.toString(32)+"_",t.autoName=e}function aN(e){if(e==null||typeof e=="string")return e;var t=null,n=$c;if(n!==null)for(var r=0;r<n.length;r++){var i=e[n[r]];if(i!=null){if(i==="none")return"none";t=t==null?i:t+(" "+i)}}return t??e.default}function Ao(e,t){return e=aN(e),t=aN(t),t==null?e==="auto"?null:e:t==="auto"?null:t}var Bv=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},mi=[],pc=0,ZE=0;function Kb(){for(var e=pc,t=ZE=pc=0;t<e;){var n=mi[t];mi[t++]=null;var r=mi[t];mi[t++]=null;var i=mi[t];mi[t++]=null;var a=mi[t];if(mi[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&gL(n,i,a)}}function Yb(e,t,n,r){mi[pc++]=e,mi[pc++]=t,mi[pc++]=n,mi[pc++]=r,ZE|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function JE(e,t,n,r){return Yb(e,t,n,r),zv(e)}function Eu(e,t){return Yb(e,null,null,t),zv(e)}function gL(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Jr(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function zv(e){if(50<kp)throw kp=0,gv=null,Error(ne(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var hc={};function HG(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Pr(e,t,n,r){return new HG(e,t,n,r)}function eT(e){return e=e.prototype,!(!e||!e.isReactComponent)}function no(e,t){var n=e.alternate;return n===null?(n=Pr(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&1206910976,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function vL(e,t){e.flags&=1206910978;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function sv(e,t,n,r,i,a){var o=0;if(r=e,typeof r=="function")eT(r)&&(o=1);else if(typeof r=="string")o=vK(e,n,ba.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(r){case H1:return e=Pr(31,n,t,i),e.elementType=H1,e.lanes=a,e;case sc:return Ul(n.children,i,a,t);case $k:o=8,i|=24;break;case z1:return e=Pr(12,n,t,i|2),e.elementType=z1,e.lanes=a,e;case F1:return e=Pr(13,n,t,i),e.elementType=F1,e.lanes=a,e;case U1:return e=Pr(19,n,t,i),e.elementType=U1,e.lanes=a,e;case NV:case q1:return e=i|32,e=Pr(30,n,t,e),e.elementType=q1,e.lanes=a,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case da:o=10;break e;case Dk:o=9;break e;case FE:o=11;break e;case UE:o=14;break e;case Wo:o=16,r=null;break e}o=29,n=Error(ne(130,e===null?"null":typeof e,"")),r=null}return t=Pr(o,n,t,i),t.elementType=e,t.type=r,t.lanes=a,t}function Ul(e,t,n,r){return e=Pr(7,e,r,t),e.lanes=n,e}function ow(e,t,n){return e=Pr(6,e,null,t),e.lanes=n,e}function yL(e){var t=Pr(18,null,null,0);return t.stateNode=e,t}function sw(e,t,n){return t=Pr(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var oN=new WeakMap;function xi(e,t){if(typeof e=="object"&&e!==null){var n=oN.get(e);return n!==void 0?n:(t={value:e,source:t,stack:k_(t)},oN.set(e,t),t)}return{value:e,source:t,stack:k_(t)}}var mc=[],gc=0,Fv=null,Jp=0,vi=[],yi=0,$s=null,ha=1,ma="";function Ga(e,t){mc[gc++]=Jp,mc[gc++]=Fv,Fv=e,Jp=t}function bL(e,t,n){vi[yi++]=ha,vi[yi++]=ma,vi[yi++]=$s,$s=e;var r=ha;e=ma;var i=32-Jr(r)-1;r&=~(1<<i),n+=1;var a=32-Jr(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,ha=1<<32-Jr(t)+i|n<<i|r,ma=a+e}else ha=1<<a|n<<i|r,ma=e}function Xb(e){e.return!==null&&(Ga(e,1),bL(e,1,0))}function tT(e){for(;e===Fv;)Fv=mc[--gc],mc[gc]=null,Jp=mc[--gc],mc[gc]=null;for(;e===$s;)$s=vi[--yi],vi[yi]=null,ma=vi[--yi],vi[yi]=null,ha=vi[--yi],vi[yi]=null}function xL(e,t){vi[yi++]=ha,vi[yi++]=ma,vi[yi++]=$s,ha=t.id,ma=t.overflow,$s=e}var Mn=null,Dt=null,Ke=!1,xs=null,wi=!1,rS=Error(ne(519));function Ds(e){var t=Error(ne(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw eh(xi(t,e)),rS}function sN(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[Hn]=e,t[Lr]=r,n){case"dialog":Xe("cancel",t),Xe("close",t);break;case"iframe":case"object":case"embed":Xe("load",t);break;case"video":case"audio":for(n=0;n<ih.length;n++)Xe(ih[n],t);break;case"source":Xe("error",t);break;case"img":case"image":case"link":Xe("error",t),Xe("load",t);break;case"details":Xe("toggle",t);break;case"input":Xe("invalid",t),Wk(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":Xe("invalid",t);break;case"textarea":Xe("invalid",t),Zk(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||r.suppressHydrationWarning===!0||n5(t.textContent,n)?(r.popover!=null&&(Xe("beforetoggle",t),Xe("toggle",t)),r.onScroll!=null&&Xe("scroll",t),r.onScrollEnd!=null&&Xe("scrollend",t),r.onClick!=null&&(t.onclick=pa),t=!0):t=!1,t||Ds(e,!0)}function Uv(e){for(Mn=e.return;Mn;)switch(Mn.tag){case 5:case 31:case 13:wi=!1;return;case 27:case 3:wi=!0;return;default:Mn=Mn.return}}function Uu(e){if(e!==Mn)return!1;if(!Ke)return Uv(e),Ke=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||FS(e.type,e.memoizedProps)),n=!n),n&&Dt&&Ds(e),Uv(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(ne(317));Dt=tR(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(ne(317));Dt=tR(e)}else t===27?(t=Dt,Vs(e.type)?(e=VS,VS=null,Dt=e):Dt=t):Dt=Mn?Ei(e.stateNode.nextSibling):null;return!0}function Zl(){Dt=Mn=null,Ke=!1}function lw(){var e=xs;return e!==null&&(Nr===null?Nr=e:Nr.push.apply(Nr,e),xs=null),e}function eh(e){xs===null?xs=[e]:xs.push(e)}var iS=_a(null),Tu=null,Qa=null;function fs(e,t,n){kt(iS,t._currentValue),t._currentValue=n}function ro(e){e._currentValue=iS.current,Vn(iS)}function lv(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function aS(e,t,n,r){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var a=i.dependencies;if(a!==null){var o=i.child;a=a.firstContext;e:for(;a!==null;){var s=a;a=i;for(var l=0;l<t.length;l++)if(s.context===t[l]){a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),lv(a.return,n,e),r||(o=null);break e}a=s.next}}else if(i.tag===18){if(o=i.return,o===null)throw Error(ne(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),lv(o,n,e),o=null}else i.tag===13&&i.memoizedState!==null&&i.memoizedState.dehydrated===null?(i.lanes|=n,o=i.alternate,o!==null&&(o.lanes|=n),lv(i.return,n,e),o=i.child,o=o!==null?o.sibling:null):o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===e){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}}function Jl(e,t,n,r){e=null;for(var i=t,a=!1;i!==null;){if(!a){if(i.flags&524288)a=!0;else if(i.flags&262144)break}if(i.tag===10){var o=i.alternate;if(o===null)throw Error(ne(387));if(o=o.memoizedProps,o!==null){var s=i.type;ri(i.pendingProps.value,o.value)||(e!==null?e.push(s):e=[s])}}else if(i===$v.current){if(o=i.alternate,o===null)throw Error(ne(387));o.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e!==null?e.push(bf):e=[bf])}i=i.return}return e!==null&&aS(t,e,n,r),t.flags|=262144,e!==null}function Hv(e){for(e=e.firstContext;e!==null;){if(!ri(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function eu(e){Tu=e,Qa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function qn(e){return wL(Tu,e)}function tg(e,t){return Tu===null&&eu(e),wL(e,t)}function wL(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Qa===null){if(e===null)throw Error(ne(308));Qa=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Qa=Qa.next=t;return n}var qG=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,r){e.push(r)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},VG=On.unstable_scheduleCallback,GG=On.unstable_NormalPriority,sn={$$typeof:da,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function nT(){return{controller:new qG,data:new Map,refCount:0}}function vm(e){e.refCount--,e.refCount===0&&VG(GG,function(){e.controller.abort()})}function lN(e,t){if(e.pendingLanes&4194048){var n=e.transitionTypes;for(n===null&&(n=e.transitionTypes=[]),e=0;e<t.length;e++){var r=t[e];n.indexOf(r)===-1&&n.push(r)}}}var hp=null;function KG(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var Cp=null,oS=0,tu=0,Cc=null;function YG(e,t){if(Cp===null){var n=Cp=[];oS=0,tu=NT(),Cc={status:"pending",value:void 0,then:function(r){n.push(r)}}}return oS++,t.then(uN,uN),t}function uN(){if(--oS===0&&(hp=null,Cp!==null)){Cc!==null&&(Cc.status="fulfilled");var e=Cp;Cp=null,tu=0,Cc=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function XG(e,t){var n=[],r={status:"pending",value:null,reason:null,then:function(i){n.push(i)}};return e.then(function(){r.status="fulfilled",r.value=t;for(var i=0;i<n.length;i++)(0,n[i])(t)},function(i){for(r.status="rejected",r.reason=i,i=0;i<n.length;i++)(0,n[i])(void 0)}),r}var cN=Pe.S;Pe.S=function(e,t){if(B3=Qr(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&YG(e,t),hp!==null)for(var n=gf;n!==null;)lN(n,hp),n=n.next;if(n=e.types,n!==null){for(var r=gf;r!==null;)lN(r,n),r=r.next;if(tu!==0){r=hp,r===null&&(r=hp=[]);for(var i=0;i<n.length;i++){var a=n[i];r.indexOf(a)===-1&&r.push(a)}}}cN!==null&&cN(e,t)};var Hl=_a(null);function rT(){var e=Hl.current;return e!==null?e:_t.pooledCache}function uv(e,t){t===null?kt(Hl,Hl.current):kt(Hl,t.pool)}function SL(){var e=rT();return e===null?null:{parent:sn._currentValue,pool:e}}var ud=Error(ne(460)),iT=Error(ne(474)),Wb=Error(ne(542)),qv={then:function(){}};function fN(e){return e=e.status,e==="fulfilled"||e==="rejected"}function OL(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(pa,pa),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,pN(e),e===void 0&&!("reason"in t)?Error(ne(600)):e;default:if(typeof t.status=="string")t.then(pa,pa);else{if(e=_t,e!==null&&100<e.shellSuspendCounter)throw Error(ne(482));e=t,e.status="pending",e.then(function(r){if(t.status==="pending"){var i=t;i.status="fulfilled",i.value=r}},function(r){if(t.status==="pending"){var i=t;i.status="rejected",i.reason=r}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,pN(e),e}throw ql=t,ud}}function gl(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(ql=n,ud):n}}var ql=null;function dN(){if(ql===null)throw Error(ne(459));var e=ql;return ql=null,e}function pN(e){if(e===ud||e===Wb)throw Error(ne(483))}var _c=null,th=0;function ng(e){var t=th;return th+=1,_c===null&&(_c=[]),OL(_c,e,t)}function Ho(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function rg(e,t){throw t.$$typeof===_V?Error(ne(525)):(e=Object.prototype.toString.call(t),Error(ne(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function jL(e){function t(y,v){if(e){var w=y.deletions;w===null?(y.deletions=[v],y.flags|=16):w.push(v)}}function n(y,v){if(!e)return null;for(;v!==null;)t(y,v),v=v.sibling;return null}function r(y){for(var v=new Map;y!==null;)y.key===null?v.set(y.index,y):v.set(y.key,y),y=y.sibling;return v}function i(y,v){return y=no(y,v),y.index=0,y.sibling=null,y}function a(y,v,w){return y.index=w,e?(w=y.alternate,w!==null?(w=w.index,w<v?(y.flags|=2,v):w):(y.flags|=134217730,v)):(y.flags|=1048576,v)}function o(y){return e&&y.alternate===null&&(y.flags|=134217730),y}function s(y,v,w,S){return v===null||v.tag!==6?(v=ow(w,y.mode,S),v.return=y,v):(v=i(v,w),v.return=y,v)}function l(y,v,w,S){var O=w.type;return O===sc?(y=f(y,v,w.props.children,S,w.key),Ho(y,w),y):v!==null&&(v.elementType===O||typeof O=="object"&&O!==null&&O.$$typeof===Wo&&gl(O)===v.type)?(v=i(v,w.props),Ho(v,w),v.return=y,v):(v=sv(w.type,w.key,w.props,null,y.mode,S),Ho(v,w),v.return=y,v)}function u(y,v,w,S){return v===null||v.tag!==4||v.stateNode.containerInfo!==w.containerInfo||v.stateNode.implementation!==w.implementation?(v=sw(w,y.mode,S),v.return=y,v):(v=i(v,w.children||[]),v.return=y,v)}function f(y,v,w,S,O){return v===null||v.tag!==7?(v=Ul(w,y.mode,S,O),v.return=y,v):(v=i(v,w),v.return=y,v)}function d(y,v,w){if(typeof v=="string"&&v!==""||typeof v=="number"||typeof v=="bigint")return v=ow(""+v,y.mode,w),v.return=y,v;if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Xm:return w=sv(v.type,v.key,v.props,null,y.mode,w),Ho(w,v),w.return=y,w;case fp:return v=sw(v,y.mode,w),v.return=y,v;case Wo:return v=gl(v),d(y,v,w)}if(dp(v)||Fd(v))return v=Ul(v,y.mode,w,null),v.return=y,v;if(typeof v.then=="function")return d(y,ng(v),w);if(v.$$typeof===da)return d(y,tg(y,v),w);rg(y,v)}return null}function p(y,v,w,S){var O=v!==null?v.key:null;if(typeof w=="string"&&w!==""||typeof w=="number"||typeof w=="bigint")return O!==null?null:s(y,v,""+w,S);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case Xm:return w.key===O?l(y,v,w,S):null;case fp:return w.key===O?u(y,v,w,S):null;case Wo:return w=gl(w),p(y,v,w,S)}if(dp(w)||Fd(w))return O!==null?null:f(y,v,w,S,null);if(typeof w.then=="function")return p(y,v,ng(w),S);if(w.$$typeof===da)return p(y,v,tg(y,w),S);rg(y,w)}return null}function h(y,v,w,S,O){if(typeof S=="string"&&S!==""||typeof S=="number"||typeof S=="bigint")return y=y.get(w)||null,s(v,y,""+S,O);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case Xm:return y=y.get(S.key===null?w:S.key)||null,l(v,y,S,O);case fp:return y=y.get(S.key===null?w:S.key)||null,u(v,y,S,O);case Wo:return S=gl(S),h(y,v,w,S,O)}if(dp(S)||Fd(S))return y=y.get(w)||null,f(v,y,S,O,null);if(typeof S.then=="function")return h(y,v,w,ng(S),O);if(S.$$typeof===da)return h(y,v,w,tg(v,S),O);rg(v,S)}return null}function b(y,v,w,S){for(var O=null,j=null,E=v,T=v=0,A=null;E!==null&&T<w.length;T++){E.index>T?(A=E,E=null):A=E.sibling;var C=p(y,E,w[T],S);if(C===null){E===null&&(E=A);break}e&&E&&C.alternate===null&&t(y,E),v=a(C,v,T),j===null?O=C:j.sibling=C,j=C,E=A}if(T===w.length)return n(y,E),Ke&&Ga(y,T),O;if(E===null){for(;T<w.length;T++)E=d(y,w[T],S),E!==null&&(v=a(E,v,T),j===null?O=E:j.sibling=E,j=E);return Ke&&Ga(y,T),O}for(E=r(E);T<w.length;T++)A=h(E,y,T,w[T],S),A!==null&&(e&&(C=A.alternate,C!==null&&E.delete(C.key===null?T:C.key)),v=a(A,v,T),j===null?O=A:j.sibling=A,j=A);return e&&E.forEach(function(_){return t(y,_)}),Ke&&Ga(y,T),O}function m(y,v,w,S){if(w==null)throw Error(ne(151));for(var O=null,j=null,E=v,T=v=0,A=null,C=w.next();E!==null&&!C.done;T++,C=w.next()){E.index>T?(A=E,E=null):A=E.sibling;var _=p(y,E,C.value,S);if(_===null){E===null&&(E=A);break}e&&E&&_.alternate===null&&t(y,E),v=a(_,v,T),j===null?O=_:j.sibling=_,j=_,E=A}if(C.done)return n(y,E),Ke&&Ga(y,T),O;if(E===null){for(;!C.done;T++,C=w.next())C=d(y,C.value,S),C!==null&&(v=a(C,v,T),j===null?O=C:j.sibling=C,j=C);return Ke&&Ga(y,T),O}for(E=r(E);!C.done;T++,C=w.next())C=h(E,y,T,C.value,S),C!==null&&(e&&(A=C.alternate,A!==null&&E.delete(A.key===null?T:A.key)),v=a(C,v,T),j===null?O=C:j.sibling=C,j=C);return e&&E.forEach(function(N){return t(y,N)}),Ke&&Ga(y,T),O}function g(y,v,w,S){if(typeof w=="object"&&w!==null&&w.type===sc&&w.key===null&&w.props.ref===void 0&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case Xm:e:{for(var O=w.key;v!==null;){if(v.key===O){if(O=w.type,O===sc){if(v.tag===7){n(y,v.sibling),S=i(v,w.props.children),Ho(S,w),S.return=y,y=S;break e}}else if(v.elementType===O||typeof O=="object"&&O!==null&&O.$$typeof===Wo&&gl(O)===v.type){n(y,v.sibling),S=i(v,w.props),Ho(S,w),S.return=y,y=S;break e}n(y,v);break}else t(y,v);v=v.sibling}w.type===sc?(S=Ul(w.props.children,y.mode,S,w.key),Ho(S,w),S.return=y,y=S):(S=sv(w.type,w.key,w.props,null,y.mode,S),Ho(S,w),S.return=y,y=S)}return o(y);case fp:e:{for(O=w.key;v!==null;){if(v.key===O)if(v.tag===4&&v.stateNode.containerInfo===w.containerInfo&&v.stateNode.implementation===w.implementation){n(y,v.sibling),S=i(v,w.children||[]),S.return=y,y=S;break e}else{n(y,v);break}else t(y,v);v=v.sibling}S=sw(w,y.mode,S),S.return=y,y=S}return o(y);case Wo:return w=gl(w),g(y,v,w,S)}if(dp(w))return b(y,v,w,S);if(Fd(w)){if(O=Fd(w),typeof O!="function")throw Error(ne(150));return w=O.call(w),m(y,v,w,S)}if(typeof w.then=="function")return g(y,v,ng(w),S);if(w.$$typeof===da)return g(y,v,tg(y,w),S);rg(y,w)}return typeof w=="string"&&w!==""||typeof w=="number"||typeof w=="bigint"?(w=""+w,v!==null&&v.tag===6?(n(y,v.sibling),S=i(v,w),S.return=y,y=S):(n(y,v),S=ow(w,y.mode,S),S.return=y,y=S),o(y)):n(y,v)}return function(y,v,w,S){try{th=0;var O=g(y,v,w,S);return _c=null,O}catch(E){if(E===ud||E===Wb)throw E;var j=Pr(29,E,null,y.mode);return j.lanes=S,j.return=y,j}finally{}}}var nu=jL(!0),EL=jL(!1),Qo=!1;function aT(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function sS(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ws(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ss(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ft&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=zv(e),gL(e,null,n),t}return Yb(e,r,t,n),zv(e)}function _p(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Uk(e,n)}}function uw(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var lS=!1;function Np(){if(lS){var e=Cc;if(e!==null)throw e}}function Rp(e,t,n,r){lS=!1;var i=e.updateQueue;Qo=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var l=s,u=l.next;l.next=null,o===null?a=u:o.next=u,o=l;var f=e.alternate;f!==null&&(f=f.updateQueue,s=f.lastBaseUpdate,s!==o&&(s===null?f.firstBaseUpdate=u:s.next=u,f.lastBaseUpdate=l))}if(a!==null){var d=i.baseState;o=0,f=u=l=null,s=a;do{var p=s.lane&-536870913,h=p!==s.lane;if(h?(Je&p)===p:(r&p)===p){p!==0&&p===tu&&(lS=!0),f!==null&&(f=f.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});e:{var b=e,m=s;p=t;var g=n;switch(m.tag){case 1:if(b=m.payload,typeof b=="function"){d=b.call(g,d,p);break e}d=b;break e;case 3:b.flags=b.flags&-65537|128;case 0:if(b=m.payload,p=typeof b=="function"?b.call(g,d,p):b,p==null)break e;d=Rt({},d,p);break e;case 2:Qo=!0}}p=s.callback,p!==null&&(e.flags|=64,h&&(e.flags|=8192),h=i.callbacks,h===null?i.callbacks=[p]:h.push(p))}else h={lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},f===null?(u=f=h,l=d):f=f.next=h,o|=p;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;h=s,s=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(!0);f===null&&(l=d),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=f,a===null&&(i.shared.lanes=0),Ls|=o,e.lanes=o,e.memoizedState=d}}function TL(e,t){if(typeof e!="function")throw Error(ne(191,e));e.call(t)}function AL(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)TL(n[e],t)}var Is=_a(null),Vv=_a(0);function hN(e,t){e=vo,kt(Vv,e),kt(Is,t),vo=e|t.baseLanes}function uS(){kt(Vv,vo),kt(Is,Is.current)}function oT(){vo=Vv.current,Vn(Is),Vn(Vv)}var Xn=_a(null),ar=null;function Os(e){var t=e.alternate;kt(Gn,Gn.current&1),kt(Xn,e),ar===null&&(t===null||Is.current!==null||t.memoizedState!==null)&&(ar=e)}function cS(e){kt(Gn,Gn.current),kt(Xn,e),ar===null&&(ar=e)}function CL(e){e.tag===22?(kt(Gn,Gn.current),kt(Xn,e),ar===null&&(ar=e)):js()}function js(){kt(Gn,Gn.current),kt(Xn,Xn.current)}function Gr(e){Vn(Xn),ar===e&&(ar=null),Vn(Gn)}var Gn=_a(0);function nh(e,t){kt(Xn,Xn.current),kt(Gn,t)}function sT(e){Vn(Gn),Vn(Xn),ar===e&&(ar=null)}function Gv(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||qS(n)||$T(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!=="independent"){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ho=0,qe=null,jt=null,on=null,Kv=!1,Nc=!1,ru=!1,Yv=0,rh=0,Rc=null,WG=0;function Qt(){throw Error(ne(321))}function lT(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!ri(e[n],t[n]))return!1;return!0}function uT(e,t,n,r,i,a){return ho=a,qe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Pe.H=e===null||e.memoizedState===null?a3:o3,ru=!1,a=n(r,i),ru=!1,Nc&&(a=NL(t,n,r,i)),_L(e),a}function _L(e){Pe.H=Xv;var t=jt!==null&&jt.next!==null;if(ho=0,on=jt=qe=null,Kv=!1,rh=0,Rc=null,t)throw Error(ne(300));e===null||un||(e=e.dependencies,e!==null&&Hv(e)&&(un=!0))}function NL(e,t,n,r){qe=e;var i=0;do{if(Nc&&(Rc=null),rh=0,Nc=!1,25<=i)throw Error(ne(301));if(i+=1,on=jt=null,e.updateQueue!=null){var a=e.updateQueue;a.lastEffect=null,a.events=null,a.stores=null,a.memoCache!=null&&(a.memoCache.index=0)}Pe.H=i9,a=t(n,r)}while(Nc);return a}function QG(){var e=Pe.H,t=e.useState()[0];return t=typeof t.then=="function"?ym(t):t,e=e.useState()[0],(jt!==null?jt.memoizedState:null)!==e&&(qe.flags|=1024),t}function cT(){var e=Yv!==0;return Yv=0,e}function fT(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function dT(e){if(Kv){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Kv=!1}ho=0,on=jt=qe=null,Nc=!1,rh=Yv=0,Rc=null}function vr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return on===null?qe.memoizedState=on=e:on=on.next=e,on}function rn(){if(jt===null){var e=qe.alternate;e=e!==null?e.memoizedState:null}else e=jt.next;var t=on===null?qe.memoizedState:on.next;if(t!==null)on=t,jt=e;else{if(e===null)throw qe.alternate===null?Error(ne(467)):Error(ne(310));jt=e,e={memoizedState:jt.memoizedState,baseState:jt.baseState,baseQueue:jt.baseQueue,queue:jt.queue,next:null},on===null?qe.memoizedState=on=e:on=on.next=e}return on}function Qb(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ym(e){var t=rh;return rh+=1,Rc===null&&(Rc=[]),e=OL(Rc,e,t),t=qe,(on===null?t.memoizedState:on.next)===null&&(t=t.alternate,Pe.H=t===null||t.memoizedState===null?a3:o3),e}function Zb(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ym(e);if(e.$$typeof===MV)return;if(e.$$typeof===da)return qn(e)}throw Error(ne(438,String(e)))}function pT(e){var t=null,n=qe.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=qe.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(i){return i.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=Qb(),qe.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=RV;return t.index++,n}function mo(e,t){return typeof t=="function"?t(e):t}function cv(e){var t=rn();return hT(t,jt,e)}function hT(e,t,n){var r=e.queue;if(r===null)throw Error(ne(311));r.lastRenderedReducer=n;var i=e.baseQueue,a=r.pending;if(a!==null){if(i!==null){var o=i.next;i.next=a.next,a.next=o}t.baseQueue=i=a,r.pending=null}if(a=e.baseState,i===null)e.memoizedState=a;else{t=i.next;var s=o=null,l=null,u=t,f=!1;do{var d=u.lane&-536870913;if(d!==u.lane?(Je&d)===d:(ho&d)===d){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),d===tu&&(f=!0);else if((ho&p)===p){u=u.next,p===tu&&(f=!0);continue}else d={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(s=l=d,o=a):l=l.next=d,qe.lanes|=p,Ls|=p;d=u.action,ru&&n(a,d),a=u.hasEagerState?u.eagerState:n(a,d)}else p={lane:d,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(s=l=p,o=a):l=l.next=p,qe.lanes|=d,Ls|=d;u=u.next}while(u!==null&&u!==t);if(l===null?o=a:l.next=s,!ri(a,e.memoizedState)&&(un=!0,f&&(n=Cc,n!==null)))throw n;e.memoizedState=a,e.baseState=o,e.baseQueue=l,r.lastRenderedState=a}return i===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function cw(e){var t=rn(),n=t.queue;if(n===null)throw Error(ne(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,a=t.memoizedState;if(i!==null){n.pending=null;var o=i=i.next;do a=e(a,o.action),o=o.next;while(o!==i);ri(a,t.memoizedState)||(un=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function RL(e,t,n){var r=qe,i=rn(),a=Ke;if(a){if(n===void 0)throw Error(ne(407));n=n()}else n=t();var o=!ri((jt||i).memoizedState,n);if(o&&(i.memoizedState=n,un=!0),i=i.queue,mT($L.bind(null,r,i,e),[e]),e=i.getSnapshot!==t||o||on!==null&&(on.memoizedState.tag&1)!==0,df(e?9:8,{destroy:void 0},PL.bind(null,r,i,n,t),null),e){if(r.flags|=2048,_t===null)throw Error(ne(349));a||ho&127||ML(r,t,n)}return n}function ML(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=qe.updateQueue,t===null?(t=Qb(),qe.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function PL(e,t,n,r){t.value=n,t.getSnapshot=r,DL(t)&&IL(e)}function $L(e,t,n){return n(function(){DL(t)&&IL(e)})}function DL(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!ri(e,n)}catch{return!0}}function IL(e){var t=Eu(e,2);t!==null&&Dr(t,e,2)}function fS(e){var t=vr();if(typeof e=="function"){var n=e;if(e=n(),ru){us(!0);try{n()}finally{us(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:mo,lastRenderedState:e},t}function kL(e,t,n,r){return e.baseState=n,hT(e,jt,typeof r=="function"?r:mo)}function ZG(e,t,n,r,i){if(ex(e))throw Error(ne(485));if(e=t.action,e!==null){var a={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(o){a.listeners.push(o)}};Pe.T!==null?n(!0):a.isTransition=!1,r(a),n=t.pending,n===null?(a.next=t.pending=a,LL(t,a)):(a.next=n.next,t.pending=n.next=a)}}function LL(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=Pe.T,o={};o.types=a!==null?a.types:null,Pe.T=o;try{var s=n(i,r),l=Pe.S;l!==null&&l(o,s),mN(e,t,s)}catch(u){dS(e,t,u)}finally{a!==null&&o.types!==null&&(a.types=o.types),Pe.T=a}}else try{a=n(i,r),mN(e,t,a)}catch(u){dS(e,t,u)}}function mN(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(r){gN(e,t,r)},function(r){return dS(e,t,r)}):gN(e,t,n)}function gN(e,t,n){t.status="fulfilled",t.value=n,BL(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,LL(e,n)))}function dS(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status="rejected",t.reason=n,BL(t),t=t.next;while(t!==r)}e.action=null}function BL(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function zL(e,t){return t}function vN(e,t){if(Ke){var n=_t.formState;if(n!==null){e:{var r=qe;if(Ke){if(Dt){t:{for(var i=Dt,a=wi;i.nodeType!==8;){if(!a){i=null;break t}if(i=Ei(i.nextSibling),i===null){i=null;break t}}a=i.data,i=a==="F!"||a==="F"?i:null}if(i){Dt=Ei(i.nextSibling),r=i.data==="F!";break e}}Ds(r)}r=!1}r&&(t=n[0])}}return n=vr(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:zL,lastRenderedState:t},n.queue=r,n=n3.bind(null,qe,r),r.dispatch=n,r=fS(!1),a=bT.bind(null,qe,!1,r.queue),r=vr(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=ZG.bind(null,qe,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function yN(e){var t=rn();return FL(t,jt,e)}function FL(e,t,n){if(t=hT(e,t,zL)[0],e=cv(mo)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var r=ym(t)}catch(o){throw o===ud?Wb:o}else r=t;t=rn();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(qe.flags|=2048,df(9,{destroy:void 0},JG.bind(null,i,n),null)),[r,a,e]}function JG(e,t){e.action=t}function bN(e){var t=rn(),n=jt;if(n!==null)return FL(t,n,e);rn(),t=t.memoizedState,n=rn();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function df(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=qe.updateQueue,t===null&&(t=Qb(),qe.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function UL(){return rn().memoizedState}function fv(e,t,n,r){var i=vr();qe.flags|=e,i.memoizedState=df(1|t,{destroy:void 0},n,r===void 0?null:r)}function Jb(e,t,n,r){var i=rn();r=r===void 0?null:r;var a=i.memoizedState.inst;jt!==null&&r!==null&&lT(r,jt.memoizedState.deps)?i.memoizedState=df(t,a,n,r):(qe.flags|=e,i.memoizedState=df(1|t,a,n,r))}function xN(e,t){fv(8390656,8,e,t)}function mT(e,t){Jb(2048,8,e,t)}function e9(e){qe.flags|=4;var t=qe.updateQueue;if(t===null)t=Qb(),qe.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function HL(e){var t=rn().memoizedState;return e9({ref:t,nextImpl:e}),function(){if(ft&2)throw Error(ne(440));return t.impl.apply(void 0,arguments)}}function qL(e,t){return Jb(4,2,e,t)}function VL(e,t){return Jb(4,4,e,t)}function GL(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function KL(e,t,n){n=n!=null?n.concat([e]):null,Jb(4,4,GL.bind(null,t,e),n)}function gT(){}function YL(e,t){var n=rn();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&lT(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function XL(e,t){var n=rn();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&lT(t,r[1]))return r[0];if(r=e(),ru){us(!0);try{e()}finally{us(!1)}}return n.memoizedState=[r,t],r}function vT(e,t,n){return n===void 0||ho&1073741824&&!(Je&261930)?e.memoizedState=t:(e.memoizedState=n,e=F3(),qe.lanes|=e,Ls|=e,n)}function WL(e,t,n,r){return ri(n,t)?n:Is.current!==null?(e=vT(e,n,r),ri(e,t)||(un=!0),e):!(ho&106)||ho&1073741824&&!(Je&261930)?(un=!0,e.memoizedState=n):(e=F3(),qe.lanes|=e,Ls|=e,t)}function QL(e,t,n,r,i){var a=pt.p;pt.p=a!==0&&8>a?a:8;var o=Pe.T,s={};s.types=o!==null?o.types:null,Pe.T=s,bT(e,!1,t,n);try{var l=i(),u=Pe.S;if(u!==null&&u(s,l),l!==null&&typeof l=="object"&&typeof l.then=="function"){var f=XG(l,r);Mp(e,t,f,ei(e))}else Mp(e,t,r,ei(e))}catch(d){Mp(e,t,{then:function(){},status:"rejected",reason:d},ei())}finally{pt.p=a,o!==null&&s.types!==null&&(o.types=s.types),Pe.T=o}}function t9(){}function pS(e,t,n,r){if(e.tag!==5)throw Error(ne(476));var i=ZL(e).queue;QL(e,i,t,Fl,n===null?t9:function(){return JL(e),n(r)})}function ZL(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Fl,baseState:Fl,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:mo,lastRenderedState:Fl},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:mo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function JL(e){var t=ZL(e);t.next===null&&(t=e.alternate.memoizedState),Mp(e,t.next.queue,{},ei())}function yT(){return qn(bf)}function e3(){return rn().memoizedState}function t3(){return rn().memoizedState}function n9(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=ei();e=ws(n);var r=Ss(t,e,n);r!==null&&(Dr(r,t,n),_p(r,t,n)),t={cache:nT()},e.payload=t;return}t=t.return}}function r9(e,t,n){var r=ei();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},ex(e)?r3(t,n):(n=JE(e,t,n,r),n!==null&&(Dr(n,e,r),i3(n,t,r)))}function n3(e,t,n){var r=ei();Mp(e,t,n,r)}function Mp(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(ex(e))r3(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,ri(s,o))return Yb(e,t,i,0),_t===null&&Kb(),!1}catch{}finally{}if(n=JE(e,t,i,r),n!==null)return Dr(n,e,r),i3(n,t,r),!0}return!1}function bT(e,t,n,r){if(r={lane:2,revertLane:NT(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},ex(e)){if(t)throw Error(ne(479))}else t=JE(e,n,r,2),t!==null&&Dr(t,e,2)}function ex(e){var t=e.alternate;return e===qe||t!==null&&t===qe}function r3(e,t){Nc=Kv=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function i3(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Uk(e,n)}}var Xv={readContext:qn,use:Zb,useCallback:Qt,useContext:Qt,useEffect:Qt,useImperativeHandle:Qt,useLayoutEffect:Qt,useInsertionEffect:Qt,useMemo:Qt,useReducer:Qt,useRef:Qt,useState:Qt,useDebugValue:Qt,useDeferredValue:Qt,useTransition:Qt,useSyncExternalStore:Qt,useId:Qt,useHostTransitionStatus:Qt,useFormState:Qt,useActionState:Qt,useOptimistic:Qt,useMemoCache:Qt,useCacheRefresh:Qt,useEffectEvent:Qt},a3={readContext:qn,use:Zb,useCallback:function(e,t){return vr().memoizedState=[e,t===void 0?null:t],e},useContext:qn,useEffect:xN,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,fv(4194308,4,GL.bind(null,t,e),n)},useLayoutEffect:function(e,t){return fv(4194308,4,e,t)},useInsertionEffect:function(e,t){fv(4,2,e,t)},useMemo:function(e,t){var n=vr();t=t===void 0?null:t;var r=e();if(ru){us(!0);try{e()}finally{us(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=vr();if(n!==void 0){var i=n(t);if(ru){us(!0);try{n(t)}finally{us(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=r9.bind(null,qe,e),[r.memoizedState,e]},useRef:function(e){var t=vr();return e={current:e},t.memoizedState=e},useState:function(e){e=fS(e);var t=e.queue,n=n3.bind(null,qe,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:gT,useDeferredValue:function(e,t){var n=vr();return vT(n,e,t)},useTransition:function(){var e=fS(!1);return e=QL.bind(null,qe,e.queue,!0,!1),vr().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=qe,i=vr();if(Ke){if(n===void 0)throw Error(ne(407));n=n()}else{if(n=t(),_t===null)throw Error(ne(349));Je&127||ML(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,xN($L.bind(null,r,a,e),[e]),r.flags|=2048,df(9,{destroy:void 0},PL.bind(null,r,a,n,t),null),n},useId:function(){var e=vr(),t=_t.identifierPrefix;if(Ke){var n=ma,r=ha;n=(r&~(1<<32-Jr(r)-1)).toString(32)+n,t="_"+t+"R_"+n,n=Yv++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=WG++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:yT,useFormState:vN,useActionState:vN,useOptimistic:function(e){var t=vr();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=bT.bind(null,qe,!0,n),n.dispatch=t,[e,t]},useMemoCache:pT,useCacheRefresh:function(){return vr().memoizedState=n9.bind(null,qe)},useEffectEvent:function(e){var t=vr(),n={impl:e};return t.memoizedState=n,function(){if(ft&2)throw Error(ne(440));return n.impl.apply(void 0,arguments)}}},o3={readContext:qn,use:Zb,useCallback:YL,useContext:qn,useEffect:mT,useImperativeHandle:KL,useInsertionEffect:qL,useLayoutEffect:VL,useMemo:XL,useReducer:cv,useRef:UL,useState:function(){return cv(mo)},useDebugValue:gT,useDeferredValue:function(e,t){var n=rn();return WL(n,jt.memoizedState,e,t)},useTransition:function(){var e=cv(mo)[0],t=rn().memoizedState;return[typeof e=="boolean"?e:ym(e),t]},useSyncExternalStore:RL,useId:e3,useHostTransitionStatus:yT,useFormState:yN,useActionState:yN,useOptimistic:function(e,t){var n=rn();return kL(n,jt,e,t)},useMemoCache:pT,useCacheRefresh:t3,useEffectEvent:HL},i9={readContext:qn,use:Zb,useCallback:YL,useContext:qn,useEffect:mT,useImperativeHandle:KL,useInsertionEffect:qL,useLayoutEffect:VL,useMemo:XL,useReducer:cw,useRef:UL,useState:function(){return cw(mo)},useDebugValue:gT,useDeferredValue:function(e,t){var n=rn();return jt===null?vT(n,e,t):WL(n,jt.memoizedState,e,t)},useTransition:function(){var e=cw(mo)[0],t=rn().memoizedState;return[typeof e=="boolean"?e:ym(e),t]},useSyncExternalStore:RL,useId:e3,useHostTransitionStatus:yT,useFormState:bN,useActionState:bN,useOptimistic:function(e,t){var n=rn();return jt!==null?kL(n,jt,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:pT,useCacheRefresh:t3,useEffectEvent:HL};function fw(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Rt({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var hS={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ei(),i=ws(r);i.payload=t,n!=null&&(i.callback=n),t=Ss(e,i,r),t!==null&&(Dr(t,e,r),_p(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ei(),i=ws(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ss(e,i,r),t!==null&&(Dr(t,e,r),_p(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ei(),r=ws(n);r.tag=2,t!=null&&(r.callback=t),t=Ss(e,r,n),t!==null&&(Dr(t,e,n),_p(t,e,n))}};function wN(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Zp(n,r)||!Zp(i,a):!0}function SN(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&hS.enqueueReplaceState(t,t.state,null)}function iu(e,t){var n=t;if("ref"in t){n={};for(var r in t)r!=="ref"&&(n[r]=t[r])}if(e=e.defaultProps){n===t&&(n=Rt({},n));for(var i in e)n[i]===void 0&&(n[i]=e[i])}return n}function s3(e){Bv(e)}function l3(e){console.error(e)}function u3(e){Bv(e)}function Wv(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(r){setTimeout(function(){throw r})}}function ON(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(i){setTimeout(function(){throw i})}}function mS(e,t,n){return n=ws(n),n.tag=3,n.payload={element:null},n.callback=function(){Wv(e,t)},n}function c3(e){return e=ws(e),e.tag=3,e}function f3(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i=="function"){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){ON(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch=="function"&&(e.callback=function(){ON(t,n,r),typeof i!="function"&&(Es===null?Es=new Set([this]):Es.add(this));var s=r.stack;this.componentDidCatch(r.value,{componentStack:s!==null?s:""})})}function a9(e,t,n,r,i){if(n.flags|=32768,r!==null&&typeof r=="object"&&typeof r.then=="function"){if(t=n.alternate,t!==null&&Jl(t,n,i,!0),n=Xn.current,n!==null){switch(n.tag){case 31:case 13:case 19:return ar===null?iy():n.alternate===null&&Jt===0&&(Jt=3),n.flags&=-257,n.flags|=65536,n.lanes=i,r===qv?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),yw(e,r,i)),!1;case 22:return n.flags|=65536,r===qv?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),yw(e,r,i)),!1}throw Error(ne(435,n.tag))}return yw(e,r,i),iy(),!1}if(Ke)return t=Xn.current,t!==null?(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=i,r!==rS&&(e=Error(ne(422),{cause:r}),eh(xi(e,n)))):(r!==rS&&(t=Error(ne(423),{cause:r}),eh(xi(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,r=xi(r,n),i=mS(e.stateNode,r,i),uw(e,i),Jt!==4&&(Jt=2)),!1;var a=Error(ne(520),{cause:r});if(a=xi(a,n),Ip===null?Ip=[a]:Ip.push(a),Jt!==4&&(Jt=2),t===null)return!0;r=xi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=mS(n.stateNode,r,e),uw(n,e),!1;case 1:if(t=n.type,a=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError=="function"||a!==null&&typeof a.componentDidCatch=="function"&&(Es===null||!Es.has(a))))return n.flags|=65536,i&=-i,n.lanes|=i,i=c3(i),f3(i,e,n,r),uw(n,i),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var xT=Error(ne(461)),un=!1;function yn(e,t,n,r){t.child=e===null?EL(t,null,n,r):nu(t,e.child,n,r)}function jN(e,t,n,r,i){n=n.render;var a=t.ref;if("ref"in r){var o={};for(var s in r)s!=="ref"&&(o[s]=r[s])}else o=r;return eu(t),r=uT(e,t,n,o,a,i),s=cT(),e!==null&&!un?(fT(e,t,i),go(e,t,i)):(Ke&&s&&Xb(t),t.flags|=1,yn(e,t,r,i),t.child)}function EN(e,t,n,r,i){if(e===null){var a=n.type;return typeof a=="function"&&!eT(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,d3(e,t,a,r,i)):(e=sv(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!ST(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n!==null?n:Zp,n(o,r)&&e.ref===t.ref)return go(e,t,i)}return t.flags|=1,e=no(a,r),e.ref=t.ref,e.return=t,t.child=e}function d3(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Zp(a,r)&&e.ref===t.ref)if(un=!1,t.pendingProps=r=a,ST(e,i))e.flags&131072&&(un=!0);else return t.lanes=e.lanes,go(e,t,i)}return gS(e,t,n,r,i)}function p3(e,t,n,r){var i=r.children,a=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode==="hidden"){if(t.flags&128){if(a=a!==null?a.baseLanes|n:n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return TN(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&uv(t,a!==null?a.cachePool:null),a!==null?hN(t,a):uS(),CL(t);else return r=t.lanes=536870912,TN(e,t,a!==null?a.baseLanes|n:n,n,r)}else a!==null?(uv(t,a.cachePool),hN(t,a),js(),t.memoizedState=null):(e!==null&&uv(t,null),uS(),js());return yn(e,t,i,n),t.child}function Pp(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function TN(e,t,n,r,i){var a=rT();return a=a===null?null:{parent:sn._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&uv(t,null),uS(),CL(t),e!==null&&Jl(e,t,r,!0),t.childLanes=i,null}function dv(e,t){return t=tx({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function AN(e,t,n){return nu(t,e.child,null,n),e=dv(t,t.pendingProps),e.flags|=2,Gr(t),t.memoizedState=null,e}function o9(e,t,n){var r=t.pendingProps,i=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ke){if(r.mode==="hidden")return e=dv(t,r),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},Pp(null,e);if(cS(t),(e=Dt)?(e=d5(e,wi),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:$s!==null?{id:ha,overflow:ma}:null,retryLane:536870912,hydrationErrors:null},n=yL(e),n.return=t,t.child=n,Mn=t,Dt=null)):e=null,e===null)throw Ds(t);return t.lanes=536870912,null}return dv(t,r)}var a=e.memoizedState;if(a!==null){var o=a.dehydrated;if(cS(t),i)if(t.flags&256)t.flags&=-257,t=AN(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(ne(558));else if(un||Jl(e,t,n,!1),i=(n&e.childLanes)!==0,un||i){if(Is.current===null){if(r=_t,r!==null&&(o=Hk(r,n),o!==0&&o!==a.retryLane))throw a.retryLane=o,Eu(e,o),Dr(r,e,o),xT;iy()}t=AN(e,t,n)}else e=a.treeContext,Dt=Ei(o.nextSibling),Mn=t,Ke=!0,xs=null,wi=!1,e!==null&&xL(t,e),t=dv(t,r),t.flags|=134221824;return t}return e=no(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function ec(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(ne(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function gS(e,t,n,r,i){return eu(t),n=uT(e,t,n,r,void 0,i),r=cT(),e!==null&&!un?(fT(e,t,i),go(e,t,i)):(Ke&&r&&Xb(t),t.flags|=1,yn(e,t,n,i),t.child)}function CN(e,t,n,r,i,a){return eu(t),t.updateQueue=null,n=NL(t,r,n,i),_L(e),r=cT(),e!==null&&!un?(fT(e,t,a),go(e,t,a)):(Ke&&r&&Xb(t),t.flags|=1,yn(e,t,n,a),t.child)}function _N(e,t,n,r,i){if(eu(t),t.stateNode===null){var a=hc,o=n.contextType;typeof o=="object"&&o!==null&&(a=qn(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=hS,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},aT(t),o=n.contextType,a.context=typeof o=="object"&&o!==null?qn(o):hc,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o=="function"&&(fw(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof a.getSnapshotBeforeUpdate=="function"||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(o=a.state,typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount(),o!==a.state&&hS.enqueueReplaceState(a,a.state,null),Rp(t,r,a,i),Np(),a.state=t.memoizedState),typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,l=iu(n,s);a.props=l;var u=a.context,f=n.contextType;o=hc,typeof f=="object"&&f!==null&&(o=qn(f));var d=n.getDerivedStateFromProps;f=typeof d=="function"||typeof a.getSnapshotBeforeUpdate=="function",s=t.pendingProps!==s,f||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s||u!==o)&&SN(t,a,r,o),Qo=!1;var p=t.memoizedState;a.state=p,Rp(t,r,a,i),Np(),u=t.memoizedState,s||p!==u||Qo?(typeof d=="function"&&(fw(t,n,d,r),u=t.memoizedState),(l=Qo||wN(t,n,l,r,p,u,o))?(f||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),a.props=r,a.state=u,a.context=o,r=l):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,sS(e,t),o=t.memoizedProps,f=iu(n,o),a.props=f,d=t.pendingProps,p=a.context,u=n.contextType,l=hc,typeof u=="object"&&u!==null&&(l=qn(u)),s=n.getDerivedStateFromProps,(u=typeof s=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(o!==d||p!==l)&&SN(t,a,r,l),Qo=!1,p=t.memoizedState,a.state=p,Rp(t,r,a,i),Np();var h=t.memoizedState;o!==d||p!==h||Qo||e!==null&&e.dependencies!==null&&Hv(e.dependencies)?(typeof s=="function"&&(fw(t,n,s,r),h=t.memoizedState),(f=Qo||wN(t,n,f,r,p,h,l)||e!==null&&e.dependencies!==null&&Hv(e.dependencies))?(u||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,h,l),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,h,l)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||o===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=h),a.props=r,a.state=h,a.context=l,r=f):(typeof a.componentDidUpdate!="function"||o===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,ec(e,t),r=(t.flags&128)!==0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!="function"?null:a.render(),t.flags|=1,e!==null&&r?(t.child=nu(t,e.child,null,i),t.child=nu(t,null,n,i)):yn(e,t,n,i),t.memoizedState=a.state,e=t.child):e=go(e,t,i),e}function NN(e,t,n,r){return Zl(),t.flags|=256,yn(e,t,n,r),t.child}var vS={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function yS(e){return{baseLanes:e,cachePool:SL()}}function bS(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=Xr),e}function h3(e,t,n){var r=t.pendingProps,i=!1,a=(t.flags&128)!==0,o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:(Gn.current&2)!==0),o&&(i=!0,t.flags&=-129),o=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ke){if(i?Os(t):js(),(e=Dt)?(e=d5(e,wi),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:$s!==null?{id:ha,overflow:ma}:null,retryLane:536870912,hydrationErrors:null},n=yL(e),n.return=t,t.child=n,Mn=t,Dt=null)):e=null,e===null)throw Ds(t);return $T(e)?t.lanes=32:t.lanes=536870912,null}return a=r.children,r=r.fallback,i?(js(),i=t.mode,a=tx({mode:"hidden",children:a},i),r=Ul(r,i,n,null),a.return=t,r.return=t,a.sibling=r,t.child=a,r=t.child,r.memoizedState=yS(n),r.childLanes=bS(e,o,n),t.memoizedState=vS,Pp(null,r)):(Os(t),wT(t,a))}var s=e.memoizedState;if(s!==null){var l=s.dehydrated;if(l!==null)return s9(e,t,a,o,r,l,s,n)}return i?(js(),i=r.fallback,a=t.mode,s=e.child,l=s.sibling,r=no(s,{mode:"hidden",children:r.children}),r.subtreeFlags=s.subtreeFlags&1206910976,l!==null?i=no(l,i):(i=Ul(i,a,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,Pp(null,r),r=t.child,i=e.child.memoizedState,i===null?i=yS(n):(a=i.cachePool,a!==null?(s=sn._currentValue,a=a.parent!==s?{parent:s,pool:s}:a):a=SL(),i={baseLanes:i.baseLanes|n,cachePool:a}),r.memoizedState=i,r.childLanes=bS(e,o,n),t.memoizedState=vS,Pp(e.child,r)):(Os(t),n=e.child,e=n.sibling,n=no(n,{mode:"visible",children:r.children}),n.return=t,n.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=n,t.memoizedState=null,n)}function wT(e,t){return t=tx({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function tx(e,t){return e=Pr(22,e,null,t),e.lanes=0,e}function ig(e,t,n){return nu(t,e.child,null,n),e=wT(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function s9(e,t,n,r,i,a,o,s){if(n)return t.flags&256?(Os(t),t.flags&=-257,ig(e,t,s)):t.memoizedState!==null?(js(),t.child=e.child,t.flags|=128,null):(js(),a=i.fallback,o=t.mode,i=tx({mode:"visible",children:i.children},o),a=Ul(a,o,s,null),a.flags|=2,i.return=t,a.return=t,i.sibling=a,t.child=i,nu(t,e.child,null,s),i=t.child,i.memoizedState=yS(s),i.childLanes=bS(e,r,s),t.memoizedState=vS,Pp(null,i));if(Os(t),$T(a)){if(r=a.nextSibling&&a.nextSibling.dataset,r)var l=r.dgst;return r=l,r!==""&&(i=Error(ne(419)),i.stack="",i.digest=r,eh({value:i,source:null,stack:null})),ig(e,t,s)}if(un||Jl(e,t,s,!1),r=(s&e.childLanes)!==0,un||r){if(Is.current!==null)return ig(e,t,s);if(r=_t,r!==null&&(i=Hk(r,s),i!==0&&i!==o.retryLane))throw o.retryLane=i,Eu(e,i),Dr(r,e,i),xT;return qS(a)||iy(),ig(e,t,s)}return qS(a)?(t.flags|=192,t.child=e.child,null):(e=o.treeContext,Dt=Ei(a.nextSibling),Mn=t,Ke=!0,xs=null,wi=!1,e!==null&&xL(t,e),t=wT(t,i.children),t.flags|=134221824,t)}function RN(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),lv(e.return,t,n)}function MN(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&Gv(n)===null&&(t=e),e=e.sibling}return t}function ag(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function dw(e){var t=e.child;for(e.child=null;t!==null;){var n=t.sibling;t.sibling=e.child,e.child=t,t=n}}function xS(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=Gn.current;if(t.flags&128)return nh(t,o),null;var s=(o&2)!==0;if(s?(o=o&1|2,t.flags|=128):o&=1,nh(t,o),i==="backwards"&&e!==null?(dw(e),yn(e,t,r,n),dw(e)):yn(e,t,r,n),r=Ke?Jp:0,!s&&e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&RN(e,n,t);else if(e.tag===19)RN(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case"backwards":n=MN(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null,dw(t)),ag(t,!0,i,null,a,r);break;case"unstable_legacy-backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Gv(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}ag(t,!0,n,null,a,r);break;case"together":ag(t,!1,null,null,void 0,r);break;case"independent":t.memoizedState=null;break;default:n=MN(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),ag(t,!1,i,n,a,r)}return t.child}function PN(e,t,n){var r=t.pendingProps;return fs(t,t.type,r.value),yn(e,t,r.children,n),t.child}function go(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ls|=t.lanes,!(n&t.childLanes))if(e!==null){if(Jl(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(ne(153));if(t.child!==null){for(e=t.child,n=no(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=no(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function ST(e,t){return e.lanes&t?!0:(e=e.dependencies,!!(e!==null&&Hv(e)))}function l9(e,t,n){switch(t.tag){case 3:Dv(t,t.stateNode.containerInfo),fs(t,sn,e.memoizedState.cache),Zl();break;case 27:case 5:K1(t);break;case 4:Dv(t,t.stateNode.containerInfo);break;case 10:fs(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,cS(t),null;break;case 13:var r=t.memoizedState;if(r!==null){if(r.dehydrated!==null)return Os(t),t.flags|=128,null;r=Jl(e,t,n,!1);var i=t.child.childLanes;return r||n&i?h3(e,t,n):(Os(t),e=go(e,t,n),e!==null?e.sibling:null)}Os(t);break;case 19:if(t.flags&128)return xS(e,t,n);if(i=(e.flags&128)!==0,r=(n&t.childLanes)!==0,r||(Jl(e,t,n,!1),r=(n&t.childLanes)!==0),i){if(r)return xS(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),nh(t,Gn.current),r)break;return null;case 22:return t.lanes=0,p3(e,t,n,t.pendingProps);case 24:fs(t,sn,e.memoizedState.cache)}return go(e,t,n)}function m3(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)un=!0;else{if(!ST(e,n)&&!(t.flags&128))return un=!1,l9(e,t,n);un=!!(e.flags&131072)}else un=!1,Ke&&t.flags&1048576&&bL(t,Jp,t.index);switch(t.lanes=0,t.tag){case 16:e:{var r=t.pendingProps;if(e=gl(t.elementType),t.type=e,typeof e=="function")eT(e)?(r=iu(e,r),t.tag=1,t=_N(null,t,e,r,n)):(t.tag=0,t=gS(null,t,e,r,n));else{if(e!=null){var i=e.$$typeof;if(i===FE){t.tag=11,t=jN(null,t,e,r,n);break e}else if(i===UE){t.tag=14,t=EN(null,t,e,r,n);break e}else if(i===da){t.tag=10,t.type=e,t=PN(null,t,n);break e}}throw t=V1(e)||e,Error(ne(306,t,""))}}return t;case 0:return gS(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,i=iu(r,t.pendingProps),_N(e,t,r,i,n);case 3:e:{if(Dv(t,t.stateNode.containerInfo),e===null)throw Error(ne(387));r=t.pendingProps;var a=t.memoizedState;i=a.element,sS(e,t),Rp(t,r,null,n);var o=t.memoizedState;if(r=o.cache,fs(t,sn,r),r!==a.cache&&aS(t,[sn],n,!0),Np(),r=o.element,a.isDehydrated)if(a={element:r,isDehydrated:!1,cache:o.cache},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){t=NN(e,t,r,n);break e}else if(r!==i){i=xi(Error(ne(424)),t),eh(i),t=NN(e,t,r,n);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Dt=Ei(e.firstChild),Mn=t,Ke=!0,xs=null,wi=!0,n=EL(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(Zl(),r===i){t=go(e,t,n);break e}yn(e,t,r,n)}t=t.child}return t;case 26:return ec(e,t),e===null?(n=iR(t.type,null,t.pendingProps,null))?t.memoizedState=n:Ke||(t.stateNode=i5(t.type,t.pendingProps,bs.current,t)):t.memoizedState=iR(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return K1(t),e===null&&Ke&&(r=t.stateNode=p5(t.type,t.pendingProps,bs.current),Mn=t,wi=!0,i=Dt,Vs(t.type)?(VS=i,Dt=Ei(r.firstChild)):Dt=i),yn(e,t,t.pendingProps.children,n),ec(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ke&&((i=r=Dt)&&(r=nK(r,t.type,t.pendingProps,wi),r!==null?(t.stateNode=r,Mn=t,Dt=Ei(r.firstChild),wi=!1,i=!0):i=!1),i||Ds(t)),K1(t),i=t.type,a=t.pendingProps,o=e!==null?e.memoizedProps:null,r=a.children,FS(i,a)?r=null:o!==null&&FS(i,o)&&(t.flags|=32),t.memoizedState!==null&&(i=uT(e,t,QG,null,null,n),bf._currentValue=i),ec(e,t),yn(e,t,r,n),t.child;case 6:return e===null&&Ke&&((e=n=Dt)&&(n=rK(n,t.pendingProps,wi),n!==null?(t.stateNode=n,Mn=t,Dt=null,e=!0):e=!1),e||Ds(t)),null;case 13:return h3(e,t,n);case 4:return Dv(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=nu(t,null,r,n):yn(e,t,r,n),t.child;case 11:return jN(e,t,t.type,t.pendingProps,n);case 7:return r=t.pendingProps,ec(e,t),yn(e,t,r,n),t.child;case 8:return yn(e,t,t.pendingProps.children,n),t.child;case 12:return yn(e,t,t.pendingProps.children,n),t.child;case 10:return PN(e,t,n);case 9:return i=t.type._context,r=t.pendingProps.children,eu(t),i=qn(i),r=r(i),t.flags|=1,yn(e,t,r,n),t.child;case 14:return EN(e,t,t.type,t.pendingProps,n);case 15:return d3(e,t,t.type,t.pendingProps,n);case 19:return xS(e,t,n);case 31:return o9(e,t,n);case 22:return p3(e,t,n,t.pendingProps);case 24:return eu(t),r=qn(sn),e===null?(i=rT(),i===null&&(i=_t,a=nT(),i.pooledCache=a,a.refCount++,a!==null&&(i.pooledCacheLanes|=n),i=a),t.memoizedState={parent:r,cache:i},aT(t),fs(t,sn,i)):(e.lanes&n&&(sS(e,t),Rp(t,null,null,n),Np()),i=e.memoizedState,a=t.memoizedState,i.parent!==r?(i={parent:r,cache:r},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),fs(t,sn,r)):(r=a.cache,fs(t,sn,r),r!==i.cache&&aS(t,[sn],n,!0))),yn(e,t,t.pendingProps.children,n),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),r=t.pendingProps,r.name!=null&&r.name!=="auto"?t.flags|=e===null?18882560:18874368:Ke&&Xb(t),e!==null&&e.memoizedProps.name!==r.name?t.flags|=4194816:ec(e,t),yn(e,t,r.children,n),t.child;case 29:throw t.pendingProps}throw Error(ne(156,t.tag))}function La(e){e.flags|=4}function pw(e,t,n,r,i){var a;if((a=(e.mode&32)!==0)&&(a=n===null?sR(t,r):sR(t,r)&&(r.src!==n.src||r.srcSet!==n.srcSet)),a){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(q3())e.flags|=8192;else throw ql=qv,iT}else e.flags&=-16777217}function $N(e,t){if(t.type!=="stylesheet"||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!v5(t))if(q3())e.flags|=8192;else throw ql=qv,iT}function og(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?zk():536870912,e.lanes|=t,pf|=t)}function qd(e,t){if(!Ke)switch(e.tailMode){case"visible":break;case"collapsed":for(var n=e.tail,r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null;break;default:for(t=e.tail,n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null}}function Mt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&1206910976,r|=i.flags&1206910976,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function u9(e,t,n){var r=t.pendingProps;switch(tT(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Mt(t),null;case 1:return Mt(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),ro(sn),uf(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Uu(t)?La(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,lw())),Mt(t),null;case 26:var i=t.type,a=t.memoizedState;return e===null?(La(t),a!==null?(Mt(t),$N(t,a)):(Mt(t),pw(t,i,null,r,n))):a?a!==e.memoizedState?(La(t),Mt(t),$N(t,a)):(Mt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==r&&La(t),Mt(t),pw(t,i,e,r,n)),null;case 27:if(Iv(t),n=bs.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&La(t);else{if(!r){if(t.stateNode===null)throw Error(ne(166));return Mt(t),t.subtreeFlags&=-33554433,null}e=ba.current,Uu(t)?sN(t):(e=p5(i,r,n),t.stateNode=e,La(t))}return Mt(t),t.subtreeFlags&=-33554433,null;case 5:if(Iv(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&La(t);else{if(!r){if(t.stateNode===null)throw Error(ne(166));return Mt(t),t.subtreeFlags&=-33554433,null}if(a=ba.current,Uu(t))sN(t);else{var o=oh(bs.current);switch(a){case 1:a=o.createElementNS("http://www.w3.org/2000/svg",i);break;case 2:a=o.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;default:switch(i){case"svg":a=o.createElementNS("http://www.w3.org/2000/svg",i);break;case"math":a=o.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;case"script":a=o.createElement("div"),a.innerHTML="<script><\/script>",a=a.removeChild(a.firstChild);break;case"select":a=typeof r.is=="string"?o.createElement("select",{is:r.is}):o.createElement("select"),r.multiple?a.multiple=!0:r.size&&(a.size=r.size);break;default:a=typeof r.is=="string"?o.createElement(i,{is:r.is}):o.createElement(i)}}a[Hn]=t,a[Lr]=r;e:for(o=t.child;o!==null;){if(o.tag===5||o.tag===6)a.appendChild(o.stateNode);else if(o.tag!==4&&o.tag!==27&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===t)break e;for(;o.sibling===null;){if(o.return===null||o.return===t)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}t.stateNode=a;e:switch(Kn(a,i,r),i){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&La(t)}}return Mt(t),t.subtreeFlags&=-33554433,pw(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&La(t);else{if(typeof r!="string"&&t.stateNode===null)throw Error(ne(166));if(e=bs.current,Uu(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,i=Mn,i!==null)switch(i.tag){case 27:case 5:r=i.memoizedProps}e[Hn]=t,e=!!(e.nodeValue===n||r!==null&&r.suppressHydrationWarning===!0||n5(e.nodeValue,n)),e||Ds(t,!0)}else e=oh(e).createTextNode(r),e[Hn]=t,t.stateNode=e}return Mt(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Uu(t),n!==null){if(e===null){if(!r)throw Error(ne(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(ne(557));e[Hn]=t}else Zl(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Mt(t),e=!1}else n=lw(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Gr(t),t):(Gr(t),null);if(t.flags&128)throw Error(ne(558))}return Mt(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Uu(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(ne(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(ne(317));i[Hn]=t}else Zl(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Mt(t),i=!1}else i=lw(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(Gr(t),t):(Gr(t),null)}return Gr(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,i=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(i=r.alternate.memoizedState.cachePool.pool),a=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(a=r.memoizedState.cachePool.pool),a!==i&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),og(t,t.updateQueue),Mt(t),null);case 4:return uf(),e===null&&RT(t.stateNode.containerInfo),t.flags|=67108864,Mt(t),null;case 10:return ro(t.type),Mt(t),null;case 19:if(sT(t),r=t.memoizedState,r===null)return Mt(t),null;if(i=(t.flags&128)!==0,a=r.rendering,a===null)if(i)qd(r,!1);else{if(Jt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=Gv(e),a!==null){for(t.flags|=128,qd(r,!1),e=a.updateQueue,t.updateQueue=e,og(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)vL(n,e),n=n.sibling;return nh(t,Gn.current&1|2),Ke&&Ga(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Qr()>ny&&(t.flags|=128,i=!0,qd(r,!1),t.lanes=4194304)}else{if(!i)if(e=Gv(a),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,og(t,e),qd(r,!0),r.tail===null&&r.tailMode!=="collapsed"&&r.tailMode!=="visible"&&!a.alternate&&!Ke)return Mt(t),null}else 2*Qr()-r.renderingStartTime>ny&&n!==536870912&&(t.flags|=128,i=!0,qd(r,!1),t.lanes=4194304);r.isBackwards?(a.sibling=t.child,t.child=a):(e=r.last,e!==null?e.sibling=a:t.child=a,r.last=a)}if(r.tail!==null){e=r.tail;e:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break e}n=n.sibling}n=!0}return r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Qr(),e.sibling=null,a=Gn.current,a=i?a&1|2:a&1,r.tailMode==="visible"||r.tailMode==="collapsed"||!n||Ke?nh(t,a):(n=a,kt(Xn,t),kt(Gn,n),ar===null&&(ar=t)),Ke&&Ga(t,r.treeForkCount),e}return Mt(t),null;case 22:case 23:return Gr(t),oT(),r=t.memoizedState!==null,e!==null?e.memoizedState!==null!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Mt(t),t.subtreeFlags&6&&(t.flags|=8192)):Mt(t),n=t.updateQueue,n!==null&&og(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&Vn(Hl),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ro(sn),Mt(t),null;case 25:return null;case 30:return t.flags|=33554432,Mt(t),null}throw Error(ne(156,t.tag))}function c9(e,t){switch(tT(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ro(sn),uf(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Iv(t),null;case 31:if(t.memoizedState!==null){if(Gr(t),t.alternate===null)throw Error(ne(340));Zl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Gr(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ne(340));Zl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return sT(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return uf(),null;case 10:return ro(t.type),null;case 22:case 23:return Gr(t),oT(),e!==null&&Vn(Hl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ro(sn),null;case 25:return null;default:return null}}function g3(e,t){switch(tT(t),t.tag){case 3:ro(sn),uf();break;case 26:case 27:case 5:Iv(t);break;case 4:uf();break;case 31:t.memoizedState!==null&&Gr(t);break;case 13:Gr(t);break;case 19:sT(t);break;case 10:ro(t.type);break;case 22:case 23:Gr(t),oT(),e!==null&&Vn(Hl);break;case 24:ro(sn)}}function bm(e,t){try{var n=t.updateQueue,r=n!==null?n.lastEffect:null;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(s){xt(t,t.return,s)}}function ks(e,t,n){try{var r=t.updateQueue,i=r!==null?r.lastEffect:null;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var l=n,u=s;try{u()}catch(f){xt(i,l,f)}}}r=r.next}while(r!==a)}}catch(f){xt(t,t.return,f)}}function v3(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{AL(t,n)}catch(r){xt(e,e.return,r)}}}function y3(e,t,n){n.props=iu(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(r){xt(e,t,r)}}function ua(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:var i=e.stateNode,a=po(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=s5(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new ai(e);kr(e.child,!1,eK,o,void 0,void 0),e.stateNode=o}r=e.stateNode;break;default:r=e.stateNode}typeof n=="function"?e.refCleanup=n(r):n.current=r}}catch(s){xt(e,t,s)}}function Fn(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r=="function")try{r()}catch(i){xt(e,t,i)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(i){xt(e,t,i)}else n.current=null}function Qv(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n<t.length;n++)f5(e.stateNode,t[n])}function DN(e){for(var t=e.return;t!==null&&(jT(t)&&f5(e.stateNode,t.stateNode),!OT(t));)t=t.return}function $p(e){for(var t=e.return;t!==null&&(jT(t)&&tK(e.stateNode,t.stateNode),!OT(t));)t=t.return}function OT(e){return e.tag===5||e.tag===3||e.tag===27}function jT(e){return e&&e.tag===7&&e.stateNode!==null}function wS(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&r.focus();break e;case"img":n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(i){xt(e,e.return,i)}}function hw(e,t,n){try{var r=e.stateNode;I9(r,e.type,n,t),r[Lr]=t}catch(i){xt(e,e.return,i)}}function b3(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Vs(e.type)||e.tag===4}function mw(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||b3(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Vs(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function SS(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(i,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(i),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=pa)),Qv(e,r),lt=!0;else if(i!==4&&(i===27&&(Qv(e,r),r=null,Vs(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(SS(e,t,n,r),e=e.sibling;e!==null;)SS(e,t,n,r),e=e.sibling}function Zv(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?n.insertBefore(i,t):n.appendChild(i),Qv(e,r),lt=!0;else if(i!==4&&(i===27&&(Qv(e,r),r=null,Vs(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(Zv(e,t,n,r),e=e.sibling;e!==null;)Zv(e,t,n,r),e=e.sibling}function x3(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Kn(t,r,n),t[Hn]=e,t[Lr]=n}catch(a){xt(e,e.return,a)}}var Jv=!1,Kr=null;function IN(e){(e.tag===30||e.subtreeFlags&33554432)&&(Jv=!0)}var ca=null;function kN(){var e=ca;return ca=null,e}var Mr=0;function cd(e,t,n,r,i){return Mr=0,w3(e.child,t,n,r,i)}function w3(e,t,n,r,i){for(var a=!1;e!==null;){if(e.tag===5){var o=e.stateNode;if(r!==null){var s=US(o);r.push(s),s.view&&(a=!0)}else a||US(o).view&&(a=!0);Jv=!0,a5(o,Mr===0?t:t+"_"+Mr,n),Mr++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&i||w3(e.child,t,n,r,i)&&(a=!0));e=e.sibling}return a}function Ta(e,t){for(;e!==null;)e.tag===5?o5(e.stateNode,e.memoizedProps):(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&t||Ta(e.child,t)),e=e.sibling}function pv(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(pv(e),e.tag===30&&(e.flags&18874368)!==0&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name==="auto")throw Error(ne(544));var n=t.name;t=Ao(t.default,t.share),t!=="none"&&(cd(e,n,t,null,!1)||Ta(e.child,!1))}e=e.sibling}}function OS(e,t){if(e.tag===30){var n=e.stateNode,r=e.memoizedProps,i=po(r,n),a=Ao(r.default,n.paired?r.share:r.enter);a!=="none"?cd(e,i,a,null,!1)?(pv(e),n.paired||t||hf(e,r.onEnter)):Ta(e.child,!1):pv(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)OS(e,t),e=e.sibling;else pv(e)}function jS(e){if(Kr!==null&&Kr.size!==0){var t=Kr;if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var n=e.memoizedProps,r=n.name;if(r!=null&&r!=="auto"){var i=t.get(r);if(i!==void 0){var a=Ao(n.default,n.share);if(a!=="none"&&(cd(e,r,a,null,!1)?(a=e.stateNode,i.paired=a,a.paired=i,hf(e,n.onShare)):Ta(e.child,!1)),t.delete(r),t.size===0)break}}}jS(e)}e=e.sibling}}}function ES(e){if(e.tag===30){var t=e.memoizedProps,n=po(t,e.stateNode),r=Kr!==null?Kr.get(n):void 0,i=Ao(t.default,r!==void 0?t.share:t.exit);i!=="none"&&(cd(e,n,i,null,!1)?r!==void 0?(i=e.stateNode,r.paired=i,i.paired=r,Kr.delete(n),hf(e,t.onShare)):hf(e,t.onExit):Ta(e.child,!1)),Kr!==null&&jS(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)ES(e),e=e.sibling;else Kr!==null&&jS(e)}function S3(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=po(t,e.stateNode);t=Ao(t.default,t.update),e.flags&=-5,t!=="none"&&cd(e,n,t,e.memoizedState=[],!1)}else e.subtreeFlags&33554432&&S3(e);e=e.sibling}}function TS(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var t=e.stateNode;t.paired!==null&&(t.paired=null,Ta(e.child,!1))}TS(e)}e=e.sibling}}function hv(e){if(e.tag===30)e.stateNode.paired=null,Ta(e.child,!1),TS(e);else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)hv(e),e=e.sibling;else TS(e)}function O3(e){for(e=e.child;e!==null;)e.tag===30?Ta(e.child,!1):e.subtreeFlags&33554432&&O3(e),e=e.sibling}function ET(e,t,n,r,i,a,o){for(var s=!1;t!==null;){if(t.tag===5){var l=t.stateNode;if(a!==null&&Mr<a.length){var u=a[Mr],f=US(l);(u.view||f.view)&&(s=!0);var d;if(d=(e.flags&4)===0)if(f.clip)d=!0;else{d=u.rect;var p=f.rect;d=d.y!==p.y||d.x!==p.x||d.height!==p.height||d.width!==p.width}d&&(e.flags|=4),f.abs?f=!u.abs:(u=u.rect,f=f.rect,f=u.height!==f.height||u.width!==f.width),f&&(e.flags|=32)}else e.flags|=32;e.flags&4&&a5(l,Mr===0?n:n+"_"+Mr,i),s&&e.flags&4||(ca===null&&(ca=[]),ca.push(l,Mr===0?r:r+"_"+Mr,t.memoizedProps)),Mr++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&o?e.flags|=t.flags&32:ET(e,t.child,n,r,i,a,o)&&(s=!0));t=t.sibling}return s}function j3(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,r=e.stateNode,i=po(n,r),a=Ao(n.default,n.update),o;o=e.memoizedState,e.memoizedState=null,r=e;var s=e.child;Mr=0,i=ET(r,s,i,i,a,o,!1),e.flags&4&&i&&hf(e,n.onUpdate)}else e.subtreeFlags&33554432&&j3(e);e=e.sibling}}var An=!1,gt=!1,Ji=!1,gw=!1,LN=typeof WeakSet=="function"?WeakSet:Set,_n=null,ea=!1,mp=!1,ey=!1,AS=!1;function f9(e,t,n){if(e=e.containerInfo,BS=xf,e=uL(e),QE(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break e}var s=0,l=-1,u=-1,f=0,d=0,p=e,h=null;t:for(;;){for(var b;p!==r||a!==0&&p.nodeType!==3||(l=s+a),p!==o||i!==0&&p.nodeType!==3||(u=s+i),p.nodeType===3&&(s+=p.nodeValue.length),(b=p.firstChild)!==null;)h=p,p=b;for(;;){if(p===e)break t;if(h===r&&++f===a&&(l=s),h===o&&++d===i&&(u=s),(b=p.nextSibling)!==null)break;p=h,h=p.parentNode}p=b}r=l===-1||u===-1?null:{start:l,end:u}}else r=null}r=r||{start:0,end:0}}else r=null;for(zS={focusedElem:e,selectionRange:r},xf=!1,n=(n&335544064)===n,_n=t,t=n?9270:1024;_n!==null;){if(e=_n,n&&(r=e.deletions,r!==null))for(a=0;a<r.length;a++)n&&ES(r[a]);if(e.alternate===null&&e.flags&2)n&&IN(e),sg(n);else{if(e.tag===22){if(r=e.alternate,e.memoizedState!==null){r!==null&&r.memoizedState===null&&n&&ES(r),sg(n);continue}else if(r!==null&&r.memoizedState!==null){n&&IN(e),sg(n);continue}}r=e.child,e.subtreeFlags&t&&r!==null?(r.return=e,_n=r):(n&&S3(e),sg(n))}}Kr=null}function sg(e){for(;_n!==null;){var t=_n,n=e,r=t.alternate,i=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if(i&1024&&r!==null){n=void 0,i=r.memoizedProps,r=r.memoizedState;var a=t.stateNode;try{var o=iu(t.type,i);n=a.getSnapshotBeforeUpdate(o,r),a.__reactInternalSnapshotBeforeUpdate=n}catch(s){xt(t,t.return,s)}}break;case 3:if(i&1024){if(r=t.stateNode.containerInfo,n=r.nodeType,n===9)HS(r);else if(n===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":HS(r);break;default:r.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:n&&r!==null&&(n=po(r.memoizedProps,r.stateNode),i=t.memoizedProps,i=Ao(i.default,i.update),i!=="none"&&cd(r,n,i,r.memoizedState=[],!0));break;default:if(i&1024)throw Error(ne(163))}if(r=t.sibling,r!==null){r.return=t.return,_n=r;break}_n=t.return}}function E3(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:ta(e,n),r&4&&bm(5,n);break;case 1:if(ta(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(o){xt(n,n.return,o)}else{var i=iu(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(o){xt(n,n.return,o)}}r&64&&v3(n),r&512&&ua(n,n.return);break;case 3:if(ta(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{AL(e,t)}catch(o){xt(n,n.return,o)}}break;case 27:t===null&&r&4&&x3(n);case 26:case 5:ta(e,n),t===null&&r&4&&wS(n),r&512&&ua(n,n.return);break;case 12:ta(e,n);break;case 31:ta(e,n),r&4&&_3(e,n);break;case 13:ta(e,n),r&4&&N3(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=O9.bind(null,n),iK(e,n))));break;case 22:if(r=n.memoizedState!==null||An,!r){var a=t!==null&&t.memoizedState!==null||gt;t=An,i=gt,An=r,(gt=a)&&!i?(r=2,n.subtreeFlags&8772&&(r|=1),Di(e,n,r)):ta(e,n),An=t,gt=i}break;case 30:ta(e,n),r&512&&ua(n,n.return);break;case 7:r&512&&ua(n,n.return);default:ta(e,n)}}function CS(e,t){for(e=e.child;e!==null;)T3(e,t),e=e.sibling}function T3(e,t){switch(e.tag){case 5:case 26:try{var n=e.stateNode;if(t){var r=n.style;typeof r.setProperty=="function"?r.setProperty("display","none","important"):r.display="none"}else{var i=e.stateNode,a=e.memoizedProps.style,o=a!=null&&a.hasOwnProperty("display")?a.display:null;i.style.display=o==null||typeof o=="boolean"?"":(""+o).trim()}}catch(l){xt(e,e.return,l)}_S(e,t);break;case 6:try{e.stateNode.nodeValue=t?"":e.memoizedProps,lt=!0}catch(l){xt(e,e.return,l)}break;case 18:try{var s=e.stateNode;t?ZN(s,!0):ZN(e.stateNode,!1)}catch(l){xt(e,e.return,l)}break;case 22:case 23:e.memoizedState===null&&CS(e,t);break;default:CS(e,t)}}function _S(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){e:{var n=e,r=t;switch(n.tag){case 4:T3(n,r);break e;case 22:n.memoizedState===null&&_S(n,r);break e;default:_S(n,r)}}e=e.sibling}}function A3(e){var t=e.alternate;t!==null&&(e.alternate=null,A3(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Hb(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Ft=null,_r=!1;function Pi(e,t,n){for(n=n.child;n!==null;)C3(e,t,n),n=n.sibling}function C3(e,t,n){if(Zr&&typeof Zr.onCommitFiberUnmount=="function")try{Zr.onCommitFiberUnmount(dm,n)}catch{}switch(n.tag){case 26:gt||Fn(n,t),Pi(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!gt&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:gt||Fn(n,t),$p(n);var r=Ft,i=_r;Vs(n.type)&&(Ft=n.stateNode,_r=!1),Pi(e,t,n),h5(n.stateNode,n.type,n.memoizedProps),Ft=r,_r=i;break;case 5:gt||Fn(n,t),$p(n);case 6:if(n.tag===6&&$p(n),r=Ft,i=_r,Ft=null,Pi(e,t,n),Ft=r,_r=i,Ft!==null)if(_r)try{(Ft.nodeType===9?Ft.body:Ft.nodeName==="HTML"?Ft.ownerDocument.body:Ft).removeChild(n.stateNode),lt=!0}catch(a){xt(n,t,a)}else try{Ft.removeChild(n.stateNode),lt=!0}catch(a){xt(n,t,a)}break;case 18:Ft!==null&&(_r?(e=Ft,QN(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),wf(e)):QN(Ft,n.stateNode));break;case 4:r=Ft,i=_r,Ft=n.stateNode.containerInfo,_r=!0,Pi(e,t,n),Ft=r,_r=i;break;case 0:case 11:case 14:case 15:ks(2,n,t),gt||ks(4,n,t),Pi(e,t,n);break;case 1:gt||(Fn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"&&y3(n,t,r)),Pi(e,t,n);break;case 21:Pi(e,t,n);break;case 22:gt=(r=gt)||n.memoizedState!==null,Pi(e,t,n),gt=r;break;case 30:Fn(n,t),Pi(e,t,n);break;case 7:gt||Fn(n,t),Pi(e,t,n);break;default:Pi(e,t,n)}}function _3(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{wf(e)}catch(n){xt(t,t.return,n)}}}function N3(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{wf(e)}catch(n){xt(t,t.return,n)}}function d9(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new LN),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new LN),t;default:throw Error(ne(435,e.tag))}}function lg(e,t){var n=d9(e);t.forEach(function(r){if(!n.has(r)){n.add(r);var i=j9.bind(null,e,r);r.then(i,i)}})}function pr(e,t,n){var r=t.deletions;if(r!==null)for(var i=0;i<r.length;i++){var a=r[i],o=e,s=t,l=s;e:for(;l!==null;){switch(l.tag){case 27:if(Vs(l.type)){Ft=l.stateNode,_r=!1;break e}break;case 5:Ft=l.stateNode,_r=!1;break e;case 3:case 4:Ft=l.stateNode.containerInfo,_r=!0;break e}l=l.return}if(Ft===null)throw Error(ne(160));C3(o,s,a),Ft=null,_r=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)R3(t,e,n),t=t.sibling}var Li=null;function R3(e,t,n){var r=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(i&4&&(r=e.updateQueue,r=r!==null?r.events:null,r!==null))for(var a=0;a<r.length;a++){var o=r[a];o.ref.impl=o.nextImpl}pr(t,e,n),hr(e),i&4&&(ks(3,e,e.return),bm(3,e),ks(5,e,e.return));break;case 1:pr(t,e,n),hr(e),i&512&&(gt||r===null||Fn(r,r.return)),i&64&&An&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?t:n.concat(t))));break;case 26:if(a=Li,pr(t,e,n),hr(e),i&512&&(gt||r===null||Fn(r,r.return)),i&4)if(i=r!==null?r.memoizedState:null,n=e.memoizedState,r===null)if(n===null)if(e.stateNode===null)if(An)e.stateNode=i5(e.type,e.memoizedProps,t.containerInfo,e);else{e:{t=e.type,n=e.memoizedProps,i=a.ownerDocument||a;t:switch(t){case"title":r=i.getElementsByTagName("title")[0],(!r||r[mm]||r[Hn]||r.namespaceURI==="http://www.w3.org/2000/svg"||r.hasAttribute("itemprop"))&&(r=i.createElement(t),i.head.insertBefore(r,i.querySelector("head > title"))),Kn(r,t,n),r[Hn]=e,Nn(r),t=r;break e;case"link":if(a=oR("link","href",i).get(t+(n.href||""))){for(o=0;o<a.length;o++)if(r=a[o],r.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&r.getAttribute("rel")===(n.rel==null?null:n.rel)&&r.getAttribute("title")===(n.title==null?null:n.title)&&r.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){a.splice(o,1);break t}}r=i.createElement(t),Kn(r,t,n),i.head.appendChild(r);break;case"meta":if(a=oR("meta","content",i).get(t+(n.content||""))){for(o=0;o<a.length;o++)if(r=a[o],r.getAttribute("content")===(n.content==null?null:""+n.content)&&r.getAttribute("name")===(n.name==null?null:n.name)&&r.getAttribute("property")===(n.property==null?null:n.property)&&r.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&r.getAttribute("charset")===(n.charSet==null?null:n.charSet)){a.splice(o,1);break t}}r=i.createElement(t),Kn(r,t,n),i.head.appendChild(r);break;default:throw Error(ne(468,t))}r[Hn]=e,Nn(r),t=r}e.stateNode=t}else An||GS(a,e.type,e.stateNode);else e.stateNode=aR(a,n,e.memoizedProps);else i!==n?(i===null?(t=r.stateNode,t===null||gt||t.parentNode.removeChild(t)):i.count--,n===null?An||GS(a,e.type,e.stateNode):aR(a,n,e.memoizedProps)):n===null&&e.stateNode!==null&&hw(e,e.memoizedProps,r.memoizedProps);break;case 27:pr(t,e,n),hr(e),i&512&&(gt||r===null||Fn(r,r.return)),r!==null&&i&4&&hw(e,e.memoizedProps,r.memoizedProps);break;case 5:if(a=Ji,Ji=!1,pr(t,e,n),Ji=a,hr(e),i&512&&(gt||r===null||Fn(r,r.return)),e.flags&32){t=e.stateNode;try{ff(t,""),lt=!0}catch(f){xt(e,e.return,f)}}i&4&&e.stateNode!=null&&(t=e.memoizedProps,hw(e,t,r!==null?r.memoizedProps:t)),i&1024&&(gw=!0);break;case 6:if(pr(t,e,n),hr(e),i&4){if(e.stateNode===null)throw Error(ne(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,lt=!0}catch(f){xt(e,e.return,f)}}break;case 3:if(lt=!1,yv=null,a=Li,Li=sh(t.containerInfo),pr(t,e,n),Li=a,hr(e),i&4&&r!==null&&r.memoizedState.isDehydrated)try{wf(t.containerInfo)}catch(f){xt(e,e.return,f)}gw&&(gw=!1,M3(e)),lt=!1;break;case 4:i=Ji,Ji=An,r=H_(),a=Li,Li=sh(e.stateNode.containerInfo),pr(t,e,n),hr(e),Li=a,lt&&mp&&(ey=!0),lt=r,Ji=i;break;case 12:pr(t,e,n),hr(e);break;case 31:pr(t,e,n),hr(e),i&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,lg(e,t)));break;case 13:pr(t,e,n),hr(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(nx=Qr()),i&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,lg(e,t)));break;case 22:a=e.memoizedState!==null,o=r!==null&&r.memoizedState!==null;var s=An,l=gt,u=Ji;An=s||a,Ji=u||a,gt=l||o,pr(t,e,n),gt=l,Ji=u,An=s,hr(e),i&8192&&(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,!a||r===null||o||An||gt||(t=o||gt,n=An,r=gt,An=a||An,gt=t,Go(e,2),An=n,gt=r),!a&&Ji||CS(e,a)),i&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,lg(e,n))));break;case 19:pr(t,e,n),hr(e),i&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,lg(e,t)));break;case 30:i&512&&(gt||r===null||Fn(r,r.return)),i=H_(),a=mp,o=(n&335544064)===n,s=e.memoizedProps,mp=o&&Ao(s.default,s.update)!=="none",pr(t,e,n),hr(e),o&&r!==null&<&&(e.flags|=4),mp=a,lt=i;break;case 21:break;case 7:i&512&&(gt||r===null||Fn(r,r.return)),r&&r.stateNode!==null&&(r.stateNode._fragmentFiber=e);default:pr(t,e,n),hr(e)}}function hr(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(b3(r)){n=r;break}r=r.return}r=null;for(var i=e.return;i!==null;){if(jT(i)){var a=i.stateNode;r===null?r=[a]:r.push(a)}if(OT(i))break;i=i.return}var o=r;if(n==null)throw Error(ne(160));switch(n.tag){case 27:var s=n.stateNode,l=mw(e);Zv(e,l,s,o);break;case 5:var u=n.stateNode;n.flags&32&&(ff(u,""),n.flags&=-33);var f=mw(e);Zv(e,f,u,o);break;case 3:case 4:var d=n.stateNode.containerInfo,p=mw(e);SS(e,p,d,o);break;default:throw Error(ne(161))}}catch(h){xt(e,e.return,h)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function M3(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;M3(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,xf=!0,t.reset(),xf=!1),e=e.sibling}}function Hu(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)P3(t,e),t=t.sibling;else j3(t)}function P3(e,t){var n=e.alternate;if(n===null)OS(e,!1);else switch(e.tag){case 3:if(AS=ea=!1,kN(),Hu(t,e),!ea&&!ey){if(e=ca,e!==null)for(var r=0;r<e.length;r+=3){n=e[r];var i=e[r+1];o5(n,e[r+2]),n=n.ownerDocument.documentElement,n!==null&&n.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group("+i+")"})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===""&&(e.style.viewTransitionName="none",e.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group(root)"}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:"forwards",pseudoElement:"::view-transition"})),AS=!0}ca=null;break;case 5:Hu(t,e);break;case 4:r=ea,ea=!1,Hu(t,e),ea&&(ey=!0),ea=r;break;case 22:e.memoizedState===null&&(n.memoizedState!==null?OS(e,!1):Hu(t,e));break;case 30:r=ea,i=kN(),ea=!1,Hu(t,e),ea&&(e.flags|=4);var a=e.memoizedProps,o=e.stateNode;t=po(a,o),o=po(n.memoizedProps,o);var s=Ao(a.default,a.update);s==="none"?t=!1:(a=n.memoizedState,n.memoizedState=null,n=e.child,Mr=0,t=ET(e,n,t,o,s,a,!0),Mr!==(a===null?0:a.length)&&(e.flags|=32)),e.flags&4&&t?(hf(e,e.memoizedProps.onUpdate),ca=i):i!==null&&(i.push.apply(i,ca),ca=i),ea=e.flags&32?!0:r;break;default:Hu(t,e)}}function ta(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)E3(e,t.alternate,t),t=t.sibling}function Go(e,t){for(e=e.child;e!==null;){var n=e,r=t;switch(n.tag){case 0:case 11:case 14:case 15:ks(4,n,n.return),Go(n,r);break;case 1:Fn(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount=="function"&&y3(n,n.return,i),Go(n,r);break;case 27:r&2&&h5(n.stateNode,n.type,n.memoizedProps);case 5:Fn(n,n.return),n.tag!==5&&n.tag!==27||$p(n),Go(n,r);break;case 6:$p(n);break;case 26:Fn(n,n.return),i=n.stateNode,n.memoizedState!==null||i===null||gt||i.parentNode.removeChild(i),Go(n,r);break;case 22:n.memoizedState===null&&Go(n,r);break;case 30:Fn(n,n.return),Go(n,r);break;case 7:Fn(n,n.return);default:Go(n,r)}e=e.sibling}}function Di(e,t,n){for(n=t.subtreeFlags&8772?n:n&-2,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags,s=(n&1)!==0;switch(a.tag){case 0:case 11:case 15:Di(i,a,n),bm(4,a);break;case 1:if(Di(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount=="function")try{i.componentDidMount()}catch(f){xt(r,r.return,f)}if(r=a,i=r.updateQueue,i!==null){var l=r.stateNode;try{var u=i.shared.hiddenCallbacks;if(u!==null)for(i.shared.hiddenCallbacks=null,i=0;i<u.length;i++)TL(u[i],l)}catch(f){xt(r,r.return,f)}}s&&o&64&&v3(a),ua(a,a.return);break;case 27:n&2&&x3(a);case 5:a.tag!==5&&a.tag!==27||DN(a),Di(i,a,n),s&&r===null&&o&4&&wS(a),ua(a,a.return);break;case 6:DN(a);break;case 26:l=a.stateNode,a.memoizedState!==null||l===null||An||GS(sh(l.ownerDocument),a.type,l),Di(i,a,n),s&&r===null&&o&4&&wS(a),ua(a,a.return);break;case 12:Di(i,a,n);break;case 31:Di(i,a,n),s&&o&4&&_3(i,a);break;case 13:Di(i,a,n),s&&o&4&&N3(i,a);break;case 22:a.memoizedState===null&&Di(i,a,n),ua(a,a.return);break;case 30:Di(i,a,n),ua(a,a.return);break;case 7:ua(a,a.return);default:Di(i,a,n)}t=t.sibling}}function TT(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&vm(n))}function AT(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&vm(e))}function ui(e,t,n,r){var i=(n&335544064)===n;if(t.subtreeFlags&(i?10262:10256))for(t=t.child;t!==null;)$3(e,t,n,r),t=t.sibling;else i&&O3(t)}function $3(e,t,n,r){var i=(n&335544064)===n;i&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&hv(t);var a=t.flags;switch(t.tag){case 0:case 11:case 15:ui(e,t,n,r),a&2048&&bm(9,t);break;case 1:ui(e,t,n,r);break;case 3:ui(e,t,n,r),i&&AS&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,e.style.viewTransitionName==="root"&&(e.style.viewTransitionName=""),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName==="none"&&(e.style.viewTransitionName="")),a&2048&&(a=null,t.alternate!==null&&(a=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==a&&(t.refCount++,a!=null&&vm(a)));break;case 12:if(a&2048){ui(e,t,n,r),a=t.stateNode;try{var o=t.memoizedProps,s=o.id,l=o.onPostCommit;typeof l=="function"&&l(s,t.alternate===null?"mount":"update",a.passiveEffectDuration,-0)}catch(u){xt(t,t.return,u)}}else ui(e,t,n,r);break;case 31:ui(e,t,n,r);break;case 13:ui(e,t,n,r);break;case 23:break;case 22:o=t.stateNode,s=t.alternate,t.memoizedState!==null?(i&&s!==null&&s.memoizedState===null&&hv(s),o._visibility&2?ui(e,t,n,r):Dp(e,t)):(i&&s!==null&&s.memoizedState!==null&&hv(t),o._visibility&2?ui(e,t,n,r):(o._visibility|=2,tc(e,t,n,r,(t.subtreeFlags&10256)!==0||!1))),a&2048&&TT(s,t);break;case 24:ui(e,t,n,r),a&2048&&AT(t.alternate,t);break;case 30:i&&(a=t.alternate,a!==null&&(Ta(a.child,!0),Ta(t.child,!0))),ui(e,t,n,r);break;default:ui(e,t,n,r)}}function tc(e,t,n,r,i){for(i=i&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var a=e,o=t,s=n,l=r,u=o.flags;switch(o.tag){case 0:case 11:case 15:tc(a,o,s,l,i),bm(8,o);break;case 23:break;case 22:var f=o.stateNode;o.memoizedState!==null?f._visibility&2?tc(a,o,s,l,i):Dp(a,o):(f._visibility|=2,tc(a,o,s,l,i)),i&&u&2048&&TT(o.alternate,o);break;case 24:tc(a,o,s,l,i),i&&u&2048&&AT(o.alternate,o);break;default:tc(a,o,s,l,i)}t=t.sibling}}function Dp(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Dp(n,r),i&2048&&TT(r.alternate,r);break;case 24:Dp(n,r),i&2048&&AT(r.alternate,r);break;default:Dp(n,r)}t=t.sibling}}var vl=8192;function ul(e,t,n){if(e.subtreeFlags&vl)for(e=e.child;e!==null;)D3(e,t,n),e=e.sibling}function D3(e,t,n){switch(e.tag){case 26:ul(e,t,n),e.flags&vl&&(e.memoizedState!==null?yK(n,Li,e.memoizedState,e.memoizedProps):(e=e.stateNode,(t&335544128)===t&&lR(n,e)));break;case 5:ul(e,t,n),e.flags&vl&&(e=e.stateNode,(t&335544128)===t&&lR(n,e));break;case 3:case 4:var r=Li;Li=sh(e.stateNode.containerInfo),ul(e,t,n),Li=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=vl,vl=16777216,ul(e,t,n),vl=r):ul(e,t,n));break;case 30:if(e.flags&vl&&(r=e.memoizedProps.name,r!=null&&r!=="auto")){var i=e.stateNode;i.paired=null,Kr===null&&(Kr=new Map),Kr.set(r,i)}ul(e,t,n);break;default:ul(e,t,n)}}function I3(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Vd(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];_n=r,L3(r,e)}I3(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)k3(e),e=e.sibling}function k3(e){switch(e.tag){case 0:case 11:case 15:Vd(e),e.flags&2048&&ks(9,e,e.return);break;case 3:Vd(e);break;case 12:Vd(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,mv(e)):Vd(e);break;default:Vd(e)}}function mv(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];_n=r,L3(r,e)}I3(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:ks(8,t,t.return),mv(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,mv(t));break;default:mv(t)}e=e.sibling}}function L3(e,t){for(;_n!==null;){var n=_n;switch(n.tag){case 0:case 11:case 15:ks(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:vm(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,_n=r;else e:for(n=e;_n!==null;){r=_n;var i=r.sibling,a=r.return;if(A3(r),r===n){_n=null;break e}if(i!==null){i.return=a,_n=i;break e}_n=a}}}var p9={getCacheForType:function(e){var t=qn(sn),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return qn(sn).controller.signal}},h9=typeof WeakMap=="function"?WeakMap:Map,ft=0,_t=null,We=null,Je=0,yt=0,Hr=null,ds=!1,fd=!1,CT=!1,vo=0,Jt=0,Ls=0,Vl=0,ty=0,Xr=0,pf=0,Ip=null,Nr=null,NS=!1,nx=0,B3=0,ny=1/0,ry=null,Es=null,Xt=0,Ui=null,au=null,xa=0,RS=0,MS=null,z3=null,Mc=null,Pc=null,$c=null,kp=0,gv=null;function ei(){return ft&2&&Je!==0?Je&-Je:Pe.T!==null?NT():qk()}function F3(){if(Xr===0)if(!(Je&536870912)||Ke){var e=Qm;Qm<<=1,!(Qm&3932160)&&(Qm=262144),Xr=e}else Xr=536870912;return e=Xn.current,e!==null&&(e.flags|=32),Xr}function hf(e,t){if(t!=null){var n=e.stateNode,r=n.ref;r===null&&(r=n.ref=s5(po(e.memoizedProps,n))),Pc===null&&(Pc=[]),Pc.push(t.bind(null,r))}}function Dr(e,t,n){(e===_t&&(yt===2||yt===9)||e.cancelPendingCommit!==null)&&(mf(e,0),ps(e,Je,Xr,!1)),hm(e,n),(!(ft&2)||e!==_t)&&(e===_t&&(!(ft&2)&&(Vl|=n),Jt===4&&ps(e,Je,Xr,!1)),Na(e))}function U3(e,t,n){if(ft&6)throw Error(ne(327));var r=!n&&(t&127)===0&&(t&e.expiredLanes)===0||pm(e,t),i=r?v9(e,t):vw(e,t,!0),a=r;do{if(i===0){fd&&!r&&ps(e,t,0,!1);break}else{if(n=e.current.alternate,a&&!m9(n)){i=vw(e,t,!1),a=!1;continue}if(i===2){if(a=t,e.errorRecoveryDisabledLanes&a)var o=0;else o=e.pendingLanes&-536870913,o=o!==0?o:o&536870912?536870912:0;if(o!==0){t=o;e:{var s=e;i=Ip;var l=s.current.memoizedState.isDehydrated;if(l&&(mf(s,o).flags|=256),o=vw(s,o,!1),o!==2&&o!==6){if(CT&&!l){s.errorRecoveryDisabledLanes|=a,Vl|=a,i=4;break e}a=Nr,Nr=i,a!==null&&(Nr===null?Nr=a:Nr.push.apply(Nr,a))}i=o}if(a=!1,i!==2)continue}}if(i===1){mf(e,0),ps(e,t,0,!0);break}e:{switch(r=e,a=i,a){case 0:case 1:throw Error(ne(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:ps(r,t,Xr,!ds);break e;case 2:Nr=null;break;case 3:case 5:break;default:throw Error(ne(329))}if((t&62914560)===t&&(i=nx+300-Qr(),10<i)){if(ps(r,t,Xr,!ds),Ub(r,0,!0)!==0)break e;xa=t,r.timeoutHandle=MT(BN.bind(null,r,n,Nr,ry,NS,t,Xr,Vl,pf,ds,a,"Throttled",-0,0),i);break e}BN(r,n,Nr,ry,NS,t,Xr,Vl,pf,ds,a,null,-0,0)}}break}while(!0);Na(e)}function BN(e,t,n,r,i,a,o,s,l,u,f,d,p,h){e.timeoutHandle=-1;var b=t.subtreeFlags,m=(a&335544064)===a;if(d=null,(m||b&8192||(b&16785408)===16785408)&&(d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:pa},Kr=null,D3(t,a,d),m&&(b=d,m=e.containerInfo,m=(m.nodeType===9?m:m.ownerDocument).__reactViewTransition,m!=null&&(b.count++,b.waitingForViewTransition=!0,b=lh.bind(b),m.finished.then(b,b))),b=(a&62914560)===a?nx-Qr():(a&4194048)===a?B3-Qr():0,b=bK(d,b),b!==null)){xa=a,e.cancelPendingCommit=b(FN.bind(null,e,t,a,n,r,i,o,s,l,u,f,d,null,p,h)),ps(e,a,o,!u);return}FN(e,t,a,n,r,i,o,s,l,u,f,d)}function m9(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!ri(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function ps(e,t,n,r){t=Bk(e,t),t&=~ty,t&=~Vl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Jr(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&Fk(e,n,t)}function rx(){return ft&6?!0:(xm(0),!1)}function _T(){if(We!==null){if(yt===0)var e=We.return;else e=We,Qa=Tu=null,dT(e),_c=null,th=0,e=We;for(;e!==null;)g3(e.alternate,e),e=e.return;We=null}}function mf(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,B9(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),xa=0,_T(),_t=e,We=n=no(e.current,null),Je=t,yt=0,Hr=null,ds=!1,fd=pm(e,t),CT=!1,pf=Xr=ty=Vl=Ls=Jt=0,Nr=Ip=null,NS=!1,vo=Bk(e,t),Kb(),n}function H3(e,t){qe=null,Pe.H=Xv,t===ud||t===Wb?(t=dN(),yt=3):t===iT?(t=dN(),yt=4):yt=t===xT?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Hr=t,We===null&&(Jt=1,Wv(e,xi(t,e.current)))}function q3(){var e=Xn.current;return e===null?!0:(Je&4194048)===Je?ar===null:(Je&62914560)===Je||Je&536870912?e===ar:!1}function V3(){var e=Pe.H;return Pe.H=Xv,e===null?Xv:e}function G3(){var e=Pe.A;return Pe.A=p9,e}function iy(){Jt=4,ds||(Je&4194048)!==Je&&Xn.current!==null||(fd=!0),!(Ls&134217727)&&!(Vl&134217727)||_t===null||ps(_t,Je,Xr,!1)}function vw(e,t,n){var r=ft;ft|=2;var i=V3(),a=G3();(_t!==e||Je!==t)&&(ry=null,mf(e,t)),t=!1;var o=Jt;e:do try{if(yt!==0&&We!==null){var s=We,l=Hr;switch(yt){case 8:_T(),o=6;break e;case 3:case 2:case 9:case 6:Xn.current===null&&(t=!0);var u=yt;if(yt=0,Hr=null,vc(e,s,l,u),n&&fd){o=0;break e}break;default:u=yt,yt=0,Hr=null,vc(e,s,l,u)}}g9(),o=Jt;break}catch(f){H3(e,f)}while(!0);return t&&e.shellSuspendCounter++,Qa=Tu=null,ft=r,Pe.H=i,Pe.A=a,We===null&&(_t=null,Je=0,Kb()),o}function g9(){for(;We!==null;)K3(We)}function v9(e,t){var n=ft;ft|=2;var r=V3(),i=G3();_t!==e||Je!==t?(ry=null,ny=Qr()+500,mf(e,t)):fd=pm(e,t);e:do try{if(yt!==0&&We!==null){t=We;var a=Hr;t:switch(yt){case 1:yt=0,Hr=null,vc(e,t,a,1);break;case 2:case 9:if(fN(a)){yt=0,Hr=null,zN(t);break}t=function(){yt!==2&&yt!==9||_t!==e||(yt=7),Na(e)},a.then(t,t);break e;case 3:yt=7;break e;case 4:yt=5;break e;case 7:fN(a)?(yt=0,Hr=null,zN(t)):(yt=0,Hr=null,vc(e,t,a,7));break;case 5:var o=null;switch(We.tag){case 26:o=We.memoizedState;case 5:case 27:var s=We;if(o?v5(o):s.stateNode.complete){yt=0,Hr=null;var l=s.sibling;if(l!==null)We=l;else{var u=s.return;u!==null?(We=u,ix(u)):We=null}break t}}yt=0,Hr=null,vc(e,t,a,5);break;case 6:yt=0,Hr=null,vc(e,t,a,6);break;case 8:_T(),Jt=6;break e;default:throw Error(ne(462))}}y9();break}catch(f){H3(e,f)}while(!0);return Qa=Tu=null,Pe.H=r,Pe.A=i,ft=n,We!==null?0:(_t=null,Je=0,Kb(),Jt)}function y9(){for(;We!==null&&!DV();)K3(We)}function K3(e){var t=m3(e.alternate,e,vo);e.memoizedProps=e.pendingProps,t===null?ix(e):We=t}function zN(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=CN(n,t,t.pendingProps,t.type,void 0,Je);break;case 11:t=CN(n,t,t.pendingProps,t.type.render,t.ref,Je);break;case 5:dT(t);var r=t;r===Mn&&(Ke?(Uv(r),r.tag===5&&r.stateNode!=null&&(Dt=r.stateNode)):(Uv(r),Ke=!0));default:g3(n,t),t=We=vL(t,vo),t=m3(n,t,vo)}e.memoizedProps=e.pendingProps,t===null?ix(e):We=t}function vc(e,t,n,r){Qa=Tu=null,dT(t),_c=null,th=0;var i=t.return;try{if(a9(e,i,t,n,Je)){Jt=1,Wv(e,xi(n,e.current)),We=null;return}}catch(a){if(i!==null)throw We=i,a;Jt=1,Wv(e,xi(n,e.current)),We=null;return}t.flags&32768?(Ke||r===1?e=!0:fd||Je&536870912?e=!1:(ds=e=!0,(r===2||r===9||r===3||r===6)&&(r=Xn.current,r!==null&&r.tag===13&&(r.flags|=16384))),Y3(t,e)):ix(t)}function ix(e){var t=e;do{if(t.flags&32768){Y3(t,ds);return}e=t.return;var n=u9(t.alternate,t,vo);if(n!==null){We=n;return}if(t=t.sibling,t!==null){We=t;return}We=t=e}while(t!==null);Jt===0&&(Jt=5)}function Y3(e,t){do{var n=c9(e.alternate,e);if(n!==null){n.flags&=32767,We=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){We=e;return}We=e=n}while(e!==null);Jt=6,We=null}function FN(e,t,n,r,i,a,o,s,l,u,f,d){e.cancelPendingCommit=null;do ax();while(Xt!==0);if(ft&6)throw Error(ne(327));if(t!==null){if(t===e.current)throw Error(ne(177));e===_t&&(We=_t=null,Je=0),au=t,Ui=e,xa=n,MS=i,z3=r,b9(e,t,n,o,s,l,d)}}function b9(e,t,n,r,i,a,o){var s=t.lanes|t.childLanes;if(RS=s,s|=ZE,VV(e,n,s,r,i,a),Pc=null,(n&335544064)===n?($c=KG(e),r=10262):($c=null,r=10256),t.subtreeFlags&r||t.flags&r?(e.callbackNode=null,e.callbackPriority=0,E9(kv,function(){return IS(),null})):(e.callbackNode=null,e.callbackPriority=0),Jv=!1,r=(t.flags&13878)!==0,t.subtreeFlags&13878||r){r=Pe.T,Pe.T=null,i=pt.p,pt.p=2,a=ft,ft|=4;try{f9(e,t,n)}finally{ft=a,pt.p=i,Pe.T=r}}Xt=1,Jv?Mc=V9(o,e.containerInfo,$c,PS,$S,w9,DS,IS,x9):(PS(),$S(),DS())}function x9(e){if(Xt!==0){var t=Ui.onRecoverableError;t(e,{componentStack:null})}}function w9(){Xt===3&&(Xt=0,P3(au,Ui),Xt=4)}function PS(){if(Xt===1){Xt=0;var e=Ui,t=au,n=xa,r=(t.flags&13878)!==0;if(t.subtreeFlags&13878||r){r=Pe.T,Pe.T=null;var i=pt.p;pt.p=2;var a=ft;ft|=4;try{mp=ey=!1,R3(t,e,n),n=zS;var o=uL(e.containerInfo),s=n.focusedElem,l=n.selectionRange;if(o!==s&&s&&s.ownerDocument&&lL(s.ownerDocument.documentElement,s)){if(l!==null&&QE(s)){var u=l.start,f=l.end;if(f===void 0&&(f=u),"selectionStart"in s)s.selectionStart=u,s.selectionEnd=Math.min(f,s.value.length);else{var d=s.ownerDocument||document,p=d&&d.defaultView||window;if(p.getSelection){var h=p.getSelection(),b=s.textContent.length,m=Math.min(l.start,b),g=l.end===void 0?m:Math.min(l.end,b);!h.extend&&m>g&&(o=g,g=m,m=o);var y=rN(s,m),v=rN(s,g);if(y&&v&&(h.rangeCount!==1||h.anchorNode!==y.node||h.anchorOffset!==y.offset||h.focusNode!==v.node||h.focusOffset!==v.offset)){var w=d.createRange();w.setStart(y.node,y.offset),h.removeAllRanges(),m>g?(h.addRange(w),h.extend(v.node,v.offset)):(w.setEnd(v.node,v.offset),h.addRange(w))}}}}for(d=[],h=s;h=h.parentNode;)h.nodeType===1&&d.push({element:h,left:h.scrollLeft,top:h.scrollTop});for(typeof s.focus=="function"&&s.focus(),s=0;s<d.length;s++){var S=d[s];S.element.scrollLeft=S.left,S.element.scrollTop=S.top}}xf=!!BS,zS=BS=null}finally{ft=a,pt.p=i,Pe.T=r}}e.current=t,Xt=2}}function $S(){if(Xt===2){Xt=0;var e=Ui,t=au,n=(t.flags&8772)!==0;if(t.subtreeFlags&8772||n){n=Pe.T,Pe.T=null;var r=pt.p;pt.p=2;var i=ft;ft|=4;try{E3(e,t.alternate,t)}finally{ft=i,pt.p=r,Pe.T=n}}Xt=3}}function DS(){if(Xt===4||Xt===3){Xt=0;var e=Mc;Mc=null,IV();var t=Ui,n=au,r=xa,i=z3,a=(r&335544064)===r?10262:10256;if(n.subtreeFlags&a||n.flags&a?Xt=5:(Xt=0,au=Ui=null,X3(t,t.pendingLanes)),a=t.pendingLanes,a===0&&(Es=null),VE(r),n=n.stateNode,Zr&&typeof Zr.onCommitFiberRoot=="function")try{Zr.onCommitFiberRoot(dm,n,void 0,(n.current.flags&128)===128)}catch{}if(i!==null){n=Pe.T,a=pt.p,pt.p=2,Pe.T=null;try{for(var o=t.onRecoverableError,s=0;s<i.length;s++){var l=i[s];o(l.value,{componentStack:l.stack})}}finally{Pe.T=n,pt.p=a}}if(i=Pc,o=$c,$c=null,i!==null&&(Pc=null,o===null&&(o=[]),e!==null))for(l=0;l<i.length;l++)n=(0,i[l])(o),n!==void 0&&e.finished.finally(n);xa&3&&ax(),Na(t),a=t.pendingLanes,r&261930&&a&42?t===gv?kp++:(kp=0,gv=t):(kp=0,gv=null),xm(0)}}function X3(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,vm(t)))}function ax(){return Mc!==null&&(Mc.skipTransition(),Mc=null),PS(),$S(),DS(),IS()}function IS(){if(Xt!==5)return!1;var e=Ui,t=RS;RS=0;var n=VE(xa),r=Pe.T,i=pt.p;try{pt.p=32>n?32:n,Pe.T=null,n=MS,MS=null;var a=Ui,o=xa;if(Xt=0,au=Ui=null,xa=0,ft&6)throw Error(ne(331));var s=ft;if(ft|=4,k3(a.current),$3(a,a.current,o,n),ft=s,xm(0,!1),Zr&&typeof Zr.onPostCommitFiberRoot=="function")try{Zr.onPostCommitFiberRoot(dm,a)}catch{}return!0}finally{pt.p=i,Pe.T=r,X3(e,t)}}function UN(e,t,n){t=xi(n,t),t=mS(e.stateNode,t,2),e=Ss(e,t,2),e!==null&&(hm(e,2),Na(e))}function xt(e,t,n){if(e.tag===3)UN(e,e,n);else for(;t!==null;){if(t.tag===3){UN(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Es===null||!Es.has(r))){e=xi(n,e),n=c3(2),r=Ss(t,n,2),r!==null&&(f3(n,r,t,e),hm(r,2),Na(r));break}}t=t.return}}function yw(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new h9;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(CT=!0,i.add(n),e=S9.bind(null,e,t,n),t.then(e,e))}function S9(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,_t===e&&(Je&n)===n&&(Jt===4||Jt===3&&(Je&62914560)===Je&&300>Qr()-nx?ft&2?ty|=n:mf(e,0):ty|=n,pf===Je&&(pf=0)),Na(e)}function W3(e,t){t===0&&(t=zk()),e=Eu(e,t),e!==null&&(hm(e,t),Na(e))}function O9(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),W3(e,n)}function j9(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(ne(314))}r!==null&&r.delete(t),W3(e,n)}function E9(e,t){return HE(e,t)}var gf=null,nc=null,kS=!1,ay=!1,bw=!1,hs=0;function Na(e){e!==nc&&e.next===null&&(nc===null?gf=nc=e:nc=nc.next=e),ay=!0,kS||(kS=!0,A9())}function xm(e,t){if(!bw&&ay){bw=!0;do for(var n=!1,r=gf;r!==null;){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Jr(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,HN(r,a))}else a=Je,a=Ub(r,r===_t?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||pm(r,a)||(n=!0,HN(r,a));r=r.next}while(n);bw=!1}}function T9(){Q3()}function Q3(){ay=kS=!1;var e=0;hs!==0&&L9()&&(e=hs);for(var t=Qr(),n=null,r=gf;r!==null;){var i=r.next,a=Z3(r,t);a===0?(r.next=null,n===null?gf=i:n.next=i,i===null&&(nc=n)):(n=r,(e!==0||a&3)&&(ay=!0)),r=i}Xt!==0&&Xt!==5||xm(e),hs!==0&&(hs=0)}function Z3(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Jr(a),s=1<<o,l=i[o];l===-1?(!(s&n)||s&r)&&(i[o]=qV(s,t)):l<=t&&(e.expiredLanes|=s),a&=~s}if(t=_t,n=Je,n=Ub(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(yt===2||yt===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&W0(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||pm(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&W0(r),VE(n)){case 2:case 8:n=kk;break;case 32:n=kv;break;case 268435456:n=Lk;break;default:n=kv}return r=J3.bind(null,e),n=HE(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&W0(r),e.callbackPriority=2,e.callbackNode=null,2}function J3(e,t){if(Xt!==0&&Xt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(ax()&&e.callbackNode!==n)return null;var r=Je;return r=Ub(e,e===_t?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(U3(e,r,t),Z3(e,Qr()),e.callbackNode!=null&&e.callbackNode===n?J3.bind(null,e):null)}function HN(e,t){if(ax())return null;U3(e,t,!0)}function A9(){z9(function(){ft&6?HE(Ik,T9):Q3()})}function NT(){if(hs===0){var e=tu;e===0&&(e=Wm,Wm<<=1,!(Wm&261888)&&(Wm=256)),hs=e}return hs}function qN(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:iv(e)}function C9(e,t,n,r,i){if(t==="submit"&&n&&n.stateNode===i){var a=qN((i[Lr]||null).action),o=r.submitter;o&&(t=(t=o[Lr]||null)?qN(t.formAction):o.getAttribute("formAction"),t!==null&&(a=t,o=null));var s=new qb("action","action",null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(hs!==0){var l=new FormData(i,o);pS(n,{pending:!0,data:l,method:i.method,action:a},null,l)}}else typeof a=="function"&&(s.preventDefault(),l=new FormData(i,o),pS(n,{pending:!0,data:l,method:i.method,action:a},a,l))},currentTarget:i}]})}}for(var xw=0;xw<nS.length;xw++){var ww=nS[xw],_9=ww.toLowerCase(),N9=ww[0].toUpperCase()+ww.slice(1);Xi(_9,"on"+N9)}Xi(fL,"onAnimationEnd");Xi(dL,"onAnimationIteration");Xi(pL,"onAnimationStart");Xi("dblclick","onDoubleClick");Xi("focusin","onFocus");Xi("focusout","onBlur");Xi(BG,"onTransitionRun");Xi(zG,"onTransitionStart");Xi(FG,"onTransitionCancel");Xi(hL,"onTransitionEnd");cf("onMouseEnter",["mouseout","mouseover"]);cf("onMouseLeave",["mouseout","mouseover"]);cf("onPointerEnter",["pointerout","pointerover"]);cf("onPointerLeave",["pointerout","pointerover"]);Ou("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Ou("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Ou("onBeforeInput",["compositionend","keypress","textInput","paste"]);Ou("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Ou("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Ou("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ih="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),R9=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ih));function e5(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],l=s.instance,u=s.currentTarget;if(s=s.listener,l!==a&&i.isPropagationStopped())break e;a=s,i.currentTarget=u;try{a(i)}catch(f){Bv(f)}i.currentTarget=null,a=l}else for(o=0;o<r.length;o++){if(s=r[o],l=s.instance,u=s.currentTarget,s=s.listener,l!==a&&i.isPropagationStopped())break e;a=s,i.currentTarget=u;try{a(i)}catch(f){Bv(f)}i.currentTarget=null,a=l}}}}function Xe(e,t){var n=t[B_];n===void 0&&(n=t[B_]=new Set);var r=e+"__bubble";n.has(r)||(t5(t,e,2,!1),n.add(r))}function Sw(e,t,n){var r=0;t&&(r|=4),t5(n,e,r,t)}var ug="_reactListening"+Math.random().toString(36).slice(2);function RT(e){if(!e[ug]){e[ug]=!0,Gk.forEach(function(n){n!=="selectionchange"&&(R9.has(n)||Sw(n,!1,e),Sw(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ug]||(t[ug]=!0,Sw("selectionchange",!1,t))}}function t5(e,t,n,r){switch(j5(t)){case 2:var i=OK;break;case 8:i=jK;break;default:i=LT}n=i.bind(null,t,n,e),i=void 0,!Z1||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Ow(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var s=r.stateNode.containerInfo;if(s===i)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&o.stateNode.containerInfo===i)return;o=o.return}for(;s!==null;){if(o=Sl(s),o===null)return;if(l=o.tag,l===5||l===6||l===26||l===27){r=a=o;continue e}s=s.parentNode}}r=r.return}eL(function(){var u=a,f=KE(n),d=[];e:{var p=mL.get(e);if(p!==void 0){var h=qb,b=e;switch(e){case"keypress":if(ov(n)===0)break e;case"keydown":case"keyup":h=mG;break;case"focusin":b="focus",h=nw;break;case"focusout":b="blur",h=nw;break;case"beforeblur":case"afterblur":h=nw;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=K_;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=rG;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=xG;break;case fL:case dL:case pL:h=oG;break;case hL:h=SG;break;case"scroll":case"scrollend":h=tG;break;case"wheel":h=jG;break;case"copy":case"cut":case"paste":h=lG;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=X_;break;case"submit":h=yG;break;case"toggle":case"beforetoggle":h=TG}var m=(t&4)!==0,g=!m&&(e==="scroll"||e==="scrollend"),y=m?p!==null?p+"Capture":null:p;m=[];for(var v=u,w;v!==null;){var S=v;if(w=S.stateNode,S=S.tag,S!==5&&S!==26&&S!==27||w===null||y===null||(S=Wp(v,y),S!=null&&m.push(ah(v,S,w))),g)break;v=v.return}0<m.length&&(p=new h(p,b,null,n,f),d.push({event:p,listeners:m}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",h&&n!==Q1&&(b=n.relatedTarget||n.fromElement)&&(Sl(b)||b[sd]))break e;(p||h)&&(b=f.window===f?f:(h=f.ownerDocument)?h.defaultView||h.parentWindow:window,p?(h=n.relatedTarget||n.toElement,p=u,h=h?Sl(h):null,h!==null&&(g=fm(h),m=h.tag,h!==g||m!==5&&m!==27&&m!==6)&&(h=null)):(p=null,h=u),p!==h&&(m=K_,S="onMouseLeave",y="onMouseEnter",v="mouse",(e==="pointerout"||e==="pointerover")&&(m=X_,S="onPointerLeave",y="onPointerEnter",v="pointer"),g=p==null?b:pp(p),w=h==null?b:pp(h),b=new m(S,v+"leave",p,n,f),b.target=g,b.relatedTarget=w,S=null,Sl(f)===u&&(m=new m(y,v+"enter",h,n,f),m.target=w,m.relatedTarget=g,S=m),g=S,m=p&&h?B1(p,h,M9):null,p!==null&&VN(d,b,p,m,!1),h!==null&&g!==null&&VN(d,g,h,m,!0)))}e:{if(p=u?pp(u):window,h=p.nodeName&&p.nodeName.toLowerCase(),h==="select"||h==="input"&&p.type==="file")var O=J_;else if(Z_(p))if(oL)O=IG;else{O=$G;var j=PG}else h=p.nodeName,!h||h.toLowerCase()!=="input"||p.type!=="checkbox"&&p.type!=="radio"?u&&GE(u.elementType)&&(O=J_):O=DG;if(O&&(O=O(e,u))){aL(d,O,n,f);break e}j&&j(e,p,u)}switch(j=u?pp(u):window,e){case"focusin":(Z_(j)||j.contentEditable==="true")&&(fc=j,eS=u,Ap=null);break;case"focusout":Ap=eS=fc=null;break;case"mousedown":tS=!0;break;case"contextmenu":case"mouseup":case"dragend":tS=!1,iN(d,n,f);break;case"selectionchange":if(LG)break;case"keydown":case"keyup":iN(d,n,f)}var E;if(WE)e:{switch(e){case"compositionstart":var T="onCompositionStart";break e;case"compositionend":T="onCompositionEnd";break e;case"compositionupdate":T="onCompositionUpdate";break e}T=void 0}else cc?rL(e,n)&&(T="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(T="onCompositionStart");T&&(nL&&n.locale!=="ko"&&(cc||T!=="onCompositionStart"?T==="onCompositionEnd"&&cc&&(E=tL()):(cs=f,YE="value"in cs?cs.value:cs.textContent,cc=!0)),j=oy(u,T),0<j.length&&(T=new Y_(T,e,null,n,f),d.push({event:T,listeners:j}),E?T.data=E:(E=iL(n),E!==null&&(T.data=E)))),(E=CG?_G(e,n):NG(e,n))&&(T=oy(u,"onBeforeInput"),0<T.length&&(j=new Y_("onBeforeInput","beforeinput",null,n,f),d.push({event:j,listeners:T}),j.data=E)),C9(d,e,u,n,f)}e5(d,t)})}function ah(e,t,n){return{instance:e,listener:t,currentTarget:n}}function oy(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=Wp(e,n),i!=null&&r.unshift(ah(e,i,a)),i=Wp(e,t),i!=null&&r.push(ah(e,i,a))),e.tag===3)return r;e=e.return}return[]}function M9(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function VN(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,l=s.alternate,u=s.stateNode;if(s=s.tag,l!==null&&l===r)break;s!==5&&s!==26&&s!==27||u===null||(l=u,i?(u=Wp(n,a),u!=null&&o.unshift(ah(n,u,l))):i||(u=Wp(n,a),u!=null&&o.push(ah(n,u,l)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var P9=/\r\n?/g,$9=/\u0000|\uFFFD/g;function GN(e){return(typeof e=="string"?e:""+e).replace(P9,`
|
|
49
|
+
`).replace($9,"")}function n5(e,t){return t=GN(t),GN(e)===t}function bt(e,t,n,r,i,a){switch(n){case"children":if(typeof r=="string")t==="body"||t==="textarea"&&r===""||ff(e,r);else if(typeof r=="number"||typeof r=="bigint")t!=="body"&&ff(e,""+r);else return;break;case"className":Jm(e,"class",r);break;case"tabIndex":Jm(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":Jm(e,n,r);break;case"style":Jk(e,r,a);return;case"data":if(t!=="object"){Jm(e,"data",r);break}case"src":case"href":if(r===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(r==null||typeof r=="function"||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(n);break}r=iv(r),e.setAttribute(n,r);break;case"action":case"formAction":if(typeof r=="function"){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof a=="function"&&(n==="formAction"?(t!=="input"&&bt(e,t,"name",i.name,i,null),bt(e,t,"formEncType",i.formEncType,i,null),bt(e,t,"formMethod",i.formMethod,i,null),bt(e,t,"formTarget",i.formTarget,i,null)):(bt(e,t,"encType",i.encType,i,null),bt(e,t,"method",i.method,i,null),bt(e,t,"target",i.target,i,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(n);break}r=iv(r),e.setAttribute(n,r);break;case"onClick":r!=null&&(e.onclick=pa);return;case"onScroll":r!=null&&Xe("scroll",e);return;case"onScrollEnd":r!=null&&Xe("scrollend",e);return;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(ne(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(ne(60));(a!=null?a.__html:void 0)!==n&&(e.innerHTML=n)}}break;case"multiple":e.multiple=r&&typeof r!="function"&&typeof r!="symbol";break;case"muted":e.muted=r&&typeof r!="function"&&typeof r!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(r==null||typeof r=="function"||typeof r=="boolean"||typeof r=="symbol"){e.removeAttribute("xlink:href");break}n=iv(r),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(n,r):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"credentialless":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":r&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":r===!0?e.setAttribute(n,""):r!==!1&&r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(n,r):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":r!=null&&typeof r!="function"&&typeof r!="symbol"&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case"rowSpan":case"start":r==null||typeof r=="function"||typeof r=="symbol"||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case"popover":Xe("beforetoggle",e),Xe("toggle",e),rv(e,"popover",r);break;case"xlinkActuate":ka(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":ka(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":ka(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":ka(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":ka(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":ka(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":ka(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":ka(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":ka(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":rv(e,"is",r);break;case"innerText":case"textContent":return;default:if(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")n=JV.get(n)||n,rv(e,n,r);else return}lt=!0}function LS(e,t,n,r,i,a){switch(n){case"style":Jk(e,r,a);return;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(ne(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(ne(60));(a!=null?a.__html:void 0)!==n&&(e.innerHTML=n)}}break;case"children":if(typeof r=="string")ff(e,r);else if(typeof r=="number"||typeof r=="bigint")ff(e,""+r);else return;break;case"onScroll":r!=null&&Xe("scroll",e);return;case"onScrollEnd":r!=null&&Xe("scrollend",e);return;case"onClick":r!=null&&(e.onclick=pa);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!Kk.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(i=n.endsWith("Capture"),a=n.slice(2,i?n.length-7:void 0),t=e[Lr]||null,t=t!=null?t[n]:null,typeof t=="function"&&e.removeEventListener(a,t,i),typeof r=="function")){typeof t!="function"&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(a,r,i);break e}lt=!0,n in e?e[n]=r:r===!0?e.setAttribute(n,""):rv(e,n,r)}return}lt=!0}function Kn(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Xe("error",e),Xe("load",e);var r=!1,i=!1,a;for(a in n)if(n.hasOwnProperty(a)){var o=n[a];if(o!=null)switch(a){case"src":r=!0;break;case"srcSet":i=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(ne(137,t));default:bt(e,t,a,o,n,null)}}i&&bt(e,t,"srcSet",n.srcSet,n,null),r&&bt(e,t,"src",n.src,n,null);return;case"input":Xe("invalid",e);var s=a=o=i=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var f=n[r];if(f!=null)switch(r){case"name":i=f;break;case"type":o=f;break;case"checked":l=f;break;case"defaultChecked":u=f;break;case"value":a=f;break;case"defaultValue":s=f;break;case"children":case"dangerouslySetInnerHTML":if(f!=null)throw Error(ne(137,t));break;default:bt(e,t,r,f,n,null)}}Wk(e,a,s,l,u,o,i,!1);return;case"select":Xe("invalid",e),r=o=a=null;for(i in n)if(n.hasOwnProperty(i)&&(s=n[i],s!=null))switch(i){case"value":a=s;break;case"defaultValue":o=s;break;case"multiple":r=s;default:bt(e,t,i,s,n,null)}t=a,n=o,e.multiple=!!r,t!=null?Tc(e,!!r,t,!1):n!=null&&Tc(e,!!r,n,!0);return;case"textarea":Xe("invalid",e),a=i=r=null;for(o in n)if(n.hasOwnProperty(o)&&(s=n[o],s!=null))switch(o){case"value":r=s;break;case"defaultValue":i=s;break;case"children":a=s;break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(ne(91));break;default:bt(e,t,o,s,n,null)}Zk(e,r,i,a);return;case"option":for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case"selected":e.selected=r&&typeof r!="function"&&typeof r!="symbol";break;default:bt(e,t,l,r,n,null)}return;case"dialog":Xe("beforetoggle",e),Xe("toggle",e),Xe("cancel",e),Xe("close",e);break;case"iframe":case"object":Xe("load",e);break;case"video":case"audio":for(r=0;r<ih.length;r++)Xe(ih[r],e);break;case"image":Xe("error",e),Xe("load",e);break;case"details":Xe("toggle",e);break;case"embed":case"source":case"link":Xe("error",e),Xe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case"children":case"dangerouslySetInnerHTML":throw Error(ne(137,t));default:bt(e,t,u,r,n,null)}return;default:if(GE(t)){for(f in n)n.hasOwnProperty(f)&&(r=n[f],r!==void 0&&LS(e,t,f,r,n,void 0));return}}for(s in n)n.hasOwnProperty(s)&&(r=n[s],r!=null&&bt(e,t,s,r,n,null))}var D9={};function I9(e,t,n,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var i=null,a=null,o=null,s=null,l=null,u=null,f=null;for(h in n){var d=n[h];if(n.hasOwnProperty(h)&&d!=null)switch(h){case"checked":break;case"value":break;case"defaultValue":l=d;default:r.hasOwnProperty(h)||bt(e,t,h,null,r,d)}}for(var p in r){var h=r[p];if(d=n[p],r.hasOwnProperty(p)&&(h!=null||d!=null))switch(p){case"type":h!==d&&(lt=!0),a=h;break;case"name":h!==d&&(lt=!0),i=h;break;case"checked":h!==d&&(lt=!0),u=h;break;case"defaultChecked":h!==d&&(lt=!0),f=h;break;case"value":h!==d&&(lt=!0),o=h;break;case"defaultValue":h!==d&&(lt=!0),s=h;break;case"children":case"dangerouslySetInnerHTML":if(h!=null)throw Error(ne(137,t));break;default:h!==d&&bt(e,t,p,h,r,d)}}W1(e,o,s,l,u,f,a,i);return;case"select":h=o=s=p=null;for(a in n)if(l=n[a],n.hasOwnProperty(a)&&l!=null)switch(a){case"value":break;case"multiple":h=l;default:r.hasOwnProperty(a)||bt(e,t,a,null,r,l)}for(i in r)if(a=r[i],l=n[i],r.hasOwnProperty(i)&&(a!=null||l!=null))switch(i){case"value":a!==l&&(lt=!0),p=a;break;case"defaultValue":a!==l&&(lt=!0),s=a;break;case"multiple":a!==l&&(lt=!0),o=a;default:a!==l&&bt(e,t,i,a,r,l)}t=s,n=o,r=h,p!=null?Tc(e,!!n,p,!1):!!r!=!!n&&(t!=null?Tc(e,!!n,t,!0):Tc(e,!!n,n?[]:"",!1));return;case"textarea":h=p=null;for(s in n)if(i=n[s],n.hasOwnProperty(s)&&i!=null&&!r.hasOwnProperty(s))switch(s){case"value":break;case"children":break;default:bt(e,t,s,null,r,i)}for(o in r)if(i=r[o],a=n[o],r.hasOwnProperty(o)&&(i!=null||a!=null))switch(o){case"value":i!==a&&(lt=!0),p=i;break;case"defaultValue":i!==a&&(lt=!0),h=i;break;case"children":break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(ne(91));break;default:i!==a&&bt(e,t,o,i,r,a)}Qk(e,p,h);return;case"option":for(var b in n)if(p=n[b],n.hasOwnProperty(b)&&p!=null&&!r.hasOwnProperty(b))switch(b){case"selected":e.selected=!1;break;default:bt(e,t,b,null,r,p)}for(l in r)if(p=r[l],h=n[l],r.hasOwnProperty(l)&&p!==h&&(p!=null||h!=null))switch(l){case"selected":p!==h&&(lt=!0),e.selected=p&&typeof p!="function"&&typeof p!="symbol";break;default:bt(e,t,l,p,r,h)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var m in n)p=n[m],n.hasOwnProperty(m)&&p!=null&&!r.hasOwnProperty(m)&&bt(e,t,m,null,r,p);for(u in r)if(p=r[u],h=n[u],r.hasOwnProperty(u)&&p!==h&&(p!=null||h!=null))switch(u){case"children":case"dangerouslySetInnerHTML":if(p!=null)throw Error(ne(137,t));break;default:bt(e,t,u,p,r,h)}return;default:if(GE(t)){for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!==void 0&&!r.hasOwnProperty(g)&&LS(e,t,g,void 0,r,p);for(f in r)p=r[f],h=n[f],!r.hasOwnProperty(f)||p===h||p===void 0&&h===void 0||LS(e,t,f,p,r,h);return}}for(var y in n)p=n[y],n.hasOwnProperty(y)&&p!=null&&!r.hasOwnProperty(y)&&bt(e,t,y,null,r,p);for(d in r)p=r[d],h=n[d],!r.hasOwnProperty(d)||p===h||p==null&&h==null||bt(e,t,d,p,r,h)}function KN(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function k9(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&KN(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var l=n[r],u=l.startTime;if(u>s)break;var f=l.transferSize,d=l.initiatorType;f&&KN(d)&&(l=l.responseEnd,o+=f*(l<s?1:(s-u)/(l-u)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var BS=null,zS=null;function oh(e){return e.nodeType===9?e:e.ownerDocument}function YN(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function r5(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function i5(e,t,n,r){return n=oh(n).createElement(e),n[Hn]=r,n[Lr]=t,Kn(n,e,t),Nn(n),n}function FS(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var jw=null;function L9(){var e=window.event;return e&&e.type==="popstate"?e===jw?!1:(jw=e,!0):(jw=null,!1)}var MT=typeof setTimeout=="function"?setTimeout:void 0,B9=typeof clearTimeout=="function"?clearTimeout:void 0,XN=typeof Promise=="function"?Promise:void 0,WN=typeof requestAnimationFrame=="function"?requestAnimationFrame:MT,z9=typeof queueMicrotask=="function"?queueMicrotask:typeof XN<"u"?function(e){return XN.resolve(null).then(e).catch(F9)}:MT;function F9(e){setTimeout(function(){throw e})}function Vs(e){return e==="head"}function QN(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"||n==="/&"){if(r===0){e.removeChild(i),wf(t);return}r--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")r++;else if(n==="html")Tw(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,Tw(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[mm]||s==="SCRIPT"||s==="STYLE"||s==="LINK"&&a.rel.toLowerCase()==="stylesheet"||n.removeChild(a),a=o}}else n==="body"&&Tw(e.ownerDocument.body);n=i}while(n);wf(t)}function ZN(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),r&&r.nodeType===8)if(n=r.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=r}while(n)}function a5(e,t,n){if(t=CSS.escape(t)!==t?"r-"+btoa(t).replace(/=/g,""):t,e.style.viewTransitionName=t,n!=null&&(e.style.viewTransitionClass=n),n=getComputedStyle(e),n.display==="inline"){if(t=e.getClientRects(),t.length===1)var r=1;else for(var i=r=0;i<t.length;i++){var a=t[i];0<a.width&&0<a.height&&r++}r===1&&(e=e.style,e.display=t.length===1?"inline-block":"block",e.marginTop="-"+n.paddingTop,e.marginBottom="-"+n.paddingBottom)}}function o5(e,t){e=e.style,t=t.style;var n=t!=null?t.hasOwnProperty("viewTransitionName")?t.viewTransitionName:t.hasOwnProperty("view-transition-name")?t["view-transition-name"]:null:null;e.viewTransitionName=n==null||typeof n=="boolean"?"":(""+n).trim(),n=t!=null?t.hasOwnProperty("viewTransitionClass")?t.viewTransitionClass:t.hasOwnProperty("view-transition-class")?t["view-transition-class"]:null:null,e.viewTransitionClass=n==null||typeof n=="boolean"?"":(""+n).trim(),e.display==="inline-block"&&(t==null?e.display=e.margin="":(n=t.display,e.display=n==null||typeof n=="boolean"?"":n,n=t.margin,n!=null?e.margin=n:(n=t.hasOwnProperty("marginTop")?t.marginTop:t["margin-top"],e.marginTop=n==null||typeof n=="boolean"?"":n,t=t.hasOwnProperty("marginBottom")?t.marginBottom:t["margin-bottom"],e.marginBottom=t==null||typeof t=="boolean"?"":t)))}function U9(e,t,n){return n=n.ownerDocument.defaultView,{rect:e,abs:t.position==="absolute"||t.position==="fixed",clip:t.clipPath!=="none"||t.overflow!=="visible"||t.filter!=="none"||t.mask!=="none"||t.mask!=="none"||t.borderRadius!=="0px",view:0<=e.bottom&&0<=e.right&&e.top<=n.innerHeight&&e.left<=n.innerWidth}}function US(e){var t=e.getBoundingClientRect(),n=getComputedStyle(e);return U9(t,n,e)}function H9(e){return e.documentElement.clientHeight}function q9(e){this.addEventListener("load",e),this.addEventListener("error",e)}function V9(e,t,n,r,i,a,o,s,l){var u=t.nodeType===9?t:t.ownerDocument;try{var f=u.startViewTransition({update:function(){var p=u.defaultView,h=p.navigation&&p.navigation.transition,b=u.fonts.status;r();var m=[];if(b==="loaded"&&(H9(u),u.fonts.status==="loading"&&m.push(u.fonts.ready)),b=m.length,e!==null)for(var g=e.suspenseyImages,y=0,v=0;v<g.length;v++){var w=g[v];if(!w.complete){var S=w.getBoundingClientRect();if(0<S.bottom&&0<S.right&&S.top<p.innerHeight&&S.left<p.innerWidth){if(y+=y5(w),y>bv){m.length=b;break}w=new Promise(q9.bind(w)),m.push(w)}}}if(0<m.length)return p=Promise.race([Promise.all(m),new Promise(function(O){return setTimeout(O,500)})]).then(i,i),(h?Promise.allSettled([h.finished,p]):p).then(a,a);if(i(),h)return h.finished.then(a,a);a()},types:n});u.__reactViewTransition=f;var d=[];return f.ready.then(function(){for(var p=u.documentElement.getAnimations({subtree:!0}),h=0;h<p.length;h++){var b=p[h],m=b.effect,g=m.pseudoElement;if(g!=null&&g.startsWith("::view-transition")){d.push(b),b=m.getKeyframes();for(var y=g=void 0,v=!0,w=0;w<b.length;w++){var S=b[w],O=S.width;if(g===void 0)g=O;else if(g!==O){v=!1;break}if(O=S.height,y===void 0)y=O;else if(y!==O){v=!1;break}delete S.width,delete S.height,S.transform==="none"&&delete S.transform}v&&g!==void 0&&y!==void 0&&(m.setKeyframes(b),v=getComputedStyle(m.target,m.pseudoElement),v.width!==g||v.height!==y)&&(v=b[0],v.width=g,v.height=y,v=b[b.length-1],v.width=g,v.height=y,m.setKeyframes(b))}}o()},function(p){u.__reactViewTransition===f&&(u.__reactViewTransition=null);try{if(typeof p=="object"&&p!==null)switch(p.name){case"InvalidStateError":(p.message==="View transition was skipped because document visibility state is hidden."||p.message==="Skipping view transition because document visibility state has become hidden."||p.message==="Skipping view transition because viewport size changed."||p.message==="Transition was aborted because of invalid state")&&(p=null)}p!==null&&l(p)}finally{r(),i(),o()}}),f.finished.finally(function(){for(var p=0;p<d.length;p++)d[p].cancel();u.__reactViewTransition===f&&(u.__reactViewTransition=null),s()}),f}catch{return r(),i(),o(),null}}function Ol(e,t){this._scope=document.documentElement,this._selector="::view-transition-"+e+"("+t+")"}Ol.prototype.animate=function(e,t){return t=typeof t=="number"?{duration:t}:Rt({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)};Ol.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,n=e.getAnimations({subtree:!0}),r=[],i=0;i<n.length;i++){var a=n[i].effect;a!==null&&a.target===e&&a.pseudoElement===t&&r.push(n[i])}return r};Ol.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function s5(e){return{name:e,group:new Ol("group",e),imagePair:new Ol("image-pair",e),old:new Ol("old",e),new:new Ol("new",e)}}function ai(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}ai.prototype.addEventListener=function(e,t,n){var r=null,i=null;if(!(n!=null&&typeof n!="boolean"&&(r=n.signal||null,r!==null&&r.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var a=this._eventListeners;if(l5(a,e,t,n)===-1){var o=this,s=t;n!=null&&typeof n!="boolean"&&n.once===!0&&(s=function(l){o.removeEventListener(e,t,n),typeof t=="function"?t.call(this,l):t.handleEvent(l)}),r!==null&&(i=o.removeEventListener.bind(o,e,t,n),r.addEventListener("abort",i,{once:!0}),i=r.removeEventListener.bind(r,"abort",i)),r=vf(n),a.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:s,cleanup:i}),kr(this._fragmentFiber.child,!1,G9,e,s,r)}this._eventListeners=a}};function G9(e,t,n,r){return wn(e).addEventListener(t,n,r),!1}ai.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=l5(r,e,t,n),t!==-1)){var i=r[t];n=i.attachedListener;var a=i.cleanup;i=vf(i.optionsOrUseCapture),kr(this._fragmentFiber.child,!1,K9,e,n,i),r.splice(t,1),a!==null&&a()}};function K9(e,t,n,r){return wn(e).removeEventListener(t,n,r),!1}function vf(e){return e!=null&&typeof e!="boolean"&&(e.once===!0||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function JN(e){return e==null?"c=0":typeof e=="boolean"?"c="+(e?"1":"0"):"c="+(e.capture?"1":"0")}function l5(e,t,n,r){if(e.length===0)return-1;r=JN(r);for(var i=0;i<e.length;i++){var a=e[i];if(a.type===t&&a.listener===n&&JN(a.optionsOrUseCapture)===r)return i}return-1}ai.prototype.dispatchEvent=function(e){var t=Su(this._fragmentFiber);if(t===null)return!0;t=wn(t);var n=this._eventListeners;if(n!==null&&0<n.length||!e.bubbles){var r=t.nodeType===9?t.createComment(""):document.createTextNode("");if(n)for(var i=0;i<n.length;i++){var a=n[i];r.addEventListener(a.type,a.attachedListener,vf(a.optionsOrUseCapture))}if(t.appendChild(r),e=r.dispatchEvent(e),n)for(i=0;i<n.length;i++)a=n[i],r.removeEventListener(a.type,a.attachedListener,vf(a.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)};ai.prototype.focus=function(e){kr(this._fragmentFiber.child,!0,u5,e,void 0,void 0)};function u5(e,t){return e.tag===6?!1:(e=wn(e),aK(e,t))}ai.prototype.focusLast=function(e){var t=[];kr(this._fragmentFiber.child,!0,PT,t,void 0,void 0);for(var n=t.length-1;0<=n&&!u5(t[n],e);n--);};function PT(e,t){return t.push(e),!1}ai.prototype.blur=function(){var e=Su(this._fragmentFiber);e!==null&&(e=wn(e),e=oh(e).activeElement,e!==null&&kr(this._fragmentFiber.child,!1,Y9,e,void 0,void 0))};function Y9(e,t){return e.tag===6?!1:(e=wn(e),e===t||e.contains(t)?(t.blur(),!0):!1)}ai.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),kr(this._fragmentFiber.child,!1,X9,e,void 0,void 0)};function X9(e,t){return e.tag===6||(e=wn(e),t.observe(e)),!1}ai.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),kr(this._fragmentFiber.child,!1,W9,e,void 0,void 0);for(var n=t=0;n<Fi.length;n++){var r=Fi[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):Fi[t++]=r}Fi.length=t}};function W9(e,t){return e.tag===6||(e=wn(e),t.unobserve(e)),!1}var Fi=[],Ew=!1;function Q9(e,t,n){Fi.push({fragmentInstance:e,observer:t,instance:n}),Ew||(Ew=!0,oK(function(){Ew=!1;var r=Fi;Fi=[];for(var i=0;i<r.length;i++){var a=r[i];a.observer.unobserve(a.instance)}}))}ai.prototype.getClientRects=function(){var e=[];return kr(this._fragmentFiber.child,!1,Z9,e,void 0,void 0),e};function Z9(e,t){if(e.tag===6){e=e.stateNode;var n=e.ownerDocument.createRange();n.selectNodeContents(e),t.push.apply(t,n.getClientRects())}else e=wn(e),t.push.apply(t,e.getClientRects());return!1}ai.prototype.getRootNode=function(e){var t=Su(this._fragmentFiber);return t===null?this:wn(t).getRootNode(e)};ai.prototype.compareDocumentPosition=function(e){var t=Su(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];kr(this._fragmentFiber.child,!1,PT,n,void 0,void 0);var r=wn(t);if(n.length===0){if(n=r,P_(this._fragmentFiber)){e:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break e}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(n=t)}t=this._fragmentFiber;var i=r=n.compareDocumentPosition(e);return n===e?i=Node.DOCUMENT_POSITION_CONTAINS:r&Node.DOCUMENT_POSITION_CONTAINED_BY&&(n=Mk(t)[1],n===null?i=Node.DOCUMENT_POSITION_PRECEDING:(e=wn(n).compareDocumentPosition(e),i=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),i|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=wn(n[0]),i=wn(n[n.length-1]);var a=P_(this._fragmentFiber)?t.parentElement:r;if(a==null)return Node.DOCUMENT_POSITION_DISCONNECTED;r=a.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,a=a.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY;var o=t.compareDocumentPosition(e),s=i.compareDocumentPosition(e),l=o&Node.DOCUMENT_POSITION_CONTAINED_BY||s&Node.DOCUMENT_POSITION_CONTAINED_BY;return s=r&&a&&o&Node.DOCUMENT_POSITION_FOLLOWING&&s&Node.DOCUMENT_POSITION_PRECEDING,t=r&&t===e||a&&i===e||l||s?Node.DOCUMENT_POSITION_CONTAINED_BY:!r&&t===e||!a&&i===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:o,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||J9(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function J9(e,t,n,r,i){var a=Sl(i);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!a)e:{for(;a!==null;){if(a.tag===7&&(a===t||a.alternate===t)){n=!0;break e}a=a.return}n=!1}return n}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(a===null)return a=i.ownerDocument,i===a||i===a.documentElement||i===a.body;e:{for(a=t,t=Su(t);a!==null;){if(!(a.tag!==5&&a.tag!==3&&a.tag!==27||a!==t&&a.alternate!==t)){a=!0;break e}a=a.return}a=!1}return a}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!a)&&!(t=a===n)&&(t=B1(n,a,$_),t===null?t=!1:(kr(t,!0,AV,a,n),a=oc,oc=null,t=a!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!a)&&!(t=a===r)&&(t=B1(r,a,$_),t===null?t=!1:(kr(t,!0,CV,a,r),a=oc,L1=oc=null,t=a!==null)),t):!1}function eR(e,t){var n=e.ownerDocument.createRange();n.selectNodeContents(e),e=n.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}ai.prototype.scrollIntoView=function(e){if(typeof e=="object")throw Error(ne(566));var t=[];kr(this._fragmentFiber.child,!1,PT,t,void 0,void 0);var n=e!==!1;if(t.length===0){var r=Mk(this._fragmentFiber);if(r=n?r[1]||r[0]||Su(this._fragmentFiber):r[0]||r[1],r===null)return;if(r.tag===6){e=wn(r),eR(e,n);return}if(r=wn(r),r.nodeType!==9){if(r.nodeType===11){n="host"in r?r.host:null,n!==null&&n.scrollIntoView(e);return}r.scrollIntoView(e)}}for(r=n?t.length-1:0;r!==(n?-1:t.length);){var i=t[r];i.tag===6?(i=wn(i),eR(i,n)):wn(i).scrollIntoView(e),r+=n?-1:1}};function eK(e,t){return e=wn(e),c5(e,t),!1}function c5(e,t){e.reactFragments==null&&(e.reactFragments=new Set),e.reactFragments.add(t)}function f5(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.addEventListener(i.type,i.attachedListener,vf(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(a){for(var o=0,s=0;s<Fi.length;s++){var l=Fi[s];(l.fragmentInstance!==t||l.observer!==a||l.instance!==e)&&(Fi[o++]=l)}Fi.length=o,a.observe(e)}),c5(e,t))}function tK(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.removeEventListener(i.type,i.attachedListener,vf(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(a){typeof a.rootMargin=="string"?Q9(t,a,e):a.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function HS(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":HS(n),Hb(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function nK(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(r){if(!e[mm])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(a=e.getAttribute("rel"),a==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(a!==i.rel||e.getAttribute("href")!==(i.href==null||i.href===""?null:i.href)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute("title")!==(i.title==null?null:i.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(a=e.getAttribute("src"),(a!==(i.src==null?null:i.src)||e.getAttribute("type")!==(i.type==null?null:i.type)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var a=i.name==null?null:""+i.name;if(i.type==="hidden"&&e.getAttribute("name")===a)return e}else return e;if(e=Ei(e.nextSibling),e===null)break}return null}function rK(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Ei(e.nextSibling),e===null))return null;return e}function d5(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Ei(e.nextSibling),e===null))return null;return e}function qS(e){return e.data==="$?"||e.data==="$~"}function $T(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function iK(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var r=function(){t(),n.removeEventListener("DOMContentLoaded",r)};n.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}function Ei(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var VS=null;function tR(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return Ei(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function nR(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function aK(e,t){function n(){r=!0}if(e.ownerDocument.activeElement===e)return!0;var r=!1;try{e.ownerDocument.addEventListener("focus",n,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener("focus",n,!0)}return r}function oK(e){WN(function(){WN(function(t){return e(t)})})}function p5(e,t,n){switch(t=oh(n),e){case"html":if(e=t.documentElement,!e)throw Error(ne(452));return e;case"head":if(e=t.head,!e)throw Error(ne(453));return e;case"body":if(e=t.body,!e)throw Error(ne(454));return e;default:throw Error(ne(451))}}function h5(e,t,n){for(var r in n){var i=n[r];n.hasOwnProperty(r)&&i!=null&&bt(e,t,r,null,D9,i)}n.dangerouslySetInnerHTML!=null&&(e.textContent=""),e.onclick===pa&&(e.onclick=null),Hb(e)}function Tw(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Hb(e)}var Ti=new Map,rR=new Set;function sh(e){if(typeof e.getRootNode=="function"){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var Co=pt.d;pt.d={f:sK,r:lK,D:uK,C:cK,L:fK,m:dK,X:hK,S:pK,M:mK};function sK(){var e=Co.f(),t=rx();return e||t}function lK(e){var t=ld(e);t!==null&&t.tag===5&&t.type==="form"?JL(t):Co.r(e)}var dd=typeof document>"u"?null:document;function m5(e,t,n){var r=dd;if(r&&typeof t=="string"&&t){var i=bi(t);i='link[rel="'+e+'"][href="'+i+'"]',typeof n=="string"&&(i+='[crossorigin="'+n+'"]'),rR.has(i)||(rR.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement("link"),Kn(t,"link",e),Nn(t),r.head.appendChild(t)))}}function uK(e){Co.D(e),m5("dns-prefetch",e,null)}function cK(e,t){Co.C(e,t),m5("preconnect",e,t)}function fK(e,t,n){Co.L(e,t,n);var r=dd;if(r&&e&&t){var i='link[rel="preload"][as="'+bi(t)+'"]';t==="image"&&n&&n.imageSrcSet?(i+='[imagesrcset="'+bi(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(i+='[imagesizes="'+bi(n.imageSizes)+'"]')):i+='[href="'+bi(e)+'"]';var a=i;switch(t){case"style":a=yf(e);break;case"script":a=pd(e)}if(!(Ti.has(a)||(e=Rt({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Ti.set(a,e),r.querySelector(i)!==null||t==="style"&&r.querySelector(wm(a))||t==="script"&&r.querySelector(Sm(a))))){var o=r.createElement("link");Kn(o,"link",e),t==="style"&&(o[Lv]=!0,o.onload=o.onerror=function(){Vk(o)}),Nn(o),r.head.appendChild(o)}}}function dK(e,t){Co.m(e,t);var n=dd;if(n&&e){var r=t&&typeof t.as=="string"?t.as:"script",i='link[rel="modulepreload"][as="'+bi(r)+'"][href="'+bi(e)+'"]',a=i;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":a=pd(e)}if(!Ti.has(a)&&(e=Rt({rel:"modulepreload",href:e},t),Ti.set(a,e),n.querySelector(i)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Sm(a)))return}r=n.createElement("link"),Kn(r,"link",e),Nn(r),n.head.appendChild(r)}}}function pK(e,t,n){Co.S(e,t,n);var r=dd;if(r&&e){var i=Ec(r).hoistableStyles,a=yf(e);t=t||"default";var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(wm(a)))s.loading=5;else{e=Rt({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Ti.get(a))&&DT(e,n);var l=o=r.createElement("link");Nn(l),Kn(l,"link",e),l._p=new Promise(function(u,f){l.onload=u,l.onerror=f}),l.addEventListener("load",function(){s.loading|=1}),l.addEventListener("error",function(){s.loading|=2}),s.loading|=4,vv(o,t,r)}o={type:"stylesheet",instance:o,count:1,state:s},i.set(a,o)}}}function hK(e,t){Co.X(e,t);var n=dd;if(n&&e){var r=Ec(n).hoistableScripts,i=pd(e),a=r.get(i);a||(a=n.querySelector(Sm(i)),a||(e=Rt({src:e,async:!0},t),(t=Ti.get(i))&&IT(e,t),a=n.createElement("script"),Nn(a),Kn(a,"link",e),n.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},r.set(i,a))}}function mK(e,t){Co.M(e,t);var n=dd;if(n&&e){var r=Ec(n).hoistableScripts,i=pd(e),a=r.get(i);a||(a=n.querySelector(Sm(i)),a||(e=Rt({src:e,async:!0,type:"module"},t),(t=Ti.get(i))&&IT(e,t),a=n.createElement("script"),Nn(a),Kn(a,"link",e),n.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},r.set(i,a))}}function iR(e,t,n,r){var i=(i=bs.current)?sh(i):null;if(!i)throw Error(ne(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(n=yf(n.href),t=Ec(i).hoistableStyles,r=t.get(n),r||(r={type:"style",instance:null,count:0,state:null},t.set(n,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=yf(n.href);var a=Ec(i).hoistableStyles,o=a.get(e);if(o||(i=i.ownerDocument||i,o={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},a.set(e,o),(a=i.querySelector(wm(e)))?a._p||(o.instance=a,o.state.loading=5):(a=Ti.get(e),a||(a={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Ti.set(e,a)),gK(i,e,a,o.state))),t&&r===null)throw Error(ne(528,""));return o}if(t&&r!==null)throw Error(ne(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(n=pd(n),t=Ec(i).hoistableScripts,r=t.get(n),r||(r={type:"script",instance:null,count:0,state:null},t.set(n,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(ne(444,e))}}function yf(e){return'href="'+bi(e)+'"'}function wm(e){return'link[rel="stylesheet"]['+e+"]"}function g5(e){return Rt({},e,{"data-precedence":e.precedence,precedence:null})}function gK(e,t,n,r){if(t=e.querySelector('link[rel="preload"][as="style"]['+t+"]")){if(t[Lv]!==!0){r.loading=1;return}}else t=e.createElement("link"),t[Lv]=!0,t.onload=t.onerror=Vk.bind(null,t),Kn(t,"link",n),Nn(t),e.head.appendChild(t);r.preload=t,t.addEventListener("load",function(){return r.loading|=1}),t.addEventListener("error",function(){return r.loading|=2})}function pd(e){return'[src="'+bi(e)+'"]'}function Sm(e){return"script[async]"+e}function aR(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+bi(n.href)+'"]');if(r)return t.instance=r,Nn(r),r;var i=Rt({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement("style"),Nn(r),Kn(r,"style",i),vv(r,n.precedence,e),t.instance=r;case"stylesheet":i=yf(n.href);var a=e.querySelector(wm(i));if(a)return t.state.loading|=4,t.instance=a,Nn(a),a;r=g5(n),(i=Ti.get(i))&&DT(r,i),a=(e.ownerDocument||e).createElement("link"),Nn(a);var o=a;return o._p=new Promise(function(s,l){o.onload=s,o.onerror=l}),Kn(a,"link",r),t.state.loading|=4,vv(a,n.precedence,e),t.instance=a;case"script":return a=pd(n.src),(i=e.querySelector(Sm(a)))?(t.instance=i,Nn(i),i):(r=n,(i=Ti.get(a))&&(r=Rt({},n),IT(r,i)),e=e.ownerDocument||e,i=e.createElement("script"),Nn(i),Kn(i,"link",r),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(ne(443,t.type))}else t.type==="stylesheet"&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,vv(r,n.precedence,e));return t.instance}function vv(e,t,n){for(var r=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function DT(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function IT(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var yv=null;function oR(e,t,n){if(yv===null){var r=new Map,i=yv=new Map;i.set(n,r)}else i=yv,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[mm]||a[Hn]||e==="link"&&a.getAttribute("rel")==="stylesheet")&&a.namespaceURI!=="http://www.w3.org/2000/svg"){var o=a.getAttribute(t)||"";o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function GS(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function vK(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function sR(e,t){return e==="img"&&t.src!=null&&t.src!==""&&t.onLoad==null&&t.loading!=="lazy"}function v5(e){return!(e.type==="stylesheet"&&!(e.state.loading&3))}function y5(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function lR(e,t){typeof t.decode=="function"&&(e.imgCount++,t.complete||(e.imgBytes+=y5(t),e.suspenseyImages.push(t)),e=xK.bind(e),t.decode().then(e,e))}function yK(e,t,n,r){if(n.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&!(n.state.loading&4)){if(n.instance===null){var i=yf(r.href),a=t.querySelector(wm(i));if(a){t=a._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=lh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Nn(a);return}a=t.ownerDocument||t,r=g5(r),(i=Ti.get(i))&&DT(r,i),a=a.createElement("link"),Nn(a);var o=a;o._p=new Promise(function(s,l){o.onload=s,o.onerror=l}),Kn(a,"link",r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=lh.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var bv=0;function bK(e,t){return e.stylesheets&&e.count===0&&xv(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&xv(e,e.stylesheets),e.unsuspend){var a=e.unsuspend;e.unsuspend=null,a()}},6e4+t);0<e.imgBytes&&bv===0&&(bv=62500*k9());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&xv(e,e.stylesheets),e.unsuspend)){var a=e.unsuspend;e.unsuspend=null,a()}},(e.imgBytes>bv?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function b5(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)xv(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function lh(){this.count--,b5(this)}function xK(){this.imgCount--,b5(this)}var sy=null;function xv(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,sy=new Map,t.forEach(wK,e),sy=null,lh.call(e))}function wK(e,t){if(!(t.state.loading&4)){var n=sy.get(e);if(n)var r=n.get(null);else{n=new Map,sy.set(e,n);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),a=0;a<i.length;a++){var o=i[a];(o.nodeName==="LINK"||o.getAttribute("media")!=="not all")&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute("data-precedence"),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=lh.bind(this),i.addEventListener("load",r),i.addEventListener("error",r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var bf={$$typeof:da,Provider:null,Consumer:null,_currentValue:Fl,_currentValue2:Fl,_threadCount:0};function SK(e,t,n,r,i,a,o,s,l){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Q0(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Q0(0),this.hiddenUpdates=Q0(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=l,this.transitionTypes=null,this.incompleteTransitions=new Map}function x5(e,t,n,r,i,a,o,s,l,u,f,d){return e=new SK(e,t,n,o,l,u,f,d,s),t=1,a===!0&&(t|=24),a=Pr(3,null,null,t),e.current=a,a.stateNode=e,t=nT(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},aT(a),e}function w5(e){return e?(e=hc,e):hc}function S5(e,t,n,r,i,a){i=w5(i),r.context===null?r.context=i:r.pendingContext=i,r=ws(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ss(e,r,t),n!==null&&(Dr(n,e,t),_p(n,e,t))}function uR(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function kT(e,t){uR(e,t),(e=e.alternate)&&uR(e,t)}function O5(e){if(e.tag===13||e.tag===31){var t=Eu(e,67108864);t!==null&&Dr(t,e,67108864),kT(e,67108864)}}function cR(e){if(e.tag===13||e.tag===31){var t=ei();t=qE(t);var n=Eu(e,t);n!==null&&Dr(n,e,t),kT(e,t)}}var xf=!0;function OK(e,t,n,r){var i=Pe.T;Pe.T=null;var a=pt.p;try{pt.p=2,LT(e,t,n,r)}finally{pt.p=a,Pe.T=i}}function jK(e,t,n,r){var i=Pe.T;Pe.T=null;var a=pt.p;try{pt.p=8,LT(e,t,n,r)}finally{pt.p=a,Pe.T=i}}function LT(e,t,n,r){if(xf){var i=KS(r);if(i===null)Ow(e,t,r,ly,n),fR(e,r);else if(TK(i,e,t,n,r))r.stopPropagation();else if(fR(e,r),t&4&&-1<EK.indexOf(e)){for(;i!==null;){var a=ld(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=ml(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var l=1<<31-Jr(o);s.entanglements[1]|=l,o&=~l}Na(a),!(ft&6)&&(ny=Qr()+500,xm(0))}}break;case 31:case 13:s=Eu(a,2),s!==null&&Dr(s,a,2),rx(),kT(a,2)}if(a=KS(r),a===null&&Ow(e,t,r,ly,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Ow(e,t,r,null,n)}}function KS(e){return e=KE(e),BT(e)}var ly=null;function BT(e){if(ly=null,e=Sl(e),e!==null){var t=fm(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=_k(t),e!==null)return e;e=null}else if(n===31){if(e=Nk(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return ly=e,null}function j5(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"fullscreenerror":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"resize":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(kV()){case Ik:return 2;case kk:return 8;case kv:case LV:return 32;case Lk:return 268435456;default:return 32}default:return 32}}var YS=!1,Ts=null,As=null,Cs=null,uh=new Map,ch=new Map,Jo=[],EK="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function fR(e,t){switch(e){case"focusin":case"focusout":Ts=null;break;case"dragenter":case"dragleave":As=null;break;case"mouseover":case"mouseout":Cs=null;break;case"pointerover":case"pointerout":uh.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ch.delete(t.pointerId)}}function Gd(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=ld(t),t!==null&&O5(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function TK(e,t,n,r,i){switch(t){case"focusin":return Ts=Gd(Ts,e,t,n,r,i),!0;case"dragenter":return As=Gd(As,e,t,n,r,i),!0;case"mouseover":return Cs=Gd(Cs,e,t,n,r,i),!0;case"pointerover":var a=i.pointerId;return uh.set(a,Gd(uh.get(a)||null,e,t,n,r,i)),!0;case"gotpointercapture":return a=i.pointerId,ch.set(a,Gd(ch.get(a)||null,e,t,n,r,i)),!0}return!1}function E5(e){var t=Sl(e.target);if(t!==null){var n=fm(t);if(n!==null){if(t=n.tag,t===13){if(t=_k(n),t!==null){e.blockedOn=t,L_(e.priority,function(){cR(n)});return}}else if(t===31){if(t=Nk(n),t!==null){e.blockedOn=t,L_(e.priority,function(){cR(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function wv(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=KS(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Q1=r,n.target.dispatchEvent(r),Q1=null}else return t=ld(n),t!==null&&O5(t),e.blockedOn=n,!1;t.shift()}return!0}function dR(e,t,n){wv(e)&&n.delete(t)}function AK(){YS=!1,Ts!==null&&wv(Ts)&&(Ts=null),As!==null&&wv(As)&&(As=null),Cs!==null&&wv(Cs)&&(Cs=null),uh.forEach(dR),ch.forEach(dR)}function cg(e,t){e.blockedOn===t&&(e.blockedOn=null,YS||(YS=!0,On.unstable_scheduleCallback(On.unstable_NormalPriority,AK)))}var fg=null;function pR(e){fg!==e&&(fg=e,On.unstable_scheduleCallback(On.unstable_NormalPriority,function(){fg===e&&(fg=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!="function"){if(BT(r||n)===null)continue;break}var a=ld(n);a!==null&&(e.splice(t,3),t-=3,pS(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function wf(e){function t(l){return cg(l,e)}Ts!==null&&cg(Ts,e),As!==null&&cg(As,e),Cs!==null&&cg(Cs,e),uh.forEach(t),ch.forEach(t);for(var n=0;n<Jo.length;n++){var r=Jo[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Jo.length&&(n=Jo[0],n.blockedOn===null);)E5(n),n.blockedOn===null&&Jo.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[Lr]||null;if(typeof a=="function")o||pR(n);else if(o){var s=null;if(a&&a.hasAttribute("formAction")){if(i=a,o=a[Lr]||null)s=o.formAction;else if(BT(i)!==null)continue}else s=o.action;typeof s=="function"?n[r+1]=s:(n.splice(r,3),r-=3),pR(n)}}}function T5(){function e(a){a.canIntercept&&a.info==="react-transition"&&a.intercept({handler:function(){return new Promise(function(o){return i=o})},focusReset:"manual",scroll:"manual"})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var a=navigation.currentEntry;a&&a.url!=null&&navigation.navigate(a.url,{state:a.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var r=!1,i=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),i!==null&&(i(),i=null)}}}function zT(e){this._internalRoot=e}ox.prototype.render=zT.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(ne(409));var n=t.current,r=ei();S5(n,r,e,t,null,null)};ox.prototype.unmount=zT.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;S5(e.current,2,null,e,null,null),rx(),t[sd]=null}};function ox(e){this._internalRoot=e}ox.prototype.unstable_scheduleHydration=function(e){if(e){var t=qk();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Jo.length&&t!==0&&t<Jo[n].priority;n++);Jo.splice(n,0,e),n===0&&E5(e)}};var hR=Ak.version;if(hR!=="19.3.1")throw Error(ne(527,hR,"19.3.1"));pt.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(ne(188)):(e=Object.keys(e).join(","),Error(ne(268,e)));return e=TV(t),e=e!==null?Rk(e):null,e=e===null?null:e.stateNode,e};var CK={bundleType:0,version:"19.3.1",rendererPackageName:"react-dom",currentDispatcherRef:Pe,reconcilerVersion:"19.3.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var dg=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!dg.isDisabled&&dg.supportsFiber)try{dm=dg.inject(CK),Zr=dg}catch{}}zb.createRoot=function(e,t){if(!Ck(e))throw Error(ne(299));var n=!1,r="",i=s3,a=l3,o=u3;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(a=t.onCaughtError),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=x5(e,1,!1,null,null,n,r,null,i,a,o,T5),e[sd]=t.current,RT(e),new zT(t)};zb.hydrateRoot=function(e,t,n){if(!Ck(e))throw Error(ne(299));var r=!1,i="",a=s3,o=l3,s=u3,l=null;return n!=null&&(n.unstable_strictMode===!0&&(r=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onUncaughtError!==void 0&&(a=n.onUncaughtError),n.onCaughtError!==void 0&&(o=n.onCaughtError),n.onRecoverableError!==void 0&&(s=n.onRecoverableError),n.formState!==void 0&&(l=n.formState)),t=x5(e,1,!0,t,n??null,r,i,l,a,o,s,T5),t.context=w5(null),n=t.current,r=ei(),r=qE(r),i=ws(r),i.callback=null,Ss(n,i,r),n=r,t.current.lanes=n,hm(t,n),Na(t),e[sd]=t.current,RT(e),new ox(t)};zb.version="19.3.1";function A5(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(A5)}catch(e){console.error(e)}}A5(),wk.exports=zb;var _K=wk.exports;const C5=x.createContext(void 0),_o=e=>{const t=x.useContext(C5);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},NK=({client:e,children:t})=>(x.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),c.jsx(C5.Provider,{value:e,children:t})),RK={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)};var ts,DE,ZI,MK=(ZI=class{constructor(){Te(this,ts,RK);Te(this,DE,!1)}setTimeoutProvider(e){me(this,ts,e)}setTimeout(e,t){return F(this,ts).setTimeout(e,t)}clearTimeout(e){F(this,ts).clearTimeout(e)}setInterval(e,t){return F(this,ts).setInterval(e,t)}clearInterval(e){F(this,ts).clearInterval(e)}},ts=new WeakMap,DE=new WeakMap,ZI);const jl=new MK;function PK(e){setTimeout(e,0)}const $K=typeof window>"u"||"Deno"in globalThis;function yr(){}function DK(e,t){return typeof e=="function"?e(t):e}function _5(e){return typeof e=="number"&&e>=0&&e!==1/0}function N5(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ut(e,t){return typeof e=="function"?e(t):e}function mR(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==FT(o,t.options))return!1}else if(!Sf(t.queryKey,o))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function gR(e,t){const{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(ou(t.options.mutationKey)!==ou(a))return!1}else if(!Sf(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function FT(e,t){return((t==null?void 0:t.queryKeyHashFn)||ou)(e)}function ou(e){return JSON.stringify(e,(t,n)=>XS(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Sf(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(Array.isArray(e)&&Array.isArray(t)){if(t.length>e.length)return!1;for(let r=0;r<t.length;r++)if(!Sf(e[r],t[r]))return!1;return!0}const n=Object.keys(t);for(const r of n)if(!Sf(e[r],t[r]))return!1;return!0}return!1}const IK=Object.prototype.hasOwnProperty;function R5(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=vR(e)&&vR(t);if(!r&&!(XS(e)&&XS(t)))return t;const i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?new Array(o):{};let l=0;for(let u=0;u<o;u++){const f=r?u:a[u],d=e[f],p=t[f];if(d===p){s[f]=d,(r?u<i:IK.call(e,f))&&l++;continue}if(d===null||p===null||typeof d!="object"||typeof p!="object"){s[f]=p;continue}const h=R5(d,p,n+1);s[f]=h,h===d&&l++}return i===o&&l===i?e:s}function Sv(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function vR(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function XS(e){if(!yR(e))return!1;const t=Object.getPrototypeOf(e),n=t==null?void 0:t.constructor;if(n===void 0)return!0;if(typeof n!="function")return!1;const r=n.prototype;return!(!yR(r)||!r.hasOwnProperty("isPrototypeOf")||t!==Object.prototype)}function yR(e){return Object.prototype.toString.call(e)==="[object Object]"}function kK(e){return new Promise(t=>{jl.setTimeout(t,e)})}function WS(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?R5(e,t):t}function LK(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function BK(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}const UT=Symbol();function M5(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===UT?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function HT(e,t){return typeof e=="function"?e(...t):!!e}function zK(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??(i=t()),r||(r=!0,i.aborted?n():i.addEventListener("abort",n,{once:!0})),i)}),e}let FK=()=>$K;const qT=()=>FK();var hd=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Ml,ns,Xc,JI,UK=(JI=class extends hd{constructor(){super();Te(this,Ml);Te(this,ns);Te(this,Xc);me(this,Xc,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){F(this,ns)||this.setEventListener(F(this,Xc))}onUnsubscribe(){var t;this.hasListeners()||((t=F(this,ns))==null||t.call(this),me(this,ns,void 0))}setEventListener(t){var n;me(this,Xc,t),(n=F(this,ns))==null||n.call(this),me(this,ns,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){F(this,Ml)!==t&&(me(this,Ml,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof F(this,Ml)=="boolean"?F(this,Ml):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Ml=new WeakMap,ns=new WeakMap,Xc=new WeakMap,JI);const VT=new UK,HK=PK;function qK(){let e=[],t=0,n=s=>{s()},r=s=>{s()},i=HK;const a=s=>{t?e.push(s):i(()=>{n(s)})},o=()=>{const s=e;e=[],s.length&&i(()=>{r(()=>{s.forEach(l=>{n(l)})})})};return{batch:s=>{let l;t++;try{l=s()}finally{t--,t||o()}return l},batchCalls:s=>(...l)=>{a(()=>{s(...l)})},schedule:a,setNotifyFunction:s=>{n=s},setBatchNotifyFunction:s=>{r=s},setScheduler:s=>{i=s}}}const xn=qK();var Wc,rs,Qc,ek,VK=(ek=class extends hd{constructor(){super();Te(this,Wc,!0);Te(this,rs);Te(this,Qc);me(this,Qc,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){F(this,rs)||this.setEventListener(F(this,Qc))}onUnsubscribe(){var t;this.hasListeners()||((t=F(this,rs))==null||t.call(this),me(this,rs,void 0))}setEventListener(t){var n;me(this,Qc,t),(n=F(this,rs))==null||n.call(this),me(this,rs,t(this.setOnline.bind(this)))}setOnline(t){F(this,Wc)!==t&&(me(this,Wc,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return F(this,Wc)}},Wc=new WeakMap,rs=new WeakMap,Qc=new WeakMap,ek);const uy=new VK;function GK(e){return Math.min(1e3*2**e,3e4)}function P5(e){return(e??"online")==="online"?uy.isOnline():!0}var QS=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function $5(e){let t=!1,n=0,r,i="pending",a,o;const s=new Promise((v,w)=>{a=v,o=w});s.catch(yr);const l=()=>i!=="pending",u=v=>{var w;if(!l()){const S=new QS(v);m(S),(w=e.onCancel)==null||w.call(e,S)}},f=()=>{t=!0},d=()=>{t=!1},p=()=>VT.isFocused()&&(e.networkMode==="always"||uy.isOnline())&&e.canRun(),h=()=>P5(e.networkMode)&&e.canRun(),b=v=>{l()||(r==null||r(),i="resolved",a(v))},m=v=>{l()||(r==null||r(),i="rejected",o(v))},g=()=>new Promise(v=>{var w;r=S=>{(l()||p())&&v(S)},(w=e.onPause)==null||w.call(e)}).then(()=>{var v;r=void 0,l()||(v=e.onContinue)==null||v.call(e)}),y=()=>{if(l())return;let v;const w=n===0?e.initialPromise:void 0;try{v=w??e.fn()}catch(S){v=Promise.reject(S)}Promise.resolve(v).then(b).catch(S=>{var A;if(l())return;const O=e.retry??(qT()?0:3),j=e.retryDelay??GK,E=typeof j=="function"?j(n,S):j,T=O===!0||typeof O=="number"&&n<O||typeof O=="function"&&O(n,S);if(t||!T){m(S);return}n++,(A=e.onFail)==null||A.call(e,n,S),kK(E).then(()=>p()?void 0:g()).then(()=>{t?m(S):y()})})};return{promise:s,status:()=>i,cancel:u,continue:()=>(r==null||r(),s),cancelRetry:f,continueRetry:d,canStart:h,start:()=>(h()?y():g().then(y),s)}}var Pl,tk,D5=(tk=class{constructor(){Te(this,Pl)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),_5(this.gcTime)&&me(this,Pl,jl.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(qT()?1/0:3e5))}clearGcTimeout(){F(this,Pl)!==void 0&&(jl.clearTimeout(F(this,Pl)),me(this,Pl,void 0))}},Pl=new WeakMap,tk);function KK(e){return{onFetch:(t,n)=>{var f,d,p,h,b;const r=t.options,i=(p=(d=(f=t.fetchOptions)==null?void 0:f.meta)==null?void 0:d.fetchMore)==null?void 0:p.direction,a=((h=t.state.data)==null?void 0:h.pages)||[],o=((b=t.state.data)==null?void 0:b.pageParams)||[];let s={pages:[],pageParams:[]},l=0;const u=async()=>{let m=!1;const g=w=>{zK(w,()=>t.signal,()=>m=!0)},y=M5(t.options,t.fetchOptions),v=async(w,S,O)=>{if(m)return Promise.reject(t.signal.reason);if(S==null&&w.pages.length)return Promise.resolve(w);const E=(()=>{const _={client:t.client,queryKey:t.queryKey,pageParam:S,direction:O?"backward":"forward",meta:t.options.meta};return g(_),_})(),T=await y(E),{maxPages:A}=t.options,C=O?BK:LK;return{pages:C(w.pages,T,A),pageParams:C(w.pageParams,S,A)}};if(i&&a.length){const w=i==="backward",S=w?I5:ZS,O={pages:a,pageParams:o};s=await v(O,S(r,O),w)}else{const w=e??a.length;do{const S=l===0?o[0]??r.initialPageParam:ZS(r,s);if(l>0&&S==null)break;s=await v(s,S),l++}while(l<w)}return s};t.options.persister?t.fetchFn=()=>{var m,g;return(g=(m=t.options).persister)==null?void 0:g.call(m,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function ZS(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function I5(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}function YK(e,t){return t?ZS(e,t)!=null:!1}function XK(e,t){return!t||!e.getPreviousPageParam?!1:I5(e,t)!=null}var Zc,$l,Jc,hi,Dl,vn,om,Il,Ii,Ua,nk,WK=(nk=class extends D5{constructor(t){super();Te(this,Ii);Te(this,Zc);Te(this,$l);Te(this,Jc);Te(this,hi);Te(this,Dl);Te(this,vn);Te(this,om);Te(this,Il);me(this,Il,!1),me(this,om,t.defaultOptions),this.setOptions(t.options),this.observers=[],me(this,Dl,t.client),me(this,hi,F(this,Dl).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,me(this,$l,xR(this.options)),this.state=t.state??F(this,$l),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return F(this,Zc)}get promise(){var t;return(t=F(this,vn))==null?void 0:t.promise}setOptions(t){if(this.options={...F(this,om),...t},t!=null&&t._type&&me(this,Zc,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=xR(this.options);n.data!==void 0&&(this.setState(bR(n.data,n.dataUpdatedAt)),me(this,$l,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&F(this,hi).remove(this)}setData(t,n){const r=WS(this.state.data,t,this.options);return He(this,Ii,Ua).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t){He(this,Ii,Ua).call(this,{type:"setState",state:t})}cancel(t){var r,i;const n=(r=F(this,vn))==null?void 0:r.promise;return(i=F(this,vn))==null||i.cancel(t),n?n.then(yr).catch(yr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return F(this,$l)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>Ut(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===UT||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Ut(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!N5(this.state.dataUpdatedAt,t)}onFocus(){var t,n;(t=this.observers.find(r=>r.shouldFetchOnWindowFocus()))==null||t.refetch({cancelRefetch:!1}),(n=F(this,vn))==null||n.continue()}onOnline(){var t,n;(t=this.observers.find(r=>r.shouldFetchOnReconnect()))==null||t.refetch({cancelRefetch:!1}),(n=F(this,vn))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),F(this,hi).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){const n=this.observers.indexOf(t);n!==-1&&(this.observers.splice(n,1),this.observers.length||(F(this,vn)&&(F(this,Il)||this.state.fetchStatus==="paused"&&this.state.status==="pending"?F(this,vn).cancel({revert:!0}):F(this,vn).cancelRetry()),this.scheduleGc()),F(this,hi).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||He(this,Ii,Ua).call(this,{type:"invalidate"})}async fetch(t,n){var u,f,d,p,h,b,m,g,y,v,w,S;if(this.state.fetchStatus!=="idle"&&((u=F(this,vn))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(F(this,vn))return F(this,vn).continueRetry(),F(this,vn).promise}if(t&&this.setOptions(t),!this.options.queryFn){const O=this.observers.find(j=>j.options.queryFn);O&&this.setOptions(O.options)}const r=new AbortController,i=O=>{Object.defineProperty(O,"signal",{enumerable:!0,get:()=>(me(this,Il,!0),r.signal)})},a=()=>{const O=M5(this.options,n),E=(()=>{const T={client:F(this,Dl),queryKey:this.queryKey,meta:this.meta};return i(T),T})();return me(this,Il,!1),this.options.persister?this.options.persister(O,E,this):O(E)},s=(()=>{const O={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:F(this,Dl),state:this.state,fetchFn:a};return i(O),O})();(f=F(this,Zc)==="infinite"?KK(this.options.pages):this.options.behavior)==null||f.onFetch(s,this),me(this,Jc,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=s.fetchOptions)==null?void 0:d.meta))&&He(this,Ii,Ua).call(this,{type:"fetch",meta:(p=s.fetchOptions)==null?void 0:p.meta});const l=me(this,vn,$5({initialPromise:n==null?void 0:n.initialPromise,fn:s.fetchFn,onCancel:O=>{O instanceof QS&&O.revert&&this.setState({...F(this,Jc),fetchStatus:"idle"}),r.abort()},onFail:(O,j)=>{He(this,Ii,Ua).call(this,{type:"failed",failureCount:O,error:j})},onPause:()=>{He(this,Ii,Ua).call(this,{type:"pause"})},onContinue:()=>{He(this,Ii,Ua).call(this,{type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0}));try{const O=await l.start();if(O===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(O),(b=(h=F(this,hi).config).onSuccess)==null||b.call(h,O,this),(g=(m=F(this,hi).config).onSettled)==null||g.call(m,O,this.state.error,this),O}catch(O){if(O instanceof QS){if(O.silent)return F(this,vn).promise;if(O.revert){if(this.state.data===void 0)throw O;return this.state.data}}throw He(this,Ii,Ua).call(this,{type:"error",error:O}),(v=(y=F(this,hi).config).onError)==null||v.call(y,O,this),(S=(w=F(this,hi).config).onSettled)==null||S.call(w,this.state.data,O,this),O}finally{F(this,vn)===l&&me(this,vn,void 0),this.scheduleGc()}}},Zc=new WeakMap,$l=new WeakMap,Jc=new WeakMap,hi=new WeakMap,Dl=new WeakMap,vn=new WeakMap,om=new WeakMap,Il=new WeakMap,Ii=new WeakSet,Ua=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...k5(r.data,this.options),fetchMeta:t.meta??null};case"success":const i={...r,...bR(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return me(this,Jc,t.manual?i:void 0),i;case"error":const a=t.error;return{...r,error:a,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),xn.batch(()=>{this.observers.slice().forEach(r=>{r.onQueryUpdate()}),F(this,hi).notify({query:this,type:"updated",action:t})})},nk);function k5(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:P5(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function bR(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function xR(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var mr,et,sm,gr,kl,ef,Ka,lm,tf,nf,Ll,Bl,is,rf,dt,gp,JS,eO,tO,nO,rO,iO,aO,oO,rk,L5=(rk=class extends hd{constructor(t,n){super();Te(this,dt);Te(this,mr);Te(this,et);Te(this,sm);Te(this,gr);Te(this,kl);Te(this,ef);Te(this,Ka);Te(this,lm);Te(this,tf);Te(this,nf);Te(this,Ll);Te(this,Bl);Te(this,is);Te(this,rf,new Set);this.options=n,me(this,mr,t),me(this,Ka,null),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(F(this,et).addObserver(this),wR(F(this,et),this.options)?He(this,dt,gp).call(this):this.updateResult(),He(this,dt,rO).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return sO(F(this,et),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return sO(F(this,et),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,He(this,dt,iO).call(this),He(this,dt,aO).call(this),F(this,et).removeObserver(this)}setOptions(t){const n=this.options,r=F(this,et);if(this.options=F(this,mr).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ut(this.options.enabled,F(this,et))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");He(this,dt,oO).call(this),F(this,et).setOptions(this.options),n._defaulted&&!Sv(this.options,n)&&F(this,mr).getQueryCache().notify({type:"observerOptionsUpdated",query:F(this,et),observer:this});const i=this.hasListeners();i&&SR(F(this,et),r,this.options,n)&&He(this,dt,gp).call(this),this.updateResult(),i&&(F(this,et)!==r||Ut(this.options.enabled,F(this,et))!==Ut(n.enabled,F(this,et))||Ut(this.options.staleTime,F(this,et))!==Ut(n.staleTime,F(this,et)))&&He(this,dt,eO).call(this);const a=He(this,dt,tO).call(this);i&&(F(this,et)!==r||Ut(this.options.enabled,F(this,et))!==Ut(n.enabled,F(this,et))||a!==F(this,is))&&He(this,dt,nO).call(this,a)}getOptimisticResult(t){const n=F(this,mr).getQueryCache().build(F(this,mr),t),r=this.createResult(n,t);return Sv(this.getCurrentResult(),r)||(me(this,gr,r),me(this,ef,this.options),me(this,kl,F(this,et).state)),r}getCurrentResult(){return F(this,gr)}trackResult(t,n){return new Proxy(t,{get:(r,i)=>(this.trackProp(i),n==null||n(i),Reflect.get(r,i))})}trackProp(t){F(this,rf).add(t)}getCurrentQuery(){return F(this,et)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=F(this,mr).defaultQueryOptions(t),r=F(this,mr).getQueryCache().build(F(this,mr),n);let i=()=>{},a;const o=new Promise(s=>{a=s,i=F(this,mr).getQueryCache().subscribe(l=>{l.type==="updated"&&l.query.queryHash===r.queryHash&&r.state.data!==void 0&&(i(),s(this.createResult(r,n)))})});return Promise.race([r.fetch().then(()=>{const s=this.createResult(r,n);return a==null||a(s),s}).finally(()=>{i()}),o])}fetch(t){return He(this,dt,gp).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),F(this,gr)))}createResult(t,n){var j;const r=F(this,et),i=this.options,a=F(this,gr),o=F(this,kl),s=F(this,ef),l=t!==r?t.state:F(this,sm),{state:u}=t;let f={...u},d=!1,p;if(n._optimisticResults){const E=this.hasListeners(),T=!E&&wR(t,n),A=E&&SR(t,r,n,i);(T||A)&&(f={...f,...k5(u.data,t.options)}),n._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:h,errorUpdatedAt:b,status:m}=f;p=f.data;let g=!1;if(n.placeholderData!==void 0&&p===void 0&&m==="pending"){let E;a!=null&&a.isPlaceholderData&&n.placeholderData===(s==null?void 0:s.placeholderData)?(E=a.data,g=!0):E=typeof n.placeholderData=="function"?n.placeholderData((j=F(this,nf))==null?void 0:j.state.data,F(this,nf)):n.placeholderData,E!==void 0&&(m="success",p=WS(a==null?void 0:a.data,E,n),d=!0)}if(n.select&&p!==void 0&&!g)if(a&&p===(o==null?void 0:o.data)&&n.select===F(this,lm))p=F(this,tf);else try{me(this,lm,n.select),p=n.select(p),p=WS(a==null?void 0:a.data,p,n),me(this,tf,p),me(this,Ka,null)}catch(E){me(this,Ka,E)}else p===void 0&&me(this,Ka,null);F(this,Ka)&&(h=F(this,Ka),p=F(this,tf),b=Date.now(),m="error",d=!1);const y=f.fetchStatus==="fetching",v=m==="pending",w=m==="error",S=v&&y,O=p!==void 0;return{status:m,fetchStatus:f.fetchStatus,isPending:v,isSuccess:m==="success",isError:w,isInitialLoading:S,isLoading:S,data:p,dataUpdatedAt:f.dataUpdatedAt,error:h,errorUpdatedAt:b,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:f.dataUpdateCount>l.dataUpdateCount||f.errorUpdateCount>l.errorUpdateCount,isFetching:y,isRefetching:y&&!v,isLoadingError:w&&!O,isPaused:f.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:w&&O,isStale:GT(t,n),refetch:this.refetch,isEnabled:Ut(n.enabled,t)!==!1}}updateResult(){const t=F(this,gr),n=this.createResult(F(this,et),this.options);if(me(this,kl,F(this,et).state),me(this,ef,this.options),F(this,kl).data!==void 0&&me(this,nf,F(this,et)),Sv(n,t))return;me(this,gr,n);const i=(()=>{if(!t)return!0;const{notifyOnChangeProps:a}=this.options,o=typeof a=="function"?a():a;if(o==="all"||!o&&!F(this,rf).size)return!0;const s=new Set(o??F(this,rf));return this.options.throwOnError&&s.add("error"),Object.keys(F(this,gr)).some(l=>{const u=l;return F(this,gr)[u]!==t[u]&&s.has(u)})})();xn.batch(()=>{i&&this.listeners.forEach(a=>{a(F(this,gr))}),F(this,mr).getQueryCache().notify({query:F(this,et),type:"observerResultsUpdated"})})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&He(this,dt,rO).call(this)}},mr=new WeakMap,et=new WeakMap,sm=new WeakMap,gr=new WeakMap,kl=new WeakMap,ef=new WeakMap,Ka=new WeakMap,lm=new WeakMap,tf=new WeakMap,nf=new WeakMap,Ll=new WeakMap,Bl=new WeakMap,is=new WeakMap,rf=new WeakMap,dt=new WeakSet,gp=function(t){He(this,dt,oO).call(this);let n=F(this,et).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(yr)),n},JS=function(t){return!qT()&&Ut(this.options.enabled,F(this,et))!==!1&&_5(t)},eO=function(){He(this,dt,iO).call(this);const t=Ut(this.options.staleTime,F(this,et));if(F(this,gr).isStale||!He(this,dt,JS).call(this,t))return;const n=N5(F(this,gr).dataUpdatedAt,t)+1;me(this,Ll,jl.setTimeout(()=>{F(this,gr).isStale||this.updateResult()},n))},tO=function(){return Ut(this.options.refetchInterval,F(this,et))??!1},nO=function(t){He(this,dt,aO).call(this),me(this,is,t),!(F(this,is)===0||!He(this,dt,JS).call(this,F(this,is)))&&me(this,Bl,jl.setInterval(()=>{(this.options.refetchIntervalInBackground||VT.isFocused())&&He(this,dt,gp).call(this)},F(this,is)))},rO=function(){He(this,dt,eO).call(this),He(this,dt,nO).call(this,He(this,dt,tO).call(this))},iO=function(){F(this,Ll)!==void 0&&(jl.clearTimeout(F(this,Ll)),me(this,Ll,void 0))},aO=function(){F(this,Bl)!==void 0&&(jl.clearInterval(F(this,Bl)),me(this,Bl,void 0))},oO=function(){const t=F(this,mr).getQueryCache().build(F(this,mr),this.options);if(t===F(this,et))return;const n=F(this,et);me(this,et,t),me(this,sm,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},rk);function QK(e,t){return Ut(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Ut(t.retryOnMount,e)===!1)}function wR(e,t){return QK(e,t)||e.state.data!==void 0&&sO(e,t,t.refetchOnMount)}function sO(e,t,n){if(Ut(t.enabled,e)!==!1&&Ut(t.staleTime,e)!=="static"){const r=Ut(n,e);return r==="always"||r!==!1&>(e,t)}return!1}function SR(e,t,n,r){return(e!==t||Ut(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&>(e,n)}function GT(e,t){return Ut(t.enabled,e)!==!1&&e.isStaleByTime(Ut(t.staleTime,e))}var ZK=class extends L5{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type="infinite",super.setOptions(e)}getOptimisticResult(e){return e._type="infinite",super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){var h,b;const{state:n}=e,r=super.createResult(e,t),{isFetching:i,isRefetching:a,isError:o,isRefetchError:s}=r,l=(b=(h=n.fetchMeta)==null?void 0:h.fetchMore)==null?void 0:b.direction,u=o&&l==="forward",f=i&&l==="forward",d=o&&l==="backward",p=i&&l==="backward";return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:YK(t,n.data),hasPreviousPage:XK(t,n.data),isFetchNextPageError:u,isFetchingNextPage:f,isFetchPreviousPageError:d,isFetchingPreviousPage:p,isRefetchError:s&&!u&&!d,isRefetching:a&&!f&&!p}}},um,oa,Zn,zl,sa,Ko,ik,JK=(ik=class extends D5{constructor(t){super();Te(this,sa);Te(this,um);Te(this,oa);Te(this,Zn);Te(this,zl);me(this,um,t.client),this.mutationId=t.mutationId,me(this,Zn,t.mutationCache),me(this,oa,[]),this.state=t.state||B5(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){F(this,oa).includes(t)||(F(this,oa).push(t),this.clearGcTimeout(),F(this,Zn).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){me(this,oa,F(this,oa).filter(n=>n!==t)),this.scheduleGc(),F(this,Zn).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){F(this,oa).length||(this.state.status==="pending"?this.scheduleGc():F(this,Zn).remove(this))}continue(){var t;return((t=F(this,zl))==null?void 0:t.continue())??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(t){var s,l,u,f,d,p,h,b,m,g,y,v,w,S,O,j,E,T;const n=()=>{He(this,sa,Ko).call(this,{type:"continue"})},r={client:F(this,um),meta:this.options.meta,mutationKey:this.options.mutationKey},i=me(this,zl,$5({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(A,C)=>{He(this,sa,Ko).call(this,{type:"failed",failureCount:A,error:C})},onPause:()=>{He(this,sa,Ko).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>F(this,Zn).canRun(this)})),a=this.state.status==="pending",o=!i.canStart();try{if(a)n();else{He(this,sa,Ko).call(this,{type:"pending",variables:t,isPaused:o}),F(this,Zn).config.onMutate&&await F(this,Zn).config.onMutate(t,this,r);const C=await((l=(s=this.options).onMutate)==null?void 0:l.call(s,t,r));C!==this.state.context&&He(this,sa,Ko).call(this,{type:"pending",context:C,variables:t,isPaused:o})}const A=await i.start();return await((f=(u=F(this,Zn).config).onSuccess)==null?void 0:f.call(u,A,t,this.state.context,this,r)),await((p=(d=this.options).onSuccess)==null?void 0:p.call(d,A,t,this.state.context,r)),await((b=(h=F(this,Zn).config).onSettled)==null?void 0:b.call(h,A,null,this.state.variables,this.state.context,this,r)),await((g=(m=this.options).onSettled)==null?void 0:g.call(m,A,null,t,this.state.context,r)),He(this,sa,Ko).call(this,{type:"success",data:A}),A}catch(A){try{await((v=(y=F(this,Zn).config).onError)==null?void 0:v.call(y,A,t,this.state.context,this,r))}catch(C){Promise.reject(C)}try{await((S=(w=this.options).onError)==null?void 0:S.call(w,A,t,this.state.context,r))}catch(C){Promise.reject(C)}try{await((j=(O=F(this,Zn).config).onSettled)==null?void 0:j.call(O,void 0,A,this.state.variables,this.state.context,this,r))}catch(C){Promise.reject(C)}try{await((T=(E=this.options).onSettled)==null?void 0:T.call(E,void 0,A,t,this.state.context,r))}catch(C){Promise.reject(C)}throw He(this,sa,Ko).call(this,{type:"error",error:A}),A}finally{F(this,zl)===i&&me(this,zl,void 0),F(this,Zn).runNext(this)}}},um=new WeakMap,oa=new WeakMap,Zn=new WeakMap,zl=new WeakMap,sa=new WeakSet,Ko=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),xn.batch(()=>{F(this,oa).forEach(r=>{r.onMutationUpdate(t)}),F(this,Zn).notify({mutation:this,type:"updated",action:t})})},ik);function B5(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ya,ki,cm,ak,e7=(ak=class extends hd{constructor(t={}){super();Te(this,Ya);Te(this,ki);Te(this,cm);this.config=t,me(this,Ya,new Set),me(this,ki,new Map),me(this,cm,0)}build(t,n,r){const i=new JK({client:t,mutationCache:this,mutationId:++Gm(this,cm)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){F(this,Ya).add(t);const n=pg(t);if(typeof n=="string"){const r=F(this,ki).get(n);r?r.push(t):F(this,ki).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(F(this,Ya).delete(t)){const n=pg(t);if(typeof n=="string"){const r=F(this,ki).get(n);if(r)if(r.length>1){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}else r[0]===t&&F(this,ki).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){var r;const n=pg(t);if(typeof n=="string"){const i=(r=F(this,ki).get(n))==null?void 0:r.find(a=>a.state.status==="pending");return!i||i===t}else return!0}runNext(t){var r,i;const n=pg(t);return typeof n=="string"?((i=(r=F(this,ki).get(n))==null?void 0:r.find(a=>a!==t&&a.state.isPaused))==null?void 0:i.continue())??Promise.resolve():Promise.resolve()}clear(){xn.batch(()=>{F(this,Ya).forEach(t=>{this.notify({type:"removed",mutation:t})}),F(this,Ya).clear(),F(this,ki).clear()})}getAll(){return Array.from(F(this,Ya))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>gR(n,r))}findAll(t={}){return this.getAll().filter(n=>gR(t,n))}notify(t){xn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return xn.batch(()=>Promise.all(t.map(n=>n.continue().catch(yr))))}},Ya=new WeakMap,ki=new WeakMap,cm=new WeakMap,ak);function pg(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Xa,as,Jn,Wa,ya,vp,lO,ok,t7=(ok=class extends hd{constructor(n,r){super();Te(this,ya);Te(this,Xa);Te(this,as);Te(this,Jn);Te(this,Wa);me(this,Xa,n),this.setOptions(r),this.bindMethods(),He(this,ya,vp).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var i;const r=this.options;this.options=F(this,Xa).defaultMutationOptions(n),Sv(this.options,r)||F(this,Xa).getMutationCache().notify({type:"observerOptionsUpdated",mutation:F(this,Jn),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&ou(r.mutationKey)!==ou(this.options.mutationKey)?this.reset():((i=F(this,Jn))==null?void 0:i.state.status)==="pending"&&F(this,Jn).setOptions(this.options)}onSubscribe(){this.listeners.size===1&&F(this,Jn)&&(F(this,Jn).addObserver(this),He(this,ya,vp).call(this))}onUnsubscribe(){var n;this.hasListeners()||(n=F(this,Jn))==null||n.removeObserver(this)}onMutationUpdate(n){He(this,ya,vp).call(this),He(this,ya,lO).call(this,n)}getCurrentResult(){return F(this,as)}reset(){var n;(n=F(this,Jn))==null||n.removeObserver(this),me(this,Jn,void 0),He(this,ya,vp).call(this),He(this,ya,lO).call(this)}mutate(n,r){var i;return me(this,Wa,r),(i=F(this,Jn))==null||i.removeObserver(this),me(this,Jn,F(this,Xa).getMutationCache().build(F(this,Xa),this.options)),F(this,Jn).addObserver(this),F(this,Jn).execute(n)}},Xa=new WeakMap,as=new WeakMap,Jn=new WeakMap,Wa=new WeakMap,ya=new WeakSet,vp=function(){var r;const n=((r=F(this,Jn))==null?void 0:r.state)??B5();me(this,as,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},lO=function(n){xn.batch(()=>{var r,i,a,o,s,l,u,f;if(F(this,Wa)&&this.hasListeners()){const d=F(this,as).variables,p=F(this,as).context,h={client:F(this,Xa),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(i=(r=F(this,Wa)).onSuccess)==null||i.call(r,n.data,d,p,h)}catch(b){Promise.reject(b)}try{(o=(a=F(this,Wa)).onSettled)==null||o.call(a,n.data,null,d,p,h)}catch(b){Promise.reject(b)}}else if((n==null?void 0:n.type)==="error"){try{(l=(s=F(this,Wa)).onError)==null||l.call(s,n.error,d,p,h)}catch(b){Promise.reject(b)}try{(f=(u=F(this,Wa)).onSettled)==null||f.call(u,void 0,n.error,d,p,h)}catch(b){Promise.reject(b)}}}this.listeners.forEach(d=>{d(F(this,as))})})},ok),la,sk,n7=(sk=class extends hd{constructor(t={}){super();Te(this,la);this.config=t,me(this,la,new Map)}build(t,n,r){const i=n.queryKey,a=n.queryHash??FT(i,n);let o=this.get(a);return o||(o=new WK({client:t,queryKey:i,queryHash:a,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){F(this,la).has(t.queryHash)||(F(this,la).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=F(this,la).get(t.queryHash);n&&(t.destroy(),n===t&&F(this,la).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){xn.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return F(this,la).get(t)}getAll(){return[...F(this,la).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>mR(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>mR(t,r)):n}notify(t){xn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){xn.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){xn.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},la=new WeakMap,sk),Yt,os,ss,af,of,ls,sf,lf,lk,r7=(lk=class{constructor(e={}){Te(this,Yt);Te(this,os);Te(this,ss);Te(this,af);Te(this,of);Te(this,ls);Te(this,sf);Te(this,lf);me(this,Yt,e.queryCache||new n7),me(this,os,e.mutationCache||new e7),me(this,ss,e.defaultOptions||{}),me(this,af,new Map),me(this,of,new Map),me(this,ls,0)}mount(){Gm(this,ls)._++,F(this,ls)===1&&(me(this,sf,VT.subscribe(async e=>{e&&(await this.resumePausedMutations(),F(this,Yt).onFocus())})),me(this,lf,uy.subscribe(async e=>{e&&(await this.resumePausedMutations(),F(this,Yt).onOnline())})))}unmount(){var e,t;Gm(this,ls)._--,F(this,ls)===0&&((e=F(this,sf))==null||e.call(this),me(this,sf,void 0),(t=F(this,lf))==null||t.call(this),me(this,lf,void 0))}isFetching(e){return F(this,Yt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return F(this,os).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=F(this,Yt).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=F(this,Yt).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Ut(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return F(this,Yt).findAll(e).map(({queryKey:t,state:n})=>[t,n.data])}setQueryData(e,t,n){var o;const r=this.defaultQueryOptions({queryKey:e}),i=(o=F(this,Yt).get(r.queryHash))==null?void 0:o.state.data,a=DK(t,i);if(a!==void 0)return F(this,Yt).build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return xn.batch(()=>F(this,Yt).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=F(this,Yt).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=F(this,Yt);xn.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=F(this,Yt);return xn.batch(()=>{const r=n.findAll(e),i=new Set(r);return r.forEach(a=>{a.reset()}),this.refetchQueries({type:"active",predicate:a=>i.has(a)},t)})}cancelQueries(e,t={}){const n={revert:!0,...t},r=xn.batch(()=>F(this,Yt).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(yr).catch(yr)}invalidateQueries(e,t={}){return xn.batch(()=>(F(this,Yt).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=xn.batch(()=>F(this,Yt).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let a=i.fetch(void 0,n);return n.throwOnError||(a=a.catch(yr)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(r).then(yr)}async query(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=F(this,Yt).build(this,t),r=n.isStaleByTime(Ut(t.staleTime,n))?await n.fetch(t):n.state.data,i=t.select;return i?i(r):r}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=F(this,Yt).build(this,t);return n.isStaleByTime(Ut(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(yr).catch(yr)}infiniteQuery(e){return e._type="infinite",this.query(e)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(yr).catch(yr)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return uy.isOnline()?F(this,os).resumePausedMutations():Promise.resolve()}getQueryCache(){return F(this,Yt)}getMutationCache(){return F(this,os)}getDefaultOptions(){return F(this,ss)}setDefaultOptions(e){me(this,ss,e)}setQueryDefaults(e,t){F(this,af).set(ou(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...F(this,af).values()],n={};return t.forEach(r=>{Sf(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){F(this,of).set(ou(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...F(this,of).values()],n={};return t.forEach(r=>{Sf(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...F(this,ss).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=FT(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===UT&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...F(this,ss).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){F(this,Yt).clear(),F(this,os).clear()}},Yt=new WeakMap,os=new WeakMap,ss=new WeakMap,af=new WeakMap,of=new WeakMap,ls=new WeakMap,sf=new WeakMap,lf=new WeakMap,lk);const z5=x.createContext(!1),i7=()=>x.useContext(z5);z5.Provider;function a7(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const o7=x.createContext(a7()),s7=()=>x.useContext(o7),l7=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?HT(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||r)&&(t.isReset()||(e.retryOnMount=!1))},u7=e=>{x.useEffect(()=>{e.clearReset()},[e])},c7=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||HT(n,[e.error,r])),f7=e=>{if(e.suspense){const n=i=>i==="static"?i:Math.max(i??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...i)=>n(r(...i)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},d7=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,p7=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function F5(e,t,n){const r=i7(),i=s7(),a=_o(),o=a.defaultQueryOptions(e),s=a.getQueryCache().get(o.queryHash),l=e.subscribed!==!1;o._optimisticResults=r?"isRestoring":l?"optimistic":void 0,f7(o),l7(o,i,s),u7(i);const[u]=x.useState(()=>new t(a,o)),f=u.getOptimisticResult(o),d=!r&&l;if(x.useSyncExternalStore(x.useCallback(p=>{const h=d?u.subscribe(xn.batchCalls(p)):yr;return u.updateResult(),h},[u,d]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),x.useEffect(()=>{u.setOptions(o)},[o,u]),d7(o,f))throw p7(o,u,i);if(c7({result:f,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw f.error;return o.notifyOnChangeProps?f:u.trackResult(f)}function zt(e,t){return F5(e,L5)}function Au(e,t){const n=_o(),[r]=x.useState(()=>new t7(n,e));x.useEffect(()=>{r.setOptions(e)},[r,e]);const i=x.useSyncExternalStore(x.useCallback(o=>r.subscribe(xn.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=x.useCallback((...o)=>{r.mutate(o[0],o[1]).catch(yr)},[r]);if(i.error&&HT(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}function h7(e,t){return F5(e,ZK)}/**
|
|
50
|
+
* @remix-run/router v1.23.4
|
|
51
|
+
*
|
|
52
|
+
* Copyright (c) Remix Software Inc.
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the MIT license found in the
|
|
55
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
56
|
+
*
|
|
57
|
+
* @license MIT
|
|
58
|
+
*/function fh(){return fh=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},fh.apply(null,arguments)}var ms;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(ms||(ms={}));const OR="popstate";function m7(e){e===void 0&&(e={});function t(i,a){let{pathname:o="/",search:s="",hash:l=""}=Cu(i.location.hash.substr(1));return!o.startsWith("/")&&!o.startsWith(".")&&(o="/"+o),uO("",{pathname:o,search:s,hash:l},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function n(i,a){let o=i.document.querySelector("base"),s="";if(o&&o.getAttribute("href")){let l=i.location.href,u=l.indexOf("#");s=u===-1?l:l.slice(0,u)}return s+"#"+(typeof a=="string"?a:cy(a))}function r(i,a){KT(i.pathname.charAt(0)==="/","relative pathnames are not supported in hash history.push("+JSON.stringify(a)+")")}return v7(t,n,r,e)}function en(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function KT(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function g7(){return Math.random().toString(36).substr(2,8)}function jR(e,t){return{usr:e.state,key:e.key,idx:t}}function uO(e,t,n,r){return n===void 0&&(n=null),fh({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Cu(t):t,{state:n,key:t&&t.key||r||g7()})}function cy(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Cu(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function v7(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=ms.Pop,l=null,u=f();u==null&&(u=0,o.replaceState(fh({},o.state,{idx:u}),""));function f(){return(o.state||{idx:null}).idx}function d(){s=ms.Pop;let g=f(),y=g==null?null:g-u;u=g,l&&l({action:s,location:m.location,delta:y})}function p(g,y){s=ms.Push;let v=uO(m.location,g,y);n&&n(v,g),u=f()+1;let w=jR(v,u),S=m.createHref(v);try{o.pushState(w,"",S)}catch(O){if(O instanceof DOMException&&O.name==="DataCloneError")throw O;i.location.assign(S)}a&&l&&l({action:s,location:m.location,delta:1})}function h(g,y){s=ms.Replace;let v=uO(m.location,g,y);n&&n(v,g),u=f();let w=jR(v,u),S=m.createHref(v);o.replaceState(w,"",S),a&&l&&l({action:s,location:m.location,delta:0})}function b(g){let y=i.location.origin!=="null"?i.location.origin:i.location.href,v=typeof g=="string"?g:cy(g);return v=v.replace(/ $/,"%20"),en(y,"No window.location.(origin|href) available to create URL for href: "+v),new URL(v,y)}let m={get action(){return s},get location(){return e(i,o)},listen(g){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(OR,d),l=g,()=>{i.removeEventListener(OR,d),l=null}},createHref(g){return t(i,g)},createURL:b,encodeLocation(g){let y=b(g);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:p,replace:h,go(g){return o.go(g)}};return m}var ER;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(ER||(ER={}));function y7(e,t,n){return n===void 0&&(n="/"),b7(e,t,n)}function b7(e,t,n,r){let i=typeof t=="string"?Cu(t):t,a=Of(i.pathname||"/",n);if(a==null)return null;let o=U5(e);x7(o);let s=null,l=R7(a);for(let u=0;s==null&&u<o.length;++u)s=_7(o[u],l);return s}function U5(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let i=(a,o,s)=>{let l={relativePath:s===void 0?a.path||"":s,caseSensitive:a.caseSensitive===!0,childrenIndex:o,route:a};l.relativePath.startsWith("/")&&(en(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let u=_s([r,l.relativePath]),f=n.concat(l);a.children&&a.children.length>0&&(en(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),U5(a.children,t,f,u)),!(a.path==null&&!a.index)&&t.push({path:u,score:A7(u,a.index),routesMeta:f})};return e.forEach((a,o)=>{var s;if(a.path===""||!((s=a.path)!=null&&s.includes("?")))i(a,o);else for(let l of H5(a.path))i(a,o,l)}),t}function H5(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),a=n.replace(/\?$/,"");if(r.length===0)return i?[a,""]:[a];let o=H5(r.join("/")),s=[];return s.push(...o.map(l=>l===""?a:[a,l].join("/"))),i&&s.push(...o),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function x7(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:C7(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const w7=/^:[\w-]+$/,S7=3,O7=2,j7=1,E7=10,T7=-2,TR=e=>e==="*";function A7(e,t){let n=e.split("/"),r=n.length;return n.some(TR)&&(r+=T7),t&&(r+=O7),n.filter(i=>!TR(i)).reduce((i,a)=>i+(w7.test(a)?S7:a===""?j7:E7),r)}function C7(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function _7(e,t,n){let{routesMeta:r}=e,i={},a="/",o=[];for(let s=0;s<r.length;++s){let l=r[s],u=s===r.length-1,f=a==="/"?t:t.slice(a.length)||"/",d=cO({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},f),p=l.route;if(!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:_s([a,d.pathname]),pathnameBase:$7(_s([a,d.pathnameBase])),route:p}),d.pathnameBase!=="/"&&(a=_s([a,d.pathnameBase]))}return o}function cO(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=N7(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,"$1"),s=i.slice(1);return{params:r.reduce((u,f,d)=>{let{paramName:p,isOptional:h}=f;if(p==="*"){let m=s[d]||"";o=a.slice(0,a.length-m.length).replace(/(.)\/+$/,"$1")}const b=s[d];return h&&!b?u[p]=void 0:u[p]=(b||"").replace(/%2F/g,"/"),u},{}),pathname:a,pathnameBase:o,pattern:e}}function N7(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),KT(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,s,l)=>(r.push({paramName:s,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function R7(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return KT(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Of(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function M7(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Cu(e):e,a;return n?(n=G5(n),n.startsWith("/")?a=AR(n.substring(1),"/"):a=AR(n,t)):a=t,{pathname:a,search:D7(r),hash:I7(i)}}function AR(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Aw(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function P7(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function q5(e,t){let n=P7(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function V5(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Cu(e):(i=fh({},e),en(!i.pathname||!i.pathname.includes("?"),Aw("?","pathname","search",i)),en(!i.pathname||!i.pathname.includes("#"),Aw("#","pathname","hash",i)),en(!i.search||!i.search.includes("#"),Aw("#","search","hash",i)));let a=e===""||i.pathname==="",o=a?"/":i.pathname,s;if(o==null)s=n;else{let d=t.length-1;if(!r&&o.startsWith("..")){let p=o.split("/");for(;p[0]==="..";)p.shift(),d-=1;i.pathname=p.join("/")}s=d>=0?t[d]:"/"}let l=M7(i,s),u=o&&o!=="/"&&o.endsWith("/"),f=(a||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||f)&&(l.pathname+="/"),l}const G5=e=>e.replace(/\/\/+/g,"/"),_s=e=>G5(e.join("/")),$7=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),D7=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,I7=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function k7(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const K5=["post","put","patch","delete"];new Set(K5);const L7=["get",...K5];new Set(L7);/**
|
|
59
|
+
* React Router v6.30.6
|
|
60
|
+
*
|
|
61
|
+
* Copyright (c) Remix Software Inc.
|
|
62
|
+
*
|
|
63
|
+
* This source code is licensed under the MIT license found in the
|
|
64
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
65
|
+
*
|
|
66
|
+
* @license MIT
|
|
67
|
+
*/function dh(){return dh=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},dh.apply(null,arguments)}const sx=x.createContext(null),Y5=x.createContext(null),Gs=x.createContext(null),lx=x.createContext(null),No=x.createContext({outlet:null,matches:[],isDataRoute:!1}),X5=x.createContext(null);function W5(e,t){let{relative:n}=t===void 0?{}:t;Om()||en(!1);let{basename:r,navigator:i}=x.useContext(Gs),{hash:a,pathname:o,search:s}=cx(e,{relative:n}),l=o;return r!=="/"&&(l=o==="/"?r:_s([r,o])),i.createHref({pathname:l,search:s,hash:a})}function Om(){return x.useContext(lx)!=null}function _u(){return Om()||en(!1),x.useContext(lx).location}function Q5(e){x.useContext(Gs).static||x.useLayoutEffect(e)}function Ra(){let{isDataRoute:e}=x.useContext(No);return e?J7():B7()}function B7(){Om()||en(!1);let e=x.useContext(sx),{basename:t,future:n,navigator:r}=x.useContext(Gs),{matches:i}=x.useContext(No),{pathname:a}=_u(),o=JSON.stringify(q5(i,n.v7_relativeSplatPath)),s=x.useRef(!1);return Q5(()=>{s.current=!0}),x.useCallback(function(u,f){if(f===void 0&&(f={}),!s.current)return;if(typeof u=="number"){r.go(u);return}let d=V5(u,JSON.parse(o),a,f.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:_s([t,d.pathname])),(f.replace?r.replace:r.push)(d,f.state,f)},[t,r,o,a,e])}const z7=x.createContext(null);function F7(e){let t=x.useContext(No).outlet;return t&&x.createElement(z7.Provider,{value:e},t)}function ux(){let{matches:e}=x.useContext(No),t=e[e.length-1];return t?t.params:{}}function cx(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=x.useContext(Gs),{matches:i}=x.useContext(No),{pathname:a}=_u(),o=JSON.stringify(q5(i,r.v7_relativeSplatPath));return x.useMemo(()=>V5(e,JSON.parse(o),a,n==="path"),[e,o,a,n])}function U7(e,t){return H7(e,t)}function H7(e,t,n,r){Om()||en(!1);let{navigator:i}=x.useContext(Gs),{matches:a}=x.useContext(No),o=a[a.length-1],s=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=_u(),f;if(t){var d;let g=typeof t=="string"?Cu(t):t;l==="/"||(d=g.pathname)!=null&&d.startsWith(l)||en(!1),f=g}else f=u;let p=f.pathname||"/",h=p;if(l!=="/"){let g=l.replace(/^\//,"").split("/");h="/"+p.replace(/^\//,"").split("/").slice(g.length).join("/")}let b=y7(e,{pathname:h}),m=Y7(b&&b.map(g=>Object.assign({},g,{params:Object.assign({},s,g.params),pathname:_s([l,i.encodeLocation?i.encodeLocation(g.pathname).pathname:g.pathname]),pathnameBase:g.pathnameBase==="/"?l:_s([l,i.encodeLocation?i.encodeLocation(g.pathnameBase).pathname:g.pathnameBase])})),a,n,r);return t&&m?x.createElement(lx.Provider,{value:{location:dh({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:ms.Pop}},m):m}function q7(){let e=Z7(),t=k7(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return x.createElement(x.Fragment,null,x.createElement("h2",null,"Unexpected Application Error!"),x.createElement("h3",{style:{fontStyle:"italic"}},t),n?x.createElement("pre",{style:i},n):null,null)}const V7=x.createElement(q7,null);class G7 extends x.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?x.createElement(No.Provider,{value:this.props.routeContext},x.createElement(X5.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function K7(e){let{routeContext:t,match:n,children:r}=e,i=x.useContext(sx);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),x.createElement(No.Provider,{value:t},r)}function Y7(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var a;if(!n)return null;if(n.errors)e=n.matches;else if((a=r)!=null&&a.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,s=(i=n)==null?void 0:i.errors;if(s!=null){let f=o.findIndex(d=>d.route.id&&(s==null?void 0:s[d.route.id])!==void 0);f>=0||en(!1),o=o.slice(0,Math.min(o.length,f+1))}let l=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let f=0;f<o.length;f++){let d=o[f];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(u=f),d.route.id){let{loaderData:p,errors:h}=n,b=d.route.loader&&p[d.route.id]===void 0&&(!h||h[d.route.id]===void 0);if(d.route.lazy||b){l=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((f,d,p)=>{let h,b=!1,m=null,g=null;n&&(h=s&&d.route.id?s[d.route.id]:void 0,m=d.route.errorElement||V7,l&&(u<0&&p===0?(eY("route-fallback"),b=!0,g=null):u===p&&(b=!0,g=d.route.hydrateFallbackElement||null)));let y=t.concat(o.slice(0,p+1)),v=()=>{let w;return h?w=m:b?w=g:d.route.Component?w=x.createElement(d.route.Component,null):d.route.element?w=d.route.element:w=f,x.createElement(K7,{match:d,routeContext:{outlet:f,matches:y,isDataRoute:n!=null},children:w})};return n&&(d.route.ErrorBoundary||d.route.errorElement||p===0)?x.createElement(G7,{location:n.location,revalidation:n.revalidation,component:m,error:h,children:v(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):v()},null)}var Z5=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Z5||{}),J5=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(J5||{});function X7(e){let t=x.useContext(sx);return t||en(!1),t}function W7(e){let t=x.useContext(Y5);return t||en(!1),t}function Q7(e){let t=x.useContext(No);return t||en(!1),t}function eB(e){let t=Q7(),n=t.matches[t.matches.length-1];return n.route.id||en(!1),n.route.id}function Z7(){var e;let t=x.useContext(X5),n=W7(),r=eB();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function J7(){let{router:e}=X7(Z5.UseNavigateStable),t=eB(J5.UseNavigateStable),n=x.useRef(!1);return Q5(()=>{n.current=!0}),x.useCallback(function(i,a){a===void 0&&(a={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,dh({fromRouteId:t},a)))},[e,t])}const CR={};function eY(e,t,n){CR[e]||(CR[e]=!0)}function tY(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function nY(e){return F7(e.context)}function Bn(e){en(!1)}function rY(e){let{basename:t="/",children:n=null,location:r,navigationType:i=ms.Pop,navigator:a,static:o=!1,future:s}=e;Om()&&en(!1);let l=t.replace(/^\/*/,"/"),u=x.useMemo(()=>({basename:l,navigator:a,static:o,future:dh({v7_relativeSplatPath:!1},s)}),[l,s,a,o]);typeof r=="string"&&(r=Cu(r));let{pathname:f="/",search:d="",hash:p="",state:h=null,key:b="default"}=r,m=x.useMemo(()=>{let g=Of(f,l);return g==null?null:{location:{pathname:g,search:d,hash:p,state:h,key:b},navigationType:i}},[l,f,d,p,h,b,i]);return m==null?null:x.createElement(Gs.Provider,{value:u},x.createElement(lx.Provider,{children:n,value:m}))}function iY(e){let{children:t,location:n}=e;return U7(fO(t),n)}new Promise(()=>{});function fO(e,t){t===void 0&&(t=[]);let n=[];return x.Children.forEach(e,(r,i)=>{if(!x.isValidElement(r))return;let a=[...t,i];if(r.type===x.Fragment){n.push.apply(n,fO(r.props.children,a));return}r.type!==Bn&&en(!1),!r.props.index||!r.props.children||en(!1);let o={id:r.props.id||a.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=fO(r.props.children,a)),n.push(o)}),n}/**
|
|
68
|
+
* React Router DOM v6.30.6
|
|
69
|
+
*
|
|
70
|
+
* Copyright (c) Remix Software Inc.
|
|
71
|
+
*
|
|
72
|
+
* This source code is licensed under the MIT license found in the
|
|
73
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
74
|
+
*
|
|
75
|
+
* @license MIT
|
|
76
|
+
*/function fy(){return fy=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},fy.apply(null,arguments)}function tB(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}function aY(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function oY(e,t){return e.button===0&&(!t||t==="_self")&&!aY(e)}function dO(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function sY(e,t){let n=dO(e);return t&&t.forEach((r,i)=>{n.has(i)||t.getAll(i).forEach(a=>{n.append(i,a)})}),n}const lY=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],uY=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],cY="6";try{window.__reactRouterVersion=cY}catch{}const fY=x.createContext({isTransitioning:!1}),dY="startTransition",_R=Bb[dY];function pY(e){let{basename:t,children:n,future:r,window:i}=e,a=x.useRef();a.current==null&&(a.current=m7({window:i,v5Compat:!0}));let o=a.current,[s,l]=x.useState({action:o.action,location:o.location}),{v7_startTransition:u}=r||{},f=x.useCallback(d=>{u&&_R?_R(()=>l(d)):l(d)},[l,u]);return x.useLayoutEffect(()=>o.listen(f),[o,f]),x.useEffect(()=>tY(r),[r]),x.createElement(rY,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:o,future:r})}const hY=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",mY=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,dy=x.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:a,replace:o,state:s,target:l,to:u,preventScrollReset:f,viewTransition:d}=t,p=tB(t,lY),{basename:h}=x.useContext(Gs),b,m=!1;if(typeof u=="string"&&mY.test(u)&&(b=u,hY))try{let w=new URL(window.location.href),S=u.startsWith("//")?new URL(w.protocol+u):new URL(u),O=Of(S.pathname,h);S.origin===w.origin&&O!=null?u=O+S.search+S.hash:m=!0}catch{}let g=W5(u,{relative:i}),y=yY(u,{replace:o,state:s,target:l,preventScrollReset:f,relative:i,viewTransition:d});function v(w){r&&r(w),w.defaultPrevented||y(w)}return x.createElement("a",fy({},p,{href:b||g,onClick:m||a?r:v,ref:n,target:l}))}),gY=x.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:i=!1,className:a="",end:o=!1,style:s,to:l,viewTransition:u,children:f}=t,d=tB(t,uY),p=cx(l,{relative:d.relative}),h=_u(),b=x.useContext(Y5),{navigator:m,basename:g}=x.useContext(Gs),y=b!=null&&bY(p)&&u===!0,v=m.encodeLocation?m.encodeLocation(p).pathname:p.pathname,w=h.pathname,S=b&&b.navigation&&b.navigation.location?b.navigation.location.pathname:null;i||(w=w.toLowerCase(),S=S?S.toLowerCase():null,v=v.toLowerCase()),S&&g&&(S=Of(S,g)||S);const O=v!=="/"&&v.endsWith("/")?v.length-1:v.length;let j=w===v||!o&&w.startsWith(v)&&w.charAt(O)==="/",E=S!=null&&(S===v||!o&&S.startsWith(v)&&S.charAt(v.length)==="/"),T={isActive:j,isPending:E,isTransitioning:y},A=j?r:void 0,C;typeof a=="function"?C=a(T):C=[a,j?"active":null,E?"pending":null,y?"transitioning":null].filter(Boolean).join(" ");let _=typeof s=="function"?s(T):s;return x.createElement(dy,fy({},d,{"aria-current":A,className:C,ref:n,style:_,to:l,viewTransition:u}),typeof f=="function"?f(T):f)});var pO;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(pO||(pO={}));var NR;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(NR||(NR={}));function vY(e){let t=x.useContext(sx);return t||en(!1),t}function yY(e,t){let{target:n,replace:r,state:i,preventScrollReset:a,relative:o,viewTransition:s}=t===void 0?{}:t,l=Ra(),u=_u(),f=cx(e,{relative:o});return x.useCallback(d=>{if(oY(d,n)){d.preventDefault();let p=r!==void 0?r:cy(u)===cy(f);l(e,{replace:p,state:i,preventScrollReset:a,relative:o,viewTransition:s})}},[u,l,f,r,i,n,e,a,o,s])}function nB(e){let t=x.useRef(dO(e)),n=x.useRef(!1),r=_u(),i=x.useMemo(()=>sY(r.search,n.current?null:t.current),[r.search]),a=Ra(),o=x.useCallback((s,l)=>{const u=dO(typeof s=="function"?s(i):s);n.current=!0,a("?"+u,l)},[a,i]);return[i,o]}function bY(e,t){t===void 0&&(t={});let n=x.useContext(fY);n==null&&en(!1);let{basename:r}=vY(pO.useViewTransitionState),i=cx(e,{relative:t.relative});if(!n.isTransitioning)return!1;let a=Of(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=Of(n.nextLocation.pathname,r)||n.nextLocation.pathname;return cO(i.pathname,o)!=null||cO(i.pathname,a)!=null}const hO="telescope:access-denied";async function xY(e){if(e.status!==401&&e.status!==403)return null;const t=typeof e.clone=="function"?e.clone():e,n=await Promise.resolve().then(()=>t.json()).catch(()=>null);if(n===null||typeof n!="object"||!("error"in n))return null;const{error:r}=n;if(r!=="unauthenticated"&&r!=="forbidden")return null;const i=n.redirectTo;return{status:e.status,reason:r,...typeof i=="string"?{redirectTo:i}:{}}}function wY(e){if(!(typeof window>"u")){if(e.redirectTo!==void 0){window.location.assign(e.redirectTo);return}window.dispatchEvent(new CustomEvent(hO,{detail:e}))}}function SY(){var t;const e=typeof window>"u"||(t=window.location)==null?void 0:t.search;return e&&new URLSearchParams(e).get("tenant")||void 0}function OY(e,t){return t===void 0||typeof e!="string"||/[?&]tenant=/.test(e)?e:`${e}${e.includes("?")?"&":"?"}tenant=${encodeURIComponent(t)}`}function jY(){return`${typeof window<"u"&&window.__TELESCOPE_BASE__||"/telescope"}/api`}function EY(e={}){const t=(e.baseUrl??jY()).replace(/\/$/,""),n=e.fetch??globalThis.fetch,r=e.onAccessDenied??wY,i=e.tenant??SY,a=async(m,g)=>{const y=await n(OY(m,i()),g),v=await xY(y);return v&&r(v),y};async function o(m,g){let y=`${t}${m}`;if(g){const w=new URLSearchParams;for(const[O,j]of Object.entries(g))j!==void 0&&w.set(O,String(j));const S=w.toString();S&&(y+=`?${S}`)}const v=await a(y);if(!v.ok)throw new Error(`Telescope API ${m} failed: ${v.status}`);return await v.json()}async function s(m,g,y){let v=`${t}${m}`;if(g){const S=new URLSearchParams;for(const[j,E]of Object.entries(g))E!==void 0&&S.set(j,String(E));const O=S.toString();O&&(v+=`?${O}`)}const w=await a(v,{method:"POST",headers:{"Content-Type":"application/json"},...y!==void 0?{body:JSON.stringify(y)}:{}});if(!w.ok)throw new Error(`Telescope API ${m} failed: ${w.status}`);return await w.json()}async function l(m){return a(`${t}${m}`)}async function u(m,g){return a(`${t}${m}`,{method:"POST",headers:{"Content-Type":"application/json"},...g!==void 0?{body:JSON.stringify(g)}:{}})}async function f(m){const g=await u("/queries/explain",{entryId:m});return g.ok?{ok:!0,plan:(await g.json()).plan}:{ok:!1,message:await d(g)}}async function d(m){const g=await m.json().then(y=>y).catch(()=>null);return g!==null&&typeof g=="object"&&"message"in g&&typeof g.message=="string"?g.message:`EXPLAIN failed (${m.status})`}async function p(m,g=!1){const y=g?"?force=true":"",v=await u(`/exceptions/${encodeURIComponent(m)}/diagnose${y}`);if(v.ok){const S=await v.json();return{ok:!0,markdown:S.markdown,cached:S.cached}}return{ok:!1,message:await b(v)}}async function h(m){const g=await l(`/exceptions/${encodeURIComponent(m)}/diagnosis`);return g.status===204||g.status===404||!g.ok?null:{markdown:(await g.json()).markdown,cached:!0}}async function b(m){const g=await m.json().then(y=>y).catch(()=>null);return g!==null&&typeof g=="object"&&"message"in g&&typeof g.message=="string"?g.message:`Diagnosis failed (${m.status})`}return{baseUrl:t,entries:(m={})=>o("/entries",{"filter[type]":m.type,"filter[tag]":m.tag,"filter[traceId]":m.traceId,"filter[batchId]":m.batchId,"filter[familyHash]":m.familyHash,search:m.search,after:m.after,first:m.first}),entry:m=>o(`/entries/${encodeURIComponent(m)}`),pulse:m=>o("/pulse",{window:m}),queues:m=>o("/queues",{window:m}),timeseries:(m={})=>o("/timeseries",{window:m.window,buckets:m.buckets,type:m.type,tag:m.tag}),traces:(m,g)=>o("/traces",{window:m,size:g}),waterfall:m=>o(`/traces/${encodeURIComponent(m)}/waterfall`),stats:(m,g)=>o("/stats",{type:m,window:g}),ai:(m,g)=>o("/ai",{window:m,buckets:g==null?void 0:g.buckets,top:g==null?void 0:g.top,size:g==null?void 0:g.size}),tags:(m,g)=>{var y;return o("/tags",{"filter[tag][startsWith]":m||void 0,search:((y=g==null?void 0:g.search)==null?void 0:y.trim())||void 0,after:g==null?void 0:g.after,first:g==null?void 0:g.first})},meta:()=>o("/meta"),tenancy:async m=>{const g=m!=null&&m.trim()?`?search=${encodeURIComponent(m.trim())}`:"",y=await l(`/tenancy${g}`);if(y.status===404)return{enabled:!1};if(!y.ok)throw new Error(`Telescope API /tenancy failed: ${y.status}`);return await y.json()},extData:(m,g,y)=>{const v=y&&Object.keys(y).length?`?${new URLSearchParams(y).toString()}`:"";return o(`/ext/${encodeURIComponent(m)}/data/${encodeURIComponent(g)}${v}`)},extAction:async(m,g,y)=>{const v=`/ext/${encodeURIComponent(m)}/actions/${encodeURIComponent(g)}`,w=await a(`${t}${v}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({confirmed:!0,input:y})});if(!w.ok){const S=await w.json().catch(()=>null),O=typeof(S==null?void 0:S.message)=="string"?S.message:`${w.status}`;throw new Error(O)}return await w.json()},serverStats:()=>o("/server-stats"),serverStatsHistory:()=>o("/server-stats/history"),health:()=>o("/health"),retention:()=>o("/retention"),prunes:()=>o("/prunes"),prune:()=>s("/retention/prune"),explain:f,diagnose:p,cachedDiagnosis:h,profilerStatus:()=>o("/profiles/status"),profiles:(m={})=>o("/profiles",{after:m.after,first:m.first}),profile:m=>o(`/profiles/${encodeURIComponent(m)}`),armProfile:(m,g)=>s("/profiles/arm",void 0,{count:m,...g?{label:g}:{}}),liveQueues:()=>o("/queues/live"),schedulesLive:()=>o("/schedules/live"),queueCounts:(m,g)=>o(`/queues/live/${encodeURIComponent(m)}/${encodeURIComponent(g)}/counts`),queueJobs:(m,g,y,v={})=>o(`/queues/live/${encodeURIComponent(m)}/${encodeURIComponent(g)}/jobs`,{"filter[state]":y,after:v.after,first:v.first}),queueJob:(m,g,y)=>o(`/queues/live/${encodeURIComponent(m)}/${encodeURIComponent(g)}/jobs/${encodeURIComponent(y)}`),queueJobAction:(m,g,y,v)=>s(`/queues/live/${encodeURIComponent(m)}/${encodeURIComponent(g)}/jobs/${encodeURIComponent(y)}/${encodeURIComponent(v)}`),queueAction:(m,g,y,v={})=>s(`/queues/live/${encodeURIComponent(m)}/${encodeURIComponent(g)}/actions/${encodeURIComponent(y)}`,{state:v.state}),queueEnqueue:(m,g,y)=>s(`/queues/live/${encodeURIComponent(m)}/${encodeURIComponent(g)}/enqueue`,void 0,y)}}const YT=x.createContext(null),rB=x.createContext(null);function TY({client:e,children:t}){const n=e??EY(),[r,i]=x.useState(!1),a=x.useMemo(()=>({paused:r,setPaused:i}),[r]);return c.jsx(YT.Provider,{value:n,children:c.jsx(rB.Provider,{value:a,children:t})})}function tt(){const e=x.useContext(YT);if(!e)throw new Error("useTelescopeClient must be used within a TelescopeProvider");return e}function AY(){return x.useContext(YT)}function iB(){const e=x.useContext(rB);if(!e)throw new Error("useLiveTail must be used within a TelescopeProvider");return e}function In(){return iB().paused}const lr=3e3,XT=2500;function kn(e,t){return t?!1:e}function CY(e,t={},n=!1){return{queryKey:["telescope","entries",t],queryFn:()=>e.entries(t),refetchInterval:kn(lr,n)}}function _Y(e,t){return{queryKey:["telescope","entry",t],queryFn:()=>e.entry(t)}}const NY=50;function RY(e,t="",n=""){return{queryKey:["telescope","tags","page",t,n],queryFn:({pageParam:r})=>e.tags(t===""?void 0:t,{search:n,first:NY,...r!==void 0?{after:r}:{}}),initialPageParam:void 0,getNextPageParam:r=>r.meta.hasNext&&r.meta.nextCursor!==null?r.meta.nextCursor:void 0,staleTime:lr}}function MY(e,t=!1){return{queryKey:["telescope","meta"],queryFn:()=>e.meta(),refetchInterval:kn(lr,t)}}function PY(e,t,n,r){return{queryKey:["telescope","ext-data",t,n,r],queryFn:()=>e.extData(t,n,r)}}function $Y(e,t=!1){return{queryKey:["telescope","server-stats"],queryFn:()=>e.serverStats(),refetchInterval:kn(lr,t)}}function DY(e,t=!1){return{queryKey:["telescope","server-stats-history"],queryFn:()=>e.serverStatsHistory(),refetchInterval:kn(lr,t)}}function IY(e,t=!1){return{queryKey:["telescope","health"],queryFn:()=>e.health(),refetchInterval:kn(lr,t)}}function aB(){return["telescope","retention"]}function kY(e,t=!1){return{queryKey:aB(),queryFn:()=>e.retention(),refetchInterval:kn(lr,t)}}function LY(e,t=!1){return{queryKey:["telescope","prunes"],queryFn:()=>e.prunes(),refetchInterval:kn(lr,t)}}function BY(e,t,n=!1){return{queryKey:["telescope","pulse",t],queryFn:()=>e.pulse(t),refetchInterval:kn(lr,n)}}function zY(e,t,n,r=!1){return{queryKey:["telescope","stats",t,n],queryFn:()=>e.stats(t,n),refetchInterval:kn(lr,r)}}function FY(e,t,n=!1){return{queryKey:["telescope","ai",t],queryFn:()=>e.ai(t,{buckets:24,top:8,size:100}),refetchInterval:kn(lr*3,n)}}function UY(e,t,n=!1){return{queryKey:["telescope","queues",t],queryFn:()=>e.queues(t),refetchInterval:kn(lr,n)}}function HY(e,t,n=!1){return{queryKey:["telescope","timeseries",t],queryFn:()=>e.timeseries(t),refetchInterval:kn(lr,n)}}function qY(e,t,n,r=!1){return{queryKey:["telescope","traces",t,n],queryFn:()=>e.traces(t,n),refetchInterval:kn(lr,r)}}function VY(e,t){return{queryKey:["telescope","waterfall",t],queryFn:()=>e.waterfall(t),enabled:t!==""}}function oB(){return["telescope","live-queues"]}function WT(e,t){return["telescope","queue-counts",e,t]}function GY(e,t,n,r={}){return["telescope","queue-jobs",e,t,n,r]}function KY(e,t,n){return["telescope","queue-job",e,t,n]}function YY(e,t=!1){return{queryKey:oB(),queryFn:()=>e.liveQueues(),refetchInterval:kn(XT,t)}}function XY(e,t,n,r,i={},a=!1){return{queryKey:GY(t,n,r,i),queryFn:()=>e.queueJobs(t,n,r,i),refetchInterval:kn(XT,a)}}function WY(e,t,n,r){return{queryKey:KY(t,n,r),queryFn:()=>e.queueJob(t,n,r)}}function QY(){return["telescope","live-schedules"]}function ZY(e,t=!1){return{queryKey:QY(),queryFn:()=>e.schedulesLive(),refetchInterval:kn(XT,t)}}function sB(){return zt(YY(tt(),In()))}function JY(){return zt(ZY(tt(),In()))}function eX(e,t,n,r={}){return zt(XY(tt(),e,t,n,r,In()))}function tX(e,t,n){return zt(WY(tt(),e,t,n))}function nX(){const e=tt(),t=_o();return Au({mutationFn:n=>e.queueJobAction(n.driver,n.queue,n.id,n.action),onSuccess:(n,r)=>{t.invalidateQueries({queryKey:WT(r.driver,r.queue)}),t.invalidateQueries({queryKey:["telescope","queue-jobs",r.driver,r.queue]})}})}function lB(){const e=tt(),t=_o();return Au({mutationFn:n=>e.queueAction(n.driver,n.queue,n.action,n.state!==void 0?{state:n.state}:{}),onSuccess:(n,r)=>{t.invalidateQueries({queryKey:WT(r.driver,r.queue)}),t.invalidateQueries({queryKey:["telescope","queue-jobs",r.driver,r.queue]})}})}function rX(){const e=tt(),t=_o();return Au({mutationFn:n=>e.queueEnqueue(n.driver,n.queue,{...n.name!==void 0?{name:n.name}:{},payload:n.payload}),onSuccess:(n,r)=>{t.invalidateQueries({queryKey:oB()}),t.invalidateQueries({queryKey:WT(r.driver,r.queue)}),t.invalidateQueries({queryKey:["telescope","queue-jobs",r.driver,r.queue]})}})}function iX(){return zt(kY(tt(),In()))}function aX(){return zt(LY(tt(),In()))}function uB(){const e=tt(),t=_o();return Au({mutationFn:()=>e.prune(),onSuccess:()=>{t.invalidateQueries({queryKey:aB()}),t.invalidateQueries({queryKey:["telescope","prunes"]}),t.invalidateQueries({queryKey:["telescope","entries"]})}})}function oX(){const e=tt();return Au({mutationFn:t=>e.explain(t)})}function sX(){const e=tt();return Au({mutationFn:t=>e.diagnose(t.entryId,t.force??!1)})}function lX(e,t,n){return{queryKey:["telescope","cached-diagnosis",t],queryFn:()=>e.cachedDiagnosis(t),enabled:n}}function uX(e,t){return zt(lX(tt(),e,t))}function cB(e={}){return zt(CY(tt(),e,In()))}function cX(e){return zt(_Y(tt(),e))}function Ks(){return zt(MY(tt(),In()))}function mO(e=""){const t=tt();return zt({queryKey:["telescope","tenancy",e],queryFn:()=>t.tenancy?t.tenancy(e):Promise.resolve({enabled:!1}),staleTime:3e4})}function fX(){return zt($Y(tt(),In()))}function dX(){return zt(DY(tt(),In()))}function pX(e,t,n){return zt(PY(tt(),e,t,n))}function hX(){return zt(IY(tt(),In()))}function mX(e="",t=""){return h7(RY(tt(),e,t))}function gX(e,t){return zt(zY(tt(),e,t,In()))}function fB(e){return zt(BY(tt(),e,In()))}function vX(e){return zt(FY(tt(),e,In()))}function dB(e){return zt(UY(tt(),e,In()))}function QT(e){return zt(HY(tt(),e,In()))}function yX(e,t){return zt(qY(tt(),e,t,In()))}function bX(e){return zt(VY(tt(),e))}function xX(e,t=!1){return{queryKey:["telescope","profiler-status"],queryFn:()=>e.profilerStatus(),refetchInterval:kn(lr,t)}}function wX(e,t,n=!1){return{queryKey:["telescope","profiles",t],queryFn:()=>e.profiles({first:t}),refetchInterval:kn(lr,n)}}function SX(e,t){return{queryKey:["telescope","profile",t],queryFn:()=>e.profile(t),enabled:t!==""}}function OX(){return zt(xX(tt(),In()))}function jX(e){return zt(wX(tt(),e,In()))}function EX(e){return zt(SX(tt(),e))}function TX(){const e=tt(),t=_o();return Au({mutationFn:n=>e.armProfile(n.count,n.label),onSuccess:()=>{t.invalidateQueries({queryKey:["telescope","profiler-status"]})}})}function AX(){const e=_o(),t=tt(),[n,r]=x.useState("connecting");return x.useEffect(()=>{if(typeof EventSource>"u"){r("polling");return}const i=`${t.baseUrl}/stream`,a=new EventSource(i);return a.onopen=()=>r("live"),a.onerror=()=>r("polling"),a.onmessage=o=>{try{const s=JSON.parse(o.data);if(s.heartbeat)return;s.types&&s.types.length>0&&(e.invalidateQueries({queryKey:["telescope","ext-data"]}),e.invalidateQueries({queryKey:["telescope","meta"]}))}catch{}},()=>a.close()},[e,t.baseUrl]),{status:n}}const ph=[{id:"request",label:"Requests",dot:"bg-emerald-400"},{id:"query",label:"Queries",dot:"bg-sky-400"},{id:"exception",label:"Exceptions",dot:"bg-red-400"},{id:"client_exception",label:"Client errors",dot:"bg-orange-500"},{id:"job",label:"Jobs",dot:"bg-violet-400"},{id:"durable",label:"Workflows",dot:"bg-purple-400"},{id:"mail",label:"Mail",dot:"bg-pink-400"},{id:"cache",label:"Cache",dot:"bg-teal-400"},{id:"schedule",label:"Schedule",dot:"bg-orange-400",query:{type:"job",tag:"schedule"}},{id:"http_client",label:"HTTP Client",dot:"bg-amber-400"},{id:"dump",label:"Dumps",dot:"bg-fuchsia-400"},{id:"event",label:"Events",dot:"bg-indigo-400"},{id:"log",label:"Logs",dot:"bg-zinc-400"},{id:"model",label:"Models",dot:"bg-lime-400"},{id:"redis",label:"Redis",dot:"bg-rose-400"},{id:"inertia",label:"Inertia",dot:"bg-cyan-400"},{id:"span",label:"Spans",dot:"bg-slate-400"},{id:"resilience",label:"Resilience",dot:"bg-yellow-400"},{id:"workflow",label:"Nest workflows",dot:"bg-purple-300"},{id:"auth",label:"Auth",dot:"bg-red-300"}],CX="bg-zinc-500",fx=Object.fromEntries(ph.map(e=>[e.id,e]));function dx(e){var t;return((t=fx[e])==null?void 0:t.dot)??CX}function hh(e){var t;return((t=fx[e])==null?void 0:t.label)??e}function _X(e){return e in fx}function pB(e){var t;return((t=fx[e])==null?void 0:t.query)??{type:e}}const NX=new Set(["request","exception"]);function RX(e){const t=(e??[]).map(r=>({id:r.id,label:r.label,dot:r.dot})),n=new Set(ph.map(r=>r.id));return[...ph,...t.filter(r=>!n.has(r.id))]}function MX(e,t){if(t===void 0)return[...e];const n=new Set(t);return e.filter(r=>{var a;if(NX.has(r.id))return!0;const i=((a=r.query)==null?void 0:a.type)??r.id;return n.has(r.id)||n.has(i)})}function hB(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=hB(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ke(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=hB(e))&&(r&&(r+=" "),r+=t);return r}const PX=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},$X=(e,t)=>({classGroupId:e,validator:t}),mB=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),py="-",RR=[],DX="arbitrary..",IX=e=>{const t=LX(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return kX(o);const s=o.split(py),l=s[0]===""&&s.length>1?1:0;return gB(s,l,t)},getConflictingClassGroupIds:(o,s)=>{if(s){const l=r[o],u=n[o];return l?u?PX(u,l):l:u||RR}return n[o]||RR}}},gB=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const i=e[t],a=n.nextPart.get(i);if(a){const u=gB(e,t+1,a);if(u)return u}const o=n.validators;if(o===null)return;const s=t===0?e.join(py):e.slice(t).join(py),l=o.length;for(let u=0;u<l;u++){const f=o[u];if(f.validator(s))return f.classGroupId}},kX=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?DX+r:void 0})(),LX=e=>{const{theme:t,classGroups:n}=e;return BX(n,t)},BX=(e,t)=>{const n=mB();for(const r in e){const i=e[r];ZT(i,n,r,t)}return n},ZT=(e,t,n,r)=>{const i=e.length;for(let a=0;a<i;a++){const o=e[a];zX(o,t,n,r)}},zX=(e,t,n,r)=>{if(typeof e=="string"){FX(e,t,n);return}if(typeof e=="function"){UX(e,t,n,r);return}HX(e,t,n,r)},FX=(e,t,n)=>{const r=e===""?t:vB(t,e);r.classGroupId=n},UX=(e,t,n,r)=>{if(qX(e)){ZT(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push($X(n,e))},HX=(e,t,n,r)=>{const i=Object.entries(e),a=i.length;for(let o=0;o<a;o++){const[s,l]=i[o];ZT(l,vB(t,s),n,r)}},vB=(e,t)=>{let n=e;const r=t.split(py),i=r.length;for(let a=0;a<i;a++){const o=r[a];let s=n.nextPart.get(o);s||(s=mB(),n.nextPart.set(o,s)),n=s}return n},qX=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,VX=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const i=(a,o)=>{n[a]=o,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(a){let o=n[a];if(o!==void 0)return o;if((o=r[a])!==void 0)return i(a,o),o},set(a,o){a in n?n[a]=o:i(a,o)}}},gO="!",MR=":",GX=[],PR=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),KX=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const a=[];let o=0,s=0,l=0,u;const f=i.length;for(let m=0;m<f;m++){const g=i[m];if(o===0&&s===0){if(g===MR){a.push(i.slice(l,m)),l=m+1;continue}if(g==="/"){u=m;continue}}g==="["?o++:g==="]"?o--:g==="("?s++:g===")"&&s--}const d=a.length===0?i:i.slice(l);let p=d,h=!1;d.endsWith(gO)?(p=d.slice(0,-1),h=!0):d.startsWith(gO)&&(p=d.slice(1),h=!0);const b=u&&u>l?u-l:void 0;return PR(a,h,p,b)};if(t){const i=t+MR,a=r;r=o=>o.startsWith(i)?a(o.slice(i.length)):PR(GX,!1,o,void 0,!0)}if(n){const i=r;r=a=>n({className:a,parseClassName:i})}return r},YX=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let i=[];for(let a=0;a<n.length;a++){const o=n[a],s=o[0]==="[",l=t.has(o);s||l?(i.length>0&&(i.sort(),r.push(...i),i=[]),r.push(o)):i.push(o)}return i.length>0&&(i.sort(),r.push(...i)),r}},XX=e=>({cache:VX(e.cacheSize),parseClassName:KX(e),sortModifiers:YX(e),postfixLookupClassGroupIds:WX(e),...IX(e)}),WX=e=>{const t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let r=0;r<n.length;r++)t[n[r]]=!0;return t},QX=/\s+/,ZX=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],l=e.trim().split(QX);let u="";for(let f=l.length-1;f>=0;f-=1){const d=l[f],{isExternal:p,modifiers:h,hasImportantModifier:b,baseClassName:m,maybePostfixModifierPosition:g}=n(d);if(p){u=d+(u.length>0?" "+u:u);continue}let y=!!g,v;if(y){const E=m.substring(0,g);v=r(E);const T=v&&o[v]?r(m):void 0;T&&T!==v&&(v=T,y=!1)}else v=r(m);if(!v){if(!y){u=d+(u.length>0?" "+u:u);continue}if(v=r(m),!v){u=d+(u.length>0?" "+u:u);continue}y=!1}const w=h.length===0?"":h.length===1?h[0]:a(h).join(":"),S=b?w+gO:w,O=S+v;if(s.indexOf(O)>-1)continue;s.push(O);const j=i(v,y);for(let E=0;E<j.length;++E){const T=j[E];s.push(S+T)}u=d+(u.length>0?" "+u:u)}return u},JX=(...e)=>{let t=0,n,r,i="";for(;t<e.length;)(n=e[t++])&&(r=yB(n))&&(i&&(i+=" "),i+=r);return i},yB=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=yB(e[r]))&&(n&&(n+=" "),n+=t);return n},eW=(e,...t)=>{let n,r,i,a;const o=l=>{const u=t.reduce((f,d)=>d(f),e());return n=XX(u),r=n.cache.get,i=n.cache.set,a=s,s(l)},s=l=>{const u=r(l);if(u)return u;const f=ZX(l,n);return i(l,f),f};return a=o,(...l)=>a(JX(...l))},tW=[],hn=e=>{const t=n=>n[e]||tW;return t.isThemeGetter=!0,t.themeKey=e,t},bB=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,xB=/^\((?:(\w[\w-]*):)?(.+)\)$/i,nW=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,rW=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,iW=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,aW=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/,oW=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,sW=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,qo=e=>nW.test(e),Ge=e=>!!e&&!Number.isNaN(Number(e)),na=e=>!!e&&Number.isInteger(Number(e)),Cw=e=>e.endsWith("%")&&Ge(e.slice(0,-1)),Ba=e=>rW.test(e),wB=()=>!0,lW=e=>iW.test(e)&&!aW.test(e),JT=()=>!1,uW=e=>oW.test(e),cW=e=>sW.test(e),fW=e=>!ve(e)&&!be(e),dW=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),pW=e=>Ys(e,jB,JT),ve=e=>bB.test(e),cl=e=>Ys(e,EB,lW),$R=e=>Ys(e,wW,Ge),hW=e=>Ys(e,AB,wB),mW=e=>Ys(e,TB,JT),DR=e=>Ys(e,SB,JT),gW=e=>Ys(e,OB,cW),hg=e=>Ys(e,CB,uW),be=e=>xB.test(e),Kd=e=>Nu(e,EB),vW=e=>Nu(e,TB),IR=e=>Nu(e,SB),yW=e=>Nu(e,jB),bW=e=>Nu(e,OB),mg=e=>Nu(e,CB,!0),xW=e=>Nu(e,AB,!0),Ys=(e,t,n)=>{const r=bB.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Nu=(e,t,n=!1)=>{const r=xB.exec(e);return r?r[1]?t(r[1]):n:!1},SB=e=>e==="position"||e==="percentage",OB=e=>e==="image"||e==="url",jB=e=>e==="length"||e==="size"||e==="bg-size",EB=e=>e==="length",wW=e=>e==="number",TB=e=>e==="family-name",AB=e=>e==="number"||e==="weight",CB=e=>e==="shadow",SW=()=>{const e=hn("color"),t=hn("font"),n=hn("text"),r=hn("font-weight"),i=hn("tracking"),a=hn("leading"),o=hn("breakpoint"),s=hn("container"),l=hn("spacing"),u=hn("radius"),f=hn("shadow"),d=hn("inset-shadow"),p=hn("text-shadow"),h=hn("drop-shadow"),b=hn("blur"),m=hn("perspective"),g=hn("aspect"),y=hn("ease"),v=hn("animate"),w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],O=()=>[...S(),be,ve],j=()=>["auto","hidden","clip","visible","scroll"],E=()=>["auto","contain","none"],T=()=>[be,ve,l],A=()=>[qo,"full","auto",...T()],C=()=>[na,"none","subgrid",be,ve],_=()=>["auto",{span:["full",na,be,ve]},na,be,ve],N=()=>[na,"auto",be,ve],D=()=>["auto","min","max","fr",be,ve],R=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],$=()=>["start","end","center","stretch","center-safe","end-safe"],P=()=>["auto",...T()],B=()=>[qo,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...T()],L=()=>[s,qo,"screen","full","dvw","lvw","svw","min","max","fit",...T()],k=()=>[qo,"screen","full","lh","dvh","lvh","svh","min","max","fit",...T()],I=()=>[e,be,ve],V=()=>[...S(),IR,DR,{position:[be,ve]}],M=()=>["no-repeat",{repeat:["","x","y","space","round"]}],q=()=>["auto","cover","contain",yW,pW,{size:[be,ve]}],G=()=>[Cw,Kd,cl],U=()=>["","none","full",u,be,ve],Y=()=>["",Ge,Kd,cl],X=()=>["solid","dashed","dotted","double"],te=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],H=()=>[Ge,Cw,IR,DR],ee=()=>["","none",b,be,ve],J=()=>["none",Ge,be,ve],K=()=>["none",Ge,be,ve],oe=()=>[Ge,be,ve],Q=()=>[qo,"full",...T()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ba],breakpoint:[Ba],color:[wB],container:[Ba],"drop-shadow":[Ba],ease:["in","out","in-out"],font:[fW],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ba],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ba],shadow:[Ba],spacing:["px",Ge],text:[Ba],"text-shadow":[Ba],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",qo,ve,be,g]}],container:["container"],"container-type":[{"@container":["","normal","size",be,ve]}],"container-named":[dW],columns:[{columns:[Ge,"auto",ve,be,s]}],"break-after":[{"break-after":w()}],"break-before":[{"break-before":w()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:O()}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:A()}],"inset-x":[{"inset-x":A()}],"inset-y":[{"inset-y":A()}],start:[{"inset-s":A(),start:A()}],end:[{"inset-e":A(),end:A()}],"inset-bs":[{"inset-bs":A()}],"inset-be":[{"inset-be":A()}],top:[{top:A()}],right:[{right:A()}],bottom:[{bottom:A()}],left:[{left:A()}],visibility:["visible","invisible","collapse"],z:[{z:[na,"auto",be,ve]}],basis:[{basis:[qo,"full","auto",s,...T()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ge,qo,"auto","initial","none",ve]}],grow:[{grow:["",Ge,be,ve]}],shrink:[{shrink:["",Ge,be,ve]}],order:[{order:[na,"first","last","none",be,ve]}],"grid-cols":[{"grid-cols":C()}],"col-start-end":[{col:_()}],"col-start":[{"col-start":N()}],"col-end":[{"col-end":N()}],"grid-rows":[{"grid-rows":C()}],"row-start-end":[{row:_()}],"row-start":[{"row-start":N()}],"row-end":[{"row-end":N()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":D()}],"auto-rows":[{"auto-rows":D()}],gap:[{gap:T()}],"gap-x":[{"gap-x":T()}],"gap-y":[{"gap-y":T()}],"justify-content":[{justify:[...R(),"normal"]}],"justify-items":[{"justify-items":[...$(),"normal"]}],"justify-self":[{"justify-self":["auto",...$()]}],"align-content":[{content:["normal",...R()]}],"align-items":[{items:[...$(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...$(),{baseline:["","last"]}]}],"place-content":[{"place-content":R()}],"place-items":[{"place-items":[...$(),"baseline"]}],"place-self":[{"place-self":["auto",...$()]}],p:[{p:T()}],px:[{px:T()}],py:[{py:T()}],ps:[{ps:T()}],pe:[{pe:T()}],pbs:[{pbs:T()}],pbe:[{pbe:T()}],pt:[{pt:T()}],pr:[{pr:T()}],pb:[{pb:T()}],pl:[{pl:T()}],m:[{m:P()}],mx:[{mx:P()}],my:[{my:P()}],ms:[{ms:P()}],me:[{me:P()}],mbs:[{mbs:P()}],mbe:[{mbe:P()}],mt:[{mt:P()}],mr:[{mr:P()}],mb:[{mb:P()}],ml:[{ml:P()}],"space-x":[{"space-x":T()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":T()}],"space-y-reverse":["space-y-reverse"],size:[{size:B()}],"inline-size":[{inline:["auto",...L()]}],"min-inline-size":[{"min-inline":["auto",...L()]}],"max-inline-size":[{"max-inline":["none",...L()]}],"block-size":[{block:["auto",...k()]}],"min-block-size":[{"min-block":["auto",...k()]}],"max-block-size":[{"max-block":["none",...k()]}],w:[{w:[s,"screen",...B()]}],"min-w":[{"min-w":[s,"screen","none",...B()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[o]},...B()]}],h:[{h:["screen","lh",...B()]}],"min-h":[{"min-h":["screen","lh","none",...B()]}],"max-h":[{"max-h":["screen","lh","none",...B()]}],"font-size":[{text:["base",n,Kd,cl]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,xW,hW]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Cw,ve]}],"font-family":[{font:[vW,mW,t]}],"font-features":[{"font-features":[ve]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,be,ve]}],"line-clamp":[{"line-clamp":[Ge,"none",be,$R]}],leading:[{leading:["none",a,...T()]}],"list-image":[{"list-image":["none",be,ve]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",be,ve]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:I()}],"text-color":[{text:I()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...X(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ge,"from-font","auto",be,cl]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[Ge,"auto",be,ve]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:T()}],"tab-size":[{tab:[na,be,ve]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",be,ve]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",be,ve]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:V()}],"bg-repeat":[{bg:M()}],"bg-size":[{bg:q()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},na,be,ve],radial:["",be,ve],conic:["",na,be,ve]},bW,gW]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:G()}],"gradient-via-pos":[{via:G()}],"gradient-to-pos":[{to:G()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],rounded:[{rounded:U()}],"rounded-s":[{"rounded-s":U()}],"rounded-e":[{"rounded-e":U()}],"rounded-t":[{"rounded-t":U()}],"rounded-r":[{"rounded-r":U()}],"rounded-b":[{"rounded-b":U()}],"rounded-l":[{"rounded-l":U()}],"rounded-ss":[{"rounded-ss":U()}],"rounded-se":[{"rounded-se":U()}],"rounded-ee":[{"rounded-ee":U()}],"rounded-es":[{"rounded-es":U()}],"rounded-tl":[{"rounded-tl":U()}],"rounded-tr":[{"rounded-tr":U()}],"rounded-br":[{"rounded-br":U()}],"rounded-bl":[{"rounded-bl":U()}],"border-w":[{border:Y()}],"border-w-x":[{"border-x":Y()}],"border-w-y":[{"border-y":Y()}],"border-w-s":[{"border-s":Y()}],"border-w-e":[{"border-e":Y()}],"border-w-bs":[{"border-bs":Y()}],"border-w-be":[{"border-be":Y()}],"border-w-t":[{"border-t":Y()}],"border-w-r":[{"border-r":Y()}],"border-w-b":[{"border-b":Y()}],"border-w-l":[{"border-l":Y()}],"divide-x":[{"divide-x":Y()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Y()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...X(),"hidden","none"]}],"divide-style":[{divide:[...X(),"hidden","none"]}],"border-color":[{border:I()}],"border-color-x":[{"border-x":I()}],"border-color-y":[{"border-y":I()}],"border-color-s":[{"border-s":I()}],"border-color-e":[{"border-e":I()}],"border-color-bs":[{"border-bs":I()}],"border-color-be":[{"border-be":I()}],"border-color-t":[{"border-t":I()}],"border-color-r":[{"border-r":I()}],"border-color-b":[{"border-b":I()}],"border-color-l":[{"border-l":I()}],"divide-color":[{divide:I()}],"outline-style":[{outline:[...X(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ge,be,ve]}],"outline-w":[{outline:["",Ge,Kd,cl]}],"outline-color":[{outline:I()}],shadow:[{shadow:["","inner","none",f,mg,hg]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":["none",d,mg,hg]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:Y()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[Ge,cl]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":Y()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":["none",p,mg,hg]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[Ge,be,ve]}],"mix-blend":[{"mix-blend":[...te(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":te()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ge]}],"mask-image-linear-from-pos":[{"mask-linear-from":H()}],"mask-image-linear-to-pos":[{"mask-linear-to":H()}],"mask-image-linear-from-color":[{"mask-linear-from":I()}],"mask-image-linear-to-color":[{"mask-linear-to":I()}],"mask-image-t-from-pos":[{"mask-t-from":H()}],"mask-image-t-to-pos":[{"mask-t-to":H()}],"mask-image-t-from-color":[{"mask-t-from":I()}],"mask-image-t-to-color":[{"mask-t-to":I()}],"mask-image-r-from-pos":[{"mask-r-from":H()}],"mask-image-r-to-pos":[{"mask-r-to":H()}],"mask-image-r-from-color":[{"mask-r-from":I()}],"mask-image-r-to-color":[{"mask-r-to":I()}],"mask-image-b-from-pos":[{"mask-b-from":H()}],"mask-image-b-to-pos":[{"mask-b-to":H()}],"mask-image-b-from-color":[{"mask-b-from":I()}],"mask-image-b-to-color":[{"mask-b-to":I()}],"mask-image-l-from-pos":[{"mask-l-from":H()}],"mask-image-l-to-pos":[{"mask-l-to":H()}],"mask-image-l-from-color":[{"mask-l-from":I()}],"mask-image-l-to-color":[{"mask-l-to":I()}],"mask-image-x-from-pos":[{"mask-x-from":H()}],"mask-image-x-to-pos":[{"mask-x-to":H()}],"mask-image-x-from-color":[{"mask-x-from":I()}],"mask-image-x-to-color":[{"mask-x-to":I()}],"mask-image-y-from-pos":[{"mask-y-from":H()}],"mask-image-y-to-pos":[{"mask-y-to":H()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[be,ve]}],"mask-image-radial-from-pos":[{"mask-radial-from":H()}],"mask-image-radial-to-pos":[{"mask-radial-to":H()}],"mask-image-radial-from-color":[{"mask-radial-from":I()}],"mask-image-radial-to-color":[{"mask-radial-to":I()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":S()}],"mask-image-conic-pos":[{"mask-conic":[Ge]}],"mask-image-conic-from-pos":[{"mask-conic-from":H()}],"mask-image-conic-to-pos":[{"mask-conic-to":H()}],"mask-image-conic-from-color":[{"mask-conic-from":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:V()}],"mask-repeat":[{mask:M()}],"mask-size":[{mask:q()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",be,ve]}],filter:[{filter:["","none",be,ve]}],blur:[{blur:ee()}],brightness:[{brightness:[Ge,be,ve]}],contrast:[{contrast:[Ge,be,ve]}],"drop-shadow":[{"drop-shadow":["","none",h,mg,hg]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:["",Ge,be,ve]}],"hue-rotate":[{"hue-rotate":[Ge,be,ve]}],invert:[{invert:["",Ge,be,ve]}],saturate:[{saturate:[Ge,be,ve]}],sepia:[{sepia:["",Ge,be,ve]}],"backdrop-filter":[{"backdrop-filter":["","none",be,ve]}],"backdrop-blur":[{"backdrop-blur":ee()}],"backdrop-brightness":[{"backdrop-brightness":[Ge,be,ve]}],"backdrop-contrast":[{"backdrop-contrast":[Ge,be,ve]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ge,be,ve]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ge,be,ve]}],"backdrop-invert":[{"backdrop-invert":["",Ge,be,ve]}],"backdrop-opacity":[{"backdrop-opacity":[Ge,be,ve]}],"backdrop-saturate":[{"backdrop-saturate":[Ge,be,ve]}],"backdrop-sepia":[{"backdrop-sepia":["",Ge,be,ve]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":T()}],"border-spacing-x":[{"border-spacing-x":T()}],"border-spacing-y":[{"border-spacing-y":T()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",be,ve]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ge,"initial",be,ve]}],ease:[{ease:["linear","initial",y,be,ve]}],delay:[{delay:[Ge,be,ve]}],animate:[{animate:["none",v,be,ve]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,be,ve]}],"perspective-origin":[{"perspective-origin":O()}],rotate:[{rotate:J()}],"rotate-x":[{"rotate-x":J()}],"rotate-y":[{"rotate-y":J()}],"rotate-z":[{"rotate-z":J()}],scale:[{scale:K()}],"scale-x":[{"scale-x":K()}],"scale-y":[{"scale-y":K()}],"scale-z":[{"scale-z":K()}],"scale-3d":["scale-3d"],skew:[{skew:oe()}],"skew-x":[{"skew-x":oe()}],"skew-y":[{"skew-y":oe()}],transform:[{transform:[be,ve,"","none","gpu","cpu"]}],"transform-origin":[{origin:O()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Q()}],"translate-x":[{"translate-x":Q()}],"translate-y":[{"translate-y":Q()}],"translate-z":[{"translate-z":Q()}],"translate-none":["translate-none"],zoom:[{zoom:[na,be,ve]}],accent:[{accent:I()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:I()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",be,ve]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":I()}],"scrollbar-track-color":[{"scrollbar-track":I()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":T()}],"scroll-mx":[{"scroll-mx":T()}],"scroll-my":[{"scroll-my":T()}],"scroll-ms":[{"scroll-ms":T()}],"scroll-me":[{"scroll-me":T()}],"scroll-mbs":[{"scroll-mbs":T()}],"scroll-mbe":[{"scroll-mbe":T()}],"scroll-mt":[{"scroll-mt":T()}],"scroll-mr":[{"scroll-mr":T()}],"scroll-mb":[{"scroll-mb":T()}],"scroll-ml":[{"scroll-ml":T()}],"scroll-p":[{"scroll-p":T()}],"scroll-px":[{"scroll-px":T()}],"scroll-py":[{"scroll-py":T()}],"scroll-ps":[{"scroll-ps":T()}],"scroll-pe":[{"scroll-pe":T()}],"scroll-pbs":[{"scroll-pbs":T()}],"scroll-pbe":[{"scroll-pbe":T()}],"scroll-pt":[{"scroll-pt":T()}],"scroll-pr":[{"scroll-pr":T()}],"scroll-pb":[{"scroll-pb":T()}],"scroll-pl":[{"scroll-pl":T()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",be,ve]}],fill:[{fill:["none",...I()]}],"stroke-w":[{stroke:[Ge,Kd,cl,$R]}],stroke:[{stroke:["none",...I()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["start","end","right","left"],"inset-y":["inset-bs","inset-be","top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["ps","pe","pr","pl"],py:["pbs","pbe","pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["ms","me","mr","ml"],my:["mbs","mbe","mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-s","border-w-e","border-w-r","border-w-l"],"border-w-y":["border-w-bs","border-w-be","border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-s","border-color-e","border-color-r","border-color-l"],"border-color-y":["border-color-bs","border-color-be","border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-ms","scroll-me","scroll-mr","scroll-ml"],"scroll-my":["scroll-mbs","scroll-mbe","scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-ps","scroll-pe","scroll-pr","scroll-pl"],"scroll-py":["scroll-pbs","scroll-pbe","scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},_B=eW(SW);function Gt(...e){return _B(ke(e))}const kR=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,LR=ke,md=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return LR(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:a}=t,o=Object.keys(i).map(u=>{const f=n==null?void 0:n[u],d=a==null?void 0:a[u];if(f===null)return null;const p=kR(f)||kR(d);return i[u][p]}),s=n&&Object.entries(n).reduce((u,f)=>{let[d,p]=f;return p===void 0||(u[d]=p),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,f)=>{let{class:d,className:p,...h}=f;return Object.entries(h).every(b=>{let[m,g]=b;return Array.isArray(g)?g.includes({...a,...s}[m]):{...a,...s}[m]===g})?[...u,d,p]:u},[]);return LR(e,o,l,n==null?void 0:n.class,n==null?void 0:n.className)},eA=md("inline-flex items-center gap-1 rounded border px-1.5 py-0.5 text-[10px] font-medium",{variants:{variant:{muted:"tint-muted",brand:"tint-brand",good:"tint-good",warn:"tint-warn",bad:"tint-bad",outline:"border-line bg-transparent text-muted-foreground"}},defaultVariants:{variant:"muted"}});function Dc({className:e,variant:t,...n}){return c.jsx("span",{className:Gt(eA({variant:t}),e),...n})}const OW=md("inline-flex shrink-0 items-center justify-center gap-1.5 whitespace-nowrap rounded border font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{outline:"border-line bg-transparent text-foreground hover:bg-panel-2",ghost:"border-transparent bg-transparent text-muted-foreground hover:bg-panel-2 hover:text-foreground",solid:"border-transparent bg-primary text-primary-foreground hover:opacity-90",brand:"tint-brand hover:brightness-125",good:"tint-good hover:brightness-125",warn:"tint-warn hover:brightness-125",bad:"tint-bad hover:brightness-125"},size:{xs:"px-2 py-0.5 text-[10px] uppercase tracking-wide",sm:"px-2.5 py-1 text-xs",md:"px-3 py-1.5 text-sm"}},defaultVariants:{variant:"outline",size:"sm"}}),Tt=x.forwardRef(function({className:t,variant:n,size:r,type:i="button",...a},o){return c.jsx("button",{ref:o,type:i,className:Gt(OW({variant:n,size:r}),t),...a})});var jW=Array.isArray,zr=jW,EW=typeof Km=="object"&&Km&&Km.Object===Object&&Km,NB=EW,TW=NB,AW=typeof self=="object"&&self&&self.Object===Object&&self,CW=TW||AW||Function("return this")(),Ma=CW,_W=Ma,NW=_W.Symbol,jm=NW,BR=jm,RB=Object.prototype,RW=RB.hasOwnProperty,MW=RB.toString,Yd=BR?BR.toStringTag:void 0;function PW(e){var t=RW.call(e,Yd),n=e[Yd];try{e[Yd]=void 0;var r=!0}catch{}var i=MW.call(e);return r&&(t?e[Yd]=n:delete e[Yd]),i}var $W=PW,DW=Object.prototype,IW=DW.toString;function kW(e){return IW.call(e)}var LW=kW,zR=jm,BW=$W,zW=LW,FW="[object Null]",UW="[object Undefined]",FR=zR?zR.toStringTag:void 0;function HW(e){return e==null?e===void 0?UW:FW:FR&&FR in Object(e)?BW(e):zW(e)}var Ro=HW;function qW(e){return e!=null&&typeof e=="object"}var Mo=qW,VW=Ro,GW=Mo,KW="[object Symbol]";function YW(e){return typeof e=="symbol"||GW(e)&&VW(e)==KW}var gd=YW,XW=zr,WW=gd,QW=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ZW=/^\w*$/;function JW(e,t){if(XW(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||WW(e)?!0:ZW.test(e)||!QW.test(e)||t!=null&&e in Object(t)}var tA=JW;function eQ(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Xs=eQ;const vd=vt(Xs);var tQ=Ro,nQ=Xs,rQ="[object AsyncFunction]",iQ="[object Function]",aQ="[object GeneratorFunction]",oQ="[object Proxy]";function sQ(e){if(!nQ(e))return!1;var t=tQ(e);return t==iQ||t==aQ||t==rQ||t==oQ}var nA=sQ;const Ce=vt(nA);var lQ=Ma,uQ=lQ["__core-js_shared__"],cQ=uQ,_w=cQ,UR=function(){var e=/[^.]+$/.exec(_w&&_w.keys&&_w.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function fQ(e){return!!UR&&UR in e}var dQ=fQ,pQ=Function.prototype,hQ=pQ.toString;function mQ(e){if(e!=null){try{return hQ.call(e)}catch{}try{return e+""}catch{}}return""}var MB=mQ,gQ=nA,vQ=dQ,yQ=Xs,bQ=MB,xQ=/[\\^$.*+?()[\]{}|]/g,wQ=/^\[object .+?Constructor\]$/,SQ=Function.prototype,OQ=Object.prototype,jQ=SQ.toString,EQ=OQ.hasOwnProperty,TQ=RegExp("^"+jQ.call(EQ).replace(xQ,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function AQ(e){if(!yQ(e)||vQ(e))return!1;var t=gQ(e)?TQ:wQ;return t.test(bQ(e))}var CQ=AQ;function _Q(e,t){return e==null?void 0:e[t]}var NQ=_Q,RQ=CQ,MQ=NQ;function PQ(e,t){var n=MQ(e,t);return RQ(n)?n:void 0}var Ru=PQ,$Q=Ru,DQ=$Q(Object,"create"),px=DQ,HR=px;function IQ(){this.__data__=HR?HR(null):{},this.size=0}var kQ=IQ;function LQ(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var BQ=LQ,zQ=px,FQ="__lodash_hash_undefined__",UQ=Object.prototype,HQ=UQ.hasOwnProperty;function qQ(e){var t=this.__data__;if(zQ){var n=t[e];return n===FQ?void 0:n}return HQ.call(t,e)?t[e]:void 0}var VQ=qQ,GQ=px,KQ=Object.prototype,YQ=KQ.hasOwnProperty;function XQ(e){var t=this.__data__;return GQ?t[e]!==void 0:YQ.call(t,e)}var WQ=XQ,QQ=px,ZQ="__lodash_hash_undefined__";function JQ(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=QQ&&t===void 0?ZQ:t,this}var eZ=JQ,tZ=kQ,nZ=BQ,rZ=VQ,iZ=WQ,aZ=eZ;function yd(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}yd.prototype.clear=tZ;yd.prototype.delete=nZ;yd.prototype.get=rZ;yd.prototype.has=iZ;yd.prototype.set=aZ;var oZ=yd;function sZ(){this.__data__=[],this.size=0}var lZ=sZ;function uZ(e,t){return e===t||e!==e&&t!==t}var rA=uZ,cZ=rA;function fZ(e,t){for(var n=e.length;n--;)if(cZ(e[n][0],t))return n;return-1}var hx=fZ,dZ=hx,pZ=Array.prototype,hZ=pZ.splice;function mZ(e){var t=this.__data__,n=dZ(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():hZ.call(t,n,1),--this.size,!0}var gZ=mZ,vZ=hx;function yZ(e){var t=this.__data__,n=vZ(t,e);return n<0?void 0:t[n][1]}var bZ=yZ,xZ=hx;function wZ(e){return xZ(this.__data__,e)>-1}var SZ=wZ,OZ=hx;function jZ(e,t){var n=this.__data__,r=OZ(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var EZ=jZ,TZ=lZ,AZ=gZ,CZ=bZ,_Z=SZ,NZ=EZ;function bd(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}bd.prototype.clear=TZ;bd.prototype.delete=AZ;bd.prototype.get=CZ;bd.prototype.has=_Z;bd.prototype.set=NZ;var mx=bd,RZ=Ru,MZ=Ma,PZ=RZ(MZ,"Map"),iA=PZ,qR=oZ,$Z=mx,DZ=iA;function IZ(){this.size=0,this.__data__={hash:new qR,map:new(DZ||$Z),string:new qR}}var kZ=IZ;function LZ(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var BZ=LZ,zZ=BZ;function FZ(e,t){var n=e.__data__;return zZ(t)?n[typeof t=="string"?"string":"hash"]:n.map}var gx=FZ,UZ=gx;function HZ(e){var t=UZ(this,e).delete(e);return this.size-=t?1:0,t}var qZ=HZ,VZ=gx;function GZ(e){return VZ(this,e).get(e)}var KZ=GZ,YZ=gx;function XZ(e){return YZ(this,e).has(e)}var WZ=XZ,QZ=gx;function ZZ(e,t){var n=QZ(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var JZ=ZZ,eJ=kZ,tJ=qZ,nJ=KZ,rJ=WZ,iJ=JZ;function xd(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}xd.prototype.clear=eJ;xd.prototype.delete=tJ;xd.prototype.get=nJ;xd.prototype.has=rJ;xd.prototype.set=iJ;var aA=xd,PB=aA,aJ="Expected a function";function oA(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(aJ);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(oA.Cache||PB),n}oA.Cache=PB;var $B=oA;const oJ=vt($B);var sJ=$B,lJ=500;function uJ(e){var t=sJ(e,function(r){return n.size===lJ&&n.clear(),r}),n=t.cache;return t}var cJ=uJ,fJ=cJ,dJ=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,pJ=/\\(\\)?/g,hJ=fJ(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(dJ,function(n,r,i,a){t.push(i?a.replace(pJ,"$1"):r||n)}),t}),mJ=hJ;function gJ(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var sA=gJ,VR=jm,vJ=sA,yJ=zr,bJ=gd,GR=VR?VR.prototype:void 0,KR=GR?GR.toString:void 0;function DB(e){if(typeof e=="string")return e;if(yJ(e))return vJ(e,DB)+"";if(bJ(e))return KR?KR.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var xJ=DB,wJ=xJ;function SJ(e){return e==null?"":wJ(e)}var IB=SJ,OJ=zr,jJ=tA,EJ=mJ,TJ=IB;function AJ(e,t){return OJ(e)?e:jJ(e,t)?[e]:EJ(TJ(e))}var kB=AJ,CJ=gd;function _J(e){if(typeof e=="string"||CJ(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var vx=_J,NJ=kB,RJ=vx;function MJ(e,t){t=NJ(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[RJ(t[n++])];return n&&n==r?e:void 0}var lA=MJ,PJ=lA;function $J(e,t,n){var r=e==null?void 0:PJ(e,t);return r===void 0?n:r}var LB=$J;const ti=vt(LB);function DJ(e){return e==null}var IJ=DJ;const Ue=vt(IJ);var kJ=Ro,LJ=zr,BJ=Mo,zJ="[object String]";function FJ(e){return typeof e=="string"||!LJ(e)&&BJ(e)&&kJ(e)==zJ}var UJ=FJ;const su=vt(UJ);var BB={exports:{}},wt={};/**
|
|
77
|
+
* @license React
|
|
78
|
+
* react-is.production.min.js
|
|
79
|
+
*
|
|
80
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
81
|
+
*
|
|
82
|
+
* This source code is licensed under the MIT license found in the
|
|
83
|
+
* LICENSE file in the root directory of this source tree.
|
|
84
|
+
*/var uA=Symbol.for("react.element"),cA=Symbol.for("react.portal"),yx=Symbol.for("react.fragment"),bx=Symbol.for("react.strict_mode"),xx=Symbol.for("react.profiler"),wx=Symbol.for("react.provider"),Sx=Symbol.for("react.context"),HJ=Symbol.for("react.server_context"),Ox=Symbol.for("react.forward_ref"),jx=Symbol.for("react.suspense"),Ex=Symbol.for("react.suspense_list"),Tx=Symbol.for("react.memo"),Ax=Symbol.for("react.lazy"),qJ=Symbol.for("react.offscreen"),zB;zB=Symbol.for("react.module.reference");function Ri(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case uA:switch(e=e.type,e){case yx:case xx:case bx:case jx:case Ex:return e;default:switch(e=e&&e.$$typeof,e){case HJ:case Sx:case Ox:case Ax:case Tx:case wx:return e;default:return t}}case cA:return t}}}wt.ContextConsumer=Sx;wt.ContextProvider=wx;wt.Element=uA;wt.ForwardRef=Ox;wt.Fragment=yx;wt.Lazy=Ax;wt.Memo=Tx;wt.Portal=cA;wt.Profiler=xx;wt.StrictMode=bx;wt.Suspense=jx;wt.SuspenseList=Ex;wt.isAsyncMode=function(){return!1};wt.isConcurrentMode=function(){return!1};wt.isContextConsumer=function(e){return Ri(e)===Sx};wt.isContextProvider=function(e){return Ri(e)===wx};wt.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===uA};wt.isForwardRef=function(e){return Ri(e)===Ox};wt.isFragment=function(e){return Ri(e)===yx};wt.isLazy=function(e){return Ri(e)===Ax};wt.isMemo=function(e){return Ri(e)===Tx};wt.isPortal=function(e){return Ri(e)===cA};wt.isProfiler=function(e){return Ri(e)===xx};wt.isStrictMode=function(e){return Ri(e)===bx};wt.isSuspense=function(e){return Ri(e)===jx};wt.isSuspenseList=function(e){return Ri(e)===Ex};wt.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===yx||e===xx||e===bx||e===jx||e===Ex||e===qJ||typeof e=="object"&&e!==null&&(e.$$typeof===Ax||e.$$typeof===Tx||e.$$typeof===wx||e.$$typeof===Sx||e.$$typeof===Ox||e.$$typeof===zB||e.getModuleId!==void 0)};wt.typeOf=Ri;BB.exports=wt;var VJ=BB.exports,GJ=Ro,KJ=Mo,YJ="[object Number]";function XJ(e){return typeof e=="number"||KJ(e)&&GJ(e)==YJ}var FB=XJ;const WJ=vt(FB);var QJ=FB;function ZJ(e){return QJ(e)&&e!=+e}var JJ=ZJ;const wd=vt(JJ);var Pn=function(t){return t===0?0:t>0?1:-1},El=function(t){return su(t)&&t.indexOf("%")===t.length-1},se=function(t){return WJ(t)&&!wd(t)},eee=function(t){return Ue(t)},Sn=function(t){return se(t)||su(t)},tee=0,Sd=function(t){var n=++tee;return"".concat(t||"").concat(n)},wr=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!se(t)&&!su(t))return r;var a;if(El(t)){var o=t.indexOf("%");a=n*parseFloat(t.slice(0,o))/100}else a=+t;return wd(a)&&(a=r),i&&a>n&&(a=n),a},es=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},nee=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},i=0;i<n;i++)if(!r[t[i]])r[t[i]]=!0;else return!0;return!1},Un=function(t,n){return se(t)&&se(n)?function(r){return t+r*(n-t)}:function(){return n}};function hy(e,t,n){return!e||!e.length?null:e.find(function(r){return r&&(typeof t=="function"?t(r):ti(r,t))===n})}var ree=function(t,n){return se(t)&&se(n)?t-n:su(t)&&su(n)?t.localeCompare(n):t instanceof Date&&n instanceof Date?t.getTime()-n.getTime():String(t).localeCompare(String(n))};function Ic(e,t){for(var n in e)if({}.hasOwnProperty.call(e,n)&&(!{}.hasOwnProperty.call(t,n)||e[n]!==t[n]))return!1;for(var r in t)if({}.hasOwnProperty.call(t,r)&&!{}.hasOwnProperty.call(e,r))return!1;return!0}function vO(e){"@babel/helpers - typeof";return vO=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vO(e)}var iee=["viewBox","children"],aee=["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"],YR=["points","pathLength"],Nw={svg:iee,polygon:YR,polyline:YR},fA=["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"],my=function(t,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var r=t;if(x.isValidElement(t)&&(r=t.props),!vd(r))return null;var i={};return Object.keys(r).forEach(function(a){fA.includes(a)&&(i[a]=n||function(o){return r[a](r,o)})}),i},oee=function(t,n,r){return function(i){return t(n,r,i),null}},yo=function(t,n,r){if(!vd(t)||vO(t)!=="object")return null;var i=null;return Object.keys(t).forEach(function(a){var o=t[a];fA.includes(a)&&typeof o=="function"&&(i||(i={}),i[a]=oee(o,n,r))}),i},see=["children"],lee=["children"];function XR(e,t){if(e==null)return{};var n=uee(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function uee(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function yO(e){"@babel/helpers - typeof";return yO=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yO(e)}var WR={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},io=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},QR=null,Rw=null,dA=function e(t){if(t===QR&&Array.isArray(Rw))return Rw;var n=[];return x.Children.forEach(t,function(r){Ue(r)||(VJ.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),Rw=n,QR=t,n};function ni(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(i){return io(i)}):r=[io(t)],dA(e).forEach(function(i){var a=ti(i,"type.displayName")||ti(i,"type.name");r.indexOf(a)!==-1&&n.push(i)}),n}function qr(e,t){var n=ni(e,t);return n&&n[0]}var ZR=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,i=n.height;return!(!se(r)||r<=0||!se(i)||i<=0)},cee=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],fee=function(t){return t&&t.type&&su(t.type)&&cee.indexOf(t.type)>=0},dee=function(t){return t&&yO(t)==="object"&&"clipDot"in t},pee=function(t,n,r,i){var a,o=(a=Nw==null?void 0:Nw[i])!==null&&a!==void 0?a:[];return n.startsWith("data-")||!Ce(t)&&(i&&o.includes(n)||aee.includes(n))||r&&fA.includes(n)},Ae=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(x.isValidElement(t)&&(i=t.props),!vd(i))return null;var a={};return Object.keys(i).forEach(function(o){var s;pee((s=i)===null||s===void 0?void 0:s[o],o,n,r)&&(a[o]=i[o])}),a},bO=function e(t,n){if(t===n)return!0;var r=x.Children.count(t);if(r!==x.Children.count(n))return!1;if(r===0)return!0;if(r===1)return JR(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var i=0;i<r;i++){var a=t[i],o=n[i];if(Array.isArray(a)||Array.isArray(o)){if(!e(a,o))return!1}else if(!JR(a,o))return!1}return!0},JR=function(t,n){if(Ue(t)&&Ue(n))return!0;if(!Ue(t)&&!Ue(n)){var r=t.props||{},i=r.children,a=XR(r,see),o=n.props||{},s=o.children,l=XR(o,lee);return i&&s?Ic(a,l)&&bO(i,s):!i&&!s?Ic(a,l):!1}return!1},eM=function(t,n){var r=[],i={};return dA(t).forEach(function(a,o){if(fee(a))r.push(a);else if(a){var s=io(a.type),l=n[s]||{},u=l.handler,f=l.once;if(u&&(!f||!i[s])){var d=u(a,s,o);r.push(d),i[s]=!0}}}),r},hee=function(t){var n=t&&t.type;return n&&WR[n]?WR[n]:null},mee=function(t,n){return dA(n).indexOf(t)},gee=["children","width","height","viewBox","className","style","title","desc"];function xO(){return xO=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xO.apply(this,arguments)}function vee(e,t){if(e==null)return{};var n=yee(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function yee(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function wO(e){var t=e.children,n=e.width,r=e.height,i=e.viewBox,a=e.className,o=e.style,s=e.title,l=e.desc,u=vee(e,gee),f=i||{width:n,height:r,x:0,y:0},d=ke("recharts-surface",a);return z.createElement("svg",xO({},Ae(u,!0,"svg"),{className:d,width:n,height:r,style:o,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height)}),z.createElement("title",null,s),z.createElement("desc",null,l),t)}var bee=["children","className"];function SO(){return SO=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},SO.apply(this,arguments)}function xee(e,t){if(e==null)return{};var n=wee(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function wee(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Ye=z.forwardRef(function(e,t){var n=e.children,r=e.className,i=xee(e,bee),a=ke("recharts-layer",r);return z.createElement("g",SO({className:a},Ae(i,!0),{ref:t}),n)}),Hi=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),a=2;a<r;a++)i[a-2]=arguments[a]};function See(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++r<i;)a[r]=e[r+t];return a}var Oee=See,jee=Oee;function Eee(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:jee(e,t,n)}var Tee=Eee,Aee="\\ud800-\\udfff",Cee="\\u0300-\\u036f",_ee="\\ufe20-\\ufe2f",Nee="\\u20d0-\\u20ff",Ree=Cee+_ee+Nee,Mee="\\ufe0e\\ufe0f",Pee="\\u200d",$ee=RegExp("["+Pee+Aee+Ree+Mee+"]");function Dee(e){return $ee.test(e)}var UB=Dee;function Iee(e){return e.split("")}var kee=Iee,HB="\\ud800-\\udfff",Lee="\\u0300-\\u036f",Bee="\\ufe20-\\ufe2f",zee="\\u20d0-\\u20ff",Fee=Lee+Bee+zee,Uee="\\ufe0e\\ufe0f",Hee="["+HB+"]",OO="["+Fee+"]",jO="\\ud83c[\\udffb-\\udfff]",qee="(?:"+OO+"|"+jO+")",qB="[^"+HB+"]",VB="(?:\\ud83c[\\udde6-\\uddff]){2}",GB="[\\ud800-\\udbff][\\udc00-\\udfff]",Vee="\\u200d",KB=qee+"?",YB="["+Uee+"]?",Gee="(?:"+Vee+"(?:"+[qB,VB,GB].join("|")+")"+YB+KB+")*",Kee=YB+KB+Gee,Yee="(?:"+[qB+OO+"?",OO,VB,GB,Hee].join("|")+")",Xee=RegExp(jO+"(?="+jO+")|"+Yee+Kee,"g");function Wee(e){return e.match(Xee)||[]}var Qee=Wee,Zee=kee,Jee=UB,ete=Qee;function tte(e){return Jee(e)?ete(e):Zee(e)}var nte=tte,rte=Tee,ite=UB,ate=nte,ote=IB;function ste(e){return function(t){t=ote(t);var n=ite(t)?ate(t):void 0,r=n?n[0]:t.charAt(0),i=n?rte(n,1).join(""):t.slice(1);return r[e]()+i}}var lte=ste,ute=lte,cte=ute("toUpperCase"),fte=cte;const Cx=vt(fte);function $t(e){return function(){return e}}const XB=Math.cos,gy=Math.sin,Wi=Math.sqrt,vy=Math.PI,_x=2*vy,EO=Math.PI,TO=2*EO,yl=1e-6,dte=TO-yl;function WB(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function pte(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return WB;const n=10**t;return function(r){this._+=r[0];for(let i=1,a=r.length;i<a;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}class hte{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?WB:pte(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,i){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,n,r,i,a,o){this._append`C${+t},${+n},${+r},${+i},${this._x1=+a},${this._y1=+o}`}arcTo(t,n,r,i,a){if(t=+t,n=+n,r=+r,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,s=this._y1,l=r-t,u=i-n,f=o-t,d=s-n,p=f*f+d*d;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(p>yl)if(!(Math.abs(d*l-u*f)>yl)||!a)this._append`L${this._x1=t},${this._y1=n}`;else{let h=r-o,b=i-s,m=l*l+u*u,g=h*h+b*b,y=Math.sqrt(m),v=Math.sqrt(p),w=a*Math.tan((EO-Math.acos((m+p-g)/(2*y*v)))/2),S=w/v,O=w/y;Math.abs(S-1)>yl&&this._append`L${t+S*f},${n+S*d}`,this._append`A${a},${a},0,0,${+(d*h>f*b)},${this._x1=t+O*l},${this._y1=n+O*u}`}}arc(t,n,r,i,a,o){if(t=+t,n=+n,r=+r,o=!!o,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(i),l=r*Math.sin(i),u=t+s,f=n+l,d=1^o,p=o?i-a:a-i;this._x1===null?this._append`M${u},${f}`:(Math.abs(this._x1-u)>yl||Math.abs(this._y1-f)>yl)&&this._append`L${u},${f}`,r&&(p<0&&(p=p%TO+TO),p>dte?this._append`A${r},${r},0,1,${d},${t-s},${n-l}A${r},${r},0,1,${d},${this._x1=u},${this._y1=f}`:p>yl&&this._append`A${r},${r},0,${+(p>=EO)},${d},${this._x1=t+r*Math.cos(a)},${this._y1=n+r*Math.sin(a)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function pA(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new hte(t)}function hA(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function QB(e){this._context=e}QB.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);break}}};function Nx(e){return new QB(e)}function ZB(e){return e[0]}function JB(e){return e[1]}function ez(e,t){var n=$t(!0),r=null,i=Nx,a=null,o=pA(s);e=typeof e=="function"?e:e===void 0?ZB:$t(e),t=typeof t=="function"?t:t===void 0?JB:$t(t);function s(l){var u,f=(l=hA(l)).length,d,p=!1,h;for(r==null&&(a=i(h=o())),u=0;u<=f;++u)!(u<f&&n(d=l[u],u,l))===p&&((p=!p)?a.lineStart():a.lineEnd()),p&&a.point(+e(d,u,l),+t(d,u,l));if(h)return a=null,h+""||null}return s.x=function(l){return arguments.length?(e=typeof l=="function"?l:$t(+l),s):e},s.y=function(l){return arguments.length?(t=typeof l=="function"?l:$t(+l),s):t},s.defined=function(l){return arguments.length?(n=typeof l=="function"?l:$t(!!l),s):n},s.curve=function(l){return arguments.length?(i=l,r!=null&&(a=i(r)),s):i},s.context=function(l){return arguments.length?(l==null?r=a=null:a=i(r=l),s):r},s}function gg(e,t,n){var r=null,i=$t(!0),a=null,o=Nx,s=null,l=pA(u);e=typeof e=="function"?e:e===void 0?ZB:$t(+e),t=typeof t=="function"?t:$t(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?JB:$t(+n);function u(d){var p,h,b,m=(d=hA(d)).length,g,y=!1,v,w=new Array(m),S=new Array(m);for(a==null&&(s=o(v=l())),p=0;p<=m;++p){if(!(p<m&&i(g=d[p],p,d))===y)if(y=!y)h=p,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),b=p-1;b>=h;--b)s.point(w[b],S[b]);s.lineEnd(),s.areaEnd()}y&&(w[p]=+e(g,p,d),S[p]=+t(g,p,d),s.point(r?+r(g,p,d):w[p],n?+n(g,p,d):S[p]))}if(v)return s=null,v+""||null}function f(){return ez().defined(i).curve(o).context(a)}return u.x=function(d){return arguments.length?(e=typeof d=="function"?d:$t(+d),r=null,u):e},u.x0=function(d){return arguments.length?(e=typeof d=="function"?d:$t(+d),u):e},u.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:$t(+d),u):r},u.y=function(d){return arguments.length?(t=typeof d=="function"?d:$t(+d),n=null,u):t},u.y0=function(d){return arguments.length?(t=typeof d=="function"?d:$t(+d),u):t},u.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:$t(+d),u):n},u.lineX0=u.lineY0=function(){return f().x(e).y(t)},u.lineY1=function(){return f().x(e).y(n)},u.lineX1=function(){return f().x(r).y(t)},u.defined=function(d){return arguments.length?(i=typeof d=="function"?d:$t(!!d),u):i},u.curve=function(d){return arguments.length?(o=d,a!=null&&(s=o(a)),u):o},u.context=function(d){return arguments.length?(d==null?a=s=null:s=o(a=d),u):a},u}class tz{constructor(t,n){this._context=t,this._x=n}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(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function mte(e){return new tz(e,!0)}function gte(e){return new tz(e,!1)}const mA={draw(e,t){const n=Wi(t/vy);e.moveTo(n,0),e.arc(0,0,n,0,_x)}},vte={draw(e,t){const n=Wi(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},nz=Wi(1/3),yte=nz*2,bte={draw(e,t){const n=Wi(t/yte),r=n*nz;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},xte={draw(e,t){const n=Wi(t),r=-n/2;e.rect(r,r,n,n)}},wte=.8908130915292852,rz=gy(vy/10)/gy(7*vy/10),Ste=gy(_x/10)*rz,Ote=-XB(_x/10)*rz,jte={draw(e,t){const n=Wi(t*wte),r=Ste*n,i=Ote*n;e.moveTo(0,-n),e.lineTo(r,i);for(let a=1;a<5;++a){const o=_x*a/5,s=XB(o),l=gy(o);e.lineTo(l*n,-s*n),e.lineTo(s*r-l*i,l*r+s*i)}e.closePath()}},Mw=Wi(3),Ete={draw(e,t){const n=-Wi(t/(Mw*3));e.moveTo(0,n*2),e.lineTo(-Mw*n,-n),e.lineTo(Mw*n,-n),e.closePath()}},ci=-.5,fi=Wi(3)/2,AO=1/Wi(12),Tte=(AO/2+1)*3,Ate={draw(e,t){const n=Wi(t/Tte),r=n/2,i=n*AO,a=r,o=n*AO+n,s=-a,l=o;e.moveTo(r,i),e.lineTo(a,o),e.lineTo(s,l),e.lineTo(ci*r-fi*i,fi*r+ci*i),e.lineTo(ci*a-fi*o,fi*a+ci*o),e.lineTo(ci*s-fi*l,fi*s+ci*l),e.lineTo(ci*r+fi*i,ci*i-fi*r),e.lineTo(ci*a+fi*o,ci*o-fi*a),e.lineTo(ci*s+fi*l,ci*l-fi*s),e.closePath()}};function Cte(e,t){let n=null,r=pA(i);e=typeof e=="function"?e:$t(e||mA),t=typeof t=="function"?t:$t(t===void 0?64:+t);function i(){let a;if(n||(n=a=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),a)return n=null,a+""||null}return i.type=function(a){return arguments.length?(e=typeof a=="function"?a:$t(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:$t(+a),i):t},i.context=function(a){return arguments.length?(n=a??null,i):n},i}function yy(){}function by(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 iz(e){this._context=e}iz.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:by(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(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:by(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function _te(e){return new iz(e)}function az(e){this._context=e}az.prototype={areaStart:yy,areaEnd:yy,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);break}}},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:by(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Nte(e){return new az(e)}function oz(e){this._context=e}oz.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:by(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Rte(e){return new oz(e)}function sz(e){this._context=e}sz.prototype={areaStart:yy,areaEnd:yy,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 Mte(e){return new sz(e)}function tM(e){return e<0?-1:1}function nM(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(tM(a)+tM(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function rM(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Pw(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 xy(e){this._context=e}xy.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:Pw(this,this._t0,rM(this,this._t0));break}(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,Pw(this,rM(this,n=nM(this,e,t)),n);break;default:Pw(this,this._t0,n=nM(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function lz(e){this._context=new uz(e)}(lz.prototype=Object.create(xy.prototype)).point=function(e,t){xy.prototype.point.call(this,t,e)};function uz(e){this._context=e}uz.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 Pte(e){return new xy(e)}function $te(e){return new lz(e)}function cz(e){this._context=e}cz.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=iM(e),i=iM(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 iM(e){var t,n=e.length-1,r,i=new Array(n),a=new Array(n),o=new 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 Dte(e){return new cz(e)}function Rx(e,t){this._context=e,this._t=t}Rx.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)}break}}this._x=e,this._y=t}};function Ite(e){return new Rx(e,.5)}function kte(e){return new Rx(e,0)}function Lte(e){return new Rx(e,1)}function jf(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 CO(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function Bte(e,t){return e[t]}function zte(e){const t=[];return t.key=e,t}function Fte(){var e=$t([]),t=CO,n=jf,r=Bte;function i(a){var o=Array.from(e.apply(this,arguments),zte),s,l=o.length,u=-1,f;for(const d of a)for(s=0,++u;s<l;++s)(o[s][u]=[0,+r(d,o[s].key,u,a)]).data=d;for(s=0,f=hA(t(o));s<l;++s)o[f[s]].index=s;return n(o,f),o}return i.keys=function(a){return arguments.length?(e=typeof a=="function"?a:$t(Array.from(a)),i):e},i.value=function(a){return arguments.length?(r=typeof a=="function"?a:$t(+a),i):r},i.order=function(a){return arguments.length?(t=a==null?CO:typeof a=="function"?a:$t(Array.from(a)),i):t},i.offset=function(a){return arguments.length?(n=a??jf,i):n},i}function Ute(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}jf(e,t)}}function Hte(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}jf(e,t)}}function qte(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,l=0,u=0;s<o;++s){for(var f=e[t[s]],d=f[r][1]||0,p=f[r-1][1]||0,h=(d-p)/2,b=0;b<s;++b){var m=e[t[b]],g=m[r][1]||0,y=m[r-1][1]||0;h+=g-y}l+=d,u+=h*d}i[r-1][1]+=i[r-1][0]=n,l&&(n-=u/l)}i[r-1][1]+=i[r-1][0]=n,jf(e,t)}}function mh(e){"@babel/helpers - typeof";return mh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mh(e)}var Vte=["type","size","sizeType"];function _O(){return _O=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_O.apply(this,arguments)}function aM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function oM(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?aM(Object(n),!0).forEach(function(r){Gte(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Gte(e,t,n){return t=Kte(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Kte(e){var t=Yte(e,"string");return mh(t)=="symbol"?t:t+""}function Yte(e,t){if(mh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(mh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Xte(e,t){if(e==null)return{};var n=Wte(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Wte(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var fz={symbolCircle:mA,symbolCross:vte,symbolDiamond:bte,symbolSquare:xte,symbolStar:jte,symbolTriangle:Ete,symbolWye:Ate},Qte=Math.PI/180,Zte=function(t){var n="symbol".concat(Cx(t));return fz[n]||mA},Jte=function(t,n,r){if(n==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var i=18*Qte;return 1.25*t*t*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},ene=function(t,n){fz["symbol".concat(Cx(t))]=n},gA=function(t){var n=t.type,r=n===void 0?"circle":n,i=t.size,a=i===void 0?64:i,o=t.sizeType,s=o===void 0?"area":o,l=Xte(t,Vte),u=oM(oM({},l),{},{type:r,size:a,sizeType:s}),f=function(){var g=Zte(r),y=Cte().type(g).size(Jte(a,s,r));return y()},d=u.className,p=u.cx,h=u.cy,b=Ae(u,!0);return p===+p&&h===+h&&a===+a?z.createElement("path",_O({},b,{className:ke("recharts-symbols",d),transform:"translate(".concat(p,", ").concat(h,")"),d:f()})):null};gA.registerSymbol=ene;function Ef(e){"@babel/helpers - typeof";return Ef=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ef(e)}function NO(){return NO=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},NO.apply(this,arguments)}function sM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function tne(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?sM(Object(n),!0).forEach(function(r){gh(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function nne(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rne(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,pz(r.key),r)}}function ine(e,t,n){return t&&rne(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function ane(e,t,n){return t=wy(t),one(e,dz()?Reflect.construct(t,n||[],wy(e).constructor):t.apply(e,n))}function one(e,t){if(t&&(Ef(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return sne(e)}function sne(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function dz(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(dz=function(){return!!e})()}function wy(e){return wy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},wy(e)}function lne(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&RO(e,t)}function RO(e,t){return RO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},RO(e,t)}function gh(e,t,n){return t=pz(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pz(e){var t=une(e,"string");return Ef(t)=="symbol"?t:t+""}function une(e,t){if(Ef(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ef(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var di=32,vA=function(e){function t(){return nne(this,t),ane(this,t,arguments)}return lne(t,e),ine(t,[{key:"renderIcon",value:function(r){var i=this.props.inactiveColor,a=di/2,o=di/6,s=di/3,l=r.inactive?i:r.color;if(r.type==="plainline")return z.createElement("line",{strokeWidth:4,fill:"none",stroke:l,strokeDasharray:r.payload.strokeDasharray,x1:0,y1:a,x2:di,y2:a,className:"recharts-legend-icon"});if(r.type==="line")return z.createElement("path",{strokeWidth:4,fill:"none",stroke:l,d:"M0,".concat(a,"h").concat(s,`
|
|
85
|
+
A`).concat(o,",").concat(o,",0,1,1,").concat(2*s,",").concat(a,`
|
|
86
|
+
H`).concat(di,"M").concat(2*s,",").concat(a,`
|
|
87
|
+
A`).concat(o,",").concat(o,",0,1,1,").concat(s,",").concat(a),className:"recharts-legend-icon"});if(r.type==="rect")return z.createElement("path",{stroke:"none",fill:l,d:"M0,".concat(di/8,"h").concat(di,"v").concat(di*3/4,"h").concat(-di,"z"),className:"recharts-legend-icon"});if(z.isValidElement(r.legendIcon)){var u=tne({},r);return delete u.legendIcon,z.cloneElement(r.legendIcon,u)}return z.createElement(gA,{fill:l,cx:a,cy:a,size:di,sizeType:"diameter",type:r.type})}},{key:"renderItems",value:function(){var r=this,i=this.props,a=i.payload,o=i.iconSize,s=i.layout,l=i.formatter,u=i.inactiveColor,f={x:0,y:0,width:di,height:di},d={display:s==="horizontal"?"inline-block":"block",marginRight:10},p={display:"inline-block",verticalAlign:"middle",marginRight:4};return a.map(function(h,b){var m=h.formatter||l,g=ke(gh(gh({"recharts-legend-item":!0},"legend-item-".concat(b),!0),"inactive",h.inactive));if(h.type==="none")return null;var y=Ce(h.value)?null:h.value;Hi(!Ce(h.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: <Bar name="Name of my Data"/>`);var v=h.inactive?u:h.color;return z.createElement("li",NO({className:g,style:d,key:"legend-item-".concat(b)},yo(r.props,h,b)),z.createElement(wO,{width:o,height:o,viewBox:f,style:p},r.renderIcon(h)),z.createElement("span",{className:"recharts-legend-item-text",style:{color:v}},m?m(y,h,b):y))})}},{key:"render",value:function(){var r=this.props,i=r.payload,a=r.layout,o=r.align;if(!i||!i.length)return null;var s={padding:0,margin:0,textAlign:a==="horizontal"?o:"left"};return z.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}])}(x.PureComponent);gh(vA,"displayName","Legend");gh(vA,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var cne=mx;function fne(){this.__data__=new cne,this.size=0}var dne=fne;function pne(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var hne=pne;function mne(e){return this.__data__.get(e)}var gne=mne;function vne(e){return this.__data__.has(e)}var yne=vne,bne=mx,xne=iA,wne=aA,Sne=200;function One(e,t){var n=this.__data__;if(n instanceof bne){var r=n.__data__;if(!xne||r.length<Sne-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new wne(r)}return n.set(e,t),this.size=n.size,this}var jne=One,Ene=mx,Tne=dne,Ane=hne,Cne=gne,_ne=yne,Nne=jne;function Od(e){var t=this.__data__=new Ene(e);this.size=t.size}Od.prototype.clear=Tne;Od.prototype.delete=Ane;Od.prototype.get=Cne;Od.prototype.has=_ne;Od.prototype.set=Nne;var hz=Od,Rne="__lodash_hash_undefined__";function Mne(e){return this.__data__.set(e,Rne),this}var Pne=Mne;function $ne(e){return this.__data__.has(e)}var Dne=$ne,Ine=aA,kne=Pne,Lne=Dne;function Sy(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Ine;++t<n;)this.add(e[t])}Sy.prototype.add=Sy.prototype.push=kne;Sy.prototype.has=Lne;var mz=Sy;function Bne(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var gz=Bne;function zne(e,t){return e.has(t)}var vz=zne,Fne=mz,Une=gz,Hne=vz,qne=1,Vne=2;function Gne(e,t,n,r,i,a){var o=n&qne,s=e.length,l=t.length;if(s!=l&&!(o&&l>s))return!1;var u=a.get(e),f=a.get(t);if(u&&f)return u==t&&f==e;var d=-1,p=!0,h=n&Vne?new Fne:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var b=e[d],m=t[d];if(r)var g=o?r(m,b,d,t,e,a):r(b,m,d,e,t,a);if(g!==void 0){if(g)continue;p=!1;break}if(h){if(!Une(t,function(y,v){if(!Hne(h,v)&&(b===y||i(b,y,n,r,a)))return h.push(v)})){p=!1;break}}else if(!(b===m||i(b,m,n,r,a))){p=!1;break}}return a.delete(e),a.delete(t),p}var yz=Gne,Kne=Ma,Yne=Kne.Uint8Array,Xne=Yne;function Wne(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}var Qne=Wne;function Zne(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var yA=Zne,lM=jm,uM=Xne,Jne=rA,ere=yz,tre=Qne,nre=yA,rre=1,ire=2,are="[object Boolean]",ore="[object Date]",sre="[object Error]",lre="[object Map]",ure="[object Number]",cre="[object RegExp]",fre="[object Set]",dre="[object String]",pre="[object Symbol]",hre="[object ArrayBuffer]",mre="[object DataView]",cM=lM?lM.prototype:void 0,$w=cM?cM.valueOf:void 0;function gre(e,t,n,r,i,a,o){switch(n){case mre:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case hre:return!(e.byteLength!=t.byteLength||!a(new uM(e),new uM(t)));case are:case ore:case ure:return Jne(+e,+t);case sre:return e.name==t.name&&e.message==t.message;case cre:case dre:return e==t+"";case lre:var s=tre;case fre:var l=r&rre;if(s||(s=nre),e.size!=t.size&&!l)return!1;var u=o.get(e);if(u)return u==t;r|=ire,o.set(e,t);var f=ere(s(e),s(t),r,i,a,o);return o.delete(e),f;case pre:if($w)return $w.call(e)==$w.call(t)}return!1}var vre=gre;function yre(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var bz=yre,bre=bz,xre=zr;function wre(e,t,n){var r=t(e);return xre(e)?r:bre(r,n(e))}var Sre=wre;function Ore(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}var jre=Ore;function Ere(){return[]}var Tre=Ere,Are=jre,Cre=Tre,_re=Object.prototype,Nre=_re.propertyIsEnumerable,fM=Object.getOwnPropertySymbols,Rre=fM?function(e){return e==null?[]:(e=Object(e),Are(fM(e),function(t){return Nre.call(e,t)}))}:Cre,Mre=Rre;function Pre(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var $re=Pre,Dre=Ro,Ire=Mo,kre="[object Arguments]";function Lre(e){return Ire(e)&&Dre(e)==kre}var Bre=Lre,dM=Bre,zre=Mo,xz=Object.prototype,Fre=xz.hasOwnProperty,Ure=xz.propertyIsEnumerable,Hre=dM(function(){return arguments}())?dM:function(e){return zre(e)&&Fre.call(e,"callee")&&!Ure.call(e,"callee")},bA=Hre,Oy={exports:{}};function qre(){return!1}var Vre=qre;Oy.exports;(function(e,t){var n=Ma,r=Vre,i=t&&!t.nodeType&&t,a=i&&!0&&e&&!e.nodeType&&e,o=a&&a.exports===i,s=o?n.Buffer:void 0,l=s?s.isBuffer:void 0,u=l||r;e.exports=u})(Oy,Oy.exports);var wz=Oy.exports,Gre=9007199254740991,Kre=/^(?:0|[1-9]\d*)$/;function Yre(e,t){var n=typeof e;return t=t??Gre,!!t&&(n=="number"||n!="symbol"&&Kre.test(e))&&e>-1&&e%1==0&&e<t}var xA=Yre,Xre=9007199254740991;function Wre(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Xre}var wA=Wre,Qre=Ro,Zre=wA,Jre=Mo,eie="[object Arguments]",tie="[object Array]",nie="[object Boolean]",rie="[object Date]",iie="[object Error]",aie="[object Function]",oie="[object Map]",sie="[object Number]",lie="[object Object]",uie="[object RegExp]",cie="[object Set]",fie="[object String]",die="[object WeakMap]",pie="[object ArrayBuffer]",hie="[object DataView]",mie="[object Float32Array]",gie="[object Float64Array]",vie="[object Int8Array]",yie="[object Int16Array]",bie="[object Int32Array]",xie="[object Uint8Array]",wie="[object Uint8ClampedArray]",Sie="[object Uint16Array]",Oie="[object Uint32Array]",Lt={};Lt[mie]=Lt[gie]=Lt[vie]=Lt[yie]=Lt[bie]=Lt[xie]=Lt[wie]=Lt[Sie]=Lt[Oie]=!0;Lt[eie]=Lt[tie]=Lt[pie]=Lt[nie]=Lt[hie]=Lt[rie]=Lt[iie]=Lt[aie]=Lt[oie]=Lt[sie]=Lt[lie]=Lt[uie]=Lt[cie]=Lt[fie]=Lt[die]=!1;function jie(e){return Jre(e)&&Zre(e.length)&&!!Lt[Qre(e)]}var Eie=jie;function Tie(e){return function(t){return e(t)}}var Sz=Tie,jy={exports:{}};jy.exports;(function(e,t){var n=NB,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===r,o=a&&n.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||o&&o.binding&&o.binding("util")}catch{}}();e.exports=s})(jy,jy.exports);var Aie=jy.exports,Cie=Eie,_ie=Sz,pM=Aie,hM=pM&&pM.isTypedArray,Nie=hM?_ie(hM):Cie,Oz=Nie,Rie=$re,Mie=bA,Pie=zr,$ie=wz,Die=xA,Iie=Oz,kie=Object.prototype,Lie=kie.hasOwnProperty;function Bie(e,t){var n=Pie(e),r=!n&&Mie(e),i=!n&&!r&&$ie(e),a=!n&&!r&&!i&&Iie(e),o=n||r||i||a,s=o?Rie(e.length,String):[],l=s.length;for(var u in e)(t||Lie.call(e,u))&&!(o&&(u=="length"||i&&(u=="offset"||u=="parent")||a&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Die(u,l)))&&s.push(u);return s}var zie=Bie,Fie=Object.prototype;function Uie(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Fie;return e===n}var Hie=Uie;function qie(e,t){return function(n){return e(t(n))}}var jz=qie,Vie=jz,Gie=Vie(Object.keys,Object),Kie=Gie,Yie=Hie,Xie=Kie,Wie=Object.prototype,Qie=Wie.hasOwnProperty;function Zie(e){if(!Yie(e))return Xie(e);var t=[];for(var n in Object(e))Qie.call(e,n)&&n!="constructor"&&t.push(n);return t}var Jie=Zie,eae=nA,tae=wA;function nae(e){return e!=null&&tae(e.length)&&!eae(e)}var Em=nae,rae=zie,iae=Jie,aae=Em;function oae(e){return aae(e)?rae(e):iae(e)}var Mx=oae,sae=Sre,lae=Mre,uae=Mx;function cae(e){return sae(e,uae,lae)}var fae=cae,mM=fae,dae=1,pae=Object.prototype,hae=pae.hasOwnProperty;function mae(e,t,n,r,i,a){var o=n&dae,s=mM(e),l=s.length,u=mM(t),f=u.length;if(l!=f&&!o)return!1;for(var d=l;d--;){var p=s[d];if(!(o?p in t:hae.call(t,p)))return!1}var h=a.get(e),b=a.get(t);if(h&&b)return h==t&&b==e;var m=!0;a.set(e,t),a.set(t,e);for(var g=o;++d<l;){p=s[d];var y=e[p],v=t[p];if(r)var w=o?r(v,y,p,t,e,a):r(y,v,p,e,t,a);if(!(w===void 0?y===v||i(y,v,n,r,a):w)){m=!1;break}g||(g=p=="constructor")}if(m&&!g){var S=e.constructor,O=t.constructor;S!=O&&"constructor"in e&&"constructor"in t&&!(typeof S=="function"&&S instanceof S&&typeof O=="function"&&O instanceof O)&&(m=!1)}return a.delete(e),a.delete(t),m}var gae=mae,vae=Ru,yae=Ma,bae=vae(yae,"DataView"),xae=bae,wae=Ru,Sae=Ma,Oae=wae(Sae,"Promise"),jae=Oae,Eae=Ru,Tae=Ma,Aae=Eae(Tae,"Set"),Ez=Aae,Cae=Ru,_ae=Ma,Nae=Cae(_ae,"WeakMap"),Rae=Nae,MO=xae,PO=iA,$O=jae,DO=Ez,IO=Rae,Tz=Ro,jd=MB,gM="[object Map]",Mae="[object Object]",vM="[object Promise]",yM="[object Set]",bM="[object WeakMap]",xM="[object DataView]",Pae=jd(MO),$ae=jd(PO),Dae=jd($O),Iae=jd(DO),kae=jd(IO),bl=Tz;(MO&&bl(new MO(new ArrayBuffer(1)))!=xM||PO&&bl(new PO)!=gM||$O&&bl($O.resolve())!=vM||DO&&bl(new DO)!=yM||IO&&bl(new IO)!=bM)&&(bl=function(e){var t=Tz(e),n=t==Mae?e.constructor:void 0,r=n?jd(n):"";if(r)switch(r){case Pae:return xM;case $ae:return gM;case Dae:return vM;case Iae:return yM;case kae:return bM}return t});var Lae=bl,Dw=hz,Bae=yz,zae=vre,Fae=gae,wM=Lae,SM=zr,OM=wz,Uae=Oz,Hae=1,jM="[object Arguments]",EM="[object Array]",vg="[object Object]",qae=Object.prototype,TM=qae.hasOwnProperty;function Vae(e,t,n,r,i,a){var o=SM(e),s=SM(t),l=o?EM:wM(e),u=s?EM:wM(t);l=l==jM?vg:l,u=u==jM?vg:u;var f=l==vg,d=u==vg,p=l==u;if(p&&OM(e)){if(!OM(t))return!1;o=!0,f=!1}if(p&&!f)return a||(a=new Dw),o||Uae(e)?Bae(e,t,n,r,i,a):zae(e,t,l,n,r,i,a);if(!(n&Hae)){var h=f&&TM.call(e,"__wrapped__"),b=d&&TM.call(t,"__wrapped__");if(h||b){var m=h?e.value():e,g=b?t.value():t;return a||(a=new Dw),i(m,g,n,r,a)}}return p?(a||(a=new Dw),Fae(e,t,n,r,i,a)):!1}var Gae=Vae,Kae=Gae,AM=Mo;function Az(e,t,n,r,i){return e===t?!0:e==null||t==null||!AM(e)&&!AM(t)?e!==e&&t!==t:Kae(e,t,n,r,Az,i)}var SA=Az,Yae=hz,Xae=SA,Wae=1,Qae=2;function Zae(e,t,n,r){var i=n.length,a=i,o=!r;if(e==null)return!a;for(e=Object(e);i--;){var s=n[i];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<a;){s=n[i];var l=s[0],u=e[l],f=s[1];if(o&&s[2]){if(u===void 0&&!(l in e))return!1}else{var d=new Yae;if(r)var p=r(u,f,l,e,t,d);if(!(p===void 0?Xae(f,u,Wae|Qae,r,d):p))return!1}}return!0}var Jae=Zae,eoe=Xs;function toe(e){return e===e&&!eoe(e)}var Cz=toe,noe=Cz,roe=Mx;function ioe(e){for(var t=roe(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,noe(i)]}return t}var aoe=ioe;function ooe(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}var _z=ooe,soe=Jae,loe=aoe,uoe=_z;function coe(e){var t=loe(e);return t.length==1&&t[0][2]?uoe(t[0][0],t[0][1]):function(n){return n===e||soe(n,e,t)}}var foe=coe;function doe(e,t){return e!=null&&t in Object(e)}var poe=doe,hoe=kB,moe=bA,goe=zr,voe=xA,yoe=wA,boe=vx;function xoe(e,t,n){t=hoe(t,e);for(var r=-1,i=t.length,a=!1;++r<i;){var o=boe(t[r]);if(!(a=e!=null&&n(e,o)))break;e=e[o]}return a||++r!=i?a:(i=e==null?0:e.length,!!i&&yoe(i)&&voe(o,i)&&(goe(e)||moe(e)))}var woe=xoe,Soe=poe,Ooe=woe;function joe(e,t){return e!=null&&Ooe(e,t,Soe)}var Eoe=joe,Toe=SA,Aoe=LB,Coe=Eoe,_oe=tA,Noe=Cz,Roe=_z,Moe=vx,Poe=1,$oe=2;function Doe(e,t){return _oe(e)&&Noe(t)?Roe(Moe(e),t):function(n){var r=Aoe(n,e);return r===void 0&&r===t?Coe(n,e):Toe(t,r,Poe|$oe)}}var Ioe=Doe;function koe(e){return e}var Ed=koe;function Loe(e){return function(t){return t==null?void 0:t[e]}}var Boe=Loe,zoe=lA;function Foe(e){return function(t){return zoe(t,e)}}var Uoe=Foe,Hoe=Boe,qoe=Uoe,Voe=tA,Goe=vx;function Koe(e){return Voe(e)?Hoe(Goe(e)):qoe(e)}var Yoe=Koe,Xoe=foe,Woe=Ioe,Qoe=Ed,Zoe=zr,Joe=Yoe;function ese(e){return typeof e=="function"?e:e==null?Qoe:typeof e=="object"?Zoe(e)?Woe(e[0],e[1]):Xoe(e):Joe(e)}var Pa=ese;function tse(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}var Nz=tse;function nse(e){return e!==e}var rse=nse;function ise(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}var ase=ise,ose=Nz,sse=rse,lse=ase;function use(e,t,n){return t===t?lse(e,t,n):ose(e,sse,n)}var cse=use,fse=cse;function dse(e,t){var n=e==null?0:e.length;return!!n&&fse(e,t,0)>-1}var pse=dse;function hse(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}var mse=hse;function gse(){}var vse=gse,Iw=Ez,yse=vse,bse=yA,xse=1/0,wse=Iw&&1/bse(new Iw([,-0]))[1]==xse?function(e){return new Iw(e)}:yse,Sse=wse,Ose=mz,jse=pse,Ese=mse,Tse=vz,Ase=Sse,Cse=yA,_se=200;function Nse(e,t,n){var r=-1,i=jse,a=e.length,o=!0,s=[],l=s;if(n)o=!1,i=Ese;else if(a>=_se){var u=t?null:Ase(e);if(u)return Cse(u);o=!1,i=Tse,l=new Ose}else l=t?[]:s;e:for(;++r<a;){var f=e[r],d=t?t(f):f;if(f=n||f!==0?f:0,o&&d===d){for(var p=l.length;p--;)if(l[p]===d)continue e;t&&l.push(d),s.push(f)}else i(l,d,n)||(l!==s&&l.push(d),s.push(f))}return s}var Rse=Nse,Mse=Pa,Pse=Rse;function $se(e,t){return e&&e.length?Pse(e,Mse(t)):[]}var Dse=$se;const CM=vt(Dse);function Rz(e,t,n){return t===!0?CM(e,n):Ce(t)?CM(e,t):e}function Tf(e){"@babel/helpers - typeof";return Tf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tf(e)}var Ise=["ref"];function _M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function za(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_M(Object(n),!0).forEach(function(r){Px(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_M(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function kse(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function NM(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Pz(r.key),r)}}function Lse(e,t,n){return t&&NM(e.prototype,t),n&&NM(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Bse(e,t,n){return t=Ey(t),zse(e,Mz()?Reflect.construct(t,n||[],Ey(e).constructor):t.apply(e,n))}function zse(e,t){if(t&&(Tf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Fse(e)}function Fse(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Mz(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Mz=function(){return!!e})()}function Ey(e){return Ey=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ey(e)}function Use(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&kO(e,t)}function kO(e,t){return kO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},kO(e,t)}function Px(e,t,n){return t=Pz(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pz(e){var t=Hse(e,"string");return Tf(t)=="symbol"?t:t+""}function Hse(e,t){if(Tf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Tf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function qse(e,t){if(e==null)return{};var n=Vse(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Vse(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Gse(e){return e.value}function Kse(e,t){if(z.isValidElement(e))return z.cloneElement(e,t);if(typeof e=="function")return z.createElement(e,t);t.ref;var n=qse(t,Ise);return z.createElement(vA,n)}var RM=1,Gl=function(e){function t(){var n;kse(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=Bse(this,t,[].concat(i)),Px(n,"lastBoundingBox",{width:-1,height:-1}),n}return Use(t,e),Lse(t,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();return r.height=this.wrapperNode.offsetHeight,r.width=this.wrapperNode.offsetWidth,r}return null}},{key:"updateBBox",value:function(){var r=this.props.onBBoxUpdate,i=this.getBBox();i?(Math.abs(i.width-this.lastBoundingBox.width)>RM||Math.abs(i.height-this.lastBoundingBox.height)>RM)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,r&&r(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?za({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var i=this.props,a=i.layout,o=i.align,s=i.verticalAlign,l=i.margin,u=i.chartWidth,f=i.chartHeight,d,p;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(o==="center"&&a==="vertical"){var h=this.getBBoxSnapshot();d={left:((u||0)-h.width)/2}}else d=o==="right"?{right:l&&l.right||0}:{left:l&&l.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(s==="middle"){var b=this.getBBoxSnapshot();p={top:((f||0)-b.height)/2}}else p=s==="bottom"?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return za(za({},d),p)}},{key:"render",value:function(){var r=this,i=this.props,a=i.content,o=i.width,s=i.height,l=i.wrapperStyle,u=i.payloadUniqBy,f=i.payload,d=za(za({position:"absolute",width:o||"auto",height:s||"auto"},this.getDefaultPosition(l)),l);return z.createElement("div",{className:"recharts-legend-wrapper",style:d,ref:function(h){r.wrapperNode=h}},Kse(a,za(za({},this.props),{},{payload:Rz(f,u,Gse)})))}}],[{key:"getWithHeight",value:function(r,i){var a=za(za({},this.defaultProps),r.props),o=a.layout;return o==="vertical"&&se(r.props.height)?{height:r.props.height}:o==="horizontal"?{width:r.props.width||i}:null}}])}(x.PureComponent);Px(Gl,"displayName","Legend");Px(Gl,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var MM=jm,Yse=bA,Xse=zr,PM=MM?MM.isConcatSpreadable:void 0;function Wse(e){return Xse(e)||Yse(e)||!!(PM&&e&&e[PM])}var Qse=Wse,Zse=bz,Jse=Qse;function $z(e,t,n,r,i){var a=-1,o=e.length;for(n||(n=Jse),i||(i=[]);++a<o;){var s=e[a];t>0&&n(s)?t>1?$z(s,t-1,n,r,i):Zse(i,s):r||(i[i.length]=s)}return i}var Dz=$z;function ele(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var l=o[e?s:++i];if(n(a[l],l,a)===!1)break}return t}}var tle=ele,nle=tle,rle=nle(),ile=rle,ale=ile,ole=Mx;function sle(e,t){return e&&ale(e,t,ole)}var Iz=sle,lle=Em;function ule(e,t){return function(n,r){if(n==null)return n;if(!lle(n))return e(n,r);for(var i=n.length,a=t?i:-1,o=Object(n);(t?a--:++a<i)&&r(o[a],a,o)!==!1;);return n}}var cle=ule,fle=Iz,dle=cle,ple=dle(fle),OA=ple,hle=OA,mle=Em;function gle(e,t){var n=-1,r=mle(e)?Array(e.length):[];return hle(e,function(i,a,o){r[++n]=t(i,a,o)}),r}var kz=gle;function vle(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}var yle=vle,$M=gd;function ble(e,t){if(e!==t){var n=e!==void 0,r=e===null,i=e===e,a=$M(e),o=t!==void 0,s=t===null,l=t===t,u=$M(t);if(!s&&!u&&!a&&e>t||a&&o&&l&&!s&&!u||r&&o&&l||!n&&l||!i)return 1;if(!r&&!a&&!u&&e<t||u&&n&&i&&!r&&!a||s&&n&&i||!o&&i||!l)return-1}return 0}var xle=ble,wle=xle;function Sle(e,t,n){for(var r=-1,i=e.criteria,a=t.criteria,o=i.length,s=n.length;++r<o;){var l=wle(i[r],a[r]);if(l){if(r>=s)return l;var u=n[r];return l*(u=="desc"?-1:1)}}return e.index-t.index}var Ole=Sle,kw=sA,jle=lA,Ele=Pa,Tle=kz,Ale=yle,Cle=Sz,_le=Ole,Nle=Ed,Rle=zr;function Mle(e,t,n){t.length?t=kw(t,function(a){return Rle(a)?function(o){return jle(o,a.length===1?a[0]:a)}:a}):t=[Nle];var r=-1;t=kw(t,Cle(Ele));var i=Tle(e,function(a,o,s){var l=kw(t,function(u){return u(a)});return{criteria:l,index:++r,value:a}});return Ale(i,function(a,o){return _le(a,o,n)})}var Ple=Mle;function $le(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var Dle=$le,Ile=Dle,DM=Math.max;function kle(e,t,n){return t=DM(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=DM(r.length-t,0),o=Array(a);++i<a;)o[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(o),Ile(e,this,s)}}var Lle=kle;function Ble(e){return function(){return e}}var zle=Ble,Fle=Ru,Ule=function(){try{var e=Fle(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Lz=Ule,Hle=zle,IM=Lz,qle=Ed,Vle=IM?function(e,t){return IM(e,"toString",{configurable:!0,enumerable:!1,value:Hle(t),writable:!0})}:qle,Gle=Vle,Kle=800,Yle=16,Xle=Date.now;function Wle(e){var t=0,n=0;return function(){var r=Xle(),i=Yle-(r-n);if(n=r,i>0){if(++t>=Kle)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Qle=Wle,Zle=Gle,Jle=Qle,eue=Jle(Zle),tue=eue,nue=Ed,rue=Lle,iue=tue;function aue(e,t){return iue(rue(e,t,nue),e+"")}var oue=aue,sue=rA,lue=Em,uue=xA,cue=Xs;function fue(e,t,n){if(!cue(n))return!1;var r=typeof t;return(r=="number"?lue(n)&&uue(t,n.length):r=="string"&&t in n)?sue(n[t],e):!1}var $x=fue,due=Dz,pue=Ple,hue=oue,kM=$x,mue=hue(function(e,t){if(e==null)return[];var n=t.length;return n>1&&kM(e,t[0],t[1])?t=[]:n>2&&kM(t[0],t[1],t[2])&&(t=[t[0]]),pue(e,due(t,1),[])}),gue=mue;const jA=vt(gue);function vh(e){"@babel/helpers - typeof";return vh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vh(e)}function LO(){return LO=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},LO.apply(this,arguments)}function vue(e,t){return wue(e)||xue(e,t)||bue(e,t)||yue()}function yue(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
88
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bue(e,t){if(e){if(typeof e=="string")return LM(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return LM(e,t)}}function LM(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function xue(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function wue(e){if(Array.isArray(e))return e}function BM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Lw(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?BM(Object(n),!0).forEach(function(r){Sue(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):BM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Sue(e,t,n){return t=Oue(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Oue(e){var t=jue(e,"string");return vh(t)=="symbol"?t:t+""}function jue(e,t){if(vh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(vh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Eue(e){return Array.isArray(e)&&Sn(e[0])&&Sn(e[1])?e.join(" ~ "):e}var Tue=function(t){var n=t.separator,r=n===void 0?" : ":n,i=t.contentStyle,a=i===void 0?{}:i,o=t.itemStyle,s=o===void 0?{}:o,l=t.labelStyle,u=l===void 0?{}:l,f=t.payload,d=t.formatter,p=t.itemSorter,h=t.wrapperClassName,b=t.labelClassName,m=t.label,g=t.labelFormatter,y=t.accessibilityLayer,v=y===void 0?!1:y,w=function(){if(f&&f.length){var N={padding:0,margin:0},D=(p?jA(f,p):f).map(function(R,$){if(R.type==="none")return null;var P=Lw({display:"block",paddingTop:4,paddingBottom:4,color:R.color||"#000"},s),B=R.formatter||d||Eue,L=R.value,k=R.name,I=L,V=k;if(B&&I!=null&&V!=null){var M=B(L,k,R,$,f);if(Array.isArray(M)){var q=vue(M,2);I=q[0],V=q[1]}else I=M}return z.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat($),style:P},Sn(V)?z.createElement("span",{className:"recharts-tooltip-item-name"},V):null,Sn(V)?z.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,z.createElement("span",{className:"recharts-tooltip-item-value"},I),z.createElement("span",{className:"recharts-tooltip-item-unit"},R.unit||""))});return z.createElement("ul",{className:"recharts-tooltip-item-list",style:N},D)}return null},S=Lw({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},a),O=Lw({margin:0},u),j=!Ue(m),E=j?m:"",T=ke("recharts-default-tooltip",h),A=ke("recharts-tooltip-label",b);j&&g&&f!==void 0&&f!==null&&(E=g(m,f));var C=v?{role:"status","aria-live":"assertive"}:{};return z.createElement("div",LO({className:T,style:S},C),z.createElement("p",{className:A,style:O},z.isValidElement(E)?E:"".concat(E)),w())};function yh(e){"@babel/helpers - typeof";return yh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yh(e)}function yg(e,t,n){return t=Aue(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Aue(e){var t=Cue(e,"string");return yh(t)=="symbol"?t:t+""}function Cue(e,t){if(yh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(yh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Xd="recharts-tooltip-wrapper",_ue={visibility:"hidden"};function Nue(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return ke(Xd,yg(yg(yg(yg({},"".concat(Xd,"-right"),se(n)&&t&&se(t.x)&&n>=t.x),"".concat(Xd,"-left"),se(n)&&t&&se(t.x)&&n<t.x),"".concat(Xd,"-bottom"),se(r)&&t&&se(t.y)&&r>=t.y),"".concat(Xd,"-top"),se(r)&&t&&se(t.y)&&r<t.y))}function zM(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,i=e.offsetTopLeft,a=e.position,o=e.reverseDirection,s=e.tooltipDimension,l=e.viewBox,u=e.viewBoxDimension;if(a&&se(a[r]))return a[r];var f=n[r]-s-i,d=n[r]+i;if(t[r])return o[r]?f:d;if(o[r]){var p=f,h=l[r];return p<h?Math.max(d,l[r]):Math.max(f,l[r])}var b=d+s,m=l[r]+u;return b>m?Math.max(f,l[r]):Math.max(d,l[r])}function Rue(e){var t=e.translateX,n=e.translateY,r=e.useTranslate3d;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function Mue(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,i=e.position,a=e.reverseDirection,o=e.tooltipBox,s=e.useTranslate3d,l=e.viewBox,u,f,d;return o.height>0&&o.width>0&&n?(f=zM({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:a,tooltipDimension:o.width,viewBox:l,viewBoxDimension:l.width}),d=zM({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:a,tooltipDimension:o.height,viewBox:l,viewBoxDimension:l.height}),u=Rue({translateX:f,translateY:d,useTranslate3d:s})):u=_ue,{cssProperties:u,cssClasses:Nue({translateX:f,translateY:d,coordinate:n})}}function Af(e){"@babel/helpers - typeof";return Af=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Af(e)}function FM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function UM(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?FM(Object(n),!0).forEach(function(r){zO(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Pue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $ue(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,zz(r.key),r)}}function Due(e,t,n){return t&&$ue(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Iue(e,t,n){return t=Ty(t),kue(e,Bz()?Reflect.construct(t,n||[],Ty(e).constructor):t.apply(e,n))}function kue(e,t){if(t&&(Af(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Lue(e)}function Lue(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Bz(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Bz=function(){return!!e})()}function Ty(e){return Ty=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ty(e)}function Bue(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&BO(e,t)}function BO(e,t){return BO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},BO(e,t)}function zO(e,t,n){return t=zz(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zz(e){var t=zue(e,"string");return Af(t)=="symbol"?t:t+""}function zue(e,t){if(Af(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Af(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var HM=1,Fue=function(e){function t(){var n;Pue(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=Iue(this,t,[].concat(i)),zO(n,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),zO(n,"handleKeyDown",function(o){if(o.key==="Escape"){var s,l,u,f;n.setState({dismissed:!0,dismissedAtCoordinate:{x:(s=(l=n.props.coordinate)===null||l===void 0?void 0:l.x)!==null&&s!==void 0?s:0,y:(u=(f=n.props.coordinate)===null||f===void 0?void 0:f.y)!==null&&u!==void 0?u:0}})}}),n}return Bue(t,e),Due(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();(Math.abs(r.width-this.state.lastBoundingBox.width)>HM||Math.abs(r.height-this.state.lastBoundingBox.height)>HM)&&this.setState({lastBoundingBox:{width:r.width,height:r.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var r,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,i=this.props,a=i.active,o=i.allowEscapeViewBox,s=i.animationDuration,l=i.animationEasing,u=i.children,f=i.coordinate,d=i.hasPayload,p=i.isAnimationActive,h=i.offset,b=i.position,m=i.reverseDirection,g=i.useTranslate3d,y=i.viewBox,v=i.wrapperStyle,w=Mue({allowEscapeViewBox:o,coordinate:f,offsetTopLeft:h,position:b,reverseDirection:m,tooltipBox:this.state.lastBoundingBox,useTranslate3d:g,viewBox:y}),S=w.cssClasses,O=w.cssProperties,j=UM(UM({transition:p&&a?"transform ".concat(s,"ms ").concat(l):void 0},O),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&d?"visible":"hidden",position:"absolute",top:0,left:0},v);return z.createElement("div",{tabIndex:-1,className:S,style:j,ref:function(T){r.wrapperNode=T}},u)}}])}(x.PureComponent),Uue=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Ws={isSsr:Uue()};function Cf(e){"@babel/helpers - typeof";return Cf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cf(e)}function qM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function VM(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qM(Object(n),!0).forEach(function(r){EA(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Hue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function que(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Uz(r.key),r)}}function Vue(e,t,n){return t&&que(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Gue(e,t,n){return t=Ay(t),Kue(e,Fz()?Reflect.construct(t,n||[],Ay(e).constructor):t.apply(e,n))}function Kue(e,t){if(t&&(Cf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Yue(e)}function Yue(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Fz(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Fz=function(){return!!e})()}function Ay(e){return Ay=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ay(e)}function Xue(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&FO(e,t)}function FO(e,t){return FO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},FO(e,t)}function EA(e,t,n){return t=Uz(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Uz(e){var t=Wue(e,"string");return Cf(t)=="symbol"?t:t+""}function Wue(e,t){if(Cf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Cf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Que(e){return e.dataKey}function Zue(e,t){return z.isValidElement(e)?z.cloneElement(e,t):typeof e=="function"?z.createElement(e,t):z.createElement(Tue,t)}var ra=function(e){function t(){return Hue(this,t),Gue(this,t,arguments)}return Xue(t,e),Vue(t,[{key:"render",value:function(){var r=this,i=this.props,a=i.active,o=i.allowEscapeViewBox,s=i.animationDuration,l=i.animationEasing,u=i.content,f=i.coordinate,d=i.filterNull,p=i.isAnimationActive,h=i.offset,b=i.payload,m=i.payloadUniqBy,g=i.position,y=i.reverseDirection,v=i.useTranslate3d,w=i.viewBox,S=i.wrapperStyle,O=b??[];d&&O.length&&(O=Rz(b.filter(function(E){return E.value!=null&&(E.hide!==!0||r.props.includeHidden)}),m,Que));var j=O.length>0;return z.createElement(Fue,{allowEscapeViewBox:o,animationDuration:s,animationEasing:l,isAnimationActive:p,active:a,coordinate:f,hasPayload:j,offset:h,position:g,reverseDirection:y,useTranslate3d:v,viewBox:w,wrapperStyle:S},Zue(u,VM(VM({},this.props),{},{payload:O})))}}])}(x.PureComponent);EA(ra,"displayName","Tooltip");EA(ra,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Ws.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var Jue=Ma,ece=function(){return Jue.Date.now()},tce=ece,nce=/\s/;function rce(e){for(var t=e.length;t--&&nce.test(e.charAt(t)););return t}var ice=rce,ace=ice,oce=/^\s+/;function sce(e){return e&&e.slice(0,ace(e)+1).replace(oce,"")}var lce=sce,uce=lce,GM=Xs,cce=gd,KM=NaN,fce=/^[-+]0x[0-9a-f]+$/i,dce=/^0b[01]+$/i,pce=/^0o[0-7]+$/i,hce=parseInt;function mce(e){if(typeof e=="number")return e;if(cce(e))return KM;if(GM(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=GM(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=uce(e);var n=dce.test(e);return n||pce.test(e)?hce(e.slice(2),n?2:8):fce.test(e)?KM:+e}var Hz=mce,gce=Xs,Bw=tce,YM=Hz,vce="Expected a function",yce=Math.max,bce=Math.min;function xce(e,t,n){var r,i,a,o,s,l,u=0,f=!1,d=!1,p=!0;if(typeof e!="function")throw new TypeError(vce);t=YM(t)||0,gce(n)&&(f=!!n.leading,d="maxWait"in n,a=d?yce(YM(n.maxWait)||0,t):a,p="trailing"in n?!!n.trailing:p);function h(j){var E=r,T=i;return r=i=void 0,u=j,o=e.apply(T,E),o}function b(j){return u=j,s=setTimeout(y,t),f?h(j):o}function m(j){var E=j-l,T=j-u,A=t-E;return d?bce(A,a-T):A}function g(j){var E=j-l,T=j-u;return l===void 0||E>=t||E<0||d&&T>=a}function y(){var j=Bw();if(g(j))return v(j);s=setTimeout(y,m(j))}function v(j){return s=void 0,p&&r?h(j):(r=i=void 0,o)}function w(){s!==void 0&&clearTimeout(s),u=0,r=l=i=s=void 0}function S(){return s===void 0?o:v(Bw())}function O(){var j=Bw(),E=g(j);if(r=arguments,i=this,l=j,E){if(s===void 0)return b(l);if(d)return clearTimeout(s),s=setTimeout(y,t),h(l)}return s===void 0&&(s=setTimeout(y,t)),o}return O.cancel=w,O.flush=S,O}var wce=xce,Sce=wce,Oce=Xs,jce="Expected a function";function Ece(e,t,n){var r=!0,i=!0;if(typeof e!="function")throw new TypeError(jce);return Oce(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Sce(e,t,{leading:r,maxWait:t,trailing:i})}var Tce=Ece;const qz=vt(Tce);function bh(e){"@babel/helpers - typeof";return bh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bh(e)}function XM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function bg(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?XM(Object(n),!0).forEach(function(r){Ace(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ace(e,t,n){return t=Cce(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Cce(e){var t=_ce(e,"string");return bh(t)=="symbol"?t:t+""}function _ce(e,t){if(bh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(bh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Nce(e,t){return $ce(e)||Pce(e,t)||Mce(e,t)||Rce()}function Rce(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
89
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Mce(e,t){if(e){if(typeof e=="string")return WM(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return WM(e,t)}}function WM(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Pce(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function $ce(e){if(Array.isArray(e))return e}var Dce=x.forwardRef(function(e,t){var n=e.aspect,r=e.initialDimension,i=r===void 0?{width:-1,height:-1}:r,a=e.width,o=a===void 0?"100%":a,s=e.height,l=s===void 0?"100%":s,u=e.minWidth,f=u===void 0?0:u,d=e.minHeight,p=e.maxHeight,h=e.children,b=e.debounce,m=b===void 0?0:b,g=e.id,y=e.className,v=e.onResize,w=e.style,S=w===void 0?{}:w,O=x.useRef(null),j=x.useRef();j.current=v,x.useImperativeHandle(t,function(){return Object.defineProperty(O.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),O.current},configurable:!0})});var E=x.useState({containerWidth:i.width,containerHeight:i.height}),T=Nce(E,2),A=T[0],C=T[1],_=x.useCallback(function(D,R){C(function($){var P=Math.round(D),B=Math.round(R);return $.containerWidth===P&&$.containerHeight===B?$:{containerWidth:P,containerHeight:B}})},[]);x.useEffect(function(){var D=function(k){var I,V=k[0].contentRect,M=V.width,q=V.height;_(M,q),(I=j.current)===null||I===void 0||I.call(j,M,q)};m>0&&(D=qz(D,m,{trailing:!0,leading:!1}));var R=new ResizeObserver(D),$=O.current.getBoundingClientRect(),P=$.width,B=$.height;return _(P,B),R.observe(O.current),function(){R.disconnect()}},[_,m]);var N=x.useMemo(function(){var D=A.containerWidth,R=A.containerHeight;if(D<0||R<0)return null;Hi(El(o)||El(l),`The width(%s) and height(%s) are both fixed numbers,
|
|
90
|
+
maybe you don't need to use a ResponsiveContainer.`,o,l),Hi(!n||n>0,"The aspect(%s) must be greater than zero.",n);var $=El(o)?D:o,P=El(l)?R:l;n&&n>0&&($?P=$/n:P&&($=P*n),p&&P>p&&(P=p)),Hi($>0||P>0,`The width(%s) and height(%s) of chart should be greater than 0,
|
|
91
|
+
please check the style of container, or the props width(%s) and height(%s),
|
|
92
|
+
or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
|
|
93
|
+
height and width.`,$,P,o,l,f,d,n);var B=!Array.isArray(h)&&io(h.type).endsWith("Chart");return z.Children.map(h,function(L){return z.isValidElement(L)?x.cloneElement(L,bg({width:$,height:P},B?{style:bg({height:"100%",width:"100%",maxHeight:P,maxWidth:$},L.props.style)}:{})):L})},[n,h,l,p,d,f,A,o]);return z.createElement("div",{id:g?"".concat(g):void 0,className:ke("recharts-responsive-container",y),style:bg(bg({},S),{},{width:o,height:l,minWidth:f,minHeight:d,maxHeight:p}),ref:O},N)}),Td=function(t){return null};Td.displayName="Cell";function xh(e){"@babel/helpers - typeof";return xh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xh(e)}function QM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function UO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?QM(Object(n),!0).forEach(function(r){Ice(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ice(e,t,n){return t=kce(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kce(e){var t=Lce(e,"string");return xh(t)=="symbol"?t:t+""}function Lce(e,t){if(xh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(xh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var qu={widthCache:{},cacheCount:0},Bce=2e3,zce={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},ZM="recharts_measurement_span";function Fce(e){var t=UO({},e);return Object.keys(t).forEach(function(n){t[n]||delete t[n]}),t}var Lp=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Ws.isSsr)return{width:0,height:0};var r=Fce(n),i=JSON.stringify({text:t,copyStyle:r});if(qu.widthCache[i])return qu.widthCache[i];try{var a=document.getElementById(ZM);a||(a=document.createElement("span"),a.setAttribute("id",ZM),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var o=UO(UO({},zce),r);Object.assign(a.style,o),a.textContent="".concat(t);var s=a.getBoundingClientRect(),l={width:s.width,height:s.height};return qu.widthCache[i]=l,++qu.cacheCount>Bce&&(qu.cacheCount=0,qu.widthCache={}),l}catch{return{width:0,height:0}}},Uce=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function wh(e){"@babel/helpers - typeof";return wh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wh(e)}function Cy(e,t){return Gce(e)||Vce(e,t)||qce(e,t)||Hce()}function Hce(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
94
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qce(e,t){if(e){if(typeof e=="string")return JM(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return JM(e,t)}}function JM(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Vce(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function Gce(e){if(Array.isArray(e))return e}function Kce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function eP(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Xce(r.key),r)}}function Yce(e,t,n){return t&&eP(e.prototype,t),n&&eP(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Xce(e){var t=Wce(e,"string");return wh(t)=="symbol"?t:t+""}function Wce(e,t){if(wh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(wh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var tP=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,nP=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Qce=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,Zce=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,Vz={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},Jce=Object.keys(Vz),yc="NaN";function efe(e,t){return e*Vz[t]}var xg=function(){function e(t,n){Kce(this,e),this.num=t,this.unit=n,this.num=t,this.unit=n,Number.isNaN(t)&&(this.unit=""),n!==""&&!Qce.test(n)&&(this.num=NaN,this.unit=""),Jce.includes(n)&&(this.num=efe(t,n),this.unit="px")}return Yce(e,[{key:"add",value:function(n){return this.unit!==n.unit?new e(NaN,""):new e(this.num+n.num,this.unit)}},{key:"subtract",value:function(n){return this.unit!==n.unit?new e(NaN,""):new e(this.num-n.num,this.unit)}},{key:"multiply",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new e(NaN,""):new e(this.num*n.num,this.unit||n.unit)}},{key:"divide",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new e(NaN,""):new e(this.num/n.num,this.unit||n.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}],[{key:"parse",value:function(n){var r,i=(r=Zce.exec(n))!==null&&r!==void 0?r:[],a=Cy(i,3),o=a[1],s=a[2];return new e(parseFloat(o),s??"")}}])}();function Gz(e){if(e.includes(yc))return yc;for(var t=e;t.includes("*")||t.includes("/");){var n,r=(n=tP.exec(t))!==null&&n!==void 0?n:[],i=Cy(r,4),a=i[1],o=i[2],s=i[3],l=xg.parse(a??""),u=xg.parse(s??""),f=o==="*"?l.multiply(u):l.divide(u);if(f.isNaN())return yc;t=t.replace(tP,f.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var d,p=(d=nP.exec(t))!==null&&d!==void 0?d:[],h=Cy(p,4),b=h[1],m=h[2],g=h[3],y=xg.parse(b??""),v=xg.parse(g??""),w=m==="+"?y.add(v):y.subtract(v);if(w.isNaN())return yc;t=t.replace(nP,w.toString())}return t}var rP=/\(([^()]*)\)/;function tfe(e){for(var t=e;t.includes("(");){var n=rP.exec(t),r=Cy(n,2),i=r[1];t=t.replace(rP,Gz(i))}return t}function nfe(e){var t=e.replace(/\s+/g,"");return t=tfe(t),t=Gz(t),t}function rfe(e){try{return nfe(e)}catch{return yc}}function zw(e){var t=rfe(e.slice(5,-1));return t===yc?"":t}var ife=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],afe=["dx","dy","angle","className","breakAll"];function HO(){return HO=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},HO.apply(this,arguments)}function iP(e,t){if(e==null)return{};var n=ofe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ofe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function aP(e,t){return cfe(e)||ufe(e,t)||lfe(e,t)||sfe()}function sfe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
95
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lfe(e,t){if(e){if(typeof e=="string")return oP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return oP(e,t)}}function oP(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ufe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function cfe(e){if(Array.isArray(e))return e}var Kz=/[ \f\n\r\t\v\u2028\u2029]+/,Yz=function(t){var n=t.children,r=t.breakAll,i=t.style;try{var a=[];Ue(n)||(r?a=n.toString().split(""):a=n.toString().split(Kz));var o=a.map(function(l){return{word:l,width:Lp(l,i).width}}),s=r?0:Lp(" ",i).width;return{wordsWithComputedWidth:o,spaceWidth:s}}catch{return null}},ffe=function(t,n,r,i,a){var o=t.maxLines,s=t.children,l=t.style,u=t.breakAll,f=se(o),d=s,p=function(){var $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return $.reduce(function(P,B){var L=B.word,k=B.width,I=P[P.length-1];if(I&&(i==null||a||I.width+k+r<Number(i)))I.words.push(L),I.width+=k+r;else{var V={words:[L],width:k};P.push(V)}return P},[])},h=p(n),b=function($){return $.reduce(function(P,B){return P.width>B.width?P:B})};if(!f)return h;for(var m="…",g=function($){var P=d.slice(0,$),B=Yz({breakAll:u,style:l,children:P+m}).wordsWithComputedWidth,L=p(B),k=L.length>o||b(L).width>Number(i);return[k,L]},y=0,v=d.length-1,w=0,S;y<=v&&w<=d.length-1;){var O=Math.floor((y+v)/2),j=O-1,E=g(j),T=aP(E,2),A=T[0],C=T[1],_=g(O),N=aP(_,1),D=N[0];if(!A&&!D&&(y=O+1),A&&D&&(v=O-1),!A&&D){S=C;break}w++}return S||h},sP=function(t){var n=Ue(t)?[]:t.toString().split(Kz);return[{words:n}]},dfe=function(t){var n=t.width,r=t.scaleToFit,i=t.children,a=t.style,o=t.breakAll,s=t.maxLines;if((n||r)&&!Ws.isSsr){var l,u,f=Yz({breakAll:o,children:i,style:a});if(f){var d=f.wordsWithComputedWidth,p=f.spaceWidth;l=d,u=p}else return sP(i);return ffe({breakAll:o,children:i,maxLines:s,style:a},l,u,n,r)}return sP(i)},lP="#808080",lu=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,a=i===void 0?0:i,o=t.lineHeight,s=o===void 0?"1em":o,l=t.capHeight,u=l===void 0?"0.71em":l,f=t.scaleToFit,d=f===void 0?!1:f,p=t.textAnchor,h=p===void 0?"start":p,b=t.verticalAnchor,m=b===void 0?"end":b,g=t.fill,y=g===void 0?lP:g,v=iP(t,ife),w=x.useMemo(function(){return dfe({breakAll:v.breakAll,children:v.children,maxLines:v.maxLines,scaleToFit:d,style:v.style,width:v.width})},[v.breakAll,v.children,v.maxLines,d,v.style,v.width]),S=v.dx,O=v.dy,j=v.angle,E=v.className,T=v.breakAll,A=iP(v,afe);if(!Sn(r)||!Sn(a))return null;var C=r+(se(S)?S:0),_=a+(se(O)?O:0),N;switch(m){case"start":N=zw("calc(".concat(u,")"));break;case"middle":N=zw("calc(".concat((w.length-1)/2," * -").concat(s," + (").concat(u," / 2))"));break;default:N=zw("calc(".concat(w.length-1," * -").concat(s,")"));break}var D=[];if(d){var R=w[0].width,$=v.width;D.push("scale(".concat((se($)?$/R:1)/R,")"))}return j&&D.push("rotate(".concat(j,", ").concat(C,", ").concat(_,")")),D.length&&(A.transform=D.join(" ")),z.createElement("text",HO({},Ae(A,!0),{x:C,y:_,className:ke("recharts-text",E),textAnchor:h,fill:y.includes("url")?lP:y}),w.map(function(P,B){var L=P.words.join(T?"":" ");return z.createElement("tspan",{x:C,dy:B===0?N:s,key:"".concat(L,"-").concat(B)},L)}))};function Ns(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function pfe(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function TA(e){let t,n,r;e.length!==2?(t=Ns,n=(s,l)=>Ns(e(s),l),r=(s,l)=>e(s)-l):(t=e===Ns||e===pfe?e:hfe,n=e,r=e);function i(s,l,u=0,f=s.length){if(u<f){if(t(l,l)!==0)return f;do{const d=u+f>>>1;n(s[d],l)<0?u=d+1:f=d}while(u<f)}return u}function a(s,l,u=0,f=s.length){if(u<f){if(t(l,l)!==0)return f;do{const d=u+f>>>1;n(s[d],l)<=0?u=d+1:f=d}while(u<f)}return u}function o(s,l,u=0,f=s.length){const d=i(s,l,u,f-1);return d>u&&r(s[d-1],l)>-r(s[d],l)?d-1:d}return{left:i,center:o,right:a}}function hfe(){return 0}function Xz(e){return e===null?NaN:+e}function*mfe(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const gfe=TA(Ns),Tm=gfe.right;TA(Xz).center;class uP extends Map{constructor(t,n=bfe){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(cP(this,t))}has(t){return super.has(cP(this,t))}set(t,n){return super.set(vfe(this,t),n)}delete(t){return super.delete(yfe(this,t))}}function cP({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function vfe({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function yfe({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function bfe(e){return e!==null&&typeof e=="object"?e.valueOf():e}function xfe(e=Ns){if(e===Ns)return Wz;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function Wz(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const wfe=Math.sqrt(50),Sfe=Math.sqrt(10),Ofe=Math.sqrt(2);function _y(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/Math.pow(10,i),o=a>=wfe?10:a>=Sfe?5:a>=Ofe?2:1;let s,l,u;return i<0?(u=Math.pow(10,-i)/o,s=Math.round(e*u),l=Math.round(t*u),s/u<e&&++s,l/u>t&&--l,u=-u):(u=Math.pow(10,i)*o,s=Math.round(e/u),l=Math.round(t/u),s*u<e&&++s,l*u>t&&--l),l<s&&.5<=n&&n<2?_y(e,t,n*2):[s,l,u]}function qO(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i,a,o]=r?_y(t,e,n):_y(e,t,n);if(!(a>=i))return[];const s=a-i+1,l=new Array(s);if(r)if(o<0)for(let u=0;u<s;++u)l[u]=(a-u)/-o;else for(let u=0;u<s;++u)l[u]=(a-u)*o;else if(o<0)for(let u=0;u<s;++u)l[u]=(i+u)/-o;else for(let u=0;u<s;++u)l[u]=(i+u)*o;return l}function VO(e,t,n){return t=+t,e=+e,n=+n,_y(e,t,n)[2]}function GO(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?VO(t,e,n):VO(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function fP(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function dP(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function Qz(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?Wz:xfe(i);r>n;){if(r-n>600){const l=r-n+1,u=t-n+1,f=Math.log(l),d=.5*Math.exp(2*f/3),p=.5*Math.sqrt(f*d*(l-d)/l)*(u-l/2<0?-1:1),h=Math.max(n,Math.floor(t-u*d/l+p)),b=Math.min(r,Math.floor(t+(l-u)*d/l+p));Qz(e,t,h,b,i)}const a=e[t];let o=n,s=r;for(Wd(e,n,t),i(e[r],a)>0&&Wd(e,n,r);o<s;){for(Wd(e,o,s),++o,--s;i(e[o],a)<0;)++o;for(;i(e[s],a)>0;)--s}i(e[n],a)===0?Wd(e,n,s):(++s,Wd(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function Wd(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function jfe(e,t,n){if(e=Float64Array.from(mfe(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return dP(e);if(t>=1)return fP(e);var r,i=(r-1)*t,a=Math.floor(i),o=fP(Qz(e,a).subarray(0,a+1)),s=dP(e.subarray(a+1));return o+(s-o)*(i-a)}}function Efe(e,t,n=Xz){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,a=Math.floor(i),o=+n(e[a],a,e),s=+n(e[a+1],a+1,e);return o+(s-o)*(i-a)}}function Tfe(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,a=new Array(i);++r<i;)a[r]=e+r*n;return a}function Mi(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Po(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const KO=Symbol("implicit");function AA(){var e=new uP,t=[],n=[],r=KO;function i(a){let o=e.get(a);if(o===void 0){if(r!==KO)return r;e.set(a,o=t.push(a)-1)}return n[o%n.length]}return i.domain=function(a){if(!arguments.length)return t.slice();t=[],e=new uP;for(const o of a)e.has(o)||e.set(o,t.push(o)-1);return i},i.range=function(a){return arguments.length?(n=Array.from(a),i):n.slice()},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return AA(t,n).unknown(r)},Mi.apply(i,arguments),i}function Sh(){var e=AA().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,a,o,s=!1,l=0,u=0,f=.5;delete e.unknown;function d(){var p=t().length,h=i<r,b=h?i:r,m=h?r:i;a=(m-b)/Math.max(1,p-l+u*2),s&&(a=Math.floor(a)),b+=(m-b-a*(p-l))*f,o=a*(1-l),s&&(b=Math.round(b),o=Math.round(o));var g=Tfe(p).map(function(y){return b+a*y});return n(h?g.reverse():g)}return e.domain=function(p){return arguments.length?(t(p),d()):t()},e.range=function(p){return arguments.length?([r,i]=p,r=+r,i=+i,d()):[r,i]},e.rangeRound=function(p){return[r,i]=p,r=+r,i=+i,s=!0,d()},e.bandwidth=function(){return o},e.step=function(){return a},e.round=function(p){return arguments.length?(s=!!p,d()):s},e.padding=function(p){return arguments.length?(l=Math.min(1,u=+p),d()):l},e.paddingInner=function(p){return arguments.length?(l=Math.min(1,p),d()):l},e.paddingOuter=function(p){return arguments.length?(u=+p,d()):u},e.align=function(p){return arguments.length?(f=Math.max(0,Math.min(1,p)),d()):f},e.copy=function(){return Sh(t(),[r,i]).round(s).paddingInner(l).paddingOuter(u).align(f)},Mi.apply(d(),arguments)}function Zz(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return Zz(t())},e}function Bp(){return Zz(Sh.apply(null,arguments).paddingInner(1))}function CA(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Jz(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Am(){}var Oh=.7,Ny=1/Oh,kc="\\s*([+-]?\\d+)\\s*",jh="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",wa="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Afe=/^#([0-9a-f]{3,8})$/,Cfe=new RegExp(`^rgb\\(${kc},${kc},${kc}\\)$`),_fe=new RegExp(`^rgb\\(${wa},${wa},${wa}\\)$`),Nfe=new RegExp(`^rgba\\(${kc},${kc},${kc},${jh}\\)$`),Rfe=new RegExp(`^rgba\\(${wa},${wa},${wa},${jh}\\)$`),Mfe=new RegExp(`^hsl\\(${jh},${wa},${wa}\\)$`),Pfe=new RegExp(`^hsla\\(${jh},${wa},${wa},${jh}\\)$`),pP={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};CA(Am,Eh,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:hP,formatHex:hP,formatHex8:$fe,formatHsl:Dfe,formatRgb:mP,toString:mP});function hP(){return this.rgb().formatHex()}function $fe(){return this.rgb().formatHex8()}function Dfe(){return e4(this).formatHsl()}function mP(){return this.rgb().formatRgb()}function Eh(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Afe.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?gP(t):n===3?new $r(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?wg(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?wg(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Cfe.exec(e))?new $r(t[1],t[2],t[3],1):(t=_fe.exec(e))?new $r(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Nfe.exec(e))?wg(t[1],t[2],t[3],t[4]):(t=Rfe.exec(e))?wg(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Mfe.exec(e))?bP(t[1],t[2]/100,t[3]/100,1):(t=Pfe.exec(e))?bP(t[1],t[2]/100,t[3]/100,t[4]):pP.hasOwnProperty(e)?gP(pP[e]):e==="transparent"?new $r(NaN,NaN,NaN,0):null}function gP(e){return new $r(e>>16&255,e>>8&255,e&255,1)}function wg(e,t,n,r){return r<=0&&(e=t=n=NaN),new $r(e,t,n,r)}function Ife(e){return e instanceof Am||(e=Eh(e)),e?(e=e.rgb(),new $r(e.r,e.g,e.b,e.opacity)):new $r}function YO(e,t,n,r){return arguments.length===1?Ife(e):new $r(e,t,n,r??1)}function $r(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}CA($r,YO,Jz(Am,{brighter(e){return e=e==null?Ny:Math.pow(Ny,e),new $r(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Oh:Math.pow(Oh,e),new $r(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new $r(Kl(this.r),Kl(this.g),Kl(this.b),Ry(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:vP,formatHex:vP,formatHex8:kfe,formatRgb:yP,toString:yP}));function vP(){return`#${Tl(this.r)}${Tl(this.g)}${Tl(this.b)}`}function kfe(){return`#${Tl(this.r)}${Tl(this.g)}${Tl(this.b)}${Tl((isNaN(this.opacity)?1:this.opacity)*255)}`}function yP(){const e=Ry(this.opacity);return`${e===1?"rgb(":"rgba("}${Kl(this.r)}, ${Kl(this.g)}, ${Kl(this.b)}${e===1?")":`, ${e})`}`}function Ry(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Kl(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Tl(e){return e=Kl(e),(e<16?"0":"")+e.toString(16)}function bP(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new zi(e,t,n,r)}function e4(e){if(e instanceof zi)return new zi(e.h,e.s,e.l,e.opacity);if(e instanceof Am||(e=Eh(e)),!e)return new zi;if(e instanceof zi)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,l=(a+i)/2;return s?(t===a?o=(n-r)/s+(n<r)*6:n===a?o=(r-t)/s+2:o=(t-n)/s+4,s/=l<.5?a+i:2-a-i,o*=60):s=l>0&&l<1?0:o,new zi(o,s,l,e.opacity)}function Lfe(e,t,n,r){return arguments.length===1?e4(e):new zi(e,t,n,r??1)}function zi(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}CA(zi,Lfe,Jz(Am,{brighter(e){return e=e==null?Ny:Math.pow(Ny,e),new zi(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Oh:Math.pow(Oh,e),new zi(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new $r(Fw(e>=240?e-240:e+120,i,r),Fw(e,i,r),Fw(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new zi(xP(this.h),Sg(this.s),Sg(this.l),Ry(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Ry(this.opacity);return`${e===1?"hsl(":"hsla("}${xP(this.h)}, ${Sg(this.s)*100}%, ${Sg(this.l)*100}%${e===1?")":`, ${e})`}`}}));function xP(e){return e=(e||0)%360,e<0?e+360:e}function Sg(e){return Math.max(0,Math.min(1,e||0))}function Fw(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const _A=e=>()=>e;function Bfe(e,t){return function(n){return e+n*t}}function zfe(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function Ffe(e){return(e=+e)==1?t4:function(t,n){return n-t?zfe(t,n,e):_A(isNaN(t)?n:t)}}function t4(e,t){var n=t-e;return n?Bfe(e,n):_A(isNaN(e)?t:e)}const wP=function e(t){var n=Ffe(t);function r(i,a){var o=n((i=YO(i)).r,(a=YO(a)).r),s=n(i.g,a.g),l=n(i.b,a.b),u=t4(i.opacity,a.opacity);return function(f){return i.r=o(f),i.g=s(f),i.b=l(f),i.opacity=u(f),i+""}}return r.gamma=e,r}(1);function Ufe(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function Hfe(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function qfe(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),a=new Array(n),o;for(o=0;o<r;++o)i[o]=Ad(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(s){for(o=0;o<r;++o)a[o]=i[o](s);return a}}function Vfe(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function My(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Gfe(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=Ad(e[i],t[i]):r[i]=t[i];return function(a){for(i in n)r[i]=n[i](a);return r}}var XO=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Uw=new RegExp(XO.source,"g");function Kfe(e){return function(){return e}}function Yfe(e){return function(t){return e(t)+""}}function Xfe(e,t){var n=XO.lastIndex=Uw.lastIndex=0,r,i,a,o=-1,s=[],l=[];for(e=e+"",t=t+"";(r=XO.exec(e))&&(i=Uw.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,l.push({i:o,x:My(r,i)})),n=Uw.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?l[0]?Yfe(l[0].x):Kfe(t):(t=l.length,function(u){for(var f=0,d;f<t;++f)s[(d=l[f]).i]=d.x(u);return s.join("")})}function Ad(e,t){var n=typeof t,r;return t==null||n==="boolean"?_A(t):(n==="number"?My:n==="string"?(r=Eh(t))?(t=r,wP):Xfe:t instanceof Eh?wP:t instanceof Date?Vfe:Hfe(t)?Ufe:Array.isArray(t)?qfe:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Gfe:My)(e,t)}function NA(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function Wfe(e,t){t===void 0&&(t=e,e=Ad);for(var n=0,r=t.length-1,i=t[0],a=new Array(r<0?0:r);n<r;)a[n]=e(i,i=t[++n]);return function(o){var s=Math.max(0,Math.min(r-1,Math.floor(o*=r)));return a[s](o-s)}}function Qfe(e){return function(){return e}}function Py(e){return+e}var SP=[0,1];function Sr(e){return e}function WO(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:Qfe(isNaN(t)?NaN:.5)}function Zfe(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function Jfe(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=WO(i,r),a=n(o,a)):(r=WO(r,i),a=n(a,o)),function(s){return a(r(s))}}function ede(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),a=new Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=WO(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(s){var l=Tm(e,s,1,r)-1;return a[l](i[l](s))}}function Cm(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Dx(){var e=SP,t=SP,n=Ad,r,i,a,o=Sr,s,l,u;function f(){var p=Math.min(e.length,t.length);return o!==Sr&&(o=Zfe(e[0],e[p-1])),s=p>2?ede:Jfe,l=u=null,d}function d(p){return p==null||isNaN(p=+p)?a:(l||(l=s(e.map(r),t,n)))(r(o(p)))}return d.invert=function(p){return o(i((u||(u=s(t,e.map(r),My)))(p)))},d.domain=function(p){return arguments.length?(e=Array.from(p,Py),f()):e.slice()},d.range=function(p){return arguments.length?(t=Array.from(p),f()):t.slice()},d.rangeRound=function(p){return t=Array.from(p),n=NA,f()},d.clamp=function(p){return arguments.length?(o=p?!0:Sr,f()):o!==Sr},d.interpolate=function(p){return arguments.length?(n=p,f()):n},d.unknown=function(p){return arguments.length?(a=p,d):a},function(p,h){return r=p,i=h,f()}}function RA(){return Dx()(Sr,Sr)}function tde(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function $y(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function _f(e){return e=$y(Math.abs(e)),e?e[1]:NaN}function nde(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),a.push(n.substring(i-=s,i+s)),!((l+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function rde(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var ide=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Th(e){if(!(t=ide.exec(e)))throw new Error("invalid format: "+e);var t;return new MA({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Th.prototype=MA.prototype;function MA(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}MA.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function ade(e){e:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var Dy;function ode(e,t){var n=$y(e,t);if(!n)return Dy=void 0,e.toPrecision(t);var r=n[0],i=n[1],a=i-(Dy=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+$y(e,Math.max(0,t+a-1))[0]}function OP(e,t){var n=$y(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const jP={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:tde,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>OP(e*100,t),r:OP,s:ode,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function EP(e){return e}var TP=Array.prototype.map,AP=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function sde(e){var t=e.grouping===void 0||e.thousands===void 0?EP:nde(TP.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?EP:rde(TP.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function u(d,p){d=Th(d);var h=d.fill,b=d.align,m=d.sign,g=d.symbol,y=d.zero,v=d.width,w=d.comma,S=d.precision,O=d.trim,j=d.type;j==="n"?(w=!0,j="g"):jP[j]||(S===void 0&&(S=12),O=!0,j="g"),(y||h==="0"&&b==="=")&&(y=!0,h="0",b="=");var E=(p&&p.prefix!==void 0?p.prefix:"")+(g==="$"?n:g==="#"&&/[boxX]/.test(j)?"0"+j.toLowerCase():""),T=(g==="$"?r:/[%p]/.test(j)?o:"")+(p&&p.suffix!==void 0?p.suffix:""),A=jP[j],C=/[defgprs%]/.test(j);S=S===void 0?6:/[gprs]/.test(j)?Math.max(1,Math.min(21,S)):Math.max(0,Math.min(20,S));function _(N){var D=E,R=T,$,P,B;if(j==="c")R=A(N)+R,N="";else{N=+N;var L=N<0||1/N<0;if(N=isNaN(N)?l:A(Math.abs(N),S),O&&(N=ade(N)),L&&+N==0&&m!=="+"&&(L=!1),D=(L?m==="("?m:s:m==="-"||m==="("?"":m)+D,R=(j==="s"&&!isNaN(N)&&Dy!==void 0?AP[8+Dy/3]:"")+R+(L&&m==="("?")":""),C){for($=-1,P=N.length;++$<P;)if(B=N.charCodeAt($),48>B||B>57){R=(B===46?i+N.slice($+1):N.slice($))+R,N=N.slice(0,$);break}}}w&&!y&&(N=t(N,1/0));var k=D.length+N.length+R.length,I=k<v?new Array(v-k+1).join(h):"";switch(w&&y&&(N=t(I+N,I.length?v-R.length:1/0),I=""),b){case"<":N=D+N+R+I;break;case"=":N=D+I+N+R;break;case"^":N=I.slice(0,k=I.length>>1)+D+N+R+I.slice(k);break;default:N=I+D+N+R;break}return a(N)}return _.toString=function(){return d+""},_}function f(d,p){var h=Math.max(-8,Math.min(8,Math.floor(_f(p)/3)))*3,b=Math.pow(10,-h),m=u((d=Th(d),d.type="f",d),{suffix:AP[8+h/3]});return function(g){return m(b*g)}}return{format:u,formatPrefix:f}}var Og,PA,n4;lde({thousands:",",grouping:[3],currency:["$",""]});function lde(e){return Og=sde(e),PA=Og.format,n4=Og.formatPrefix,Og}function ude(e){return Math.max(0,-_f(Math.abs(e)))}function cde(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(_f(t)/3)))*3-_f(Math.abs(e)))}function fde(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,_f(t)-_f(e))+1}function r4(e,t,n,r){var i=GO(e,t,n),a;switch(r=Th(r??",f"),r.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=cde(i,o))&&(r.precision=a),n4(r,o)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(a=fde(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(a=ude(i))&&(r.precision=a-(r.type==="%")*2);break}}return PA(r)}function Qs(e){var t=e.domain;return e.ticks=function(n){var r=t();return qO(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return r4(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,a=r.length-1,o=r[i],s=r[a],l,u,f=10;for(s<o&&(u=o,o=s,s=u,u=i,i=a,a=u);f-- >0;){if(u=VO(o,s,n),u===l)return r[i]=o,r[a]=s,t(r);if(u>0)o=Math.floor(o/u)*u,s=Math.ceil(s/u)*u;else if(u<0)o=Math.ceil(o*u)/u,s=Math.floor(s*u)/u;else break;l=u}return e},e}function Iy(){var e=RA();return e.copy=function(){return Cm(e,Iy())},Mi.apply(e,arguments),Qs(e)}function i4(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,Py),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return i4(e).unknown(t)},e=arguments.length?Array.from(e,Py):[0,1],Qs(n)}function a4(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],a=e[r],o;return a<i&&(o=n,n=r,r=o,o=i,i=a,a=o),e[n]=t.floor(i),e[r]=t.ceil(a),e}function CP(e){return Math.log(e)}function _P(e){return Math.exp(e)}function dde(e){return-Math.log(-e)}function pde(e){return-Math.exp(-e)}function hde(e){return isFinite(e)?+("1e"+e):e<0?0:e}function mde(e){return e===10?hde:e===Math.E?Math.exp:t=>Math.pow(e,t)}function gde(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function NP(e){return(t,n)=>-e(-t,n)}function $A(e){const t=e(CP,_P),n=t.domain;let r=10,i,a;function o(){return i=gde(r),a=mde(r),n()[0]<0?(i=NP(i),a=NP(a),e(dde,pde)):e(CP,_P),t}return t.base=function(s){return arguments.length?(r=+s,o()):r},t.domain=function(s){return arguments.length?(n(s),o()):n()},t.ticks=s=>{const l=n();let u=l[0],f=l[l.length-1];const d=f<u;d&&([u,f]=[f,u]);let p=i(u),h=i(f),b,m;const g=s==null?10:+s;let y=[];if(!(r%1)&&h-p<g){if(p=Math.floor(p),h=Math.ceil(h),u>0){for(;p<=h;++p)for(b=1;b<r;++b)if(m=p<0?b/a(-p):b*a(p),!(m<u)){if(m>f)break;y.push(m)}}else for(;p<=h;++p)for(b=r-1;b>=1;--b)if(m=p>0?b/a(-p):b*a(p),!(m<u)){if(m>f)break;y.push(m)}y.length*2<g&&(y=qO(u,f,g))}else y=qO(p,h,Math.min(h-p,g)).map(a);return d?y.reverse():y},t.tickFormat=(s,l)=>{if(s==null&&(s=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=Th(l)).precision==null&&(l.trim=!0),l=PA(l)),s===1/0)return l;const u=Math.max(1,r*s/t.ticks().length);return f=>{let d=f/a(Math.round(i(f)));return d*r<r-.5&&(d*=r),d<=u?l(f):""}},t.nice=()=>n(a4(n(),{floor:s=>a(Math.floor(i(s))),ceil:s=>a(Math.ceil(i(s)))})),t}function o4(){const e=$A(Dx()).domain([1,10]);return e.copy=()=>Cm(e,o4()).base(e.base()),Mi.apply(e,arguments),e}function RP(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function MP(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function DA(e){var t=1,n=e(RP(t),MP(t));return n.constant=function(r){return arguments.length?e(RP(t=+r),MP(t)):t},Qs(n)}function s4(){var e=DA(Dx());return e.copy=function(){return Cm(e,s4()).constant(e.constant())},Mi.apply(e,arguments)}function PP(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function vde(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function yde(e){return e<0?-e*e:e*e}function IA(e){var t=e(Sr,Sr),n=1;function r(){return n===1?e(Sr,Sr):n===.5?e(vde,yde):e(PP(n),PP(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},Qs(t)}function kA(){var e=IA(Dx());return e.copy=function(){return Cm(e,kA()).exponent(e.exponent())},Mi.apply(e,arguments),e}function bde(){return kA.apply(null,arguments).exponent(.5)}function $P(e){return Math.sign(e)*e*e}function xde(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function l4(){var e=RA(),t=[0,1],n=!1,r;function i(a){var o=xde(e(a));return isNaN(o)?r:n?Math.round(o):o}return i.invert=function(a){return e.invert($P(a))},i.domain=function(a){return arguments.length?(e.domain(a),i):e.domain()},i.range=function(a){return arguments.length?(e.range((t=Array.from(a,Py)).map($P)),i):t.slice()},i.rangeRound=function(a){return i.range(a).round(!0)},i.round=function(a){return arguments.length?(n=!!a,i):n},i.clamp=function(a){return arguments.length?(e.clamp(a),i):e.clamp()},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return l4(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},Mi.apply(i,arguments),Qs(i)}function u4(){var e=[],t=[],n=[],r;function i(){var o=0,s=Math.max(1,t.length);for(n=new Array(s-1);++o<s;)n[o-1]=Efe(e,o/s);return a}function a(o){return o==null||isNaN(o=+o)?r:t[Tm(n,o)]}return a.invertExtent=function(o){var s=t.indexOf(o);return s<0?[NaN,NaN]:[s>0?n[s-1]:e[0],s<n.length?n[s]:e[e.length-1]]},a.domain=function(o){if(!arguments.length)return e.slice();e=[];for(let s of o)s!=null&&!isNaN(s=+s)&&e.push(s);return e.sort(Ns),i()},a.range=function(o){return arguments.length?(t=Array.from(o),i()):t.slice()},a.unknown=function(o){return arguments.length?(r=o,a):r},a.quantiles=function(){return n.slice()},a.copy=function(){return u4().domain(e).range(t).unknown(r)},Mi.apply(a,arguments)}function c4(){var e=0,t=1,n=1,r=[.5],i=[0,1],a;function o(l){return l!=null&&l<=l?i[Tm(r,l,0,n)]:a}function s(){var l=-1;for(r=new Array(n);++l<n;)r[l]=((l+1)*t-(l-n)*e)/(n+1);return o}return o.domain=function(l){return arguments.length?([e,t]=l,e=+e,t=+t,s()):[e,t]},o.range=function(l){return arguments.length?(n=(i=Array.from(l)).length-1,s()):i.slice()},o.invertExtent=function(l){var u=i.indexOf(l);return u<0?[NaN,NaN]:u<1?[e,r[0]]:u>=n?[r[n-1],t]:[r[u-1],r[u]]},o.unknown=function(l){return arguments.length&&(a=l),o},o.thresholds=function(){return r.slice()},o.copy=function(){return c4().domain([e,t]).range(i).unknown(a)},Mi.apply(Qs(o),arguments)}function f4(){var e=[.5],t=[0,1],n,r=1;function i(a){return a!=null&&a<=a?t[Tm(e,a,0,r)]:n}return i.domain=function(a){return arguments.length?(e=Array.from(a),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(a){return arguments.length?(t=Array.from(a),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(a){var o=t.indexOf(a);return[e[o-1],e[o]]},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return f4().domain(e).range(t).unknown(n)},Mi.apply(i,arguments)}const Hw=new Date,qw=new Date;function jn(e,t,n,r){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const o=i(a),s=i.ceil(a);return a-o<s-a?o:s},i.offset=(a,o)=>(t(a=new Date(+a),o==null?1:Math.floor(o)),a),i.range=(a,o,s)=>{const l=[];if(a=i.ceil(a),s=s==null?1:Math.floor(s),!(a<o)||!(s>0))return l;let u;do l.push(u=new Date(+a)),t(a,s),e(a);while(u<a&&a<o);return l},i.filter=a=>jn(o=>{if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},(o,s)=>{if(o>=o)if(s<0)for(;++s<=0;)for(;t(o,-1),!a(o););else for(;--s>=0;)for(;t(o,1),!a(o););}),n&&(i.count=(a,o)=>(Hw.setTime(+a),qw.setTime(+o),e(Hw),e(qw),Math.floor(n(Hw,qw))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(r?o=>r(o)%a===0:o=>i.count(0,o)%a===0):i)),i}const ky=jn(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);ky.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?jn(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):ky);ky.range;const Za=1e3,Oi=Za*60,Ja=Oi*60,bo=Ja*24,LA=bo*7,DP=bo*30,Vw=bo*365,Al=jn(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Za)},(e,t)=>(t-e)/Za,e=>e.getUTCSeconds());Al.range;const BA=jn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Za)},(e,t)=>{e.setTime(+e+t*Oi)},(e,t)=>(t-e)/Oi,e=>e.getMinutes());BA.range;const zA=jn(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Oi)},(e,t)=>(t-e)/Oi,e=>e.getUTCMinutes());zA.range;const FA=jn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Za-e.getMinutes()*Oi)},(e,t)=>{e.setTime(+e+t*Ja)},(e,t)=>(t-e)/Ja,e=>e.getHours());FA.range;const UA=jn(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Ja)},(e,t)=>(t-e)/Ja,e=>e.getUTCHours());UA.range;const _m=jn(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Oi)/bo,e=>e.getDate()-1);_m.range;const Ix=jn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/bo,e=>e.getUTCDate()-1);Ix.range;const d4=jn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/bo,e=>Math.floor(e/bo));d4.range;function Mu(e){return jn(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Oi)/LA)}const kx=Mu(0),Ly=Mu(1),wde=Mu(2),Sde=Mu(3),Nf=Mu(4),Ode=Mu(5),jde=Mu(6);kx.range;Ly.range;wde.range;Sde.range;Nf.range;Ode.range;jde.range;function Pu(e){return jn(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/LA)}const Lx=Pu(0),By=Pu(1),Ede=Pu(2),Tde=Pu(3),Rf=Pu(4),Ade=Pu(5),Cde=Pu(6);Lx.range;By.range;Ede.range;Tde.range;Rf.range;Ade.range;Cde.range;const HA=jn(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());HA.range;const qA=jn(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());qA.range;const xo=jn(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());xo.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:jn(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});xo.range;const wo=jn(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());wo.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:jn(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});wo.range;function p4(e,t,n,r,i,a){const o=[[Al,1,Za],[Al,5,5*Za],[Al,15,15*Za],[Al,30,30*Za],[a,1,Oi],[a,5,5*Oi],[a,15,15*Oi],[a,30,30*Oi],[i,1,Ja],[i,3,3*Ja],[i,6,6*Ja],[i,12,12*Ja],[r,1,bo],[r,2,2*bo],[n,1,LA],[t,1,DP],[t,3,3*DP],[e,1,Vw]];function s(u,f,d){const p=f<u;p&&([u,f]=[f,u]);const h=d&&typeof d.range=="function"?d:l(u,f,d),b=h?h.range(u,+f+1):[];return p?b.reverse():b}function l(u,f,d){const p=Math.abs(f-u)/d,h=TA(([,,g])=>g).right(o,p);if(h===o.length)return e.every(GO(u/Vw,f/Vw,d));if(h===0)return ky.every(Math.max(GO(u,f,d),1));const[b,m]=o[p/o[h-1][2]<o[h][2]/p?h-1:h];return b.every(m)}return[s,l]}const[_de,Nde]=p4(wo,qA,Lx,d4,UA,zA),[Rde,Mde]=p4(xo,HA,kx,_m,FA,BA);function Gw(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Kw(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Qd(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function Pde(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,l=e.shortMonths,u=Zd(i),f=Jd(i),d=Zd(a),p=Jd(a),h=Zd(o),b=Jd(o),m=Zd(s),g=Jd(s),y=Zd(l),v=Jd(l),w={a:B,A:L,b:k,B:I,c:null,d:FP,e:FP,f:npe,g:dpe,G:hpe,H:Jde,I:epe,j:tpe,L:h4,m:rpe,M:ipe,p:V,q:M,Q:qP,s:VP,S:ape,u:ope,U:spe,V:lpe,w:upe,W:cpe,x:null,X:null,y:fpe,Y:ppe,Z:mpe,"%":HP},S={a:q,A:G,b:U,B:Y,c:null,d:UP,e:UP,f:bpe,g:_pe,G:Rpe,H:gpe,I:vpe,j:ype,L:g4,m:xpe,M:wpe,p:X,q:te,Q:qP,s:VP,S:Spe,u:Ope,U:jpe,V:Epe,w:Tpe,W:Ape,x:null,X:null,y:Cpe,Y:Npe,Z:Mpe,"%":HP},O={a:C,A:_,b:N,B:D,c:R,d:BP,e:BP,f:Xde,g:LP,G:kP,H:zP,I:zP,j:Vde,L:Yde,m:qde,M:Gde,p:A,q:Hde,Q:Qde,s:Zde,S:Kde,u:Lde,U:Bde,V:zde,w:kde,W:Fde,x:$,X:P,y:LP,Y:kP,Z:Ude,"%":Wde};w.x=j(n,w),w.X=j(r,w),w.c=j(t,w),S.x=j(n,S),S.X=j(r,S),S.c=j(t,S);function j(H,ee){return function(J){var K=[],oe=-1,Q=0,ae=H.length,ue,ye,Ie;for(J instanceof Date||(J=new Date(+J));++oe<ae;)H.charCodeAt(oe)===37&&(K.push(H.slice(Q,oe)),(ye=IP[ue=H.charAt(++oe)])!=null?ue=H.charAt(++oe):ye=ue==="e"?" ":"0",(Ie=ee[ue])&&(ue=Ie(J,ye)),K.push(ue),Q=oe+1);return K.push(H.slice(Q,oe)),K.join("")}}function E(H,ee){return function(J){var K=Qd(1900,void 0,1),oe=T(K,H,J+="",0),Q,ae;if(oe!=J.length)return null;if("Q"in K)return new Date(K.Q);if("s"in K)return new Date(K.s*1e3+("L"in K?K.L:0));if(ee&&!("Z"in K)&&(K.Z=0),"p"in K&&(K.H=K.H%12+K.p*12),K.m===void 0&&(K.m="q"in K?K.q:0),"V"in K){if(K.V<1||K.V>53)return null;"w"in K||(K.w=1),"Z"in K?(Q=Kw(Qd(K.y,0,1)),ae=Q.getUTCDay(),Q=ae>4||ae===0?By.ceil(Q):By(Q),Q=Ix.offset(Q,(K.V-1)*7),K.y=Q.getUTCFullYear(),K.m=Q.getUTCMonth(),K.d=Q.getUTCDate()+(K.w+6)%7):(Q=Gw(Qd(K.y,0,1)),ae=Q.getDay(),Q=ae>4||ae===0?Ly.ceil(Q):Ly(Q),Q=_m.offset(Q,(K.V-1)*7),K.y=Q.getFullYear(),K.m=Q.getMonth(),K.d=Q.getDate()+(K.w+6)%7)}else("W"in K||"U"in K)&&("w"in K||(K.w="u"in K?K.u%7:"W"in K?1:0),ae="Z"in K?Kw(Qd(K.y,0,1)).getUTCDay():Gw(Qd(K.y,0,1)).getDay(),K.m=0,K.d="W"in K?(K.w+6)%7+K.W*7-(ae+5)%7:K.w+K.U*7-(ae+6)%7);return"Z"in K?(K.H+=K.Z/100|0,K.M+=K.Z%100,Kw(K)):Gw(K)}}function T(H,ee,J,K){for(var oe=0,Q=ee.length,ae=J.length,ue,ye;oe<Q;){if(K>=ae)return-1;if(ue=ee.charCodeAt(oe++),ue===37){if(ue=ee.charAt(oe++),ye=O[ue in IP?ee.charAt(oe++):ue],!ye||(K=ye(H,J,K))<0)return-1}else if(ue!=J.charCodeAt(K++))return-1}return K}function A(H,ee,J){var K=u.exec(ee.slice(J));return K?(H.p=f.get(K[0].toLowerCase()),J+K[0].length):-1}function C(H,ee,J){var K=h.exec(ee.slice(J));return K?(H.w=b.get(K[0].toLowerCase()),J+K[0].length):-1}function _(H,ee,J){var K=d.exec(ee.slice(J));return K?(H.w=p.get(K[0].toLowerCase()),J+K[0].length):-1}function N(H,ee,J){var K=y.exec(ee.slice(J));return K?(H.m=v.get(K[0].toLowerCase()),J+K[0].length):-1}function D(H,ee,J){var K=m.exec(ee.slice(J));return K?(H.m=g.get(K[0].toLowerCase()),J+K[0].length):-1}function R(H,ee,J){return T(H,t,ee,J)}function $(H,ee,J){return T(H,n,ee,J)}function P(H,ee,J){return T(H,r,ee,J)}function B(H){return o[H.getDay()]}function L(H){return a[H.getDay()]}function k(H){return l[H.getMonth()]}function I(H){return s[H.getMonth()]}function V(H){return i[+(H.getHours()>=12)]}function M(H){return 1+~~(H.getMonth()/3)}function q(H){return o[H.getUTCDay()]}function G(H){return a[H.getUTCDay()]}function U(H){return l[H.getUTCMonth()]}function Y(H){return s[H.getUTCMonth()]}function X(H){return i[+(H.getUTCHours()>=12)]}function te(H){return 1+~~(H.getUTCMonth()/3)}return{format:function(H){var ee=j(H+="",w);return ee.toString=function(){return H},ee},parse:function(H){var ee=E(H+="",!1);return ee.toString=function(){return H},ee},utcFormat:function(H){var ee=j(H+="",S);return ee.toString=function(){return H},ee},utcParse:function(H){var ee=E(H+="",!0);return ee.toString=function(){return H},ee}}}var IP={"-":"",_:" ",0:"0"},Ln=/^\s*\d+/,$de=/^%/,Dde=/[\\^$*+?|[\]().{}]/g;function ut(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",a=i.length;return r+(a<n?new Array(n-a+1).join(t)+i:i)}function Ide(e){return e.replace(Dde,"\\$&")}function Zd(e){return new RegExp("^(?:"+e.map(Ide).join("|")+")","i")}function Jd(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function kde(e,t,n){var r=Ln.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Lde(e,t,n){var r=Ln.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Bde(e,t,n){var r=Ln.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function zde(e,t,n){var r=Ln.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Fde(e,t,n){var r=Ln.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function kP(e,t,n){var r=Ln.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function LP(e,t,n){var r=Ln.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Ude(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Hde(e,t,n){var r=Ln.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function qde(e,t,n){var r=Ln.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function BP(e,t,n){var r=Ln.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Vde(e,t,n){var r=Ln.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function zP(e,t,n){var r=Ln.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Gde(e,t,n){var r=Ln.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Kde(e,t,n){var r=Ln.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Yde(e,t,n){var r=Ln.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Xde(e,t,n){var r=Ln.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Wde(e,t,n){var r=$de.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Qde(e,t,n){var r=Ln.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Zde(e,t,n){var r=Ln.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function FP(e,t){return ut(e.getDate(),t,2)}function Jde(e,t){return ut(e.getHours(),t,2)}function epe(e,t){return ut(e.getHours()%12||12,t,2)}function tpe(e,t){return ut(1+_m.count(xo(e),e),t,3)}function h4(e,t){return ut(e.getMilliseconds(),t,3)}function npe(e,t){return h4(e,t)+"000"}function rpe(e,t){return ut(e.getMonth()+1,t,2)}function ipe(e,t){return ut(e.getMinutes(),t,2)}function ape(e,t){return ut(e.getSeconds(),t,2)}function ope(e){var t=e.getDay();return t===0?7:t}function spe(e,t){return ut(kx.count(xo(e)-1,e),t,2)}function m4(e){var t=e.getDay();return t>=4||t===0?Nf(e):Nf.ceil(e)}function lpe(e,t){return e=m4(e),ut(Nf.count(xo(e),e)+(xo(e).getDay()===4),t,2)}function upe(e){return e.getDay()}function cpe(e,t){return ut(Ly.count(xo(e)-1,e),t,2)}function fpe(e,t){return ut(e.getFullYear()%100,t,2)}function dpe(e,t){return e=m4(e),ut(e.getFullYear()%100,t,2)}function ppe(e,t){return ut(e.getFullYear()%1e4,t,4)}function hpe(e,t){var n=e.getDay();return e=n>=4||n===0?Nf(e):Nf.ceil(e),ut(e.getFullYear()%1e4,t,4)}function mpe(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ut(t/60|0,"0",2)+ut(t%60,"0",2)}function UP(e,t){return ut(e.getUTCDate(),t,2)}function gpe(e,t){return ut(e.getUTCHours(),t,2)}function vpe(e,t){return ut(e.getUTCHours()%12||12,t,2)}function ype(e,t){return ut(1+Ix.count(wo(e),e),t,3)}function g4(e,t){return ut(e.getUTCMilliseconds(),t,3)}function bpe(e,t){return g4(e,t)+"000"}function xpe(e,t){return ut(e.getUTCMonth()+1,t,2)}function wpe(e,t){return ut(e.getUTCMinutes(),t,2)}function Spe(e,t){return ut(e.getUTCSeconds(),t,2)}function Ope(e){var t=e.getUTCDay();return t===0?7:t}function jpe(e,t){return ut(Lx.count(wo(e)-1,e),t,2)}function v4(e){var t=e.getUTCDay();return t>=4||t===0?Rf(e):Rf.ceil(e)}function Epe(e,t){return e=v4(e),ut(Rf.count(wo(e),e)+(wo(e).getUTCDay()===4),t,2)}function Tpe(e){return e.getUTCDay()}function Ape(e,t){return ut(By.count(wo(e)-1,e),t,2)}function Cpe(e,t){return ut(e.getUTCFullYear()%100,t,2)}function _pe(e,t){return e=v4(e),ut(e.getUTCFullYear()%100,t,2)}function Npe(e,t){return ut(e.getUTCFullYear()%1e4,t,4)}function Rpe(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Rf(e):Rf.ceil(e),ut(e.getUTCFullYear()%1e4,t,4)}function Mpe(){return"+0000"}function HP(){return"%"}function qP(e){return+e}function VP(e){return Math.floor(+e/1e3)}var Vu,y4,b4;Ppe({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Ppe(e){return Vu=Pde(e),y4=Vu.format,Vu.parse,b4=Vu.utcFormat,Vu.utcParse,Vu}function $pe(e){return new Date(e)}function Dpe(e){return e instanceof Date?+e:+new Date(+e)}function VA(e,t,n,r,i,a,o,s,l,u){var f=RA(),d=f.invert,p=f.domain,h=u(".%L"),b=u(":%S"),m=u("%I:%M"),g=u("%I %p"),y=u("%a %d"),v=u("%b %d"),w=u("%B"),S=u("%Y");function O(j){return(l(j)<j?h:s(j)<j?b:o(j)<j?m:a(j)<j?g:r(j)<j?i(j)<j?y:v:n(j)<j?w:S)(j)}return f.invert=function(j){return new Date(d(j))},f.domain=function(j){return arguments.length?p(Array.from(j,Dpe)):p().map($pe)},f.ticks=function(j){var E=p();return e(E[0],E[E.length-1],j??10)},f.tickFormat=function(j,E){return E==null?O:u(E)},f.nice=function(j){var E=p();return(!j||typeof j.range!="function")&&(j=t(E[0],E[E.length-1],j??10)),j?p(a4(E,j)):f},f.copy=function(){return Cm(f,VA(e,t,n,r,i,a,o,s,l,u))},f}function Ipe(){return Mi.apply(VA(Rde,Mde,xo,HA,kx,_m,FA,BA,Al,y4).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function kpe(){return Mi.apply(VA(_de,Nde,wo,qA,Lx,Ix,UA,zA,Al,b4).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Bx(){var e=0,t=1,n,r,i,a,o=Sr,s=!1,l;function u(d){return d==null||isNaN(d=+d)?l:o(i===0?.5:(d=(a(d)-n)*i,s?Math.max(0,Math.min(1,d)):d))}u.domain=function(d){return arguments.length?([e,t]=d,n=a(e=+e),r=a(t=+t),i=n===r?0:1/(r-n),u):[e,t]},u.clamp=function(d){return arguments.length?(s=!!d,u):s},u.interpolator=function(d){return arguments.length?(o=d,u):o};function f(d){return function(p){var h,b;return arguments.length?([h,b]=p,o=d(h,b),u):[o(0),o(1)]}}return u.range=f(Ad),u.rangeRound=f(NA),u.unknown=function(d){return arguments.length?(l=d,u):l},function(d){return a=d,n=d(e),r=d(t),i=n===r?0:1/(r-n),u}}function Zs(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function x4(){var e=Qs(Bx()(Sr));return e.copy=function(){return Zs(e,x4())},Po.apply(e,arguments)}function w4(){var e=$A(Bx()).domain([1,10]);return e.copy=function(){return Zs(e,w4()).base(e.base())},Po.apply(e,arguments)}function S4(){var e=DA(Bx());return e.copy=function(){return Zs(e,S4()).constant(e.constant())},Po.apply(e,arguments)}function GA(){var e=IA(Bx());return e.copy=function(){return Zs(e,GA()).exponent(e.exponent())},Po.apply(e,arguments)}function Lpe(){return GA.apply(null,arguments).exponent(.5)}function O4(){var e=[],t=Sr;function n(r){if(r!=null&&!isNaN(r=+r))return t((Tm(e,r,1)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(let i of r)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort(Ns),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.range=function(){return e.map((r,i)=>t(i/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,a)=>jfe(e,a/r))},n.copy=function(){return O4(t).domain(e)},Po.apply(n,arguments)}function zx(){var e=0,t=.5,n=1,r=1,i,a,o,s,l,u=Sr,f,d=!1,p;function h(m){return isNaN(m=+m)?p:(m=.5+((m=+f(m))-a)*(r*m<r*a?s:l),u(d?Math.max(0,Math.min(1,m)):m))}h.domain=function(m){return arguments.length?([e,t,n]=m,i=f(e=+e),a=f(t=+t),o=f(n=+n),s=i===a?0:.5/(a-i),l=a===o?0:.5/(o-a),r=a<i?-1:1,h):[e,t,n]},h.clamp=function(m){return arguments.length?(d=!!m,h):d},h.interpolator=function(m){return arguments.length?(u=m,h):u};function b(m){return function(g){var y,v,w;return arguments.length?([y,v,w]=g,u=Wfe(m,[y,v,w]),h):[u(0),u(.5),u(1)]}}return h.range=b(Ad),h.rangeRound=b(NA),h.unknown=function(m){return arguments.length?(p=m,h):p},function(m){return f=m,i=m(e),a=m(t),o=m(n),s=i===a?0:.5/(a-i),l=a===o?0:.5/(o-a),r=a<i?-1:1,h}}function j4(){var e=Qs(zx()(Sr));return e.copy=function(){return Zs(e,j4())},Po.apply(e,arguments)}function E4(){var e=$A(zx()).domain([.1,1,10]);return e.copy=function(){return Zs(e,E4()).base(e.base())},Po.apply(e,arguments)}function T4(){var e=DA(zx());return e.copy=function(){return Zs(e,T4()).constant(e.constant())},Po.apply(e,arguments)}function KA(){var e=IA(zx());return e.copy=function(){return Zs(e,KA()).exponent(e.exponent())},Po.apply(e,arguments)}function Bpe(){return KA.apply(null,arguments).exponent(.5)}const GP=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Sh,scaleDiverging:j4,scaleDivergingLog:E4,scaleDivergingPow:KA,scaleDivergingSqrt:Bpe,scaleDivergingSymlog:T4,scaleIdentity:i4,scaleImplicit:KO,scaleLinear:Iy,scaleLog:o4,scaleOrdinal:AA,scalePoint:Bp,scalePow:kA,scaleQuantile:u4,scaleQuantize:c4,scaleRadial:l4,scaleSequential:x4,scaleSequentialLog:w4,scaleSequentialPow:GA,scaleSequentialQuantile:O4,scaleSequentialSqrt:Lpe,scaleSequentialSymlog:S4,scaleSqrt:bde,scaleSymlog:s4,scaleThreshold:f4,scaleTime:Ipe,scaleUtc:kpe,tickFormat:r4},Symbol.toStringTag,{value:"Module"}));var zpe=gd;function Fpe(e,t,n){for(var r=-1,i=e.length;++r<i;){var a=e[r],o=t(a);if(o!=null&&(s===void 0?o===o&&!zpe(o):n(o,s)))var s=o,l=a}return l}var Fx=Fpe;function Upe(e,t){return e>t}var A4=Upe,Hpe=Fx,qpe=A4,Vpe=Ed;function Gpe(e){return e&&e.length?Hpe(e,Vpe,qpe):void 0}var Kpe=Gpe;const gs=vt(Kpe);function Ype(e,t){return e<t}var C4=Ype,Xpe=Fx,Wpe=C4,Qpe=Ed;function Zpe(e){return e&&e.length?Xpe(e,Qpe,Wpe):void 0}var Jpe=Zpe;const Ux=vt(Jpe);var ehe=sA,the=Pa,nhe=kz,rhe=zr;function ihe(e,t){var n=rhe(e)?ehe:nhe;return n(e,the(t))}var ahe=ihe,ohe=Dz,she=ahe;function lhe(e,t){return ohe(she(e,t),1)}var uhe=lhe;const che=vt(uhe);var fhe=SA;function dhe(e,t){return fhe(e,t)}var phe=dhe;const uu=vt(phe);var Cd=1e9,hhe={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},XA,Vt=!0,Ai="[DecimalError] ",Yl=Ai+"Invalid argument: ",YA=Ai+"Exponent out of range: ",_d=Math.floor,xl=Math.pow,mhe=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Yr,Cn=1e7,Bt=7,_4=9007199254740991,zy=_d(_4/Bt),xe={};xe.absoluteValue=xe.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};xe.comparedTo=xe.cmp=function(e){var t,n,r,i,a=this;if(e=new a.constructor(e),a.s!==e.s)return a.s||-e.s;if(a.e!==e.e)return a.e>e.e^a.s<0?1:-1;for(r=a.d.length,i=e.d.length,t=0,n=r<i?r:i;t<n;++t)if(a.d[t]!==e.d[t])return a.d[t]>e.d[t]^a.s<0?1:-1;return r===i?0:r>i^a.s<0?1:-1};xe.decimalPlaces=xe.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*Bt;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};xe.dividedBy=xe.div=function(e){return ao(this,new this.constructor(e))};xe.dividedToIntegerBy=xe.idiv=function(e){var t=this,n=t.constructor;return At(ao(t,new n(e),0,1),n.precision)};xe.equals=xe.eq=function(e){return!this.cmp(e)};xe.exponent=function(){return cn(this)};xe.greaterThan=xe.gt=function(e){return this.cmp(e)>0};xe.greaterThanOrEqualTo=xe.gte=function(e){return this.cmp(e)>=0};xe.isInteger=xe.isint=function(){return this.e>this.d.length-2};xe.isNegative=xe.isneg=function(){return this.s<0};xe.isPositive=xe.ispos=function(){return this.s>0};xe.isZero=function(){return this.s===0};xe.lessThan=xe.lt=function(e){return this.cmp(e)<0};xe.lessThanOrEqualTo=xe.lte=function(e){return this.cmp(e)<1};xe.logarithm=xe.log=function(e){var t,n=this,r=n.constructor,i=r.precision,a=i+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(Yr))throw Error(Ai+"NaN");if(n.s<1)throw Error(Ai+(n.s?"NaN":"-Infinity"));return n.eq(Yr)?new r(0):(Vt=!1,t=ao(Ah(n,a),Ah(e,a),a),Vt=!0,At(t,i))};xe.minus=xe.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?M4(t,e):N4(t,(e.s=-e.s,e))};xe.modulo=xe.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(e=new r(e),!e.s)throw Error(Ai+"NaN");return n.s?(Vt=!1,t=ao(n,e,0,1).times(e),Vt=!0,n.minus(t)):At(new r(n),i)};xe.naturalExponential=xe.exp=function(){return R4(this)};xe.naturalLogarithm=xe.ln=function(){return Ah(this)};xe.negated=xe.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};xe.plus=xe.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?N4(t,e):M4(t,(e.s=-e.s,e))};xe.precision=xe.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Yl+e);if(t=cn(i)+1,r=i.d.length-1,n=r*Bt+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};xe.squareRoot=xe.sqrt=function(){var e,t,n,r,i,a,o,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error(Ai+"NaN")}for(e=cn(s),Vt=!1,i=Math.sqrt(+s),i==0||i==1/0?(t=ga(s.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=_d((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new l(t)):r=new l(i.toString()),n=l.precision,i=o=n+3;;)if(a=r,r=a.plus(ao(s,a,o+2)).times(.5),ga(a.d).slice(0,o)===(t=ga(r.d)).slice(0,o)){if(t=t.slice(o-3,o+1),i==o&&t=="4999"){if(At(a,n+1,0),a.times(a).eq(s)){r=a;break}}else if(t!="9999")break;o+=4}return Vt=!0,At(r,n)};xe.times=xe.mul=function(e){var t,n,r,i,a,o,s,l,u,f=this,d=f.constructor,p=f.d,h=(e=new d(e)).d;if(!f.s||!e.s)return new d(0);for(e.s*=f.s,n=f.e+e.e,l=p.length,u=h.length,l<u&&(a=p,p=h,h=a,o=l,l=u,u=o),a=[],o=l+u,r=o;r--;)a.push(0);for(r=u;--r>=0;){for(t=0,i=l+r;i>r;)s=a[i]+h[r]*p[i-r-1]+t,a[i--]=s%Cn|0,t=s/Cn|0;a[i]=(a[i]+t)%Cn|0}for(;!a[--o];)a.pop();return t?++n:a.shift(),e.d=a,e.e=n,Vt?At(e,d.precision):e};xe.toDecimalPlaces=xe.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(Aa(e,0,Cd),t===void 0?t=r.rounding:Aa(t,0,8),At(n,e+cn(n)+1,t))};xe.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=cu(r,!0):(Aa(e,0,Cd),t===void 0?t=i.rounding:Aa(t,0,8),r=At(new i(r),e+1,t),n=cu(r,!0,e+1)),n};xe.toFixed=function(e,t){var n,r,i=this,a=i.constructor;return e===void 0?cu(i):(Aa(e,0,Cd),t===void 0?t=a.rounding:Aa(t,0,8),r=At(new a(i),e+cn(i)+1,t),n=cu(r.abs(),!1,e+cn(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};xe.toInteger=xe.toint=function(){var e=this,t=e.constructor;return At(new t(e),cn(e)+1,t.rounding)};xe.toNumber=function(){return+this};xe.toPower=xe.pow=function(e){var t,n,r,i,a,o,s=this,l=s.constructor,u=12,f=+(e=new l(e));if(!e.s)return new l(Yr);if(s=new l(s),!s.s){if(e.s<1)throw Error(Ai+"Infinity");return s}if(s.eq(Yr))return s;if(r=l.precision,e.eq(Yr))return At(s,r);if(t=e.e,n=e.d.length-1,o=t>=n,a=s.s,o){if((n=f<0?-f:f)<=_4){for(i=new l(Yr),t=Math.ceil(r/Bt+4),Vt=!1;n%2&&(i=i.times(s),YP(i.d,t)),n=_d(n/2),n!==0;)s=s.times(s),YP(s.d,t);return Vt=!0,e.s<0?new l(Yr).div(i):At(i,r)}}else if(a<0)throw Error(Ai+"NaN");return a=a<0&&e.d[Math.max(t,n)]&1?-1:1,s.s=1,Vt=!1,i=e.times(Ah(s,r+u)),Vt=!0,i=R4(i),i.s=a,i};xe.toPrecision=function(e,t){var n,r,i=this,a=i.constructor;return e===void 0?(n=cn(i),r=cu(i,n<=a.toExpNeg||n>=a.toExpPos)):(Aa(e,1,Cd),t===void 0?t=a.rounding:Aa(t,0,8),i=At(new a(i),e,t),n=cn(i),r=cu(i,e<=n||n<=a.toExpNeg,e)),r};xe.toSignificantDigits=xe.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(Aa(e,1,Cd),t===void 0?t=r.rounding:Aa(t,0,8)),At(new r(n),e,t)};xe.toString=xe.valueOf=xe.val=xe.toJSON=xe[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=cn(e),n=e.constructor;return cu(e,t<=n.toExpNeg||t>=n.toExpPos)};function N4(e,t){var n,r,i,a,o,s,l,u,f=e.constructor,d=f.precision;if(!e.s||!t.s)return t.s||(t=new f(e)),Vt?At(t,d):t;if(l=e.d,u=t.d,o=e.e,i=t.e,l=l.slice(),a=o-i,a){for(a<0?(r=l,a=-a,s=u.length):(r=u,i=o,s=l.length),o=Math.ceil(d/Bt),s=o>s?o+1:s+1,a>s&&(a=s,r.length=1),r.reverse();a--;)r.push(0);r.reverse()}for(s=l.length,a=u.length,s-a<0&&(a=s,r=u,u=l,l=r),n=0;a;)n=(l[--a]=l[a]+u[a]+n)/Cn|0,l[a]%=Cn;for(n&&(l.unshift(n),++i),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=i,Vt?At(t,d):t}function Aa(e,t,n){if(e!==~~e||e<t||e>n)throw Error(Yl+e)}function ga(e){var t,n,r,i=e.length-1,a="",o=e[0];if(i>0){for(a+=o,t=1;t<i;t++)r=e[t]+"",n=Bt-r.length,n&&(a+=Zo(n)),a+=r;o=e[t],r=o+"",n=Bt-r.length,n&&(a+=Zo(n))}else if(o===0)return"0";for(;o%10===0;)o/=10;return a+o}var ao=function(){function e(r,i){var a,o=0,s=r.length;for(r=r.slice();s--;)a=r[s]*i+o,r[s]=a%Cn|0,o=a/Cn|0;return o&&r.unshift(o),r}function t(r,i,a,o){var s,l;if(a!=o)l=a>o?1:-1;else for(s=l=0;s<a;s++)if(r[s]!=i[s]){l=r[s]>i[s]?1:-1;break}return l}function n(r,i,a){for(var o=0;a--;)r[a]-=o,o=r[a]<i[a]?1:0,r[a]=o*Cn+r[a]-i[a];for(;!r[0]&&r.length>1;)r.shift()}return function(r,i,a,o){var s,l,u,f,d,p,h,b,m,g,y,v,w,S,O,j,E,T,A=r.constructor,C=r.s==i.s?1:-1,_=r.d,N=i.d;if(!r.s)return new A(r);if(!i.s)throw Error(Ai+"Division by zero");for(l=r.e-i.e,E=N.length,O=_.length,h=new A(C),b=h.d=[],u=0;N[u]==(_[u]||0);)++u;if(N[u]>(_[u]||0)&&--l,a==null?v=a=A.precision:o?v=a+(cn(r)-cn(i))+1:v=a,v<0)return new A(0);if(v=v/Bt+2|0,u=0,E==1)for(f=0,N=N[0],v++;(u<O||f)&&v--;u++)w=f*Cn+(_[u]||0),b[u]=w/N|0,f=w%N|0;else{for(f=Cn/(N[0]+1)|0,f>1&&(N=e(N,f),_=e(_,f),E=N.length,O=_.length),S=E,m=_.slice(0,E),g=m.length;g<E;)m[g++]=0;T=N.slice(),T.unshift(0),j=N[0],N[1]>=Cn/2&&++j;do f=0,s=t(N,m,E,g),s<0?(y=m[0],E!=g&&(y=y*Cn+(m[1]||0)),f=y/j|0,f>1?(f>=Cn&&(f=Cn-1),d=e(N,f),p=d.length,g=m.length,s=t(d,m,p,g),s==1&&(f--,n(d,E<p?T:N,p))):(f==0&&(s=f=1),d=N.slice()),p=d.length,p<g&&d.unshift(0),n(m,d,g),s==-1&&(g=m.length,s=t(N,m,E,g),s<1&&(f++,n(m,E<g?T:N,g))),g=m.length):s===0&&(f++,m=[0]),b[u++]=f,s&&m[0]?m[g++]=_[S]||0:(m=[_[S]],g=1);while((S++<O||m[0]!==void 0)&&v--)}return b[0]||b.shift(),h.e=l,At(h,o?a+cn(h)+1:a)}}();function R4(e,t){var n,r,i,a,o,s,l=0,u=0,f=e.constructor,d=f.precision;if(cn(e)>16)throw Error(YA+cn(e));if(!e.s)return new f(Yr);for(Vt=!1,s=d,o=new f(.03125);e.abs().gte(.1);)e=e.times(o),u+=5;for(r=Math.log(xl(2,u))/Math.LN10*2+5|0,s+=r,n=i=a=new f(Yr),f.precision=s;;){if(i=At(i.times(e),s),n=n.times(++l),o=a.plus(ao(i,n,s)),ga(o.d).slice(0,s)===ga(a.d).slice(0,s)){for(;u--;)a=At(a.times(a),s);return f.precision=d,t==null?(Vt=!0,At(a,d)):a}a=o}}function cn(e){for(var t=e.e*Bt,n=e.d[0];n>=10;n/=10)t++;return t}function Yw(e,t,n){if(t>e.LN10.sd())throw Vt=!0,n&&(e.precision=n),Error(Ai+"LN10 precision limit exceeded");return At(new e(e.LN10),t)}function Zo(e){for(var t="";e--;)t+="0";return t}function Ah(e,t){var n,r,i,a,o,s,l,u,f,d=1,p=10,h=e,b=h.d,m=h.constructor,g=m.precision;if(h.s<1)throw Error(Ai+(h.s?"NaN":"-Infinity"));if(h.eq(Yr))return new m(0);if(t==null?(Vt=!1,u=g):u=t,h.eq(10))return t==null&&(Vt=!0),Yw(m,u);if(u+=p,m.precision=u,n=ga(b),r=n.charAt(0),a=cn(h),Math.abs(a)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)h=h.times(e),n=ga(h.d),r=n.charAt(0),d++;a=cn(h),r>1?(h=new m("0."+n),a++):h=new m(r+"."+n.slice(1))}else return l=Yw(m,u+2,g).times(a+""),h=Ah(new m(r+"."+n.slice(1)),u-p).plus(l),m.precision=g,t==null?(Vt=!0,At(h,g)):h;for(s=o=h=ao(h.minus(Yr),h.plus(Yr),u),f=At(h.times(h),u),i=3;;){if(o=At(o.times(f),u),l=s.plus(ao(o,new m(i),u)),ga(l.d).slice(0,u)===ga(s.d).slice(0,u))return s=s.times(2),a!==0&&(s=s.plus(Yw(m,u+2,g).times(a+""))),s=ao(s,new m(d),u),m.precision=g,t==null?(Vt=!0,At(s,g)):s;s=l,i+=2}}function KP(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(r,i),t){if(i-=r,n=n-r-1,e.e=_d(n/Bt),e.d=[],r=(n+1)%Bt,n<0&&(r+=Bt),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=Bt;r<i;)e.d.push(+t.slice(r,r+=Bt));t=t.slice(r),r=Bt-t.length}else r-=i;for(;r--;)t+="0";if(e.d.push(+t),Vt&&(e.e>zy||e.e<-zy))throw Error(YA+n)}else e.s=0,e.e=0,e.d=[0];return e}function At(e,t,n){var r,i,a,o,s,l,u,f,d=e.d;for(o=1,a=d[0];a>=10;a/=10)o++;if(r=t-o,r<0)r+=Bt,i=t,u=d[f=0];else{if(f=Math.ceil((r+1)/Bt),a=d.length,f>=a)return e;for(u=a=d[f],o=1;a>=10;a/=10)o++;r%=Bt,i=r-Bt+o}if(n!==void 0&&(a=xl(10,o-i-1),s=u/a%10|0,l=t<0||d[f+1]!==void 0||u%a,l=n<4?(s||l)&&(n==0||n==(e.s<0?3:2)):s>5||s==5&&(n==4||l||n==6&&(r>0?i>0?u/xl(10,o-i):0:d[f-1])%10&1||n==(e.s<0?8:7))),t<1||!d[0])return l?(a=cn(e),d.length=1,t=t-a-1,d[0]=xl(10,(Bt-t%Bt)%Bt),e.e=_d(-t/Bt)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(r==0?(d.length=f,a=1,f--):(d.length=f+1,a=xl(10,Bt-r),d[f]=i>0?(u/xl(10,o-i)%xl(10,i)|0)*a:0),l)for(;;)if(f==0){(d[0]+=a)==Cn&&(d[0]=1,++e.e);break}else{if(d[f]+=a,d[f]!=Cn)break;d[f--]=0,a=1}for(r=d.length;d[--r]===0;)d.pop();if(Vt&&(e.e>zy||e.e<-zy))throw Error(YA+cn(e));return e}function M4(e,t){var n,r,i,a,o,s,l,u,f,d,p=e.constructor,h=p.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new p(e),Vt?At(t,h):t;if(l=e.d,d=t.d,r=t.e,u=e.e,l=l.slice(),o=u-r,o){for(f=o<0,f?(n=l,o=-o,s=d.length):(n=d,r=u,s=l.length),i=Math.max(Math.ceil(h/Bt),s)+2,o>i&&(o=i,n.length=1),n.reverse(),i=o;i--;)n.push(0);n.reverse()}else{for(i=l.length,s=d.length,f=i<s,f&&(s=i),i=0;i<s;i++)if(l[i]!=d[i]){f=l[i]<d[i];break}o=0}for(f&&(n=l,l=d,d=n,t.s=-t.s),s=l.length,i=d.length-s;i>0;--i)l[s++]=0;for(i=d.length;i>o;){if(l[--i]<d[i]){for(a=i;a&&l[--a]===0;)l[a]=Cn-1;--l[a],l[i]+=Cn}l[i]-=d[i]}for(;l[--s]===0;)l.pop();for(;l[0]===0;l.shift())--r;return l[0]?(t.d=l,t.e=r,Vt?At(t,h):t):new p(0)}function cu(e,t,n){var r,i=cn(e),a=ga(e.d),o=a.length;return t?(n&&(r=n-o)>0?a=a.charAt(0)+"."+a.slice(1)+Zo(r):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+Zo(-i-1)+a,n&&(r=n-o)>0&&(a+=Zo(r))):i>=o?(a+=Zo(i+1-o),n&&(r=n-i-1)>0&&(a=a+"."+Zo(r))):((r=i+1)<o&&(a=a.slice(0,r)+"."+a.slice(r)),n&&(r=n-o)>0&&(i+1===o&&(a+="."),a+=Zo(r))),e.s<0?"-"+a:a}function YP(e,t){if(e.length>t)return e.length=t,!0}function P4(e){var t,n,r;function i(a){var o=this;if(!(o instanceof i))return new i(a);if(o.constructor=i,a instanceof i){o.s=a.s,o.e=a.e,o.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(Yl+a);if(a>0)o.s=1;else if(a<0)a=-a,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(a===~~a&&a<1e7){o.e=0,o.d=[a];return}return KP(o,a.toString())}else if(typeof a!="string")throw Error(Yl+a);if(a.charCodeAt(0)===45?(a=a.slice(1),o.s=-1):o.s=1,mhe.test(a))KP(o,a);else throw Error(Yl+a)}if(i.prototype=xe,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=P4,i.config=i.set=ghe,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<r.length;)e.hasOwnProperty(n=r[t++])||(e[n]=this[n]);return i.config(e),i}function ghe(e){if(!e||typeof e!="object")throw Error(Ai+"Object expected");var t,n,r,i=["precision",1,Cd,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if((r=e[n=i[t]])!==void 0)if(_d(r)===r&&r>=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error(Yl+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(Yl+n+": "+r);return this}var XA=P4(hhe);Yr=new XA(1);const Ot=XA;function vhe(e){return whe(e)||xhe(e)||bhe(e)||yhe()}function yhe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
96
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bhe(e,t){if(e){if(typeof e=="string")return QO(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return QO(e,t)}}function xhe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function whe(e){if(Array.isArray(e))return QO(e)}function QO(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var She=function(t){return t},$4={},D4=function(t){return t===$4},XP=function(t){return function n(){return arguments.length===0||arguments.length===1&&D4(arguments.length<=0?void 0:arguments[0])?n:t.apply(void 0,arguments)}},Ohe=function e(t,n){return t===1?n:XP(function(){for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];var o=i.filter(function(s){return s!==$4}).length;return o>=t?n.apply(void 0,i):e(t-o,XP(function(){for(var s=arguments.length,l=new Array(s),u=0;u<s;u++)l[u]=arguments[u];var f=i.map(function(d){return D4(d)?l.shift():d});return n.apply(void 0,vhe(f).concat(l))}))})},Hx=function(t){return Ohe(t.length,t)},ZO=function(t,n){for(var r=[],i=t;i<n;++i)r[i-t]=i;return r},jhe=Hx(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(n){return t[n]}).map(e)}),Ehe=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!n.length)return She;var i=n.reverse(),a=i[0],o=i.slice(1);return function(){return o.reduce(function(s,l){return l(s)},a.apply(void 0,arguments))}},JO=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},I4=function(t){var n=null,r=null;return function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n&&a.every(function(s,l){return s===n[l]})||(n=a,r=t.apply(void 0,a)),r}};function The(e){var t;return e===0?t=1:t=Math.floor(new Ot(e).abs().log(10).toNumber())+1,t}function Ahe(e,t,n){for(var r=new Ot(e),i=0,a=[];r.lt(t)&&i<1e5;)a.push(r.toNumber()),r=r.add(n),i++;return a}var Che=Hx(function(e,t,n){var r=+e,i=+t;return r+n*(i-r)}),_he=Hx(function(e,t,n){var r=t-+e;return r=r||1/0,(n-e)/r}),Nhe=Hx(function(e,t,n){var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))});const qx={rangeStep:Ahe,getDigitCount:The,interpolateNumber:Che,uninterpolateNumber:_he,uninterpolateTruncation:Nhe};function ej(e){return Phe(e)||Mhe(e)||k4(e)||Rhe()}function Rhe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
97
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Mhe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function Phe(e){if(Array.isArray(e))return tj(e)}function Ch(e,t){return Ihe(e)||Dhe(e,t)||k4(e,t)||$he()}function $he(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
98
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function k4(e,t){if(e){if(typeof e=="string")return tj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tj(e,t)}}function tj(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Dhe(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(r=(s=o.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(l){i=!0,a=l}finally{try{!r&&o.return!=null&&o.return()}finally{if(i)throw a}}return n}}function Ihe(e){if(Array.isArray(e))return e}function L4(e){var t=Ch(e,2),n=t[0],r=t[1],i=n,a=r;return n>r&&(i=r,a=n),[i,a]}function B4(e,t,n){if(e.lte(0))return new Ot(0);var r=qx.getDigitCount(e.toNumber()),i=new Ot(10).pow(r),a=e.div(i),o=r!==1?.05:.1,s=new Ot(Math.ceil(a.div(o).toNumber())).add(n).mul(o),l=s.mul(i);return t?l:new Ot(Math.ceil(l))}function khe(e,t,n){var r=1,i=new Ot(e);if(!i.isint()&&n){var a=Math.abs(e);a<1?(r=new Ot(10).pow(qx.getDigitCount(e)-1),i=new Ot(Math.floor(i.div(r).toNumber())).mul(r)):a>1&&(i=new Ot(Math.floor(e)))}else e===0?i=new Ot(Math.floor((t-1)/2)):n||(i=new Ot(Math.floor(e)));var o=Math.floor((t-1)/2),s=Ehe(jhe(function(l){return i.add(new Ot(l-o).mul(r)).toNumber()}),ZO);return s(0,t)}function z4(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new Ot(0),tickMin:new Ot(0),tickMax:new Ot(0)};var a=B4(new Ot(t).sub(e).div(n-1),r,i),o;e<=0&&t>=0?o=new Ot(0):(o=new Ot(e).add(t).div(2),o=o.sub(new Ot(o).mod(a)));var s=Math.ceil(o.sub(e).div(a).toNumber()),l=Math.ceil(new Ot(t).sub(o).div(a).toNumber()),u=s+l+1;return u>n?z4(e,t,n,r,i+1):(u<n&&(l=t>0?l+(n-u):l,s=t>0?s:s+(n-u)),{step:a,tickMin:o.sub(new Ot(s).mul(a)),tickMax:o.add(new Ot(l).mul(a))})}function Lhe(e){var t=Ch(e,2),n=t[0],r=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(i,2),s=L4([n,r]),l=Ch(s,2),u=l[0],f=l[1];if(u===-1/0||f===1/0){var d=f===1/0?[u].concat(ej(ZO(0,i-1).map(function(){return 1/0}))):[].concat(ej(ZO(0,i-1).map(function(){return-1/0})),[f]);return n>r?JO(d):d}if(u===f)return khe(u,i,a);var p=z4(u,f,o,a),h=p.step,b=p.tickMin,m=p.tickMax,g=qx.rangeStep(b,m.add(new Ot(.1).mul(h)),h);return n>r?JO(g):g}function Bhe(e,t){var n=Ch(e,2),r=n[0],i=n[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=L4([r,i]),s=Ch(o,2),l=s[0],u=s[1];if(l===-1/0||u===1/0)return[r,i];if(l===u)return[l];var f=Math.max(t,2),d=B4(new Ot(u).sub(l).div(f-1),a,0),p=[].concat(ej(qx.rangeStep(new Ot(l),new Ot(u).sub(new Ot(.99).mul(d)),d)),[u]);return r>i?JO(p):p}var zhe=I4(Lhe),Fhe=I4(Bhe),Uhe="Invariant failed";function fu(e,t){throw new Error(Uhe)}var Hhe=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function Mf(e){"@babel/helpers - typeof";return Mf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mf(e)}function Fy(){return Fy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fy.apply(this,arguments)}function qhe(e,t){return Yhe(e)||Khe(e,t)||Ghe(e,t)||Vhe()}function Vhe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
99
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ghe(e,t){if(e){if(typeof e=="string")return WP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return WP(e,t)}}function WP(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Khe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function Yhe(e){if(Array.isArray(e))return e}function Xhe(e,t){if(e==null)return{};var n=Whe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Whe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Qhe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Zhe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,H4(r.key),r)}}function Jhe(e,t,n){return t&&Zhe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function eme(e,t,n){return t=Uy(t),tme(e,F4()?Reflect.construct(t,n||[],Uy(e).constructor):t.apply(e,n))}function tme(e,t){if(t&&(Mf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return nme(e)}function nme(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function F4(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(F4=function(){return!!e})()}function Uy(e){return Uy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Uy(e)}function rme(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&nj(e,t)}function nj(e,t){return nj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},nj(e,t)}function U4(e,t,n){return t=H4(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function H4(e){var t=ime(e,"string");return Mf(t)=="symbol"?t:t+""}function ime(e,t){if(Mf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Mf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Vx=function(e){function t(){return Qhe(this,t),eme(this,t,arguments)}return rme(t,e),Jhe(t,[{key:"render",value:function(){var r=this.props,i=r.offset,a=r.layout,o=r.width,s=r.dataKey,l=r.data,u=r.dataPointFormatter,f=r.xAxis,d=r.yAxis,p=Xhe(r,Hhe),h=Ae(p,!1);this.props.direction==="x"&&f.type!=="number"&&fu();var b=l.map(function(m){var g=u(m,s),y=g.x,v=g.y,w=g.value,S=g.errorVal;if(!S)return null;var O=[],j,E;if(Array.isArray(S)){var T=qhe(S,2);j=T[0],E=T[1]}else j=E=S;if(a==="vertical"){var A=f.scale,C=v+i,_=C+o,N=C-o,D=A(w-j),R=A(w+E);O.push({x1:R,y1:_,x2:R,y2:N}),O.push({x1:D,y1:C,x2:R,y2:C}),O.push({x1:D,y1:_,x2:D,y2:N})}else if(a==="horizontal"){var $=d.scale,P=y+i,B=P-o,L=P+o,k=$(w-j),I=$(w+E);O.push({x1:B,y1:I,x2:L,y2:I}),O.push({x1:P,y1:k,x2:P,y2:I}),O.push({x1:B,y1:k,x2:L,y2:k})}return z.createElement(Ye,Fy({className:"recharts-errorBar",key:"bar-".concat(O.map(function(V){return"".concat(V.x1,"-").concat(V.x2,"-").concat(V.y1,"-").concat(V.y2)}))},h),O.map(function(V){return z.createElement("line",Fy({},V,{key:"line-".concat(V.x1,"-").concat(V.x2,"-").concat(V.y1,"-").concat(V.y2)}))}))});return z.createElement(Ye,{className:"recharts-errorBars"},b)}}])}(z.Component);U4(Vx,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});U4(Vx,"displayName","ErrorBar");function _h(e){"@babel/helpers - typeof";return _h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_h(e)}function QP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function fl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?QP(Object(n),!0).forEach(function(r){ame(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ame(e,t,n){return t=ome(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ome(e){var t=sme(e,"string");return _h(t)=="symbol"?t:t+""}function sme(e,t){if(_h(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(_h(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var q4=function(t){var n=t.children,r=t.formattedGraphicalItems,i=t.legendWidth,a=t.legendContent,o=qr(n,Gl);if(!o)return null;var s=Gl.defaultProps,l=s!==void 0?fl(fl({},s),o.props):{},u;return o.props&&o.props.payload?u=o.props&&o.props.payload:a==="children"?u=(r||[]).reduce(function(f,d){var p=d.item,h=d.props,b=h.sectors||h.data||[];return f.concat(b.map(function(m){return{type:o.props.iconType||p.props.legendType,value:m.name,color:m.fill,payload:m}}))},[]):u=(r||[]).map(function(f){var d=f.item,p=d.type.defaultProps,h=p!==void 0?fl(fl({},p),d.props):{},b=h.dataKey,m=h.name,g=h.legendType,y=h.hide;return{inactive:y,dataKey:b,type:l.iconType||g||"square",color:WA(d),value:m||b,payload:h}}),fl(fl(fl({},l),Gl.getWithHeight(o,i)),{},{payload:u,item:o})};function Nh(e){"@babel/helpers - typeof";return Nh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nh(e)}function ZP(e){return fme(e)||cme(e)||ume(e)||lme()}function lme(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
100
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ume(e,t){if(e){if(typeof e=="string")return rj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rj(e,t)}}function cme(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function fme(e){if(Array.isArray(e))return rj(e)}function rj(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function JP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Zt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?JP(Object(n),!0).forEach(function(r){Lc(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Lc(e,t,n){return t=dme(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dme(e){var t=pme(e,"string");return Nh(t)=="symbol"?t:t+""}function pme(e,t){if(Nh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Nh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ln(e,t,n){return Ue(e)||Ue(t)?n:Sn(t)?ti(e,t,n):Ce(t)?t(e):n}function zp(e,t,n,r){var i=che(e,function(s){return ln(s,t)});if(n==="number"){var a=i.filter(function(s){return se(s)||parseFloat(s)});return a.length?[Ux(a),gs(a)]:[1/0,-1/0]}var o=r?i.filter(function(s){return!Ue(s)}):i;return o.map(function(s){return Sn(s)||s instanceof Date?s:""})}var hme=function(t){var n,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,o=-1,s=(n=r==null?void 0:r.length)!==null&&n!==void 0?n:0;if(s<=1)return 0;if(a&&a.axisType==="angleAxis"&&Math.abs(Math.abs(a.range[1]-a.range[0])-360)<=1e-6)for(var l=a.range,u=0;u<s;u++){var f=u>0?i[u-1].coordinate:i[s-1].coordinate,d=i[u].coordinate,p=u>=s-1?i[0].coordinate:i[u+1].coordinate,h=void 0;if(Pn(d-f)!==Pn(p-d)){var b=[];if(Pn(p-d)===Pn(l[1]-l[0])){h=p;var m=d+l[1]-l[0];b[0]=Math.min(m,(m+f)/2),b[1]=Math.max(m,(m+f)/2)}else{h=f;var g=p+l[1]-l[0];b[0]=Math.min(d,(g+d)/2),b[1]=Math.max(d,(g+d)/2)}var y=[Math.min(d,(h+d)/2),Math.max(d,(h+d)/2)];if(t>y[0]&&t<=y[1]||t>=b[0]&&t<=b[1]){o=i[u].index;break}}else{var v=Math.min(f,p),w=Math.max(f,p);if(t>(v+d)/2&&t<=(w+d)/2){o=i[u].index;break}}}else for(var S=0;S<s;S++)if(S===0&&t<=(r[S].coordinate+r[S+1].coordinate)/2||S>0&&S<s-1&&t>(r[S].coordinate+r[S-1].coordinate)/2&&t<=(r[S].coordinate+r[S+1].coordinate)/2||S===s-1&&t>(r[S].coordinate+r[S-1].coordinate)/2){o=r[S].index;break}return o},WA=function(t){var n,r=t,i=r.type.displayName,a=(n=t.type)!==null&&n!==void 0&&n.defaultProps?Zt(Zt({},t.type.defaultProps),t.props):t.props,o=a.stroke,s=a.fill,l;switch(i){case"Line":l=o;break;case"Area":case"Radar":l=o&&o!=="none"?o:s;break;default:l=s;break}return l},mme=function(t){var n=t.barSize,r=t.totalSize,i=t.stackGroups,a=i===void 0?{}:i;if(!a)return{};for(var o={},s=Object.keys(a),l=0,u=s.length;l<u;l++)for(var f=a[s[l]].stackGroups,d=Object.keys(f),p=0,h=d.length;p<h;p++){var b=f[d[p]],m=b.items,g=b.cateAxisId,y=m.filter(function(E){return io(E.type).indexOf("Bar")>=0});if(y&&y.length){var v=y[0].type.defaultProps,w=v!==void 0?Zt(Zt({},v),y[0].props):y[0].props,S=w.barSize,O=w[g];o[O]||(o[O]=[]);var j=Ue(S)?n:S;o[O].push({item:y[0],stackList:y.slice(1),barSize:Ue(j)?void 0:wr(j,r,0)})}}return o},gme=function(t){var n=t.barGap,r=t.barCategoryGap,i=t.bandSize,a=t.sizeList,o=a===void 0?[]:a,s=t.maxBarSize,l=o.length;if(l<1)return null;var u=wr(n,i,0,!0),f,d=[];if(o[0].barSize===+o[0].barSize){var p=!1,h=i/l,b=o.reduce(function(S,O){return S+O.barSize||0},0);b+=(l-1)*u,b>=i&&(b-=(l-1)*u,u=0),b>=i&&h>0&&(p=!0,h*=.9,b=l*h);var m=(i-b)/2>>0,g={offset:m-u,size:0};f=o.reduce(function(S,O){var j={item:O.item,position:{offset:g.offset+g.size+u,size:p?h:O.barSize}},E=[].concat(ZP(S),[j]);return g=E[E.length-1].position,O.stackList&&O.stackList.length&&O.stackList.forEach(function(T){E.push({item:T,position:g})}),E},d)}else{var y=wr(r,i,0,!0);i-2*y-(l-1)*u<=0&&(u=0);var v=(i-2*y-(l-1)*u)/l;v>1&&(v>>=0);var w=s===+s?Math.min(v,s):v;f=o.reduce(function(S,O,j){var E=[].concat(ZP(S),[{item:O.item,position:{offset:y+(v+u)*j+(v-w)/2,size:w}}]);return O.stackList&&O.stackList.length&&O.stackList.forEach(function(T){E.push({item:T,position:E[E.length-1].position})}),E},d)}return f},vme=function(t,n,r,i){var a=r.children,o=r.width,s=r.margin,l=o-(s.left||0)-(s.right||0),u=q4({children:a,legendWidth:l});if(u){var f=i||{},d=f.width,p=f.height,h=u.align,b=u.verticalAlign,m=u.layout;if((m==="vertical"||m==="horizontal"&&b==="middle")&&h!=="center"&&se(t[h]))return Zt(Zt({},t),{},Lc({},h,t[h]+(d||0)));if((m==="horizontal"||m==="vertical"&&h==="center")&&b!=="middle"&&se(t[b]))return Zt(Zt({},t),{},Lc({},b,t[b]+(p||0)))}return t},yme=function(t,n,r){return Ue(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},V4=function(t,n,r,i,a){var o=n.props.children,s=ni(o,Vx).filter(function(u){return yme(i,a,u.props.direction)});if(s&&s.length){var l=s.map(function(u){return u.props.dataKey});return t.reduce(function(u,f){var d=ln(f,r);if(Ue(d))return u;var p=Array.isArray(d)?[Ux(d),gs(d)]:[d,d],h=l.reduce(function(b,m){var g=ln(f,m,0),y=p[0]-Math.abs(Array.isArray(g)?g[0]:g),v=p[1]+Math.abs(Array.isArray(g)?g[1]:g);return[Math.min(y,b[0]),Math.max(v,b[1])]},[1/0,-1/0]);return[Math.min(h[0],u[0]),Math.max(h[1],u[1])]},[1/0,-1/0])}return null},bme=function(t,n,r,i,a){var o=n.map(function(s){return V4(t,s,r,a,i)}).filter(function(s){return!Ue(s)});return o&&o.length?o.reduce(function(s,l){return[Math.min(s[0],l[0]),Math.max(s[1],l[1])]},[1/0,-1/0]):null},G4=function(t,n,r,i,a){var o=n.map(function(l){var u=l.props.dataKey;return r==="number"&&u&&V4(t,l,u,i)||zp(t,u,r,a)});if(r==="number")return o.reduce(function(l,u){return[Math.min(l[0],u[0]),Math.max(l[1],u[1])]},[1/0,-1/0]);var s={};return o.reduce(function(l,u){for(var f=0,d=u.length;f<d;f++)s[u[f]]||(s[u[f]]=!0,l.push(u[f]));return l},[])},K4=function(t,n){return t==="horizontal"&&n==="xAxis"||t==="vertical"&&n==="yAxis"||t==="centric"&&n==="angleAxis"||t==="radial"&&n==="radiusAxis"},Y4=function(t,n,r,i){if(i)return t.map(function(l){return l.coordinate});var a,o,s=t.map(function(l){return l.coordinate===n&&(a=!0),l.coordinate===r&&(o=!0),l.coordinate});return a||s.push(n),o||s.push(r),s},eo=function(t,n,r){if(!t)return null;var i=t.scale,a=t.duplicateDomain,o=t.type,s=t.range,l=t.realScaleType==="scaleBand"?i.bandwidth()/2:2,u=(n||r)&&o==="category"&&i.bandwidth?i.bandwidth()/l:0;if(u=t.axisType==="angleAxis"&&(s==null?void 0:s.length)>=2?Pn(s[0]-s[1])*2*u:u,n&&(t.ticks||t.niceTicks)){var f=(t.ticks||t.niceTicks).map(function(d){var p=a?a.indexOf(d):d;return{coordinate:i(p)+u,value:d,offset:u}});return f.filter(function(d){return!wd(d.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(d,p){return{coordinate:i(d)+u,value:d,index:p,offset:u}}):i.ticks&&!r?i.ticks(t.tickCount).map(function(d){return{coordinate:i(d)+u,value:d,offset:u}}):i.domain().map(function(d,p){return{coordinate:i(d)+u,value:a?a[d]:d,index:p,offset:u}})},Xw=new WeakMap,jg=function(t,n){if(typeof n!="function")return t;Xw.has(t)||Xw.set(t,new WeakMap);var r=Xw.get(t);if(r.has(n))return r.get(n);var i=function(){t.apply(void 0,arguments),n.apply(void 0,arguments)};return r.set(n,i),i},X4=function(t,n,r){var i=t.scale,a=t.type,o=t.layout,s=t.axisType;if(i==="auto")return o==="radial"&&s==="radiusAxis"?{scale:Sh(),realScaleType:"band"}:o==="radial"&&s==="angleAxis"?{scale:Iy(),realScaleType:"linear"}:a==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:Bp(),realScaleType:"point"}:a==="category"?{scale:Sh(),realScaleType:"band"}:{scale:Iy(),realScaleType:"linear"};if(su(i)){var l="scale".concat(Cx(i));return{scale:(GP[l]||Bp)(),realScaleType:GP[l]?l:"point"}}return Ce(i)?{scale:i}:{scale:Bp(),realScaleType:"point"}},e2=1e-4,W4=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,i=t.range(),a=Math.min(i[0],i[1])-e2,o=Math.max(i[0],i[1])+e2,s=t(n[0]),l=t(n[r-1]);(s<a||s>o||l<a||l>o)&&t.domain([n[0],n[r-1]])}},Q4=function(t,n){if(!t)return null;for(var r=0,i=t.length;r<i;r++)if(t[r].item===n)return t[r].position;return null},Z4=function(t,n){if(!n||n.length!==2||!se(n[0])||!se(n[1]))return t;var r=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]),a=[t[0],t[1]];return(!se(t[0])||t[0]<r)&&(a[0]=r),(!se(t[1])||t[1]>i)&&(a[1]=i),a[0]>i&&(a[0]=i),a[1]<r&&(a[1]=r),a},xme=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r<i;++r)for(var a=0,o=0,s=0;s<n;++s){var l=wd(t[s][r][1])?t[s][r][0]:t[s][r][1];l>=0?(t[s][r][0]=a,t[s][r][1]=a+l,a=t[s][r][1]):(t[s][r][0]=o,t[s][r][1]=o+l,o=t[s][r][1])}},wme=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r<i;++r)for(var a=0,o=0;o<n;++o){var s=wd(t[o][r][1])?t[o][r][0]:t[o][r][1];s>=0?(t[o][r][0]=a,t[o][r][1]=a+s,a=t[o][r][1]):(t[o][r][0]=0,t[o][r][1]=0)}},Sme={sign:xme,expand:Ute,none:jf,silhouette:Hte,wiggle:qte,positive:wme},Ome=function(t,n,r){var i=n.map(function(s){return s.props.dataKey}),a=Sme[r],o=Fte().keys(i).value(function(s,l){return+ln(s,l,0)}).order(CO).offset(a);return o(t)},jme=function(t,n,r,i,a,o){if(!t)return null;var s=o?n.reverse():n,l={},u=s.reduce(function(d,p){var h,b=(h=p.type)!==null&&h!==void 0&&h.defaultProps?Zt(Zt({},p.type.defaultProps),p.props):p.props,m=b.stackId,g=b.hide;if(g)return d;var y=b[r],v=d[y]||{hasStack:!1,stackGroups:{}};if(Sn(m)){var w=v.stackGroups[m]||{numericAxisId:r,cateAxisId:i,items:[]};w.items.push(p),v.hasStack=!0,v.stackGroups[m]=w}else v.stackGroups[Sd("_stackId_")]={numericAxisId:r,cateAxisId:i,items:[p]};return Zt(Zt({},d),{},Lc({},y,v))},l),f={};return Object.keys(u).reduce(function(d,p){var h=u[p];if(h.hasStack){var b={};h.stackGroups=Object.keys(h.stackGroups).reduce(function(m,g){var y=h.stackGroups[g];return Zt(Zt({},m),{},Lc({},g,{numericAxisId:r,cateAxisId:i,items:y.items,stackedData:Ome(t,y.items,a)}))},b)}return Zt(Zt({},d),{},Lc({},p,h))},f)},J4=function(t,n){var r=n.realScaleType,i=n.type,a=n.tickCount,o=n.originalDomain,s=n.allowDecimals,l=r||n.scale;if(l!=="auto"&&l!=="linear")return null;if(a&&i==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var u=t.domain();if(!u.length)return null;var f=zhe(u,a,s);return t.domain([Ux(f),gs(f)]),{niceTicks:f}}if(a&&i==="number"){var d=t.domain(),p=Fhe(d,a,s);return{niceTicks:p}}return null};function t2(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&&!Ue(i[t.dataKey])){var s=hy(n,"value",i[t.dataKey]);if(s)return s.coordinate+r/2}return n[a]?n[a].coordinate+r/2:null}var l=ln(i,Ue(o)?t.dataKey:o);return Ue(l)?null:t.scale(l)}var Hy=function(t){var n=t.axis,r=t.ticks,i=t.offset,a=t.bandSize,o=t.entry,s=t.index;if(n.type==="category")return r[s]?r[s].coordinate+i:null;var l=ln(o,n.dataKey,n.domain[s]);return Ue(l)?null:n.scale(l)-a/2+i},eF=function(t){var n=t.numericAxis,r=n.scale.domain();if(n.type==="number"){var i=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]);return i<=0&&a>=0?0:a<0?a:i}return r[0]},Eme=function(t,n){var r,i=(r=t.type)!==null&&r!==void 0&&r.defaultProps?Zt(Zt({},t.type.defaultProps),t.props):t.props,a=i.stackId;if(Sn(a)){var o=n[a];if(o){var s=o.items.indexOf(t);return s>=0?o.stackedData[s]:null}}return null},Tme=function(t){return t.reduce(function(n,r){return[Ux(r.concat([n[0]]).filter(se)),gs(r.concat([n[1]]).filter(se))]},[1/0,-1/0])},tF=function(t,n,r){return Object.keys(t).reduce(function(i,a){var o=t[a],s=o.stackedData,l=s.reduce(function(u,f){var d=Tme(f.slice(n,r+1));return[Math.min(u[0],d[0]),Math.max(u[1],d[1])]},[1/0,-1/0]);return[Math.min(l[0],i[0]),Math.max(l[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},n2=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,r2=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,ij=function(t,n,r){if(Ce(t))return t(n,r);if(!Array.isArray(t))return n;var i=[];if(se(t[0]))i[0]=r?t[0]:Math.min(t[0],n[0]);else if(n2.test(t[0])){var a=+n2.exec(t[0])[1];i[0]=n[0]-a}else Ce(t[0])?i[0]=t[0](n[0]):i[0]=n[0];if(se(t[1]))i[1]=r?t[1]:Math.max(t[1],n[1]);else if(r2.test(t[1])){var o=+r2.exec(t[1])[1];i[1]=n[1]+o}else Ce(t[1])?i[1]=t[1](n[1]):i[1]=n[1];return i},qy=function(t,n,r){if(t&&t.scale&&t.scale.bandwidth){var i=t.scale.bandwidth();if(!r||i>0)return i}if(t&&n&&n.length>=2){for(var a=jA(n,function(d){return d.coordinate}),o=1/0,s=1,l=a.length;s<l;s++){var u=a[s],f=a[s-1];o=Math.min((u.coordinate||0)-(f.coordinate||0),o)}return o===1/0?0:o}return r?void 0:0},i2=function(t,n,r){return!t||!t.length||uu(t,ti(r,"type.defaultProps.domain"))?n:t},QA=function(t,n){var r=t.type.defaultProps?Zt(Zt({},t.type.defaultProps),t.props):t.props,i=r.dataKey,a=r.name,o=r.unit,s=r.formatter,l=r.tooltipType,u=r.chartType,f=r.hide;return Zt(Zt({},Ae(t,!1)),{},{dataKey:i,unit:o,formatter:s,name:a||i,color:WA(t),value:ln(n,i),type:l,payload:n,chartType:u,hide:f})};function Rh(e){"@babel/helpers - typeof";return Rh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rh(e)}function a2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function qa(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?a2(Object(n),!0).forEach(function(r){nF(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function nF(e,t,n){return t=Ame(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ame(e){var t=Cme(e,"string");return Rh(t)=="symbol"?t:t+""}function Cme(e,t){if(Rh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Rh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _me(e,t){return Pme(e)||Mme(e,t)||Rme(e,t)||Nme()}function Nme(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
101
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Rme(e,t){if(e){if(typeof e=="string")return o2(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o2(e,t)}}function o2(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Mme(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function Pme(e){if(Array.isArray(e))return e}var Vy=Math.PI/180,$me=function(t){return t*180/Math.PI},Ct=function(t,n,r,i){return{x:t+Math.cos(-Vy*i)*r,y:n+Math.sin(-Vy*i)*r}},rF=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(r.left||0)-(r.right||0)),Math.abs(n-(r.top||0)-(r.bottom||0)))/2},iF=function(t,n,r,i,a){var o=t.width,s=t.height,l=t.startAngle,u=t.endAngle,f=wr(t.cx,o,o/2),d=wr(t.cy,s,s/2),p=rF(o,s,r),h=wr(t.innerRadius,p,0),b=wr(t.outerRadius,p,p*.8),m=Object.keys(n);return m.reduce(function(g,y){var v=n[y],w=v.domain,S=v.reversed,O;if(Ue(v.range))i==="angleAxis"?O=[l,u]:i==="radiusAxis"&&(O=[h,b]),S&&(O=[O[1],O[0]]);else{O=v.range;var j=O,E=_me(j,2);l=E[0],u=E[1]}var T=X4(v,a),A=T.realScaleType,C=T.scale;C.domain(w).range(O),W4(C);var _=J4(C,qa(qa({},v),{},{realScaleType:A})),N=qa(qa(qa({},v),_),{},{range:O,radius:b,realScaleType:A,scale:C,cx:f,cy:d,innerRadius:h,outerRadius:b,startAngle:l,endAngle:u});return qa(qa({},g),{},nF({},y,N))},{})},Dme=function(t,n){var r=t.x,i=t.y,a=n.x,o=n.y;return Math.sqrt(Math.pow(r-a,2)+Math.pow(i-o,2))},Ime=function(t,n){var r=t.x,i=t.y,a=n.cx,o=n.cy,s=Dme({x:r,y:i},{x:a,y:o});if(s<=0)return{radius:s};var l=(r-a)/s,u=Math.acos(l);return i>o&&(u=2*Math.PI-u),{radius:s,angle:$me(u),angleInRadian:u}},kme=function(t){var n=t.startAngle,r=t.endAngle,i=Math.floor(n/360),a=Math.floor(r/360),o=Math.min(i,a);return{startAngle:n-o*360,endAngle:r-o*360}},Lme=function(t,n){var r=n.startAngle,i=n.endAngle,a=Math.floor(r/360),o=Math.floor(i/360),s=Math.min(a,o);return t+s*360},s2=function(t,n){var r=t.x,i=t.y,a=Ime({x:r,y:i},n),o=a.radius,s=a.angle,l=n.innerRadius,u=n.outerRadius;if(o<l||o>u)return!1;if(o===0)return!0;var f=kme(n),d=f.startAngle,p=f.endAngle,h=s,b;if(d<=p){for(;h>p;)h-=360;for(;h<d;)h+=360;b=h>=d&&h<=p}else{for(;h>d;)h-=360;for(;h<p;)h+=360;b=h>=p&&h<=d}return b?qa(qa({},n),{},{radius:o,angle:Lme(h,n)}):null},aF=function(t){return!x.isValidElement(t)&&!Ce(t)&&typeof t!="boolean"?t.className:""};function Mh(e){"@babel/helpers - typeof";return Mh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mh(e)}var Bme=["offset"];function zme(e){return qme(e)||Hme(e)||Ume(e)||Fme()}function Fme(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
102
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ume(e,t){if(e){if(typeof e=="string")return aj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return aj(e,t)}}function Hme(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function qme(e){if(Array.isArray(e))return aj(e)}function aj(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Vme(e,t){if(e==null)return{};var n=Gme(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Gme(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function l2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function gn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?l2(Object(n),!0).forEach(function(r){Kme(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Kme(e,t,n){return t=Yme(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yme(e){var t=Xme(e,"string");return Mh(t)=="symbol"?t:t+""}function Xme(e,t){if(Mh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Mh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ph(){return Ph=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ph.apply(this,arguments)}var Wme=function(t){var n=t.value,r=t.formatter,i=Ue(t.children)?n:t.children;return Ce(r)?r(i):i},Qme=function(t,n){var r=Pn(n-t),i=Math.min(Math.abs(n-t),360);return r*i},Zme=function(t,n,r){var i=t.position,a=t.viewBox,o=t.offset,s=t.className,l=a,u=l.cx,f=l.cy,d=l.innerRadius,p=l.outerRadius,h=l.startAngle,b=l.endAngle,m=l.clockWise,g=(d+p)/2,y=Qme(h,b),v=y>=0?1:-1,w,S;i==="insideStart"?(w=h+v*o,S=m):i==="insideEnd"?(w=b-v*o,S=!m):i==="end"&&(w=b+v*o,S=m),S=y<=0?S:!S;var O=Ct(u,f,g,w),j=Ct(u,f,g,w+(S?1:-1)*359),E="M".concat(O.x,",").concat(O.y,`
|
|
103
|
+
A`).concat(g,",").concat(g,",0,1,").concat(S?0:1,`,
|
|
104
|
+
`).concat(j.x,",").concat(j.y),T=Ue(t.id)?Sd("recharts-radial-line-"):t.id;return z.createElement("text",Ph({},r,{dominantBaseline:"central",className:ke("recharts-radial-bar-label",s)}),z.createElement("defs",null,z.createElement("path",{id:T,d:E})),z.createElement("textPath",{xlinkHref:"#".concat(T)},n))},Jme=function(t){var n=t.viewBox,r=t.offset,i=t.position,a=n,o=a.cx,s=a.cy,l=a.innerRadius,u=a.outerRadius,f=a.startAngle,d=a.endAngle,p=(f+d)/2;if(i==="outside"){var h=Ct(o,s,u+r,p),b=h.x,m=h.y;return{x:b,y:m,textAnchor:b>=o?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"end"};var g=(l+u)/2,y=Ct(o,s,g,p),v=y.x,w=y.y;return{x:v,y:w,textAnchor:"middle",verticalAnchor:"middle"}},ege=function(t){var n=t.viewBox,r=t.parentViewBox,i=t.offset,a=t.position,o=n,s=o.x,l=o.y,u=o.width,f=o.height,d=f>=0?1:-1,p=d*i,h=d>0?"end":"start",b=d>0?"start":"end",m=u>=0?1:-1,g=m*i,y=m>0?"end":"start",v=m>0?"start":"end";if(a==="top"){var w={x:s+u/2,y:l-d*i,textAnchor:"middle",verticalAnchor:h};return gn(gn({},w),r?{height:Math.max(l-r.y,0),width:u}:{})}if(a==="bottom"){var S={x:s+u/2,y:l+f+p,textAnchor:"middle",verticalAnchor:b};return gn(gn({},S),r?{height:Math.max(r.y+r.height-(l+f),0),width:u}:{})}if(a==="left"){var O={x:s-g,y:l+f/2,textAnchor:y,verticalAnchor:"middle"};return gn(gn({},O),r?{width:Math.max(O.x-r.x,0),height:f}:{})}if(a==="right"){var j={x:s+u+g,y:l+f/2,textAnchor:v,verticalAnchor:"middle"};return gn(gn({},j),r?{width:Math.max(r.x+r.width-j.x,0),height:f}:{})}var E=r?{width:u,height:f}:{};return a==="insideLeft"?gn({x:s+g,y:l+f/2,textAnchor:v,verticalAnchor:"middle"},E):a==="insideRight"?gn({x:s+u-g,y:l+f/2,textAnchor:y,verticalAnchor:"middle"},E):a==="insideTop"?gn({x:s+u/2,y:l+p,textAnchor:"middle",verticalAnchor:b},E):a==="insideBottom"?gn({x:s+u/2,y:l+f-p,textAnchor:"middle",verticalAnchor:h},E):a==="insideTopLeft"?gn({x:s+g,y:l+p,textAnchor:v,verticalAnchor:b},E):a==="insideTopRight"?gn({x:s+u-g,y:l+p,textAnchor:y,verticalAnchor:b},E):a==="insideBottomLeft"?gn({x:s+g,y:l+f-p,textAnchor:v,verticalAnchor:h},E):a==="insideBottomRight"?gn({x:s+u-g,y:l+f-p,textAnchor:y,verticalAnchor:h},E):vd(a)&&(se(a.x)||El(a.x))&&(se(a.y)||El(a.y))?gn({x:s+wr(a.x,u),y:l+wr(a.y,f),textAnchor:"end",verticalAnchor:"end"},E):gn({x:s+u/2,y:l+f/2,textAnchor:"middle",verticalAnchor:"middle"},E)},tge=function(t){return"cx"in t&&se(t.cx)};function Rn(e){var t=e.offset,n=t===void 0?5:t,r=Vme(e,Bme),i=gn({offset:n},r),a=i.viewBox,o=i.position,s=i.value,l=i.children,u=i.content,f=i.className,d=f===void 0?"":f,p=i.textBreakAll;if(!a||Ue(s)&&Ue(l)&&!x.isValidElement(u)&&!Ce(u))return null;if(x.isValidElement(u))return x.cloneElement(u,i);var h;if(Ce(u)){if(h=x.createElement(u,i),x.isValidElement(h))return h}else h=Wme(i);var b=tge(a),m=Ae(i,!0);if(b&&(o==="insideStart"||o==="insideEnd"||o==="end"))return Zme(i,h,m);var g=b?Jme(i):ege(i);return z.createElement(lu,Ph({className:ke("recharts-label",d)},m,g,{breakAll:p}),h)}Rn.displayName="Label";var oF=function(t){var n=t.cx,r=t.cy,i=t.angle,a=t.startAngle,o=t.endAngle,s=t.r,l=t.radius,u=t.innerRadius,f=t.outerRadius,d=t.x,p=t.y,h=t.top,b=t.left,m=t.width,g=t.height,y=t.clockWise,v=t.labelViewBox;if(v)return v;if(se(m)&&se(g)){if(se(d)&&se(p))return{x:d,y:p,width:m,height:g};if(se(h)&&se(b))return{x:h,y:b,width:m,height:g}}return se(d)&&se(p)?{x:d,y:p,width:0,height:0}:se(n)&&se(r)?{cx:n,cy:r,startAngle:a||i||0,endAngle:o||i||0,innerRadius:u||0,outerRadius:f||l||s||0,clockWise:y}:t.viewBox?t.viewBox:{}},nge=function(t,n){return t?t===!0?z.createElement(Rn,{key:"label-implicit",viewBox:n}):Sn(t)?z.createElement(Rn,{key:"label-implicit",viewBox:n,value:t}):x.isValidElement(t)?t.type===Rn?x.cloneElement(t,{key:"label-implicit",viewBox:n}):z.createElement(Rn,{key:"label-implicit",content:t,viewBox:n}):Ce(t)?z.createElement(Rn,{key:"label-implicit",content:t,viewBox:n}):vd(t)?z.createElement(Rn,Ph({viewBox:n},t,{key:"label-implicit"})):null:null},rge=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&r&&!t.label)return null;var i=t.children,a=oF(t),o=ni(i,Rn).map(function(l,u){return x.cloneElement(l,{viewBox:n||a,key:"label-".concat(u)})});if(!r)return o;var s=nge(t.label,n||a);return[s].concat(zme(o))};Rn.parseViewBox=oF;Rn.renderCallByParent=rge;function ige(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var age=ige;const oge=vt(age);function $h(e){"@babel/helpers - typeof";return $h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$h(e)}var sge=["valueAccessor"],lge=["data","dataKey","clockWise","id","textBreakAll"];function uge(e){return pge(e)||dge(e)||fge(e)||cge()}function cge(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
105
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fge(e,t){if(e){if(typeof e=="string")return oj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return oj(e,t)}}function dge(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function pge(e){if(Array.isArray(e))return oj(e)}function oj(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Gy(){return Gy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Gy.apply(this,arguments)}function u2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function c2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?u2(Object(n),!0).forEach(function(r){hge(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function hge(e,t,n){return t=mge(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mge(e){var t=gge(e,"string");return $h(t)=="symbol"?t:t+""}function gge(e,t){if($h(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if($h(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function f2(e,t){if(e==null)return{};var n=vge(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function vge(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var yge=function(t){return Array.isArray(t.value)?oge(t.value):t.value};function Sa(e){var t=e.valueAccessor,n=t===void 0?yge:t,r=f2(e,sge),i=r.data,a=r.dataKey,o=r.clockWise,s=r.id,l=r.textBreakAll,u=f2(r,lge);return!i||!i.length?null:z.createElement(Ye,{className:"recharts-label-list"},i.map(function(f,d){var p=Ue(a)?n(f,d):ln(f&&f.payload,a),h=Ue(s)?{}:{id:"".concat(s,"-").concat(d)};return z.createElement(Rn,Gy({},Ae(f,!0),u,h,{parentViewBox:f.parentViewBox,value:p,textBreakAll:l,viewBox:Rn.parseViewBox(Ue(o)?f:c2(c2({},f),{},{clockWise:o})),key:"label-".concat(d),index:d}))}))}Sa.displayName="LabelList";function bge(e,t){return e?e===!0?z.createElement(Sa,{key:"labelList-implicit",data:t}):z.isValidElement(e)||Ce(e)?z.createElement(Sa,{key:"labelList-implicit",data:t,content:e}):vd(e)?z.createElement(Sa,Gy({data:t},e,{key:"labelList-implicit"})):null:null}function xge(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var r=e.children,i=ni(r,Sa).map(function(o,s){return x.cloneElement(o,{data:t,key:"labelList-".concat(s)})});if(!n)return i;var a=bge(e.label,t);return[a].concat(uge(i))}Sa.renderCallByParent=xge;function Dh(e){"@babel/helpers - typeof";return Dh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Dh(e)}function sj(){return sj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},sj.apply(this,arguments)}function d2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function p2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?d2(Object(n),!0).forEach(function(r){wge(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function wge(e,t,n){return t=Sge(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Sge(e){var t=Oge(e,"string");return Dh(t)=="symbol"?t:t+""}function Oge(e,t){if(Dh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Dh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var jge=function(t,n){var r=Pn(n-t),i=Math.min(Math.abs(n-t),359.999);return r*i},Eg=function(t){var n=t.cx,r=t.cy,i=t.radius,a=t.angle,o=t.sign,s=t.isExternal,l=t.cornerRadius,u=t.cornerIsExternal,f=l*(s?1:-1)+i,d=Math.asin(l/f)/Vy,p=u?a:a+o*d,h=Ct(n,r,f,p),b=Ct(n,r,i,p),m=u?a-o*d:a,g=Ct(n,r,f*Math.cos(d*Vy),m);return{center:h,circleTangency:b,lineTangency:g,theta:d}},sF=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.startAngle,s=t.endAngle,l=jge(o,s),u=o+l,f=Ct(n,r,a,o),d=Ct(n,r,a,u),p="M ".concat(f.x,",").concat(f.y,`
|
|
106
|
+
A `).concat(a,",").concat(a,`,0,
|
|
107
|
+
`).concat(+(Math.abs(l)>180),",").concat(+(o>u),`,
|
|
108
|
+
`).concat(d.x,",").concat(d.y,`
|
|
109
|
+
`);if(i>0){var h=Ct(n,r,i,o),b=Ct(n,r,i,u);p+="L ".concat(b.x,",").concat(b.y,`
|
|
110
|
+
A `).concat(i,",").concat(i,`,0,
|
|
111
|
+
`).concat(+(Math.abs(l)>180),",").concat(+(o<=u),`,
|
|
112
|
+
`).concat(h.x,",").concat(h.y," Z")}else p+="L ".concat(n,",").concat(r," Z");return p},Ege=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.cornerRadius,s=t.forceCornerRadius,l=t.cornerIsExternal,u=t.startAngle,f=t.endAngle,d=Pn(f-u),p=Eg({cx:n,cy:r,radius:a,angle:u,sign:d,cornerRadius:o,cornerIsExternal:l}),h=p.circleTangency,b=p.lineTangency,m=p.theta,g=Eg({cx:n,cy:r,radius:a,angle:f,sign:-d,cornerRadius:o,cornerIsExternal:l}),y=g.circleTangency,v=g.lineTangency,w=g.theta,S=l?Math.abs(u-f):Math.abs(u-f)-m-w;if(S<0)return s?"M ".concat(b.x,",").concat(b.y,`
|
|
113
|
+
a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0
|
|
114
|
+
a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0
|
|
115
|
+
`):sF({cx:n,cy:r,innerRadius:i,outerRadius:a,startAngle:u,endAngle:f});var O="M ".concat(b.x,",").concat(b.y,`
|
|
116
|
+
A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(h.x,",").concat(h.y,`
|
|
117
|
+
A`).concat(a,",").concat(a,",0,").concat(+(S>180),",").concat(+(d<0),",").concat(y.x,",").concat(y.y,`
|
|
118
|
+
A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(v.x,",").concat(v.y,`
|
|
119
|
+
`);if(i>0){var j=Eg({cx:n,cy:r,radius:i,angle:u,sign:d,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),E=j.circleTangency,T=j.lineTangency,A=j.theta,C=Eg({cx:n,cy:r,radius:i,angle:f,sign:-d,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),_=C.circleTangency,N=C.lineTangency,D=C.theta,R=l?Math.abs(u-f):Math.abs(u-f)-A-D;if(R<0&&o===0)return"".concat(O,"L").concat(n,",").concat(r,"Z");O+="L".concat(N.x,",").concat(N.y,`
|
|
120
|
+
A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(_.x,",").concat(_.y,`
|
|
121
|
+
A`).concat(i,",").concat(i,",0,").concat(+(R>180),",").concat(+(d>0),",").concat(E.x,",").concat(E.y,`
|
|
122
|
+
A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(T.x,",").concat(T.y,"Z")}else O+="L".concat(n,",").concat(r,"Z");return O},Tge={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},lF=function(t){var n=p2(p2({},Tge),t),r=n.cx,i=n.cy,a=n.innerRadius,o=n.outerRadius,s=n.cornerRadius,l=n.forceCornerRadius,u=n.cornerIsExternal,f=n.startAngle,d=n.endAngle,p=n.className;if(o<a||f===d)return null;var h=ke("recharts-sector",p),b=o-a,m=wr(s,b,0,!0),g;return m>0&&Math.abs(f-d)<360?g=Ege({cx:r,cy:i,innerRadius:a,outerRadius:o,cornerRadius:Math.min(m,b/2),forceCornerRadius:l,cornerIsExternal:u,startAngle:f,endAngle:d}):g=sF({cx:r,cy:i,innerRadius:a,outerRadius:o,startAngle:f,endAngle:d}),z.createElement("path",sj({},Ae(n,!0),{className:h,d:g,role:"img"}))};function Ih(e){"@babel/helpers - typeof";return Ih=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ih(e)}function lj(){return lj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},lj.apply(this,arguments)}function h2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function m2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?h2(Object(n),!0).forEach(function(r){Age(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Age(e,t,n){return t=Cge(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Cge(e){var t=_ge(e,"string");return Ih(t)=="symbol"?t:t+""}function _ge(e,t){if(Ih(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ih(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var g2={curveBasisClosed:Nte,curveBasisOpen:Rte,curveBasis:_te,curveBumpX:mte,curveBumpY:gte,curveLinearClosed:Mte,curveLinear:Nx,curveMonotoneX:Pte,curveMonotoneY:$te,curveNatural:Dte,curveStep:Ite,curveStepAfter:Lte,curveStepBefore:kte},Tg=function(t){return t.x===+t.x&&t.y===+t.y},ep=function(t){return t.x},tp=function(t){return t.y},Nge=function(t,n){if(Ce(t))return t;var r="curve".concat(Cx(t));return(r==="curveMonotone"||r==="curveBump")&&n?g2["".concat(r).concat(n==="vertical"?"Y":"X")]:g2[r]||Nx},Rge=function(t){var n=t.type,r=n===void 0?"linear":n,i=t.points,a=i===void 0?[]:i,o=t.baseLine,s=t.layout,l=t.connectNulls,u=l===void 0?!1:l,f=Nge(r,s),d=u?a.filter(function(m){return Tg(m)}):a,p;if(Array.isArray(o)){var h=u?o.filter(function(m){return Tg(m)}):o,b=d.map(function(m,g){return m2(m2({},m),{},{base:h[g]})});return s==="vertical"?p=gg().y(tp).x1(ep).x0(function(m){return m.base.x}):p=gg().x(ep).y1(tp).y0(function(m){return m.base.y}),p.defined(Tg).curve(f),p(b)}return s==="vertical"&&se(o)?p=gg().y(tp).x1(ep).x0(o):se(o)?p=gg().x(ep).y1(tp).y0(o):p=ez().x(ep).y(tp),p.defined(Tg).curve(f),p(d)},Bc=function(t){var n=t.className,r=t.points,i=t.path,a=t.pathRef;if((!r||!r.length)&&!i)return null;var o=r&&r.length?Rge(t):i;return x.createElement("path",lj({},Ae(t,!1),my(t),{className:ke("recharts-curve",n),d:o,ref:a}))},uF={exports:{}},Mge="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Pge=Mge,$ge=Pge;function cF(){}function fF(){}fF.resetWarningCache=cF;var Dge=function(){function e(r,i,a,o,s,l){if(l!==$ge){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:fF,resetWarningCache:cF};return n.PropTypes=n,n};uF.exports=Dge();var Ige=uF.exports;const mt=vt(Ige),{getOwnPropertyNames:kge,getOwnPropertySymbols:Lge}=Object,{hasOwnProperty:Bge}=Object.prototype;function Ww(e,t){return function(r,i,a){return e(r,i,a)&&t(r,i,a)}}function Ag(e){return function(n,r,i){if(!n||!r||typeof n!="object"||typeof r!="object")return e(n,r,i);const{cache:a}=i,o=a.get(n),s=a.get(r);if(o&&s)return o===r&&s===n;a.set(n,r),a.set(r,n);const l=e(n,r,i);return a.delete(n),a.delete(r),l}}function zge(e){return e!=null?e[Symbol.toStringTag]:void 0}function v2(e){return kge(e).concat(Lge(e))}const Fge=Object.hasOwn||((e,t)=>Bge.call(e,t));function $u(e,t){return e===t||!e&&!t&&e!==e&&t!==t}const Uge="__v",Hge="__o",qge="_owner",{getOwnPropertyDescriptor:y2,keys:b2}=Object;function Vge(e,t){return e.byteLength===t.byteLength&&Ky(new Uint8Array(e),new Uint8Array(t))}function Gge(e,t,n){let r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function Kge(e,t){return e.byteLength===t.byteLength&&Ky(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function Yge(e,t){return $u(e.getTime(),t.getTime())}function Xge(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function Wge(e,t){return e===t}function x2(e,t,n){const r=e.size;if(r!==t.size)return!1;if(!r)return!0;const i=new Array(r),a=e.entries();let o,s,l=0;for(;(o=a.next())&&!o.done;){const u=t.entries();let f=!1,d=0;for(;(s=u.next())&&!s.done;){if(i[d]){d++;continue}const p=o.value,h=s.value;if(n.equals(p[0],h[0],l,d,e,t,n)&&n.equals(p[1],h[1],p[0],h[0],e,t,n)){f=i[d]=!0;break}d++}if(!f)return!1;l++}return!0}const Qge=$u;function Zge(e,t,n){const r=b2(e);let i=r.length;if(b2(t).length!==i)return!1;for(;i-- >0;)if(!dF(e,t,n,r[i]))return!1;return!0}function np(e,t,n){const r=v2(e);let i=r.length;if(v2(t).length!==i)return!1;let a,o,s;for(;i-- >0;)if(a=r[i],!dF(e,t,n,a)||(o=y2(e,a),s=y2(t,a),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function Jge(e,t){return $u(e.valueOf(),t.valueOf())}function eve(e,t){return e.source===t.source&&e.flags===t.flags}function w2(e,t,n){const r=e.size;if(r!==t.size)return!1;if(!r)return!0;const i=new Array(r),a=e.values();let o,s;for(;(o=a.next())&&!o.done;){const l=t.values();let u=!1,f=0;for(;(s=l.next())&&!s.done;){if(!i[f]&&n.equals(o.value,s.value,o.value,s.value,e,t,n)){u=i[f]=!0;break}f++}if(!u)return!1}return!0}function Ky(e,t){let n=e.byteLength;if(t.byteLength!==n||e.byteOffset!==t.byteOffset)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function tve(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function dF(e,t,n,r){return(r===qge||r===Hge||r===Uge)&&(e.$$typeof||t.$$typeof)?!0:Fge(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}const nve="[object ArrayBuffer]",rve="[object Arguments]",ive="[object Boolean]",ave="[object DataView]",ove="[object Date]",sve="[object Error]",lve="[object Map]",uve="[object Number]",cve="[object Object]",fve="[object RegExp]",dve="[object Set]",pve="[object String]",hve={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},mve="[object URL]",gve=Object.prototype.toString;function vve({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:i,areFunctionsEqual:a,areMapsEqual:o,areNumbersEqual:s,areObjectsEqual:l,arePrimitiveWrappersEqual:u,areRegExpsEqual:f,areSetsEqual:d,areTypedArraysEqual:p,areUrlsEqual:h,unknownTagComparators:b}){return function(g,y,v){if(g===y)return!0;if(g==null||y==null)return!1;const w=typeof g;if(w!==typeof y)return!1;if(w!=="object")return w==="number"?s(g,y,v):w==="function"?a(g,y,v):!1;const S=g.constructor;if(S!==y.constructor)return!1;if(S===Object)return l(g,y,v);if(Array.isArray(g))return t(g,y,v);if(S===Date)return r(g,y,v);if(S===RegExp)return f(g,y,v);if(S===Map)return o(g,y,v);if(S===Set)return d(g,y,v);const O=gve.call(g);if(O===ove)return r(g,y,v);if(O===fve)return f(g,y,v);if(O===lve)return o(g,y,v);if(O===dve)return d(g,y,v);if(O===cve)return typeof g.then!="function"&&typeof y.then!="function"&&l(g,y,v);if(O===mve)return h(g,y,v);if(O===sve)return i(g,y,v);if(O===rve)return l(g,y,v);if(hve[O])return p(g,y,v);if(O===nve)return e(g,y,v);if(O===ave)return n(g,y,v);if(O===ive||O===uve||O===pve)return u(g,y,v);if(b){let j=b[O];if(!j){const E=zge(g);E&&(j=b[E])}if(j)return j(g,y,v)}return!1}}function yve({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:Vge,areArraysEqual:n?np:Gge,areDataViewsEqual:Kge,areDatesEqual:Yge,areErrorsEqual:Xge,areFunctionsEqual:Wge,areMapsEqual:n?Ww(x2,np):x2,areNumbersEqual:Qge,areObjectsEqual:n?np:Zge,arePrimitiveWrappersEqual:Jge,areRegExpsEqual:eve,areSetsEqual:n?Ww(w2,np):w2,areTypedArraysEqual:n?Ww(Ky,np):Ky,areUrlsEqual:tve,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){const i=Ag(r.areArraysEqual),a=Ag(r.areMapsEqual),o=Ag(r.areObjectsEqual),s=Ag(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:i,areMapsEqual:a,areObjectsEqual:o,areSetsEqual:s})}return r}function bve(e){return function(t,n,r,i,a,o,s){return e(t,n,s)}}function xve({circular:e,comparator:t,createState:n,equals:r,strict:i}){if(n)return function(s,l){const{cache:u=e?new WeakMap:void 0,meta:f}=n();return t(s,l,{cache:u,equals:r,meta:f,strict:i})};if(e)return function(s,l){return t(s,l,{cache:new WeakMap,equals:r,meta:void 0,strict:i})};const a={cache:void 0,equals:r,meta:void 0,strict:i};return function(s,l){return t(s,l,a)}}const wve=Js();Js({strict:!0});Js({circular:!0});Js({circular:!0,strict:!0});Js({createInternalComparator:()=>$u});Js({strict:!0,createInternalComparator:()=>$u});Js({circular:!0,createInternalComparator:()=>$u});Js({circular:!0,createInternalComparator:()=>$u,strict:!0});function Js(e={}){const{circular:t=!1,createInternalComparator:n,createState:r,strict:i=!1}=e,a=yve(e),o=vve(a),s=n?n(o):bve(o);return xve({circular:t,comparator:o,createState:r,equals:s,strict:i})}function Sve(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function S2(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function i(a){n<0&&(n=a),a-n>t?(e(a),n=-1):Sve(i)};requestAnimationFrame(r)}function uj(e){"@babel/helpers - typeof";return uj=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},uj(e)}function Ove(e){return Ave(e)||Tve(e)||Eve(e)||jve()}function jve(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
123
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Eve(e,t){if(e){if(typeof e=="string")return O2(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return O2(e,t)}}function O2(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Tve(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Ave(e){if(Array.isArray(e))return e}function Cve(){var e={},t=function(){return null},n=!1,r=function i(a){if(!n){if(Array.isArray(a)){if(!a.length)return;var o=a,s=Ove(o),l=s[0],u=s.slice(1);if(typeof l=="number"){S2(i.bind(null,u),l);return}i(l),S2(i.bind(null,u));return}uj(a)==="object"&&(e=a,t(e)),typeof a=="function"&&a()}};return{stop:function(){n=!0},start:function(a){n=!1,r(a)},subscribe:function(a){return t=a,function(){t=function(){return null}}}}}function kh(e){"@babel/helpers - typeof";return kh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kh(e)}function j2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function E2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?j2(Object(n),!0).forEach(function(r){pF(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function pF(e,t,n){return t=_ve(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _ve(e){var t=Nve(e,"string");return kh(t)==="symbol"?t:String(t)}function Nve(e,t){if(kh(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(kh(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Rve=function(t,n){return[Object.keys(t),Object.keys(n)].reduce(function(r,i){return r.filter(function(a){return i.includes(a)})})},Mve=function(t){return t},Pve=function(t){return t.replace(/([A-Z])/g,function(n){return"-".concat(n.toLowerCase())})},Fp=function(t,n){return Object.keys(n).reduce(function(r,i){return E2(E2({},r),{},pF({},i,t(i,n[i])))},{})},T2=function(t,n,r){return t.map(function(i){return"".concat(Pve(i)," ").concat(n,"ms ").concat(r)}).join(",")};function $ve(e,t){return kve(e)||Ive(e,t)||hF(e,t)||Dve()}function Dve(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
124
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ive(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function kve(e){if(Array.isArray(e))return e}function Lve(e){return Fve(e)||zve(e)||hF(e)||Bve()}function Bve(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
125
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hF(e,t){if(e){if(typeof e=="string")return cj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return cj(e,t)}}function zve(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Fve(e){if(Array.isArray(e))return cj(e)}function cj(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Yy=1e-4,mF=function(t,n){return[0,3*t,3*n-6*t,3*t-3*n+1]},gF=function(t,n){return t.map(function(r,i){return r*Math.pow(n,i)}).reduce(function(r,i){return r+i})},A2=function(t,n){return function(r){var i=mF(t,n);return gF(i,r)}},Uve=function(t,n){return function(r){var i=mF(t,n),a=[].concat(Lve(i.map(function(o,s){return o*s}).slice(1)),[0]);return gF(a,r)}},C2=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n[0],a=n[1],o=n[2],s=n[3];if(n.length===1)switch(n[0]){case"linear":i=0,a=0,o=1,s=1;break;case"ease":i=.25,a=.1,o=.25,s=1;break;case"ease-in":i=.42,a=0,o=1,s=1;break;case"ease-out":i=.42,a=0,o=.58,s=1;break;case"ease-in-out":i=0,a=0,o=.58,s=1;break;default:{var l=n[0].split("(");if(l[0]==="cubic-bezier"&&l[1].split(")")[0].split(",").length===4){var u=l[1].split(")")[0].split(",").map(function(g){return parseFloat(g)}),f=$ve(u,4);i=f[0],a=f[1],o=f[2],s=f[3]}}}var d=A2(i,o),p=A2(a,s),h=Uve(i,o),b=function(y){return y>1?1:y<0?0:y},m=function(y){for(var v=y>1?1:y,w=v,S=0;S<8;++S){var O=d(w)-v,j=h(w);if(Math.abs(O-v)<Yy||j<Yy)return p(w);w=b(w-O/j)}return p(w)};return m.isStepper=!1,m},Hve=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,r=n===void 0?100:n,i=t.damping,a=i===void 0?8:i,o=t.dt,s=o===void 0?17:o,l=function(f,d,p){var h=-(f-d)*r,b=p*a,m=p+(h-b)*s/1e3,g=p*s/1e3+f;return Math.abs(g-d)<Yy&&Math.abs(m)<Yy?[d,0]:[g,m]};return l.isStepper=!0,l.dt=s,l},qve=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n[0];if(typeof i=="string")switch(i){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return C2(i);case"spring":return Hve();default:if(i.split("(")[0]==="cubic-bezier")return C2(i)}return typeof i=="function"?i:null};function Lh(e){"@babel/helpers - typeof";return Lh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lh(e)}function _2(e){return Kve(e)||Gve(e)||vF(e)||Vve()}function Vve(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
126
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Gve(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Kve(e){if(Array.isArray(e))return dj(e)}function N2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function zn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?N2(Object(n),!0).forEach(function(r){fj(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function fj(e,t,n){return t=Yve(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yve(e){var t=Xve(e,"string");return Lh(t)==="symbol"?t:String(t)}function Xve(e,t){if(Lh(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Lh(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Wve(e,t){return Jve(e)||Zve(e,t)||vF(e,t)||Qve()}function Qve(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
127
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vF(e,t){if(e){if(typeof e=="string")return dj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return dj(e,t)}}function dj(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Zve(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function Jve(e){if(Array.isArray(e))return e}var Xy=function(t,n,r){return t+(n-t)*r},pj=function(t){var n=t.from,r=t.to;return n!==r},eye=function e(t,n,r){var i=Fp(function(a,o){if(pj(o)){var s=t(o.from,o.to,o.velocity),l=Wve(s,2),u=l[0],f=l[1];return zn(zn({},o),{},{from:u,velocity:f})}return o},n);return r<1?Fp(function(a,o){return pj(o)?zn(zn({},o),{},{velocity:Xy(o.velocity,i[a].velocity,r),from:Xy(o.from,i[a].from,r)}):o},n):e(t,i,r-1)};const tye=function(e,t,n,r,i){var a=Rve(e,t),o=a.reduce(function(g,y){return zn(zn({},g),{},fj({},y,[e[y],t[y]]))},{}),s=a.reduce(function(g,y){return zn(zn({},g),{},fj({},y,{from:e[y],velocity:0,to:t[y]}))},{}),l=-1,u,f,d=function(){return null},p=function(){return Fp(function(y,v){return v.from},s)},h=function(){return!Object.values(s).filter(pj).length},b=function(y){u||(u=y);var v=y-u,w=v/n.dt;s=eye(n,s,w),i(zn(zn(zn({},e),t),p())),u=y,h()||(l=requestAnimationFrame(d))},m=function(y){f||(f=y);var v=(y-f)/r,w=Fp(function(O,j){return Xy.apply(void 0,_2(j).concat([n(v)]))},o);if(i(zn(zn(zn({},e),t),w)),v<1)l=requestAnimationFrame(d);else{var S=Fp(function(O,j){return Xy.apply(void 0,_2(j).concat([n(1)]))},o);i(zn(zn(zn({},e),t),S))}};return d=n.isStepper?b:m,function(){return requestAnimationFrame(d),function(){cancelAnimationFrame(l)}}};function Pf(e){"@babel/helpers - typeof";return Pf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pf(e)}var nye=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function rye(e,t){if(e==null)return{};var n=iye(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function iye(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function Qw(e){return lye(e)||sye(e)||oye(e)||aye()}function aye(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
128
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function oye(e,t){if(e){if(typeof e=="string")return hj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return hj(e,t)}}function sye(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function lye(e){if(Array.isArray(e))return hj(e)}function hj(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function R2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function $i(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?R2(Object(n),!0).forEach(function(r){yp(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function yp(e,t,n){return t=yF(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uye(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cye(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,yF(r.key),r)}}function fye(e,t,n){return t&&cye(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function yF(e){var t=dye(e,"string");return Pf(t)==="symbol"?t:String(t)}function dye(e,t){if(Pf(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Pf(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function pye(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&mj(e,t)}function mj(e,t){return mj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},mj(e,t)}function hye(e){var t=mye();return function(){var r=Wy(e),i;if(t){var a=Wy(this).constructor;i=Reflect.construct(r,arguments,a)}else i=r.apply(this,arguments);return gj(this,i)}}function gj(e,t){if(t&&(Pf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return vj(e)}function vj(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function mye(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Wy(e){return Wy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Wy(e)}var Vi=function(e){pye(n,e);var t=hye(n);function n(r,i){var a;uye(this,n),a=t.call(this,r,i);var o=a.props,s=o.isActive,l=o.attributeName,u=o.from,f=o.to,d=o.steps,p=o.children,h=o.duration;if(a.handleStyleChange=a.handleStyleChange.bind(vj(a)),a.changeStyle=a.changeStyle.bind(vj(a)),!s||h<=0)return a.state={style:{}},typeof p=="function"&&(a.state={style:f}),gj(a);if(d&&d.length)a.state={style:d[0].style};else if(u){if(typeof p=="function")return a.state={style:u},gj(a);a.state={style:l?yp({},l,u):u}}else a.state={style:{}};return a}return fye(n,[{key:"componentDidMount",value:function(){var i=this.props,a=i.isActive,o=i.canBegin;this.mounted=!0,!(!a||!o)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var a=this.props,o=a.isActive,s=a.canBegin,l=a.attributeName,u=a.shouldReAnimate,f=a.to,d=a.from,p=this.state.style;if(s){if(!o){var h={style:l?yp({},l,f):f};this.state&&p&&(l&&p[l]!==f||!l&&p!==f)&&this.setState(h);return}if(!(wve(i.to,f)&&i.canBegin&&i.isActive)){var b=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var m=b||u?d:i.to;if(this.state&&p){var g={style:l?yp({},l,m):m};(l&&p[l]!==m||!l&&p!==m)&&this.setState(g)}this.runAnimation($i($i({},this.props),{},{from:m,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var a=this,o=i.from,s=i.to,l=i.duration,u=i.easing,f=i.begin,d=i.onAnimationEnd,p=i.onAnimationStart,h=tye(o,s,qve(u),l,this.changeStyle),b=function(){a.stopJSAnimation=h()};this.manager.start([p,f,b,l,d])}},{key:"runStepAnimation",value:function(i){var a=this,o=i.steps,s=i.begin,l=i.onAnimationStart,u=o[0],f=u.style,d=u.duration,p=d===void 0?0:d,h=function(m,g,y){if(y===0)return m;var v=g.duration,w=g.easing,S=w===void 0?"ease":w,O=g.style,j=g.properties,E=g.onAnimationEnd,T=y>0?o[y-1]:g,A=j||Object.keys(O);if(typeof S=="function"||S==="spring")return[].concat(Qw(m),[a.runJSAnimation.bind(a,{from:T.style,to:O,duration:v,easing:S}),v]);var C=T2(A,v,S),_=$i($i($i({},T.style),O),{},{transition:C});return[].concat(Qw(m),[_,v,E]).filter(Mve)};return this.manager.start([l].concat(Qw(o.reduce(h,[f,Math.max(p,s)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=Cve());var a=i.begin,o=i.duration,s=i.attributeName,l=i.to,u=i.easing,f=i.onAnimationStart,d=i.onAnimationEnd,p=i.steps,h=i.children,b=this.manager;if(this.unSubscribe=b.subscribe(this.handleStyleChange),typeof u=="function"||typeof h=="function"||u==="spring"){this.runJSAnimation(i);return}if(p.length>1){this.runStepAnimation(i);return}var m=s?yp({},s,l):l,g=T2(Object.keys(m),o,u);b.start([f,a,$i($i({},m),{},{transition:g}),o,d])}},{key:"render",value:function(){var i=this.props,a=i.children;i.begin;var o=i.duration;i.attributeName,i.easing;var s=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var l=rye(i,nye),u=x.Children.count(a),f=this.state.style;if(typeof a=="function")return a(f);if(!s||u===0||o<=0)return a;var d=function(h){var b=h.props,m=b.style,g=m===void 0?{}:m,y=b.className,v=x.cloneElement(h,$i($i({},l),{},{style:$i($i({},g),f),className:y}));return v};return u===1?d(x.Children.only(a)):z.createElement("div",null,x.Children.map(a,function(p){return d(p)}))}}]),n}(x.PureComponent);Vi.displayName="Animate";Vi.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};Vi.propTypes={from:mt.oneOfType([mt.object,mt.string]),to:mt.oneOfType([mt.object,mt.string]),attributeName:mt.string,duration:mt.number,begin:mt.number,easing:mt.oneOfType([mt.string,mt.func]),steps:mt.arrayOf(mt.shape({duration:mt.number.isRequired,style:mt.object.isRequired,easing:mt.oneOfType([mt.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),mt.func]),properties:mt.arrayOf("string"),onAnimationEnd:mt.func})),children:mt.oneOfType([mt.node,mt.func]),isActive:mt.bool,canBegin:mt.bool,onAnimationEnd:mt.func,shouldReAnimate:mt.bool,onAnimationStart:mt.func,onAnimationReStart:mt.func};function Bh(e){"@babel/helpers - typeof";return Bh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bh(e)}function Qy(){return Qy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qy.apply(this,arguments)}function gye(e,t){return xye(e)||bye(e,t)||yye(e,t)||vye()}function vye(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
129
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yye(e,t){if(e){if(typeof e=="string")return M2(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return M2(e,t)}}function M2(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function bye(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function xye(e){if(Array.isArray(e))return e}function P2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function $2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?P2(Object(n),!0).forEach(function(r){wye(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function wye(e,t,n){return t=Sye(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Sye(e){var t=Oye(e,"string");return Bh(t)=="symbol"?t:t+""}function Oye(e,t){if(Bh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Bh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var D2=function(t,n,r,i,a){var o=Math.min(Math.abs(r)/2,Math.abs(i)/2),s=i>=0?1:-1,l=r>=0?1:-1,u=i>=0&&r>=0||i<0&&r<0?1:0,f;if(o>0&&a instanceof Array){for(var d=[0,0,0,0],p=0,h=4;p<h;p++)d[p]=a[p]>o?o:a[p];f="M".concat(t,",").concat(n+s*d[0]),d[0]>0&&(f+="A ".concat(d[0],",").concat(d[0],",0,0,").concat(u,",").concat(t+l*d[0],",").concat(n)),f+="L ".concat(t+r-l*d[1],",").concat(n),d[1]>0&&(f+="A ".concat(d[1],",").concat(d[1],",0,0,").concat(u,`,
|
|
130
|
+
`).concat(t+r,",").concat(n+s*d[1])),f+="L ".concat(t+r,",").concat(n+i-s*d[2]),d[2]>0&&(f+="A ".concat(d[2],",").concat(d[2],",0,0,").concat(u,`,
|
|
131
|
+
`).concat(t+r-l*d[2],",").concat(n+i)),f+="L ".concat(t+l*d[3],",").concat(n+i),d[3]>0&&(f+="A ".concat(d[3],",").concat(d[3],",0,0,").concat(u,`,
|
|
132
|
+
`).concat(t,",").concat(n+i-s*d[3])),f+="Z"}else if(o>0&&a===+a&&a>0){var b=Math.min(o,a);f="M ".concat(t,",").concat(n+s*b,`
|
|
133
|
+
A `).concat(b,",").concat(b,",0,0,").concat(u,",").concat(t+l*b,",").concat(n,`
|
|
134
|
+
L `).concat(t+r-l*b,",").concat(n,`
|
|
135
|
+
A `).concat(b,",").concat(b,",0,0,").concat(u,",").concat(t+r,",").concat(n+s*b,`
|
|
136
|
+
L `).concat(t+r,",").concat(n+i-s*b,`
|
|
137
|
+
A `).concat(b,",").concat(b,",0,0,").concat(u,",").concat(t+r-l*b,",").concat(n+i,`
|
|
138
|
+
L `).concat(t+l*b,",").concat(n+i,`
|
|
139
|
+
A `).concat(b,",").concat(b,",0,0,").concat(u,",").concat(t,",").concat(n+i-s*b," Z")}else f="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(i," h ").concat(-r," Z");return f},jye=function(t,n){if(!t||!n)return!1;var r=t.x,i=t.y,a=n.x,o=n.y,s=n.width,l=n.height;if(Math.abs(s)>0&&Math.abs(l)>0){var u=Math.min(a,a+s),f=Math.max(a,a+s),d=Math.min(o,o+l),p=Math.max(o,o+l);return r>=u&&r<=f&&i>=d&&i<=p}return!1},Eye={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},ZA=function(t){var n=$2($2({},Eye),t),r=x.useRef(),i=x.useState(-1),a=gye(i,2),o=a[0],s=a[1];x.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var S=r.current.getTotalLength();S&&s(S)}catch{}},[]);var l=n.x,u=n.y,f=n.width,d=n.height,p=n.radius,h=n.className,b=n.animationEasing,m=n.animationDuration,g=n.animationBegin,y=n.isAnimationActive,v=n.isUpdateAnimationActive;if(l!==+l||u!==+u||f!==+f||d!==+d||f===0||d===0)return null;var w=ke("recharts-rectangle",h);return v?z.createElement(Vi,{canBegin:o>0,from:{width:f,height:d,x:l,y:u},to:{width:f,height:d,x:l,y:u},duration:m,animationEasing:b,isActive:v},function(S){var O=S.width,j=S.height,E=S.x,T=S.y;return z.createElement(Vi,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:g,duration:m,isActive:y,easing:b},z.createElement("path",Qy({},Ae(n,!0),{className:w,d:D2(E,T,O,j,p),ref:r})))}):z.createElement("path",Qy({},Ae(n,!0),{className:w,d:D2(l,u,f,d,p)}))},Tye=["points","className","baseLinePoints","connectNulls"];function bc(){return bc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bc.apply(this,arguments)}function Aye(e,t){if(e==null)return{};var n=Cye(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Cye(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function I2(e){return Mye(e)||Rye(e)||Nye(e)||_ye()}function _ye(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
140
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Nye(e,t){if(e){if(typeof e=="string")return yj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return yj(e,t)}}function Rye(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Mye(e){if(Array.isArray(e))return yj(e)}function yj(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var k2=function(t){return t&&t.x===+t.x&&t.y===+t.y},Pye=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=[[]];return t.forEach(function(r){k2(r)?n[n.length-1].push(r):n[n.length-1].length>0&&n.push([])}),k2(t[0])&&n[n.length-1].push(t[0]),n[n.length-1].length<=0&&(n=n.slice(0,-1)),n},Up=function(t,n){var r=Pye(t);n&&(r=[r.reduce(function(a,o){return[].concat(I2(a),I2(o))},[])]);var i=r.map(function(a){return a.reduce(function(o,s,l){return"".concat(o).concat(l===0?"M":"L").concat(s.x,",").concat(s.y)},"")}).join("");return r.length===1?"".concat(i,"Z"):i},$ye=function(t,n,r){var i=Up(t,r);return"".concat(i.slice(-1)==="Z"?i.slice(0,-1):i,"L").concat(Up(n.reverse(),r).slice(1))},Dye=function(t){var n=t.points,r=t.className,i=t.baseLinePoints,a=t.connectNulls,o=Aye(t,Tye);if(!n||!n.length)return null;var s=ke("recharts-polygon",r);if(i&&i.length){var l=o.stroke&&o.stroke!=="none",u=$ye(n,i,a);return z.createElement("g",{className:s},z.createElement("path",bc({},Ae(o,!0),{fill:u.slice(-1)==="Z"?o.fill:"none",stroke:"none",d:u})),l?z.createElement("path",bc({},Ae(o,!0),{fill:"none",d:Up(n,a)})):null,l?z.createElement("path",bc({},Ae(o,!0),{fill:"none",d:Up(i,a)})):null)}var f=Up(n,a);return z.createElement("path",bc({},Ae(o,!0),{fill:f.slice(-1)==="Z"?o.fill:"none",className:s,d:f}))};function bj(){return bj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bj.apply(this,arguments)}var Gx=function(t){var n=t.cx,r=t.cy,i=t.r,a=t.className,o=ke("recharts-dot",a);return n===+n&&r===+r&&i===+i?x.createElement("circle",bj({},Ae(t,!1),my(t),{className:o,cx:n,cy:r,r:i})):null};function zh(e){"@babel/helpers - typeof";return zh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zh(e)}var Iye=["x","y","top","left","width","height","className"];function xj(){return xj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xj.apply(this,arguments)}function L2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function kye(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?L2(Object(n),!0).forEach(function(r){Lye(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):L2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Lye(e,t,n){return t=Bye(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bye(e){var t=zye(e,"string");return zh(t)=="symbol"?t:t+""}function zye(e,t){if(zh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(zh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Fye(e,t){if(e==null)return{};var n=Uye(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Uye(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Hye=function(t,n,r,i,a,o){return"M".concat(t,",").concat(a,"v").concat(i,"M").concat(o,",").concat(n,"h").concat(r)},qye=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,a=i===void 0?0:i,o=t.top,s=o===void 0?0:o,l=t.left,u=l===void 0?0:l,f=t.width,d=f===void 0?0:f,p=t.height,h=p===void 0?0:p,b=t.className,m=Fye(t,Iye),g=kye({x:r,y:a,top:s,left:u,width:d,height:h},m);return!se(r)||!se(a)||!se(d)||!se(h)||!se(s)||!se(u)?null:z.createElement("path",xj({},Ae(g,!0),{className:ke("recharts-cross",b),d:Hye(r,a,d,h,s,u)}))},Vye=Fx,Gye=A4,Kye=Pa;function Yye(e,t){return e&&e.length?Vye(e,Kye(t),Gye):void 0}var Xye=Yye;const Wye=vt(Xye);var Qye=Fx,Zye=Pa,Jye=C4;function ebe(e,t){return e&&e.length?Qye(e,Zye(t),Jye):void 0}var tbe=ebe;const nbe=vt(tbe);var rbe=["cx","cy","angle","ticks","axisLine"],ibe=["ticks","tick","angle","tickFormatter","stroke"];function $f(e){"@babel/helpers - typeof";return $f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$f(e)}function Hp(){return Hp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hp.apply(this,arguments)}function B2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function dl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?B2(Object(n),!0).forEach(function(r){Kx(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):B2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function z2(e,t){if(e==null)return{};var n=abe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function abe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function obe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function F2(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,xF(r.key),r)}}function sbe(e,t,n){return t&&F2(e.prototype,t),n&&F2(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function lbe(e,t,n){return t=Zy(t),ube(e,bF()?Reflect.construct(t,n||[],Zy(e).constructor):t.apply(e,n))}function ube(e,t){if(t&&($f(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return cbe(e)}function cbe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function bF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(bF=function(){return!!e})()}function Zy(e){return Zy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Zy(e)}function fbe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&wj(e,t)}function wj(e,t){return wj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},wj(e,t)}function Kx(e,t,n){return t=xF(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xF(e){var t=dbe(e,"string");return $f(t)=="symbol"?t:t+""}function dbe(e,t){if($f(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if($f(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Nm=function(e){function t(){return obe(this,t),lbe(this,t,arguments)}return fbe(t,e),sbe(t,[{key:"getTickValueCoord",value:function(r){var i=r.coordinate,a=this.props,o=a.angle,s=a.cx,l=a.cy;return Ct(s,l,i,o)}},{key:"getTickTextAnchor",value:function(){var r=this.props.orientation,i;switch(r){case"left":i="end";break;case"right":i="start";break;default:i="middle";break}return i}},{key:"getViewBox",value:function(){var r=this.props,i=r.cx,a=r.cy,o=r.angle,s=r.ticks,l=Wye(s,function(f){return f.coordinate||0}),u=nbe(s,function(f){return f.coordinate||0});return{cx:i,cy:a,startAngle:o,endAngle:o,innerRadius:u.coordinate||0,outerRadius:l.coordinate||0}}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.cx,a=r.cy,o=r.angle,s=r.ticks,l=r.axisLine,u=z2(r,rbe),f=s.reduce(function(b,m){return[Math.min(b[0],m.coordinate),Math.max(b[1],m.coordinate)]},[1/0,-1/0]),d=Ct(i,a,f[0],o),p=Ct(i,a,f[1],o),h=dl(dl(dl({},Ae(u,!1)),{},{fill:"none"},Ae(l,!1)),{},{x1:d.x,y1:d.y,x2:p.x,y2:p.y});return z.createElement("line",Hp({className:"recharts-polar-radius-axis-line"},h))}},{key:"renderTicks",value:function(){var r=this,i=this.props,a=i.ticks,o=i.tick,s=i.angle,l=i.tickFormatter,u=i.stroke,f=z2(i,ibe),d=this.getTickTextAnchor(),p=Ae(f,!1),h=Ae(o,!1),b=a.map(function(m,g){var y=r.getTickValueCoord(m),v=dl(dl(dl(dl({textAnchor:d,transform:"rotate(".concat(90-s,", ").concat(y.x,", ").concat(y.y,")")},p),{},{stroke:"none",fill:u},h),{},{index:g},y),{},{payload:m});return z.createElement(Ye,Hp({className:ke("recharts-polar-radius-axis-tick",aF(o)),key:"tick-".concat(m.coordinate)},yo(r.props,m,g)),t.renderTickItem(o,v,l?l(m.value,g):m.value))});return z.createElement(Ye,{className:"recharts-polar-radius-axis-ticks"},b)}},{key:"render",value:function(){var r=this.props,i=r.ticks,a=r.axisLine,o=r.tick;return!i||!i.length?null:z.createElement(Ye,{className:ke("recharts-polar-radius-axis",this.props.className)},a&&this.renderAxisLine(),o&&this.renderTicks(),Rn.renderCallByParent(this.props,this.getViewBox()))}}],[{key:"renderTickItem",value:function(r,i,a){var o;return z.isValidElement(r)?o=z.cloneElement(r,i):Ce(r)?o=r(i):o=z.createElement(lu,Hp({},i,{className:"recharts-polar-radius-axis-tick-value"}),a),o}}])}(x.PureComponent);Kx(Nm,"displayName","PolarRadiusAxis");Kx(Nm,"axisType","radiusAxis");Kx(Nm,"defaultProps",{type:"number",radiusAxisId:0,cx:0,cy:0,angle:0,orientation:"right",stroke:"#ccc",axisLine:!0,tick:!0,tickCount:5,allowDataOverflow:!1,scale:"auto",allowDuplicatedCategory:!0});function Df(e){"@babel/helpers - typeof";return Df=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Df(e)}function wl(){return wl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wl.apply(this,arguments)}function U2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function pl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?U2(Object(n),!0).forEach(function(r){Yx(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):U2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function pbe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function H2(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,SF(r.key),r)}}function hbe(e,t,n){return t&&H2(e.prototype,t),n&&H2(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function mbe(e,t,n){return t=Jy(t),gbe(e,wF()?Reflect.construct(t,n||[],Jy(e).constructor):t.apply(e,n))}function gbe(e,t){if(t&&(Df(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return vbe(e)}function vbe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function wF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(wF=function(){return!!e})()}function Jy(e){return Jy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Jy(e)}function ybe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Sj(e,t)}function Sj(e,t){return Sj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Sj(e,t)}function Yx(e,t,n){return t=SF(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function SF(e){var t=bbe(e,"string");return Df(t)=="symbol"?t:t+""}function bbe(e,t){if(Df(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Df(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var xbe=Math.PI/180,q2=1e-5,Nd=function(e){function t(){return pbe(this,t),mbe(this,t,arguments)}return ybe(t,e),hbe(t,[{key:"getTickLineCoord",value:function(r){var i=this.props,a=i.cx,o=i.cy,s=i.radius,l=i.orientation,u=i.tickSize,f=u||8,d=Ct(a,o,s,r.coordinate),p=Ct(a,o,s+(l==="inner"?-1:1)*f,r.coordinate);return{x1:d.x,y1:d.y,x2:p.x,y2:p.y}}},{key:"getTickTextAnchor",value:function(r){var i=this.props.orientation,a=Math.cos(-r.coordinate*xbe),o;return a>q2?o=i==="outer"?"start":"end":a<-q2?o=i==="outer"?"end":"start":o="middle",o}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.cx,a=r.cy,o=r.radius,s=r.axisLine,l=r.axisLineType,u=pl(pl({},Ae(this.props,!1)),{},{fill:"none"},Ae(s,!1));if(l==="circle")return z.createElement(Gx,wl({className:"recharts-polar-angle-axis-line"},u,{cx:i,cy:a,r:o}));var f=this.props.ticks,d=f.map(function(p){return Ct(i,a,o,p.coordinate)});return z.createElement(Dye,wl({className:"recharts-polar-angle-axis-line"},u,{points:d}))}},{key:"renderTicks",value:function(){var r=this,i=this.props,a=i.ticks,o=i.tick,s=i.tickLine,l=i.tickFormatter,u=i.stroke,f=Ae(this.props,!1),d=Ae(o,!1),p=pl(pl({},f),{},{fill:"none"},Ae(s,!1)),h=a.map(function(b,m){var g=r.getTickLineCoord(b),y=r.getTickTextAnchor(b),v=pl(pl(pl({textAnchor:y},f),{},{stroke:"none",fill:u},d),{},{index:m,payload:b,x:g.x2,y:g.y2});return z.createElement(Ye,wl({className:ke("recharts-polar-angle-axis-tick",aF(o)),key:"tick-".concat(b.coordinate)},yo(r.props,b,m)),s&&z.createElement("line",wl({className:"recharts-polar-angle-axis-tick-line"},p,g)),o&&t.renderTickItem(o,v,l?l(b.value,m):b.value))});return z.createElement(Ye,{className:"recharts-polar-angle-axis-ticks"},h)}},{key:"render",value:function(){var r=this.props,i=r.ticks,a=r.radius,o=r.axisLine;return a<=0||!i||!i.length?null:z.createElement(Ye,{className:ke("recharts-polar-angle-axis",this.props.className)},o&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(r,i,a){var o;return z.isValidElement(r)?o=z.cloneElement(r,i):Ce(r)?o=r(i):o=z.createElement(lu,wl({},i,{className:"recharts-polar-angle-axis-tick-value"}),a),o}}])}(x.PureComponent);Yx(Nd,"displayName","PolarAngleAxis");Yx(Nd,"axisType","angleAxis");Yx(Nd,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var wbe=jz,Sbe=wbe(Object.getPrototypeOf,Object),Obe=Sbe,jbe=Ro,Ebe=Obe,Tbe=Mo,Abe="[object Object]",Cbe=Function.prototype,_be=Object.prototype,OF=Cbe.toString,Nbe=_be.hasOwnProperty,Rbe=OF.call(Object);function Mbe(e){if(!Tbe(e)||jbe(e)!=Abe)return!1;var t=Ebe(e);if(t===null)return!0;var n=Nbe.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&OF.call(n)==Rbe}var Pbe=Mbe;const $be=vt(Pbe);var Dbe=Ro,Ibe=Mo,kbe="[object Boolean]";function Lbe(e){return e===!0||e===!1||Ibe(e)&&Dbe(e)==kbe}var Bbe=Lbe;const zbe=vt(Bbe);function Fh(e){"@babel/helpers - typeof";return Fh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fh(e)}function eb(){return eb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},eb.apply(this,arguments)}function Fbe(e,t){return Vbe(e)||qbe(e,t)||Hbe(e,t)||Ube()}function Ube(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
141
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Hbe(e,t){if(e){if(typeof e=="string")return V2(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return V2(e,t)}}function V2(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function qbe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function Vbe(e){if(Array.isArray(e))return e}function G2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function K2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?G2(Object(n),!0).forEach(function(r){Gbe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):G2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Gbe(e,t,n){return t=Kbe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Kbe(e){var t=Ybe(e,"string");return Fh(t)=="symbol"?t:t+""}function Ybe(e,t){if(Fh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Fh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Y2=function(t,n,r,i,a){var o=r-i,s;return s="M ".concat(t,",").concat(n),s+="L ".concat(t+r,",").concat(n),s+="L ".concat(t+r-o/2,",").concat(n+a),s+="L ".concat(t+r-o/2-i,",").concat(n+a),s+="L ".concat(t,",").concat(n," Z"),s},Xbe={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Wbe=function(t){var n=K2(K2({},Xbe),t),r=x.useRef(),i=x.useState(-1),a=Fbe(i,2),o=a[0],s=a[1];x.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var w=r.current.getTotalLength();w&&s(w)}catch{}},[]);var l=n.x,u=n.y,f=n.upperWidth,d=n.lowerWidth,p=n.height,h=n.className,b=n.animationEasing,m=n.animationDuration,g=n.animationBegin,y=n.isUpdateAnimationActive;if(l!==+l||u!==+u||f!==+f||d!==+d||p!==+p||f===0&&d===0||p===0)return null;var v=ke("recharts-trapezoid",h);return y?z.createElement(Vi,{canBegin:o>0,from:{upperWidth:0,lowerWidth:0,height:p,x:l,y:u},to:{upperWidth:f,lowerWidth:d,height:p,x:l,y:u},duration:m,animationEasing:b,isActive:y},function(w){var S=w.upperWidth,O=w.lowerWidth,j=w.height,E=w.x,T=w.y;return z.createElement(Vi,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:g,duration:m,easing:b},z.createElement("path",eb({},Ae(n,!0),{className:v,d:Y2(E,T,S,O,j),ref:r})))}):z.createElement("g",null,z.createElement("path",eb({},Ae(n,!0),{className:v,d:Y2(l,u,f,d,p)})))},Qbe=["option","shapeType","propTransformer","activeClassName","isActive"];function Uh(e){"@babel/helpers - typeof";return Uh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Uh(e)}function Zbe(e,t){if(e==null)return{};var n=Jbe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Jbe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function X2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function tb(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?X2(Object(n),!0).forEach(function(r){exe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):X2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function exe(e,t,n){return t=txe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function txe(e){var t=nxe(e,"string");return Uh(t)=="symbol"?t:t+""}function nxe(e,t){if(Uh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Uh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function rxe(e,t){return tb(tb({},t),e)}function ixe(e,t){return e==="symbols"}function W2(e){var t=e.shapeType,n=e.elementProps;switch(t){case"rectangle":return z.createElement(ZA,n);case"trapezoid":return z.createElement(Wbe,n);case"sector":return z.createElement(lF,n);case"symbols":if(ixe(t))return z.createElement(gA,n);break;default:return null}}function axe(e){return x.isValidElement(e)?e.props:e}function JA(e){var t=e.option,n=e.shapeType,r=e.propTransformer,i=r===void 0?rxe:r,a=e.activeClassName,o=a===void 0?"recharts-active-shape":a,s=e.isActive,l=Zbe(e,Qbe),u;if(x.isValidElement(t))u=x.cloneElement(t,tb(tb({},l),axe(t)));else if(Ce(t))u=t(l);else if($be(t)&&!zbe(t)){var f=i(t,l);u=z.createElement(W2,{shapeType:n,elementProps:f})}else{var d=l;u=z.createElement(W2,{shapeType:n,elementProps:d})}return s?z.createElement(Ye,{className:o},u):u}function Xx(e,t){return t!=null&&"trapezoids"in e.props}function Wx(e,t){return t!=null&&"sectors"in e.props}function Hh(e,t){return t!=null&&"points"in e.props}function oxe(e,t){var n,r,i=e.x===(t==null||(n=t.labelViewBox)===null||n===void 0?void 0:n.x)||e.x===t.x,a=e.y===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.y)||e.y===t.y;return i&&a}function sxe(e,t){var n=e.endAngle===t.endAngle,r=e.startAngle===t.startAngle;return n&&r}function lxe(e,t){var n=e.x===t.x,r=e.y===t.y,i=e.z===t.z;return n&&r&&i}function uxe(e,t){var n;return Xx(e,t)?n=oxe:Wx(e,t)?n=sxe:Hh(e,t)&&(n=lxe),n}function cxe(e,t){var n;return Xx(e,t)?n="trapezoids":Wx(e,t)?n="sectors":Hh(e,t)&&(n="points"),n}function fxe(e,t){if(Xx(e,t)){var n;return(n=t.tooltipPayload)===null||n===void 0||(n=n[0])===null||n===void 0||(n=n.payload)===null||n===void 0?void 0:n.payload}if(Wx(e,t)){var r;return(r=t.tooltipPayload)===null||r===void 0||(r=r[0])===null||r===void 0||(r=r.payload)===null||r===void 0?void 0:r.payload}return Hh(e,t)?t.payload:{}}function dxe(e){var t=e.activeTooltipItem,n=e.graphicalItem,r=e.itemData,i=cxe(n,t),a=fxe(n,t),o=r.filter(function(l,u){var f=uu(a,l),d=n.props[i].filter(function(b){var m=uxe(n,t);return m(b,t)}),p=n.props[i].indexOf(d[d.length-1]),h=u===p;return f&&h}),s=r.indexOf(o[o.length-1]);return s}var Ov;function If(e){"@babel/helpers - typeof";return If=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},If(e)}function xc(){return xc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xc.apply(this,arguments)}function Q2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Pt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Q2(Object(n),!0).forEach(function(r){Si(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Q2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function pxe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Z2(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,EF(r.key),r)}}function hxe(e,t,n){return t&&Z2(e.prototype,t),n&&Z2(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function mxe(e,t,n){return t=nb(t),gxe(e,jF()?Reflect.construct(t,n||[],nb(e).constructor):t.apply(e,n))}function gxe(e,t){if(t&&(If(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return vxe(e)}function vxe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function jF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(jF=function(){return!!e})()}function nb(e){return nb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},nb(e)}function yxe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Oj(e,t)}function Oj(e,t){return Oj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Oj(e,t)}function Si(e,t,n){return t=EF(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function EF(e){var t=bxe(e,"string");return If(t)=="symbol"?t:t+""}function bxe(e,t){if(If(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(If(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var $o=function(e){function t(n){var r;return pxe(this,t),r=mxe(this,t,[n]),Si(r,"pieRef",null),Si(r,"sectorRefs",[]),Si(r,"id",Sd("recharts-pie-")),Si(r,"handleAnimationEnd",function(){var i=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),Ce(i)&&i()}),Si(r,"handleAnimationStart",function(){var i=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),Ce(i)&&i()}),r.state={isAnimationFinished:!n.isAnimationActive,prevIsAnimationActive:n.isAnimationActive,prevAnimationId:n.animationId,sectorToFocus:0},r}return yxe(t,e),hxe(t,[{key:"isActiveIndex",value:function(r){var i=this.props.activeIndex;return Array.isArray(i)?i.indexOf(r)!==-1:r===i}},{key:"hasActiveIndex",value:function(){var r=this.props.activeIndex;return Array.isArray(r)?r.length!==0:r||r===0}},{key:"renderLabels",value:function(r){var i=this.props.isAnimationActive;if(i&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.label,s=a.labelLine,l=a.dataKey,u=a.valueKey,f=Ae(this.props,!1),d=Ae(o,!1),p=Ae(s,!1),h=o&&o.offsetRadius||20,b=r.map(function(m,g){var y=(m.startAngle+m.endAngle)/2,v=Ct(m.cx,m.cy,m.outerRadius+h,y),w=Pt(Pt(Pt(Pt({},f),m),{},{stroke:"none"},d),{},{index:g,textAnchor:t.getTextAnchor(v.x,m.cx)},v),S=Pt(Pt(Pt(Pt({},f),m),{},{fill:"none",stroke:m.fill},p),{},{index:g,points:[Ct(m.cx,m.cy,m.outerRadius,y),v]}),O=l;return Ue(l)&&Ue(u)?O="value":Ue(l)&&(O=u),z.createElement(Ye,{key:"label-".concat(m.startAngle,"-").concat(m.endAngle,"-").concat(m.midAngle,"-").concat(g)},s&&t.renderLabelLineItem(s,S,"line"),t.renderLabelItem(o,w,ln(m,O)))});return z.createElement(Ye,{className:"recharts-pie-labels"},b)}},{key:"renderSectorsStatically",value:function(r){var i=this,a=this.props,o=a.activeShape,s=a.blendStroke,l=a.inactiveShape;return r.map(function(u,f){if((u==null?void 0:u.startAngle)===0&&(u==null?void 0:u.endAngle)===0&&r.length!==1)return null;var d=i.isActiveIndex(f),p=l&&i.hasActiveIndex()?l:null,h=d?o:p,b=Pt(Pt({},u),{},{stroke:s?u.fill:u.stroke,tabIndex:-1});return z.createElement(Ye,xc({ref:function(g){g&&!i.sectorRefs.includes(g)&&i.sectorRefs.push(g)},tabIndex:-1,className:"recharts-pie-sector"},yo(i.props,u,f),{key:"sector-".concat(u==null?void 0:u.startAngle,"-").concat(u==null?void 0:u.endAngle,"-").concat(u.midAngle,"-").concat(f)}),z.createElement(JA,xc({option:h,isActive:d,shapeType:"sector"},b)))})}},{key:"renderSectorsWithAnimation",value:function(){var r=this,i=this.props,a=i.sectors,o=i.isAnimationActive,s=i.animationBegin,l=i.animationDuration,u=i.animationEasing,f=i.animationId,d=this.state,p=d.prevSectors,h=d.prevIsAnimationActive;return z.createElement(Vi,{begin:s,duration:l,isActive:o,easing:u,from:{t:0},to:{t:1},key:"pie-".concat(f,"-").concat(h),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(b){var m=b.t,g=[],y=a&&a[0],v=y.startAngle;return a.forEach(function(w,S){var O=p&&p[S],j=S>0?ti(w,"paddingAngle",0):0;if(O){var E=Un(O.endAngle-O.startAngle,w.endAngle-w.startAngle),T=Pt(Pt({},w),{},{startAngle:v+j,endAngle:v+E(m)+j});g.push(T),v=T.endAngle}else{var A=w.endAngle,C=w.startAngle,_=Un(0,A-C),N=_(m),D=Pt(Pt({},w),{},{startAngle:v+j,endAngle:v+N+j});g.push(D),v=D.endAngle}}),z.createElement(Ye,null,r.renderSectorsStatically(g))})}},{key:"attachKeyboardHandlers",value:function(r){var i=this;r.onkeydown=function(a){if(!a.altKey)switch(a.key){case"ArrowLeft":{var o=++i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[o].focus(),i.setState({sectorToFocus:o});break}case"ArrowRight":{var s=--i.state.sectorToFocus<0?i.sectorRefs.length-1:i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[s].focus(),i.setState({sectorToFocus:s});break}case"Escape":{i.sectorRefs[i.state.sectorToFocus].blur(),i.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var r=this.props,i=r.sectors,a=r.isAnimationActive,o=this.state.prevSectors;return a&&i&&i.length&&(!o||!uu(o,i))?this.renderSectorsWithAnimation():this.renderSectorsStatically(i)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var r=this,i=this.props,a=i.hide,o=i.sectors,s=i.className,l=i.label,u=i.cx,f=i.cy,d=i.innerRadius,p=i.outerRadius,h=i.isAnimationActive,b=this.state.isAnimationFinished;if(a||!o||!o.length||!se(u)||!se(f)||!se(d)||!se(p))return null;var m=ke("recharts-pie",s);return z.createElement(Ye,{tabIndex:this.props.rootTabIndex,className:m,ref:function(y){r.pieRef=y}},this.renderSectors(),l&&this.renderLabels(o),Rn.renderCallByParent(this.props,null,!1),(!h||b)&&Sa.renderCallByParent(this.props,o,!1))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return i.prevIsAnimationActive!==r.isAnimationActive?{prevIsAnimationActive:r.isAnimationActive,prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:[],isAnimationFinished:!0}:r.isAnimationActive&&r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:i.curSectors,isAnimationFinished:!0}:r.sectors!==i.curSectors?{curSectors:r.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(r,i){return r>i?"start":r<i?"end":"middle"}},{key:"renderLabelLineItem",value:function(r,i,a){if(z.isValidElement(r))return z.cloneElement(r,i);if(Ce(r))return r(i);var o=ke("recharts-pie-label-line",typeof r!="boolean"?r.className:"");return z.createElement(Bc,xc({},i,{key:a,type:"linear",className:o}))}},{key:"renderLabelItem",value:function(r,i,a){if(z.isValidElement(r))return z.cloneElement(r,i);var o=a;if(Ce(r)&&(o=r(i),z.isValidElement(o)))return o;var s=ke("recharts-pie-label-text",typeof r!="boolean"&&!Ce(r)?r.className:"");return z.createElement(lu,xc({},i,{alignmentBaseline:"middle",className:s}),o)}}])}(x.PureComponent);Ov=$o;Si($o,"displayName","Pie");Si($o,"defaultProps",{stroke:"#fff",fill:"#808080",legendType:"rect",cx:"50%",cy:"50%",startAngle:0,endAngle:360,innerRadius:0,outerRadius:"80%",paddingAngle:0,labelLine:!0,hide:!1,minAngle:0,isAnimationActive:!Ws.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0});Si($o,"parseDeltaAngle",function(e,t){var n=Pn(t-e),r=Math.min(Math.abs(t-e),360);return n*r});Si($o,"getRealPieData",function(e){var t=e.data,n=e.children,r=Ae(e,!1),i=ni(n,Td);return t&&t.length?t.map(function(a,o){return Pt(Pt(Pt({payload:a},r),a),i&&i[o]&&i[o].props)}):i&&i.length?i.map(function(a){return Pt(Pt({},r),a.props)}):[]});Si($o,"parseCoordinateOfPie",function(e,t){var n=t.top,r=t.left,i=t.width,a=t.height,o=rF(i,a),s=r+wr(e.cx,i,i/2),l=n+wr(e.cy,a,a/2),u=wr(e.innerRadius,o,0),f=wr(e.outerRadius,o,o*.8),d=e.maxRadius||Math.sqrt(i*i+a*a)/2;return{cx:s,cy:l,innerRadius:u,outerRadius:f,maxRadius:d}});Si($o,"getComposedData",function(e){var t=e.item,n=e.offset,r=t.type.defaultProps!==void 0?Pt(Pt({},t.type.defaultProps),t.props):t.props,i=Ov.getRealPieData(r);if(!i||!i.length)return null;var a=r.cornerRadius,o=r.startAngle,s=r.endAngle,l=r.paddingAngle,u=r.dataKey,f=r.nameKey,d=r.valueKey,p=r.tooltipType,h=Math.abs(r.minAngle),b=Ov.parseCoordinateOfPie(r,n),m=Ov.parseDeltaAngle(o,s),g=Math.abs(m),y=u;Ue(u)&&Ue(d)?(Hi(!1,`Use "dataKey" to specify the value of pie,
|
|
142
|
+
the props "valueKey" will be deprecated in 1.1.0`),y="value"):Ue(u)&&(Hi(!1,`Use "dataKey" to specify the value of pie,
|
|
143
|
+
the props "valueKey" will be deprecated in 1.1.0`),y=d);var v=i.filter(function(T){return ln(T,y,0)!==0}).length,w=(g>=360?v:v-1)*l,S=g-v*h-w,O=i.reduce(function(T,A){var C=ln(A,y,0);return T+(se(C)?C:0)},0),j;if(O>0){var E;j=i.map(function(T,A){var C=ln(T,y,0),_=ln(T,f,A),N=(se(C)?C:0)/O,D;A?D=E.endAngle+Pn(m)*l*(C!==0?1:0):D=o;var R=D+Pn(m)*((C!==0?h:0)+N*S),$=(D+R)/2,P=(b.innerRadius+b.outerRadius)/2,B=[{name:_,value:C,payload:T,dataKey:y,type:p}],L=Ct(b.cx,b.cy,P,$);return E=Pt(Pt(Pt({percent:N,cornerRadius:a,name:_,tooltipPayload:B,midAngle:$,middleRadius:P,tooltipPosition:L},T),b),{},{value:ln(T,y),startAngle:D,endAngle:R,payload:T,paddingAngle:Pn(m)*l}),E})}return Pt(Pt({},b),{},{sectors:j,data:i})});function qh(e){"@babel/helpers - typeof";return qh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qh(e)}function jj(){return jj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jj.apply(this,arguments)}function J2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Zw(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?J2(Object(n),!0).forEach(function(r){xxe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):J2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function xxe(e,t,n){return t=wxe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wxe(e){var t=Sxe(e,"string");return qh(t)=="symbol"?t:t+""}function Sxe(e,t){if(qh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(qh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function e$(e){return typeof e=="string"?parseInt(e,10):e}function Oxe(e,t){var n="".concat(t.cx||e.cx),r=Number(n),i="".concat(t.cy||e.cy),a=Number(i);return Zw(Zw(Zw({},t),e),{},{cx:r,cy:a})}function t$(e){return z.createElement(JA,jj({shapeType:"sector",propTransformer:Oxe},e))}var jxe=["shape","activeShape","activeIndex","cornerRadius"],Exe=["value","background"];function kf(e){"@babel/helpers - typeof";return kf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kf(e)}function rb(){return rb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rb.apply(this,arguments)}function n$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Tn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?n$(Object(n),!0).forEach(function(r){Xl(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):n$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function r$(e,t){if(e==null)return{};var n=Txe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Txe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Axe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i$(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,AF(r.key),r)}}function Cxe(e,t,n){return t&&i$(e.prototype,t),n&&i$(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _xe(e,t,n){return t=ib(t),Nxe(e,TF()?Reflect.construct(t,n||[],ib(e).constructor):t.apply(e,n))}function Nxe(e,t){if(t&&(kf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Rxe(e)}function Rxe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function TF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(TF=function(){return!!e})()}function ib(e){return ib=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ib(e)}function Mxe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ej(e,t)}function Ej(e,t){return Ej=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Ej(e,t)}function Xl(e,t,n){return t=AF(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function AF(e){var t=Pxe(e,"string");return kf(t)=="symbol"?t:t+""}function Pxe(e,t){if(kf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(kf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Rm=function(e){function t(){var n;Axe(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=_xe(this,t,[].concat(i)),Xl(n,"state",{isAnimationFinished:!1}),Xl(n,"handleAnimationEnd",function(){var o=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),Ce(o)&&o()}),Xl(n,"handleAnimationStart",function(){var o=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),Ce(o)&&o()}),n}return Mxe(t,e),Cxe(t,[{key:"getDeltaAngle",value:function(){var r=this.props,i=r.startAngle,a=r.endAngle,o=Pn(a-i),s=Math.min(Math.abs(a-i),360);return o*s}},{key:"renderSectorsStatically",value:function(r){var i=this,a=this.props,o=a.shape,s=a.activeShape,l=a.activeIndex,u=a.cornerRadius,f=r$(a,jxe),d=Ae(f,!1);return r.map(function(p,h){var b=h===l,m=Tn(Tn(Tn(Tn({},d),{},{cornerRadius:e$(u)},p),yo(i.props,p,h)),{},{className:"recharts-radial-bar-sector ".concat(p.className),forceCornerRadius:f.forceCornerRadius,cornerIsExternal:f.cornerIsExternal,isActive:b,option:b?s:o});return z.createElement(t$,rb({},m,{key:"sector-".concat(h)}))})}},{key:"renderSectorsWithAnimation",value:function(){var r=this,i=this.props,a=i.data,o=i.isAnimationActive,s=i.animationBegin,l=i.animationDuration,u=i.animationEasing,f=i.animationId,d=this.state.prevData;return z.createElement(Vi,{begin:s,duration:l,isActive:o,easing:u,from:{t:0},to:{t:1},key:"radialBar-".concat(f),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(p){var h=p.t,b=a.map(function(m,g){var y=d&&d[g];if(y){var v=Un(y.startAngle,m.startAngle),w=Un(y.endAngle,m.endAngle);return Tn(Tn({},m),{},{startAngle:v(h),endAngle:w(h)})}var S=m.endAngle,O=m.startAngle,j=Un(O,S);return Tn(Tn({},m),{},{endAngle:j(h)})});return z.createElement(Ye,null,r.renderSectorsStatically(b))})}},{key:"renderSectors",value:function(){var r=this.props,i=r.data,a=r.isAnimationActive,o=this.state.prevData;return a&&i&&i.length&&(!o||!uu(o,i))?this.renderSectorsWithAnimation():this.renderSectorsStatically(i)}},{key:"renderBackground",value:function(r){var i=this,a=this.props.cornerRadius,o=Ae(this.props.background,!1);return r.map(function(s,l){s.value;var u=s.background,f=r$(s,Exe);if(!u)return null;var d=Tn(Tn(Tn(Tn(Tn({cornerRadius:e$(a)},f),{},{fill:"#eee"},u),o),yo(i.props,s,l)),{},{index:l,className:ke("recharts-radial-bar-background-sector",o==null?void 0:o.className),option:u,isActive:!1});return z.createElement(t$,rb({},d,{key:"sector-".concat(l)}))})}},{key:"render",value:function(){var r=this.props,i=r.hide,a=r.data,o=r.className,s=r.background,l=r.isAnimationActive;if(i||!a||!a.length)return null;var u=this.state.isAnimationFinished,f=ke("recharts-area",o);return z.createElement(Ye,{className:f},s&&z.createElement(Ye,{className:"recharts-radial-bar-background"},this.renderBackground(a)),z.createElement(Ye,{className:"recharts-radial-bar-sectors"},this.renderSectors()),(!l||u)&&Sa.renderCallByParent(Tn({},this.props),a))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curData:r.data,prevData:i.curData}:r.data!==i.curData?{curData:r.data}:null}}])}(x.PureComponent);Xl(Rm,"displayName","RadialBar");Xl(Rm,"defaultProps",{angleAxisId:0,radiusAxisId:0,minPointSize:0,hide:!1,legendType:"rect",data:[],isAnimationActive:!Ws.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease",forceCornerRadius:!1,cornerIsExternal:!1});Xl(Rm,"getComposedData",function(e){var t=e.item,n=e.props,r=e.radiusAxis,i=e.radiusAxisTicks,a=e.angleAxis,o=e.angleAxisTicks,s=e.displayedData,l=e.dataKey,u=e.stackedData,f=e.barPosition,d=e.bandSize,p=e.dataStartIndex,h=Q4(f,t);if(!h)return null;var b=a.cx,m=a.cy,g=n.layout,y=t.props,v=y.children,w=y.minPointSize,S=g==="radial"?a:r,O=u?S.scale.domain():null,j=eF({numericAxis:S}),E=ni(v,Td),T=s.map(function(A,C){var _,N,D,R,$,P;if(u?_=Z4(u[p+C],O):(_=ln(A,l),Array.isArray(_)||(_=[j,_])),g==="radial"){N=Hy({axis:r,ticks:i,bandSize:d,offset:h.offset,entry:A,index:C}),$=a.scale(_[1]),R=a.scale(_[0]),D=N+h.size;var B=$-R;if(Math.abs(w)>0&&Math.abs(B)<Math.abs(w)){var L=Pn(B||w)*(Math.abs(w)-Math.abs(B));$+=L}P={background:{cx:b,cy:m,innerRadius:N,outerRadius:D,startAngle:n.startAngle,endAngle:n.endAngle}}}else{N=r.scale(_[0]),D=r.scale(_[1]),R=Hy({axis:a,ticks:o,bandSize:d,offset:h.offset,entry:A,index:C}),$=R+h.size;var k=D-N;if(Math.abs(w)>0&&Math.abs(k)<Math.abs(w)){var I=Pn(k||w)*(Math.abs(w)-Math.abs(k));D+=I}}return Tn(Tn(Tn(Tn({},A),P),{},{payload:A,value:u?_:_[1],cx:b,cy:m,innerRadius:N,outerRadius:D,startAngle:R,endAngle:$},E&&E[C]&&E[C].props),{},{tooltipPayload:[QA(t,A)],tooltipPosition:Ct(b,m,(N+D)/2,(R+$)/2)})});return{data:T,layout:g}});var $xe=Math.ceil,Dxe=Math.max;function Ixe(e,t,n,r){for(var i=-1,a=Dxe($xe((t-e)/(n||1)),0),o=Array(a);a--;)o[r?a:++i]=e,e+=n;return o}var kxe=Ixe,Lxe=Hz,a$=1/0,Bxe=17976931348623157e292;function zxe(e){if(!e)return e===0?e:0;if(e=Lxe(e),e===a$||e===-a$){var t=e<0?-1:1;return t*Bxe}return e===e?e:0}var CF=zxe,Fxe=kxe,Uxe=$x,Jw=CF;function Hxe(e){return function(t,n,r){return r&&typeof r!="number"&&Uxe(t,n,r)&&(n=r=void 0),t=Jw(t),n===void 0?(n=t,t=0):n=Jw(n),r=r===void 0?t<n?1:-1:Jw(r),Fxe(t,n,r,e)}}var qxe=Hxe,Vxe=qxe,Gxe=Vxe(),Kxe=Gxe;const ab=vt(Kxe);function Vh(e){"@babel/helpers - typeof";return Vh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vh(e)}function o$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function s$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?o$(Object(n),!0).forEach(function(r){_F(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _F(e,t,n){return t=Yxe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yxe(e){var t=Xxe(e,"string");return Vh(t)=="symbol"?t:t+""}function Xxe(e,t){if(Vh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Vh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Wxe=["Webkit","Moz","O","ms"],Qxe=function(t,n){var r=t.replace(/(\w)/,function(a){return a.toUpperCase()}),i=Wxe.reduce(function(a,o){return s$(s$({},a),{},_F({},o+r,n))},{});return i[t]=n,i};function Lf(e){"@babel/helpers - typeof";return Lf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lf(e)}function ob(){return ob=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ob.apply(this,arguments)}function l$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function e1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?l$(Object(n),!0).forEach(function(r){Ur(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Zxe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u$(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,RF(r.key),r)}}function Jxe(e,t,n){return t&&u$(e.prototype,t),n&&u$(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function e0e(e,t,n){return t=sb(t),t0e(e,NF()?Reflect.construct(t,n||[],sb(e).constructor):t.apply(e,n))}function t0e(e,t){if(t&&(Lf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return n0e(e)}function n0e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function NF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(NF=function(){return!!e})()}function sb(e){return sb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},sb(e)}function r0e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Tj(e,t)}function Tj(e,t){return Tj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Tj(e,t)}function Ur(e,t,n){return t=RF(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function RF(e){var t=i0e(e,"string");return Lf(t)=="symbol"?t:t+""}function i0e(e,t){if(Lf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Lf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var a0e=function(t){var n=t.data,r=t.startIndex,i=t.endIndex,a=t.x,o=t.width,s=t.travellerWidth;if(!n||!n.length)return{};var l=n.length,u=Bp().domain(ab(0,l)).range([a,a+o-s]),f=u.domain().map(function(d){return u(d)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:u(r),endX:u(i),scale:u,scaleValues:f}},c$=function(t){return t.changedTouches&&!!t.changedTouches.length},Bs=function(e){function t(n){var r;return Zxe(this,t),r=e0e(this,t,[n]),Ur(r,"handleDrag",function(i){r.leaveTimer&&(clearTimeout(r.leaveTimer),r.leaveTimer=null),r.state.isTravellerMoving?r.handleTravellerMove(i):r.state.isSlideMoving&&r.handleSlideDrag(i)}),Ur(r,"handleTouchMove",function(i){i.changedTouches!=null&&i.changedTouches.length>0&&r.handleDrag(i.changedTouches[0])}),Ur(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=r.props,a=i.endIndex,o=i.onDragEnd,s=i.startIndex;o==null||o({endIndex:a,startIndex:s})}),r.detachDragEndListener()}),Ur(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),Ur(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),Ur(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),Ur(r,"handleSlideDragStart",function(i){var a=c$(i)?i.changedTouches[0]:i;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:a.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return r0e(t,e),Jxe(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var i=r.startX,a=r.endX,o=this.state.scaleValues,s=this.props,l=s.gap,u=s.data,f=u.length-1,d=Math.min(i,a),p=Math.max(i,a),h=t.getIndexInRange(o,d),b=t.getIndexInRange(o,p);return{startIndex:h-h%l,endIndex:b===f?f:b-b%l}}},{key:"getTextOfTick",value:function(r){var i=this.props,a=i.data,o=i.tickFormatter,s=i.dataKey,l=ln(a[r],s,r);return Ce(o)?o(l,r):l}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(r){var i=this.state,a=i.slideMoveStartX,o=i.startX,s=i.endX,l=this.props,u=l.x,f=l.width,d=l.travellerWidth,p=l.startIndex,h=l.endIndex,b=l.onChange,m=r.pageX-a;m>0?m=Math.min(m,u+f-d-s,u+f-d-o):m<0&&(m=Math.max(m,u-o,u-s));var g=this.getIndex({startX:o+m,endX:s+m});(g.startIndex!==p||g.endIndex!==h)&&b&&b(g),this.setState({startX:o+m,endX:s+m,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,i){var a=c$(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:a.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var i=this.state,a=i.brushMoveStartX,o=i.movingTravellerId,s=i.endX,l=i.startX,u=this.state[o],f=this.props,d=f.x,p=f.width,h=f.travellerWidth,b=f.onChange,m=f.gap,g=f.data,y={startX:this.state.startX,endX:this.state.endX},v=r.pageX-a;v>0?v=Math.min(v,d+p-h-u):v<0&&(v=Math.max(v,d-u)),y[o]=u+v;var w=this.getIndex(y),S=w.startIndex,O=w.endIndex,j=function(){var T=g.length-1;return o==="startX"&&(s>l?S%m===0:O%m===0)||s<l&&O===T||o==="endX"&&(s>l?O%m===0:S%m===0)||s>l&&O===T};this.setState(Ur(Ur({},o,u+v),"brushMoveStartX",r.pageX),function(){b&&j()&&b(w)})}},{key:"handleTravellerMoveKeyboard",value:function(r,i){var a=this,o=this.state,s=o.scaleValues,l=o.startX,u=o.endX,f=this.state[i],d=s.indexOf(f);if(d!==-1){var p=d+r;if(!(p===-1||p>=s.length)){var h=s[p];i==="startX"&&h>=u||i==="endX"&&h<=l||this.setState(Ur({},i,h),function(){a.props.onChange(a.getIndex({startX:a.state.startX,endX:a.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,i=r.x,a=r.y,o=r.width,s=r.height,l=r.fill,u=r.stroke;return z.createElement("rect",{stroke:u,fill:l,x:i,y:a,width:o,height:s})}},{key:"renderPanorama",value:function(){var r=this.props,i=r.x,a=r.y,o=r.width,s=r.height,l=r.data,u=r.children,f=r.padding,d=x.Children.only(u);return d?z.cloneElement(d,{x:i,y:a,width:o,height:s,margin:f,compact:!0,data:l}):null}},{key:"renderTravellerLayer",value:function(r,i){var a,o,s=this,l=this.props,u=l.y,f=l.travellerWidth,d=l.height,p=l.traveller,h=l.ariaLabel,b=l.data,m=l.startIndex,g=l.endIndex,y=Math.max(r,this.props.x),v=e1(e1({},Ae(this.props,!1)),{},{x:y,y:u,width:f,height:d}),w=h||"Min value: ".concat((a=b[m])===null||a===void 0?void 0:a.name,", Max value: ").concat((o=b[g])===null||o===void 0?void 0:o.name);return z.createElement(Ye,{tabIndex:0,role:"slider","aria-label":w,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(O){["ArrowLeft","ArrowRight"].includes(O.key)&&(O.preventDefault(),O.stopPropagation(),s.handleTravellerMoveKeyboard(O.key==="ArrowRight"?1:-1,i))},onFocus:function(){s.setState({isTravellerFocused:!0})},onBlur:function(){s.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(p,v))}},{key:"renderSlide",value:function(r,i){var a=this.props,o=a.y,s=a.height,l=a.stroke,u=a.travellerWidth,f=Math.min(r,i)+u,d=Math.max(Math.abs(i-r)-u,0);return z.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:l,fillOpacity:.2,x:f,y:o,width:d,height:s})}},{key:"renderText",value:function(){var r=this.props,i=r.startIndex,a=r.endIndex,o=r.y,s=r.height,l=r.travellerWidth,u=r.stroke,f=this.state,d=f.startX,p=f.endX,h=5,b={pointerEvents:"none",fill:u};return z.createElement(Ye,{className:"recharts-brush-texts"},z.createElement(lu,ob({textAnchor:"end",verticalAnchor:"middle",x:Math.min(d,p)-h,y:o+s/2},b),this.getTextOfTick(i)),z.createElement(lu,ob({textAnchor:"start",verticalAnchor:"middle",x:Math.max(d,p)+l+h,y:o+s/2},b),this.getTextOfTick(a)))}},{key:"render",value:function(){var r=this.props,i=r.data,a=r.className,o=r.children,s=r.x,l=r.y,u=r.width,f=r.height,d=r.alwaysShowText,p=this.state,h=p.startX,b=p.endX,m=p.isTextActive,g=p.isSlideMoving,y=p.isTravellerMoving,v=p.isTravellerFocused;if(!i||!i.length||!se(s)||!se(l)||!se(u)||!se(f)||u<=0||f<=0)return null;var w=ke("recharts-brush",a),S=z.Children.count(o)===1,O=Qxe("userSelect","none");return z.createElement(Ye,{className:w,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:O},this.renderBackground(),S&&this.renderPanorama(),this.renderSlide(h,b),this.renderTravellerLayer(h,"startX"),this.renderTravellerLayer(b,"endX"),(m||g||y||v||d)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var i=r.x,a=r.y,o=r.width,s=r.height,l=r.stroke,u=Math.floor(a+s/2)-1;return z.createElement(z.Fragment,null,z.createElement("rect",{x:i,y:a,width:o,height:s,fill:l,stroke:"none"}),z.createElement("line",{x1:i+1,y1:u,x2:i+o-1,y2:u,fill:"none",stroke:"#fff"}),z.createElement("line",{x1:i+1,y1:u+2,x2:i+o-1,y2:u+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,i){var a;return z.isValidElement(r)?a=z.cloneElement(r,i):Ce(r)?a=r(i):a=t.renderDefaultTraveller(i),a}},{key:"getDerivedStateFromProps",value:function(r,i){var a=r.data,o=r.width,s=r.x,l=r.travellerWidth,u=r.updateId,f=r.startIndex,d=r.endIndex;if(a!==i.prevData||u!==i.prevUpdateId)return e1({prevData:a,prevTravellerWidth:l,prevUpdateId:u,prevX:s,prevWidth:o},a&&a.length?a0e({data:a,width:o,x:s,travellerWidth:l,startIndex:f,endIndex:d}):{scale:null,scaleValues:null});if(i.scale&&(o!==i.prevWidth||s!==i.prevX||l!==i.prevTravellerWidth)){i.scale.range([s,s+o-l]);var p=i.scale.domain().map(function(h){return i.scale(h)});return{prevData:a,prevTravellerWidth:l,prevUpdateId:u,prevX:s,prevWidth:o,startX:i.scale(r.startIndex),endX:i.scale(r.endIndex),scaleValues:p}}return null}},{key:"getIndexInRange",value:function(r,i){for(var a=r.length,o=0,s=a-1;s-o>1;){var l=Math.floor((o+s)/2);r[l]>i?s=l:o=l}return i>=r[s]?s:o}}])}(x.PureComponent);Ur(Bs,"displayName","Brush");Ur(Bs,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var o0e=OA;function s0e(e,t){var n;return o0e(e,function(r,i,a){return n=t(r,i,a),!n}),!!n}var l0e=s0e,u0e=gz,c0e=Pa,f0e=l0e,d0e=zr,p0e=$x;function h0e(e,t,n){var r=d0e(e)?u0e:f0e;return n&&p0e(e,t,n)&&(t=void 0),r(e,c0e(t))}var m0e=h0e;const g0e=vt(m0e);var Oa=function(t,n){var r=t.alwaysShow,i=t.ifOverflow;return r&&(i="extendDomain"),i===n},f$=Lz;function v0e(e,t,n){t=="__proto__"&&f$?f$(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var y0e=v0e,b0e=y0e,x0e=Iz,w0e=Pa;function S0e(e,t){var n={};return t=w0e(t),x0e(e,function(r,i,a){b0e(n,i,t(r,i,a))}),n}var O0e=S0e;const j0e=vt(O0e);function E0e(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}var T0e=E0e,A0e=OA;function C0e(e,t){var n=!0;return A0e(e,function(r,i,a){return n=!!t(r,i,a),n}),n}var _0e=C0e,N0e=T0e,R0e=_0e,M0e=Pa,P0e=zr,$0e=$x;function D0e(e,t,n){var r=P0e(e)?N0e:R0e;return n&&$0e(e,t,n)&&(t=void 0),r(e,M0e(t))}var I0e=D0e;const MF=vt(I0e);var k0e=["x","y"];function Gh(e){"@babel/helpers - typeof";return Gh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gh(e)}function Aj(){return Aj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Aj.apply(this,arguments)}function d$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function rp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?d$(Object(n),!0).forEach(function(r){L0e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function L0e(e,t,n){return t=B0e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function B0e(e){var t=z0e(e,"string");return Gh(t)=="symbol"?t:t+""}function z0e(e,t){if(Gh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Gh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function F0e(e,t){if(e==null)return{};var n=U0e(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function U0e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function H0e(e,t){var n=e.x,r=e.y,i=F0e(e,k0e),a="".concat(n),o=parseInt(a,10),s="".concat(r),l=parseInt(s,10),u="".concat(t.height||i.height),f=parseInt(u,10),d="".concat(t.width||i.width),p=parseInt(d,10);return rp(rp(rp(rp(rp({},t),i),o?{x:o}:{}),l?{y:l}:{}),{},{height:f,width:p,name:t.name,radius:t.radius})}function p$(e){return z.createElement(JA,Aj({shapeType:"rectangle",propTransformer:H0e,activeClassName:"recharts-active-bar"},e))}var q0e=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(r,i){if(typeof t=="number")return t;var a=se(r)||eee(r);return a?t(r,i):(a||fu(),n)}},V0e=["value","background"],PF;function Bf(e){"@babel/helpers - typeof";return Bf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bf(e)}function G0e(e,t){if(e==null)return{};var n=K0e(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function K0e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function lb(){return lb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},lb.apply(this,arguments)}function h$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function an(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?h$(Object(n),!0).forEach(function(r){vs(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Y0e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m$(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,DF(r.key),r)}}function X0e(e,t,n){return t&&m$(e.prototype,t),n&&m$(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function W0e(e,t,n){return t=ub(t),Q0e(e,$F()?Reflect.construct(t,n||[],ub(e).constructor):t.apply(e,n))}function Q0e(e,t){if(t&&(Bf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Z0e(e)}function Z0e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $F(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return($F=function(){return!!e})()}function ub(e){return ub=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ub(e)}function J0e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Cj(e,t)}function Cj(e,t){return Cj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Cj(e,t)}function vs(e,t,n){return t=DF(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function DF(e){var t=ewe(e,"string");return Bf(t)=="symbol"?t:t+""}function ewe(e,t){if(Bf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Bf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Do=function(e){function t(){var n;Y0e(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=W0e(this,t,[].concat(i)),vs(n,"state",{isAnimationFinished:!1}),vs(n,"id",Sd("recharts-bar-")),vs(n,"handleAnimationEnd",function(){var o=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),o&&o()}),vs(n,"handleAnimationStart",function(){var o=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),o&&o()}),n}return J0e(t,e),X0e(t,[{key:"renderRectanglesStatically",value:function(r){var i=this,a=this.props,o=a.shape,s=a.dataKey,l=a.activeIndex,u=a.activeBar,f=Ae(this.props,!1);return r&&r.map(function(d,p){var h=p===l,b=h?u:o,m=an(an(an({},f),d),{},{isActive:h,option:b,index:p,dataKey:s,onAnimationStart:i.handleAnimationStart,onAnimationEnd:i.handleAnimationEnd});return z.createElement(Ye,lb({className:"recharts-bar-rectangle"},yo(i.props,d,p),{key:"rectangle-".concat(d==null?void 0:d.x,"-").concat(d==null?void 0:d.y,"-").concat(d==null?void 0:d.value,"-").concat(p)}),z.createElement(p$,m))})}},{key:"renderRectanglesWithAnimation",value:function(){var r=this,i=this.props,a=i.data,o=i.layout,s=i.isAnimationActive,l=i.animationBegin,u=i.animationDuration,f=i.animationEasing,d=i.animationId,p=this.state.prevData;return z.createElement(Vi,{begin:l,duration:u,isActive:s,easing:f,from:{t:0},to:{t:1},key:"bar-".concat(d),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(h){var b=h.t,m=a.map(function(g,y){var v=p&&p[y];if(v){var w=Un(v.x,g.x),S=Un(v.y,g.y),O=Un(v.width,g.width),j=Un(v.height,g.height);return an(an({},g),{},{x:w(b),y:S(b),width:O(b),height:j(b)})}if(o==="horizontal"){var E=Un(0,g.height),T=E(b);return an(an({},g),{},{y:g.y+g.height-T,height:T})}var A=Un(0,g.width),C=A(b);return an(an({},g),{},{width:C})});return z.createElement(Ye,null,r.renderRectanglesStatically(m))})}},{key:"renderRectangles",value:function(){var r=this.props,i=r.data,a=r.isAnimationActive,o=this.state.prevData;return a&&i&&i.length&&(!o||!uu(o,i))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(i)}},{key:"renderBackground",value:function(){var r=this,i=this.props,a=i.data,o=i.dataKey,s=i.activeIndex,l=Ae(this.props.background,!1);return a.map(function(u,f){u.value;var d=u.background,p=G0e(u,V0e);if(!d)return null;var h=an(an(an(an(an({},p),{},{fill:"#eee"},d),l),yo(r.props,u,f)),{},{onAnimationStart:r.handleAnimationStart,onAnimationEnd:r.handleAnimationEnd,dataKey:o,index:f,className:"recharts-bar-background-rectangle"});return z.createElement(p$,lb({key:"background-bar-".concat(f),option:r.props.background,isActive:f===s},h))})}},{key:"renderErrorBar",value:function(r,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.data,s=a.xAxis,l=a.yAxis,u=a.layout,f=a.children,d=ni(f,Vx);if(!d)return null;var p=u==="vertical"?o[0].height/2:o[0].width/2,h=function(g,y){var v=Array.isArray(g.value)?g.value[1]:g.value;return{x:g.x,y:g.y,value:v,errorVal:ln(g,y)}},b={clipPath:r?"url(#clipPath-".concat(i,")"):null};return z.createElement(Ye,b,d.map(function(m){return z.cloneElement(m,{key:"error-bar-".concat(i,"-").concat(m.props.dataKey),data:o,xAxis:s,yAxis:l,layout:u,offset:p,dataPointFormatter:h})}))}},{key:"render",value:function(){var r=this.props,i=r.hide,a=r.data,o=r.className,s=r.xAxis,l=r.yAxis,u=r.left,f=r.top,d=r.width,p=r.height,h=r.isAnimationActive,b=r.background,m=r.id;if(i||!a||!a.length)return null;var g=this.state.isAnimationFinished,y=ke("recharts-bar",o),v=s&&s.allowDataOverflow,w=l&&l.allowDataOverflow,S=v||w,O=Ue(m)?this.id:m;return z.createElement(Ye,{className:y},v||w?z.createElement("defs",null,z.createElement("clipPath",{id:"clipPath-".concat(O)},z.createElement("rect",{x:v?u:u-d/2,y:w?f:f-p/2,width:v?d:d*2,height:w?p:p*2}))):null,z.createElement(Ye,{className:"recharts-bar-rectangles",clipPath:S?"url(#clipPath-".concat(O,")"):null},b?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(S,O),(!h||g)&&Sa.renderCallByParent(this.props,a))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curData:r.data,prevData:i.curData}:r.data!==i.curData?{curData:r.data}:null}}])}(x.PureComponent);PF=Do;vs(Do,"displayName","Bar");vs(Do,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!Ws.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});vs(Do,"getComposedData",function(e){var t=e.props,n=e.item,r=e.barPosition,i=e.bandSize,a=e.xAxis,o=e.yAxis,s=e.xAxisTicks,l=e.yAxisTicks,u=e.stackedData,f=e.dataStartIndex,d=e.displayedData,p=e.offset,h=Q4(r,n);if(!h)return null;var b=t.layout,m=n.type.defaultProps,g=m!==void 0?an(an({},m),n.props):n.props,y=g.dataKey,v=g.children,w=g.minPointSize,S=b==="horizontal"?o:a,O=u?S.scale.domain():null,j=eF({numericAxis:S}),E=ni(v,Td),T=d.map(function(A,C){var _,N,D,R,$,P;u?_=Z4(u[f+C],O):(_=ln(A,y),Array.isArray(_)||(_=[j,_]));var B=q0e(w,PF.defaultProps.minPointSize)(_[1],C);if(b==="horizontal"){var L,k=[o.scale(_[0]),o.scale(_[1])],I=k[0],V=k[1];N=Hy({axis:a,ticks:s,bandSize:i,offset:h.offset,entry:A,index:C}),D=(L=V??I)!==null&&L!==void 0?L:void 0,R=h.size;var M=I-V;if($=Number.isNaN(M)?0:M,P={x:N,y:o.y,width:R,height:o.height},Math.abs(B)>0&&Math.abs($)<Math.abs(B)){var q=Pn($||B)*(Math.abs(B)-Math.abs($));D-=q,$+=q}}else{var G=[a.scale(_[0]),a.scale(_[1])],U=G[0],Y=G[1];if(N=U,D=Hy({axis:o,ticks:l,bandSize:i,offset:h.offset,entry:A,index:C}),R=Y-U,$=h.size,P={x:a.x,y:D,width:a.width,height:$},Math.abs(B)>0&&Math.abs(R)<Math.abs(B)){var X=Pn(R||B)*(Math.abs(B)-Math.abs(R));R+=X}}return an(an(an({},A),{},{x:N,y:D,width:R,height:$,value:u?_:_[1],payload:A,background:P},E&&E[C]&&E[C].props),{},{tooltipPayload:[QA(n,A)],tooltipPosition:{x:N+R/2,y:D+$/2}})});return an({data:T,layout:b},p)});function Kh(e){"@babel/helpers - typeof";return Kh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kh(e)}function twe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g$(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,IF(r.key),r)}}function nwe(e,t,n){return t&&g$(e.prototype,t),n&&g$(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function v$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Bi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?v$(Object(n),!0).forEach(function(r){Qx(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Qx(e,t,n){return t=IF(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function IF(e){var t=rwe(e,"string");return Kh(t)=="symbol"?t:t+""}function rwe(e,t){if(Kh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Kh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var kF=function(t,n,r,i,a){var o=t.width,s=t.height,l=t.layout,u=t.children,f=Object.keys(n),d={left:r.left,leftMirror:r.left,right:o-r.right,rightMirror:o-r.right,top:r.top,topMirror:r.top,bottom:s-r.bottom,bottomMirror:s-r.bottom},p=!!qr(u,Do);return f.reduce(function(h,b){var m=n[b],g=m.orientation,y=m.domain,v=m.padding,w=v===void 0?{}:v,S=m.mirror,O=m.reversed,j="".concat(g).concat(S?"Mirror":""),E,T,A,C,_;if(m.type==="number"&&(m.padding==="gap"||m.padding==="no-gap")){var N=y[1]-y[0],D=1/0,R=m.categoricalDomain.sort(ree);if(R.forEach(function(G,U){U>0&&(D=Math.min((G||0)-(R[U-1]||0),D))}),Number.isFinite(D)){var $=D/N,P=m.layout==="vertical"?r.height:r.width;if(m.padding==="gap"&&(E=$*P/2),m.padding==="no-gap"){var B=wr(t.barCategoryGap,$*P),L=$*P/2;E=L-B-(L-B)/P*B}}}i==="xAxis"?T=[r.left+(w.left||0)+(E||0),r.left+r.width-(w.right||0)-(E||0)]:i==="yAxis"?T=l==="horizontal"?[r.top+r.height-(w.bottom||0),r.top+(w.top||0)]:[r.top+(w.top||0)+(E||0),r.top+r.height-(w.bottom||0)-(E||0)]:T=m.range,O&&(T=[T[1],T[0]]);var k=X4(m,a,p),I=k.scale,V=k.realScaleType;I.domain(y).range(T),W4(I);var M=J4(I,Bi(Bi({},m),{},{realScaleType:V}));i==="xAxis"?(_=g==="top"&&!S||g==="bottom"&&S,A=r.left,C=d[j]-_*m.height):i==="yAxis"&&(_=g==="left"&&!S||g==="right"&&S,A=d[j]-_*m.width,C=r.top);var q=Bi(Bi(Bi({},m),M),{},{realScaleType:V,x:A,y:C,scale:I,width:i==="xAxis"?r.width:m.width,height:i==="yAxis"?r.height:m.height});return q.bandSize=qy(q,M),!m.hide&&i==="xAxis"?d[j]+=(_?-1:1)*q.height:m.hide||(d[j]+=(_?-1:1)*q.width),Bi(Bi({},h),{},Qx({},b,q))},{})},LF=function(t,n){var r=t.x,i=t.y,a=n.x,o=n.y;return{x:Math.min(r,a),y:Math.min(i,o),width:Math.abs(a-r),height:Math.abs(o-i)}},iwe=function(t){var n=t.x1,r=t.y1,i=t.x2,a=t.y2;return LF({x:n,y:r},{x:i,y:a})},BF=function(){function e(t){twe(this,e),this.scale=t}return nwe(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.bandAware,a=r.position;if(n!==void 0){if(a)switch(a){case"start":return this.scale(n);case"middle":{var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+o}case"end":{var s=this.bandwidth?this.bandwidth():0;return this.scale(n)+s}default:return this.scale(n)}if(i){var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+l}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),i=r[0],a=r[r.length-1];return i<=a?n>=i&&n<=a:n>=a&&n<=i}}],[{key:"create",value:function(n){return new e(n)}}])}();Qx(BF,"EPS",1e-4);var eC=function(t){var n=Object.keys(t).reduce(function(r,i){return Bi(Bi({},r),{},Qx({},i,BF.create(t[i])))},{});return Bi(Bi({},n),{},{apply:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=a.bandAware,s=a.position;return j0e(i,function(l,u){return n[u].apply(l,{bandAware:o,position:s})})},isInRange:function(i){return MF(i,function(a,o){return n[o].isInRange(a)})}})};function awe(e){return(e%180+180)%180}var owe=function(t){var n=t.width,r=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=awe(i),o=a*Math.PI/180,s=Math.atan(r/n),l=o>s&&o<Math.PI-s?r/Math.sin(o):n/Math.cos(o);return Math.abs(l)},swe=Pa,lwe=Em,uwe=Mx;function cwe(e){return function(t,n,r){var i=Object(t);if(!lwe(t)){var a=swe(n);t=uwe(t),n=function(s){return a(i[s],s,i)}}var o=e(t,n,r);return o>-1?i[a?t[o]:o]:void 0}}var fwe=cwe,dwe=CF;function pwe(e){var t=dwe(e),n=t%1;return t===t?n?t-n:t:0}var hwe=pwe,mwe=Nz,gwe=Pa,vwe=hwe,ywe=Math.max;function bwe(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=n==null?0:vwe(n);return i<0&&(i=ywe(r+i,0)),mwe(e,gwe(t),i)}var xwe=bwe,wwe=fwe,Swe=xwe,Owe=wwe(Swe),jwe=Owe;const Ewe=vt(jwe);var Twe=oJ(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),tC=x.createContext(void 0),nC=x.createContext(void 0),zF=x.createContext(void 0),FF=x.createContext({}),UF=x.createContext(void 0),HF=x.createContext(0),qF=x.createContext(0),y$=function(t){var n=t.state,r=n.xAxisMap,i=n.yAxisMap,a=n.offset,o=t.clipPathId,s=t.children,l=t.width,u=t.height,f=Twe(a);return z.createElement(tC.Provider,{value:r},z.createElement(nC.Provider,{value:i},z.createElement(FF.Provider,{value:a},z.createElement(zF.Provider,{value:f},z.createElement(UF.Provider,{value:o},z.createElement(HF.Provider,{value:u},z.createElement(qF.Provider,{value:l},s)))))))},Awe=function(){return x.useContext(UF)},VF=function(t){var n=x.useContext(tC);n==null&&fu();var r=n[t];return r==null&&fu(),r},Cwe=function(){var t=x.useContext(tC);return es(t)},_we=function(){var t=x.useContext(nC),n=Ewe(t,function(r){return MF(r.domain,Number.isFinite)});return n||es(t)},GF=function(t){var n=x.useContext(nC);n==null&&fu();var r=n[t];return r==null&&fu(),r},Nwe=function(){var t=x.useContext(zF);return t},Rwe=function(){return x.useContext(FF)},rC=function(){return x.useContext(qF)},iC=function(){return x.useContext(HF)};function zf(e){"@babel/helpers - typeof";return zf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zf(e)}function Mwe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Pwe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,YF(r.key),r)}}function $we(e,t,n){return t&&Pwe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Dwe(e,t,n){return t=cb(t),Iwe(e,KF()?Reflect.construct(t,n||[],cb(e).constructor):t.apply(e,n))}function Iwe(e,t){if(t&&(zf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return kwe(e)}function kwe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function KF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(KF=function(){return!!e})()}function cb(e){return cb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},cb(e)}function Lwe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_j(e,t)}function _j(e,t){return _j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},_j(e,t)}function b$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function x$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?b$(Object(n),!0).forEach(function(r){aC(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function aC(e,t,n){return t=YF(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function YF(e){var t=Bwe(e,"string");return zf(t)=="symbol"?t:t+""}function Bwe(e,t){if(zf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(zf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function zwe(e,t){return qwe(e)||Hwe(e,t)||Uwe(e,t)||Fwe()}function Fwe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
144
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Uwe(e,t){if(e){if(typeof e=="string")return w$(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return w$(e,t)}}function w$(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Hwe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function qwe(e){if(Array.isArray(e))return e}function Nj(){return Nj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Nj.apply(this,arguments)}var Vwe=function(t,n){var r;return z.isValidElement(t)?r=z.cloneElement(t,n):Ce(t)?r=t(n):r=z.createElement("line",Nj({},n,{className:"recharts-reference-line-line"})),r},Gwe=function(t,n,r,i,a,o,s,l,u){var f=a.x,d=a.y,p=a.width,h=a.height;if(r){var b=u.y,m=t.y.apply(b,{position:o});if(Oa(u,"discard")&&!t.y.isInRange(m))return null;var g=[{x:f+p,y:m},{x:f,y:m}];return l==="left"?g.reverse():g}if(n){var y=u.x,v=t.x.apply(y,{position:o});if(Oa(u,"discard")&&!t.x.isInRange(v))return null;var w=[{x:v,y:d+h},{x:v,y:d}];return s==="top"?w.reverse():w}if(i){var S=u.segment,O=S.map(function(j){return t.apply(j,{position:o})});return Oa(u,"discard")&&g0e(O,function(j){return!t.isInRange(j)})?null:O}return null};function Kwe(e){var t=e.x,n=e.y,r=e.segment,i=e.xAxisId,a=e.yAxisId,o=e.shape,s=e.className,l=e.alwaysShow,u=Awe(),f=VF(i),d=GF(a),p=Nwe();if(!u||!p)return null;Hi(l===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var h=eC({x:f.scale,y:d.scale}),b=Sn(t),m=Sn(n),g=r&&r.length===2,y=Gwe(h,b,m,g,p,e.position,f.orientation,d.orientation,e);if(!y)return null;var v=zwe(y,2),w=v[0],S=w.x,O=w.y,j=v[1],E=j.x,T=j.y,A=Oa(e,"hidden")?"url(#".concat(u,")"):void 0,C=x$(x$({clipPath:A},Ae(e,!0)),{},{x1:S,y1:O,x2:E,y2:T});return z.createElement(Ye,{className:ke("recharts-reference-line",s)},Vwe(o,C),Rn.renderCallByParent(e,iwe({x1:S,y1:O,x2:E,y2:T})))}var oC=function(e){function t(){return Mwe(this,t),Dwe(this,t,arguments)}return Lwe(t,e),$we(t,[{key:"render",value:function(){return z.createElement(Kwe,this.props)}}])}(z.Component);aC(oC,"displayName","ReferenceLine");aC(oC,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function Rj(){return Rj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Rj.apply(this,arguments)}function Ff(e){"@babel/helpers - typeof";return Ff=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ff(e)}function S$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function O$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?S$(Object(n),!0).forEach(function(r){Zx(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ywe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xwe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,WF(r.key),r)}}function Wwe(e,t,n){return t&&Xwe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Qwe(e,t,n){return t=fb(t),Zwe(e,XF()?Reflect.construct(t,n||[],fb(e).constructor):t.apply(e,n))}function Zwe(e,t){if(t&&(Ff(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Jwe(e)}function Jwe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function XF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(XF=function(){return!!e})()}function fb(e){return fb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},fb(e)}function e1e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Mj(e,t)}function Mj(e,t){return Mj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Mj(e,t)}function Zx(e,t,n){return t=WF(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function WF(e){var t=t1e(e,"string");return Ff(t)=="symbol"?t:t+""}function t1e(e,t){if(Ff(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ff(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var n1e=function(t){var n=t.x,r=t.y,i=t.xAxis,a=t.yAxis,o=eC({x:i.scale,y:a.scale}),s=o.apply({x:n,y:r},{bandAware:!0});return Oa(t,"discard")&&!o.isInRange(s)?null:s},Jx=function(e){function t(){return Ywe(this,t),Qwe(this,t,arguments)}return e1e(t,e),Wwe(t,[{key:"render",value:function(){var r=this.props,i=r.x,a=r.y,o=r.r,s=r.alwaysShow,l=r.clipPathId,u=Sn(i),f=Sn(a);if(Hi(s===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!u||!f)return null;var d=n1e(this.props);if(!d)return null;var p=d.x,h=d.y,b=this.props,m=b.shape,g=b.className,y=Oa(this.props,"hidden")?"url(#".concat(l,")"):void 0,v=O$(O$({clipPath:y},Ae(this.props,!0)),{},{cx:p,cy:h});return z.createElement(Ye,{className:ke("recharts-reference-dot",g)},t.renderDot(m,v),Rn.renderCallByParent(this.props,{x:p-o,y:h-o,width:2*o,height:2*o}))}}])}(z.Component);Zx(Jx,"displayName","ReferenceDot");Zx(Jx,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});Zx(Jx,"renderDot",function(e,t){var n;return z.isValidElement(e)?n=z.cloneElement(e,t):Ce(e)?n=e(t):n=z.createElement(Gx,Rj({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),n});function Pj(){return Pj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Pj.apply(this,arguments)}function Uf(e){"@babel/helpers - typeof";return Uf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Uf(e)}function j$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function E$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?j$(Object(n),!0).forEach(function(r){e0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function r1e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i1e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ZF(r.key),r)}}function a1e(e,t,n){return t&&i1e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function o1e(e,t,n){return t=db(t),s1e(e,QF()?Reflect.construct(t,n||[],db(e).constructor):t.apply(e,n))}function s1e(e,t){if(t&&(Uf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return l1e(e)}function l1e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function QF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(QF=function(){return!!e})()}function db(e){return db=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},db(e)}function u1e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$j(e,t)}function $j(e,t){return $j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},$j(e,t)}function e0(e,t,n){return t=ZF(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ZF(e){var t=c1e(e,"string");return Uf(t)=="symbol"?t:t+""}function c1e(e,t){if(Uf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Uf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var f1e=function(t,n,r,i,a){var o=a.x1,s=a.x2,l=a.y1,u=a.y2,f=a.xAxis,d=a.yAxis;if(!f||!d)return null;var p=eC({x:f.scale,y:d.scale}),h={x:t?p.x.apply(o,{position:"start"}):p.x.rangeMin,y:r?p.y.apply(l,{position:"start"}):p.y.rangeMin},b={x:n?p.x.apply(s,{position:"end"}):p.x.rangeMax,y:i?p.y.apply(u,{position:"end"}):p.y.rangeMax};return Oa(a,"discard")&&(!p.isInRange(h)||!p.isInRange(b))?null:LF(h,b)},t0=function(e){function t(){return r1e(this,t),o1e(this,t,arguments)}return u1e(t,e),a1e(t,[{key:"render",value:function(){var r=this.props,i=r.x1,a=r.x2,o=r.y1,s=r.y2,l=r.className,u=r.alwaysShow,f=r.clipPathId;Hi(u===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var d=Sn(i),p=Sn(a),h=Sn(o),b=Sn(s),m=this.props.shape;if(!d&&!p&&!h&&!b&&!m)return null;var g=f1e(d,p,h,b,this.props);if(!g&&!m)return null;var y=Oa(this.props,"hidden")?"url(#".concat(f,")"):void 0;return z.createElement(Ye,{className:ke("recharts-reference-area",l)},t.renderRect(m,E$(E$({clipPath:y},Ae(this.props,!0)),g)),Rn.renderCallByParent(this.props,g))}}])}(z.Component);e0(t0,"displayName","ReferenceArea");e0(t0,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});e0(t0,"renderRect",function(e,t){var n;return z.isValidElement(e)?n=z.cloneElement(e,t):Ce(e)?n=e(t):n=z.createElement(ZA,Pj({},t,{className:"recharts-reference-area-rect"})),n});function JF(e,t,n){if(t<1)return[];if(t===1&&n===void 0)return e;for(var r=[],i=0;i<e.length;i+=t)r.push(e[i]);return r}function d1e(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return owe(r,n)}function p1e(e,t,n){var r=n==="width",i=e.x,a=e.y,o=e.width,s=e.height;return t===1?{start:r?i:a,end:r?i+o:a+s}:{start:r?i+o:a+s,end:r?i:a}}function pb(e,t,n,r,i){if(e*t<e*r||e*t>e*i)return!1;var a=n();return e*(t-e*a/2-r)>=0&&e*(t+e*a/2-i)<=0}function h1e(e,t){return JF(e,t+1)}function m1e(e,t,n,r,i){for(var a=(r||[]).slice(),o=t.start,s=t.end,l=0,u=1,f=o,d=function(){var b=r==null?void 0:r[l];if(b===void 0)return{v:JF(r,u)};var m=l,g,y=function(){return g===void 0&&(g=n(b,m)),g},v=b.coordinate,w=l===0||pb(e,v,y,f,s);w||(l=0,f=o,u+=1),w&&(f=v+e*(y()/2+i),l+=u)},p;u<=a.length;)if(p=d(),p)return p.v;return[]}function Yh(e){"@babel/helpers - typeof";return Yh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yh(e)}function T$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function er(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?T$(Object(n),!0).forEach(function(r){g1e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function g1e(e,t,n){return t=v1e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v1e(e){var t=y1e(e,"string");return Yh(t)=="symbol"?t:t+""}function y1e(e,t){if(Yh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Yh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function b1e(e,t,n,r,i){for(var a=(r||[]).slice(),o=a.length,s=t.start,l=t.end,u=function(p){var h=a[p],b,m=function(){return b===void 0&&(b=n(h,p)),b};if(p===o-1){var g=e*(h.coordinate+e*m()/2-l);a[p]=h=er(er({},h),{},{tickCoord:g>0?h.coordinate-g*e:h.coordinate})}else a[p]=h=er(er({},h),{},{tickCoord:h.coordinate});var y=pb(e,h.tickCoord,m,s,l);y&&(l=h.tickCoord-e*(m()/2+i),a[p]=er(er({},h),{},{isShow:!0}))},f=o-1;f>=0;f--)u(f);return a}function x1e(e,t,n,r,i,a){var o=(r||[]).slice(),s=o.length,l=t.start,u=t.end;if(a){var f=r[s-1],d=n(f,s-1),p=e*(f.coordinate+e*d/2-u);o[s-1]=f=er(er({},f),{},{tickCoord:p>0?f.coordinate-p*e:f.coordinate});var h=pb(e,f.tickCoord,function(){return d},l,u);h&&(u=f.tickCoord-e*(d/2+i),o[s-1]=er(er({},f),{},{isShow:!0}))}for(var b=a?s-1:s,m=function(v){var w=o[v],S,O=function(){return S===void 0&&(S=n(w,v)),S};if(v===0){var j=e*(w.coordinate-e*O()/2-l);o[v]=w=er(er({},w),{},{tickCoord:j<0?w.coordinate-j*e:w.coordinate})}else o[v]=w=er(er({},w),{},{tickCoord:w.coordinate});var E=pb(e,w.tickCoord,O,l,u);E&&(l=w.tickCoord+e*(O()/2+i),o[v]=er(er({},w),{},{isShow:!0}))},g=0;g<b;g++)m(g);return o}function sC(e,t,n){var r=e.tick,i=e.ticks,a=e.viewBox,o=e.minTickGap,s=e.orientation,l=e.interval,u=e.tickFormatter,f=e.unit,d=e.angle;if(!i||!i.length||!r)return[];if(se(l)||Ws.isSsr)return h1e(i,typeof l=="number"&&se(l)?l:0);var p=[],h=s==="top"||s==="bottom"?"width":"height",b=f&&h==="width"?Lp(f,{fontSize:t,letterSpacing:n}):{width:0,height:0},m=function(w,S){var O=Ce(u)?u(w.value,S):w.value;return h==="width"?d1e(Lp(O,{fontSize:t,letterSpacing:n}),b,d):Lp(O,{fontSize:t,letterSpacing:n})[h]},g=i.length>=2?Pn(i[1].coordinate-i[0].coordinate):1,y=p1e(a,g,h);return l==="equidistantPreserveStart"?m1e(g,y,m,i,o):(l==="preserveStart"||l==="preserveStartEnd"?p=x1e(g,y,m,i,o,l==="preserveStartEnd"):p=b1e(g,y,m,i,o),p.filter(function(v){return v.isShow}))}var w1e=["viewBox"],S1e=["viewBox"],O1e=["ticks"];function Hf(e){"@babel/helpers - typeof";return Hf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hf(e)}function wc(){return wc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wc.apply(this,arguments)}function A$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function mn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?A$(Object(n),!0).forEach(function(r){lC(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function t1(e,t){if(e==null)return{};var n=j1e(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function j1e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function E1e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function C$(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,tU(r.key),r)}}function T1e(e,t,n){return t&&C$(e.prototype,t),n&&C$(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function A1e(e,t,n){return t=hb(t),C1e(e,eU()?Reflect.construct(t,n||[],hb(e).constructor):t.apply(e,n))}function C1e(e,t){if(t&&(Hf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _1e(e)}function _1e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function eU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(eU=function(){return!!e})()}function hb(e){return hb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},hb(e)}function N1e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Dj(e,t)}function Dj(e,t){return Dj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Dj(e,t)}function lC(e,t,n){return t=tU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tU(e){var t=R1e(e,"string");return Hf(t)=="symbol"?t:t+""}function R1e(e,t){if(Hf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Hf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Rd=function(e){function t(n){var r;return E1e(this,t),r=A1e(this,t,[n]),r.state={fontSize:"",letterSpacing:""},r}return N1e(t,e),T1e(t,[{key:"shouldComponentUpdate",value:function(r,i){var a=r.viewBox,o=t1(r,w1e),s=this.props,l=s.viewBox,u=t1(s,S1e);return!Ic(a,l)||!Ic(o,u)||!Ic(i,this.state)}},{key:"componentDidMount",value:function(){var r=this.layerReference;if(r){var i=r.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];i&&this.setState({fontSize:window.getComputedStyle(i).fontSize,letterSpacing:window.getComputedStyle(i).letterSpacing})}}},{key:"getTickLineCoord",value:function(r){var i=this.props,a=i.x,o=i.y,s=i.width,l=i.height,u=i.orientation,f=i.tickSize,d=i.mirror,p=i.tickMargin,h,b,m,g,y,v,w=d?-1:1,S=r.tickSize||f,O=se(r.tickCoord)?r.tickCoord:r.coordinate;switch(u){case"top":h=b=r.coordinate,g=o+ +!d*l,m=g-w*S,v=m-w*p,y=O;break;case"left":m=g=r.coordinate,b=a+ +!d*s,h=b-w*S,y=h-w*p,v=O;break;case"right":m=g=r.coordinate,b=a+ +d*s,h=b+w*S,y=h+w*p,v=O;break;default:h=b=r.coordinate,g=o+ +d*l,m=g+w*S,v=m+w*p,y=O;break}return{line:{x1:h,y1:m,x2:b,y2:g},tick:{x:y,y:v}}}},{key:"getTickTextAnchor",value:function(){var r=this.props,i=r.orientation,a=r.mirror,o;switch(i){case"left":o=a?"start":"end";break;case"right":o=a?"end":"start";break;default:o="middle";break}return o}},{key:"getTickVerticalAnchor",value:function(){var r=this.props,i=r.orientation,a=r.mirror,o="end";switch(i){case"left":case"right":o="middle";break;case"top":o=a?"start":"end";break;default:o=a?"end":"start";break}return o}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.x,a=r.y,o=r.width,s=r.height,l=r.orientation,u=r.mirror,f=r.axisLine,d=mn(mn(mn({},Ae(this.props,!1)),Ae(f,!1)),{},{fill:"none"});if(l==="top"||l==="bottom"){var p=+(l==="top"&&!u||l==="bottom"&&u);d=mn(mn({},d),{},{x1:i,y1:a+p*s,x2:i+o,y2:a+p*s})}else{var h=+(l==="left"&&!u||l==="right"&&u);d=mn(mn({},d),{},{x1:i+h*o,y1:a,x2:i+h*o,y2:a+s})}return z.createElement("line",wc({},d,{className:ke("recharts-cartesian-axis-line",ti(f,"className"))}))}},{key:"renderTicks",value:function(r,i,a){var o=this,s=this.props,l=s.tickLine,u=s.stroke,f=s.tick,d=s.tickFormatter,p=s.unit,h=sC(mn(mn({},this.props),{},{ticks:r}),i,a),b=this.getTickTextAnchor(),m=this.getTickVerticalAnchor(),g=Ae(this.props,!1),y=Ae(f,!1),v=mn(mn({},g),{},{fill:"none"},Ae(l,!1)),w=h.map(function(S,O){var j=o.getTickLineCoord(S),E=j.line,T=j.tick,A=mn(mn(mn(mn({textAnchor:b,verticalAnchor:m},g),{},{stroke:"none",fill:u},y),T),{},{index:O,payload:S,visibleTicksCount:h.length,tickFormatter:d});return z.createElement(Ye,wc({className:"recharts-cartesian-axis-tick",key:"tick-".concat(S.value,"-").concat(S.coordinate,"-").concat(S.tickCoord)},yo(o.props,S,O)),l&&z.createElement("line",wc({},v,E,{className:ke("recharts-cartesian-axis-tick-line",ti(l,"className"))})),f&&t.renderTickItem(f,A,"".concat(Ce(d)?d(S.value,O):S.value).concat(p||"")))});return z.createElement("g",{className:"recharts-cartesian-axis-ticks"},w)}},{key:"render",value:function(){var r=this,i=this.props,a=i.axisLine,o=i.width,s=i.height,l=i.ticksGenerator,u=i.className,f=i.hide;if(f)return null;var d=this.props,p=d.ticks,h=t1(d,O1e),b=p;return Ce(l)&&(b=p&&p.length>0?l(this.props):l(h)),o<=0||s<=0||!b||!b.length?null:z.createElement(Ye,{className:ke("recharts-cartesian-axis",u),ref:function(g){r.layerReference=g}},a&&this.renderAxisLine(),this.renderTicks(b,this.state.fontSize,this.state.letterSpacing),Rn.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,i,a){var o,s=ke(i.className,"recharts-cartesian-axis-tick-value");return z.isValidElement(r)?o=z.cloneElement(r,mn(mn({},i),{},{className:s})):Ce(r)?o=r(mn(mn({},i),{},{className:s})):o=z.createElement(lu,wc({},i,{className:"recharts-cartesian-axis-tick-value"}),a),o}}])}(x.Component);lC(Rd,"displayName","CartesianAxis");lC(Rd,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var M1e=["x1","y1","x2","y2","key"],P1e=["offset"];function du(e){"@babel/helpers - typeof";return du=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},du(e)}function _$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function nr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_$(Object(n),!0).forEach(function(r){$1e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function $1e(e,t,n){return t=D1e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function D1e(e){var t=I1e(e,"string");return du(t)=="symbol"?t:t+""}function I1e(e,t){if(du(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(du(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Cl(){return Cl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Cl.apply(this,arguments)}function N$(e,t){if(e==null)return{};var n=k1e(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function k1e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var L1e=function(t){var n=t.fill;if(!n||n==="none")return null;var r=t.fillOpacity,i=t.x,a=t.y,o=t.width,s=t.height,l=t.ry;return z.createElement("rect",{x:i,y:a,ry:l,width:o,height:s,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function nU(e,t){var n;if(z.isValidElement(e))n=z.cloneElement(e,t);else if(Ce(e))n=e(t);else{var r=t.x1,i=t.y1,a=t.x2,o=t.y2,s=t.key,l=N$(t,M1e),u=Ae(l,!1);u.offset;var f=N$(u,P1e);n=z.createElement("line",Cl({},f,{x1:r,y1:i,x2:a,y2:o,fill:"none",key:s}))}return n}function B1e(e){var t=e.x,n=e.width,r=e.horizontal,i=r===void 0?!0:r,a=e.horizontalPoints;if(!i||!a||!a.length)return null;var o=a.map(function(s,l){var u=nr(nr({},e),{},{x1:t,y1:s,x2:t+n,y2:s,key:"line-".concat(l),index:l});return nU(i,u)});return z.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function z1e(e){var t=e.y,n=e.height,r=e.vertical,i=r===void 0?!0:r,a=e.verticalPoints;if(!i||!a||!a.length)return null;var o=a.map(function(s,l){var u=nr(nr({},e),{},{x1:s,y1:t,x2:s,y2:t+n,key:"line-".concat(l),index:l});return nU(i,u)});return z.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function F1e(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,i=e.y,a=e.width,o=e.height,s=e.horizontalPoints,l=e.horizontal,u=l===void 0?!0:l;if(!u||!t||!t.length)return null;var f=s.map(function(p){return Math.round(p+i-i)}).sort(function(p,h){return p-h});i!==f[0]&&f.unshift(0);var d=f.map(function(p,h){var b=!f[h+1],m=b?i+o-p:f[h+1]-p;if(m<=0)return null;var g=h%t.length;return z.createElement("rect",{key:"react-".concat(h),y:p,x:r,height:m,width:a,stroke:"none",fill:t[g],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return z.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function U1e(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,i=e.fillOpacity,a=e.x,o=e.y,s=e.width,l=e.height,u=e.verticalPoints;if(!n||!r||!r.length)return null;var f=u.map(function(p){return Math.round(p+a-a)}).sort(function(p,h){return p-h});a!==f[0]&&f.unshift(0);var d=f.map(function(p,h){var b=!f[h+1],m=b?a+s-p:f[h+1]-p;if(m<=0)return null;var g=h%r.length;return z.createElement("rect",{key:"react-".concat(h),x:p,y:o,width:m,height:l,stroke:"none",fill:r[g],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return z.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},d)}var H1e=function(t,n){var r=t.xAxis,i=t.width,a=t.height,o=t.offset;return Y4(sC(nr(nr(nr({},Rd.defaultProps),r),{},{ticks:eo(r,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.left,o.left+o.width,n)},q1e=function(t,n){var r=t.yAxis,i=t.width,a=t.height,o=t.offset;return Y4(sC(nr(nr(nr({},Rd.defaultProps),r),{},{ticks:eo(r,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.top,o.top+o.height,n)},Gu={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function Mm(e){var t,n,r,i,a,o,s=rC(),l=iC(),u=Rwe(),f=nr(nr({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:Gu.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:Gu.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:Gu.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:Gu.horizontalFill,vertical:(a=e.vertical)!==null&&a!==void 0?a:Gu.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:Gu.verticalFill,x:se(e.x)?e.x:u.left,y:se(e.y)?e.y:u.top,width:se(e.width)?e.width:u.width,height:se(e.height)?e.height:u.height}),d=f.x,p=f.y,h=f.width,b=f.height,m=f.syncWithTicks,g=f.horizontalValues,y=f.verticalValues,v=Cwe(),w=_we();if(!se(h)||h<=0||!se(b)||b<=0||!se(d)||d!==+d||!se(p)||p!==+p)return null;var S=f.verticalCoordinatesGenerator||H1e,O=f.horizontalCoordinatesGenerator||q1e,j=f.horizontalPoints,E=f.verticalPoints;if((!j||!j.length)&&Ce(O)){var T=g&&g.length,A=O({yAxis:w?nr(nr({},w),{},{ticks:T?g:w.ticks}):void 0,width:s,height:l,offset:u},T?!0:m);Hi(Array.isArray(A),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(du(A),"]")),Array.isArray(A)&&(j=A)}if((!E||!E.length)&&Ce(S)){var C=y&&y.length,_=S({xAxis:v?nr(nr({},v),{},{ticks:C?y:v.ticks}):void 0,width:s,height:l,offset:u},C?!0:m);Hi(Array.isArray(_),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(du(_),"]")),Array.isArray(_)&&(E=_)}return z.createElement("g",{className:"recharts-cartesian-grid"},z.createElement(L1e,{fill:f.fill,fillOpacity:f.fillOpacity,x:f.x,y:f.y,width:f.width,height:f.height,ry:f.ry}),z.createElement(B1e,Cl({},f,{offset:u,horizontalPoints:j,xAxis:v,yAxis:w})),z.createElement(z1e,Cl({},f,{offset:u,verticalPoints:E,xAxis:v,yAxis:w})),z.createElement(F1e,Cl({},f,{horizontalPoints:j})),z.createElement(U1e,Cl({},f,{verticalPoints:E})))}Mm.displayName="CartesianGrid";var V1e=["layout","type","stroke","connectNulls","isRange","ref"],G1e=["key"],rU;function qf(e){"@babel/helpers - typeof";return qf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qf(e)}function iU(e,t){if(e==null)return{};var n=K1e(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function K1e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function _l(){return _l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_l.apply(this,arguments)}function R$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Yo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?R$(Object(n),!0).forEach(function(r){va(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Y1e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function M$(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,oU(r.key),r)}}function X1e(e,t,n){return t&&M$(e.prototype,t),n&&M$(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function W1e(e,t,n){return t=mb(t),Q1e(e,aU()?Reflect.construct(t,n||[],mb(e).constructor):t.apply(e,n))}function Q1e(e,t){if(t&&(qf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Z1e(e)}function Z1e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function aU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(aU=function(){return!!e})()}function mb(e){return mb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},mb(e)}function J1e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ij(e,t)}function Ij(e,t){return Ij=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Ij(e,t)}function va(e,t,n){return t=oU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oU(e){var t=eSe(e,"string");return qf(t)=="symbol"?t:t+""}function eSe(e,t){if(qf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(qf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Io=function(e){function t(){var n;Y1e(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=W1e(this,t,[].concat(i)),va(n,"state",{isAnimationFinished:!0}),va(n,"id",Sd("recharts-area-")),va(n,"handleAnimationEnd",function(){var o=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),Ce(o)&&o()}),va(n,"handleAnimationStart",function(){var o=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),Ce(o)&&o()}),n}return J1e(t,e),X1e(t,[{key:"renderDots",value:function(r,i,a){var o=this.props.isAnimationActive,s=this.state.isAnimationFinished;if(o&&!s)return null;var l=this.props,u=l.dot,f=l.points,d=l.dataKey,p=Ae(this.props,!1),h=Ae(u,!0),b=f.map(function(g,y){var v=Yo(Yo(Yo({key:"dot-".concat(y),r:3},p),h),{},{index:y,cx:g.x,cy:g.y,dataKey:d,value:g.value,payload:g.payload,points:f});return t.renderDotItem(u,v)}),m={clipPath:r?"url(#clipPath-".concat(i?"":"dots-").concat(a,")"):null};return z.createElement(Ye,_l({className:"recharts-area-dots"},m),b)}},{key:"renderHorizontalRect",value:function(r){var i=this.props,a=i.baseLine,o=i.points,s=i.strokeWidth,l=o[0].x,u=o[o.length-1].x,f=r*Math.abs(l-u),d=gs(o.map(function(p){return p.y||0}));return se(a)&&typeof a=="number"?d=Math.max(a,d):a&&Array.isArray(a)&&a.length&&(d=Math.max(gs(a.map(function(p){return p.y||0})),d)),se(d)?z.createElement("rect",{x:l<u?l:l-f,y:0,width:f,height:Math.floor(d+(s?parseInt("".concat(s),10):1))}):null}},{key:"renderVerticalRect",value:function(r){var i=this.props,a=i.baseLine,o=i.points,s=i.strokeWidth,l=o[0].y,u=o[o.length-1].y,f=r*Math.abs(l-u),d=gs(o.map(function(p){return p.x||0}));return se(a)&&typeof a=="number"?d=Math.max(a,d):a&&Array.isArray(a)&&a.length&&(d=Math.max(gs(a.map(function(p){return p.x||0})),d)),se(d)?z.createElement("rect",{x:0,y:l<u?l:l-f,width:d+(s?parseInt("".concat(s),10):1),height:Math.floor(f)}):null}},{key:"renderClipRect",value:function(r){var i=this.props.layout;return i==="vertical"?this.renderVerticalRect(r):this.renderHorizontalRect(r)}},{key:"renderAreaStatically",value:function(r,i,a,o){var s=this.props,l=s.layout,u=s.type,f=s.stroke,d=s.connectNulls,p=s.isRange;s.ref;var h=iU(s,V1e);return z.createElement(Ye,{clipPath:a?"url(#clipPath-".concat(o,")"):null},z.createElement(Bc,_l({},Ae(h,!0),{points:r,connectNulls:d,type:u,baseLine:i,layout:l,stroke:"none",className:"recharts-area-area"})),f!=="none"&&z.createElement(Bc,_l({},Ae(this.props,!1),{className:"recharts-area-curve",layout:l,type:u,connectNulls:d,fill:"none",points:r})),f!=="none"&&p&&z.createElement(Bc,_l({},Ae(this.props,!1),{className:"recharts-area-curve",layout:l,type:u,connectNulls:d,fill:"none",points:i})))}},{key:"renderAreaWithAnimation",value:function(r,i){var a=this,o=this.props,s=o.points,l=o.baseLine,u=o.isAnimationActive,f=o.animationBegin,d=o.animationDuration,p=o.animationEasing,h=o.animationId,b=this.state,m=b.prevPoints,g=b.prevBaseLine;return z.createElement(Vi,{begin:f,duration:d,isActive:u,easing:p,from:{t:0},to:{t:1},key:"area-".concat(h),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(y){var v=y.t;if(m){var w=m.length/s.length,S=s.map(function(T,A){var C=Math.floor(A*w);if(m[C]){var _=m[C],N=Un(_.x,T.x),D=Un(_.y,T.y);return Yo(Yo({},T),{},{x:N(v),y:D(v)})}return T}),O;if(se(l)&&typeof l=="number"){var j=Un(g,l);O=j(v)}else if(Ue(l)||wd(l)){var E=Un(g,0);O=E(v)}else O=l.map(function(T,A){var C=Math.floor(A*w);if(g[C]){var _=g[C],N=Un(_.x,T.x),D=Un(_.y,T.y);return Yo(Yo({},T),{},{x:N(v),y:D(v)})}return T});return a.renderAreaStatically(S,O,r,i)}return z.createElement(Ye,null,z.createElement("defs",null,z.createElement("clipPath",{id:"animationClipPath-".concat(i)},a.renderClipRect(v))),z.createElement(Ye,{clipPath:"url(#animationClipPath-".concat(i,")")},a.renderAreaStatically(s,l,r,i)))})}},{key:"renderArea",value:function(r,i){var a=this.props,o=a.points,s=a.baseLine,l=a.isAnimationActive,u=this.state,f=u.prevPoints,d=u.prevBaseLine,p=u.totalLength;return l&&o&&o.length&&(!f&&p>0||!uu(f,o)||!uu(d,s))?this.renderAreaWithAnimation(r,i):this.renderAreaStatically(o,s,r,i)}},{key:"render",value:function(){var r,i=this.props,a=i.hide,o=i.dot,s=i.points,l=i.className,u=i.top,f=i.left,d=i.xAxis,p=i.yAxis,h=i.width,b=i.height,m=i.isAnimationActive,g=i.id;if(a||!s||!s.length)return null;var y=this.state.isAnimationFinished,v=s.length===1,w=ke("recharts-area",l),S=d&&d.allowDataOverflow,O=p&&p.allowDataOverflow,j=S||O,E=Ue(g)?this.id:g,T=(r=Ae(o,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},A=T.r,C=A===void 0?3:A,_=T.strokeWidth,N=_===void 0?2:_,D=dee(o)?o:{},R=D.clipDot,$=R===void 0?!0:R,P=C*2+N;return z.createElement(Ye,{className:w},S||O?z.createElement("defs",null,z.createElement("clipPath",{id:"clipPath-".concat(E)},z.createElement("rect",{x:S?f:f-h/2,y:O?u:u-b/2,width:S?h:h*2,height:O?b:b*2})),!$&&z.createElement("clipPath",{id:"clipPath-dots-".concat(E)},z.createElement("rect",{x:f-P/2,y:u-P/2,width:h+P,height:b+P}))):null,v?null:this.renderArea(j,E),(o||v)&&this.renderDots(j,$,E),(!m||y)&&Sa.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,curBaseLine:r.baseLine,prevPoints:i.curPoints,prevBaseLine:i.curBaseLine}:r.points!==i.curPoints||r.baseLine!==i.curBaseLine?{curPoints:r.points,curBaseLine:r.baseLine}:null}}])}(x.PureComponent);rU=Io;va(Io,"displayName","Area");va(Io,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!Ws.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});va(Io,"getBaseValue",function(e,t,n,r){var i=e.layout,a=e.baseValue,o=t.props.baseValue,s=o??a;if(se(s)&&typeof s=="number")return s;var l=i==="horizontal"?r:n,u=l.scale.domain();if(l.type==="number"){var f=Math.max(u[0],u[1]),d=Math.min(u[0],u[1]);return s==="dataMin"?d:s==="dataMax"||f<0?f:Math.max(Math.min(u[0],u[1]),0)}return s==="dataMin"?u[0]:s==="dataMax"?u[1]:u[0]});va(Io,"getComposedData",function(e){var t=e.props,n=e.item,r=e.xAxis,i=e.yAxis,a=e.xAxisTicks,o=e.yAxisTicks,s=e.bandSize,l=e.dataKey,u=e.stackedData,f=e.dataStartIndex,d=e.displayedData,p=e.offset,h=t.layout,b=u&&u.length,m=rU.getBaseValue(t,n,r,i),g=h==="horizontal",y=!1,v=d.map(function(S,O){var j;b?j=u[f+O]:(j=ln(S,l),Array.isArray(j)?y=!0:j=[m,j]);var E=j[1]==null||b&&ln(S,l)==null;return g?{x:t2({axis:r,ticks:a,bandSize:s,entry:S,index:O}),y:E?null:i.scale(j[1]),value:j,payload:S}:{x:E?null:r.scale(j[1]),y:t2({axis:i,ticks:o,bandSize:s,entry:S,index:O}),value:j,payload:S}}),w;return b||y?w=v.map(function(S){var O=Array.isArray(S.value)?S.value[0]:null;return g?{x:S.x,y:O!=null&&S.y!=null?i.scale(O):null}:{x:O!=null?r.scale(O):null,y:S.y}}):w=g?i.scale(m):r.scale(m),Yo({points:v,baseLine:w,layout:h,isRange:y},p)});va(Io,"renderDotItem",function(e,t){var n;if(z.isValidElement(e))n=z.cloneElement(e,t);else if(Ce(e))n=e(t);else{var r=ke("recharts-area-dot",typeof e!="boolean"?e.className:""),i=t.key,a=iU(t,G1e);n=z.createElement(Gx,_l({},a,{key:i,className:r}))}return n});function Vf(e){"@babel/helpers - typeof";return Vf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vf(e)}function tSe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nSe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,uU(r.key),r)}}function rSe(e,t,n){return t&&nSe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function iSe(e,t,n){return t=gb(t),aSe(e,sU()?Reflect.construct(t,n||[],gb(e).constructor):t.apply(e,n))}function aSe(e,t){if(t&&(Vf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return oSe(e)}function oSe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function sU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(sU=function(){return!!e})()}function gb(e){return gb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},gb(e)}function sSe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&kj(e,t)}function kj(e,t){return kj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},kj(e,t)}function lU(e,t,n){return t=uU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uU(e){var t=lSe(e,"string");return Vf(t)=="symbol"?t:t+""}function lSe(e,t){if(Vf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Vf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Lj(){return Lj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Lj.apply(this,arguments)}function uSe(e){var t=e.xAxisId,n=rC(),r=iC(),i=VF(t);return i==null?null:x.createElement(Rd,Lj({},i,{className:ke("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(o){return eo(o,!0)}}))}var So=function(e){function t(){return tSe(this,t),iSe(this,t,arguments)}return sSe(t,e),rSe(t,[{key:"render",value:function(){return x.createElement(uSe,this.props)}}])}(x.Component);lU(So,"displayName","XAxis");lU(So,"defaultProps",{allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0});function Gf(e){"@babel/helpers - typeof";return Gf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gf(e)}function cSe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fSe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,dU(r.key),r)}}function dSe(e,t,n){return t&&fSe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function pSe(e,t,n){return t=vb(t),hSe(e,cU()?Reflect.construct(t,n||[],vb(e).constructor):t.apply(e,n))}function hSe(e,t){if(t&&(Gf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return mSe(e)}function mSe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function cU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(cU=function(){return!!e})()}function vb(e){return vb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},vb(e)}function gSe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Bj(e,t)}function Bj(e,t){return Bj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Bj(e,t)}function fU(e,t,n){return t=dU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dU(e){var t=vSe(e,"string");return Gf(t)=="symbol"?t:t+""}function vSe(e,t){if(Gf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Gf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function zj(){return zj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zj.apply(this,arguments)}var ySe=function(t){var n=t.yAxisId,r=rC(),i=iC(),a=GF(n);return a==null?null:x.createElement(Rd,zj({},a,{className:ke("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:r,height:i},ticksGenerator:function(s){return eo(s,!0)}}))},Oo=function(e){function t(){return cSe(this,t),pSe(this,t,arguments)}return gSe(t,e),dSe(t,[{key:"render",value:function(){return x.createElement(ySe,this.props)}}])}(x.Component);fU(Oo,"displayName","YAxis");fU(Oo,"defaultProps",{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1});function P$(e){return SSe(e)||wSe(e)||xSe(e)||bSe()}function bSe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
145
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xSe(e,t){if(e){if(typeof e=="string")return Fj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Fj(e,t)}}function wSe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function SSe(e){if(Array.isArray(e))return Fj(e)}function Fj(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Uj=function(t,n,r,i,a){var o=ni(t,oC),s=ni(t,Jx),l=[].concat(P$(o),P$(s)),u=ni(t,t0),f="".concat(i,"Id"),d=i[0],p=n;if(l.length&&(p=l.reduce(function(m,g){if(g.props[f]===r&&Oa(g.props,"extendDomain")&&se(g.props[d])){var y=g.props[d];return[Math.min(m[0],y),Math.max(m[1],y)]}return m},p)),u.length){var h="".concat(d,"1"),b="".concat(d,"2");p=u.reduce(function(m,g){if(g.props[f]===r&&Oa(g.props,"extendDomain")&&se(g.props[h])&&se(g.props[b])){var y=g.props[h],v=g.props[b];return[Math.min(m[0],y,v),Math.max(m[1],y,v)]}return m},p)}return a&&a.length&&(p=a.reduce(function(m,g){return se(g)?[Math.min(m[0],g),Math.max(m[1],g)]:m},p)),p},pU={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(l,u,f){this.fn=l,this.context=u,this.once=f||!1}function a(l,u,f,d,p){if(typeof f!="function")throw new TypeError("The listener must be a function");var h=new i(f,d||l,p),b=n?n+u:u;return l._events[b]?l._events[b].fn?l._events[b]=[l._events[b],h]:l._events[b].push(h):(l._events[b]=h,l._eventsCount++),l}function o(l,u){--l._eventsCount===0?l._events=new r:delete l._events[u]}function s(){this._events=new r,this._eventsCount=0}s.prototype.eventNames=function(){var u=[],f,d;if(this._eventsCount===0)return u;for(d in f=this._events)t.call(f,d)&&u.push(n?d.slice(1):d);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(f)):u},s.prototype.listeners=function(u){var f=n?n+u:u,d=this._events[f];if(!d)return[];if(d.fn)return[d.fn];for(var p=0,h=d.length,b=new Array(h);p<h;p++)b[p]=d[p].fn;return b},s.prototype.listenerCount=function(u){var f=n?n+u:u,d=this._events[f];return d?d.fn?1:d.length:0},s.prototype.emit=function(u,f,d,p,h,b){var m=n?n+u:u;if(!this._events[m])return!1;var g=this._events[m],y=arguments.length,v,w;if(g.fn){switch(g.once&&this.removeListener(u,g.fn,void 0,!0),y){case 1:return g.fn.call(g.context),!0;case 2:return g.fn.call(g.context,f),!0;case 3:return g.fn.call(g.context,f,d),!0;case 4:return g.fn.call(g.context,f,d,p),!0;case 5:return g.fn.call(g.context,f,d,p,h),!0;case 6:return g.fn.call(g.context,f,d,p,h,b),!0}for(w=1,v=new Array(y-1);w<y;w++)v[w-1]=arguments[w];g.fn.apply(g.context,v)}else{var S=g.length,O;for(w=0;w<S;w++)switch(g[w].once&&this.removeListener(u,g[w].fn,void 0,!0),y){case 1:g[w].fn.call(g[w].context);break;case 2:g[w].fn.call(g[w].context,f);break;case 3:g[w].fn.call(g[w].context,f,d);break;case 4:g[w].fn.call(g[w].context,f,d,p);break;default:if(!v)for(O=1,v=new Array(y-1);O<y;O++)v[O-1]=arguments[O];g[w].fn.apply(g[w].context,v)}}return!0},s.prototype.on=function(u,f,d){return a(this,u,f,d,!1)},s.prototype.once=function(u,f,d){return a(this,u,f,d,!0)},s.prototype.removeListener=function(u,f,d,p){var h=n?n+u:u;if(!this._events[h])return this;if(!f)return o(this,h),this;var b=this._events[h];if(b.fn)b.fn===f&&(!p||b.once)&&(!d||b.context===d)&&o(this,h);else{for(var m=0,g=[],y=b.length;m<y;m++)(b[m].fn!==f||p&&!b[m].once||d&&b[m].context!==d)&&g.push(b[m]);g.length?this._events[h]=g.length===1?g[0]:g:o(this,h)}return this},s.prototype.removeAllListeners=function(u){var f;return u?(f=n?n+u:u,this._events[f]&&o(this,f)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s})(pU);var OSe=pU.exports;const jSe=vt(OSe);var n1=new jSe,r1="recharts.syncMouseEvents";function Xh(e){"@babel/helpers - typeof";return Xh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xh(e)}function ESe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function TSe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,hU(r.key),r)}}function ASe(e,t,n){return t&&TSe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function i1(e,t,n){return t=hU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hU(e){var t=CSe(e,"string");return Xh(t)=="symbol"?t:t+""}function CSe(e,t){if(Xh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Xh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var _Se=function(){function e(){ESe(this,e),i1(this,"activeIndex",0),i1(this,"coordinateList",[]),i1(this,"layout","horizontal")}return ASe(e,[{key:"setDetails",value:function(n){var r,i=n.coordinateList,a=i===void 0?null:i,o=n.container,s=o===void 0?null:o,l=n.layout,u=l===void 0?null:l,f=n.offset,d=f===void 0?null:f,p=n.mouseHandlerCallback,h=p===void 0?null:p;this.coordinateList=(r=a??this.coordinateList)!==null&&r!==void 0?r:[],this.container=s??this.container,this.layout=u??this.layout,this.offset=d??this.offset,this.mouseHandlerCallback=h??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(n){if(this.coordinateList.length!==0)switch(n.key){case"ArrowRight":{if(this.layout!=="horizontal")return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break}case"ArrowLeft":{if(this.layout!=="horizontal")return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse();break}}}},{key:"setIndex",value:function(n){this.activeIndex=n}},{key:"spoofMouse",value:function(){var n,r;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var i=this.container.getBoundingClientRect(),a=i.x,o=i.y,s=i.height,l=this.coordinateList[this.activeIndex].coordinate,u=((n=window)===null||n===void 0?void 0:n.scrollX)||0,f=((r=window)===null||r===void 0?void 0:r.scrollY)||0,d=a+l+u,p=o+this.offset.top+s/2+f;this.mouseHandlerCallback({pageX:d,pageY:p})}}}])}();function NSe(e,t,n){if(n==="number"&&t===!0&&Array.isArray(e)){var r=e==null?void 0:e[0],i=e==null?void 0:e[1];if(r&&i&&se(r)&&se(i))return!0}return!1}function RSe(e,t,n,r){var i=r/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-i:n.left+.5,y:e==="horizontal"?n.top+.5:t.y-i,width:e==="horizontal"?r:n.width-1,height:e==="horizontal"?n.height-1:r}}function mU(e){var t=e.cx,n=e.cy,r=e.radius,i=e.startAngle,a=e.endAngle,o=Ct(t,n,r,i),s=Ct(t,n,r,a);return{points:[o,s],cx:t,cy:n,radius:r,startAngle:i,endAngle:a}}function MSe(e,t,n){var r,i,a,o;if(e==="horizontal")r=t.x,a=r,i=n.top,o=n.top+n.height;else if(e==="vertical")i=t.y,o=i,r=n.left,a=n.left+n.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var s=t.cx,l=t.cy,u=t.innerRadius,f=t.outerRadius,d=t.angle,p=Ct(s,l,u,d),h=Ct(s,l,f,d);r=p.x,i=p.y,a=h.x,o=h.y}else return mU(t);return[{x:r,y:i},{x:a,y:o}]}function Wh(e){"@babel/helpers - typeof";return Wh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wh(e)}function $$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Cg(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$$(Object(n),!0).forEach(function(r){PSe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function PSe(e,t,n){return t=$Se(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $Se(e){var t=DSe(e,"string");return Wh(t)=="symbol"?t:t+""}function DSe(e,t){if(Wh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Wh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ISe(e){var t,n,r=e.element,i=e.tooltipEventType,a=e.isActive,o=e.activeCoordinate,s=e.activePayload,l=e.offset,u=e.activeTooltipIndex,f=e.tooltipAxisBandSize,d=e.layout,p=e.chartName,h=(t=r.props.cursor)!==null&&t!==void 0?t:(n=r.type.defaultProps)===null||n===void 0?void 0:n.cursor;if(!r||!h||!a||!o||p!=="ScatterChart"&&i!=="axis")return null;var b,m=Bc;if(p==="ScatterChart")b=o,m=qye;else if(p==="BarChart")b=RSe(d,o,l,f),m=ZA;else if(d==="radial"){var g=mU(o),y=g.cx,v=g.cy,w=g.radius,S=g.startAngle,O=g.endAngle;b={cx:y,cy:v,startAngle:S,endAngle:O,innerRadius:w,outerRadius:w},m=lF}else b={points:MSe(d,o,l)},m=Bc;var j=Cg(Cg(Cg(Cg({stroke:"#ccc",pointerEvents:"none"},l),b),Ae(h,!1)),{},{payload:s,payloadIndex:u,className:ke("recharts-tooltip-cursor",h.className)});return x.isValidElement(h)?x.cloneElement(h,j):x.createElement(m,j)}var kSe=["item"],LSe=["children","className","width","height","style","compact","title","desc"];function Kf(e){"@babel/helpers - typeof";return Kf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kf(e)}function Sc(){return Sc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Sc.apply(this,arguments)}function D$(e,t){return FSe(e)||zSe(e,t)||vU(e,t)||BSe()}function BSe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
146
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zSe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function FSe(e){if(Array.isArray(e))return e}function I$(e,t){if(e==null)return{};var n=USe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function USe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function HSe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qSe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,yU(r.key),r)}}function VSe(e,t,n){return t&&qSe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function GSe(e,t,n){return t=yb(t),KSe(e,gU()?Reflect.construct(t,n||[],yb(e).constructor):t.apply(e,n))}function KSe(e,t){if(t&&(Kf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return YSe(e)}function YSe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function gU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(gU=function(){return!!e})()}function yb(e){return yb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},yb(e)}function XSe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Hj(e,t)}function Hj(e,t){return Hj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Hj(e,t)}function Yf(e){return ZSe(e)||QSe(e)||vU(e)||WSe()}function WSe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
147
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vU(e,t){if(e){if(typeof e=="string")return qj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qj(e,t)}}function QSe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ZSe(e){if(Array.isArray(e))return qj(e)}function qj(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function k$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Z(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?k$(Object(n),!0).forEach(function(r){Ne(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ne(e,t,n){return t=yU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yU(e){var t=JSe(e,"string");return Kf(t)=="symbol"?t:t+""}function JSe(e,t){if(Kf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Kf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var eOe={xAxis:["bottom","top"],yAxis:["left","right"]},tOe={width:"100%",height:"100%"},bU={x:0,y:0};function _g(e){return e}var nOe=function(t,n){return n==="horizontal"?t.x:n==="vertical"?t.y:n==="centric"?t.angle:t.radius},rOe=function(t,n,r,i){var a=n.find(function(f){return f&&f.index===r});if(a){if(t==="horizontal")return{x:a.coordinate,y:i.y};if(t==="vertical")return{x:i.x,y:a.coordinate};if(t==="centric"){var o=a.coordinate,s=i.radius;return Z(Z(Z({},i),Ct(i.cx,i.cy,s,o)),{},{angle:o,radius:s})}var l=a.coordinate,u=i.angle;return Z(Z(Z({},i),Ct(i.cx,i.cy,l,u)),{},{angle:u,radius:l})}return bU},n0=function(t,n){var r=n.graphicalItems,i=n.dataStartIndex,a=n.dataEndIndex,o=(r??[]).reduce(function(s,l){var u=l.props.data;return u&&u.length?[].concat(Yf(s),Yf(u)):s},[]);return o.length>0?o:t&&t.length&&se(i)&&se(a)?t.slice(i,a+1):[]};function xU(e){return e==="number"?[0,"auto"]:void 0}var Vj=function(t,n,r,i){var a=t.graphicalItems,o=t.tooltipAxis,s=n0(n,t);return r<0||!a||!a.length||r>=s.length?null:a.reduce(function(l,u){var f,d=(f=u.props.data)!==null&&f!==void 0?f:n;d&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(d=d.slice(t.dataStartIndex,t.dataEndIndex+1));var p;if(o.dataKey&&!o.allowDuplicatedCategory){var h=d===void 0?s:d;p=hy(h,o.dataKey,i)}else p=d&&d[r]||s[r];return p?[].concat(Yf(l),[QA(u,p)]):l},[])},L$=function(t,n,r,i){var a=i||{x:t.chartX,y:t.chartY},o=nOe(a,r),s=t.orderedTooltipTicks,l=t.tooltipAxis,u=t.tooltipTicks,f=hme(o,s,u,l);if(f>=0&&u){var d=u[f]&&u[f].value,p=Vj(t,n,f,d),h=rOe(r,s,f,a);return{activeTooltipIndex:f,activeLabel:d,activePayload:p,activeCoordinate:h}}return null},iOe=function(t,n){var r=n.axes,i=n.graphicalItems,a=n.axisType,o=n.axisIdKey,s=n.stackGroups,l=n.dataStartIndex,u=n.dataEndIndex,f=t.layout,d=t.children,p=t.stackOffset,h=K4(f,a);return r.reduce(function(b,m){var g,y=m.type.defaultProps!==void 0?Z(Z({},m.type.defaultProps),m.props):m.props,v=y.type,w=y.dataKey,S=y.allowDataOverflow,O=y.allowDuplicatedCategory,j=y.scale,E=y.ticks,T=y.includeHidden,A=y[o];if(b[A])return b;var C=n0(t.data,{graphicalItems:i.filter(function(M){var q,G=o in M.props?M.props[o]:(q=M.type.defaultProps)===null||q===void 0?void 0:q[o];return G===A}),dataStartIndex:l,dataEndIndex:u}),_=C.length,N,D,R;NSe(y.domain,S,v)&&(N=ij(y.domain,null,S),h&&(v==="number"||j!=="auto")&&(R=zp(C,w,"category")));var $=xU(v);if(!N||N.length===0){var P,B=(P=y.domain)!==null&&P!==void 0?P:$;if(w){if(N=zp(C,w,v),v==="category"&&h){var L=nee(N);O&&L?(D=N,N=ab(0,_)):O||(N=i2(B,N,m).reduce(function(M,q){return M.indexOf(q)>=0?M:[].concat(Yf(M),[q])},[]))}else if(v==="category")O?N=N.filter(function(M){return M!==""&&!Ue(M)}):N=i2(B,N,m).reduce(function(M,q){return M.indexOf(q)>=0||q===""||Ue(q)?M:[].concat(Yf(M),[q])},[]);else if(v==="number"){var k=bme(C,i.filter(function(M){var q,G,U=o in M.props?M.props[o]:(q=M.type.defaultProps)===null||q===void 0?void 0:q[o],Y="hide"in M.props?M.props.hide:(G=M.type.defaultProps)===null||G===void 0?void 0:G.hide;return U===A&&(T||!Y)}),w,a,f);k&&(N=k)}h&&(v==="number"||j!=="auto")&&(R=zp(C,w,"category"))}else h?N=ab(0,_):s&&s[A]&&s[A].hasStack&&v==="number"?N=p==="expand"?[0,1]:tF(s[A].stackGroups,l,u):N=G4(C,i.filter(function(M){var q=o in M.props?M.props[o]:M.type.defaultProps[o],G="hide"in M.props?M.props.hide:M.type.defaultProps.hide;return q===A&&(T||!G)}),v,f,!0);if(v==="number")N=Uj(d,N,A,a,E),B&&(N=ij(B,N,S));else if(v==="category"&&B){var I=B,V=N.every(function(M){return I.indexOf(M)>=0});V&&(N=I)}}return Z(Z({},b),{},Ne({},A,Z(Z({},y),{},{axisType:a,domain:N,categoricalDomain:R,duplicateDomain:D,originalDomain:(g=y.domain)!==null&&g!==void 0?g:$,isCategorical:h,layout:f})))},{})},aOe=function(t,n){var r=n.graphicalItems,i=n.Axis,a=n.axisType,o=n.axisIdKey,s=n.stackGroups,l=n.dataStartIndex,u=n.dataEndIndex,f=t.layout,d=t.children,p=n0(t.data,{graphicalItems:r,dataStartIndex:l,dataEndIndex:u}),h=p.length,b=K4(f,a),m=-1;return r.reduce(function(g,y){var v=y.type.defaultProps!==void 0?Z(Z({},y.type.defaultProps),y.props):y.props,w=v[o],S=xU("number");if(!g[w]){m++;var O;return b?O=ab(0,h):s&&s[w]&&s[w].hasStack?(O=tF(s[w].stackGroups,l,u),O=Uj(d,O,w,a)):(O=ij(S,G4(p,r.filter(function(j){var E,T,A=o in j.props?j.props[o]:(E=j.type.defaultProps)===null||E===void 0?void 0:E[o],C="hide"in j.props?j.props.hide:(T=j.type.defaultProps)===null||T===void 0?void 0:T.hide;return A===w&&!C}),"number",f),i.defaultProps.allowDataOverflow),O=Uj(d,O,w,a)),Z(Z({},g),{},Ne({},w,Z(Z({axisType:a},i.defaultProps),{},{hide:!0,orientation:ti(eOe,"".concat(a,".").concat(m%2),null),domain:O,originalDomain:S,isCategorical:b,layout:f})))}return g},{})},oOe=function(t,n){var r=n.axisType,i=r===void 0?"xAxis":r,a=n.AxisComp,o=n.graphicalItems,s=n.stackGroups,l=n.dataStartIndex,u=n.dataEndIndex,f=t.children,d="".concat(i,"Id"),p=ni(f,a),h={};return p&&p.length?h=iOe(t,{axes:p,graphicalItems:o,axisType:i,axisIdKey:d,stackGroups:s,dataStartIndex:l,dataEndIndex:u}):o&&o.length&&(h=aOe(t,{Axis:a,graphicalItems:o,axisType:i,axisIdKey:d,stackGroups:s,dataStartIndex:l,dataEndIndex:u})),h},sOe=function(t){var n=es(t),r=eo(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:jA(r,function(i){return i.coordinate}),tooltipAxis:n,tooltipAxisBandSize:qy(n,r)}},B$=function(t){var n=t.children,r=t.defaultShowTooltip,i=qr(n,Bs),a=0,o=0;return t.data&&t.data.length!==0&&(o=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(a=i.props.startIndex),i.props.endIndex>=0&&(o=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:a,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!r}},lOe=function(t){return!t||!t.length?!1:t.some(function(n){var r=io(n&&n.type);return r&&r.indexOf("Bar")>=0})},z$=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},uOe=function(t,n){var r=t.props,i=t.graphicalItems,a=t.xAxisMap,o=a===void 0?{}:a,s=t.yAxisMap,l=s===void 0?{}:s,u=r.width,f=r.height,d=r.children,p=r.margin||{},h=qr(d,Bs),b=qr(d,Gl),m=Object.keys(l).reduce(function(O,j){var E=l[j],T=E.orientation;return!E.mirror&&!E.hide?Z(Z({},O),{},Ne({},T,O[T]+E.width)):O},{left:p.left||0,right:p.right||0}),g=Object.keys(o).reduce(function(O,j){var E=o[j],T=E.orientation;return!E.mirror&&!E.hide?Z(Z({},O),{},Ne({},T,ti(O,"".concat(T))+E.height)):O},{top:p.top||0,bottom:p.bottom||0}),y=Z(Z({},g),m),v=y.bottom;h&&(y.bottom+=h.props.height||Bs.defaultProps.height),b&&n&&(y=vme(y,i,r,n));var w=u-y.left-y.right,S=f-y.top-y.bottom;return Z(Z({brushBottom:v},y),{},{width:Math.max(w,0),height:Math.max(S,0)})},cOe=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},r0=function(t){var n=t.chartName,r=t.GraphicalChild,i=t.defaultTooltipEventType,a=i===void 0?"axis":i,o=t.validateTooltipEventTypes,s=o===void 0?["axis"]:o,l=t.axisComponents,u=t.legendContent,f=t.formatAxisMap,d=t.defaultProps,p=function(y,v){var w=v.graphicalItems,S=v.stackGroups,O=v.offset,j=v.updateId,E=v.dataStartIndex,T=v.dataEndIndex,A=y.barSize,C=y.layout,_=y.barGap,N=y.barCategoryGap,D=y.maxBarSize,R=z$(C),$=R.numericAxisName,P=R.cateAxisName,B=lOe(w),L=[];return w.forEach(function(k,I){var V=n0(y.data,{graphicalItems:[k],dataStartIndex:E,dataEndIndex:T}),M=k.type.defaultProps!==void 0?Z(Z({},k.type.defaultProps),k.props):k.props,q=M.dataKey,G=M.maxBarSize,U=M["".concat($,"Id")],Y=M["".concat(P,"Id")],X={},te=l.reduce(function(re,we){var $e=v["".concat(we.axisType,"Map")],at=M["".concat(we.axisType,"Id")];$e&&$e[at]||we.axisType==="zAxis"||fu();var W=$e[at];return Z(Z({},re),{},Ne(Ne({},we.axisType,W),"".concat(we.axisType,"Ticks"),eo(W)))},X),H=te[P],ee=te["".concat(P,"Ticks")],J=S&&S[U]&&S[U].hasStack&&Eme(k,S[U].stackGroups),K=io(k.type).indexOf("Bar")>=0,oe=qy(H,ee),Q=[],ae=B&&mme({barSize:A,stackGroups:S,totalSize:cOe(te,P)});if(K){var ue,ye,Ie=Ue(G)?D:G,ce=(ue=(ye=qy(H,ee,!0))!==null&&ye!==void 0?ye:Ie)!==null&&ue!==void 0?ue:0;Q=gme({barGap:_,barCategoryGap:N,bandSize:ce!==oe?ce:oe,sizeList:ae[Y],maxBarSize:Ie}),ce!==oe&&(Q=Q.map(function(re){return Z(Z({},re),{},{position:Z(Z({},re.position),{},{offset:re.position.offset-ce/2})})}))}var Se=k&&k.type&&k.type.getComposedData;Se&&L.push({props:Z(Z({},Se(Z(Z({},te),{},{displayedData:V,props:y,dataKey:q,item:k,bandSize:oe,barPosition:Q,offset:O,stackedData:J,layout:C,dataStartIndex:E,dataEndIndex:T}))),{},Ne(Ne(Ne({key:k.key||"item-".concat(I)},$,te[$]),P,te[P]),"animationId",j)),childIndex:mee(k,y.children),item:k})}),L},h=function(y,v){var w=y.props,S=y.dataStartIndex,O=y.dataEndIndex,j=y.updateId;if(!ZR({props:w}))return null;var E=w.children,T=w.layout,A=w.stackOffset,C=w.data,_=w.reverseStackOrder,N=z$(T),D=N.numericAxisName,R=N.cateAxisName,$=ni(E,r),P=jme(C,$,"".concat(D,"Id"),"".concat(R,"Id"),A,_),B=l.reduce(function(M,q){var G="".concat(q.axisType,"Map");return Z(Z({},M),{},Ne({},G,oOe(w,Z(Z({},q),{},{graphicalItems:$,stackGroups:q.axisType===D&&P,dataStartIndex:S,dataEndIndex:O}))))},{}),L=uOe(Z(Z({},B),{},{props:w,graphicalItems:$}),v==null?void 0:v.legendBBox);Object.keys(B).forEach(function(M){B[M]=f(w,B[M],L,M.replace("Map",""),n)});var k=B["".concat(R,"Map")],I=sOe(k),V=p(w,Z(Z({},B),{},{dataStartIndex:S,dataEndIndex:O,updateId:j,graphicalItems:$,stackGroups:P,offset:L}));return Z(Z({formattedGraphicalItems:V,graphicalItems:$,offset:L,stackGroups:P},I),B)},b=function(g){function y(v){var w,S,O;return HSe(this,y),O=GSe(this,y,[v]),Ne(O,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Ne(O,"accessibilityManager",new _Se),Ne(O,"handleLegendBBoxUpdate",function(j){if(j){var E=O.state,T=E.dataStartIndex,A=E.dataEndIndex,C=E.updateId;O.setState(Z({legendBBox:j},h({props:O.props,dataStartIndex:T,dataEndIndex:A,updateId:C},Z(Z({},O.state),{},{legendBBox:j}))))}}),Ne(O,"handleReceiveSyncEvent",function(j,E,T){if(O.props.syncId===j){if(T===O.eventEmitterSymbol&&typeof O.props.syncMethod!="function")return;O.applySyncEvent(E)}}),Ne(O,"handleBrushChange",function(j){var E=j.startIndex,T=j.endIndex;if(E!==O.state.dataStartIndex||T!==O.state.dataEndIndex){var A=O.state.updateId;O.setState(function(){return Z({dataStartIndex:E,dataEndIndex:T},h({props:O.props,dataStartIndex:E,dataEndIndex:T,updateId:A},O.state))}),O.triggerSyncEvent({dataStartIndex:E,dataEndIndex:T})}}),Ne(O,"handleMouseEnter",function(j){var E=O.getMouseInfo(j);if(E){var T=Z(Z({},E),{},{isTooltipActive:!0});O.setState(T),O.triggerSyncEvent(T);var A=O.props.onMouseEnter;Ce(A)&&A(T,j)}}),Ne(O,"triggeredAfterMouseMove",function(j){var E=O.getMouseInfo(j),T=E?Z(Z({},E),{},{isTooltipActive:!0}):{isTooltipActive:!1};O.setState(T),O.triggerSyncEvent(T);var A=O.props.onMouseMove;Ce(A)&&A(T,j)}),Ne(O,"handleItemMouseEnter",function(j){O.setState(function(){return{isTooltipActive:!0,activeItem:j,activePayload:j.tooltipPayload,activeCoordinate:j.tooltipPosition||{x:j.cx,y:j.cy}}})}),Ne(O,"handleItemMouseLeave",function(){O.setState(function(){return{isTooltipActive:!1}})}),Ne(O,"handleMouseMove",function(j){j.persist(),O.throttleTriggeredAfterMouseMove(j)}),Ne(O,"handleMouseLeave",function(j){O.throttleTriggeredAfterMouseMove.cancel();var E={isTooltipActive:!1};O.setState(E),O.triggerSyncEvent(E);var T=O.props.onMouseLeave;Ce(T)&&T(E,j)}),Ne(O,"handleOuterEvent",function(j){var E=hee(j),T=ti(O.props,"".concat(E));if(E&&Ce(T)){var A,C;/.*touch.*/i.test(E)?C=O.getMouseInfo(j.changedTouches[0]):C=O.getMouseInfo(j),T((A=C)!==null&&A!==void 0?A:{},j)}}),Ne(O,"handleClick",function(j){var E=O.getMouseInfo(j);if(E){var T=Z(Z({},E),{},{isTooltipActive:!0});O.setState(T),O.triggerSyncEvent(T);var A=O.props.onClick;Ce(A)&&A(T,j)}}),Ne(O,"handleMouseDown",function(j){var E=O.props.onMouseDown;if(Ce(E)){var T=O.getMouseInfo(j);E(T,j)}}),Ne(O,"handleMouseUp",function(j){var E=O.props.onMouseUp;if(Ce(E)){var T=O.getMouseInfo(j);E(T,j)}}),Ne(O,"handleTouchMove",function(j){j.changedTouches!=null&&j.changedTouches.length>0&&O.throttleTriggeredAfterMouseMove(j.changedTouches[0])}),Ne(O,"handleTouchStart",function(j){j.changedTouches!=null&&j.changedTouches.length>0&&O.handleMouseDown(j.changedTouches[0])}),Ne(O,"handleTouchEnd",function(j){j.changedTouches!=null&&j.changedTouches.length>0&&O.handleMouseUp(j.changedTouches[0])}),Ne(O,"handleDoubleClick",function(j){var E=O.props.onDoubleClick;if(Ce(E)){var T=O.getMouseInfo(j);E(T,j)}}),Ne(O,"handleContextMenu",function(j){var E=O.props.onContextMenu;if(Ce(E)){var T=O.getMouseInfo(j);E(T,j)}}),Ne(O,"triggerSyncEvent",function(j){O.props.syncId!==void 0&&n1.emit(r1,O.props.syncId,j,O.eventEmitterSymbol)}),Ne(O,"applySyncEvent",function(j){var E=O.props,T=E.layout,A=E.syncMethod,C=O.state.updateId,_=j.dataStartIndex,N=j.dataEndIndex;if(j.dataStartIndex!==void 0||j.dataEndIndex!==void 0)O.setState(Z({dataStartIndex:_,dataEndIndex:N},h({props:O.props,dataStartIndex:_,dataEndIndex:N,updateId:C},O.state)));else if(j.activeTooltipIndex!==void 0){var D=j.chartX,R=j.chartY,$=j.activeTooltipIndex,P=O.state,B=P.offset,L=P.tooltipTicks;if(!B)return;if(typeof A=="function")$=A(L,j);else if(A==="value"){$=-1;for(var k=0;k<L.length;k++)if(L[k].value===j.activeLabel){$=k;break}}var I=Z(Z({},B),{},{x:B.left,y:B.top}),V=Math.min(D,I.x+I.width),M=Math.min(R,I.y+I.height),q=L[$]&&L[$].value,G=Vj(O.state,O.props.data,$),U=L[$]?{x:T==="horizontal"?L[$].coordinate:V,y:T==="horizontal"?M:L[$].coordinate}:bU;O.setState(Z(Z({},j),{},{activeLabel:q,activeCoordinate:U,activePayload:G,activeTooltipIndex:$}))}else O.setState(j)}),Ne(O,"renderCursor",function(j){var E,T=O.state,A=T.isTooltipActive,C=T.activeCoordinate,_=T.activePayload,N=T.offset,D=T.activeTooltipIndex,R=T.tooltipAxisBandSize,$=O.getTooltipEventType(),P=(E=j.props.active)!==null&&E!==void 0?E:A,B=O.props.layout,L=j.key||"_recharts-cursor";return z.createElement(ISe,{key:L,activeCoordinate:C,activePayload:_,activeTooltipIndex:D,chartName:n,element:j,isActive:P,layout:B,offset:N,tooltipAxisBandSize:R,tooltipEventType:$})}),Ne(O,"renderPolarAxis",function(j,E,T){var A=ti(j,"type.axisType"),C=ti(O.state,"".concat(A,"Map")),_=j.type.defaultProps,N=_!==void 0?Z(Z({},_),j.props):j.props,D=C&&C[N["".concat(A,"Id")]];return x.cloneElement(j,Z(Z({},D),{},{className:ke(A,D.className),key:j.key||"".concat(E,"-").concat(T),ticks:eo(D,!0)}))}),Ne(O,"renderPolarGrid",function(j){var E=j.props,T=E.radialLines,A=E.polarAngles,C=E.polarRadius,_=O.state,N=_.radiusAxisMap,D=_.angleAxisMap,R=es(N),$=es(D),P=$.cx,B=$.cy,L=$.innerRadius,k=$.outerRadius;return x.cloneElement(j,{polarAngles:Array.isArray(A)?A:eo($,!0).map(function(I){return I.coordinate}),polarRadius:Array.isArray(C)?C:eo(R,!0).map(function(I){return I.coordinate}),cx:P,cy:B,innerRadius:L,outerRadius:k,key:j.key||"polar-grid",radialLines:T})}),Ne(O,"renderLegend",function(){var j=O.state.formattedGraphicalItems,E=O.props,T=E.children,A=E.width,C=E.height,_=O.props.margin||{},N=A-(_.left||0)-(_.right||0),D=q4({children:T,formattedGraphicalItems:j,legendWidth:N,legendContent:u});if(!D)return null;var R=D.item,$=I$(D,kSe);return x.cloneElement(R,Z(Z({},$),{},{chartWidth:A,chartHeight:C,margin:_,onBBoxUpdate:O.handleLegendBBoxUpdate}))}),Ne(O,"renderTooltip",function(){var j,E=O.props,T=E.children,A=E.accessibilityLayer,C=qr(T,ra);if(!C)return null;var _=O.state,N=_.isTooltipActive,D=_.activeCoordinate,R=_.activePayload,$=_.activeLabel,P=_.offset,B=(j=C.props.active)!==null&&j!==void 0?j:N;return x.cloneElement(C,{viewBox:Z(Z({},P),{},{x:P.left,y:P.top}),active:B,label:$,payload:B?R:[],coordinate:D,accessibilityLayer:A})}),Ne(O,"renderBrush",function(j){var E=O.props,T=E.margin,A=E.data,C=O.state,_=C.offset,N=C.dataStartIndex,D=C.dataEndIndex,R=C.updateId;return x.cloneElement(j,{key:j.key||"_recharts-brush",onChange:jg(O.handleBrushChange,j.props.onChange),data:A,x:se(j.props.x)?j.props.x:_.left,y:se(j.props.y)?j.props.y:_.top+_.height+_.brushBottom-(T.bottom||0),width:se(j.props.width)?j.props.width:_.width,startIndex:N,endIndex:D,updateId:"brush-".concat(R)})}),Ne(O,"renderReferenceElement",function(j,E,T){if(!j)return null;var A=O,C=A.clipPathId,_=O.state,N=_.xAxisMap,D=_.yAxisMap,R=_.offset,$=j.type.defaultProps||{},P=j.props,B=P.xAxisId,L=B===void 0?$.xAxisId:B,k=P.yAxisId,I=k===void 0?$.yAxisId:k;return x.cloneElement(j,{key:j.key||"".concat(E,"-").concat(T),xAxis:N[L],yAxis:D[I],viewBox:{x:R.left,y:R.top,width:R.width,height:R.height},clipPathId:C})}),Ne(O,"renderActivePoints",function(j){var E=j.item,T=j.activePoint,A=j.basePoint,C=j.childIndex,_=j.isRange,N=[],D=E.props.key,R=E.item.type.defaultProps!==void 0?Z(Z({},E.item.type.defaultProps),E.item.props):E.item.props,$=R.activeDot,P=R.dataKey,B=Z(Z({index:C,dataKey:P,cx:T.x,cy:T.y,r:4,fill:WA(E.item),strokeWidth:2,stroke:"#fff",payload:T.payload,value:T.value},Ae($,!1)),my($));return N.push(y.renderActiveDot($,B,"".concat(D,"-activePoint-").concat(C))),A?N.push(y.renderActiveDot($,Z(Z({},B),{},{cx:A.x,cy:A.y}),"".concat(D,"-basePoint-").concat(C))):_&&N.push(null),N}),Ne(O,"renderGraphicChild",function(j,E,T){var A=O.filterFormatItem(j,E,T);if(!A)return null;var C=O.getTooltipEventType(),_=O.state,N=_.isTooltipActive,D=_.tooltipAxis,R=_.activeTooltipIndex,$=_.activeLabel,P=O.props.children,B=qr(P,ra),L=A.props,k=L.points,I=L.isRange,V=L.baseLine,M=A.item.type.defaultProps!==void 0?Z(Z({},A.item.type.defaultProps),A.item.props):A.item.props,q=M.activeDot,G=M.hide,U=M.activeBar,Y=M.activeShape,X=!!(!G&&N&&B&&(q||U||Y)),te={};C!=="axis"&&B&&B.props.trigger==="click"?te={onClick:jg(O.handleItemMouseEnter,j.props.onClick)}:C!=="axis"&&(te={onMouseLeave:jg(O.handleItemMouseLeave,j.props.onMouseLeave),onMouseEnter:jg(O.handleItemMouseEnter,j.props.onMouseEnter)});var H=x.cloneElement(j,Z(Z({},A.props),te));function ee(we){return typeof D.dataKey=="function"?D.dataKey(we.payload):null}if(X)if(R>=0){var J,K;if(D.dataKey&&!D.allowDuplicatedCategory){var oe=typeof D.dataKey=="function"?ee:"payload.".concat(D.dataKey.toString());J=hy(k,oe,$),K=I&&V&&hy(V,oe,$)}else J=k==null?void 0:k[R],K=I&&V&&V[R];if(Y||U){var Q=j.props.activeIndex!==void 0?j.props.activeIndex:R;return[x.cloneElement(j,Z(Z(Z({},A.props),te),{},{activeIndex:Q})),null,null]}if(!Ue(J))return[H].concat(Yf(O.renderActivePoints({item:A,activePoint:J,basePoint:K,childIndex:R,isRange:I})))}else{var ae,ue=(ae=O.getItemByXY(O.state.activeCoordinate))!==null&&ae!==void 0?ae:{graphicalItem:H},ye=ue.graphicalItem,Ie=ye.item,ce=Ie===void 0?j:Ie,Se=ye.childIndex,re=Z(Z(Z({},A.props),te),{},{activeIndex:Se});return[x.cloneElement(ce,re),null,null]}return I?[H,null,null]:[H,null]}),Ne(O,"renderCustomized",function(j,E,T){return x.cloneElement(j,Z(Z({key:"recharts-customized-".concat(T)},O.props),O.state))}),Ne(O,"renderMap",{CartesianGrid:{handler:_g,once:!0},ReferenceArea:{handler:O.renderReferenceElement},ReferenceLine:{handler:_g},ReferenceDot:{handler:O.renderReferenceElement},XAxis:{handler:_g},YAxis:{handler:_g},Brush:{handler:O.renderBrush,once:!0},Bar:{handler:O.renderGraphicChild},Line:{handler:O.renderGraphicChild},Area:{handler:O.renderGraphicChild},Radar:{handler:O.renderGraphicChild},RadialBar:{handler:O.renderGraphicChild},Scatter:{handler:O.renderGraphicChild},Pie:{handler:O.renderGraphicChild},Funnel:{handler:O.renderGraphicChild},Tooltip:{handler:O.renderCursor,once:!0},PolarGrid:{handler:O.renderPolarGrid,once:!0},PolarAngleAxis:{handler:O.renderPolarAxis},PolarRadiusAxis:{handler:O.renderPolarAxis},Customized:{handler:O.renderCustomized}}),O.clipPathId="".concat((w=v.id)!==null&&w!==void 0?w:Sd("recharts"),"-clip"),O.throttleTriggeredAfterMouseMove=qz(O.triggeredAfterMouseMove,(S=v.throttleDelay)!==null&&S!==void 0?S:1e3/60),O.state={},O}return XSe(y,g),VSe(y,[{key:"componentDidMount",value:function(){var w,S;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(w=this.props.margin.left)!==null&&w!==void 0?w:0,top:(S=this.props.margin.top)!==null&&S!==void 0?S:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var w=this.props,S=w.children,O=w.data,j=w.height,E=w.layout,T=qr(S,ra);if(T){var A=T.props.defaultIndex;if(!(typeof A!="number"||A<0||A>this.state.tooltipTicks.length-1)){var C=this.state.tooltipTicks[A]&&this.state.tooltipTicks[A].value,_=Vj(this.state,O,A,C),N=this.state.tooltipTicks[A].coordinate,D=(this.state.offset.top+j)/2,R=E==="horizontal",$=R?{x:N,y:D}:{y:N,x:D},P=this.state.formattedGraphicalItems.find(function(L){var k=L.item;return k.type.name==="Scatter"});P&&($=Z(Z({},$),P.props.points[A].tooltipPosition),_=P.props.points[A].tooltipPayload);var B={activeTooltipIndex:A,isTooltipActive:!0,activeLabel:C,activePayload:_,activeCoordinate:$};this.setState(B),this.renderCursor(T),this.accessibilityManager.setIndex(A)}}}},{key:"getSnapshotBeforeUpdate",value:function(w,S){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==S.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==w.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==w.margin){var O,j;this.accessibilityManager.setDetails({offset:{left:(O=this.props.margin.left)!==null&&O!==void 0?O:0,top:(j=this.props.margin.top)!==null&&j!==void 0?j:0}})}return null}},{key:"componentDidUpdate",value:function(w){bO([qr(w.children,ra)],[qr(this.props.children,ra)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var w=qr(this.props.children,ra);if(w&&typeof w.props.shared=="boolean"){var S=w.props.shared?"axis":"item";return s.indexOf(S)>=0?S:a}return a}},{key:"getMouseInfo",value:function(w){if(!this.container)return null;var S=this.container,O=S.getBoundingClientRect(),j=Uce(O),E={chartX:Math.round(w.pageX-j.left),chartY:Math.round(w.pageY-j.top)},T=O.width/S.offsetWidth||1,A=this.inRange(E.chartX,E.chartY,T);if(!A)return null;var C=this.state,_=C.xAxisMap,N=C.yAxisMap,D=this.getTooltipEventType(),R=L$(this.state,this.props.data,this.props.layout,A);if(D!=="axis"&&_&&N){var $=es(_).scale,P=es(N).scale,B=$&&$.invert?$.invert(E.chartX):null,L=P&&P.invert?P.invert(E.chartY):null;return Z(Z({},E),{},{xValue:B,yValue:L},R)}return R?Z(Z({},E),R):null}},{key:"inRange",value:function(w,S){var O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,j=this.props.layout,E=w/O,T=S/O;if(j==="horizontal"||j==="vertical"){var A=this.state.offset,C=E>=A.left&&E<=A.left+A.width&&T>=A.top&&T<=A.top+A.height;return C?{x:E,y:T}:null}var _=this.state,N=_.angleAxisMap,D=_.radiusAxisMap;if(N&&D){var R=es(N);return s2({x:E,y:T},R)}return null}},{key:"parseEventsOfWrapper",value:function(){var w=this.props.children,S=this.getTooltipEventType(),O=qr(w,ra),j={};O&&S==="axis"&&(O.props.trigger==="click"?j={onClick:this.handleClick}:j={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var E=my(this.props,this.handleOuterEvent);return Z(Z({},E),j)}},{key:"addListener",value:function(){n1.on(r1,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){n1.removeListener(r1,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(w,S,O){for(var j=this.state.formattedGraphicalItems,E=0,T=j.length;E<T;E++){var A=j[E];if(A.item===w||A.props.key===w.key||S===io(A.item.type)&&O===A.childIndex)return A}return null}},{key:"renderClipPath",value:function(){var w=this.clipPathId,S=this.state.offset,O=S.left,j=S.top,E=S.height,T=S.width;return z.createElement("defs",null,z.createElement("clipPath",{id:w},z.createElement("rect",{x:O,y:j,height:E,width:T})))}},{key:"getXScales",value:function(){var w=this.state.xAxisMap;return w?Object.entries(w).reduce(function(S,O){var j=D$(O,2),E=j[0],T=j[1];return Z(Z({},S),{},Ne({},E,T.scale))},{}):null}},{key:"getYScales",value:function(){var w=this.state.yAxisMap;return w?Object.entries(w).reduce(function(S,O){var j=D$(O,2),E=j[0],T=j[1];return Z(Z({},S),{},Ne({},E,T.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(w){var S;return(S=this.state.xAxisMap)===null||S===void 0||(S=S[w])===null||S===void 0?void 0:S.scale}},{key:"getYScaleByAxisId",value:function(w){var S;return(S=this.state.yAxisMap)===null||S===void 0||(S=S[w])===null||S===void 0?void 0:S.scale}},{key:"getItemByXY",value:function(w){var S=this.state,O=S.formattedGraphicalItems,j=S.activeItem;if(O&&O.length)for(var E=0,T=O.length;E<T;E++){var A=O[E],C=A.props,_=A.item,N=_.type.defaultProps!==void 0?Z(Z({},_.type.defaultProps),_.props):_.props,D=io(_.type);if(D==="Bar"){var R=(C.data||[]).find(function(L){return jye(w,L)});if(R)return{graphicalItem:A,payload:R}}else if(D==="RadialBar"){var $=(C.data||[]).find(function(L){return s2(w,L)});if($)return{graphicalItem:A,payload:$}}else if(Xx(A,j)||Wx(A,j)||Hh(A,j)){var P=dxe({graphicalItem:A,activeTooltipItem:j,itemData:N.data}),B=N.activeIndex===void 0?P:N.activeIndex;return{graphicalItem:Z(Z({},A),{},{childIndex:B}),payload:Hh(A,j)?N.data[P]:A.props.data[P]}}}return null}},{key:"render",value:function(){var w=this;if(!ZR(this))return null;var S=this.props,O=S.children,j=S.className,E=S.width,T=S.height,A=S.style,C=S.compact,_=S.title,N=S.desc,D=I$(S,LSe),R=Ae(D,!1);if(C)return z.createElement(y$,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},z.createElement(wO,Sc({},R,{width:E,height:T,title:_,desc:N}),this.renderClipPath(),eM(O,this.renderMap)));if(this.props.accessibilityLayer){var $,P;R.tabIndex=($=this.props.tabIndex)!==null&&$!==void 0?$:0,R.role=(P=this.props.role)!==null&&P!==void 0?P:"application",R.onKeyDown=function(L){w.accessibilityManager.keyboardEvent(L)},R.onFocus=function(){w.accessibilityManager.focus()}}var B=this.parseEventsOfWrapper();return z.createElement(y$,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},z.createElement("div",Sc({className:ke("recharts-wrapper",j),style:Z({position:"relative",cursor:"default",width:E,height:T},A)},B,{ref:function(k){w.container=k}}),z.createElement(wO,Sc({},R,{width:E,height:T,title:_,desc:N,style:tOe}),this.renderClipPath(),eM(O,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(x.Component);Ne(b,"displayName",n),Ne(b,"defaultProps",Z({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},d)),Ne(b,"getDerivedStateFromProps",function(g,y){var v=g.dataKey,w=g.data,S=g.children,O=g.width,j=g.height,E=g.layout,T=g.stackOffset,A=g.margin,C=y.dataStartIndex,_=y.dataEndIndex;if(y.updateId===void 0){var N=B$(g);return Z(Z(Z({},N),{},{updateId:0},h(Z(Z({props:g},N),{},{updateId:0}),y)),{},{prevDataKey:v,prevData:w,prevWidth:O,prevHeight:j,prevLayout:E,prevStackOffset:T,prevMargin:A,prevChildren:S})}if(v!==y.prevDataKey||w!==y.prevData||O!==y.prevWidth||j!==y.prevHeight||E!==y.prevLayout||T!==y.prevStackOffset||!Ic(A,y.prevMargin)){var D=B$(g),R={chartX:y.chartX,chartY:y.chartY,isTooltipActive:y.isTooltipActive},$=Z(Z({},L$(y,w,E)),{},{updateId:y.updateId+1}),P=Z(Z(Z({},D),R),$);return Z(Z(Z({},P),h(Z({props:g},P),y)),{},{prevDataKey:v,prevData:w,prevWidth:O,prevHeight:j,prevLayout:E,prevStackOffset:T,prevMargin:A,prevChildren:S})}if(!bO(S,y.prevChildren)){var B,L,k,I,V=qr(S,Bs),M=V&&(B=(L=V.props)===null||L===void 0?void 0:L.startIndex)!==null&&B!==void 0?B:C,q=V&&(k=(I=V.props)===null||I===void 0?void 0:I.endIndex)!==null&&k!==void 0?k:_,G=M!==C||q!==_,U=!Ue(w),Y=U&&!G?y.updateId:y.updateId+1;return Z(Z({updateId:Y},h(Z(Z({props:g},y),{},{updateId:Y,dataStartIndex:M,dataEndIndex:q}),y)),{},{prevChildren:S,dataStartIndex:M,dataEndIndex:q})}return null}),Ne(b,"renderActiveDot",function(g,y,v){var w;return x.isValidElement(g)?w=x.cloneElement(g,y):Ce(g)?w=g(y):w=z.createElement(Gx,y),z.createElement(Ye,{className:"recharts-active-dot",key:v},w)});var m=x.forwardRef(function(y,v){return z.createElement(b,Sc({},y,{ref:v}))});return m.displayName=b.displayName,m},uC=r0({chartName:"BarChart",GraphicalChild:Do,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:So},{axisType:"yAxis",AxisComp:Oo}],formatAxisMap:kF}),fOe=r0({chartName:"PieChart",GraphicalChild:$o,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:Nd},{axisType:"radiusAxis",AxisComp:Nm}],formatAxisMap:iF,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}}),wU=r0({chartName:"AreaChart",GraphicalChild:Io,axisComponents:[{axisType:"xAxis",AxisComp:So},{axisType:"yAxis",AxisComp:Oo}],formatAxisMap:kF}),dOe=r0({chartName:"RadialBarChart",GraphicalChild:Rm,legendContent:"children",defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"angleAxis",AxisComp:Nd},{axisType:"radiusAxis",AxisComp:Nm}],formatAxisMap:iF,defaultProps:{layout:"radial",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}});const SU=x.createContext(null);function OU(){return x.useContext(SU)??{}}const pOe=["h-full w-full text-[10px]","[&_.recharts-cartesian-grid_line]:stroke-line","[&_.recharts-cartesian-axis-line]:stroke-line","[&_.recharts-cartesian-axis-tick-line]:stroke-line","[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground","[&_.recharts-radial-bar-background-sector]:fill-panel-2","[&_.recharts-reference-line_line]:stroke-line","[&_.recharts-brush-texts_text]:fill-muted-foreground","[&_.recharts-sector]:outline-none","[&_.recharts-layer]:outline-none","[&_.recharts-surface]:outline-none"].join(" "),jU={height:18,travellerWidth:8,stroke:"var(--aviary-accent-ink, var(--accent))",fill:"color-mix(in srgb, var(--panel-2) 80%, transparent)"};function hOe(e){const t={};for(const[n,r]of Object.entries(e))r.color&&(t[`--color-${n}`]=r.color);return t}function oo(e){return`var(--color-${e})`}function pu({config:e,className:t,children:n}){const r=x.useMemo(()=>hOe(e),[e]);return c.jsx(SU.Provider,{value:e,children:c.jsx("div",{"data-chart":"",className:Gt(pOe,t),style:r,children:c.jsx(Dce,{width:"100%",height:"100%",children:n})})})}const Xf=ra,Gj=Gl;function EU(e){return typeof e=="object"&&e!==null}function TU(e){return Array.isArray(e)?e.filter(EU):[]}function qi(e){if(typeof e=="string")return e;if(typeof e=="number"&&Number.isFinite(e))return String(e)}function mOe(e){return typeof e=="number"&&Number.isFinite(e)?e:void 0}function gOe(e){return EU(e.payload)?e.payload:void 0}function vOe(e){return qi(e.dataKey)??qi(e.name)}function yOe(e){return qi(e.dataKey)??qi(e.name)??qi(e.value)}function Kj(e,t){return e??`series-${t}`}function AU(e,t,n){var i,a;const r=t?(i=n[t])==null?void 0:i.color:void 0;return qi((a=gOe(e))==null?void 0:a.color)??r??qi(e.color)??qi(e.fill)}function CU(e,t,n){var i;return(t?(i=n[t])==null?void 0:i.label:void 0)??qi(e.name)??t??""}function Wf({active:e,payload:t,label:n,hideLabel:r=!1,hideIndicator:i=!1,labelFormatter:a,valueFormatter:o,className:s}){const l=OU(),u=TU(t);if(!e||u.length===0)return null;const f=qi(n),d=f===void 0?null:(a==null?void 0:a(f))??f;return c.jsxs("div",{className:Gt("min-w-[8rem] rounded border border-line bg-popover px-2 py-1.5 text-[11px] text-popover-foreground shadow-lg",s),children:[!r&&d!==null&&c.jsx("p",{className:"mb-1 text-[10px] uppercase tracking-[0.12em] text-faint",children:d}),c.jsx("div",{className:"grid gap-0.5",children:u.map((p,h)=>{const b=vOe(p),m=mOe(p.value),g=m!==void 0&&o?o(m,b??""):qi(p.value)??"—",y=AU(p,b,l);return c.jsxs("div",{className:"flex items-center justify-between gap-3",children:[c.jsxs("span",{className:"flex items-center gap-1.5 text-muted-foreground",children:[!i&&c.jsx("span",{className:"h-2 w-2 shrink-0 rounded-[2px] border border-line",style:y?{background:y}:void 0}),CU(p,b,l)]}),c.jsx("span",{className:"font-mono tabular-nums text-foreground",children:g})]},Kj(b,h))})})]})}function Yj({payload:e,hidden:t,onToggle:n,className:r}){const i=OU(),a=TU(e);return a.length===0?null:c.jsx("div",{className:Gt("flex flex-wrap items-center justify-center gap-x-2 gap-y-1",r),children:a.map((o,s)=>{const l=yOe(o),u=l!==void 0&&(t==null?void 0:t.has(l))===!0,f=AU(o,l,i),d=c.jsx("span",{className:"h-2 w-2 shrink-0 rounded-[2px]",style:f?{background:f}:void 0}),p=CU(o,l,i);return!n||l===void 0?c.jsxs("span",{className:"flex items-center gap-1.5 px-1 text-[10px] text-muted-foreground",children:[d,p]},Kj(l,s)):c.jsxs(Tt,{variant:"ghost",size:"xs","aria-pressed":!u,title:u?`Show ${l}`:`Hide ${l}`,className:Gt("gap-1.5 normal-case tracking-normal",u&&"opacity-40"),onClick:()=>n(l),children:[d,p]},Kj(l,s))})})}function bOe(){const[e,t]=x.useState(()=>new Set),n=x.useCallback(i=>{t(a=>{const o=new Set(a);return o.delete(i)||o.add(i),o})},[]),r=x.useCallback(i=>e.has(i),[e]);return{hidden:e,toggle:n,isHidden:r}}function xOe(e,t){return function(r,...i){const a=new URL(e);return a.searchParams.set("code",r.toString()),i.forEach(o=>a.searchParams.append("args[]",o)),`${t} error #${r}; visit ${a} for the full message.`}}const Wt=xOe("https://base-ui.com/production-error","Base UI"),_U=x.createContext(void 0);function Du(e){const t=x.useContext(_U);if(!e&&t===void 0)throw new Error(Wt(27));return t}const F$={};function fn(e,t){const n=x.useRef(F$);return n.current===F$&&(n.current=e(t)),n}function Ca(e,t,n,r){const i=fn(NU).current;return SOe(i,e,t,n,r)&&RU(i,[e,t,n,r]),i.callback}function wOe(e){const t=fn(NU).current;return OOe(t,e)&&RU(t,e),t.callback}function NU(){return{callback:null,cleanup:null,refs:[]}}function SOe(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function OOe(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function RU(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let i=0;i<t.length;i+=1){const a=t[i];if(a!=null)switch(typeof a){case"function":{const o=a(n);typeof o=="function"&&(r[i]=o);break}case"object":{a.current=n;break}}}e.cleanup=()=>{for(let i=0;i<t.length;i+=1){const a=t[i];if(a!=null)switch(typeof a){case"function":{const o=r[i];typeof o=="function"?o():a(null);break}case"object":{a.current=null;break}}}}}}}const jOe=parseInt(x.version,10);function cC(e){return jOe>=e}function U$(e){if(!x.isValidElement(e))return null;const t=e,n=t.props;return(cC(19)?n==null?void 0:n.ref:t.ref)??null}function Xj(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function Ht(){}const Gi=Object.freeze([]),st=Object.freeze({});function EOe(e,t){const n={};for(const r in e){const i=e[r];if(t!=null&&t.hasOwnProperty(r)){const a=t[r](i);a!=null&&Object.assign(n,a);continue}i===!0?n[`data-${r.toLowerCase()}`]="":i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function TOe(e,t){return typeof e=="function"?e(t):e}function MU(e,t){return typeof e=="function"?e(t):e}const PU={};function Ir(e,t,n,r,i){if(!n&&!r&&!i&&!e)return bb(t);let a=bb(e);return t&&(a=bp(a,t)),n&&(a=bp(a,n)),r&&(a=bp(a,r)),i&&(a=bp(a,i)),a}function AOe(e){if(e.length===0)return PU;if(e.length===1)return bb(e[0]);let t=bb(e[0]);for(let n=1;n<e.length;n+=1)t=bp(t,e[n]);return t}function bb(e){return DU(e)?{...e(PU)}:COe(e)}function bp(e,t){return DU(t)?t(e):_Oe(e,t)}function COe(e){const t={...e};for(const n in t){const r=t[n];$U(n,r)&&(t[n]=IU(r))}return t}function _Oe(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=Xj(e.style,r);break}case"className":{e[n]=kU(e.className,r);break}default:$U(n,r)?e[n]=NOe(e[n],r):e[n]=r}}return e}function $U(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t=="function"||typeof t>"u")}function DU(e){return typeof e=="function"}function NOe(e,t){return t?e?(...n)=>{const r=n[0];if(LU(r)){const a=r;xb(a);const o=t(...n);return a.baseUIHandlerPrevented||e==null||e(...n),o}const i=t(...n);return e==null||e(...n),i}:IU(t):e}function IU(e){return e&&((...t)=>{const n=t[0];return LU(n)&&xb(n),e(...t)})}function xb(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function kU(e,t){return t?e?t+" "+e:t:e}function LU(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function it(e,t,n={}){let r=t.render;n.enabled!==!1&&(r=fC(r));const i=ROe(t,n,r);if(n.enabled===!1)return null;const a=n.state??st;return $Oe(e,r,i,a)}function ROe(e,t,n){const{className:r,style:i}=e,{state:a=st,ref:o,props:s,stateAttributesMapping:l,enabled:u=!0}=t,f=u?TOe(r,a):void 0,d=u?MU(i,a):void 0,p=u?EOe(a,l):st,h=u&&s?MOe(s):void 0,b=u?Xj(p,h)??{}:st;return typeof document<"u"&&(u?Array.isArray(o)?b.ref=wOe([b.ref,U$(n),...o]):b.ref=Ca(b.ref,U$(n),o):Ca(null,null)),u?(f!==void 0&&(b.className=kU(b.className,f)),d!==void 0&&(b.style=Xj(b.style,d)),b):st}function MOe(e){return Array.isArray(e)?AOe(e):Ir(void 0,e)}const POe=Symbol.for("react.lazy");function fC(e){if((e==null?void 0:e.$$typeof)!==POe)return e;const t=x.Children.toArray(e)[0];return x.isValidElement(t)?t:e}function $Oe(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const i=Ir(n,t.props);return i.ref=n.ref,x.cloneElement(t,i)}return DOe(e,n)}function DOe(e,t){return e==="button"?x.createElement("button",{type:"button",...t,key:t.key}):e==="img"?x.createElement("img",{alt:"",...t,key:t.key}):x.createElement(e,t)}const dC="data-starting-style",IOe="data-ending-style",kOe={[dC]:""},LOe={[IOe]:""},Pm={transitionStatus(e){return e==="starting"?kOe:e==="ending"?LOe:null}},BOe="data-open",zOe="data-closed",FOe="data-anchor-hidden",BU="data-popup-open",UOe="data-pressed",HOe={[BU]:""},qOe={[BU]:"",[UOe]:""},VOe={[BOe]:""},GOe={[zOe]:""},KOe={[FOe]:""},zU={open(e){return e?HOe:null}},Wj={open(e){return e?qOe:null}},$m={open(e){return e?VOe:GOe},anchorHidden(e){return e?KOe:null}},pC={...$m,...Pm},hC=x.forwardRef(function(t,n){const{render:r,className:i,style:a,forceRender:o=!1,...s}=t,l=Du(),u=l.useState("open"),f=l.useState("nested"),d=l.useState("mounted"),p=l.useState("transitionStatus");return it("div",t,{state:{open:u,transitionStatus:p},ref:[l.context.backdropRef,n],stateAttributesMapping:pC,props:[{role:"presentation",hidden:!d,style:{userSelect:"none",WebkitUserSelect:"none"}},s],enabled:o||!f})});function i0(){return typeof window<"u"}function Wn(e){return mC(e)?(e.nodeName||"").toLowerCase():"#document"}function Nt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ko(e){var t;return(t=(mC(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function mC(e){return i0()?e instanceof Node||e instanceof Nt(e).Node:!1}function ot(e){return i0()?e instanceof Element||e instanceof Nt(e).Element:!1}function Et(e){return i0()?e instanceof HTMLElement||e instanceof Nt(e).HTMLElement:!1}function hu(e){return!i0()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Nt(e).ShadowRoot}function Dm(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=ii(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!=="inline"&&i!=="contents"}function YOe(e){return/^(table|td|th)$/.test(Wn(e))}function a0(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const XOe=/transform|translate|scale|rotate|perspective|filter/,WOe=/paint|layout|strict|content/,hl=e=>!!e&&e!=="none";let a1;function gC(e){const t=ot(e)?ii(e):e;return hl(t.transform)||hl(t.translate)||hl(t.scale)||hl(t.rotate)||hl(t.perspective)||!vC()&&(hl(t.backdropFilter)||hl(t.filter))||XOe.test(t.willChange||"")||WOe.test(t.contain||"")}function QOe(e){let t=jo(e);for(;Et(t)&&!so(t);){if(gC(t))return t;if(a0(t))return null;t=jo(t)}return null}function vC(){return a1==null&&(a1=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),a1}function so(e){return/^(html|body|#document)$/.test(Wn(e))}function ii(e){return Nt(e).getComputedStyle(e)}function o0(e){return ot(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function jo(e){if(Wn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||hu(e)&&e.host||ko(e);return hu(t)?t.host:t}function FU(e){const t=jo(e);return so(t)?(e.ownerDocument||e).body:Et(t)&&Dm(t)?t:FU(t)}function Qh(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=FU(e),a=i===((r=e.ownerDocument)==null?void 0:r.body),o=Nt(i);if(a){const s=Qj(o);return t.concat(o,o.visualViewport||[],Dm(i)?i:[],s&&n?Qh(s):[])}else return t.concat(i,Qh(i,[],n))}function Qj(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const yC={...Bb},o1=yC.useInsertionEffect,ZOe=o1&&o1!==yC.useLayoutEffect?o1:e=>e();function de(e){const t=fn(JOe).current;return t.next=e,ZOe(t.effect),t.trampoline}function JOe(){const e={next:void 0,callback:eje,trampoline:(...t)=>{var n;return(n=e.callback)==null?void 0:n.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function eje(){}const tje=()=>{},le=typeof document<"u"?x.useLayoutEffect:tje,UU=x.createContext(void 0);function s0(e=!1){const t=x.useContext(UU);if(t===void 0&&!e)throw new Error(Wt(16));return t}function nje(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:a}=e,o=r&&t!==!1,s=r&&t===!1;return{props:x.useMemo(()=>{const u={onKeyDown(f){n&&t&&f.key!=="Tab"&&f.preventDefault()}};return r||(u.tabIndex=i,!a&&n&&(u.tabIndex=t?i:-1)),(a&&(t||o)||!a&&n)&&(u["aria-disabled"]=n),a&&(!t||s)&&(u.disabled=n),u},[r,n,t,o,s,a,i])}}function Qe(e){return(e==null?void 0:e.ownerDocument)||document}function jv(e,t,{detail:n=0,pointerType:r=""}={}){e.dispatchEvent(new(Nt(e)).PointerEvent("click",{bubbles:!0,cancelable:!0,composed:!0,detail:n,pointerType:r,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,altKey:t.altKey,metaKey:t.metaKey}))}function el(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0,composite:a}=e,o=x.useRef(null),s=s0(!0),l=a??s!==void 0,{props:u}=nje({focusableWhenDisabled:n,disabled:t,composite:l,tabIndex:r,isNativeButton:i}),f=x.useCallback(()=>{const h=o.current;s1(h)&&l&&t&&u.disabled===void 0&&h.disabled&&(h.disabled=!1)},[t,u.disabled,l]);le(f,[f]);const d=x.useCallback((h={})=>{const{onClick:b,onMouseDown:m,onKeyUp:g,onKeyDown:y,onPointerDown:v,...w}=h;return Ir({onClick(S){if(t){S.preventDefault();return}b==null||b(S)},onMouseDown(S){t||m==null||m(S)},onKeyDown(S){if(t||(xb(S),y==null||y(S),S.baseUIHandlerPrevented))return;const O=S.target===S.currentTarget,j=S.currentTarget,E=s1(j),T=!i&&rje(j),A=O&&(i?E:!T),C=S.key==="Enter",_=S.key===" ",N=j.getAttribute("role"),D=(N==null?void 0:N.startsWith("menuitem"))||N==="option"||N==="gridcell";if(O&&l&&_){if(S.defaultPrevented&&D)return;S.preventDefault(),(!i||E)&&(S.preventBaseUIHandler(),jv(j,S));return}if(!A||i||!_&&!C){O&&T&&_&&S.preventDefault();return}S.defaultPrevented||(S.preventDefault(),C&&(S.preventBaseUIHandler(),jv(j,S)))},onKeyUp(S){if(!t){if(xb(S),g==null||g(S),S.target===S.currentTarget&&i&&l&&s1(S.currentTarget)&&S.key===" "){S.preventDefault();return}S.baseUIHandlerPrevented||S.target===S.currentTarget&&!i&&!l&&!S.defaultPrevented&&S.key===" "&&(S.preventBaseUIHandler(),jv(S.currentTarget,S))}},onPointerDown(S){if(t){S.preventDefault();return}v==null||v(S)}},i?{type:"button"}:{role:"button"},u,w)},[t,u,l,i]),p=de(h=>{o.current=h,f()});return{getButtonProps:d,buttonRef:p}}function s1(e){return Et(e)&&e.tagName==="BUTTON"}function rje(e){return Et(e)&&e.tagName==="A"&&!!e.href}function Re(e,t,n,r){let i=!1,a=!1;const o=r??st;return{reason:e,event:t??new Event("base-ui"),cancel(){i=!0},allowPropagation(){a=!0},get isCanceled(){return i},get isPropagationAllowed(){return a},trigger:n,...o}}function ije(e,t,n){const r=n??st;return{reason:e,event:t??new Event("base-ui"),...r}}const Ci="none",Iu="trigger-press",bn="trigger-hover",zc="trigger-focus",l0="outside-press",Fc="item-press",aje="close-press",mu="focus-out",u0="escape-key",wb="list-navigation",HU="keyboard",oje="pointer",qU="cancel-open",xp="sibling-open",VU="disabled",H$="missing",q$="initial",c0="imperative-action",sje="window-resize",GU=x.forwardRef(function(t,n){const{render:r,className:i,style:a,disabled:o=!1,nativeButton:s=!0,...l}=t,u=Du(),f=u.useState("open"),{getButtonProps:d,buttonRef:p}=el({disabled:o,native:s}),h={disabled:o};function b(m){f&&u.setOpen(!1,Re(aje,m.nativeEvent))}return it("button",t,{state:h,ref:[n,p],props:[{onClick:b},l,d]})});function KU(){const[,e]=x.useState({});return x.useCallback(()=>{e({})},[])}let V$=0;function lje(e,t="mui"){const n=x.useRef(void 0),r=KU(),i=e??n.current;return x.useEffect(()=>{n.current==null&&(V$+=1,n.current=`${t}-${V$}`,e==null&&r())},[e,t,r]),i}const G$=yC.useId;function Im(e,t){if(G$!==void 0){const n=G$();return e??(t?`${t}-${n}`:n)}return lje(e,t)}function _i(e){return Im(e,"base-ui")}const bC=x.forwardRef(function(t,n){const{render:r,className:i,style:a,id:o,...s}=t,l=Du(),u=_i(o);return l.useSyncedValueWithCleanup("descriptionElementId",u),it("p",t,{ref:n,props:[{id:u},s]})});function xC(e){x.useEffect(e,Gi)}const ip=0;class Ki{constructor(){Be(this,"currentId",ip);Be(this,"clear",()=>{this.currentId!==ip&&(clearTimeout(this.currentId),this.currentId=ip)});Be(this,"disposeEffect",()=>this.clear)}static create(){return new Ki}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=ip,n()},t)}isStarted(){return this.currentId!==ip}}function dn(){const e=fn(Ki.create).current;return xC(e.disposeEffect),e}function uje(){return typeof navigator>"u"?{userAgent:"",platform:"",maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??0}}const{userAgent:cje,platform:fje,maxTouchPoints:dje}=uje(),f0=cje.toLowerCase(),Zh=fje.toLowerCase(),d0=/^i(os$|p)/.test(Zh)||Zh==="macintel"&&dje>1,K$="android",Zj=Zh===K$||f0.includes(K$),wC=!d0&&Zh.startsWith("mac");Zh.startsWith("win");const pje=wC||d0;var uk;const $a=typeof CSS<"u"&&!!((uk=CSS.supports)!=null&&uk.call(CSS,"-webkit-backdrop-filter:none"));!$a&&f0.includes("firefox");!$a&&f0.includes("chrom");const hje=pje,SC=/jsdom|happydom/.test(f0);function ia(e){e.preventDefault(),e.stopPropagation()}function mje(e){return"nativeEvent"in e}function Qf(e){return e.pointerType===""&&e.isTrusted?!0:Zj&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function OC(e){return SC?!1:!Zj&&e.width===0&&e.height===0||e.type==="pointerdown"&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"&&(Zj||e.buttons===0)||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function Rs(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function gje(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}function br(e){var n;let t=e.activeElement;for(;((n=t==null?void 0:t.shadowRoot)==null?void 0:n.activeElement)!=null;)t=t.shadowRoot.activeElement;return t}function je(e,t){var r;if(!e||!t)return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e.contains(t))return!0;if(n&&hu(n)){let i=t;for(;i;){if(e===i)return!0;i=i.parentNode||i.host}}return!1}function Jh(e,t){let n=e;for(;n;){if(ot(n)&&n.matches(t))return n;n=n.assignedSlot??n.parentNode??(hu(n)?n.host:null)}return null}function $n(e){return"composedPath"in e?e.composedPath()[0]??e.target:e.target}const Jj="data-base-ui-focusable",YU="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",p0="ArrowLeft",h0="ArrowRight",XU="ArrowUp",jC="ArrowDown",eE="data-trigger-disabled";function Sb(e,t){if(!ot(e))return!1;const n=e;if(t.hasElement(n))return!n.hasAttribute(eE);for(const[,r]of t.entries())if(je(r,n))return!r.hasAttribute(eE);return!1}function l1(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function vje(e){return e.matches("html,body")}function km(e){return Et(e)&&e.matches(YU)}function yje(e){return Jh(e,`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${YU}`)!=null}function tE(e){return e?e.getAttribute("role")==="combobox"&&km(e):!1}function bje(e){if(!e||SC)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function Ob(e){return e?e.hasAttribute(Jj)?e:e.querySelector(`[${Jj}]`)||e:null}function xje(e,t){return t!=null&&!Rs(t)?0:typeof e=="function"?e():e}function gu(e,t,n){const r=xje(e,n);return typeof r=="number"?r:r==null?void 0:r[t]}function Y$(e){return typeof e=="function"?e():e}function WU(e,t){return t||e==="click"||e==="mousedown"}function wje(e){return(e==null?void 0:e.includes("mouse"))&&e!=="mousedown"}const QU=x.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new Ki,currentIdRef:{current:null},currentContextRef:{current:null}});function Sje(e,t){e.current=t.current}function Oje(e){const{children:t,delay:n,timeoutMs:r=0}=e,i=x.useRef(n),a=x.useRef(n),o=x.useRef(null),s=x.useRef(null),l=dn();return le(()=>{if(a.current=n,!o.current){i.current=n;return}i.current={open:gu(i.current,"open"),close:gu(n,"close")}},[n,o,i,a]),c.jsx(QU.Provider,{value:x.useMemo(()=>({hasProvider:!0,delayRef:i,initialDelayRef:a,currentIdRef:o,timeoutMs:r,currentContextRef:s,timeout:l}),[r,l]),children:t})}function jje(e,t={open:!1}){const{open:n}=t,r=e.useState("floatingId"),i=x.useContext(QU),{currentIdRef:a,delayRef:o,timeoutMs:s,initialDelayRef:l,currentContextRef:u,hasProvider:f,timeout:d}=i,[p,h]=x.useState(!1),b=x.useRef(n);return le(()=>{b.current=n},[n]),le(()=>{function m(){var g;(g=u.current)==null||g.setIsInstantPhase(!1),a.current=null,u.current=null,o.current=l.current,d.clear()}if(a.current&&!n&&a.current===r){if(h(!1),s){const g=r;return d.start(s,()=>{e.select("open")||a.current&&a.current!==g||m()}),()=>{(b.current||a.current!==g)&&d.clear()}}m()}},[n,r,a,o,s,l,u,d,e]),le(()=>{if(!n)return;const m=u.current,g=a.current;d.clear(),u.current={onOpenChange:e.setOpen,setIsInstantPhase:h},a.current=r,o.current={open:0,close:gu(l.current,"close")},g!==null&&g!==r?(h(!0),m==null||m.setIsInstantPhase(!0),m==null||m.onOpenChange(!1,Re(Ci))):(h(!1),m==null||m.setIsInstantPhase(!1))},[n,r,e,a,o,l,u,d]),le(()=>()=>{if(a.current===r){if(u.current=null,!b.current)return;a.current=null,Sje(o,l),d.clear()}},[u,a,o,r,l,d]),x.useMemo(()=>({activeIdRef:a,hasProvider:f,delayRef:o,isInstantPhase:p}),[a,f,o,p])}function Ve(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function ja(...e){return()=>{for(let t=0;t<e.length;t+=1){const n=e[t];n&&n()}}}function qt(e){const t=fn(Eje,e).current;return t.next=e,le(t.effect),t}function Eje(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}const Ng=null;class Tje{constructor(){Be(this,"callbacks",[]);Be(this,"callbacksCount",0);Be(this,"nextId",1);Be(this,"startId",1);Be(this,"isScheduled",!1);Be(this,"tick",t=>{var i;this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let a=0;a<n.length;a+=1)(i=n[a])==null||i.call(n,t)})}request(t){const n=this.nextId;return this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1,(!this.isScheduled||!1)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){const n=t-this.startId;n<0||n>=this.callbacks.length||this.callbacks[n]!==null&&(this.callbacks[n]=null,this.callbacksCount-=1)}}let Rg=new Tje;class rr{constructor(){Be(this,"currentId",Ng);Be(this,"cancel",()=>{this.currentId!==Ng&&(Rg.cancel(this.currentId),this.currentId=Ng)});Be(this,"disposeEffect",()=>this.cancel)}static create(){return new rr}static request(t){return Rg.request(t)}static cancel(t){return Rg.cancel(t)}request(t){this.cancel(),this.currentId=Rg.request(()=>{this.currentId=Ng,t()})}}function Zf(){const e=fn(rr.create).current;return xC(e.disposeEffect),e}const ZU={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},JU={...ZU,position:"fixed",margin:0,top:0,left:0},Aje={...ZU,position:"absolute"},Jf=x.forwardRef(function(t,n){const[r,i]=x.useState();le(()=>{hje&&$a&&i("button")},[]);const a={tabIndex:0,role:r};return c.jsx("span",{...t,ref:n,style:JU,"aria-hidden":r?void 0:!0,...a,"data-base-ui-focus-guard":""})}),ed=Math.min,lo=Math.max,jb=Math.round,Mg=Math.floor,uo=e=>({x:e,y:e}),Cje={left:"right",right:"left",bottom:"top",top:"bottom"};function eH(e,t,n){return lo(e,ed(t,n))}function zs(e,t){return typeof e=="function"?e(t):e}function Wr(e){return e.split("-")[0]}function Ea(e){return e.split("-")[1]}function EC(e){return e==="x"?"y":"x"}function TC(e){return e==="y"?"height":"width"}function ji(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function AC(e){return EC(ji(e))}function _je(e,t,n){n===void 0&&(n=!1);const r=Ea(e),i=AC(e),a=TC(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(o=Eb(o)),[o,Eb(o)]}function Nje(e){const t=Eb(e);return[nE(e),t,nE(t)]}function nE(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const X$=["left","right"],W$=["right","left"],Rje=["top","bottom"],Mje=["bottom","top"];function Pje(e,t,n){switch(e){case"top":case"bottom":return n?t?W$:X$:t?X$:W$;case"left":case"right":return t?Rje:Mje;default:return[]}}function $je(e,t,n,r){const i=Ea(e);let a=Pje(Wr(e),n==="start",r);return i&&(a=a.map(o=>o+"-"+i),t&&(a=a.concat(a.map(nE)))),a}function Eb(e){const t=Wr(e);return Cje[t]+e.slice(t.length)}function Dje(e){var t,n,r,i;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(r=e.bottom)!=null?r:0,left:(i=e.left)!=null?i:0}}function tH(e){return typeof e!="number"?Dje(e):{top:e,right:e,bottom:e,left:e}}function em(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Uc(e,t){return t<0||t>=e.length}function Ev(e,t){return Hc(e.current,{disabledIndices:t})}function rE(e,t){return Hc(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Ije(e,t,n){const{decrement:r,loopFocus:i,allowEscape:a,disabledIndices:o,minIndex:s,maxIndex:l}=n,u=()=>Hc(e,{startingIndex:t,decrement:r,disabledIndices:o});let f,d=!1;if(!i)f=r?Math.max(s,u()):Math.min(l,u());else if(r?t<=s:t>=l){const p=r?-1:e.length;a&&t!==p?f=-1:(f=r?l:s,d=!0)}else f=u();return{index:Uc(e,f)?-1:f,wrapped:d}}function Hc(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:i=1}={}){let a=t;do a+=n?-i:i;while(a>=0&&a<=e.length-1&&qc(e,a,r));return a}function qc(e,t,n){if(typeof n=="function"?n(t):(n==null?void 0:n.includes(t))??!1)return!0;const i=e[t];return i?!m0(i)||i.matches(":disabled")?!0:!n&&(i.hasAttribute("disabled")||i.getAttribute("aria-disabled")==="true"):!1}function kje(e){return e.visibility==="hidden"||e.visibility==="collapse"}function m0(e,t=e?ii(e):null){return!e||!e.isConnected||!t||kje(t)?!1:typeof e.checkVisibility=="function"?e.checkVisibility():t.display!=="none"&&t.display!=="contents"}const Lje='a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';function Bje(e){const t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;const n=e.getRootNode();return hu(n)?n.host:null}function iE(e){for(const t of Array.from(e.children))if(Wn(t)==="summary")return t;return null}function zje(e,t){const n=iE(t);return!!n&&(e===n||je(n,e))}function nH(e){const t=e?Wn(e):"";return e!=null&&e.matches(Lje)&&(t!=="summary"||e.parentElement!=null&&Wn(e.parentElement)==="details"&&iE(e.parentElement)===e)&&(t!=="details"||iE(e)==null)&&(t!=="input"||e.type!=="hidden")}function CC(e){if(!nH(e)||!e.isConnected||e.matches(":disabled"))return!1;for(let t=e;t;t=Bje(t)){const n=t!==e,r=Wn(t)==="slot";if(t.hasAttribute("inert")||n&&Wn(t)==="details"&&!t.open&&!zje(e,t)||t.hasAttribute("hidden")||!r&&!Fje(t,n))return!1}return!0}function Fje(e,t){const n=ii(e);return t?n.display!=="none":m0(e,n)}function rH(e){const t=e.tabIndex;if(t<0){const n=Wn(e);if(n==="details"||n==="audio"||n==="video"||Et(e)&&e.isContentEditable)return 0}return t}function u1(e){if(Wn(e)!=="input")return null;const t=e;return t.type==="radio"&&t.name!==""?t:null}function iH(e,t){const n=u1(e);if(!n)return!0;const r=t.find(i=>{const a=u1(i);return(a==null?void 0:a.name)===n.name&&a.form===n.form&&a.checked});return r?r===n:t.find(i=>{const a=u1(i);return(a==null?void 0:a.name)===n.name&&a.form===n.form})===n}function aH(e){if(Et(e)&&Wn(e)==="slot"){const t=e.assignedElements({flatten:!0});if(t.length>0)return t}return Et(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function _C(e,t){aH(e).forEach(n=>{nH(n)&&t.push(n),_C(n,t)})}function oH(e,t,n){aH(e).forEach(r=>{Et(r)&&r.matches(t)&&n.push(r),oH(r,t,n)})}function g0(e){return CC(e)&&rH(e)>=0}function sH(e){const t=[];return _C(e,t),t.filter(CC)}function v0(e){const t=sH(e);return t.filter(n=>rH(n)>=0&&iH(n,t))}function lH(e,t){const n=v0(e),r=n.length;if(r===0)return;const i=br(Qe(e)),a=n.indexOf(i),o=a===-1?t===1?0:r-1:a+t;return n[o]}function uH(e){return lH(Qe(e).body,1)||e}function cH(e){return lH(Qe(e).body,-1)||e}function Uje(e,t,n){if(!e)return null;const r=[];_C(Qe(e).body,r);const i=r.indexOf(e);if(i===-1)return null;const a=r.filter(CC);for(let o=1;o<r.length;o+=1){const s=r[(i+t*o+r.length)%r.length];if(!je(n,s)&&g0(s)&&iH(s,a))return s}return r[i]}function Vc(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!je(n,r)}function Hje(e){v0(e).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Q$(e){const t=[];oH(e,"[data-tabindex]",t),t.forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}function Fs(e,t,n=!0){return e.filter(i=>i.parentId===t).flatMap(i=>{var a;return[...!n||(a=i.context)!=null&&a.open?[i]:[],...Fs(e,i.id,n)]})}function Z$(e,t){var i;let n=[],r=(i=e.find(a=>a.id===t))==null?void 0:i.parentId;for(;r;){const a=e.find(o=>o.id===r);r=a==null?void 0:a.parentId,a&&(n=n.concat(a))}return n}function Gc(e){return`data-base-ui-${e}`}let Pg=0;function Tv(e,t={}){const{preventScroll:n=!1,sync:r=!1,shouldFocus:i}=t;cancelAnimationFrame(Pg);function a(){i&&!i()||e==null||e.focus({preventScroll:n})}if(r)return a(),Ht;const o=requestAnimationFrame(a);return Pg=o,()=>{Pg===o&&(cancelAnimationFrame(o),Pg=0)}}const J$="data-base-ui-inert";let ap=new WeakMap,$g=new WeakSet,op=new WeakMap,c1=0;function fH(e){return e?hu(e)?e.host:fH(e.parentNode):null}const eD=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=fH(n);return e.contains(r)?r:null}).filter(n=>n!=null),tD=e=>{const t=new Set;return e.forEach(n=>{let r=n;for(;r&&!t.has(r);)t.add(r),r=r.parentNode}),t},nD=(e,t,n)=>{const r=[],i=a=>{!a||n.has(a)||Array.from(a.children).forEach(o=>{Wn(o)!=="script"&&(t.has(o)?i(o):r.push(o))})};return i(e),r};function qje(e,t,n,{mark:r=!0}){const i=eD(t,e),a=r?nD(t,tD(i),new Set(i)):[],o=[],s=[];if(n){const l=eD(t,Array.from(t.querySelectorAll("[aria-live]"))),u=i.concat(l);nD(t,tD(u),new Set(u)).forEach(d=>{const p=d.getAttribute("aria-hidden"),h=p!==null&&p!=="false",b=(ap.get(d)||0)+1;ap.set(d,b),o.push(d),b===1&&h&&$g.add(d),h||d.setAttribute("aria-hidden","true")})}return r&&a.forEach(l=>{const u=(op.get(l)||0)+1;op.set(l,u),s.push(l),u===1&&l.setAttribute(J$,"")}),c1+=1,()=>{o.forEach(l=>{const u=(ap.get(l)||0)-1;ap.set(l,u),u||($g.has(l)||l.removeAttribute("aria-hidden"),$g.delete(l))}),r&&s.forEach(l=>{const u=(op.get(l)||0)-1;op.set(l,u),u||l.removeAttribute(J$)}),c1-=1,c1||(ap=new WeakMap,$g=new WeakSet,op=new WeakMap)}}function rD(e,t={}){const{ariaHidden:n=!1,mark:r=!0}=t,i=Qe(e[0]).body;return qje(e,i,n,{mark:r})}const Vje=500,Gje=500,Kje={style:{transition:"none"}},Yje="data-base-ui-click-trigger",dH={fallbackAxisSide:"none"},pH={fallbackAxisSide:"end"},Xje={clipPath:"inset(50%)",position:"fixed",top:0,left:0},hH=x.createContext(null),mH=()=>x.useContext(hH),Wje=Gc("portal");function gH(e={}){const{ref:t,container:n,componentProps:r=st,elementProps:i}=e,a=Im(),o=mH(),s=o==null?void 0:o.portalNode,[l,u]=x.useState(null),[f,d]=x.useState(null),p=de(g=>{g!==null&&d(g)}),h=x.useRef(null);le(()=>{if(n===null){h.current&&(h.current=null,d(null),u(null));return}const g=(n&&(mC(n)?n:n.current))??s??document.body;if(g==null){h.current&&(h.current=null,d(null),u(null));return}h.current!==g&&(h.current=g,d(null),u(g))},[n,s]);const b=it("div",r,{ref:[t,p],props:[{id:a,[Wje]:""},i]}),m=l&&b?Ni.createPortal(b,l):null;return{node:f,nodeId:x.isValidElement(b)?b.props.id:void 0,subtree:m}}const NC=x.forwardRef(function(t,n){const{render:r,className:i,style:a,children:o,container:s,portalOwnerRole:l,...u}=t,{node:f,nodeId:d,subtree:p}=gH({container:s,ref:n,componentProps:t,elementProps:u}),h=x.useRef(null),b=x.useRef(null),m=x.useRef(null),g=x.useRef(null),[y,v]=x.useState(null),w=x.useRef(!1),S=y==null?void 0:y.modal,O=y==null?void 0:y.open,j=!!y&&!y.modal&&y.open&&!!f;x.useEffect(()=>{if(!f||S)return;function T(A){f&&A.relatedTarget&&Vc(A)&&(A.type==="focusin"?w.current&&(Q$(f),w.current=!1):(Hje(f),w.current=!0))}return ja(Ve(f,"focusin",T,!0),Ve(f,"focusout",T,!0))},[f,S]),le(()=>{!f||O!==!0||!w.current||(Q$(f),w.current=!1)},[O,f]);const E=x.useMemo(()=>({beforeOutsideRef:h,afterOutsideRef:b,beforeInsideRef:m,afterInsideRef:g,portalNode:f,setFocusManagerState:v}),[f]);return c.jsxs(x.Fragment,{children:[p,c.jsxs(hH.Provider,{value:E,children:[j&&f&&c.jsx(Jf,{"data-type":"outside",ref:h,onFocus:T=>{var A;if(Vc(T,f))(A=m.current)==null||A.focus();else{const C=y?y.domReference:null,_=cH(C);_==null||_.focus()}}}),j&&f&&c.jsx("span",{role:l,"aria-owns":d,style:Xje}),f&&Ni.createPortal(o,f),j&&f&&c.jsx(Jf,{"data-type":"outside",ref:b,onFocus:T=>{var A;if(Vc(T,f))(A=g.current)==null||A.focus();else{const C=y?y.domReference:null,_=uH(C);_==null||_.focus(),y!=null&&y.closeOnFocusOut&&(y==null||y.onOpenChange(!1,Re(mu,T.nativeEvent)))}}})]})]})});function vH(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(i=>i(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}class RC{constructor(){Be(this,"nodesRef",{current:[]});Be(this,"events",vH())}addNode(t){this.nodesRef.current.push(t)}removeNode(t){const n=this.nodesRef.current.findIndex(r=>r===t);n!==-1&&this.nodesRef.current.splice(n,1)}}const yH=x.createContext(null),bH=x.createContext(null),tl=()=>{var e;return((e=x.useContext(yH))==null?void 0:e.id)||null},nl=e=>{const t=x.useContext(bH);return e??t};function xH(e){const t=Im(),n=nl(e),r=tl();return le(()=>{if(!t)return;const i={id:t,parentId:r};return n==null||n.addNode(i),()=>{n==null||n.removeNode(i)}},[n,t,r]),t}function Qje(e){const{children:t,id:n}=e,r=tl();return c.jsx(yH.Provider,{value:x.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function Zje(e){const{children:t,externalTree:n}=e,r=fn(()=>n??new RC).current;return c.jsx(bH.Provider,{value:r,children:t})}function Ha(e){return e==null?e:"current"in e?e.current:e}function Jje(e,t){const n=Nt($n(e));return e instanceof n.KeyboardEvent?"keyboard":e instanceof n.FocusEvent?t||"keyboard":"pointerType"in e?e.pointerType||(Qf(e)?"keyboard":t||"mouse"):"touches"in e?"touch":e instanceof n.MouseEvent?t||(e.detail===0?"keyboard":"mouse"):""}const iD=20;let ys=[];function MC(){ys=ys.filter(e=>{var t;return(t=e.deref())==null?void 0:t.isConnected})}function aD(e){MC(),e&&Wn(e)!=="body"&&(ys.push(new WeakRef(e)),ys.length>iD&&(ys=ys.slice(-iD)))}function oD(){var e;return MC(),(e=ys[ys.length-1])==null?void 0:e.deref()}function eEe(e){return e?g0(e)?e:v0(e)[0]||e:null}function sD(e){var i;if(e.hasAttribute("tabindex")&&!e.hasAttribute("data-tabindex")||!((i=e.getAttribute("role"))!=null&&i.includes("dialog")))return;const n=sH(e).filter(a=>{const o=a.getAttribute("data-tabindex")||"";return g0(a)||a.hasAttribute("data-tabindex")&&!o.startsWith("-")}),r=e.getAttribute("tabindex");n.length===0?r!=="0"&&(e.setAttribute("tabindex","0"),e.setAttribute("data-tabindex","0")):(r!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function PC(e){const{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:a=!0,explicitReturnFocus:o,restoreFocus:s=!1,modal:l=!0,closeOnFocusOut:u=!0,openInteractionType:f="",nextFocusableElement:d,previousFocusableElement:p,beforeContentFocusGuardRef:h,externalTree:b,getInsideElements:m}=e,g=t.useState("open"),y=t.useState("domReferenceElement"),v=t.useState("floatingElement"),{events:w,dataRef:S}=t.context,O=de(()=>{var Q;return(Q=S.current.floatingContext)==null?void 0:Q.nodeId}),j=i===!1,E=tE(y)&&j,T=qt(i),A=qt(a),C=qt(o),_=qt(f),N=qt(g),D=nl(b),R=mH(),$=x.useRef(!1),P=x.useRef(!1),B=x.useRef(!1),L=x.useRef(null),k=x.useRef(""),I=x.useRef(""),V=x.useRef(null),M=x.useRef(null),q=Ca(V,h,R==null?void 0:R.beforeInsideRef),G=Ca(M,R==null?void 0:R.afterInsideRef),U=dn(),Y=dn(),X=Zf(),te=R!=null,H=Ob(v),ee=de((Q=H)=>Q?v0(Q):[]),J=de(()=>(m==null?void 0:m().filter(Q=>Q!=null))??[]);x.useEffect(()=>{if(r||!l)return;function Q(ue){ue.key==="Tab"&&je(H,br(Qe(H)))&&ee().length===0&&!E&&ia(ue)}const ae=Qe(H);return Ve(ae,"keydown",Q)},[r,H,l,E,ee]),x.useEffect(()=>{if(r||!g)return;const Q=Qe(H);function ae(){B.current=!1}function ue(Ie){const ce=$n(Ie),Se=J(),re=je(v,ce)||je(y,ce)||je(R==null?void 0:R.portalNode,ce)||Se.some(we=>we===ce||je(we,ce));B.current=!re,I.current=Ie.pointerType||"keyboard",Jh(ce,`[${Yje}]`)&&(P.current=!0,Y.start(0,()=>{P.current=!1}))}function ye(){I.current="keyboard"}return ja(Ve(Q,"pointerdown",ue,!0),Ve(Q,"pointerup",ae,!0),Ve(Q,"pointercancel",ae,!0),Ve(Q,"keydown",ye,!0),ae)},[r,v,y,H,g,R,Y,J]),x.useEffect(()=>{if(r||!u)return;const Q=Qe(H);function ae(){P.current=!0,Y.start(0,()=>{P.current=!1})}function ue(Se){const re=$n(Se);g0(re)&&(L.current=re)}function ye(Se){const re=Se.relatedTarget,we=Se.currentTarget,$e=$n(Se);l&&re==null&&$e!=null&&je(v,$e)&&aD($e),queueMicrotask(()=>{const at=O(),W=t.context.triggerElements,ie=J(),Oe=(re==null?void 0:re.hasAttribute(Gc("focus-guard")))&&[V.current,M.current,R==null?void 0:R.beforeInsideRef.current,R==null?void 0:R.afterInsideRef.current,R==null?void 0:R.beforeOutsideRef.current,R==null?void 0:R.afterOutsideRef.current,Ha(p),Ha(d)].includes(re),pe=!(je(y,re)||je(v,re)||je(re,v)||je(R==null?void 0:R.portalNode,re)||ie.some(he=>he===re||je(he,re))||W.hasMatchingElement(he=>je(he,re))||Oe||D&&(Fs(D.nodesRef.current,at).find(he=>{var Fe,Le;return je((Fe=he.context)==null?void 0:Fe.elements.floating,re)||je((Le=he.context)==null?void 0:Le.elements.domReference,re)})||Z$(D.nodesRef.current,at).find(he=>{var Fe,Le,nt;return[(Fe=he.context)==null?void 0:Fe.elements.floating,Ob((Le=he.context)==null?void 0:Le.elements.floating)].includes(re)||((nt=he.context)==null?void 0:nt.elements.domReference)===re})));if(we===y&&H&&sD(H),s&&we!==y&&!m0($e)&&br(Q)===Q.body){if(Et(H)&&(H.focus(),s==="popup")){X.request(()=>{H.focus()});return}const he=ee(),Fe=L.current,Le=(Fe&&he.includes(Fe)?Fe:null)||he[he.length-1]||H;Et(Le)&&Le.focus()}if(S.current.insideReactTree){S.current.insideReactTree=!1;return}(E||!l)&&re&&pe&&!P.current&&(E||re!==oD())&&($.current=!0,t.setOpen(!1,Re(mu,Se)))})}function Ie(){B.current||(S.current.insideReactTree=!0,U.start(0,()=>{S.current.insideReactTree=!1}))}const ce=Et(y)?y:null;if(!(!v&&!ce))return ja(ce&&Ve(ce,"focusout",ye),ce&&Ve(ce,"pointerdown",ae),v&&Ve(v,"focusin",ue),v&&Ve(v,"focusout",ye),v&&R&&Ve(v,"focusout",Ie,!0))},[r,y,v,H,l,D,R,t,u,s,ee,E,O,S,U,Y,X,d,p,J]),x.useEffect(()=>{var we,$e,at;if(r||!v||!g)return;const Q=Array.from(((we=R==null?void 0:R.portalNode)==null?void 0:we.querySelectorAll(`[${Gc("portal")}]`))||[]),ue=(at=($e=(D?Z$(D.nodesRef.current,O()):[]).find(W=>{var ie;return tE(((ie=W.context)==null?void 0:ie.elements.domReference)||null)}))==null?void 0:$e.context)==null?void 0:at.elements.domReference,Ie=[...[v,...Q,V.current,M.current,R==null?void 0:R.beforeOutsideRef.current,R==null?void 0:R.afterOutsideRef.current,...J()],ue,Ha(p),Ha(d),E?y:null].filter(W=>W!=null),ce=rD(Ie,{ariaHidden:l||E,mark:!1}),Se=[v,...Q].filter(W=>W!=null),re=rD(Se);return()=>{re(),ce()}},[g,r,y,v,l,R,E,D,O,d,p,J]),le(()=>{if(!g||r||!Et(H))return;k.current="",I.current="";const Q=Qe(H),ae=br(Q);queueMicrotask(()=>{const ue=T.current,ye=typeof ue=="function"?ue(_.current||""):ue;if(ye===void 0||ye===!1||je(H,ae))return;let ce=null;const Se=()=>(ce==null&&(ce=ee(H)),ce[0]||H);let re;ye===!0||ye===null?re=Se():re=Ha(ye),re=re||Se();const we=je(H,br(Q)),$e=S.current.openEvent,at=($e==null?void 0:$e.type)==="mousedown"&&Qf($e);Tv(re,{sync:at,preventScroll:re===H,shouldFocus(){if(!N.current)return!1;if(we)return!0;const W=br(Q);return!(W!==re&&je(H,W))}})})},[r,g,H,ee,T,_,N,S]);const K=x.useRef(null);le(()=>{if(r||!H){K.current=null;return}K.current&&(K.current.cancelled=!0,K.current=null);const Q=Qe(H),ae=br(Q),ue=_.current==null;aD(ae);function ye(ce){var Se;if(ce.open||(k.current=Jje(ce.nativeEvent,I.current)),(ce.reason===mu&&((Se=ce.triggerElement)!=null&&Se.hasAttribute(Gc("focus-guard")))||ce.reason===bn&&ce.nativeEvent.type==="mouseleave")&&($.current=!0),ce.reason===l0)if(ce.nested)$.current=!1;else if(Qf(ce.nativeEvent)||OC(ce.nativeEvent))$.current=!1;else{let re=!1;Qe(H).createElement("div").focus({get preventScroll(){return re=!0,!1}}),re?$.current=!1:$.current=!0}}w.on("openchange",ye);function Ie(ce){const Se=A.current;let re=typeof Se=="function"?Se(ce):Se;if(re===void 0||re===!1)return null;re===null&&(re=!0);const we=y!=null&&y.isConnected?y:null,$e=ae!=null&&ae.isConnected&&Wn(ae)!=="body"?ae:null;let at=ue?$e||we:we||$e;return at||(at=oD()||null),typeof re=="boolean"?at:Ha(re)||at||null}return()=>{w.off("openchange",ye);const ce=br(Q),Se=J(),re=je(v,ce)||Se.some(ie=>ie===ce||je(ie,ce))||D&&Fs(D.nodesRef.current,O(),!1).some(ie=>{var Oe;return je((Oe=ie.context)==null?void 0:Oe.elements.floating,ce)}),we=A.current,$e=k.current,at=Ie($e),W={cancelled:!1};K.current=W,queueMicrotask(()=>{K.current===W&&(K.current=null);const ie=eEe(at),Oe=C.current??typeof we!="boolean";if(!W.cancelled&&we&&!$.current&&Et(ie)&&(!(!Oe&&ie!==ce&&ce!==Q.body)||re)){const pe={preventScroll:!0};$e==="keyboard"&&(pe.focusVisible=!0),ie.focus(pe)}$.current=!1})}},[r,v,H,A,C,_,w,D,y,O,J]),le(()=>{if(!$a||g||!v)return;const Q=br(Qe(v));!Et(Q)||!km(Q)||je(v,Q)&&Q.blur()},[g,v]),le(()=>{if(!(r||!R))return R.setFocusManagerState({modal:l,closeOnFocusOut:u,open:g,onOpenChange:t.setOpen,domReference:y}),()=>{R.setFocusManagerState(null)}},[r,R,l,g,t,u,y]),le(()=>{if(!(r||!H))return sD(H),()=>{queueMicrotask(MC)}},[r,H]);const oe=!r&&(l?!E:!0)&&(te||l);return c.jsxs(x.Fragment,{children:[oe&&c.jsx(Jf,{"data-type":"inside",ref:q,onFocus:Q=>{var ae;if(l){const ue=ee();Tv(ue[ue.length-1])}else if(R!=null&&R.portalNode)if($.current=!1,Vc(Q,R.portalNode)){const ue=uH(y);ue==null||ue.focus()}else(ae=Ha(p??R.beforeOutsideRef))==null||ae.focus()}}),n,oe&&c.jsx(Jf,{"data-type":"inside",ref:G,onFocus:Q=>{var ae;if(l)Tv(ee()[0]);else if(R!=null&&R.portalNode)if(u&&($.current=!0),Vc(Q,R.portalNode)){const ue=cH(y);ue==null||ue.focus()}else(ae=Ha(d??R.afterOutsideRef))==null||ae.focus()}})]})}function wH(e,t={}){const{enabled:n=!0,event:r="click",toggle:i=!0,ignoreMouse:a=!1,stickIfOpen:o=!0,touchOpenDelay:s=0,reason:l=Iu}=t,u=e.context.dataRef,f=x.useRef(void 0),d=Zf(),p=dn(),h=x.useMemo(()=>{function b(g,y,v,w){const S=Re(l,y,v);g&&w==="touch"&&s>0?p.start(s,()=>{e.setOpen(!0,S)}):e.setOpen(g,S)}function m(g,y,v){const w=u.current.openEvent,S=e.select("domReferenceElement")!==y;return g&&S||!g||!i?!0:w&&(typeof o=="function"?o():o)?!v(w.type):!1}return{onPointerDown(g){f.current=Rs(g.pointerType,!0)&&OC(g.nativeEvent)?"virtual":g.pointerType},onMouseDown(g){const y=f.current,v=g.nativeEvent,w=e.select("open");if(g.button!==0||r==="click"||Rs(y,!0)&&a)return;const S=m(w,g.currentTarget,T=>T==="click"||T==="mousedown"),O=$n(v),j=km(O);if(j||y==="virtual"){b(S,v,j?O:g.currentTarget,y);return}const E=g.currentTarget;d.request(()=>{b(S,v,E,y)})},onClick(g){if(r==="mousedown-only")return;const y=f.current;if(r==="mousedown"&&y){f.current=void 0;return}if(Rs(y,!0)&&a)return;const v=e.select("open"),w=m(v,g.currentTarget,S=>S==="click"||S==="mousedown"||S==="keydown"||S==="keyup");b(w,g.nativeEvent,g.currentTarget,y)},onKeyDown(){f.current=void 0}}},[u,r,a,l,e,o,i,d,p,s]);return x.useMemo(()=>n?{reference:h}:st,[n,h])}function tEe(e,t){let n=null,r=null,i=!1;return{contextElement:e||void 0,getBoundingClientRect(){var h;const a=(e==null?void 0:e.getBoundingClientRect())||{width:0,height:0,x:0,y:0},o=t.axis==="x"||t.axis==="both",s=t.axis==="y"||t.axis==="both",l=["mouseenter","mousemove"].includes(((h=t.dataRef.current.openEvent)==null?void 0:h.type)||"")&&t.pointerType!=="touch",u=t.axis==="y"?a.width:0,f=t.axis==="x"?a.height:0;let d=a.x,p=a.y;return n==null&&t.x&&o&&(n=a.x-t.x),r==null&&t.y&&s&&(r=a.y-t.y),d-=n||0,p-=r||0,(!i||l)&&(d=o&&t.x!=null?t.x:d,p=s&&t.y!=null?t.y:p),i=!0,{width:u,height:f,x:d,y:p,top:p,right:d+u,bottom:p+f,left:d}}}}function lD(e){return e!=null&&e.clientX!=null}function nEe(e,t={}){const{enabled:n=!0,axis:r="both"}=t,i=e.useState("open"),a=e.useState("floatingElement"),o=e.useState("domReferenceElement"),s=e.context.dataRef,l=x.useRef(!1),u=x.useRef(null),[f,d]=x.useState(),[p,h]=x.useState([]),b=de(w=>{e.set("positionReference",w)}),m=de((w,S,O)=>{l.current||s.current.openEvent&&!lD(s.current.openEvent)||e.set("positionReference",tEe(O??o,{x:w,y:S,axis:r,dataRef:s,pointerType:f}))}),g=de(w=>{i?u.current||(m(w.clientX,w.clientY,w.currentTarget),h([])):m(w.clientX,w.clientY,w.currentTarget)}),y=Rs(f)?a:i;x.useEffect(()=>{if(!n){b(o);return}if(!y)return;function w(){var j;(j=u.current)==null||j.call(u),u.current=null}const S=Nt(a);function O(j){const E=$n(j);je(a,E)?w():m(j.clientX,j.clientY)}return!s.current.openEvent||lD(s.current.openEvent)?u.current=Ve(S,"mousemove",O):b(o),w},[y,n,a,s,o,e,m,b,p]),x.useEffect(()=>()=>{e.set("positionReference",null)},[e]),x.useEffect(()=>{n&&!a&&(l.current=!1)},[n,a]),x.useEffect(()=>{!n&&i&&(l.current=!0)},[n,i]);const v=x.useMemo(()=>{function w(S){d(S.pointerType)}return{onPointerDown:w,onPointerEnter:w,onMouseMove:g,onMouseEnter:g}},[g]);return x.useMemo(()=>n?{reference:v,trigger:v}:{},[n,v])}function rEe(){return!1}function iEe(e){return{escapeKey:typeof e=="boolean"?e:(e==null?void 0:e.escapeKey)??!1,outsidePress:typeof e=="boolean"?e:(e==null?void 0:e.outsidePress)??!0}}function y0(e,t={}){const{enabled:n=!0,escapeKey:r=!0,outsidePress:i=!0,outsidePressEvent:a="sloppy",referencePress:o=rEe,bubbles:s,externalTree:l}=t,u=e.useState("open"),f=e.useState("floatingElement"),{dataRef:d,events:p}=e.context,h=nl(l),b=de(typeof i=="function"?i:()=>!1),m=typeof i=="function"?b:i,g=m!==!1,y=de(()=>a),{escapeKey:v,outsidePress:w}=iEe(s),S=x.useRef(!1),O=x.useRef(!1),j=x.useRef(!1),E=x.useRef(!1),T=x.useRef(!1),A=x.useRef(""),C=x.useRef(null),_=dn(),N=dn(),D=dn(),R=de(()=>{N.clear(),d.current.insideReactTree=!1}),$=de(G=>{var X;const U=(X=d.current.floatingContext)==null?void 0:X.nodeId;return(h?Fs(h.nodesRef.current,U):[]).some(te=>{var H;return((H=te.context)==null?void 0:H.open)&&!te.context.dataRef.current[G]})}),P=de(G=>l1(G,e.select("floatingElement"))||l1(G,e.select("domReferenceElement"))),B=de(G=>{o()&&e.setOpen(!1,Re(Iu,G.nativeEvent))}),L=de(G=>{if(!u||!n||!r||G.key!=="Escape")return;const U=mje(G)?G.nativeEvent:G;if(T.current||U.isComposing||!v&&$("__escapeKeyBubbles"))return;const Y=Re(u0,U);e.setOpen(!1,Y),Y.isCanceled||G.preventDefault(),!v&&!Y.isPropagationAllowed&&G.stopPropagation()}),k=de(()=>{d.current.insideReactTree=!0,N.start(0,R)}),I=de(G=>{if(!u||!n||G.button!==0)return;const U=$n(G.nativeEvent);je(e.select("floatingElement"),U)&&(S.current||(S.current=!0,O.current=!1))}),V=de(G=>{!u||!n||(G.defaultPrevented||G.nativeEvent.defaultPrevented)&&S.current&&(O.current=!0)});x.useEffect(()=>{function G(U){U.open||(E.current=!1)}return p.on("openchange",G),()=>{p.off("openchange",G)}},[p]),x.useEffect(()=>R,[R]),x.useEffect(()=>{if(!u||!n)return u||(E.current=!1,T.current=!1,A.current="",C.current=null),R;d.current.__escapeKeyBubbles=v,d.current.__outsidePressBubbles=w;const G=new Ki,U=Qe(f);function Y(){D.clear(),T.current=!0}function X(){T.current=!0,D.start($a?5:0,()=>{T.current=!1})}function te(){j.current=!0,G.start(0,()=>{j.current=!1})}function H(){S.current=!1,O.current=!1}function ee(){const W=A.current,ie=W==="pen"||!W?"mouse":W,Oe=y(),pe=typeof Oe=="function"?Oe():Oe;return typeof pe=="string"?pe:pe[ie]}function J(W){const ie=ee();return ie==="intentional"&&W.type!=="click"||ie==="sloppy"&&W.type==="click"}function K(W){var pe;const ie=(pe=d.current.floatingContext)==null?void 0:pe.nodeId,Oe=h&&Fs(h.nodesRef.current,ie).some(he=>{var Fe;return l1(W,(Fe=he.context)==null?void 0:Fe.elements.floating)});return P(W)||Oe}function oe(W){if(J(W)){W.type!=="click"&&!P(W)&&(G.clear(),j.current=!1),R();return}if(d.current.insideReactTree){R();return}const ie=$n(W),Oe=`[${Gc("inert")}]`,pe=ot(ie)?ie.getRootNode():null,he=Array.from((hu(pe)?pe:Qe(e.select("floatingElement"))).querySelectorAll(Oe)),Fe=e.context.triggerElements;if(ie&&(Fe.hasElement(ie)||Fe.hasMatchingElement(nt=>je(nt,ie))))return;let Le=ot(ie)?ie:null;for(;Le&&!so(Le);){const nt=jo(Le);if(so(nt)||!ot(nt))break;Le=nt}if(!(he.length&&ot(ie)&&!vje(ie)&&!je(ie,e.select("floatingElement"))&&he.every(nt=>!je(Le,nt)))){if(Et(ie)&&!("touches"in W)){const nt=so(ie),Kt=ii(ie),ht=/auto|scroll/,oi=nt||ht.test(Kt.overflowX),cr=nt||ht.test(Kt.overflowY),jr=oi&&ie.clientWidth>0&&ie.scrollWidth>ie.clientWidth,fr=cr&&ie.clientHeight>0&&ie.scrollHeight>ie.clientHeight,En=Kt.direction==="rtl",Er=fr&&(En?W.offsetX<=ie.offsetWidth-ie.clientWidth:W.offsetX>ie.clientWidth),Tr=jr&&W.offsetY>ie.clientHeight;if(Er||Tr)return}if(!K(W)){if(ee()==="intentional"){if(W.detail!==0&&!Qf(W)&&!E.current)return;if(j.current){G.clear(),j.current=!1;return}}typeof m=="function"&&!m(W)||$("__outsidePressBubbles")||(e.setOpen(!1,Re(l0,W)),R())}}}function Q(W){ee()!=="sloppy"||W.pointerType==="touch"||!e.select("open")||!n||P(W)||oe(W)}function ae(W){if(ee()!=="sloppy"||!e.select("open")||!n||P(W))return;const ie=W.touches[0];ie&&(C.current={startTime:Date.now(),startX:ie.clientX,startY:ie.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},_.start(1e3,()=>{C.current&&(C.current.dismissOnTouchEnd=!1,C.current.dismissOnMouseDown=!1)}))}function ue(W,ie){const Oe=$n(W);if(!Oe)return;const pe=Ve(Oe,W.type,()=>{ie(W),pe()})}function ye(W){A.current="touch",ue(W,ae)}function Ie(W){_.clear(),W.type==="pointerdown"&&(W.button===0&&(E.current=!0),A.current=W.pointerType),!(W.type==="mousedown"&&C.current&&!C.current.dismissOnMouseDown)&&ue(W,ie=>{ie.type==="pointerdown"?Q(ie):oe(ie)})}function ce(W){if(W.type==="pointercancel"&&(E.current=!1),!S.current)return;const ie=O.current;if(H(),ee()==="intentional"){if(W.type==="pointercancel"){ie&&te();return}if(!K(W)){if(ie){te();return}typeof m=="function"&&!m(W)||(G.clear(),j.current=!0,R())}}}function Se(W){if(ee()!=="sloppy"||!C.current||P(W))return;const ie=W.touches[0];if(!ie)return;const Oe=Math.abs(ie.clientX-C.current.startX),pe=Math.abs(ie.clientY-C.current.startY),he=Math.sqrt(Oe*Oe+pe*pe);he>5&&(C.current.dismissOnTouchEnd=!0),he>10&&(oe(W),_.clear(),C.current=null)}function re(W){ue(W,Se)}function we(W){ee()!=="sloppy"||!C.current||P(W)||(C.current.dismissOnTouchEnd&&oe(W),_.clear(),C.current=null)}function $e(W){ue(W,we)}const at=ja(r&&ja(Ve(U,"keydown",L),Ve(U,"compositionstart",Y),Ve(U,"compositionend",X)),g&&ja(Ve(U,"click",Ie,!0),Ve(U,"pointerdown",Ie,!0),Ve(U,"pointerup",ce,!0),Ve(U,"pointercancel",ce,!0),Ve(U,"mousedown",Ie,!0),Ve(U,"mouseup",ce,!0),Ve(U,"touchstart",ye,{capture:!0,passive:!0}),Ve(U,"touchmove",re,{capture:!0,passive:!0}),Ve(U,"touchend",$e,{capture:!0,passive:!0})));return()=>{at(),G.clear(),H(),j.current=!1}},[d,f,r,g,m,u,n,v,w,L,R,y,$,P,h,e,_,D]);const M=x.useMemo(()=>({onKeyDown:L,onPointerDown:B,onClick:B}),[L,B]),q=x.useMemo(()=>({onKeyDown:L,onPointerDown:V,onMouseDown:V,onClickCapture:k,onMouseDownCapture(G){k(),I(G)},onPointerDownCapture(G){k(),I(G)},onMouseUpCapture:k,onTouchEndCapture:k,onTouchMoveCapture:k}),[L,k,I,V]);return x.useMemo(()=>n?{reference:M,floating:q,trigger:M}:{},[n,M,q])}function SH(e){const{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:i,nested:a,onOpenChange:o}=e,s=t.useState("open"),l=t.useState("activeTriggerElement"),u=t.useState(n?"popupElement":"positionerElement"),f=o;return t.useSyncedValue("floatingId",i),le(()=>{const d={open:s,floatingId:i,referenceElement:l,floatingElement:u};ot(l)&&(d.domReferenceElement=l),r.state.positionReference===r.state.referenceElement&&(d.positionReference=l),r.update(d)},[s,i,l,u,r]),r.context.onOpenChange=f,r.context.nested=a,r}function OH(e,t=!1,n=!1,r=!1){const[i,a]=x.useState(e&&t?"idle":void 0),[o,s]=x.useState(e&&!r);return e&&!o&&(s(!0),a("starting")),!e&&o&&i!=="ending"&&!n&&a("ending"),!e&&!o&&i==="ending"&&a(void 0),le(()=>{if(!e&&o&&i!=="ending"&&n){const l=rr.request(()=>{a("ending")});return()=>{rr.cancel(l)}}},[e,o,i,n]),le(()=>{if(!e||t||i===void 0)return;const l=rr.request(()=>{a(void 0)});return()=>{rr.cancel(l)}},[t,e,i]),le(()=>{if(!e||!t)return;e&&o&&i!=="idle"&&a("starting");const l=rr.request(()=>{a("idle")});return()=>{rr.cancel(l)}},[t,e,o,i]),{mounted:o,setMounted:s,transitionStatus:i}}function uD(e,t){return e.getAnimations(t).filter(n=>{var i;const r=(i=n.effect)==null?void 0:i.getTiming();return(r==null?void 0:r.duration)!==1/0&&(r==null?void 0:r.iterations)!==1/0})}let Dg=null;function aEe(e){if(!Dg){const t=[];Dg=t,queueMicrotask(()=>{Dg=null,Ni.flushSync(()=>{for(const n of t)n()})})}Dg.push(e)}function b0(e,t=!1,n=!1){const r=Zf();return de((i,a=null)=>{r.cancel();const o=Ha(e);if(o==null)return;const s=o,l=()=>{if(!n){Ni.flushSync(i);return}aEe(()=>{a!=null&&a.aborted||i()})};if(typeof s.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){i();return}function u(){Promise.all(uD(s).map(f=>f.finished.then(Ht))).then(()=>{a!=null&&a.aborted||l()},()=>{if(a!=null&&a.aborted)return;if(uD(s).some(d=>d.pending||d.playState!=="finished")){u();return}l()})}if(t){const f=dC;if(!s.hasAttribute(f)){r.request(u);return}const d=new MutationObserver(()=>{s.hasAttribute(f)||(d.disconnect(),u())});d.observe(s,{attributes:!0,attributeFilter:[f]}),a==null||a.addEventListener("abort",()=>d.disconnect(),{once:!0});return}r.request(u)})}function Md(e){const{enabled:t=!0,open:n,ref:r,batch:i=!1,onComplete:a}=e,o=de(a),s=b0(r,n,i);x.useEffect(()=>{if(!t)return;const l=new AbortController;return s(o,l.signal),()=>{l.abort()}},[t,n,o,s])}function jH(e){const{open:t,ref:n,preventUnmountOnClose:r,setPreventUnmountOnClose:i,onUnmount:a,animateInitialOpen:o}=e,s=de(i),{mounted:l,setMounted:u,transitionStatus:f}=OH(t,!1,!1,o),d=t?!1:r;le(()=>{t&&s(!1)},[t,s]);const p=x.useRef(l),h=x.useRef(!1),b=KU(),m=()=>{p.current=!1,u(!1),a()};le(()=>{p.current=l,h.current&&(h.current=!1,!t&&l&&m())});const g=de(()=>{if(p.current){if(t){h.current=!0,b();return}m()}});return Md({enabled:l&&!t&&!d,open:t,ref:n,onComplete(){t||g()}}),{mounted:l,transitionStatus:f,preventUnmountingOnClose:d,forceUnmount:g}}const x0={tabIndex:-1,[Jj]:""};function oEe(e){return t=>t==="touch"?e.current:!0}function EH(e,t=!1){const n=Im(),r=tl()!=null,i=fn(()=>e(n,r)).current;return SH({popupStore:i,treatPopupAsFloatingElement:t,floatingRootContext:i.state.floatingRootContext,floatingId:n,nested:r,onOpenChange:i.setOpen}),i}function $C({handle:e,store:t}){return le(()=>e.attachStore(t),[e,t]),null}function cD(e){const t=e.context.triggerElements.size;e.select("open")&&e.state.triggerCount!==t&&e.set("triggerCount",t)}function sEe(e,t){const n=x.useRef(null);return de(r=>{const i=n.current;if(i!==null){if(i.element===r&&i.store===t&&i.id===e)return;n.current=null;const a=i.store;a.context.triggerElements.getById(i.id)===i.element&&(a.context.triggerElements.delete(i.id),cD(a))}r!==null&&e!==void 0&&(n.current={store:t,id:e,element:r},t.context.triggerElements.add(e,r),cD(t))})}function DC(e,t,n,r=!1){let i=e.preventUnmountingOnClose;t?i=!1:r&&(i=!0);const a=(n==null?void 0:n.id)??null;let o=e.activeTriggerId,s=e.activeTriggerElement;return(a||t)&&(o=a,s=n??null),{open:t,preventUnmountingOnClose:i,activeTriggerId:o,activeTriggerElement:s,openedWithoutTrigger:t?n==null:e.openedWithoutTrigger}}function IC(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function lEe(e,t,n,r={}){var f,d,p;const i=n.reason,a=i===bn,o=t&&i===zc,s=!t&&(i===Iu||i===u0),l=IC(n);if((d=(f=e.context).onOpenChange)==null||d.call(f,t,n),n.isCanceled)return;(p=r.onBeforeDispatch)==null||p.call(r),e.state.floatingRootContext.dispatchOpenChange(t,n);const u=()=>{const h=DC(e.state,t,n.trigger,l()),b={...r.extraState,...h};o?b.instantType="focus":s?b.instantType="dismiss":a&&(b.instantType=void 0),e.update(b)};a?Ni.flushSync(u):u()}function TH(e,t,n,r){const i=n.useState("isMountedByTrigger",e),a=sEe(e,n),o=de(l=>{const u=n.select("open"),f=n.select("activeTriggerId");if(f===e){const d={activeTriggerElement:l,...u?r:null};n.update(d);return}if(f==null&&u&&!n.state.openedWithoutTrigger){const d={activeTriggerId:e??null,activeTriggerElement:l,...r};n.update(d)}}),s=de(l=>{a(l),l&&o(l)});return le(()=>(s(t.current),()=>s(null)),[s,t,n,e]),le(()=>{if(i){const l={activeTriggerElement:t.current,...r};n.update(l)}},[i,n,t,...Object.values(r)]),{registerTrigger:s,isMountedByThisTrigger:i}}function kC(e,t={}){const{closeOnActiveTriggerUnmount:n=!1}=t,r=x.useRef(null),i=e.useState("open"),a=e.useState("triggerCount"),o=e.useState("activeTriggerId"),s=e.useState("activeTriggerElement");le(()=>{if(!i){r.current=null,e.state.triggerCount!==0&&e.set("triggerCount",0),e.state.openedWithoutTrigger&&e.set("openedWithoutTrigger",!1);return}const l=e.context.triggerElements.size,u={};e.state.triggerCount!==l&&(u.triggerCount=l);const f=e.select("activeTriggerId");let d=null;if(f){const p=e.context.triggerElements.getById(f);if(p)r.current=f,p!==e.state.activeTriggerElement&&(u.activeTriggerElement=p);else{for(const[h,b]of e.context.triggerElements.entries())if(b===e.state.activeTriggerElement){u.activeTriggerId=h,u.activeTriggerElement=b,r.current=h;break}u.activeTriggerId===void 0&&(r.current===f?d=f:r.current=null)}}else r.current=null;if(!d&&!f&&!e.state.openedWithoutTrigger&&l===1){const p=e.context.triggerElements.entries().next();if(!p.done){const[h,b]=p.value;u.activeTriggerId=h,u.activeTriggerElement=b,r.current=h}}(u.triggerCount!==void 0||u.activeTriggerId!==void 0||u.activeTriggerElement!==void 0)&&e.update(u),d&&n&&queueMicrotask(()=>{if(e.select("open")&&e.select("activeTriggerId")===d&&!e.context.triggerElements.getById(d)){const p=Re(Ci);e.setOpen(!1,p),p.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[i,e,a,o,s,n])}function LC(e,t,n,r){const{mounted:i,transitionStatus:a,forceUnmount:o}=jH({open:e,ref:t.context.popupRef,preventUnmountOnClose:t.useState("preventUnmountingOnClose"),setPreventUnmountOnClose:s=>t.set("preventUnmountingOnClose",s),animateInitialOpen:r,onUnmount(){var s,l;t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n==null||n(),(l=(s=t.context).onOpenChangeComplete)==null||l.call(s,!1)}});return fn(()=>(t.set("mounted",i),null)),t.useSyncedValues({mounted:i,transitionStatus:a}),{forceUnmount:o,transitionStatus:a}}function BC(e,t){e.useSyncedValues(t),le(()=>()=>{e.update({activeTriggerProps:st,inactiveTriggerProps:st,popupProps:st})},[e])}function uEe(e,t){le(()=>{!t&&e.state.openMethod!==null&&e.set("openMethod",null)},[t,e]),le(()=>()=>{e.state.openMethod!==null&&e.set("openMethod",null)},[e])}class w0{constructor(){Be(this,"idMap",new Map)}add(t,n){this.idMap.set(t,n)}delete(t){this.idMap.delete(t)}hasElement(t){for(const n of this.idMap.values())if(n===t)return!0;return!1}hasMatchingElement(t){for(const n of this.idMap.values())if(t(n))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}elements(){return this.idMap.values()}get size(){return this.idMap.size}}var AH={exports:{}},CH={};/**
|
|
148
|
+
* @license React
|
|
149
|
+
* use-sync-external-store-shim.production.js
|
|
150
|
+
*
|
|
151
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
152
|
+
*
|
|
153
|
+
* This source code is licensed under the MIT license found in the
|
|
154
|
+
* LICENSE file in the root directory of this source tree.
|
|
155
|
+
*/var td=x;function cEe(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var fEe=typeof Object.is=="function"?Object.is:cEe,dEe=td.useState,pEe=td.useEffect,hEe=td.useLayoutEffect,mEe=td.useDebugValue;function gEe(e,t){var n=t(),r=dEe({inst:{value:n,getSnapshot:t}}),i=r[0].inst,a=r[1];return hEe(function(){i.value=n,i.getSnapshot=t,f1(i)&&a({inst:i})},[e,n,t]),pEe(function(){return f1(i)&&a({inst:i}),e(function(){f1(i)&&a({inst:i})})},[e]),mEe(n),n}function f1(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!fEe(e,n)}catch{return!0}}function vEe(e,t){return t()}var yEe=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?vEe:gEe;CH.useSyncExternalStore=td.useSyncExternalStore!==void 0?td.useSyncExternalStore:yEe;AH.exports=CH;var S0=AH.exports,_H={exports:{}},NH={};/**
|
|
156
|
+
* @license React
|
|
157
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
158
|
+
*
|
|
159
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
160
|
+
*
|
|
161
|
+
* This source code is licensed under the MIT license found in the
|
|
162
|
+
* LICENSE file in the root directory of this source tree.
|
|
163
|
+
*/var O0=x,bEe=S0;function xEe(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var wEe=typeof Object.is=="function"?Object.is:xEe,SEe=bEe.useSyncExternalStore,OEe=O0.useRef,jEe=O0.useEffect,EEe=O0.useMemo,TEe=O0.useDebugValue;NH.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var a=OEe(null);if(a.current===null){var o={hasValue:!1,value:null};a.current=o}else o=a.current;a=EEe(function(){function l(h){if(!u){if(u=!0,f=h,h=r(h),i!==void 0&&o.hasValue){var b=o.value;if(i(b,h))return d=b}return d=h}if(b=d,wEe(f,h))return b;var m=r(h);return i!==void 0&&i(b,m)?(f=h,b):(f=h,d=m)}var u=!1,f,d,p=n===void 0?null:n;return[function(){return l(t())},p===null?void 0:function(){return l(p())}]},[t,n,r,i]);var s=SEe(e,a[0],a[1]);return jEe(function(){o.hasValue=!0,o.value=s},[s]),TEe(s),s};_H.exports=NH;var AEe=_H.exports;const aE=[];let oE;function CEe(){return oE}function _Ee(e){aE.push(e)}function j0(e){const t=(n,r)=>{const i=fn(NEe).current;let a;try{oE=i;for(const o of aE)o.before(i);a=e(n,r);for(const o of aE)o.after(i);i.didInitialize=!0}finally{oE=void 0}return a};return t.displayName=e.displayName||e.name,t}function RH(e){return x.forwardRef(j0(e))}function NEe(){return{didInitialize:!1}}const REe=cC(19),MEe=REe?$Ee:DEe;function MH(e,t,n,r,i){return MEe(e,t,n,r,i)}function PEe(e,t,n,r,i){const a=x.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return S0.useSyncExternalStore(e.subscribe,a,a)}_Ee({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){const r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);Object.is(r.value,i)||(t=!0,r.value=i)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{const n=new Set;for(const i of e.syncHooks)n.add(i.store);const r=[];for(const i of n)r.push(i.subscribe(t));return()=>{for(const i of r)i()}}),S0.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot))}});function $Ee(e,t,n,r,i){const a=CEe();if(!a)return PEe(e,t,n,r,i);const o=a.syncIndex;a.syncIndex+=1;let s;return a.didInitialize?(s=a.syncHooks[o],(s.store!==e||s.selector!==t||!Object.is(s.a1,n)||!Object.is(s.a2,r)||!Object.is(s.a3,i))&&(s.store!==e&&(a.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=r,s.a3=i,s.value=t(e.getSnapshot(),n,r,i))):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i)},a.syncHooks.push(s)),s.value}function DEe(e,t,n,r,i){return AEe.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,a=>t(a,n,r,i))}class IEe{constructor(t){Be(this,"subscribe",t=>(this.listeners.add(t),()=>{this.listeners.delete(t)}));Be(this,"getSnapshot",()=>this.state);this.state=t,this.listeners=new Set,this.updateTick=0}static create(t){return new this(t)}setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;const n=this.updateTick;for(const r of this.listeners){if(n!==this.updateTick)return;r(t)}}update(t){for(const n in t)if(!Object.is(this.state[n],t[n])){this.setState({...this.state,...t});return}}set(t,n){Object.is(this.state[t],n)||this.setState({...this.state,[t]:n})}notifyAll(){const t={...this.state};this.setState(t)}use(t,n,r,i){return MH(this,t,n,r,i)}}class Lm extends IEe{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}useSyncedValue(t,n){x.useDebugValue(t);const r=this;le(()=>{r.state[t]!==n&&r.set(t,n)},[r,t,n])}useSyncedValueWithCleanup(t,n){const r=this;le(()=>(r.state[t]!==n&&r.set(t,n),()=>{r.set(t,void 0)}),[r,t,n])}useSyncedValues(t){const n=this,r=Object.values(t);le(()=>{n.update(t)},[n,...r])}useControlledProp(t,n){x.useDebugValue(t);const r=this,i=n!==void 0;le(()=>{i&&!Object.is(r.state[t],n)&&r.setState({...r.state,[t]:n})},[r,t,n,i])}select(t,n,r,i){const a=this.selectors[t];return a(this.state,n,r,i)}useState(t,n,r,i){return x.useDebugValue(t),MH(this,this.selectors[t],n,r,i)}useContextCallback(t,n){x.useDebugValue(t);const r=de(n??Ht);this.context[t]=r}useStateSetter(t){const n=x.useRef(void 0);return n.current===void 0&&(n.current=r=>{this.set(t,r)}),n.current}observe(t,n){let r;typeof t=="function"?r=t:r=this.selectors[t];let i=r(this.state);return n(i,i,this),this.subscribe(a=>{const o=r(a);if(!Object.is(i,o)){const s=i;i=o,n(o,s,this)}})}}const kEe={open:e=>e.open,transitionStatus:e=>e.transitionStatus,domReferenceElement:e=>e.domReferenceElement,referenceElement:e=>e.positionReference??e.referenceElement,floatingElement:e=>e.floatingElement,floatingId:e=>e.floatingId};class PH extends Lm{constructor(n){const{syncOnly:r,nested:i,onOpenChange:a,triggerElements:o,...s}=n;super({...s,positionReference:s.referenceElement,domReferenceElement:s.referenceElement},{onOpenChange:a,dataRef:{current:{}},events:vH(),nested:i,triggerElements:o},kEe);Be(this,"syncOpenEvent",(n,r)=>{(!n||!this.state.open||r!=null&&gje(r))&&(this.context.dataRef.current.openEvent=n?r:void 0)});Be(this,"dispatchOpenChange",(n,r)=>{this.syncOpenEvent(n,r.event);const i={open:n,reason:r.reason,nativeEvent:r.event,nested:this.context.nested,triggerElement:r.trigger};this.context.events.emit("openchange",i)});Be(this,"setOpen",(n,r)=>{var i,a,o,s;if(this.syncOnly){(a=(i=this.context).onOpenChange)==null||a.call(i,n,r);return}this.dispatchOpenChange(n,r),(s=(o=this.context).onOpenChange)==null||s.call(o,n,r)});this.syncOnly=r}}function zC(e,t,n=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new PH({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0}),floatingId:t,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,openedWithoutTrigger:!1,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:st,inactiveTriggerProps:st,popupProps:st}}const qp=e=>e.triggerIdProp??e.activeTriggerId,Tb=e=>e.openProp??e.open,fD=e=>{var n;return(((n=e.popupElement)==null?void 0:n.id)??e.floatingId)||void 0};function $H(e,t){return t!==void 0&&Tb(e)&&qp(e)===t}function LEe(e,t){return $H(e,t)?!0:t!==void 0&&Tb(e)&&qp(e)==null&&!e.openedWithoutTrigger&&e.triggerCount===1}const Vp={open:Tb,mounted:e=>e.mounted,transitionStatus:e=>Tb(e)&&!e.mounted?"starting":e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:qp,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:fD,isTriggerActive:(e,t)=>t!==void 0&&qp(e)===t,isOpenedByTrigger:(e,t)=>$H(e,t),isMountedByTrigger:(e,t)=>t!==void 0&&qp(e)===t&&e.mounted,triggerProps:(e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,t)=>LEe(e,t)?fD(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement};function DH(e){const t=x.useCallback(r=>e===void 0?Ht:e.subscribeStore(r),[e]),n=x.useCallback(()=>e===void 0?void 0:e.store,[e]);return S0.useSyncExternalStore(t,n,()=>e==null?void 0:e.serverStore)}function BEe(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,i=Im(),a=tl()!=null,o=fn(()=>new PH({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new w0,floatingId:i,syncOnly:!1,nested:a})).current;return le(()=>{const s={open:t,floatingId:i};r.reference!==void 0&&(s.referenceElement=r.reference,s.domReferenceElement=ot(r.reference)?r.reference:null),r.floating!==void 0&&(s.floatingElement=r.floating),o.update(s)},[t,i,r.reference,r.floating,o]),o.context.onOpenChange=n,o.context.nested=a,o}const d1=wC&&$a;function IH(e,t={}){const{enabled:n=!0,delay:r}=t,{events:i,dataRef:a}=e.context,o=x.useRef(!1),s=x.useRef(null),l=x.useRef(!0),u=dn();x.useEffect(()=>{const d=e.select("domReferenceElement");if(!n)return;const p=Nt(d);function h(){const g=e.select("domReferenceElement");!e.select("open")&&Et(g)&&g===br(Qe(g))&&(o.current=!0,s.current=g)}function b(){l.current=!0}function m(){l.current=!1}return ja(Ve(p,"blur",h),d1&&Ve(p,"keydown",b,!0),d1&&Ve(p,"pointerdown",m,!0))},[e,n]),x.useEffect(()=>{if(!n)return;function d(p){if(p.reason===Iu||p.reason===u0){const h=e.select("domReferenceElement");ot(h)&&(s.current=h,o.current=!0)}}return i.on("openchange",d),()=>{i.off("openchange",d)}},[i,n,e]);const f=x.useMemo(()=>{function d(){o.current=!1,s.current=null}return{onMouseLeave(){d()},onFocus(p){const h=p.currentTarget;if(o.current){if(s.current===h)return;d()}const b=$n(p.nativeEvent);if(ot(b)){if(d1&&!p.relatedTarget){if(!l.current&&!km(b))return}else if(!bje(b))return}const m=Sb(p.relatedTarget,e.context.triggerElements),{nativeEvent:g,currentTarget:y}=p;if(e.select("open")&&m||!r){e.setOpen(!0,Re(zc,g,y));return}u.start(r,()=>{o.current||e.setOpen(!0,Re(zc,g,y))})},onBlur(p){d();const h=p.relatedTarget,b=p.nativeEvent,m=ot(h)&&h.hasAttribute(Gc("focus-guard"))&&h.getAttribute("data-type")==="outside";u.start(0,()=>{var w;const g=e.select("domReferenceElement"),y=br(Qe(g));!h&&y===g||je((w=a.current.floatingContext)==null?void 0:w.refs.floating.current,y)||je(g,y)||m||Sb(h??y,e.context.triggerElements)||e.setOpen(!1,Re(zc,b))})}}},[a,r,e,u]);return x.useMemo(()=>n?{reference:f,trigger:f}:{},[n,f])}class FC{constructor(){Be(this,"pointerType");Be(this,"interactedInside",!1);Be(this,"handler");Be(this,"blockMouseMove",!0);Be(this,"performedPointerEventsMutation",!1);Be(this,"pointerEventsScopeElement",null);Be(this,"pointerEventsReferenceElement",null);Be(this,"pointerEventsFloatingElement",null);Be(this,"restTimeoutPending",!1);Be(this,"openChangeTimeout",new Ki);Be(this,"restTimeout",new Ki);Be(this,"handleCloseOptions");Be(this,"dispose",()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()});Be(this,"disposeEffect",()=>this.dispose)}static create(){return new FC}}const Ab=new WeakMap;function Cb(e){var n,r,i;if(!e.performedPointerEventsMutation)return;const t=e.pointerEventsScopeElement;t&&Ab.get(t)===e&&((n=e.pointerEventsScopeElement)==null||n.style.removeProperty("pointer-events"),(r=e.pointerEventsReferenceElement)==null||r.style.removeProperty("pointer-events"),(i=e.pointerEventsFloatingElement)==null||i.style.removeProperty("pointer-events"),Ab.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function kH(e,t){const{scopeElement:n,referenceElement:r,floatingElement:i}=t,a=Ab.get(n);a&&a!==e&&Cb(a),Cb(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=i,Ab.set(n,e),n.style.pointerEvents="none",r.style.pointerEvents="auto",i.style.pointerEvents="auto"}function UC(e){const t=e.context.dataRef.current,n=fn(()=>t.hoverInteractionState??FC.create()).current;return t.hoverInteractionState||(t.hoverInteractionState=n),xC(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function LH(e,t={}){const{enabled:n=!0,closeDelay:r=0,nodeId:i}=t,a=e.useState("open"),o=e.useState("floatingElement"),s=e.useState("domReferenceElement"),{dataRef:l}=e.context,u=nl(),f=tl(),d=UC(e),p=dn(),h=de(()=>{var g;return WU((g=l.current.openEvent)==null?void 0:g.type,d.interactedInside)}),b=de(()=>{var g;return wje((g=l.current.openEvent)==null?void 0:g.type)}),m=de(()=>{Cb(d)});le(()=>{a||(d.pointerType=void 0,d.restTimeoutPending=!1,d.interactedInside=!1,m())},[a,d,m]),x.useEffect(()=>m,[m]),le(()=>{var g,y,v,w,S;if(n&&a&&(g=d.handleCloseOptions)!=null&&g.blockPointerEvents&&b()&&ot(s)&&o){const O=s,j=o,E=Qe(o),T=(v=(y=u==null?void 0:u.nodesRef.current.find(N=>N.id===f))==null?void 0:y.context)==null?void 0:v.elements.floating;T&&(T.style.pointerEvents="");const A=d.pointerEventsScopeElement!==j?d.pointerEventsScopeElement:null,C=T!==j?T:null,_=((S=(w=d.handleCloseOptions)==null?void 0:w.getScope)==null?void 0:S.call(w))??A??C??Jh(O,"[data-rootownerid]")??E.body;return kH(d,{scopeElement:_,referenceElement:O,floatingElement:j}),()=>{m()}}},[n,a,s,o,d,b,u,f,m]),x.useEffect(()=>{if(!n)return;function g(){return!!(u&&f&&Fs(u.nodesRef.current,f).length>0)}function y(E){const T=gu(r,"close",d.pointerType),A=()=>{e.setOpen(!1,Re(bn,E)),u==null||u.events.emit("floating.closed",E)};T?d.openChangeTimeout.start(T,A):(d.openChangeTimeout.clear(),A())}function v(E){const T=$n(E);if(!yje(T)){d.interactedInside=!1;return}d.interactedInside=Jh(T,"[aria-haspopup]")!=null}function w(){d.openChangeTimeout.clear(),p.clear(),u==null||u.events.off("floating.closed",O),m()}function S(E){var _;if(g()&&u){u.events.on("floating.closed",O);return}if(Sb(E.relatedTarget,e.context.triggerElements))return;const T=((_=l.current.floatingContext)==null?void 0:_.nodeId)??i,A=E.relatedTarget;if(!(u&&T&&ot(A)&&Fs(u.nodesRef.current,T,!1).some(N=>{var D;return je((D=N.context)==null?void 0:D.elements.floating,A)}))){if(d.handler){d.handler(E);return}m(),b()&&!h()&&y(E)}}function O(E){!u||!f||g()||p.start(0,()=>{u.events.off("floating.closed",O),e.setOpen(!1,Re(bn,E)),u.events.emit("floating.closed",E)})}const j=o;return ja(j&&Ve(j,"mouseenter",w),j&&Ve(j,"mouseleave",S),j&&Ve(j,"pointerdown",v,!0),()=>{u==null||u.events.off("floating.closed",O)})},[n,o,e,l,r,i,b,h,m,d,u,f,p])}const zEe={current:null};function BH(e,t={}){const{enabled:n=!0,delay:r=0,handleClose:i=null,mouseOnly:a=!1,restMs:o=0,move:s=!0,triggerElementRef:l=zEe,externalTree:u,isActiveTrigger:f=!0,getHandleCloseContext:d,isClosing:p,shouldOpen:h,guardStaleOpen:b=!1}=t,{dataRef:m,events:g}=e.context,y=nl(u),v=UC(e),w=x.useRef(!1),S=qt(i),O=qt(r),j=qt(o),E=qt(n),T=qt(h),A=qt(p),C=de(()=>{var $;return WU(($=m.current.openEvent)==null?void 0:$.type,v.interactedInside)}),_=de(()=>{var $;return(($=T.current)==null?void 0:$.call(T))!==!1}),N=de(($,P,B)=>{const L=e.context.triggerElements;if(L.hasElement(P))return!$||!je($,P);if(!ot(B))return!1;const k=B;return L.hasMatchingElement(I=>je(I,k))&&(!$||!je($,k))}),D=de(()=>{if(!v.handler)return;Qe(e.select("domReferenceElement")).removeEventListener("mousemove",v.handler),v.handler=void 0}),R=de(()=>{Cb(v)});return f&&(v.handleCloseOptions=i==null?void 0:i.__options),x.useEffect(()=>D,[D]),x.useEffect(()=>{if(!n)return;function $(P){P.open?w.current=!1:(w.current=P.reason===bn,D(),v.openChangeTimeout.clear(),v.restTimeout.clear(),v.blockMouseMove=!0,v.restTimeoutPending=!1)}return g.on("openchange",$),()=>{g.off("openchange",$)}},[n,g,v,D]),x.useEffect(()=>{if(!n)return;function $(V,M=!0){const q=gu(O.current,"close",v.pointerType);q?v.openChangeTimeout.start(q,()=>{e.setOpen(!1,Re(bn,V)),y==null||y.events.emit("floating.closed",V)}):M&&(v.openChangeTimeout.clear(),e.setOpen(!1,Re(bn,V)),y==null||y.events.emit("floating.closed",V))}const P=l.current??(f?e.select("domReferenceElement"):null);if(!ot(P))return;function B(V){var ue;if(v.openChangeTimeout.clear(),v.blockMouseMove=!1,a&&!Rs(v.pointerType))return;const M=Y$(j.current),q=gu(O.current,"open",v.pointerType),G=$n(V),U=V.currentTarget??null,Y=e.select("domReferenceElement");let X=U;if(ot(G)&&!e.context.triggerElements.hasElement(G)){for(const ye of e.context.triggerElements.elements())if(je(ye,G)){X=ye;break}}ot(U)&&ot(Y)&&!e.context.triggerElements.hasElement(U)&&je(U,Y)&&(X=Y);const te=X==null?!1:N(Y,X,G),H=e.select("open"),ee=((ue=A.current)==null?void 0:ue.call(A))??e.select("transitionStatus")==="ending",J=!H&&ee&&w.current,K=!te&&ot(X)&&ot(Y)&&je(Y,X)&&J,oe=M>0&&!q,Q=te&&(H||J)||K,ae=!H||te;if(Q){_()&&e.setOpen(!0,Re(bn,V,X));return}oe||(q?v.openChangeTimeout.start(q,()=>{ae&&_()&&e.setOpen(!0,Re(bn,V,X))}):ae&&_()&&e.setOpen(!0,Re(bn,V,X)))}function L(V){if(C()){R();return}D();const M=e.select("domReferenceElement"),q=Qe(M);v.restTimeout.clear(),v.restTimeoutPending=!1;const G=m.current.floatingContext??(d==null?void 0:d());if(Sb(V.relatedTarget,e.context.triggerElements))return;if(S.current&&G){e.select("open")||v.openChangeTimeout.clear();const Y=l.current;v.handler=S.current({...G,tree:y,x:V.clientX,y:V.clientY,onClose(){R(),D(),E.current&&!C()&&Y===e.select("domReferenceElement")&&$(V,!0)}}),q.addEventListener("mousemove",v.handler),v.handler(V);return}(v.pointerType==="touch"?!je(e.select("floatingElement"),V.relatedTarget):!0)&&$(V)}function k(V){je(P,V.relatedTarget)||(v.openChangeTimeout.clear(),v.restTimeout.clear(),v.restTimeoutPending=!1)}const I=b?Ve(P,"mouseout",k):void 0;return s?ja(Ve(P,"mousemove",B,{once:!0}),Ve(P,"mouseenter",B),Ve(P,"mouseleave",L),I):ja(Ve(P,"mouseenter",B),Ve(P,"mouseleave",L),I)},[D,R,m,O,e,n,S,v,f,N,C,a,s,j,l,y,E,d,A,_,b]),x.useMemo(()=>{if(!n)return;function $(P){v.pointerType=P.pointerType}return{onPointerDown:$,onPointerEnter:$,onMouseMove(P){var G,U,Y;const{nativeEvent:B}=P,L=P.currentTarget,k=e.select("domReferenceElement"),I=e.select("open"),V=N(k,L,P.target);if(a&&!Rs(v.pointerType))return;if(I&&V&&((G=v.handleCloseOptions)!=null&&G.blockPointerEvents)){const X=e.select("floatingElement");if(X){const te=((Y=(U=v.handleCloseOptions)==null?void 0:U.getScope)==null?void 0:Y.call(U))??L.ownerDocument.body;kH(v,{scopeElement:te,referenceElement:L,floatingElement:X})}}const M=Y$(j.current);if(I&&!V||M===0||!V&&v.restTimeoutPending&&P.movementX**2+P.movementY**2<2)return;v.restTimeout.clear();function q(){if(v.restTimeoutPending=!1,C())return;const X=e.select("open");!v.blockMouseMove&&(!X||V)&&_()&&e.setOpen(!0,Re(bn,B,L))}v.pointerType==="touch"?Ni.flushSync(()=>{q()}):V&&I?q():(v.restTimeoutPending=!0,v.restTimeout.start(M,q))}}},[n,v,C,N,a,e,j,_])}function dD(e){return $a&&e.movementX===0&&e.movementY===0}function E0(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Ig(e,t){return E0(t,e===XU||e===jC,e===p0||e===h0)}function p1(e,t,n){return E0(t,e===jC,n?e===p0:e===h0)||e==="Enter"||e===" "||e===""}function FEe(e,t,n){return E0(t,n?e===p0:e===h0,e===jC)}function UEe(e,t,n,r){const i=n?e===h0:e===p0,a=e===XU;return t==="both"||t==="horizontal"&&r?e==="Escape":E0(t,i,a)}function zH(e,t){const{listRef:n,activeIndex:r,onNavigate:i=()=>{},enabled:a=!0,selectedIndex:o=null,allowEscape:s=!1,loopFocus:l=!1,nested:u=!1,rtl:f=!1,virtual:d=!1,focusItemOnOpen:p="auto",focusItemOnHover:h=!0,openOnArrowKeyDown:b=!0,disabledIndices:m=void 0,orientation:g="vertical",triggerOrientation:y=g,parentOrientation:v,id:w,resetOnPointerLeave:S=!0,externalTree:O,nestedReturnFocusRef:j,grid:E}=t,T=E!=null,A=e.useState("open"),C=e.useState("floatingElement"),_=e.useState("domReferenceElement"),N=e.context.dataRef,D=Ob(C),R=tE(_),$=qt(D),P=tl(),B=nl(O),L=x.useRef(p),k=x.useRef(o??-1),I=x.useRef(null),V=x.useRef(!0),M=de(W=>{i(k.current===-1?null:k.current,W)}),q=x.useRef(!!C),G=x.useRef(A),U=x.useRef(!1),Y=x.useRef(!1),X=x.useRef(null),te=qt(m),H=qt(A),ee=qt(o),J=qt(S),K=Zf(),oe=Zf(),Q=de(()=>{K.cancel();function W(he){d||(X.current=Tv(he,{sync:U.current,preventScroll:!0}))}const ie=n.current[k.current],Oe=Y.current;ie&&W(ie),(U.current?he=>he():he=>K.request(he))(()=>{var Le;const he=n.current[k.current]||ie;if(!he)return;ie||W(he),Se&&(Oe||!V.current)&&((Le=he.scrollIntoView)==null||Le.call(he,{block:"nearest",inline:"nearest"}))})});le(()=>{N.current.orientation=g},[N,g]),le(()=>{A||(I.current=null),(!A||p!=="auto")&&(L.current=p)},[A,p]),le(()=>{a&&(A&&C?(k.current=o??-1,L.current&&o!=null&&(Y.current=!0,M())):q.current&&(k.current=-1,M()))},[a,A,C,o,M]),le(()=>{if(a){if(!A){U.current=!1;return}if(C)if(r==null){if(U.current=!1,ee.current!=null)return;if(q.current&&(k.current=-1,Q()),(!G.current||!q.current)&&L.current&&(I.current!=null||L.current===!0&&I.current==null)){let W=0;const ie=()=>{n.current[0]==null?(W<2&&(W?pe=>oe.request(pe):queueMicrotask)(ie),W+=1):(k.current=I.current==null||p1(I.current,y,f)||u?Ev(n):rE(n),I.current=null,M())};ie()}}else Uc(n.current,r)||(k.current=r,Q(),Y.current=!1)}},[a,A,C,r,ee,u,n,y,f,M,Q,oe]),le(()=>{var he,Fe;if(!a||C||!B||d||!q.current)return;const W=B.nodesRef.current,ie=(Fe=(he=W.find(Le=>Le.id===P))==null?void 0:he.context)==null?void 0:Fe.elements.floating,Oe=br(Qe(_??ie??null)),pe=W.some(Le=>Le.context&&je(Le.context.elements.floating,Oe));ie&&!pe&&V.current&&ie.focus({preventScroll:!0})},[a,C,_,B,P,d]),le(()=>{G.current=A,q.current=!!C});const ae=r!=null,ue=de(W=>{if(!H.current)return;const ie=n.current.indexOf(W.currentTarget);ie!==-1&&(k.current!==ie||r!==ie)&&(k.current=ie,M(W))}),ye=de(()=>{var W,ie,Oe;return v??((Oe=(ie=(W=B==null?void 0:B.nodesRef.current.find(pe=>pe.id===P))==null?void 0:W.context)==null?void 0:ie.dataRef)==null?void 0:Oe.current.orientation)}),Ie=de(()=>Ev(n,te.current)),ce=de(W=>{if(V.current=!1,U.current=!0,W.which===229||!H.current&&W.currentTarget===$.current)return;if(u&&UEe(W.key,g,f,T)){Ig(W.key,ye())||ia(W),e.setOpen(!1,Re(wb,W.nativeEvent));const he=(j==null?void 0:j.current)??_;Et(he)&&he.focus();return}r!=null&&r!==k.current&&!Uc(n.current,r)&&(k.current=r);const ie=k.current,Oe=Ev(n,m),pe=rE(n,m);if(R||(W.key==="Home"&&(ia(W),k.current=Oe,M(W)),W.key==="End"&&(ia(W),k.current=pe,M(W))),E!=null){const he=E(W,k.current,n,g,l,f,m,Oe,pe);if(he!=null&&he!==k.current&&(k.current=he,M(W)),g==="both")return}if(Ig(W.key,g)){ia(W);const he=br(W.currentTarget.ownerDocument);if(A&&!d&&je(W.currentTarget,he)&&!n.current.some(nt=>nt!=null&&je(nt,he))){k.current=p1(W.key,g,f)?Oe:pe,M(W),r===k.current&&Q();return}const{index:Fe,wrapped:Le}=Ije(n.current,ie,{decrement:!p1(W.key,g,f),loopFocus:l,allowEscape:s,disabledIndices:m,minIndex:Oe,maxIndex:pe});Le&&(U.current=!1),k.current=Fe,M(W)}}),Se=x.useMemo(()=>({onFocus(ie){U.current=!0,ue(ie)},onClick({currentTarget:ie}){d||ie.focus({preventScroll:!0})},onMouseMove(ie){dD(ie)||(U.current=!0,Y.current=!1,h&&ue(ie))},onPointerLeave(ie){var pe;if(!H.current||!V.current||ie.pointerType==="touch")return;U.current=!0;const Oe=ie.relatedTarget;if(!(!h||n.current.includes(Oe))&&J.current&&((pe=X.current)==null||pe.call(X),X.current=null,k.current=-1,M(ie),!d)){const he=$.current,Fe=br(Qe(he));he&&je(he,Fe)&&he.focus({preventScroll:!0})}}}),[ue,H,$,h,n,M,J,d]),re=x.useMemo(()=>d&&A&&ae&&{"aria-activedescendant":`${w}-${r}`},[d,A,ae,w,r]),we=x.useMemo(()=>({...R?{}:re,onKeyDown(W){if(W.key==="Tab"&&W.shiftKey&&A&&!d){const ie=$n(W.nativeEvent);if(ie&&!je($.current,ie))return;ia(W);const Oe=Re(mu,W.nativeEvent);e.setOpen(!1,Oe);const pe=(j==null?void 0:j.current)??_;!Oe.isCanceled&&Et(pe)&&pe.focus();return}ce(W)},onPointerMove(W){dD(W)||(V.current=!0)}}),[re,ce,$,R,e,A,d,_,j]),$e=x.useMemo(()=>{function W(pe){e.setOpen(!0,Re(wb,pe.nativeEvent,pe.currentTarget))}function ie(pe){p==="auto"&&Qf(pe.nativeEvent)&&(L.current=!d)}function Oe(pe){L.current=p,p==="auto"&&OC(pe.nativeEvent)&&(L.current=!0)}return{onKeyDown(pe){var ht;const he=e.select("open");V.current=!1;const Fe=pe.key.startsWith("Arrow"),Le=FEe(pe.key,ye(),f),nt=Ig(pe.key,he?g:y),Kt=(u?Le:nt)||pe.key==="Enter"||pe.key.trim()==="";if(d&&he&&(!u||km(pe.currentTarget)))return ce(pe);if(!(!he&&!b&&Fe)){if(Kt){const oi=Ig(pe.key,ye());I.current=u&&oi?null:pe.key}if(u){Le&&(ia(pe),he?(k.current=Ie(),M(pe),d&&((ht=$.current)==null||ht.focus())):W(pe));return}nt&&(ee.current!=null&&(k.current=ee.current),ia(pe),!he&&b?W(pe):ce(pe),he&&M(pe))}},onFocus(pe){pe.target===pe.currentTarget&&e.select("open")&&!d&&(k.current=-1,M(pe))},onPointerDown:Oe,onPointerEnter:Oe,onMouseDown:ie,onClick:ie}},[ce,p,Ie,u,M,e,b,g,y,ye,f,ee,d,$]),at=x.useMemo(()=>({...re,...$e}),[re,$e]);return x.useMemo(()=>a?{reference:at,floating:we,item:Se,trigger:$e}:{},[a,at,we,$e,Se])}function FH(e,t){const{listRef:n,elementsRef:r,activeIndex:i,onMatch:a,disabledIndices:o,onTyping:s,enabled:l=!0,resetMs:u=750,selectedIndex:f=null}=t,d=de(s),p=e.useState("open"),h=dn(),b=x.useRef(""),m=x.useRef(f??i??-1),g=x.useRef(null),y=de(S=>{function O(R){return r==null?void 0:r.current[R]}function j(R){const $=O(R);return $&&!m0($)||$!=null&&$.matches(":disabled")?!1:o==null||!qc(Gi,R,o)}function E(R,$,P=0){if(R.length===0)return-1;const B=(P%R.length+R.length)%R.length,L=$.toLowerCase();for(let k=0;k<R.length;k+=1){const I=(B+k)%R.length,V=R[I];if(!(!(V!=null&&V.toLowerCase().startsWith(L))||!j(I)))return I}return-1}const T=n.current;if(b.current.length>0&&S.key===" "&&(ia(S),d==null||d(!0)),b.current.length>0&&b.current[0]!==" "&&E(T,b.current)===-1&&S.key!==" "&&(d==null||d(!1)),T==null||S.key.length!==1||S.ctrlKey||S.metaKey||S.altKey)return;p&&S.key!==" "&&(ia(S),d==null||d(!0));const A=b.current==="";A&&(m.current=f??i??-1),T.every((R,$)=>{var P,B;return R&&j($)?((P=R[0])==null?void 0:P.toLowerCase())!==((B=R[1])==null?void 0:B.toLowerCase()):!0})&&b.current===S.key&&(b.current="",m.current=g.current),b.current+=S.key,h.start(u,()=>{b.current="",m.current=g.current,d==null||d(!1)});const N=((A?f??i??-1:m.current)??0)+1,D=E(T,b.current,N);D!==-1?(a==null||a(D,S),g.current=D):S.key!==" "&&(b.current="",d==null||d(!1))}),v=de(S=>{const O=S.relatedTarget,j=e.select("domReferenceElement"),E=e.select("floatingElement");je(j,O)||je(E,O)||(h.clear(),b.current="",m.current=g.current,d==null||d(!1))});le(()=>{!p&&f!==null||(h.clear(),g.current=null,b.current!==""&&(b.current="",d==null||d(!1)))},[p,f,h,d]);const w=x.useMemo(()=>({onKeyDown:y,onBlur:v}),[y,v]);return x.useMemo(()=>l?{reference:w,floating:w}:{},[l,w])}const pD=.1,HEe=pD*pD,St=.5;function kg(e,t,n,r,i,a){return r>=t!=a>=t&&e<=(i-n)*(t-r)/(a-r)+n}function Lg(e,t,n,r,i,a,o,s,l,u){let f=!1;return kg(e,t,n,r,i,a)&&(f=!f),kg(e,t,i,a,o,s)&&(f=!f),kg(e,t,o,s,l,u)&&(f=!f),kg(e,t,l,u,n,r)&&(f=!f),f}function qEe(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function Bg(e,t,n,r,i,a){const o=Math.min(n,i),s=Math.max(n,i),l=Math.min(r,a),u=Math.max(r,a);return e>=o&&e<=s&&t>=l&&t<=u}function UH(e={}){const{blockPointerEvents:t=!1}=e,n=new Ki,r=({x:i,y:a,placement:o,elements:s,onClose:l,nodeId:u,tree:f})=>{const d=o==null?void 0:o.split("-")[0];let p=!1,h=null,b=null,m=typeof performance<"u"?performance.now():0;function g(v,w){const S=performance.now(),O=S-m;if(h===null||b===null||O===0)return h=v,b=w,m=S,!1;const j=v-h,E=w-b,T=j*j+E*E,A=O*O*HEe;return h=v,b=w,m=S,T<A}function y(){n.clear(),l()}return function(w){n.clear();const S=s.domReference,O=s.floating;if(!S||!O||d==null||i==null||a==null)return;const{clientX:j,clientY:E}=w,T=$n(w),A=w.type==="mouseleave",C=je(O,T),_=je(S,T);if(C&&(p=!0,!A))return;if(_&&(p=!1,!A)){p=!0;return}if(A&&ot(w.relatedTarget)&&je(O,w.relatedTarget))return;function N(){return!!(f&&Fs(f.nodesRef.current,u).length>0)}function D(){N()||y()}if(N())return;const R=S.getBoundingClientRect(),$=O.getBoundingClientRect(),P=i>$.right-$.width/2,B=a>$.bottom-$.height/2,L=$.width>R.width,k=$.height>R.height,I=(L?R:$).left,V=(L?R:$).right,M=(k?R:$).top,q=(k?R:$).bottom;if(d==="top"&&a>=R.bottom-1||d==="bottom"&&a<=R.top+1||d==="left"&&i>=R.right-1||d==="right"&&i<=R.left+1){D();return}let G=!1;switch(d){case"top":G=Bg(j,E,I,R.top+1,V,$.bottom-1);break;case"bottom":G=Bg(j,E,I,$.top+1,V,R.bottom-1);break;case"left":G=Bg(j,E,$.right-1,q,R.left+1,M);break;case"right":G=Bg(j,E,R.right-1,q,$.left+1,M);break}if(G)return;if(p&&!qEe(j,E,R)){D();return}if(!A&&g(j,E)){D();return}let U=!1;switch(d){case"top":{const Y=L?St/2:St*4,X=L||P?i+Y:i-Y,te=L?i-Y:P?i+Y:i-Y,H=a+St+1,ee=P||L?$.bottom-St:$.top,J=P?L?$.bottom-St:$.top:$.bottom-St;U=Lg(j,E,X,H,te,H,$.left,ee,$.right,J);break}case"bottom":{const Y=L?St/2:St*4,X=L||P?i+Y:i-Y,te=L?i-Y:P?i+Y:i-Y,H=a-St,ee=P||L?$.top+St:$.bottom,J=P?L?$.top+St:$.bottom:$.top+St;U=Lg(j,E,X,H,te,H,$.left,ee,$.right,J);break}case"left":{const Y=k?St/2:St*4,X=k||B?a+Y:a-Y,te=k?a-Y:B?a+Y:a-Y,H=i+St+1,ee=B||k?$.right-St:$.left,J=B?k?$.right-St:$.left:$.right-St;U=Lg(j,E,ee,$.top,J,$.bottom,H,X,H,te);break}case"right":{const Y=k?St/2:St*4,X=k||B?a+Y:a-Y,te=k?a-Y:B?a+Y:a-Y,H=i-St,ee=B||k?$.left+St:$.right,J=B?k?$.left+St:$.right:$.left+St;U=Lg(j,E,H,X,H,te,ee,$.top,J,$.bottom);break}}U?p||n.start(40,D):D()}};return r.__options={...e,blockPointerEvents:t},r}function hD(e,t,n){let{reference:r,floating:i}=e;const a=ji(t),o=AC(t),s=TC(o),l=Wr(t),u=a==="y",f=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,p=r[s]/2-i[s]/2;let h;switch(l){case"top":h={x:f,y:r.y-i.height};break;case"bottom":h={x:f,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-i.width,y:d};break;default:h={x:r.x,y:r.y}}const b=Ea(t);return b&&(h[o]+=p*(b==="end"?1:-1)*(n&&u?-1:1)),h}async function VEe(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:a,rects:o,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=zs(t,e),b=tH(h),g=s[p?d==="floating"?"reference":"floating":d],y=em(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(g)))==null||n?g:g.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:u,rootBoundary:f,strategy:l})),v=d==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,w=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),S=await(a.isElement==null?void 0:a.isElement(w))&&await(a.getScale==null?void 0:a.getScale(w))||{x:1,y:1},O=em(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:w,strategy:l}):v);return{top:(y.top-O.top+b.top)/S.y,bottom:(O.bottom-y.bottom+b.bottom)/S.y,left:(y.left-O.left+b.left)/S.x,right:(O.right-y.right+b.right)/S.x}}const GEe=50,KEe=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:VEe},l=await(o.isRTL==null?void 0:o.isRTL(t));let u=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:f,y:d}=hD(u,r,l),p=r,h=0;const b={};for(let m=0;m<a.length;m++){const g=a[m];if(!g)continue;const{name:y,fn:v}=g,{x:w,y:S,data:O,reset:j}=await v({x:f,y:d,initialPlacement:r,placement:p,strategy:i,middlewareData:b,rects:u,platform:s,elements:{reference:e,floating:t}});f=w??f,d=S??d,b[y]={...b[y],...O},j&&h<GEe&&(h++,typeof j=="object"&&(j.placement&&(p=j.placement),j.rects&&(u=j.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):j.rects),{x:f,y:d}=hD(u,p,l)),m=-1)}return{x:f,y:d,placement:p,strategy:i,middlewareData:b}},YEe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:a,rects:o,initialPlacement:s,platform:l,elements:u}=t,{mainAxis:f=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:m=!0,...g}=zs(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const y=Wr(i),v=ji(s),w=Wr(s)===s,S=await(l.isRTL==null?void 0:l.isRTL(u.floating)),O=p||(w||!m?[Eb(s)]:Nje(s)),j=b!=="none";!p&&j&&O.push(...$je(s,m,b,S));const E=[s,...O],T=await l.detectOverflow(t,g),A=[];let C=((r=a.flip)==null?void 0:r.overflows)||[];if(f&&A.push(T[y]),d){const R=_je(i,o,S);A.push(T[R[0]],T[R[1]])}if(C=[...C,{placement:i,overflows:A}],!A.every(R=>R<=0)){var _,N;const R=(((_=a.flip)==null?void 0:_.index)||0)+1,$=E[R];if($&&(!(d==="alignment"?v!==ji($):!1)||C.every(L=>ji(L.placement)===v?L.overflows[0]>0:!0)))return{data:{index:R,overflows:C},reset:{placement:$}};let P=(N=C.filter(B=>B.overflows[0]<=0).sort((B,L)=>B.overflows[1]-L.overflows[1])[0])==null?void 0:N.placement;if(!P)switch(h){case"bestFit":{var D;const B=(D=C.filter(L=>{if(j){const k=ji(L.placement);return k===v||k==="y"}return!0}).map(L=>[L.placement,L.overflows.filter(k=>k>0).reduce((k,I)=>k+I,0)]).sort((L,k)=>L[1]-k[1])[0])==null?void 0:D[0];B&&(P=B);break}case"initialPlacement":P=s;break}if(i!==P)return{reset:{placement:P}}}return{}}}},HH=new Set(["left","top"]);async function XEe(e,t){const{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Wr(n),s=Ea(n),l=ji(n)==="y",u=HH.has(o)?-1:1,f=a&&l?-1:1,d=zs(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:b}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof b=="number"&&(h=s==="end"?b*-1:b),l?{x:h*f,y:p*u}:{x:p*u,y:h*f}}const WEe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:a,placement:o,middlewareData:s}=t,l=await XEe(t,e);return o===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:a+l.y,data:{...l,placement:o}}}}},QEe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:l={fn:v=>{let{x:w,y:S}=v;return{x:w,y:S}}},...u}=zs(e,t),f={x:n,y:r},d=await a.detectOverflow(t,u),p=ji(i),h=EC(p);let b=f[h],m=f[p];const g=(v,w)=>eH(w+d[v==="y"?"top":"left"],w,w-d[v==="y"?"bottom":"right"]);o&&(b=g(h,b)),s&&(m=g(p,m));const y=l.fn({...t,[h]:b,[p]:m});return{...y,data:{x:y.x-n,y:y.y-r,enabled:{[h]:o,[p]:s}}}}}},ZEe=function(e){return e===void 0&&(e={}),{options:e,fn(t){var n,r;const{x:i,y:a,placement:o,rects:s,middlewareData:l}=t,{offset:u=0,mainAxis:f=!0,crossAxis:d=!0}=zs(e,t),p={x:i,y:a},h=ji(o),b=EC(h);let m=p[b],g=p[h];const y=zs(u,t),v=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:(n=y.mainAxis)!=null?n:0,crossAxis:(r=y.crossAxis)!=null?r:0};if(f){const O=b==="y"?"height":"width",j=s.reference[b]-s.floating[O]+v.mainAxis,E=s.reference[b]+s.reference[O]-v.mainAxis;m<j?m=j:m>E&&(m=E)}if(d){var w,S;const O=b==="y"?"width":"height",j=HH.has(Wr(o)),E=s.reference[h]-s.floating[O]+(j&&((w=l.offset)==null?void 0:w[h])||0)+(j?0:v.crossAxis),T=s.reference[h]+s.reference[O]+(j?0:((S=l.offset)==null?void 0:S[h])||0)-(j?v.crossAxis:0);g<E?g=E:g>T&&(g=T)}return{[b]:m,[h]:g}}}},JEe=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=zs(e,t),l=await i.detectOverflow(t,s),u=Wr(n),f=Ea(n),d=ji(n)==="y",{width:p,height:h}=r.floating;let b,m;u==="top"||u==="bottom"?(b=u,m=f===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(m=u,b=f==="end"?"top":"bottom");const g=h-l.top-l.bottom,y=p-l.left-l.right,v=ed(h-l[b],g),w=ed(p-l[m],y),S=t.middlewareData.shift,O=!S;let j=v,E=w;S!=null&&S.enabled.x&&(E=y),S!=null&&S.enabled.y&&(j=g),O&&!f&&(d?E=p-2*lo(l.left,l.right):j=h-2*lo(l.top,l.bottom)),await o({...t,availableWidth:E,availableHeight:j});const T=await i.getDimensions(a.floating);return p!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function qH(e){const t=ii(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Et(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=jb(n)!==a||jb(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function HC(e){return ot(e)?e:e.contextElement}function Kc(e){const t=HC(e);if(!Et(t))return uo(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:a}=qH(t);let o=(a?jb(n.width):n.width)/r,s=(a?jb(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}const eTe=uo(0);function VH(e){const t=Nt(e);return!vC()||!t.visualViewport?eTe:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function tTe(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Nt(e)}function vu(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),a=HC(e);let o=uo(1);t&&(r?ot(r)&&(o=Kc(r)):o=Kc(e));const s=tTe(a,n,r)?VH(a):uo(0);let l=(i.left+s.x)/o.x,u=(i.top+s.y)/o.y,f=i.width/o.x,d=i.height/o.y;if(a&&r){const p=Nt(a),h=ot(r)?Nt(r):r;let b=p,m=Qj(b);for(;m&&h!==b;){const g=Kc(m),y=m.getBoundingClientRect(),v=ii(m),w=y.left+(m.clientLeft+parseFloat(v.paddingLeft))*g.x,S=y.top+(m.clientTop+parseFloat(v.paddingTop))*g.y;l*=g.x,u*=g.y,f*=g.x,d*=g.y,l+=w,u+=S,b=Nt(m),m=Qj(b)}}return em({width:f,height:d,x:l,y:u})}function T0(e,t){const n=o0(e).scrollLeft;return t?t.left+n:vu(ko(e)).left+n}function GH(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-T0(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function nTe(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const a=i==="fixed",o=ko(r),s=t?a0(t.floating):!1;if(r===o||s&&a)return n;let l={scrollLeft:0,scrollTop:0},u=uo(1);const f=uo(0),d=Et(r);if((d||!a)&&((Wn(r)!=="body"||Dm(o))&&(l=o0(r)),d)){const h=vu(r);u=Kc(r),f.x=h.x+r.clientLeft,f.y=h.y+r.clientTop}const p=o&&!d&&!a?GH(o,l):uo(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+f.x+p.x,y:n.y*u.y-l.scrollTop*u.y+f.y+p.y}}function rTe(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function iTe(e){const t=o0(e),n=e.ownerDocument.body,r=lo(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=lo(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let a=-t.scrollLeft+T0(e);const o=-t.scrollTop;return ii(n).direction==="rtl"&&(a+=lo(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}const aTe=25;function oTe(e,t,n){n===void 0&&(n="viewport");const r=n==="layoutViewport",i=Nt(e),a=ko(e),o=i.visualViewport;let s=a.clientWidth,l=a.clientHeight,u=0,f=0;if(o){const p=!vC()||t==="fixed";r?p||(u=-o.offsetLeft,f=-o.offsetTop):(s=o.width,l=o.height,p&&(u=o.offsetLeft,f=o.offsetTop))}if(T0(a)<=0){const p=a.ownerDocument,h=p.body,b=getComputedStyle(h),m=p.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,g=Math.abs(a.clientWidth-h.clientWidth-m),y=getComputedStyle(a).scrollbarGutter==="stable both-edges"?g/2:g;y<=aTe&&(s-=y)}return{width:s,height:l,x:u,y:f}}function sTe(e,t){const n=vu(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Kc(e),o=e.clientWidth*a.x,s=e.clientHeight*a.y,l=i*a.x,u=r*a.y;return{width:o,height:s,x:l,y:u}}function mD(e,t,n){let r;if(t==="viewport"||t==="layoutViewport")r=oTe(e,n,t);else if(t==="document")r=iTe(ko(e));else if(ot(t))r=sTe(t,n);else{const i=VH(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return em(r)}function lTe(e,t){const n=t.get(e);if(n)return n;let r=Qh(e,[],!1).filter(s=>ot(s)&&Wn(s)!=="body"),i=null;const a=ii(e).position==="fixed";let o=a?jo(e):e;for(;ot(o)&&!so(o);){const s=ii(o),l=gC(o),u=i?i.position:a?"fixed":"";!l&&(u==="fixed"||u==="absolute"&&s.position==="static")?r=r.filter(d=>d!==o):i=s,o=jo(o)}return t.set(e,r),r}function uTe(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?a0(t)?[]:lTe(t,this._c):[].concat(n),r],s=mD(t,o[0],i);let l=s.top,u=s.right,f=s.bottom,d=s.left;for(let p=1;p<o.length;p++){const h=mD(t,o[p],i);l=lo(h.top,l),u=ed(h.right,u),f=ed(h.bottom,f),d=lo(h.left,d)}return{width:u-d,height:f-l,x:d,y:l}}function cTe(e){const{width:t,height:n}=qH(e);return{width:t,height:n}}function fTe(e,t,n){const r=Et(t),i=ko(t),a=n==="fixed",o=vu(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const l=uo(0);if((r||!a)&&((Wn(t)!=="body"||Dm(i))&&(s=o0(t)),r)){const p=vu(t,!0,a,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}!r&&i&&(l.x=T0(i));const u=i&&!r&&!a?GH(i,s):uo(0),f=o.left+s.scrollLeft-l.x-u.x,d=o.top+s.scrollTop-l.y-u.y;return{x:f,y:d,width:o.width,height:o.height}}function h1(e){return ii(e).position==="static"}function gD(e,t){if(!Et(e)||ii(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ko(e)===n&&(n=n.ownerDocument.body),n}function KH(e,t){const n=Nt(e);if(a0(e))return n;if(!Et(e)){let i=jo(e);for(;i&&!so(i);){if(ot(i)&&!h1(i))return i;i=jo(i)}return n}let r=gD(e,t);for(;r&&YOe(r)&&h1(r);)r=gD(r,t);return r&&so(r)&&h1(r)&&!gC(r)?n:r||QOe(e)||n}const dTe=async function(e){const t=this.getOffsetParent||KH,n=this.getDimensions,r=await n(e.floating);return{reference:fTe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function pTe(e){return ii(e).direction==="rtl"}const YH={convertOffsetParentRelativeRectToViewportRelativeRect:nTe,getDocumentElement:ko,getClippingRect:uTe,getOffsetParent:KH,getElementRects:dTe,getClientRects:rTe,getDimensions:cTe,getScale:Kc,isElement:ot,isRTL:pTe};function XH(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function hTe(e,t,n){let r=null,i;const a=ko(e);function o(){var f;clearTimeout(i),(f=r)==null||f.disconnect(),r=null}function s(f,d){f===void 0&&(f=!1),d===void 0&&(d=1),o();const p=e.getBoundingClientRect(),{left:h,top:b,width:m,height:g}=p;if(f||t(),!m||!g)return;const y=Mg(b),v=Mg(a.clientWidth-(h+m)),w=Mg(a.clientHeight-(b+g)),S=Mg(h),j={rootMargin:-y+"px "+-v+"px "+-w+"px "+-S+"px",threshold:lo(0,ed(1,d))||1};let E=!0;function T(A){const C=A[0].intersectionRatio;if(!XH(p,e.getBoundingClientRect()))return s();if(C!==d){if(!E)return s();C?s(!1,C):i=setTimeout(()=>{s(!1,1e-7)},1e3)}E=!1}try{r=new IntersectionObserver(T,{...j,root:a.ownerDocument})}catch{r=new IntersectionObserver(T,j)}r.observe(e)}const l=Nt(e),u=()=>s(n);return l.addEventListener("resize",u),s(!0),()=>{l.removeEventListener("resize",u),o()}}function vD(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=HC(e),f=i||a?[...u?Qh(u):[],...t?Qh(t):[]]:[];f.forEach(y=>{i&&y.addEventListener("scroll",n),a&&y.addEventListener("resize",n)});const d=u&&s?hTe(u,n,a):null;let p=-1,h=null;o&&(h=new ResizeObserver(y=>{let[v]=y;v&&v.target===u&&h&&t&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var w;(w=h)==null||w.observe(t)})),n()}),u&&!l&&h.observe(u),t&&h.observe(t));let b,m=l?vu(e):null;l&&g();function g(){const y=vu(e);m&&!XH(m,y)&&n(),m=y,b=requestAnimationFrame(g)}return n(),()=>{var y;f.forEach(v=>{i&&v.removeEventListener("scroll",n),a&&v.removeEventListener("resize",n)}),d==null||d(),(y=h)==null||y.disconnect(),h=null,l&&cancelAnimationFrame(b)}}const mTe=WEe,gTe=QEe,vTe=YEe,yTe=JEe,bTe=ZEe,xTe=(e,t,n)=>{const r=new Map,i=n??{},a={...YH,...i.platform,_c:r};return KEe(e,t,{...i,platform:a})};var wTe=typeof document<"u",STe=function(){},Av=wTe?x.useLayoutEffect:STe;function _b(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!_b(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const a=i[r];if(!(a==="_owner"&&e.$$typeof)&&!_b(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function WH(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function yD(e,t){const n=WH(e);return Math.round(t*n)/n}function m1(e){const t=x.useRef(e);return Av(()=>{t.current=e}),t}function OTe(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:l,open:u}=e,[f,d]=x.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=x.useState(r);_b(p,r)||h(r);const[b,m]=x.useState(null),[g,y]=x.useState(null),v=x.useCallback(L=>{L!==j.current&&(j.current=L,m(L))},[]),w=x.useCallback(L=>{L!==E.current&&(E.current=L,y(L))},[]),S=a||b,O=o||g,j=x.useRef(null),E=x.useRef(null),T=x.useRef(f),A=l!=null,C=m1(l),_=m1(i),N=m1(u),D=x.useCallback(()=>{if(!j.current||!E.current)return;const L={placement:t,strategy:n,middleware:p};_.current&&(L.platform=_.current),xTe(j.current,E.current,L).then(k=>{const I={...k,isPositioned:N.current!==!1};R.current&&!_b(T.current,I)&&(T.current=I,Ni.flushSync(()=>{d(I)}))})},[p,t,n,_,N]);Av(()=>{u===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(L=>({...L,isPositioned:!1})))},[u]);const R=x.useRef(!1);Av(()=>(R.current=!0,()=>{R.current=!1}),[]),Av(()=>{if(S&&(j.current=S),O&&(E.current=O),S&&O){if(C.current)return C.current(S,O,D);D()}},[S,O,D,C,A]);const $=x.useMemo(()=>({reference:j,floating:E,setReference:v,setFloating:w}),[v,w]),P=x.useMemo(()=>({reference:S,floating:O}),[S,O]),B=x.useMemo(()=>{const L={position:n,left:0,top:0};if(!P.floating)return L;const k=yD(P.floating,f.x),I=yD(P.floating,f.y);return s?{...L,transform:"translate("+k+"px, "+I+"px)",...WH(P.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:k,top:I}},[n,s,P.floating,f.x,f.y]);return x.useMemo(()=>({...f,update:D,refs:$,elements:P,floatingStyles:B}),[f,D,$,P,B])}const jTe=(e,t)=>{const n=mTe(e);return{name:n.name,fn:n.fn,options:[e,t]}},ETe=(e,t)=>{const n=gTe(e);return{name:n.name,fn:n.fn,options:[e,t]}},TTe=(e,t)=>({fn:bTe(e).fn,options:[e,t]}),ATe=(e,t)=>{const n=vTe(e);return{name:n.name,fn:n.fn,options:[e,t]}},CTe=(e,t)=>{const n=yTe(e);return{name:n.name,fn:n.fn,options:[e,t]}},QH=x.createContext(void 0);function _Te(){const e=x.useContext(QH);if(e===void 0)throw new Error(Wt(26));return e}const sE="ArrowUp",lE="ArrowDown",uE="ArrowLeft",cE="ArrowRight",fE="Home",dE="End",A0=new Set([sE,lE,uE,cE,fE,dE]),NTe="Shift",RTe=[NTe,"Control","Alt","Meta"];function MTe(e){return Et(e)&&e.tagName==="INPUT"}function bD(e){return!!(MTe(e)&&e.selectionStart!=null||Et(e)&&e.tagName==="TEXTAREA")}function xD(e,t,n,r){if(!e||!t||!t.scrollTo)return;let i=e.scrollLeft,a=e.scrollTop;const o=e.clientWidth<e.scrollWidth,s=e.clientHeight<e.scrollHeight;if(o&&r!=="vertical"){const l=wD(e,t,"left"),u=zg(e),f=zg(t);n==="ltr"&&(l+t.offsetWidth+f.scrollMarginRight>e.scrollLeft+e.clientWidth-u.scrollPaddingRight?i=l+t.offsetWidth+f.scrollMarginRight-e.clientWidth+u.scrollPaddingRight:l-f.scrollMarginLeft<e.scrollLeft+u.scrollPaddingLeft&&(i=l-f.scrollMarginLeft-u.scrollPaddingLeft)),n==="rtl"&&(l-f.scrollMarginLeft<e.scrollLeft+u.scrollPaddingLeft?i=l-f.scrollMarginLeft-u.scrollPaddingLeft:l+t.offsetWidth+f.scrollMarginRight>e.scrollLeft+e.clientWidth-u.scrollPaddingRight&&(i=l+t.offsetWidth+f.scrollMarginRight-e.clientWidth+u.scrollPaddingRight))}if(s&&r!=="horizontal"){const l=wD(e,t,"top"),u=zg(e),f=zg(t);l-f.scrollMarginTop<e.scrollTop+u.scrollPaddingTop?a=l-f.scrollMarginTop-u.scrollPaddingTop:l+t.offsetHeight+f.scrollMarginBottom>e.scrollTop+e.clientHeight-u.scrollPaddingBottom&&(a=l+t.offsetHeight+f.scrollMarginBottom-e.clientHeight+u.scrollPaddingBottom)}e.scrollTo({left:i,top:a,behavior:"auto"})}function wD(e,t,n){const r=n==="left"?"offsetLeft":"offsetTop";let i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);)t=t.offsetParent;return i}function zg(e){const t=getComputedStyle(e);return{scrollMarginTop:parseFloat(t.scrollMarginTop)||0,scrollMarginRight:parseFloat(t.scrollMarginRight)||0,scrollMarginBottom:parseFloat(t.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(t.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(t.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(t.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(t.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(t.scrollPaddingLeft)||0}}const PTe="--nested-dialogs",$Te="data-nested-dialog-open",DTe={...$m,...Pm,nestedDialogOpen(e){return e?{[$Te]:""}:null}},qC=x.forwardRef(function(t,n){const{render:r,className:i,style:a,finalFocus:o,initialFocus:s,...l}=t,u=Du(),f=u.useState("descriptionElementId"),d=u.useState("disablePointerDismissal"),p=u.useState("floatingRootContext"),h=u.useState("popupProps"),b=u.useState("modal"),m=u.useState("mounted"),g=u.useState("nested"),y=u.useState("nestedOpenDialogCount"),v=u.useState("open"),w=u.useState("openMethod"),S=u.useState("titleElementId"),O=u.useState("transitionStatus"),j=u.useState("role"),E=p.useState("floatingId");_Te(),Md({open:v,ref:u.context.popupRef,onComplete(){var D,R;v&&((R=(D=u.context).onOpenChangeComplete)==null||R.call(D,!0))}});const T=s===void 0?oEe(u.context.popupRef):s,A=y>0,C=u.useStateSetter("popupElement"),N=it("div",t,{state:{open:v,nested:g,transitionStatus:O,nestedDialogOpen:A},props:[h,{id:E,"aria-labelledby":S,"aria-describedby":f,role:j,...x0,hidden:!m,onKeyDown(D){A0.has(D.key)&&D.stopPropagation()},style:{[PTe]:y}},l],ref:[n,u.context.popupRef,C],stateAttributesMapping:DTe});return c.jsx(PC,{context:p,openInteractionType:w,disabled:!m,closeOnFocusOut:!d,initialFocus:T,returnFocus:o,modal:b!==!1,restoreFocus:"popup",children:N})});function VC(e){return cC(19)?e:e?"true":void 0}const GC=x.forwardRef(function(t,n){const{cutout:r,...i}=t;let a;if(r){const o=r.getBoundingClientRect();a=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${o.left}px ${o.top}px,${o.left}px ${o.bottom}px,${o.right}px ${o.bottom}px,${o.right}px ${o.top}px,${o.left}px ${o.top}px)`}return c.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...i,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:a}})}),KC=x.forwardRef(function(t,n){const{keepMounted:r=!1,...i}=t,a=Du(),o=a.useState("mounted"),s=a.useState("modal"),l=a.useState("open");return o||r?c.jsx(QH.Provider,{value:r,children:c.jsxs(NC,{ref:n,...i,children:[o&&s===!0&&c.jsx(GC,{ref:a.context.internalBackdropRef,inert:VC(!l)}),t.children]})}):null});let SD={},OD={},jD="";function C0(e,t){return Dm(e)?e:t}function ED(e,t,n){return/hidden|clip/.test(e.getComputedStyle(C0(t,n)).overflowY)}function ITe(e){if(typeof document>"u")return!1;const t=Qe(e);return Nt(t).innerWidth-t.documentElement.clientWidth>0}function kTe(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const n=Qe(e),r=n.documentElement,i=n.body,a=C0(r,i),o=a.style.overflowY,s=r.style.scrollbarGutter;r.style.scrollbarGutter="stable",a.style.overflowY="scroll";const l=a.offsetWidth;a.style.overflowY="hidden";const u=a.offsetWidth;return a.style.overflowY=o,r.style.scrollbarGutter=s,l===u}function LTe(e){const t=Qe(e),n=t.documentElement,r=t.body,i=C0(n,r),a={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(i.style,a)}}function BTe(e){var h;const t=Qe(e),n=t.documentElement,r=t.body,i=Nt(n);let a=0,o=0,s=!1;const l=rr.create();if($a&&(((h=i.visualViewport)==null?void 0:h.scale)??1)!==1)return()=>{};function u(){const b=i.getComputedStyle(n),m=i.getComputedStyle(r),v=(b.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";a=n.scrollTop,o=n.scrollLeft,SD={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},jD=n.style.scrollBehavior,OD={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};const w=n.scrollHeight>n.clientHeight,S=n.scrollWidth>n.clientWidth,O=b.overflowY==="scroll"||m.overflowY==="scroll",j=b.overflowX==="scroll"||m.overflowX==="scroll",E=Math.max(0,i.innerWidth-r.clientWidth),T=Math.max(0,i.innerHeight-r.clientHeight),A=parseFloat(m.marginTop)+parseFloat(m.marginBottom),C=parseFloat(m.marginLeft)+parseFloat(m.marginRight),_=C0(n,r);if(s=kTe(e),s){n.style.scrollbarGutter=v,_.style.overflowY="hidden",_.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:v,overflowY:"hidden",overflowX:"hidden"}),(w||O)&&(n.style.overflowY="scroll"),(S||j)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:A||T?`calc(100dvh - ${A+T}px)`:"100dvh",width:C||E?`calc(100vw - ${C+E}px)`:"100vw",boxSizing:"border-box",overflowY:"hidden",overflowX:"hidden",scrollBehavior:"unset"}),r.scrollTop=a,r.scrollLeft=o,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function f(){Object.assign(n.style,SD),Object.assign(r.style,OD),s||(n.scrollTop=a,n.scrollLeft=o,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=jD)}function d(){f(),l.request(u)}u();const p=Ve(i,"resize",d);return()=>{l.cancel(),f(),typeof i.removeEventListener=="function"&&p()}}class zTe{constructor(){Be(this,"lockCount",0);Be(this,"restore",null);Be(this,"timeoutLock",Ki.create());Be(this,"timeoutUnlock",Ki.create());Be(this,"release",()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)});Be(this,"unlock",()=>{var t;this.lockCount===0&&this.restore&&((t=this.restore)==null||t.call(this),this.restore=null)})}acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}lock(t){if(this.lockCount===0||this.restore!==null)return;const n=Qe(t),r=n.documentElement,i=n.body,a=Nt(r);if(ED(a,r,i)){const s=new a.MutationObserver(()=>{ED(a,r,i)||(s.disconnect(),this.restore=null,this.lock(t))}),l={attributes:!0};s.observe(r,l),s.observe(i,l),this.restore=()=>s.disconnect();return}const o=d0||!ITe(t);this.restore=o?LTe(t):BTe(t)}}const FTe=new zTe;function ZH(e=!0,t=null){le(()=>{if(e)return FTe.acquire(t)},[e,t])}function UTe({store:e,parentContext:t,isDrawer:n}){const r=e.useState("open"),i=e.useState("mounted"),a=e.useState("disablePointerDismissal"),o=e.useState("modal"),s=e.useState("popupElement"),l=e.useState("floatingRootContext"),[u,f]=x.useState(0),[d,p]=x.useState(0),h=u===0,b=y0(l,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?"intentional":{mouse:o==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(m){if(!e.context.outsidePressEnabledRef.current||"button"in m&&m.button!==0)return!1;if("touches"in m){if(m.type==="touchend"){if(m.changedTouches.length!==1||m.touches.length!==0)return!1}else if(m.touches.length!==1)return!1}const g=$n(m);if(h&&!a){if(o){const y=e.context.internalBackdropRef.current,v=e.context.backdropRef.current;return y||v?y===g||v===g||je(g,s)&&!(g!=null&&g.hasAttribute("data-base-ui-portal")):!0}return!0}return!1},escapeKey:h});return ZH(r&&o===!0,s),e.useContextCallback("onNestedDialogOpen",(m,g)=>{!e.select("open")&&!e.select("mounted")||(f(m),p(g))}),le(()=>{!r&&!i&&(f(0),p(0))},[r,i]),le(()=>(t!=null&&t.onNestedDialogOpen&&r&&t.onNestedDialogOpen(u+1,d+(n?1:0)),()=>{t!=null&&t.onNestedDialogOpen&&r&&t.onNestedDialogOpen(0,0)}),[n,r,u,d,t]),BC(e,{activeTriggerProps:b.reference,inactiveTriggerProps:b.trigger,popupProps:b.floating,nestedOpenDialogCount:u,nestedOpenDrawerCount:d}),null}const HTe={...Vp,modal:e=>e.modal,nested:e=>e.nested,nestedOpenDialogCount:e=>e.nestedOpenDialogCount,nestedOpenDrawerCount:e=>e.nestedOpenDrawerCount,disablePointerDismissal:e=>e.disablePointerDismissal,openMethod:e=>e.openMethod,descriptionElementId:e=>e.descriptionElementId,titleElementId:e=>e.titleElementId,viewportElement:e=>e.viewportElement,role:e=>e.role};class qTe extends Lm{constructor(n,r,i){const a=new w0,o=VTe(n,a,r,i);super(o,GTe(a),HTe);Be(this,"setOpen",(n,r)=>{var i,a;r.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!n&&r.trigger==null&&this.state.activeTriggerId!=null&&(r.trigger=this.state.activeTriggerElement??void 0),(a=(i=this.context).onOpenChange)==null||a.call(i,n,r),!r.isCanceled&&(this.state.floatingRootContext.dispatchOpenChange(n,r),this.update(DC(this.state,n,r.trigger)))})}}function VTe(e,t,n,r=!1){return{...zC(t,n,r),modal:!0,disablePointerDismissal:!1,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:"dialog",...e}}function GTe(e){return{popupRef:x.createRef(),backdropRef:x.createRef(),internalBackdropRef:x.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:e,onOpenChange:void 0,onOpenChangeComplete:void 0}}function KTe(e,t){const{children:n,open:r,defaultOpen:i=!1,onOpenChange:a,onOpenChangeComplete:o,disablePointerDismissal:s=!1,modal:l=!0,actionsRef:u,handle:f,triggerId:d,defaultTriggerId:p=null}=t,h=e==="drawer",b=l,m=s,g="dialog",y=Du(!0),v=y!=null,w={modal:b,disablePointerDismissal:m,nested:v,role:g},S=EH((C,_)=>new qTe({open:i,openProp:r,activeTriggerId:p,triggerIdProp:d,...w},C,_),!0);S.useControlledProp("openProp",r),S.useControlledProp("triggerIdProp",d),S.useSyncedValues(w),S.useContextCallback("onOpenChange",a),S.useContextCallback("onOpenChangeComplete",o);const O=S.useState("open"),j=S.useState("mounted"),E=S.useState("payload");uEe(S,O),kC(S);const{forceUnmount:T}=LC(O,S);x.useImperativeHandle(u,()=>({unmount:T,close:()=>S.setOpen(!1,Re(c0))}),[T,S]);const A=O||j||f!=null;return c.jsxs(_U.Provider,{value:S,children:[f&&c.jsx($C,{handle:f,store:S}),A&&c.jsx(UTe,{store:S,parentContext:y==null?void 0:y.context,isDrawer:h}),typeof n=="function"?n({payload:E}):n]})}const YC=j0(function(t){return KTe("dialog",t)}),XC=x.forwardRef(function(t,n){const{render:r,className:i,style:a,id:o,...s}=t,l=Du(),u=_i(o);return l.useSyncedValueWithCleanup("titleElementId",u),it("h2",t,{ref:n,props:[{id:u},s]})});function YTe(e){const t=x.useRef(""),n=x.useCallback(i=>{i.defaultPrevented||(t.current=i.pointerType,e(i,i.pointerType))},[e]);return{onClick:x.useCallback(i=>{if(i.detail===0){e(i,"keyboard");return}"pointerType"in i?e(i,i.pointerType):e(i,t.current),t.current=""},[e]),onPointerDown:n}}function JH(e,t){const n=x.useRef(e),r=de(t);le(()=>{n.current!==e&&r(n.current),n.current=e},[e,r])}function XTe(e,t){const n=de((a,o)=>{(typeof e=="function"?e():e)||t(o||(d0?"touch":""))}),{onClick:r,onPointerDown:i}=YTe(n);return x.useMemo(()=>({onClick:r,onPointerDown:i}),[r,i])}function e6(e){const[t,n]=x.useState(null),r=XTe(e,n);return JH(e,i=>{i&&!e&&n(null)}),x.useMemo(()=>({openMethod:t,triggerProps:r}),[t,r])}const t6=YC,WTe=x.forwardRef(function({className:t,...n},r){return c.jsx(hC,{ref:r,className:Gt("fixed inset-0 z-40 bg-black/60 backdrop-blur-[2px]",t),...n})}),n6=x.forwardRef(function({className:t,placement:n="center",children:r,...i},a){const o=n==="right"?"inset-y-0 right-0 w-full max-w-xl border-l":n==="top"?"left-1/2 top-[12vh] w-[min(36rem,92vw)] -translate-x-1/2 rounded-lg border":"left-1/2 top-1/2 w-[min(36rem,92vw)] -translate-x-1/2 -translate-y-1/2 rounded-lg border";return c.jsxs(KC,{children:[c.jsx(WTe,{}),c.jsx(qC,{ref:a,className:Gt("fixed z-50 border-line bg-panel-2 text-foreground shadow-2xl focus:outline-none font-mono",o,t),...i,children:r})]})}),r6=x.forwardRef(function({className:t,...n},r){return c.jsx(XC,{ref:r,className:Gt("text-sm font-semibold text-foreground",t),...n})}),QTe=x.forwardRef(function({className:t,...n},r){return c.jsx(bC,{ref:r,className:Gt("text-xs text-muted-foreground",t),...n})}),nd=x.forwardRef(function({className:t,...n},r){return c.jsx("input",{ref:r,className:Gt("rounded border border-input bg-panel px-2 py-1 text-xs text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",t),...n})});function ZTe(e){const t=x.useRef(!0);t.current&&(t.current=!1,e())}function JTe(e){const[t,n]=x.useState({current:e,previous:null});return Object.is(e,t.current)||n({current:e,previous:t.current}),t.previous}function i6(e){return e==null||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"}function Nb({controlled:e,default:t,name:n,state:r="value"}){const{current:i}=x.useRef(e!==void 0),[a,o]=x.useState(()=>t),s=i&&e!==void 0?e:a,l=x.useCallback(u=>{i||o(u)},[]);return[s,l]}const a6=x.createContext(void 0),o6=x.createContext(void 0);function rl(){const e=x.useContext(a6);if(e===void 0)throw new Error(Wt(60));return e}function s6(){const e=x.useContext(o6);if(e===void 0)throw new Error(Wt(61));return e}const eAe="data-valid",tAe="data-invalid",nAe={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},rAe={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},iAe={disabled:!1,...rAe},aAe={valid(e){return e===null?null:e?{[eAe]:""}:{[tAe]:""}}},oAe={invalid:void 0,name:void 0,validityData:{state:nAe,errors:[],error:"",value:"",initialValue:null},setValidityData:Ht,disabled:void 0,setTouched:Ht,setDirty:Ht,setFilled:Ht,setFocused:Ht,focusOwnerRef:{current:void 0},validationMode:"onSubmit",shouldValidateOnChange:()=>!1,state:iAe,registerFieldControl:Ht,validation:{getValidationProps:(e,t=st)=>t,inputRef:{current:null},registeredInputs:new Map,registerInput:Ht,getInputControl:()=>null,commit:async()=>{},change:Ht}},sAe=x.createContext(oAe);function _0(e=!0){const t=x.useContext(sAe);if(t.setValidityData===Ht&&!e)throw new Error(Wt(28));return t}function lAe(e,t,n,r,i=!0,a){const{registerFieldControl:o}=_0(),s=fn(()=>Symbol());le(()=>{const l=s.current;if(!i){o(l,void 0);return}o(l,{controlRef:e,getValue:r,id:t,name:a,value:n})},[e,i,r,t,a,o,s,n]),le(()=>{const l=s.current;return()=>{o(l,void 0)}},[o,s])}const uAe=x.createContext({controlId:void 0,registerControlId:Ht,resetControlId:Ht,labelId:void 0,setLabelId:Ht,messageIds:[],setMessageIds:Ht,getDescriptionProps:e=>e});function l6(){return x.useContext(uAe)}function u6(e={}){const{id:t,enabled:n=!0}=e,{controlId:r,registerControlId:i,resetControlId:a}=l6(),o=_i(),s=fn(()=>Symbol()),l=x.useRef(!1),u=x.useRef(!1),f=de(()=>{!l.current||i===Ht||(l.current=!1,i(s.current,void 0))});return le(()=>{if(!n||i===Ht){f();return}let d;if(t!==void 0)u.current=!0,d=t;else if(u.current)d=o;else{a();return}if(d===void 0){f();return}l.current=!0,i(s.current,d)},[t,n,i,a,o,s,f]),le(()=>f,[f]),(n?r:void 0)??t??o}function cAe(e,t,n=Object.is){const{length:r}=e;if(r!==t.length)return!1;for(let i=0;i<r;i+=1)if(!n(e[i],t[i]))return!1;return!0}const c6=(e,t)=>Object.is(e,t);function yu(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function fAe(e,t,n){return Array.isArray(e)&&Array.isArray(t)?!cAe(e,t,(r,i)=>yu(r,i,n)):e!==t}function pE(e,t,n){return e?e.some(r=>r===void 0?!1:yu(t,r,n)):!1}function Cv(e,t,n){return e?e.findIndex(r=>r===void 0?!1:yu(r,t,n)):-1}function dAe(e,t){if(t!==c6)return r=>pE(e,r,t);const n=new Set(e);return n.delete(void 0),r=>n.has(r)&&(r!==0||e.some(i=>Object.is(r,i)))}function f6(e,t,n,r){const i=r&&Array.isArray(t)?e.findIndex(dAe(t,n)):Cv(e,t,n);return i===-1?null:i}function pAe(e,t,n,r,i,a){return pE(r,t,i)?a!=null&&e>a&&pE(r,n[a],i)?a:e:e===a?f6(n,r,i,!0):a}function hAe(e,t,n){return e.filter(r=>!yu(t,r,n))}function hE(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function mAe(e){return typeof e=="object"&&e!=null&&Array.isArray(e.items)}function d6(e){return mAe(e==null?void 0:e[0])}function gAe(e){return d6(e)?e.flatMap(t=>t.items):e}function vAe(e){if(!Array.isArray(e))return e!=null&&"null"in e;const t=e;if(d6(t)){for(const n of t)for(const r of n.items)if(r&&r.value==null&&r.label!=null)return!0;return!1}for(const n of t)if(n&&n.value==null&&n.label!=null)return!0;return!1}function p6(e,t){if(t&&e!=null)return t(e)??"";if(e&&typeof e=="object"){if("label"in e&&e.label!=null)return String(e.label);if("value"in e)return String(e.value)}return hE(e)}function rc(e,t){return t&&e!=null?t(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?hE(e.value):hE(e)}function h6(e,t,n){function r(){return p6(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e=="object"&&"label"in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return(Object.hasOwn(t,e)?t[e]:void 0)??r();if(Array.isArray(t)){const a=gAe(t);if(e==null||typeof e!="object"){const o=a.find(s=>s.value===e);return o&&o.label!=null?o.label:r()}if("value"in e){const o=a.find(s=>s&&s.value===e.value);if(o&&o.label!=null)return o.label}}return r()}function yAe(e,t,n){return e.reduce((r,i,a)=>(a>0&&r.push(", "),r.push(c.jsx(x.Fragment,{children:h6(i,t,n)},a)),r),[])}const bAe={id:e=>e.id,labelId:e=>e.labelId,modal:e=>e.modal,multiple:e=>e.multiple,disabled:e=>e.disabled,readOnly:e=>e.readOnly,required:e=>e.required,highlightItemOnHover:e=>e.highlightItemOnHover,items:e=>e.items,itemToStringLabel:e=>e.itemToStringLabel,isItemEqualToValue:e=>e.isItemEqualToValue,value:e=>e.value,hasSelectedValue:e=>{const{value:t,multiple:n,itemToStringValue:r}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:rc(t,r)!==""},hasNullItemLabel:(e,t)=>t?vAe(e.items):!1,open:e=>e.open,mounted:e=>e.mounted,forceMount:e=>e.forceMount,transitionStatus:e=>e.transitionStatus,openMethod:e=>e.openMethod,activeIndex:e=>e.activeIndex,selectedIndex:e=>e.selectedIndex,isActive:(e,t)=>e.activeIndex===t,isSelected:(e,t)=>{const n=e.isItemEqualToValue,r=e.value;return e.multiple?Array.isArray(r)&&r.some(i=>yu(t,i,n)):yu(t,r,n)},isSelectedByFocus:(e,t)=>e.selectedIndex===t,popupProps:e=>e.popupProps,triggerProps:e=>e.triggerProps,itemRoot:e=>e.itemRoot,triggerElement:e=>e.triggerElement,positionerElement:e=>e.positionerElement,listElement:e=>e.listElement,popupSide:e=>e.popupSide,scrollUpArrowVisible:e=>e.scrollUpArrowVisible,scrollDownArrowVisible:e=>e.scrollDownArrowVisible,hasScrollArrows:e=>e.hasScrollArrows},xAe=x.createContext({elementRef:{current:null},formRef:{current:{fields:new Map}},errors:{},clearErrors:Ht,validationMode:"onSubmit",submitCountRef:{current:0}});function wAe(){return x.useContext(xAe)}function wp(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}const Va=1;function m6(e,t){return Math.max(0,e-t)}function SAe(e,t){if(t<=0)return 0;const n=wp(e,0,t),r=n,i=t-n,a=r<=Va,o=i<=Va;return a&&o?r<=i?0:t:a?0:o?t:n}function OAe(e){const{id:t,value:n,defaultValue:r=null,onValueChange:i,open:a,defaultOpen:o=!1,onOpenChange:s,name:l,form:u,autoComplete:f,disabled:d=!1,readOnly:p=!1,required:h=!1,modal:b=!0,actionsRef:m,inputRef:g,onOpenChangeComplete:y,items:v,multiple:w=!1,itemToStringLabel:S,itemToStringValue:O,isItemEqualToValue:j=c6,highlightItemOnHover:E=!0,children:T}=e,{clearErrors:A}=wAe(),{setDirty:C,setTouched:_,setFocused:N,validityData:D,setFilled:R,name:$,disabled:P,validation:B,validationMode:L}=_0(),k=u6({id:t}),I=P||d,V=$??l,[M,q]=Nb({controlled:n,default:w?r??Gi:r,name:"Select",state:"value"}),[G,U]=Nb({controlled:a,default:o,name:"Select",state:"open"}),Y=x.useRef([]),X=x.useRef([]),te=x.useRef(null),H=x.useRef(null),ee=x.useRef(0),J=x.useRef(null),K=x.useRef([]),oe=x.useRef(!1),Q=x.useRef(null),ae=x.useRef(null),ue=x.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),ye=x.useRef(!1),Ie=x.useRef(M),{openMethod:ce,triggerProps:Se}=e6(G),re=fn(()=>new Lm({id:k,labelId:void 0,modal:b,multiple:w,disabled:I,readOnly:p,required:h,highlightItemOnHover:E,itemToStringLabel:S,itemToStringValue:O,isItemEqualToValue:j,value:M,open:G,mounted:G,transitionStatus:void 0,items:v,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:st,triggerProps:st,itemRoot:{props:st,multiple:w,disabled:I,readOnly:p,isItemEqualToValue:j},triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1},{setValue:Ht,setOpen:Ht,handleScrollArrowVisibility:Ht,onOpenChangeComplete:Ht,listRef:Y,popupRef:te,scrollHandlerRef:H,scrollArrowsMountedCountRef:ee,valueRef:J,valuesRef:K,labelsRef:X,typingRef:oe,selectionRef:ue,firstItemTextRef:Q,selectedItemTextRef:ae,alignItemWithTriggerActiveRef:ye,initialValueRef:Ie},bAe)).current,[we,$e]=x.useState(!1),{mounted:at,transitionStatus:W,forceUnmount:ie}=jH({open:G,ref:te,preventUnmountOnClose:we,setPreventUnmountOnClose:$e,onUnmount(){re.update({activeIndex:null,openMethod:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1}),y==null||y(!1)}}),Oe=re.useState("activeIndex"),pe=re.useState("selectedIndex"),he=re.useState("triggerElement"),Fe=re.useState("positionerElement"),Le=JTe(ce),nt=ce??Le,Kt=x.useMemo(()=>w?"":rc(M,O),[w,M,O]),ht=x.useMemo(()=>w&&Array.isArray(M)?M.map(De=>rc(De,O)):rc(M,O),[w,M,O]),oi=qt(he),cr=de(()=>ht);lAe(oi,k,M,cr,!I,l);const jr=w?Array.isArray(M)&&M.length>0:M!=null&&Kt!=="";le(()=>{R(jr)},[jr,R]),le(function(){const ct=f6(K.current,M,j,w);ct===null&&(ae.current=null),!G&&re.set("selectedIndex",ct)},[w,G,M,j,re]),JH(M,()=>{A(V),C(fAe(M,D.initialValue,j)),B.change(M)});const fr=de((De,ct)=>{const Ar=ct,Zi=IC(Ar);s==null||s(De,Ar),!ct.isCanceled&&(De||$e(Zi()),U(De),!De&&(ct.reason===mu||ct.reason===l0)&&(_(!0),N(!1),L==="onBlur"&&B.commit(M)))});x.useImperativeHandle(m,()=>({unmount:ie,close:()=>{re.state.open&&fr(!1,Re(c0))}}),[ie,fr,re]);const En=de((De,ct)=>{i==null||i(De,ct),!ct.isCanceled&&q(De)}),Er=de(De=>{const ct=m6(De.scrollHeight,De.clientHeight),Ar=SAe(De.scrollTop,ct),Zi=Ar>0,Cr=Ar<ct;re.set("scrollUpArrowVisible",Zi),re.set("scrollDownArrowVisible",Cr)}),Tr=BEe({open:G,onOpenChange:fr,elements:{reference:he,floating:Fe}}),si=wH(Tr,{enabled:!I,event:"mousedown"}),pn=y0(Tr),dr=zH(Tr,{enabled:!I,listRef:Y,activeIndex:Oe,selectedIndex:pe,disabledIndices:Gi,onNavigate(De){De===null&&!G||re.set("activeIndex",De)},focusItemOnHover:E}),li=FH(Tr,{enabled:!I&&(G||!p&&!w),listRef:X,activeIndex:Oe,selectedIndex:pe,disabledIndices:De=>i6(Y.current[De]),onMatch(De){G?re.set("activeIndex",De):En(K.current[De],Re(Ci))},onTyping(De){oe.current=De}}),Da=x.useMemo(()=>Ir(li.reference,dr.reference,pn.reference,si.reference,Se),[si.reference,li.reference,dr.reference,pn.reference,Se]),Ia=x.useMemo(()=>Ir(x0,li.floating,dr.floating,pn.floating),[li.floating,dr.floating,pn.floating]),fe=dr.item??st,Ee=x.useMemo(()=>({props:fe,multiple:w,disabled:I,readOnly:p,isItemEqualToValue:j}),[fe,w,I,p,j]);re.useContextCallback("setValue",En),re.useContextCallback("setOpen",fr),re.useContextCallback("handleScrollArrowVisibility",Er),re.useContextCallback("onOpenChangeComplete",y),ZTe(()=>{re.update({popupProps:Ia,triggerProps:Da,itemRoot:Ee})}),re.useSyncedValues({id:k,modal:b,multiple:w,disabled:I,readOnly:p,required:h,highlightItemOnHover:E,value:M,open:G,mounted:at,transitionStatus:W,popupProps:Ia,triggerProps:Da,itemRoot:Ee,items:v,itemToStringLabel:S,itemToStringValue:O,isItemEqualToValue:j,openMethod:nt});const rt=Ca(g,B.inputRef),tn=w?void 0:V,nn=x.useMemo(()=>!w||!Array.isArray(M)||!V?null:M.map(De=>{const ct=rc(De,O);return c.jsx("input",{type:"hidden",form:u,name:V,value:ct,disabled:I},ct)}),[w,M,u,V,O,I]);return c.jsxs(a6.Provider,{value:re,children:[c.jsx(o6.Provider,{value:Tr,children:T}),c.jsx("input",{...B.getValidationProps(I,{onFocus(){var De;(De=re.state.triggerElement)==null||De.focus({focusVisible:!0})},onChange(De){if(De.nativeEvent.defaultPrevented||I||p)return;const ct=De.currentTarget.value,Ar=Re(Ci,De.nativeEvent);function Zi(){if(w)return;const Cr=ct.toLowerCase();let Fr=K.current.findIndex(Fo=>rc(Fo,O).toLowerCase()===Cr||p6(Fo,S).toLowerCase()===Cr);Fr===-1&&(Fr=K.current.findIndex((Fo,Bd)=>{const zd=X.current[Bd];return zd!=null&&zd.toLowerCase()===Cr}));const zo=K.current[Fr];zo!=null&&En(zo,Ar)}re.set("forceMount",!0),queueMicrotask(Zi)}}),id:k&&tn==null?`${k}-hidden-input`:void 0,form:u,name:tn,autoComplete:f,value:Kt,disabled:I,required:h&&!(w&&jr),readOnly:p,ref:rt,style:V?Aje:JU,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),nn]})}function jAe(e,t){return e??t}function EAe(e,t,n){const{setFocused:r,focusOwnerRef:i}=_0(),a=de(o=>{(o?!e:i.current===a)&&(i.current=o&&a,r(o))});return le(()=>{const o=t.current,s=o==null?void 0:o.getRootNode();return(s==null?void 0:s.activeElement)===o&&a(!0),()=>a(!1)},[e,t,a]),a}const Fg=5;function g6(e,t){const n=TAe(t);return e.clientX>=n.left-Fg&&e.clientX<=n.right+Fg&&e.clientY>=n.top-Fg&&e.clientY<=n.bottom+Fg}function TAe(e){const t=e.getBoundingClientRect(),n=Nt(e);if(SC)return t;const r=n.getComputedStyle(e,"::before"),i=n.getComputedStyle(e,"::after");if(!(r.content!=="none"||i.content!=="none"))return t;const o=parseFloat(r.width)||0,s=parseFloat(r.height)||0,l=parseFloat(i.width)||0,u=parseFloat(i.height)||0,f=Math.max(t.width,o,l),d=Math.max(t.height,s,u),p=f-t.width,h=d-t.height;return{left:t.left-p/2,right:t.right+p/2,top:t.top-h/2,bottom:t.bottom+h/2}}const AAe="data-popup-side",CAe=400,_Ae={...Wj,...aAe,popupSide:e=>e?{[AAe]:e}:null,value:()=>null},NAe=x.forwardRef(function(t,n){var ee;const{render:r,className:i,id:a,disabled:o=!1,nativeButton:s=!0,style:l,...u}=t,{setTouched:f,validationMode:d,validation:p,state:h,disabled:b}=_0(),{labelId:m}=l6(),g=rl(),y=g.useState("readOnly"),v=g.useState("required"),w=g.useState("disabled"),S=b||w||o,O=g.useState("open"),j=g.useState("mounted"),E=g.useState("value"),T=g.useState("triggerProps"),A=g.useState("positionerElement"),C=g.useState("listElement"),_=g.useState("popupSide"),N=g.useState("id"),D=g.useState("labelId"),R=g.useState("hasSelectedValue"),$=j&&A?_:null,P=a??N,B=jAe(m,D);u6({id:a});const L=qt(A),k=x.useRef(null),I=EAe(S,k),{getButtonProps:V,buttonRef:M}=el({disabled:S,native:s}),q=g.useStateSetter("triggerElement"),G=dn(),U=dn(),Y=dn();x.useEffect(()=>{if(O)return Y.start(CAe,()=>{g.context.selectionRef.current.allowUnselectedMouseUp=!0,g.context.selectionRef.current.allowSelectedMouseUp=!0}),()=>{Y.clear()};g.context.selectionRef.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},U.clear()},[O,g,U,Y]);const X=Ir(T,{id:P,role:"combobox","aria-expanded":O,"aria-haspopup":"listbox","aria-controls":O?(C==null?void 0:C.id)??((ee=Ob(A))==null?void 0:ee.id):void 0,"aria-labelledby":B,"aria-readonly":y||void 0,"aria-required":v||void 0,tabIndex:S?-1:0,onFocus(J){I(!0),O&&g.context.alignItemWithTriggerActiveRef.current&&g.context.setOpen(!1,Re(Ci,J.nativeEvent)),G.start(0,()=>{g.set("forceMount",!0)})},onBlur(J){je(A,J.relatedTarget)||(f(!0),I(!1),d==="onBlur"&&p.commit(E))},onMouseDown(J){if(O)return;const K=Qe(J.currentTarget);function oe(Q){if(!k.current)return;const ae=Q.target;je(k.current,ae)||je(L.current,ae)||g6(Q,k.current)||g.context.setOpen(!1,Re(qU,Q))}U.start(0,()=>{K.addEventListener("mouseup",oe,{once:!0})})}},u,V),te=p.getValidationProps(S,X);te.role="combobox";const H={...h,open:O,disabled:S,value:E,readOnly:y,popupSide:$,placeholder:!R};return it("button",t,{ref:[n,k,M,q],state:H,stateAttributesMapping:_Ae,props:te})}),RAe={value:()=>null},MAe=x.forwardRef(function(t,n){const{className:r,render:i,children:a,placeholder:o,style:s,...l}=t,u=rl(),f=u.useState("value"),d=u.useState("items"),p=u.useState("itemToStringLabel"),h=u.useState("hasSelectedValue"),b=!h&&o!=null&&a==null,m=u.useState("hasNullItemLabel",b),g={value:f,placeholder:!h};let y=null;return typeof a=="function"?y=a(f):a!=null?y=a:b&&!m?y=o:Array.isArray(f)?y=yAe(f,d,p):y=h6(f,d,p),it("span",t,{state:g,ref:[n,u.context.valueRef],props:[{children:y},l],stateAttributesMapping:RAe})}),PAe=x.forwardRef(function(t,n){const{render:r,className:i,style:a,...o}=t,u={open:rl().useState("open")};return it("span",t,{state:u,ref:n,props:[{"aria-hidden":!0,children:"▼"},o],stateAttributesMapping:zU})}),$Ae=x.forwardRef(function(t,n){const r=rl(),i=r.useState("mounted"),a=r.useState("forceMount");return i||a?c.jsx(NC,{ref:n,...t}):null}),v6=x.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});function DAe(){return x.useContext(v6)}function N0(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,a=de(i),[,o]=x.useState(0),s=fn(kAe).current,l=fn(IAe).current,u=x.useRef(0),f=x.useRef(!0),d=x.useRef(null),p=x.useRef(null),h=de(()=>{f.current||(f.current=!0,o(O=>O+1))}),b=de((O,j)=>{l.set(O,j),h()}),m=de(O=>{l.delete(O),h()}),g=de(O=>{const j=new Map;return n.current.length=0,r&&(r.current.length=0),O.forEach(E=>{var T,A;j.set(E.element,{...E.registration.metadata??{},index:E.index}),n.current[E.index]=E.element,r&&(r.current[E.index]=E.registration.label!==void 0?E.registration.label:((A=(T=E.registration.textRef)==null?void 0:T.current)==null?void 0:A.textContent)??E.element.textContent)}),u.current=n.current.length,j});function y(O){var T;if((T=p.current)==null||T.disconnect(),p.current=null,typeof MutationObserver!="function"||O.length<2)return;const j=new MutationObserver(A=>{if(!zAe(A))return;let C=null;for(const _ of O)if(_.isConnected){if(C&&y6(C,_)>0){j.disconnect(),h();return}C=_}});p.current=j;const E=new Set;for(let A=1;A<O.length;A+=1){const C=BAe(O[A-1],O[A]);C&&E.add(C)}E.forEach(A=>j.observe(A,{childList:!0}))}const v=de(()=>{const[O,j]=LAe(l),E=g(O),T=d.current,A=!T||T.length!==O.length||O.some((C,_)=>{const N=T[_];return C.index!==N.index||C.element!==N.element||C.registration.index!==N.registration.index||C.registration.metadata!==N.registration.metadata});y(j),d.current=O,f.current=!1,A&&(s.forEach(C=>C(E)),a(E))});le(()=>(!f.current&&d.current&&g(d.current),()=>{n.current=[],r&&(r.current=[])}),[n,r,g]),le(()=>{f.current&&v()}),le(()=>()=>{var O;(O=p.current)==null||O.disconnect(),f.current=!0},[]);const w=de(O=>(s.add(O),()=>{s.delete(O)})),S=x.useMemo(()=>({register:b,unregister:m,subscribeMapChange:w,nextIndexRef:u}),[b,m,w,u]);return c.jsx(v6.Provider,{value:S,children:t})}function IAe(){return new Map}function kAe(){return new Set}function LAe(e){const t=new Set,n=[],r=[];e.forEach((a,o)=>{if(!o.isConnected)return;const s=a.index,l={index:s??-1,element:o,registration:a};s===null?r.push(l):s>=0&&(t.add(s),n.push(l))});let i=0;return r.sort((a,o)=>y6(a.element,o.element)),r.forEach(a=>{for(;t.has(i);)i+=1;a.index=i,n.push(a),i+=1}),t.size>0&&n.sort((a,o)=>a.index-o.index),[n,r.map(a=>a.element)]}function BAe(e,t){let n=e.parentElement;for(;n&&!n.contains(t);)n=n.parentElement;return n}function zAe(e){for(const t of e)for(let n=0;n<t.removedNodes.length;n+=1)if(t.removedNodes[n].isConnected)return!0;return!1}function y6(e,t){return e.nextElementSibling===t?-1:t.nextElementSibling===e?1:e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}function FAe(e){const{nodeId:t,externalTree:n,rootContext:r}=e,i=r.useState("referenceElement"),a=r.useState("floatingElement"),o=r.useState("domReferenceElement"),s=r.useState("open"),l=r.useState("floatingId"),[u,f]=x.useState(null),d=x.useRef(null),p=nl(n),h=x.useMemo(()=>({reference:i,floating:a,domReference:o}),[i,a,o]),b=OTe({...e,elements:{...h,...u&&{reference:u}}}),m=x.useCallback(w=>{const S=ot(w)?{getBoundingClientRect:()=>w.getBoundingClientRect(),getClientRects:()=>w.getClientRects(),contextElement:w}:w;f(S),b.refs.setReference(S)},[b.refs]),g=x.useMemo(()=>({...b.refs,setPositionReference:m,domReference:d}),[b.refs,m]),y=x.useMemo(()=>({...b.elements,domReference:o}),[b.elements,o]),v=x.useMemo(()=>({...b,dataRef:r.context.dataRef,open:s,onOpenChange:r.setOpen,events:r.context.events,floatingId:l,refs:g,elements:y,nodeId:t,rootStore:r}),[b,g,y,t,r,s,l]);return le(()=>{o&&(d.current=o)},[o]),le(()=>{r.context.dataRef.current.floatingContext=v;const w=p==null?void 0:p.nodesRef.current.find(S=>S.id===t);w&&(w.context=v)}),x.useMemo(()=>({...b,context:v,refs:g,elements:y,rootStore:r}),[b,g,y,v,r])}const UAe=x.createContext(void 0);function R0(){const e=x.useContext(UAe);return(e==null?void 0:e.direction)??"ltr"}const HAe=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:l}=t,{element:u,padding:f=0}=zs(e,t)||{};if(u==null)return{};const d=tH(f),p={x:n,y:r},h=AC(i),b=TC(h),m=await o.getDimensions(u),g=h==="y",y=g?"top":"left",v=g?"bottom":"right",w=g?"clientHeight":"clientWidth",S=a.reference[b]+a.reference[h]-p[h]-a.floating[b],O=p[h]-a.reference[h],j=s.floating[w]||a.floating[b],E=S/2-O/2,T=j/2-m[b]/2-1,A=Math.min(d[y],T),C=Math.min(d[v],T),_=A,N=j-m[b]-C,D=j/2-m[b]/2+E,R=eH(_,D,N),$=!l.arrow&&Ea(i)!=null&&D!==R&&a.reference[b]/2-(D<_?A:C)-m[b]/2<0,P=$?D<_?D-_:D-N:0;return{[h]:p[h]+P,data:{[h]:R,centerOffset:D-R-P,...$&&{alignmentOffset:P}},reset:$}}}),qAe=(e,t)=>{const{name:n,fn:r}=HAe(e);return{name:n,fn:r,options:[e,t]}},VAe={name:"hide",async fn(e){const{width:t,height:n,x:r,y:i}=e.rects.reference,a=t===0&&n===0&&r===0&&i===0,o=await e.platform.detectOverflow(e,{elementContext:"reference"});return{data:{referenceHidden:o.top-n>=0||o.right-t>=0||o.bottom-n>=0||o.left-t>=0||a}}}},GAe={sideX:"left",sideY:"top"},KAe="--available-width",YAe="--available-height",XAe="--anchor-width",WAe="--anchor-height",QAe="--transform-origin",TD=KAe,AD=YAe;function b6(e,t,n){const r=e==="inline-start"||e==="inline-end";return{top:"top",right:r?n?"inline-start":"inline-end":"right",bottom:"bottom",left:r?n?"inline-end":"inline-start":"left"}[t]}function CD(e,t,n){const{rects:r,placement:i}=e;return{side:b6(t,Wr(i),n),align:Ea(i)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function WC(e){return ZAe(e,FAe)}function ZAe(e,t){var Da,Ia;const{anchor:n,positionMethod:r="absolute",side:i="bottom",sideOffset:a=0,align:o="center",alignOffset:s=0,collisionBoundary:l,collisionPadding:u=5,sticky:f=!1,arrowPadding:d=5,disableAnchorTracking:p=!1,inline:h,keepMounted:b=!1,floatingRootContext:m,mounted:g,collisionAvoidance:y,shift:v,nodeId:w,adaptiveOrigin:S,lazyFlip:O=!1,externalTree:j}=e,E=y.side||"flip",T=y.align||"flip",A=y.fallbackAxisSide||"end",C=(v==null?void 0:v.crossAxis)??!1,_=v==null?void 0:v.rootBoundary,N=typeof n=="function"?n:void 0,D=de(N),R=N?D:n,$=qt(n),P=qt(g),L=R0()==="rtl",[k,I]=x.useState(null);!g&&k!==null&&I(null);const V=O==="placement",M=k?Wr(k):null,q=k&&V?Ea(k)||"center":null,G=M||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":L?"left":"right","inline-start":L?"right":"left"}[i],U=q||o,Y=U==="center"?G:`${G}-${U}`;let X=u;typeof X=="number"?X={top:X,right:X,bottom:X,left:X}:X&&(X={top:X.top||0,right:X.right||0,bottom:X.bottom||0,left:X.left||0});const te=1,H=i==="bottom"?te:0,ee=i==="top"?te:0,J=i==="right"?te:0,K=i==="left"?te:0,oe={boundary:l==="clipping-ancestors"?"clippingAncestors":l,padding:X},Q=x.useRef(null),ae=qt(a),ue=qt(s),ye=typeof a!="function"?a:0,Ie=typeof s!="function"?s:0,ce=[];h&&ce.push(h),ce.push(jTe(fe=>{const Ee=CD(fe,i,L),rt=typeof ae.current=="function"?ae.current(Ee):ae.current,tn=typeof ue.current=="function"?ue.current(Ee):ue.current;return{mainAxis:rt,crossAxis:tn,alignmentAxis:tn}},[ye,Ie,L,i]));const Se=T==="none"&&E!=="shift",re=!Se&&(f||C||E==="shift"),we=E==="none"?null:ATe({...oe,padding:{top:X.top+te+H,right:X.right+te+K,bottom:X.bottom+te+ee,left:X.left+te+J},mainAxis:!C&&E==="flip",crossAxis:T==="flip"?"alignment":!1,fallbackAxisSideDirection:A}),$e=Se?null:ETe({...oe,rootBoundary:_,mainAxis:T!=="none",crossAxis:re,limiter:f||C?void 0:TTe(fe=>{if(!Q.current)return{};const{width:Ee,height:rt}=Q.current.getBoundingClientRect(),tn=ji(Wr(fe.placement)),nn=tn==="y"?Ee:rt,De=tn==="y"?X.left+X.right:X.top+X.bottom;return{offset:nn/2+De/2}})},[oe,f,C,_,X,T]);E==="shift"||T==="shift"||U==="center"?ce.push($e,we):ce.push(we,$e),ce.push(CTe({...oe,apply({elements:{floating:fe},availableWidth:Ee,availableHeight:rt,rects:tn}){if(!P.current)return;const nn=fe.style;nn.setProperty(TD,`${Ee}px`),nn.setProperty(AD,`${rt}px`);const De=Nt(fe).devicePixelRatio||1,{x:ct,y:Ar,width:Zi,height:Cr}=tn.reference,Fr=(Math.round((ct+Zi)*De)-Math.round(ct*De))/De,zo=(Math.round((Ar+Cr)*De)-Math.round(Ar*De))/De;nn.setProperty(XAe,`${Fr}px`),nn.setProperty(WAe,`${zo}px`)}}),qAe(fe=>({element:Q.current||Qe(fe.elements.floating).createElement("div"),padding:Q.current?d:0}),[d]),{name:"transformOrigin",fn(fe){var zd,w_,S_,O_,j_,E_;const{elements:{floating:Ee},middlewareData:rt,placement:tn,platform:nn,rects:De,y:ct}=fe,Ar=Wr(tn),Zi=Ea(tn),Cr=ji(Ar)==="y",Fr=Q.current,zo=typeof a=="function"?a(CD(fe,i,L)):a;let Fo;if(!Fr&&Zi&&Math.abs(Cr?((zd=rt.shift)==null?void 0:zd.x)||0:((w_=rt.shift)==null?void 0:w_.y)||0)<=1)Fo=Zi==="start"===(Cr&&((S_=nn.isRTL)==null?void 0:S_.call(nn,Ee))===!0)?"100%":"0%";else{const Xq=Cr?((O_=rt.arrow)==null?void 0:O_.x)||0:((j_=rt.arrow)==null?void 0:j_.y)||0,Wq=Cr?(Fr==null?void 0:Fr.clientWidth)||0:(Fr==null?void 0:Fr.clientHeight)||0;Fo=`${Xq+Wq/2}px`}let Bd=Ar==="top"||Ar==="left"?`calc(100% + ${zo}px)`:`${-zo}px`;return re&&Cr&&Math.abs(((E_=rt.shift)==null?void 0:E_.y)||0)>zo&&(Bd=`${De.reference.y+De.reference.height/2-ct}px`),Ee.style.setProperty(QAe,Cr?`${Fo} ${Bd}`:`${Bd} ${Fo}`),{}}},VAe,S),le(()=>{!g&&m&&m.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[g,m]);const at=x.useMemo(()=>({ancestorScroll:!p,elementResize:!p&&typeof ResizeObserver<"u",layoutShift:!p&&typeof IntersectionObserver<"u"}),[p]),{refs:W,elements:ie,x:Oe,y:pe,middlewareData:he,update:Fe,placement:Le,context:nt,isPositioned:Kt,floatingStyles:ht}=t({rootContext:m,open:b?g:void 0,placement:Y,middleware:ce,strategy:r,whileElementsMounted:b?void 0:(...fe)=>vD(...fe,at),nodeId:w,externalTree:j}),{sideX:oi,sideY:cr}=he.adaptiveOrigin||GAe,jr=Kt?r:"fixed",fr=x.useMemo(()=>{let fe;return Kt?S?fe={position:jr,[oi]:Oe,[cr]:pe}:fe={...ht,position:jr}:fe={position:jr,top:0,left:0},fe[TD]="100vw",fe[AD]="100vh",Kt||(fe.opacity=0),fe},[S,jr,oi,Oe,cr,pe,ht,Kt]),En=x.useRef(null);le(()=>{if(!g)return;const fe=$.current,Ee=typeof fe=="function"?fe():fe,tn=(_D(Ee)?Ee.current:Ee)||null||null;tn!==En.current&&(W.setPositionReference(tn),En.current=tn)},[g,W,R,$]),x.useEffect(()=>{if(!g)return;const fe=$.current;typeof fe!="function"&&_D(fe)&&fe.current!==En.current&&(W.setPositionReference(fe.current),En.current=fe.current)},[g,W,R,$]),x.useEffect(()=>{if(b&&g&&ie.reference&&ie.floating)return vD(ie.reference,ie.floating,Fe,at)},[b,g,ie,Fe,at]);const Er=Wr(Le),Tr=b6(i,Er,L),si=Ea(Le)||"center",pn=!!((Da=he.hide)!=null&&Da.referenceHidden);le(()=>{O&&g&&Kt&&(Er!==G||V&&si!==U)&&I(Le)},[O,V,g,Kt,Le,Er,si,G,U]);const dr=x.useMemo(()=>{var fe,Ee;return{position:"absolute",top:(fe=he.arrow)==null?void 0:fe.y,left:(Ee=he.arrow)==null?void 0:Ee.x}},[he.arrow]),li=((Ia=he.arrow)==null?void 0:Ia.centerOffset)!==0;return x.useMemo(()=>({positionerStyles:fr,arrowStyles:dr,arrowRef:Q,arrowUncentered:li,side:Tr,align:si,physicalSide:Er,anchorHidden:pn,refs:W,context:nt,isPositioned:Kt,update:Fe}),[fr,dr,Q,li,Tr,si,Er,pn,W,nt,Kt,Fe])}function _D(e){return e!=null&&"current"in e}const x6=x.createContext(void 0);function JAe(){const e=x.useContext(x6);if(!e)throw new Error(Wt(59));return e}function Rb(e,t){e&&Object.assign(e.style,t)}const eCe={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"};function M0(e){return e==="starting"?Kje:st}function QC(e,t,{styles:n,transitionStatus:r,props:i,refs:a,hidden:o,inert:s=!1}){const l={...n};return s&&(l.pointerEvents="none"),it("div",e,{state:t,ref:a,props:[{role:"presentation",hidden:o,style:l},M0(r),i],stateAttributesMapping:$m})}const tCe=20;function w6(e,t,n,r){const[i,a]=x.useState(!1);le(()=>{if(!e||!t||n==null){a(!1);return}const o=Qe(n).documentElement.clientWidth,s=n.offsetWidth;a(o>0&&s>0&&s>=o-tCe)},[e,t,n]),ZH(e&&(!t||i),r)}const nCe={position:"fixed"},rCe=x.forwardRef(function(t,n){const{anchor:r,className:i,render:a,positionMethod:o,side:s,align:l,sideOffset:u,alignOffset:f,collisionBoundary:d="clipping-ancestors",collisionPadding:p,arrowPadding:h,sticky:b,disableAnchorTracking:m,alignItemWithTrigger:g=!0,collisionAvoidance:y=dH,style:v,...w}=t,S=rl(),O=s6(),j=S.useState("open"),E=S.useState("mounted"),T=S.useState("modal"),A=S.useState("value"),C=S.useState("openMethod"),_=S.useState("positionerElement"),N=S.useState("triggerElement"),D=S.useState("isItemEqualToValue"),R=S.useState("transitionStatus"),$=x.useRef(null),P=x.useRef(null),[B,L]=x.useState(g),k=E&&B&&C!=="touch";!E&&B!==g&&L(g),x.useImperativeHandle(S.context.alignItemWithTriggerActiveRef,()=>k),w6((k||T)&&j,C==="touch",_,N);const I=WC({anchor:r,floatingRootContext:O,positionMethod:o,mounted:E,side:s,sideOffset:u,align:l,alignOffset:f,arrowPadding:h,collisionBoundary:d,collisionPadding:p,sticky:b,disableAnchorTracking:m??k,collisionAvoidance:y,keepMounted:!0}),V=k?"none":I.side,M=k?nCe:I.positionerStyles,q={open:j,side:V,align:I.align,anchorHidden:I.anchorHidden};le(()=>{S.set("popupSide",I.side)},[S,I.side]);const G=S.useStateSetter("positionerElement"),U=QC(t,q,{styles:M,transitionStatus:R,props:w,refs:[n,G],hidden:!E,inert:!j}),Y=x.useRef(0),X=de(H=>{if(S.context.valuesRef.current.length===0)return;const ee=Y.current;Y.current=H.size;const J=Re(Ci);if(ee!==0&&!S.state.multiple&&A!==null&&Cv(S.context.valuesRef.current,A,D)===-1){const oe=S.context.initialValueRef.current,ae=oe!=null&&Cv(S.context.valuesRef.current,oe,D)!==-1?oe:null;S.context.setValue(ae,J),ae===null&&(S.set("selectedIndex",null),S.context.selectedItemTextRef.current=null)}if(ee!==0&&S.state.multiple&&Array.isArray(A)){const K=A.filter(oe=>Cv(S.context.valuesRef.current,oe,D)!==-1);K.length!==A.length&&(S.context.setValue(K,J),K.length===0&&(S.set("selectedIndex",null),S.context.selectedItemTextRef.current=null))}if(j&&k){S.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});const K={height:""};Rb(_,K),Rb(S.context.popupRef.current,K)}}),te=x.useMemo(()=>({...I,side:V,alignItemWithTriggerActive:k,setControlledAlignItemWithTrigger:L,scrollUpArrowRef:$,scrollDownArrowRef:P}),[I,V,k,L]);return c.jsx(N0,{elementsRef:S.context.listRef,labelsRef:S.context.labelsRef,onMapChange:X,children:c.jsxs(x6.Provider,{value:te,children:[E&&T&&c.jsx(GC,{inert:VC(!j),cutout:N}),U]})})}),Ug="base-ui-disable-scrollbar",ND={className:Ug,getElement(e){return c.jsx("style",{nonce:e,href:Ug,precedence:"base-ui:low",children:`.${Ug}{scrollbar-width:none}.${Ug}::-webkit-scrollbar{display:none}`})}},iCe=x.createContext(void 0);function S6(e){return x.useContext(iCe)}const aCe=x.createContext(void 0),oCe={disableStyleElements:!1};function sCe(){return x.useContext(aCe)??oCe}const RD="--transform-origin",lCe={...$m,...Pm},uCe=x.forwardRef(function(t,n){const{render:r,className:i,style:a,finalFocus:o,...s}=t,l=rl(),u=l.useState("multiple"),f=l.useState("readOnly"),d=l.useState("highlightItemOnHover"),p=s6(),{side:h,align:b,alignItemWithTriggerActive:m,isPositioned:g,setControlledAlignItemWithTrigger:y}=JAe(),v=S6()!=null,w=R0(),{nonce:S,disableStyleElements:O}=sCe(),j=l.useState("id"),E=l.useState("open"),T=l.useState("openMethod"),A=l.useState("mounted"),C=l.useState("popupProps"),_=l.useState("transitionStatus"),N=l.useState("triggerElement"),D=l.useState("positionerElement"),R=l.useState("listElement"),$=x.useRef(!1),P=x.useRef(!1),B=x.useRef({}),L=Zf(),k=de(q=>{if(!D||!l.context.popupRef.current||!P.current)return;const G=D.style.top==="0px",U=D.style.bottom==="0px";if($.current||!m||!G&&!U){l.context.handleScrollArrowVisibility(q);return}const Y=PD(D),X=Sp(D.getBoundingClientRect().height,"y",Y),te=Qe(D),H=Nt(D),ee=H.getComputedStyle(D),J=parseFloat(ee.marginTop),K=parseFloat(ee.marginBottom),oe=MD(H.getComputedStyle(l.context.popupRef.current)),Q=Math.min(te.documentElement.clientHeight-J-K,oe),ae=q.scrollTop,ue=Hg(q);let ye=null;const Ie=we=>{D.style.height=`${we}px`},ce=G?ue-ae:ae,Se=Math.min(X+ce,Q);if(ce<=Va){const we=wp(ce,0,Q-X);we>0&&Ie(X+we),q.scrollTop=G?ue:0,Q-(X+we)<=Va&&($.current=!0),l.context.handleScrollArrowVisibility(q);return}if(Q-Se>Va)ye=G?1/0:0;else if(U&&ae<ue){const we=X+ce-Q;ye=ae-(ce-we)}const re=Math.ceil(Se);if(re!==0&&Ie(re),ye!=null){const we=wp(ye,0,Hg(q));Math.abs(q.scrollTop-we)>Va&&(q.scrollTop=we)}re>=Q-Va&&($.current=!0),l.context.handleScrollArrowVisibility(q)});x.useImperativeHandle(l.context.scrollHandlerRef,()=>k,[k]),Md({open:E,ref:l.context.popupRef,onComplete(){E&&l.context.onOpenChangeComplete(!0)}});const I={open:E,transitionStatus:_,side:h,align:b};le(()=>{!D||!l.context.popupRef.current||Object.keys(B.current).length||(B.current={top:D.style.top||"0",left:D.style.left||"0",right:D.style.right,height:D.style.height,bottom:D.style.bottom,minHeight:D.style.minHeight,maxHeight:D.style.maxHeight,marginTop:D.style.marginTop,marginBottom:D.style.marginBottom})},[l,D]),le(()=>{E||m||(P.current=!1,$.current=!1,Rb(D,B.current))},[E,m,D]),le(()=>{var U,Y;const q=l.context.popupRef.current;if(!E||!N||!D||!q||m&&!g||l.state.transitionStatus==="ending")return;if(P.current=!0,q.style.removeProperty(RD),!m){L.request(()=>l.context.handleScrollArrowVisibility(R||q));return}const G=cCe(q);try{let X=l.context.selectedItemTextRef.current;X!=null&&X.isConnected||(X=!l.select("hasSelectedValue")&&((U=l.context.firstItemTextRef.current)!=null&&U.isConnected)?l.context.firstItemTextRef.current:null);const te=l.context.valueRef.current,H=Nt(D),ee=H.getComputedStyle(D),J=H.getComputedStyle(q),K=Qe(N),oe=PD(N),Q=qg(N.getBoundingClientRect(),oe),ae=qg(D.getBoundingClientRect(),oe),ue=Q.height,ye=R||q,Ie=ye.scrollHeight,ce=parseFloat(J.borderBottomWidth),Se=parseFloat(ee.marginTop)||10,re=parseFloat(ee.marginBottom)||10,we=parseFloat(ee.minHeight)||100,$e=MD(J),at=5,W=5,ie=20,Oe=K.documentElement.clientHeight-Se-re,pe=K.documentElement.clientWidth,he=Oe-Q.bottom+ue;let Fe,Le=w==="rtl"?Q.right-ae.width:Q.left,nt=0;if(X&&te){const pn=qg(te.getBoundingClientRect(),oe);Fe=qg(X.getBoundingClientRect(),oe),Le=ae.left+(w==="rtl"?pn.right-Fe.right:pn.left-Fe.left);const dr=pn.top-Q.top+pn.height/2;nt=Fe.top-ae.top+Fe.height/2-dr}const Kt=he+nt+re+ce;let ht=Math.min(Oe,Kt);const oi=Oe-Se-re,cr=Kt-ht,jr=pe-W;D.style.left=`${wp(Le,at,jr-ae.width)}px`,D.style.height=`${ht}px`,D.style.maxHeight="none",D.style.marginTop=`${Se}px`,D.style.marginBottom=`${re}px`,q.style.height="100%";const fr=Hg(ye),En=cr>=fr-Va;En&&(ht=Math.min(Oe,ae.height)-(cr-fr));const Er=Q.top<ie||Q.bottom>Oe-ie||Math.ceil(ht)+Va<Math.min(Ie,we),Tr=(((Y=H.visualViewport)==null?void 0:Y.scale)??1)!==1&&$a;if(Er||Tr){Rb(D,B.current),y(!1);return}const si=Math.max(we,ht);if(En){const pn=Math.max(0,Oe-Kt);D.style.top=ae.height>=oi?"0":`${pn}px`,D.style.height=`${ht}px`,ye.scrollTop=Hg(ye)}else D.style.bottom="0",ye.scrollTop=cr;if(Fe){const pn=ae.top,dr=ae.height,li=Fe.top+Fe.height/2,Da=wp(dr>0?(li-pn)/dr*100:50,0,100);q.style.setProperty(RD,`50% ${Da}%`)}(si===Oe||ht>=$e)&&($.current=!0),l.context.handleScrollArrowVisibility(ye),d&&l.state.selectedIndex===null&&l.state.activeIndex===null&&l.context.listRef.current[0]!=null&&l.set("activeIndex",0)}finally{G()}},[l,E,D,N,m,y,L,R,d,w,g]),x.useEffect(()=>{if(!m||!D||!E)return;const q=Nt(D);function G(U){l.context.setOpen(!1,Re(sje,U))}return Ve(q,"resize",G)},[l,m,D,E]);const V={...R?{role:"presentation"}:{role:"listbox","aria-multiselectable":u||void 0,"aria-readonly":f||void 0,id:`${j}-list`},onKeyDown(q){v&&A0.has(q.key)&&q.stopPropagation()},onScroll(q){R||k(q.currentTarget)},...m&&{style:R?{height:"100%"}:eCe},className:!R&&m?ND.className:void 0},M=it("div",t,{ref:[n,l.context.popupRef],state:I,stateAttributesMapping:lCe,props:[C,V,M0(_),s]});return c.jsxs(x.Fragment,{children:[!O&&ND.getElement(S),c.jsx(PC,{context:p,modal:!1,disabled:!A,openInteractionType:T,returnFocus:o,restoreFocus:!0,children:M})]})});function MD(e){const t=e.maxHeight;return t.endsWith("px")&&parseFloat(t)||1/0}function Hg(e){return m6(e.scrollHeight,e.clientHeight)}function PD(e){return YH.getScale(e)}function Sp(e,t,n){return e/n[t]}function qg(e,t){return em({x:Sp(e.x,"x",t),y:Sp(e.y,"y",t),width:Sp(e.width,"x",t),height:Sp(e.height,"y",t)})}const $D=[["transform","none"],["scale","1"],["translate","0 0"]];function cCe(e){const{style:t}=e,n={};for(const[r,i]of $D)n[r]=t.getPropertyValue(r),t.setProperty(r,i,"important");return()=>{for(const[r]of $D){const i=n[r];i?t.setProperty(r,i):t.removeProperty(r)}}}function ZC(e={}){const{guess:t,label:n,metadata:r,textRef:i,index:a}=e,{register:o,unregister:s,subscribeMapChange:l,nextIndexRef:u}=DAe(),f=x.useRef(-1),[d,p]=x.useState(a==null&&t?()=>{if(f.current===-1){const g=u.current;u.current+=1,f.current=g}return f.current}:-1),h=a??d,b=x.useRef(null),m=x.useCallback(g=>{const y=b.current;y&&s(y),b.current=g,g&&o(g,{metadata:r??null,index:a??null,label:n,textRef:i})},[a,o,s,r,n,i]);return le(()=>{if(a==null)return l(g=>{var v;const y=b.current?(v=g.get(b.current))==null?void 0:v.index:null;y!=null&&p(y)})},[a,l]),{ref:m,index:h}}const O6=x.createContext(void 0);function fCe(){const e=x.useContext(O6);if(!e)throw new Error(Wt(57));return e}const dCe=x.memo(x.forwardRef(function(t,n){const{render:r,className:i,style:a,value:o=null,label:s,disabled:l=!1,nativeButton:u=!1,...f}=t,d=x.useRef(null),p=ZC({guess:!0,label:s,textRef:d}),h=rl(),{props:b,multiple:m,disabled:g,readOnly:y,isItemEqualToValue:v}=h.useState("itemRoot"),w=g||l,S=h.useState("isActive",p.index),O=h.useState("open"),j=h.useState("isSelected",o),E=h.useState("isSelectedByFocus",p.index),T=p.index,A=x.useRef(null);le(()=>{const I=h.context.valuesRef.current;return I[T]=o,()=>{delete I[T]}},[T,o,h]),le(()=>{const I=h.state.value,V=h.state.selectedIndex;let M=V,q;m&&Array.isArray(I)?(M=pAe(T,o,h.context.valuesRef.current,I,v,V),q=M===T,T===V&&!q&&(h.context.selectedItemTextRef.current=null)):(q=I!==void 0&&yu(o,I,v),q&&(M=T)),h.set("selectedIndex",M),q&&d.current&&(h.context.selectedItemTextRef.current=d.current)},[T,m,v,h,o]);const C=x.useRef("mouse"),_=x.useRef(!1),{getButtonProps:N,buttonRef:D}=el({disabled:w,focusableWhenDisabled:!0,native:u,composite:!0}),R={disabled:w,selected:j,highlighted:S};function $(I){if(g||y)return;const V=h.state.value;if(m){const M=Array.isArray(V)?V:[],q=j?hAe(M,o,v):[...M,o];h.context.setValue(q,Re(Fc,I))}else h.context.setValue(o,Re(Fc,I)),h.context.setOpen(!1,Re(Fc,I))}function P(){h.context.selectionRef.current.dragY=0}const B={role:"option","aria-selected":j,tabIndex:O&&S?0:-1,onKeyDown(I){h.set("activeIndex",T),I.key===" "&&h.context.typingRef.current&&I.preventDefault()},onClick(I){const V=C.current!=="touch",M=I.nativeEvent.pointerType,q=V&&Qf(I.nativeEvent)&&(M!==void 0||S),G=V&&!q&&!_.current;_.current=!1,!(w||G)&&$(I.nativeEvent)},onPointerEnter(I){C.current=I.pointerType},onPointerMove(I){if(I.pointerType==="mouse"&&I.buttons===1){const V=h.context.selectionRef.current;V.dragY+=I.movementY,V.dragY**2>=64&&(V.allowUnselectedMouseUp=!0)}},onPointerDown(I){C.current=I.pointerType,_.current=!0,P()},onMouseUp(){var M;if(P(),w||C.current==="touch"||_.current)return;const I=!h.context.selectionRef.current.allowSelectedMouseUp&&j,V=!h.context.selectionRef.current.allowUnselectedMouseUp&&!j;I||V||(_.current=!0,(M=A.current)==null||M.click(),_.current=!1)}},L=it("div",t,{ref:[D,n,p.ref,A],state:R,props:[b,B,f,N]}),k=x.useMemo(()=>({selected:j,index:T,textRef:d,selectedByFocus:E}),[j,T,d,E]);return c.jsx(O6.Provider,{value:k,children:L})})),pCe=x.memo(x.forwardRef(function(t,n){const{index:r,textRef:i,selectedByFocus:a}=fCe(),o=rl(),{render:s,className:l,style:u,...f}=t,d=x.useCallback(h=>{h&&(r===0&&(o.context.firstItemTextRef.current=h),a&&(o.context.selectedItemTextRef.current=h))},[o,r,a]);return it("div",t,{ref:[d,n,i],props:f})})),hCe=x.createContext(void 0);function mCe(){const e=x.useContext(hCe);if(e===void 0)throw new Error(Wt(56));return e}const gCe=x.forwardRef(function(t,n){const{render:r,className:i,style:a,id:o,...s}=t,{setLabelId:l}=mCe(),u=_i(o);return le(()=>(l(u),()=>{l(d=>d===u?void 0:d)}),[u,l]),it("div",t,{ref:n,props:[{id:u,"aria-hidden":!0},s]})}),mE=OAe,gE=MAe,vE=x.forwardRef(function({className:t,children:n,...r},i){return c.jsxs(NAe,{ref:i,className:Gt("inline-flex items-center justify-between gap-1.5 rounded border border-line bg-panel px-2 py-1 text-xs text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50",t),...r,children:[n,c.jsx(PAe,{className:"text-muted-foreground","aria-hidden":"true",children:"▾"})]})}),yE=x.forwardRef(function({className:t,children:n,side:r="bottom",align:i="start",...a},o){return c.jsx($Ae,{children:c.jsx(rCe,{side:r,align:i,sideOffset:4,className:"z-50",children:c.jsx(uCe,{ref:o,className:Gt("min-w-[6rem] overflow-hidden rounded border border-line bg-popover p-1 text-popover-foreground shadow-lg font-mono",t),...a,children:n})})})}),Op=x.forwardRef(function({className:t,children:n,...r},i){return c.jsx(dCe,{ref:i,className:Gt("relative flex cursor-default select-none items-center rounded-sm px-2 py-1 text-xs text-foreground outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[highlighted]:bg-panel data-[selected]:text-brand",t),...r,children:c.jsx(pCe,{children:n})})});x.forwardRef(function({className:t,...n},r){return c.jsx(gCe,{ref:r,className:Gt("px-2 py-1 text-[10px] uppercase tracking-[0.12em] text-faint",t),...n})});const il=x.forwardRef(function({className:t,containerClassName:n,...r},i){return c.jsx("div",{className:Gt("w-full overflow-x-auto",n),children:c.jsx("table",{ref:i,className:Gt("w-full border-collapse text-xs",t),...r})})}),al=x.forwardRef(function({className:t,...n},r){return c.jsx("thead",{ref:r,className:Gt("border-b border-line text-left text-[10px] uppercase tracking-[0.12em] text-faint",t),...n})}),ol=x.forwardRef(function({className:t,...n},r){return c.jsx("tbody",{ref:r,className:Gt("divide-y divide-line-soft",t),...n})}),Dn=x.forwardRef(function({className:t,...n},r){return c.jsx("tr",{ref:r,className:Gt("transition-colors",t),...n})}),_e=x.forwardRef(function({className:t,...n},r){return c.jsx("th",{ref:r,className:Gt("px-3 py-2 font-normal",t),...n})}),Me=x.forwardRef(function({className:t,...n},r){return c.jsx("td",{ref:r,className:Gt("px-3 py-2 align-top",t),...n})}),j6=x.createContext(void 0);function E6(){const e=x.useContext(j6);if(e===void 0)throw new Error(Wt(64));return e}const vCe="data-activation-direction",JC={tabActivationDirection:e=>({[vCe]:e})},yCe=x.forwardRef(function(t,n){const{className:r,defaultValue:i=0,onValueChange:a,orientation:o="horizontal",render:s,value:l,style:u,...f}=t,d=t.defaultValue!==void 0,p=x.useRef([]),[h,b]=x.useState(()=>new Map),[m,g]=Nb({controlled:l,default:i,name:"Tabs",state:"value"}),y=l!==void 0,[v,w]=x.useState(()=>new Map),S=x.useRef(void 0),O=x.useCallback(te=>bE(v,te),[v]),[j,E]=x.useState(()=>({previousValue:m,tabActivationDirection:"none"})),{previousValue:T,tabActivationDirection:A}=j;let C=A,_=!1;T!==m&&(C=DD(T,m,o,v),_=T!=null&&m!=null&&O(m)==null);const N=_?T:m,D=T!==N||A!==C;le(()=>{D&&E({previousValue:N,tabActivationDirection:C})},[N,D,C]);const R=de((te,H)=>{const ee=DD(m,te,o,v);H.activationDirection=ee,a==null||a(te,H),!H.isCanceled&&g(()=>te)}),$=de((te,H)=>{a==null||a(te,Re(H,void 0,void 0,{activationDirection:"none"}))}),P=de((te,H)=>(b(ee=>{const J=new Map(ee);return J.set(te,H),J}),()=>{b(ee=>{if(ee.get(te)!==H)return ee;const J=new Map(ee);return J.delete(te),J})})),B=x.useCallback(te=>h.get(te),[h]),L=x.useCallback(te=>{for(const H of v.values())if(te===H.value)return H.id},[v]),k=x.useMemo(()=>({getTabElementBySelectedValue:O,getTabIdByPanelValue:L,getTabPanelIdByValue:B,onValueChange:R,orientation:o,registerMountedTabPanel:P,setTabMap:w,tabActivationDirection:C,value:m}),[O,L,B,R,o,P,w,C,m]),I=x.useMemo(()=>{for(const te of v.values())if(te.value===m)return te},[v,m]),V=x.useMemo(()=>{for(const te of v.values())if(!te.disabled)return te.value},[v]),M=x.useRef(!d),q=x.useRef(i),G=x.useRef(d),U=x.useRef(!1);le(()=>{var K;if(y)return;function te(oe,Q){g(()=>oe),E({previousValue:oe,tabActivationDirection:"none"}),$(oe,Q),M.current=!1}if(v.size===0){U.current&&m!==null&&!((K=S.current)!=null&&K.isConnected)&&te(null,H$);return}U.current=!0,S.current=v.keys().next().value;const H=I==null?void 0:I.disabled,ee=I==null&&m!==null;if(!H&&m===q.current&&(G.current=!1),G.current&&H&&m===q.current)return;const J=M.current;if(H||ee){const oe=V??null;if(m===oe){M.current=!1;return}let Q=H$;J?Q=q$:H&&(Q=VU),te(oe,Q);return}J&&I!=null&&($(m,q$),M.current=!1)},[V,y,$,I,g,v,m]);const X=it("div",t,{state:{orientation:o,tabActivationDirection:C},ref:n,props:f,stateAttributesMapping:JC});return c.jsx(j6.Provider,{value:k,children:c.jsx(N0,{elementsRef:p,children:X})})});function bE(e,t){for(const[n,r]of e.entries())if(t===r.value)return n;return null}function DD(e,t,n,r){if(e==null||t==null)return"none";const[i,a,o]=n==="horizontal"?["left","left","right"]:["top","up","down"],s=bE(r,e),l=bE(r,t);if(s==null||l==null)return s!==l&&(typeof e=="number"||typeof e=="string")&&typeof e==typeof t?t>e?o:a:"none";const u=s.getBoundingClientRect()[i],f=l.getBoundingClientRect()[i];return f<u?a:f>u?o:"none"}const e_="data-composite-item-active";function T6(e={}){const{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=s0(),{ref:i,index:a}=ZC(e),o=n===a,s=x.useRef(null),l=Ca(i,s);return{compositeProps:{tabIndex:o?0:-1,onFocus(){r(a)},onMouseMove(){const f=s.current;if(!t||!f)return;const d=f.hasAttribute("disabled")||f.ariaDisabled==="true";!o&&!d&&f.focus()}},compositeRef:l,index:a}}const A6=x.createContext(void 0);function bCe(){const e=x.useContext(A6);if(e===void 0)throw new Error(Wt(65));return e}const xCe=x.forwardRef(function(t,n){const{className:r,disabled:i=!1,render:a,value:o,id:s,nativeButton:l=!0,style:u,...f}=t,{value:d,getTabPanelIdByValue:p,onValueChange:h,orientation:b,tabActivationDirection:m}=E6(),{activateOnFocus:g,registerTabResizeObserverElement:y,tabsListElement:v}=bCe(),{highlightedIndex:w,onHighlightedIndexChange:S}=s0(),O=_i(s),j=x.useMemo(()=>({disabled:i,id:O,value:o}),[i,O,o]),{compositeProps:E,compositeRef:T,index:A}=T6({metadata:j}),C=o===d,_=x.useRef(!1),N=x.useRef(null),D=de(U=>{var Y;(Y=N.current)==null||Y.call(N),N.current=U?y(U):null});le(()=>{if(_.current){_.current=!1;return}if(!(C&&A>-1&&w!==A))return;const U=v;if(U!=null){const Y=br(Qe(U));if(Y&&je(U,Y))return}i||S(A)},[C,A,w,S,i,v]);const{getButtonProps:R,buttonRef:$}=el({disabled:i,native:l,focusableWhenDisabled:!0}),P=p(o),B=x.useRef(!1),L=x.useRef(!1);function k(U){h(o,Re(Ci,U.nativeEvent,void 0,{activationDirection:"none"}))}function I(U){C||i||k(U)}function V(U){C||i||g&&(!B.current||L.current)&&k(U)}function M(U){if(C||i)return;B.current=!0,L.current=U.button===0;const Y=Qe(U.currentTarget);function X(){B.current=!1,L.current=!1,Y.removeEventListener("pointerup",X),Y.removeEventListener("pointercancel",X)}Y.addEventListener("pointerup",X),Y.addEventListener("pointercancel",X)}return it("button",t,{state:{disabled:i,active:C,orientation:b,tabActivationDirection:m},ref:[n,$,T,D],props:[E,{role:"tab","aria-controls":P,"aria-selected":C,id:O,onClick:I,onFocus:V,onPointerDown:M,[e_]:C?"":void 0,onKeyDownCapture(){_.current=!0}},f,R],stateAttributesMapping:JC})});function wCe(e){const{loopFocus:t=!0,orientation:n="both",grid:r,onLoop:i,direction:a,highlightedIndex:o,onHighlightedIndexChange:s,rootRef:l,enableHomeAndEndKeys:u=!1,stopEventPropagation:f,disabledIndices:d,modifierKeys:p=Gi}=e,[h,b]=x.useState(0),m=r!=null,g=x.useRef(null),y=Ca(g,l),v=x.useRef([]),w=x.useRef(!1),S=x.useRef(null),O=o??h,j=de((_,N=!1)=>{if(S.current=v.current[_]??null,(s??b)(_),N){const D=v.current[_];xD(g.current,D,a,n)}}),E=de(_=>{var $;if(_.size===0)return;if(w.current){const P=v.current,B=P.indexOf(S.current);if(B===-1){const L=P[O];!L||qc(P,O,d)?j(SCe(P,d)):S.current=L}else B!==O&&j(B);return}w.current=!0;const N=Array.from(_.keys()),D=N.find(P=>P==null?void 0:P.hasAttribute(e_))??null,R=D?(($=_.get(D))==null?void 0:$.index)??-1:-1;if(R!==-1)j(R);else if(qc(N,O,d)){const P=Hc(N,{disabledIndices:d});Uc(N,P)||j(P)}xD(g.current,D,a,n)});le(()=>{if(d==null||o!=null||!w.current)return;const _=v.current;if(qc(_,O,d)){const N=Hc(_,{disabledIndices:d});Uc(_,N)||j(N)}},[d,o,O,v,j]);const T=de((_,N,D)=>i?i(_,N,D,v):D),A=de(_=>{const N=_.key===fE||_.key===dE;if(!A0.has(_.key)||!u&&N||OCe(_,p)||!g.current)return;const R=a==="rtl",$=R?uE:cE,P=R?cE:uE,B=n==="vertical"?lE:$,L=n==="vertical"?sE:P,k=$n(_.nativeEvent);if(k!=null&&bD(k)&&!i6(k)){const U=k.selectionStart,Y=k.selectionEnd,X=k.value;if(U==null||_.shiftKey||U!==Y||_.key!==L&&U<X.length||_.key!==B&&U>0)return}let I=O;const V=Ev(v,d),M=rE(v,d);r!=null&&(I=r({disabledIndices:d,elementsRef:v,event:_,highlightedIndex:O,loopFocus:t,maxIndex:M,minIndex:V,onLoop:T,orientation:n,rtl:R}));const q=n!=="vertical"&&_.key===$||n!=="horizontal"&&_.key===lE,G=n!=="vertical"&&_.key===P||n!=="horizontal"&&_.key===sE;u&&(_.key===fE?I=V:_.key===dE&&(I=M)),I===O&&(q||G)&&(t&&I===M&&q?(I=V,i&&(I=i(_,O,I,v))):t&&I===V&&G?(I=M,i&&(I=i(_,O,I,v))):I=Hc(v.current,{startingIndex:I,decrement:G,disabledIndices:d})),I!==O&&!Uc(v.current,I)&&(f&&_.stopPropagation(),(m||N||q||G)&&_.preventDefault(),j(I,!0),queueMicrotask(()=>{var U;(U=v.current[I])==null||U.focus()}))});return{props:{ref:y,onFocus(_){const N=g.current,D=$n(_.nativeEvent);!N||D==null||!bD(D)||D.setSelectionRange(0,D.value.length)},onKeyDown:A},highlightedIndex:O,onHighlightedIndexChange:j,elementsRef:v,onMapChange:E,relayKeyboardEvent:A}}function SCe(e,t){let n=-1;for(let r=0;r<e.length;r+=1){const i=e[r];if(!(!i||qc(e,r,t))){if(i.hasAttribute(e_))return r;n===-1&&(n=r)}}return Math.max(n,0)}function OCe(e,t){for(const n of RTe)if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}function jCe(e){const{render:t,className:n,style:r,refs:i=Gi,props:a=Gi,state:o=st,stateAttributesMapping:s,highlightedIndex:l,onHighlightedIndexChange:u,orientation:f,grid:d,loopFocus:p,onLoop:h,enableHomeAndEndKeys:b,onMapChange:m,stopEventPropagation:g=!0,rootRef:y,disabledIndices:v,modifierKeys:w,highlightItemOnHover:S=!1,tag:O="div",...j}=e,E=R0(),{props:T,highlightedIndex:A,onHighlightedIndexChange:C,elementsRef:_,onMapChange:N,relayKeyboardEvent:D}=wCe({grid:d,loopFocus:p,onLoop:h,orientation:f,highlightedIndex:l,onHighlightedIndexChange:u,rootRef:y,stopEventPropagation:g,enableHomeAndEndKeys:b,direction:E,disabledIndices:v,modifierKeys:w}),R=it(O,e,{state:o,ref:i,props:[T,...a,j],stateAttributesMapping:s}),$=x.useMemo(()=>({highlightedIndex:A,onHighlightedIndexChange:C,highlightItemOnHover:S,relayKeyboardEvent:D}),[A,C,S,D]);return c.jsx(UU.Provider,{value:$,children:c.jsx(N0,{elementsRef:_,onMapChange:P=>{m==null||m(P),N(P)},children:R})})}const ECe=x.forwardRef(function(t,n){const{activateOnFocus:r=!1,className:i,loopFocus:a=!0,render:o,style:s,...l}=t,{orientation:u,setTabMap:f,tabActivationDirection:d}=E6(),[p,h]=x.useState(0),[b,m]=x.useState(null),g=x.useRef(new Set),y=x.useRef(new Set),v=x.useRef(null);le(()=>{if(typeof ResizeObserver>"u")return;const T=new ResizeObserver(()=>{g.current.forEach(A=>{A()})});return v.current=T,b&&T.observe(b),y.current.forEach(A=>{T.observe(A)}),()=>{T.disconnect(),v.current=null}},[b]);const w=de(T=>(g.current.add(T),()=>{g.current.delete(T)})),S=de(T=>{var A;return y.current.add(T),(A=v.current)==null||A.observe(T),()=>{var C;y.current.delete(T),(C=v.current)==null||C.unobserve(T)}}),O={orientation:u,tabActivationDirection:d},j={"aria-orientation":u==="vertical"?"vertical":void 0,role:"tablist"},E=x.useMemo(()=>({activateOnFocus:r,registerIndicatorUpdateListener:w,registerTabResizeObserverElement:S,tabsListElement:b}),[r,w,S,b]);return c.jsx(A6.Provider,{value:E,children:c.jsx(jCe,{render:o,className:i,style:s,state:O,refs:[n,m],props:[j,l],stateAttributesMapping:JC,highlightedIndex:p,enableHomeAndEndKeys:!0,loopFocus:a,orientation:u,onHighlightedIndexChange:h,onMapChange:f,disabledIndices:Gi})})}),TCe=yCe,ACe=x.forwardRef(function({className:t,...n},r){return c.jsx(ECe,{ref:r,className:Gt("flex flex-wrap gap-1 border-b border-line pb-2",t),...n})}),CCe=x.forwardRef(function({className:t,...n},r){return c.jsx(xCe,{ref:r,className:Gt("flex items-baseline gap-1.5 rounded-md px-2.5 py-1 text-xs text-muted-foreground transition-colors hover:bg-panel hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring data-[active]:bg-panel-2 data-[active]:text-foreground",t),...n})}),C6=x.createContext(void 0);function Bm(e){const t=x.useContext(C6);if(t===void 0&&!e)throw new Error(Wt(72));return t}const _Ce={...Vp,disabled:e=>e.disabled,instantType:e=>e.instantType,isInstantPhase:e=>e.isInstantPhase,trackCursorAxis:e=>e.trackCursorAxis,disableHoverablePopup:e=>e.disableHoverablePopup,lastOpenChangeReason:e=>e.openChangeReason,closeOnClick:e=>e.closeOnClick,appliedTriggerProps:(e,t)=>t?e.activeTriggerProps:void 0,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin};class NCe extends Lm{constructor(n,r,i){const a=new w0;super(RCe(n,a,r,i),MCe(a),_Ce);Be(this,"setOpen",(n,r)=>{lEe(this,n,r,{extraState:{openChangeReason:r.reason}})})}cancelPendingOpen(n){this.state.floatingRootContext.dispatchOpenChange(!1,Re(Iu,n))}}function RCe(e,t,n,r=!1){return{...zC(t,n,r),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,adaptiveOrigin:void 0,...e}}function MCe(e){return{popupRef:x.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:e}}const PCe=j0(function(t){const{disabled:n=!1,defaultOpen:r=!1,open:i,disableHoverablePopup:a=!1,trackCursorAxis:o="none",actionsRef:s,onOpenChange:l,onOpenChangeComplete:u,handle:f,triggerId:d,defaultTriggerId:p=null,children:h}=t,b=EH((_,N)=>new NCe({open:r,openProp:i,activeTriggerId:p,triggerIdProp:d},_,N));b.useControlledProp("openProp",i),b.useControlledProp("triggerIdProp",d),b.useContextCallback("onOpenChange",l),b.useContextCallback("onOpenChangeComplete",u);const m=b.useState("open"),g=!n&&m,y=b.useState("activeTriggerId"),v=b.useState("mounted"),w=b.useState("payload");b.useSyncedValues({trackCursorAxis:o,disableHoverablePopup:a,disabled:n}),kC(b,{closeOnActiveTriggerUnmount:!0});const{forceUnmount:S,transitionStatus:O}=LC(g,b),j=b.useState("isInstantPhase"),E=b.useState("instantType"),T=b.useState("lastOpenChangeReason"),A=x.useRef(null);le(()=>{m&&n&&b.setOpen(!1,Re(VU))},[m,n,b]),le(()=>{O==="ending"&&T===Ci||O!=="ending"&&j?(E!=="delay"&&(A.current=E),b.set("instantType","delay")):A.current!==null&&(b.set("instantType",A.current),A.current=null)},[O,j,T,E,b]),le(()=>{g&&y==null&&b.set("payload",void 0)},[b,y,g]),x.useImperativeHandle(s,()=>({unmount:S,close:()=>b.setOpen(!1,Re(c0))}),[S,b]);const C=g||v||!n&&o!=="none";return c.jsxs(C6.Provider,{value:b,children:[f&&c.jsx($C,{handle:f,store:b}),C&&c.jsx($Ce,{store:b,disabled:n,trackCursorAxis:o}),typeof h=="function"?h({payload:w}):h]})});function $Ce({store:e,disabled:t,trackCursorAxis:n}){const r=e.useState("floatingRootContext"),i=y0(r,{enabled:!t,referencePress:()=>e.select("closeOnClick")}),a=nEe(r,{enabled:!t&&n!=="none",axis:n==="none"?void 0:n}),o=x.useMemo(()=>Ir(a.reference,i.reference),[a.reference,i.reference]);return BC(e,{activeTriggerProps:o,inactiveTriggerProps:o,popupProps:i.floating??st}),null}const _6=x.createContext(void 0);function DCe(){return x.useContext(_6)}const ICe=600,ID="data-base-ui-tooltip-trigger";function kD(e){const t=$n(e);return ot(t)?t:null}const kCe=RH(function(t,n){const{render:r,className:i,style:a,handle:o,payload:s,disabled:l,delay:u,closeOnClick:f=!0,closeDelay:d,id:p,...h}=t,b=Bm(!0),g=DH(o)??b;if(!g)throw new Error(Wt(82));const y=_i(p),v=g.useState("isTriggerActive",y),w=g.useState("isOpenedByTrigger",y),S=g.useState("floatingRootContext"),O=x.useRef(null),j=d??0,{registerTrigger:E,isMountedByThisTrigger:T}=TH(y,O,g,{payload:s,closeOnClick:f,closeDelay:j}),A=DCe(),{activeIdRef:C,delayRef:_,isInstantPhase:N,hasProvider:D}=jje(S,{open:w}),R=UC(S);g.useSyncedValue("isInstantPhase",N);const $=g.useState("disabled"),P=l??$,B=qt(P),L=g.useState("trackCursorAxis"),k=g.useState("disableHoverablePopup"),I=x.useRef(!1),V=dn(),M=x.useRef(void 0);function q(){return D&&C.current!=null?0:u??A??ICe}function G(K){const oe=O.current;if(!oe||!K)return!1;const Q=Jh(K,`[${ID}]`);return Q!==null&&Q!==oe&&je(oe,Q)}function U(K){const oe=G(K);return I.current=oe,oe&&(R.openChangeTimeout.clear(),R.restTimeout.clear(),R.restTimeoutPending=!1,V.clear()),oe}const Y=BH(S,{enabled:!P,mouseOnly:!0,move:!1,handleClose:!k&&L!=="both"?UH():null,restMs:q,delay(){return d==null&&D?{close:gu(_.current,"close")}:{close:j}},triggerElementRef:O,isActiveTrigger:v,isClosing:()=>g.select("transitionStatus")==="ending",shouldOpen(){return!I.current}}),X=IH(S,{enabled:!P}).reference,te=K=>{const oe=I.current,Q=kD(K),ae=U(Q),ue=O.current,ye=ue&&Q&&je(ue,Q);if(ae&&g.select("open")&&g.select("lastOpenChangeReason")===bn){g.setOpen(!1,Re(bn,K));return}if(oe&&!ae&&ye&&!B.current&&!g.select("open")&&ue&&Rs(M.current)){const Ie=()=>{!I.current&&!B.current&&!g.select("open")&&g.setOpen(!0,Re(bn,K,ue))},ce=q();ce===0?(V.clear(),Ie()):V.start(ce,Ie)}},H=g.useState("appliedTriggerProps",T||L!=="none");return it("button",t,{state:{open:w},ref:[n,E,O],props:[Y,X,H,{onMouseOver(K){te(K.nativeEvent)},onFocus(K){G(kD(K.nativeEvent))&&K.preventBaseUIHandler()},onMouseLeave(){I.current=!1,V.clear(),M.current=void 0},onPointerEnter(K){M.current=K.pointerType},onPointerDown(K){M.current=K.pointerType,g.set("closeOnClick",f),f&&!g.select("open")&&g.cancelPendingOpen(K.nativeEvent)},onClick(K){f&&!g.select("open")&&g.cancelPendingOpen(K.nativeEvent)},id:y,[eE]:P?"":void 0,[ID]:P?void 0:""},h],stateAttributesMapping:zU})}),N6=x.createContext(void 0);function LCe(){const e=x.useContext(N6);if(e===void 0)throw new Error(Wt(70));return e}const BCe=x.forwardRef(function(t,n){const{children:r,container:i,className:a,render:o,style:s,...l}=t,{node:u,subtree:f}=gH({container:i,ref:n,componentProps:t,elementProps:l});return!f&&!u?null:c.jsxs(x.Fragment,{children:[f,u&&Ni.createPortal(r,u)]})}),zCe=x.forwardRef(function(t,n){const{keepMounted:r=!1,...i}=t;return Bm().useState("mounted")||r?c.jsx(N6.Provider,{value:r,children:c.jsx(BCe,{ref:n,...i})}):null}),R6=x.createContext(void 0);function M6(){const e=x.useContext(R6);if(e===void 0)throw new Error(Wt(71));return e}const FCe=x.forwardRef(function(t,n){const{render:r,className:i,anchor:a,positionMethod:o="absolute",side:s="top",align:l="center",sideOffset:u=0,alignOffset:f=0,collisionBoundary:d="clipping-ancestors",collisionPadding:p=5,arrowPadding:h=5,sticky:b=!1,disableAnchorTracking:m=!1,collisionAvoidance:g=pH,style:y,...v}=t,w=Bm(),S=LCe(),O=w.useState("open"),j=w.useState("mounted"),E=w.useState("trackCursorAxis"),T=w.useState("disableHoverablePopup"),A=w.useState("floatingRootContext"),C=w.useState("instantType"),_=w.useState("transitionStatus"),N=w.useState("adaptiveOrigin"),D=WC({anchor:a,positionMethod:o,floatingRootContext:A,mounted:j,side:s,sideOffset:u,align:l,alignOffset:f,collisionBoundary:d,collisionPadding:p,sticky:b,arrowPadding:h,disableAnchorTracking:m,keepMounted:S,collisionAvoidance:g,adaptiveOrigin:N}),R=x.useMemo(()=>({open:O,side:D.side,align:D.align,anchorHidden:D.anchorHidden,instant:E!=="none"?"tracking-cursor":C}),[O,D.side,D.align,D.anchorHidden,E,C]),$=QC(t,R,{styles:D.positionerStyles,transitionStatus:_,props:v,refs:[n,w.useStateSetter("positionerElement")],hidden:!j,inert:!O||E==="both"||T});return c.jsx(R6.Provider,{value:D,children:$})}),UCe=x.forwardRef(function(t,n){const{render:r,className:i,style:a,...o}=t,s=Bm(),{side:l,align:u}=M6(),f=s.useState("open"),d=s.useState("instantType"),p=s.useState("transitionStatus"),h=s.useState("popupProps"),b=s.useState("floatingRootContext"),m=s.useState("disabled"),g=s.useState("closeDelay");Md({open:f,ref:s.context.popupRef,onComplete(){var S,O;f&&((O=(S=s.context).onOpenChangeComplete)==null||O.call(S,!0))}}),LH(b,{enabled:!m,closeDelay:g});const y=s.useStateSetter("popupElement");return it("div",t,{state:{open:f,side:l,align:u,instant:d,transitionStatus:p},ref:[n,s.context.popupRef,y],props:[x0,h,M0(p),o],stateAttributesMapping:pC})}),HCe=x.forwardRef(function(t,n){const{render:r,className:i,style:a,...o}=t,s=Bm(),{arrowRef:l,side:u,align:f,arrowUncentered:d,arrowStyles:p}=M6(),h=s.useState("open"),b=s.useState("instantType");return it("div",t,{state:{open:h,side:u,align:f,uncentered:d,instant:b},ref:[n,l],props:[{style:p,"aria-hidden":!0},o],stateAttributesMapping:$m})}),qCe=function(t){const{delay:n,closeDelay:r,timeout:i=400}=t,a=x.useMemo(()=>({open:n,close:r}),[n,r]);return c.jsx(_6.Provider,{value:n,children:c.jsx(Oje,{delay:a,timeoutMs:i,children:t.children})})},VCe=new Set(["get","set","delete","clear"]);function GCe(e){if(typeof e!="object"||e===null||!("operation"in e)||!("hit"in e)||!("key"in e))return!1;const{operation:t,hit:n,key:r}=e;return typeof t!="string"||!VCe.has(t)||n!==null&&typeof n!="boolean"?!1:typeof r=="string"}function sp(e,t){return{label:e,variant:t,className:eA({variant:t})}}function KCe(e){if(!GCe(e))return null;const t=typeof e.tier=="string"?` ${e.tier.toUpperCase()}`:"";if(e.operation==="set")return sp(`SET${t}`,"muted");if(e.operation==="delete")return sp("DEL","muted");if(e.operation==="clear")return sp("CLEAR","muted");if(e.hit===!0){const n=e.stale===!0;return sp(`${n?"HIT·STALE":"HIT"}${t}`,n?"warn":"good")}return e.hit===!1?sp(`MISS${t}`,"warn"):null}function P6({content:e}){const t=KCe(e);return t===null?null:c.jsx(Dc,{variant:t.variant,children:t.label})}function YCe(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.component!="string")return null;const n=typeof t.props=="object"&&t.props!==null?t.props:{},r=typeof n.deferred=="object"&&n.deferred!==null?n.deferred:{};return{isPartial:t.isPartial===!0,versionMismatch:t.versionMismatch===!0,pageBytes:typeof t.pageBytes=="number"?t.pageBytes:0,deferred:r}}function Vg(e,t){return{label:e,variant:t,className:eA({variant:t})}}function $6(e){if(!Number.isFinite(e)||e<=0)return"0 B";if(e<1024)return`${e} B`;const t=e/1024;return t<1024?`${t.toFixed(1)} KB`:`${(t/1024).toFixed(1)} MB`}function XCe(e){const t=YCe(e);if(t===null)return[];const n=[];return t.versionMismatch&&n.push(Vg("409","bad")),t.isPartial&&n.push(Vg("partial","warn")),Object.keys(t.deferred).length>0&&n.push(Vg("deferred","brand")),n.push(Vg($6(t.pageBytes),"muted")),n}function D6({content:e}){const t=XCe(e);return t.length===0?null:c.jsx("span",{className:"inline-flex items-center gap-1",children:t.map(n=>c.jsx(Dc,{variant:n.variant,children:n.label},n.label))})}const WCe=["resilience","workflow","auth"];function I6(e){return WCe.includes(e)}function k6(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)?e:{}}function pi(e){return typeof e=="string"&&e!==""?e:null}const QCe=new Set(["event","source","error","output","waits","status"]),ZCe=new Set(["timeout","circuit-open","circuit-rejected","bulkhead-rejected","rate-limited","workflow-failed","workflow-compensation-failed","step-failed","signal-timed-out","mfa-failed","refresh-token-reused","magic-link-refused","session-touch-failed","denied"]);function L6(e,t){if(e==="resilience"){const n=pi(t.source);return`${pi(t.policy)??"unknown"}${n?` · ${n}`:""}`}if(e==="workflow"){const n=pi(t.step);return`${pi(t.workflow)??"unknown"}${n?` › ${n}`:""}`}if(t.source==="authorization"){const n=pi(t.policy);return`${n?`${n}.${pi(t.ability)??"?"}`:"no check declared"}${pi(t.reason)?` (${String(t.reason)})`:""}`}return pi(t.userId)??pi(t.email)??""}function JCe(e,t){const n=k6(t),r=pi(n.event)??e,i=L6(e,n);return i?`${r} ${i}`:r}function e_e(e){return typeof e=="number"&&e>1e12&&e<1e14?`${new Date(e).toISOString()} (${e})`:Array.isArray(e)?e.map(t=>String(t)).join(", "):String(e)}function t_e({type:e,content:t}){const n=k6(t),r=pi(n.event)??e,i=ZCe.has(r),a=Object.entries(n).filter(([l,u])=>!QCe.has(l)&&u!==null&&u!==void 0&&(typeof u!="object"||Array.isArray(u)&&u.every(f=>typeof f!="object"))),o=n.error,s=["output","status","waits"].filter(l=>n[l]!==void 0).map(l=>[l,n[l]]);return c.jsxs("div",{"data-testid":"official-event",children:[c.jsxs("h3",{className:"mb-3 flex flex-wrap items-center gap-2 font-mono text-sm text-foreground",children:[c.jsx("span",{className:`rounded bg-panel px-1.5 py-0.5 text-[10px] uppercase ${i?"text-bad":"text-brand"}`,children:r}),c.jsx("span",{children:L6(e,n)}),pi(n.source)?c.jsxs("span",{className:"text-[10px] text-muted-foreground",children:["@nestjs/",String(n.source)]}):null]}),a.length>0?c.jsx("dl",{className:"mb-4 grid grid-cols-[max-content_1fr] gap-x-4 gap-y-1 text-xs",children:a.map(([l,u])=>c.jsxs("div",{className:"contents",children:[c.jsx("dt",{className:"text-muted-foreground",children:l}),c.jsx("dd",{className:"break-all font-mono text-foreground",children:e_e(u)})]},l))}):null,o!=null?c.jsxs("div",{className:"mb-4",children:[c.jsx("h3",{className:"mb-2 text-[10px] font-semibold uppercase tracking-[0.12em] text-faint",children:"Error"}),c.jsx("pre",{className:"overflow-auto rounded bg-panel p-3 text-xs text-bad",children:JSON.stringify(o,null,2)})]}):null,s.map(([l,u])=>c.jsxs("div",{className:"mb-4",children:[c.jsx("h3",{className:"mb-2 text-[10px] font-semibold uppercase tracking-[0.12em] text-faint",children:l}),c.jsx("pre",{className:"overflow-auto rounded bg-panel p-3 text-xs text-foreground",children:JSON.stringify(u,null,2)})]},l))]})}const rd="user:";function B6(e){for(const t of e)if(t.startsWith(rd)&&t.length>rd.length)return t;return null}function t_(e){return e.slice(rd.length)}function z6(e){return`#/entries?tag=${encodeURIComponent(e)}`}const n_e=rd;function r_e(e){return e.startsWith(rd)&&e.length>rd.length}function Mb(e){const t=e.content;if(typeof t=="object"&&t!==null){const n=t;if(typeof n.uri=="string")return typeof n.method=="string"?`${n.method} ${n.uri}`:n.uri;if(typeof n.sql=="string")return n.sql;if(typeof n.queue=="string"&&typeof n.name=="string")return`${n.queue}:${n.name}`;if(e.type==="dump")return typeof n.label=="string"&&n.label.length>0?n.label:a_e(n.value);if(e.type==="event"&&typeof n.name=="string")return n.name;if(I6(e.type))return JCe(e.type,n);if(e.type==="mail"&&typeof n.status=="string"){const r=typeof n.subject=="string"?n.subject:"(no subject)";return`[${n.status}] ${r}`}if(e.type==="model"&&typeof n.action=="string"){const r=typeof n.entity=="string"?n.entity:"",i=n.id===null||n.id===void 0?"":`#${String(n.id)}`;return`${n.action} ${r}${i}`}if(e.type==="redis"&&typeof n.command=="string")return`${n.command} ${i_e(n.args)}`.trim();if(e.type==="inertia"&&typeof n.component=="string"){const r=typeof n.method=="string"?n.method:"",i=n.isPartial===!0?" (partial)":"";return`${r} → ${n.component}${i}`.trim()}if(e.type==="log"&&typeof n.message=="string")return`[${typeof n.level=="string"?n.level:"log"}] ${n.message}`;if(typeof n.message=="string")return n.message;if(typeof n.url=="string")return typeof n.method=="string"?`${n.method} ${n.url}`:n.url}return e.type}function i_e(e){if(!Array.isArray(e)||e.length===0)return"";const t=e.map(n=>typeof n=="string"?n:String(n)).join(" ");return t.length>60?`${t.slice(0,60)}…`:t}function a_e(e){if(typeof e=="string")return e;let t;try{t=JSON.stringify(e)??String(e)}catch{t=String(e)}return t.length>80?`${t.slice(0,80)}…`:t}function F6({entries:e,onSelect:t}){return c.jsxs(il,{className:"text-left",children:[c.jsx(al,{children:c.jsxs(Dn,{children:[c.jsx(_e,{className:"py-2.5 pr-3 pl-4",children:"Time"}),c.jsx(_e,{className:"px-3",children:"Type"}),c.jsx(_e,{className:"px-3",children:"Summary"}),c.jsx(_e,{className:"px-3 text-right",children:"Duration"}),c.jsx(_e,{className:"hidden pr-4 pl-3 md:table-cell",children:"Tags"})]})}),c.jsx(ol,{children:e.map(n=>{const r=B6(n.tags),i=n.tags.filter(a=>a!==r);return c.jsxs(Dn,{onClick:()=>t==null?void 0:t(n.id),onKeyDown:a=>{(a.key==="Enter"||a.key===" ")&&(t==null||t(n.id))},className:"cursor-pointer transition-colors hover:bg-hover",children:[c.jsx(Me,{className:"py-2 pr-3 pl-4 align-middle font-mono whitespace-nowrap tabular-nums text-faint",children:new Date(n.createdAt).toLocaleTimeString()}),c.jsx(Me,{className:"px-3 py-2 align-middle whitespace-nowrap text-fg-2",children:c.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[c.jsx("span",{className:`size-[7px] shrink-0 rounded-full ${dx(n.type)}`,"aria-hidden":"true"}),n.type]})}),c.jsx(Me,{className:"max-w-md truncate px-3 py-2 align-middle font-mono text-foreground",children:c.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[n.type==="cache"?c.jsx(P6,{content:n.content}):null,n.type==="inertia"?c.jsx(D6,{content:n.content}):null,c.jsx("span",{className:"truncate",children:Mb(n)})]})}),c.jsx(Me,{className:"px-3 py-2 text-right align-middle font-mono whitespace-nowrap tabular-nums text-fg-2",children:n.durationMs!=null?`${n.durationMs}ms`:"—"}),c.jsx(Me,{className:"hidden py-2 pr-4 pl-3 align-middle font-mono text-[11px] text-faint md:table-cell",children:c.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[n.traceId!==null&&c.jsxs("a",{href:`#/traces/${n.traceId}`,title:`View trace ${n.traceId}`,onClick:a=>a.stopPropagation(),className:"rounded border border-brand-border bg-brand-soft px-1.5 py-0.5 font-mono text-[10px] text-brand hover:bg-panel-2",children:["trace:",n.traceId.slice(0,6)]}),r!==null&&c.jsx("a",{href:z6(r),title:`View all activity for user ${t_(r)}`,onClick:a=>a.stopPropagation(),className:"rounded border border-good/25 bg-good/10 px-1.5 py-0.5 font-mono text-[10px] text-good hover:bg-good/15",children:r}),i.length>0&&c.jsx("span",{children:i.join(" ")})]})})]},n.id)})})]})}function o_e({batch:e,currentId:t,onSelect:n}){return c.jsx("ol",{className:"space-y-1",children:[...e].sort((r,i)=>r.sequence-i.sequence).map(r=>c.jsx("li",{children:c.jsxs("button",{type:"button",onClick:()=>n==null?void 0:n(r.id),className:`flex w-full justify-between gap-4 px-2 py-1 text-left text-xs ${r.id===t?"bg-panel-2 text-brand":"text-muted-foreground hover:bg-panel"}`,children:[c.jsxs("span",{children:[c.jsx("span",{className:"text-brand",children:r.type})," ",Mb(r)]}),c.jsx("span",{className:"text-muted-foreground",children:r.durationMs!=null?`${r.durationMs}ms`:""})]})},r.id))})}const s_e={request:"bg-sky-500",query:"bg-amber-500",http_client:"bg-violet-500",job:"bg-emerald-500",cache:"bg-teal-500",exception:"bg-rose-500",event:"bg-indigo-500",log:"bg-zinc-500",mail:"bg-pink-500",redis:"bg-red-500"};function l_e(e){return s_e[e]??"bg-zinc-600"}function _v(e){return e<1?"<1ms":e<1e3?`${Math.round(e)}ms`:`${(e/1e3).toFixed(2)}s`}function u_e(e){const t=[],n=r=>{for(const i of r)t.push(i),i.children.length>0&&n(i.children)};return n(e),t}function c_e({span:e,totalDurationMs:t,onSelect:n}){const r=t>0?t:1,i=Math.min(100,e.offsetMs/r*100),a=Math.max(.5,Math.min(100-i,e.durationMs/r*100));return c.jsxs("button",{type:"button",onClick:()=>n==null?void 0:n(e.id),"data-testid":"waterfall-row",className:"flex w-full items-center gap-2 rounded px-1 py-0.5 text-left text-[11px] hover:bg-panel-2",children:[c.jsxs("span",{className:"min-w-0 flex-shrink-0 truncate font-mono text-foreground",style:{width:"40%",paddingLeft:`${e.depth*12}px`},title:e.label,children:[c.jsx("span",{className:"mr-1 text-muted-foreground",children:e.type}),e.label]}),c.jsx("span",{className:"relative h-3 flex-1 rounded bg-panel",children:c.jsx("span",{className:`absolute top-0 h-3 rounded ${l_e(e.type)}`,style:{left:`${i}%`,width:`${a}%`},title:`${_v(e.offsetMs)} +${_v(e.durationMs)}`})}),c.jsx("span",{className:"w-16 flex-shrink-0 text-right tabular-nums text-muted-foreground",children:_v(e.durationMs)})]})}function f_e({waterfall:e,onSelect:t}){const n=u_e(e.spans);return n.length===0?c.jsx("p",{className:"text-muted-foreground",children:"No spans in this trace"}):c.jsxs("div",{className:"space-y-0.5",children:[c.jsxs("div",{className:"mb-1 flex items-center justify-between text-[10px] uppercase tracking-[0.12em] text-faint",children:[c.jsx("span",{children:"Span"}),c.jsxs("span",{children:["Total ",_v(e.totalDurationMs)]})]}),n.map(r=>c.jsx(c_e,{span:r,totalDurationMs:e.totalDurationMs,onSelect:t},r.id))]})}function d_e(e,t=.002){const n=e.totalMs>0?e.totalMs:1,r=[],i=(a,o,s,l,u)=>{if(l<t)return;r.push({key:u,node:a,depth:o,x:s,width:l});const f=[...a.children].sort((p,h)=>h.totalMs-p.totalMs);let d=s;for(let p=0;p<f.length;p++){const h=f[p];if(h===void 0)continue;const b=h.totalMs/n*1;i(h,o+1,d,b,`${u}.${p}`),d+=b}};return i(e,0,0,1,"0"),r}function p_e(e){return e.reduce((t,n)=>Math.max(t,n.depth),0)+1}function h_e(e){let t=0;for(let a=0;a<e.length;a++)t=t*31+e.charCodeAt(a)|0;const n=Math.abs(t)%46,r=55+Math.abs(t>>8)%25,i=45+Math.abs(t>>16)%12;return`hsl(${n}, ${r}%, ${i}%)`}function tm(e){return e<1?"<1ms":e<1e3?`${Math.round(e)}ms`:`${(e/1e3).toFixed(2)}s`}const g1=18;function m_e({tree:e}){const[t,n]=x.useState("0"),r=x.useMemo(()=>d_e(e),[e]),i=p_e(r),a=r.find(d=>d.key===t)??r[0],o=(a==null?void 0:a.x)??0,s=(a==null?void 0:a.width)??1,l=(a==null?void 0:a.depth)??0;if(e.totalMs<=0||r.length===0)return c.jsx("div",{className:"flex h-24 items-center justify-center aviary-surface rounded-lg border border-border text-xs text-muted-foreground",children:"No samples — the capture was empty."});const u=r.filter(d=>d.key===t||d.key.startsWith(`${t}.`)),f=i-l;return c.jsxs("div",{children:[t!=="0"&&c.jsx("button",{type:"button",onClick:()=>n("0"),className:"mb-2 rounded border border-line px-2 py-0.5 text-[10px] text-foreground hover:bg-panel-2",children:"← Reset zoom"}),c.jsx("div",{"data-testid":"flamegraph",className:"relative w-full overflow-hidden rounded-lg border border-line bg-background",style:{height:f*g1+2},children:u.map(d=>{const p=(d.x-o)/s*100,h=d.width/s*100,b=(d.depth-l)*g1,m=(d.node.totalMs/e.totalMs*100).toFixed(1);return c.jsx("button",{type:"button",onClick:()=>n(d.key),title:`${d.node.name}${d.node.file?` — ${d.node.file}`:""}
|
|
164
|
+
total ${tm(d.node.totalMs)} (${m}%) · self ${tm(d.node.selfMs)}`,className:"absolute flex items-center overflow-hidden border border-line-soft/60 px-1 text-left text-[10px] leading-none text-black/80 hover:brightness-110",style:{left:`${p}%`,width:`${h}%`,top:b,height:g1-1,background:d.node.name==="(root)"?"var(--line)":h_e(d.node.name)},children:c.jsx("span",{className:"truncate",style:d.node.name==="(root)"?{color:"var(--text)"}:{},children:d.node.name})},d.key)})})]})}function U6(e){try{return JSON.stringify(e,null,2)??String(e)}catch{return String(e)}}async function g_e(e){var r;const t=U6(e),n=(r=globalThis.navigator)==null?void 0:r.clipboard;if(!(n!=null&&n.writeText))return!1;try{return await n.writeText(t),!0}catch{return!1}}function n_(e,t){const n=U6(t),r=new Blob([n],{type:"application/json"}),i=URL.createObjectURL(r),a=document.createElement("a");a.href=i,a.download=e,document.body.appendChild(a),a.click(),a.remove(),URL.revokeObjectURL(i)}const LD="rounded border border-line bg-panel px-2.5 py-1 text-[11px] text-foreground transition-colors hover:border-line hover:bg-panel-2 hover:text-foreground";function v_e({value:e,filename:t}){const[n,r]=x.useState(!1);async function i(){await g_e(e)&&(r(!0),setTimeout(()=>r(!1),1500))}return c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("button",{type:"button",onClick:i,className:LD,children:n?"Copied":"Copy JSON"}),c.jsx("button",{type:"button",onClick:()=>n_(t,e),className:LD,children:"Download JSON"})]})}function y_e({content:e}){const t=typeof e=="object"&&e!==null?e:{},n=typeof t.component=="string"?t.component:"",r=typeof t.method=="string"?t.method:"",i=typeof t.url=="string"?t.url:"",a=typeof t.statusCode=="number"?t.statusCode:null,o=t.isPartial===!0,s=t.versionMismatch===!0,l=typeof t.assetVersion=="string"?t.assetVersion:null,u=typeof t.clientVersion=="string"?t.clientVersion:null,f=t.encryptHistory===!0,d=t.clearHistory===!0,p=typeof t.pageBytes=="number"?t.pageBytes:0,h=t.ssr===!0,b=b_e(t.partial),m=x_e(t.props),g=w_e([...b.except,...m.excludedKeys]),y=[{label:"Shared",keys:m.sharedKeys,accent:"text-info"},{label:"Final",keys:m.finalKeys,accent:"text-foreground"},{label:"Optional",keys:m.optionalKeys,accent:"text-violet"},{label:"Once",keys:m.onceKeys,accent:"text-brand"},{label:"Merge",keys:m.merge,accent:"text-teal",annotations:m.matchPropsOn},{label:"Deep-merge",keys:m.deepMerge,accent:"text-teal",annotations:m.matchPropsOn},{label:"Prepend",keys:m.prepend,accent:"text-teal",annotations:m.matchPropsOn},{label:"Rescued",keys:m.rescued,accent:"text-bad"}];return c.jsxs("div",{children:[c.jsxs("h3",{className:"mb-2 flex flex-wrap items-center gap-2 font-mono text-sm text-info",children:[r?c.jsx("span",{className:"rounded bg-panel px-1.5 py-0.5 text-[10px] uppercase",children:r}):null,i?c.jsx("span",{className:"text-muted-foreground",children:i}):null,c.jsx("span",{className:"text-muted-foreground",children:"→"}),c.jsx("span",{className:"text-foreground",children:n}),a!==null?c.jsx("span",{className:`rounded bg-panel px-1.5 py-0.5 text-[10px] ${a===409?"text-bad":"text-muted-foreground"}`,children:a}):null,o?c.jsx("span",{className:"rounded bg-panel px-1.5 py-0.5 text-[10px] text-warn",children:"partial"}):null,l?c.jsxs("span",{className:"rounded bg-panel px-1.5 py-0.5 text-[10px] text-muted-foreground",children:["asset ",l]}):null]}),s?c.jsxs("div",{className:"mb-4 rounded border border-bad tint-bad p-3 text-xs text-bad",children:["Version mismatch: client ",c.jsx("code",{className:"font-mono",children:u??"unknown"})," ≠ server ",c.jsx("code",{className:"font-mono",children:l??"unknown"})," → 409 forced full reload."]}):null,o?c.jsxs("div",{className:"mb-4",children:[c.jsx("h3",{className:"mb-2 text-[10px] font-semibold uppercase tracking-[0.12em] text-faint",children:"Partial reload"}),c.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[c.jsx(BD,{label:"Kept",keys:b.only,accent:"text-brand"}),c.jsx(BD,{label:"Excluded",keys:g,accent:"text-bad"})]}),b.reset.length>0||b.resetOnce.length>0||b.exceptOnce.length>0?c.jsxs("div",{className:"mt-2 flex flex-wrap gap-3",children:[c.jsx(Gg,{label:"reset",keys:b.reset,accent:"text-warn"}),c.jsx(Gg,{label:"reset-once",keys:b.resetOnce,accent:"text-warn"}),c.jsx(Gg,{label:"except-once",keys:b.exceptOnce,accent:"text-warn"})]}):null]}):null,c.jsxs("div",{className:"mb-4",children:[c.jsx("h3",{className:"mb-2 text-[10px] font-semibold uppercase tracking-[0.12em] text-faint",children:"Props"}),c.jsx("div",{className:"flex flex-col gap-1.5",children:y.map(v=>x.createElement(Gg,{...v,key:v.label}))})]}),Object.keys(m.deferred).length>0?c.jsxs("div",{className:"mb-4",children:[c.jsx("h3",{className:"mb-2 text-[10px] font-semibold uppercase tracking-[0.12em] text-faint",children:"Deferred"}),c.jsx("div",{className:"flex flex-col gap-1.5",children:Object.entries(m.deferred).map(([v,w])=>c.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[c.jsxs("span",{className:"font-mono text-[11px] text-violet",children:[v,":"]}),w.map(S=>c.jsx("span",{className:"rounded bg-panel px-1.5 py-0.5 font-mono text-[10px] text-foreground",children:S},S))]},v))})]}):null,Object.keys(m.once).length>0?c.jsxs("div",{className:"mb-4",children:[c.jsx("h3",{className:"mb-2 text-[10px] font-semibold uppercase tracking-[0.12em] text-faint",children:"Once cache"}),c.jsx("div",{className:"flex flex-col gap-1.5",children:Object.entries(m.once).map(([v,w])=>c.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[c.jsx("span",{className:"rounded bg-panel px-1.5 py-0.5 font-mono text-[10px] text-brand",children:v}),c.jsxs("span",{className:"text-[10px] text-muted-foreground",children:["→ ",w.prop]}),c.jsx("span",{className:"text-[10px] text-muted-foreground",children:w.expiresAt==null?"no expiry":`expires ${w.expiresAt}`})]},v))})]}):null,Object.keys(m.scroll).length>0?c.jsxs("div",{className:"mb-4",children:[c.jsx("h3",{className:"mb-2 text-[10px] font-semibold uppercase tracking-[0.12em] text-faint",children:"Scroll"}),c.jsx("div",{className:"flex flex-col gap-1.5",children:Object.entries(m.scroll).map(([v,w])=>c.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[c.jsx("span",{className:"rounded bg-panel px-1.5 py-0.5 font-mono text-[10px] text-teal",children:v}),c.jsxs("span",{className:"text-[10px] text-muted-foreground",children:["page «",w.pageName,"»"]}),c.jsxs("span",{className:"text-[10px] text-muted-foreground",children:[v1(w.previousPage)," ← ",v1(w.currentPage)," →"," ",v1(w.nextPage)]}),w.reset?c.jsx("span",{className:"rounded bg-panel px-1.5 py-0.5 text-[10px] text-warn",children:"reset"}):null]},v))})]}):null,c.jsxs("div",{className:"mb-4",children:[c.jsx("h3",{className:"mb-2 text-[10px] font-semibold uppercase tracking-[0.12em] text-faint",children:"Resolved props"}),c.jsx("pre",{className:"overflow-auto rounded bg-panel p-3 text-xs text-foreground",children:Yi(t.resolvedProps)})]}),c.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[c.jsx(zD,{label:"encryptHistory",on:f}),c.jsx(zD,{label:"clearHistory",on:d}),c.jsx("span",{className:"rounded bg-panel px-1.5 py-0.5 text-[10px] text-muted-foreground",children:$6(p)}),c.jsxs("span",{className:"rounded bg-panel px-1.5 py-0.5 text-[10px] text-muted-foreground",children:["SSR: ",h?"yes":"no"]})]})]})}function b_e(e){const t=typeof e=="object"&&e!==null?e:{};return{only:Rr(t.only),except:Rr(t.except),reset:Rr(t.reset),resetOnce:Rr(t.resetOnce),exceptOnce:Rr(t.exceptOnce)}}function x_e(e){const t=typeof e=="object"&&e!==null?e:{},n=typeof t.deferred=="object"&&t.deferred!==null?t.deferred:{},r={};if(typeof t.matchPropsOn=="object"&&t.matchPropsOn!==null)for(const[o,s]of Object.entries(t.matchPropsOn))r[o]=Array.isArray(s)?s.join(", "):String(s);const i=typeof t.once=="object"&&t.once!==null?t.once:{},a=typeof t.scroll=="object"&&t.scroll!==null?t.scroll:{};return{sharedKeys:Rr(t.sharedKeys),finalKeys:Rr(t.finalKeys),deferred:n,merge:Rr(t.merge),deepMerge:Rr(t.deepMerge),prepend:Rr(t.prepend),matchPropsOn:r,optionalKeys:Rr(t.optionalKeys),onceKeys:Rr(t.onceKeys),once:i,scroll:a,rescued:Rr(t.rescued),excludedKeys:Rr(t.excludedKeys)}}function Rr(e){return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}function v1(e){return e==null?"∅":String(e)}function w_e(e){return[...new Set(e)]}function Gg({label:e,keys:t,accent:n,annotations:r}){return t.length===0?null:c.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[c.jsx("span",{className:"w-20 shrink-0 text-[11px] text-muted-foreground",children:e}),t.map(i=>{const a=r==null?void 0:r[i];return c.jsxs("span",{className:`rounded bg-panel px-1.5 py-0.5 font-mono text-[10px] ${n}`,children:[i,a?c.jsxs("span",{className:"text-muted-foreground",children:[" · ",a]}):null]},i)})]})}function BD({label:e,keys:t,accent:n}){return c.jsxs("div",{className:"rounded bg-panel p-2",children:[c.jsx("div",{className:"mb-1.5 text-[10px] uppercase tracking-[0.12em] text-faint",children:e}),t.length>0?c.jsx("div",{className:"flex flex-wrap gap-1",children:t.map(r=>c.jsx("span",{className:`font-mono text-[10px] ${n}`,children:r},r))}):c.jsx("span",{className:"text-[10px] text-muted-foreground",children:"—"})]})}function zD({label:e,on:t}){return c.jsxs("span",{className:`rounded bg-panel px-1.5 py-0.5 text-[10px] ${t?"text-brand":"text-muted-foreground"}`,children:[e,": ",t?"on":"off"]})}const S_e=50;function O_e({batch:e,requestId:t,onSelect:n}){const r=[...e].sort((s,l)=>s.sequence-l.sequence),i=r.reduce((s,l)=>l.durationMs!=null&&l.durationMs>s?l.durationMs:s,0),a=r.slice(0,S_e),o=r.length-a.length;return c.jsxs("div",{children:[c.jsx("ol",{className:"space-y-1",children:a.map(s=>c.jsx("li",{children:c.jsx(j_e,{entry:s,maxDuration:i,isRequest:s.id===t,onSelect:n})},s.id))}),o>0?c.jsxs("p",{className:"mt-1 px-2 text-[10px] text-muted-foreground",children:["+",o," more"]}):null]})}function j_e({entry:e,maxDuration:t,isRequest:n,onSelect:r}){const i=t>0&&e.durationMs!=null?e.durationMs/t:0,a=Math.max(0,Math.min(100,i*100));return c.jsxs("button",{type:"button",onClick:o=>{o.stopPropagation(),r==null||r(e.id)},className:`flex w-full items-center gap-2 rounded px-2 py-1 text-left text-xs ${n?"bg-panel-2 text-brand":"text-muted-foreground hover:bg-panel"}`,children:[c.jsx("span",{className:`h-2 w-2 shrink-0 rounded-full ${dx(e.type)}`,"aria-hidden":!0}),c.jsx("span",{className:"w-40 shrink-0 truncate",title:Mb(e),children:Mb(e)}),c.jsx("span",{className:"h-2 flex-1 overflow-hidden rounded bg-panel",children:c.jsx("span",{className:"block h-full rounded bg-brand",style:{width:`${a}%`},"aria-hidden":!0})}),c.jsx("span",{className:"w-12 shrink-0 text-right tabular-nums text-muted-foreground",children:e.durationMs!=null?`${e.durationMs}ms`:"—"})]})}function E_e(e,t,n){return e?e.replaceAll("{traceId}",t).replaceAll("{spanId}",n):null}function T_e({entry:e,onSelect:t}){var a,o;const{data:n}=Ks(),r=e.type==="request"&&e.batch.length>1,i=B6(e.tags);return c.jsxs("div",{className:"grid grid-cols-3 gap-6",children:[c.jsxs("section",{className:"col-span-2",children:[c.jsxs("div",{className:"mb-2 flex items-center justify-between gap-2",children:[c.jsxs("h2",{className:"flex items-center gap-2 text-sm text-brand",children:[e.type,e.type==="cache"?c.jsx(P6,{content:e.content}):null,e.type==="inertia"?c.jsx(D6,{content:e.content}):null]}),c.jsx(v_e,{value:e,filename:`telescope-entry-${e.id}.json`})]}),r?c.jsxs("div",{className:"mb-4",children:[c.jsx("h3",{className:"mb-2 text-[10px] font-semibold uppercase tracking-[0.12em] text-faint",children:"Timeline"}),c.jsx(O_e,{batch:e.batch,requestId:e.id,onSelect:t})]}):null,e.type==="dump"?c.jsx(C_e,{content:e.content}):e.type==="event"?c.jsx(N_e,{content:e.content}):e.type==="log"?c.jsx(L_e,{content:e.content}):e.type==="model"?c.jsx(M_e,{content:e.content}):e.type==="redis"?c.jsx(P_e,{content:e.content}):e.type==="inertia"?c.jsx(y_e,{content:e.content}):e.type==="client_exception"?c.jsxs(c.Fragment,{children:[c.jsx($_e,{content:e.content}),c.jsx(UD,{entryId:e.id,aiEnabled:((a=n==null?void 0:n.ai)==null?void 0:a.enabled)??!1})]}):e.type==="exception"?c.jsxs(c.Fragment,{children:[c.jsx("pre",{className:"overflow-auto rounded bg-panel p-3 text-xs text-foreground",children:JSON.stringify(e.content,null,2)}),c.jsx(UD,{entryId:e.id,aiEnabled:((o=n==null?void 0:n.ai)==null?void 0:o.enabled)??!1})]}):e.type==="request"?c.jsx(I_e,{content:e.content}):I6(e.type)?c.jsx(t_e,{type:e.type,content:e.content}):e.type==="query"?c.jsx(k_e,{entryId:e.id,content:e.content,explainEnabled:(n==null?void 0:n.explainEnabled)??!1}):c.jsx("pre",{className:"overflow-auto rounded bg-panel p-3 text-xs text-foreground",children:JSON.stringify(e.content,null,2)})]}),c.jsxs("aside",{children:[i!==null?c.jsxs("div",{className:"mb-4",children:[c.jsx("h3",{className:"mb-2 text-[10px] font-semibold uppercase tracking-[0.12em] text-faint",children:"User"}),c.jsx("div",{className:"font-mono text-[11px] text-foreground",children:t_(i)}),c.jsx("a",{href:z6(i),className:"mt-1 inline-block text-[11px] text-brand hover:underline",children:"View all activity for this user"})]}):null,e.traceId?c.jsxs("div",{className:"mb-4",children:[c.jsx("h3",{className:"mb-2 text-[10px] font-semibold uppercase tracking-[0.12em] text-faint",children:"Trace"}),c.jsx(B_e,{traceId:e.traceId,spanId:e.spanId,traceLink:(n==null?void 0:n.traceLink)??null})]}):null,c.jsx(A_e,{entry:e}),c.jsxs("h3",{className:"mb-2 text-[10px] font-semibold uppercase tracking-[0.12em] text-faint",children:["Batch (",e.batch.length,")"]}),c.jsx(o_e,{batch:e.batch,currentId:e.id,onSelect:t})]})]})}function A_e({entry:e}){const t=[];if(e.familyHash&&t.push({label:`All ${e.type} like this`,href:`#/entries/${encodeURIComponent(e.type)}?familyHash=${encodeURIComponent(e.familyHash)}`}),e.type!=="request"){const n=e.batch.find(r=>r.type==="request"&&r.id!==e.id);n&&t.push({label:"Originating request",href:`#/entries/view/${n.id}`})}return e.type==="job"&&t.push({label:"Open queue console",href:"#/queues"}),t.length===0?null:c.jsxs("div",{className:"mb-4",children:[c.jsx("h3",{className:"mb-2 text-[10px] font-semibold uppercase tracking-[0.12em] text-faint",children:"Related"}),c.jsx("div",{className:"flex flex-col gap-1",children:t.map(n=>c.jsxs("a",{href:n.href,className:"text-[11px] text-brand hover:underline",children:[n.label," →"]},`${n.href}:${n.label}`))})]})}function Yi(e){try{return JSON.stringify(e,null,2)??String(e)}catch{return String(e)}}function C_e({content:e}){const t=typeof e=="object"&&e!==null?e:{},n=typeof t.label=="string"?t.label:null;return c.jsxs("div",{children:[n?c.jsx("h3",{className:"mb-2 font-mono text-sm text-brand",children:n}):null,c.jsx("pre",{className:"overflow-auto rounded bg-panel p-3 text-xs text-foreground",children:Yi(t.value)})]})}function __e(e){switch(e){case"error":return"text-bad";case"warn":return"text-warn";case"debug":case"verbose":return"text-muted-foreground";default:return"text-foreground"}}function N_e({content:e}){const t=typeof e=="object"&&e!==null?e:{},n=typeof t.name=="string"?t.name:String(t.name??""),r=typeof t.listenerCount=="number"?t.listenerCount:null;return c.jsxs("div",{children:[c.jsxs("h3",{className:"mb-2 flex items-center gap-2 font-mono text-sm text-violet",children:[n,r!==null?c.jsxs("span",{className:"rounded bg-panel px-1.5 py-0.5 text-[10px] text-muted-foreground",children:[r," listener",r===1?"":"s"]}):null]}),c.jsx("pre",{className:"overflow-auto rounded bg-panel p-3 text-xs text-foreground",children:Yi(t.payload)})]})}function R_e(e){switch(e){case"create":return"text-brand";case"update":return"text-warn";case"delete":return"text-bad";default:return"text-foreground"}}function M_e({content:e}){const t=typeof e=="object"&&e!==null?e:{},n=typeof t.action=="string"?t.action:"update",r=typeof t.entity=="string"?t.entity:String(t.entity??""),i=t.id===null||t.id===void 0?null:String(t.id);return c.jsxs("div",{children:[c.jsxs("h3",{className:"mb-2 flex items-center gap-2 font-mono text-sm text-good",children:[c.jsx("span",{className:`rounded bg-panel px-1.5 py-0.5 text-[10px] uppercase ${R_e(n)}`,children:n}),c.jsx("span",{children:r}),i!==null?c.jsxs("span",{className:"text-muted-foreground",children:["#",i]}):null]}),c.jsx("pre",{className:"overflow-auto rounded bg-panel p-3 text-xs text-foreground",children:Yi(t.changes)})]})}function P_e({content:e}){const t=typeof e=="object"&&e!==null?e:{},n=typeof t.command=="string"?t.command:String(t.command??""),r=typeof t.durationMs=="number"?t.durationMs:null;return c.jsxs("div",{children:[c.jsxs("h3",{className:"mb-2 flex items-center gap-2 font-mono text-sm text-bad",children:[n,r!==null?c.jsxs("span",{className:"rounded bg-panel px-1.5 py-0.5 text-[10px] text-muted-foreground",children:[r," ms"]}):null]}),c.jsx("pre",{className:"overflow-auto rounded bg-panel p-3 text-xs text-foreground",children:Yi(t.args)})]})}function FD({label:e,value:t}){return c.jsxs("div",{className:"mb-4",children:[c.jsx("h3",{className:"mb-2 text-[10px] font-semibold uppercase tracking-[0.12em] text-faint",children:e}),c.jsx("pre",{className:"overflow-auto rounded bg-panel p-3 text-xs leading-relaxed text-foreground",children:t})]})}function $_e({content:e}){const t=typeof e=="object"&&e!==null?e:{},n=typeof t.name=="string"?t.name:null,r=typeof t.message=="string"?t.message:String(t.message??""),i=typeof t.url=="string"?t.url:null,a=typeof t.userAgent=="string"?t.userAgent:null,o=typeof t.release=="string"?t.release:null,s=typeof t.stack=="string"?t.stack:null,l=typeof t.componentStack=="string"?t.componentStack:null;return c.jsxs("div",{children:[c.jsxs("h3",{className:"mb-3 flex flex-wrap items-center gap-2 font-mono text-sm text-warn",children:[n?c.jsx("span",{className:"rounded bg-panel px-1.5 py-0.5 text-[10px] uppercase",children:n}):null,c.jsx("span",{className:"text-foreground",children:r}),o?c.jsx("span",{className:"text-[10px] text-muted-foreground",children:o}):null]}),i?c.jsxs("div",{className:"mb-4",children:[c.jsx("h3",{className:"mb-2 text-[10px] font-semibold uppercase tracking-[0.12em] text-faint",children:"URL"}),c.jsx("div",{className:"break-all font-mono text-xs text-foreground",children:i})]}):null,a?c.jsxs("div",{className:"mb-4",children:[c.jsx("h3",{className:"mb-2 text-[10px] font-semibold uppercase tracking-[0.12em] text-faint",children:"User agent"}),c.jsx("div",{className:"break-all font-mono text-[11px] text-muted-foreground",children:a})]}):null,s?c.jsx(FD,{label:"Stack",value:s}):null,l?c.jsx(FD,{label:"Component stack",value:l}):null,H6(t.extra)?c.jsxs("div",{className:"mb-4",children:[c.jsx("h3",{className:"mb-2 text-[10px] font-semibold uppercase tracking-[0.12em] text-faint",children:"Extra"}),c.jsx("pre",{className:"overflow-auto rounded bg-panel p-3 text-xs text-foreground",children:Yi(t.extra)})]}):null]})}function H6(e){return e==null?!1:Array.isArray(e)?e.length>0:typeof e=="object"?Object.keys(e).length>0:!0}function D_e({headers:e}){const t=Object.entries(e);return c.jsxs("details",{className:"mb-4",children:[c.jsxs("summary",{className:"cursor-pointer text-[10px] font-semibold uppercase tracking-[0.12em] text-faint",children:["Headers (",t.length,")"]}),c.jsx("dl",{className:"mt-2 grid grid-cols-[max-content_1fr] gap-x-3 gap-y-1 rounded bg-panel p-3 text-xs",children:t.map(([n,r])=>c.jsxs("div",{className:"contents",children:[c.jsx("dt",{className:"font-mono text-muted-foreground",children:n}),c.jsx("dd",{className:"break-all font-mono text-foreground",children:typeof r=="string"?r:Yi(r)})]},n))})]})}function I_e({content:e}){const t=typeof e=="object"&&e!==null?e:{},n=typeof t.headers=="object"&&t.headers!==null?t.headers:{},r=typeof t.method=="string"?t.method:String(t.method??""),i=typeof t.uri=="string"?t.uri:String(t.uri??""),a=typeof t.statusCode=="number"?t.statusCode:null,o=typeof t.ip=="string"?t.ip:null,s="user"in t&&t.user!==null&&t.user!==void 0;return c.jsxs("div",{children:[c.jsxs("h3",{className:"mb-3 flex items-center gap-2 font-mono text-sm text-brand",children:[c.jsx("span",{className:"rounded bg-panel px-1.5 py-0.5 text-[10px] uppercase",children:r}),c.jsx("span",{className:"text-foreground",children:i}),a!==null?c.jsx("span",{className:"rounded bg-panel px-1.5 py-0.5 text-[10px] text-muted-foreground",children:a}):null,o?c.jsx("span",{className:"text-[10px] text-muted-foreground",children:o}):null]}),c.jsx(D_e,{headers:n}),c.jsx("h3",{className:"mb-2 text-[10px] font-semibold uppercase tracking-[0.12em] text-faint",children:"Payload"}),H6(t.payload)?c.jsx("pre",{className:"mb-4 overflow-auto rounded bg-panel p-3 text-xs text-foreground",children:Yi(t.payload)}):c.jsx("p",{className:"mb-4 text-xs text-muted-foreground",children:"No payload"}),c.jsx("h3",{className:"mb-2 text-[10px] font-semibold uppercase tracking-[0.12em] text-faint",children:"User"}),s?c.jsx("pre",{className:"overflow-auto rounded bg-panel p-3 text-xs text-foreground",children:Yi(t.user)}):c.jsx("p",{className:"text-xs text-muted-foreground",children:"anonymous"})]})}function k_e({entryId:e,content:t,explainEnabled:n}){const r=typeof t=="object"&&t!==null?t:{},i=typeof r.sql=="string"?r.sql:String(r.sql??""),a=r.slow===!0,o=oX(),s=o.data;async function l(){try{await o.mutateAsync(e)}catch{}}return c.jsxs("div",{children:[c.jsxs("div",{className:"mb-2 flex items-center justify-between gap-2",children:[c.jsxs("h3",{className:"flex items-center gap-2 font-mono text-sm text-info",children:["query",a?c.jsx("span",{className:"rounded bg-panel px-1.5 py-0.5 text-[10px] text-warn",children:"slow"}):null]}),n?c.jsx("button",{type:"button",onClick:l,disabled:o.isPending,className:"rounded border border-line px-2 py-1 text-[11px] text-foreground hover:border-brand hover:text-brand disabled:cursor-not-allowed disabled:opacity-50",children:o.isPending?"Explaining…":"Explain"}):null]}),c.jsx("pre",{className:"overflow-auto rounded bg-panel p-3 text-xs text-foreground",children:i}),Array.isArray(r.bindings)&&r.bindings.length>0?c.jsxs(c.Fragment,{children:[c.jsx("h3",{className:"mt-3 mb-2 text-[10px] font-semibold uppercase tracking-[0.12em] text-faint",children:"Bindings"}),c.jsx("pre",{className:"overflow-auto rounded bg-panel p-3 text-xs text-foreground",children:Yi(r.bindings)})]}):null,o.isPending?c.jsx("p",{className:"mt-3 text-xs text-muted-foreground",children:"Running EXPLAIN…"}):s===void 0?null:s.ok?c.jsxs(c.Fragment,{children:[c.jsx("h3",{className:"mt-3 mb-2 text-[10px] font-semibold uppercase tracking-[0.12em] text-faint",children:"Query plan"}),c.jsx("pre",{className:"overflow-auto rounded bg-panel p-3 text-xs text-foreground",children:Yi(s.plan)})]}):c.jsx("p",{className:"mt-3 rounded bg-panel p-3 text-xs text-bad",children:s.message})]})}function L_e({content:e}){const t=typeof e=="object"&&e!==null?e:{},n=typeof t.level=="string"?t.level:"log",r=typeof t.message=="string"?t.message:String(t.message??""),i=typeof t.context=="string"?t.context:null;return c.jsxs("div",{children:[c.jsxs("h3",{className:"mb-2 flex items-center gap-2 text-sm",children:[c.jsx("span",{className:`rounded bg-panel px-1.5 py-0.5 font-mono text-[10px] uppercase ${__e(n)}`,children:n}),i?c.jsx("span",{className:"font-mono text-xs text-muted-foreground",children:i}):null]}),c.jsx("pre",{className:"overflow-auto rounded bg-panel p-3 text-xs text-foreground",children:r})]})}function B_e({traceId:e,spanId:t,traceLink:n}){const r=E_e(n,e,t??"");return c.jsxs("div",{children:[r?c.jsx("a",{href:r,target:"_blank",rel:"noreferrer",className:"font-mono text-[11px] text-brand hover:underline",children:e}):c.jsx("div",{className:"font-mono text-[11px] text-foreground",children:e}),t?c.jsx("div",{className:"font-mono text-[10px] text-muted-foreground",children:t}):null,c.jsx("a",{href:`#/traces/${e}`,className:"mt-1 inline-block text-[11px] text-brand hover:underline",children:"View all in this trace"})]})}function UD({entryId:e,aiEnabled:t}){const n=sX(),r=uX(e,t),[i,a]=x.useState(null);if(!t)return null;async function o(p){try{const h=await n.mutateAsync({entryId:e,force:p});a(h)}catch{a({ok:!1,message:"Diagnosis request failed."})}}const s=r.data??null,l=i,u=l!==null?l.ok===!0&&l.cached:s!==null,f=l!==null?l.ok===!0:s!==null,d=l===null&&r.isLoading;return c.jsxs("div",{className:"mt-4 rounded border border-line p-3",children:[c.jsxs("div",{className:"mb-2 flex items-center justify-between gap-2",children:[c.jsxs("h3",{className:"flex items-center gap-2 text-[10px] font-semibold uppercase tracking-[0.12em] text-faint",children:["AI diagnosis",u?c.jsx("span",{className:"rounded bg-panel px-1.5 py-0.5 text-[10px] normal-case text-warn",children:"cached"}):null]}),c.jsx("div",{className:"flex items-center gap-2",children:d?null:f?c.jsx("button",{type:"button",onClick:()=>o(!0),disabled:n.isPending,className:"rounded border border-line px-2 py-1 text-[11px] text-foreground hover:border-brand hover:text-brand disabled:cursor-not-allowed disabled:opacity-50",children:n.isPending?"Re-running…":"Re-run"}):c.jsx("button",{type:"button",onClick:()=>o(!1),disabled:n.isPending,className:"rounded border border-line px-2 py-1 text-[11px] text-brand hover:border-brand disabled:cursor-not-allowed disabled:opacity-50",children:n.isPending?"Diagnosing…":"Diagnose with AI"})})]}),n.isPending?c.jsx("p",{className:"text-xs text-muted-foreground",children:"Asking the model…"}):d?c.jsx("p",{className:"text-xs text-muted-foreground",children:"Checking for an existing diagnosis…"}):l!==null?l.ok?c.jsx(HD,{source:l.markdown}):c.jsx("p",{className:"rounded bg-panel p-3 text-xs text-bad",children:l.message}):s!==null?c.jsx(HD,{source:s.markdown}):c.jsx("p",{className:"text-xs text-muted-foreground",children:"Get an AI-generated probable cause, where to look, and a suggested fix."})]})}function z_e(e){const t=[];let n=[],r=[],i=0;const a=()=>`block-${i++}`;function o(){n.length!==0&&(t.push({id:a(),kind:"paragraph",text:n.join(`
|
|
165
|
+
`)}),n=[])}function s(){r.length!==0&&(t.push({id:a(),kind:"bullets",items:r}),r=[])}for(const l of e.split(`
|
|
166
|
+
`)){const u=l.trimEnd();/^#{1,6}\s+/.test(u)?(o(),s(),t.push({id:a(),kind:"heading",text:u.replace(/^#{1,6}\s+/,"")})):/^[-*]\s+/.test(u)?(o(),r.push({id:a(),text:u.replace(/^[-*]\s+/,"")})):u.trim()===""?(o(),s()):(s(),n.push(u))}return o(),s(),t}function HD({source:e}){const t=z_e(e);return c.jsx("div",{className:"rounded bg-panel p-3",children:t.map(n=>n.kind==="heading"?c.jsx("h4",{className:"mt-3 mb-1 text-xs font-semibold text-brand",children:n.text},n.id):n.kind==="bullets"?c.jsx("ul",{className:"ml-4 list-disc text-xs leading-relaxed text-foreground",children:n.items.map(r=>c.jsx("li",{children:r.text},r.id))},n.id):c.jsx("p",{className:"whitespace-pre-wrap text-xs leading-relaxed text-foreground",children:n.text},n.id))})}const F_e=["id","type","createdAt","durationMs","tags","familyHash","traceId","content"];function qD(e){return/[",\r\n]/.test(e)?`"${e.replace(/"/g,'""')}"`:e}function U_e(e){if(e==null)return"";try{return JSON.stringify(e)??String(e)}catch{return String(e)}}function H_e(e){return[e.id,e.type,e.createdAt,e.durationMs===null?"":String(e.durationMs),e.tags.join("; "),e.familyHash??"",e.traceId??"",U_e(e.content)]}function q_e(e){const t=[F_e.map(qD).join(",")];for(const n of e)t.push(H_e(n).map(qD).join(","));return t.join(`\r
|
|
167
|
+
`)}function V_e(e,t){const n=new Blob([t],{type:"text/csv"}),r=URL.createObjectURL(n),i=document.createElement("a");i.href=r,i.download=e,document.body.appendChild(i),i.click(),i.remove(),URL.revokeObjectURL(r)}const xE=1e3,wE=60*xE,SE=60*wE,VD=24*SE;function Gp(e){return e>=VD?`${Math.round(e/VD)}d`:e>=SE?`${Math.round(e/SE)}h`:e>=wE?`${Math.round(e/wE)}m`:e>=xE?`${Math.round(e/xE)}s`:`${e}ms`}function G_e(e){for(const[t,n]of Object.entries(e))if(n<1)return`${t} sampled @ ${Math.round(n*100)}%`;return null}function K_e(){const{data:e}=Ks();if(!e)return null;const t=G_e(e.sampling??{});return c.jsxs("span",{className:"flex items-center gap-1.5 text-[11px] text-muted-foreground",title:t??void 0,children:[c.jsx("span",{className:"uppercase tracking-[0.12em] text-faint",children:"retention:"}),e.retention?c.jsx("span",{className:"text-muted-foreground",children:Gp(e.retention.afterMs)}):c.jsx("span",{className:"text-muted-foreground",children:"none"}),t?c.jsx("span",{"aria-label":t,className:"cursor-help rounded-full border border-line px-1 text-[9px] text-muted-foreground",children:"?"}):null]})}const q6={request:"#34d399",query:"#38bdf8",job:"#a78bfa",exception:"#f87171",http_client:"#fbbf24",mail:"#f472b6"},GD=["#71717a","#a1a1aa","#22d3ee","#c084fc","#fb923c","#4ade80"],KD=["#34d399","#fbbf24","#f87171","#38bdf8","#a78bfa"],V6="var(--aviary-accent-ink, var(--accent))";function Y_e(e,t=0){const n=GD[t%GD.length];return q6[e]??n??"#71717a"}function y1(e,t,n){if(n)return n;const r=KD[t%KD.length];return q6[e]??r??"#71717a"}function Pd(e,t,n){const r={};return e.forEach((i,a)=>{r[i]={label:(n==null?void 0:n(i))??i,color:t(i,a)}}),r}function zm(e){return{label:e.label,...e.series!==void 0?{series:e.series}:{},...e.id!==void 0?{id:e.id}:{},...e.value!==void 0?{value:e.value}:{}}}function X_e(e){return typeof e=="object"&&e!==null}function G6(e){if(!X_e(e))return;const t=e.activeLabel;return typeof t=="string"&&t.length>0?t:typeof t=="number"?String(t):void 0}function Ms({title:e,right:t,height:n=220,children:r}){return c.jsxs("section",{className:"aviary-surface rounded-lg border border-border p-4",children:[c.jsxs("header",{className:"-mx-4 -mt-4 mb-3 flex items-center justify-between gap-3 border-b border-border px-4 py-3",children:[c.jsx("h3",{className:"text-[12.5px] font-semibold tracking-[0.02em] text-fg",children:e}),t]}),c.jsx("div",{style:{height:n},children:r})]})}function Fm({height:e}){return c.jsx("div",{className:"flex h-full items-center justify-center text-xs text-muted-foreground",style:e===void 0?void 0:{height:e},children:"No data in window."})}const W_e=24;function ku({title:e,data:t,right:n,color:r=V6,valueLabel:i="value",height:a=220,brush:o,valueFormatter:s,onSelect:l}){const u=x.useId(),f=a-64,d=x.useMemo(()=>Pd(["value"],()=>r,()=>i),[r,i]),p=o??t.length>=W_e,h=l?{onClick:b=>{const m=G6(b);if(m===void 0)return;const g=t.find(y=>y.label===m);l(zm({label:m,series:"value",value:g==null?void 0:g.value}))},className:"cursor-pointer"}:{};return c.jsx(Ms,{title:e,right:n,height:f,children:t.length===0?c.jsx(Fm,{height:f}):c.jsx(pu,{config:d,children:c.jsxs(wU,{data:t,margin:{top:4,right:8,bottom:0,left:-16},...h,children:[c.jsx("defs",{children:c.jsxs("linearGradient",{id:u,x1:"0",y1:"0",x2:"0",y2:"1",children:[c.jsx("stop",{offset:"0%",stopColor:oo("value"),stopOpacity:.35}),c.jsx("stop",{offset:"100%",stopColor:oo("value"),stopOpacity:0})]})}),c.jsx(Mm,{vertical:!1}),c.jsx(So,{dataKey:"label",tickLine:!1,minTickGap:24}),c.jsx(Oo,{tickLine:!1,width:52,allowDecimals:!1}),c.jsx(Xf,{cursor:{stroke:"var(--line)"},content:c.jsx(Wf,{...s?{valueFormatter:b=>s(b)}:{}})}),c.jsx(Io,{type:"monotone",dataKey:"value",name:i,stroke:oo("value"),strokeWidth:2,fill:`url(#${u})`,isAnimationActive:!1,dot:!1,activeDot:{r:3}}),p&&c.jsx(Bs,{...jU,dataKey:"label"})]})})})}const Q_e=24;function P0({title:e,data:t,series:n,right:r,height:i=240,brush:a,onSelect:o,colors:s}){const l=i-64,u=x.useMemo(()=>Pd(n,(m,g)=>(s==null?void 0:s[m])??Y_e(m,g)),[n,s]),{hidden:f,toggle:d,isHidden:p}=bOe(),h=a??t.length>=Q_e,b=o?{onClick:m=>{const g=G6(m);g!==void 0&&o(zm({label:g}))},className:"cursor-pointer"}:{};return c.jsx(Ms,{title:e,right:r,height:l,children:t.length===0||n.length===0?c.jsx(Fm,{height:l}):c.jsx(pu,{config:u,children:c.jsxs(wU,{data:t,margin:{top:4,right:8,bottom:0,left:-16},...b,children:[c.jsx(Mm,{vertical:!1}),c.jsx(So,{dataKey:"label",tickLine:!1,minTickGap:24}),c.jsx(Oo,{tickLine:!1,width:52,allowDecimals:!1}),c.jsx(Xf,{cursor:{stroke:"var(--line)"},content:c.jsx(Wf,{})}),c.jsx(Gj,{content:c.jsx(Yj,{hidden:f,onToggle:d})}),n.map(m=>c.jsx(Io,{type:"monotone",dataKey:m,name:m,stackId:"1",stroke:oo(m),strokeWidth:1.5,fill:oo(m),fillOpacity:.25,hide:p(m),isAnimationActive:!1},m)),h&&c.jsx(Bs,{...jU,dataKey:"label"})]})})})}function Z_e(e,t){return e.length<=t?e:`${e.slice(0,Math.max(0,t-1))}…`}function Wl({title:e,data:t,right:n,color:r=V6,valueLabel:i="value",height:a=220,horizontal:o=!1,truncateLabel:s,valueFormatter:l,onSelect:u}){const f=a-64,d=x.useMemo(()=>Pd(["value"],()=>r,()=>i),[r,i]);function p(g,y){const v=t[y];v&&(u==null||u(zm({label:v.label,id:v.id,value:v.value})))}const h=s!==void 0?{tickFormatter:g=>Z_e(g,s)}:{},m=u!==void 0?{onClick:p,cursor:"pointer"}:{};return c.jsx(Ms,{title:e,right:n,height:f,children:t.length===0?c.jsx(Fm,{height:f}):c.jsx(pu,{config:d,children:c.jsxs(uC,{data:t,layout:o?"vertical":"horizontal",margin:{top:4,right:8,bottom:0,left:o?8:-16},children:[c.jsx(Mm,{horizontal:!o,vertical:o}),o?c.jsx(So,{type:"number",tickLine:!1,allowDecimals:!1}):c.jsx(So,{dataKey:"label",tickLine:!1,interval:0,...h}),o?c.jsx(Oo,{type:"category",dataKey:"label",tickLine:!1,width:160,interval:0,...h}):c.jsx(Oo,{tickLine:!1,width:52,allowDecimals:!1}),c.jsx(Xf,{cursor:{fill:"color-mix(in srgb, var(--text) 5%, transparent)"},content:c.jsx(Wf,{...l?{valueFormatter:g=>l(g)}:{}})}),c.jsx(Do,{dataKey:"value",name:i,fill:oo("value"),radius:o?[0,3,3,0]:[3,3,0,0],isAnimationActive:!1,...m,children:t.map(g=>c.jsx(Td,{fill:g.color??oo("value")},g.id??g.label))})]})})})}const K6=["waiting","active","delayed","failed","completed","paused"],Y6={waiting:"text-foreground",active:"text-brand",delayed:"text-warn",failed:"text-bad",completed:"text-good",paused:"text-muted-foreground"};function Lo(e){if(e==null)return"—";const t=Date.now()-e;if(t<0)return"just now";const n=Math.floor(t/1e3);if(n<60)return`${n}s ago`;const r=Math.floor(n/60);if(r<60)return`${r}m ago`;const i=Math.floor(r/60);return i<24?`${i}h ago`:`${Math.floor(i/24)}d ago`}const J_e="1h";function eNe(e){const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}function Um(e){return((e==null?void 0:e.buckets)??[]).map(t=>({label:eNe(t.t),value:t.total}))}function ir({label:e,value:t,accent:n="text-foreground"}){return c.jsxs("div",{className:"aviary-surface rounded-lg border border-border px-4 py-3",children:[c.jsx("p",{className:"text-[10px] uppercase tracking-[0.12em] text-faint",children:e}),c.jsx("p",{className:`mt-1 text-2xl font-semibold tabular-nums ${n}`,children:t})]})}function Hm({children:e}){return c.jsx("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-4",children:e})}function r_({children:e}){return c.jsx("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-2",children:e})}function tNe(e){return e.map(t=>({label:t.label!==""?t.label:t.familyHash.slice(0,12),value:t.p99,id:t.familyHash}))}function nNe(e){return[{label:"2xx",value:e["2xx"],color:"var(--good)"},{label:"3xx",value:e["3xx"],color:"#38bdf8"},{label:"4xx",value:e["4xx"],color:"var(--warn)"},{label:"5xx",value:e["5xx"],color:"var(--bad)"},{label:"other",value:e.other,color:"var(--aviary-muted, var(--muted))"}]}function rNe(e){return e.topKeys.map(t=>({label:t.key,value:t.count}))}function iNe({stats:e}){const t=e.latency,n=Ra();return c.jsxs(c.Fragment,{children:[c.jsxs(Hm,{children:[c.jsx(ir,{label:"Total",value:e.total.toLocaleString()}),c.jsx(ir,{label:"p50 ms",value:t?t.p50.toLocaleString():"—"}),c.jsx(ir,{label:"p99 ms",value:t?t.p99.toLocaleString():"—",accent:"text-info"}),c.jsx(ir,{label:"Slow",value:t?t.slow.toLocaleString():"—",accent:t&&t.slow>0?"text-warn":"text-foreground"})]}),c.jsxs(r_,{children:[e.families?c.jsx(Wl,{title:"Slowest query shapes (p99)",valueLabel:"p99 ms",data:tNe(e.families),horizontal:!0,truncateLabel:40,onSelect:r=>{r.id!==void 0&&n(`/entries/query?familyHash=${encodeURIComponent(r.id)}`)}}):null,c.jsx(ku,{title:"Queries over time",valueLabel:"queries",data:Um(e.overTime)})]})]})}function aNe(e){return Object.entries(e).map(([t,n])=>({label:t,value:n.hits})).sort((t,n)=>t.label.localeCompare(n.label))}function oNe({stats:e}){const t=e.cache,n=(t==null?void 0:t.byTier)??{},r=Object.keys(n),i=(t==null?void 0:t.staleHits)??0,a=(t==null?void 0:t.deletes)??0;return c.jsxs(c.Fragment,{children:[c.jsxs(Hm,{children:[c.jsx(ir,{label:"Hit ratio",value:t?`${Math.round(t.hitRatio*100)}%`:"—",accent:"text-brand"}),c.jsx(ir,{label:"Hits",value:t?t.hits.toLocaleString():"—"}),c.jsx(ir,{label:"Misses",value:t?t.misses.toLocaleString():"—"}),c.jsx(ir,{label:"Sets",value:t?t.sets.toLocaleString():"—"}),a>0?c.jsx(ir,{label:"Deletes",value:a.toLocaleString()}):null,i>0?c.jsx(ir,{label:"Stale hits",value:i.toLocaleString(),accent:"text-warn"}):null]}),c.jsxs(r_,{children:[t?c.jsx(Wl,{title:"Hits vs misses",valueLabel:"count",data:[{label:"hits",value:t.hits,color:"var(--good)"},{label:"misses",value:t.misses,color:"var(--bad)"}]}):null,r.length>0?c.jsx(Wl,{title:"Hits by tier",valueLabel:"hits",data:aNe(n)}):null,c.jsx(ku,{title:"Cache over time",valueLabel:"ops",data:Um(e.overTime)})]}),t?c.jsx(Wl,{title:"Top keys",valueLabel:"count",data:rNe(t)}):null]})}function sNe({stats:e}){const t=e.latency,n=e.status,r=n?n["4xx"]+n["5xx"]:0,i=e.total>0?Math.round(r/e.total*100):0;return c.jsxs(c.Fragment,{children:[c.jsxs(Hm,{children:[c.jsx(ir,{label:"Total",value:e.total.toLocaleString()}),c.jsx(ir,{label:"p99 ms",value:t?t.p99.toLocaleString():"—",accent:"text-info"}),c.jsx(ir,{label:"Error %",value:`${i}%`,accent:r>0?"text-bad":"text-foreground"})]}),c.jsxs(r_,{children:[n?c.jsx(Wl,{title:"Status codes",valueLabel:"count",data:nNe(n)}):null,c.jsx(ku,{title:"Throughput",valueLabel:"requests",data:Um(e.overTime)})]})]})}function lNe({values:e}){if(e.length===0)return null;const t=Math.max(1,...e);return c.jsx("div",{className:"flex h-6 items-end gap-px","aria-hidden":"true",children:e.map((n,r)=>c.jsx("div",{className:"w-1 rounded-sm bg-warn",style:{height:`${Math.max(2,Math.round(n/t*100))}%`}},r))})}function uNe({group:e}){const t=new Date(e.lastAt).getTime();return c.jsxs(dy,{to:`/entries/exception?familyHash=${encodeURIComponent(e.key)}`,className:"flex items-center gap-3 aviary-surface rounded-lg border border-border px-4 py-3 transition hover:border-line hover:bg-panel/70",children:[c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsx("p",{className:"truncate font-mono text-sm font-semibold text-bad",children:e.class}),c.jsx("p",{className:"truncate text-xs text-muted-foreground",children:e.message})]}),c.jsx(lNe,{values:e.overTime}),c.jsxs("div",{className:"shrink-0 text-right",children:[c.jsx("p",{className:"text-sm font-semibold tabular-nums text-foreground",children:e.count.toLocaleString()}),c.jsx("p",{className:"text-[10px] text-muted-foreground",children:Lo(Number.isNaN(t)?null:t)})]})]})}function cNe({stats:e}){const t=e.exceptions??[];return c.jsxs(c.Fragment,{children:[c.jsxs(Hm,{children:[c.jsx(ir,{label:"Total",value:e.total.toLocaleString()}),c.jsx(ir,{label:"Groups",value:t.length.toLocaleString(),accent:t.length>0?"text-warn":"text-foreground"})]}),t.length>0?c.jsxs("div",{className:"space-y-2",children:[c.jsx("p",{className:"text-[10px] uppercase tracking-[0.12em] text-faint",children:"Exception groups"}),t.map(n=>c.jsx(uNe,{group:n},n.key))]}):null,c.jsx(ku,{title:"Exceptions over time",valueLabel:"exceptions",data:Um(e.overTime)})]})}function fNe({stats:e}){return c.jsxs(c.Fragment,{children:[c.jsx(Hm,{children:c.jsx(ir,{label:"Total",value:e.total.toLocaleString()})}),c.jsx(ku,{title:"Over time",valueLabel:"entries",data:Um(e.overTime)})]})}function dNe({stats:e}){return e.type==="query"?c.jsx(iNe,{stats:e}):e.type==="cache"?c.jsx(oNe,{stats:e}):e.type==="request"?c.jsx(sNe,{stats:e}):e.type==="exception"?c.jsx(cNe,{stats:e}):c.jsx(fNe,{stats:e})}function pNe({type:e}){const{data:t}=gX(e,J_e);return t?c.jsxs("div",{className:"mb-4 space-y-4",children:[c.jsx(dNe,{stats:t}),t.truncated?c.jsx("p",{className:"text-[10px] text-muted-foreground",children:"sampled (window capped)"}):null]}):c.jsx("div",{className:"mb-4 h-24 animate-pulse rounded-lg border border-line bg-panel/20"})}const hNe=["15m","1h","6h","24h"];function $d({value:e,onChange:t}){return c.jsxs(mE,{value:e,onValueChange:n=>{typeof n=="string"&&t(n)},children:[c.jsx(vE,{"aria-label":"Time window",children:c.jsx(gE,{})}),c.jsx(yE,{align:"end",children:hNe.map(n=>c.jsx(Op,{value:n,children:n},n))})]})}const mNe=200,gNe=48;function vNe(e,t){const[n,r]=x.useState(e);return x.useEffect(()=>{const i=setTimeout(()=>r(e),t);return()=>clearTimeout(i)},[e,t]),n}function YD({onSelect:e,prefix:t="",placeholder:n="Filter by tag…",ariaLabel:r="Filter by tag"}){var T;const[i,a]=x.useState(""),[o,s]=x.useState(!1),[l,u]=x.useState(0),f=x.useRef(null),d=x.useId(),p=i.trim(),h=`${t}${p}`,b=vNe(p,mNe),m=mX(t,b),g=((T=m.data)==null?void 0:T.pages.flatMap(A=>A.data))??[],y=o&&g.length>0,v=x.useRef(null);function w(){const A=v.current;!A||!m.hasNextPage||m.isFetchingNextPage||A.scrollTop+A.clientHeight>=A.scrollHeight-gNe&&m.fetchNextPage()}function S(A){return t!==""&&A.startsWith(t)?A.slice(t.length):A}x.useEffect(()=>{u(A=>A>=g.length?0:A)},[g.length]),x.useEffect(()=>{function A(C){var N;const _=C.target;_ instanceof Node&&!((N=f.current)!=null&&N.contains(_))&&s(!1)}return document.addEventListener("mousedown",A),()=>document.removeEventListener("mousedown",A)},[]);function O(A){e(A),a(S(A)),s(!1)}function j(A){if(A.key==="Escape"){s(!1);return}if(!y){A.key==="Enter"&&p!==""&&O(h);return}if(A.key==="ArrowDown")A.preventDefault(),u(C=>(C+1)%g.length);else if(A.key==="ArrowUp")A.preventDefault(),u(C=>(C-1+g.length)%g.length);else if(A.key==="Enter"){A.preventDefault();const C=g[l];C?O(C.tag):p!==""&&O(h)}}const E=y?`${d}-option-${l}`:void 0;return c.jsxs("div",{ref:f,className:"relative",children:[c.jsx(nd,{type:"text",value:i,onChange:A=>{a(A.target.value),s(!0)},onFocus:()=>s(!0),onKeyDown:j,placeholder:n,"aria-label":r,role:"combobox","aria-expanded":y,"aria-controls":d,"aria-autocomplete":"list",...E?{"aria-activedescendant":E}:{}}),y?c.jsxs("div",{id:d,role:"listbox","aria-label":"Tag suggestions",tabIndex:-1,ref:v,onScroll:w,className:"absolute left-0 top-full z-10 mt-1 max-h-64 w-48 overflow-auto rounded border border-line bg-popover py-1 shadow-lg",children:[g.map((A,C)=>c.jsxs("div",{id:`${d}-option-${C}`,role:"option",tabIndex:-1,"aria-selected":C===l,onMouseDown:_=>{_.preventDefault(),O(A.tag)},onMouseEnter:()=>u(C),className:`flex cursor-pointer items-center justify-between gap-3 px-2 py-1 text-xs ${C===l?"bg-panel-2 text-foreground":"text-foreground"}`,children:[c.jsx("span",{className:"truncate",children:S(A.tag)}),c.jsx("span",{className:"shrink-0 text-muted-foreground",children:A.count})]},A.tag)),m.isFetchingNextPage?c.jsx("p",{className:"px-2 py-1 text-[10px] text-muted-foreground",children:"loading more…"}):null]}):null]})}function Ku({title:e,children:t}){return c.jsxs("section",{className:"aviary-surface mb-4 rounded-lg border border-border",children:[c.jsx("h3",{className:"border-b border-border px-4 py-3 text-[12.5px] font-semibold tracking-[0.02em] text-fg",children:e}),c.jsx("div",{className:"px-4 pt-3 pb-4 text-xs",children:t})]})}function yNe({report:e,onSelectEntry:t,onSelectFamily:n,onSelectRoute:r,onSelectOutgoing:i}){return c.jsxs("div",{className:"text-xs",children:[e.truncated&&c.jsxs("p",{className:"mb-4 text-warn",children:["Scan truncated at ",e.scanned," entries — widen the window with care."]}),c.jsx(Ku,{title:"Entries by type",children:c.jsxs("div",{className:"flex flex-wrap gap-3",children:[Object.entries(e.counts).map(([a,o])=>c.jsxs("span",{className:"rounded bg-panel px-2 py-1",children:[c.jsx("span",{className:"text-brand",children:a})," ",c.jsx("span",{className:"text-foreground",children:o})]},a)),Object.keys(e.counts).length===0&&c.jsx("span",{className:"text-muted-foreground",children:"No entries in window."})]})}),c.jsx(Ku,{title:"Slowest",children:c.jsx("table",{className:"w-full text-left",children:c.jsxs("tbody",{children:[e.slowest.map(a=>c.jsxs("tr",{tabIndex:0,onClick:()=>t==null?void 0:t(a.id),onKeyDown:o=>{(o.key==="Enter"||o.key===" ")&&(t==null||t(a.id))},className:"cursor-pointer border-t border-line-soft hover:bg-panel",children:[c.jsx("td",{className:"py-1 text-brand",children:a.type}),c.jsx("td",{className:"max-w-md truncate text-foreground",children:a.label}),c.jsxs("td",{className:"text-right text-muted-foreground",children:[a.durationMs,"ms"]})]},a.id)),e.slowest.length===0&&c.jsx("tr",{children:c.jsx("td",{className:"py-1 text-muted-foreground",children:"—"})})]})})}),c.jsx(Ku,{title:"Top exceptions",children:c.jsx("table",{className:"w-full text-left",children:c.jsxs("tbody",{children:[e.topExceptions.map(a=>c.jsxs("tr",{className:"border-t border-line-soft",children:[c.jsx("td",{className:"py-1 text-bad",children:a.class}),c.jsx("td",{className:"max-w-md truncate text-foreground",children:a.message}),c.jsxs("td",{className:"text-right text-muted-foreground",children:["×",a.count]})]},a.familyHash)),e.topExceptions.length===0&&c.jsx("tr",{children:c.jsx("td",{className:"py-1 text-muted-foreground",children:"No exceptions 🎉"})})]})})}),c.jsx(Ku,{title:"N+1 query hotspots",children:c.jsx("table",{className:"w-full text-left",children:c.jsxs("tbody",{children:[e.nPlusOne.map(a=>c.jsxs("tr",{tabIndex:0,onClick:()=>n==null?void 0:n(a.familyHash),onKeyDown:o=>{(o.key==="Enter"||o.key===" ")&&(n==null||n(a.familyHash))},className:"cursor-pointer border-t border-line-soft hover:bg-panel",children:[c.jsxs("td",{className:"whitespace-nowrap py-1 text-warn",children:["×",a.perRequest,c.jsx("span",{className:"text-muted-foreground",children:" per request"})]}),c.jsx("td",{className:"max-w-md truncate text-foreground",children:a.sql}),c.jsxs("td",{className:"whitespace-nowrap text-right text-muted-foreground",children:[a.requests," requests · ",a.total," total"]})]},a.familyHash)),e.nPlusOne.length===0&&c.jsx("tr",{children:c.jsx("td",{className:"py-1 text-muted-foreground",children:"None detected"})})]})})}),c.jsx(Ku,{title:"Slow request hotspots",children:c.jsx("table",{className:"w-full text-left",children:c.jsxs("tbody",{children:[e.slowRoutes.map(a=>c.jsxs("tr",{tabIndex:0,onClick:()=>r==null?void 0:r(a.route),onKeyDown:o=>{(o.key==="Enter"||o.key===" ")&&(r==null||r(a.route))},className:"cursor-pointer border-t border-line-soft hover:bg-panel",children:[c.jsx("td",{className:"max-w-md truncate py-1 font-mono text-foreground",children:a.route}),c.jsxs("td",{className:"whitespace-nowrap text-right text-warn",children:[a.p99,"ms",c.jsx("span",{className:"text-muted-foreground",children:" p99"})]}),c.jsxs("td",{className:"whitespace-nowrap text-right text-muted-foreground",children:["×",a.count]})]},a.route)),e.slowRoutes.length===0&&c.jsx("tr",{children:c.jsx("td",{className:"py-1 text-muted-foreground",children:"No routes over the slow threshold"})})]})})}),c.jsx(Ku,{title:"Slow outgoing HTTP",children:c.jsx("table",{className:"w-full text-left",children:c.jsxs("tbody",{children:[e.slowOutgoing.map(a=>c.jsxs("tr",{tabIndex:0,onClick:()=>i==null?void 0:i(a.route),onKeyDown:o=>{(o.key==="Enter"||o.key===" ")&&(i==null||i(a.route))},className:"cursor-pointer border-t border-line-soft hover:bg-panel",children:[c.jsx("td",{className:"max-w-md truncate py-1 font-mono text-foreground",children:a.route}),c.jsxs("td",{className:"whitespace-nowrap text-right text-warn",children:[a.p99,"ms",c.jsx("span",{className:"text-muted-foreground",children:" p99"})]}),c.jsxs("td",{className:"whitespace-nowrap text-right text-muted-foreground",children:["×",a.count]})]},a.route)),e.slowOutgoing.length===0&&c.jsx("tr",{children:c.jsx("td",{className:"py-1 text-muted-foreground",children:"No outgoing calls over the slow threshold"})})]})})})]})}function XD(e){return e?`${Math.round(e.p95)}ms`:"—"}function bNe({report:e,sparkline:t}){return c.jsxs("table",{className:"w-full text-left text-xs",children:[c.jsx("thead",{className:"text-muted-foreground",children:c.jsxs("tr",{children:[c.jsx("th",{className:"py-2 font-normal",children:"Queue"}),c.jsx("th",{className:"font-normal",children:"Total"}),c.jsx("th",{className:"font-normal",children:"Failed"}),c.jsx("th",{className:"font-normal",children:"Fail %"}),c.jsx("th",{className:"font-normal",children:"Per min"}),c.jsx("th",{className:"font-normal",children:"Runtime p95"}),c.jsx("th",{className:"font-normal",children:"Wait p95"}),t&&c.jsx("th",{className:"font-normal",children:"Trend"})]})}),c.jsxs("tbody",{children:[e.queues.map(n=>c.jsxs("tr",{className:"border-t border-line-soft",children:[c.jsx("td",{className:"py-1.5 text-brand",children:n.queue}),c.jsx("td",{className:"text-foreground",children:n.total}),c.jsx("td",{className:"text-foreground",children:n.failed}),c.jsxs("td",{className:n.failureRate>0?"text-bad":"text-muted-foreground",children:[(n.failureRate*100).toFixed(1),"%"]}),c.jsx("td",{className:"text-muted-foreground",children:n.throughputPerMinute.toFixed(1)}),c.jsx("td",{className:"text-muted-foreground",children:XD(n.runtimeMs)}),c.jsx("td",{className:"text-muted-foreground",children:XD(n.waitMs)}),t&&c.jsx("td",{className:"text-muted-foreground",children:t(n.queue)})]},n.queue)),e.queues.length===0&&c.jsx("tr",{children:c.jsx("td",{className:"py-2 text-muted-foreground",colSpan:t?8:7,children:"No queue activity in window."})})]})]})}function xNe(e,t,n){if(e.length===0)return"";const r=Math.max(...e,1),i=e.length>1?t/(e.length-1):0;return e.map((a,o)=>{const s=o*i,l=n-a/r*n;return`${s.toFixed(1)},${l.toFixed(1)}`}).join(" ")}function Nv({values:e,width:t=160,height:n=36}){const r=xNe(e,t,n),i=r?`0,${n} ${r} ${t},${n}`:"";return c.jsxs("svg",{width:t,height:n,viewBox:`0 0 ${t} ${n}`,preserveAspectRatio:"none",role:"img","aria-label":"throughput",children:[i&&c.jsx("polygon",{points:i,className:"fill-accent opacity-10"}),r&&c.jsx("polyline",{points:r,className:"fill-none stroke-accent",strokeWidth:1.5})]})}const WD={request:"fill-emerald-400",query:"fill-sky-400",job:"fill-violet-400",exception:"fill-red-400",http_client:"fill-amber-400",mail:"fill-pink-400"};function i_(e){const t=new Set;for(const i of e)for(const a of Object.keys(i.byType))t.add(a);const n=Object.keys(WD).filter(i=>t.has(i)),r=[...t].filter(i=>!(i in WD)).sort();return[...n,...r]}function wNe({queue:e,window:t}){const{data:n}=QT({window:t,tag:`queue:${e}`,buckets:24});return c.jsx(Nv,{values:((n==null?void 0:n.buckets)??[]).map(r=>r.total),width:120,height:20})}function SNe({state:e,value:t}){const n=e==="failed"&&t>0;return c.jsxs("span",{className:`flex items-baseline gap-1 rounded px-1.5 py-0.5 ${n?"tint-bad":"bg-panel-2/60"}`,title:`${t} ${e}`,children:[c.jsx("span",{className:"text-[9px] uppercase tracking-[0.12em] text-faint",children:e.slice(0,4)}),c.jsx("span",{className:`tabular-nums ${t>0?Y6[e]:"text-muted-foreground"}`,children:t})]})}function ONe({summary:e,active:t,onSelect:n}){return c.jsxs("button",{type:"button",onClick:()=>n(e.driver,e.queue),className:`w-full rounded-lg border px-3 py-2.5 text-left transition-colors ${t?"border-brand bg-panel-2":"border-line bg-panel/40 hover:border-line hover:bg-panel"}`,children:[c.jsxs("div",{className:"flex items-center justify-between gap-2",children:[c.jsx("span",{className:"min-w-0 truncate font-medium text-foreground",children:e.queue}),e.isPaused&&c.jsx("span",{className:"shrink-0 rounded bg-violet/15 px-1.5 py-0.5 text-[9px] uppercase tracking-wide text-violet",children:"paused"})]}),c.jsx("div",{className:"mt-0.5 text-[10px] uppercase tracking-[0.12em] text-faint",children:e.driver}),c.jsx("div",{className:"mt-2 flex flex-wrap gap-1 text-[10px]",children:K6.map(r=>c.jsx(SNe,{state:r,value:e.counts[r]},r))})]})}function jNe({selected:e,onSelect:t}){const{data:n,isLoading:r,isError:i}=sB();if(r)return c.jsx("p",{className:"px-1 py-2 text-xs text-muted-foreground",children:"Loading queues…"});if(i)return c.jsx("p",{className:"px-1 py-2 text-xs text-bad",children:"Failed to load queues."});const a=(n==null?void 0:n.queues)??[];return a.length===0?c.jsx("div",{className:"rounded-lg border border-dashed border-line px-3 py-6 text-center text-xs text-muted-foreground",children:"No live queues detected."}):c.jsx("div",{className:"space-y-2",children:a.map(o=>c.jsx(ONe,{summary:o,active:(e==null?void 0:e.driver)===o.driver&&(e==null?void 0:e.queue)===o.queue,onSelect:t},`${o.driver}:${o.queue}`))})}function ENe({counts:e,state:t,onState:n}){return c.jsx(TCe,{value:t,onValueChange:r=>{typeof r=="string"&&n(r)},children:c.jsx(ACe,{children:K6.map(r=>{const i=r===t,a=(e==null?void 0:e[r])??0;return c.jsxs(CCe,{value:r,children:[c.jsx("span",{className:"capitalize",children:r}),c.jsx("span",{className:`tabular-nums text-[11px] ${i?Y6[r]:"text-muted-foreground"}`,children:a})]},r)})})})}const QD=25;function TNe(e){return e.maxAttempts!=null?`${e.attemptsMade}/${e.maxAttempts}`:`${e.attemptsMade}`}function ANe({job:e,onOpen:t}){return c.jsxs("tr",{onClick:()=>t(e.id),onKeyDown:n=>{(n.key==="Enter"||n.key===" ")&&t(e.id)},className:"cursor-pointer border-t border-line-soft align-top hover:bg-panel",children:[c.jsx("td",{className:"py-1.5 pr-2 font-mono text-[11px] text-muted-foreground",children:e.id}),c.jsx("td",{className:"pr-2 text-emerald-400",children:e.name||"—"}),c.jsx("td",{className:"pr-2 tabular-nums text-muted-foreground",children:TNe(e)}),c.jsx("td",{className:"pr-2 whitespace-nowrap text-muted-foreground",children:Lo(e.timestamp)}),c.jsx("td",{className:"max-w-xs truncate pr-2 text-muted-foreground",children:e.failedReason?c.jsx("span",{className:"text-bad",children:e.failedReason}):c.jsx("span",{className:"text-muted-foreground",children:"open to inspect payload →"})})]})}function CNe(e,t){const n=new Map;for(const r of e)n.set(r.id,r);for(const r of t)n.set(r.id,r);return[...n.values()]}function _Ne({driver:e,queue:t,state:n,onOpen:r}){const[i,a]=x.useState(void 0),[o,s]=x.useState([]),l=`${e}\0${t}\0${n}`,u=x.useRef(l);u.current!==l&&(u.current=l,i!==void 0&&a(void 0),o.length>0&&s([]));const{data:f,isLoading:d,isError:p}=eX(e,t,n,i!==void 0?{after:i,first:QD}:{first:QD}),h=f!=null&&f.meta.hasNext?f.meta.nextCursor:null,b=f==null?void 0:f.data;return x.useEffect(()=>{b&&s(i===void 0?m=>NNe(m,b):m=>CNe(m,b))},[b,i]),d&&o.length===0?c.jsx("p",{className:"px-1 py-3 text-xs text-muted-foreground",children:"Loading jobs…"}):p&&o.length===0?c.jsx("p",{className:"px-1 py-3 text-xs text-bad",children:"Failed to load jobs."}):o.length===0?c.jsxs("div",{className:"rounded-lg border border-dashed border-line px-3 py-8 text-center text-xs text-muted-foreground",children:["No ",c.jsx("span",{className:"text-muted-foreground",children:n})," jobs."]}):c.jsxs("div",{className:"space-y-3",children:[c.jsxs("table",{className:"w-full text-left text-xs",children:[c.jsx("thead",{className:"text-muted-foreground",children:c.jsxs("tr",{children:[c.jsx("th",{className:"py-1.5 pr-2 font-normal",children:"ID"}),c.jsx("th",{className:"pr-2 font-normal",children:"Name"}),c.jsx("th",{className:"pr-2 font-normal",children:"Attempts"}),c.jsx("th",{className:"pr-2 font-normal",children:"Age"}),c.jsx("th",{className:"pr-2 font-normal",children:"Reason / Payload"})]})}),c.jsx("tbody",{children:o.map(m=>c.jsx(ANe,{job:m,onOpen:r},m.id))})]}),h!=null&&c.jsx("button",{type:"button",onClick:()=>a(h),className:"w-full rounded-md border border-line py-1.5 text-[11px] text-muted-foreground transition-colors hover:border-line hover:text-foreground",children:"Load more"})]})}function NNe(e,t){const n=new Set(t.map(i=>i.id)),r=e.filter(i=>!n.has(i.id));return[...t,...r]}function $0(e,t,n){return e!=null&&e.mutationsEnabled?(e.actionsByDriver[t]??[]).includes(n):!1}function RNe(e,t){switch(e){case"promote":return t==="delayed";case"retry":return t==="failed"||t==="completed";case"remove":return!0;default:return!1}}function a_(e){return e instanceof Error&&/\b403\b/.test(e.message)}const MNe={retry:"good",promote:"warn",remove:"bad"};function PNe({driver:e,queue:t,id:n,action:r,onDone:i}){const a=nX(),[o,s]=x.useState(!1),l=a.isPending,u=a_(a.error);async function f(){s(!1);try{await a.mutateAsync({driver:e,queue:t,id:n,action:r}),i==null||i()}catch{}}return r==="remove"&&o?c.jsxs("span",{className:"inline-flex items-center gap-1",children:[c.jsx(Tt,{variant:"bad",disabled:l,onClick:f,children:l?"Removing…":"Confirm remove"}),c.jsx(Tt,{variant:"ghost",onClick:()=>s(!1),children:"Cancel"})]}):c.jsxs("span",{className:"inline-flex flex-col",children:[c.jsx(Tt,{variant:MNe[r],disabled:l,onClick:r==="remove"?()=>s(!0):f,className:"capitalize",children:l?`${r}…`:r}),u&&c.jsx("span",{className:"mt-0.5 text-[10px] text-bad",children:"Not authorized"})]})}function $Ne({capabilities:e,driver:t,queue:n,id:r,state:i,onDone:a}){const o=["retry","promote","remove"].filter(s=>$0(e,t,s)&&RNe(s,i));return o.length===0?null:c.jsx("div",{className:"flex flex-wrap items-start gap-1.5",children:o.map(s=>c.jsx(PNe,{driver:t,queue:n,id:r,action:s,onDone:a},s))})}function DNe({capabilities:e,driver:t,queue:n}){const r=lB();if(!$0(e,t,"retry-all"))return null;const i=a_(r.error);async function a(){try{await r.mutateAsync({driver:t,queue:n,action:"retry-all",state:"failed"})}catch{}}return c.jsxs("span",{className:"inline-flex items-center gap-2",children:[c.jsx(Tt,{variant:"good",disabled:r.isPending,onClick:a,children:r.isPending?"Retrying all…":"Retry all failed"}),i&&c.jsx("span",{className:"text-[10px] text-bad",children:"Not authorized"})]})}function INe({capabilities:e,driver:t,queue:n}){const r=lB(),[i,a]=x.useState(!1);if(!$0(e,t,"redrive"))return null;const o=a_(r.error);async function s(){a(!1);try{await r.mutateAsync({driver:t,queue:n,action:"redrive"})}catch{}}return i?c.jsxs("span",{className:"inline-flex items-center gap-1",children:[c.jsx(Tt,{variant:"warn",disabled:r.isPending,onClick:s,children:r.isPending?"Redriving…":"Confirm redrive"}),c.jsx(Tt,{variant:"ghost",onClick:()=>a(!1),children:"Cancel"})]}):c.jsxs("span",{className:"inline-flex items-center gap-2",children:[c.jsx(Tt,{variant:"warn",disabled:r.isPending,onClick:()=>a(!0),children:"Redrive DLQ"}),o&&c.jsx("span",{className:"text-[10px] text-bad",children:"Not authorized"})]})}function kNe(e){if(e===void 0)return"—";try{return JSON.stringify(e,null,2)}catch{return String(e)}}function b1({label:e,value:t}){return c.jsxs("section",{children:[c.jsx("h4",{className:"mb-1 text-[10px] uppercase tracking-[0.12em] text-faint",children:e}),c.jsx("pre",{className:"overflow-auto rounded bg-background p-2.5 text-[11px] leading-relaxed text-foreground ring-1 ring-line",children:kNe(t)})]})}function lp({label:e,value:t}){return c.jsxs("div",{className:"flex items-baseline justify-between gap-3 border-t border-line-soft py-1 first:border-0",children:[c.jsx("span",{className:"text-[10px] uppercase tracking-[0.12em] text-faint",children:e}),c.jsx("span",{className:"tabular-nums text-foreground",children:t})]})}function x1(e){return e==null?"—":`${new Date(e).toLocaleString()} (${Lo(e)})`}function LNe({detail:e,capabilities:t,driver:n,queue:r,state:i,onClose:a}){return c.jsxs("div",{className:"space-y-4",children:[c.jsxs("header",{className:"space-y-1",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"text-sm font-medium text-brand",children:e.name||"job"}),c.jsx(Dc,{className:"capitalize",children:e.state})]}),c.jsx("div",{className:"font-mono text-[11px] text-muted-foreground",children:e.id})]}),c.jsx($Ne,{capabilities:t,driver:n,queue:r,id:e.id,state:i,onDone:a}),c.jsxs("div",{className:"rounded-lg border border-line bg-panel px-3 py-2 text-xs",children:[c.jsx(lp,{label:"Attempts",value:e.maxAttempts!=null?`${e.attemptsMade}/${e.maxAttempts}`:`${e.attemptsMade}`}),c.jsx(lp,{label:"Progress",value:e.progress!=null?`${e.progress}`:"—"}),c.jsx(lp,{label:"Created",value:x1(e.timestamp)}),c.jsx(lp,{label:"Processed",value:x1(e.processedOn)}),c.jsx(lp,{label:"Finished",value:x1(e.finishedOn)})]}),e.failedReason&&c.jsxs("section",{children:[c.jsx("h4",{className:"mb-1 text-[10px] uppercase tracking-wide text-bad",children:"Failed reason"}),c.jsx("p",{className:"tint-bad rounded border px-2.5 py-2 text-[11px]",children:e.failedReason})]}),c.jsx(b1,{label:"Payload (data)",value:e.data}),c.jsx(b1,{label:"Options (opts)",value:e.opts}),e.returnValue!==void 0&&e.returnValue!==null&&c.jsx(b1,{label:"Return value",value:e.returnValue}),e.stacktrace&&e.stacktrace.length>0&&c.jsxs("section",{children:[c.jsx("h4",{className:"mb-1 text-[10px] uppercase tracking-[0.12em] text-faint",children:"Stacktrace"}),c.jsx("pre",{className:"overflow-auto rounded bg-background p-2.5 text-[11px] leading-relaxed text-bad ring-1 ring-line",children:e.stacktrace.join(`
|
|
168
|
+
`)})]})]})}function BNe({driver:e,queue:t,jobId:n,state:r,capabilities:i,onClose:a}){const{data:o,isLoading:s,isError:l}=tX(e,t,n);return c.jsx(t6,{open:!0,onOpenChange:u=>{u||a()},children:c.jsxs(n6,{placement:"right",className:"flex flex-col",children:[c.jsxs("div",{className:"flex items-center justify-between border-b border-line px-4 py-2.5",children:[c.jsx(r6,{className:"text-xs font-normal uppercase tracking-[0.12em] text-faint",children:"Job detail"}),c.jsx(Tt,{variant:"ghost",size:"xs","aria-label":"Close job detail",onClick:a,children:"✕"})]}),c.jsx("div",{className:"flex-1 overflow-auto p-4",children:s?c.jsx("p",{className:"text-xs text-muted-foreground",children:"Loading job…"}):l?c.jsx("p",{className:"text-xs text-bad",children:"Failed to load job."}):o?c.jsx(LNe,{detail:o,capabilities:i,driver:e,queue:t,state:r,onClose:a}):c.jsx("p",{className:"text-xs text-muted-foreground",children:"Job not found (it may have been removed)."})})]})})}function zNe(e){return e instanceof Error&&/\b403\b/.test(e.message)}function FNe(e){const t=e.trim();if(t==="")return{ok:!1,message:"Payload is required."};try{return{ok:!0,value:JSON.parse(t)}}catch{return{ok:!1,message:"Payload must be valid JSON."}}}function UNe({capabilities:e,driver:t,queue:n}){const r=rX(),[i,a]=x.useState(""),[o,s]=x.useState(""),[l,u]=x.useState(null),[f,d]=x.useState(void 0);if(!$0(e,t,"enqueue"))return null;const p=zNe(r.error);async function h(b){b.preventDefault(),d(void 0);const m=FNe(o);if(!m.ok){u(m.message);return}u(null);try{const g=await r.mutateAsync({driver:t,queue:n,...i.trim()!==""?{name:i.trim()}:{},payload:m.value});d(g.id),s("")}catch{}}return c.jsxs("form",{onSubmit:h,className:"space-y-2 rounded-lg border border-line p-3",children:[c.jsx("h3",{className:"text-[10px] uppercase tracking-[0.12em] text-faint",children:"Send message"}),c.jsx("input",{type:"text",value:i,onChange:b=>a(b.target.value),placeholder:"Job name (optional)","aria-label":"Job name",className:"w-full rounded border border-line bg-background px-2 py-1 text-xs text-foreground placeholder:text-muted-foreground"}),c.jsx("textarea",{value:o,onChange:b=>s(b.target.value),placeholder:'{"to": "a@b.c"}',"aria-label":"Payload (JSON)",rows:4,className:"w-full rounded border border-line bg-background px-2 py-1 font-mono text-xs text-foreground placeholder:text-muted-foreground"}),l&&c.jsx("p",{className:"text-[10px] text-bad",children:l}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(Tt,{type:"submit",variant:"good",disabled:r.isPending,children:r.isPending?"Sending…":"Send message"}),p&&c.jsx("span",{className:"text-[10px] text-bad",children:"Not authorized"}),f!==void 0&&!p&&c.jsx("span",{className:"text-[10px] text-good",children:f?`Enqueued job ${f}`:"Message enqueued"})]})]})}function HNe(){const[e,t]=x.useState(null);return x.useEffect(()=>{const n=r=>{t(r.detail)};return window.addEventListener(hO,n),()=>window.removeEventListener(hO,n)},[]),e}function qNe({denial:e}){const t=e.reason==="unauthenticated";return c.jsx("main",{role:"alert",className:"flex min-h-screen items-center justify-center bg-background p-6 text-foreground",children:c.jsxs("div",{className:"max-w-md aviary-surface rounded-lg border border-border p-6 text-center",children:[c.jsx("h1",{className:"text-lg font-semibold",children:t?"Sign in required":"Access denied"}),c.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:t?"Sign in to the app to open Telescope, then reload this page.":"Your account is not allowed to open Telescope."})]})})}function VNe({children:e}){const t=HNe();return t?c.jsx(qNe,{denial:t}):c.jsx(c.Fragment,{children:e})}function ur(e,t){return function({size:r=16,...i}){return c.jsx("svg",{viewBox:"0 0 16 16",width:r,height:r,fill:"none",stroke:"currentColor",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,role:void 0,"aria-label":t,...i,children:e})}}const o_=ur(c.jsxs(c.Fragment,{children:[c.jsx("circle",{cx:"7",cy:"7",r:"4.5"}),c.jsx("path",{d:"M10.5 10.5 14 14"})]})),X6=ur(c.jsx("path",{d:"M4 4l8 8M12 4l-8 8"})),GNe=ur(c.jsxs(c.Fragment,{children:[c.jsx("rect",{x:"1.5",y:"2.5",width:"13",height:"11",rx:"2"}),c.jsx("path",{d:"M6 2.5v11"})]})),W6=ur(c.jsx("path",{d:"M4 6l4 4 4-4"})),Q6=ur(c.jsx("path",{d:"M3.5 8.5l3 3 6-7"})),KNe=ur(c.jsxs(c.Fragment,{children:[c.jsx("circle",{cx:"8",cy:"8",r:"3"}),c.jsx("path",{d:"M8 1v1.5M8 13.5V15M1 8h1.5M13.5 8H15M3.05 3.05l1.06 1.06M11.89 11.89l1.06 1.06M3.05 12.95l1.06-1.06M11.89 4.11l1.06-1.06"})]})),YNe=ur(c.jsx("path",{d:"M13.5 9A6 6 0 116.5 2.5a4.5 4.5 0 007 6.5z"})),ZD=ur(c.jsxs(c.Fragment,{children:[c.jsx("path",{d:"M10 11l4-3.5L10 4"}),c.jsx("path",{d:"M14 7.5H5"}),c.jsx("path",{d:"M6 3H3a1 1 0 00-1 1v7a1 1 0 001 1h3"})]})),Z6=ur(c.jsxs(c.Fragment,{children:[c.jsx("path",{d:"M8 2 1.5 13.5h13z"}),c.jsx("path",{d:"M8 6.5v3M8 11.5h.01"})]})),XNe=ur(c.jsxs(c.Fragment,{children:[c.jsx("path",{d:"M13.5 8a5.5 5.5 0 1 1-1.6-3.9"}),c.jsx("path",{d:"M13.5 2.5v3h-3"})]})),J6=ur(c.jsxs(c.Fragment,{children:[c.jsx("path",{d:"M2 9.5 4 3h8l2 6.5V13H2z"}),c.jsx("path",{d:"M2 9.5h3.5l1 1.5h3l1-1.5H14"})]})),WNe=ur(c.jsxs(c.Fragment,{children:[c.jsx("rect",{x:"1.5",y:"1.5",width:"5.5",height:"5.5",rx:"1.5"}),c.jsx("rect",{x:"9",y:"1.5",width:"5.5",height:"5.5",rx:"1.5"}),c.jsx("rect",{x:"1.5",y:"9",width:"5.5",height:"5.5",rx:"1.5"}),c.jsx("rect",{x:"9",y:"9",width:"5.5",height:"5.5",rx:"1.5"})]})),QNe=ur(c.jsx("path",{d:"M2.5 4h11M2.5 8h7M2.5 12h5"})),ZNe=ur(c.jsxs(c.Fragment,{children:[c.jsx("rect",{x:"2",y:"2",width:"12",height:"5",rx:"1.2"}),c.jsx("rect",{x:"2",y:"9",width:"12",height:"5",rx:"1.2"}),c.jsx("path",{d:"M4.5 4.5h.01M4.5 11.5h.01"})]})),JNe=ur(c.jsxs(c.Fragment,{children:[c.jsx("circle",{cx:"8",cy:"8",r:"6.5"}),c.jsx("path",{d:"M8 4.5V8l2.5 1.5"})]})),eRe=ur(c.jsxs(c.Fragment,{children:[c.jsx("rect",{x:"1.5",y:"2",width:"4.5",height:"4.5",rx:"1.2"}),c.jsx("rect",{x:"10",y:"9.5",width:"4.5",height:"4.5",rx:"1.2"}),c.jsx("path",{d:"M6 4.25h3a1.5 1.5 0 0 1 1.5 1.5V9.5"})]})),OE={workflow:c.jsxs(c.Fragment,{children:[c.jsx("rect",{x:"3",y:"4",width:"6",height:"6",rx:"1.5"}),c.jsx("rect",{x:"15",y:"14",width:"6",height:"6",rx:"1.5"}),c.jsx("path",{d:"M9 7h4a2 2 0 0 1 2 2v5"})]}),telescope:c.jsxs(c.Fragment,{children:[c.jsx("path",{d:"m4 14 13-6 2 4-13 6z"}),c.jsx("path",{d:"m10 16 2 5M14 15l-2 6M17 8l1-3 3 1-1 3"})]}),media:c.jsxs(c.Fragment,{children:[c.jsx("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),c.jsx("circle",{cx:"9",cy:"10",r:"2"}),c.jsx("path",{d:"m21 16-5-5-9 9"})]}),payments:c.jsxs(c.Fragment,{children:[c.jsx("rect",{x:"2.5",y:"5",width:"19",height:"14",rx:"2"}),c.jsx("path",{d:"M2.5 10h19M6.5 15h4"})]}),agent:c.jsxs(c.Fragment,{children:[c.jsx("rect",{x:"5",y:"8",width:"14",height:"11",rx:"3"}),c.jsx("path",{d:"M12 8V4M9 13h.01M15 13h.01M9.5 16.5h5"}),c.jsx("circle",{cx:"12",cy:"3.5",r:"0.5"})]}),identity:c.jsxs(c.Fragment,{children:[c.jsx("path",{d:"M12 3 4.5 6v5.5c0 4.5 3.2 8.2 7.5 9.5 4.3-1.3 7.5-5 7.5-9.5V6z"}),c.jsx("circle",{cx:"12",cy:"10",r:"2.5"}),c.jsx("path",{d:"M8 16a4.5 4.5 0 0 1 8 0"})]}),flags:c.jsxs(c.Fragment,{children:[c.jsx("path",{d:"M5 21V4"}),c.jsx("path",{d:"M5 4h11l-2 4 2 4H5"})]}),generic:c.jsxs(c.Fragment,{children:[c.jsx("rect",{x:"3",y:"3",width:"7",height:"7",rx:"1.5"}),c.jsx("rect",{x:"14",y:"3",width:"7",height:"7",rx:"1.5"}),c.jsx("rect",{x:"3",y:"14",width:"7",height:"7",rx:"1.5"}),c.jsx("rect",{x:"14",y:"14",width:"7",height:"7",rx:"1.5"})]})},tRe=Object.keys(OE);function e8(e){return tRe.includes(e)?e:"generic"}function t8({icon:e,className:t,size:n=16}){return c.jsx("svg",{viewBox:"0 0 24 24",width:n,height:n,fill:"none",stroke:"currentColor",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round",className:t,"aria-hidden":"true","data-icon":e,children:OE[e]??OE.generic})}const nRe={agent:"#a78bfa",durable:"#a3e635",media:"#22d3ee",telescope:"#e879f9"},rRe={agent:"#a78bfa",workflow:"#a3e635",media:"#22d3ee",telescope:"#e879f9"};function n8(e,t){return(e?nRe[e]:void 0)??rRe[t]}function jE({icon:e,accent:t,size:n=26,className:r}){return c.jsx("span",{className:`aviary-tile${r?` ${r}`:""}`,style:{width:n,height:n,...t?{"--aviary-tile":t}:{}},"data-accent":t,children:c.jsx(t8,{icon:e,size:Math.round(n*.58)})})}function ge(...e){return _B(ke(e))}function iRe({className:e,...t}){return c.jsx("div",{"data-slot":"empty",className:ge("flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-lg border-dashed p-12 text-center text-balance",e),...t})}function aRe({className:e,...t}){return c.jsx("div",{"data-slot":"empty-header",className:ge("flex max-w-sm flex-col items-center gap-2",e),...t})}const oRe=md("mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",icon:"flex size-10 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-6"}},defaultVariants:{variant:"default"}});function sRe({className:e,variant:t="default",...n}){return c.jsx("div",{"data-slot":"empty-icon","data-variant":t,className:ge(oRe({variant:t,className:e})),...n})}function lRe({className:e,...t}){return c.jsx("div",{"data-slot":"empty-title",className:ge("cn-font-heading text-lg font-medium tracking-tight",e),...t})}function uRe({className:e,...t}){return c.jsx("div",{"data-slot":"empty-description",className:ge("text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",e),...t})}function cRe({className:e,...t}){return c.jsx("div",{"data-slot":"empty-content",className:ge("flex w-full max-w-sm min-w-0 flex-col items-center gap-4 text-sm text-balance",e),...t})}function r8({title:e,description:t,icon:n,action:r,className:i}){return c.jsxs(iRe,{className:ge("p-8",i),children:[c.jsxs(aRe,{children:[c.jsx(sRe,{variant:"icon",className:"border border-border bg-panel-2 text-faint",children:n??c.jsx(J6,{})}),c.jsx(lRe,{className:"text-[13px] font-semibold text-fg",children:e}),t&&c.jsx(uRe,{className:"text-xs text-faint",children:t})]}),r&&c.jsx(cRe,{children:r})]})}const fRe=x.forwardRef(function(t,n){const{render:r,className:i,disabled:a=!1,focusableWhenDisabled:o=!1,nativeButton:s=!0,style:l,...u}=t,{getButtonProps:f,buttonRef:d}=el({disabled:a,focusableWhenDisabled:o,native:s});return it("button",t,{state:{disabled:a},ref:[n,d],props:[u,f]})}),dRe=md("group/button inline-flex shrink-0 items-center justify-center rounded-md border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-brand-hover",outline:"border-border bg-panel-2 text-dim hover:border-line-strong hover:bg-panel-3 hover:text-foreground aria-expanded:bg-panel-3 aria-expanded:text-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"text-dim hover:bg-hover hover:text-foreground aria-expanded:bg-hover aria-expanded:text-foreground",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline",brand:"border-brand-border bg-brand-soft text-brand hover:bg-brand/20",warn:"border-warn/40 bg-warn/10 text-warn hover:bg-warn/20",info:"border-info/30 bg-info/10 text-info hover:bg-info/20",alt:"border-violet/30 bg-violet/10 text-violet hover:bg-violet/20",chip:"border-border bg-panel-2 text-dim hover:border-line-strong hover:text-foreground aria-pressed:border-brand-border aria-pressed:bg-brand-soft aria-pressed:text-foreground"},size:{default:"h-8 gap-1.5 px-3 text-xs has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),8px)] px-2 text-xs in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-[26px] gap-1 rounded-[6px] px-2.5 text-[11px] [&_svg:not([class*='size-'])]:size-3.5",lg:"h-10 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",icon:"size-9","icon-xs":"size-6 rounded-[min(var(--radius-md),8px)] in-data-[slot=button-group]:rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-md","icon-lg":"size-10",micro:"h-5 gap-1 rounded-sm px-1.5 text-[10px] [&_svg:not([class*='size-'])]:size-3",chip:"h-7 gap-1.5 px-2.5 text-xs [&_svg:not([class*='size-'])]:size-3.5"}},defaultVariants:{variant:"default",size:"default"}});function Ql({className:e,variant:t="default",size:n="default",...r}){return c.jsx(fRe,{"data-slot":"button",className:ge(dRe({variant:t,size:n,className:e})),...r})}class pRe extends x.Component{constructor(){super(...arguments);Be(this,"state",{error:null});Be(this,"reset",()=>{var n,r;(r=(n=this.props).onReset)==null||r.call(n),this.setState({error:null})})}static getDerivedStateFromError(n){return{error:n instanceof Error?n:new Error(String(n))}}componentDidCatch(n,r){typeof console<"u"&&console.error("[aviary-kit] region crashed",n,r)}componentDidUpdate(n){if(!this.state.error)return;const r=n.resetKeys??[],i=this.props.resetKeys??[];(r.length!==i.length||r.some((a,o)=>!Object.is(a,i[o])))&&this.reset()}render(){const{error:n}=this.state;return n?this.props.fallback?this.props.fallback(n,this.reset):c.jsx(hRe,{title:this.props.label?`${this.props.label} failed to render`:"Something broke here",error:n,onRetry:this.reset,className:this.props.className}):this.props.children}}function hRe({title:e,error:t,onRetry:n,className:r}){const i=t instanceof Error?t.message:t?String(t):void 0;return c.jsxs("div",{role:"alert",className:ge("flex flex-col items-start gap-3 rounded-lg border border-bad/25 bg-bad/5 p-4 text-sm",r),children:[c.jsxs("div",{className:"flex items-center gap-2 font-medium text-bad",children:[c.jsx(Z6,{}),e]}),i&&c.jsx("p",{className:"mono break-all text-[11px] text-fg-2",children:i}),n&&c.jsxs(Ql,{variant:"outline",size:"sm",onClick:n,children:[c.jsx(XNe,{}),"Retry"]})]})}const mRe=/^[a-z][a-z0-9-]*$/;function Oc(e){return typeof e=="string"&&e.startsWith("/")&&!e.startsWith("//")&&!e.includes("\\")&&!/[\u0000-\u001f\u007f]/.test(e)}function up(e){return typeof e=="object"&&e!==null?e:void 0}function Kg(e){if(typeof e!="string")return;const t=e.trim();return t===""?void 0:t}function gRe(e){const t=up(e)??{},n={},r=up(t.switcher);r&&Oc(r.endpoint)&&typeof r.others=="number"&&r.others>0&&(n.switcher={endpoint:r.endpoint,others:r.others});const i=up(t.search);if(i&&Oc(i.endpoint)){const l=typeof i.self=="string"&&mRe.test(i.self)?i.self:"";n.search={endpoint:i.endpoint,...l?{self:l}:{}}}else n.switcher&&(n.search={endpoint:`${n.switcher.endpoint}/search`});const a=up(t.viewer),o=Kg(a==null?void 0:a.label);if(a&&o){const l=Kg(a.email),u=Kg(a.role);n.viewer={label:o,...l?{email:l}:{},...u?{role:u}:{}}}const s=up(t.signOut);if(s&&Oc(s.action)){const l=Kg(s.csrfToken);n.signOut={action:s.action,...l?{csrfToken:l}:{}}}else s&&Oc(s.href)&&(n.signOut={href:s.href});return n}function vRe(e){if(typeof document>"u")return{};const t=document.getElementById(e);if(t===null)return{};try{return gRe(JSON.parse(t.textContent??""))}catch{return{}}}function yRe(e){const{open:t,defaultOpen:n=!1,onOpenChange:r,disabled:i}=e,[a,o]=Nb({controlled:t,default:n,name:"Collapsible",state:"open"}),{mounted:s,setMounted:l,transitionStatus:u}=OH(a,!0,!0),f=_i(),[d,p]=x.useState(),h=d===null?void 0:d??f,b=de(m=>{const g=!a,y=Re(Iu,m.nativeEvent);r(g,y),!y.isCanceled&&o(g)});return x.useMemo(()=>({defaultPanelId:f,disabled:i,handleTrigger:b,mounted:s,open:a,panelId:h,setMounted:l,setOpen:o,setPanelIdState:p,transitionStatus:u}),[f,i,b,s,a,h,l,o,p,u])}const i8=x.createContext(void 0);function a8(){const e=x.useContext(i8);if(e===void 0)throw new Error(Wt(15));return e}const bRe="data-open",xRe="data-closed",Yg=dC,wRe="data-panel-open",SRe={[bRe]:""},ORe={[xRe]:""},jRe={open(e){return e?{[wRe]:""}:null}},ERe={open(e){return e?SRe:ORe}},o8={...ERe,...Pm},TRe=x.forwardRef(function(t,n){const{render:r,className:i,defaultOpen:a=!1,disabled:o=!1,onOpenChange:s,open:l,style:u,...f}=t,d=de(s),p=yRe({open:l,defaultOpen:a,onOpenChange:d,disabled:o}),h=x.useMemo(()=>({open:p.open,disabled:p.disabled,transitionStatus:p.transitionStatus}),[p.open,p.disabled,p.transitionStatus]),b=x.useMemo(()=>({...p,onOpenChange:d,state:h}),[p,d,h]),m=it("div",t,{state:h,ref:n,props:f,stateAttributesMapping:o8});return c.jsx(i8.Provider,{value:b,children:m})}),ARe={...jRe,...Pm},CRe=x.forwardRef(function(t,n){const{panelId:r,open:i,handleTrigger:a,state:o,disabled:s}=a8(),{className:l,disabled:u=s,render:f,nativeButton:d=!0,style:p,...h}=t,{getButtonProps:b,buttonRef:m}=el({disabled:u,native:d});return it("button",t,{state:o,ref:[n,m],props:[{"aria-controls":i?r:void 0,"aria-expanded":i,onClick:a},h,b],stateAttributesMapping:ARe})}),Yu={height:void 0,width:void 0};function _Re(e){const{externalRef:t,hiddenUntilFound:n,id:r,keepMounted:i,mounted:a,onOpenChange:o,open:s,setMounted:l,setOpen:u,transitionStatus:f}=e,d=x.useRef(null),p=x.useRef(null),[h,b]=x.useState(Yu),m=x.useRef(Yu),g=x.useRef(!1),y=x.useRef(s),v=x.useRef(!1),[w,S]=x.useState(!1),O=x.useRef(null),j=Ca(t,d),E=qt(s),T=b0(d),A=!s&&!a,C=w?"idle":f,_=s&&(y.current||v.current),N=!s&&a&&p.current==="css-animation"&&h.height===void 0&&h.width===void 0?m.current:h,D=n&&A&&p.current!=="css-animation",R=de((k,I=!0)=>{I&&(m.current=k),b(k)}),$=de(()=>{var k;(k=O.current)==null||k.call(O),O.current=null}),P=de(k=>{$(),O.current=()=>{O.current=null,k()}}),B=de(()=>{s&&a&&p.current==="css-animation"&&(v.current=!0)});le(()=>{!w||f==="starting"||S(!1)},[w,f]),x.useEffect(()=>()=>{B(),$()},[B,$]),le(()=>{s||(y.current=!1,v.current=!1);const k=d.current;if(!k)return;!s&&O.current&&$();const I=NRe(k,_);if(p.current=I,s&&f==="idle"&&y.current&&I==="css-animation"){m.current=Xu(k);return}if(s&&f==="starting"){const q=g.current;if(g.current=!1,I==="none"){R(Xu(k)),S(!0);return}if(I==="css-transition"){const Y=RRe(k);if(R(Xu(k)),!q)return Y;const X=Xg(k,"transition-duration","0s");return P(X),S(!0),Y}R(Xu(k));const G=Xg(k,"animation-name","none");if(!q){G();return}const U=Xg(k,"animation-duration","0s");G(),P(U),S(!0);return}if(!s&&a&&(f==="idle"||f==="starting")){if(I==="none"){R(Yu,!1),l(!1);return}R(Xu(k));return}if(f!=="ending")return;if(I==="none"){l(!1);return}const V=Xu(k);if(!(V.height>0||V.width>0)){l(!1);return}R(V),I==="css-animation"&&Xg(k,"animation-name","none")()},[a,s,$,R,l,P,_,f]),Md({enabled:s&&a&&C==="idle",open:!0,ref:d,onComplete(){s&&R(Yu,!1)}}),x.useEffect(()=>{if(s||!a||C!=="ending")return;if(!d.current){l(!1),R(Yu,!1);return}const I=new AbortController;let V=-1;function M(){E.current||(l(!1),R(Yu,!1))}return V=rr.request(()=>{T(M,I.signal)}),()=>{rr.cancel(V),I.abort()}},[E,a,s,C,T,R,l]),le(()=>{const k=d.current;!k||!n||!A||k.setAttribute("hidden","until-found")},[A,n]),x.useEffect(function(){const I=d.current;if(!I)return;const V=Ki.create();let M=-1;const q=(Y,X)=>{V.start(0,()=>{E.current||(M=rr.request(()=>{E.current||(Y&&(g.current=!1),X&&I.setAttribute(Yg,""),I.setAttribute("hidden","until-found"))}))})},U=Ve(I,"beforematch",Y=>{const X=Re(Ci,Y);if(o(!0,X),X.isCanceled){q(!1,!1);return}g.current=!0;const te=I.hasAttribute(Yg);I.removeAttribute(Yg),u(!0),q(!0,te)});return()=>{V.clear(),rr.cancel(M),U()}},[E,o,u]);const L=i||n||a||s;return{height:N.height,props:{...D?{[Yg]:""}:void 0,hidden:A,id:r},ref:j,shouldPreventOpenAnimation:_,shouldRender:L,transitionStatus:C,width:N.width}}function Xu(e){return{height:e.scrollHeight,width:e.scrollWidth}}function NRe(e,t){const n=Nt(e).getComputedStyle(e),r=(n.animationName.split(",").map(a=>a.trim()).some(a=>a!==""&&a!=="none")||t)&&JD(n.animationDuration),i=JD(n.transitionDuration);return r&&i||i?"css-transition":r?"css-animation":"none"}function JD(e){return e.split(",").map(t=>t.trim()).some(t=>t!==""&&Number.parseFloat(t)>0)}function Xg(e,t,n){const r=e.style.getPropertyValue(t),i=e.style.getPropertyPriority(t);return e.style.setProperty(t,n),()=>{if(r===""){e.style.removeProperty(t);return}e.style.setProperty(t,r,i)}}function RRe(e){const t={"justify-content":e.style.justifyContent,"align-items":e.style.alignItems,"align-content":e.style.alignContent,"justify-items":e.style.justifyItems};Object.keys(t).forEach(i=>{e.style.setProperty(i,"initial","important")});function n(){Object.entries(t).forEach(([i,a])=>{if(a===""){e.style.removeProperty(i);return}e.style.setProperty(i,a)})}const r=rr.request(n);return()=>{rr.cancel(r),n()}}const MRe="--collapsible-panel-height",PRe="--collapsible-panel-width",$Re=x.forwardRef(function(t,n){const{className:r,hiddenUntilFound:i,keepMounted:a,render:o,id:s,style:l,...u}=t,{defaultPanelId:f,mounted:d,onOpenChange:p,open:h,setMounted:b,setPanelIdState:m,setOpen:g,state:y,transitionStatus:v}=a8(),w=i??!1,S=a??!1,O=s||void 0,j=O??f;le(()=>(m(B=>O??(B===null?void 0:B)),()=>{m(B=>B===O?null:B)}),[O,m]);const{height:E,props:T,ref:A,shouldPreventOpenAnimation:C,shouldRender:_,transitionStatus:N,width:D}=_Re({externalRef:n,hiddenUntilFound:w,id:j,keepMounted:S,mounted:d,onOpenChange:p,open:h,setMounted:b,setOpen:g,transitionStatus:v}),R={...y,transitionStatus:N},$=MU(l,R),P=it("div",{...t,style:void 0},{state:R,ref:A,props:[T,{style:{[MRe]:E===void 0?"auto":`${E}px`,[PRe]:D===void 0?"auto":`${D}px`}},u,$?{style:$}:void 0,C?{style:{animationName:"none"}}:void 0],stateAttributesMapping:o8});return _?P:null});function DRe({...e}){return c.jsx(TRe,{"data-slot":"collapsible",...e})}function IRe({...e}){return c.jsx(CRe,{"data-slot":"collapsible-trigger",...e})}function kRe({...e}){return c.jsx($Re,{"data-slot":"collapsible-content",...e})}function s8(e){return it(e.defaultTagName??"div",e,e)}const w1=768;function LRe(){const[e,t]=x.useState(void 0);return x.useEffect(()=>{const n=()=>{t(window.innerWidth<w1)};if(t(window.innerWidth<w1),typeof window.matchMedia!="function")return;const r=window.matchMedia(`(max-width: ${w1-1}px)`);return r.addEventListener("change",n),()=>r.removeEventListener("change",n)},[]),!!e}const BRe=x.forwardRef(function(t,n){const{className:r,render:i,orientation:a="horizontal",style:o,...s}=t;return it("div",t,{state:{orientation:a},ref:n,props:[{role:"separator","aria-orientation":a},s]})});function zRe({...e}){return c.jsx(YC,{"data-slot":"sheet",...e})}function FRe({...e}){return c.jsx(KC,{"data-slot":"sheet-portal",...e})}function URe({className:e,...t}){return c.jsx(hC,{"data-slot":"sheet-overlay",className:ge("fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs",e),...t})}function HRe({className:e,children:t,side:n="right",showCloseButton:r=!0,...i}){return c.jsxs(FRe,{children:[c.jsx(URe,{}),c.jsxs(qC,{"data-slot":"sheet-content","data-side":n,className:ge("fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",e),...i,children:[t,r&&c.jsxs(GU,{"data-slot":"sheet-close",render:c.jsx(Ql,{variant:"ghost",className:"absolute top-4 right-4",size:"icon-sm"}),children:[c.jsx(X6,{}),c.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function qRe({className:e,...t}){return c.jsx("div",{"data-slot":"sheet-header",className:ge("flex flex-col gap-1.5 p-4",e),...t})}function VRe({className:e,...t}){return c.jsx(XC,{"data-slot":"sheet-title",className:ge("cn-font-heading font-medium text-foreground",e),...t})}function GRe({className:e,...t}){return c.jsx(bC,{"data-slot":"sheet-description",className:ge("text-sm text-muted-foreground",e),...t})}function to({className:e,...t}){return c.jsx("div",{"data-slot":"skeleton",className:ge("animate-pulse rounded-md bg-muted",e),...t})}function KRe({delay:e=0,...t}){return c.jsx(qCe,{"data-slot":"tooltip-provider",delay:e,...t})}function YRe({...e}){return c.jsx(PCe,{"data-slot":"tooltip",...e})}function XRe({...e}){return c.jsx(kCe,{"data-slot":"tooltip-trigger",...e})}function WRe({className:e,side:t="top",sideOffset:n=4,align:r="center",alignOffset:i=0,children:a,...o}){return c.jsx(zCe,{children:c.jsx(FCe,{align:r,alignOffset:i,side:t,sideOffset:n,className:"isolate z-50",children:c.jsxs(UCe,{"data-slot":"tooltip-content",className:ge("z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...o,children:[a,c.jsx(HCe,{className:"z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5"})]})})})}const QRe="sidebar_state",ZRe=60*60*24*7,JRe="16rem",eMe="18rem",tMe="3rem",nMe="b",l8=x.createContext(null);function D0(){const e=x.useContext(l8);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}function rMe({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:i,children:a,...o}){const s=LRe(),[l,u]=x.useState(!1),[f,d]=x.useState(e),p=t??f,h=x.useCallback(y=>{const v=typeof y=="function"?y(p):y;n?n(v):d(v),document.cookie=`${QRe}=${v}; path=/; max-age=${ZRe}`},[n,p]),b=x.useCallback(()=>s?u(y=>!y):h(y=>!y),[s,h,u]);x.useEffect(()=>{const y=v=>{v.key===nMe&&(v.metaKey||v.ctrlKey)&&(v.preventDefault(),b())};return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[b]);const m=p?"expanded":"collapsed",g=x.useMemo(()=>({state:m,open:p,setOpen:h,isMobile:s,openMobile:l,setOpenMobile:u,toggleSidebar:b}),[m,p,h,s,l,u,b]);return c.jsx(l8.Provider,{value:g,children:c.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":JRe,"--sidebar-width-icon":tMe,...i},className:ge("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",r),...o,children:a})})}function iMe({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:r,children:i,dir:a,...o}){const{isMobile:s,state:l,openMobile:u,setOpenMobile:f}=D0();return n==="none"?c.jsx("div",{"data-slot":"sidebar",className:ge("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",r),...o,children:i}):s?c.jsx(zRe,{open:u,onOpenChange:f,...o,children:c.jsxs(HRe,{dir:a,"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":eMe},side:e,children:[c.jsxs(qRe,{className:"sr-only",children:[c.jsx(VRe,{children:"Sidebar"}),c.jsx(GRe,{children:"Displays the mobile sidebar."})]}),c.jsx("div",{className:"flex h-full w-full flex-col",children:i})]})}):c.jsxs("div",{className:"group peer hidden text-sidebar-foreground md:block","data-state":l,"data-collapsible":l==="collapsed"?n:"","data-variant":t,"data-side":e,"data-slot":"sidebar",children:[c.jsx("div",{"data-slot":"sidebar-gap",className:ge("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),c.jsx("div",{"data-slot":"sidebar-container","data-side":e,className:ge("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",r),...o,children:c.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border",children:i})})]})}function aMe({className:e,onClick:t,...n}){const{toggleSidebar:r}=D0();return c.jsxs(Ql,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon-sm",className:ge(e),onClick:i=>{t==null||t(i),r()},...n,children:[c.jsx(GNe,{className:"cn-rtl-flip"}),c.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})}function oMe({className:e,...t}){return c.jsx("main",{"data-slot":"sidebar-inset",className:ge("relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",e),...t})}function sMe({className:e,...t}){return c.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:ge("flex flex-col gap-2 p-2",e),...t})}function lMe({className:e,...t}){return c.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:ge("flex flex-col gap-2 p-2",e),...t})}function uMe({className:e,...t}){return c.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:ge("no-scrollbar flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t})}function eI({className:e,...t}){return c.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:ge("relative flex w-full min-w-0 flex-col p-2",e),...t})}function tI({className:e,render:t,...n}){return s8({defaultTagName:"div",props:Ir({className:ge("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",e)},n),render:t,state:{slot:"sidebar-group-label",sidebar:"group-label"}})}function nI({className:e,...t}){return c.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:ge("w-full text-sm",e),...t})}function cMe({className:e,...t}){return c.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:ge("flex w-full min-w-0 flex-col gap-1",e),...t})}function fMe({className:e,...t}){return c.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:ge("group/menu-item relative",e),...t})}const dMe=md("peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function rI({render:e,isActive:t=!1,variant:n="default",size:r="default",tooltip:i,className:a,...o}){const{isMobile:s,state:l}=D0(),u=s8({defaultTagName:"button",props:Ir({className:ge(dMe({variant:n,size:r}),a)},o),render:i?c.jsx(XRe,{render:e}):e,state:{slot:"sidebar-menu-button",sidebar:"menu-button",size:r,active:t}});return i?(typeof i=="string"&&(i={children:i}),c.jsxs(YRe,{children:[u,c.jsx(WRe,{side:"right",align:"center",hidden:l!=="collapsed"||s,...i})]})):u}function pMe({className:e,...t}){return c.jsx("div",{"data-slot":"sidebar-menu-badge","data-sidebar":"menu-badge",className:ge("pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium text-sidebar-foreground tabular-nums select-none group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 peer-data-active/menu-button:text-sidebar-accent-foreground",e),...t})}function Kp(e){return typeof e=="object"&&e!==null?e:void 0}function hMe(e){if(!Array.isArray(e))return[];const t=[];for(const n of e){const r=Kp(n);!r||typeof r.id!="string"||typeof r.title!="string"||!Oc(r.href)||t.push({id:r.id,title:r.title,...typeof r.package=="string"?{package:r.package}:{},icon:e8(r.icon),href:r.href})}return t}function u8(e){const t=Kp(e),n=Array.isArray(t==null?void 0:t.results)?t.results:Array.isArray(t==null?void 0:t.groups)?t.groups:[],r=[];for(const i of n){const a=Kp(i);if(!a||typeof a.id!="string"||typeof a.title!="string"||!Array.isArray(a.hits))continue;const o=[];for(const s of a.hits){const l=Kp(s);!l||typeof l.title!="string"||!Oc(l.href)||o.push({title:l.title,...typeof l.subtitle=="string"?{subtitle:l.subtitle}:{},href:l.href})}o.length>0&&r.push({id:a.id,title:a.title,icon:e8(a.icon),hits:o})}return r}async function s_(e,t){const n=await fetch(e,{headers:{accept:"application/json"},credentials:"same-origin",...t?{signal:t}:{}});if(!n.ok)throw new Error(`HTTP ${n.status}`);return n.json()}let Fa;function c8(e){if((Fa==null?void 0:Fa.endpoint)===e.endpoint)return Fa.result;const t=s_(e.endpoint).then(n=>{var r;return hMe((r=Kp(n))==null?void 0:r.consoles)}).catch(()=>((Fa==null?void 0:Fa.result)===t&&(Fa=void 0),[]));return Fa={endpoint:e.endpoint,result:t},t}async function mMe(e,t,n){return u8(await s_(`${e.endpoint}?q=${encodeURIComponent(t)}`,n))}async function gMe(e,t,n,r){const i=`${e.endpoint}?q=${encodeURIComponent(t)}&console=${encodeURIComponent(n)}`;return u8(await s_(i,r)).filter(a=>a.id===n)}async function vMe(e,t){if(!e.self)return;if(!t)return[e.self];const n=await c8(t);if(n.length!==0)return[e.self,...n.map(r=>r.id).filter(r=>r!==e.self)]}var iI=1,yMe=.9,bMe=.8,xMe=.17,S1=.1,O1=.999,wMe=.9999,SMe=.99,OMe=/[\\\/_+.#"@\[\(\{&]/,jMe=/[\\\/_+.#"@\[\(\{&]/g,EMe=/[\s-]/,f8=/[\s-]/g;function EE(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?iI:SMe;var s=`${i},${a}`;if(o[s]!==void 0)return o[s];for(var l=r.charAt(a),u=n.indexOf(l,i),f=0,d,p,h,b;u>=0;)d=EE(e,t,n,r,u+1,a+1,o),d>f&&(u===i?d*=iI:OMe.test(e.charAt(u-1))?(d*=bMe,h=e.slice(i,u-1).match(jMe),h&&i>0&&(d*=Math.pow(O1,h.length))):EMe.test(e.charAt(u-1))?(d*=yMe,b=e.slice(i,u-1).match(f8),b&&i>0&&(d*=Math.pow(O1,b.length))):(d*=xMe,i>0&&(d*=Math.pow(O1,u-i))),e.charAt(u)!==t.charAt(a)&&(d*=wMe)),(d<S1&&n.charAt(u-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(u-1)!==r.charAt(a))&&(p=EE(e,t,n,r,u+1,a+2,o),p*S1>d&&(d=p*S1)),d>f&&(f=d),u=n.indexOf(l,u+1);return o[s]=f,f}function aI(e){return e.toLowerCase().replace(f8," ")}function TMe(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,EE(e,t,aI(e),aI(t),0,0,{})}function Ps(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function oI(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function bu(...e){return t=>{let n=!1;const r=e.map(i=>{const a=oI(i,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let i=0;i<r.length;i++){const a=r[i];typeof a=="function"?a():oI(e[i],null)}}}}function Lu(...e){return x.useCallback(bu(...e),e)}function AMe(e,t){const n=x.createContext(t),r=a=>{const{children:o,...s}=a,l=x.useMemo(()=>s,Object.values(s));return c.jsx(n.Provider,{value:l,children:o})};r.displayName=e+"Provider";function i(a){const o=x.useContext(n);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,i]}function CMe(e,t=[]){let n=[];function r(a,o){const s=x.createContext(o),l=n.length;n=[...n,o];const u=d=>{var y;const{scope:p,children:h,...b}=d,m=((y=p==null?void 0:p[e])==null?void 0:y[l])||s,g=x.useMemo(()=>b,Object.values(b));return c.jsx(m.Provider,{value:g,children:h})};u.displayName=a+"Provider";function f(d,p){var m;const h=((m=p==null?void 0:p[e])==null?void 0:m[l])||s,b=x.useContext(h);if(b)return b;if(o!==void 0)return o;throw new Error(`\`${d}\` must be used within \`${a}\``)}return[u,f]}const i=()=>{const a=n.map(o=>x.createContext(o));return function(s){const l=(s==null?void 0:s[e])||a;return x.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,_Me(i,...t)]}function _Me(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const o=r.reduce((s,{useScope:l,scopeName:u})=>{const d=l(a)[`__scope${u}`];return{...s,...d}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}var nm=globalThis!=null&&globalThis.document?x.useLayoutEffect:()=>{},NMe=Bb[" useId ".trim().toString()]||(()=>{}),RMe=0;function co(e){const[t,n]=x.useState(NMe());return nm(()=>{n(r=>r??String(RMe++))},[e]),t?`radix-${t}`:""}var MMe=Bb[" useInsertionEffect ".trim().toString()]||nm;function PMe({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,a,o]=$Me({defaultProp:t,onChange:n}),s=e!==void 0,l=s?e:i;{const f=x.useRef(e!==void 0);x.useEffect(()=>{const d=f.current;d!==s&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=s},[s,r])}const u=x.useCallback(f=>{var d;if(s){const p=DMe(f)?f(e):f;p!==e&&((d=o.current)==null||d.call(o,p))}else a(f)},[s,e,a,o]);return[l,u]}function $Me({defaultProp:e,onChange:t}){const[n,r]=x.useState(e),i=x.useRef(n),a=x.useRef(t);return MMe(()=>{a.current=t},[t]),x.useEffect(()=>{var o;i.current!==n&&((o=a.current)==null||o.call(a,n),i.current=n)},[n,i]),[n,r,a]}function DMe(e){return typeof e=="function"}function d8(e){const t=IMe(e),n=x.forwardRef((r,i)=>{const{children:a,...o}=r,s=x.Children.toArray(a),l=s.find(LMe);if(l){const u=l.props.children,f=s.map(d=>d===l?x.Children.count(u)>1?x.Children.only(null):x.isValidElement(u)?u.props.children:null:d);return c.jsx(t,{...o,ref:i,children:x.isValidElement(u)?x.cloneElement(u,void 0,f):null})}return c.jsx(t,{...o,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}function IMe(e){const t=x.forwardRef((n,r)=>{const{children:i,...a}=n;if(x.isValidElement(i)){const o=zMe(i),s=BMe(a,i.props);return i.type!==x.Fragment&&(s.ref=r?bu(r,o):o),x.cloneElement(i,s)}return x.Children.count(i)>1?x.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var kMe=Symbol("radix.slottable");function LMe(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===kMe}function BMe(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...s)=>{const l=a(...s);return i(...s),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function zMe(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var FMe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Qn=FMe.reduce((e,t)=>{const n=d8(`Primitive.${t}`),r=x.forwardRef((i,a)=>{const{asChild:o,...s}=i,l=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(l,{...s,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function UMe(e,t){e&&Ni.flushSync(()=>e.dispatchEvent(t))}function rm(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),x.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function HMe(e,t=globalThis==null?void 0:globalThis.document){const n=rm(e);x.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var qMe="DismissableLayer",TE="dismissableLayer.update",VMe="dismissableLayer.pointerDownOutside",GMe="dismissableLayer.focusOutside",sI,p8=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),h8=x.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...l}=e,u=x.useContext(p8),[f,d]=x.useState(null),p=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=x.useState({}),b=Lu(t,E=>d(E)),m=Array.from(u.layers),[g]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(g),v=f?m.indexOf(f):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,S=v>=y,O=XMe(E=>{const T=E.target,A=[...u.branches].some(C=>C.contains(T));!S||A||(i==null||i(E),o==null||o(E),E.defaultPrevented||s==null||s())},p),j=WMe(E=>{const T=E.target;[...u.branches].some(C=>C.contains(T))||(a==null||a(E),o==null||o(E),E.defaultPrevented||s==null||s())},p);return HMe(E=>{v===u.layers.size-1&&(r==null||r(E),!E.defaultPrevented&&s&&(E.preventDefault(),s()))},p),x.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(sI=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),lI(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=sI)}},[f,p,n,u]),x.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),lI())},[f,u]),x.useEffect(()=>{const E=()=>h({});return document.addEventListener(TE,E),()=>document.removeEventListener(TE,E)},[]),c.jsx(Qn.div,{...l,ref:b,style:{pointerEvents:w?S?"auto":"none":void 0,...e.style},onFocusCapture:Ps(e.onFocusCapture,j.onFocusCapture),onBlurCapture:Ps(e.onBlurCapture,j.onBlurCapture),onPointerDownCapture:Ps(e.onPointerDownCapture,O.onPointerDownCapture)})});h8.displayName=qMe;var KMe="DismissableLayerBranch",YMe=x.forwardRef((e,t)=>{const n=x.useContext(p8),r=x.useRef(null),i=Lu(t,r);return x.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),c.jsx(Qn.div,{...e,ref:i})});YMe.displayName=KMe;function XMe(e,t=globalThis==null?void 0:globalThis.document){const n=rm(e),r=x.useRef(!1),i=x.useRef(()=>{});return x.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let l=function(){m8(VMe,n,u,{discrete:!0})};const u={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=l,t.addEventListener("click",i.current,{once:!0})):l()}else t.removeEventListener("click",i.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function WMe(e,t=globalThis==null?void 0:globalThis.document){const n=rm(e),r=x.useRef(!1);return x.useEffect(()=>{const i=a=>{a.target&&!r.current&&m8(GMe,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function lI(){const e=new CustomEvent(TE);document.dispatchEvent(e)}function m8(e,t,n,{discrete:r}){const i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?UMe(i,a):i.dispatchEvent(a)}var j1="focusScope.autoFocusOnMount",E1="focusScope.autoFocusOnUnmount",uI={bubbles:!1,cancelable:!0},QMe="FocusScope",g8=x.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,l]=x.useState(null),u=rm(i),f=rm(a),d=x.useRef(null),p=Lu(t,m=>l(m)),h=x.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;x.useEffect(()=>{if(r){let m=function(w){if(h.paused||!s)return;const S=w.target;s.contains(S)?d.current=S:Xo(d.current,{select:!0})},g=function(w){if(h.paused||!s)return;const S=w.relatedTarget;S!==null&&(s.contains(S)||Xo(d.current,{select:!0}))},y=function(w){if(document.activeElement===document.body)for(const O of w)O.removedNodes.length>0&&Xo(s)};document.addEventListener("focusin",m),document.addEventListener("focusout",g);const v=new MutationObserver(y);return s&&v.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",g),v.disconnect()}}},[r,s,h.paused]),x.useEffect(()=>{if(s){fI.add(h);const m=document.activeElement;if(!s.contains(m)){const y=new CustomEvent(j1,uI);s.addEventListener(j1,u),s.dispatchEvent(y),y.defaultPrevented||(ZMe(rPe(v8(s)),{select:!0}),document.activeElement===m&&Xo(s))}return()=>{s.removeEventListener(j1,u),setTimeout(()=>{const y=new CustomEvent(E1,uI);s.addEventListener(E1,f),s.dispatchEvent(y),y.defaultPrevented||Xo(m??document.body,{select:!0}),s.removeEventListener(E1,f),fI.remove(h)},0)}}},[s,u,f,h]);const b=x.useCallback(m=>{if(!n&&!r||h.paused)return;const g=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,y=document.activeElement;if(g&&y){const v=m.currentTarget,[w,S]=JMe(v);w&&S?!m.shiftKey&&y===S?(m.preventDefault(),n&&Xo(w,{select:!0})):m.shiftKey&&y===w&&(m.preventDefault(),n&&Xo(S,{select:!0})):y===v&&m.preventDefault()}},[n,r,h.paused]);return c.jsx(Qn.div,{tabIndex:-1,...o,ref:p,onKeyDown:b})});g8.displayName=QMe;function ZMe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Xo(r,{select:t}),document.activeElement!==n)return}function JMe(e){const t=v8(e),n=cI(t,e),r=cI(t.reverse(),e);return[n,r]}function v8(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function cI(e,t){for(const n of e)if(!ePe(n,{upTo:t}))return n}function ePe(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function tPe(e){return e instanceof HTMLInputElement&&"select"in e}function Xo(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&tPe(e)&&t&&e.select()}}var fI=nPe();function nPe(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=dI(e,t),e.unshift(t)},remove(t){var n;e=dI(e,t),(n=e[0])==null||n.resume()}}}function dI(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function rPe(e){return e.filter(t=>t.tagName!=="A")}var iPe="Portal",y8=x.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[i,a]=x.useState(!1);nm(()=>a(!0),[]);const o=n||i&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return o?jV.createPortal(c.jsx(Qn.div,{...r,ref:t}),o):null});y8.displayName=iPe;function aPe(e,t){return x.useReducer((n,r)=>t[n][r]??n,e)}var I0=e=>{const{present:t,children:n}=e,r=oPe(t),i=typeof n=="function"?n({present:r.isPresent}):x.Children.only(n),a=Lu(r.ref,sPe(i));return typeof n=="function"||r.isPresent?x.cloneElement(i,{ref:a}):null};I0.displayName="Presence";function oPe(e){const[t,n]=x.useState(),r=x.useRef(null),i=x.useRef(e),a=x.useRef("none"),o=e?"mounted":"unmounted",[s,l]=aPe(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const u=Wg(r.current);a.current=s==="mounted"?u:"none"},[s]),nm(()=>{const u=r.current,f=i.current;if(f!==e){const p=a.current,h=Wg(u);e?l("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(f&&p!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),nm(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,d=h=>{const m=Wg(r.current).includes(CSS.escape(h.animationName));if(h.target===t&&m&&(l("ANIMATION_END"),!i.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},p=h=>{h.target===t&&(a.current=Wg(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:x.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function Wg(e){return(e==null?void 0:e.animationName)||"none"}function sPe(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var T1=0;function lPe(){x.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??pI()),document.body.insertAdjacentElement("beforeend",e[1]??pI()),T1++,()=>{T1===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),T1--}},[])}function pI(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var fa=function(){return fa=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},fa.apply(this,arguments)};function b8(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function uPe(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Rv="right-scroll-bar-position",Mv="width-before-scroll-bar",cPe="with-scroll-bars-hidden",fPe="--removed-body-scroll-bar-size";function A1(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function dPe(e,t){var n=x.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var pPe=typeof window<"u"?x.useLayoutEffect:x.useEffect,hI=new WeakMap;function hPe(e,t){var n=dPe(null,function(r){return e.forEach(function(i){return A1(i,r)})});return pPe(function(){var r=hI.get(n);if(r){var i=new Set(r),a=new Set(e),o=n.current;i.forEach(function(s){a.has(s)||A1(s,null)}),a.forEach(function(s){i.has(s)||A1(s,o)})}hI.set(n,e)},[e]),n}function mPe(e){return e}function gPe(e,t){t===void 0&&(t=mPe);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var o=t(a,r);return n.push(o),function(){n=n.filter(function(s){return s!==o})}},assignSyncMedium:function(a){for(r=!0;n.length;){var o=n;n=[],o.forEach(a)}n={push:function(s){return a(s)},filter:function(){return n}}},assignMedium:function(a){r=!0;var o=[];if(n.length){var s=n;n=[],s.forEach(a),o=n}var l=function(){var f=o;o=[],f.forEach(a)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(f){o.push(f),u()},filter:function(f){return o=o.filter(f),n}}}};return i}function vPe(e){e===void 0&&(e={});var t=gPe(null);return t.options=fa({async:!0,ssr:!1},e),t}var x8=function(e){var t=e.sideCar,n=b8(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return x.createElement(r,fa({},n))};x8.isSideCarExport=!0;function yPe(e,t){return e.useMedium(t),x8}var w8=vPe(),C1=function(){},k0=x.forwardRef(function(e,t){var n=x.useRef(null),r=x.useState({onScrollCapture:C1,onWheelCapture:C1,onTouchMoveCapture:C1}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,f=e.enabled,d=e.shards,p=e.sideCar,h=e.noRelative,b=e.noIsolation,m=e.inert,g=e.allowPinchZoom,y=e.as,v=y===void 0?"div":y,w=e.gapMode,S=b8(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),O=p,j=hPe([n,t]),E=fa(fa({},S),i);return x.createElement(x.Fragment,null,f&&x.createElement(O,{sideCar:w8,removeScrollBar:u,shards:d,noRelative:h,noIsolation:b,inert:m,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:w}),o?x.cloneElement(x.Children.only(s),fa(fa({},E),{ref:j})):x.createElement(v,fa({},E,{className:l,ref:j}),s))});k0.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};k0.classNames={fullWidth:Mv,zeroRight:Rv};var bPe=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function xPe(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=bPe();return t&&e.setAttribute("nonce",t),e}function wPe(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function SPe(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var OPe=function(){var e=0,t=null;return{add:function(n){e==0&&(t=xPe())&&(wPe(t,n),SPe(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},jPe=function(){var e=OPe();return function(t,n){x.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},S8=function(){var e=jPe(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},EPe={left:0,top:0,right:0,gap:0},_1=function(e){return parseInt(e||"",10)||0},TPe=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[_1(n),_1(r),_1(i)]},APe=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return EPe;var t=TPe(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},CPe=S8(),Yc="data-scroll-locked",_Pe=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n="margin"),`
|
|
169
|
+
.`.concat(cPe,` {
|
|
170
|
+
overflow: hidden `).concat(r,`;
|
|
171
|
+
padding-right: `).concat(s,"px ").concat(r,`;
|
|
172
|
+
}
|
|
173
|
+
body[`).concat(Yc,`] {
|
|
174
|
+
overflow: hidden `).concat(r,`;
|
|
175
|
+
overscroll-behavior: contain;
|
|
176
|
+
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
177
|
+
padding-left: `.concat(i,`px;
|
|
178
|
+
padding-top: `).concat(a,`px;
|
|
179
|
+
padding-right: `).concat(o,`px;
|
|
180
|
+
margin-left:0;
|
|
181
|
+
margin-top:0;
|
|
182
|
+
margin-right: `).concat(s,"px ").concat(r,`;
|
|
183
|
+
`),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.`).concat(Rv,` {
|
|
187
|
+
right: `).concat(s,"px ").concat(r,`;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.`).concat(Mv,` {
|
|
191
|
+
margin-right: `).concat(s,"px ").concat(r,`;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.`).concat(Rv," .").concat(Rv,` {
|
|
195
|
+
right: 0 `).concat(r,`;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.`).concat(Mv," .").concat(Mv,` {
|
|
199
|
+
margin-right: 0 `).concat(r,`;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
body[`).concat(Yc,`] {
|
|
203
|
+
`).concat(fPe,": ").concat(s,`px;
|
|
204
|
+
}
|
|
205
|
+
`)},mI=function(){var e=parseInt(document.body.getAttribute(Yc)||"0",10);return isFinite(e)?e:0},NPe=function(){x.useEffect(function(){return document.body.setAttribute(Yc,(mI()+1).toString()),function(){var e=mI()-1;e<=0?document.body.removeAttribute(Yc):document.body.setAttribute(Yc,e.toString())}},[])},RPe=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;NPe();var a=x.useMemo(function(){return APe(i)},[i]);return x.createElement(CPe,{styles:_Pe(a,!t,i,n?"":"!important")})},AE=!1;if(typeof window<"u")try{var Qg=Object.defineProperty({},"passive",{get:function(){return AE=!0,!0}});window.addEventListener("test",Qg,Qg),window.removeEventListener("test",Qg,Qg)}catch{AE=!1}var Wu=AE?{passive:!1}:!1,MPe=function(e){return e.tagName==="TEXTAREA"},O8=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!MPe(e)&&n[t]==="visible")},PPe=function(e){return O8(e,"overflowY")},$Pe=function(e){return O8(e,"overflowX")},gI=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=j8(e,r);if(i){var a=E8(e,r),o=a[1],s=a[2];if(o>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},DPe=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},IPe=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},j8=function(e,t){return e==="v"?PPe(t):$Pe(t)},E8=function(e,t){return e==="v"?DPe(t):IPe(t)},kPe=function(e,t){return e==="h"&&t==="rtl"?-1:1},LPe=function(e,t,n,r,i){var a=kPe(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,l=t.contains(s),u=!1,f=o>0,d=0,p=0;do{if(!s)break;var h=E8(e,s),b=h[0],m=h[1],g=h[2],y=m-g-a*b;(b||y)&&j8(e,s)&&(d+=y,p+=b);var v=s.parentNode;s=v&&v.nodeType===Node.DOCUMENT_FRAGMENT_NODE?v.host:v}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(f&&Math.abs(d)<1||!f&&Math.abs(p)<1)&&(u=!0),u},Zg=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},vI=function(e){return[e.deltaX,e.deltaY]},yI=function(e){return e&&"current"in e?e.current:e},BPe=function(e,t){return e[0]===t[0]&&e[1]===t[1]},zPe=function(e){return`
|
|
206
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
207
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
208
|
+
`)},FPe=0,Qu=[];function UPe(e){var t=x.useRef([]),n=x.useRef([0,0]),r=x.useRef(),i=x.useState(FPe++)[0],a=x.useState(S8)[0],o=x.useRef(e);x.useEffect(function(){o.current=e},[e]),x.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var m=uPe([e.lockRef.current],(e.shards||[]).map(yI),!0).filter(Boolean);return m.forEach(function(g){return g.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),m.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=x.useCallback(function(m,g){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!o.current.allowPinchZoom;var y=Zg(m),v=n.current,w="deltaX"in m?m.deltaX:v[0]-y[0],S="deltaY"in m?m.deltaY:v[1]-y[1],O,j=m.target,E=Math.abs(w)>Math.abs(S)?"h":"v";if("touches"in m&&E==="h"&&j.type==="range")return!1;var T=window.getSelection(),A=T&&T.anchorNode,C=A?A===j||A.contains(j):!1;if(C)return!1;var _=gI(E,j);if(!_)return!0;if(_?O=E:(O=E==="v"?"h":"v",_=gI(E,j)),!_)return!1;if(!r.current&&"changedTouches"in m&&(w||S)&&(r.current=O),!O)return!0;var N=r.current||O;return LPe(N,g,m,N==="h"?w:S)},[]),l=x.useCallback(function(m){var g=m;if(!(!Qu.length||Qu[Qu.length-1]!==a)){var y="deltaY"in g?vI(g):Zg(g),v=t.current.filter(function(O){return O.name===g.type&&(O.target===g.target||g.target===O.shadowParent)&&BPe(O.delta,y)})[0];if(v&&v.should){g.cancelable&&g.preventDefault();return}if(!v){var w=(o.current.shards||[]).map(yI).filter(Boolean).filter(function(O){return O.contains(g.target)}),S=w.length>0?s(g,w[0]):!o.current.noIsolation;S&&g.cancelable&&g.preventDefault()}}},[]),u=x.useCallback(function(m,g,y,v){var w={name:m,delta:g,target:y,should:v,shadowParent:HPe(y)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(S){return S!==w})},1)},[]),f=x.useCallback(function(m){n.current=Zg(m),r.current=void 0},[]),d=x.useCallback(function(m){u(m.type,vI(m),m.target,s(m,e.lockRef.current))},[]),p=x.useCallback(function(m){u(m.type,Zg(m),m.target,s(m,e.lockRef.current))},[]);x.useEffect(function(){return Qu.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",l,Wu),document.addEventListener("touchmove",l,Wu),document.addEventListener("touchstart",f,Wu),function(){Qu=Qu.filter(function(m){return m!==a}),document.removeEventListener("wheel",l,Wu),document.removeEventListener("touchmove",l,Wu),document.removeEventListener("touchstart",f,Wu)}},[]);var h=e.removeScrollBar,b=e.inert;return x.createElement(x.Fragment,null,b?x.createElement(a,{styles:zPe(i)}):null,h?x.createElement(RPe,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function HPe(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const qPe=yPe(w8,UPe);var T8=x.forwardRef(function(e,t){return x.createElement(k0,fa({},e,{ref:t,sideCar:qPe}))});T8.classNames=k0.classNames;var VPe=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Zu=new WeakMap,Jg=new WeakMap,ev={},N1=0,A8=function(e){return e&&(e.host||A8(e.parentNode))},GPe=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=A8(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},KPe=function(e,t,n,r){var i=GPe(t,Array.isArray(e)?e:[e]);ev[n]||(ev[n]=new WeakMap);var a=ev[n],o=[],s=new Set,l=new Set(i),u=function(d){!d||s.has(d)||(s.add(d),u(d.parentNode))};i.forEach(u);var f=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(p){if(s.has(p))f(p);else try{var h=p.getAttribute(r),b=h!==null&&h!=="false",m=(Zu.get(p)||0)+1,g=(a.get(p)||0)+1;Zu.set(p,m),a.set(p,g),o.push(p),m===1&&b&&Jg.set(p,!0),g===1&&p.setAttribute(n,"true"),b||p.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",p,y)}})};return f(t),s.clear(),N1++,function(){o.forEach(function(d){var p=Zu.get(d)-1,h=a.get(d)-1;Zu.set(d,p),a.set(d,h),p||(Jg.has(d)||d.removeAttribute(r),Jg.delete(d)),h||d.removeAttribute(n)}),N1--,N1||(Zu=new WeakMap,Zu=new WeakMap,Jg=new WeakMap,ev={})}},YPe=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=VPe(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),KPe(r,i,n,"aria-hidden")):function(){return null}},L0="Dialog",[C8]=CMe(L0),[XPe,Qi]=C8(L0),_8=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=x.useRef(null),l=x.useRef(null),[u,f]=PMe({prop:r,defaultProp:i??!1,onChange:a,caller:L0});return c.jsx(XPe,{scope:t,triggerRef:s,contentRef:l,contentId:co(),titleId:co(),descriptionId:co(),open:u,onOpenChange:f,onOpenToggle:x.useCallback(()=>f(d=>!d),[f]),modal:o,children:n})};_8.displayName=L0;var N8="DialogTrigger",WPe=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Qi(N8,n),a=Lu(t,i.triggerRef);return c.jsx(Qn.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":c_(i.open),...r,ref:a,onClick:Ps(e.onClick,i.onOpenToggle)})});WPe.displayName=N8;var l_="DialogPortal",[QPe,R8]=C8(l_,{forceMount:void 0}),M8=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=Qi(l_,t);return c.jsx(QPe,{scope:t,forceMount:n,children:x.Children.map(r,o=>c.jsx(I0,{present:n||a.open,children:c.jsx(y8,{asChild:!0,container:i,children:o})}))})};M8.displayName=l_;var Pb="DialogOverlay",P8=x.forwardRef((e,t)=>{const n=R8(Pb,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Qi(Pb,e.__scopeDialog);return a.modal?c.jsx(I0,{present:r||a.open,children:c.jsx(JPe,{...i,ref:t})}):null});P8.displayName=Pb;var ZPe=d8("DialogOverlay.RemoveScroll"),JPe=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Qi(Pb,n);return c.jsx(T8,{as:ZPe,allowPinchZoom:!0,shards:[i.contentRef],children:c.jsx(Qn.div,{"data-state":c_(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),xu="DialogContent",$8=x.forwardRef((e,t)=>{const n=R8(xu,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Qi(xu,e.__scopeDialog);return c.jsx(I0,{present:r||a.open,children:a.modal?c.jsx(e2e,{...i,ref:t}):c.jsx(t2e,{...i,ref:t})})});$8.displayName=xu;var e2e=x.forwardRef((e,t)=>{const n=Qi(xu,e.__scopeDialog),r=x.useRef(null),i=Lu(t,n.contentRef,r);return x.useEffect(()=>{const a=r.current;if(a)return YPe(a)},[]),c.jsx(D8,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ps(e.onCloseAutoFocus,a=>{var o;a.preventDefault(),(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:Ps(e.onPointerDownOutside,a=>{const o=a.detail.originalEvent,s=o.button===0&&o.ctrlKey===!0;(o.button===2||s)&&a.preventDefault()}),onFocusOutside:Ps(e.onFocusOutside,a=>a.preventDefault())})}),t2e=x.forwardRef((e,t)=>{const n=Qi(xu,e.__scopeDialog),r=x.useRef(!1),i=x.useRef(!1);return c.jsx(D8,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var o,s;(o=e.onCloseAutoFocus)==null||o.call(e,a),a.defaultPrevented||(r.current||(s=n.triggerRef.current)==null||s.focus(),a.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:a=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=a.target;((u=n.triggerRef.current)==null?void 0:u.contains(o))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),D8=x.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=Qi(xu,n),l=x.useRef(null),u=Lu(t,l);return lPe(),c.jsxs(c.Fragment,{children:[c.jsx(g8,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:c.jsx(h8,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":c_(s.open),...o,ref:u,onDismiss:()=>s.onOpenChange(!1)})}),c.jsxs(c.Fragment,{children:[c.jsx(a2e,{titleId:s.titleId}),c.jsx(s2e,{contentRef:l,descriptionId:s.descriptionId})]})]})}),u_="DialogTitle",n2e=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Qi(u_,n);return c.jsx(Qn.h2,{id:i.titleId,...r,ref:t})});n2e.displayName=u_;var I8="DialogDescription",r2e=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Qi(I8,n);return c.jsx(Qn.p,{id:i.descriptionId,...r,ref:t})});r2e.displayName=I8;var k8="DialogClose",i2e=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Qi(k8,n);return c.jsx(Qn.button,{type:"button",...r,ref:t,onClick:Ps(e.onClick,()=>i.onOpenChange(!1))})});i2e.displayName=k8;function c_(e){return e?"open":"closed"}var L8="DialogTitleWarning",[E5e,B8]=AMe(L8,{contentName:xu,titleName:u_,docsSlug:"dialog"}),a2e=({titleId:e})=>{const t=B8(L8),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
209
|
+
|
|
210
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
211
|
+
|
|
212
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return x.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},o2e="DialogDescriptionWarning",s2e=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${B8(o2e).contentName}}.`;return x.useEffect(()=>{var a;const i=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},l2e=_8,u2e=M8,c2e=P8,f2e=$8,cp='[cmdk-group=""]',R1='[cmdk-group-items=""]',d2e='[cmdk-group-heading=""]',z8='[cmdk-item=""]',bI=`${z8}:not([aria-disabled="true"])`,CE="cmdk-item-select",ic="data-value",p2e=(e,t,n)=>TMe(e,t,n),F8=x.createContext(void 0),qm=()=>x.useContext(F8),U8=x.createContext(void 0),f_=()=>x.useContext(U8),H8=x.createContext(void 0),q8=x.forwardRef((e,t)=>{let n=ac(()=>{var M,q;return{search:"",value:(q=(M=e.value)!=null?M:e.defaultValue)!=null?q:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=ac(()=>new Set),i=ac(()=>new Map),a=ac(()=>new Map),o=ac(()=>new Set),s=V8(e),{label:l,children:u,value:f,onValueChange:d,filter:p,shouldFilter:h,loop:b,disablePointerSelection:m=!1,vimBindings:g=!0,...y}=e,v=co(),w=co(),S=co(),O=x.useRef(null),j=j2e();wu(()=>{if(f!==void 0){let M=f.trim();n.current.value=M,E.emit()}},[f]),wu(()=>{j(6,D)},[]);let E=x.useMemo(()=>({subscribe:M=>(o.current.add(M),()=>o.current.delete(M)),snapshot:()=>n.current,setState:(M,q,G)=>{var U,Y,X,te;if(!Object.is(n.current[M],q)){if(n.current[M]=q,M==="search")N(),C(),j(1,_);else if(M==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let H=document.getElementById(S);H?H.focus():(U=document.getElementById(v))==null||U.focus()}if(j(7,()=>{var H;n.current.selectedItemId=(H=R())==null?void 0:H.id,E.emit()}),G||j(5,D),((Y=s.current)==null?void 0:Y.value)!==void 0){let H=q??"";(te=(X=s.current).onValueChange)==null||te.call(X,H);return}}E.emit()}},emit:()=>{o.current.forEach(M=>M())}}),[]),T=x.useMemo(()=>({value:(M,q,G)=>{var U;q!==((U=a.current.get(M))==null?void 0:U.value)&&(a.current.set(M,{value:q,keywords:G}),n.current.filtered.items.set(M,A(q,G)),j(2,()=>{C(),E.emit()}))},item:(M,q)=>(r.current.add(M),q&&(i.current.has(q)?i.current.get(q).add(M):i.current.set(q,new Set([M]))),j(3,()=>{N(),C(),n.current.value||_(),E.emit()}),()=>{a.current.delete(M),r.current.delete(M),n.current.filtered.items.delete(M);let G=R();j(4,()=>{N(),(G==null?void 0:G.getAttribute("id"))===M&&_(),E.emit()})}),group:M=>(i.current.has(M)||i.current.set(M,new Set),()=>{a.current.delete(M),i.current.delete(M)}),filter:()=>s.current.shouldFilter,label:l||e["aria-label"],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:v,inputId:S,labelId:w,listInnerRef:O}),[]);function A(M,q){var G,U;let Y=(U=(G=s.current)==null?void 0:G.filter)!=null?U:p2e;return M?Y(M,n.current.search,q):0}function C(){if(!n.current.search||s.current.shouldFilter===!1)return;let M=n.current.filtered.items,q=[];n.current.filtered.groups.forEach(U=>{let Y=i.current.get(U),X=0;Y.forEach(te=>{let H=M.get(te);X=Math.max(H,X)}),q.push([U,X])});let G=O.current;$().sort((U,Y)=>{var X,te;let H=U.getAttribute("id"),ee=Y.getAttribute("id");return((X=M.get(ee))!=null?X:0)-((te=M.get(H))!=null?te:0)}).forEach(U=>{let Y=U.closest(R1);Y?Y.appendChild(U.parentElement===Y?U:U.closest(`${R1} > *`)):G.appendChild(U.parentElement===G?U:U.closest(`${R1} > *`))}),q.sort((U,Y)=>Y[1]-U[1]).forEach(U=>{var Y;let X=(Y=O.current)==null?void 0:Y.querySelector(`${cp}[${ic}="${encodeURIComponent(U[0])}"]`);X==null||X.parentElement.appendChild(X)})}function _(){let M=$().find(G=>G.getAttribute("aria-disabled")!=="true"),q=M==null?void 0:M.getAttribute(ic);E.setState("value",q||void 0)}function N(){var M,q,G,U;if(!n.current.search||s.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let Y=0;for(let X of r.current){let te=(q=(M=a.current.get(X))==null?void 0:M.value)!=null?q:"",H=(U=(G=a.current.get(X))==null?void 0:G.keywords)!=null?U:[],ee=A(te,H);n.current.filtered.items.set(X,ee),ee>0&&Y++}for(let[X,te]of i.current)for(let H of te)if(n.current.filtered.items.get(H)>0){n.current.filtered.groups.add(X);break}n.current.filtered.count=Y}function D(){var M,q,G;let U=R();U&&(((M=U.parentElement)==null?void 0:M.firstChild)===U&&((G=(q=U.closest(cp))==null?void 0:q.querySelector(d2e))==null||G.scrollIntoView({block:"nearest"})),U.scrollIntoView({block:"nearest"}))}function R(){var M;return(M=O.current)==null?void 0:M.querySelector(`${z8}[aria-selected="true"]`)}function $(){var M;return Array.from(((M=O.current)==null?void 0:M.querySelectorAll(bI))||[])}function P(M){let q=$()[M];q&&E.setState("value",q.getAttribute(ic))}function B(M){var q;let G=R(),U=$(),Y=U.findIndex(te=>te===G),X=U[Y+M];(q=s.current)!=null&&q.loop&&(X=Y+M<0?U[U.length-1]:Y+M===U.length?U[0]:U[Y+M]),X&&E.setState("value",X.getAttribute(ic))}function L(M){let q=R(),G=q==null?void 0:q.closest(cp),U;for(;G&&!U;)G=M>0?S2e(G,cp):O2e(G,cp),U=G==null?void 0:G.querySelector(bI);U?E.setState("value",U.getAttribute(ic)):B(M)}let k=()=>P($().length-1),I=M=>{M.preventDefault(),M.metaKey?k():M.altKey?L(1):B(1)},V=M=>{M.preventDefault(),M.metaKey?P(0):M.altKey?L(-1):B(-1)};return x.createElement(Qn.div,{ref:t,tabIndex:-1,...y,"cmdk-root":"",onKeyDown:M=>{var q;(q=y.onKeyDown)==null||q.call(y,M);let G=M.nativeEvent.isComposing||M.keyCode===229;if(!(M.defaultPrevented||G))switch(M.key){case"n":case"j":{g&&M.ctrlKey&&I(M);break}case"ArrowDown":{I(M);break}case"p":case"k":{g&&M.ctrlKey&&V(M);break}case"ArrowUp":{V(M);break}case"Home":{M.preventDefault(),P(0);break}case"End":{M.preventDefault(),k();break}case"Enter":{M.preventDefault();let U=R();if(U){let Y=new Event(CE);U.dispatchEvent(Y)}}}}},x.createElement("label",{"cmdk-label":"",htmlFor:T.inputId,id:T.labelId,style:T2e},l),B0(e,M=>x.createElement(U8.Provider,{value:E},x.createElement(F8.Provider,{value:T},M))))}),h2e=x.forwardRef((e,t)=>{var n,r;let i=co(),a=x.useRef(null),o=x.useContext(H8),s=qm(),l=V8(e),u=(r=(n=l.current)==null?void 0:n.forceMount)!=null?r:o==null?void 0:o.forceMount;wu(()=>{if(!u)return s.item(i,o==null?void 0:o.id)},[u]);let f=G8(i,a,[e.value,e.children,a],e.keywords),d=f_(),p=Us(j=>j.value&&j.value===f.current),h=Us(j=>u||s.filter()===!1?!0:j.search?j.filtered.items.get(i)>0:!0);x.useEffect(()=>{let j=a.current;if(!(!j||e.disabled))return j.addEventListener(CE,b),()=>j.removeEventListener(CE,b)},[h,e.onSelect,e.disabled]);function b(){var j,E;m(),(E=(j=l.current).onSelect)==null||E.call(j,f.current)}function m(){d.setState("value",f.current,!0)}if(!h)return null;let{disabled:g,value:y,onSelect:v,forceMount:w,keywords:S,...O}=e;return x.createElement(Qn.div,{ref:bu(a,t),...O,id:i,"cmdk-item":"",role:"option","aria-disabled":!!g,"aria-selected":!!p,"data-disabled":!!g,"data-selected":!!p,onPointerMove:g||s.getDisablePointerSelection()?void 0:m,onClick:g?void 0:b},e.children)}),m2e=x.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...a}=e,o=co(),s=x.useRef(null),l=x.useRef(null),u=co(),f=qm(),d=Us(h=>i||f.filter()===!1?!0:h.search?h.filtered.groups.has(o):!0);wu(()=>f.group(o),[]),G8(o,s,[e.value,e.heading,l]);let p=x.useMemo(()=>({id:o,forceMount:i}),[i]);return x.createElement(Qn.div,{ref:bu(s,t),...a,"cmdk-group":"",role:"presentation",hidden:d?void 0:!0},n&&x.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:u},n),B0(e,h=>x.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?u:void 0},x.createElement(H8.Provider,{value:p},h))))}),g2e=x.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=x.useRef(null),a=Us(o=>!o.search);return!n&&!a?null:x.createElement(Qn.div,{ref:bu(i,t),...r,"cmdk-separator":"",role:"separator"})}),v2e=x.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,a=f_(),o=Us(u=>u.search),s=Us(u=>u.selectedItemId),l=qm();return x.useEffect(()=>{e.value!=null&&a.setState("search",e.value)},[e.value]),x.createElement(Qn.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":s,id:l.inputId,type:"text",value:i?e.value:o,onChange:u=>{i||a.setState("search",u.target.value),n==null||n(u.target.value)}})}),y2e=x.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...i}=e,a=x.useRef(null),o=x.useRef(null),s=Us(u=>u.selectedItemId),l=qm();return x.useEffect(()=>{if(o.current&&a.current){let u=o.current,f=a.current,d,p=new ResizeObserver(()=>{d=requestAnimationFrame(()=>{let h=u.offsetHeight;f.style.setProperty("--cmdk-list-height",h.toFixed(1)+"px")})});return p.observe(u),()=>{cancelAnimationFrame(d),p.unobserve(u)}}},[]),x.createElement(Qn.div,{ref:bu(a,t),...i,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:l.listId},B0(e,u=>x.createElement("div",{ref:bu(o,l.listInnerRef),"cmdk-list-sizer":""},u)))}),b2e=x.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:a,container:o,...s}=e;return x.createElement(l2e,{open:n,onOpenChange:r},x.createElement(u2e,{container:o},x.createElement(c2e,{"cmdk-overlay":"",className:i}),x.createElement(f2e,{"aria-label":e.label,"cmdk-dialog":"",className:a},x.createElement(q8,{ref:t,...s}))))}),x2e=x.forwardRef((e,t)=>Us(n=>n.filtered.count===0)?x.createElement(Qn.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),w2e=x.forwardRef((e,t)=>{let{progress:n,children:r,label:i="Loading...",...a}=e;return x.createElement(Qn.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},B0(e,o=>x.createElement("div",{"aria-hidden":!0},o)))}),Vm=Object.assign(q8,{List:y2e,Item:h2e,Input:v2e,Group:m2e,Separator:g2e,Dialog:b2e,Empty:x2e,Loading:w2e});function S2e(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function O2e(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function V8(e){let t=x.useRef(e);return wu(()=>{t.current=e}),t}var wu=typeof window>"u"?x.useEffect:x.useLayoutEffect;function ac(e){let t=x.useRef();return t.current===void 0&&(t.current=e()),t}function Us(e){let t=f_(),n=()=>e(t.snapshot());return x.useSyncExternalStore(t.subscribe,n,n)}function G8(e,t,n,r=[]){let i=x.useRef(),a=qm();return wu(()=>{var o;let s=(()=>{var u;for(let f of n){if(typeof f=="string")return f.trim();if(typeof f=="object"&&"current"in f)return f.current?(u=f.current.textContent)==null?void 0:u.trim():i.current}})(),l=r.map(u=>u.trim());a.value(e,s,l),(o=t.current)==null||o.setAttribute(ic,s),i.current=s}),i}var j2e=()=>{let[e,t]=x.useState(),n=ac(()=>new Map);return wu(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,i)=>{n.current.set(r,i),t({})}};function E2e(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function B0({asChild:e,children:t},n){return e&&x.isValidElement(t)?x.cloneElement(E2e(t),{ref:t.ref},n(t.props.children)):n(t)}var T2e={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function A2e({...e}){return c.jsx(YC,{"data-slot":"dialog",...e})}function C2e({...e}){return c.jsx(KC,{"data-slot":"dialog-portal",...e})}function _2e({className:e,...t}){return c.jsx(hC,{"data-slot":"dialog-overlay",className:ge("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),...t})}function N2e({className:e,children:t,showCloseButton:n=!0,...r}){return c.jsxs(C2e,{children:[c.jsx(_2e,{}),c.jsxs(qC,{"data-slot":"dialog-content",className:ge("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-6 rounded-xl bg-popover p-6 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-md data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...r,children:[t,n&&c.jsxs(GU,{"data-slot":"dialog-close",render:c.jsx(Ql,{variant:"ghost",className:"absolute top-4 right-4",size:"icon-sm"}),children:[c.jsx(X6,{}),c.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function R2e({className:e,...t}){return c.jsx("div",{"data-slot":"dialog-header",className:ge("flex flex-col gap-2",e),...t})}function M2e({className:e,...t}){return c.jsx(XC,{"data-slot":"dialog-title",className:ge("cn-font-heading leading-none font-medium",e),...t})}function P2e({className:e,...t}){return c.jsx(bC,{"data-slot":"dialog-description",className:ge("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),...t})}function $2e({className:e,...t}){return c.jsx("div",{"data-slot":"input-group",role:"group",className:ge("group/input-group relative flex h-9 w-full min-w-0 items-center rounded-md border border-input shadow-xs transition-[color,box-shadow] outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",e),...t})}const D2e=md("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",{variants:{align:{"inline-start":"order-first pl-2 has-[>button]:-ml-1 has-[>kbd]:ml-[-0.15rem]","inline-end":"order-last pr-2 has-[>button]:-mr-1 has-[>kbd]:mr-[-0.15rem]","block-start":"order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2","block-end":"order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"}},defaultVariants:{align:"inline-start"}});function I2e({className:e,align:t="inline-start",...n}){return c.jsx("div",{role:"group","data-slot":"input-group-addon","data-align":t,className:ge(D2e({align:t}),e),onClick:r=>{var i,a;r.target.closest("button")||(a=(i=r.currentTarget.parentElement)==null?void 0:i.querySelector("input"))==null||a.focus()},...n})}function k2e({className:e,...t}){return c.jsx(Vm,{"data-slot":"command",className:ge("flex size-full flex-col overflow-hidden rounded-xl! bg-popover p-1 text-popover-foreground",e),...t})}function L2e({title:e="Command Palette",description:t="Search for a command to run...",children:n,className:r,showCloseButton:i=!1,...a}){return c.jsxs(A2e,{...a,children:[c.jsxs(R2e,{className:"sr-only",children:[c.jsx(M2e,{children:e}),c.jsx(P2e,{children:t})]}),c.jsx(N2e,{className:ge("top-1/3 translate-y-0 overflow-hidden rounded-xl! p-0",r),showCloseButton:i,children:n})]})}function B2e({className:e,...t}){return c.jsx("div",{"data-slot":"command-input-wrapper",className:"p-1 pb-0",children:c.jsxs($2e,{className:"h-8! rounded-lg! border-input/30 bg-input/30 shadow-none! *:data-[slot=input-group-addon]:pl-2!",children:[c.jsx(Vm.Input,{"data-slot":"command-input",className:ge("w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",e),...t}),c.jsx(I2e,{children:c.jsx(o_,{className:"size-4 shrink-0 opacity-50"})})]})})}function z2e({className:e,...t}){return c.jsx(Vm.List,{"data-slot":"command-list",className:ge("no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none",e),...t})}function xI({className:e,...t}){return c.jsx(Vm.Group,{"data-slot":"command-group",className:ge("overflow-hidden p-1 text-foreground **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground",e),...t})}function wI({className:e,children:t,...n}){return c.jsxs(Vm.Item,{"data-slot":"command-item",className:ge("group/command-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-muted data-selected:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-selected:**:[svg]:text-foreground",e),...n,children:[t,c.jsx(Q6,{className:"ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100"})]})}function F2e({className:e,...t}){return c.jsx("kbd",{"data-slot":"kbd",className:ge("pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm bg-muted px-1 font-sans text-xs font-medium text-muted-foreground select-none in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10 [&_svg:not([class*='size-'])]:size-3",e),...t})}function U2e(e,t){const n=t.trim().toLowerCase();return n===""?[...e]:e.filter(r=>[r.label,...r.keywords??[]].some(i=>i.toLowerCase().includes(n)))}function H2e(e,t){x.useEffect(()=>{if(!e)return;const n=r=>{(r.metaKey||r.ctrlKey)&&r.key.toLowerCase()==="k"&&(r.preventDefault(),t(i=>!i))};return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)},[e,t])}function q2e({onOpen:e,className:t}){return c.jsxs("button",{type:"button",onClick:e,"aria-keyshortcuts":"Control+K Meta+K","aria-label":"Search all consoles",className:ge("flex h-[26px] items-center gap-2 rounded-[6px] px-2.5 text-[11px] font-medium text-dim transition-colors hover:bg-hover hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60",t),children:[c.jsx(o_,{className:"size-[13px]"}),c.jsx("span",{className:"hidden sm:inline",children:"Search"}),c.jsx(F2e,{className:"mono hidden h-4 text-[9px] sm:inline-flex",children:"⌘K"})]})}function SI({className:e}){return c.jsxs("svg",{viewBox:"0 0 16 16",width:14,height:14,fill:"none","aria-hidden":"true","data-aviary-search-spinner":"",className:ge("animate-spin text-dim motion-reduce:animate-none",e),children:[c.jsx("circle",{cx:"8",cy:"8",r:"6",stroke:"currentColor",strokeOpacity:.25,strokeWidth:1.8}),c.jsx("path",{d:"M14 8a6 6 0 0 0-6-6",stroke:"currentColor",strokeWidth:1.8,strokeLinecap:"round"})]})}function V2e({remaining:e}){return c.jsxs("div",{"data-aviary-search-skeleton":"","aria-hidden":!0,className:"p-1",children:[c.jsx("div",{className:"px-2 py-1.5 text-xs font-medium uppercase tracking-[0.14em] text-muted-foreground",children:K8(e)}),[.55,.4,.48].map(t=>c.jsxs("div",{className:"flex items-center gap-2.5 px-2 py-1.5",children:[c.jsx(to,{className:"size-[18px] shrink-0 rounded-[5px] bg-fg/[0.08] motion-reduce:animate-none"}),c.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-1.5",children:[c.jsx(to,{className:"h-3 rounded-sm bg-fg/[0.08] motion-reduce:animate-none",style:{width:`${t*100}%`}}),c.jsx(to,{className:"h-2.5 rounded-sm bg-fg/[0.08] motion-reduce:animate-none",style:{width:`${t*55}%`}})]})]},t))]})}function K8(e){return e===void 0?"Searching consoles…":`Searching ${e} ${e===1?"console":"consoles"}…`}const tv={phase:"idle",groups:[],fresh:!0,remaining:void 0,failed:0};function G2e({config:e,switcher:t,commands:n,open:r,onOpenChange:i,placeholder:a="Search runs, workflows, media…"}){const[o,s]=x.useState(""),[l,u]=x.useState(tv),[f,d]=x.useState(0);x.useEffect(()=>{r||s("")},[r]);const p=x.useMemo(()=>U2e(n??[],o),[n,o]),h=x.useMemo(()=>{const N=new Map;for(const D of p)N.set(D.group,[...N.get(D.group)??[],D]);return[...N.entries()]},[p]);x.useEffect(()=>{const N=o.trim();if(N===""||!e){u(tv);return}const D=new AbortController,{signal:R}=D;u(P=>({...P,phase:"loading",fresh:!1,failed:0}));const $=setTimeout(()=>{vMe(e,t).then(P=>{if(R.aborted)return;if(!P){mMe(e,N,R).then(I=>{R.aborted||u({...tv,phase:"done",groups:I})},()=>{R.aborted||u({...tv,phase:"error"})});return}const B=new Map;let L=0,k=0;u(I=>({...I,remaining:P.length}));for(const I of P)gMe(e,N,I,R).then(V=>{B.set(I,V)},()=>{k+=1}).finally(()=>{if(R.aborted)return;L+=1;const V=P.length-L,M=P.flatMap(G=>B.get(G)??[]),q=V===0;u(G=>!q&&M.length===0&&!G.fresh?{...G,remaining:V,failed:k}:{phase:q?k===P.length?"error":"done":"loading",groups:M,fresh:!0,remaining:V,failed:k})})})},200);return()=>{clearTimeout($),D.abort()}},[o,e,t,f]);const{phase:b,groups:m,fresh:g,remaining:y,failed:v}=l,w=o.trim(),S=e!==void 0&&w!=="",O=S&&b==="loading",j=O&&!g&&m.length>0,E=S?m:[],T=E.reduce((N,D)=>N+D.hits.length,0)+p.length,A=w!==""&&p.length===0&&E.length===0&&(!S||b==="done"),C=e?"Search all consoles":"Search",_=N=>{i(!1),window.location.assign(N)};return c.jsx(L2e,{open:r,onOpenChange:i,title:C,description:e?"Search every console you can open":"Jump to a page",className:"sm:max-w-xl",children:c.jsxs(k2e,{shouldFilter:!1,label:C,children:[c.jsxs("div",{className:"relative",children:[c.jsx(B2e,{value:o,onValueChange:s,placeholder:a,"aria-label":C,className:"pr-7"}),O&&c.jsx(SI,{className:"pointer-events-none absolute top-[calc(50%+2px)] right-3.5 -translate-y-1/2"})]}),c.jsx("output",{className:"sr-only",children:O?"Searching…":w!==""&&b!=="error"?`${T} results`:""}),c.jsxs(z2e,{className:"max-h-[60vh]","aria-busy":O,children:[w===""&&p.length===0&&c.jsx("p",{className:"px-3 py-6 text-center text-[13px] text-dim",children:"Type to search."}),A&&c.jsx("p",{"data-aviary-search-empty":"",className:"px-3 py-6 text-center text-[13px] text-dim",children:"Nothing found."}),h.map(([N,D])=>c.jsx(xI,{heading:c.jsx("span",{className:"uppercase tracking-[0.14em]",children:N}),children:D.map(R=>c.jsxs(wI,{value:`local:${R.id}`,onSelect:()=>{i(!1),R.onSelect()},children:[R.icon,c.jsx("span",{className:"truncate text-[13px] text-fg",children:R.label}),R.hint&&c.jsx("span",{className:"ml-auto text-[11px] text-dim",children:R.hint})]},R.id))},`local:${N}`)),O&&E.length===0&&c.jsx(V2e,{remaining:y}),E.map(N=>c.jsx(xI,{"data-stale":j?"":void 0,className:ge("transition-opacity duration-150 motion-reduce:transition-none",j&&"opacity-50"),heading:c.jsxs("span",{className:"flex items-center gap-1.5 uppercase tracking-[0.14em]",children:[c.jsx(jE,{icon:N.icon,accent:n8(N.id,N.icon),size:18}),N.title]}),children:N.hits.map(D=>c.jsx(wI,{value:`${N.id}:${D.href}`,onSelect:()=>_(D.href),children:c.jsxs("a",{href:D.href,tabIndex:-1,className:"flex min-w-0 flex-col",onClick:R=>{if(R.button!==0||R.metaKey||R.ctrlKey||R.shiftKey||R.altKey){R.stopPropagation();return}R.preventDefault()},children:[c.jsx("span",{className:"mono truncate text-[13px] text-fg",children:D.title}),D.subtitle&&c.jsx("span",{className:"truncate text-[11px] text-dim",children:D.subtitle})]})},D.href))},N.id)),O&&E.length>0&&y!==void 0&&y>0&&c.jsxs("p",{"data-aviary-search-progress":"",className:"flex items-center gap-2 px-3 py-2 text-[12px] text-faint",children:[c.jsx(SI,{className:"size-3"}),K8(y)]}),S&&b==="error"&&c.jsxs("p",{"data-aviary-search-error":"",className:"flex items-center justify-center gap-2 px-3 py-3 text-[12px] text-faint",children:["The other consoles didn't answer.",c.jsx(OI,{onRetry:()=>d(N=>N+1)})]}),S&&b==="done"&&v>0&&c.jsxs("p",{"data-aviary-search-partial":"",className:"flex items-center justify-center gap-2 px-3 py-3 text-[12px] text-faint",children:[v," ",v===1?"console didn't":"consoles didn't"," answer.",c.jsx(OI,{onRetry:()=>d(N=>N+1)})]})]})]})})}function OI({onRetry:e}){return c.jsx("button",{type:"button",onClick:e,className:"rounded-sm text-dim underline underline-offset-2 hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60",children:"Retry"})}const Y8=x.createContext(void 0);function K2e(e){const t=x.useContext(Y8);if(t===void 0)throw new Error(Wt(33));return t}const d_=x.createContext(void 0);function Bu(e){const t=x.useContext(d_);if(t===void 0&&!e)throw new Error(Wt(36));return t}const Y2e=x.createContext(void 0);function p_(e=!0){const t=x.useContext(Y2e);if(t===void 0&&!e)throw new Error(Wt(25));return t}const X8=x.createContext(null);function h_(e="root"){const t=x.useContext(X8),n=x.useContext(d_);return t===null||n===void 0?null:(e==="submenu-trigger"?n.virtualFocus||n.parentVirtualFocus:n.virtualFocus)?t:null}const X2e={visible:!0,ref:null};function W2e(){return X2e}function Q2e(e,t,n="root"){const r=h_(n),a=((n==="submenu-trigger"?r==null?void 0:r.useSubmenuTrigger:r==null?void 0:r.useItem)??W2e)({label:e.label,children:e.children,render:e.render}),o=Ca(t,a.ref);return{visible:a.visible,ref:o,props:a.props}}function Z2e(e){e.preventDefault()}function J2e(e){const{closeOnClick:t,highlighted:n,id:r,nodeId:i,store:a,typingRef:o,itemRef:s,itemMetadata:l}=e,u=Bu(),f=p_(!0),d=l.type==="submenu-trigger",p=d?u.parentVirtualFocus:u.virtualFocus,b=(d&&u.parent.type==="menu"?u.parent.store:u.store).useState("webkitAriaSelected",n),{events:m}=a.useState("floatingTreeRoot"),g=a.useState("open"),y=f!==void 0,v=!p&&g&&n?0:-1;return x.useMemo(()=>({id:r,role:"menuitem",tabIndex:v,"aria-selected":b,onMouseDown:p?Z2e:void 0,onKeyDown(w){w.key===" "&&(o!=null&&o.current)&&w.preventDefault()},onMouseMove(w){i&&m.emit("itemhover",{nodeId:i,target:w.currentTarget})},onClick(w){t&&m.emit("close",{domEvent:w.nativeEvent,reason:Fc})},onMouseUp(w){if(f){const S=f.initialCursorPointRef.current;if(f.initialCursorPointRef.current=null,y&&S&&Math.abs(w.clientX-S.x)<=1&&Math.abs(w.clientY-S.y)<=1||y&&!wC&&w.button===2)return}s.current&&a.context.allowMouseUpTriggerRef.current&&(!y||w.button===2)&&l.type==="regular-item"&&jv(s.current,w,{detail:1,pointerType:"mouse"})}}),[t,v,r,m,i,a.context.allowMouseUpTriggerRef,o,s,f,y,l.type,b,p])}const e$e={type:"regular-item"};function t$e(e){const{closeOnClick:t,disabled:n,highlighted:r,id:i,store:a,typingRef:o=a.context.typingRef,nativeButton:s,itemMetadata:l,nodeId:u}=e,f=x.useRef(null),{getButtonProps:d,buttonRef:p}=el({disabled:n,focusableWhenDisabled:!0,native:s,composite:!0}),h=J2e({closeOnClick:t,highlighted:r,id:i,nodeId:u,store:a,typingRef:o,itemRef:f,itemMetadata:l}),b=x.useCallback(g=>Ir(h,{onMouseEnter(y){l.type==="submenu-trigger"&&l.setActive(y.nativeEvent)}},g,d),[h,d,l]),m=Ca(f,p);return x.useMemo(()=>({getItemProps:b,itemRef:m}),[b,m])}const W8=x.createContext(void 0);function n$e(){const e=x.useContext(W8);if(e===void 0)throw new Error(Wt(31));return e}const r$e=x.forwardRef(function(t,n){const{render:r,className:i,style:a,...o}=t,[s,l]=x.useState(void 0),u=it("div",t,{ref:n,props:{role:"group","aria-labelledby":s,...o}});return c.jsx(W8.Provider,{value:l,children:u})}),i$e=x.forwardRef(function(t,n){var i;const r=((i=h_())==null?void 0:i.Group)??r$e;return c.jsx(r,{...t,ref:n})}),a$e=x.forwardRef(function(t,n){const{render:r,className:i,style:a,id:o,...s}=t,l=_i(o),u=n$e();return le(()=>(u(l),()=>{u(f=>f===l?void 0:f)}),[u,l]),it("div",t,{ref:n,props:{id:l,"aria-hidden":!0,...s}})}),o$e=x.forwardRef(function(t,n){const{render:r,className:i,id:a,label:o,nativeButton:s=!1,disabled:l=!1,closeOnClick:u=!0,style:f,...d}=t,{store:p}=Bu(),h=ZC({guess:!0,label:o}),b=_i(a),m=p.useState("disabled"),g=p.useState("isActive",h.index),y=p.useState("floatingNodeId"),v=p.useState("itemProps"),w=l||m,{getItemProps:S,itemRef:O}=t$e({closeOnClick:u,disabled:w,highlighted:g,id:b,store:p,nativeButton:s,nodeId:y,itemMetadata:e$e});return it("div",t,{state:{disabled:w,highlighted:g},props:[v,d,S],ref:[O,n,h.ref]})}),s$e=x.forwardRef(function(t,n){const r=Q2e(t,n);return r.visible?c.jsx(o$e,{...t,ref:r.ref}):null}),l$e=x.createContext(void 0);function u$e(){return x.useContext(l$e)}function c$e(e,t){const n=fC(e.render);if(x.isValidElement(n)){const r=n.props;if(Object.hasOwn(r,"id"))return r.id??""}return e.id??t}function f$e(e,t,n){const r=c$e(e,t),i=r===t?void 0:r,a=x.useCallback(o=>n==null?void 0:n(o?i:void 0),[i,n]);return[r,a]}function d$e(e,t,n){const r=fC(e.render),i=x.isValidElement(r)?r.props:void 0,a=e["aria-label"]??(i==null?void 0:i["aria-label"]);let o=e["aria-labelledby"]??(i==null?void 0:i["aria-labelledby"]);return o==null&&!a&&(o=t?t.id||void 0:n||void 0),o}const p$e=x.forwardRef(function(t,n){var Q;const{render:r,className:i,style:a,finalFocus:o,id:s,initialFocus:l,...u}=t,{store:f,defaultFloatingId:d,setRenderedFloatingId:p,virtualFocus:h,orientation:b}=Bu(),m=u$e(),{side:g,align:y}=K2e(),v=S6()!=null,w=f.useState("open"),S=f.useState("transitionStatus"),O=f.useState("popupProps"),j=f.useState("mounted"),E=f.useState("instantType"),T=f.useState("activeTriggerElement"),A=f.useState("parent"),C=f.useState("lastOpenChangeReason"),_=f.useState("rootId"),N=f.useState("floatingRootContext"),D=f.useState("floatingTreeRoot"),R=f.useState("closeDelay"),$=f.useState("hoverEnabled"),P=f.useState("disabled"),B=f.useState("openMethod"),L=f.useState("activeTriggerId"),k=f.useState("listElement"),[I,V]=f$e(t,d,p),M=d$e(t,T,L),q=A.type==="menu"?m:void 0,G=A.type==="context-menu";let U=l??A.type!=="menu";l===void 0&&k&&A.type!=="menu"&&(U=()=>f.state.activeIndex!==null?!1:k),Md({open:w,ref:f.context.popupRef,onComplete(){var ae,ue;w&&((ue=(ae=f.context).onOpenChangeComplete)==null||ue.call(ae,!0))}}),x.useEffect(()=>{function ae(ue){f.setOpen(!1,Re(ue.reason,ue.domEvent))}return D.events.on("close",ae),()=>{D.events.off("close",ae)}},[D.events,f]),LH(N,{enabled:$&&!P&&!G&&A.type!=="menubar",closeDelay:R});const Y=f.useStateSetter("popupElement"),X=((Q=x.useContext(X8))==null?void 0:Q.useParentHandoff)??m$e,{parentVirtualFocusRef:te,handleFocus:H}=X(f,A,w,h),ee={transitionStatus:S,side:g,align:y,open:w,nested:A.type==="menu",instant:E},J=it("div",t,{state:ee,ref:[n,f.context.popupRef,Y,V],stateAttributesMapping:pC,props:[O,{id:I,...k?{role:"presentation"}:{role:"menu","aria-orientation":b==="horizontal"?"horizontal":void 0,"aria-labelledby":M},onKeyDown(ae){var ue;(ue=q==null?void 0:q.onPopupKeyDown)==null||ue.call(q,ae),v&&A0.has(ae.key)&&ae.stopPropagation()},onFocus:H},M0(S),u,{"data-rootownerid":_}]});let K=A.type===void 0||G;(T||A.type==="menubar"&&C!==l0)&&(K=!0);const oe=(q==null?void 0:q.getReturnElement)??te;return c.jsx(PC,{context:N,openInteractionType:B,modal:G,disabled:!j,returnFocus:o??oe??K,explicitReturnFocus:o===void 0&&oe?!1:void 0,initialFocus:U,restoreFocus:!0,getInsideElements:A.type===void 0?()=>[f.context.beforeTriggerFocusGuardRef.current]:void 0,externalTree:A.type!=="menubar"?D:void 0,previousFocusableElement:T,nextFocusableElement:A.type===void 0?f.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:f.context.beforeContentFocusGuardRef,children:J})}),h$e={parentVirtualFocusRef:void 0,handleFocus:void 0};function m$e(){return h$e}const g$e=x.forwardRef(function(t,n){var i;const r=((i=h_())==null?void 0:i.Popup)??p$e;return c.jsx(r,{...t,ref:n})}),Q8=x.createContext(void 0);function v$e(){const e=x.useContext(Q8);if(e===void 0)throw new Error(Wt(32));return e}const y$e=x.forwardRef(function(t,n){const{keepMounted:r=!1,...i}=t,{store:a,parent:o}=Bu();if(!(a.useState("mounted")||r))return null;const u=o.type==="menu"||o.type==="menubar"?"group":void 0;return c.jsx(Q8.Provider,{value:r,children:c.jsx(NC,{ref:n,...i,portalOwnerRole:u})})});function b$e(e){const{store:t,domReference:n,positionerElement:r,open:i}=e,a=x.useRef(null),o=x.useRef(null),s=b0(r);le(()=>{var l;i||((l=o.current)==null||l.abort(),o.current=null,t.state.instantType==="trigger-change"&&t.set("instantType",void 0))},[i,t]),le(()=>{const l=n,u=a.current;if(l&&(a.current=l),!u||!l||l===u||!t.select("open"))return;t.set("instantType",void 0);const f=new AbortController;return o.current=f,s(()=>{t.select("open")&&t.set("instantType","trigger-change")},f.signal),()=>{f.abort()}},[n,s,t])}const x$e=x.forwardRef(function(t,n){var Se;const{anchor:r,positionMethod:i="absolute",className:a,render:o,side:s,align:l,sideOffset:u=0,alignOffset:f=0,collisionBoundary:d="clipping-ancestors",collisionPadding:p=5,arrowPadding:h=5,sticky:b=!1,disableAnchorTracking:m=!1,collisionAvoidance:g=dH,style:y,...v}=t,{store:w,virtualFocus:S,syncHighlightedItem:O}=Bu(),j=v$e(),E=p_(!0),T=w.useState("parent"),A=w.useState("floatingRootContext"),C=w.useState("floatingTreeRoot"),_=w.useState("mounted"),N=w.useState("open"),D=w.useState("modal"),R=w.useState("openMethod"),$=w.useState("activeTriggerElement"),P=w.useState("transitionStatus"),B=w.useState("positionerElement"),L=w.useState("instantType"),k=w.useState("adaptiveOrigin"),I=w.useState("lastOpenChangeReason"),V=w.useState("floatingNodeId"),M=w.useState("floatingParentNodeId"),q=A.useState("domReferenceElement");let G=r,U=u,Y=f,X=l,te=g;T.type==="context-menu"&&(G=r??((Se=T.context)==null?void 0:Se.anchor),X=X??"start",!s&&X!=="center"&&(Y=t.alignOffset??2,U=t.sideOffset??-5));let H=s,ee=X;T.type==="menu"?(H=H??"inline-end",ee=ee??"start",te=t.collisionAvoidance??pH):T.type==="menubar"&&(H=H??(T.context.orientation==="vertical"?"inline-end":"bottom"),ee=ee??"start");const J=T.type==="context-menu",K=WC({anchor:G,floatingRootContext:A,positionMethod:E?"fixed":i,mounted:_,side:H,sideOffset:U,align:ee,alignOffset:Y,arrowPadding:J?0:h,collisionBoundary:d,collisionPadding:p,sticky:b,nodeId:V,keepMounted:j,disableAnchorTracking:m,collisionAvoidance:te,shift:J?{crossAxis:!("side"in te&&te.side==="flip"),rootBoundary:"layoutViewport"}:void 0,externalTree:C,adaptiveOrigin:k,lazyFlip:S?"placement":!1});x.useEffect(()=>{function re(we){we.open&&(we.parentNodeId===V&&w.set("hoverEnabled",!1),we.nodeId!==V&&we.parentNodeId===w.select("floatingParentNodeId")&&w.setOpen(!1,Re(xp)))}return C.events.on("menuopenchange",re),()=>{C.events.off("menuopenchange",re)}},[w,C.events,V]),x.useEffect(()=>{if(w.select("floatingParentNodeId")==null)return;function re(we){if(we.open||we.nodeId!==w.select("floatingParentNodeId"))return;const $e=we.reason??xp;w.setOpen(!1,Re($e))}return C.events.on("menuopenchange",re),()=>{C.events.off("menuopenchange",re)}},[C.events,w]);const oe=dn();x.useEffect(()=>{N||oe.clear()},[N,oe]),x.useEffect(()=>{function re(we){if(!(!N||we.nodeId!==w.select("floatingParentNodeId")))if(we.target&&$&&$!==we.target){const $e=w.select("closeDelay");$e>0?oe.isStarted()||oe.start($e,()=>{w.setOpen(!1,Re(xp))}):w.setOpen(!1,Re(xp))}else oe.clear()}return C.events.on("itemhover",re),()=>{C.events.off("itemhover",re)}},[C.events,N,$,w,oe]),x.useEffect(()=>{const re={open:N,nodeId:V,parentNodeId:M,reason:w.select("lastOpenChangeReason")};C.events.emit("menuopenchange",re)},[C.events,N,w,V,M]),b$e({store:w,domReference:q,positionerElement:B,open:N});const Q={open:N,side:K.side,align:K.align,anchorHidden:K.anchorHidden,nested:T.type==="menu",instant:L},ae=T.type==="menubar"&&T.context.modal;w6(N&&(ae||D&&I!==bn),R==="touch",B,$);const ye=QC(t,Q,{styles:K.positionerStyles,transitionStatus:P,props:v,refs:[n,w.useStateSetter("positionerElement")],hidden:!_,inert:!N}),Ie=_&&T.type!=="menu"&&(T.type!=="menubar"&&D&&I!==bn||T.type==="menubar"&&T.context.modal);let ce=null;return T.type==="menubar"?ce=T.context.contentElement:T.type===void 0&&(ce=$),c.jsxs(Y8.Provider,{value:K,children:[Ie&&c.jsx(GC,{ref:T.type==="context-menu"||T.type==="nested-context-menu"?T.context.internalBackdropRef:null,inert:VC(!N),cutout:ce}),c.jsx(Qje,{id:V,children:c.jsx(N0,{elementsRef:w.context.itemDomElements,labelsRef:w.context.itemLabels,onMapChange:O,children:ye})})]})}),w$e=x.createContext(null);function Z8(e){return x.useContext(w$e)}function S$e(e){return e==null?Ci:e.type.startsWith("key")?HU:e.type.startsWith("mouse")||e.type.startsWith("pointer")?oje:Ci}const O$e={...Vp,disabled:e=>e.parent.type==="menubar"&&e.parent.context.disabled||e.disabled,modal:e=>(e.parent.type===void 0||e.parent.type==="context-menu")&&(e.modal??!0),openMethod:e=>e.openMethod,keyboardOpen:e=>e.keyboardOpen,allowMouseEnter:e=>e.allowMouseEnter,highlightItemOnHover:e=>e.highlightItemOnHover,parent:e=>e.parent,rootId:e=>e.parent.type==="menu"?e.parent.store.select("rootId"):e.parent.type!==void 0?e.parent.context.rootId:e.rootId,activeIndex:e=>e.activeIndex,listElement:e=>e.listElement,triggerControlsId:(e,t)=>{var r;const n=Vp.triggerPopupId(e,t);return n?((r=e.listElement)==null?void 0:r.id)||n:void 0},filterTriggerProps:e=>e.filterTriggerProps,inputProps:e=>e.inputProps,webkitAriaSelected:(e,t)=>$a&&e.inputFocused&&t?!0:void 0,highlightedItemId:e=>{var t;return((t=e.highlightedItem)==null?void 0:t.id)||void 0},isActive:(e,t)=>e.activeIndex===t,hoverEnabled:e=>e.hoverEnabled,instantType:e=>e.instantType==="trigger-change"&&!Vp.open(e)?void 0:e.instantType,lastOpenChangeReason:e=>e.openChangeReason,floatingTreeRoot:e=>e.parent.type==="menu"?e.parent.store.select("floatingTreeRoot"):e.floatingTreeRoot,floatingNodeId:e=>e.floatingNodeId,floatingParentNodeId:e=>e.floatingParentNodeId,itemProps:e=>e.itemProps,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin,keyboardEventRelay:e=>{if(e.keyboardEventRelay)return e.keyboardEventRelay;if(e.parent.type==="menu")return e.parent.store.select("keyboardEventRelay")}};class j$e extends Lm{constructor(t,n,r=!1){const i=new w0,a=T$e(i,n,r,t);super(a,E$e(i),O$e),this.observe("parent",o=>{o.type==="menu"?this.context.allowMouseUpTriggerRef=o.store.context.allowMouseUpTriggerRef:o.type!==void 0&&(this.context.allowMouseUpTriggerRef=o.context.allowMouseUpTriggerRef)})}subscribeToParentMenu(){const t=this.state.parent;if(t.type!=="menu")return;let n=t.store.select("rootId"),r=t.store.select("floatingTreeRoot"),i=t.store.select("keyboardEventRelay");return t.store.subscribe(()=>{const a=t.store.select("rootId"),o=t.store.select("floatingTreeRoot"),s=t.store.select("keyboardEventRelay");n===a&&r===o&&i===s||(n=a,r=o,i=s,this.notifyAll())})}setOpen(t,n){this.state.floatingRootContext.context.events.emit("setOpen",{open:t,eventDetails:n})}setActiveIndex(t,n,r){if(this.state.activeIndex!==t){const a=(t===null?void 0:this.context.itemDomElements.current[t])===this.context.reportedItem;this.context.highlightReason=a?"none":n,this.context.highlightEvent=a?void 0:r}this.set("activeIndex",t)}highlightItem(t,n,r){const i=this.context.itemDomElements.current.indexOf(t);i>-1&&this.setActiveIndex(i,n,r)}}function E$e(e){return{positionerRef:x.createRef(),popupRef:x.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},highlightReason:"none",highlightEvent:void 0,reportedItem:void 0,allowMouseUpTriggerRef:{current:!1},virtualFocusRef:void 0,triggerFocusTargetRef:x.createRef(),beforeTriggerFocusGuardRef:x.createRef(),beforeContentFocusGuardRef:x.createRef(),onOpenChangeComplete:void 0,triggerElements:e}}function T$e(e,t,n=!1,r){return{...zC(e,t,n),disabled:!1,modal:!0,openMethod:null,keyboardOpen:!1,allowMouseEnter:!1,highlightItemOnHover:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,listElement:null,filterTriggerProps:st,inputProps:st,inputFocused:!1,highlightedItem:void 0,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new RC,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:st,keyboardEventRelay:void 0,closeDelay:0,adaptiveOrigin:void 0,...r}}const jI=x.createContext(null);function J8(e,t){return(e===Iu||e===Fc)&&(t==null?void 0:t.detail)===0}function A$e(e,t){return e===wb||J8(e,t)}const C$e=j0(function(t){const{children:n,open:r,onOpenChange:i,onOpenChangeComplete:a,onItemHighlighted:o,defaultOpen:s=!1,disabled:l=!1,modal:u,loopFocus:f=!0,orientation:d="vertical",actionsRef:p,closeParentOnEsc:h=!1,handle:b,triggerId:m,defaultTriggerId:g=null,highlightItemOnHover:y=!0,isSubmenu:v=!1,virtualFocus:w=!1,virtualFocusRef:S,allowEscape:O=!0,resetOnPointerLeave:j=!0}=t,E=p_(!0),T=Bu(!0),A=Z8(!0),C=T==null?void 0:T.store,_=(T==null?void 0:T.virtualFocus)??!1,N=x.useMemo(()=>v&&C?{type:"menu",store:C}:A?{type:"menubar",context:A}:E&&!C?{type:"context-menu",context:E}:{type:void 0},[E,C,A,v]),D=_i(),R=_i(),[$,P]=x.useState(void 0),B=($??R)||void 0,L=tl(),k=N.type==="menu"?N.store:void 0,I=(r??s)&&(k==null?void 0:k.state.transitionStatus)==="starting",V=fn(()=>I?k==null?void 0:k.state.instantType:void 0).current,M=fn(()=>{const fe=new j$e({open:s,openProp:r,activeTriggerId:g,triggerIdProp:m,parent:N,disabled:l,highlightItemOnHover:y,modal:N.type===void 0?u:void 0,rootId:D,instantType:V},B,L!=null);return fe.context.virtualFocusRef=S,fe}).current;M.useControlledProp("openProp",r),M.useControlledProp("triggerIdProp",m),M.useContextCallback("onOpenChangeComplete",a);const q=M.useState("floatingTreeRoot"),G=xH(q),U=M.useState("open"),Y=M.useState("activeTriggerElement"),X=M.useState("positionerElement"),te=M.useState("hoverEnabled"),H=M.useState("disabled"),ee=M.useState("lastOpenChangeReason"),J=M.useState("parent"),K=M.useState("activeIndex"),oe=M.useState("keyboardOpen"),Q=M.useState("payload"),ae=M.useState("floatingParentNodeId"),ue=x.useRef(null),ye=x.useRef(J.type!=="context-menu"),Ie=dn(),ce=x.useRef(!0),Se=dn(),re=ae!=null,{openMethod:we,triggerProps:$e}=e6(U);M.useSyncedValues({disabled:l,highlightItemOnHover:y,modal:J.type===void 0?u:void 0,openMethod:we,rootId:D}),kC(M);const{forceUnmount:at,transitionStatus:W}=LC(U,M,()=>{M.set("allowMouseEnter",!1)},I),ie=b0(M.context.popupRef);x.useEffect(()=>{if(V===void 0)return;const fe=()=>{M.state.instantType===V&&M.set("instantType",void 0)};if(!U){fe();return}if(W!==void 0)return;if(M.context.popupRef.current==null){fe();return}const Ee=new AbortController;return ie(fe,Ee.signal),()=>{Ee.abort()}},[V,U,W,ie,M]),le(()=>{E&&!T?M.update({parent:{type:"context-menu",context:E},floatingNodeId:G,floatingParentNodeId:L}):(T||!M.select("activeTriggerElement"))&&M.update({floatingNodeId:G,floatingParentNodeId:L})},[E,T,G,L,Y,M]),x.useEffect(()=>{if(U||(ue.current=null),J.type==="context-menu"){if(!U){Ie.clear(),ye.current=!1;return}Ie.start(500,()=>{ye.current=!0})}},[Ie,U,J.type]),le(()=>{!U&&!te&&M.set("hoverEnabled",!0)},[U,te,M]);const Oe=de((fe,Ee)=>{const rt=Ee.reason;if(!fe&&!M.select("open")||U===fe&&Ee.trigger===Y&&ee===rt)return;const tn=IC(Ee);if(!fe&&Ee.trigger==null&&(Ee.trigger=Y??void 0),i==null||i(fe,Ee),Ee.isCanceled)return;M.state.floatingRootContext.dispatchOpenChange(fe,Ee);const nn=Ee.event;if(fe===!1&&rt!==Fc&&(nn==null?void 0:nn.type)==="click"&&nn.pointerType==="touch"&&!ce.current)return;fe&&rt===zc?(ce.current=!1,Se.start(300,()=>{ce.current=!0})):(ce.current=!0,Se.clear());const De=!fe&&(rt===u0||rt==null);ue.current=Ee.event;const ct=DC(M.state,fe,Ee.trigger,tn());ct.openChangeReason=rt,ct.keyboardOpen=fe&&A$e(rt,nn),J.type==="menubar"&&(rt===zc||rt===mu||rt===bn||rt===wb||rt===xp)?ct.instantType="group":J8(rt,nn)?ct.instantType="click":De?ct.instantType="dismiss":ct.instantType=void 0,M.update(ct)}),pe=SH({popupStore:M,floatingRootContext:M.state.floatingRootContext,floatingId:B,nested:L!=null,onOpenChange:Oe}),he=pe.context.events;le(()=>{const fe=({open:Ee,eventDetails:rt})=>Oe(Ee,rt);return he.on("setOpen",fe),()=>{he==null||he.off("setOpen",fe)}},[he,Oe]),le(()=>M.subscribeToParentMenu(),[M]);const Fe=x.useCallback(()=>{M.setOpen(!1,Re(c0))},[M]);x.useImperativeHandle(p,()=>({unmount:at,close:Fe}),[at,Fe]);let Le;J.type==="context-menu"&&(Le=J.context),x.useImperativeHandle(Le==null?void 0:Le.positionerRef,()=>X,[X]),x.useImperativeHandle(Le==null?void 0:Le.actionsRef,()=>({setOpen:Oe}),[Oe]);const nt=y0(pe,{enabled:!H,bubbles:{escapeKey:h&&J.type==="menu"},outsidePress(){var fe;return J.type!=="context-menu"||((fe=ue.current)==null?void 0:fe.type)==="contextmenu"?!0:ye.current},externalTree:re?q:void 0}),Kt=R0(),ht=zH(pe,{enabled:!H,listRef:M.context.itemDomElements,activeIndex:K,virtual:w,nested:J.type==="menubar"||!w&&J.type!==void 0,parentOrientation:J.type==="menubar"?J.context.orientation:void 0,loopFocus:f,focusItemOnOpen:w?oe:void 0,allowEscape:w&&f&&O,orientation:d,triggerOrientation:w?"vertical":d,rtl:Kt==="rtl",disabledIndices:Gi,onNavigate(fe,Ee){M.setActiveIndex(fe,S$e(Ee),Ee==null?void 0:Ee.nativeEvent)},openOnArrowKeyDown:J.type!=="context-menu"&&!(w&&v),externalTree:!w&&re?q:void 0,nestedReturnFocusRef:k==null?void 0:k.context.virtualFocusRef,focusItemOnHover:y,resetOnPointerLeave:j}),oi=x.useCallback(fe=>{M.context.typingRef.current=fe},[M]),cr=FH(pe,{enabled:!H&&!w,listRef:M.context.itemLabels,elementsRef:M.context.itemDomElements,activeIndex:K,resetMs:Vje,onMatch:(fe,Ee)=>{U&&fe!==K&&M.setActiveIndex(fe,HU,Ee.nativeEvent)},onTyping:oi}),jr=de(o),fr=x.useRef(-1),En=de(()=>{const fe=M.state.activeIndex,Ee=fe===null?void 0:M.context.itemDomElements.current[fe]??void 0;if((Ee==null?void 0:Ee.isConnected)===!1)return;const rt=Ee===void 0?-1:fe;if(fr.current===rt&&M.context.reportedItem===Ee)return;fr.current=rt,M.context.reportedItem=Ee,w&&M.set("highlightedItem",Ee);const{highlightReason:tn,highlightEvent:nn}=M.context;M.context.highlightReason=Ci,M.context.highlightEvent=void 0,o&&jr(Ee,ije(tn,nn,{label:Ee===void 0?void 0:M.context.itemLabels.current[rt]??void 0}))});le(()=>{En()},[K,En]);const Er=x.useMemo(()=>{if(!w)return ht.reference;if(!ht.trigger)return st;const{onFocus:fe,...Ee}=ht.trigger;return Ee},[w,ht.reference,ht.trigger]);M.useSyncedValue("inputProps",w?ht.reference??st:st);const Tr=x.useMemo(()=>{const fe=Ir(cr.reference,Er,nt.reference,{onMouseMove(){M.set("allowMouseEnter",!0)}},$e);return fe["aria-haspopup"]="menu",fe["aria-expanded"]=U,fe},[M,cr.reference,Er,nt.reference,$e,U]),si=x.useMemo(()=>{const fe=Ir(ht.trigger,nt.trigger,$e);return fe["aria-haspopup"]="menu",fe["aria-expanded"]=!1,fe},[ht.trigger,nt.trigger,$e]);fn(()=>(M.update({inactiveTriggerProps:si}),null));const pn=x.useMemo(()=>Ir(x0,{onMouseMove(){M.set("allowMouseEnter",!0),J.type==="menu"&&M.set("hoverEnabled",!1)},onClick(){M.select("hoverEnabled")&&M.set("hoverEnabled",!1)},onKeyDown(fe){const Ee=M.select("keyboardEventRelay");Ee&&!fe.isPropagationStopped()&&Ee(fe)}},cr.floating,ht.floating,nt.floating),[J.type,M,cr.floating,ht.floating,nt.floating]),dr=ht.item??st;BC(M,{floatingRootContext:pe,activeTriggerProps:Tr,inactiveTriggerProps:si,popupProps:pn,itemProps:dr});const li=x.useMemo(()=>({store:M,parent:N,orientation:d,loopFocus:f,allowEscape:O,defaultFloatingId:R,setRenderedFloatingId:P,virtualFocus:w,parentVirtualFocus:_,syncHighlightedItem:En}),[M,N,d,f,O,R,w,_,En]),Da=typeof n=="function"?n({payload:Q}):n;let Ia=c.jsxs(d_.Provider,{value:li,children:[b&&c.jsx($C,{handle:b,store:M}),Da]});return(J.type===void 0||J.type==="context-menu")&&(Ia=c.jsx(Zje,{externalTree:q,children:Ia})),Ia});function _$e(e){const t=x.useContext(jI);if(t===null)return c.jsx(C$e,{...e});const n=t.Root;return c.jsx(jI.Provider,{value:null,children:c.jsx(n,{...t.options,...e})})}function N$e(e){const{render:t,className:n,style:r,state:i=st,props:a=Gi,refs:o=Gi,metadata:s,stateAttributesMapping:l,tag:u="div",...f}=e,{compositeProps:d,compositeRef:p}=T6({metadata:s});return it(u,e,{state:i,ref:[p,...o],props:[d,...a,f],stateAttributesMapping:l})}function eq(e){if(Et(e)&&e.hasAttribute("data-rootownerid"))return e.getAttribute("data-rootownerid");if(!so(e))return eq(jo(e))}function R$e(e,t){function n(a,o,s){var u;const l=a.currentTarget;Ni.flushSync(()=>{e.setOpen(!1,Re(mu,a.nativeEvent,l))}),(u=Uje(l.isConnected?l:t.current,o,s))==null||u.focus()}function r(a){n(a,-1,e.select("positionerElement"))}function i(a){var s;const o=e.select("positionerElement");o&&Vc(a,o)?(s=e.context.beforeContentFocusGuardRef.current)==null||s.focus():n(a,1,o)}return{handlePreFocusGuardFocus:r,handleFocusTargetFocus:i}}function M$e(e){const{enabled:t=!0,mouseDownAction:n,open:r}=e,i=x.useRef(!1);return x.useMemo(()=>t?{onMouseDown:a=>{(n==="open"&&!r||n==="close"&&r)&&(i.current=!0,Qe(a.currentTarget).addEventListener("click",()=>{i.current=!1},{once:!0}))},onClick:a=>{i.current&&(i.current=!1,a.preventBaseUIHandler())}}:st,[t,n,r])}const P$e=RH(function(t,n){const{render:r,className:i,style:a,disabled:o=!1,nativeButton:s=!0,id:l,openOnHover:u,delay:f=100,closeDelay:d=0,handle:p,payload:h,...b}=t,m=Bu(!0),y=DH(p)??(m==null?void 0:m.store);if(!y)throw new Error(Wt(85));const v=_i(l),w=y.useState("isTriggerActive",v),S=y.useState("floatingRootContext"),O=y.useState("isOpenedByTrigger",v),j=y.useState("triggerControlsId",v),E=x.useRef(null),T=D$e(),A=s0(!0),C=nl(),_=x.useMemo(()=>C??new RC,[C]),N=xH(_),D=tl(),{registerTrigger:R,isMountedByThisTrigger:$}=TH(v,E,y,{payload:h,closeDelay:d,parent:T,floatingTreeRoot:_,floatingNodeId:N,floatingParentNodeId:D,keyboardEventRelay:A==null?void 0:A.relayKeyboardEvent}),P=T.type==="menubar",B=y.useState("disabled"),L=o||B||P&&T.context.disabled,{getButtonProps:k,buttonRef:I}=el({disabled:L,native:s});x.useEffect(()=>{!O&&T.type===void 0&&(y.context.allowMouseUpTriggerRef.current=!1)},[y,O,T.type]);const V=x.useRef(null),M=dn(),q=de(Se=>{if(!V.current)return;M.clear(),y.context.allowMouseUpTriggerRef.current=!1;const re=Se.target;je(V.current,re)||je(y.select("positionerElement"),re)||re===V.current||re!=null&&eq(re)===y.select("rootId")||g6(Se,V.current)||_.events.emit("close",{domEvent:Se,reason:qU})});x.useEffect(()=>{const Se=Qe(V.current);if(O&&y.select("lastOpenChangeReason")===bn)return Se.addEventListener("mouseup",q,{once:!0}),()=>{Se.removeEventListener("mouseup",q)}},[O,q,y]);const G=P&&T.context.hasSubmenuOpen,Y=BH(S,{enabled:(u??G)&&!L&&(!P||G&&!$),handleClose:UH({blockPointerEvents:!P}),mouseOnly:!0,move:!1,restMs:T.type===void 0?f:void 0,delay:{close:d},triggerElementRef:E,externalTree:_,isActiveTrigger:w,isClosing:()=>y.select("transitionStatus")==="ending"}),X=$$e(O,y.select("lastOpenChangeReason")),te=wH(S,{enabled:!L,event:O&&P?"click":"mousedown",toggle:!0,ignoreMouse:!1,stickIfOpen:T.type===void 0?X:!1}),H=IH(S,{enabled:!L&&G}),ee=M$e({open:O,enabled:P,mouseDownAction:"open"}),J=x.useMemo(()=>Ir(H.reference,te.reference),[H.reference,te.reference]),K=y.useState("triggerProps",$),oe=y.useState("filterTriggerProps"),{handlePreFocusGuardFocus:Q,handleFocusTargetFocus:ae}=R$e(y,E),ue={disabled:L,open:O},ye=[V,n,I,R,E],Ie=[J,Y??st,K,{"aria-haspopup":"menu","aria-controls":j,id:v,onMouseDown:Se=>{if(y.select("open"))return;M.start(200,()=>{y.context.allowMouseUpTriggerRef.current=!0}),Qe(Se.currentTarget).addEventListener("mouseup",q,{once:!0})}},oe,P?{role:"menuitem"}:{},ee,b,k],ce=it("button",t,{enabled:!P,stateAttributesMapping:Wj,state:ue,ref:ye,props:Ie});return P?c.jsx(N$e,{tag:"button",render:r,className:i,style:a,state:ue,refs:ye,props:Ie,stateAttributesMapping:Wj}):O?c.jsxs(x.Fragment,{children:[c.jsx(Jf,{ref:y.context.beforeTriggerFocusGuardRef,onFocus:Q},`${v}-pre-focus-guard`),c.jsx(x.Fragment,{children:ce},v),c.jsx(Jf,{ref:y.context.triggerFocusTargetRef,onFocus:ae},`${v}-post-focus-guard`)]}):c.jsx(x.Fragment,{children:ce},v)});function $$e(e,t){const n=dn(),[r,i]=x.useState(!1);return le(()=>{e&&t===bn?(i(!0),n.start(Gje,()=>{i(!1)})):e||(n.clear(),i(!1))},[e,t,n]),r}function D$e(){const e=Z8();return x.useMemo(()=>e?{type:"menubar",context:e}:{type:void 0},[e])}function I$e({...e}){return c.jsx(_$e,{"data-slot":"dropdown-menu",...e})}function k$e({...e}){return c.jsx(P$e,{"data-slot":"dropdown-menu-trigger",...e})}function L$e({align:e="start",alignOffset:t=0,side:n="bottom",sideOffset:r=4,className:i,...a}){return c.jsx(y$e,{children:c.jsx(x$e,{className:"isolate z-50 outline-none",align:e,alignOffset:t,side:n,sideOffset:r,children:c.jsx(g$e,{"data-slot":"dropdown-menu-content",className:ge("cn-menu-target cn-menu-translucent z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95",i),...a})})})}function B$e({...e}){return c.jsx(i$e,{"data-slot":"dropdown-menu-group",...e})}function z$e({className:e,inset:t,...n}){return c.jsx(a$e,{"data-slot":"dropdown-menu-label","data-inset":t,className:ge("px-2 py-1.5 text-xs font-medium text-muted-foreground data-inset:pl-8",e),...n})}function M1({className:e,inset:t,variant:n="default",...r}){return c.jsx(s$e,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:ge("group/dropdown-menu-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",e),...r})}function F$e({className:e,...t}){return c.jsx(BRe,{"data-slot":"dropdown-menu-separator",className:ge("-mx-1 my-1 h-px bg-border",e),...t})}function U$e({className:e,...t}){return c.jsx("span",{"data-slot":"dropdown-menu-shortcut",className:ge("ml-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground",e),...t})}function H$e(e){const[t,n]=x.useState([]);return x.useEffect(()=>{if(!e)return;let r=!0;return c8(e).then(i=>{r&&n(i)}),()=>{r=!1}},[e]),t}function q$e({brand:e,current:t,config:n,onSearch:r}){const i=H$e(n);return!n||i.length===0?c.jsx(c.Fragment,{children:e}):c.jsx("div",{"data-aviary-switcher":"",className:"min-w-0",children:c.jsxs(I$e,{children:[c.jsxs(k$e,{"aria-label":`${t.title}: switch console`,className:"flex w-full min-w-0 items-center gap-2 rounded-md p-1 text-left outline-none transition-colors hover:bg-sidebar-accent/60 focus-visible:ring-2 focus-visible:ring-ring/60 data-popup-open:bg-sidebar-accent/60",children:[c.jsx("span",{className:"min-w-0 flex-1",children:e}),c.jsx(W6,{className:"size-3.5 shrink-0 text-dim"})]}),c.jsxs(L$e,{align:"start",className:"w-64 border border-border bg-popover shadow-(--aviary-shadow) ring-0",children:[c.jsxs(B$e,{children:[c.jsx(z$e,{className:"text-[10px] uppercase tracking-[0.16em] text-dim",children:"Consoles"}),c.jsxs(M1,{disabled:!0,"aria-current":"page",className:"data-disabled:opacity-100",children:[c.jsx(jE,{icon:t.icon,accent:"var(--aviary-accent)"}),c.jsx(EI,{title:t.title,pkg:t.package}),c.jsx(Q6,{"aria-label":"Current console",className:"ml-auto text-brand"})]}),i.map(a=>c.jsxs(M1,{render:c.jsx("a",{href:a.href}),children:[c.jsx(jE,{icon:a.icon,accent:n8(a.id,a.icon)}),c.jsx(EI,{title:a.title,pkg:a.package})]},a.id))]}),r&&c.jsxs(c.Fragment,{children:[c.jsx(F$e,{}),c.jsxs(M1,{onClick:r,children:[c.jsx(o_,{className:"text-dim"}),"Search all consoles",c.jsx(U$e,{className:"mono",children:"⌘K"})]})]})]})]})})}function EI({title:e,pkg:t}){return c.jsxs("span",{className:ge("flex min-w-0 flex-col leading-tight"),children:[c.jsx("span",{className:"truncate",children:e}),t&&c.jsx("span",{className:"mono truncate text-[10px] text-dim",children:t})]})}const tq=x.createContext({theme:"dark",setTheme:()=>{},toggle:()=>{}});function V$e(e){try{const t=window.localStorage.getItem(e);return t==="light"||t==="dark"?t:void 0}catch{return}}function G$e(e,t){return typeof window>"u"?t:V$e(e)??t}function K$e(e){if(typeof document>"u")return;const t=document.documentElement;t.classList.toggle("light",e==="light"),t.classList.toggle("dark",e==="dark"),t.dataset.theme=e}function Y$e({children:e,storageKey:t,accent:n,defaultTheme:r="dark"}){const[i,a]=x.useState(()=>G$e(t,r));x.useEffect(()=>{K$e(i)},[i]),x.useEffect(()=>{n&&typeof document<"u"&&document.documentElement.style.setProperty("--aviary-accent",n)},[n]);const o=x.useCallback(l=>{if(typeof document<"u"){const u=document.documentElement;u.classList.add("aviary-theme-switching"),window.setTimeout(()=>u.classList.remove("aviary-theme-switching"),260)}a(l);try{window.localStorage.setItem(t,l)}catch{}},[t]),s=x.useCallback(()=>o(i==="dark"?"light":"dark"),[i,o]);return c.jsx(tq.Provider,{value:{theme:i,setTheme:o,toggle:s},children:e})}function X$e(){return x.useContext(tq)}const nq=x.createContext(void 0);function W$e(){const e=x.useContext(nq);if(e===void 0)throw new Error(Wt(13));return e}const rq={imageLoadingStatus:()=>null},Q$e=x.forwardRef(function(t,n){const{className:r,render:i,style:a,...o}=t,[s,l]=x.useState("idle"),u={imageLoadingStatus:s},f=x.useMemo(()=>({imageLoadingStatus:s,setImageLoadingStatus:l}),[s,l]),d=it("span",t,{state:u,ref:n,props:o,stateAttributesMapping:rq});return c.jsx(nq.Provider,{value:f,children:d})}),Z$e=x.forwardRef(function(t,n){const{className:r,render:i,delay:a=0,style:o,...s}=t,{imageLoadingStatus:l}=W$e(),[u,f]=x.useState(a===0),d=dn();return x.useEffect(()=>(a>0?d.start(a,()=>f(!0)):f(!0),d.clear),[d,a]),it("span",t,{state:{imageLoadingStatus:l},ref:n,props:s,stateAttributesMapping:rq,enabled:l!=="loaded"&&(a===0||u)})});function J$e({className:e,size:t="default",...n}){return c.jsx(Q$e,{"data-slot":"avatar","data-size":t,className:ge("group/avatar relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:border-border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten",e),...n})}function eDe({className:e,...t}){return c.jsx(Z$e,{"data-slot":"avatar-fallback",className:ge("flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs",e),...t})}function tDe(e){var i,a;const t=e.label.includes("@")?e.label.split("@")[0]??"":e.label,n=t.split(/[\s._-]+/).filter(Boolean);return(n.length>1?`${((i=n[0])==null?void 0:i[0])??""}${((a=n[1])==null?void 0:a[0])??""}`:t.slice(0,2)).toUpperCase()||"?"}function nDe({viewer:e,signOut:t}){const{theme:n,toggle:r}=X$e();return c.jsxs("div",{className:"flex flex-col gap-2",children:[e&&c.jsxs("div",{className:"flex items-center gap-[9px] px-2 py-1.5","data-aviary-viewer":"",children:[c.jsx(J$e,{size:"sm",className:"size-7 after:hidden",children:c.jsx(eDe,{className:"border border-brand-border bg-brand-soft text-[10.5px] font-semibold text-brand",children:tDe(e)})}),c.jsxs("div",{className:"min-w-0 leading-tight",children:[c.jsx("div",{className:"truncate text-[11px] font-medium text-fg",title:e.email??e.label,children:e.label}),(e.role||e.email&&e.email!==e.label)&&c.jsx("div",{className:"mono truncate text-[9.5px] uppercase text-faint",children:e.role??e.email})]})]}),c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsxs(Ql,{variant:"ghost",size:"sm",className:"flex-1 justify-center",onClick:r,"aria-label":n==="dark"?"Switch to light mode":"Switch to dark mode",children:[n==="dark"?c.jsx(KNe,{}):c.jsx(YNe,{}),n==="dark"?"Light mode":"Dark mode"]}),t&&("action"in t?c.jsxs("form",{method:"post",action:t.action,className:"contents",children:[t.csrfToken&&c.jsx("input",{type:"hidden",name:"_csrf",value:t.csrfToken}),c.jsx(Ql,{type:"submit",variant:"ghost",size:"icon-sm","aria-label":"Sign out",title:"Sign out",className:"text-dim",children:c.jsx(ZD,{})})]}):c.jsx(Ql,{variant:"ghost",size:"icon-sm","aria-label":"Sign out",title:"Sign out",className:"text-dim",nativeButton:!1,render:c.jsx("a",{href:t.href}),children:c.jsx(ZD,{})}))]})]})}function rDe({brand:e}){return c.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[c.jsxs("div",{className:"relative grid size-[30px] shrink-0 place-items-center rounded-md border border-brand-border bg-brand-soft text-brand [&_svg]:size-4",children:[e.mark,c.jsx("span",{className:"aviary-ring","aria-hidden":!0})]}),c.jsxs("div",{className:"min-w-0 overflow-hidden",children:[c.jsx("div",{className:"truncate text-sm font-bold tracking-[0.03em] text-fg",children:e.name}),e.subtitle&&c.jsx("div",{className:"mt-px truncate text-[10px] font-medium uppercase tracking-[0.08em] text-faint",children:e.subtitle})]})]})}function iDe({nav:e,activeId:t}){const{isMobile:n,setOpenMobile:r}=D0(),i=x.useCallback(()=>{n&&r(!1)},[n,r]);return c.jsx(c.Fragment,{children:e.filter(a=>a.items.length>0).map(a=>a.collapsible?c.jsx(DRe,{defaultOpen:a.defaultOpen??!0,children:c.jsxs(eI,{className:"px-2.5 py-0",children:[c.jsxs(tI,{className:ge(TI,"p-0"),render:c.jsx(IRe,{className:"flex w-full items-center gap-1 rounded-md px-2 pt-3 pb-1.5 text-left uppercase hover:text-dim"}),children:[a.section,c.jsx(W6,{className:"ml-auto size-3! -rotate-90 transition-transform in-data-panel-open:rotate-0"})]}),c.jsx(kRe,{children:c.jsx(nI,{children:c.jsx(AI,{items:a.items,activeId:t,after:i})})})]})},a.section):c.jsxs(eI,{className:"px-2.5 py-0",children:[c.jsx(tI,{className:TI,children:a.section}),c.jsx(nI,{children:c.jsx(AI,{items:a.items,activeId:t,after:i})})]},a.section))})}const TI="h-auto px-2 pt-3 pb-1.5 text-[9.5px] font-semibold uppercase tracking-[0.14em] text-faint";function AI({items:e,activeId:t,after:n}){return c.jsx(cMe,{className:"gap-0.5",children:e.map(r=>{const i=r.id===t,a=c.jsxs(c.Fragment,{children:[r.icon,c.jsx("span",{children:r.label})]});return c.jsxs(fMe,{children:[r.href?c.jsx(rI,{isActive:i,"aria-current":i?"page":void 0,className:CI,render:c.jsx("a",{href:r.href,onClick:o=>{r.onSelect&&(o.preventDefault(),r.onSelect()),n()}}),children:a}):c.jsx(rI,{isActive:i,"aria-current":i?"page":void 0,className:CI,onClick:()=>{var o;(o=r.onSelect)==null||o.call(r),n()},children:a}),r.badge!==void 0&&c.jsx(pMe,{className:"mono tnum text-[10px]",children:r.badge})]},r.id)})})}const CI="h-auto gap-[9px] rounded-md border border-transparent px-[9px] py-[7px] text-[12.5px] font-medium text-dim transition-colors hover:bg-hover hover:text-fg data-active:border-brand-border data-active:bg-brand-soft data-active:font-medium data-active:text-fg [&_svg]:size-[15px]! [&_svg]:text-faint hover:[&_svg]:text-dim data-active:[&_svg]:text-brand";function aDe({title:e,actions:t,search:n}){return c.jsxs("header",{className:"sticky top-0 z-20 flex h-(--aviary-topbar-h) shrink-0 items-center gap-3 border-b border-border bg-(--aviary-topbar) px-3 backdrop-blur-md md:px-5",children:[c.jsx(aMe,{className:"-ml-1 text-dim md:hidden"}),c.jsx("div",{className:"min-w-0 truncate text-sm font-semibold text-fg",children:e}),c.jsxs("div",{className:"ml-auto flex min-w-0 items-center gap-2",children:[t,n]})]})}function oDe({brand:e,nav:t,activeId:n,shell:r,title:i,actions:a,children:o,searchPlaceholder:s,contentClassName:l,commands:u}){const[f,d]=x.useState(!1),p=r.search!==void 0||((u==null?void 0:u.length)??0)>0;H2e(p,d);const h=x.useCallback(()=>d(!0),[]);return c.jsxs(KRe,{delay:150,children:[c.jsx("div",{className:"aviary-glow","aria-hidden":!0}),c.jsxs(rMe,{className:"relative z-[1] h-svh min-h-0 overflow-hidden",style:{"--sidebar-width":"var(--aviary-sidebar-w)"},children:[c.jsxs(iMe,{className:"border-sidebar-border [&_[data-slot=sidebar-inner]]:backdrop-blur-md",children:[c.jsx(sMe,{className:"border-b border-sidebar-border px-[18px] pt-[18px] pb-3.5",children:c.jsx(q$e,{brand:c.jsx(rDe,{brand:e}),current:e.current,config:r.switcher,...p?{onSearch:h}:{}})}),c.jsx(uMe,{className:"pt-1 pb-2",children:c.jsx("nav",{"aria-label":"Console",children:c.jsx(iDe,{nav:t,activeId:n})})}),c.jsx(lMe,{className:"border-t border-sidebar-border px-3.5 py-3",children:c.jsx(nDe,{...r.viewer?{viewer:r.viewer}:{},...r.signOut?{signOut:r.signOut}:{}})})]}),c.jsxs(oMe,{className:"min-h-0 min-w-0 overflow-hidden bg-transparent",children:[c.jsx(aDe,{title:i,actions:a,search:p?c.jsx(q2e,{onOpen:h}):void 0}),c.jsx("div",{className:ge("relative min-h-0 flex-1 overflow-y-auto",l),children:o})]})]}),p&&c.jsx(G2e,{config:r.search,switcher:r.switcher,commands:u,open:f,onOpenChange:d,...s?{placeholder:s}:{}})]})}function Bo({children:e,className:t}){return c.jsx("div",{className:ge("flex flex-col gap-4 px-4 pt-5 pb-16 md:px-6 md:pt-6",t),children:e})}function zu({children:e,...t}){return c.jsx("svg",{viewBox:"0 0 16 16",width:16,height:16,fill:"none",stroke:"currentColor",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t,children:e})}function sDe(e){return c.jsx(zu,{...e,children:c.jsx("path",{d:"M1.5 8.5h2.5l1.5-3 2.5 6 2-4.5 1 1.5h3.5"})})}function lDe(e){return c.jsx(zu,{...e,children:c.jsx("path",{d:"M2 3.5h7M4 6.5h7M6 9.5h5M8 12.5h6"})})}function uDe(e){return c.jsxs(zu,{...e,children:[c.jsx("path",{d:"M8 1.5c.5 3 1.5 4 4.5 4.5-3 .5-4 1.5-4.5 4.5-.5-3-1.5-4-4.5-4.5 3-.5 4-1.5 4.5-4.5z"}),c.jsx("path",{d:"M12.5 10.5v3M11 12h3"})]})}function cDe(e){return c.jsxs(zu,{...e,children:[c.jsx("rect",{x:"1.5",y:"11",width:"13",height:"2.5",rx:"0.6"}),c.jsx("rect",{x:"2.5",y:"7.5",width:"7",height:"2.5",rx:"0.6"}),c.jsx("rect",{x:"10.5",y:"7.5",width:"3",height:"2.5",rx:"0.6"}),c.jsx("rect",{x:"3.5",y:"4",width:"4",height:"2.5",rx:"0.6"})]})}function fDe(e){return c.jsx(zu,{...e,children:c.jsx("path",{d:"M8 2v8M4.5 6.5 8 10l3.5-3.5M2.5 11v2.5h11V11"})})}function dDe(e){return c.jsx(zu,{...e,children:c.jsx("path",{d:"M2.5 4h11M6 4V2.5h4V4M4 4l.7 9.5h6.6L12 4M6.8 6.5v4.5M9.2 6.5v4.5"})})}function pDe(e){return c.jsxs(zu,{...e,children:[c.jsx("rect",{x:"1.5",y:"2",width:"13",height:"12",rx:"2"}),c.jsx("path",{d:"M4.5 11V8.5M8 11V5.5M11.5 11V7"})]})}const P1="All organizations";function _I(e){const t=new URL(window.location.href);e===null?t.searchParams.delete("tenant"):t.searchParams.set("tenant",e),window.location.assign(t.toString())}function hDe(e,t){const[n,r]=x.useState(e);return x.useEffect(()=>{const i=setTimeout(()=>r(e),t);return()=>clearTimeout(i)},[e,t]),n}function mDe(){var b;const e=mO(),[t,n]=x.useState(!1),[r,i]=x.useState(""),a=hDe(r.trim(),200),o=mO(t?a:""),s=x.useRef(null),l=x.useId();x.useEffect(()=>{function m(g){var v;const y=g.target;y instanceof Node&&!((v=s.current)!=null&&v.contains(y))&&n(!1)}return document.addEventListener("mousedown",m),()=>document.removeEventListener("mousedown",m)},[]);const u=e.data;if(!(u!=null&&u.enabled))return null;const f=m=>{var g;return m===null?u.tenants==="*"?P1:"none":((g=u.options.find(y=>y.id===m))==null?void 0:g.label)??m},d="rounded border border-line px-2 py-1 text-xs";if(Array.isArray(u.tenants)&&u.tenants.length<=1)return c.jsxs("span",{className:d,title:"Organization",children:[c.jsx("span",{className:"text-muted-foreground",children:"Organization: "}),u.tenants[0]!==void 0?f(u.tenants[0]):"none"]});const p=(b=o.data)!=null&&b.enabled?o.data.options:u.options,h=[...u.tenants==="*"&&(a===""||P1.toLowerCase().includes(a.toLowerCase()))?[{id:null,label:P1}]:[],...p];return c.jsxs("div",{ref:s,className:"relative",children:[c.jsxs("button",{type:"button",className:`${d} hover:bg-panel-2`,"aria-haspopup":"listbox","aria-expanded":t,"aria-controls":l,onClick:()=>n(m=>!m),children:[c.jsx("span",{className:"text-muted-foreground",children:"Organization: "}),f(u.selected)]}),t?c.jsxs("div",{className:"absolute right-0 top-full z-20 mt-1 w-64 rounded border border-line bg-popover p-1 shadow-lg",children:[c.jsx(nd,{type:"text",value:r,autoFocus:!0,onChange:m=>i(m.target.value),placeholder:"Search organizations…","aria-label":"Search organizations"}),c.jsxs("div",{id:l,role:"listbox","aria-label":"Organizations",tabIndex:-1,className:"mt-1 max-h-64 overflow-auto",children:[h.map(m=>c.jsx("div",{role:"option",tabIndex:0,"aria-selected":m.id===u.selected,onClick:()=>_I(m.id),onKeyDown:g=>{g.key==="Enter"&&_I(m.id)},className:`cursor-pointer truncate px-2 py-1 text-xs hover:bg-panel-2 ${m.id===u.selected?"text-brand":"text-foreground"}`,children:m.label},m.id??"*")),h.length===0?c.jsx("p",{className:"px-2 py-1 text-xs text-muted-foreground",children:"No organization found."}):null]})]}):null]})}function gDe(){const e=mO().data;return(e==null?void 0:e.enabled)===!0&&Array.isArray(e.tenants)&&e.tenants.length===0}const vDe="telescope-dashboard-config",yDe=[{to:"/",label:"Overview",end:!0},{to:"/pulse",label:"Pulse",end:!1},{to:"/entries/exception",label:"Exceptions",end:!0},{to:"/entries",label:"Entries",end:!0},{to:"/traces",label:"Traces",end:!0},{to:"/ai",label:"AI",end:!1},{to:"/profiles",label:"Profiles",end:!1},{to:"/queues",label:"Queues",end:!1},{to:"/schedules",label:"Schedules",end:!1},{to:"/exports",label:"Exports",end:!1},{to:"/prunes",label:"Prunes",end:!1}];function bDe(e,t,n){return e.filter(r=>!(r.to==="/traces"&&t===!1||r.to==="/profiles"&&n!==!0))}const xDe={"/":"Monitor","/pulse":"Monitor","/entries/exception":"Monitor","/entries":"Explore","/traces":"Explore","/ai":"Explore","/profiles":"Explore","/queues":"Operations","/schedules":"Operations","/exports":"Data","/prunes":"Data"},wDe={"/":c.jsx(WNe,{}),"/pulse":c.jsx(sDe,{}),"/entries/exception":c.jsx(Z6,{}),"/entries":c.jsx(QNe,{}),"/traces":c.jsx(lDe,{}),"/ai":c.jsx(uDe,{}),"/profiles":c.jsx(cDe,{}),"/queues":c.jsx(J6,{}),"/schedules":c.jsx(JNe,{}),"/exports":c.jsx(fDe,{}),"/prunes":c.jsx(dDe,{})};function SDe(e){return e==="/"?"overview":e==="/entries/exception"?"exceptions":e.slice(1)}function NI(e){try{return decodeURIComponent(e)}catch{return e}}function RI(e){if(e==="/"||e==="")return"overview";if(e==="/entries/exception")return"exceptions";if(e==="/entries"||e.startsWith("/entries/view/"))return"entries";const t=/^\/entries\/([^/]+)$/.exec(e);if(t!=null&&t[1])return`watcher:${NI(t[1])}`;const n=/^\/ext\/([^/]+)$/.exec(e);if(n!=null&&n[1])return`dashboard:${NI(n[1])}`;const r=e.split("/")[1];return r||void 0}function MI(e){return e.startsWith("/entries/view/")?"Entry":e.startsWith("/traces/")?"Trace":e==="/queues/metrics"?"Queue metrics":"Telescope"}function ODe(){const{paused:e,setPaused:t}=iB();return c.jsxs("button",{type:"button",onClick:()=>t(!e),"aria-pressed":e,title:e?"Resume live tail":"Pause live tail",className:ge("flex h-7 items-center gap-1.5 rounded-md border px-2 text-[12px] transition-colors",e?"border-warn/30 bg-warn/10 text-warn hover:bg-warn/15":"border-transparent text-dim hover:bg-hover hover:text-fg"),children:[c.jsx("span",{"aria-hidden":"true",className:ge("size-[7px] rounded-full",e?"bg-warn":"tele-live bg-good")}),e?"Paused":"Live"]})}function jDe(){return c.jsx(t8,{icon:"telescope"})}function EDe({children:e}){var y,v,w,S,O,j,E;const t=x.useMemo(()=>vRe(vDe),[]),n=Ra(),{pathname:r}=_u(),i=W5("/").replace(/\/$/,""),a=Ks(),o=gDe(),s=RX((y=a.data)==null?void 0:y.entryTypes),l=MX(s,(v=a.data)==null?void 0:v.watchers),u=bDe(yDe,(w=a.data)==null?void 0:w.tracesEnabled,(O=(S=a.data)==null?void 0:S.profiling)==null?void 0:O.enabled),f=((j=a.data)==null?void 0:j.dashboards)??[],d=((E=RI(r))==null?void 0:E.startsWith("watcher:"))??!1,p=(()=>{const T=(C,_,N,D)=>({id:C,label:_,icon:D,href:`${i}${N}`,onSelect:()=>n(N)}),A=C=>u.filter(_=>xDe[_.to]===C).map(_=>T(SDe(_.to),_.label,_.to,wDe[_.to]));return[{section:"Monitor",items:A("Monitor")},{section:"Explore",items:A("Explore")},{section:"Operations",items:A("Operations")},{section:"Dashboards",items:f.map(C=>T(`dashboard:${C.id}`,C.label,`/ext/${C.id}`,c.jsx(pDe,{})))},{section:"Watchers",collapsible:!0,defaultOpen:d,items:l.map(C=>T(`watcher:${C.id}`,C.label,`/entries/${C.id}`,c.jsx("span",{className:"grid size-[15px] place-items-center","aria-hidden":"true",children:c.jsx("span",{className:ge("size-[7px] rounded-full",C.dot)})})))},{section:"Data",items:A("Data")}]})(),h=[...p.filter(T=>T.section!=="Watchers").flatMap(T=>T.items.map(A=>({id:`page:${A.id}`,label:A.label,group:"Pages",icon:A.icon,keywords:[T.section],onSelect:()=>{var C;return(C=A.onSelect)==null?void 0:C.call(A)}}))),{id:"page:queue-metrics",label:"Queue metrics",group:"Pages",icon:c.jsx(ZNe,{}),keywords:["Operations","queues"],onSelect:()=>n("/queues/metrics")},...s.map(T=>({id:`type:${T.id}`,label:T.label,group:"Entry types",icon:c.jsx("span",{className:"grid size-4 place-items-center","aria-hidden":"true",children:c.jsx("span",{className:ge("size-[7px] rounded-full",T.dot)})}),keywords:[T.id,"watcher"],onSelect:()=>n(`/entries/${T.id}`)}))],b=RI(r),m=p.flatMap(T=>T.items).find(T=>T.id===b),g=r.startsWith("/entries/view/")||/^\/traces\/./.test(r)?MI(r):(m==null?void 0:m.label)??MI(r);return c.jsx(oDe,{brand:{name:"telescope",subtitle:"observability",mark:c.jsx(jDe,{}),current:{title:"Telescope",package:"@dudousxd/nestjs-telescope",icon:"telescope"}},nav:p,activeId:b,shell:t,title:g,commands:h,searchPlaceholder:"Jump to a page, or search by id or tag…",actions:c.jsxs(c.Fragment,{children:[c.jsx(mDe,{}),c.jsx("span",{className:"hidden lg:flex",children:c.jsx(K_e,{})}),c.jsx(ODe,{})]}),children:c.jsx(pRe,{label:g,resetKeys:[r],className:"m-4 md:m-6",children:o?c.jsx(r8,{className:"mt-16",icon:c.jsx(eRe,{}),title:"Choose an organization",description:"Choose an organization to see its data."}):e})})}function Dd({title:e,description:t,actions:n,className:r}){return c.jsxs("div",{className:ge("flex flex-wrap items-end justify-between gap-3",r),children:[c.jsxs("div",{className:"min-w-0",children:[c.jsx("h1",{className:"text-lg font-bold tracking-[0.01em] text-fg",children:e}),t&&c.jsx("p",{className:"mt-1 text-xs text-faint",children:t})]}),n&&c.jsx("div",{className:"flex flex-wrap items-center gap-2",children:n})]})}function TDe({children:e,className:t,label:n="toolbar"}){return c.jsx("div",{role:"toolbar","aria-label":n,className:ge("flex flex-wrap items-center gap-1.5",t),children:e})}function ADe(e,t){if(e===void 0||!t)return null;const n=t.direction==="up-bad";return(n?e>=t.bad:e<=t.bad)?"bad":(n?e>=t.warn:e<=t.warn)?"warn":"ok"}const CDe={ok:"var(--good)",warn:"var(--warn)",bad:"var(--bad)"};function _De({points:e}){if(e.length<2)return null;const t=Math.max(...e),n=Math.min(...e),r=t-n||1,i=e.map((a,o)=>{const s=o/(e.length-1)*100,l=20-(a-n)/r*18-1;return`${o===0?"M":"L"}${s.toFixed(1)},${l.toFixed(1)}`}).join(" ");return c.jsxs("svg",{className:"mt-2",width:"100%",height:"22",viewBox:"0 0 100 22",preserveAspectRatio:"none",children:[c.jsx("title",{children:"Trend sparkline"}),c.jsx("path",{d:i,fill:"none",stroke:"var(--aviary-muted, var(--muted))",strokeWidth:"1.5"})]})}function Ze({label:e,value:t,delta:n,deltaLabel:r,spark:i,thresholds:a,currentValue:o,accent:s="text-foreground",hint:l}){const u=ADe(o,a),f=n===void 0||!a?null:a.direction==="up-bad"?n<0:n>0,d=f===null?"#a1a1aa":f?"var(--good)":"var(--bad)",p=n===void 0?"":n>0?"▲":n<0?"▼":"◆";return c.jsxs("div",{"data-health":u??void 0,className:"aviary-surface overflow-hidden rounded-lg border border-border px-[18px] pt-4 pb-3.5",children:[u&&c.jsx("div",{style:{height:3,background:CDe[u],margin:"-16px -18px 13px"}}),c.jsx("p",{className:"mb-2.5 text-[10px] font-semibold uppercase tracking-[0.12em] text-faint",children:e}),c.jsxs("p",{className:`flex items-baseline gap-2 font-mono text-[26px] font-semibold leading-none tracking-[-0.02em] tabular-nums ${s}`,children:[t,n!==void 0&&c.jsxs("span",{className:"text-xs font-semibold",style:{color:d},children:[p," ",r??Math.abs(n)]})]}),i&&c.jsx(_De,{points:i}),l&&c.jsx("p",{className:"mt-2 truncate font-mono text-[10.5px] text-faint",children:l})]})}function NDe(e){const t=Math.max(0,Math.floor(e)),n=Math.floor(t/86400),r=Math.floor(t%86400/3600),i=Math.floor(t%3600/60);return n>0?`${n}d ${r}h`:r>0?`${r}h ${i}m`:`${i}m ${t%60}s`}function RDe({stats:e}){return c.jsxs("section",{className:"aviary-surface rounded-lg border border-border p-4",children:[c.jsx("h3",{className:"-mx-4 -mt-4 mb-3 border-b border-border px-4 py-3 text-[12.5px] font-semibold tracking-[0.02em] text-fg",children:"Server"}),e?c.jsxs("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-5",children:[c.jsx(Ze,{label:"Uptime",value:NDe(e.uptimeSec),accent:"text-brand"}),c.jsx(Ze,{label:"RSS",value:`${e.memory.rssMb} MB`,hint:`heap ${e.memory.heapUsedMb}/${e.memory.heapTotalMb} MB`}),c.jsx(Ze,{label:"Heap used",value:`${e.memory.heapUsedMb} MB`,accent:"text-info"}),c.jsx(Ze,{label:"CPU",value:`${Math.round(e.cpu.userMs)} ms`,accent:"text-violet",hint:`sys ${Math.round(e.cpu.systemMs)} ms`}),c.jsx(Ze,{label:"Event loop",value:e.eventLoopDelayMs===null?"n/a":`${e.eventLoopDelayMs} ms`,accent:e.eventLoopDelayMs!==null&&e.eventLoopDelayMs>100?"text-bad":"text-foreground",hint:`instance ${e.instanceId}`})]}):c.jsx("p",{className:"text-xs text-muted-foreground",children:"Loading…"})]})}function MDe(e){return`${(Math.max(0,e)/1e3).toFixed(1)} µs`}function PI(e){return e===null?"n/a":`${e.toFixed(1)} ms`}function PDe({health:e}){return c.jsxs("section",{className:"aviary-surface rounded-lg border border-border p-4",children:[c.jsxs("div",{className:"-mx-4 -mt-4 mb-3 flex items-baseline justify-between gap-3 border-b border-border px-4 py-3",children:[c.jsx("h3",{className:"text-[12.5px] font-semibold tracking-[0.02em] text-fg",children:"Telescope health"}),c.jsx("span",{className:"text-[10px] text-muted-foreground",children:"Captures run off the response path — your requests don't wait on Telescope."})]}),e?c.jsxs("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-6",children:[c.jsx(Ze,{label:"Capture cost",value:`${MDe(e.captureCostNanos)}/capture`,accent:"text-brand",hint:"micro-benchmark"}),c.jsx(Ze,{label:"Buffer",value:`${e.bufferUsed} / ${e.bufferSize}`,accent:"text-info",hint:`high-water ${e.bufferHighWater}`}),c.jsx(Ze,{label:"Last flush",value:PI(e.lastFlushMs),hint:`max ${PI(e.maxFlushMs)}`}),c.jsx(Ze,{label:"Flushes",value:e.flushes.toLocaleString(),accent:"text-violet",hint:`${e.flushedEntries.toLocaleString()} entries`}),c.jsx(Ze,{label:"Dropped",value:e.droppedCount.toLocaleString(),accent:e.droppedCount>0?"text-bad":"text-good",hint:e.droppedCount>0?`overflow ${e.overflowDropped} · store ${e.storeFailedDropped}`:"keeping up"}),c.jsx(Ze,{label:"Truncated",value:e.truncatedCount.toLocaleString(),accent:e.truncatedCount>0?"text-warn":"text-good",hint:e.truncatedCount>0?"fat content — tune redact/sampling":"within bounds"})]}):c.jsx("p",{className:"text-xs text-muted-foreground",children:"Loading…"})]})}function $De({retention:e,pruneEnabled:t}){const n=uB(),r=e==null?void 0:e.retention;async function i(){if(globalThis.confirm("Prune now deletes entries older than the retention window. Continue?"))try{const a=await n.mutateAsync();globalThis.alert(`Pruned ${a.pruned} ${a.pruned===1?"entry":"entries"}.`)}catch{globalThis.alert("Prune failed.")}}return c.jsxs("section",{className:"aviary-surface rounded-lg border border-border p-4",children:[c.jsxs("div",{className:"-mx-4 -mt-4 mb-3 flex items-baseline justify-between gap-3 border-b border-border px-4 py-3",children:[c.jsx("h3",{className:"text-[12.5px] font-semibold tracking-[0.02em] text-fg",children:"Retention"}),t?c.jsx("button",{type:"button",onClick:i,disabled:n.isPending,className:"rounded border border-line px-2 py-1 text-[11px] text-foreground hover:border-brand hover:text-brand disabled:cursor-not-allowed disabled:opacity-50",children:n.isPending?"Pruning…":"Prune now"}):null]}),c.jsxs("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3",children:[c.jsx(Ze,{label:"Window",value:r?Gp(r.afterMs):"none",accent:r?"text-brand":"text-muted-foreground",hint:(r==null?void 0:r.keepLast)!=null?`keep last ${r.keepLast}`:"unbounded"}),c.jsx(Ze,{label:"Entries",value:(e==null?void 0:e.entryCount)!=null?e.entryCount.toLocaleString():"n/a"}),c.jsx(Ze,{label:"Oldest",value:(e==null?void 0:e.oldestCreatedAt)!=null?"tracked":"n/a"})]})]})}function iq(e){const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}function DDe(e){return((e==null?void 0:e.buckets)??[]).map(t=>({label:iq(t.t),value:t.total}))}function aq(e){const t=i_((e==null?void 0:e.buckets)??[]);return((e==null?void 0:e.buckets)??[]).map(n=>{const r={label:iq(n.t)};for(const i of t)r[i]=n.byType[i]??0;return r})}function IDe(e){return Object.values(e).reduce((t,n)=>t+n,0)}function kDe(e){const t=e.request??0;return t===0?null:(e.exception??0)/t}const LDe=.05;function BDe(e){return e===null?"n/a":`${(e*100).toFixed(1)}%`}function zDe(e){return(e==null?void 0:e.slowRoutes.length)??0}const _E=100;function FDe(e){return((e==null?void 0:e.queues)??[]).filter(t=>{const n=Math.max(0,t.total-t.completed-t.failed);return t.failed>0||n>=_E})}function UDe({pulse:e,queues:t}){const n=(e==null?void 0:e.counts)??{},r=IDe(n),i=n.request??0,a=n.exception??0,o=kDe(n),s=((t==null?void 0:t.queues)??[]).reduce((u,f)=>u+f.failed,0),l=zDe(e);return c.jsxs("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-4",children:[c.jsx(Ze,{label:"Requests",value:i.toLocaleString(),accent:"text-brand",hint:`${r.toLocaleString()} entries total`}),c.jsx(Ze,{label:"Error rate",value:BDe(o),accent:o!==null&&o>LDe?"text-bad":"text-foreground",hint:`${a.toLocaleString()} exceptions`}),c.jsx(Ze,{label:"Failed jobs",value:s.toLocaleString(),accent:s>0?"text-bad":"text-foreground",hint:"across queues"}),c.jsx(Ze,{label:"Slow routes",value:l.toLocaleString(),accent:l>0?"text-warn":"text-foreground",hint:"routes over the slow p99 threshold"})]})}function $I({title:e,emptyLabel:t,children:n}){const r=Array.isArray(n)?n.length>0:!!n;return c.jsxs("section",{className:"aviary-surface rounded-lg border border-border p-4",children:[c.jsx("h3",{className:"-mx-4 -mt-4 mb-3 border-b border-border px-4 py-3 text-[12.5px] font-semibold tracking-[0.02em] text-fg",children:e}),r?c.jsx("ul",{className:"mono space-y-1.5 text-xs",children:n}):c.jsx("p",{className:"text-xs text-muted-foreground",children:t})]})}function HDe({hotspots:e,onSelectFamily:t}){return c.jsxs("section",{className:"aviary-surface rounded-lg border border-border p-4",children:[c.jsx("h3",{className:"-mx-4 -mt-4 mb-3 border-b border-border px-4 py-3 text-[12.5px] font-semibold tracking-[0.02em] text-fg",children:"N+1 query hotspots"}),e.length>0?c.jsx("ul",{className:"mono space-y-1.5 text-xs",children:e.map(n=>c.jsx("li",{children:c.jsxs("button",{type:"button",onClick:()=>t(n.familyHash),className:"flex w-full items-center justify-between gap-3 border-t border-line-soft pt-1 text-left hover:text-foreground first:border-0 first:pt-0",children:[c.jsxs("span",{className:"min-w-0 truncate",children:[c.jsxs("span",{className:"whitespace-nowrap text-warn",children:["×",n.perRequest]})," ",c.jsx("span",{className:"text-muted-foreground",children:n.sql})]}),c.jsxs("span",{className:"shrink-0 tabular-nums text-muted-foreground",children:[n.requests," req · ",n.total," total",n.totalDurationMs>0?` · ${Math.round(n.totalDurationMs)}ms`:""]})]})},n.familyHash))}):c.jsx("p",{className:"text-xs text-muted-foreground",children:"None detected"})]})}function qDe({queues:e,onOpenQueues:t}){return c.jsxs("section",{className:"aviary-surface rounded-lg border border-border p-4",children:[c.jsxs("div",{className:"-mx-4 -mt-4 mb-3 flex items-baseline justify-between gap-3 border-b border-border px-4 py-3",children:[c.jsx("h3",{className:"text-[12.5px] font-semibold tracking-[0.02em] text-fg",children:"Queues needing attention"}),c.jsx("button",{type:"button",onClick:t,className:"text-[11px] text-muted-foreground hover:text-brand",children:"All queues →"})]}),e.length>0?c.jsx("ul",{className:"mono space-y-1.5 text-xs",children:e.map(n=>{const r=Math.max(0,n.total-n.completed-n.failed);return c.jsx("li",{children:c.jsxs("button",{type:"button",onClick:t,className:"flex w-full items-center justify-between gap-3 border-t border-line-soft pt-1 text-left hover:text-foreground first:border-0 first:pt-0",children:[c.jsx("span",{className:"min-w-0 truncate text-foreground",children:n.queue}),c.jsxs("span",{className:"shrink-0 tabular-nums",children:[n.failed>0?c.jsxs("span",{className:"text-bad",children:[n.failed," failed"]}):null,n.failed>0&&r>=_E?c.jsx("span",{className:"text-muted-foreground",children:" · "}):null,r>=_E?c.jsxs("span",{className:"text-warn",children:[r.toLocaleString()," pending"]}):null]})]})},n.queue)})}):c.jsx("p",{className:"text-xs text-good",children:"All queues healthy"})]})}function VDe({hotspots:e}){return c.jsxs("section",{className:"aviary-surface rounded-lg border border-border p-4",children:[c.jsx("h3",{className:"-mx-4 -mt-4 mb-3 border-b border-border px-4 py-3 text-[12.5px] font-semibold tracking-[0.02em] text-fg",children:"Slowest jobs"}),e.length>0?c.jsx("ul",{className:"mono space-y-1.5 text-xs",children:e.map(t=>c.jsxs("li",{className:"flex items-center justify-between gap-3 border-t border-line-soft pt-1 first:border-0 first:pt-0",children:[c.jsx("span",{className:"min-w-0 truncate text-foreground",children:t.route}),c.jsxs("span",{className:"shrink-0 tabular-nums text-muted-foreground",children:[c.jsxs("span",{className:"text-warn",children:[Math.round(t.p99),"ms"]})," p99 · ",t.count,"×"]})]},t.route))}):c.jsx("p",{className:"text-xs text-muted-foreground",children:"No jobs in window."})]})}function GDe({users:e,onSelectUser:t}){return c.jsxs("section",{className:"aviary-surface rounded-lg border border-border p-4",children:[c.jsx("h3",{className:"-mx-4 -mt-4 mb-3 border-b border-border px-4 py-3 text-[12.5px] font-semibold tracking-[0.02em] text-fg",children:"Load by user"}),e.length>0?c.jsx("ul",{className:"mono space-y-1.5 text-xs",children:e.map(n=>c.jsx("li",{children:c.jsxs("button",{type:"button",onClick:()=>t(n.user),className:"flex w-full items-center justify-between gap-3 border-t border-line-soft pt-1 text-left hover:text-foreground first:border-0 first:pt-0",children:[c.jsx("span",{className:"min-w-0 truncate text-foreground",children:n.user}),c.jsxs("span",{className:"shrink-0 tabular-nums text-muted-foreground",children:[n.count," req · ",Math.round(n.totalDurationMs),"ms"]})]})},n.user))}):c.jsx("p",{className:"text-xs text-muted-foreground",children:"No identified users in window."})]})}function KDe({history:e}){const t=(e==null?void 0:e.samples)??[],n=t.map(o=>o.cpuPercent),r=t.map(o=>o.rssMb),i=t.map(o=>o.heapUsedMb),a=t[t.length-1];return c.jsxs("section",{className:"aviary-surface rounded-lg border border-border p-4",children:[c.jsx("h3",{className:"-mx-4 -mt-4 mb-3 border-b border-border px-4 py-3 text-[12.5px] font-semibold tracking-[0.02em] text-fg",children:"Resource history"}),t.length>1?c.jsxs("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-3",children:[c.jsxs("div",{children:[c.jsxs("div",{className:"mb-1 text-[11px] text-muted-foreground",children:["CPU ",a?`${a.cpuPercent}%`:""]}),c.jsx(Nv,{values:n})]}),c.jsxs("div",{children:[c.jsxs("div",{className:"mb-1 text-[11px] text-muted-foreground",children:["RSS ",a?`${a.rssMb}MB`:""]}),c.jsx(Nv,{values:r})]}),c.jsxs("div",{children:[c.jsxs("div",{className:"mb-1 text-[11px] text-muted-foreground",children:["Heap ",a?`${a.heapUsedMb}MB`:""]}),c.jsx(Nv,{values:i})]})]}):c.jsx("p",{className:"text-xs text-muted-foreground",children:"Collecting samples…"})]})}function YDe(){var m,g,y,v,w,S,O;const[e,t]=x.useState("1h"),n=Ra(),r=fB(e),i=dB(e),a=QT({window:e,buckets:60}),o=fX(),s=dX(),l=hX(),u=iX(),f=Ks(),d=DDe(a.data),p=aq(a.data),h=i_(((m=a.data)==null?void 0:m.buckets)??[]),b=FDe(i.data);return c.jsxs(Bo,{children:[c.jsx(Dd,{title:"Overview",description:"What needs attention right now, then the trends and Telescope's own health.",actions:c.jsx($d,{value:e,onChange:t})}),c.jsx(UDe,{pulse:r.data,queues:i.data}),c.jsxs("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-2",children:[c.jsx($I,{title:"Recent failures",emptyLabel:"No exceptions 🎉",children:(((g=r.data)==null?void 0:g.topExceptions)??[]).map(j=>c.jsxs("li",{className:"flex items-center justify-between gap-3 border-t border-line-soft pt-1 first:border-0 first:pt-0",children:[c.jsxs("span",{className:"min-w-0",children:[c.jsx("span",{className:"text-bad",children:j.class})," ",c.jsx("span",{className:"text-muted-foreground",children:j.message})]}),c.jsxs("span",{className:"shrink-0 tabular-nums text-muted-foreground",children:["×",j.count]})]},j.familyHash))}),c.jsx(HDe,{hotspots:((y=r.data)==null?void 0:y.nPlusOne)??[],onSelectFamily:j=>n(`/entries/query?familyHash=${encodeURIComponent(j)}`)})]}),c.jsxs("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-2",children:[c.jsx($I,{title:"Slowest",emptyLabel:"Nothing slow in window.",children:(((v=r.data)==null?void 0:v.slowest)??[]).map(j=>c.jsx("li",{children:c.jsxs("button",{type:"button",onClick:()=>n(`/entries/view/${j.id}`),className:"flex w-full items-center justify-between gap-3 border-t border-line-soft pt-1 text-left hover:text-foreground first:border-0 first:pt-0",children:[c.jsxs("span",{className:"min-w-0 truncate",children:[c.jsx("span",{className:"text-brand",children:j.type})," ",c.jsx("span",{className:"text-muted-foreground",children:j.label})]}),c.jsxs("span",{className:"shrink-0 tabular-nums text-muted-foreground",children:[j.durationMs,"ms"]})]})},j.id))}),c.jsx(qDe,{queues:b,onOpenQueues:()=>n("/queues")})]}),c.jsxs("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-2",children:[c.jsx(VDe,{hotspots:((w=r.data)==null?void 0:w.slowJobs)??[]}),c.jsx(GDe,{users:((S=r.data)==null?void 0:S.loadByUser)??[],onSelectUser:j=>n(`/entries?tag=${encodeURIComponent(`user:${j}`)}`)})]}),c.jsx(KDe,{history:s.data}),c.jsxs("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-2",children:[c.jsx(ku,{title:"Throughput",valueLabel:"entries",data:d}),c.jsx(P0,{title:"By type",series:h,data:p})]}),c.jsx(RDe,{stats:o.data}),c.jsx(PDe,{health:l.data}),c.jsx($De,{retention:u.data,pruneEnabled:((O=f.data)==null?void 0:O.pruneEnabled)??!1})]})}function XDe(){const{data:e}=sB(),t=(e==null?void 0:e.queues)??[],n=e==null?void 0:e.capabilities,[r,i]=x.useState(void 0),[a,o]=x.useState("waiting"),[s,l]=x.useState(null);x.useEffect(()=>{if(r||t.length===0)return;const d=t[0];d&&i({driver:d.driver,queue:d.queue})},[t,r]);const u=t.find(d=>d.driver===(r==null?void 0:r.driver)&&d.queue===(r==null?void 0:r.queue));function f(d,p){i({driver:d,queue:p}),l(null)}return c.jsxs("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-[280px_minmax(0,1fr)]",children:[c.jsxs("aside",{className:"space-y-2",children:[c.jsx("h3",{className:"px-1 text-[10px] uppercase tracking-[0.12em] text-faint",children:"Live queues"}),c.jsx(jNe,{...r?{selected:r}:{},onSelect:f})]}),c.jsx("section",{className:"min-w-0 space-y-3",children:r?c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"flex items-center justify-between gap-3",children:[c.jsxs("h2",{className:"truncate text-sm font-semibold text-fg",children:[r.queue,c.jsx("span",{className:"ml-2 text-[10px] uppercase tracking-[0.12em] text-faint",children:r.driver})]}),a==="failed"&&c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(DNe,{capabilities:n,driver:r.driver,queue:r.queue}),c.jsx(INe,{capabilities:n,driver:r.driver,queue:r.queue})]})]}),c.jsx(ENe,{counts:u==null?void 0:u.counts,state:a,onState:o}),c.jsx(_Ne,{driver:r.driver,queue:r.queue,state:a,onOpen:l}),c.jsx(UNe,{capabilities:n,driver:r.driver,queue:r.queue})]}):c.jsx("div",{className:"rounded-lg border border-dashed border-border px-4 py-12 text-center text-xs text-faint",children:"Select a queue to inspect its jobs."})}),r&&s&&c.jsx(BNe,{driver:r.driver,queue:r.queue,jobId:s,state:a,capabilities:n,onClose:()=>l(null)})]})}function id({title:e,description:t,actions:n,children:r,className:i}){return c.jsxs(Bo,{...i?{className:i}:{},children:[c.jsx(Dd,{title:e,description:t,actions:n}),r]})}function Fu({rows:e=8,className:t}){return c.jsx("div",{"aria-busy":"true","aria-label":"Loading",className:ge("aviary-surface rounded-lg border border-border px-4 py-2",t),children:Array.from({length:e},(n,r)=>`row-${r}`).map((n,r)=>c.jsxs("div",{className:"flex items-center gap-4 border-b border-line-soft py-2.5 last:border-0",children:[c.jsx(to,{className:"h-3 w-16 shrink-0"}),c.jsx(to,{className:"h-3 w-14 shrink-0"}),c.jsx(to,{className:"h-3",style:{width:`${40+r*17%40}%`}}),c.jsx(to,{className:"ml-auto h-3 w-10 shrink-0"})]},n))})}function WDe({height:e=220}){return c.jsxs("div",{"aria-busy":"true","aria-label":"Loading",className:"aviary-surface flex flex-col gap-3 rounded-lg border border-border p-4",children:[c.jsx(to,{className:"h-3 w-32"}),c.jsx(to,{className:"w-full",style:{height:e-40}})]})}function m_({title:e,description:t,icon:n,action:r}){return c.jsx("div",{className:"aviary-surface rounded-lg border border-border",children:c.jsx(r8,{title:e,description:t,icon:n,action:r})})}function QDe({error:e,label:t}){const n=e instanceof Error?e.message:String(e);return c.jsxs("div",{role:"alert",className:"rounded-lg border border-bad/25 bg-bad/5 p-4 text-sm text-bad",children:[t," could not be loaded: ",c.jsx("span",{className:"mono text-[11px] text-fg-2",children:n})]})}const im={queue:"#71717a",model:"#38bdf8",tools:"#2dd4bf"},ZDe={users:"#38bdf8",platform:"#c084fc"};function Nl(e){if(e==null)return"—";if(e===0)return"$0";const t=Math.abs(e);return t<.01?`$${e.toFixed(4)}`:t<100?`$${e.toFixed(2)}`:`$${Math.round(e).toLocaleString("en-US")}`}function tr(e){return e==null?"—":e<1e3?`${Math.round(e)}ms`:e<6e4?`${(e/1e3).toFixed(e<1e4?2:1)}s`:`${Math.floor(e/6e4)}m ${Math.round(e%6e4/1e3)}s`}function gi(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e4?`${(e/1e3).toFixed(1)}k`:e.toLocaleString("en-US")}function DI(e,t){return t<=0?"0%":`${Math.round(e/t*100)}%`}function JDe(e){return e==="@platform"?"Platform (@platform)":e}function jc({title:e,hint:t}){return c.jsxs("div",{className:"flex items-baseline justify-between gap-3",children:[c.jsx("h3",{className:"text-[12.5px] font-semibold tracking-[0.02em] text-fg",children:e}),t&&c.jsx("span",{className:"text-[10px] text-muted-foreground",children:t})]})}function am({children:e}){return c.jsx("section",{className:"space-y-3 aviary-surface rounded-lg border border-border p-4",children:e})}function $1({title:e,rows:t,total:n,label:r=i=>i}){return c.jsxs(am,{children:[c.jsx(jc,{title:e}),t.length===0?c.jsx("p",{className:"text-xs text-muted-foreground",children:"Nothing in this window."}):c.jsx("ul",{className:"space-y-2",children:t.map(i=>c.jsxs("li",{className:"space-y-1",children:[c.jsxs("div",{className:"flex items-baseline justify-between gap-2 text-xs",children:[c.jsx("span",{className:"truncate font-mono text-foreground",title:i.key,children:r(i.key)}),c.jsxs("span",{className:"shrink-0 tabular-nums text-foreground",children:[Nl(i.costUsd),c.jsxs("span",{className:"ml-2 text-muted-foreground",children:[gi(i.calls)," calls",i.unpricedCalls>0?` · ${i.unpricedCalls} unpriced`:""]})]})]}),c.jsx("div",{className:"h-1 rounded bg-line",children:c.jsx("div",{className:"h-1 rounded bg-brand",style:{width:n>0?`${Math.max(1,i.costUsd/n*100)}%`:0}})})]},i.key))})]})}function eIe({run:e,scaleMs:t}){const n=[{key:"queue",ms:e.queueMs??0},{key:"model",ms:e.modelMs??0},{key:"tools",ms:e.toolsMs??0}],r=n.reduce((a,o)=>a+o.ms,0);if(r===0)return c.jsx("span",{className:"text-[10px] text-muted-foreground",children:"no breakdown"});const i=Math.max(t,r,1);return c.jsx("div",{className:"flex h-2 w-40 overflow-hidden rounded bg-line",role:"img","aria-label":`queue ${tr(e.queueMs)}, model ${tr(e.modelMs)}, tools ${tr(e.toolsMs)}`,title:`queue ${tr(e.queueMs)} · model ${tr(e.modelMs)} · tools ${tr(e.toolsMs)}`,children:n.map(a=>a.ms>0?c.jsx("span",{style:{width:`${a.ms/i*100}%`,background:im[a.key]}},a.key):null)})}function tIe(){return c.jsx("span",{className:"flex items-center gap-3 text-[10px] text-muted-foreground",children:Object.keys(im).map(e=>c.jsxs("span",{className:"flex items-center gap-1",children:[c.jsx("span",{className:"h-2 w-2 rounded-sm",style:{background:im[e]}}),e]},e))})}function oq({status:e,code:t}){return e==="completed"?c.jsx(Dc,{variant:"good",children:"completed"}):e==="cancelled"?c.jsx(Dc,{variant:"muted",children:"cancelled"}):c.jsxs(Dc,{variant:"bad",title:t??void 0,children:["failed",t?` · ${t}`:""]})}function nIe({runs:e,selectedId:t,onSelect:n}){const r=Math.max(1,...e.map(i=>(i.queueMs??0)+(i.modelMs??0)+(i.toolsMs??0)));return c.jsxs(il,{containerClassName:"max-h-[28rem]",children:[c.jsx(al,{children:c.jsxs(Dn,{children:[c.jsx(_e,{children:"When"}),c.jsx(_e,{children:"Agent"}),c.jsx(_e,{children:"Status"}),c.jsx(_e,{children:"Model"}),c.jsx(_e,{className:"text-right",children:"Duration"}),c.jsx(_e,{children:"Queue · model · tools"}),c.jsx(_e,{className:"text-right",children:"Steps"}),c.jsx(_e,{className:"text-right",children:"Tool calls"}),c.jsx(_e,{className:"text-right",children:"Cost"})]})}),c.jsx(ol,{children:e.map(i=>c.jsxs(Dn,{onClick:()=>n(i),onKeyDown:a=>{(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),n(i))},tabIndex:0,"aria-selected":t===i.entryId,className:`cursor-pointer ${t===i.entryId?"bg-panel-2":"hover:bg-panel"}`,children:[c.jsx(Me,{className:"whitespace-nowrap text-muted-foreground",title:i.at,children:Lo(new Date(i.at).getTime())}),c.jsx(Me,{className:"font-mono",children:i.agent}),c.jsx(Me,{children:c.jsx(oq,{status:i.status,code:i.code})}),c.jsx(Me,{className:"max-w-[12rem] truncate font-mono text-muted-foreground",children:i.modelId??"—"}),c.jsx(Me,{className:"text-right tabular-nums",children:tr(i.durationMs)}),c.jsx(Me,{children:c.jsx(eIe,{run:i,scaleMs:r})}),c.jsx(Me,{className:"text-right tabular-nums",children:i.steps??"—"}),c.jsx(Me,{className:"text-right tabular-nums",children:i.toolCalls??"—"}),c.jsx(Me,{className:"text-right tabular-nums",children:Nl(i.costUsd)})]},i.entryId))})]})}function rIe({step:e,scaleMs:t}){const n=Math.max(1,t);return c.jsxs("div",{className:"flex h-2 w-56 overflow-hidden rounded bg-line","aria-hidden":"true",children:[e.modelMs?c.jsx("span",{style:{width:`${e.modelMs/n*100}%`,background:im.model}}):null,e.toolsMs>0?c.jsx("span",{style:{width:`${e.toolsMs/n*100}%`,background:im.tools}}):null]})}function iIe({run:e,onClose:t}){const n=Math.max(1,...e.stepTimings.map(r=>(r.modelMs??0)+r.toolsMs));return c.jsxs(am,{children:[c.jsxs("div",{className:"flex flex-wrap items-baseline justify-between gap-3",children:[c.jsxs("div",{className:"flex flex-wrap items-baseline gap-3",children:[c.jsx("h3",{className:"text-[12.5px] font-semibold tracking-[0.02em] text-fg",children:"Run"}),c.jsx("span",{className:"font-mono text-xs text-foreground",children:e.runId??e.entryId}),c.jsx(oq,{status:e.status,code:e.code})]}),c.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[e.traceId?c.jsx(dy,{className:"text-brand hover:underline",to:`/traces/${encodeURIComponent(e.traceId)}`,children:"Open trace waterfall →"}):c.jsx("span",{className:"text-muted-foreground",children:"No trace recorded"}),c.jsx(dy,{className:"text-brand hover:underline",to:`/entries/view/${encodeURIComponent(e.entryId)}`,children:"Open entry →"}),c.jsx("button",{type:"button",onClick:t,className:"text-muted-foreground hover:text-foreground","aria-label":"Close run detail",children:"✕"})]})]}),c.jsxs("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-4 lg:grid-cols-8",children:[c.jsx(Ze,{label:"Agent",value:e.agent}),c.jsx(Ze,{label:"Duration",value:tr(e.durationMs),accent:"text-brand"}),c.jsx(Ze,{label:"Queue",value:tr(e.queueMs)}),c.jsx(Ze,{label:"Model",value:tr(e.modelMs),hint:`${e.modelCalls??"—"} calls`}),c.jsx(Ze,{label:"Tools",value:tr(e.toolsMs),hint:`${e.toolCalls??"—"} calls`}),c.jsx(Ze,{label:"TTFT",value:tr(e.ttftMs)}),c.jsx(Ze,{label:"Tokens",value:e.inputTokens===null?"—":gi(e.inputTokens+(e.outputTokens??0)),...e.inputTokens===null?{}:{hint:`${e.inputTokens} in · ${e.outputTokens??0} out`}}),c.jsx(Ze,{label:"Cost",value:Nl(e.costUsd),...e.modelId===null?{}:{hint:e.modelId}})]}),e.stepTimings.length===0?c.jsx("p",{className:"text-xs text-muted-foreground",children:"This run carried no per-step timings. They arrive with @dudousxd/nestjs-agent 1.38.0 (core 0.60.0) and later."}):c.jsxs(il,{children:[c.jsx(al,{children:c.jsxs(Dn,{children:[c.jsx(_e,{children:"Step"}),c.jsx(_e,{className:"text-right",children:"Model"}),c.jsx(_e,{className:"text-right",children:"Tools"}),c.jsx(_e,{children:"Model · tools"}),c.jsx(_e,{children:"Tool calls"})]})}),c.jsx(ol,{children:e.stepTimings.map(r=>c.jsxs(Dn,{children:[c.jsxs(Me,{className:"tabular-nums",children:["#",r.step]}),c.jsx(Me,{className:"text-right tabular-nums",children:tr(r.modelMs)}),c.jsx(Me,{className:"text-right tabular-nums",children:tr(r.toolsMs)}),c.jsx(Me,{children:c.jsx(rIe,{step:r,scaleMs:n})}),c.jsx(Me,{className:"font-mono text-muted-foreground",children:r.tools.length===0?"—":r.tools.map(i=>`${i.toolName} ${tr(i.ms)}`).join(" · ")})]},r.step))})]})]})}function II({title:e,runs:t,value:n,onSelect:r}){return c.jsxs(am,{children:[c.jsx(jc,{title:e}),t.length===0?c.jsx("p",{className:"text-xs text-muted-foreground",children:"Nothing in this window."}):c.jsx("ul",{className:"divide-y divide-line-soft",children:t.map(i=>c.jsx("li",{children:c.jsxs("button",{type:"button",onClick:()=>r(i),className:"flex w-full items-center justify-between gap-3 py-1.5 text-left text-xs hover:bg-panel",children:[c.jsxs("span",{className:"truncate font-mono text-foreground",children:[i.agent,c.jsx("span",{className:"ml-2 text-muted-foreground",children:i.modelId??""})]}),c.jsx("span",{className:"shrink-0 tabular-nums text-foreground",children:n(i)})]})},i.entryId))})]})}function aIe({rows:e}){return c.jsxs(il,{children:[c.jsx(al,{children:c.jsxs(Dn,{children:[c.jsx(_e,{children:"Feature"}),c.jsx(_e,{children:"Model"}),c.jsx(_e,{children:"Provider"}),c.jsx(_e,{className:"text-right",children:"Calls"}),c.jsx(_e,{className:"text-right",children:"Tokens in · out"}),c.jsx(_e,{className:"text-right",children:"Audio"}),c.jsx(_e,{children:"Last seen"})]})}),c.jsx(ol,{children:e.map(t=>c.jsxs(Dn,{children:[c.jsx(Me,{className:"font-mono",children:t.feature}),c.jsx(Me,{className:"font-mono text-muted-foreground",children:t.model}),c.jsx(Me,{className:"text-muted-foreground",children:t.provider}),c.jsx(Me,{className:"text-right tabular-nums",children:gi(t.calls)}),c.jsxs(Me,{className:"text-right tabular-nums",children:[gi(t.inputTokens)," · ",gi(t.outputTokens)]}),c.jsx(Me,{className:"text-right tabular-nums",children:t.audioSeconds>0?`${Math.round(t.audioSeconds)}s`:"—"}),c.jsx(Me,{className:"text-muted-foreground",children:Lo(new Date(t.lastAt).getTime())})]},`${t.feature}|${t.model}|${t.provider}`))})]})}function oIe(e){return e.spend.buckets.map(t=>({label:new Date(t.start).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}),users:Number((t.costUsd-t.platformUsd).toFixed(6)),platform:Number(t.platformUsd.toFixed(6))}))}function kI({report:e}){return e.coverage.legacyAgentLib?c.jsxs("div",{className:"rounded-md border border-dashed border-line px-4 py-6 text-sm text-muted-foreground",children:[c.jsxs("p",{children:[c.jsx("span",{className:"text-warn",children:"No AI spend recorded."})," This window has"," ",e.coverage.agentEvents," agent events but no ",c.jsx("code",{children:"usage.recorded"})," — the app most likely runs an agent lib older than ",c.jsx("code",{children:"@dudousxd/nestjs-agent"})," 1.38.0 (core 0.60.0), which is the first to publish one event per usage-ledger row."]}),c.jsx("p",{className:"mt-2",children:"Upgrade the agent packages to see spend, models and unpriced calls here."})]}):c.jsxs("div",{className:"rounded-md border border-dashed border-line px-4 py-6 text-sm text-muted-foreground",children:[c.jsx("p",{children:"No AI usage or agent runs in this window."}),c.jsxs("p",{className:"mt-2",children:["This screen reads the ",c.jsx("code",{children:"aviary:agent:*"})," events of"," ",c.jsx("code",{children:"@dudousxd/nestjs-agent"})," 1.38.0+ (core 0.60.0+), recorded by its Telescope watcher (",c.jsx("code",{children:"@dudousxd/nestjs-agent-telescope"}),") or the generic diagnostics bridge (",c.jsx("code",{children:"@dudousxd/nestjs-diagnostics-telescope"}),"). Widen the window, or check that one of them is registered."]})]})}function sIe(){const[e,t]=x.useState("24h"),[n,r]=nB(),{data:i,isLoading:a,error:o}=vX(e),s=n.get("run"),l=x.useMemo(()=>!i||s===null?null:i.runs.find(p=>p.entryId===s)??i.slowest.find(p=>p.entryId===s)??i.mostExpensive.find(p=>p.entryId===s)??null,[i,s]),u=p=>{const h=new URLSearchParams(n);p===null?h.delete("run"):h.set("run",p.entryId),r(h,{replace:!0})},f=i==null?void 0:i.spend,d=i!==void 0&&(i.coverage.usageEvents>0||i.coverage.runEvents>0);return c.jsxs(Bo,{children:[c.jsx(Dd,{title:"AI",description:"Model calls and agent runs: spend, tokens, latency and failures.",actions:c.jsx($d,{value:e,onChange:t})}),o?c.jsx(QDe,{label:"AI usage",error:o}):a||!i||!f?c.jsx(Fu,{rows:6}):d?c.jsxs(c.Fragment,{children:[i.coverage.legacyAgentLib&&c.jsx(kI,{report:i}),i.truncated&&c.jsxs("p",{className:"text-[11px] text-warn",children:["Scanned ",gi(i.scanned)," entries and hit the scan cap — older entries in this window are not counted."]}),i.coverage.usageEvents>0&&c.jsxs(c.Fragment,{children:[c.jsx(jc,{title:"Spend",hint:`${gi(f.calls)} calls in ${e}`}),c.jsxs("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-6",children:[c.jsx(Ze,{label:"Total spend",value:Nl(f.totalUsd),accent:"text-brand"}),c.jsx(Ze,{label:"Platform share",value:DI(f.platformUsd,f.totalUsd),hint:`${Nl(f.platformUsd)} paid by @platform`}),c.jsx(Ze,{label:"Estimated share",value:DI(f.estimatedUsd,f.totalUsd),hint:`${Nl(f.estimatedUsd)} priced by estimate`}),c.jsx(Ze,{label:"Unpriced calls",value:gi(f.unpricedCalls),accent:f.unpricedCalls>0?"text-warn":"text-foreground",hint:"calls with no cost"}),c.jsx(Ze,{label:"Tokens",value:gi(f.inputTokens+f.outputTokens),hint:`${gi(f.inputTokens)} in · ${gi(f.outputTokens)} out · ${gi(f.cacheReadTokens)} cached`}),c.jsx(Ze,{label:"Audio",value:f.audioSeconds>0?`${Math.round(f.audioSeconds/60)} min`:"—",hint:`${Math.round(f.audioSeconds)} s processed`})]}),c.jsx(P0,{title:"Spend over time (USD) — users vs platform",series:["users","platform"],data:oIe(i),colors:ZDe,brush:!1}),c.jsxs("div",{className:"grid gap-3 lg:grid-cols-3",children:[c.jsx($1,{title:"By feature",rows:f.byFeature,total:f.totalUsd}),c.jsx($1,{title:"By model",rows:f.byModel,total:f.totalUsd}),c.jsx($1,{title:"Top payers",rows:f.byActor,total:f.totalUsd,label:JDe})]})]}),i.coverage.runEvents>0&&c.jsxs(c.Fragment,{children:[c.jsx(jc,{title:"Runs",hint:i.coverage.runsWithoutTimings>0?`${i.coverage.runsWithoutTimings} of ${i.coverage.runEvents} runs carried no timing breakdown`:`${i.coverage.runEvents} runs`}),c.jsxs("div",{className:"grid gap-3 lg:grid-cols-2",children:[c.jsx(II,{title:"Slowest",runs:i.slowest,value:p=>tr(p.durationMs),onSelect:u}),c.jsx(II,{title:"Most expensive",runs:i.mostExpensive,value:p=>Nl(p.costUsd),onSelect:u})]}),l&&c.jsx(iIe,{run:l,onClose:()=>u(null)}),c.jsxs(am,{children:[c.jsxs("div",{className:"flex items-center justify-between gap-3",children:[c.jsx(jc,{title:"Recent runs",hint:"click a run for its steps"}),c.jsx(tIe,{})]}),c.jsx(nIe,{runs:i.runs,selectedId:s,onSelect:u})]})]}),i.coverage.usageEvents>0&&c.jsxs(am,{children:[c.jsx(jc,{title:"Unpriced",hint:"calls the ledger recorded with no cost — give them a price or a provider cost"}),i.unpriced.length===0?c.jsx("p",{className:"text-xs text-muted-foreground",children:"Every call in this window was priced."}):c.jsx(aIe,{rows:i.unpriced})]})]}):c.jsx(kI,{report:i})]})}function lIe(e,t){return t.trim()!==""?`No entries match tag '${t.trim()}'`:e?`No ${hh(e)} entries`:"No entries"}function LI(){const{type:e}=ux(),t=Ra(),[n]=nB(),[r,i]=x.useState(()=>n.get("tag")??""),[a,o]=x.useState(""),[s,l]=x.useState(""),[u,f]=x.useState(0),[d,p]=x.useState(0);function h($){i($),p(P=>P+1)}function b($){i($),f(P=>P+1)}const m=e&&_X(e)?e:void 0,g=r.trim(),y=r_e(g)?g:"",v=y===""?g:"",w=s.trim(),S=n.get("familyHash")??"",O=S!=="",j=w!=="",E=m!==void 0||g!==""||O||j,{data:T,isLoading:A}=cB({...m?pB(m):{},...g!==""?{tag:g}:{},...O?{familyHash:S}:{},...j?{search:w}:{}}),C=(T==null?void 0:T.data)??[];function _(){l(a)}function N(){o(""),l("")}function D(){i(""),N(),t("/entries")}function R(){t(m?`/entries/${m}`:"/entries")}return c.jsxs(Bo,{children:[c.jsx(Dd,{title:m?hh(m):"Entries",description:m?"Recorded entries of this type, newest first, with their insights.":"Everything the watchers recorded, newest first. Filter by type, tag, user or content."}),m?c.jsx(pNe,{type:m}):null,c.jsxs(TDe,{label:"Entry filters",className:"gap-2",children:[m?c.jsxs(Tt,{variant:"ghost",onClick:()=>t("/entries"),className:"bg-panel text-foreground hover:bg-panel-2",children:[c.jsx("span",{className:`h-2 w-2 rounded-full ${dx(m)}`,"aria-hidden":"true"}),hh(m),c.jsx("span",{className:"text-muted-foreground","aria-hidden":"true",children:"×"})]}):c.jsx("span",{className:"rounded-md border border-border bg-panel-2 px-2 py-1 text-xs text-dim",children:"All types"}),c.jsx(YD,{onSelect:h},`tag-${u}`),c.jsx(YD,{prefix:n_e,placeholder:"Filter by user…",ariaLabel:"Filter by user",onSelect:b},`user-${d}`),v!==""?c.jsxs(Tt,{variant:"ghost",onClick:()=>i(""),className:"bg-panel text-foreground hover:bg-panel-2",children:[c.jsx("span",{children:`tag:${v}`}),c.jsx("span",{className:"text-muted-foreground","aria-hidden":"true",children:"×"})]}):null,y!==""?c.jsxs(Tt,{variant:"ghost",onClick:()=>i(""),className:"bg-panel text-foreground hover:bg-panel-2",children:[c.jsx("span",{children:`User: ${t_(y)}`}),c.jsx("span",{className:"text-muted-foreground","aria-hidden":"true",children:"×"})]}):null,c.jsx(nd,{type:"text",value:a,onChange:$=>o($.target.value),onKeyDown:$=>{$.key==="Enter"&&_()},onBlur:_,placeholder:"Search content…","aria-label":"Search content"}),j?c.jsxs(Tt,{variant:"ghost",onClick:N,className:"bg-panel text-foreground hover:bg-panel-2",children:[c.jsx("span",{children:`search:"${w}"`}),c.jsx("span",{className:"text-muted-foreground","aria-hidden":"true",children:"×"})]}):null,O?c.jsxs(Tt,{variant:"ghost",onClick:R,className:"bg-panel text-foreground hover:bg-panel-2",children:[c.jsx("span",{className:"text-muted-foreground","aria-hidden":"true",children:"family:"}),S.slice(0,12),c.jsx("span",{className:"text-muted-foreground","aria-hidden":"true",children:"×"})]}):null,E?c.jsx(Tt,{variant:"ghost",onClick:D,children:"Clear filters"}):null]}),T!=null&&T.partial?c.jsx("output",{className:"tint-warn block rounded-lg border px-4 py-3 text-sm",children:"Older entries are unavailable right now — the store could only read part of its data, so this list may be missing them."}):null,A?c.jsx(Fu,{rows:10}):C.length===0?c.jsx(m_,{title:lIe(m,r),description:"New entries show up here as the watchers record them."}):c.jsx("div",{className:"aviary-surface overflow-hidden rounded-lg border border-border",children:c.jsx(F6,{entries:C,onSelect:$=>t(`/entries/view/${$}`)})})]})}function uIe(){const{id:e=""}=ux(),t=Ra(),{data:n,isLoading:r}=cX(e);return c.jsxs(Bo,{children:[c.jsx("button",{type:"button",onClick:()=>t("/entries"),className:"self-start text-xs text-dim hover:text-fg",children:"← Entries"}),r||!n?c.jsx(WDe,{height:360}):c.jsx(T_e,{entry:n,onSelect:i=>t(`/entries/view/${i}`)})]})}const cIe={json:"JSON",csv:"CSV"},fIe={all:"all",...Object.fromEntries(ph.map(e=>[e.id,e.label]))},dIe=200,BI=1e3,zI=1e4,FI={"15m":15*6e4,"1h":60*6e4,"6h":6*60*6e4,"24h":24*60*6e4};function pIe(e){return e==="all"?{}:pB(e)}async function hIe(e,t,n,r,i){const a=[];let o;for(;a.length<n;){const s=Math.min(dIe,n-a.length),l=await e.entries({...t,first:s,...o!==void 0?{after:o}:{}});let u=!1;for(const f of l.data){if(new Date(f.createdAt).getTime()<r){u=!0;break}if(a.push(f),a.length>=n)break}if(i(a.length),u||!l.meta.hasNext||l.meta.nextCursor===null)break;o=l.meta.nextCursor}return a}function mIe({records:e}){return e.length===0?null:c.jsx("div",{className:"rounded-lg border border-line",children:c.jsxs(il,{className:"min-w-[640px] text-left",children:[c.jsx(al,{children:c.jsxs(Dn,{children:[c.jsx(_e,{children:"Filename"}),c.jsx(_e,{children:"Type"}),c.jsx(_e,{children:"Rows"}),c.jsx(_e,{children:"Format"}),c.jsx(_e,{children:"Time"})]})}),c.jsx(ol,{children:e.map(t=>c.jsxs(Dn,{className:"hover:bg-panel",children:[c.jsx(Me,{className:"font-mono text-foreground",children:t.filename}),c.jsx(Me,{className:"text-muted-foreground",children:t.type}),c.jsx(Me,{className:"tabular-nums text-foreground",children:t.rows.toLocaleString()}),c.jsx(Me,{className:"uppercase text-muted-foreground",children:t.format}),c.jsx(Me,{className:"text-muted-foreground",children:new Date(t.at).toLocaleTimeString()})]},`${t.filename}:${t.at}`))})]})})}function gIe(){const e=tt(),t=x.useId(),n=x.useId(),[r,i]=x.useState("all"),[a,o]=x.useState("1h"),[s,l]=x.useState(""),[u,f]=x.useState(BI),[d,p]=x.useState("json"),[h,b]=x.useState(!1),[m,g]=x.useState(null),[y,v]=x.useState(null),[w,S]=x.useState([]);async function O(){b(!0),v(null),g(0);const j=Math.min(Math.max(1,u),zI),E=Date.now()-(FI[a]??FI["1h"]),T={...pIe(r),...s.trim()!==""?{search:s.trim()}:{}};try{const A=await hIe(e,T,j,E,g),C=new Date().toISOString().replace(/[:.]/g,"-"),_=`telescope-export-${r}-${C}.${d}`;d==="csv"?V_e(_,q_e(A)):n_(_,A),S(N=>[{filename:_,type:r,rows:A.length,format:d,at:Date.now()},...N])}catch{v("Export failed while gathering entries.")}finally{b(!1)}}return c.jsxs(Bo,{children:[c.jsx(Dd,{title:"Exports",description:"Page captured entries into a downloadable JSON or CSV file. Gathering runs in your browser against the live store, newest-first within the selected window."}),c.jsxs("div",{className:"flex flex-wrap items-end gap-3 aviary-surface rounded-lg border border-border p-4",children:[c.jsxs("div",{className:"flex flex-col gap-1 text-[10px] uppercase tracking-[0.12em] text-faint",children:["Type",c.jsxs(mE,{items:fIe,value:r,onValueChange:j=>{typeof j=="string"&&i(j)},children:[c.jsx(vE,{"aria-label":"Entry type",children:c.jsx(gE,{})}),c.jsxs(yE,{children:[c.jsx(Op,{value:"all",children:"all"}),ph.map(j=>c.jsx(Op,{value:j.id,children:j.label},j.id))]})]})]}),c.jsxs("div",{className:"flex flex-col gap-1 text-[10px] uppercase tracking-[0.12em] text-faint",children:["Window",c.jsx($d,{value:a,onChange:o})]}),c.jsxs("label",{className:"flex flex-col gap-1 text-[10px] uppercase tracking-[0.12em] text-faint",htmlFor:t,children:["Search",c.jsx(nd,{id:t,type:"text",value:s,onChange:j=>l(j.target.value),placeholder:"content filter"})]}),c.jsxs("label",{className:"flex flex-col gap-1 text-[10px] uppercase tracking-[0.12em] text-faint",htmlFor:n,children:["Limit",c.jsx(nd,{id:n,type:"number",min:1,max:zI,value:u,onChange:j=>f(Number(j.target.value)||BI),className:"w-24 tabular-nums"})]}),c.jsxs("div",{className:"flex flex-col gap-1 text-[10px] uppercase tracking-[0.12em] text-faint",children:["Format",c.jsxs(mE,{items:cIe,value:d,onValueChange:j=>p(j==="csv"?"csv":"json"),children:[c.jsx(vE,{"aria-label":"Export format",children:c.jsx(gE,{})}),c.jsxs(yE,{children:[c.jsx(Op,{value:"json",children:"JSON"}),c.jsx(Op,{value:"csv",children:"CSV"})]})]})]}),c.jsx(Tt,{onClick:O,disabled:h,size:"md",children:h?"Exporting…":"Export"}),h&&m!==null&&c.jsxs("span",{className:"text-xs tabular-nums text-muted-foreground",children:["gathered ",m.toLocaleString(),"…"]})]}),y&&c.jsx("p",{className:"px-1 text-xs text-bad",children:y}),c.jsxs("div",{className:"space-y-2",children:[c.jsx("h4",{className:"px-1 text-[10px] uppercase tracking-[0.12em] text-faint",children:"Recent exports (this session)"}),w.length===0?c.jsx("div",{className:"rounded-lg border border-dashed border-line px-4 py-10 text-center text-xs text-muted-foreground",children:"No exports yet. Pick a type, window, and format, then export."}):c.jsx(mIe,{records:w})]})]})}const sq=x.createContext(null);function UI(e,t){return e.replace(/\{(\w+)\}/g,(n,r)=>String(t[r]??""))}function vIe(e,t){return e.showWhen?Object.entries(e.showWhen).every(([n,r])=>r.some(i=>i===t[n])):!0}function yIe({ext:e,children:t}){var m,g;const n=AY(),r=_o(),i=Ks(),[a,o]=x.useState(null),[s,l]=x.useState(!1),[u,f]=x.useState(null),d=(((m=i.data)==null?void 0:m.actions)??[]).filter(y=>y.ext===e),h=((g=i.data)==null?void 0:g.mutations)===!0&&(n==null?void 0:n.extAction)!==void 0?{info:y=>d.find(v=>v.name===y.name),request(y,v){const w=d.find(E=>E.name===y.name);if(!w)return;const S=y.label??w.label??w.name,O=y.confirm??w.confirm??`${S}?`,j={};for(const[E,T]of Object.entries(y.input??{}))j[E]=UI(T,v);f(null),o({ext:e,name:w.name,label:S,question:UI(O,v),destructive:y.destructive??w.destructive??!1,input:j})}}:null;async function b(){if(!(!a||!(n!=null&&n.extAction))){l(!0);try{await n.extAction(a.ext,a.name,a.input),f({ok:!0,text:`${a.label}: done.`}),await r.invalidateQueries({queryKey:["telescope","ext-data",a.ext]})}catch(y){f({ok:!1,text:`${a.label} failed: ${y instanceof Error?y.message:String(y)}`})}finally{l(!1),o(null)}}}return c.jsxs(sq.Provider,{value:h,children:[u&&c.jsx("output",{className:`mb-3 block rounded border px-3 py-1.5 text-xs ${u.ok?"tint-good":"tint-bad"}`,children:u.text}),t,c.jsx(t6,{open:a!==null,onOpenChange:y=>{!y&&!s&&o(null)},children:c.jsxs(n6,{"aria-label":"Confirm action",className:"space-y-3 p-4",children:[c.jsx(r6,{children:a==null?void 0:a.label}),c.jsx(QTe,{children:a==null?void 0:a.question}),c.jsxs("div",{className:"flex justify-end gap-2",children:[c.jsx(Tt,{variant:"ghost",disabled:s,onClick:()=>o(null),children:"Cancel"}),c.jsx(Tt,{variant:a!=null&&a.destructive?"bad":"solid",disabled:s,onClick:()=>void b(),children:a==null?void 0:a.label})]})]})})]})}function bIe({action:e,row:t}){const n=x.useContext(sq),r=n==null?void 0:n.info(e);return n===null||r===void 0||!vIe(e,t)?null:c.jsx(Tt,{size:"xs",variant:e.destructive??r.destructive?"bad":"outline",className:"ml-2",onClick:()=>n.request(e,t),children:e.label??r.label??r.name})}function xIe({title:e,segments:t,style:n="donut",height:r=220,onSelect:i}){const a=r-64,o=x.useMemo(()=>Pd(t.map(f=>f.label),(f,d)=>{var p;return y1(f,d,(p=t[d])==null?void 0:p.color)}),[t]);function s(f){const d=t[f];d&&i&&i(zm({label:d.label,value:d.value}))}const l=i?{onClick:(f,d)=>s(d),cursor:"pointer"}:{};if(t.length===0)return c.jsx(Ms,{title:e,height:a,children:c.jsx(Fm,{height:a})});if(n==="bar"){const f=[{name:"breakdown",...Object.fromEntries(t.map(d=>[d.label,d.value]))}];return c.jsx(Ms,{title:e,height:a,children:c.jsx(pu,{config:o,children:c.jsxs(uC,{data:f,layout:"vertical",children:[c.jsx(Xf,{content:c.jsx(Wf,{hideLabel:!0})}),c.jsx(Gj,{content:c.jsx(Yj,{})}),t.map((d,p)=>c.jsx(Do,{dataKey:d.label,stackId:"a",fill:y1(d.label,p,d.color),isAnimationActive:!1,...i?{onClick:()=>s(p),cursor:"pointer"}:{}},d.label))]})})})}const u=t.map((f,d)=>({name:f.label,value:f.value,color:y1(f.label,d,f.color)}));return c.jsx(Ms,{title:e,height:a,children:c.jsx(pu,{config:o,children:c.jsxs(fOe,{children:[c.jsx(Xf,{content:c.jsx(Wf,{hideLabel:!0})}),c.jsx(Gj,{content:c.jsx(Yj,{})}),c.jsx($o,{data:u,dataKey:"value",nameKey:"name",innerRadius:"55%",outerRadius:"80%",isAnimationActive:!1,...l,children:u.map(f=>c.jsx(Td,{fill:f.color},f.name))})]})})})}function wIe(e){return e>=1e3?`${(e/1e3).toFixed(1)}s`:`${Math.round(e)}ms`}const SIe={p50:"tint-good",p95:"tint-warn",p99:"tint-bad"};function OIe({title:e,buckets:t,p50:n,p95:r,p99:i,height:a=220,onSelect:o}){const s=[];n!==void 0&&s.push([n,"p50"]),r!==void 0&&s.push([r,"p95"]),i!==void 0&&s.push([i,"p99"]);const l=a-64,u=x.useMemo(()=>Pd(["count"],()=>"var(--live)"),[]),f=o?{onClick:(d,p)=>{const h=t[p];h&&o(zm({label:h.label,value:h.count}))},cursor:"pointer"}:{};return c.jsx(Ms,{title:e,height:l,children:c.jsxs("div",{className:"flex h-full flex-col",children:[s.length>0&&c.jsx("div",{className:"mb-1.5 flex flex-wrap gap-2",children:s.map(([d,p])=>c.jsxs("span",{className:`rounded border px-1.5 text-[10px] tabular-nums ${SIe[p]}`,children:[p,": ",wIe(d)]},p))}),c.jsx("div",{className:"min-h-0 flex-1",children:t.length===0?c.jsx(Fm,{}):c.jsx(pu,{config:u,children:c.jsxs(uC,{data:t,margin:{top:4,right:8,bottom:0,left:-16},children:[c.jsx(Mm,{vertical:!1}),c.jsx(So,{dataKey:"label",tickLine:!1}),c.jsx(Oo,{tickLine:!1,allowDecimals:!1,width:52}),c.jsx(Xf,{cursor:{fill:"color-mix(in srgb, var(--text) 5%, transparent)"},content:c.jsx(Wf,{})}),c.jsx(Do,{dataKey:"count",name:"count",fill:oo("count"),radius:[3,3,0,0],isAnimationActive:!1,...f})]})})})]})})}function jIe({title:e,value:t,min:n=0,max:r=1,label:i,color:a="var(--good)",height:o=220}){const s=r-n,l=s===0?0:Math.max(0,Math.min(1,(t-n)/s)),u=i??`${Math.round(l*100)}%`,f=o-64,d=x.useMemo(()=>Pd(["value"],()=>a,()=>e),[a,e]),p=[{value:l*100}];return c.jsx(Ms,{title:e,height:f,children:c.jsxs("div",{className:"relative h-full",children:[c.jsx(pu,{config:d,children:c.jsxs(dOe,{innerRadius:"60%",outerRadius:"100%",data:p,startAngle:180,endAngle:0,barSize:16,children:[c.jsx(Nd,{type:"number",domain:[0,100],tick:!1,axisLine:!1}),c.jsx(Rm,{dataKey:"value",fill:oo("value"),background:!0,cornerRadius:4,isAnimationActive:!1})]})}),c.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center pt-[40%]",children:c.jsx("span",{className:"text-xl font-semibold tabular-nums text-foreground",children:u})})]})})}function EIe({columns:e}){const[t,n]=x.useState(!1),r=x.useRef(null),i=e.filter(o=>o.getCanHide());if(x.useEffect(()=>{if(!t)return;function o(l){var u;l.target instanceof Node&&((u=r.current)!=null&&u.contains(l.target))||n(!1)}function s(l){l.key==="Escape"&&n(!1)}return document.addEventListener("mousedown",o),document.addEventListener("keydown",s),()=>{document.removeEventListener("mousedown",o),document.removeEventListener("keydown",s)}},[t]),i.length===0)return null;const a=i.filter(o=>!o.getIsVisible()).length;return c.jsxs("div",{className:"relative",ref:r,children:[c.jsxs(Tt,{variant:"ghost",size:"xs","aria-haspopup":"menu","aria-expanded":t,onClick:()=>n(o=>!o),className:"px-1.5 text-muted-foreground",children:["Columns",a>0?` (${i.length-a}/${i.length})`:""]}),t&&c.jsx("div",{role:"menu",className:"absolute right-0 z-20 mt-1 min-w-[10rem] rounded border border-line bg-popover p-1 shadow-lg",children:i.map(o=>c.jsxs(Tt,{role:"menuitemcheckbox","aria-checked":o.getIsVisible(),variant:"ghost",size:"xs",onClick:()=>o.toggleVisibility(),className:"w-full justify-start gap-2 normal-case tracking-normal",children:[c.jsx("span",{"aria-hidden":"true",className:o.getIsVisible()?"":"opacity-30",children:o.getIsVisible()?"☑":"☐"}),typeof o.columnDef.header=="string"?o.columnDef.header:o.id]},o.id))})]})}function TIe(e){return AIe(e)||typeof e=="function"||CIe(e)}function AIe(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function CIe(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function Rl(e,t){return e==null?null:TIe(e)?z.createElement(e,t):e}function _Ie(e){var t,n;if("cell"in e&&e.cell){const r=e.cell,i=r.column.columnDef,a=r,o=i;return(t=a.getIsAggregated)!=null&&t.call(a)?Rl(o.aggregatedCell??i.cell,r.getContext()):(n=a.getIsPlaceholder)!=null&&n.call(a)?null:Rl(i.cell,r.getContext())}return"header"in e&&e.header?Rl(e.header.column.columnDef.header,e.header.getContext()):"footer"in e&&e.footer?Rl(e.footer.column.columnDef.footer,e.footer.getContext()):null}function NIe({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:a,checkDirty:o,shallowPropagate:s};function r(u,f,d){const p=f.depsTail;if(p!==void 0&&p.dep===u)return;const h=p!==void 0?p.nextDep:f.deps;if(h!==void 0&&h.dep===u){h.version=d,f.depsTail=h;return}const b=u.subsTail;if(b!==void 0&&b.version===d&&b.sub===f)return;const m=f.depsTail=u.subsTail={version:d,dep:u,sub:f,prevDep:p,nextDep:h,prevSub:b,nextSub:void 0};h!==void 0&&(h.prevDep=m),p!==void 0?p.nextDep=m:f.deps=m,b!==void 0?b.nextSub=m:u.subs=m}function i(u,f=u.sub){const d=u.dep,p=u.prevDep,h=u.nextDep,b=u.nextSub,m=u.prevSub;return h!==void 0?h.prevDep=p:f.depsTail=p,p!==void 0?p.nextDep=h:f.deps=h,b!==void 0?b.prevSub=m:d.subsTail=m,m!==void 0?m.nextSub=b:(d.subs=b)===void 0&&n(d),h}function a(u){let f=u.nextSub,d;e:do{const p=u.sub;let h=p.flags;if(h&60?h&12?h&4?!(h&48)&&l(u,p)?(p.flags=h|40,h&=1):h=0:p.flags=h&-9|32:h=0:p.flags=h|32,h&2&&t(p),h&1){const b=p.subs;if(b!==void 0){const m=(u=b).nextSub;m!==void 0&&(d={value:f,prev:d},f=m);continue}}if((u=f)!==void 0){f=u.nextSub;continue}for(;d!==void 0;)if(u=d.value,d=d.prev,u!==void 0){f=u.nextSub;continue e}break}while(!0)}function o(u,f){let d,p=0,h=!1;e:do{const b=u.dep,m=b.flags;if(f.flags&16)h=!0;else if((m&17)===17){if(e(b)){const g=b.subs;g.nextSub!==void 0&&s(g),h=!0}}else if((m&33)===33){(u.nextSub!==void 0||u.prevSub!==void 0)&&(d={value:u,prev:d}),u=b.deps,f=b,++p;continue}if(!h){const g=u.nextDep;if(g!==void 0){u=g;continue}}for(;p--;){const g=f.subs,y=g.nextSub!==void 0;if(y?(u=d.value,d=d.prev):u=g,h){if(e(f)){y&&s(g),f=u.sub;continue}h=!1}else f.flags&=-33;f=u.sub;const v=u.nextDep;if(v!==void 0){u=v;continue e}}return h}while(!0)}function s(u){do{const f=u.sub,d=f.flags;(d&48)===32&&(f.flags=d|16,(d&6)===2&&t(f))}while((u=u.nextSub)!==void 0)}function l(u,f){let d=f.depsTail;for(;d!==void 0;){if(d===u)return!0;d=d.prevDep}return!1}}function RIe(e,t,n){var a,o,s;const r=typeof e=="object",i=r?e:void 0;return{next:(a=r?e.next:e)==null?void 0:a.bind(i),error:(o=r?e.error:t)==null?void 0:o.bind(i),complete:(s=r?e.complete:n)==null?void 0:s.bind(i)}}const NE=[];let Pv=0;const{link:HI,unlink:MIe,propagate:PIe,checkDirty:lq,shallowPropagate:qI}=NIe({update(e){return e._update()},notify(e){NE[RE++]=e,e.flags&=-3},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=17,$b(e))}});let nv=0,RE=0,aa,ME=0;function $Ie(e){try{++ME,e()}finally{--ME||uq()}}function $b(e){const t=e.depsTail;let n=t!==void 0?t.nextDep:e.deps;for(;n!==void 0;)n=MIe(n,e)}function uq(){if(!(ME>0)){for(;nv<RE;){const e=NE[nv];NE[nv++]=void 0,e.notify()}nv=0,RE=0}}function DIe(e,t){const n=typeof e=="function",r=e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?0:1,get(){return aa!==void 0&&HI(i,aa,Pv),i._snapshot},subscribe(a){const o=RIe(a),s={current:!1},l=IIe(()=>{var u;i.get(),s.current?(u=o.next)==null||u.call(o,i._snapshot):s.current=!0});return{unsubscribe:()=>{l.stop()}}},_update(a){const o=aa,s=(t==null?void 0:t.compare)??Object.is;if(n)aa=i,++Pv,i.depsTail=void 0;else if(a===void 0)return!1;n&&(i.flags=5);try{const l=i._snapshot,u=typeof a=="function"?a(l):a===void 0&&n?r(l):a;return l===void 0||!s(l,u)?(i._snapshot=u,!0):!1}finally{aa=o,n&&(i.flags&=-5),$b(i)}}};return n?(i.flags=17,i.get=function(){const a=i.flags;if(a&16||a&32&&lq(i.deps,i)){if(i._update()){const o=i.subs;o!==void 0&&qI(o)}}else a&32&&(i.flags=a&-33);return aa!==void 0&&HI(i,aa,Pv),i._snapshot}):i.set=function(a){if(i._update(a)){const o=i.subs;o!==void 0&&(PIe(o),qI(o),uq())}},i}function IIe(e){const t=()=>{const r=aa;aa=n,++Pv,n.depsTail=void 0,n.flags=6;try{return e()}finally{aa=r,n.flags&=-5,$b(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:6,notify(){const r=this.flags;r&16||r&32&&lq(this.deps,this)?t():this.flags=2},stop(){this.flags=0,this.depsTail=void 0,$b(this)}};return t(),n}function Yp(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,i]of e)if(!t.has(r)||!Object.is(i,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();const n=VI(e);if(n.length!==VI(t).length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!Object.is(e[n[r]],t[n[r]]))return!1;return!0}function VI(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}var cq={exports:{}},fq={},dq={exports:{}},pq={};/**
|
|
213
|
+
* @license React
|
|
214
|
+
* use-sync-external-store-shim.production.js
|
|
215
|
+
*
|
|
216
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
217
|
+
*
|
|
218
|
+
* This source code is licensed under the MIT license found in the
|
|
219
|
+
* LICENSE file in the root directory of this source tree.
|
|
220
|
+
*/var ad=x;function kIe(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var LIe=typeof Object.is=="function"?Object.is:kIe,BIe=ad.useState,zIe=ad.useEffect,FIe=ad.useLayoutEffect,UIe=ad.useDebugValue;function HIe(e,t){var n=t(),r=BIe({inst:{value:n,getSnapshot:t}}),i=r[0].inst,a=r[1];return FIe(function(){i.value=n,i.getSnapshot=t,D1(i)&&a({inst:i})},[e,n,t]),zIe(function(){return D1(i)&&a({inst:i}),e(function(){D1(i)&&a({inst:i})})},[e]),UIe(n),n}function D1(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!LIe(e,n)}catch{return!0}}function qIe(e,t){return t()}var VIe=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?qIe:HIe;pq.useSyncExternalStore=ad.useSyncExternalStore!==void 0?ad.useSyncExternalStore:VIe;dq.exports=pq;var GIe=dq.exports;/**
|
|
221
|
+
* @license React
|
|
222
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
223
|
+
*
|
|
224
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
225
|
+
*
|
|
226
|
+
* This source code is licensed under the MIT license found in the
|
|
227
|
+
* LICENSE file in the root directory of this source tree.
|
|
228
|
+
*/var z0=x,KIe=GIe;function YIe(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var XIe=typeof Object.is=="function"?Object.is:YIe,WIe=KIe.useSyncExternalStore,QIe=z0.useRef,ZIe=z0.useEffect,JIe=z0.useMemo,eke=z0.useDebugValue;fq.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var a=QIe(null);if(a.current===null){var o={hasValue:!1,value:null};a.current=o}else o=a.current;a=JIe(function(){function l(h){if(!u){if(u=!0,f=h,h=r(h),i!==void 0&&o.hasValue){var b=o.value;if(i(b,h))return d=b}return d=h}if(b=d,XIe(f,h))return b;var m=r(h);return i!==void 0&&i(b,m)?(f=h,b):(f=h,d=m)}var u=!1,f,d,p=n===void 0?null:n;return[function(){return l(t())},p===null?void 0:function(){return l(p())}]},[t,n,r,i]);var s=WIe(e,a[0],a[1]);return ZIe(function(){o.hasValue=!0,o.value=s},[s]),eke(s),s};cq.exports=fq;var tke=cq.exports;function nke(e,t){return e===t}function hq(e,t=r=>r,n){const r=(n==null?void 0:n.compare)??nke,i=x.useCallback(o=>{const{unsubscribe:s}=e.subscribe(o);return s},[e]),a=x.useCallback(()=>e.get(),[e]);return tke.useSyncExternalStoreWithSelector(i,a,a,t,r)}function rke(e){const t=hq(e.source,e.selector,{compare:Yp});return typeof e.children=="function"?e.children(t):e.children}function ike(e){const t=e;return Object.defineProperty(e,"state",{get(){return e.get()}}),"set"in e&&(t.setState=e.set.bind(e)),t}function ake(e){const{createAtom:t,batch:n}=e,r=t(0);return{createOptionsStore:!1,wrapExternalAtoms:!1,addSubscription:()=>{throw new Error("Feature not supported in current reactivity implementation")},unmount:()=>{throw new Error("Feature not supported in current reactivity implementation")},schedule:e.schedule??(i=>queueMicrotask(i)),batch:n,untrack:i=>i(),createReadonlyAtom:(i,a)=>{const o=(a==null?void 0:a.compare)??Object.is;let s=!1,l;const u=()=>{const d=i();return(!s||!o(l,d))&&(l=d,s=!0),l},f=t(()=>(r.get(),u()),{compare:o});return{get:u,subscribe:f.subscribe.bind(f)}},createWritableAtom:(i,a)=>t(i,{compare:a==null?void 0:a.compare}),commit:()=>{r.set(i=>i+1)}}}function oke(e,t=Object.is){let n=!1,r;return{get:e.get,markCommitted:i=>{r=i,n=!0},subscribe:i=>e.subscribe(a=>{(!n||!t(r,a))&&i(a)})}}function ske(){return ake({createAtom:DIe,batch:$Ie})}function Id(e,t){return typeof e=="function"?e(t):e}function Eo(e){if(Array.isArray(e))return e.map(Eo);if(e&&typeof e=="object"){const t=Object.getPrototypeOf(e);if(t!==Object.prototype&&t!==null)return e;const n=t===null?or():{},r=Object.keys(e);for(let i=0;i<r.length;i++){const a=r[i];Object.defineProperty(n,a,{configurable:!0,enumerable:!0,value:Eo(e[a]),writable:!0})}return n}return e}function or(){return Object.create(null)}function F0(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function g_(e,t){return n=>{var r;(((r=t.options.atoms)==null?void 0:r[e])??t.baseAtoms[e]).set(i=>Id(n,i))}}function GI(e){if(typeof e!="object"||e===null)return!1;if(Array.isArray(e))return!0;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function KI(e){return Reflect.ownKeys(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}const lke=3;function uke(e,t){return mq(e,t,lke)}function mq(e,t,n){if(Object.is(e,t))return!0;if(n<=0||!GI(e)||!GI(t)||(Array.isArray(e)||Array.isArray(t))&&(!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length))return!1;const r=KI(e),i=KI(t);if(r.length!==i.length)return!1;const a=e,o=t;for(let s=0;s<r.length;s++){const l=r[s];if(!Object.prototype.propertyIsEnumerable.call(t,l)||!mq(a[l],o[l],n-1))return!1}return!0}function kd(e,t,n,r=uke){const i=`on${t.charAt(0).toUpperCase()}${t.slice(1)}Change`,a=e.options[i];a&&a(o=>{const s=Id(n,o);return r(o,s)?o:s})}function gq(e){return e instanceof Function}function cke(e,t){const n=[],r=i=>{i.forEach(a=>{n.push(a);const o=t(a);o.length&&r(o)})};return r(e),n}const fke=({fn:e,memoDeps:t,onAfterCompare:n,onAfterUpdate:r,onBeforeCompare:i,onBeforeUpdate:a})=>{let o=[],s;return u=>{i==null||i();const f=t==null?void 0:t(u);let d=!f||f.length!==(o==null?void 0:o.length);if(!d&&f){for(let p=0;p<f.length;p++)if(f[p]!==o[p]){d=!0;break}}return n==null||n(d),d&&(o=f,a==null||a(),s=e(...f??[]),r==null||r(s)),s}};function dke(e){let t=!1;return()=>{if(!t){t=!0;return}e()}}function v_({feature:e,fnName:t,objectId:n,onAfterUpdate:r,table:i,...a}){const o=()=>{if(!r)return;const{schedule:l,untrack:u}=i._reactivity;l(()=>u(()=>r()))};return fke({...a,...{onAfterUpdate:()=>{o()}}})}function vq(e,t="_"){const[n,r]=e.split(t);return{fnKey:r,fnName:`${n}.${r}`,parentName:n}}function sl(e,t,n){for(const[r,{fn:i,memoDeps:a}]of Object.entries(n)){const{fnKey:o,fnName:s}=vq(r);t[o]=a?v_({memoDeps:a,fn:i,fnName:s,table:t,feature:e}):i}}function Hs(e,t,n,r){for(const[i,{fn:a,memoDeps:o}]of Object.entries(r)){const{fnKey:s,fnName:l}=vq(i);if(o){const u=`_memo_${s}`;t[s]=function(...f){if(!this[u]){const d=this;this[u]=v_({memoDeps:p=>o(d,p),fn:(...p)=>a(d,...p),fnName:l,objectId:d.id,table:n,feature:e})}return this[u](...f)}}else t[s]=function(...u){return a(this,...u)}}}function Yn(e,t,n,...r){var i;return((i=e[t])==null?void 0:i.call(e,...r))??n(e,...r)}function pke(e){return e.row.getValue(e.column.id)}function hke(e){return e.getValue()??e.table.options.renderFallbackValue}function mke(e){return{table:e.table,column:e.column,row:e.row,cell:e,getValue:()=>e.getValue(),renderValue:()=>e.renderValue()}}const gke={assignCellPrototype:(e,t)=>{Hs("coreCellsFeature",e,t,{cell_getValue:{fn:n=>pke(n)},cell_renderValue:{fn:n=>hke(n)},cell_getContext:{fn:n=>mke(n),memoDeps:n=>[n]}})}};function vke(e){var t,n;if(!e._headerPrototype){e._headerPrototype={table:e};const r=Object.values(e._features);for(let i=0;i<r.length;i++)(n=(t=r[i]).assignHeaderPrototype)==null||n.call(t,e._headerPrototype,e)}return e._headerPrototype}function yq(e,t,n){const r=vke(e),i=Object.create(r);i.colSpan=0,i.column=t,i.depth=n.depth,i.headerGroup=null,i.id=n.id??t.id,i.index=n.index,i.isPlaceholder=!!n.isPlaceholder,i.placeholderId=n.placeholderId,i.rowSpan=0,i.subHeaders=[];const a=e._headerInstanceInitFns;for(let o=0;o<a.length;o++)a[o](i);return i}function bq(){return{start:[],end:[]}}function yke(){return or()}function xq(e,t){Db(e)&&U0(e.table,n=>{const r=Object.assign(or(),n),i=t??!Yn(e,"getIsVisible",Br),a=e.getLeafColumns();for(let o=0;o<a.length;o++){const s=a[o];Db(s)&&(r[s.id]=i)}return r})}function Br(e){var r;const t=(r=e.table.atoms.columnVisibility)==null?void 0:r.get();if(!t)return!0;const n=e.columns;return n.length?n.some(i=>Yn(i,"getIsVisible",Br)):(F0(t,e.id)?t[e.id]:void 0)??!0}function Db(e){return(e.columnDef.enableHiding??!0)&&(e.table.options.enableHiding??!0)}function bke(e){return t=>{xq(e,t.target.checked)}}function xke(e){var u;const t=e.getAllCells(),n=[];for(let f=0;f<t.length;f++){const d=t[f];Yn(d.column,"getIsVisible",Br)&&n.push(d)}const{start:r,end:i}=((u=e.table.atoms.columnPinning)==null?void 0:u.get())??bq();if(!r.length&&!i.length)return n;const a=Yn(e,"getVisibleCellsByColumnId",wq),o=[];for(let f=0;f<r.length;f++){const d=a[r[f]];d&&o.push(d)}const s=[];for(let f=0;f<i.length;f++){const d=a[i[f]];d&&s.push(d)}const l=[];for(let f=0;f<n.length;f++){const d=n[f],p=d.column.id;!r.includes(p)&&!i.includes(p)&&l.push(d)}return[...o,...l,...s]}function wq(e){const t=or(),n=e.getAllCells();for(let r=0;r<n.length;r++){const i=n[r];Yn(i.column,"getIsVisible",Br)&&(t[i.column.id]=i)}return t}function wke(e){return e.getAllFlatColumns().filter(t=>Yn(t,"getIsVisible",Br))}function Sq(e){return e.getAllLeafColumns().filter(t=>Yn(t,"getIsVisible",Br))}function U0(e,t){kd(e,"columnVisibility",t)}function Ske(e,t){U0(e,t?or():Object.assign(or(),Eo(e.initialState.columnVisibility??{})))}function Oq(e,t){t=t??!jq(e);const n=or(),r=e.getAllLeafColumns();for(let i=0;i<r.length;i++){const a=r[i];n[a.id]=t||!Db(a)}U0(e,n)}function jq(e){return!e.getAllLeafColumns().some(t=>!Yn(t,"getIsVisible",Br))}function Oke(e){return e.getAllLeafColumns().some(t=>Yn(t,"getIsVisible",Br))}function jke(e){return t=>{Oq(e,t.target.checked)}}function Eq(e,t=1){let n=t;for(let r=0;r<e.length;r++){const i=e[r];Yn(i,"getIsVisible",Br)&&i.columns.length&&(n=Math.max(n,Eq(i.columns,t+1)))}return n}function Eke(e,t){return String(t)}function Tke(e,t,n,r){let i=e??"";return t&&(i=i?`${i}_${t}`:String(t)),n&&(i=i?`${i}_${n}`:n),r&&(i=i?`${i}_${r}`:r),i}function Ake(e,t){let n=0;for(let r=0;r<e.length;r++)e[r].column===t&&n++;return n}function Tq(e,t,n,r,i,a){const o={depth:t,id:Eke(r,t),headers:[]},s=[];for(let l=0;l<e.length;l++){if(!(l in e))continue;const u=e[l],f=s[s.length-1],d=u.column.depth===o.depth;let p,h=!1;if(d&&u.column.parent?p=u.column.parent:(p=u.column,h=!0),f&&f.column===p)f.subHeaders.push(u);else{const b=yq(n,p,{id:Tke(r,t,p.id,u.id),isPlaceholder:h,placeholderId:h?String(Ake(s,p)):void 0,depth:t,index:s.length});b.subHeaders.push(u),s.push(b)}o.headers.push(u),u.headerGroup=o}for(let l=0;l<a.length;l++)a[l](o);i.push(o),t>0&&Tq(s,t-1,n,r,i,a)}function Aq(e){for(let t=0;t<e.length;t++){const n=e[t];if(!Yn(n.column,"getIsVisible",Br))continue;let r=0;if(n.subHeaders.length){Aq(n.subHeaders);for(let i=0;i<n.subHeaders.length;i++){const a=n.subHeaders[i];Yn(a.column,"getIsVisible",Br)&&(r+=a.colSpan)}}else r=1;if(n.colSpan=r,n.isPlaceholder&&n.subHeaders.length===1&&n.subHeaders[0].column===n.column){let i=1,a=n.subHeaders[0];for(;a;)a.rowSpan=0,i++,a=a.subHeaders.length===1&&a.subHeaders[0].column===n.column?a.subHeaders[0]:void 0;n.rowSpan=i}else n.rowSpan=1}}function YI(e,t,n,r){var l;const i=Eq(e),a=[],o=n._headerGroupInstanceInitFns,s=new Array(t.length);for(let u=0;u<t.length;u++)u in t&&(s[u]=yq(n,t[u],{depth:i,index:u}));return Tq(s,i-1,n,r,a,o),a.reverse(),Aq(((l=a[0])==null?void 0:l.headers)??[]),a}function Cke(e){var t,n;if(!e._columnPrototype){e._columnPrototype={table:e};const r=Object.values(e._features);for(let i=0;i<r.length;i++)(n=(t=r[i]).assignColumnPrototype)==null||n.call(t,e._columnPrototype,e)}return e._columnPrototype}function _ke(e,t,n,r){const i={...e.getDefaultColumnDef(),...t},a=i.accessorKey,o=a===void 0?void 0:String(a),s=i.id??(o==null?void 0:o.replaceAll(".","_"))??(typeof i.header=="string"?i.header:void 0);let l;if(i.accessorFn)l=i.accessorFn;else if(a!==void 0)if(typeof a=="string"&&a.includes(".")){const p=a.split(".");l=h=>{let b=h;for(let m=0;m<p.length;m++){const g=p[m];b=b==null?void 0:b[g]}return b}}else l=p=>p[i.accessorKey];if(!s)throw new Error;const u=Cke(e),f=Object.create(u);f.accessorFn=l,f.columnDef=i,f.columns=[],f.depth=n,f.id=`${String(s)}`,f.parent=r;const d=e._columnInstanceInitFns;for(let p=0;p<d.length;p++)d[p](f);return f}function Cq(e){var n;const t=(n=e.atoms.columnOrder)==null?void 0:n.get();return r=>{let i=[];if(!(t!=null&&t.length))i=r;else{const a=new Map;for(let o=0;o<r.length;o++){const s=r[o];a.set(s.id,s)}for(let o=0;o<t.length;o++){const s=t[o],l=a.get(s);l&&(i.push(l),a.delete(s))}for(let o=0;o<r.length;o++){const s=r[o];a.has(s.id)&&i.push(s)}}return Nke(e,i)}}function Nke(e,t){var s;const n=((s=e.atoms.grouping)==null?void 0:s.get())??[],{groupedColumnMode:r}=e.options;if(!n.length||!r)return t;const i=t.filter(l=>!n.includes(l.id));if(r==="remove")return i;const a=new Map;for(let l=0;l<t.length;l++){const u=t[l];a.set(u.id,u)}const o=[];for(let l=0;l<n.length;l++){const u=a.get(n[l]);u&&o.push(u)}return[...o,...i]}function Rke(e){return[e,...e.columns.flatMap(t=>t.getFlatColumns())]}function Mke(e){if(e.columns.length){const t=e.columns.flatMap(n=>n.getLeafColumns());return Yn(e.table,"getOrderColumns",Cq)(t)}return[e]}function Pke(e){return{header:t=>{const n=t.header.column.columnDef;return n.accessorKey?n.accessorKey:n.accessorFn?n.id:null},cell:t=>{var n,r;return((r=(n=t.renderValue())==null?void 0:n.toString)==null?void 0:r.call(n))??null},...Object.values(e._features).reduce((t,n)=>{var r;return Object.assign(t,(r=n.getDefaultColumnDef)==null?void 0:r.call(n))},{}),...e.options.defaultColumn}}function _q(e,t,n,r=0){const i=new Array(t.length);for(let a=0;a<t.length;a++){if(!(a in t))continue;const o=t[a],s=_ke(e,o,r,n),l=o;s.columns=l.columns?_q(e,l.columns,s,r+1):[],i[a]=s}return i}function $ke(e){return _q(e,e.options.columns)}function Dke(e){return e.getAllColumns().flatMap(t=>t.getFlatColumns())}function Ike(e){const t=or(),n=e.getAllFlatColumns();for(let r=0;r<n.length;r++){const i=n[r];t[i.id]=i}return t}function kke(e){const t=e.getAllColumns().flatMap(n=>n.getLeafColumns());return Yn(e,"getOrderColumns",Cq)(t)}function Lke(e){const t=or(),n=e.getAllLeafColumns();for(let r=0;r<n.length;r++){const i=n[r];t[i.id]=i}return t}function Bke(e,t){return e.getAllFlatColumnsById()[t]}const zke={assignColumnPrototype:(e,t)=>{Hs("coreColumnsFeature",e,t,{column_getFlatColumns:{fn:n=>Rke(n),memoDeps:n=>[n.table.options.columns]},column_getLeafColumns:{fn:n=>Mke(n),memoDeps:n=>{var r,i;return[(r=n.table.atoms.columnOrder)==null?void 0:r.get(),(i=n.table.atoms.grouping)==null?void 0:i.get(),n.table.options.columns,n.table.options.groupedColumnMode]}}})},constructTableAPIs:e=>{sl("coreColumnsFeature",e,{table_getDefaultColumnDef:{fn:()=>Pke(e),memoDeps:()=>[e.options.defaultColumn]},table_getAllColumns:{fn:()=>$ke(e),memoDeps:()=>[e.options.columns]},table_getAllFlatColumns:{fn:()=>Dke(e),memoDeps:()=>[e.options.columns]},table_getAllFlatColumnsById:{fn:()=>Ike(e),memoDeps:()=>[e.options.columns]},table_getAllLeafColumns:{fn:()=>kke(e),memoDeps:()=>{var t,n;return[(t=e.atoms.columnOrder)==null?void 0:t.get(),(n=e.atoms.grouping)==null?void 0:n.get(),e.options.columns,e.options.groupedColumnMode]}},table_getAllLeafColumnsById:{fn:()=>Lke(e),memoDeps:()=>[e.getAllLeafColumns()]},table_getColumn:{fn:t=>Bke(e,t)}})}};function Nq(e,t){for(let n=0;n<e.subHeaders.length;n++)Nq(e.subHeaders[n],t);t.push(e)}function Fke(e){const t=[];return Nq(e,t),t}function Uke(e){return{column:e.column,header:e,table:e.column.table}}function Hke(e){var u;const{start:t,end:n}=((u=e.atoms.columnPinning)==null?void 0:u.get())??bq(),r=e.getAllColumns(),i=Yn(e,"getVisibleLeafColumns",Sq);if(!t.length&&!n.length)return YI(r,i,e);const a=e.getAllLeafColumnsById(),o=[];for(let f=0;f<t.length;f++){const d=a[t[f]];d&&Yn(d,"getIsVisible",Br)&&o.push(d)}const s=[];for(let f=0;f<n.length;f++){const d=a[n[f]];d&&Yn(d,"getIsVisible",Br)&&s.push(d)}const l=i.filter(f=>!t.includes(f.id)&&!n.includes(f.id));return YI(r,[...o,...l,...s],e)}function qke(e){return[...e.getHeaderGroups()].reverse()}function Vke(e){const t=e.getHeaderGroups(),n=[];for(let r=0;r<t.length;r++){const i=t[r].headers;for(let a=0;a<i.length;a++)n.push(i[a])}return n}function Gke(e){var r;const t=((r=e.getHeaderGroups()[0])==null?void 0:r.headers)??[],n=[];for(let i=0;i<t.length;i++){const a=t[i].getLeafHeaders();for(let o=0;o<a.length;o++)n.push(a[o])}return n}const Kke={assignHeaderPrototype:(e,t)=>{Hs("coreHeadersFeature",e,t,{header_getLeafHeaders:{fn:n=>Fke(n),memoDeps:n=>[n.column.table.options.columns]},header_getContext:{fn:n=>Uke(n),memoDeps:n=>[n.column.table.options.columns]}})},constructTableAPIs:e=>{sl("coreHeadersFeature",e,{table_getHeaderGroups:{fn:()=>Hke(e),memoDeps:()=>{var t,n,r,i;return[e.options.columns,(t=e.atoms.columnOrder)==null?void 0:t.get(),(n=e.atoms.grouping)==null?void 0:n.get(),(r=e.atoms.columnPinning)==null?void 0:r.get(),(i=e.atoms.columnVisibility)==null?void 0:i.get(),e.options.groupedColumnMode]}},table_getFooterGroups:{fn:()=>qke(e),memoDeps:()=>[e.getHeaderGroups()]},table_getFlatHeaders:{fn:()=>Vke(e),memoDeps:()=>[e.getHeaderGroups()]},table_getLeafHeaders:{fn:()=>Gke(e),memoDeps:()=>[e.getHeaderGroups()]}})}};function Yke(e){var t,n;if(!e._rowPrototype){e._rowPrototype={table:e};const r=Object.values(e._features);for(let i=0;i<r.length;i++)(n=(t=r[i]).assignRowPrototype)==null||n.call(t,e._rowPrototype,e)}return e._rowPrototype}const Xke=(e,t,n,r,i,a,o)=>{const s=Yke(e),l=Object.create(s);l._displayIndexCache=-1,l._uniqueValuesCache=or(),l._valuesCache=or(),l.depth=i,l.id=t,l.index=r,l.original=n,l.parentId=o,l.subRows=[];const u=e._rowInstanceInitFns;for(let f=0;f<u.length;f++)u[f](l);return l},Wke=/([0-9]+)/gm;function Ld(e){const t=Object.assign((n,r,i)=>{let a=n.getValue(i),o=r.getValue(i);const s=t.resolveDataValue;return s&&(a=s(a),o=s(o)),t.sort(a,o,n,r,i)},e);return t}Ld({resolveDataValue:e=>H0(e).toLowerCase(),sort:(e,t)=>Mq(e,t)});Ld({resolveDataValue:e=>H0(e),sort:(e,t)=>Mq(e,t)});Ld({resolveDataValue:e=>H0(e).toLowerCase(),sort:(e,t)=>y_(e,t)});Ld({resolveDataValue:e=>H0(e),sort:(e,t)=>y_(e,t)});Ld({resolveDataValue:e=>Qke(e),sort:(e,t)=>e>t?1:e<t?-1:0});const Rq=Ld({sort:(e,t)=>y_(e,t)});function y_(e,t){return e===t?0:e>t?1:-1}function Qke(e){return e instanceof Date?e.getTime():e}function H0(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function Mq(e,t){let n=0,r=0;const i=e.length,a=t.length;for(;n<i&&r<a;){const o=Ib(e.charCodeAt(n)),s=Ib(t.charCodeAt(r)),l=PE(e,n,o),u=PE(t,r,s);if(!o&&!s){const d=Zke(e,n,l,t,r,u);if(d)return d;n=l,r=u;continue}if(o!==s)return o?1:-1;const f=Jke(e,n,l,t,r,u);if(f)return f;n=l,r=u}return WI(e,n)-WI(t,r)}function Ib(e){return e>=48&&e<=57}function PE(e,t,n){let r=t+1;for(;r<e.length&&Ib(e.charCodeAt(r))===n;)r++;return r}function Zke(e,t,n,r,i,a){const o=n-t,s=a-i,l=o<s?o:s;for(let u=0;u<l;u++){const f=e.charCodeAt(t+u),d=r.charCodeAt(i+u);if(f>d)return 1;if(d>f)return-1}return o>s?1:s>o?-1:0}function Jke(e,t,n,r,i,a){let o=t;for(;o<n&&e.charCodeAt(o)===48;)o++;let s=i;for(;s<a&&r.charCodeAt(s)===48;)s++;const l=n-o,u=a-s;if(l===0&&u===0)return 0;if(l<=15&&u<=15){const p=XI(e,o,n),h=XI(r,s,a);return p>h?1:h>p?-1:0}const f=parseInt(e.slice(t,n),10),d=parseInt(r.slice(i,a),10);return f>d?1:d>f?-1:0}function XI(e,t,n){let r=0;for(let i=t;i<n;i++)r=r*10+e.charCodeAt(i)-48;return r}function WI(e,t){let n=0,r=t;for(;r<e.length;)n++,r=PE(e,r,Ib(e.charCodeAt(r)));return n}function eLe(){return[]}function tLe(e,t){kd(e,"cellSelection",Eo(e.initialState.cellSelection)??eLe())}function nLe(e){e.atoms.cellSelection&&(e.options.autoResetAll??e.options.autoResetCellSelection??!0)&&e._reactivity.schedule(()=>tLe(e))}function rLe(e){e.atoms.expanded&&(e.options.autoResetAll??e.options.autoResetExpanded??!e.options.manualExpanding)&&e._reactivity.schedule(()=>iLe(e))}function iLe(e,t){const n=e.initialState.expanded;kd(e,"expanded",n===!0?!0:Object.assign(or(),Eo(n??{})))}const $E=0;function aLe(e){var t,n;if(e.options.autoResetAll??e.options.autoResetPageIndex??!e.options.manualPagination){if((((n=(t=e.atoms.pagination)==null?void 0:t.get())==null?void 0:n.pageIndex)??$E)===$E)return;lLe(e)}}function oLe(e,t){kd(e,"pagination",t)}function sLe(e,t){oLe(e,n=>{let r=Id(t,n.pageIndex);const i=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return r=Math.max(0,Math.min(r,i)),{...n,pageIndex:r}})}function lLe(e,t){sLe(e,$E)}function uLe(){return[]}function q0(e,t){kd(e,"sorting",t)}function Pq(e,t){q0(e,t?[]:Eo(e.initialState.sorting??[]))}function cLe(e){e.atoms.sorting&&(e.options.autoResetAll??e.options.autoResetSorting??!1)&&Pq(e)}function $q(e){const t=e.table._rowModelFns.sortFns,n=e.table.getFilteredRowModel().flatRows.slice(0,10);let r,i=!1;for(let a=0;a<n.length;a++){const o=n[a].getValue(e.id);if(Object.prototype.toString.call(o)==="[object Date]"){r="datetime";break}if(typeof o=="string"&&(i=!0,o.split(Wke).length>1)){r="alphanumeric";break}}if(!r&&i&&(r="text"),r){let a=t==null?void 0:t[r];if(a||r==="alphanumeric"&&(a=t==null?void 0:t.text),a)return a}return Rq}function Dq(e){const t=e.table.getFilteredRowModel().flatRows.slice(0,10);for(let n=0;n<t.length;n++){const r=t[n].getValue(e.id);if(r!=null)return typeof r=="string"?"asc":"desc"}return"desc"}function fLe(e){const t=e.table._rowModelFns.sortFns;return gq(e.columnDef.sortFn)?e.columnDef.sortFn:e.columnDef.sortFn==="auto"?$q(e):(t==null?void 0:t[e.columnDef.sortFn])??Rq}function Iq(e,t,n){const r=Lq(e,n&&kb(e)),i=typeof t<"u";q0(e.table,a=>{const o=a.findIndex(p=>p.id===e.id),s=o===-1?void 0:a[o];let l=[],u;const f=i?t:r==="desc",d=!!(a.length&&kb(e)&&n);return d?s?u="toggle":u="add":s?u="toggle":u="replace",u==="toggle"&&(i||r||(u="remove")),u==="add"?(l=[...a,{id:e.id,desc:f}],l.splice(0,l.length-(e.table.options.maxMultiSortColCount??Number.MAX_SAFE_INTEGER))):u==="toggle"?l=d?a.map(p=>p.id===e.id?{...p,desc:f}:p):[{id:e.id,desc:f}]:u==="remove"?l=d?a.filter(p=>p.id!==e.id):[]:l=[{id:e.id,desc:f}],l})}function kq(e){return e.columnDef.sortDescFirst??e.table.options.sortDescFirst??Dq(e)==="desc"?"desc":"asc"}function Lq(e,t){const n=kq(e),r=zq(e);return r?r!==n&&(e.table.options.enableSortingRemoval??!0)&&(!t||(e.table.options.enableMultiRemove??!0))?!1:r==="desc"?"asc":"desc":n}function Bq(e){return(e.columnDef.enableSorting??!0)&&(e.table.options.enableSorting??!0)&&!!e.accessorFn}function kb(e){return e.columnDef.enableMultiSort??e.table.options.enableMultiSort??!!e.accessorFn}function zq(e){var n,r;const t=(r=(n=e.table.atoms.sorting)==null?void 0:n.get())==null?void 0:r.find(i=>i.id===e.id);return t?t.desc?"desc":"asc":!1}function dLe(e){var t,n;return((n=(t=e.table.atoms.sorting)==null?void 0:t.get())==null?void 0:n.findIndex(r=>r.id===e.id))??-1}function pLe(e){q0(e.table,t=>t.length?t.filter(n=>n.id!==e.id):[])}function hLe(e){const t=Bq(e);return n=>{var r,i;t&&Iq(e,void 0,kb(e)?(i=(r=e.table.options).isMultiSortEvent)==null?void 0:i.call(r,n):!1)}}function mLe(){return e=>v_({feature:"coreRowModelsFeature",table:e,fnName:"table.getCoreRowModel",memoDeps:()=>[e.options.data],fn:()=>gLe(e,e.options.data),onAfterUpdate:dke(()=>{rLe(e),aLe(e),cLe(e),nLe(e)})})}function Fq(e,t,n,r=0,i){var o;const a=[];for(let s=0;s<n.length;s++){const l=n[s],u=Xke(e,e.getRowId(l,s,i),l,s,r,void 0,i==null?void 0:i.id);t.flatRows.push(u),t.rowsById[u.id]=u,a.push(u),e.options.getSubRows&&(u.originalSubRows=e.options.getSubRows(l,s),(o=u.originalSubRows)!=null&&o.length&&(u.subRows=Fq(e,t,u.originalSubRows,r+1,u)))}return a}function gLe(e,t){const n={rows:[],flatRows:[],rowsById:or()};return n.rows=Fq(e,n,t),n}function vLe(e){var t,n;return e._rowModels.coreRowModel||(e._rowModels.coreRowModel=((n=(t=e.options.features).coreRowModel)==null?void 0:n.call(t,e))??mLe()(e)),e._rowModels.coreRowModel()}function yLe(e){return e.getCoreRowModel()}function bLe(e){var t,n;return e._rowModels.filteredRowModel||(e._rowModels.filteredRowModel=(n=(t=e.options.features).filteredRowModel)==null?void 0:n.call(t,e)),e.options.manualFiltering||!e._rowModels.filteredRowModel?e.getPreFilteredRowModel():e._rowModels.filteredRowModel()}function xLe(e){return e.getFilteredRowModel()}function wLe(e){var t,n;return e._rowModels.groupedRowModel||(e._rowModels.groupedRowModel=(n=(t=e.options.features).groupedRowModel)==null?void 0:n.call(t,e)),e.options.manualGrouping||!e._rowModels.groupedRowModel?e.getPreGroupedRowModel():e._rowModels.groupedRowModel()}function SLe(e){return e.getGroupedRowModel()}function OLe(e){var t,n;return e._rowModels.sortedRowModel||(e._rowModels.sortedRowModel=(n=(t=e.options.features).sortedRowModel)==null?void 0:n.call(t,e)),e.options.manualSorting||!e._rowModels.sortedRowModel?e.getPreSortedRowModel():e._rowModels.sortedRowModel()}function jLe(e){return e.getSortedRowModel()}function ELe(e){var t,n;return e._rowModels.expandedRowModel||(e._rowModels.expandedRowModel=(n=(t=e.options.features).expandedRowModel)==null?void 0:n.call(t,e)),e.options.manualExpanding||!e._rowModels.expandedRowModel?e.getPreExpandedRowModel():e._rowModels.expandedRowModel()}function TLe(e){return e.getExpandedRowModel()}function ALe(e){var t,n;return e._rowModels.paginatedRowModel||(e._rowModels.paginatedRowModel=(n=(t=e.options.features).paginatedRowModel)==null?void 0:n.call(t,e)),e.options.manualPagination||!e._rowModels.paginatedRowModel?e.getPrePaginatedRowModel():e._rowModels.paginatedRowModel()}function CLe(e){return e.getPaginatedRowModel()}const _Le={constructTableAPIs:e=>{sl("coreRowModelsFeature",e,{table_getCoreRowModel:{fn:()=>vLe(e)},table_getPreFilteredRowModel:{fn:()=>yLe(e)},table_getFilteredRowModel:{fn:()=>bLe(e)},table_getPreGroupedRowModel:{fn:()=>xLe(e)},table_getGroupedRowModel:{fn:()=>wLe(e)},table_getPreSortedRowModel:{fn:()=>SLe(e)},table_getSortedRowModel:{fn:()=>OLe(e)},table_getPreExpandedRowModel:{fn:()=>jLe(e)},table_getExpandedRowModel:{fn:()=>ELe(e)},table_getPrePaginatedRowModel:{fn:()=>TLe(e)},table_getPaginatedRowModel:{fn:()=>ALe(e)},table_getRowModel:{fn:()=>CLe(e)}})}};function NLe(e){var t,n;if(!e._cellPrototype){e._cellPrototype={table:e};const r=Object.values(e._features);for(let i=0;i<r.length;i++)(n=(t=r[i]).assignCellPrototype)==null||n.call(t,e._cellPrototype,e)}return e._cellPrototype}function RLe(e,t,n){const r=NLe(n),i=Object.create(r);i.column=e,i.id=`${t.id}_${e.id}`,i.row=t;const a=n._cellInstanceInitFns;for(let o=0;o<a.length;o++)a[o](i);return i}function MLe(e){const t=e.table.getRowsInDisplayOrder(),n=e._displayIndexCache;return t[n]===e?n:-1}function PLe(e){const t=e.getPrePaginatedRowModel().rows;if(e.options.paginateExpandedRows===!1){const n=[],r=i=>{var a;i._displayIndexCache=n.length,n.push(i),i.subRows.length&&((a=i.getIsExpanded)!=null&&a.call(i))&&i.subRows.forEach(r)};return t.forEach(r),n}for(let n=0;n<t.length;n++)t[n]._displayIndexCache=n;return t}function $Le(e,t){if(F0(e._valuesCache,t))return e._valuesCache[t];const n=e.table.getColumn(t);if(n!=null&&n.accessorFn)return e._valuesCache[t]=n.accessorFn(e.original,e.index),e._valuesCache[t]}function DLe(e,t){if(F0(e._uniqueValuesCache,t))return e._uniqueValuesCache[t];const n=e.table.getColumn(t);if(n!=null&&n.accessorFn)return n.columnDef.getUniqueValues?(e._uniqueValuesCache[t]=n.columnDef.getUniqueValues(e.original,e.index),e._uniqueValuesCache[t]):(e._uniqueValuesCache[t]=[e.getValue(t)],e._uniqueValuesCache[t])}function ILe(e,t){return e.getValue(t)??e.table.options.renderFallbackValue}function kLe(e){return cke(e.subRows,t=>t.subRows)}function LLe(e){const t=e.getCoreRowModel().flatRows;let n=0;for(let r=0;r<t.length;r++)n=Math.max(n,t[r].depth);return n}function BLe(e){if(e.parentId)return e.table.getCoreRowModel().rowsById[e.parentId]??e.table.getRow(e.parentId,!0)}function zLe(e){const t=[];let n=e;for(;;){const r=n.getParentRow();if(!r)break;t.push(r),n=r}return t.reverse()}function FLe(e){const t=e.table.getAllLeafColumns();let n=e._cellsCache;n||(n=e._cellsCache=new WeakMap);const r=new Array(t.length);for(let i=0;i<t.length;i++){const a=t[i];let o=n.get(a);o||(o=RLe(a,e,e.table),n.set(a,o)),r[i]=o}return r}function ULe(e){const t=or(),n=e.getAllCells();for(let r=0;r<n.length;r++){const i=n[r];t[i.column.id]=i}return t}function HLe(e,t,n,r){var i,a;return((a=(i=t.options).getRowId)==null?void 0:a.call(i,e,n,r))??(r?`${r.id}.${n}`:String(n))}function qLe(e,t,n){let r=(n?e.getPrePaginatedRowModel():e.getRowModel()).rowsById[t];if(!r&&(r=e.getCoreRowModel().rowsById[t],!r))throw new Error;return r}const VLe={assignRowPrototype:(e,t)=>{Hs("coreRowsFeature",e,t,{row_getDisplayIndex:{fn:n=>MLe(n)},row_getAllCellsByColumnId:{fn:n=>ULe(n),memoDeps:n=>[n.getAllCells()]},row_getAllCells:{fn:n=>FLe(n),memoDeps:n=>[n.table.getAllLeafColumns()]},row_getLeafRows:{fn:n=>kLe(n),memoDeps:n=>[n.subRows]},row_getParentRow:{fn:n=>BLe(n)},row_getParentRows:{fn:n=>zLe(n)},row_getUniqueValues:{fn:(n,r)=>DLe(n,r)},row_getValue:{fn:(n,r)=>$Le(n,r)},row_renderValue:{fn:(n,r)=>ILe(n,r)}})},constructTableAPIs:e=>{sl("coreRowsFeature",e,{table_getRowsInDisplayOrder:{fn:()=>PLe(e),memoDeps:()=>{var t;return[e.getPrePaginatedRowModel().rows,e.options.paginateExpandedRows,e.options.paginateExpandedRows===!1?(t=e.atoms.expanded)==null?void 0:t.get():void 0]}},table_getRowId:{fn:(t,n,r)=>HLe(t,e,n,r)},table_getRow:{fn:(t,n)=>qLe(e,t,n)},table_getMaxSubRowDepth:{fn:()=>LLe(e),memoDeps:()=>[e.getCoreRowModel()]}})}};function Uq(e,t,n=(r,i)=>r===i){const r=t===void 0?e.options.state:t;e._reactivity.batch(()=>{if(r)for(const i in r){const a=e.baseAtoms[i];if(!a)continue;const o=r[i],s=o===void 0?e.initialState[i]:o;n(e._reactivity.untrack(()=>a.get()),s)||a.set(()=>s)}})}function Hq(e,t,n=(r,i)=>r===i){e._reactivity.batch(()=>{var r,i;Uq(e,t,n),(i=(r=e._reactivity).commit)==null||i.call(r)})}function GLe(e){var r,i;const t=Eo(e.initialState);e._reactivity.batch(()=>{const a=Object.keys(t);for(let o=0;o<a.length;o++){const s=a[o];e.baseAtoms[s].set(t[s])}});const n=Object.values(e._features);for(let a=0;a<n.length;a++)(i=(r=n[a]).resetTableInstanceData)==null||i.call(r,e)}function KLe(e,t){const{features:n,atoms:r,initialState:i}=e.options;if(!e.options.mergeOptions)return{...e.options,...t,features:n,atoms:r,initialState:i};const a=e.options.mergeOptions(e.options,t),o={...Object.getOwnPropertyDescriptors(a)};return Object.defineProperties(Object.create(Object.getPrototypeOf(a)),{...o,features:{value:n,enumerable:!0,configurable:!0,writable:!0},atoms:{value:r,enumerable:!0,configurable:!0,writable:!0},initialState:{value:i,enumerable:!0,configurable:!0,writable:!0}})}function qq(e,t,n){const r=KLe(e,Id(t,e.options));e.optionsStore?e.optionsStore.set(()=>r):e.options=r,(n==null?void 0:n.syncExternalState)!==!1&&Hq(e,r.state??null)}const YLe={constructTableAPIs:e=>{sl("coreTablesFeature",e,{table_reset:{fn:()=>GLe(e)},table_setOptions:{fn:t=>qq(e,t)}})}},XLe={coreCellsFeature:gke,coreColumnsFeature:zke,coreHeadersFeature:Kke,coreRowModelsFeature:_Le,coreRowsFeature:VLe,coreTablesFeature:YLe};function WLe(e,t={}){return Object.values(e).forEach(n=>{var r;t=((r=n.getInitialState)==null?void 0:r.call(n,t))??t}),Eo(t)}function QLe(e){var j,E;const t=e.features.coreReactivityFeature,{aggregationFns:n,columnMeta:r,coreRowModel:i,expandedRowModel:a,facetedMinMaxValues:o,facetedRowModel:s,facetedUniqueValues:l,filterFns:u,filterMeta:f,filteredRowModel:d,groupedRowModel:p,paginatedRowModel:h,sortFns:b,sortedRowModel:m,tableMeta:g,...y}=e.features,v={_cellInstanceInitFns:[],_columnInstanceInitFns:[],_features:{...XLe,...y},_headerGroupInstanceInitFns:[],_headerInstanceInitFns:[],_reactivity:t,_rowInstanceInitFns:[],_rowModelFns:{aggregationFns:n,filterFns:u,sortFns:b},_rowModels:{},atoms:{},baseAtoms:{}},w=Object.values(v._features),S={...w.reduce((T,A)=>{var C;return Object.assign(T,(C=A.getDefaultTableOptions)==null?void 0:C.call(A,v))},{}),...e};if(t.wrapExternalAtoms&&S.atoms)for(const[T,A]of Object.entries(S.atoms)){const C=A,_=t.createWritableAtom(C.get(),{debugName:`externalAtom/${T}`});S.atoms[T]=_;let N=!1;const D=C.subscribe($=>{N||_.set($)}),R=_.subscribe($=>{N=!0,C.set($),N=!1});t.addSubscription(D),t.addSubscription(R)}t.createOptionsStore?(v.optionsStore=t.createWritableAtom(S,{debugName:"table/optionsStore"}),Object.defineProperty(v,"options",{configurable:!0,enumerable:!0,get(){return v.optionsStore.get()},set(T){v.optionsStore.set(()=>T)}})):v.options=S,v.initialState=WLe(v._features,v.options.initialState);const O=Object.keys(v.initialState);for(let T=0;T<O.length;T++){const A=O[T];v.baseAtoms[A]=t.createWritableAtom(v.initialState[A],{debugName:`table/baseAtoms/${A}`}),v.atoms[A]=t.createReadonlyAtom(()=>{var R;const C=v.options,_=(R=C.atoms)==null?void 0:R[A],N=_?_.get():v.baseAtoms[A].get();if(_)return N;const D=C.state;if(D&&F0(D,A)){const $=D[A];return $===void 0?v.initialState[A]:$}return N},{debugName:`table/atoms/${A}`})}Uq(v),v.store=ike(t.createReadonlyAtom(()=>{const T={};for(let A=0;A<O.length;A++){const C=O[A];T[C]=v.atoms[C].get()}return T},{compare:Yp,debugName:"table/store"}));for(let T=0;T<w.length;T++){const A=w[T];(j=A.initTableInstanceData)==null||j.call(A,v),A.initCellInstanceData&&v._cellInstanceInitFns.push(A.initCellInstanceData.bind(A)),A.initColumnInstanceData&&v._columnInstanceInitFns.push(A.initColumnInstanceData.bind(A)),A.initHeaderGroupInstanceData&&v._headerGroupInstanceInitFns.push(A.initHeaderGroupInstanceData.bind(A)),A.initHeaderInstanceData&&v._headerInstanceInitFns.push(A.initHeaderInstanceData.bind(A)),A.initRowInstanceData&&v._rowInstanceInitFns.push(A.initRowInstanceData.bind(A)),(E=A.constructTableAPIs)==null||E.call(A,v)}return v}function ZLe(){return[]}function Vq(e){const t=e.table._rowModelFns.filterFns,n=e.table.getCoreRowModel().flatRows;let r;for(let o=0;o<n.length;o++){const s=n[o].getValue(e.id);if(s!=null){r=s;break}}let i;return typeof r=="string"?i="includesString":typeof r=="number"?i="inNumberRange":typeof r=="boolean"?i="equals":Array.isArray(r)?i="arrIncludes":Object.prototype.toString.call(r)==="[object Date]"?i="inDateRange":r!==null&&typeof r=="object"?i="equals":i="weakEquals",t==null?void 0:t[i]}function b_(e){let t=null;const n=e.table._rowModelFns.filterFns;return t=gq(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?Vq(e):n==null?void 0:n[e.columnDef.filterFn],t??void 0}function JLe(e){return(e.columnDef.enableColumnFilter??!0)&&(e.table.options.enableColumnFilters??!0)&&(e.table.options.enableFilters??!0)&&!!e.accessorFn}function e3e(e){return Gq(e)>-1}function t3e(e){var t,n,r;return(r=(n=(t=e.table.atoms.columnFilters)==null?void 0:t.get())==null?void 0:n.find(i=>i.id===e.id))==null?void 0:r.value}function Gq(e){var t,n;return((n=(t=e.table.atoms.columnFilters)==null?void 0:t.get())==null?void 0:n.findIndex(r=>r.id===e.id))??-1}function n3e(e,t){x_(e.table,n=>{const r=b_(e),i=n.find(s=>s.id===e.id),a=Id(t,i?i.value:void 0);if(Kq(r,a,e))return n.filter(s=>s.id!==e.id);const o={id:e.id,value:a};return i?n.map(s=>s.id===e.id?o:s):n.length?[...n,o]:[o]})}function x_(e,t){const n=e.getAllLeafColumnsById();kd(e,"columnFilters",i=>Id(t,i).filter(a=>{const o=n[a.id];return!(o&&Kq(b_(o),a.value,o))}))}function r3e(e,t){x_(e,t?[]:Eo(e.initialState.columnFilters??[]))}function Kq(e,t,n){return typeof t>"u"?!0:e!=null&&e.autoRemove?!!e.autoRemove(t,n):typeof t=="string"&&!t}const i3e={getInitialState:e=>({columnFilters:ZLe(),...e}),getDefaultColumnDef:()=>({filterFn:"auto"}),getDefaultTableOptions:e=>({onColumnFiltersChange:g_("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),assignColumnPrototype:(e,t)=>{Hs("columnFilteringFeature",e,t,{column_getAutoFilterFn:{fn:n=>Vq(n)},column_getFilterFn:{fn:n=>b_(n)},column_getCanFilter:{fn:n=>JLe(n)},column_getIsFiltered:{fn:n=>e3e(n)},column_getFilterValue:{fn:n=>t3e(n)},column_getFilterIndex:{fn:n=>Gq(n)},column_setFilterValue:{fn:(n,r)=>n3e(n,r)}})},initRowInstanceData:e=>{e.columnFilters=or(),e.columnFiltersMeta=or()},constructTableAPIs:e=>{sl("columnFilteringFeature",e,{table_setColumnFilters:{fn:t=>x_(e,t)},table_resetColumnFilters:{fn:t=>r3e(e,t)}})}},a3e={getInitialState:e=>({columnVisibility:yke(),...e}),getDefaultTableOptions:e=>({onColumnVisibilityChange:g_("columnVisibility",e)}),assignColumnPrototype:(e,t)=>{Hs("columnVisibilityFeature",e,t,{column_getIsVisible:{fn:n=>Br(n),memoDeps:n=>{var r;return[t.options.columns,(r=t.atoms.columnVisibility)==null?void 0:r.get(),n.columns]}},column_getCanHide:{fn:n=>Db(n)},column_getToggleVisibilityHandler:{fn:n=>bke(n)},column_toggleVisibility:{fn:(n,r)=>xq(n,r)}})},assignRowPrototype:(e,t)=>{Hs("columnVisibilityFeature",e,t,{row_getVisibleCells:{fn:n=>xke(n),memoDeps:n=>{var r,i;return[n.getAllCells(),(r=t.atoms.columnPinning)==null?void 0:r.get(),(i=t.atoms.columnVisibility)==null?void 0:i.get()]}},row_getVisibleCellsByColumnId:{fn:n=>wq(n),memoDeps:n=>{var r;return[n.getAllCells(),(r=t.atoms.columnVisibility)==null?void 0:r.get()]}}})},constructTableAPIs:e=>{sl("columnVisibilityFeature",e,{table_getVisibleFlatColumns:{fn:()=>wke(e),memoDeps:()=>{var t,n,r;return[(t=e.atoms.columnVisibility)==null?void 0:t.get(),(n=e.atoms.columnOrder)==null?void 0:n.get(),(r=e.atoms.grouping)==null?void 0:r.get(),e.options.columns,e.options.groupedColumnMode]}},table_getVisibleLeafColumns:{fn:()=>Sq(e),memoDeps:()=>{var t,n,r;return[(t=e.atoms.columnVisibility)==null?void 0:t.get(),(n=e.atoms.columnOrder)==null?void 0:n.get(),(r=e.atoms.grouping)==null?void 0:r.get(),e.options.columns,e.options.groupedColumnMode]}},table_setColumnVisibility:{fn:t=>U0(e,t)},table_resetColumnVisibility:{fn:t=>Ske(e,t)},table_toggleAllColumnsVisible:{fn:t=>Oq(e,t)},table_getIsAllColumnsVisible:{fn:()=>jq(e)},table_getIsSomeColumnsVisible:{fn:()=>Oke(e)},table_getToggleAllColumnsVisibilityHandler:{fn:()=>jke(e)}})}},o3e={getInitialState(e){return{sorting:uLe(),...e}},getDefaultColumnDef(){return{sortFn:"auto",sortUndefined:1}},getDefaultTableOptions(e){return{autoResetSorting:!1,onSortingChange:g_("sorting",e),isMultiSortEvent:t=>t.shiftKey}},assignColumnPrototype(e,t){Hs("rowSortingFeature",e,t,{column_getAutoSortFn:{fn:n=>$q(n)},column_getAutoSortDir:{fn:n=>Dq(n)},column_getSortFn:{fn:n=>fLe(n)},column_toggleSorting:{fn:(n,r,i)=>Iq(n,r,i)},column_getFirstSortDir:{fn:n=>kq(n)},column_getNextSortingOrder:{fn:(n,r)=>Lq(n,r)},column_getCanSort:{fn:n=>Bq(n)},column_getCanMultiSort:{fn:n=>kb(n)},column_getIsSorted:{fn:n=>zq(n)},column_getSortIndex:{fn:n=>dLe(n)},column_clearSorting:{fn:n=>pLe(n)},column_getToggleSortingHandler:{fn:n=>hLe(n)}})},constructTableAPIs(e){sl("rowSortingFeature",e,{table_setSorting:{fn:t=>q0(e,t)},table_resetSorting:{fn:t=>Pq(e,t)}})}},s3e=typeof window>"u"?x.useEffect:x.useLayoutEffect;function l3e(e,t){const[{table:n,rootSource:r}]=x.useState(()=>{const l=QLe({...e,features:{coreReactivityFeature:ske(),...e.features}});return l.Subscribe=u=>rke({...u,source:u.source??l.store}),l.FlexRender=_Ie,{table:l,rootSource:oke(l.store,Yp)}}),i=n;qq(i,l=>({...l,...e}),{syncExternalState:!1});const a=i.options.state,o=r.get(),s=hq(r,t,{compare:Yp});return s3e(()=>{r.markCommitted(o),Hq(i,a??null,Yp)}),x.useMemo(()=>({...n,options:e,state:s}),[n,e,s])}const u3e={rowSortingFeature:o3e,columnFilteringFeature:i3e,columnVisibilityFeature:a3e};function c3e({direction:e}){return e==="asc"?c.jsx("span",{"aria-hidden":"true",children:"↑"}):e==="desc"?c.jsx("span",{"aria-hidden":"true",children:"↓"}):c.jsx("span",{"aria-hidden":"true",className:"opacity-30",children:"↕"})}function f3e({header:e,className:t}){const n=e.column.getIsSorted(),r=Rl(e.column.columnDef.header,e.getContext());return c.jsx(_e,{className:`whitespace-nowrap p-0 ${t}`,"aria-sort":n==="asc"?"ascending":n==="desc"?"descending":"none",children:c.jsxs(Tt,{variant:"ghost",size:"xs",onClick:e.column.getToggleSortingHandler(),className:"w-full justify-start gap-1 px-3 py-2 font-normal",children:[r,c.jsx(c3e,{direction:n})]})})}function d3e({header:e}){const t=e.column.getFilterValue(),n=typeof t=="string"?t:"",[r,i]=x.useState(n);x.useEffect(()=>i(n),[n]);const a=()=>{r!==n&&e.column.setFilterValue(r)};return c.jsx(nd,{value:r,"aria-label":`Filter by ${e.column.id}`,placeholder:"Filter…",className:"w-full py-0.5",onChange:o=>i(o.target.value),onBlur:a,onKeyDown:o=>{o.key==="Enter"&&a(),o.key==="Escape"&&i(n)}})}function p3e({table:e,sticky:t,menu:n}){var s;const r=((s=e.getHeaderGroups().at(-1))==null?void 0:s.headers)??[],i=r.some(l=>l.column.getCanFilter()),a=t?"sticky top-0 z-10 bg-panel":"",o=t?"sticky top-8 z-10 bg-panel":"";return c.jsxs(al,{children:[c.jsxs(Dn,{children:[r.map(l=>l.column.getCanSort()?c.jsx(f3e,{header:l,className:a},l.id):c.jsx(_e,{className:`whitespace-nowrap ${a}`,children:Rl(l.column.columnDef.header,l.getContext())},l.id)),n?c.jsx(_e,{className:`w-px whitespace-nowrap text-right ${a}`,children:n}):null]}),i&&c.jsxs(Dn,{children:[r.map(l=>c.jsx(_e,{className:`py-1 ${o}`,children:l.column.getCanFilter()?c.jsx(d3e,{header:l}):null},l.id)),n?c.jsx(_e,{className:o}):null]})]})}function h3e(e,t){const n=e.replace(/\{(\w+)\}/g,(r,i)=>String(t[i]??""));return/^\s*(javascript|data|vbscript):/i.test(n)?"#":n}function m3e({spec:e,row:t}){const n=String(t[e.key]??""),r=e.link?c.jsx("a",{className:"text-info hover:underline",href:h3e(e.link.href,t),...e.link.external?{target:"_blank",rel:"noreferrer"}:{},children:n}):n;return e.action?c.jsxs(c.Fragment,{children:[r,c.jsx(bIe,{action:e.action,row:t})]}):c.jsx(c.Fragment,{children:r})}function g3e(e){return e.map(t=>({id:t.key,accessorFn:n=>n[t.key],header:t.label,enableSorting:t.sortable===!0,enableColumnFilter:t.filterable===!0,enableHiding:t.hideable===!0,cell:({row:n})=>c.jsx(m3e,{spec:t,row:n.original})}))}const v3e="max-h-[28rem]";function y3e(e,t,n){return`${t.map(r=>String(e[r.key]??"")).join("|")}#${n}`}function b3e({columns:e,rows:t,sort:n,onSortChange:r,filters:i,onFiltersChange:a,scrolls:o}){const[s,l]=x.useState({}),u=x.useMemo(()=>g3e(e),[e]),f=n?[{id:n.key,desc:n.dir==="desc"}]:[],d=Object.entries(i??{}).map(([g,y])=>({id:g,value:y})),p=l3e({features:u3e,columns:u,data:t,state:{sorting:f,columnFilters:d,columnVisibility:s},onColumnVisibilityChange:l,onSortingChange:g=>{const v=(typeof g=="function"?g(f):g)[0];r==null||r(v?{key:v.id,dir:v.desc?"desc":"asc"}:void 0)},onColumnFiltersChange:g=>{const y=typeof g=="function"?g(d):g,v={};for(const w of y)typeof w.value=="string"&&w.value!==""&&(v[w.id]=w.value);a==null||a(v)},manualSorting:!0,manualFiltering:!0,getRowId:(g,y)=>y3e(g,e,y)}),h=p.getAllLeafColumns(),b=h.some(g=>g.getCanHide()),m=p.getVisibleLeafColumns().length+(b?1:0);return c.jsxs(il,{containerClassName:o?v3e:"",children:[c.jsx(p3e,{table:p,sticky:o===!0,...b?{menu:c.jsx(EIe,{columns:h})}:{}}),c.jsxs(ol,{children:[t.length===0?c.jsx(Dn,{children:c.jsx(Me,{colSpan:m,className:"py-6 text-center text-muted-foreground",children:"No data in this window."})}):null,p.getRowModel().rows.map(g=>c.jsxs(Dn,{children:[g.getVisibleCells().map(y=>c.jsx(Me,{className:"whitespace-nowrap text-foreground",children:Rl(y.column.columnDef.cell,y.getContext())},y.id)),b?c.jsx(Me,{}):null]},g.id))]})]})}function x3e(e,t){return t==="percent"?`${Math.round(e*100)}%`:t==="duration"?e>=1e3?`${(e/1e3).toFixed(1)}s`:`${Math.round(e)}ms`:t==="rate"?`${new Intl.NumberFormat().format(Math.round(e))}/hr`:new Intl.NumberFormat().format(e)}function Yq(e,t="rows"){if(typeof e!="object"||e===null||!(t in e))return[];const n=Reflect.get(e,t);return Array.isArray(n)?n.filter(r=>typeof r=="object"&&r!==null):[]}function I1(e,t){if(typeof e!="object"||e===null||!(t in e))return;const n=Reflect.get(e,t);return typeof n=="number"&&Number.isFinite(n)?n:void 0}function w3e(e){const t=Yq(e,"data"),n=typeof e=="object"&&e!==null?Reflect.get(e,"meta"):void 0;return{rows:t,total:I1(n,"total")??t.length,page:I1(n,"currentPage")??1,limit:I1(n,"perPage")??0}}function S3e({title:e}){return c.jsxs("div",{className:"aviary-surface rounded-lg border border-border",children:[c.jsx("p",{className:"border-b border-line px-4 py-2 text-xs font-medium text-foreground",children:e}),c.jsx("p",{className:"px-4 py-8 text-center text-xs text-muted-foreground",children:"No data in this window."})]})}function O3e({page:e,totalPages:t,onPageChange:n}){return c.jsxs("div",{className:"flex items-center gap-2 text-[10px] text-muted-foreground",children:[c.jsx(Tt,{variant:"outline",size:"xs",disabled:e<=1,onClick:()=>n==null?void 0:n(e-1),className:"px-1.5 text-muted-foreground",children:"Prev"}),c.jsxs("span",{children:["Page ",e," of ",t]}),c.jsx(Tt,{variant:"outline",size:"xs",disabled:e>=t,onClick:()=>n==null?void 0:n(e+1),className:"px-1.5 text-muted-foreground",children:"Next"})]})}function j3e({panel:e,data:t,onPageChange:n,requestedPage:r,sort:i,onSortChange:a,filters:o,onFiltersChange:s,onSelect:l}){const u=l?{onSelect:l}:{};switch(e.kind){case"stat":{const f=t??{};return c.jsx(Ze,{label:e.title,value:x3e(f.value??0,e.format),...f.value!==void 0?{currentValue:f.value}:{},...f.delta!==void 0?{delta:f.delta}:{},...f.deltaLabel?{deltaLabel:f.deltaLabel}:{},...e.spark&&f.spark?{spark:f.spark}:{},...e.thresholds?{thresholds:e.thresholds}:{},...e.accent?{accent:e.accent}:{}})}case"distribution":{const f=t??{};return c.jsx(OIe,{title:e.title,buckets:f.buckets??[],...f.p50!==void 0?{p50:f.p50}:{},...f.p95!==void 0?{p95:f.p95}:{},...f.p99!==void 0?{p99:f.p99}:{},...u})}case"gauge":{const f=t??{};return c.jsx(jIe,{title:e.title,value:f.value??0,...e.min!==void 0?{min:e.min}:{},...e.max!==void 0?{max:e.max}:{}})}case"breakdown":{const f=t??{};return c.jsx(xIe,{title:e.title,segments:f.segments??[],...e.style?{style:e.style}:{},...u})}case"timeseries":{const f=(t==null?void 0:t.rows)??[],d=e.series[0];return e.style==="stacked"?c.jsx(P0,{title:e.title,data:f,series:e.series,...u}):c.jsx(ku,{title:e.title,data:f.map(p=>({label:p.label,value:d?Number(p[d]??0):0})),...u})}case"topN":{const f=(t==null?void 0:t.items)??[],d=e.limit?f.slice(0,e.limit):f;return d.length===0?c.jsx(S3e,{title:e.title}):c.jsx(Wl,{title:e.title,data:d,horizontal:!0,truncateLabel:32,...u})}case"table":{const f=c.jsx(b3e,{columns:e.columns,rows:Yq(t,e.paged===!0?"data":"rows"),scrolls:e.paged===!0,sort:i,...a?{onSortChange:a}:{},filters:o,...s?{onFiltersChange:s}:{}});if(e.paged){const{rows:d,total:p,page:h,limit:b}=w3e(t),m=Math.max(1,Math.ceil(p/(b||d.length||1)));return c.jsxs("div",{className:"aviary-surface rounded-lg border border-border",children:[c.jsxs("div",{className:"flex items-center justify-between border-b border-line px-4 py-2",children:[c.jsx("p",{className:"text-xs font-medium text-foreground",children:e.title}),c.jsx(O3e,{page:r??h,totalPages:m,...n?{onPageChange:n}:{}})]}),f]})}return c.jsxs("div",{className:"aviary-surface rounded-lg border border-border",children:[c.jsx("p",{className:"border-b border-line px-4 py-2 text-xs font-medium text-foreground",children:e.title}),f]})}default:return null}}const E3e="sort",T3e="size";function A3e(e){return`filter[${e}]`}function C3e(e,t){const n=Object.entries(t.filters??{}).filter(([,i])=>i!=="");if(!t.paging&&!t.sort&&n.length===0)return e;const r={...e};t.paging&&(r.page=t.paging.page,r[T3e]=t.paging.size),t.sort&&(r[E3e]=`${t.sort.dir==="desc"?"-":""}${t.sort.key}`);for(const[i,a]of n)r[A3e(i)]=a;return r}const _3e={1:"",2:"md:grid-cols-2",3:"md:grid-cols-3",4:"md:grid-cols-2 lg:grid-cols-4"},N3e=50;function R3e(e){return"drilldown"in e?e.drilldown:void 0}function M3e({status:e}){const t=e==="live";return c.jsxs("span",{"data-telescope-status":e,className:`inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wide ${t?"tint-good":"tint-warn"}`,children:[c.jsx("span",{className:`h-1.5 w-1.5 rounded-full ${t?"animate-pulse bg-good":"bg-warn"}`}),t?"live":e]})}function P3e({ext:e,panel:t,focus:n,onSelect:r}){const i=t.kind==="table"&&t.paged===!0,[a,o]=x.useState(1),[s,l]=x.useState(void 0),[u,f]=x.useState({}),d=n?{[n.param]:n.value}:void 0,p=d?{...t.data.query,...d}:t.data.query,h=C3e(p,{...i?{paging:{page:a,size:N3e}}:{},...s?{sort:s}:{},filters:u}),b=pX(e,t.data.provider,h);return b.isError?c.jsxs("div",{className:"tint-bad rounded-lg border px-4 py-3 text-sm",children:['Failed to load "',t.title,'".']}):c.jsx(j3e,{panel:t,data:b.data,...i?{onPageChange:o,requestedPage:a}:{},sort:s,onSortChange:m=>{o(1),l(m)},filters:u,onFiltersChange:m=>{o(1),f(m)},...r?{onSelect:r}:{}})}function $3e(){var u,f;const{dashboardId:e}=ux(),t=Ks(),{status:n}=AX(),[r,i]=x.useState(null),a=(f=(u=t.data)==null?void 0:u.dashboards)==null?void 0:f.find(d=>d.id===e);if(!a)return c.jsx("div",{className:"p-6 text-sm text-muted-foreground",children:"Dashboard not found."});const o=(e==null?void 0:e.split(".")[0])??"",s=a.sections??[{panels:a.panels,cols:2}];function l(d,p){const h=p.id??p.label,b=p.series?`${p.series} · ${p.label}`:p.label;i(m=>(m==null?void 0:m.param)===d&&m.value===h?null:{param:d,value:h,label:b})}return c.jsx(yIe,{ext:o,children:c.jsxs(Bo,{children:[c.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[c.jsx("h1",{className:"text-lg font-bold tracking-[0.01em] text-fg",children:a.label}),c.jsx(M3e,{status:n}),r&&c.jsxs("span",{className:"tint-brand inline-flex items-center gap-1 rounded border py-0.5 pl-1.5 text-[10px]",children:[r.param,": ",r.label,c.jsx(Tt,{variant:"ghost",size:"xs",className:"px-1 text-inherit",onClick:()=>i(null),children:"Clear"})]})]}),s.map((d,p)=>c.jsxs("section",{className:"mb-6",children:[d.title&&c.jsx("p",{className:"mb-2 text-[10px] uppercase tracking-[0.12em] text-faint",children:d.title}),c.jsx("div",{className:`grid grid-cols-1 gap-3 ${_3e[d.cols??2]}`,children:d.panels.map(h=>{const b=R3e(h);return c.jsx(P3e,{ext:o,panel:h,focus:r,...b?{onSelect:m=>l(b.param,m)}:{}},`${h.kind}-${h.title}`)})})]},d.title??`s${p}`))]})})}function D3e({profile:e,selected:t,onSelect:n}){return c.jsxs("button",{type:"button",onClick:n,className:`flex w-full flex-col gap-0.5 border-b border-line-soft px-3 py-2 text-left hover:bg-panel ${t?"bg-panel":""}`,children:[c.jsx("span",{className:"truncate font-mono text-xs text-foreground",title:e.familyHash??e.id,children:e.familyHash??"(unlabelled)"}),c.jsxs("span",{className:"flex items-center gap-2 text-[10px] text-muted-foreground",children:[c.jsx("span",{children:e.durationMs!==null?tm(e.durationMs):"—"}),e.tags.includes("manual")&&c.jsx("span",{className:"text-warn",children:"manual"}),e.tags.includes("sampled")&&c.jsx("span",{className:"text-info",children:"sampled"}),c.jsx("span",{className:"ml-auto",children:Lo(new Date(e.createdAt).getTime())})]})]})}function I3e({hot:e}){return e.length===0?c.jsx("p",{className:"text-xs text-muted-foreground",children:"No hot frames."}):c.jsxs("div",{className:"aviary-surface rounded-lg border border-border",children:[c.jsxs("div",{className:"flex items-center gap-2 border-b border-line px-3 py-1.5 text-[10px] uppercase tracking-[0.12em] text-faint",children:[c.jsx("span",{className:"flex-1",children:"Function"}),c.jsx("span",{className:"w-16 text-right",children:"Self"}),c.jsx("span",{className:"w-12 text-right",children:"%"})]}),e.map(t=>c.jsxs("div",{className:"flex items-center gap-2 border-b border-line-soft px-3 py-1 text-[11px] last:border-0",children:[c.jsxs("span",{className:"min-w-0 flex-1 truncate font-mono text-foreground",title:`${t.name} ${t.file}`,children:[t.name,t.file&&c.jsx("span",{className:"ml-1 text-muted-foreground",children:t.file})]}),c.jsx("span",{className:"w-16 text-right tabular-nums text-foreground",children:tm(t.selfMs)}),c.jsx("span",{className:"w-12 text-right tabular-nums text-warn",children:t.selfPct.toFixed(1)})]},`${t.name}:${t.file}`))]})}function k3e({id:e}){const{data:t,isLoading:n}=EX(e);if(n)return c.jsx("p",{className:"text-muted-foreground",children:"Loading profile…"});if(!t)return c.jsx("p",{className:"text-muted-foreground",children:"Profile not found."});const r=t.content;return c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"flex flex-wrap items-baseline gap-x-4 gap-y-1",children:[c.jsx("h3",{className:"font-mono text-sm text-foreground",children:r.label??"(unlabelled)"}),c.jsxs("span",{className:"text-xs text-muted-foreground",children:[tm(r.durationMs)," · ",r.sampleCount," samples · ",r.reason]})]}),c.jsx(m_e,{tree:r.tree}),c.jsx(I3e,{hot:r.hot})]})}function L3e({pendingManual:e}){const[t,n]=x.useState(1),[r,i]=x.useState(""),a=TX();return c.jsxs("div",{className:"flex flex-wrap items-center gap-2 aviary-surface rounded-lg border border-border px-3 py-2",children:[c.jsx("span",{className:"text-[10px] uppercase tracking-[0.12em] text-faint",children:"Capture next"}),c.jsx("input",{type:"number",min:1,value:t,onChange:o=>n(Math.max(1,Number(o.target.value))),className:"w-14 rounded border border-line bg-background px-1 py-0.5 text-xs text-foreground"}),c.jsx("span",{className:"text-[10px] text-muted-foreground",children:"request(s) matching"}),c.jsx("input",{type:"text",placeholder:"any route (e.g. GET /users/:id)",value:r,onChange:o=>i(o.target.value),className:"w-56 rounded border border-line bg-background px-1 py-0.5 text-xs text-foreground"}),c.jsx("button",{type:"button",disabled:a.isPending,onClick:()=>a.mutate({count:t,...r?{label:r}:{}}),className:"rounded bg-primary px-2 py-0.5 text-xs font-medium text-primary-foreground hover:opacity-90 disabled:opacity-50",children:a.isPending?"Arming…":"Arm capture"}),e>0&&c.jsxs("span",{className:"text-[10px] text-warn",children:[e," pending"]}),a.isError&&c.jsx("span",{className:"text-[10px] text-bad",children:a.error instanceof Error?a.error.message:"Failed to arm (mutations disabled?)"})]})}function B3e(){var u,f,d,p,h;const e=Ks(),t=OX(),{data:n,isLoading:r}=jX(100),i=(n==null?void 0:n.data)??[],[a,o]=x.useState(null),s=((f=(u=e.data)==null?void 0:u.profiling)==null?void 0:f.enabled)??((d=t.data)==null?void 0:d.enabled)??!1,l=a??((p=i[0])==null?void 0:p.id)??null;return s?c.jsxs(id,{title:"CPU profiles",description:"Sampled V8 CPU profiles of requests and jobs, as flamegraphs.",actions:t.data&&c.jsxs("span",{className:"mono text-[11px] text-faint",children:["sampling ",(t.data.sampleRate*100).toFixed(0),"% · ",t.data.active," active"]}),children:[c.jsx(L3e,{pendingManual:((h=t.data)==null?void 0:h.pendingManual)??0}),c.jsxs("div",{className:"flex flex-col gap-4 md:flex-row",children:[c.jsx("div",{className:"aviary-surface w-full shrink-0 overflow-hidden rounded-lg border border-border md:w-64",children:r?c.jsx(Fu,{rows:5,className:"border-0"}):i.length===0?c.jsx("p",{className:"p-3 text-xs text-muted-foreground",children:"No profiles captured yet."}):i.map(b=>c.jsx(D3e,{profile:b,selected:b.id===l,onSelect:()=>o(b.id)},b.id))}),c.jsx("div",{className:"min-w-0 flex-1",children:l?c.jsx(k3e,{id:l}):c.jsx("p",{className:"text-xs text-muted-foreground",children:"Select a profile to view its flamegraph."})})]})]}):c.jsx(id,{title:"CPU profiles",description:"Sampled V8 CPU profiles of requests and jobs, as flamegraphs.",children:c.jsxs("div",{className:"aviary-surface rounded-lg border border-border p-6 text-xs text-muted-foreground",children:[c.jsx("p",{className:"mb-2 text-foreground",children:"CPU profiling is disabled."}),c.jsxs("p",{children:["Enable it with"," ",c.jsxs("code",{className:"rounded bg-panel-2 px-1 text-brand",children:["profiling: ","{"," enabled: true ","}"]})," ","in ",c.jsx("code",{className:"rounded bg-panel-2 px-1",children:"TelescopeModule.forRoot"}),". Profiling is opt-in because it carries real CPU overhead; when off there is zero cost on the request path."]})]})})}const z3e={scheduled:"text-info bg-info/10",manual:"text-warn tint-warn"};function F3e({trigger:e}){return c.jsx("span",{className:`rounded px-1.5 py-0.5 text-[9px] uppercase tracking-wide ${z3e[e]}`,children:e})}function U3e({type:e,count:t}){return c.jsxs("span",{className:"inline-flex items-center gap-1 rounded bg-panel-2/80 px-1.5 py-0.5 text-[10px] text-foreground",children:[c.jsx("span",{className:"text-muted-foreground",children:hh(e)}),c.jsx("span",{className:"tabular-nums text-foreground",children:t})]})}function H3e(e){return e<1e3?`${e}ms`:`${(e/1e3).toFixed(2)}s`}function q3e(e,t){if(e===null)return"—";const n=new Date(e).getTime()-t;if(Number.isNaN(n))return"—";if(n<=0)return"now";const r=Math.round(n/1e3);return r<60?`~${r}s`:`~${Math.floor(r/60)}m ${r%60}s`}function V3e(){const[e,t]=x.useState(()=>Date.now());return x.useEffect(()=>{const n=setInterval(()=>t(Date.now()),1e3);return()=>clearInterval(n)},[]),e}function G3e({config:e,nextRunAt:t,nowMs:n}){const r=Object.entries(e.perType??{});return c.jsxs("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-4",children:[c.jsx(Ze,{label:"Window",value:Gp(e.afterMs),accent:"text-brand"}),c.jsx(Ze,{label:"Interval",value:Gp(e.intervalMs)}),c.jsx(Ze,{label:"Keep last",value:e.keepLast!=null?e.keepLast.toLocaleString():"unbounded"}),c.jsx(Ze,{label:"Next prune",value:q3e(t,n),accent:"text-info",...r.length>0?{hint:`${r.length} per-type override(s)`}:{}}),r.length>0&&c.jsxs("div",{className:"col-span-2 aviary-surface rounded-lg border border-border p-3 sm:col-span-4",children:[c.jsx("span",{className:"text-[10px] uppercase tracking-[0.12em] text-faint",children:"Per-type overrides"}),c.jsx("div",{className:"mt-2 flex flex-wrap gap-1.5",children:r.map(([i,a])=>c.jsxs("span",{className:"inline-flex items-center gap-1 rounded bg-panel-2/80 px-1.5 py-0.5 text-[10px] text-foreground",children:[c.jsx("span",{className:"text-muted-foreground",children:hh(i)}),c.jsx("span",{className:"tabular-nums text-foreground",children:Gp(a)})]},i))})]})]})}function K3e({run:e}){const t=Object.entries(e.deletedByType);return c.jsxs(Dn,{className:"border-t border-line/60 align-top hover:bg-panel/40",children:[c.jsx(Me,{className:"text-xs text-muted-foreground",children:Lo(new Date(e.at).getTime())}),c.jsx(Me,{children:c.jsx(F3e,{trigger:e.trigger})}),c.jsx(Me,{className:"text-xs tabular-nums text-muted-foreground",children:H3e(e.durationMs)}),c.jsx(Me,{className:"text-xs tabular-nums text-foreground",children:e.deletedTotal.toLocaleString()}),c.jsx(Me,{children:t.length>0?c.jsx("div",{className:"flex flex-wrap gap-1",children:t.map(([n,r])=>c.jsx(U3e,{type:n,count:r},n))}):c.jsx("span",{className:"text-muted-foreground",children:"—"})}),c.jsx(Me,{className:"text-xs tabular-nums text-muted-foreground",children:e.archivedTotal!=null?e.archivedTotal.toLocaleString():"—"}),c.jsx(Me,{className:"text-xs text-bad",children:e.error??""})]})}function Y3e(){var f;const{data:e,isLoading:t,isError:n}=aX(),r=Ks(),i=uB(),a=V3e(),o=((f=r.data)==null?void 0:f.pruneEnabled)??!1,s=(e==null?void 0:e.runs)??[],l=(e==null?void 0:e.config)??null;async function u(){if(globalThis.confirm("Prune now deletes entries older than the retention window. Continue?"))try{const d=await i.mutateAsync();globalThis.alert(`Pruned ${d.pruned} ${d.pruned===1?"entry":"entries"}.`)}catch{globalThis.alert("Prune failed.")}}return c.jsxs(Bo,{children:[c.jsx(Dd,{title:"Prunes",description:"Retention prune runs on this pod: when they ran, what they removed, and the config.",actions:c.jsx(Tt,{onClick:u,disabled:!o||i.isPending,title:o?"Run a prune cycle now":"Mutations are disabled (set `mutations: true` to enable on-demand pruning).",children:i.isPending?"Pruning…":"Prune now"})}),l?c.jsx(G3e,{config:l,nextRunAt:(e==null?void 0:e.nextRunAt)??null,nowMs:a}):c.jsx("div",{className:"rounded-lg border border-dashed border-line px-4 py-6 text-center text-xs text-muted-foreground",children:"No retention window is configured. Set a `prune` option to enable automatic pruning."}),t&&c.jsx("p",{className:"px-1 py-2 text-xs text-muted-foreground",children:"Loading prune runs…"}),n&&c.jsx("p",{className:"px-1 py-2 text-xs text-bad",children:"Failed to load prune runs."}),!t&&!n&&s.length===0&&c.jsx("div",{className:"rounded-lg border border-dashed border-line px-4 py-12 text-center text-xs text-muted-foreground",children:"No prune runs recorded yet on this pod."}),s.length>0&&c.jsx("div",{className:"rounded-lg border border-line",children:c.jsxs(il,{className:"min-w-[760px] text-left text-sm",children:[c.jsx(al,{children:c.jsxs(Dn,{className:"text-[10px] uppercase tracking-[0.12em] text-faint",children:[c.jsx(_e,{children:"Time"}),c.jsx(_e,{children:"Trigger"}),c.jsx(_e,{children:"Duration"}),c.jsx(_e,{children:"Deleted"}),c.jsx(_e,{children:"By type"}),c.jsx(_e,{children:"Archived"}),c.jsx(_e,{children:"Error"})]})}),c.jsx(ol,{children:s.map((d,p)=>c.jsx(K3e,{run:d},`${d.at}:${p}`))})]})})]})}function X3e(){var s;const[e,t]=x.useState("1h"),n=Ra(),{data:r,isLoading:i}=fB(e),a=QT({window:e,buckets:60}),o=i_(((s=a.data)==null?void 0:s.buckets)??[]);return c.jsxs(id,{title:"Pulse",description:"Throughput by type, the slowest routes and queries, top exceptions and N+1 hotspots.",actions:c.jsx($d,{value:e,onChange:t}),children:[c.jsx(P0,{title:"Throughput by type",series:o,data:aq(a.data)}),i||!r?c.jsx(Fu,{rows:6}):c.jsx(yNe,{report:r,onSelectEntry:l=>n(`/entries/view/${l}`),onSelectFamily:l=>n(`/entries/query?familyHash=${encodeURIComponent(l)}`),onSelectRoute:l=>n(`/entries/request?familyHash=${encodeURIComponent(l)}`),onSelectOutgoing:l=>n(`/entries/http_client?familyHash=${encodeURIComponent(l)}`)})]})}const W3e="var(--aviary-bad)",Q3e="var(--aviary-good)";function Z3e(e){return((e==null?void 0:e.queues)??[]).map(t=>({label:t.queue,value:Number((t.failureRate*100).toFixed(1)),color:t.failureRate>0?W3e:Q3e}))}function J3e(){const[e,t]=x.useState("1h"),{data:n,isLoading:r}=dB(e);return c.jsxs("div",{className:"flex flex-col gap-4",children:[c.jsx("div",{className:"flex items-center justify-end",children:c.jsx($d,{value:e,onChange:t})}),c.jsx(Wl,{title:"Failure rate by queue",valueLabel:"fail %",data:Z3e(n)}),r||!n?c.jsx(Fu,{rows:4}):c.jsx(bNe,{report:n,sparkline:i=>c.jsx(wNe,{queue:i,window:e})})]})}const e5e=[{to:"/queues",label:"Manage",end:!0},{to:"/queues/metrics",label:"Metrics",end:!1}];function t5e(){return c.jsxs(id,{title:"Queues",description:"Live queues with their jobs and actions, and failure and throughput metrics.",children:[c.jsx("nav",{"aria-label":"Queues",className:"flex gap-1 border-b border-border",children:e5e.map(e=>c.jsx(gY,{to:e.to,end:e.end,className:({isActive:t})=>ge("-mb-px border-b-2 px-3 py-2 text-[12.5px] font-medium transition-colors",t?"border-primary text-fg":"border-transparent text-dim hover:text-fg"),children:e.label},e.to))}),c.jsx(nY,{})]})}const n5e={cron:"tint-brand",interval:"tint-muted",timeout:"text-warn tint-warn"};function r5e({kind:e}){return c.jsx("span",{className:`rounded px-1.5 py-0.5 text-[9px] uppercase tracking-wide ${n5e[e]}`,children:e})}function i5e({running:e}){return e==null?c.jsx("span",{className:"rounded bg-panel-2 px-1.5 py-0.5 text-[9px] uppercase tracking-[0.12em] text-faint",children:"unknown"}):c.jsxs("span",{className:`inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[9px] uppercase tracking-wide ${e?"tint-good":"tint-bad"}`,children:[c.jsx("span",{className:`h-1.5 w-1.5 rounded-full ${e?"bg-good":"bg-bad"}`}),e?"active":"stopped"]})}function a5e({status:e}){if(e===null)return c.jsx("span",{className:"text-muted-foreground",children:"—"});const t=e==="completed"?"tint-good":"tint-bad";return c.jsx("span",{className:`rounded px-1.5 py-0.5 text-[9px] uppercase tracking-wide ${t}`,children:e})}function o5e(e){return e===null?"—":e<1e3?`${e}ms`:`${(e/1e3).toFixed(2)}s`}function s5e(e){if(e===null)return"—";const t=new Date(e);return Number.isNaN(t.getTime())?"—":t.toLocaleString()}function l5e({task:e}){return c.jsxs(Dn,{className:"border-t border-line/60 hover:bg-panel/40",children:[c.jsx(Me,{className:"mono font-medium text-fg",children:e.name}),c.jsx(Me,{children:c.jsx(r5e,{kind:e.kind})}),c.jsx(Me,{children:c.jsx(i5e,{running:e.running})}),c.jsx(Me,{className:"mono text-xs text-dim",children:e.schedule}),c.jsx(Me,{className:"text-xs text-muted-foreground",children:s5e(e.nextRunAt)}),c.jsx(Me,{className:"text-xs text-muted-foreground",children:Lo(u5e(e.lastRunAt))}),c.jsx(Me,{className:"text-xs tabular-nums text-muted-foreground",children:o5e(e.lastDurationMs)}),c.jsx(Me,{children:c.jsx(a5e,{status:e.lastStatus})})]})}function u5e(e){if(e===null)return null;const t=new Date(e).getTime();return Number.isNaN(t)?null:t}function c5e(){const{data:e,isLoading:t,isError:n}=JY(),r=(e==null?void 0:e.tasks)??[],i=r.filter(o=>o.running===!0).length,a=r.filter(o=>o.running===!1).length;return c.jsxs(id,{title:"Schedules",description:"Cron jobs, intervals and timeouts registered with @nestjs/schedule, live.",actions:r.length>0&&c.jsxs("div",{className:"mono flex items-center gap-3 text-[11px]",children:[c.jsxs("span",{className:"text-good",children:[i," active"]}),a>0&&c.jsxs("span",{className:"text-bad",children:[a," stopped"]}),c.jsxs("span",{className:"text-faint",children:[r.length," total"]})]}),children:[t&&c.jsx(Fu,{rows:5}),n&&c.jsx("p",{className:"px-1 py-2 text-xs text-bad",children:"Failed to load schedules."}),!t&&!n&&r.length===0&&c.jsx(m_,{title:"No scheduled tasks",description:"No scheduled tasks detected. Register a ScheduleManager (the @nestjs/schedule watcher) to populate this console."}),r.length>0&&c.jsx("div",{className:"aviary-surface overflow-x-auto rounded-lg border border-border",children:c.jsxs(il,{className:"min-w-[760px] text-left text-sm",children:[c.jsx(al,{children:c.jsxs(Dn,{className:"text-[10px] uppercase tracking-[0.12em] text-faint",children:[c.jsx(_e,{children:"Name"}),c.jsx(_e,{children:"Kind"}),c.jsx(_e,{children:"Active"}),c.jsx(_e,{children:"Schedule"}),c.jsx(_e,{children:"Next run"}),c.jsx(_e,{children:"Last run"}),c.jsx(_e,{children:"Duration"}),c.jsx(_e,{children:"Status"})]})}),c.jsx(ol,{children:r.map(o=>c.jsx(l5e,{task:o},`${o.kind}:${o.name}`))})]})})]})}function f5e(){const{traceId:e=""}=ux(),t=Ra(),[n,r]=x.useState("waterfall"),{data:i,isLoading:a}=cB({traceId:e}),o=(i==null?void 0:i.data)??[],{data:s,isLoading:l}=bX(e);return c.jsxs(Bo,{children:[c.jsx("button",{type:"button",onClick:()=>t("/entries"),className:"mb-4 text-xs text-muted-foreground hover:text-foreground",children:"← entries"}),c.jsxs("div",{className:"mb-4 flex flex-wrap items-baseline gap-3 border-b border-line pb-3",children:[c.jsx("h2",{className:"text-[10px] font-semibold uppercase tracking-[0.12em] text-faint",children:"Trace"}),c.jsx("span",{className:"max-w-md truncate font-mono text-xs text-foreground",title:e,children:e}),c.jsxs("span",{className:"text-xs text-muted-foreground",children:[o.length," ",o.length===1?"entry":"entries"]}),c.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[c.jsxs("div",{className:"flex overflow-hidden rounded border border-line text-[11px]",children:[c.jsx("button",{type:"button",onClick:()=>r("waterfall"),className:`px-2.5 py-1 transition-colors ${n==="waterfall"?"bg-panel-2 text-foreground":"bg-panel text-muted-foreground hover:text-foreground"}`,children:"Waterfall"}),c.jsx("button",{type:"button",onClick:()=>r("entries"),className:`border-l border-line px-2.5 py-1 transition-colors ${n==="entries"?"bg-panel-2 text-foreground":"bg-panel text-muted-foreground hover:text-foreground"}`,children:"Entries"})]}),o.length>0?c.jsx("button",{type:"button",onClick:()=>n_(`telescope-trace-${e}.json`,o),className:"rounded border border-line bg-panel px-2.5 py-1 text-[11px] text-foreground transition-colors hover:border-line hover:bg-panel-2 hover:text-foreground",children:"Download JSON"}):null]})]}),n==="waterfall"?l?c.jsx("p",{className:"text-muted-foreground",children:"Loading…"}):s===void 0||s.spans.length===0?c.jsx("p",{className:"text-muted-foreground",children:"No spans in this trace"}):c.jsx(f_e,{waterfall:s,onSelect:u=>t(`/entries/view/${u}`)}):a?c.jsx("p",{className:"text-muted-foreground",children:"Loading…"}):o.length===0?c.jsx("p",{className:"text-muted-foreground",children:"No entries in this trace"}):c.jsx(F6,{entries:o,onSelect:u=>t(`/entries/view/${u}`)})]})}function d5e(e){return e<1e3?`${Math.round(e)}ms`:`${(e/1e3).toFixed(2)}s`}function p5e({trace:e}){const t=Ra(),n=e.rootLabel??e.traceId;return c.jsxs("button",{type:"button",onClick:()=>t(`/traces/${e.traceId}`),className:"flex w-full items-center gap-3 border-b border-line-soft px-4 py-2.5 text-left transition-colors last:border-0 hover:bg-hover",children:[c.jsx("span",{className:"flex shrink-0 items-center gap-1","aria-hidden":"true",children:e.types.map(r=>c.jsx("span",{className:`h-2 w-2 rounded-full ${dx(r)}`,title:r},r))}),c.jsx("span",{className:"mono min-w-0 flex-1 truncate text-xs text-fg",title:n,children:n}),c.jsxs("span",{className:"hidden shrink-0 text-xs text-dim sm:inline",children:[e.entryCount," ",e.entryCount===1?"entry":"entries"]}),c.jsx("span",{className:"mono tnum w-16 shrink-0 text-right text-xs text-fg-2",children:d5e(e.totalDurationMs)}),c.jsx("span",{className:"mono tnum w-16 shrink-0 text-right text-xs text-faint",children:Lo(new Date(e.lastAt).getTime())})]})}function h5e(){const[e,t]=x.useState("1h"),{data:n,isLoading:r}=yX(e),i=(n==null?void 0:n.data)??[];return c.jsx(id,{title:"Traces",description:"Every request, job and span that shared a trace id, newest first.",actions:c.jsx($d,{value:e,onChange:t}),children:r?c.jsx(Fu,{}):i.length===0?c.jsx(m_,{title:"No traces in this window",description:"Traces appear once a traceContext provider tags entries with a trace id."}):c.jsx("div",{className:"aviary-surface overflow-hidden rounded-lg border border-border",children:i.map(a=>c.jsx(p5e,{trace:a},a.traceId))})})}const m5e="#e879f9",g5e="aviary-telescope-theme",v5e="telescope-theme";function y5e(){try{return window.localStorage.getItem(v5e)==="light"?"light":"dark"}catch{return"dark"}}function b5e({children:e}){return c.jsx(Y$e,{storageKey:g5e,accent:m5e,defaultTheme:y5e(),children:e})}const x5e=new r7;function w5e(){return c.jsx(pY,{children:c.jsx(EDe,{children:c.jsxs(iY,{children:[c.jsx(Bn,{path:"/",element:c.jsx(YDe,{})}),c.jsx(Bn,{path:"/entries",element:c.jsx(LI,{})}),c.jsx(Bn,{path:"/entries/view/:id",element:c.jsx(uIe,{})}),c.jsx(Bn,{path:"/entries/:type",element:c.jsx(LI,{})}),c.jsx(Bn,{path:"/traces",element:c.jsx(h5e,{})}),c.jsx(Bn,{path:"/traces/:traceId",element:c.jsx(f5e,{})}),c.jsx(Bn,{path:"/pulse",element:c.jsx(X3e,{})}),c.jsx(Bn,{path:"/ai",element:c.jsx(sIe,{})}),c.jsxs(Bn,{path:"/queues",element:c.jsx(t5e,{}),children:[c.jsx(Bn,{index:!0,element:c.jsx(XDe,{})}),c.jsx(Bn,{path:"metrics",element:c.jsx(J3e,{})})]}),c.jsx(Bn,{path:"/schedules",element:c.jsx(c5e,{})}),c.jsx(Bn,{path:"/prunes",element:c.jsx(Y3e,{})}),c.jsx(Bn,{path:"/exports",element:c.jsx(gIe,{})}),c.jsx(Bn,{path:"/profiles",element:c.jsx(B3e,{})}),c.jsx(Bn,{path:"/ext/:dashboardId",element:c.jsx($3e,{})})]})})})}function S5e(){return c.jsx(b5e,{children:c.jsx(TY,{children:c.jsx(NK,{client:x5e,children:c.jsx(VNe,{children:c.jsx(w5e,{})})})})})}const QI=document.getElementById("root");QI&&_K.createRoot(QI).render(c.jsx(x.StrictMode,{children:c.jsx(S5e,{})}));
|