@mesh.ai/rabbit 0.0.43 → 0.0.45
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/dist/@mesh.ai/rabbit.es.js +3557 -3510
- package/dist/@mesh.ai/rabbit.umd.js +21 -21
- package/dist/src/lib/components/atoms/Button/index.d.ts +3 -3
- package/dist/src/lib/components/atoms/index.d.ts +1 -1
- package/dist/src/lib/components/molecules/SplitButton/index.d.ts +12 -0
- package/dist/src/lib/components/molecules/index.d.ts +1 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
(function(ve,L){typeof exports=="object"&&typeof module<"u"?L(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],L):(ve=typeof globalThis<"u"?globalThis:ve||self,L((ve["@mesh"]=ve["@mesh"]||{},ve["@mesh"]["ai/rabbit"]={}),ve["react/jsx-runtime"],ve.React,ve.ReactDOM))})(this,function(ve,L,u,At){"use strict";function _c(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const me=_c(u),Ag=_c(At),V3="";function ee(){return ee=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},ee.apply(this,arguments)}function Dg(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function bo(...e){return t=>e.forEach(n=>Dg(n,t))}function Oe(...e){return u.useCallback(bo(...e),e)}function Ct(e,t=[]){let n=[];function r(i,a){const s=u.createContext(a),l=n.length;n=[...n,a];function c(f){const{scope:p,children:m,...h}=f,v=(p==null?void 0:p[e][l])||s,x=u.useMemo(()=>h,Object.values(h));return u.createElement(v.Provider,{value:x},m)}function d(f,p){const m=(p==null?void 0:p[e][l])||s,h=u.useContext(m);if(h)return h;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${i}\``)}return c.displayName=i+"Provider",[c,d]}const o=()=>{const i=n.map(a=>u.createContext(a));return function(s){const l=(s==null?void 0:s[e])||i;return u.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[r,Ig(o,...t)]}function Ig(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:l,scopeName:c})=>{const f=l(i)[`__scope${c}`];return{...s,...f}},{});return u.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function fe(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function He(e){const t=u.useRef(e);return u.useEffect(()=>{t.current=e}),u.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function St({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=Lg({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,s=He(n),l=u.useCallback(c=>{if(i){const f=typeof c=="function"?c(e):c;f!==e&&s(f)}else o(c)},[i,e,o,s]);return[a,l]}function Lg({defaultProp:e,onChange:t}){const n=u.useState(e),[r]=n,o=u.useRef(r),i=He(t);return u.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}function Nc(e){const t=u.useRef({value:e,previous:e});return u.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}const ot=globalThis!=null&&globalThis.document?u.useLayoutEffect:()=>{};function ua(e){const[t,n]=u.useState(void 0);return ot(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,s;if("borderBoxSize"in i){const l=i.borderBoxSize,c=Array.isArray(l)?l[0]:l;a=c.inlineSize,s=c.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}function Fg(e,t){return u.useReducer((n,r)=>{const o=t[n][r];return o??n},e)}const Zt=e=>{const{present:t,children:n}=e,r=jg(t),o=typeof n=="function"?n({present:r.isPresent}):u.Children.only(n),i=Oe(r.ref,o.ref);return typeof n=="function"||r.isPresent?u.cloneElement(o,{ref:i}):null};Zt.displayName="Presence";function jg(e){const[t,n]=u.useState(),r=u.useRef({}),o=u.useRef(e),i=u.useRef("none"),a=e?"mounted":"unmounted",[s,l]=Fg(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return u.useEffect(()=>{const c=xo(r.current);i.current=s==="mounted"?c:"none"},[s]),ot(()=>{const c=r.current,d=o.current;if(d!==e){const p=i.current,m=xo(c);e?l("MOUNT"):m==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(d&&p!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),ot(()=>{if(t){const c=f=>{const m=xo(r.current).includes(f.animationName);f.target===t&&m&&At.flushSync(()=>l("ANIMATION_END"))},d=f=>{f.target===t&&(i.current=xo(r.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:u.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function xo(e){return(e==null?void 0:e.animationName)||"none"}const yn=u.forwardRef((e,t)=>{const{children:n,...r}=e,o=u.Children.toArray(n),i=o.find(zg);if(i){const a=i.props.children,s=o.map(l=>l===i?u.Children.count(a)>1?u.Children.only(null):u.isValidElement(a)?a.props.children:null:l);return u.createElement(da,ee({},r,{ref:t}),u.isValidElement(a)?u.cloneElement(a,void 0,s):null)}return u.createElement(da,ee({},r,{ref:t}),n)});yn.displayName="Slot";const da=u.forwardRef((e,t)=>{const{children:n,...r}=e;return u.isValidElement(n)?u.cloneElement(n,{...Wg(r,n.props),ref:t?bo(t,n.ref):n.ref}):u.Children.count(n)>1?u.Children.only(null):null});da.displayName="SlotClone";const Ac=({children:e})=>u.createElement(u.Fragment,null,e);function zg(e){return u.isValidElement(e)&&e.type===Ac}function Wg(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}const we=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{const n=u.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?yn:t;return u.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),u.createElement(s,ee({},a,{ref:o}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function fa(e,t){e&&At.flushSync(()=>e.dispatchEvent(t))}const Dc="Checkbox",[Bg,Y3]=Ct(Dc),[Ug,Hg]=Bg(Dc),Gg=u.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:i,required:a,disabled:s,value:l="on",onCheckedChange:c,...d}=e,[f,p]=u.useState(null),m=Oe(t,$=>p($)),h=u.useRef(!1),v=f?!!f.closest("form"):!0,[x=!1,y]=St({prop:o,defaultProp:i,onChange:c}),b=u.useRef(x);return u.useEffect(()=>{const $=f==null?void 0:f.form;if($){const S=()=>y(b.current);return $.addEventListener("reset",S),()=>$.removeEventListener("reset",S)}},[f,y]),u.createElement(Ug,{scope:n,state:x,disabled:s},u.createElement(we.button,ee({type:"button",role:"checkbox","aria-checked":bn(x)?"mixed":x,"aria-required":a,"data-state":Ic(x),"data-disabled":s?"":void 0,disabled:s,value:l},d,{ref:m,onKeyDown:fe(e.onKeyDown,$=>{$.key==="Enter"&&$.preventDefault()}),onClick:fe(e.onClick,$=>{y(S=>bn(S)?!0:!S),v&&(h.current=$.isPropagationStopped(),h.current||$.stopPropagation())})})),v&&u.createElement(Yg,{control:f,bubbles:!h.current,name:r,value:l,checked:x,required:a,disabled:s,style:{transform:"translateX(-100%)"}}))}),Vg="CheckboxIndicator",qg=u.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,i=Hg(Vg,n);return u.createElement(Zt,{present:r||bn(i.state)||i.state===!0},u.createElement(we.span,ee({"data-state":Ic(i.state),"data-disabled":i.disabled?"":void 0},o,{ref:t,style:{pointerEvents:"none",...e.style}})))}),Yg=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=u.useRef(null),a=Nc(n),s=ua(t);return u.useEffect(()=>{const l=i.current,c=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(c,"checked").set;if(a!==n&&f){const p=new Event("click",{bubbles:r});l.indeterminate=bn(n),f.call(l,bn(n)?!1:n),l.dispatchEvent(p)}},[a,n,r]),u.createElement("input",ee({type:"checkbox","aria-hidden":!0,defaultChecked:bn(n)?!1:n},o,{tabIndex:-1,ref:i,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function bn(e){return e==="indeterminate"}function Ic(e){return bn(e)?"indeterminate":e?"checked":"unchecked"}const Lc=Gg,Kg=qg;var Xg={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Rg=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Cr=(e,t)=>{const n=u.forwardRef(({color:r="currentColor",size:o=24,strokeWidth:i=2,absoluteStrokeWidth:a,children:s,...l},c)=>u.createElement("svg",{ref:c,...Xg,width:o,height:o,stroke:r,strokeWidth:a?Number(i)*24/Number(o):i,className:`lucide lucide-${Rg(e)}`,...l},[...t.map(([d,f])=>u.createElement(d,f)),...(Array.isArray(s)?s:[s])||[]]));return n.displayName=`${e}`,n},pa=Cr("Check",[["polyline",{points:"20 6 9 17 4 12",key:"10jjfj"}]]),Zg=Cr("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),Qg=Cr("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),Jg=Cr("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]),e0=Cr("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);function Fc(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Fc(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function jc(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Fc(e))&&(r&&(r+=" "),r+=t);return r}function t0(){for(var e=0,t,n,r="";e<arguments.length;)(t=arguments[e++])&&(n=zc(t))&&(r&&(r+=" "),r+=n);return r}function zc(e){if(typeof e=="string")return e;for(var t,n="",r=0;r<e.length;r++)e[r]&&(t=zc(e[r]))&&(n&&(n+=" "),n+=t);return n}var ha="-";function n0(e){var t=o0(e),n=e.conflictingClassGroups,r=e.conflictingClassGroupModifiers,o=r===void 0?{}:r;function i(s){var l=s.split(ha);return l[0]===""&&l.length!==1&&l.shift(),Wc(l,t)||r0(s)}function a(s,l){var c=n[s]||[];return l&&o[s]?[].concat(c,o[s]):c}return{getClassGroupId:i,getConflictingClassGroupIds:a}}function Wc(e,t){var a;if(e.length===0)return t.classGroupId;var n=e[0],r=t.nextPart.get(n),o=r?Wc(e.slice(1),r):void 0;if(o)return o;if(t.validators.length!==0){var i=e.join(ha);return(a=t.validators.find(function(s){var l=s.validator;return l(i)}))==null?void 0:a.classGroupId}}var Bc=/^\[(.+)\]$/;function r0(e){if(Bc.test(e)){var t=Bc.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function o0(e){var t=e.theme,n=e.prefix,r={nextPart:new Map,validators:[]},o=a0(Object.entries(e.classGroups),n);return o.forEach(function(i){var a=i[0],s=i[1];ma(s,r,a,t)}),r}function ma(e,t,n,r){e.forEach(function(o){if(typeof o=="string"){var i=o===""?t:Uc(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(i0(o)){ma(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(function(a){var s=a[0],l=a[1];ma(l,Uc(t,s),n,r)})})}function Uc(e,t){var n=e;return t.split(ha).forEach(function(r){n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function i0(e){return e.isThemeGetter}function a0(e,t){return t?e.map(function(n){var r=n[0],o=n[1],i=o.map(function(a){return typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(function(s){var l=s[0],c=s[1];return[t+l,c]})):a});return[r,i]}):e}function s0(e){if(e<1)return{get:function(){},set:function(){}};var t=0,n=new Map,r=new Map;function o(i,a){n.set(i,a),t++,t>e&&(t=0,r=n,n=new Map)}return{get:function(a){var s=n.get(a);if(s!==void 0)return s;if((s=r.get(a))!==void 0)return o(a,s),s},set:function(a,s){n.has(a)?n.set(a,s):o(a,s)}}}var Hc="!";function l0(e){var t=e.separator||":",n=t.length===1,r=t[0],o=t.length;return function(a){for(var s=[],l=0,c=0,d,f=0;f<a.length;f++){var p=a[f];if(l===0){if(p===r&&(n||a.slice(f,f+o)===t)){s.push(a.slice(c,f)),c=f+o;continue}if(p==="/"){d=f;continue}}p==="["?l++:p==="]"&&l--}var m=s.length===0?a:a.substring(c),h=m.startsWith(Hc),v=h?m.substring(1):m,x=d&&d>c?d-c:void 0;return{modifiers:s,hasImportantModifier:h,baseClassName:v,maybePostfixModifierPosition:x}}}function c0(e){if(e.length<=1)return e;var t=[],n=[];return e.forEach(function(r){var o=r[0]==="[";o?(t.push.apply(t,n.sort().concat([r])),n=[]):n.push(r)}),t.push.apply(t,n.sort()),t}function u0(e){return{cache:s0(e.cacheSize),splitModifiers:l0(e),...n0(e)}}var d0=/\s+/;function f0(e,t){var n=t.splitModifiers,r=t.getClassGroupId,o=t.getConflictingClassGroupIds,i=new Set;return e.trim().split(d0).map(function(a){var s=n(a),l=s.modifiers,c=s.hasImportantModifier,d=s.baseClassName,f=s.maybePostfixModifierPosition,p=r(f?d.substring(0,f):d),m=!!f;if(!p){if(!f)return{isTailwindClass:!1,originalClassName:a};if(p=r(d),!p)return{isTailwindClass:!1,originalClassName:a};m=!1}var h=c0(l).join(":"),v=c?h+Hc:h;return{isTailwindClass:!0,modifierId:v,classGroupId:p,originalClassName:a,hasPostfixModifier:m}}).reverse().filter(function(a){if(!a.isTailwindClass)return!0;var s=a.modifierId,l=a.classGroupId,c=a.hasPostfixModifier,d=s+l;return i.has(d)?!1:(i.add(d),o(l,c).forEach(function(f){return i.add(s+f)}),!0)}).reverse().map(function(a){return a.originalClassName}).join(" ")}function p0(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,o,i,a=s;function s(c){var d=t[0],f=t.slice(1),p=f.reduce(function(m,h){return h(m)},d());return r=u0(p),o=r.cache.get,i=r.cache.set,a=l,l(c)}function l(c){var d=o(c);if(d)return d;var f=f0(c,r);return i(c,f),f}return function(){return a(t0.apply(null,arguments))}}function Ae(e){var t=function(r){return r[e]||[]};return t.isThemeGetter=!0,t}var Gc=/^\[(?:([a-z-]+):)?(.+)\]$/i,h0=/^\d+\/\d+$/,m0=new Set(["px","full","screen"]),v0=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,g0=/\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$/,y0=/^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;function ht(e){return xn(e)||m0.has(e)||h0.test(e)||va(e)}function va(e){return wn(e,"length",S0)}function b0(e){return wn(e,"size",Vc)}function x0(e){return wn(e,"position",Vc)}function w0(e){return wn(e,"url",E0)}function wo(e){return wn(e,"number",xn)}function xn(e){return!Number.isNaN(Number(e))}function $0(e){return e.endsWith("%")&&xn(e.slice(0,-1))}function Sr(e){return qc(e)||wn(e,"number",qc)}function xe(e){return Gc.test(e)}function Er(){return!0}function Qt(e){return v0.test(e)}function C0(e){return wn(e,"",T0)}function wn(e,t,n){var r=Gc.exec(e);return r?r[1]?r[1]===t:n(r[2]):!1}function S0(e){return g0.test(e)}function Vc(){return!1}function E0(e){return e.startsWith("url(")}function qc(e){return Number.isInteger(Number(e))}function T0(e){return y0.test(e)}function P0(){var e=Ae("colors"),t=Ae("spacing"),n=Ae("blur"),r=Ae("brightness"),o=Ae("borderColor"),i=Ae("borderRadius"),a=Ae("borderSpacing"),s=Ae("borderWidth"),l=Ae("contrast"),c=Ae("grayscale"),d=Ae("hueRotate"),f=Ae("invert"),p=Ae("gap"),m=Ae("gradientColorStops"),h=Ae("gradientColorStopPositions"),v=Ae("inset"),x=Ae("margin"),y=Ae("opacity"),b=Ae("padding"),$=Ae("saturate"),S=Ae("scale"),w=Ae("sepia"),T=Ae("skew"),O=Ae("space"),P=Ae("translate"),_=function(){return["auto","contain","none"]},j=function(){return["auto","hidden","clip","visible","scroll"]},F=function(){return["auto",xe,t]},V=function(){return[xe,t]},R=function(){return["",ht]},X=function(){return["auto",xn,xe]},C=function(){return["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"]},I=function(){return["solid","dashed","dotted","double","none"]},H=function(){return["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"]},B=function(){return["start","end","center","between","around","evenly","stretch"]},A=function(){return["","0",xe]},N=function(){return["auto","avoid","all","avoid-page","page","left","right","column"]},z=function(){return[xn,wo]},J=function(){return[xn,xe]};return{cacheSize:500,theme:{colors:[Er],spacing:[ht],blur:["none","",Qt,xe],brightness:z(),borderColor:[e],borderRadius:["none","","full",Qt,xe],borderSpacing:V(),borderWidth:R(),contrast:z(),grayscale:A(),hueRotate:J(),invert:A(),gap:V(),gradientColorStops:[e],gradientColorStopPositions:[$0,va],inset:F(),margin:F(),opacity:z(),padding:V(),saturate:z(),scale:z(),sepia:A(),skew:J(),space:V(),translate:V()},classGroups:{aspect:[{aspect:["auto","square","video",xe]}],container:["container"],columns:[{columns:[Qt]}],"break-after":[{"break-after":N()}],"break-before":[{"break-before":N()}],"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"],float:[{float:["right","left","none"]}],clear:[{clear:["left","right","both","none"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[].concat(C(),[xe])}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:_()}],"overscroll-x":[{"overscroll-x":_()}],"overscroll-y":[{"overscroll-y":_()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Sr]}],basis:[{basis:F()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",xe]}],grow:[{grow:A()}],shrink:[{shrink:A()}],order:[{order:["first","last","none",Sr]}],"grid-cols":[{"grid-cols":[Er]}],"col-start-end":[{col:["auto",{span:["full",Sr]},xe]}],"col-start":[{"col-start":X()}],"col-end":[{"col-end":X()}],"grid-rows":[{"grid-rows":[Er]}],"row-start-end":[{row:["auto",{span:[Sr]},xe]}],"row-start":[{"row-start":X()}],"row-end":[{"row-end":X()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",xe]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",xe]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal"].concat(B())}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal"].concat(B(),["baseline"])}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[].concat(B(),["baseline"])}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[O]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[O]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit",xe,t]}],"min-w":[{"min-w":["min","max","fit",xe,ht]}],"max-w":[{"max-w":["0","none","full","min","max","fit","prose",{screen:[Qt]},Qt,xe]}],h:[{h:[xe,t,"auto","min","max","fit"]}],"min-h":[{"min-h":["min","max","fit",xe,ht]}],"max-h":[{"max-h":[xe,t,"min","max","fit"]}],"font-size":[{text:["base",Qt,va]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",wo]}],"font-family":[{font:[Er]}],"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-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",xe]}],"line-clamp":[{"line-clamp":["none",xn,wo]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",xe,ht]}],"list-image":[{"list-image":["none",xe]}],"list-style-type":[{list:["none","disc","decimal",xe]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[].concat(I(),["wavy"])}],"text-decoration-thickness":[{decoration:["auto","from-font",ht]}],"underline-offset":[{"underline-offset":["auto",xe,ht]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],indent:[{indent:V()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",xe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",xe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[].concat(C(),[x0])}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",b0]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},w0]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[h]}],"gradient-via-pos":[{via:[h]}],"gradient-to-pos":[{to:[h]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[].concat(I(),["hidden"])}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:I()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:[""].concat(I())}],"outline-offset":[{"outline-offset":[xe,ht]}],"outline-w":[{outline:[ht]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:R()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[ht]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Qt,C0]}],"shadow-color":[{shadow:[Er]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":H()}],"bg-blend":[{"bg-blend":H()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Qt,xe]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[f]}],saturate:[{saturate:[$]}],sepia:[{sepia:[w]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[$]}],"backdrop-sepia":[{"backdrop-sepia":[w]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",xe]}],duration:[{duration:J()}],ease:[{ease:["linear","in","out","in-out",xe]}],delay:[{delay:J()}],animate:[{animate:["none","spin","ping","pulse","bounce",xe]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[Sr,xe]}],"translate-x":[{"translate-x":[P]}],"translate-y":[{"translate-y":[P]}],"skew-x":[{"skew-x":[T]}],"skew-y":[{"skew-y":[T]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",xe]}],accent:[{accent:["auto",e]}],appearance:["appearance-none"],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",xe]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":V()}],"scroll-mx":[{"scroll-mx":V()}],"scroll-my":[{"scroll-my":V()}],"scroll-ms":[{"scroll-ms":V()}],"scroll-me":[{"scroll-me":V()}],"scroll-mt":[{"scroll-mt":V()}],"scroll-mr":[{"scroll-mr":V()}],"scroll-mb":[{"scroll-mb":V()}],"scroll-ml":[{"scroll-ml":V()}],"scroll-p":[{"scroll-p":V()}],"scroll-px":[{"scroll-px":V()}],"scroll-py":[{"scroll-py":V()}],"scroll-ps":[{"scroll-ps":V()}],"scroll-pe":[{"scroll-pe":V()}],"scroll-pt":[{"scroll-pt":V()}],"scroll-pr":[{"scroll-pr":V()}],"scroll-pb":[{"scroll-pb":V()}],"scroll-pl":[{"scroll-pl":V()}],"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","pinch-zoom","manipulation",{pan:["x","left","right","y","up","down"]}]}],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",xe]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ht,wo]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],"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"],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-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}var M0=p0(P0);function _e(...e){return M0(jc(e))}const Yc=u.forwardRef(({className:e,...t},n)=>L.jsx("span",{className:"rabbit-ds",children:L.jsx(Lc,{ref:n,className:_e("h-4 w-4 shrink-0 rounded-sm border-2 border-[#104F95] ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-[#104F95] data-[state=checked]:text-white",e,"rabbit-ds"),...t,children:L.jsx(Kg,{className:_e("flex items-center justify-center text-current rabbit-ds"),children:L.jsx(pa,{className:"h-3 w-3"})})})}));Yc.displayName=Lc.displayName;const Kc=Yc,Xc=u.forwardRef((e,t)=>{const{pressed:n,defaultPressed:r=!1,onPressedChange:o,...i}=e,[a=!1,s]=St({prop:n,onChange:o,defaultProp:r});return u.createElement(we.button,ee({type:"button","aria-pressed":a,"data-state":a?"on":"off","data-disabled":e.disabled?"":void 0},i,{ref:t,onClick:fe(e.onClick,()=>{e.disabled||s(!a)})}))}),k0=Xc;function O0({icon:e,count:t,label:n,selected:r=!1,onSelectedChange:o}){return L.jsx("div",{className:"rabbit-ds h-7 flex-col w-auto p-0 rounded-full border-0 justify-center items-center inline-flex hover:cursor-pointer focus:outline-1 focus:outline-offset-2",children:L.jsx(k0,{defaultPressed:r,asChild:!0,onPressedChange:o,className:_e("px-4 py-1 rounded-full border flex-row justify-start items-center gap-2.5 flex","data-[state=off]:border-gray-100 data-[state=off]:bg-gray-100 data-[state=off]:text-dove-gray-500","data-[state=on]:border-sky-800 data-[state=on]:bg-sky-100 data-[state=on]:text-sky-800"),children:L.jsxs("div",{children:[e?L.jsx("div",{className:"w-4 h-4 justify-center items-center flex",children:e}):null,L.jsxs("div",{className:"text-sm leading-tight font-semibold",children:[n?L.jsx("span",{children:n}):null," ",t?L.jsxs("span",{children:["(",t,")"]}):null]})]})})})}const Rc=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,Zc=jc,Qc=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Zc(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map(c=>{const d=n==null?void 0:n[c],f=i==null?void 0:i[c];if(d===null)return null;const p=Rc(d)||Rc(f);return o[c][p]}),s=n&&Object.entries(n).reduce((c,d)=>{let[f,p]=d;return p===void 0||(c[f]=p),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,d)=>{let{class:f,className:p,...m}=d;return Object.entries(m).every(h=>{let[v,x]=h;return Array.isArray(x)?x.includes({...i,...s}[v]):{...i,...s}[v]===x})?[...c,f,p]:c},[]);return Zc(e,a,l,n==null?void 0:n.class,n==null?void 0:n.className)},_0=Qc("rabbit-ds font-sans px-4 py-2 rounded text-sm font-semibold justify-center items-center gap-1 inline-flex transition-colors focus:outline-1 focus:outline-offset-2 disabled:pointer-events-none",{variants:{variant:{filled:"",outline:"",text:""},status:{default:"",error:""},size:{normal:"h-10",small:"h-7"}},compoundVariants:[{variant:"filled",status:"default",className:"bg-[#1565BC] text-white hover:bg-[#125AA9] focus:bg-[#104F95] disabled:bg-[#99D2F9]"},{variant:"filled",status:"error",className:"bg-[#C62C02] text-white hover:bg-[#AA2602] focus:bg-[#A12402] disabled:bg-[#F6B9B9]"},{variant:"outline",status:"default",className:"bg-white text-[#1565BC] border border-[#1565BC] hover:text-[#125AA9] hover:border-[#125AA9] focus:border-[#104F95] focus:text-[#104F95] disabled:border-[#104F95] disabled:text-[#104F95]"},{variant:"outline",status:"error",className:"bg-white text-[#C62C02] border border-[#C62C02] hover:text-[#AA2602] hover:border-[#AA2602] focus:border-[#A12402] focus:text-[#A12402] disabled:border-[#F6B9B9] disabled:text-[#F6B9B9]"},{variant:"text",status:"default",className:"bg-white text-[#1565BC] border-0 hover:text-[#125AA9] focus:text-[#104F95] disabled:text-[#104F95]"},{variant:"text",status:"error",className:"bg-white text-[#C62C02] border-0 hover:text-[#AA2602] focus:text-[#A12402] disabled:text-[#F6B9B9]"}],defaultVariants:{variant:"filled",status:"default",size:"normal"}}),Jc=Qc("",{variants:{size:{normal:"h-4 w-4",small:"h-3 w-3"}},defaultVariants:{size:"normal"}}),ga=u.forwardRef(({className:e,variant:t,iconLeft:n,iconRight:r,status:o,size:i,asChild:a=!1,children:s,...l},c)=>{const d=a?yn:"button";return L.jsx("div",{className:"rabbit-ds",children:L.jsxs(d,{className:_e(_0({variant:t,className:e,size:i,status:o})),ref:c,...l,children:[n?L.jsx("div",{className:_e(Jc({size:i})),children:n}):null,s,r?L.jsx("div",{className:_e(Jc({size:i})),children:r}):null]})})});ga.displayName="Button",ga.defaultProps={asChild:!1,iconLeft:void 0,iconRight:void 0};const N0=ga,ya=u.forwardRef(({className:e,type:t,...n},r)=>L.jsxs("div",{className:"rabbit-ds relative font-sans",children:[t==="search"?L.jsx("div",{className:"absolute text-neutral-400 inset-y-0 left-0 mx-2 pointer-events-none w-5 h-5 my-auto p-0.5 justify-center items-center flex",children:L.jsx(e0,{})}):null,L.jsx("input",{type:t,className:_e("text-sm min-w-[224px] w-full h-10 px-3 py-2.5 bg-white rounded border border-neutral-400 gap-2.5 focus:outline-none hover:outline-none focus:border-sky-700 hover:border-sky-700 disabled:pointer-events-none disabled:bg-neutral-50 disabled:border-neutral-100 disable:text-neutral-400",e,t==="search"?"pl-8":""),ref:r,...n})]}));ya.displayName="Input",ya.defaultProps={className:""};const A0=ya;function ba(e){const t=e+"CollectionProvider",[n,r]=Ct(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=m=>{const{scope:h,children:v}=m,x=u.useRef(null),y=u.useRef(new Map).current;return u.createElement(o,{scope:h,itemMap:y,collectionRef:x},v)},s=e+"CollectionSlot",l=u.forwardRef((m,h)=>{const{scope:v,children:x}=m,y=i(s,v),b=Oe(h,y.collectionRef);return u.createElement(yn,{ref:b},x)}),c=e+"CollectionItemSlot",d="data-radix-collection-item",f=u.forwardRef((m,h)=>{const{scope:v,children:x,...y}=m,b=u.useRef(null),$=Oe(h,b),S=i(c,v);return u.useEffect(()=>(S.itemMap.set(b,{ref:b,...y}),()=>void S.itemMap.delete(b))),u.createElement(yn,{[d]:"",ref:$},x)});function p(m){const h=i(e+"CollectionConsumer",m);return u.useCallback(()=>{const x=h.collectionRef.current;if(!x)return[];const y=Array.from(x.querySelectorAll(`[${d}]`));return Array.from(h.itemMap.values()).sort((S,w)=>y.indexOf(S.ref.current)-y.indexOf(w.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:a,Slot:l,ItemSlot:f},p,r]}const D0=u.createContext(void 0);function $o(e){const t=u.useContext(D0);return e||t||"ltr"}function eu(e,t=globalThis==null?void 0:globalThis.document){const n=He(e);u.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const xa="dismissableLayer.update",I0="dismissableLayer.pointerDownOutside",L0="dismissableLayer.focusOutside";let tu;const F0=u.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),nu=u.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...c}=e,d=u.useContext(F0),[f,p]=u.useState(null),m=(n=f==null?void 0:f.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,h]=u.useState({}),v=Oe(t,P=>p(P)),x=Array.from(d.layers),[y]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),b=x.indexOf(y),$=f?x.indexOf(f):-1,S=d.layersWithOutsidePointerEventsDisabled.size>0,w=$>=b,T=j0(P=>{const _=P.target,j=[...d.branches].some(F=>F.contains(_));!w||j||(i==null||i(P),s==null||s(P),P.defaultPrevented||l==null||l())},m),O=z0(P=>{const _=P.target;[...d.branches].some(F=>F.contains(_))||(a==null||a(P),s==null||s(P),P.defaultPrevented||l==null||l())},m);return eu(P=>{$===d.layers.size-1&&(o==null||o(P),!P.defaultPrevented&&l&&(P.preventDefault(),l()))},m),u.useEffect(()=>{if(f)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(tu=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),ru(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=tu)}},[f,m,r,d]),u.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),ru())},[f,d]),u.useEffect(()=>{const P=()=>h({});return document.addEventListener(xa,P),()=>document.removeEventListener(xa,P)},[]),u.createElement(we.div,ee({},c,{ref:v,style:{pointerEvents:S?w?"auto":"none":void 0,...e.style},onFocusCapture:fe(e.onFocusCapture,O.onFocusCapture),onBlurCapture:fe(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:fe(e.onPointerDownCapture,T.onPointerDownCapture)}))});function j0(e,t=globalThis==null?void 0:globalThis.document){const n=He(e),r=u.useRef(!1),o=u.useRef(()=>{});return u.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let c=function(){ou(I0,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function z0(e,t=globalThis==null?void 0:globalThis.document){const n=He(e),r=u.useRef(!1);return u.useEffect(()=>{const o=i=>{i.target&&!r.current&&ou(L0,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function ru(){const e=new CustomEvent(xa);document.dispatchEvent(e)}function ou(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?fa(o,i):o.dispatchEvent(i)}let wa=0;function iu(){u.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:au()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:au()),wa++,()=>{wa===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),wa--}},[])}function au(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const $a="focusScope.autoFocusOnMount",Ca="focusScope.autoFocusOnUnmount",su={bubbles:!1,cancelable:!0},lu=u.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,l]=u.useState(null),c=He(o),d=He(i),f=u.useRef(null),p=Oe(t,v=>l(v)),m=u.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;u.useEffect(()=>{if(r){let v=function($){if(m.paused||!s)return;const S=$.target;s.contains(S)?f.current=S:Jt(f.current,{select:!0})},x=function($){if(m.paused||!s)return;const S=$.relatedTarget;S!==null&&(s.contains(S)||Jt(f.current,{select:!0}))},y=function($){if(document.activeElement===document.body)for(const w of $)w.removedNodes.length>0&&Jt(s)};document.addEventListener("focusin",v),document.addEventListener("focusout",x);const b=new MutationObserver(y);return s&&b.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",x),b.disconnect()}}},[r,s,m.paused]),u.useEffect(()=>{if(s){du.add(m);const v=document.activeElement;if(!s.contains(v)){const y=new CustomEvent($a,su);s.addEventListener($a,c),s.dispatchEvent(y),y.defaultPrevented||(W0(V0(cu(s)),{select:!0}),document.activeElement===v&&Jt(s))}return()=>{s.removeEventListener($a,c),setTimeout(()=>{const y=new CustomEvent(Ca,su);s.addEventListener(Ca,d),s.dispatchEvent(y),y.defaultPrevented||Jt(v??document.body,{select:!0}),s.removeEventListener(Ca,d),du.remove(m)},0)}}},[s,c,d,m]);const h=u.useCallback(v=>{if(!n&&!r||m.paused)return;const x=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,y=document.activeElement;if(x&&y){const b=v.currentTarget,[$,S]=B0(b);$&&S?!v.shiftKey&&y===S?(v.preventDefault(),n&&Jt($,{select:!0})):v.shiftKey&&y===$&&(v.preventDefault(),n&&Jt(S,{select:!0})):y===b&&v.preventDefault()}},[n,r,m.paused]);return u.createElement(we.div,ee({tabIndex:-1},a,{ref:p,onKeyDown:h}))});function W0(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Jt(r,{select:t}),document.activeElement!==n)return}function B0(e){const t=cu(e),n=uu(t,e),r=uu(t.reverse(),e);return[n,r]}function cu(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function uu(e,t){for(const n of e)if(!U0(n,{upTo:t}))return n}function U0(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 H0(e){return e instanceof HTMLInputElement&&"select"in e}function Jt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&H0(e)&&t&&e.select()}}const du=G0();function G0(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=fu(e,t),e.unshift(t)},remove(t){var n;e=fu(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function fu(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function V0(e){return e.filter(t=>t.tagName!=="A")}const q0=me["useId".toString()]||(()=>{});let Y0=0;function Dt(e){const[t,n]=me.useState(q0());return ot(()=>{e||n(r=>r??String(Y0++))},[e]),e||(t?`radix-${t}`:"")}const K0=["top","right","bottom","left"],en=Math.min,it=Math.max,Co=Math.round,So=Math.floor,tn=e=>({x:e,y:e}),X0={left:"right",right:"left",bottom:"top",top:"bottom"},R0={start:"end",end:"start"};function Sa(e,t,n){return it(e,en(t,n))}function It(e,t){return typeof e=="function"?e(t):e}function Lt(e){return e.split("-")[0]}function Hn(e){return e.split("-")[1]}function Ea(e){return e==="x"?"y":"x"}function Ta(e){return e==="y"?"height":"width"}function Gn(e){return["top","bottom"].includes(Lt(e))?"y":"x"}function Pa(e){return Ea(Gn(e))}function Z0(e,t,n){n===void 0&&(n=!1);const r=Hn(e),o=Pa(e),i=Ta(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Eo(a)),[a,Eo(a)]}function Q0(e){const t=Eo(e);return[Ma(e),t,Ma(t)]}function Ma(e){return e.replace(/start|end/g,t=>R0[t])}function J0(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}function ey(e,t,n,r){const o=Hn(e);let i=J0(Lt(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(Ma)))),i}function Eo(e){return e.replace(/left|right|bottom|top/g,t=>X0[t])}function ty(e){return{top:0,right:0,bottom:0,left:0,...e}}function pu(e){return typeof e!="number"?ty(e):{top:e,right:e,bottom:e,left:e}}function To(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function hu(e,t,n){let{reference:r,floating:o}=e;const i=Gn(t),a=Pa(t),s=Ta(a),l=Lt(t),c=i==="y",d=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,p=r[s]/2-o[s]/2;let m;switch(l){case"top":m={x:d,y:r.y-o.height};break;case"bottom":m={x:d,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:f};break;case"left":m={x:r.x-o.width,y:f};break;default:m={x:r.x,y:r.y}}switch(Hn(t)){case"start":m[a]-=p*(n&&c?-1:1);break;case"end":m[a]+=p*(n&&c?-1:1);break}return m}const ny=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:f}=hu(c,r,l),p=r,m={},h=0;for(let v=0;v<s.length;v++){const{name:x,fn:y}=s[v],{x:b,y:$,data:S,reset:w}=await y({x:d,y:f,initialPlacement:r,placement:p,strategy:o,middlewareData:m,rects:c,platform:a,elements:{reference:e,floating:t}});if(d=b??d,f=$??f,m={...m,[x]:{...m[x],...S}},w&&h<=50){h++,typeof w=="object"&&(w.placement&&(p=w.placement),w.rects&&(c=w.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):w.rects),{x:d,y:f}=hu(c,p,l)),v=-1;continue}}return{x:d,y:f,placement:p,strategy:o,middlewareData:m}};async function Tr(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:p=!1,padding:m=0}=It(t,e),h=pu(m),x=s[p?f==="floating"?"reference":"floating":f],y=To(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(x)))==null||n?x:x.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:d,strategy:l})),b=f==="floating"?{...a.floating,x:r,y:o}:a.reference,$=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),S=await(i.isElement==null?void 0:i.isElement($))?await(i.getScale==null?void 0:i.getScale($))||{x:1,y:1}:{x:1,y:1},w=To(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:b,offsetParent:$,strategy:l}):b);return{top:(y.top-w.top+h.top)/S.y,bottom:(w.bottom-y.bottom+h.bottom)/S.y,left:(y.left-w.left+h.left)/S.x,right:(w.right-y.right+h.right)/S.x}}const mu=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s}=t,{element:l,padding:c=0}=It(e,t)||{};if(l==null)return{};const d=pu(c),f={x:n,y:r},p=Pa(o),m=Ta(p),h=await a.getDimensions(l),v=p==="y",x=v?"top":"left",y=v?"bottom":"right",b=v?"clientHeight":"clientWidth",$=i.reference[m]+i.reference[p]-f[p]-i.floating[m],S=f[p]-i.reference[p],w=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l));let T=w?w[b]:0;(!T||!await(a.isElement==null?void 0:a.isElement(w)))&&(T=s.floating[b]||i.floating[m]);const O=$/2-S/2,P=T/2-h[m]/2-1,_=en(d[x],P),j=en(d[y],P),F=_,V=T-h[m]-j,R=T/2-h[m]/2+O,X=Sa(F,R,V),I=Hn(o)!=null&&R!=X&&i.reference[m]/2-(R<F?_:j)-h[m]/2<0?R<F?F-R:V-R:0;return{[p]:f[p]-I,data:{[p]:X,centerOffset:R-X+I}}}}),vu=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:o,rects:i,initialPlacement:a,platform:s,elements:l}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=!0,...v}=It(e,t),x=Lt(r),y=Lt(a)===a,b=await(s.isRTL==null?void 0:s.isRTL(l.floating)),$=f||(y||!h?[Eo(a)]:Q0(a));!f&&m!=="none"&&$.push(...ey(a,h,m,b));const S=[a,...$],w=await Tr(t,v),T=[];let O=((n=o.flip)==null?void 0:n.overflows)||[];if(c&&T.push(w[x]),d){const F=Z0(r,i,b);T.push(w[F[0]],w[F[1]])}if(O=[...O,{placement:r,overflows:T}],!T.every(F=>F<=0)){var P,_;const F=(((P=o.flip)==null?void 0:P.index)||0)+1,V=S[F];if(V)return{data:{index:F,overflows:O},reset:{placement:V}};let R=(_=O.filter(X=>X.overflows[0]<=0).sort((X,C)=>X.overflows[1]-C.overflows[1])[0])==null?void 0:_.placement;if(!R)switch(p){case"bestFit":{var j;const X=(j=O.map(C=>[C.placement,C.overflows.filter(I=>I>0).reduce((I,H)=>I+H,0)]).sort((C,I)=>C[1]-I[1])[0])==null?void 0:j[0];X&&(R=X);break}case"initialPlacement":R=a;break}if(r!==R)return{reset:{placement:R}}}return{}}}};function gu(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function yu(e){return K0.some(t=>e[t]>=0)}const bu=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=It(e,t);switch(r){case"referenceHidden":{const i=await Tr(t,{...o,elementContext:"reference"}),a=gu(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:yu(a)}}}case"escaped":{const i=await Tr(t,{...o,altBoundary:!0}),a=gu(i,n.floating);return{data:{escapedOffsets:a,escaped:yu(a)}}}default:return{}}}}};async function ry(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=Lt(n),s=Hn(n),l=Gn(n)==="y",c=["left","top"].includes(a)?-1:1,d=i&&l?-1:1,f=It(t,e);let{mainAxis:p,crossAxis:m,alignmentAxis:h}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return s&&typeof h=="number"&&(m=s==="end"?h*-1:h),l?{x:m*d,y:p*c}:{x:p*c,y:m*d}}const xu=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,o=await ry(t,e);return{x:n+o.x,y:r+o.y,data:o}}}},wu=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:x=>{let{x:y,y:b}=x;return{x:y,y:b}}},...l}=It(e,t),c={x:n,y:r},d=await Tr(t,l),f=Gn(Lt(o)),p=Ea(f);let m=c[p],h=c[f];if(i){const x=p==="y"?"top":"left",y=p==="y"?"bottom":"right",b=m+d[x],$=m-d[y];m=Sa(b,m,$)}if(a){const x=f==="y"?"top":"left",y=f==="y"?"bottom":"right",b=h+d[x],$=h-d[y];h=Sa(b,h,$)}const v=s.fn({...t,[p]:m,[f]:h});return{...v,data:{x:v.x-n,y:v.y-r}}}}},$u=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=It(e,t),d={x:n,y:r},f=Gn(o),p=Ea(f);let m=d[p],h=d[f];const v=It(s,t),x=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(l){const $=p==="y"?"height":"width",S=i.reference[p]-i.floating[$]+x.mainAxis,w=i.reference[p]+i.reference[$]-x.mainAxis;m<S?m=S:m>w&&(m=w)}if(c){var y,b;const $=p==="y"?"width":"height",S=["top","left"].includes(Lt(o)),w=i.reference[f]-i.floating[$]+(S&&((y=a.offset)==null?void 0:y[f])||0)+(S?0:x.crossAxis),T=i.reference[f]+i.reference[$]+(S?0:((b=a.offset)==null?void 0:b[f])||0)-(S?x.crossAxis:0);h<w?h=w:h>T&&(h=T)}return{[p]:m,[f]:h}}}},Cu=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:a=()=>{},...s}=It(e,t),l=await Tr(t,s),c=Lt(n),d=Hn(n),f=Gn(n)==="y",{width:p,height:m}=r.floating;let h,v;c==="top"||c==="bottom"?(h=c,v=d===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(v=c,h=d==="end"?"top":"bottom");const x=m-l[h],y=p-l[v],b=!t.middlewareData.shift;let $=x,S=y;if(f){const T=p-l.left-l.right;S=d||b?en(y,T):T}else{const T=m-l.top-l.bottom;$=d||b?en(x,T):T}if(b&&!d){const T=it(l.left,0),O=it(l.right,0),P=it(l.top,0),_=it(l.bottom,0);f?S=p-2*(T!==0||O!==0?T+O:it(l.left,l.right)):$=m-2*(P!==0||_!==0?P+_:it(l.top,l.bottom))}await a({...t,availableWidth:S,availableHeight:$});const w=await o.getDimensions(i.floating);return p!==w.width||m!==w.height?{reset:{rects:!0}}:{}}}};function nn(e){return Su(e)?(e.nodeName||"").toLowerCase():"#document"}function at(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ft(e){var t;return(t=(Su(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Su(e){return e instanceof Node||e instanceof at(e).Node}function jt(e){return e instanceof Element||e instanceof at(e).Element}function Et(e){return e instanceof HTMLElement||e instanceof at(e).HTMLElement}function Eu(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof at(e).ShadowRoot}function Pr(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=ct(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function oy(e){return["table","td","th"].includes(nn(e))}function ka(e){const t=Oa(),n=ct(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function iy(e){let t=Vn(e);for(;Et(t)&&!Po(t);){if(ka(t))return t;t=Vn(t)}return null}function Oa(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Po(e){return["html","body","#document"].includes(nn(e))}function ct(e){return at(e).getComputedStyle(e)}function Mo(e){return jt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Vn(e){if(nn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Eu(e)&&e.host||Ft(e);return Eu(t)?t.host:t}function Tu(e){const t=Vn(e);return Po(t)?e.ownerDocument?e.ownerDocument.body:e.body:Et(t)&&Pr(t)?t:Tu(t)}function ko(e,t){var n;t===void 0&&(t=[]);const r=Tu(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),i=at(r);return o?t.concat(i,i.visualViewport||[],Pr(r)?r:[]):t.concat(r,ko(r))}function Pu(e){const t=ct(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Et(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=Co(n)!==i||Co(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function _a(e){return jt(e)?e:e.contextElement}function qn(e){const t=_a(e);if(!Et(t))return tn(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Pu(t);let a=(i?Co(n.width):n.width)/r,s=(i?Co(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const ay=tn(0);function Mu(e){const t=at(e);return!Oa()||!t.visualViewport?ay:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function sy(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==at(e)?!1:t}function $n(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=_a(e);let a=tn(1);t&&(r?jt(r)&&(a=qn(r)):a=qn(e));const s=sy(i,n,r)?Mu(i):tn(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,d=o.width/a.x,f=o.height/a.y;if(i){const p=at(i),m=r&&jt(r)?at(r):r;let h=p.frameElement;for(;h&&r&&m!==p;){const v=qn(h),x=h.getBoundingClientRect(),y=ct(h),b=x.left+(h.clientLeft+parseFloat(y.paddingLeft))*v.x,$=x.top+(h.clientTop+parseFloat(y.paddingTop))*v.y;l*=v.x,c*=v.y,d*=v.x,f*=v.y,l+=b,c+=$,h=at(h).frameElement}}return To({width:d,height:f,x:l,y:c})}function ly(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=Et(n),i=Ft(n);if(n===i)return t;let a={scrollLeft:0,scrollTop:0},s=tn(1);const l=tn(0);if((o||!o&&r!=="fixed")&&((nn(n)!=="body"||Pr(i))&&(a=Mo(n)),Et(n))){const c=$n(n);s=qn(n),l.x=c.x+n.clientLeft,l.y=c.y+n.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-a.scrollLeft*s.x+l.x,y:t.y*s.y-a.scrollTop*s.y+l.y}}function cy(e){return Array.from(e.getClientRects())}function ku(e){return $n(Ft(e)).left+Mo(e).scrollLeft}function uy(e){const t=Ft(e),n=Mo(e),r=e.ownerDocument.body,o=it(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=it(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+ku(e);const s=-n.scrollTop;return ct(r).direction==="rtl"&&(a+=it(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}function dy(e,t){const n=at(e),r=Ft(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const c=Oa();(!c||c&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}function fy(e,t){const n=$n(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Et(e)?qn(e):tn(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,l=o*i.x,c=r*i.y;return{width:a,height:s,x:l,y:c}}function Ou(e,t,n){let r;if(t==="viewport")r=dy(e,n);else if(t==="document")r=uy(Ft(e));else if(jt(t))r=fy(t,n);else{const o=Mu(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return To(r)}function _u(e,t){const n=Vn(e);return n===t||!jt(n)||Po(n)?!1:ct(n).position==="fixed"||_u(n,t)}function py(e,t){const n=t.get(e);if(n)return n;let r=ko(e).filter(s=>jt(s)&&nn(s)!=="body"),o=null;const i=ct(e).position==="fixed";let a=i?Vn(e):e;for(;jt(a)&&!Po(a);){const s=ct(a),l=ka(a);!l&&s.position==="fixed"&&(o=null),(i?!l&&!o:!l&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Pr(a)&&!l&&_u(e,a))?r=r.filter(d=>d!==a):o=s,a=Vn(a)}return t.set(e,r),r}function hy(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?py(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((c,d)=>{const f=Ou(t,d,o);return c.top=it(f.top,c.top),c.right=en(f.right,c.right),c.bottom=en(f.bottom,c.bottom),c.left=it(f.left,c.left),c},Ou(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function my(e){return Pu(e)}function vy(e,t,n){const r=Et(t),o=Ft(t),i=n==="fixed",a=$n(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=tn(0);if(r||!r&&!i)if((nn(t)!=="body"||Pr(o))&&(s=Mo(t)),r){const c=$n(t,!0,i,t);l.x=c.x+t.clientLeft,l.y=c.y+t.clientTop}else o&&(l.x=ku(o));return{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function Nu(e,t){return!Et(e)||ct(e).position==="fixed"?null:t?t(e):e.offsetParent}function Au(e,t){const n=at(e);if(!Et(e))return n;let r=Nu(e,t);for(;r&&oy(r)&&ct(r).position==="static";)r=Nu(r,t);return r&&(nn(r)==="html"||nn(r)==="body"&&ct(r).position==="static"&&!ka(r))?n:r||iy(e)||n}const gy=async function(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||Au,i=this.getDimensions;return{reference:vy(t,await o(n),r),floating:{x:0,y:0,...await i(n)}}};function yy(e){return ct(e).direction==="rtl"}const by={convertOffsetParentRelativeRectToViewportRelativeRect:ly,getDocumentElement:Ft,getClippingRect:hy,getOffsetParent:Au,getElementRects:gy,getClientRects:cy,getDimensions:my,getScale:qn,isElement:jt,isRTL:yy};function xy(e,t){let n=null,r;const o=Ft(e);function i(){clearTimeout(r),n&&n.disconnect(),n=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),i();const{left:c,top:d,width:f,height:p}=e.getBoundingClientRect();if(s||t(),!f||!p)return;const m=So(d),h=So(o.clientWidth-(c+f)),v=So(o.clientHeight-(d+p)),x=So(c),b={rootMargin:-m+"px "+-h+"px "+-v+"px "+-x+"px",threshold:it(0,en(1,l))||1};let $=!0;function S(w){const T=w[0].intersectionRatio;if(T!==l){if(!$)return a();T?a(!1,T):r=setTimeout(()=>{a(!1,1e-7)},100)}$=!1}try{n=new IntersectionObserver(S,{...b,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,b)}n.observe(e)}return a(!0),i}function Du(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=_a(e),d=o||i?[...c?ko(c):[],...ko(t)]:[];d.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const f=c&&s?xy(c,n):null;let p=-1,m=null;a&&(m=new ResizeObserver(y=>{let[b]=y;b&&b.target===c&&m&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{m&&m.observe(t)})),n()}),c&&!l&&m.observe(c),m.observe(t));let h,v=l?$n(e):null;l&&x();function x(){const y=$n(e);v&&(y.x!==v.x||y.y!==v.y||y.width!==v.width||y.height!==v.height)&&n(),v=y,h=requestAnimationFrame(x)}return n(),()=>{d.forEach(y=>{o&&y.removeEventListener("scroll",n),i&&y.removeEventListener("resize",n)}),f&&f(),m&&m.disconnect(),m=null,l&&cancelAnimationFrame(h)}}const wy=(e,t,n)=>{const r=new Map,o={platform:by,...n},i={...o.platform,_c:r};return ny(e,t,{...o,platform:i})},Iu=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?mu({element:r.current,padding:o}).fn(n):{}:r?mu({element:r,padding:o}).fn(n):{}}}};var Oo=typeof document<"u"?u.useLayoutEffect:u.useEffect;function _o(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,o;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(!_o(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!_o(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Lu(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Fu(e,t){const n=Lu(e);return Math.round(t*n)/n}function ju(e){const t=me.useRef(e);return Oo(()=>{t.current=e}),t}function zu(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[d,f]=me.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=me.useState(r);_o(p,r)||m(r);const[h,v]=me.useState(null),[x,y]=me.useState(null),b=me.useCallback(I=>{I!=T.current&&(T.current=I,v(I))},[v]),$=me.useCallback(I=>{I!==O.current&&(O.current=I,y(I))},[y]),S=i||h,w=a||x,T=me.useRef(null),O=me.useRef(null),P=me.useRef(d),_=ju(l),j=ju(o),F=me.useCallback(()=>{if(!T.current||!O.current)return;const I={placement:t,strategy:n,middleware:p};j.current&&(I.platform=j.current),wy(T.current,O.current,I).then(H=>{const B={...H,isPositioned:!0};V.current&&!_o(P.current,B)&&(P.current=B,Ag.flushSync(()=>{f(B)}))})},[p,t,n,j]);Oo(()=>{c===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,f(I=>({...I,isPositioned:!1})))},[c]);const V=me.useRef(!1);Oo(()=>(V.current=!0,()=>{V.current=!1}),[]),Oo(()=>{if(S&&(T.current=S),w&&(O.current=w),S&&w){if(_.current)return _.current(S,w,F);F()}},[S,w,F,_]);const R=me.useMemo(()=>({reference:T,floating:O,setReference:b,setFloating:$}),[b,$]),X=me.useMemo(()=>({reference:S,floating:w}),[S,w]),C=me.useMemo(()=>{const I={position:n,left:0,top:0};if(!X.floating)return I;const H=Fu(X.floating,d.x),B=Fu(X.floating,d.y);return s?{...I,transform:"translate("+H+"px, "+B+"px)",...Lu(X.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:H,top:B}},[n,s,X.floating,d.x,d.y]);return me.useMemo(()=>({...d,update:F,refs:R,elements:X,floatingStyles:C}),[d,F,R,X,C])}const Wu="Popper",[Bu,No]=Ct(Wu),[$y,Uu]=Bu(Wu),Cy=e=>{const{__scopePopper:t,children:n}=e,[r,o]=u.useState(null);return u.createElement($y,{scope:t,anchor:r,onAnchorChange:o},n)},Sy="PopperAnchor",Ey=u.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=Uu(Sy,n),a=u.useRef(null),s=Oe(t,a);return u.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:u.createElement(we.div,ee({},o,{ref:s}))}),Hu="PopperContent",[Ty,K3]=Bu(Hu),Py=u.forwardRef((e,t)=>{var n,r,o,i,a,s,l,c;const{__scopePopper:d,side:f="bottom",sideOffset:p=0,align:m="center",alignOffset:h=0,arrowPadding:v=0,avoidCollisions:x=!0,collisionBoundary:y=[],collisionPadding:b=0,sticky:$="partial",hideWhenDetached:S=!1,updatePositionStrategy:w="optimized",onPlaced:T,...O}=e,P=Uu(Hu,d),[_,j]=u.useState(null),F=Oe(t,Ce=>j(Ce)),[V,R]=u.useState(null),X=ua(V),C=(n=X==null?void 0:X.width)!==null&&n!==void 0?n:0,I=(r=X==null?void 0:X.height)!==null&&r!==void 0?r:0,H=f+(m!=="center"?"-"+m:""),B=typeof b=="number"?b:{top:0,right:0,bottom:0,left:0,...b},A=Array.isArray(y)?y:[y],N=A.length>0,z={padding:B,boundary:A.filter(My),altBoundary:N},{refs:J,floatingStyles:Q,placement:oe,isPositioned:te,middlewareData:ae}=zu({strategy:"fixed",placement:H,whileElementsMounted:(...Ce)=>Du(...Ce,{animationFrame:w==="always"}),elements:{reference:P.anchor},middleware:[xu({mainAxis:p+I,alignmentAxis:h}),x&&wu({mainAxis:!0,crossAxis:!1,limiter:$==="partial"?$u():void 0,...z}),x&&vu({...z}),Cu({...z,apply:({elements:Ce,rects:ke,availableWidth:je,availableHeight:_t})=>{const{width:mn,height:Ze}=ke.reference,qt=Ce.floating.style;qt.setProperty("--radix-popper-available-width",`${je}px`),qt.setProperty("--radix-popper-available-height",`${_t}px`),qt.setProperty("--radix-popper-anchor-width",`${mn}px`),qt.setProperty("--radix-popper-anchor-height",`${Ze}px`)}}),V&&Iu({element:V,padding:v}),ky({arrowWidth:C,arrowHeight:I}),S&&bu({strategy:"referenceHidden",...z})]}),[Y,le]=Gu(oe),U=He(T);ot(()=>{te&&(U==null||U())},[te,U]);const q=(o=ae.arrow)===null||o===void 0?void 0:o.x,re=(i=ae.arrow)===null||i===void 0?void 0:i.y,k=((a=ae.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[de,pe]=u.useState();return ot(()=>{_&&pe(window.getComputedStyle(_).zIndex)},[_]),u.createElement("div",{ref:J.setFloating,"data-radix-popper-content-wrapper":"",style:{...Q,transform:te?Q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:de,"--radix-popper-transform-origin":[(s=ae.transformOrigin)===null||s===void 0?void 0:s.x,(l=ae.transformOrigin)===null||l===void 0?void 0:l.y].join(" ")},dir:e.dir},u.createElement(Ty,{scope:d,placedSide:Y,onArrowChange:R,arrowX:q,arrowY:re,shouldHideArrow:k},u.createElement(we.div,ee({"data-side":Y,"data-align":le},O,{ref:F,style:{...O.style,animation:te?void 0:"none",opacity:(c=ae.hide)!==null&&c!==void 0&&c.referenceHidden?0:void 0}}))))});function My(e){return e!==null}const ky=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,i,a;const{placement:s,rects:l,middlewareData:c}=t,f=((n=c.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,p=f?0:e.arrowWidth,m=f?0:e.arrowHeight,[h,v]=Gu(s),x={start:"0%",center:"50%",end:"100%"}[v],y=((r=(o=c.arrow)===null||o===void 0?void 0:o.x)!==null&&r!==void 0?r:0)+p/2,b=((i=(a=c.arrow)===null||a===void 0?void 0:a.y)!==null&&i!==void 0?i:0)+m/2;let $="",S="";return h==="bottom"?($=f?x:`${y}px`,S=`${-m}px`):h==="top"?($=f?x:`${y}px`,S=`${l.floating.height+m}px`):h==="right"?($=`${-m}px`,S=f?x:`${b}px`):h==="left"&&($=`${l.floating.width+m}px`,S=f?x:`${b}px`),{data:{x:$,y:S}}}});function Gu(e){const[t,n="center"]=e.split("-");return[t,n]}const Na=Cy,Vu=Ey,qu=Py,Yu=u.forwardRef((e,t)=>{var n;const{container:r=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...o}=e;return r?At.createPortal(u.createElement(we.div,ee({},o,{ref:t})),r):null}),Aa="rovingFocusGroup.onEntryFocus",Oy={bubbles:!1,cancelable:!0},Da="RovingFocusGroup",[Ia,Ku,_y]=ba(Da),[Ny,Ao]=Ct(Da,[_y]),[Ay,Dy]=Ny(Da),Iy=u.forwardRef((e,t)=>u.createElement(Ia.Provider,{scope:e.__scopeRovingFocusGroup},u.createElement(Ia.Slot,{scope:e.__scopeRovingFocusGroup},u.createElement(Ly,ee({},e,{ref:t}))))),Ly=u.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:c,...d}=e,f=u.useRef(null),p=Oe(t,f),m=$o(i),[h=null,v]=St({prop:a,defaultProp:s,onChange:l}),[x,y]=u.useState(!1),b=He(c),$=Ku(n),S=u.useRef(!1),[w,T]=u.useState(0);return u.useEffect(()=>{const O=f.current;if(O)return O.addEventListener(Aa,b),()=>O.removeEventListener(Aa,b)},[b]),u.createElement(Ay,{scope:n,orientation:r,dir:m,loop:o,currentTabStopId:h,onItemFocus:u.useCallback(O=>v(O),[v]),onItemShiftTab:u.useCallback(()=>y(!0),[]),onFocusableItemAdd:u.useCallback(()=>T(O=>O+1),[]),onFocusableItemRemove:u.useCallback(()=>T(O=>O-1),[])},u.createElement(we.div,ee({tabIndex:x||w===0?-1:0,"data-orientation":r},d,{ref:p,style:{outline:"none",...e.style},onMouseDown:fe(e.onMouseDown,()=>{S.current=!0}),onFocus:fe(e.onFocus,O=>{const P=!S.current;if(O.target===O.currentTarget&&P&&!x){const _=new CustomEvent(Aa,Oy);if(O.currentTarget.dispatchEvent(_),!_.defaultPrevented){const j=$().filter(C=>C.focusable),F=j.find(C=>C.active),V=j.find(C=>C.id===h),X=[F,V,...j].filter(Boolean).map(C=>C.ref.current);Xu(X)}}S.current=!1}),onBlur:fe(e.onBlur,()=>y(!1))})))}),Fy="RovingFocusGroupItem",jy=u.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,...a}=e,s=Dt(),l=i||s,c=Dy(Fy,n),d=c.currentTabStopId===l,f=Ku(n),{onFocusableItemAdd:p,onFocusableItemRemove:m}=c;return u.useEffect(()=>{if(r)return p(),()=>m()},[r,p,m]),u.createElement(Ia.ItemSlot,{scope:n,id:l,focusable:r,active:o},u.createElement(we.span,ee({tabIndex:d?0:-1,"data-orientation":c.orientation},a,{ref:t,onMouseDown:fe(e.onMouseDown,h=>{r?c.onItemFocus(l):h.preventDefault()}),onFocus:fe(e.onFocus,()=>c.onItemFocus(l)),onKeyDown:fe(e.onKeyDown,h=>{if(h.key==="Tab"&&h.shiftKey){c.onItemShiftTab();return}if(h.target!==h.currentTarget)return;const v=By(h,c.orientation,c.dir);if(v!==void 0){h.preventDefault();let y=f().filter(b=>b.focusable).map(b=>b.ref.current);if(v==="last")y.reverse();else if(v==="prev"||v==="next"){v==="prev"&&y.reverse();const b=y.indexOf(h.currentTarget);y=c.loop?Uy(y,b+1):y.slice(b+1)}setTimeout(()=>Xu(y))}})})))}),zy={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Wy(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function By(e,t,n){const r=Wy(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return zy[r]}function Xu(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Uy(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const Ru=Iy,Zu=jy;var Hy=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Yn=new WeakMap,Do=new WeakMap,Io={},La=0,Qu=function(e){return e&&(e.host||Qu(e.parentNode))},Gy=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Qu(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})},Vy=function(e,t,n,r){var o=Gy(t,Array.isArray(e)?e:[e]);Io[n]||(Io[n]=new WeakMap);var i=Io[n],a=[],s=new Set,l=new Set(o),c=function(f){!f||s.has(f)||(s.add(f),c(f.parentNode))};o.forEach(c);var d=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(p){if(s.has(p))d(p);else{var m=p.getAttribute(r),h=m!==null&&m!=="false",v=(Yn.get(p)||0)+1,x=(i.get(p)||0)+1;Yn.set(p,v),i.set(p,x),a.push(p),v===1&&h&&Do.set(p,!0),x===1&&p.setAttribute(n,"true"),h||p.setAttribute(r,"true")}})};return d(t),s.clear(),La++,function(){a.forEach(function(f){var p=Yn.get(f)-1,m=i.get(f)-1;Yn.set(f,p),i.set(f,m),p||(Do.has(f)||f.removeAttribute(r),Do.delete(f)),m||f.removeAttribute(n)}),La--,La||(Yn=new WeakMap,Yn=new WeakMap,Do=new WeakMap,Io={})}},Ju=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||Hy(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),Vy(r,o,n,"aria-hidden")):function(){return null}},Tt=function(){return Tt=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Tt.apply(this,arguments)};function ed(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 o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function qy(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Lo="right-scroll-bar-position",Fo="width-before-scroll-bar",Yy="with-scroll-bars-hidden",Ky="--removed-body-scroll-bar-size";function Xy(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Ry(e,t){var n=u.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}function Zy(e,t){return Ry(t||null,function(n){return e.forEach(function(r){return Xy(r,n)})})}function Qy(e){return e}function Jy(e,t){t===void 0&&(t=Qy);var n=[],r=!1,o={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(i){var a=t(i,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(i){for(r=!0;n.length;){var a=n;n=[],a.forEach(i)}n={push:function(s){return i(s)},filter:function(){return n}}},assignMedium:function(i){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(i),a=n}var l=function(){var d=a;a=[],d.forEach(i)},c=function(){return Promise.resolve().then(l)};c(),n={push:function(d){a.push(d),c()},filter:function(d){return a=a.filter(d),n}}}};return o}function eb(e){e===void 0&&(e={});var t=Jy(null);return t.options=Tt({async:!0,ssr:!1},e),t}var td=function(e){var t=e.sideCar,n=ed(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 me.createElement(r,Tt({},n))};td.isSideCarExport=!0;function tb(e,t){return e.useMedium(t),td}var nd=eb(),Fa=function(){},jo=me.forwardRef(function(e,t){var n=me.useRef(null),r=me.useState({onScrollCapture:Fa,onWheelCapture:Fa,onTouchMoveCapture:Fa}),o=r[0],i=r[1],a=e.forwardProps,s=e.children,l=e.className,c=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,m=e.noIsolation,h=e.inert,v=e.allowPinchZoom,x=e.as,y=x===void 0?"div":x,b=ed(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),$=p,S=Zy([n,t]),w=Tt(Tt({},b),o);return me.createElement(me.Fragment,null,d&&me.createElement($,{sideCar:nd,removeScrollBar:c,shards:f,noIsolation:m,inert:h,setCallbacks:i,allowPinchZoom:!!v,lockRef:n}),a?me.cloneElement(me.Children.only(s),Tt(Tt({},w),{ref:S})):me.createElement(y,Tt({},w,{className:l,ref:S}),s))});jo.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},jo.classNames={fullWidth:Fo,zeroRight:Lo};var rd,nb=function(){if(rd)return rd;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function rb(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=nb();return t&&e.setAttribute("nonce",t),e}function ob(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function ib(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var ab=function(){var e=0,t=null;return{add:function(n){e==0&&(t=rb())&&(ob(t,n),ib(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},sb=function(){var e=ab();return function(t,n){me.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},od=function(){var e=sb(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},lb={left:0,top:0,right:0,gap:0},ja=function(e){return parseInt(e||"",10)||0},cb=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[ja(n),ja(r),ja(o)]},ub=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return lb;var t=cb(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])}},db=od(),fb=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),`
|
|
2
|
-
.`.concat(
|
|
1
|
+
(function(me,A){typeof exports=="object"&&typeof module<"u"?A(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],A):(me=typeof globalThis<"u"?globalThis:me||self,A((me["@mesh"]=me["@mesh"]||{},me["@mesh"]["ai/rabbit"]={}),me["react/jsx-runtime"],me.React,me.ReactDOM))})(this,function(me,A,u,Dt){"use strict";function jc(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const ve=jc(u),Gg=jc(Dt),J3="";function ee(){return ee=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},ee.apply(this,arguments)}function Vg(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function wo(...e){return t=>e.forEach(n=>Vg(n,t))}function Oe(...e){return u.useCallback(wo(...e),e)}function Ct(e,t=[]){let n=[];function r(i,a){const s=u.createContext(a),l=n.length;n=[...n,a];function c(f){const{scope:p,children:m,...h}=f,v=(p==null?void 0:p[e][l])||s,w=u.useMemo(()=>h,Object.values(h));return u.createElement(v.Provider,{value:w},m)}function d(f,p){const m=(p==null?void 0:p[e][l])||s,h=u.useContext(m);if(h)return h;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${i}\``)}return c.displayName=i+"Provider",[c,d]}const o=()=>{const i=n.map(a=>u.createContext(a));return function(s){const l=(s==null?void 0:s[e])||i;return u.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[r,qg(o,...t)]}function qg(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:l,scopeName:c})=>{const f=l(i)[`__scope${c}`];return{...s,...f}},{});return u.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function fe(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function He(e){const t=u.useRef(e);return u.useEffect(()=>{t.current=e}),u.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function St({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=Yg({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,s=He(n),l=u.useCallback(c=>{if(i){const f=typeof c=="function"?c(e):c;f!==e&&s(f)}else o(c)},[i,e,o,s]);return[a,l]}function Yg({defaultProp:e,onChange:t}){const n=u.useState(e),[r]=n,o=u.useRef(r),i=He(t);return u.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}function zc(e){const t=u.useRef({value:e,previous:e});return u.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}const ot=globalThis!=null&&globalThis.document?u.useLayoutEffect:()=>{};function da(e){const[t,n]=u.useState(void 0);return ot(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,s;if("borderBoxSize"in i){const l=i.borderBoxSize,c=Array.isArray(l)?l[0]:l;a=c.inlineSize,s=c.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}function Kg(e,t){return u.useReducer((n,r)=>{const o=t[n][r];return o??n},e)}const Zt=e=>{const{present:t,children:n}=e,r=Xg(t),o=typeof n=="function"?n({present:r.isPresent}):u.Children.only(n),i=Oe(r.ref,o.ref);return typeof n=="function"||r.isPresent?u.cloneElement(o,{ref:i}):null};Zt.displayName="Presence";function Xg(e){const[t,n]=u.useState(),r=u.useRef({}),o=u.useRef(e),i=u.useRef("none"),a=e?"mounted":"unmounted",[s,l]=Kg(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return u.useEffect(()=>{const c=xo(r.current);i.current=s==="mounted"?c:"none"},[s]),ot(()=>{const c=r.current,d=o.current;if(d!==e){const p=i.current,m=xo(c);e?l("MOUNT"):m==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(d&&p!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),ot(()=>{if(t){const c=f=>{const m=xo(r.current).includes(f.animationName);f.target===t&&m&&Dt.flushSync(()=>l("ANIMATION_END"))},d=f=>{f.target===t&&(i.current=xo(r.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:u.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function xo(e){return(e==null?void 0:e.animationName)||"none"}const yn=u.forwardRef((e,t)=>{const{children:n,...r}=e,o=u.Children.toArray(n),i=o.find(Rg);if(i){const a=i.props.children,s=o.map(l=>l===i?u.Children.count(a)>1?u.Children.only(null):u.isValidElement(a)?a.props.children:null:l);return u.createElement(fa,ee({},r,{ref:t}),u.isValidElement(a)?u.cloneElement(a,void 0,s):null)}return u.createElement(fa,ee({},r,{ref:t}),n)});yn.displayName="Slot";const fa=u.forwardRef((e,t)=>{const{children:n,...r}=e;return u.isValidElement(n)?u.cloneElement(n,{...Zg(r,n.props),ref:t?wo(t,n.ref):n.ref}):u.Children.count(n)>1?u.Children.only(null):null});fa.displayName="SlotClone";const Bc=({children:e})=>u.createElement(u.Fragment,null,e);function Rg(e){return u.isValidElement(e)&&e.type===Bc}function Zg(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}const xe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{const n=u.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?yn:t;return u.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),u.createElement(s,ee({},a,{ref:o}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function pa(e,t){e&&Dt.flushSync(()=>e.dispatchEvent(t))}const Wc="Checkbox",[Qg,t6]=Ct(Wc),[Jg,e0]=Qg(Wc),t0=u.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:i,required:a,disabled:s,value:l="on",onCheckedChange:c,...d}=e,[f,p]=u.useState(null),m=Oe(t,$=>p($)),h=u.useRef(!1),v=f?!!f.closest("form"):!0,[w=!1,y]=St({prop:o,defaultProp:i,onChange:c}),b=u.useRef(w);return u.useEffect(()=>{const $=f==null?void 0:f.form;if($){const S=()=>y(b.current);return $.addEventListener("reset",S),()=>$.removeEventListener("reset",S)}},[f,y]),u.createElement(Jg,{scope:n,state:w,disabled:s},u.createElement(xe.button,ee({type:"button",role:"checkbox","aria-checked":bn(w)?"mixed":w,"aria-required":a,"data-state":Uc(w),"data-disabled":s?"":void 0,disabled:s,value:l},d,{ref:m,onKeyDown:fe(e.onKeyDown,$=>{$.key==="Enter"&&$.preventDefault()}),onClick:fe(e.onClick,$=>{y(S=>bn(S)?!0:!S),v&&(h.current=$.isPropagationStopped(),h.current||$.stopPropagation())})})),v&&u.createElement(o0,{control:f,bubbles:!h.current,name:r,value:l,checked:w,required:a,disabled:s,style:{transform:"translateX(-100%)"}}))}),n0="CheckboxIndicator",r0=u.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,i=e0(n0,n);return u.createElement(Zt,{present:r||bn(i.state)||i.state===!0},u.createElement(xe.span,ee({"data-state":Uc(i.state),"data-disabled":i.disabled?"":void 0},o,{ref:t,style:{pointerEvents:"none",...e.style}})))}),o0=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=u.useRef(null),a=zc(n),s=da(t);return u.useEffect(()=>{const l=i.current,c=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(c,"checked").set;if(a!==n&&f){const p=new Event("click",{bubbles:r});l.indeterminate=bn(n),f.call(l,bn(n)?!1:n),l.dispatchEvent(p)}},[a,n,r]),u.createElement("input",ee({type:"checkbox","aria-hidden":!0,defaultChecked:bn(n)?!1:n},o,{tabIndex:-1,ref:i,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function bn(e){return e==="indeterminate"}function Uc(e){return bn(e)?"indeterminate":e?"checked":"unchecked"}const Hc=t0,i0=r0;var a0={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const s0=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Cr=(e,t)=>{const n=u.forwardRef(({color:r="currentColor",size:o=24,strokeWidth:i=2,absoluteStrokeWidth:a,children:s,...l},c)=>u.createElement("svg",{ref:c,...a0,width:o,height:o,stroke:r,strokeWidth:a?Number(i)*24/Number(o):i,className:`lucide lucide-${s0(e)}`,...l},[...t.map(([d,f])=>u.createElement(d,f)),...(Array.isArray(s)?s:[s])||[]]));return n.displayName=`${e}`,n},ha=Cr("Check",[["polyline",{points:"20 6 9 17 4 12",key:"10jjfj"}]]),Gc=Cr("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),l0=Cr("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),c0=Cr("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]),u0=Cr("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);function Vc(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Vc(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function qc(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Vc(e))&&(r&&(r+=" "),r+=t);return r}function d0(){for(var e=0,t,n,r="";e<arguments.length;)(t=arguments[e++])&&(n=Yc(t))&&(r&&(r+=" "),r+=n);return r}function Yc(e){if(typeof e=="string")return e;for(var t,n="",r=0;r<e.length;r++)e[r]&&(t=Yc(e[r]))&&(n&&(n+=" "),n+=t);return n}var ma="-";function f0(e){var t=h0(e),n=e.conflictingClassGroups,r=e.conflictingClassGroupModifiers,o=r===void 0?{}:r;function i(s){var l=s.split(ma);return l[0]===""&&l.length!==1&&l.shift(),Kc(l,t)||p0(s)}function a(s,l){var c=n[s]||[];return l&&o[s]?[].concat(c,o[s]):c}return{getClassGroupId:i,getConflictingClassGroupIds:a}}function Kc(e,t){var a;if(e.length===0)return t.classGroupId;var n=e[0],r=t.nextPart.get(n),o=r?Kc(e.slice(1),r):void 0;if(o)return o;if(t.validators.length!==0){var i=e.join(ma);return(a=t.validators.find(function(s){var l=s.validator;return l(i)}))==null?void 0:a.classGroupId}}var Xc=/^\[(.+)\]$/;function p0(e){if(Xc.test(e)){var t=Xc.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function h0(e){var t=e.theme,n=e.prefix,r={nextPart:new Map,validators:[]},o=v0(Object.entries(e.classGroups),n);return o.forEach(function(i){var a=i[0],s=i[1];va(s,r,a,t)}),r}function va(e,t,n,r){e.forEach(function(o){if(typeof o=="string"){var i=o===""?t:Rc(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(m0(o)){va(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(function(a){var s=a[0],l=a[1];va(l,Rc(t,s),n,r)})})}function Rc(e,t){var n=e;return t.split(ma).forEach(function(r){n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function m0(e){return e.isThemeGetter}function v0(e,t){return t?e.map(function(n){var r=n[0],o=n[1],i=o.map(function(a){return typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(function(s){var l=s[0],c=s[1];return[t+l,c]})):a});return[r,i]}):e}function g0(e){if(e<1)return{get:function(){},set:function(){}};var t=0,n=new Map,r=new Map;function o(i,a){n.set(i,a),t++,t>e&&(t=0,r=n,n=new Map)}return{get:function(a){var s=n.get(a);if(s!==void 0)return s;if((s=r.get(a))!==void 0)return o(a,s),s},set:function(a,s){n.has(a)?n.set(a,s):o(a,s)}}}var Zc="!";function y0(e){var t=e.separator||":",n=t.length===1,r=t[0],o=t.length;return function(a){for(var s=[],l=0,c=0,d,f=0;f<a.length;f++){var p=a[f];if(l===0){if(p===r&&(n||a.slice(f,f+o)===t)){s.push(a.slice(c,f)),c=f+o;continue}if(p==="/"){d=f;continue}}p==="["?l++:p==="]"&&l--}var m=s.length===0?a:a.substring(c),h=m.startsWith(Zc),v=h?m.substring(1):m,w=d&&d>c?d-c:void 0;return{modifiers:s,hasImportantModifier:h,baseClassName:v,maybePostfixModifierPosition:w}}}function b0(e){if(e.length<=1)return e;var t=[],n=[];return e.forEach(function(r){var o=r[0]==="[";o?(t.push.apply(t,n.sort().concat([r])),n=[]):n.push(r)}),t.push.apply(t,n.sort()),t}function w0(e){return{cache:g0(e.cacheSize),splitModifiers:y0(e),...f0(e)}}var x0=/\s+/;function $0(e,t){var n=t.splitModifiers,r=t.getClassGroupId,o=t.getConflictingClassGroupIds,i=new Set;return e.trim().split(x0).map(function(a){var s=n(a),l=s.modifiers,c=s.hasImportantModifier,d=s.baseClassName,f=s.maybePostfixModifierPosition,p=r(f?d.substring(0,f):d),m=!!f;if(!p){if(!f)return{isTailwindClass:!1,originalClassName:a};if(p=r(d),!p)return{isTailwindClass:!1,originalClassName:a};m=!1}var h=b0(l).join(":"),v=c?h+Zc:h;return{isTailwindClass:!0,modifierId:v,classGroupId:p,originalClassName:a,hasPostfixModifier:m}}).reverse().filter(function(a){if(!a.isTailwindClass)return!0;var s=a.modifierId,l=a.classGroupId,c=a.hasPostfixModifier,d=s+l;return i.has(d)?!1:(i.add(d),o(l,c).forEach(function(f){return i.add(s+f)}),!0)}).reverse().map(function(a){return a.originalClassName}).join(" ")}function C0(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,o,i,a=s;function s(c){var d=t[0],f=t.slice(1),p=f.reduce(function(m,h){return h(m)},d());return r=w0(p),o=r.cache.get,i=r.cache.set,a=l,l(c)}function l(c){var d=o(c);if(d)return d;var f=$0(c,r);return i(c,f),f}return function(){return a(d0.apply(null,arguments))}}function De(e){var t=function(r){return r[e]||[]};return t.isThemeGetter=!0,t}var Qc=/^\[(?:([a-z-]+):)?(.+)\]$/i,S0=/^\d+\/\d+$/,E0=new Set(["px","full","screen"]),T0=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,P0=/\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$/,M0=/^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;function ht(e){return wn(e)||E0.has(e)||S0.test(e)||ga(e)}function ga(e){return xn(e,"length",A0)}function k0(e){return xn(e,"size",Jc)}function O0(e){return xn(e,"position",Jc)}function _0(e){return xn(e,"url",I0)}function $o(e){return xn(e,"number",wn)}function wn(e){return!Number.isNaN(Number(e))}function N0(e){return e.endsWith("%")&&wn(e.slice(0,-1))}function Sr(e){return eu(e)||xn(e,"number",eu)}function we(e){return Qc.test(e)}function Er(){return!0}function Qt(e){return T0.test(e)}function D0(e){return xn(e,"",L0)}function xn(e,t,n){var r=Qc.exec(e);return r?r[1]?r[1]===t:n(r[2]):!1}function A0(e){return P0.test(e)}function Jc(){return!1}function I0(e){return e.startsWith("url(")}function eu(e){return Number.isInteger(Number(e))}function L0(e){return M0.test(e)}function F0(){var e=De("colors"),t=De("spacing"),n=De("blur"),r=De("brightness"),o=De("borderColor"),i=De("borderRadius"),a=De("borderSpacing"),s=De("borderWidth"),l=De("contrast"),c=De("grayscale"),d=De("hueRotate"),f=De("invert"),p=De("gap"),m=De("gradientColorStops"),h=De("gradientColorStopPositions"),v=De("inset"),w=De("margin"),y=De("opacity"),b=De("padding"),$=De("saturate"),S=De("scale"),x=De("sepia"),T=De("skew"),O=De("space"),P=De("translate"),_=function(){return["auto","contain","none"]},j=function(){return["auto","hidden","clip","visible","scroll"]},F=function(){return["auto",we,t]},V=function(){return[we,t]},R=function(){return["",ht]},X=function(){return["auto",wn,we]},C=function(){return["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"]},L=function(){return["solid","dashed","dotted","double","none"]},H=function(){return["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"]},W=function(){return["start","end","center","between","around","evenly","stretch"]},D=function(){return["","0",we]},N=function(){return["auto","avoid","all","avoid-page","page","left","right","column"]},z=function(){return[wn,$o]},J=function(){return[wn,we]};return{cacheSize:500,theme:{colors:[Er],spacing:[ht],blur:["none","",Qt,we],brightness:z(),borderColor:[e],borderRadius:["none","","full",Qt,we],borderSpacing:V(),borderWidth:R(),contrast:z(),grayscale:D(),hueRotate:J(),invert:D(),gap:V(),gradientColorStops:[e],gradientColorStopPositions:[N0,ga],inset:F(),margin:F(),opacity:z(),padding:V(),saturate:z(),scale:z(),sepia:D(),skew:J(),space:V(),translate:V()},classGroups:{aspect:[{aspect:["auto","square","video",we]}],container:["container"],columns:[{columns:[Qt]}],"break-after":[{"break-after":N()}],"break-before":[{"break-before":N()}],"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"],float:[{float:["right","left","none"]}],clear:[{clear:["left","right","both","none"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[].concat(C(),[we])}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:_()}],"overscroll-x":[{"overscroll-x":_()}],"overscroll-y":[{"overscroll-y":_()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Sr]}],basis:[{basis:F()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",we]}],grow:[{grow:D()}],shrink:[{shrink:D()}],order:[{order:["first","last","none",Sr]}],"grid-cols":[{"grid-cols":[Er]}],"col-start-end":[{col:["auto",{span:["full",Sr]},we]}],"col-start":[{"col-start":X()}],"col-end":[{"col-end":X()}],"grid-rows":[{"grid-rows":[Er]}],"row-start-end":[{row:["auto",{span:[Sr]},we]}],"row-start":[{"row-start":X()}],"row-end":[{"row-end":X()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",we]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",we]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal"].concat(W())}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal"].concat(W(),["baseline"])}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[].concat(W(),["baseline"])}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[w]}],mx:[{mx:[w]}],my:[{my:[w]}],ms:[{ms:[w]}],me:[{me:[w]}],mt:[{mt:[w]}],mr:[{mr:[w]}],mb:[{mb:[w]}],ml:[{ml:[w]}],"space-x":[{"space-x":[O]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[O]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit",we,t]}],"min-w":[{"min-w":["min","max","fit",we,ht]}],"max-w":[{"max-w":["0","none","full","min","max","fit","prose",{screen:[Qt]},Qt,we]}],h:[{h:[we,t,"auto","min","max","fit"]}],"min-h":[{"min-h":["min","max","fit",we,ht]}],"max-h":[{"max-h":[we,t,"min","max","fit"]}],"font-size":[{text:["base",Qt,ga]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",$o]}],"font-family":[{font:[Er]}],"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-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",we]}],"line-clamp":[{"line-clamp":["none",wn,$o]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",we,ht]}],"list-image":[{"list-image":["none",we]}],"list-style-type":[{list:["none","disc","decimal",we]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[].concat(L(),["wavy"])}],"text-decoration-thickness":[{decoration:["auto","from-font",ht]}],"underline-offset":[{"underline-offset":["auto",we,ht]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],indent:[{indent:V()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",we]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",we]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[].concat(C(),[O0])}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",k0]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},_0]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[h]}],"gradient-via-pos":[{via:[h]}],"gradient-to-pos":[{to:[h]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[].concat(L(),["hidden"])}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:L()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:[""].concat(L())}],"outline-offset":[{"outline-offset":[we,ht]}],"outline-w":[{outline:[ht]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:R()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[ht]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Qt,D0]}],"shadow-color":[{shadow:[Er]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":H()}],"bg-blend":[{"bg-blend":H()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Qt,we]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[f]}],saturate:[{saturate:[$]}],sepia:[{sepia:[x]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[$]}],"backdrop-sepia":[{"backdrop-sepia":[x]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",we]}],duration:[{duration:J()}],ease:[{ease:["linear","in","out","in-out",we]}],delay:[{delay:J()}],animate:[{animate:["none","spin","ping","pulse","bounce",we]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[Sr,we]}],"translate-x":[{"translate-x":[P]}],"translate-y":[{"translate-y":[P]}],"skew-x":[{"skew-x":[T]}],"skew-y":[{"skew-y":[T]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",we]}],accent:[{accent:["auto",e]}],appearance:["appearance-none"],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",we]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":V()}],"scroll-mx":[{"scroll-mx":V()}],"scroll-my":[{"scroll-my":V()}],"scroll-ms":[{"scroll-ms":V()}],"scroll-me":[{"scroll-me":V()}],"scroll-mt":[{"scroll-mt":V()}],"scroll-mr":[{"scroll-mr":V()}],"scroll-mb":[{"scroll-mb":V()}],"scroll-ml":[{"scroll-ml":V()}],"scroll-p":[{"scroll-p":V()}],"scroll-px":[{"scroll-px":V()}],"scroll-py":[{"scroll-py":V()}],"scroll-ps":[{"scroll-ps":V()}],"scroll-pe":[{"scroll-pe":V()}],"scroll-pt":[{"scroll-pt":V()}],"scroll-pr":[{"scroll-pr":V()}],"scroll-pb":[{"scroll-pb":V()}],"scroll-pl":[{"scroll-pl":V()}],"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","pinch-zoom","manipulation",{pan:["x","left","right","y","up","down"]}]}],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",we]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ht,$o]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],"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"],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-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}var j0=C0(F0);function _e(...e){return j0(qc(e))}const tu=u.forwardRef(({className:e,...t},n)=>A.jsx("span",{className:"rabbit-ds",children:A.jsx(Hc,{ref:n,className:_e("h-4 w-4 shrink-0 rounded-sm border-2 border-[#104F95] ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-[#104F95] data-[state=checked]:text-white",e,"rabbit-ds"),...t,children:A.jsx(i0,{className:_e("flex items-center justify-center text-current rabbit-ds"),children:A.jsx(ha,{className:"h-3 w-3"})})})}));tu.displayName=Hc.displayName;const nu=tu,ru=u.forwardRef((e,t)=>{const{pressed:n,defaultPressed:r=!1,onPressedChange:o,...i}=e,[a=!1,s]=St({prop:n,onChange:o,defaultProp:r});return u.createElement(xe.button,ee({type:"button","aria-pressed":a,"data-state":a?"on":"off","data-disabled":e.disabled?"":void 0},i,{ref:t,onClick:fe(e.onClick,()=>{e.disabled||s(!a)})}))}),z0=ru;function B0({icon:e,count:t,label:n,selected:r=!1,onSelectedChange:o}){return A.jsx("div",{className:"rabbit-ds h-7 flex-col w-auto p-0 rounded-full border-0 justify-center items-center inline-flex hover:cursor-pointer focus:outline-1 focus:outline-offset-2",children:A.jsx(z0,{defaultPressed:r,asChild:!0,onPressedChange:o,className:_e("px-4 py-1 rounded-full border flex-row justify-start items-center gap-2.5 flex","data-[state=off]:border-gray-100 data-[state=off]:bg-gray-100 data-[state=off]:text-dove-gray-500","data-[state=on]:border-sky-800 data-[state=on]:bg-sky-100 data-[state=on]:text-sky-800"),children:A.jsxs("div",{children:[e?A.jsx("div",{className:"w-4 h-4 justify-center items-center flex",children:e}):null,A.jsxs("div",{className:"text-sm leading-tight font-semibold",children:[n?A.jsx("span",{children:n}):null," ",t?A.jsxs("span",{children:["(",t,")"]}):null]})]})})})}const ya=u.forwardRef(({className:e,type:t,...n},r)=>A.jsxs("div",{className:"rabbit-ds relative font-sans",children:[t==="search"?A.jsx("div",{className:"absolute text-neutral-400 inset-y-0 left-0 mx-2 pointer-events-none w-5 h-5 my-auto p-0.5 justify-center items-center flex",children:A.jsx(u0,{})}):null,A.jsx("input",{type:t,className:_e("text-sm min-w-[224px] w-full h-10 px-3 py-2.5 bg-white rounded border border-neutral-400 gap-2.5 focus:outline-none hover:outline-none focus:border-sky-700 hover:border-sky-700 disabled:pointer-events-none disabled:bg-neutral-50 disabled:border-neutral-100 disable:text-neutral-400",e,t==="search"?"pl-8":""),ref:r,...n})]}));ya.displayName="Input",ya.defaultProps={className:""};const W0=ya,ou=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,iu=qc,ba=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return iu(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map(c=>{const d=n==null?void 0:n[c],f=i==null?void 0:i[c];if(d===null)return null;const p=ou(d)||ou(f);return o[c][p]}),s=n&&Object.entries(n).reduce((c,d)=>{let[f,p]=d;return p===void 0||(c[f]=p),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,d)=>{let{class:f,className:p,...m}=d;return Object.entries(m).every(h=>{let[v,w]=h;return Array.isArray(w)?w.includes({...i,...s}[v]):{...i,...s}[v]===w})?[...c,f,p]:c},[]);return iu(e,a,l,n==null?void 0:n.class,n==null?void 0:n.className)},U0=ba("rabbit-ds font-sans px-4 py-2 rounded text-sm font-semibold justify-center items-center gap-1 inline-flex transition-colors focus:outline-1 focus:outline-offset-2 disabled:pointer-events-none",{variants:{variant:{filled:"",outline:"",text:""},status:{default:"",error:""},size:{normal:"h-10",small:"h-7",icon:"h-10 w-10 p-2",smallIcon:"h-7 w-7 p-1"}},compoundVariants:[{variant:"filled",status:"default",className:"bg-[#1565BC] text-white hover:bg-[#125AA9] focus:bg-[#104F95] disabled:bg-[#99D2F9]"},{variant:"filled",status:"error",className:"bg-[#C62C02] text-white hover:bg-[#AA2602] focus:bg-[#A12402] disabled:bg-[#F6B9B9]"},{variant:"outline",status:"default",className:"bg-white text-[#1565BC] border border-[#1565BC] hover:text-[#125AA9] hover:border-[#125AA9] focus:border-[#104F95] focus:text-[#104F95] disabled:border-[#104F95] disabled:text-[#104F95]"},{variant:"outline",status:"error",className:"bg-white text-[#C62C02] border border-[#C62C02] hover:text-[#AA2602] hover:border-[#AA2602] focus:border-[#A12402] focus:text-[#A12402] disabled:border-[#F6B9B9] disabled:text-[#F6B9B9]"},{variant:"text",status:"default",className:"bg-white text-[#1565BC] border-0 hover:text-[#125AA9] focus:text-[#104F95] disabled:text-[#104F95]"},{variant:"text",status:"error",className:"bg-white text-[#C62C02] border-0 hover:text-[#AA2602] focus:text-[#A12402] disabled:text-[#F6B9B9]"}],defaultVariants:{variant:"filled",status:"default",size:"normal"}}),au=ba("",{variants:{size:{normal:"h-4 w-4",small:"h-3 w-3",icon:"h4 w-4",smallIcon:"h3 w-3"}},defaultVariants:{size:"normal"}}),Tr=u.forwardRef(({className:e,variant:t,iconLeft:n,iconRight:r,status:o,size:i,asChild:a=!1,children:s,...l},c)=>{const d=a?yn:"button";return A.jsx("div",{className:"rabbit-ds",children:A.jsxs(d,{className:_e(U0({variant:t,className:e,size:i,status:o})),ref:c,...l,children:[n?A.jsx("div",{className:_e(au({size:i})),children:n}):null,s,r?A.jsx("div",{className:_e(au({size:i})),children:r}):null]})})});Tr.displayName="Button",Tr.defaultProps={asChild:!1,iconLeft:void 0,iconRight:void 0};function wa(e){const t=e+"CollectionProvider",[n,r]=Ct(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=m=>{const{scope:h,children:v}=m,w=u.useRef(null),y=u.useRef(new Map).current;return u.createElement(o,{scope:h,itemMap:y,collectionRef:w},v)},s=e+"CollectionSlot",l=u.forwardRef((m,h)=>{const{scope:v,children:w}=m,y=i(s,v),b=Oe(h,y.collectionRef);return u.createElement(yn,{ref:b},w)}),c=e+"CollectionItemSlot",d="data-radix-collection-item",f=u.forwardRef((m,h)=>{const{scope:v,children:w,...y}=m,b=u.useRef(null),$=Oe(h,b),S=i(c,v);return u.useEffect(()=>(S.itemMap.set(b,{ref:b,...y}),()=>void S.itemMap.delete(b))),u.createElement(yn,{[d]:"",ref:$},w)});function p(m){const h=i(e+"CollectionConsumer",m);return u.useCallback(()=>{const w=h.collectionRef.current;if(!w)return[];const y=Array.from(w.querySelectorAll(`[${d}]`));return Array.from(h.itemMap.values()).sort((S,x)=>y.indexOf(S.ref.current)-y.indexOf(x.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:a,Slot:l,ItemSlot:f},p,r]}const H0=u.createContext(void 0);function Co(e){const t=u.useContext(H0);return e||t||"ltr"}function su(e,t=globalThis==null?void 0:globalThis.document){const n=He(e);u.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const xa="dismissableLayer.update",G0="dismissableLayer.pointerDownOutside",V0="dismissableLayer.focusOutside";let lu;const q0=u.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),cu=u.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...c}=e,d=u.useContext(q0),[f,p]=u.useState(null),m=(n=f==null?void 0:f.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,h]=u.useState({}),v=Oe(t,P=>p(P)),w=Array.from(d.layers),[y]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),b=w.indexOf(y),$=f?w.indexOf(f):-1,S=d.layersWithOutsidePointerEventsDisabled.size>0,x=$>=b,T=Y0(P=>{const _=P.target,j=[...d.branches].some(F=>F.contains(_));!x||j||(i==null||i(P),s==null||s(P),P.defaultPrevented||l==null||l())},m),O=K0(P=>{const _=P.target;[...d.branches].some(F=>F.contains(_))||(a==null||a(P),s==null||s(P),P.defaultPrevented||l==null||l())},m);return su(P=>{$===d.layers.size-1&&(o==null||o(P),!P.defaultPrevented&&l&&(P.preventDefault(),l()))},m),u.useEffect(()=>{if(f)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(lu=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),uu(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=lu)}},[f,m,r,d]),u.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),uu())},[f,d]),u.useEffect(()=>{const P=()=>h({});return document.addEventListener(xa,P),()=>document.removeEventListener(xa,P)},[]),u.createElement(xe.div,ee({},c,{ref:v,style:{pointerEvents:S?x?"auto":"none":void 0,...e.style},onFocusCapture:fe(e.onFocusCapture,O.onFocusCapture),onBlurCapture:fe(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:fe(e.onPointerDownCapture,T.onPointerDownCapture)}))});function Y0(e,t=globalThis==null?void 0:globalThis.document){const n=He(e),r=u.useRef(!1),o=u.useRef(()=>{});return u.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let c=function(){du(G0,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function K0(e,t=globalThis==null?void 0:globalThis.document){const n=He(e),r=u.useRef(!1);return u.useEffect(()=>{const o=i=>{i.target&&!r.current&&du(V0,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function uu(){const e=new CustomEvent(xa);document.dispatchEvent(e)}function du(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?pa(o,i):o.dispatchEvent(i)}let $a=0;function fu(){u.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:pu()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:pu()),$a++,()=>{$a===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),$a--}},[])}function pu(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const Ca="focusScope.autoFocusOnMount",Sa="focusScope.autoFocusOnUnmount",hu={bubbles:!1,cancelable:!0},mu=u.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,l]=u.useState(null),c=He(o),d=He(i),f=u.useRef(null),p=Oe(t,v=>l(v)),m=u.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;u.useEffect(()=>{if(r){let v=function($){if(m.paused||!s)return;const S=$.target;s.contains(S)?f.current=S:Jt(f.current,{select:!0})},w=function($){if(m.paused||!s)return;const S=$.relatedTarget;S!==null&&(s.contains(S)||Jt(f.current,{select:!0}))},y=function($){if(document.activeElement===document.body)for(const x of $)x.removedNodes.length>0&&Jt(s)};document.addEventListener("focusin",v),document.addEventListener("focusout",w);const b=new MutationObserver(y);return s&&b.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",w),b.disconnect()}}},[r,s,m.paused]),u.useEffect(()=>{if(s){yu.add(m);const v=document.activeElement;if(!s.contains(v)){const y=new CustomEvent(Ca,hu);s.addEventListener(Ca,c),s.dispatchEvent(y),y.defaultPrevented||(X0(ey(vu(s)),{select:!0}),document.activeElement===v&&Jt(s))}return()=>{s.removeEventListener(Ca,c),setTimeout(()=>{const y=new CustomEvent(Sa,hu);s.addEventListener(Sa,d),s.dispatchEvent(y),y.defaultPrevented||Jt(v??document.body,{select:!0}),s.removeEventListener(Sa,d),yu.remove(m)},0)}}},[s,c,d,m]);const h=u.useCallback(v=>{if(!n&&!r||m.paused)return;const w=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,y=document.activeElement;if(w&&y){const b=v.currentTarget,[$,S]=R0(b);$&&S?!v.shiftKey&&y===S?(v.preventDefault(),n&&Jt($,{select:!0})):v.shiftKey&&y===$&&(v.preventDefault(),n&&Jt(S,{select:!0})):y===b&&v.preventDefault()}},[n,r,m.paused]);return u.createElement(xe.div,ee({tabIndex:-1},a,{ref:p,onKeyDown:h}))});function X0(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Jt(r,{select:t}),document.activeElement!==n)return}function R0(e){const t=vu(e),n=gu(t,e),r=gu(t.reverse(),e);return[n,r]}function vu(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function gu(e,t){for(const n of e)if(!Z0(n,{upTo:t}))return n}function Z0(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 Q0(e){return e instanceof HTMLInputElement&&"select"in e}function Jt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Q0(e)&&t&&e.select()}}const yu=J0();function J0(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=bu(e,t),e.unshift(t)},remove(t){var n;e=bu(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function bu(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function ey(e){return e.filter(t=>t.tagName!=="A")}const ty=ve["useId".toString()]||(()=>{});let ny=0;function At(e){const[t,n]=ve.useState(ty());return ot(()=>{e||n(r=>r??String(ny++))},[e]),e||(t?`radix-${t}`:"")}const ry=["top","right","bottom","left"],en=Math.min,it=Math.max,So=Math.round,Eo=Math.floor,tn=e=>({x:e,y:e}),oy={left:"right",right:"left",bottom:"top",top:"bottom"},iy={start:"end",end:"start"};function Ea(e,t,n){return it(e,en(t,n))}function It(e,t){return typeof e=="function"?e(t):e}function Lt(e){return e.split("-")[0]}function Hn(e){return e.split("-")[1]}function Ta(e){return e==="x"?"y":"x"}function Pa(e){return e==="y"?"height":"width"}function Gn(e){return["top","bottom"].includes(Lt(e))?"y":"x"}function Ma(e){return Ta(Gn(e))}function ay(e,t,n){n===void 0&&(n=!1);const r=Hn(e),o=Ma(e),i=Pa(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=To(a)),[a,To(a)]}function sy(e){const t=To(e);return[ka(e),t,ka(t)]}function ka(e){return e.replace(/start|end/g,t=>iy[t])}function ly(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}function cy(e,t,n,r){const o=Hn(e);let i=ly(Lt(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(ka)))),i}function To(e){return e.replace(/left|right|bottom|top/g,t=>oy[t])}function uy(e){return{top:0,right:0,bottom:0,left:0,...e}}function wu(e){return typeof e!="number"?uy(e):{top:e,right:e,bottom:e,left:e}}function Po(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function xu(e,t,n){let{reference:r,floating:o}=e;const i=Gn(t),a=Ma(t),s=Pa(a),l=Lt(t),c=i==="y",d=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,p=r[s]/2-o[s]/2;let m;switch(l){case"top":m={x:d,y:r.y-o.height};break;case"bottom":m={x:d,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:f};break;case"left":m={x:r.x-o.width,y:f};break;default:m={x:r.x,y:r.y}}switch(Hn(t)){case"start":m[a]-=p*(n&&c?-1:1);break;case"end":m[a]+=p*(n&&c?-1:1);break}return m}const dy=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:f}=xu(c,r,l),p=r,m={},h=0;for(let v=0;v<s.length;v++){const{name:w,fn:y}=s[v],{x:b,y:$,data:S,reset:x}=await y({x:d,y:f,initialPlacement:r,placement:p,strategy:o,middlewareData:m,rects:c,platform:a,elements:{reference:e,floating:t}});if(d=b??d,f=$??f,m={...m,[w]:{...m[w],...S}},x&&h<=50){h++,typeof x=="object"&&(x.placement&&(p=x.placement),x.rects&&(c=x.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):x.rects),{x:d,y:f}=xu(c,p,l)),v=-1;continue}}return{x:d,y:f,placement:p,strategy:o,middlewareData:m}};async function Pr(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:p=!1,padding:m=0}=It(t,e),h=wu(m),w=s[p?f==="floating"?"reference":"floating":f],y=Po(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(w)))==null||n?w:w.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:d,strategy:l})),b=f==="floating"?{...a.floating,x:r,y:o}:a.reference,$=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),S=await(i.isElement==null?void 0:i.isElement($))?await(i.getScale==null?void 0:i.getScale($))||{x:1,y:1}:{x:1,y:1},x=Po(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:b,offsetParent:$,strategy:l}):b);return{top:(y.top-x.top+h.top)/S.y,bottom:(x.bottom-y.bottom+h.bottom)/S.y,left:(y.left-x.left+h.left)/S.x,right:(x.right-y.right+h.right)/S.x}}const $u=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s}=t,{element:l,padding:c=0}=It(e,t)||{};if(l==null)return{};const d=wu(c),f={x:n,y:r},p=Ma(o),m=Pa(p),h=await a.getDimensions(l),v=p==="y",w=v?"top":"left",y=v?"bottom":"right",b=v?"clientHeight":"clientWidth",$=i.reference[m]+i.reference[p]-f[p]-i.floating[m],S=f[p]-i.reference[p],x=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l));let T=x?x[b]:0;(!T||!await(a.isElement==null?void 0:a.isElement(x)))&&(T=s.floating[b]||i.floating[m]);const O=$/2-S/2,P=T/2-h[m]/2-1,_=en(d[w],P),j=en(d[y],P),F=_,V=T-h[m]-j,R=T/2-h[m]/2+O,X=Ea(F,R,V),L=Hn(o)!=null&&R!=X&&i.reference[m]/2-(R<F?_:j)-h[m]/2<0?R<F?F-R:V-R:0;return{[p]:f[p]-L,data:{[p]:X,centerOffset:R-X+L}}}}),Cu=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:o,rects:i,initialPlacement:a,platform:s,elements:l}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=!0,...v}=It(e,t),w=Lt(r),y=Lt(a)===a,b=await(s.isRTL==null?void 0:s.isRTL(l.floating)),$=f||(y||!h?[To(a)]:sy(a));!f&&m!=="none"&&$.push(...cy(a,h,m,b));const S=[a,...$],x=await Pr(t,v),T=[];let O=((n=o.flip)==null?void 0:n.overflows)||[];if(c&&T.push(x[w]),d){const F=ay(r,i,b);T.push(x[F[0]],x[F[1]])}if(O=[...O,{placement:r,overflows:T}],!T.every(F=>F<=0)){var P,_;const F=(((P=o.flip)==null?void 0:P.index)||0)+1,V=S[F];if(V)return{data:{index:F,overflows:O},reset:{placement:V}};let R=(_=O.filter(X=>X.overflows[0]<=0).sort((X,C)=>X.overflows[1]-C.overflows[1])[0])==null?void 0:_.placement;if(!R)switch(p){case"bestFit":{var j;const X=(j=O.map(C=>[C.placement,C.overflows.filter(L=>L>0).reduce((L,H)=>L+H,0)]).sort((C,L)=>C[1]-L[1])[0])==null?void 0:j[0];X&&(R=X);break}case"initialPlacement":R=a;break}if(r!==R)return{reset:{placement:R}}}return{}}}};function Su(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Eu(e){return ry.some(t=>e[t]>=0)}const Tu=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=It(e,t);switch(r){case"referenceHidden":{const i=await Pr(t,{...o,elementContext:"reference"}),a=Su(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Eu(a)}}}case"escaped":{const i=await Pr(t,{...o,altBoundary:!0}),a=Su(i,n.floating);return{data:{escapedOffsets:a,escaped:Eu(a)}}}default:return{}}}}};async function fy(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=Lt(n),s=Hn(n),l=Gn(n)==="y",c=["left","top"].includes(a)?-1:1,d=i&&l?-1:1,f=It(t,e);let{mainAxis:p,crossAxis:m,alignmentAxis:h}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return s&&typeof h=="number"&&(m=s==="end"?h*-1:h),l?{x:m*d,y:p*c}:{x:p*c,y:m*d}}const Pu=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,o=await fy(t,e);return{x:n+o.x,y:r+o.y,data:o}}}},Mu=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:w=>{let{x:y,y:b}=w;return{x:y,y:b}}},...l}=It(e,t),c={x:n,y:r},d=await Pr(t,l),f=Gn(Lt(o)),p=Ta(f);let m=c[p],h=c[f];if(i){const w=p==="y"?"top":"left",y=p==="y"?"bottom":"right",b=m+d[w],$=m-d[y];m=Ea(b,m,$)}if(a){const w=f==="y"?"top":"left",y=f==="y"?"bottom":"right",b=h+d[w],$=h-d[y];h=Ea(b,h,$)}const v=s.fn({...t,[p]:m,[f]:h});return{...v,data:{x:v.x-n,y:v.y-r}}}}},ku=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=It(e,t),d={x:n,y:r},f=Gn(o),p=Ta(f);let m=d[p],h=d[f];const v=It(s,t),w=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(l){const $=p==="y"?"height":"width",S=i.reference[p]-i.floating[$]+w.mainAxis,x=i.reference[p]+i.reference[$]-w.mainAxis;m<S?m=S:m>x&&(m=x)}if(c){var y,b;const $=p==="y"?"width":"height",S=["top","left"].includes(Lt(o)),x=i.reference[f]-i.floating[$]+(S&&((y=a.offset)==null?void 0:y[f])||0)+(S?0:w.crossAxis),T=i.reference[f]+i.reference[$]+(S?0:((b=a.offset)==null?void 0:b[f])||0)-(S?w.crossAxis:0);h<x?h=x:h>T&&(h=T)}return{[p]:m,[f]:h}}}},Ou=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:a=()=>{},...s}=It(e,t),l=await Pr(t,s),c=Lt(n),d=Hn(n),f=Gn(n)==="y",{width:p,height:m}=r.floating;let h,v;c==="top"||c==="bottom"?(h=c,v=d===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(v=c,h=d==="end"?"top":"bottom");const w=m-l[h],y=p-l[v],b=!t.middlewareData.shift;let $=w,S=y;if(f){const T=p-l.left-l.right;S=d||b?en(y,T):T}else{const T=m-l.top-l.bottom;$=d||b?en(w,T):T}if(b&&!d){const T=it(l.left,0),O=it(l.right,0),P=it(l.top,0),_=it(l.bottom,0);f?S=p-2*(T!==0||O!==0?T+O:it(l.left,l.right)):$=m-2*(P!==0||_!==0?P+_:it(l.top,l.bottom))}await a({...t,availableWidth:S,availableHeight:$});const x=await o.getDimensions(i.floating);return p!==x.width||m!==x.height?{reset:{rects:!0}}:{}}}};function nn(e){return _u(e)?(e.nodeName||"").toLowerCase():"#document"}function at(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ft(e){var t;return(t=(_u(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function _u(e){return e instanceof Node||e instanceof at(e).Node}function jt(e){return e instanceof Element||e instanceof at(e).Element}function Et(e){return e instanceof HTMLElement||e instanceof at(e).HTMLElement}function Nu(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof at(e).ShadowRoot}function Mr(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=ct(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function py(e){return["table","td","th"].includes(nn(e))}function Oa(e){const t=_a(),n=ct(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function hy(e){let t=Vn(e);for(;Et(t)&&!Mo(t);){if(Oa(t))return t;t=Vn(t)}return null}function _a(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Mo(e){return["html","body","#document"].includes(nn(e))}function ct(e){return at(e).getComputedStyle(e)}function ko(e){return jt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Vn(e){if(nn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Nu(e)&&e.host||Ft(e);return Nu(t)?t.host:t}function Du(e){const t=Vn(e);return Mo(t)?e.ownerDocument?e.ownerDocument.body:e.body:Et(t)&&Mr(t)?t:Du(t)}function Oo(e,t){var n;t===void 0&&(t=[]);const r=Du(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),i=at(r);return o?t.concat(i,i.visualViewport||[],Mr(r)?r:[]):t.concat(r,Oo(r))}function Au(e){const t=ct(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Et(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=So(n)!==i||So(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Na(e){return jt(e)?e:e.contextElement}function qn(e){const t=Na(e);if(!Et(t))return tn(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Au(t);let a=(i?So(n.width):n.width)/r,s=(i?So(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const my=tn(0);function Iu(e){const t=at(e);return!_a()||!t.visualViewport?my:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function vy(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==at(e)?!1:t}function $n(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Na(e);let a=tn(1);t&&(r?jt(r)&&(a=qn(r)):a=qn(e));const s=vy(i,n,r)?Iu(i):tn(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,d=o.width/a.x,f=o.height/a.y;if(i){const p=at(i),m=r&&jt(r)?at(r):r;let h=p.frameElement;for(;h&&r&&m!==p;){const v=qn(h),w=h.getBoundingClientRect(),y=ct(h),b=w.left+(h.clientLeft+parseFloat(y.paddingLeft))*v.x,$=w.top+(h.clientTop+parseFloat(y.paddingTop))*v.y;l*=v.x,c*=v.y,d*=v.x,f*=v.y,l+=b,c+=$,h=at(h).frameElement}}return Po({width:d,height:f,x:l,y:c})}function gy(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=Et(n),i=Ft(n);if(n===i)return t;let a={scrollLeft:0,scrollTop:0},s=tn(1);const l=tn(0);if((o||!o&&r!=="fixed")&&((nn(n)!=="body"||Mr(i))&&(a=ko(n)),Et(n))){const c=$n(n);s=qn(n),l.x=c.x+n.clientLeft,l.y=c.y+n.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-a.scrollLeft*s.x+l.x,y:t.y*s.y-a.scrollTop*s.y+l.y}}function yy(e){return Array.from(e.getClientRects())}function Lu(e){return $n(Ft(e)).left+ko(e).scrollLeft}function by(e){const t=Ft(e),n=ko(e),r=e.ownerDocument.body,o=it(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=it(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Lu(e);const s=-n.scrollTop;return ct(r).direction==="rtl"&&(a+=it(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}function wy(e,t){const n=at(e),r=Ft(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const c=_a();(!c||c&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}function xy(e,t){const n=$n(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Et(e)?qn(e):tn(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,l=o*i.x,c=r*i.y;return{width:a,height:s,x:l,y:c}}function Fu(e,t,n){let r;if(t==="viewport")r=wy(e,n);else if(t==="document")r=by(Ft(e));else if(jt(t))r=xy(t,n);else{const o=Iu(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Po(r)}function ju(e,t){const n=Vn(e);return n===t||!jt(n)||Mo(n)?!1:ct(n).position==="fixed"||ju(n,t)}function $y(e,t){const n=t.get(e);if(n)return n;let r=Oo(e).filter(s=>jt(s)&&nn(s)!=="body"),o=null;const i=ct(e).position==="fixed";let a=i?Vn(e):e;for(;jt(a)&&!Mo(a);){const s=ct(a),l=Oa(a);!l&&s.position==="fixed"&&(o=null),(i?!l&&!o:!l&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Mr(a)&&!l&&ju(e,a))?r=r.filter(d=>d!==a):o=s,a=Vn(a)}return t.set(e,r),r}function Cy(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?$y(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((c,d)=>{const f=Fu(t,d,o);return c.top=it(f.top,c.top),c.right=en(f.right,c.right),c.bottom=en(f.bottom,c.bottom),c.left=it(f.left,c.left),c},Fu(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Sy(e){return Au(e)}function Ey(e,t,n){const r=Et(t),o=Ft(t),i=n==="fixed",a=$n(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=tn(0);if(r||!r&&!i)if((nn(t)!=="body"||Mr(o))&&(s=ko(t)),r){const c=$n(t,!0,i,t);l.x=c.x+t.clientLeft,l.y=c.y+t.clientTop}else o&&(l.x=Lu(o));return{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function zu(e,t){return!Et(e)||ct(e).position==="fixed"?null:t?t(e):e.offsetParent}function Bu(e,t){const n=at(e);if(!Et(e))return n;let r=zu(e,t);for(;r&&py(r)&&ct(r).position==="static";)r=zu(r,t);return r&&(nn(r)==="html"||nn(r)==="body"&&ct(r).position==="static"&&!Oa(r))?n:r||hy(e)||n}const Ty=async function(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||Bu,i=this.getDimensions;return{reference:Ey(t,await o(n),r),floating:{x:0,y:0,...await i(n)}}};function Py(e){return ct(e).direction==="rtl"}const My={convertOffsetParentRelativeRectToViewportRelativeRect:gy,getDocumentElement:Ft,getClippingRect:Cy,getOffsetParent:Bu,getElementRects:Ty,getClientRects:yy,getDimensions:Sy,getScale:qn,isElement:jt,isRTL:Py};function ky(e,t){let n=null,r;const o=Ft(e);function i(){clearTimeout(r),n&&n.disconnect(),n=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),i();const{left:c,top:d,width:f,height:p}=e.getBoundingClientRect();if(s||t(),!f||!p)return;const m=Eo(d),h=Eo(o.clientWidth-(c+f)),v=Eo(o.clientHeight-(d+p)),w=Eo(c),b={rootMargin:-m+"px "+-h+"px "+-v+"px "+-w+"px",threshold:it(0,en(1,l))||1};let $=!0;function S(x){const T=x[0].intersectionRatio;if(T!==l){if(!$)return a();T?a(!1,T):r=setTimeout(()=>{a(!1,1e-7)},100)}$=!1}try{n=new IntersectionObserver(S,{...b,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,b)}n.observe(e)}return a(!0),i}function Wu(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=Na(e),d=o||i?[...c?Oo(c):[],...Oo(t)]:[];d.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const f=c&&s?ky(c,n):null;let p=-1,m=null;a&&(m=new ResizeObserver(y=>{let[b]=y;b&&b.target===c&&m&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{m&&m.observe(t)})),n()}),c&&!l&&m.observe(c),m.observe(t));let h,v=l?$n(e):null;l&&w();function w(){const y=$n(e);v&&(y.x!==v.x||y.y!==v.y||y.width!==v.width||y.height!==v.height)&&n(),v=y,h=requestAnimationFrame(w)}return n(),()=>{d.forEach(y=>{o&&y.removeEventListener("scroll",n),i&&y.removeEventListener("resize",n)}),f&&f(),m&&m.disconnect(),m=null,l&&cancelAnimationFrame(h)}}const Oy=(e,t,n)=>{const r=new Map,o={platform:My,...n},i={...o.platform,_c:r};return dy(e,t,{...o,platform:i})},Uu=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?$u({element:r.current,padding:o}).fn(n):{}:r?$u({element:r,padding:o}).fn(n):{}}}};var _o=typeof document<"u"?u.useLayoutEffect:u.useEffect;function No(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,o;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(!No(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!No(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Hu(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Gu(e,t){const n=Hu(e);return Math.round(t*n)/n}function Vu(e){const t=ve.useRef(e);return _o(()=>{t.current=e}),t}function qu(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[d,f]=ve.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=ve.useState(r);No(p,r)||m(r);const[h,v]=ve.useState(null),[w,y]=ve.useState(null),b=ve.useCallback(L=>{L!=T.current&&(T.current=L,v(L))},[v]),$=ve.useCallback(L=>{L!==O.current&&(O.current=L,y(L))},[y]),S=i||h,x=a||w,T=ve.useRef(null),O=ve.useRef(null),P=ve.useRef(d),_=Vu(l),j=Vu(o),F=ve.useCallback(()=>{if(!T.current||!O.current)return;const L={placement:t,strategy:n,middleware:p};j.current&&(L.platform=j.current),Oy(T.current,O.current,L).then(H=>{const W={...H,isPositioned:!0};V.current&&!No(P.current,W)&&(P.current=W,Gg.flushSync(()=>{f(W)}))})},[p,t,n,j]);_o(()=>{c===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,f(L=>({...L,isPositioned:!1})))},[c]);const V=ve.useRef(!1);_o(()=>(V.current=!0,()=>{V.current=!1}),[]),_o(()=>{if(S&&(T.current=S),x&&(O.current=x),S&&x){if(_.current)return _.current(S,x,F);F()}},[S,x,F,_]);const R=ve.useMemo(()=>({reference:T,floating:O,setReference:b,setFloating:$}),[b,$]),X=ve.useMemo(()=>({reference:S,floating:x}),[S,x]),C=ve.useMemo(()=>{const L={position:n,left:0,top:0};if(!X.floating)return L;const H=Gu(X.floating,d.x),W=Gu(X.floating,d.y);return s?{...L,transform:"translate("+H+"px, "+W+"px)",...Hu(X.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:H,top:W}},[n,s,X.floating,d.x,d.y]);return ve.useMemo(()=>({...d,update:F,refs:R,elements:X,floatingStyles:C}),[d,F,R,X,C])}const Yu="Popper",[Ku,Do]=Ct(Yu),[_y,Xu]=Ku(Yu),Ny=e=>{const{__scopePopper:t,children:n}=e,[r,o]=u.useState(null);return u.createElement(_y,{scope:t,anchor:r,onAnchorChange:o},n)},Dy="PopperAnchor",Ay=u.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=Xu(Dy,n),a=u.useRef(null),s=Oe(t,a);return u.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:u.createElement(xe.div,ee({},o,{ref:s}))}),Ru="PopperContent",[Iy,n6]=Ku(Ru),Ly=u.forwardRef((e,t)=>{var n,r,o,i,a,s,l,c;const{__scopePopper:d,side:f="bottom",sideOffset:p=0,align:m="center",alignOffset:h=0,arrowPadding:v=0,avoidCollisions:w=!0,collisionBoundary:y=[],collisionPadding:b=0,sticky:$="partial",hideWhenDetached:S=!1,updatePositionStrategy:x="optimized",onPlaced:T,...O}=e,P=Xu(Ru,d),[_,j]=u.useState(null),F=Oe(t,Ce=>j(Ce)),[V,R]=u.useState(null),X=da(V),C=(n=X==null?void 0:X.width)!==null&&n!==void 0?n:0,L=(r=X==null?void 0:X.height)!==null&&r!==void 0?r:0,H=f+(m!=="center"?"-"+m:""),W=typeof b=="number"?b:{top:0,right:0,bottom:0,left:0,...b},D=Array.isArray(y)?y:[y],N=D.length>0,z={padding:W,boundary:D.filter(Fy),altBoundary:N},{refs:J,floatingStyles:Q,placement:oe,isPositioned:te,middlewareData:ae}=qu({strategy:"fixed",placement:H,whileElementsMounted:(...Ce)=>Wu(...Ce,{animationFrame:x==="always"}),elements:{reference:P.anchor},middleware:[Pu({mainAxis:p+L,alignmentAxis:h}),w&&Mu({mainAxis:!0,crossAxis:!1,limiter:$==="partial"?ku():void 0,...z}),w&&Cu({...z}),Ou({...z,apply:({elements:Ce,rects:ke,availableWidth:je,availableHeight:_t})=>{const{width:mn,height:Ze}=ke.reference,qt=Ce.floating.style;qt.setProperty("--radix-popper-available-width",`${je}px`),qt.setProperty("--radix-popper-available-height",`${_t}px`),qt.setProperty("--radix-popper-anchor-width",`${mn}px`),qt.setProperty("--radix-popper-anchor-height",`${Ze}px`)}}),V&&Uu({element:V,padding:v}),jy({arrowWidth:C,arrowHeight:L}),S&&Tu({strategy:"referenceHidden",...z})]}),[Y,le]=Zu(oe),U=He(T);ot(()=>{te&&(U==null||U())},[te,U]);const q=(o=ae.arrow)===null||o===void 0?void 0:o.x,re=(i=ae.arrow)===null||i===void 0?void 0:i.y,k=((a=ae.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[de,pe]=u.useState();return ot(()=>{_&&pe(window.getComputedStyle(_).zIndex)},[_]),u.createElement("div",{ref:J.setFloating,"data-radix-popper-content-wrapper":"",style:{...Q,transform:te?Q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:de,"--radix-popper-transform-origin":[(s=ae.transformOrigin)===null||s===void 0?void 0:s.x,(l=ae.transformOrigin)===null||l===void 0?void 0:l.y].join(" ")},dir:e.dir},u.createElement(Iy,{scope:d,placedSide:Y,onArrowChange:R,arrowX:q,arrowY:re,shouldHideArrow:k},u.createElement(xe.div,ee({"data-side":Y,"data-align":le},O,{ref:F,style:{...O.style,animation:te?void 0:"none",opacity:(c=ae.hide)!==null&&c!==void 0&&c.referenceHidden?0:void 0}}))))});function Fy(e){return e!==null}const jy=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,i,a;const{placement:s,rects:l,middlewareData:c}=t,f=((n=c.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,p=f?0:e.arrowWidth,m=f?0:e.arrowHeight,[h,v]=Zu(s),w={start:"0%",center:"50%",end:"100%"}[v],y=((r=(o=c.arrow)===null||o===void 0?void 0:o.x)!==null&&r!==void 0?r:0)+p/2,b=((i=(a=c.arrow)===null||a===void 0?void 0:a.y)!==null&&i!==void 0?i:0)+m/2;let $="",S="";return h==="bottom"?($=f?w:`${y}px`,S=`${-m}px`):h==="top"?($=f?w:`${y}px`,S=`${l.floating.height+m}px`):h==="right"?($=`${-m}px`,S=f?w:`${b}px`):h==="left"&&($=`${l.floating.width+m}px`,S=f?w:`${b}px`),{data:{x:$,y:S}}}});function Zu(e){const[t,n="center"]=e.split("-");return[t,n]}const Da=Ny,Qu=Ay,Ju=Ly,ed=u.forwardRef((e,t)=>{var n;const{container:r=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...o}=e;return r?Dt.createPortal(u.createElement(xe.div,ee({},o,{ref:t})),r):null}),Aa="rovingFocusGroup.onEntryFocus",zy={bubbles:!1,cancelable:!0},Ia="RovingFocusGroup",[La,td,By]=wa(Ia),[Wy,Ao]=Ct(Ia,[By]),[Uy,Hy]=Wy(Ia),Gy=u.forwardRef((e,t)=>u.createElement(La.Provider,{scope:e.__scopeRovingFocusGroup},u.createElement(La.Slot,{scope:e.__scopeRovingFocusGroup},u.createElement(Vy,ee({},e,{ref:t}))))),Vy=u.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:c,...d}=e,f=u.useRef(null),p=Oe(t,f),m=Co(i),[h=null,v]=St({prop:a,defaultProp:s,onChange:l}),[w,y]=u.useState(!1),b=He(c),$=td(n),S=u.useRef(!1),[x,T]=u.useState(0);return u.useEffect(()=>{const O=f.current;if(O)return O.addEventListener(Aa,b),()=>O.removeEventListener(Aa,b)},[b]),u.createElement(Uy,{scope:n,orientation:r,dir:m,loop:o,currentTabStopId:h,onItemFocus:u.useCallback(O=>v(O),[v]),onItemShiftTab:u.useCallback(()=>y(!0),[]),onFocusableItemAdd:u.useCallback(()=>T(O=>O+1),[]),onFocusableItemRemove:u.useCallback(()=>T(O=>O-1),[])},u.createElement(xe.div,ee({tabIndex:w||x===0?-1:0,"data-orientation":r},d,{ref:p,style:{outline:"none",...e.style},onMouseDown:fe(e.onMouseDown,()=>{S.current=!0}),onFocus:fe(e.onFocus,O=>{const P=!S.current;if(O.target===O.currentTarget&&P&&!w){const _=new CustomEvent(Aa,zy);if(O.currentTarget.dispatchEvent(_),!_.defaultPrevented){const j=$().filter(C=>C.focusable),F=j.find(C=>C.active),V=j.find(C=>C.id===h),X=[F,V,...j].filter(Boolean).map(C=>C.ref.current);nd(X)}}S.current=!1}),onBlur:fe(e.onBlur,()=>y(!1))})))}),qy="RovingFocusGroupItem",Yy=u.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,...a}=e,s=At(),l=i||s,c=Hy(qy,n),d=c.currentTabStopId===l,f=td(n),{onFocusableItemAdd:p,onFocusableItemRemove:m}=c;return u.useEffect(()=>{if(r)return p(),()=>m()},[r,p,m]),u.createElement(La.ItemSlot,{scope:n,id:l,focusable:r,active:o},u.createElement(xe.span,ee({tabIndex:d?0:-1,"data-orientation":c.orientation},a,{ref:t,onMouseDown:fe(e.onMouseDown,h=>{r?c.onItemFocus(l):h.preventDefault()}),onFocus:fe(e.onFocus,()=>c.onItemFocus(l)),onKeyDown:fe(e.onKeyDown,h=>{if(h.key==="Tab"&&h.shiftKey){c.onItemShiftTab();return}if(h.target!==h.currentTarget)return;const v=Ry(h,c.orientation,c.dir);if(v!==void 0){h.preventDefault();let y=f().filter(b=>b.focusable).map(b=>b.ref.current);if(v==="last")y.reverse();else if(v==="prev"||v==="next"){v==="prev"&&y.reverse();const b=y.indexOf(h.currentTarget);y=c.loop?Zy(y,b+1):y.slice(b+1)}setTimeout(()=>nd(y))}})})))}),Ky={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Xy(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Ry(e,t,n){const r=Xy(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Ky[r]}function nd(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Zy(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const rd=Gy,od=Yy;var Qy=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Yn=new WeakMap,Io=new WeakMap,Lo={},Fa=0,id=function(e){return e&&(e.host||id(e.parentNode))},Jy=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=id(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})},eb=function(e,t,n,r){var o=Jy(t,Array.isArray(e)?e:[e]);Lo[n]||(Lo[n]=new WeakMap);var i=Lo[n],a=[],s=new Set,l=new Set(o),c=function(f){!f||s.has(f)||(s.add(f),c(f.parentNode))};o.forEach(c);var d=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(p){if(s.has(p))d(p);else{var m=p.getAttribute(r),h=m!==null&&m!=="false",v=(Yn.get(p)||0)+1,w=(i.get(p)||0)+1;Yn.set(p,v),i.set(p,w),a.push(p),v===1&&h&&Io.set(p,!0),w===1&&p.setAttribute(n,"true"),h||p.setAttribute(r,"true")}})};return d(t),s.clear(),Fa++,function(){a.forEach(function(f){var p=Yn.get(f)-1,m=i.get(f)-1;Yn.set(f,p),i.set(f,m),p||(Io.has(f)||f.removeAttribute(r),Io.delete(f)),m||f.removeAttribute(n)}),Fa--,Fa||(Yn=new WeakMap,Yn=new WeakMap,Io=new WeakMap,Lo={})}},ad=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||Qy(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),eb(r,o,n,"aria-hidden")):function(){return null}},Tt=function(){return Tt=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Tt.apply(this,arguments)};function sd(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 o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function tb(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Fo="right-scroll-bar-position",jo="width-before-scroll-bar",nb="with-scroll-bars-hidden",rb="--removed-body-scroll-bar-size";function ob(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function ib(e,t){var n=u.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}function ab(e,t){return ib(t||null,function(n){return e.forEach(function(r){return ob(r,n)})})}function sb(e){return e}function lb(e,t){t===void 0&&(t=sb);var n=[],r=!1,o={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(i){var a=t(i,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(i){for(r=!0;n.length;){var a=n;n=[],a.forEach(i)}n={push:function(s){return i(s)},filter:function(){return n}}},assignMedium:function(i){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(i),a=n}var l=function(){var d=a;a=[],d.forEach(i)},c=function(){return Promise.resolve().then(l)};c(),n={push:function(d){a.push(d),c()},filter:function(d){return a=a.filter(d),n}}}};return o}function cb(e){e===void 0&&(e={});var t=lb(null);return t.options=Tt({async:!0,ssr:!1},e),t}var ld=function(e){var t=e.sideCar,n=sd(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 ve.createElement(r,Tt({},n))};ld.isSideCarExport=!0;function ub(e,t){return e.useMedium(t),ld}var cd=cb(),ja=function(){},zo=ve.forwardRef(function(e,t){var n=ve.useRef(null),r=ve.useState({onScrollCapture:ja,onWheelCapture:ja,onTouchMoveCapture:ja}),o=r[0],i=r[1],a=e.forwardProps,s=e.children,l=e.className,c=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,m=e.noIsolation,h=e.inert,v=e.allowPinchZoom,w=e.as,y=w===void 0?"div":w,b=sd(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),$=p,S=ab([n,t]),x=Tt(Tt({},b),o);return ve.createElement(ve.Fragment,null,d&&ve.createElement($,{sideCar:cd,removeScrollBar:c,shards:f,noIsolation:m,inert:h,setCallbacks:i,allowPinchZoom:!!v,lockRef:n}),a?ve.cloneElement(ve.Children.only(s),Tt(Tt({},x),{ref:S})):ve.createElement(y,Tt({},x,{className:l,ref:S}),s))});zo.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},zo.classNames={fullWidth:jo,zeroRight:Fo};var ud,db=function(){if(ud)return ud;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function fb(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=db();return t&&e.setAttribute("nonce",t),e}function pb(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function hb(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var mb=function(){var e=0,t=null;return{add:function(n){e==0&&(t=fb())&&(pb(t,n),hb(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},vb=function(){var e=mb();return function(t,n){ve.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},dd=function(){var e=vb(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},gb={left:0,top:0,right:0,gap:0},za=function(e){return parseInt(e||"",10)||0},yb=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[za(n),za(r),za(o)]},bb=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return gb;var t=yb(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])}},wb=dd(),xb=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),`
|
|
2
|
+
.`.concat(nb,` {
|
|
3
3
|
overflow: hidden `).concat(r,`;
|
|
4
4
|
padding-right: `).concat(s,"px ").concat(r,`;
|
|
5
5
|
}
|
|
@@ -16,52 +16,52 @@
|
|
|
16
16
|
`),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
.`).concat(
|
|
19
|
+
.`).concat(Fo,` {
|
|
20
20
|
right: `).concat(s,"px ").concat(r,`;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
.`).concat(
|
|
23
|
+
.`).concat(jo,` {
|
|
24
24
|
margin-right: `).concat(s,"px ").concat(r,`;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
.`).concat(
|
|
27
|
+
.`).concat(Fo," .").concat(Fo,` {
|
|
28
28
|
right: 0 `).concat(r,`;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
.`).concat(
|
|
31
|
+
.`).concat(jo," .").concat(jo,` {
|
|
32
32
|
margin-right: 0 `).concat(r,`;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
body {
|
|
36
|
-
`).concat(
|
|
36
|
+
`).concat(rb,": ").concat(s,`px;
|
|
37
37
|
}
|
|
38
|
-
`)}
|
|
38
|
+
`)},$b=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r,i=ve.useMemo(function(){return bb(o)},[o]);return ve.createElement(wb,{styles:xb(i,!t,o,n?"":"!important")})},Ba=!1;if(typeof window<"u")try{var Bo=Object.defineProperty({},"passive",{get:function(){return Ba=!0,!0}});window.addEventListener("test",Bo,Bo),window.removeEventListener("test",Bo,Bo)}catch{Ba=!1}var Kn=Ba?{passive:!1}:!1,Cb=function(e){return e.tagName==="TEXTAREA"},fd=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Cb(e)&&n[t]==="visible")},Sb=function(e){return fd(e,"overflowY")},Eb=function(e){return fd(e,"overflowX")},pd=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=hd(e,n);if(r){var o=md(e,n),i=o[1],a=o[2];if(i>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},Tb=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Pb=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},hd=function(e,t){return e==="v"?Sb(t):Eb(t)},md=function(e,t){return e==="v"?Tb(t):Pb(t)},Mb=function(e,t){return e==="h"&&t==="rtl"?-1:1},kb=function(e,t,n,r,o){var i=Mb(e,window.getComputedStyle(t).direction),a=i*r,s=n.target,l=t.contains(s),c=!1,d=a>0,f=0,p=0;do{var m=md(e,s),h=m[0],v=m[1],w=m[2],y=v-w-i*h;(h||y)&&hd(e,s)&&(f+=y,p+=h),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(d&&(o&&f===0||!o&&a>f)||!d&&(o&&p===0||!o&&-a>p))&&(c=!0),c},Wo=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},vd=function(e){return[e.deltaX,e.deltaY]},gd=function(e){return e&&"current"in e?e.current:e},Ob=function(e,t){return e[0]===t[0]&&e[1]===t[1]},_b=function(e){return`
|
|
39
39
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
40
40
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
41
|
-
`)},Cb=0,Xn=[];function Sb(e){var t=me.useRef([]),n=me.useRef([0,0]),r=me.useRef(),o=me.useState(Cb++)[0],i=me.useState(function(){return od()})[0],a=me.useRef(e);me.useEffect(function(){a.current=e},[e]),me.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var v=qy([e.lockRef.current],(e.shards||[]).map(ud),!0).filter(Boolean);return v.forEach(function(x){return x.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),v.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=me.useCallback(function(v,x){if("touches"in v&&v.touches.length===2)return!a.current.allowPinchZoom;var y=Wo(v),b=n.current,$="deltaX"in v?v.deltaX:b[0]-y[0],S="deltaY"in v?v.deltaY:b[1]-y[1],w,T=v.target,O=Math.abs($)>Math.abs(S)?"h":"v";if("touches"in v&&O==="h"&&T.type==="range")return!1;var P=ad(O,T);if(!P)return!0;if(P?w=O:(w=O==="v"?"h":"v",P=ad(O,T)),!P)return!1;if(!r.current&&"changedTouches"in v&&($||S)&&(r.current=w),!w)return!0;var _=r.current||w;return xb(_,x,v,_==="h"?$:S,!0)},[]),l=me.useCallback(function(v){var x=v;if(!(!Xn.length||Xn[Xn.length-1]!==i)){var y="deltaY"in x?cd(x):Wo(x),b=t.current.filter(function(w){return w.name===x.type&&w.target===x.target&&wb(w.delta,y)})[0];if(b&&b.should){x.cancelable&&x.preventDefault();return}if(!b){var $=(a.current.shards||[]).map(ud).filter(Boolean).filter(function(w){return w.contains(x.target)}),S=$.length>0?s(x,$[0]):!a.current.noIsolation;S&&x.cancelable&&x.preventDefault()}}},[]),c=me.useCallback(function(v,x,y,b){var $={name:v,delta:x,target:y,should:b};t.current.push($),setTimeout(function(){t.current=t.current.filter(function(S){return S!==$})},1)},[]),d=me.useCallback(function(v){n.current=Wo(v),r.current=void 0},[]),f=me.useCallback(function(v){c(v.type,cd(v),v.target,s(v,e.lockRef.current))},[]),p=me.useCallback(function(v){c(v.type,Wo(v),v.target,s(v,e.lockRef.current))},[]);me.useEffect(function(){return Xn.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",l,Kn),document.addEventListener("touchmove",l,Kn),document.addEventListener("touchstart",d,Kn),function(){Xn=Xn.filter(function(v){return v!==i}),document.removeEventListener("wheel",l,Kn),document.removeEventListener("touchmove",l,Kn),document.removeEventListener("touchstart",d,Kn)}},[]);var m=e.removeScrollBar,h=e.inert;return me.createElement(me.Fragment,null,h?me.createElement(i,{styles:$b(o)}):null,m?me.createElement(pb,{gapMode:"margin"}):null)}const Eb=tb(nd,Sb);var dd=me.forwardRef(function(e,t){return me.createElement(jo,Tt({},e,{ref:t,sideCar:Eb}))});dd.classNames=jo.classNames;const fd=dd,Wa=["Enter"," "],Tb=["ArrowDown","PageUp","Home"],pd=["ArrowUp","PageDown","End"],Pb=[...Tb,...pd],Mb={ltr:[...Wa,"ArrowRight"],rtl:[...Wa,"ArrowLeft"]},kb={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Bo="Menu",[Mr,Ob,_b]=ba(Bo),[Cn,hd]=Ct(Bo,[_b,No,Ao]),Uo=No(),md=Ao(),[vd,rn]=Cn(Bo),[Nb,kr]=Cn(Bo),Ab=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:i,modal:a=!0}=e,s=Uo(t),[l,c]=u.useState(null),d=u.useRef(!1),f=He(i),p=$o(o);return u.useEffect(()=>{const m=()=>{d.current=!0,document.addEventListener("pointerdown",h,{capture:!0,once:!0}),document.addEventListener("pointermove",h,{capture:!0,once:!0})},h=()=>d.current=!1;return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",h,{capture:!0}),document.removeEventListener("pointermove",h,{capture:!0})}},[]),u.createElement(Na,s,u.createElement(vd,{scope:t,open:n,onOpenChange:f,content:l,onContentChange:c},u.createElement(Nb,{scope:t,onClose:u.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:d,dir:p,modal:a},r)))},gd=u.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Uo(n);return u.createElement(Vu,ee({},o,r,{ref:t}))}),yd="MenuPortal",[Db,bd]=Cn(yd,{forceMount:void 0}),Ib=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,i=rn(yd,t);return u.createElement(Db,{scope:t,forceMount:n},u.createElement(Zt,{present:n||i.open},u.createElement(Yu,{asChild:!0,container:o},r)))},mt="MenuContent",[Lb,Ba]=Cn(mt),Fb=u.forwardRef((e,t)=>{const n=bd(mt,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=rn(mt,e.__scopeMenu),a=kr(mt,e.__scopeMenu);return u.createElement(Mr.Provider,{scope:e.__scopeMenu},u.createElement(Zt,{present:r||i.open},u.createElement(Mr.Slot,{scope:e.__scopeMenu},a.modal?u.createElement(jb,ee({},o,{ref:t})):u.createElement(zb,ee({},o,{ref:t})))))}),jb=u.forwardRef((e,t)=>{const n=rn(mt,e.__scopeMenu),r=u.useRef(null),o=Oe(t,r);return u.useEffect(()=>{const i=r.current;if(i)return Ju(i)},[]),u.createElement(Ua,ee({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:fe(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),zb=u.forwardRef((e,t)=>{const n=rn(mt,e.__scopeMenu);return u.createElement(Ua,ee({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),Ua=u.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEntryFocus:l,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:p,onDismiss:m,disableOutsideScroll:h,...v}=e,x=rn(mt,n),y=kr(mt,n),b=Uo(n),$=md(n),S=Ob(n),[w,T]=u.useState(null),O=u.useRef(null),P=Oe(t,O,x.onContentChange),_=u.useRef(0),j=u.useRef(""),F=u.useRef(0),V=u.useRef(null),R=u.useRef("right"),X=u.useRef(0),C=h?fd:u.Fragment,I=h?{as:yn,allowPinchZoom:!0}:void 0,H=A=>{var N,z;const J=j.current+A,Q=S().filter(U=>!U.disabled),oe=document.activeElement,te=(N=Q.find(U=>U.ref.current===oe))===null||N===void 0?void 0:N.textValue,ae=Q.map(U=>U.textValue),Y=ox(ae,J,te),le=(z=Q.find(U=>U.textValue===Y))===null||z===void 0?void 0:z.ref.current;(function U(q){j.current=q,window.clearTimeout(_.current),q!==""&&(_.current=window.setTimeout(()=>U(""),1e3))})(J),le&&setTimeout(()=>le.focus())};u.useEffect(()=>()=>window.clearTimeout(_.current),[]),iu();const B=u.useCallback(A=>{var N,z;return R.current===((N=V.current)===null||N===void 0?void 0:N.side)&&ax(A,(z=V.current)===null||z===void 0?void 0:z.area)},[]);return u.createElement(Lb,{scope:n,searchRef:j,onItemEnter:u.useCallback(A=>{B(A)&&A.preventDefault()},[B]),onItemLeave:u.useCallback(A=>{var N;B(A)||((N=O.current)===null||N===void 0||N.focus(),T(null))},[B]),onTriggerLeave:u.useCallback(A=>{B(A)&&A.preventDefault()},[B]),pointerGraceTimerRef:F,onPointerGraceIntentChange:u.useCallback(A=>{V.current=A},[])},u.createElement(C,I,u.createElement(lu,{asChild:!0,trapped:o,onMountAutoFocus:fe(i,A=>{var N;A.preventDefault(),(N=O.current)===null||N===void 0||N.focus()}),onUnmountAutoFocus:a},u.createElement(nu,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:p,onDismiss:m},u.createElement(Ru,ee({asChild:!0},$,{dir:y.dir,orientation:"vertical",loop:r,currentTabStopId:w,onCurrentTabStopIdChange:T,onEntryFocus:fe(l,A=>{y.isUsingKeyboardRef.current||A.preventDefault()})}),u.createElement(qu,ee({role:"menu","aria-orientation":"vertical","data-state":Pd(x.open),"data-radix-menu-content":"",dir:y.dir},b,v,{ref:P,style:{outline:"none",...v.style},onKeyDown:fe(v.onKeyDown,A=>{const z=A.target.closest("[data-radix-menu-content]")===A.currentTarget,J=A.ctrlKey||A.altKey||A.metaKey,Q=A.key.length===1;z&&(A.key==="Tab"&&A.preventDefault(),!J&&Q&&H(A.key));const oe=O.current;if(A.target!==oe||!Pb.includes(A.key))return;A.preventDefault();const ae=S().filter(Y=>!Y.disabled).map(Y=>Y.ref.current);pd.includes(A.key)&&ae.reverse(),nx(ae)}),onBlur:fe(e.onBlur,A=>{A.currentTarget.contains(A.target)||(window.clearTimeout(_.current),j.current="")}),onPointerMove:fe(e.onPointerMove,Or(A=>{const N=A.target,z=X.current!==A.clientX;if(A.currentTarget.contains(N)&&z){const J=A.clientX>X.current?"right":"left";R.current=J,X.current=A.clientX}}))})))))))}),xd=u.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return u.createElement(we.div,ee({role:"group"},r,{ref:t}))}),Wb=u.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return u.createElement(we.div,ee({},r,{ref:t}))}),Ha="MenuItem",wd="menu.itemSelect",Ga=u.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,i=u.useRef(null),a=kr(Ha,e.__scopeMenu),s=Ba(Ha,e.__scopeMenu),l=Oe(t,i),c=u.useRef(!1),d=()=>{const f=i.current;if(!n&&f){const p=new CustomEvent(wd,{bubbles:!0,cancelable:!0});f.addEventListener(wd,m=>r==null?void 0:r(m),{once:!0}),fa(f,p),p.defaultPrevented?c.current=!1:a.onClose()}};return u.createElement($d,ee({},o,{ref:l,disabled:n,onClick:fe(e.onClick,d),onPointerDown:f=>{var p;(p=e.onPointerDown)===null||p===void 0||p.call(e,f),c.current=!0},onPointerUp:fe(e.onPointerUp,f=>{var p;c.current||(p=f.currentTarget)===null||p===void 0||p.click()}),onKeyDown:fe(e.onKeyDown,f=>{const p=s.searchRef.current!=="";n||p&&f.key===" "||Wa.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})}))}),$d=u.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...i}=e,a=Ba(Ha,n),s=md(n),l=u.useRef(null),c=Oe(t,l),[d,f]=u.useState(!1),[p,m]=u.useState("");return u.useEffect(()=>{const h=l.current;if(h){var v;m(((v=h.textContent)!==null&&v!==void 0?v:"").trim())}},[i.children]),u.createElement(Mr.ItemSlot,{scope:n,disabled:r,textValue:o??p},u.createElement(Zu,ee({asChild:!0},s,{focusable:!r}),u.createElement(we.div,ee({role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},i,{ref:c,onPointerMove:fe(e.onPointerMove,Or(h=>{r?a.onItemLeave(h):(a.onItemEnter(h),h.defaultPrevented||h.currentTarget.focus())})),onPointerLeave:fe(e.onPointerLeave,Or(h=>a.onItemLeave(h))),onFocus:fe(e.onFocus,()=>f(!0)),onBlur:fe(e.onBlur,()=>f(!1))}))))}),Bb=u.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return u.createElement(Sd,{scope:e.__scopeMenu,checked:n},u.createElement(Ga,ee({role:"menuitemcheckbox","aria-checked":Go(n)?"mixed":n},o,{ref:t,"data-state":Va(n),onSelect:fe(o.onSelect,()=>r==null?void 0:r(Go(n)?!0:!n),{checkForDefaultPrevented:!1})})))}),Ub="MenuRadioGroup",[Hb,Gb]=Cn(Ub,{value:void 0,onValueChange:()=>{}}),Vb=u.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,i=He(r);return u.createElement(Hb,{scope:e.__scopeMenu,value:n,onValueChange:i},u.createElement(xd,ee({},o,{ref:t})))}),qb="MenuRadioItem",Yb=u.forwardRef((e,t)=>{const{value:n,...r}=e,o=Gb(qb,e.__scopeMenu),i=n===o.value;return u.createElement(Sd,{scope:e.__scopeMenu,checked:i},u.createElement(Ga,ee({role:"menuitemradio","aria-checked":i},r,{ref:t,"data-state":Va(i),onSelect:fe(r.onSelect,()=>{var a;return(a=o.onValueChange)===null||a===void 0?void 0:a.call(o,n)},{checkForDefaultPrevented:!1})})))}),Cd="MenuItemIndicator",[Sd,Kb]=Cn(Cd,{checked:!1}),Xb=u.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,i=Kb(Cd,n);return u.createElement(Zt,{present:r||Go(i.checked)||i.checked===!0},u.createElement(we.span,ee({},o,{ref:t,"data-state":Va(i.checked)})))}),Rb=u.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return u.createElement(we.div,ee({role:"separator","aria-orientation":"horizontal"},r,{ref:t}))}),Ed="MenuSub",[Zb,Td]=Cn(Ed),Qb=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,i=rn(Ed,t),a=Uo(t),[s,l]=u.useState(null),[c,d]=u.useState(null),f=He(o);return u.useEffect(()=>(i.open===!1&&f(!1),()=>f(!1)),[i.open,f]),u.createElement(Na,a,u.createElement(vd,{scope:t,open:r,onOpenChange:f,content:c,onContentChange:d},u.createElement(Zb,{scope:t,contentId:Dt(),triggerId:Dt(),trigger:s,onTriggerChange:l},n)))},Ho="MenuSubTrigger",Jb=u.forwardRef((e,t)=>{const n=rn(Ho,e.__scopeMenu),r=kr(Ho,e.__scopeMenu),o=Td(Ho,e.__scopeMenu),i=Ba(Ho,e.__scopeMenu),a=u.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:l}=i,c={__scopeMenu:e.__scopeMenu},d=u.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return u.useEffect(()=>d,[d]),u.useEffect(()=>{const f=s.current;return()=>{window.clearTimeout(f),l(null)}},[s,l]),u.createElement(gd,ee({asChild:!0},c),u.createElement($d,ee({id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":Pd(n.open)},e,{ref:bo(t,o.onTriggerChange),onClick:f=>{var p;(p=e.onClick)===null||p===void 0||p.call(e,f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:fe(e.onPointerMove,Or(f=>{i.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!a.current&&(i.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:fe(e.onPointerLeave,Or(f=>{var p;d();const m=(p=n.content)===null||p===void 0?void 0:p.getBoundingClientRect();if(m){var h;const v=(h=n.content)===null||h===void 0?void 0:h.dataset.side,x=v==="right",y=x?-5:5,b=m[x?"left":"right"],$=m[x?"right":"left"];i.onPointerGraceIntentChange({area:[{x:f.clientX+y,y:f.clientY},{x:b,y:m.top},{x:$,y:m.top},{x:$,y:m.bottom},{x:b,y:m.bottom}],side:v}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(f),f.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:fe(e.onKeyDown,f=>{const p=i.searchRef.current!=="";if(!(e.disabled||p&&f.key===" ")&&Mb[r.dir].includes(f.key)){var m;n.onOpenChange(!0),(m=n.content)===null||m===void 0||m.focus(),f.preventDefault()}})})))}),ex="MenuSubContent",tx=u.forwardRef((e,t)=>{const n=bd(mt,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=rn(mt,e.__scopeMenu),a=kr(mt,e.__scopeMenu),s=Td(ex,e.__scopeMenu),l=u.useRef(null),c=Oe(t,l);return u.createElement(Mr.Provider,{scope:e.__scopeMenu},u.createElement(Zt,{present:r||i.open},u.createElement(Mr.Slot,{scope:e.__scopeMenu},u.createElement(Ua,ee({id:s.contentId,"aria-labelledby":s.triggerId},o,{ref:c,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{var f;a.isUsingKeyboardRef.current&&((f=l.current)===null||f===void 0||f.focus()),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:fe(e.onFocusOutside,d=>{d.target!==s.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:fe(e.onEscapeKeyDown,d=>{a.onClose(),d.preventDefault()}),onKeyDown:fe(e.onKeyDown,d=>{const f=d.currentTarget.contains(d.target),p=kb[a.dir].includes(d.key);if(f&&p){var m;i.onOpenChange(!1),(m=s.trigger)===null||m===void 0||m.focus(),d.preventDefault()}})})))))});function Pd(e){return e?"open":"closed"}function Go(e){return e==="indeterminate"}function Va(e){return Go(e)?"indeterminate":e?"checked":"unchecked"}function nx(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function rx(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function ox(e,t,n){const o=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let a=rx(e,Math.max(i,0));o.length===1&&(a=a.filter(c=>c!==n));const l=a.find(c=>c.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function ix(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const s=t[i].x,l=t[i].y,c=t[a].x,d=t[a].y;l>r!=d>r&&n<(c-s)*(r-l)/(d-l)+s&&(o=!o)}return o}function ax(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return ix(n,t)}function Or(e){return t=>t.pointerType==="mouse"?e(t):void 0}const sx=Ab,lx=gd,cx=Ib,ux=Fb,dx=xd,fx=Wb,px=Ga,hx=Bb,mx=Vb,vx=Yb,gx=Xb,yx=Rb,bx=Qb,xx=Jb,wx=tx,Md="DropdownMenu",[$x,X3]=Ct(Md,[hd]),Ge=hd(),[Cx,kd]=$x(Md),Sx=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:i,onOpenChange:a,modal:s=!0}=e,l=Ge(t),c=u.useRef(null),[d=!1,f]=St({prop:o,defaultProp:i,onChange:a});return u.createElement(Cx,{scope:t,triggerId:Dt(),triggerRef:c,contentId:Dt(),open:d,onOpenChange:f,onOpenToggle:u.useCallback(()=>f(p=>!p),[f]),modal:s},u.createElement(sx,ee({},l,{open:d,onOpenChange:f,dir:r,modal:s}),n))},Ex="DropdownMenuTrigger",Tx=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,i=kd(Ex,n),a=Ge(n);return u.createElement(lx,ee({asChild:!0},a),u.createElement(we.button,ee({type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":r?"":void 0,disabled:r},o,{ref:bo(t,i.triggerRef),onPointerDown:fe(e.onPointerDown,s=>{!r&&s.button===0&&s.ctrlKey===!1&&(i.onOpenToggle(),i.open||s.preventDefault())}),onKeyDown:fe(e.onKeyDown,s=>{r||(["Enter"," "].includes(s.key)&&i.onOpenToggle(),s.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(s.key)&&s.preventDefault())})})))}),Px=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Ge(t);return u.createElement(cx,ee({},r,n))},Mx="DropdownMenuContent",kx=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=kd(Mx,n),i=Ge(n),a=u.useRef(!1);return u.createElement(ux,ee({id:o.contentId,"aria-labelledby":o.triggerId},i,r,{ref:t,onCloseAutoFocus:fe(e.onCloseAutoFocus,s=>{var l;a.current||(l=o.triggerRef.current)===null||l===void 0||l.focus(),a.current=!1,s.preventDefault()}),onInteractOutside:fe(e.onInteractOutside,s=>{const l=s.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0,d=l.button===2||c;(!o.modal||d)&&(a.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}}))}),Ox=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ge(n);return u.createElement(dx,ee({},o,r,{ref:t}))}),_x=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ge(n);return u.createElement(fx,ee({},o,r,{ref:t}))}),Nx=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ge(n);return u.createElement(px,ee({},o,r,{ref:t}))}),Ax=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ge(n);return u.createElement(hx,ee({},o,r,{ref:t}))}),Dx=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ge(n);return u.createElement(mx,ee({},o,r,{ref:t}))}),Ix=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ge(n);return u.createElement(vx,ee({},o,r,{ref:t}))}),Lx=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ge(n);return u.createElement(gx,ee({},o,r,{ref:t}))}),Fx=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ge(n);return u.createElement(yx,ee({},o,r,{ref:t}))}),jx=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:i}=e,a=Ge(t),[s=!1,l]=St({prop:r,defaultProp:i,onChange:o});return u.createElement(bx,ee({},a,{open:s,onOpenChange:l}),n)},zx=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ge(n);return u.createElement(xx,ee({},o,r,{ref:t}))}),Wx=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ge(n);return u.createElement(wx,ee({},o,r,{ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}}))}),Bx=Sx,Ux=Tx,Od=Px,_d=kx,Nd=Ox,Ad=_x,Dd=Nx,Id=Ax,Hx=Dx,Ld=Ix,Fd=Lx,jd=Fx,Gx=jx,zd=zx,Wd=Wx,Vx=Bx,qx=Ux,Yx=Od,Kx=Gx,Xx=Hx,Bd=u.forwardRef(({className:e,...t},n)=>L.jsx(Nd,{ref:n,className:_e("w-full",e),...t}));Bd.displayName=Nd.displayName;const Ud=u.forwardRef(({className:e,children:t,...n},r)=>L.jsxs(zd,{ref:r,className:_e("flex cursor-default select-none px-2 py-1.5 bg-white rounded hover:bg-sky-100 hover:text-sky-800 hover:cursor-pointer justify-start items-start text-zinc-800 text-sm font-normal leading-tight focus:bg-sky-100 focus:text-sky-800 data-[state=checked]:bg-sky-100 data-[state=checked]:text-sky-800 focus:outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[t,L.jsx(Qg,{className:"ml-auto h-4 w-4"})]}));Ud.displayName=zd.displayName;const Hd=u.forwardRef(({className:e,...t},n)=>L.jsx(Wd,{ref:n,className:_e("rabbit-ds z-[1510] rabbit-ds min-w-[8rem] max-w-xs p-1 bg-white rounded-lg shadow flex flex-col justify-start items-start gap-1 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-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",e),...t}));Hd.displayName=Wd.displayName;const Gd=u.forwardRef(({className:e,sideOffset:t=4,...n},r)=>L.jsx(Od,{children:L.jsx(_d,{ref:r,sideOffset:t,className:_e("rabbit-ds z-[1500] rabbit-ds min-w-[8rem] max-w-xs p-1 bg-white rounded-lg shadow flex flex-col justify-start items-start gap-1 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-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",e),...n})}));Gd.displayName=_d.displayName;const Vd=u.forwardRef(({className:e,...t},n)=>L.jsx(Dd,{ref:n,className:_e("relative flex flex-row w-full my-1 cursor-default select-none p-2 bg-white rounded hover:bg-sky-100 hover:text-sky-800 hover:cursor-pointer justify-start items-start text-zinc-800 text-sm font-normal leading-tight focus:bg-sky-100 focus:text-sky-800 data-[state=checked]:bg-sky-100 data-[state=checked]:text-sky-800 focus:outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...t}));Vd.displayName=Dd.displayName;const qd=u.forwardRef(({className:e,children:t,checked:n,...r},o)=>L.jsxs(Id,{ref:o,className:_e("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[L.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:L.jsx(Fd,{children:L.jsx(pa,{className:"h-4 w-4 text-sky-800"})})}),t]}));qd.displayName=Id.displayName;const Yd=u.forwardRef(({className:e,children:t,...n},r)=>L.jsxs(Ld,{ref:r,className:_e("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[L.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:L.jsx(Fd,{children:L.jsx(Jg,{className:"h-2 w-2 fill-current text-sky-800"})})}),t]}));Yd.displayName=Ld.displayName;const Kd=u.forwardRef(({className:e,...t},n)=>L.jsx(Ad,{ref:n,className:_e("px-2 py-1.5 text-sm font-semibold",e),...t}));Kd.displayName=Ad.displayName;const Xd=u.forwardRef(({className:e,...t},n)=>L.jsx(jd,{ref:n,className:_e("h-px w-full bg-athens-gray-100",e),...t}));Xd.displayName=jd.displayName;function Rd(e,[t,n]){return Math.min(n,Math.max(t,e))}const Zd=u.forwardRef((e,t)=>u.createElement(we.span,ee({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}))),Rx=Zd,Zx=[" ","Enter","ArrowUp","ArrowDown"],Qx=[" ","Enter"],Vo="Select",[qo,qa,Jx]=ba(Vo),[Rn,R3]=Ct(Vo,[Jx,No]),Ya=No(),[ew,Sn]=Rn(Vo),[tw,nw]=Rn(Vo),rw=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:i,value:a,defaultValue:s,onValueChange:l,dir:c,name:d,autoComplete:f,disabled:p,required:m}=e,h=Ya(t),[v,x]=u.useState(null),[y,b]=u.useState(null),[$,S]=u.useState(!1),w=$o(c),[T=!1,O]=St({prop:r,defaultProp:o,onChange:i}),[P,_]=St({prop:a,defaultProp:s,onChange:l}),j=u.useRef(null),F=v?!!v.closest("form"):!0,[V,R]=u.useState(new Set),X=Array.from(V).map(C=>C.props.value).join(";");return u.createElement(Na,h,u.createElement(ew,{required:m,scope:t,trigger:v,onTriggerChange:x,valueNode:y,onValueNodeChange:b,valueNodeHasChildren:$,onValueNodeHasChildrenChange:S,contentId:Dt(),value:P,onValueChange:_,open:T,onOpenChange:O,dir:w,triggerPointerDownPosRef:j,disabled:p},u.createElement(qo.Provider,{scope:t},u.createElement(tw,{scope:e.__scopeSelect,onNativeOptionAdd:u.useCallback(C=>{R(I=>new Set(I).add(C))},[]),onNativeOptionRemove:u.useCallback(C=>{R(I=>{const H=new Set(I);return H.delete(C),H})},[])},n)),F?u.createElement(rf,{key:X,"aria-hidden":!0,required:m,tabIndex:-1,name:d,autoComplete:f,value:P,onChange:C=>_(C.target.value),disabled:p},P===void 0?u.createElement("option",{value:""}):null,Array.from(V)):null))},ow="SelectTrigger",iw=u.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,i=Ya(n),a=Sn(ow,n),s=a.disabled||r,l=Oe(t,a.onTriggerChange),c=qa(n),[d,f,p]=of(h=>{const v=c().filter(b=>!b.disabled),x=v.find(b=>b.value===a.value),y=af(v,h,x);y!==void 0&&a.onValueChange(y.value)}),m=()=>{s||(a.onOpenChange(!0),p())};return u.createElement(Vu,ee({asChild:!0},i),u.createElement(we.button,ee({type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":nf(a.value)?"":void 0},o,{ref:l,onClick:fe(o.onClick,h=>{h.currentTarget.focus()}),onPointerDown:fe(o.onPointerDown,h=>{const v=h.target;v.hasPointerCapture(h.pointerId)&&v.releasePointerCapture(h.pointerId),h.button===0&&h.ctrlKey===!1&&(m(),a.triggerPointerDownPosRef.current={x:Math.round(h.pageX),y:Math.round(h.pageY)},h.preventDefault())}),onKeyDown:fe(o.onKeyDown,h=>{const v=d.current!=="";!(h.ctrlKey||h.altKey||h.metaKey)&&h.key.length===1&&f(h.key),!(v&&h.key===" ")&&Zx.includes(h.key)&&(m(),h.preventDefault())})})))}),aw="SelectValue",sw=u.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:i,placeholder:a="",...s}=e,l=Sn(aw,n),{onValueNodeHasChildrenChange:c}=l,d=i!==void 0,f=Oe(t,l.onValueNodeChange);return ot(()=>{c(d)},[c,d]),u.createElement(we.span,ee({},s,{ref:f,style:{pointerEvents:"none"}}),nf(l.value)?u.createElement(u.Fragment,null,a):i)}),lw=u.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return u.createElement(we.span,ee({"aria-hidden":!0},o,{ref:t}),r||"▼")}),cw=e=>u.createElement(Yu,ee({asChild:!0},e)),Zn="SelectContent",uw=u.forwardRef((e,t)=>{const n=Sn(Zn,e.__scopeSelect),[r,o]=u.useState();if(ot(()=>{o(new DocumentFragment)},[]),!n.open){const i=r;return i?At.createPortal(u.createElement(Qd,{scope:e.__scopeSelect},u.createElement(qo.Slot,{scope:e.__scopeSelect},u.createElement("div",null,e.children))),i):null}return u.createElement(dw,ee({},e,{ref:t}))}),zt=10,[Qd,Yo]=Rn(Zn),dw=u.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:a,side:s,sideOffset:l,align:c,alignOffset:d,arrowPadding:f,collisionBoundary:p,collisionPadding:m,sticky:h,hideWhenDetached:v,avoidCollisions:x,...y}=e,b=Sn(Zn,n),[$,S]=u.useState(null),[w,T]=u.useState(null),O=Oe(t,Y=>S(Y)),[P,_]=u.useState(null),[j,F]=u.useState(null),V=qa(n),[R,X]=u.useState(!1),C=u.useRef(!1);u.useEffect(()=>{if($)return Ju($)},[$]),iu();const I=u.useCallback(Y=>{const[le,...U]=V().map(k=>k.ref.current),[q]=U.slice(-1),re=document.activeElement;for(const k of Y)if(k===re||(k==null||k.scrollIntoView({block:"nearest"}),k===le&&w&&(w.scrollTop=0),k===q&&w&&(w.scrollTop=w.scrollHeight),k==null||k.focus(),document.activeElement!==re))return},[V,w]),H=u.useCallback(()=>I([P,$]),[I,P,$]);u.useEffect(()=>{R&&H()},[R,H]);const{onOpenChange:B,triggerPointerDownPosRef:A}=b;u.useEffect(()=>{if($){let Y={x:0,y:0};const le=q=>{var re,k,de,pe;Y={x:Math.abs(Math.round(q.pageX)-((re=(k=A.current)===null||k===void 0?void 0:k.x)!==null&&re!==void 0?re:0)),y:Math.abs(Math.round(q.pageY)-((de=(pe=A.current)===null||pe===void 0?void 0:pe.y)!==null&&de!==void 0?de:0))}},U=q=>{Y.x<=10&&Y.y<=10?q.preventDefault():$.contains(q.target)||B(!1),document.removeEventListener("pointermove",le),A.current=null};return A.current!==null&&(document.addEventListener("pointermove",le),document.addEventListener("pointerup",U,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",le),document.removeEventListener("pointerup",U,{capture:!0})}}},[$,B,A]),u.useEffect(()=>{const Y=()=>B(!1);return window.addEventListener("blur",Y),window.addEventListener("resize",Y),()=>{window.removeEventListener("blur",Y),window.removeEventListener("resize",Y)}},[B]);const[N,z]=of(Y=>{const le=V().filter(re=>!re.disabled),U=le.find(re=>re.ref.current===document.activeElement),q=af(le,Y,U);q&&setTimeout(()=>q.ref.current.focus())}),J=u.useCallback((Y,le,U)=>{const q=!C.current&&!U;(b.value!==void 0&&b.value===le||q)&&(_(Y),q&&(C.current=!0))},[b.value]),Q=u.useCallback(()=>$==null?void 0:$.focus(),[$]),oe=u.useCallback((Y,le,U)=>{const q=!C.current&&!U;(b.value!==void 0&&b.value===le||q)&&F(Y)},[b.value]),te=r==="popper"?Jd:fw,ae=te===Jd?{side:s,sideOffset:l,align:c,alignOffset:d,arrowPadding:f,collisionBoundary:p,collisionPadding:m,sticky:h,hideWhenDetached:v,avoidCollisions:x}:{};return u.createElement(Qd,{scope:n,content:$,viewport:w,onViewportChange:T,itemRefCallback:J,selectedItem:P,onItemLeave:Q,itemTextRefCallback:oe,focusSelectedItem:H,selectedItemText:j,position:r,isPositioned:R,searchRef:N},u.createElement(fd,{as:yn,allowPinchZoom:!0},u.createElement(lu,{asChild:!0,trapped:b.open,onMountAutoFocus:Y=>{Y.preventDefault()},onUnmountAutoFocus:fe(o,Y=>{var le;(le=b.trigger)===null||le===void 0||le.focus({preventScroll:!0}),Y.preventDefault()})},u.createElement(nu,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:Y=>Y.preventDefault(),onDismiss:()=>b.onOpenChange(!1)},u.createElement(te,ee({role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:Y=>Y.preventDefault()},y,ae,{onPlaced:()=>X(!0),ref:O,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:fe(y.onKeyDown,Y=>{const le=Y.ctrlKey||Y.altKey||Y.metaKey;if(Y.key==="Tab"&&Y.preventDefault(),!le&&Y.key.length===1&&z(Y.key),["ArrowUp","ArrowDown","Home","End"].includes(Y.key)){let q=V().filter(re=>!re.disabled).map(re=>re.ref.current);if(["ArrowUp","End"].includes(Y.key)&&(q=q.slice().reverse()),["ArrowUp","ArrowDown"].includes(Y.key)){const re=Y.target,k=q.indexOf(re);q=q.slice(k+1)}setTimeout(()=>I(q)),Y.preventDefault()}})}))))))}),fw=u.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,i=Sn(Zn,n),a=Yo(Zn,n),[s,l]=u.useState(null),[c,d]=u.useState(null),f=Oe(t,O=>d(O)),p=qa(n),m=u.useRef(!1),h=u.useRef(!0),{viewport:v,selectedItem:x,selectedItemText:y,focusSelectedItem:b}=a,$=u.useCallback(()=>{if(i.trigger&&i.valueNode&&s&&c&&v&&x&&y){const O=i.trigger.getBoundingClientRect(),P=c.getBoundingClientRect(),_=i.valueNode.getBoundingClientRect(),j=y.getBoundingClientRect();if(i.dir!=="rtl"){const re=j.left-P.left,k=_.left-re,de=O.left-k,pe=O.width+de,Ce=Math.max(pe,P.width),ke=window.innerWidth-zt,je=Rd(k,[zt,ke-Ce]);s.style.minWidth=pe+"px",s.style.left=je+"px"}else{const re=P.right-j.right,k=window.innerWidth-_.right-re,de=window.innerWidth-O.right-k,pe=O.width+de,Ce=Math.max(pe,P.width),ke=window.innerWidth-zt,je=Rd(k,[zt,ke-Ce]);s.style.minWidth=pe+"px",s.style.right=je+"px"}const F=p(),V=window.innerHeight-zt*2,R=v.scrollHeight,X=window.getComputedStyle(c),C=parseInt(X.borderTopWidth,10),I=parseInt(X.paddingTop,10),H=parseInt(X.borderBottomWidth,10),B=parseInt(X.paddingBottom,10),A=C+I+R+B+H,N=Math.min(x.offsetHeight*5,A),z=window.getComputedStyle(v),J=parseInt(z.paddingTop,10),Q=parseInt(z.paddingBottom,10),oe=O.top+O.height/2-zt,te=V-oe,ae=x.offsetHeight/2,Y=x.offsetTop+ae,le=C+I+Y,U=A-le;if(le<=oe){const re=x===F[F.length-1].ref.current;s.style.bottom="0px";const k=c.clientHeight-v.offsetTop-v.offsetHeight,de=Math.max(te,ae+(re?Q:0)+k+H),pe=le+de;s.style.height=pe+"px"}else{const re=x===F[0].ref.current;s.style.top="0px";const de=Math.max(oe,C+v.offsetTop+(re?J:0)+ae)+U;s.style.height=de+"px",v.scrollTop=le-oe+v.offsetTop}s.style.margin=`${zt}px 0`,s.style.minHeight=N+"px",s.style.maxHeight=V+"px",r==null||r(),requestAnimationFrame(()=>m.current=!0)}},[p,i.trigger,i.valueNode,s,c,v,x,y,i.dir,r]);ot(()=>$(),[$]);const[S,w]=u.useState();ot(()=>{c&&w(window.getComputedStyle(c).zIndex)},[c]);const T=u.useCallback(O=>{O&&h.current===!0&&($(),b==null||b(),h.current=!1)},[$,b]);return u.createElement(pw,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:m,onScrollButtonChange:T},u.createElement("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S}},u.createElement(we.div,ee({},o,{ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}}))))}),Jd=u.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=zt,...i}=e,a=Ya(n);return u.createElement(qu,ee({},a,i,{ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}}))}),[pw,hw]=Rn(Zn,{}),ef="SelectViewport",mw=u.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Yo(ef,n),i=hw(ef,n),a=Oe(t,o.onViewportChange),s=u.useRef(0);return u.createElement(u.Fragment,null,u.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"}}),u.createElement(qo.Slot,{scope:n},u.createElement(we.div,ee({"data-radix-select-viewport":"",role:"presentation"},r,{ref:a,style:{position:"relative",flex:1,overflow:"auto",...r.style},onScroll:fe(r.onScroll,l=>{const c=l.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:f}=i;if(f!=null&&f.current&&d){const p=Math.abs(s.current-c.scrollTop);if(p>0){const m=window.innerHeight-zt*2,h=parseFloat(d.style.minHeight),v=parseFloat(d.style.height),x=Math.max(h,v);if(x<m){const y=x+p,b=Math.min(m,y),$=y-b;d.style.height=b+"px",d.style.bottom==="0px"&&(c.scrollTop=$>0?$:0,d.style.justifyContent="flex-end")}}}s.current=c.scrollTop})}))))}),vw="SelectGroup",[gw,yw]=Rn(vw),bw=u.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Dt();return u.createElement(gw,{scope:n,id:o},u.createElement(we.div,ee({role:"group","aria-labelledby":o},r,{ref:t})))}),xw="SelectLabel",ww=u.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=yw(xw,n);return u.createElement(we.div,ee({id:o.id},r,{ref:t}))}),Ka="SelectItem",[$w,tf]=Rn(Ka),Cw=u.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:i,...a}=e,s=Sn(Ka,n),l=Yo(Ka,n),c=s.value===r,[d,f]=u.useState(i??""),[p,m]=u.useState(!1),h=Oe(t,y=>{var b;return(b=l.itemRefCallback)===null||b===void 0?void 0:b.call(l,y,r,o)}),v=Dt(),x=()=>{o||(s.onValueChange(r),s.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return u.createElement($w,{scope:n,value:r,disabled:o,textId:v,isSelected:c,onItemTextChange:u.useCallback(y=>{f(b=>{var $;return b||(($=y==null?void 0:y.textContent)!==null&&$!==void 0?$:"").trim()})},[])},u.createElement(qo.ItemSlot,{scope:n,value:r,disabled:o,textValue:d},u.createElement(we.div,ee({role:"option","aria-labelledby":v,"data-highlighted":p?"":void 0,"aria-selected":c&&p,"data-state":c?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1},a,{ref:h,onFocus:fe(a.onFocus,()=>m(!0)),onBlur:fe(a.onBlur,()=>m(!1)),onPointerUp:fe(a.onPointerUp,x),onPointerMove:fe(a.onPointerMove,y=>{if(o){var b;(b=l.onItemLeave)===null||b===void 0||b.call(l)}else y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:fe(a.onPointerLeave,y=>{if(y.currentTarget===document.activeElement){var b;(b=l.onItemLeave)===null||b===void 0||b.call(l)}}),onKeyDown:fe(a.onKeyDown,y=>{var b;((b=l.searchRef)===null||b===void 0?void 0:b.current)!==""&&y.key===" "||(Qx.includes(y.key)&&x(),y.key===" "&&y.preventDefault())})}))))}),Ko="SelectItemText",Sw=u.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...i}=e,a=Sn(Ko,n),s=Yo(Ko,n),l=tf(Ko,n),c=nw(Ko,n),[d,f]=u.useState(null),p=Oe(t,y=>f(y),l.onItemTextChange,y=>{var b;return(b=s.itemTextRefCallback)===null||b===void 0?void 0:b.call(s,y,l.value,l.disabled)}),m=d==null?void 0:d.textContent,h=u.useMemo(()=>u.createElement("option",{key:l.value,value:l.value,disabled:l.disabled},m),[l.disabled,l.value,m]),{onNativeOptionAdd:v,onNativeOptionRemove:x}=c;return ot(()=>(v(h),()=>x(h)),[v,x,h]),u.createElement(u.Fragment,null,u.createElement(we.span,ee({id:l.textId},i,{ref:p})),l.isSelected&&a.valueNode&&!a.valueNodeHasChildren?At.createPortal(i.children,a.valueNode):null)}),Ew="SelectItemIndicator",Tw=u.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return tf(Ew,n).isSelected?u.createElement(we.span,ee({"aria-hidden":!0},r,{ref:t})):null}),Pw=u.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return u.createElement(we.div,ee({"aria-hidden":!0},r,{ref:t}))});function nf(e){return e===""||e===void 0}const rf=u.forwardRef((e,t)=>{const{value:n,...r}=e,o=u.useRef(null),i=Oe(t,o),a=Nc(n);return u.useEffect(()=>{const s=o.current,l=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(l,"value").set;if(a!==n&&d){const f=new Event("change",{bubbles:!0});d.call(s,n),s.dispatchEvent(f)}},[a,n]),u.createElement(Zd,{asChild:!0},u.createElement("select",ee({},r,{ref:i,defaultValue:n})))});rf.displayName="BubbleSelect";function of(e){const t=He(e),n=u.useRef(""),r=u.useRef(0),o=u.useCallback(a=>{const s=n.current+a;t(s),function l(c){n.current=c,window.clearTimeout(r.current),c!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(s)},[t]),i=u.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return u.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,i]}function af(e,t,n){const o=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let a=Mw(e,Math.max(i,0));o.length===1&&(a=a.filter(c=>c!==n));const l=a.find(c=>c.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function Mw(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const kw=rw,sf=iw,Ow=sw,_w=lw,Nw=cw,lf=uw,Aw=mw,Dw=bw,cf=ww,uf=Cw,Iw=Sw,Lw=Tw,df=Pw,Fw=kw,jw=Dw,zw=Ow,ff=u.forwardRef(({className:e,children:t,...n},r)=>L.jsx("div",{className:"rabbit-ds",children:L.jsxs(sf,{ref:r,className:_e("rabbit-ds h-10 pr-3 py-2.5 rounded-tl text-sm rounded-tr border-b border-dashed hover:border-solid border-zinc-800 justify-between items-center gap-2 inline-flex focus:outline-none focus:border-solid disabled:cursor-not-allowed disabled:opacity-50",e),...n,children:[t,L.jsx(_w,{asChild:!0,children:L.jsx(Zg,{className:"h-4 w-4"})})]})}));ff.displayName=sf.displayName;const pf=u.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>L.jsx(Nw,{children:L.jsx(lf,{ref:o,className:_e("relative z-[1500] rabbit-ds min-w-[8rem] max-w-xs p-1 bg-white rounded-lg shadow flex-col justify-start items-start gap-1 inline-flex data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-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",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:L.jsx(Aw,{className:_e("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t})})}));pf.displayName=lf.displayName;const hf=u.forwardRef(({className:e,...t},n)=>L.jsx(cf,{ref:n,className:_e("py-1.5 px-2 text-sm font-semibold",e),...t}));hf.displayName=cf.displayName;const mf=u.forwardRef(({className:e,children:t,...n},r)=>L.jsxs(uf,{ref:r,className:_e("relative flex w-full my-1 cursor-default select-none p-2 bg-white rounded flex-col hover:bg-sky-100 hover:text-sky-800 hover:cursor-pointer justify-start items-start text-zinc-800 text-sm font-normal leading-tight focus:bg-sky-100 focus:text-sky-800 data-[state=checked]:bg-sky-100 data-[state=checked]:text-sky-800 focus:outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[L.jsx("span",{className:"absolute right-2 flex h-4 w-4 items-center justify-center",children:L.jsx(Lw,{children:L.jsx(pa,{className:"h-4 w-4 text-sky-800"})})}),L.jsx(Iw,{children:t})]}));mf.displayName=uf.displayName;const vf=u.forwardRef(({className:e,...t},n)=>L.jsx(df,{ref:n,className:_e("-mx-1 my-1 h-px bg-muted",e),...t}));vf.displayName=df.displayName;const Xa="dismissableLayer.update",Ww="dismissableLayer.pointerDownOutside",Bw="dismissableLayer.focusOutside";let gf;const Uw=u.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Hw=u.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...c}=e,d=u.useContext(Uw),[f,p]=u.useState(null),m=(n=f==null?void 0:f.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,h]=u.useState({}),v=Oe(t,P=>p(P)),x=Array.from(d.layers),[y]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),b=x.indexOf(y),$=f?x.indexOf(f):-1,S=d.layersWithOutsidePointerEventsDisabled.size>0,w=$>=b,T=Gw(P=>{const _=P.target,j=[...d.branches].some(F=>F.contains(_));!w||j||(i==null||i(P),s==null||s(P),P.defaultPrevented||l==null||l())},m),O=Vw(P=>{const _=P.target;[...d.branches].some(F=>F.contains(_))||(a==null||a(P),s==null||s(P),P.defaultPrevented||l==null||l())},m);return eu(P=>{$===d.layers.size-1&&(o==null||o(P),!P.defaultPrevented&&l&&(P.preventDefault(),l()))},m),u.useEffect(()=>{if(f)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(gf=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),yf(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=gf)}},[f,m,r,d]),u.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),yf())},[f,d]),u.useEffect(()=>{const P=()=>h({});return document.addEventListener(Xa,P),()=>document.removeEventListener(Xa,P)},[]),u.createElement(we.div,ee({},c,{ref:v,style:{pointerEvents:S?w?"auto":"none":void 0,...e.style},onFocusCapture:fe(e.onFocusCapture,O.onFocusCapture),onBlurCapture:fe(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:fe(e.onPointerDownCapture,T.onPointerDownCapture)}))});function Gw(e,t=globalThis==null?void 0:globalThis.document){const n=He(e),r=u.useRef(!1),o=u.useRef(()=>{});return u.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let c=function(){bf(Ww,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Vw(e,t=globalThis==null?void 0:globalThis.document){const n=He(e),r=u.useRef(!1);return u.useEffect(()=>{const o=i=>{i.target&&!r.current&&bf(Bw,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function yf(){const e=new CustomEvent(Xa);document.dispatchEvent(e)}function bf(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?fa(o,i):o.dispatchEvent(i)}const xf="Popper",[wf,$f]=Ct(xf),[qw,Cf]=wf(xf),Yw=e=>{const{__scopePopper:t,children:n}=e,[r,o]=u.useState(null);return u.createElement(qw,{scope:t,anchor:r,onAnchorChange:o},n)},Kw="PopperAnchor",Xw=u.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=Cf(Kw,n),a=u.useRef(null),s=Oe(t,a);return u.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:u.createElement(we.div,ee({},o,{ref:s}))}),Sf="PopperContent",[Rw,Z3]=wf(Sf),Zw=u.forwardRef((e,t)=>{var n,r,o,i,a,s,l,c;const{__scopePopper:d,side:f="bottom",sideOffset:p=0,align:m="center",alignOffset:h=0,arrowPadding:v=0,collisionBoundary:x=[],collisionPadding:y=0,sticky:b="partial",hideWhenDetached:$=!1,avoidCollisions:S=!0,onPlaced:w,...T}=e,O=Cf(Sf,d),[P,_]=u.useState(null),j=Oe(t,pe=>_(pe)),[F,V]=u.useState(null),R=ua(F),X=(n=R==null?void 0:R.width)!==null&&n!==void 0?n:0,C=(r=R==null?void 0:R.height)!==null&&r!==void 0?r:0,I=f+(m!=="center"?"-"+m:""),H=typeof y=="number"?y:{top:0,right:0,bottom:0,left:0,...y},B=Array.isArray(x)?x:[x],A=B.length>0,N={padding:H,boundary:B.filter(Qw),altBoundary:A},{refs:z,floatingStyles:J,placement:Q,isPositioned:oe,middlewareData:te}=zu({strategy:"fixed",placement:I,whileElementsMounted:Du,elements:{reference:O.anchor},middleware:[xu({mainAxis:p+C,alignmentAxis:h}),S&&wu({mainAxis:!0,crossAxis:!1,limiter:b==="partial"?$u():void 0,...N}),S&&vu({...N}),Cu({...N,apply:({elements:pe,rects:Ce,availableWidth:ke,availableHeight:je})=>{const{width:_t,height:mn}=Ce.reference,Ze=pe.floating.style;Ze.setProperty("--radix-popper-available-width",`${ke}px`),Ze.setProperty("--radix-popper-available-height",`${je}px`),Ze.setProperty("--radix-popper-anchor-width",`${_t}px`),Ze.setProperty("--radix-popper-anchor-height",`${mn}px`)}}),F&&Iu({element:F,padding:v}),Jw({arrowWidth:X,arrowHeight:C}),$&&bu({strategy:"referenceHidden"})]}),[ae,Y]=Ef(Q),le=He(w);ot(()=>{oe&&(le==null||le())},[oe,le]);const U=(o=te.arrow)===null||o===void 0?void 0:o.x,q=(i=te.arrow)===null||i===void 0?void 0:i.y,re=((a=te.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[k,de]=u.useState();return ot(()=>{P&&de(window.getComputedStyle(P).zIndex)},[P]),u.createElement("div",{ref:z.setFloating,"data-radix-popper-content-wrapper":"",style:{...J,transform:oe?J.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:k,"--radix-popper-transform-origin":[(s=te.transformOrigin)===null||s===void 0?void 0:s.x,(l=te.transformOrigin)===null||l===void 0?void 0:l.y].join(" ")},dir:e.dir},u.createElement(Rw,{scope:d,placedSide:ae,onArrowChange:V,arrowX:U,arrowY:q,shouldHideArrow:re},u.createElement(we.div,ee({"data-side":ae,"data-align":Y},T,{ref:j,style:{...T.style,animation:oe?void 0:"none",opacity:(c=te.hide)!==null&&c!==void 0&&c.referenceHidden?0:void 0}}))))});function Qw(e){return e!==null}const Jw=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,i,a;const{placement:s,rects:l,middlewareData:c}=t,f=((n=c.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,p=f?0:e.arrowWidth,m=f?0:e.arrowHeight,[h,v]=Ef(s),x={start:"0%",center:"50%",end:"100%"}[v],y=((r=(o=c.arrow)===null||o===void 0?void 0:o.x)!==null&&r!==void 0?r:0)+p/2,b=((i=(a=c.arrow)===null||a===void 0?void 0:a.y)!==null&&i!==void 0?i:0)+m/2;let $="",S="";return h==="bottom"?($=f?x:`${y}px`,S=`${-m}px`):h==="top"?($=f?x:`${y}px`,S=`${l.floating.height+m}px`):h==="right"?($=`${-m}px`,S=f?x:`${b}px`):h==="left"&&($=`${l.floating.width+m}px`,S=f?x:`${b}px`),{data:{x:$,y:S}}}});function Ef(e){const[t,n="center"]=e.split("-");return[t,n]}const e1=Yw,t1=Xw,n1=Zw,r1=u.forwardRef((e,t)=>{var n;const{container:r=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...o}=e;return r?At.createPortal(u.createElement(we.div,ee({},o,{ref:t})),r):null}),[Xo,Q3]=Ct("Tooltip",[$f]),Ra=$f(),o1="TooltipProvider",i1=700,Za="tooltip.open",[a1,Qa]=Xo(o1),s1=e=>{const{__scopeTooltip:t,delayDuration:n=i1,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,[a,s]=u.useState(!0),l=u.useRef(!1),c=u.useRef(0);return u.useEffect(()=>{const d=c.current;return()=>window.clearTimeout(d)},[]),u.createElement(a1,{scope:t,isOpenDelayed:a,delayDuration:n,onOpen:u.useCallback(()=>{window.clearTimeout(c.current),s(!1)},[]),onClose:u.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>s(!0),r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:u.useCallback(d=>{l.current=d},[]),disableHoverableContent:o},i)},Ja="Tooltip",[l1,_r]=Xo(Ja),c1=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:i,disableHoverableContent:a,delayDuration:s}=e,l=Qa(Ja,e.__scopeTooltip),c=Ra(t),[d,f]=u.useState(null),p=Dt(),m=u.useRef(0),h=a??l.disableHoverableContent,v=s??l.delayDuration,x=u.useRef(!1),[y=!1,b]=St({prop:r,defaultProp:o,onChange:O=>{O?(l.onOpen(),document.dispatchEvent(new CustomEvent(Za))):l.onClose(),i==null||i(O)}}),$=u.useMemo(()=>y?x.current?"delayed-open":"instant-open":"closed",[y]),S=u.useCallback(()=>{window.clearTimeout(m.current),x.current=!1,b(!0)},[b]),w=u.useCallback(()=>{window.clearTimeout(m.current),b(!1)},[b]),T=u.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{x.current=!0,b(!0)},v)},[v,b]);return u.useEffect(()=>()=>window.clearTimeout(m.current),[]),u.createElement(e1,c,u.createElement(l1,{scope:t,contentId:p,open:y,stateAttribute:$,trigger:d,onTriggerChange:f,onTriggerEnter:u.useCallback(()=>{l.isOpenDelayed?T():S()},[l.isOpenDelayed,T,S]),onTriggerLeave:u.useCallback(()=>{h?w():window.clearTimeout(m.current)},[w,h]),onOpen:S,onClose:w,disableHoverableContent:h},n))},Tf="TooltipTrigger",u1=u.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=_r(Tf,n),i=Qa(Tf,n),a=Ra(n),s=u.useRef(null),l=Oe(t,s,o.onTriggerChange),c=u.useRef(!1),d=u.useRef(!1),f=u.useCallback(()=>c.current=!1,[]);return u.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),u.createElement(t1,ee({asChild:!0},a),u.createElement(we.button,ee({"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute},r,{ref:l,onPointerMove:fe(e.onPointerMove,p=>{p.pointerType!=="touch"&&!d.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:fe(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:fe(e.onPointerDown,()=>{c.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:fe(e.onFocus,()=>{c.current||o.onOpen()}),onBlur:fe(e.onBlur,o.onClose),onClick:fe(e.onClick,o.onClose)})))}),Pf="TooltipPortal",[d1,f1]=Xo(Pf,{forceMount:void 0}),p1=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,i=_r(Pf,t);return u.createElement(d1,{scope:t,forceMount:n},u.createElement(Zt,{present:n||i.open},u.createElement(r1,{asChild:!0,container:o},r)))},Nr="TooltipContent",h1=u.forwardRef((e,t)=>{const n=f1(Nr,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,a=_r(Nr,e.__scopeTooltip);return u.createElement(Zt,{present:r||a.open},a.disableHoverableContent?u.createElement(Mf,ee({side:o},i,{ref:t})):u.createElement(m1,ee({side:o},i,{ref:t})))}),m1=u.forwardRef((e,t)=>{const n=_r(Nr,e.__scopeTooltip),r=Qa(Nr,e.__scopeTooltip),o=u.useRef(null),i=Oe(t,o),[a,s]=u.useState(null),{trigger:l,onClose:c}=n,d=o.current,{onPointerInTransitChange:f}=r,p=u.useCallback(()=>{s(null),f(!1)},[f]),m=u.useCallback((h,v)=>{const x=h.currentTarget,y={x:h.clientX,y:h.clientY},b=g1(y,x.getBoundingClientRect()),$=y1(y,b),S=b1(v.getBoundingClientRect()),w=w1([...$,...S]);s(w),f(!0)},[f]);return u.useEffect(()=>()=>p(),[p]),u.useEffect(()=>{if(l&&d){const h=x=>m(x,d),v=x=>m(x,l);return l.addEventListener("pointerleave",h),d.addEventListener("pointerleave",v),()=>{l.removeEventListener("pointerleave",h),d.removeEventListener("pointerleave",v)}}},[l,d,m,p]),u.useEffect(()=>{if(a){const h=v=>{const x=v.target,y={x:v.clientX,y:v.clientY},b=(l==null?void 0:l.contains(x))||(d==null?void 0:d.contains(x)),$=!x1(y,a);b?p():$&&(p(),c())};return document.addEventListener("pointermove",h),()=>document.removeEventListener("pointermove",h)}},[l,d,a,c,p]),u.createElement(Mf,ee({},e,{ref:i}))}),[v1,J3]=Xo(Ja,{isInside:!1}),Mf=u.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:a,...s}=e,l=_r(Nr,n),c=Ra(n),{onClose:d}=l;return u.useEffect(()=>(document.addEventListener(Za,d),()=>document.removeEventListener(Za,d)),[d]),u.useEffect(()=>{if(l.trigger){const f=p=>{const m=p.target;m!=null&&m.contains(l.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,d]),u.createElement(Hw,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:f=>f.preventDefault(),onDismiss:d},u.createElement(n1,ee({"data-state":l.stateAttribute},c,s,{ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}}),u.createElement(Ac,null,r),u.createElement(v1,{scope:n,isInside:!0},u.createElement(Rx,{id:l.contentId,role:"tooltip"},o||r))))});function g1(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function y1(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function b1(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function x1(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const s=t[i].x,l=t[i].y,c=t[a].x,d=t[a].y;l>r!=d>r&&n<(c-s)*(r-l)/(d-l)+s&&(o=!o)}return o}function w1(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),$1(t)}function $1(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const i=t[t.length-1],a=t[t.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const i=n[n.length-1],a=n[n.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}const C1=s1,S1=c1,E1=u1,T1=p1,kf=h1,Of=C1,_f=S1,Nf=E1,Af=T1,es=u.forwardRef(({className:e,sideOffset:t=4,...n},r)=>L.jsx(kf,{ref:r,sideOffset:t,className:_e("z-[1500] overflow-hidden p-2 bg-gray-600 max-w-xs rounded transition-opacity justify-start items-start inline-flex text-center text-white text-xs animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-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",e,"rabbit-ds"),...n}));es.displayName=kf.displayName;var Ar=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Qn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Jn(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var ts={exports:{}},Ro={exports:{}},Pe={};/** @license React v16.13.1
|
|
41
|
+
`)},Nb=0,Xn=[];function Db(e){var t=ve.useRef([]),n=ve.useRef([0,0]),r=ve.useRef(),o=ve.useState(Nb++)[0],i=ve.useState(function(){return dd()})[0],a=ve.useRef(e);ve.useEffect(function(){a.current=e},[e]),ve.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var v=tb([e.lockRef.current],(e.shards||[]).map(gd),!0).filter(Boolean);return v.forEach(function(w){return w.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),v.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=ve.useCallback(function(v,w){if("touches"in v&&v.touches.length===2)return!a.current.allowPinchZoom;var y=Wo(v),b=n.current,$="deltaX"in v?v.deltaX:b[0]-y[0],S="deltaY"in v?v.deltaY:b[1]-y[1],x,T=v.target,O=Math.abs($)>Math.abs(S)?"h":"v";if("touches"in v&&O==="h"&&T.type==="range")return!1;var P=pd(O,T);if(!P)return!0;if(P?x=O:(x=O==="v"?"h":"v",P=pd(O,T)),!P)return!1;if(!r.current&&"changedTouches"in v&&($||S)&&(r.current=x),!x)return!0;var _=r.current||x;return kb(_,w,v,_==="h"?$:S,!0)},[]),l=ve.useCallback(function(v){var w=v;if(!(!Xn.length||Xn[Xn.length-1]!==i)){var y="deltaY"in w?vd(w):Wo(w),b=t.current.filter(function(x){return x.name===w.type&&x.target===w.target&&Ob(x.delta,y)})[0];if(b&&b.should){w.cancelable&&w.preventDefault();return}if(!b){var $=(a.current.shards||[]).map(gd).filter(Boolean).filter(function(x){return x.contains(w.target)}),S=$.length>0?s(w,$[0]):!a.current.noIsolation;S&&w.cancelable&&w.preventDefault()}}},[]),c=ve.useCallback(function(v,w,y,b){var $={name:v,delta:w,target:y,should:b};t.current.push($),setTimeout(function(){t.current=t.current.filter(function(S){return S!==$})},1)},[]),d=ve.useCallback(function(v){n.current=Wo(v),r.current=void 0},[]),f=ve.useCallback(function(v){c(v.type,vd(v),v.target,s(v,e.lockRef.current))},[]),p=ve.useCallback(function(v){c(v.type,Wo(v),v.target,s(v,e.lockRef.current))},[]);ve.useEffect(function(){return Xn.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",l,Kn),document.addEventListener("touchmove",l,Kn),document.addEventListener("touchstart",d,Kn),function(){Xn=Xn.filter(function(v){return v!==i}),document.removeEventListener("wheel",l,Kn),document.removeEventListener("touchmove",l,Kn),document.removeEventListener("touchstart",d,Kn)}},[]);var m=e.removeScrollBar,h=e.inert;return ve.createElement(ve.Fragment,null,h?ve.createElement(i,{styles:_b(o)}):null,m?ve.createElement($b,{gapMode:"margin"}):null)}const Ab=ub(cd,Db);var yd=ve.forwardRef(function(e,t){return ve.createElement(zo,Tt({},e,{ref:t,sideCar:Ab}))});yd.classNames=zo.classNames;const bd=yd,Wa=["Enter"," "],Ib=["ArrowDown","PageUp","Home"],wd=["ArrowUp","PageDown","End"],Lb=[...Ib,...wd],Fb={ltr:[...Wa,"ArrowRight"],rtl:[...Wa,"ArrowLeft"]},jb={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Uo="Menu",[kr,zb,Bb]=wa(Uo),[Cn,xd]=Ct(Uo,[Bb,Do,Ao]),Ho=Do(),$d=Ao(),[Cd,rn]=Cn(Uo),[Wb,Or]=Cn(Uo),Ub=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:i,modal:a=!0}=e,s=Ho(t),[l,c]=u.useState(null),d=u.useRef(!1),f=He(i),p=Co(o);return u.useEffect(()=>{const m=()=>{d.current=!0,document.addEventListener("pointerdown",h,{capture:!0,once:!0}),document.addEventListener("pointermove",h,{capture:!0,once:!0})},h=()=>d.current=!1;return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",h,{capture:!0}),document.removeEventListener("pointermove",h,{capture:!0})}},[]),u.createElement(Da,s,u.createElement(Cd,{scope:t,open:n,onOpenChange:f,content:l,onContentChange:c},u.createElement(Wb,{scope:t,onClose:u.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:d,dir:p,modal:a},r)))},Sd=u.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Ho(n);return u.createElement(Qu,ee({},o,r,{ref:t}))}),Ed="MenuPortal",[Hb,Td]=Cn(Ed,{forceMount:void 0}),Gb=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,i=rn(Ed,t);return u.createElement(Hb,{scope:t,forceMount:n},u.createElement(Zt,{present:n||i.open},u.createElement(ed,{asChild:!0,container:o},r)))},mt="MenuContent",[Vb,Ua]=Cn(mt),qb=u.forwardRef((e,t)=>{const n=Td(mt,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=rn(mt,e.__scopeMenu),a=Or(mt,e.__scopeMenu);return u.createElement(kr.Provider,{scope:e.__scopeMenu},u.createElement(Zt,{present:r||i.open},u.createElement(kr.Slot,{scope:e.__scopeMenu},a.modal?u.createElement(Yb,ee({},o,{ref:t})):u.createElement(Kb,ee({},o,{ref:t})))))}),Yb=u.forwardRef((e,t)=>{const n=rn(mt,e.__scopeMenu),r=u.useRef(null),o=Oe(t,r);return u.useEffect(()=>{const i=r.current;if(i)return ad(i)},[]),u.createElement(Ha,ee({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:fe(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),Kb=u.forwardRef((e,t)=>{const n=rn(mt,e.__scopeMenu);return u.createElement(Ha,ee({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),Ha=u.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEntryFocus:l,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:p,onDismiss:m,disableOutsideScroll:h,...v}=e,w=rn(mt,n),y=Or(mt,n),b=Ho(n),$=$d(n),S=zb(n),[x,T]=u.useState(null),O=u.useRef(null),P=Oe(t,O,w.onContentChange),_=u.useRef(0),j=u.useRef(""),F=u.useRef(0),V=u.useRef(null),R=u.useRef("right"),X=u.useRef(0),C=h?bd:u.Fragment,L=h?{as:yn,allowPinchZoom:!0}:void 0,H=D=>{var N,z;const J=j.current+D,Q=S().filter(U=>!U.disabled),oe=document.activeElement,te=(N=Q.find(U=>U.ref.current===oe))===null||N===void 0?void 0:N.textValue,ae=Q.map(U=>U.textValue),Y=pw(ae,J,te),le=(z=Q.find(U=>U.textValue===Y))===null||z===void 0?void 0:z.ref.current;(function U(q){j.current=q,window.clearTimeout(_.current),q!==""&&(_.current=window.setTimeout(()=>U(""),1e3))})(J),le&&setTimeout(()=>le.focus())};u.useEffect(()=>()=>window.clearTimeout(_.current),[]),fu();const W=u.useCallback(D=>{var N,z;return R.current===((N=V.current)===null||N===void 0?void 0:N.side)&&mw(D,(z=V.current)===null||z===void 0?void 0:z.area)},[]);return u.createElement(Vb,{scope:n,searchRef:j,onItemEnter:u.useCallback(D=>{W(D)&&D.preventDefault()},[W]),onItemLeave:u.useCallback(D=>{var N;W(D)||((N=O.current)===null||N===void 0||N.focus(),T(null))},[W]),onTriggerLeave:u.useCallback(D=>{W(D)&&D.preventDefault()},[W]),pointerGraceTimerRef:F,onPointerGraceIntentChange:u.useCallback(D=>{V.current=D},[])},u.createElement(C,L,u.createElement(mu,{asChild:!0,trapped:o,onMountAutoFocus:fe(i,D=>{var N;D.preventDefault(),(N=O.current)===null||N===void 0||N.focus()}),onUnmountAutoFocus:a},u.createElement(cu,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:p,onDismiss:m},u.createElement(rd,ee({asChild:!0},$,{dir:y.dir,orientation:"vertical",loop:r,currentTabStopId:x,onCurrentTabStopIdChange:T,onEntryFocus:fe(l,D=>{y.isUsingKeyboardRef.current||D.preventDefault()})}),u.createElement(Ju,ee({role:"menu","aria-orientation":"vertical","data-state":Ad(w.open),"data-radix-menu-content":"",dir:y.dir},b,v,{ref:P,style:{outline:"none",...v.style},onKeyDown:fe(v.onKeyDown,D=>{const z=D.target.closest("[data-radix-menu-content]")===D.currentTarget,J=D.ctrlKey||D.altKey||D.metaKey,Q=D.key.length===1;z&&(D.key==="Tab"&&D.preventDefault(),!J&&Q&&H(D.key));const oe=O.current;if(D.target!==oe||!Lb.includes(D.key))return;D.preventDefault();const ae=S().filter(Y=>!Y.disabled).map(Y=>Y.ref.current);wd.includes(D.key)&&ae.reverse(),dw(ae)}),onBlur:fe(e.onBlur,D=>{D.currentTarget.contains(D.target)||(window.clearTimeout(_.current),j.current="")}),onPointerMove:fe(e.onPointerMove,_r(D=>{const N=D.target,z=X.current!==D.clientX;if(D.currentTarget.contains(N)&&z){const J=D.clientX>X.current?"right":"left";R.current=J,X.current=D.clientX}}))})))))))}),Pd=u.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return u.createElement(xe.div,ee({role:"group"},r,{ref:t}))}),Xb=u.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return u.createElement(xe.div,ee({},r,{ref:t}))}),Ga="MenuItem",Md="menu.itemSelect",Va=u.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,i=u.useRef(null),a=Or(Ga,e.__scopeMenu),s=Ua(Ga,e.__scopeMenu),l=Oe(t,i),c=u.useRef(!1),d=()=>{const f=i.current;if(!n&&f){const p=new CustomEvent(Md,{bubbles:!0,cancelable:!0});f.addEventListener(Md,m=>r==null?void 0:r(m),{once:!0}),pa(f,p),p.defaultPrevented?c.current=!1:a.onClose()}};return u.createElement(kd,ee({},o,{ref:l,disabled:n,onClick:fe(e.onClick,d),onPointerDown:f=>{var p;(p=e.onPointerDown)===null||p===void 0||p.call(e,f),c.current=!0},onPointerUp:fe(e.onPointerUp,f=>{var p;c.current||(p=f.currentTarget)===null||p===void 0||p.click()}),onKeyDown:fe(e.onKeyDown,f=>{const p=s.searchRef.current!=="";n||p&&f.key===" "||Wa.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})}))}),kd=u.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...i}=e,a=Ua(Ga,n),s=$d(n),l=u.useRef(null),c=Oe(t,l),[d,f]=u.useState(!1),[p,m]=u.useState("");return u.useEffect(()=>{const h=l.current;if(h){var v;m(((v=h.textContent)!==null&&v!==void 0?v:"").trim())}},[i.children]),u.createElement(kr.ItemSlot,{scope:n,disabled:r,textValue:o??p},u.createElement(od,ee({asChild:!0},s,{focusable:!r}),u.createElement(xe.div,ee({role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},i,{ref:c,onPointerMove:fe(e.onPointerMove,_r(h=>{r?a.onItemLeave(h):(a.onItemEnter(h),h.defaultPrevented||h.currentTarget.focus())})),onPointerLeave:fe(e.onPointerLeave,_r(h=>a.onItemLeave(h))),onFocus:fe(e.onFocus,()=>f(!0)),onBlur:fe(e.onBlur,()=>f(!1))}))))}),Rb=u.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return u.createElement(_d,{scope:e.__scopeMenu,checked:n},u.createElement(Va,ee({role:"menuitemcheckbox","aria-checked":Vo(n)?"mixed":n},o,{ref:t,"data-state":qa(n),onSelect:fe(o.onSelect,()=>r==null?void 0:r(Vo(n)?!0:!n),{checkForDefaultPrevented:!1})})))}),Zb="MenuRadioGroup",[Qb,Jb]=Cn(Zb,{value:void 0,onValueChange:()=>{}}),ew=u.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,i=He(r);return u.createElement(Qb,{scope:e.__scopeMenu,value:n,onValueChange:i},u.createElement(Pd,ee({},o,{ref:t})))}),tw="MenuRadioItem",nw=u.forwardRef((e,t)=>{const{value:n,...r}=e,o=Jb(tw,e.__scopeMenu),i=n===o.value;return u.createElement(_d,{scope:e.__scopeMenu,checked:i},u.createElement(Va,ee({role:"menuitemradio","aria-checked":i},r,{ref:t,"data-state":qa(i),onSelect:fe(r.onSelect,()=>{var a;return(a=o.onValueChange)===null||a===void 0?void 0:a.call(o,n)},{checkForDefaultPrevented:!1})})))}),Od="MenuItemIndicator",[_d,rw]=Cn(Od,{checked:!1}),ow=u.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,i=rw(Od,n);return u.createElement(Zt,{present:r||Vo(i.checked)||i.checked===!0},u.createElement(xe.span,ee({},o,{ref:t,"data-state":qa(i.checked)})))}),iw=u.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return u.createElement(xe.div,ee({role:"separator","aria-orientation":"horizontal"},r,{ref:t}))}),Nd="MenuSub",[aw,Dd]=Cn(Nd),sw=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,i=rn(Nd,t),a=Ho(t),[s,l]=u.useState(null),[c,d]=u.useState(null),f=He(o);return u.useEffect(()=>(i.open===!1&&f(!1),()=>f(!1)),[i.open,f]),u.createElement(Da,a,u.createElement(Cd,{scope:t,open:r,onOpenChange:f,content:c,onContentChange:d},u.createElement(aw,{scope:t,contentId:At(),triggerId:At(),trigger:s,onTriggerChange:l},n)))},Go="MenuSubTrigger",lw=u.forwardRef((e,t)=>{const n=rn(Go,e.__scopeMenu),r=Or(Go,e.__scopeMenu),o=Dd(Go,e.__scopeMenu),i=Ua(Go,e.__scopeMenu),a=u.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:l}=i,c={__scopeMenu:e.__scopeMenu},d=u.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return u.useEffect(()=>d,[d]),u.useEffect(()=>{const f=s.current;return()=>{window.clearTimeout(f),l(null)}},[s,l]),u.createElement(Sd,ee({asChild:!0},c),u.createElement(kd,ee({id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":Ad(n.open)},e,{ref:wo(t,o.onTriggerChange),onClick:f=>{var p;(p=e.onClick)===null||p===void 0||p.call(e,f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:fe(e.onPointerMove,_r(f=>{i.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!a.current&&(i.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:fe(e.onPointerLeave,_r(f=>{var p;d();const m=(p=n.content)===null||p===void 0?void 0:p.getBoundingClientRect();if(m){var h;const v=(h=n.content)===null||h===void 0?void 0:h.dataset.side,w=v==="right",y=w?-5:5,b=m[w?"left":"right"],$=m[w?"right":"left"];i.onPointerGraceIntentChange({area:[{x:f.clientX+y,y:f.clientY},{x:b,y:m.top},{x:$,y:m.top},{x:$,y:m.bottom},{x:b,y:m.bottom}],side:v}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(f),f.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:fe(e.onKeyDown,f=>{const p=i.searchRef.current!=="";if(!(e.disabled||p&&f.key===" ")&&Fb[r.dir].includes(f.key)){var m;n.onOpenChange(!0),(m=n.content)===null||m===void 0||m.focus(),f.preventDefault()}})})))}),cw="MenuSubContent",uw=u.forwardRef((e,t)=>{const n=Td(mt,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=rn(mt,e.__scopeMenu),a=Or(mt,e.__scopeMenu),s=Dd(cw,e.__scopeMenu),l=u.useRef(null),c=Oe(t,l);return u.createElement(kr.Provider,{scope:e.__scopeMenu},u.createElement(Zt,{present:r||i.open},u.createElement(kr.Slot,{scope:e.__scopeMenu},u.createElement(Ha,ee({id:s.contentId,"aria-labelledby":s.triggerId},o,{ref:c,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{var f;a.isUsingKeyboardRef.current&&((f=l.current)===null||f===void 0||f.focus()),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:fe(e.onFocusOutside,d=>{d.target!==s.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:fe(e.onEscapeKeyDown,d=>{a.onClose(),d.preventDefault()}),onKeyDown:fe(e.onKeyDown,d=>{const f=d.currentTarget.contains(d.target),p=jb[a.dir].includes(d.key);if(f&&p){var m;i.onOpenChange(!1),(m=s.trigger)===null||m===void 0||m.focus(),d.preventDefault()}})})))))});function Ad(e){return e?"open":"closed"}function Vo(e){return e==="indeterminate"}function qa(e){return Vo(e)?"indeterminate":e?"checked":"unchecked"}function dw(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function fw(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function pw(e,t,n){const o=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let a=fw(e,Math.max(i,0));o.length===1&&(a=a.filter(c=>c!==n));const l=a.find(c=>c.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function hw(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const s=t[i].x,l=t[i].y,c=t[a].x,d=t[a].y;l>r!=d>r&&n<(c-s)*(r-l)/(d-l)+s&&(o=!o)}return o}function mw(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return hw(n,t)}function _r(e){return t=>t.pointerType==="mouse"?e(t):void 0}const vw=Ub,gw=Sd,yw=Gb,bw=qb,ww=Pd,xw=Xb,$w=Va,Cw=Rb,Sw=ew,Ew=nw,Tw=ow,Pw=iw,Mw=sw,kw=lw,Ow=uw,Id="DropdownMenu",[_w,r6]=Ct(Id,[xd]),Ge=xd(),[Nw,Ld]=_w(Id),Dw=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:i,onOpenChange:a,modal:s=!0}=e,l=Ge(t),c=u.useRef(null),[d=!1,f]=St({prop:o,defaultProp:i,onChange:a});return u.createElement(Nw,{scope:t,triggerId:At(),triggerRef:c,contentId:At(),open:d,onOpenChange:f,onOpenToggle:u.useCallback(()=>f(p=>!p),[f]),modal:s},u.createElement(vw,ee({},l,{open:d,onOpenChange:f,dir:r,modal:s}),n))},Aw="DropdownMenuTrigger",Iw=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,i=Ld(Aw,n),a=Ge(n);return u.createElement(gw,ee({asChild:!0},a),u.createElement(xe.button,ee({type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":r?"":void 0,disabled:r},o,{ref:wo(t,i.triggerRef),onPointerDown:fe(e.onPointerDown,s=>{!r&&s.button===0&&s.ctrlKey===!1&&(i.onOpenToggle(),i.open||s.preventDefault())}),onKeyDown:fe(e.onKeyDown,s=>{r||(["Enter"," "].includes(s.key)&&i.onOpenToggle(),s.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(s.key)&&s.preventDefault())})})))}),Lw=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Ge(t);return u.createElement(yw,ee({},r,n))},Fw="DropdownMenuContent",jw=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ld(Fw,n),i=Ge(n),a=u.useRef(!1);return u.createElement(bw,ee({id:o.contentId,"aria-labelledby":o.triggerId},i,r,{ref:t,onCloseAutoFocus:fe(e.onCloseAutoFocus,s=>{var l;a.current||(l=o.triggerRef.current)===null||l===void 0||l.focus(),a.current=!1,s.preventDefault()}),onInteractOutside:fe(e.onInteractOutside,s=>{const l=s.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0,d=l.button===2||c;(!o.modal||d)&&(a.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}}))}),zw=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ge(n);return u.createElement(ww,ee({},o,r,{ref:t}))}),Bw=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ge(n);return u.createElement(xw,ee({},o,r,{ref:t}))}),Ww=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ge(n);return u.createElement($w,ee({},o,r,{ref:t}))}),Uw=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ge(n);return u.createElement(Cw,ee({},o,r,{ref:t}))}),Hw=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ge(n);return u.createElement(Sw,ee({},o,r,{ref:t}))}),Gw=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ge(n);return u.createElement(Ew,ee({},o,r,{ref:t}))}),Vw=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ge(n);return u.createElement(Tw,ee({},o,r,{ref:t}))}),qw=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ge(n);return u.createElement(Pw,ee({},o,r,{ref:t}))}),Yw=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:i}=e,a=Ge(t),[s=!1,l]=St({prop:r,defaultProp:i,onChange:o});return u.createElement(Mw,ee({},a,{open:s,onOpenChange:l}),n)},Kw=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ge(n);return u.createElement(kw,ee({},o,r,{ref:t}))}),Xw=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ge(n);return u.createElement(Ow,ee({},o,r,{ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}}))}),Rw=Dw,Zw=Iw,Fd=Lw,jd=jw,zd=zw,Bd=Bw,Wd=Ww,Ud=Uw,Qw=Hw,Hd=Gw,Gd=Vw,Vd=qw,Jw=Yw,qd=Kw,Yd=Xw,Kd=Rw,Xd=Zw,ex=Fd,tx=Jw,Rd=Qw,Ya=u.forwardRef(({className:e,...t},n)=>A.jsx(zd,{ref:n,className:_e("w-full",e),...t}));Ya.displayName=zd.displayName;const Zd=u.forwardRef(({className:e,children:t,...n},r)=>A.jsxs(qd,{ref:r,className:_e("flex cursor-default select-none px-2 py-1.5 bg-white rounded hover:bg-sky-100 hover:text-sky-800 hover:cursor-pointer justify-start items-start text-zinc-800 text-sm font-normal leading-tight focus:bg-sky-100 focus:text-sky-800 data-[state=checked]:bg-sky-100 data-[state=checked]:text-sky-800 focus:outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[t,A.jsx(l0,{className:"ml-auto h-4 w-4"})]}));Zd.displayName=qd.displayName;const Qd=u.forwardRef(({className:e,...t},n)=>A.jsx(Yd,{ref:n,className:_e("rabbit-ds z-[1510] rabbit-ds min-w-[8rem] max-w-xs p-1 bg-white rounded-lg shadow flex flex-col justify-start items-start gap-1 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-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",e),...t}));Qd.displayName=Yd.displayName;const Ka=u.forwardRef(({className:e,sideOffset:t=4,...n},r)=>A.jsx(Fd,{children:A.jsx(jd,{ref:r,sideOffset:t,className:_e("rabbit-ds z-[1500] rabbit-ds min-w-[8rem] max-w-xs p-1 bg-white rounded-lg shadow flex flex-col justify-start items-start gap-1 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-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",e),...n})}));Ka.displayName=jd.displayName;const Xa=u.forwardRef(({className:e,...t},n)=>A.jsx(Wd,{ref:n,className:_e("relative flex flex-row w-full my-1 cursor-default select-none p-2 bg-white rounded hover:bg-sky-100 hover:text-sky-800 hover:cursor-pointer justify-start items-start text-zinc-800 text-sm font-normal leading-tight focus:bg-sky-100 focus:text-sky-800 data-[state=checked]:bg-sky-100 data-[state=checked]:text-sky-800 focus:outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...t}));Xa.displayName=Wd.displayName;const Ra=u.forwardRef(({className:e,children:t,checked:n,...r},o)=>A.jsxs(Ud,{ref:o,className:_e("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[A.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:A.jsx(Gd,{children:A.jsx(ha,{className:"h-4 w-4 text-sky-800"})})}),t]}));Ra.displayName=Ud.displayName;const Za=u.forwardRef(({className:e,children:t,...n},r)=>A.jsxs(Hd,{ref:r,className:_e("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[A.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:A.jsx(Gd,{children:A.jsx(c0,{className:"h-2 w-2 fill-current text-sky-800"})})}),t]}));Za.displayName=Hd.displayName;const Qa=u.forwardRef(({className:e,...t},n)=>A.jsx(Bd,{ref:n,className:_e("px-2 py-1.5 text-sm font-semibold",e),...t}));Qa.displayName=Bd.displayName;const Jd=u.forwardRef(({className:e,...t},n)=>A.jsx(Vd,{ref:n,className:_e("h-px w-full bg-athens-gray-100",e),...t}));Jd.displayName=Vd.displayName;function ef(e,[t,n]){return Math.min(n,Math.max(t,e))}const tf=u.forwardRef((e,t)=>u.createElement(xe.span,ee({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}))),nx=tf,rx=[" ","Enter","ArrowUp","ArrowDown"],ox=[" ","Enter"],qo="Select",[Yo,Ja,ix]=wa(qo),[Rn,o6]=Ct(qo,[ix,Do]),es=Do(),[ax,Sn]=Rn(qo),[sx,lx]=Rn(qo),cx=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:i,value:a,defaultValue:s,onValueChange:l,dir:c,name:d,autoComplete:f,disabled:p,required:m}=e,h=es(t),[v,w]=u.useState(null),[y,b]=u.useState(null),[$,S]=u.useState(!1),x=Co(c),[T=!1,O]=St({prop:r,defaultProp:o,onChange:i}),[P,_]=St({prop:a,defaultProp:s,onChange:l}),j=u.useRef(null),F=v?!!v.closest("form"):!0,[V,R]=u.useState(new Set),X=Array.from(V).map(C=>C.props.value).join(";");return u.createElement(Da,h,u.createElement(ax,{required:m,scope:t,trigger:v,onTriggerChange:w,valueNode:y,onValueNodeChange:b,valueNodeHasChildren:$,onValueNodeHasChildrenChange:S,contentId:At(),value:P,onValueChange:_,open:T,onOpenChange:O,dir:x,triggerPointerDownPosRef:j,disabled:p},u.createElement(Yo.Provider,{scope:t},u.createElement(sx,{scope:e.__scopeSelect,onNativeOptionAdd:u.useCallback(C=>{R(L=>new Set(L).add(C))},[]),onNativeOptionRemove:u.useCallback(C=>{R(L=>{const H=new Set(L);return H.delete(C),H})},[])},n)),F?u.createElement(lf,{key:X,"aria-hidden":!0,required:m,tabIndex:-1,name:d,autoComplete:f,value:P,onChange:C=>_(C.target.value),disabled:p},P===void 0?u.createElement("option",{value:""}):null,Array.from(V)):null))},ux="SelectTrigger",dx=u.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,i=es(n),a=Sn(ux,n),s=a.disabled||r,l=Oe(t,a.onTriggerChange),c=Ja(n),[d,f,p]=cf(h=>{const v=c().filter(b=>!b.disabled),w=v.find(b=>b.value===a.value),y=uf(v,h,w);y!==void 0&&a.onValueChange(y.value)}),m=()=>{s||(a.onOpenChange(!0),p())};return u.createElement(Qu,ee({asChild:!0},i),u.createElement(xe.button,ee({type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":sf(a.value)?"":void 0},o,{ref:l,onClick:fe(o.onClick,h=>{h.currentTarget.focus()}),onPointerDown:fe(o.onPointerDown,h=>{const v=h.target;v.hasPointerCapture(h.pointerId)&&v.releasePointerCapture(h.pointerId),h.button===0&&h.ctrlKey===!1&&(m(),a.triggerPointerDownPosRef.current={x:Math.round(h.pageX),y:Math.round(h.pageY)},h.preventDefault())}),onKeyDown:fe(o.onKeyDown,h=>{const v=d.current!=="";!(h.ctrlKey||h.altKey||h.metaKey)&&h.key.length===1&&f(h.key),!(v&&h.key===" ")&&rx.includes(h.key)&&(m(),h.preventDefault())})})))}),fx="SelectValue",px=u.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:i,placeholder:a="",...s}=e,l=Sn(fx,n),{onValueNodeHasChildrenChange:c}=l,d=i!==void 0,f=Oe(t,l.onValueNodeChange);return ot(()=>{c(d)},[c,d]),u.createElement(xe.span,ee({},s,{ref:f,style:{pointerEvents:"none"}}),sf(l.value)?u.createElement(u.Fragment,null,a):i)}),hx=u.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return u.createElement(xe.span,ee({"aria-hidden":!0},o,{ref:t}),r||"▼")}),mx=e=>u.createElement(ed,ee({asChild:!0},e)),Zn="SelectContent",vx=u.forwardRef((e,t)=>{const n=Sn(Zn,e.__scopeSelect),[r,o]=u.useState();if(ot(()=>{o(new DocumentFragment)},[]),!n.open){const i=r;return i?Dt.createPortal(u.createElement(nf,{scope:e.__scopeSelect},u.createElement(Yo.Slot,{scope:e.__scopeSelect},u.createElement("div",null,e.children))),i):null}return u.createElement(gx,ee({},e,{ref:t}))}),zt=10,[nf,Ko]=Rn(Zn),gx=u.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:a,side:s,sideOffset:l,align:c,alignOffset:d,arrowPadding:f,collisionBoundary:p,collisionPadding:m,sticky:h,hideWhenDetached:v,avoidCollisions:w,...y}=e,b=Sn(Zn,n),[$,S]=u.useState(null),[x,T]=u.useState(null),O=Oe(t,Y=>S(Y)),[P,_]=u.useState(null),[j,F]=u.useState(null),V=Ja(n),[R,X]=u.useState(!1),C=u.useRef(!1);u.useEffect(()=>{if($)return ad($)},[$]),fu();const L=u.useCallback(Y=>{const[le,...U]=V().map(k=>k.ref.current),[q]=U.slice(-1),re=document.activeElement;for(const k of Y)if(k===re||(k==null||k.scrollIntoView({block:"nearest"}),k===le&&x&&(x.scrollTop=0),k===q&&x&&(x.scrollTop=x.scrollHeight),k==null||k.focus(),document.activeElement!==re))return},[V,x]),H=u.useCallback(()=>L([P,$]),[L,P,$]);u.useEffect(()=>{R&&H()},[R,H]);const{onOpenChange:W,triggerPointerDownPosRef:D}=b;u.useEffect(()=>{if($){let Y={x:0,y:0};const le=q=>{var re,k,de,pe;Y={x:Math.abs(Math.round(q.pageX)-((re=(k=D.current)===null||k===void 0?void 0:k.x)!==null&&re!==void 0?re:0)),y:Math.abs(Math.round(q.pageY)-((de=(pe=D.current)===null||pe===void 0?void 0:pe.y)!==null&&de!==void 0?de:0))}},U=q=>{Y.x<=10&&Y.y<=10?q.preventDefault():$.contains(q.target)||W(!1),document.removeEventListener("pointermove",le),D.current=null};return D.current!==null&&(document.addEventListener("pointermove",le),document.addEventListener("pointerup",U,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",le),document.removeEventListener("pointerup",U,{capture:!0})}}},[$,W,D]),u.useEffect(()=>{const Y=()=>W(!1);return window.addEventListener("blur",Y),window.addEventListener("resize",Y),()=>{window.removeEventListener("blur",Y),window.removeEventListener("resize",Y)}},[W]);const[N,z]=cf(Y=>{const le=V().filter(re=>!re.disabled),U=le.find(re=>re.ref.current===document.activeElement),q=uf(le,Y,U);q&&setTimeout(()=>q.ref.current.focus())}),J=u.useCallback((Y,le,U)=>{const q=!C.current&&!U;(b.value!==void 0&&b.value===le||q)&&(_(Y),q&&(C.current=!0))},[b.value]),Q=u.useCallback(()=>$==null?void 0:$.focus(),[$]),oe=u.useCallback((Y,le,U)=>{const q=!C.current&&!U;(b.value!==void 0&&b.value===le||q)&&F(Y)},[b.value]),te=r==="popper"?rf:yx,ae=te===rf?{side:s,sideOffset:l,align:c,alignOffset:d,arrowPadding:f,collisionBoundary:p,collisionPadding:m,sticky:h,hideWhenDetached:v,avoidCollisions:w}:{};return u.createElement(nf,{scope:n,content:$,viewport:x,onViewportChange:T,itemRefCallback:J,selectedItem:P,onItemLeave:Q,itemTextRefCallback:oe,focusSelectedItem:H,selectedItemText:j,position:r,isPositioned:R,searchRef:N},u.createElement(bd,{as:yn,allowPinchZoom:!0},u.createElement(mu,{asChild:!0,trapped:b.open,onMountAutoFocus:Y=>{Y.preventDefault()},onUnmountAutoFocus:fe(o,Y=>{var le;(le=b.trigger)===null||le===void 0||le.focus({preventScroll:!0}),Y.preventDefault()})},u.createElement(cu,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:Y=>Y.preventDefault(),onDismiss:()=>b.onOpenChange(!1)},u.createElement(te,ee({role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:Y=>Y.preventDefault()},y,ae,{onPlaced:()=>X(!0),ref:O,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:fe(y.onKeyDown,Y=>{const le=Y.ctrlKey||Y.altKey||Y.metaKey;if(Y.key==="Tab"&&Y.preventDefault(),!le&&Y.key.length===1&&z(Y.key),["ArrowUp","ArrowDown","Home","End"].includes(Y.key)){let q=V().filter(re=>!re.disabled).map(re=>re.ref.current);if(["ArrowUp","End"].includes(Y.key)&&(q=q.slice().reverse()),["ArrowUp","ArrowDown"].includes(Y.key)){const re=Y.target,k=q.indexOf(re);q=q.slice(k+1)}setTimeout(()=>L(q)),Y.preventDefault()}})}))))))}),yx=u.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,i=Sn(Zn,n),a=Ko(Zn,n),[s,l]=u.useState(null),[c,d]=u.useState(null),f=Oe(t,O=>d(O)),p=Ja(n),m=u.useRef(!1),h=u.useRef(!0),{viewport:v,selectedItem:w,selectedItemText:y,focusSelectedItem:b}=a,$=u.useCallback(()=>{if(i.trigger&&i.valueNode&&s&&c&&v&&w&&y){const O=i.trigger.getBoundingClientRect(),P=c.getBoundingClientRect(),_=i.valueNode.getBoundingClientRect(),j=y.getBoundingClientRect();if(i.dir!=="rtl"){const re=j.left-P.left,k=_.left-re,de=O.left-k,pe=O.width+de,Ce=Math.max(pe,P.width),ke=window.innerWidth-zt,je=ef(k,[zt,ke-Ce]);s.style.minWidth=pe+"px",s.style.left=je+"px"}else{const re=P.right-j.right,k=window.innerWidth-_.right-re,de=window.innerWidth-O.right-k,pe=O.width+de,Ce=Math.max(pe,P.width),ke=window.innerWidth-zt,je=ef(k,[zt,ke-Ce]);s.style.minWidth=pe+"px",s.style.right=je+"px"}const F=p(),V=window.innerHeight-zt*2,R=v.scrollHeight,X=window.getComputedStyle(c),C=parseInt(X.borderTopWidth,10),L=parseInt(X.paddingTop,10),H=parseInt(X.borderBottomWidth,10),W=parseInt(X.paddingBottom,10),D=C+L+R+W+H,N=Math.min(w.offsetHeight*5,D),z=window.getComputedStyle(v),J=parseInt(z.paddingTop,10),Q=parseInt(z.paddingBottom,10),oe=O.top+O.height/2-zt,te=V-oe,ae=w.offsetHeight/2,Y=w.offsetTop+ae,le=C+L+Y,U=D-le;if(le<=oe){const re=w===F[F.length-1].ref.current;s.style.bottom="0px";const k=c.clientHeight-v.offsetTop-v.offsetHeight,de=Math.max(te,ae+(re?Q:0)+k+H),pe=le+de;s.style.height=pe+"px"}else{const re=w===F[0].ref.current;s.style.top="0px";const de=Math.max(oe,C+v.offsetTop+(re?J:0)+ae)+U;s.style.height=de+"px",v.scrollTop=le-oe+v.offsetTop}s.style.margin=`${zt}px 0`,s.style.minHeight=N+"px",s.style.maxHeight=V+"px",r==null||r(),requestAnimationFrame(()=>m.current=!0)}},[p,i.trigger,i.valueNode,s,c,v,w,y,i.dir,r]);ot(()=>$(),[$]);const[S,x]=u.useState();ot(()=>{c&&x(window.getComputedStyle(c).zIndex)},[c]);const T=u.useCallback(O=>{O&&h.current===!0&&($(),b==null||b(),h.current=!1)},[$,b]);return u.createElement(bx,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:m,onScrollButtonChange:T},u.createElement("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S}},u.createElement(xe.div,ee({},o,{ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}}))))}),rf=u.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=zt,...i}=e,a=es(n);return u.createElement(Ju,ee({},a,i,{ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}}))}),[bx,wx]=Rn(Zn,{}),of="SelectViewport",xx=u.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Ko(of,n),i=wx(of,n),a=Oe(t,o.onViewportChange),s=u.useRef(0);return u.createElement(u.Fragment,null,u.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"}}),u.createElement(Yo.Slot,{scope:n},u.createElement(xe.div,ee({"data-radix-select-viewport":"",role:"presentation"},r,{ref:a,style:{position:"relative",flex:1,overflow:"auto",...r.style},onScroll:fe(r.onScroll,l=>{const c=l.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:f}=i;if(f!=null&&f.current&&d){const p=Math.abs(s.current-c.scrollTop);if(p>0){const m=window.innerHeight-zt*2,h=parseFloat(d.style.minHeight),v=parseFloat(d.style.height),w=Math.max(h,v);if(w<m){const y=w+p,b=Math.min(m,y),$=y-b;d.style.height=b+"px",d.style.bottom==="0px"&&(c.scrollTop=$>0?$:0,d.style.justifyContent="flex-end")}}}s.current=c.scrollTop})}))))}),$x="SelectGroup",[Cx,Sx]=Rn($x),Ex=u.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=At();return u.createElement(Cx,{scope:n,id:o},u.createElement(xe.div,ee({role:"group","aria-labelledby":o},r,{ref:t})))}),Tx="SelectLabel",Px=u.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Sx(Tx,n);return u.createElement(xe.div,ee({id:o.id},r,{ref:t}))}),ts="SelectItem",[Mx,af]=Rn(ts),kx=u.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:i,...a}=e,s=Sn(ts,n),l=Ko(ts,n),c=s.value===r,[d,f]=u.useState(i??""),[p,m]=u.useState(!1),h=Oe(t,y=>{var b;return(b=l.itemRefCallback)===null||b===void 0?void 0:b.call(l,y,r,o)}),v=At(),w=()=>{o||(s.onValueChange(r),s.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return u.createElement(Mx,{scope:n,value:r,disabled:o,textId:v,isSelected:c,onItemTextChange:u.useCallback(y=>{f(b=>{var $;return b||(($=y==null?void 0:y.textContent)!==null&&$!==void 0?$:"").trim()})},[])},u.createElement(Yo.ItemSlot,{scope:n,value:r,disabled:o,textValue:d},u.createElement(xe.div,ee({role:"option","aria-labelledby":v,"data-highlighted":p?"":void 0,"aria-selected":c&&p,"data-state":c?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1},a,{ref:h,onFocus:fe(a.onFocus,()=>m(!0)),onBlur:fe(a.onBlur,()=>m(!1)),onPointerUp:fe(a.onPointerUp,w),onPointerMove:fe(a.onPointerMove,y=>{if(o){var b;(b=l.onItemLeave)===null||b===void 0||b.call(l)}else y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:fe(a.onPointerLeave,y=>{if(y.currentTarget===document.activeElement){var b;(b=l.onItemLeave)===null||b===void 0||b.call(l)}}),onKeyDown:fe(a.onKeyDown,y=>{var b;((b=l.searchRef)===null||b===void 0?void 0:b.current)!==""&&y.key===" "||(ox.includes(y.key)&&w(),y.key===" "&&y.preventDefault())})}))))}),Xo="SelectItemText",Ox=u.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...i}=e,a=Sn(Xo,n),s=Ko(Xo,n),l=af(Xo,n),c=lx(Xo,n),[d,f]=u.useState(null),p=Oe(t,y=>f(y),l.onItemTextChange,y=>{var b;return(b=s.itemTextRefCallback)===null||b===void 0?void 0:b.call(s,y,l.value,l.disabled)}),m=d==null?void 0:d.textContent,h=u.useMemo(()=>u.createElement("option",{key:l.value,value:l.value,disabled:l.disabled},m),[l.disabled,l.value,m]),{onNativeOptionAdd:v,onNativeOptionRemove:w}=c;return ot(()=>(v(h),()=>w(h)),[v,w,h]),u.createElement(u.Fragment,null,u.createElement(xe.span,ee({id:l.textId},i,{ref:p})),l.isSelected&&a.valueNode&&!a.valueNodeHasChildren?Dt.createPortal(i.children,a.valueNode):null)}),_x="SelectItemIndicator",Nx=u.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return af(_x,n).isSelected?u.createElement(xe.span,ee({"aria-hidden":!0},r,{ref:t})):null}),Dx=u.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return u.createElement(xe.div,ee({"aria-hidden":!0},r,{ref:t}))});function sf(e){return e===""||e===void 0}const lf=u.forwardRef((e,t)=>{const{value:n,...r}=e,o=u.useRef(null),i=Oe(t,o),a=zc(n);return u.useEffect(()=>{const s=o.current,l=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(l,"value").set;if(a!==n&&d){const f=new Event("change",{bubbles:!0});d.call(s,n),s.dispatchEvent(f)}},[a,n]),u.createElement(tf,{asChild:!0},u.createElement("select",ee({},r,{ref:i,defaultValue:n})))});lf.displayName="BubbleSelect";function cf(e){const t=He(e),n=u.useRef(""),r=u.useRef(0),o=u.useCallback(a=>{const s=n.current+a;t(s),function l(c){n.current=c,window.clearTimeout(r.current),c!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(s)},[t]),i=u.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return u.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,i]}function uf(e,t,n){const o=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let a=Ax(e,Math.max(i,0));o.length===1&&(a=a.filter(c=>c!==n));const l=a.find(c=>c.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function Ax(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const Ix=cx,df=dx,Lx=px,Fx=hx,jx=mx,ff=vx,zx=xx,Bx=Ex,pf=Px,hf=kx,Wx=Ox,Ux=Nx,mf=Dx,Hx=Ix,Gx=Bx,Vx=Lx,vf=u.forwardRef(({className:e,children:t,...n},r)=>A.jsx("div",{className:"rabbit-ds",children:A.jsxs(df,{ref:r,className:_e("rabbit-ds h-10 pr-3 py-2.5 rounded-tl text-sm rounded-tr border-b border-dashed hover:border-solid border-zinc-800 justify-between items-center gap-2 inline-flex focus:outline-none focus:border-solid disabled:cursor-not-allowed disabled:opacity-50",e),...n,children:[t,A.jsx(Fx,{asChild:!0,children:A.jsx(Gc,{className:"h-4 w-4"})})]})}));vf.displayName=df.displayName;const gf=u.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>A.jsx(jx,{children:A.jsx(ff,{ref:o,className:_e("relative z-[1500] rabbit-ds min-w-[8rem] max-w-xs p-1 bg-white rounded-lg shadow flex-col justify-start items-start gap-1 inline-flex data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-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",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:A.jsx(zx,{className:_e("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t})})}));gf.displayName=ff.displayName;const yf=u.forwardRef(({className:e,...t},n)=>A.jsx(pf,{ref:n,className:_e("py-1.5 px-2 text-sm font-semibold",e),...t}));yf.displayName=pf.displayName;const bf=u.forwardRef(({className:e,children:t,...n},r)=>A.jsxs(hf,{ref:r,className:_e("relative flex w-full my-1 cursor-default select-none p-2 bg-white rounded flex-col hover:bg-sky-100 hover:text-sky-800 hover:cursor-pointer justify-start items-start text-zinc-800 text-sm font-normal leading-tight focus:bg-sky-100 focus:text-sky-800 data-[state=checked]:bg-sky-100 data-[state=checked]:text-sky-800 focus:outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[A.jsx("span",{className:"absolute right-2 flex h-4 w-4 items-center justify-center",children:A.jsx(Ux,{children:A.jsx(ha,{className:"h-4 w-4 text-sky-800"})})}),A.jsx(Wx,{children:t})]}));bf.displayName=hf.displayName;const wf=u.forwardRef(({className:e,...t},n)=>A.jsx(mf,{ref:n,className:_e("-mx-1 my-1 h-px bg-muted",e),...t}));wf.displayName=mf.displayName;const ns="dismissableLayer.update",qx="dismissableLayer.pointerDownOutside",Yx="dismissableLayer.focusOutside";let xf;const Kx=u.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Xx=u.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...c}=e,d=u.useContext(Kx),[f,p]=u.useState(null),m=(n=f==null?void 0:f.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,h]=u.useState({}),v=Oe(t,P=>p(P)),w=Array.from(d.layers),[y]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),b=w.indexOf(y),$=f?w.indexOf(f):-1,S=d.layersWithOutsidePointerEventsDisabled.size>0,x=$>=b,T=Rx(P=>{const _=P.target,j=[...d.branches].some(F=>F.contains(_));!x||j||(i==null||i(P),s==null||s(P),P.defaultPrevented||l==null||l())},m),O=Zx(P=>{const _=P.target;[...d.branches].some(F=>F.contains(_))||(a==null||a(P),s==null||s(P),P.defaultPrevented||l==null||l())},m);return su(P=>{$===d.layers.size-1&&(o==null||o(P),!P.defaultPrevented&&l&&(P.preventDefault(),l()))},m),u.useEffect(()=>{if(f)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(xf=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),$f(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=xf)}},[f,m,r,d]),u.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),$f())},[f,d]),u.useEffect(()=>{const P=()=>h({});return document.addEventListener(ns,P),()=>document.removeEventListener(ns,P)},[]),u.createElement(xe.div,ee({},c,{ref:v,style:{pointerEvents:S?x?"auto":"none":void 0,...e.style},onFocusCapture:fe(e.onFocusCapture,O.onFocusCapture),onBlurCapture:fe(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:fe(e.onPointerDownCapture,T.onPointerDownCapture)}))});function Rx(e,t=globalThis==null?void 0:globalThis.document){const n=He(e),r=u.useRef(!1),o=u.useRef(()=>{});return u.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let c=function(){Cf(qx,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Zx(e,t=globalThis==null?void 0:globalThis.document){const n=He(e),r=u.useRef(!1);return u.useEffect(()=>{const o=i=>{i.target&&!r.current&&Cf(Yx,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function $f(){const e=new CustomEvent(ns);document.dispatchEvent(e)}function Cf(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?pa(o,i):o.dispatchEvent(i)}const Sf="Popper",[Ef,Tf]=Ct(Sf),[Qx,Pf]=Ef(Sf),Jx=e=>{const{__scopePopper:t,children:n}=e,[r,o]=u.useState(null);return u.createElement(Qx,{scope:t,anchor:r,onAnchorChange:o},n)},e1="PopperAnchor",t1=u.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=Pf(e1,n),a=u.useRef(null),s=Oe(t,a);return u.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:u.createElement(xe.div,ee({},o,{ref:s}))}),Mf="PopperContent",[n1,i6]=Ef(Mf),r1=u.forwardRef((e,t)=>{var n,r,o,i,a,s,l,c;const{__scopePopper:d,side:f="bottom",sideOffset:p=0,align:m="center",alignOffset:h=0,arrowPadding:v=0,collisionBoundary:w=[],collisionPadding:y=0,sticky:b="partial",hideWhenDetached:$=!1,avoidCollisions:S=!0,onPlaced:x,...T}=e,O=Pf(Mf,d),[P,_]=u.useState(null),j=Oe(t,pe=>_(pe)),[F,V]=u.useState(null),R=da(F),X=(n=R==null?void 0:R.width)!==null&&n!==void 0?n:0,C=(r=R==null?void 0:R.height)!==null&&r!==void 0?r:0,L=f+(m!=="center"?"-"+m:""),H=typeof y=="number"?y:{top:0,right:0,bottom:0,left:0,...y},W=Array.isArray(w)?w:[w],D=W.length>0,N={padding:H,boundary:W.filter(o1),altBoundary:D},{refs:z,floatingStyles:J,placement:Q,isPositioned:oe,middlewareData:te}=qu({strategy:"fixed",placement:L,whileElementsMounted:Wu,elements:{reference:O.anchor},middleware:[Pu({mainAxis:p+C,alignmentAxis:h}),S&&Mu({mainAxis:!0,crossAxis:!1,limiter:b==="partial"?ku():void 0,...N}),S&&Cu({...N}),Ou({...N,apply:({elements:pe,rects:Ce,availableWidth:ke,availableHeight:je})=>{const{width:_t,height:mn}=Ce.reference,Ze=pe.floating.style;Ze.setProperty("--radix-popper-available-width",`${ke}px`),Ze.setProperty("--radix-popper-available-height",`${je}px`),Ze.setProperty("--radix-popper-anchor-width",`${_t}px`),Ze.setProperty("--radix-popper-anchor-height",`${mn}px`)}}),F&&Uu({element:F,padding:v}),i1({arrowWidth:X,arrowHeight:C}),$&&Tu({strategy:"referenceHidden"})]}),[ae,Y]=kf(Q),le=He(x);ot(()=>{oe&&(le==null||le())},[oe,le]);const U=(o=te.arrow)===null||o===void 0?void 0:o.x,q=(i=te.arrow)===null||i===void 0?void 0:i.y,re=((a=te.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[k,de]=u.useState();return ot(()=>{P&&de(window.getComputedStyle(P).zIndex)},[P]),u.createElement("div",{ref:z.setFloating,"data-radix-popper-content-wrapper":"",style:{...J,transform:oe?J.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:k,"--radix-popper-transform-origin":[(s=te.transformOrigin)===null||s===void 0?void 0:s.x,(l=te.transformOrigin)===null||l===void 0?void 0:l.y].join(" ")},dir:e.dir},u.createElement(n1,{scope:d,placedSide:ae,onArrowChange:V,arrowX:U,arrowY:q,shouldHideArrow:re},u.createElement(xe.div,ee({"data-side":ae,"data-align":Y},T,{ref:j,style:{...T.style,animation:oe?void 0:"none",opacity:(c=te.hide)!==null&&c!==void 0&&c.referenceHidden?0:void 0}}))))});function o1(e){return e!==null}const i1=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,i,a;const{placement:s,rects:l,middlewareData:c}=t,f=((n=c.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,p=f?0:e.arrowWidth,m=f?0:e.arrowHeight,[h,v]=kf(s),w={start:"0%",center:"50%",end:"100%"}[v],y=((r=(o=c.arrow)===null||o===void 0?void 0:o.x)!==null&&r!==void 0?r:0)+p/2,b=((i=(a=c.arrow)===null||a===void 0?void 0:a.y)!==null&&i!==void 0?i:0)+m/2;let $="",S="";return h==="bottom"?($=f?w:`${y}px`,S=`${-m}px`):h==="top"?($=f?w:`${y}px`,S=`${l.floating.height+m}px`):h==="right"?($=`${-m}px`,S=f?w:`${b}px`):h==="left"&&($=`${l.floating.width+m}px`,S=f?w:`${b}px`),{data:{x:$,y:S}}}});function kf(e){const[t,n="center"]=e.split("-");return[t,n]}const a1=Jx,s1=t1,l1=r1,c1=u.forwardRef((e,t)=>{var n;const{container:r=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...o}=e;return r?Dt.createPortal(u.createElement(xe.div,ee({},o,{ref:t})),r):null}),[Ro,a6]=Ct("Tooltip",[Tf]),rs=Tf(),u1="TooltipProvider",d1=700,os="tooltip.open",[f1,is]=Ro(u1),p1=e=>{const{__scopeTooltip:t,delayDuration:n=d1,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,[a,s]=u.useState(!0),l=u.useRef(!1),c=u.useRef(0);return u.useEffect(()=>{const d=c.current;return()=>window.clearTimeout(d)},[]),u.createElement(f1,{scope:t,isOpenDelayed:a,delayDuration:n,onOpen:u.useCallback(()=>{window.clearTimeout(c.current),s(!1)},[]),onClose:u.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>s(!0),r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:u.useCallback(d=>{l.current=d},[]),disableHoverableContent:o},i)},as="Tooltip",[h1,Nr]=Ro(as),m1=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:i,disableHoverableContent:a,delayDuration:s}=e,l=is(as,e.__scopeTooltip),c=rs(t),[d,f]=u.useState(null),p=At(),m=u.useRef(0),h=a??l.disableHoverableContent,v=s??l.delayDuration,w=u.useRef(!1),[y=!1,b]=St({prop:r,defaultProp:o,onChange:O=>{O?(l.onOpen(),document.dispatchEvent(new CustomEvent(os))):l.onClose(),i==null||i(O)}}),$=u.useMemo(()=>y?w.current?"delayed-open":"instant-open":"closed",[y]),S=u.useCallback(()=>{window.clearTimeout(m.current),w.current=!1,b(!0)},[b]),x=u.useCallback(()=>{window.clearTimeout(m.current),b(!1)},[b]),T=u.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{w.current=!0,b(!0)},v)},[v,b]);return u.useEffect(()=>()=>window.clearTimeout(m.current),[]),u.createElement(a1,c,u.createElement(h1,{scope:t,contentId:p,open:y,stateAttribute:$,trigger:d,onTriggerChange:f,onTriggerEnter:u.useCallback(()=>{l.isOpenDelayed?T():S()},[l.isOpenDelayed,T,S]),onTriggerLeave:u.useCallback(()=>{h?x():window.clearTimeout(m.current)},[x,h]),onOpen:S,onClose:x,disableHoverableContent:h},n))},Of="TooltipTrigger",v1=u.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Nr(Of,n),i=is(Of,n),a=rs(n),s=u.useRef(null),l=Oe(t,s,o.onTriggerChange),c=u.useRef(!1),d=u.useRef(!1),f=u.useCallback(()=>c.current=!1,[]);return u.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),u.createElement(s1,ee({asChild:!0},a),u.createElement(xe.button,ee({"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute},r,{ref:l,onPointerMove:fe(e.onPointerMove,p=>{p.pointerType!=="touch"&&!d.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:fe(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:fe(e.onPointerDown,()=>{c.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:fe(e.onFocus,()=>{c.current||o.onOpen()}),onBlur:fe(e.onBlur,o.onClose),onClick:fe(e.onClick,o.onClose)})))}),_f="TooltipPortal",[g1,y1]=Ro(_f,{forceMount:void 0}),b1=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,i=Nr(_f,t);return u.createElement(g1,{scope:t,forceMount:n},u.createElement(Zt,{present:n||i.open},u.createElement(c1,{asChild:!0,container:o},r)))},Dr="TooltipContent",w1=u.forwardRef((e,t)=>{const n=y1(Dr,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,a=Nr(Dr,e.__scopeTooltip);return u.createElement(Zt,{present:r||a.open},a.disableHoverableContent?u.createElement(Nf,ee({side:o},i,{ref:t})):u.createElement(x1,ee({side:o},i,{ref:t})))}),x1=u.forwardRef((e,t)=>{const n=Nr(Dr,e.__scopeTooltip),r=is(Dr,e.__scopeTooltip),o=u.useRef(null),i=Oe(t,o),[a,s]=u.useState(null),{trigger:l,onClose:c}=n,d=o.current,{onPointerInTransitChange:f}=r,p=u.useCallback(()=>{s(null),f(!1)},[f]),m=u.useCallback((h,v)=>{const w=h.currentTarget,y={x:h.clientX,y:h.clientY},b=C1(y,w.getBoundingClientRect()),$=S1(y,b),S=E1(v.getBoundingClientRect()),x=P1([...$,...S]);s(x),f(!0)},[f]);return u.useEffect(()=>()=>p(),[p]),u.useEffect(()=>{if(l&&d){const h=w=>m(w,d),v=w=>m(w,l);return l.addEventListener("pointerleave",h),d.addEventListener("pointerleave",v),()=>{l.removeEventListener("pointerleave",h),d.removeEventListener("pointerleave",v)}}},[l,d,m,p]),u.useEffect(()=>{if(a){const h=v=>{const w=v.target,y={x:v.clientX,y:v.clientY},b=(l==null?void 0:l.contains(w))||(d==null?void 0:d.contains(w)),$=!T1(y,a);b?p():$&&(p(),c())};return document.addEventListener("pointermove",h),()=>document.removeEventListener("pointermove",h)}},[l,d,a,c,p]),u.createElement(Nf,ee({},e,{ref:i}))}),[$1,s6]=Ro(as,{isInside:!1}),Nf=u.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:a,...s}=e,l=Nr(Dr,n),c=rs(n),{onClose:d}=l;return u.useEffect(()=>(document.addEventListener(os,d),()=>document.removeEventListener(os,d)),[d]),u.useEffect(()=>{if(l.trigger){const f=p=>{const m=p.target;m!=null&&m.contains(l.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,d]),u.createElement(Xx,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:f=>f.preventDefault(),onDismiss:d},u.createElement(l1,ee({"data-state":l.stateAttribute},c,s,{ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}}),u.createElement(Bc,null,r),u.createElement($1,{scope:n,isInside:!0},u.createElement(nx,{id:l.contentId,role:"tooltip"},o||r))))});function C1(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function S1(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function E1(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function T1(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const s=t[i].x,l=t[i].y,c=t[a].x,d=t[a].y;l>r!=d>r&&n<(c-s)*(r-l)/(d-l)+s&&(o=!o)}return o}function P1(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),M1(t)}function M1(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const i=t[t.length-1],a=t[t.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const i=n[n.length-1],a=n[n.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}const k1=p1,O1=m1,_1=v1,N1=b1,Df=w1,Af=k1,If=O1,Lf=_1,Ff=N1,ss=u.forwardRef(({className:e,sideOffset:t=4,...n},r)=>A.jsx(Df,{ref:r,sideOffset:t,className:_e("z-[1500] overflow-hidden p-2 bg-gray-600 max-w-xs rounded transition-opacity justify-start items-start inline-flex text-center text-white text-xs animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-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",e,"rabbit-ds"),...n}));ss.displayName=Df.displayName;var Ar=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Qn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Jn(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var ls={exports:{}},Zo={exports:{}},Pe={};/** @license React v16.13.1
|
|
42
42
|
* react-is.production.min.js
|
|
43
43
|
*
|
|
44
44
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
45
45
|
*
|
|
46
46
|
* This source code is licensed under the MIT license found in the
|
|
47
47
|
* LICENSE file in the root directory of this source tree.
|
|
48
|
-
*/var
|
|
48
|
+
*/var jf;function D1(){if(jf)return Pe;jf=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,m=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,v=e?Symbol.for("react.block"):60121,w=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function $(x){if(typeof x=="object"&&x!==null){var T=x.$$typeof;switch(T){case t:switch(x=x.type,x){case l:case c:case r:case i:case o:case f:return x;default:switch(x=x&&x.$$typeof,x){case s:case d:case h:case m:case a:return x;default:return T}}case n:return T}}}function S(x){return $(x)===c}return Pe.AsyncMode=l,Pe.ConcurrentMode=c,Pe.ContextConsumer=s,Pe.ContextProvider=a,Pe.Element=t,Pe.ForwardRef=d,Pe.Fragment=r,Pe.Lazy=h,Pe.Memo=m,Pe.Portal=n,Pe.Profiler=i,Pe.StrictMode=o,Pe.Suspense=f,Pe.isAsyncMode=function(x){return S(x)||$(x)===l},Pe.isConcurrentMode=S,Pe.isContextConsumer=function(x){return $(x)===s},Pe.isContextProvider=function(x){return $(x)===a},Pe.isElement=function(x){return typeof x=="object"&&x!==null&&x.$$typeof===t},Pe.isForwardRef=function(x){return $(x)===d},Pe.isFragment=function(x){return $(x)===r},Pe.isLazy=function(x){return $(x)===h},Pe.isMemo=function(x){return $(x)===m},Pe.isPortal=function(x){return $(x)===n},Pe.isProfiler=function(x){return $(x)===i},Pe.isStrictMode=function(x){return $(x)===o},Pe.isSuspense=function(x){return $(x)===f},Pe.isValidElementType=function(x){return typeof x=="string"||typeof x=="function"||x===r||x===c||x===i||x===o||x===f||x===p||typeof x=="object"&&x!==null&&(x.$$typeof===h||x.$$typeof===m||x.$$typeof===a||x.$$typeof===s||x.$$typeof===d||x.$$typeof===w||x.$$typeof===y||x.$$typeof===b||x.$$typeof===v)},Pe.typeOf=$,Pe}var Me={};/** @license React v16.13.1
|
|
49
49
|
* react-is.development.js
|
|
50
50
|
*
|
|
51
51
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
52
52
|
*
|
|
53
53
|
* This source code is licensed under the MIT license found in the
|
|
54
54
|
* LICENSE file in the root directory of this source tree.
|
|
55
|
-
*/var
|
|
55
|
+
*/var zf;function A1(){return zf||(zf=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,m=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,v=e?Symbol.for("react.block"):60121,w=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function $(k){return typeof k=="string"||typeof k=="function"||k===r||k===c||k===i||k===o||k===f||k===p||typeof k=="object"&&k!==null&&(k.$$typeof===h||k.$$typeof===m||k.$$typeof===a||k.$$typeof===s||k.$$typeof===d||k.$$typeof===w||k.$$typeof===y||k.$$typeof===b||k.$$typeof===v)}function S(k){if(typeof k=="object"&&k!==null){var de=k.$$typeof;switch(de){case t:var pe=k.type;switch(pe){case l:case c:case r:case i:case o:case f:return pe;default:var Ce=pe&&pe.$$typeof;switch(Ce){case s:case d:case h:case m:case a:return Ce;default:return de}}case n:return de}}}var x=l,T=c,O=s,P=a,_=t,j=d,F=r,V=h,R=m,X=n,C=i,L=o,H=f,W=!1;function D(k){return W||(W=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),N(k)||S(k)===l}function N(k){return S(k)===c}function z(k){return S(k)===s}function J(k){return S(k)===a}function Q(k){return typeof k=="object"&&k!==null&&k.$$typeof===t}function oe(k){return S(k)===d}function te(k){return S(k)===r}function ae(k){return S(k)===h}function Y(k){return S(k)===m}function le(k){return S(k)===n}function U(k){return S(k)===i}function q(k){return S(k)===o}function re(k){return S(k)===f}Me.AsyncMode=x,Me.ConcurrentMode=T,Me.ContextConsumer=O,Me.ContextProvider=P,Me.Element=_,Me.ForwardRef=j,Me.Fragment=F,Me.Lazy=V,Me.Memo=R,Me.Portal=X,Me.Profiler=C,Me.StrictMode=L,Me.Suspense=H,Me.isAsyncMode=D,Me.isConcurrentMode=N,Me.isContextConsumer=z,Me.isContextProvider=J,Me.isElement=Q,Me.isForwardRef=oe,Me.isFragment=te,Me.isLazy=ae,Me.isMemo=Y,Me.isPortal=le,Me.isProfiler=U,Me.isStrictMode=q,Me.isSuspense=re,Me.isValidElementType=$,Me.typeOf=S}()),Me}var Bf;function Wf(){return Bf||(Bf=1,process.env.NODE_ENV==="production"?Zo.exports=D1():Zo.exports=A1()),Zo.exports}/*
|
|
56
56
|
object-assign
|
|
57
57
|
(c) Sindre Sorhus
|
|
58
58
|
@license MIT
|
|
59
|
-
*/var
|
|
60
|
-
Valid keys: `+JSON.stringify(Object.keys(N),null," "));var k=re(Y,q,oe,te,ae+"."+q,n);if(k)return k}return null}return
|
|
59
|
+
*/var cs,Uf;function I1(){if(Uf)return cs;Uf=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function o(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var a={},s=0;s<10;s++)a["_"+String.fromCharCode(s)]=s;var l=Object.getOwnPropertyNames(a).map(function(d){return a[d]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(d){c[d]=d}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return cs=o()?Object.assign:function(i,a){for(var s,l=r(i),c,d=1;d<arguments.length;d++){s=Object(arguments[d]);for(var f in s)t.call(s,f)&&(l[f]=s[f]);if(e){c=e(s);for(var p=0;p<c.length;p++)n.call(s,c[p])&&(l[c[p]]=s[c[p]])}}return l},cs}var us,Hf;function ds(){if(Hf)return us;Hf=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return us=e,us}var fs,Gf;function Vf(){return Gf||(Gf=1,fs=Function.call.bind(Object.prototype.hasOwnProperty)),fs}var ps,qf;function L1(){if(qf)return ps;qf=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=ds(),n={},r=Vf();e=function(i){var a="Warning: "+i;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function o(i,a,s,l,c){if(process.env.NODE_ENV!=="production"){for(var d in i)if(r(i,d)){var f;try{if(typeof i[d]!="function"){var p=Error((l||"React class")+": "+s+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}f=i[d](a,d,l,s,null,t)}catch(h){f=h}if(f&&!(f instanceof Error)&&e((l||"React class")+": type specification of "+s+" `"+d+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var m=c?c():"";e("Failed "+s+" type: "+f.message+(m??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},ps=o,ps}var hs,Yf;function F1(){if(Yf)return hs;Yf=1;var e=Wf(),t=I1(),n=ds(),r=Vf(),o=L1(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(s){var l="Warning: "+s;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function a(){return null}return hs=function(s,l){var c=typeof Symbol=="function"&&Symbol.iterator,d="@@iterator";function f(N){var z=N&&(c&&N[c]||N[d]);if(typeof z=="function")return z}var p="<<anonymous>>",m={array:y("array"),bigint:y("bigint"),bool:y("boolean"),func:y("function"),number:y("number"),object:y("object"),string:y("string"),symbol:y("symbol"),any:b(),arrayOf:$,element:S(),elementType:x(),instanceOf:T,node:j(),objectOf:P,oneOf:O,oneOfType:_,shape:V,exact:R};function h(N,z){return N===z?N!==0||1/N===1/z:N!==N&&z!==z}function v(N,z){this.message=N,this.data=z&&typeof z=="object"?z:{},this.stack=""}v.prototype=Error.prototype;function w(N){if(process.env.NODE_ENV!=="production")var z={},J=0;function Q(te,ae,Y,le,U,q,re){if(le=le||p,q=q||Y,re!==n){if(l){var k=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 k.name="Invariant Violation",k}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var de=le+":"+Y;!z[de]&&J<3&&(i("You are manually calling a React.PropTypes validation function for the `"+q+"` prop on `"+le+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),z[de]=!0,J++)}}return ae[Y]==null?te?ae[Y]===null?new v("The "+U+" `"+q+"` is marked as required "+("in `"+le+"`, but its value is `null`.")):new v("The "+U+" `"+q+"` is marked as required in "+("`"+le+"`, but its value is `undefined`.")):null:N(ae,Y,le,U,q)}var oe=Q.bind(null,!1);return oe.isRequired=Q.bind(null,!0),oe}function y(N){function z(J,Q,oe,te,ae,Y){var le=J[Q],U=L(le);if(U!==N){var q=H(le);return new v("Invalid "+te+" `"+ae+"` of type "+("`"+q+"` supplied to `"+oe+"`, expected ")+("`"+N+"`."),{expectedType:N})}return null}return w(z)}function b(){return w(a)}function $(N){function z(J,Q,oe,te,ae){if(typeof N!="function")return new v("Property `"+ae+"` of component `"+oe+"` has invalid PropType notation inside arrayOf.");var Y=J[Q];if(!Array.isArray(Y)){var le=L(Y);return new v("Invalid "+te+" `"+ae+"` of type "+("`"+le+"` supplied to `"+oe+"`, expected an array."))}for(var U=0;U<Y.length;U++){var q=N(Y,U,oe,te,ae+"["+U+"]",n);if(q instanceof Error)return q}return null}return w(z)}function S(){function N(z,J,Q,oe,te){var ae=z[J];if(!s(ae)){var Y=L(ae);return new v("Invalid "+oe+" `"+te+"` of type "+("`"+Y+"` supplied to `"+Q+"`, expected a single ReactElement."))}return null}return w(N)}function x(){function N(z,J,Q,oe,te){var ae=z[J];if(!e.isValidElementType(ae)){var Y=L(ae);return new v("Invalid "+oe+" `"+te+"` of type "+("`"+Y+"` supplied to `"+Q+"`, expected a single ReactElement type."))}return null}return w(N)}function T(N){function z(J,Q,oe,te,ae){if(!(J[Q]instanceof N)){var Y=N.name||p,le=D(J[Q]);return new v("Invalid "+te+" `"+ae+"` of type "+("`"+le+"` supplied to `"+oe+"`, expected ")+("instance of `"+Y+"`."))}return null}return w(z)}function O(N){if(!Array.isArray(N))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),a;function z(J,Q,oe,te,ae){for(var Y=J[Q],le=0;le<N.length;le++)if(h(Y,N[le]))return null;var U=JSON.stringify(N,function(re,k){var de=H(k);return de==="symbol"?String(k):k});return new v("Invalid "+te+" `"+ae+"` of value `"+String(Y)+"` "+("supplied to `"+oe+"`, expected one of "+U+"."))}return w(z)}function P(N){function z(J,Q,oe,te,ae){if(typeof N!="function")return new v("Property `"+ae+"` of component `"+oe+"` has invalid PropType notation inside objectOf.");var Y=J[Q],le=L(Y);if(le!=="object")return new v("Invalid "+te+" `"+ae+"` of type "+("`"+le+"` supplied to `"+oe+"`, expected an object."));for(var U in Y)if(r(Y,U)){var q=N(Y,U,oe,te,ae+"."+U,n);if(q instanceof Error)return q}return null}return w(z)}function _(N){if(!Array.isArray(N))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var z=0;z<N.length;z++){var J=N[z];if(typeof J!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+W(J)+" at index "+z+"."),a}function Q(oe,te,ae,Y,le){for(var U=[],q=0;q<N.length;q++){var re=N[q],k=re(oe,te,ae,Y,le,n);if(k==null)return null;k.data&&r(k.data,"expectedType")&&U.push(k.data.expectedType)}var de=U.length>0?", expected one of type ["+U.join(", ")+"]":"";return new v("Invalid "+Y+" `"+le+"` supplied to "+("`"+ae+"`"+de+"."))}return w(Q)}function j(){function N(z,J,Q,oe,te){return X(z[J])?null:new v("Invalid "+oe+" `"+te+"` supplied to "+("`"+Q+"`, expected a ReactNode."))}return w(N)}function F(N,z,J,Q,oe){return new v((N||"React class")+": "+z+" type `"+J+"."+Q+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+oe+"`.")}function V(N){function z(J,Q,oe,te,ae){var Y=J[Q],le=L(Y);if(le!=="object")return new v("Invalid "+te+" `"+ae+"` of type `"+le+"` "+("supplied to `"+oe+"`, expected `object`."));for(var U in N){var q=N[U];if(typeof q!="function")return F(oe,te,ae,U,H(q));var re=q(Y,U,oe,te,ae+"."+U,n);if(re)return re}return null}return w(z)}function R(N){function z(J,Q,oe,te,ae){var Y=J[Q],le=L(Y);if(le!=="object")return new v("Invalid "+te+" `"+ae+"` of type `"+le+"` "+("supplied to `"+oe+"`, expected `object`."));var U=t({},J[Q],N);for(var q in U){var re=N[q];if(r(N,q)&&typeof re!="function")return F(oe,te,ae,q,H(re));if(!re)return new v("Invalid "+te+" `"+ae+"` key `"+q+"` supplied to `"+oe+"`.\nBad object: "+JSON.stringify(J[Q],null," ")+`
|
|
60
|
+
Valid keys: `+JSON.stringify(Object.keys(N),null," "));var k=re(Y,q,oe,te,ae+"."+q,n);if(k)return k}return null}return w(z)}function X(N){switch(typeof N){case"number":case"string":case"undefined":return!0;case"boolean":return!N;case"object":if(Array.isArray(N))return N.every(X);if(N===null||s(N))return!0;var z=f(N);if(z){var J=z.call(N),Q;if(z!==N.entries){for(;!(Q=J.next()).done;)if(!X(Q.value))return!1}else for(;!(Q=J.next()).done;){var oe=Q.value;if(oe&&!X(oe[1]))return!1}}else return!1;return!0;default:return!1}}function C(N,z){return N==="symbol"?!0:z?z["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&z instanceof Symbol:!1}function L(N){var z=typeof N;return Array.isArray(N)?"array":N instanceof RegExp?"object":C(z,N)?"symbol":z}function H(N){if(typeof N>"u"||N===null)return""+N;var z=L(N);if(z==="object"){if(N instanceof Date)return"date";if(N instanceof RegExp)return"regexp"}return z}function W(N){var z=H(N);switch(z){case"array":case"object":return"an "+z;case"boolean":case"date":case"regexp":return"a "+z;default:return z}}function D(N){return!N.constructor||!N.constructor.name?p:N.constructor.name}return m.checkPropTypes=o,m.resetWarningCache=o.resetWarningCache,m.PropTypes=m,m},hs}var ms,Kf;function j1(){if(Kf)return ms;Kf=1;var e=ds();function t(){}function n(){}return n.resetWarningCache=t,ms=function(){function r(a,s,l,c,d,f){if(f!==e){var p=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 p.name="Invariant Violation",p}}r.isRequired=r;function o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},ms}if(process.env.NODE_ENV!=="production"){var z1=Wf(),B1=!0;ls.exports=F1()(z1.isElement,B1)}else ls.exports=j1()();var Qo=ls.exports;const ne=Qn(Qo);var Xf={exports:{}};/*!
|
|
61
61
|
Copyright (c) 2018 Jed Watson.
|
|
62
62
|
Licensed under the MIT License (MIT), see
|
|
63
63
|
http://jedwatson.github.io/classnames
|
|
64
|
-
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],o=0;o<arguments.length;o++){var i=arguments[o];if(i){var a=typeof i;if(a==="string"||a==="number")r.push(i);else if(Array.isArray(i)){if(i.length){var s=n.apply(null,i);s&&r.push(s)}}else if(a==="object"){if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]")){r.push(i.toString());continue}for(var l in i)t.call(i,l)&&i[l]&&r.push(l)}}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Vf);var Qo=Vf.exports;const et=Qn(Qo);var I1=["top","left","transform","className","children","innerRef"];function cs(){return cs=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},cs.apply(this,arguments)}function L1(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function En(e){var t=e.top,n=t===void 0?0:t,r=e.left,o=r===void 0?0:r,i=e.transform,a=e.className,s=e.children,l=e.innerRef,c=L1(e,I1);return u.createElement("g",cs({ref:l,className:et("visx-group",a),transform:i||"translate("+o+", "+n+")"},c),s)}En.propTypes={top:ne.number,left:ne.number,transform:ne.string,className:ne.string,children:ne.node,innerRef:ne.oneOfType([ne.string,ne.func,ne.object])};const F1=Object.freeze(Object.defineProperty({__proto__:null,Group:En},Symbol.toStringTag,{value:"Module"}));var j1=qf;function qf(e,t,n){e instanceof RegExp&&(e=Yf(e,n)),t instanceof RegExp&&(t=Yf(t,n));var r=Kf(e,t,n);return r&&{start:r[0],end:r[1],pre:n.slice(0,r[0]),body:n.slice(r[0]+e.length,r[1]),post:n.slice(r[1]+t.length)}}function Yf(e,t){var n=t.match(e);return n?n[0]:null}qf.range=Kf;function Kf(e,t,n){var r,o,i,a,s,l=n.indexOf(e),c=n.indexOf(t,l+1),d=l;if(l>=0&&c>0){for(r=[],i=n.length;d>=0&&!s;)d==l?(r.push(d),l=n.indexOf(e,d+1)):r.length==1?s=[r.pop(),c]:(o=r.pop(),o<i&&(i=o,a=c),c=n.indexOf(t,d+1)),d=l<c&&l>=0?l:c;r.length&&(s=[i,a])}return s}var z1=Xf;function Xf(e,t,n){e instanceof RegExp&&(e=Rf(e,n)),t instanceof RegExp&&(t=Rf(t,n));var r=Zf(e,t,n);return r&&{start:r[0],end:r[1],pre:n.slice(0,r[0]),body:n.slice(r[0]+e.length,r[1]),post:n.slice(r[1]+t.length)}}function Rf(e,t){var n=t.match(e);return n?n[0]:null}Xf.range=Zf;function Zf(e,t,n){var r,o,i,a,s,l=n.indexOf(e),c=n.indexOf(t,l+1),d=l;if(l>=0&&c>0){if(e===t)return[l,c];for(r=[],i=n.length;d>=0&&!s;)d==l?(r.push(d),l=n.indexOf(e,d+1)):r.length==1?s=[r.pop(),c]:(o=r.pop(),o<i&&(i=o,a=c),c=n.indexOf(t,d+1)),d=l<c&&l>=0?l:c;r.length&&(s=[i,a])}return s}var W1=z1,B1=Qf;function Qf(e,t,n){var r=e;return U1(e,t).reduce(function(o,i){return o.replace(i.functionIdentifier+"("+i.matches.body+")",H1(i.matches.body,i.functionIdentifier,n,r,t))},e)}function U1(e,t){var n=[],r=typeof t=="string"?new RegExp("\\b("+t+")\\("):t;do{var o=r.exec(e);if(!o)return n;if(o[1]===void 0)throw new Error("Missing the first couple of parenthesis to get the function identifier in "+t);var i=o[1],a=o.index,s=W1("(",")",e.substring(a));if(!s||s.start!==o[0].length-1)throw new SyntaxError(i+"(): missing closing ')' in the value '"+e+"'");n.push({matches:s,functionIdentifier:i}),e=s.post}while(r.test(e));return n}function H1(e,t,n,r,o){return n(Qf(e,o,n),t,r)}var Ve=function(e){this.value=e};Ve.math={isDegree:!0,acos:function(e){return Ve.math.isDegree?180/Math.PI*Math.acos(e):Math.acos(e)},add:function(e,t){return e+t},asin:function(e){return Ve.math.isDegree?180/Math.PI*Math.asin(e):Math.asin(e)},atan:function(e){return Ve.math.isDegree?180/Math.PI*Math.atan(e):Math.atan(e)},acosh:function(e){return Math.log(e+Math.sqrt(e*e-1))},asinh:function(e){return Math.log(e+Math.sqrt(e*e+1))},atanh:function(e){return Math.log((1+e)/(1-e))},C:function(e,t){var n=1,r=e-t,o=t;o<r&&(o=r,r=t);for(var i=o+1;i<=e;i++)n*=i;return n/Ve.math.fact(r)},changeSign:function(e){return-e},cos:function(e){return Ve.math.isDegree&&(e=Ve.math.toRadian(e)),Math.cos(e)},cosh:function(e){return(Math.pow(Math.E,e)+Math.pow(Math.E,-1*e))/2},div:function(e,t){return e/t},fact:function(e){if(e%1!==0)return"NaN";for(var t=1,n=2;n<=e;n++)t*=n;return t},inverse:function(e){return 1/e},log:function(e){return Math.log(e)/Math.log(10)},mod:function(e,t){return e%t},mul:function(e,t){return e*t},P:function(e,t){for(var n=1,r=Math.floor(e)-Math.floor(t)+1;r<=Math.floor(e);r++)n*=r;return n},Pi:function(e,t,n){for(var r=1,o=e;o<=t;o++)r*=Number(n.postfixEval({n:o}));return r},pow10x:function(e){for(var t=1;e--;)t*=10;return t},sigma:function(e,t,n){for(var r=0,o=e;o<=t;o++)r+=Number(n.postfixEval({n:o}));return r},sin:function(e){return Ve.math.isDegree&&(e=Ve.math.toRadian(e)),Math.sin(e)},sinh:function(e){return(Math.pow(Math.E,e)-Math.pow(Math.E,-1*e))/2},sub:function(e,t){return e-t},tan:function(e){return Ve.math.isDegree&&(e=Ve.math.toRadian(e)),Math.tan(e)},tanh:function(e){return Ve.sinha(e)/Ve.cosha(e)},toRadian:function(e){return e*Math.PI/180},and:function(e,t){return e&t}},Ve.Exception=function(e){this.message=e};var G1=Ve,ge=G1;function qe(e,t){for(var n=0;n<e.length;n++)e[n]+=t;return e}for(var on=[{token:"sin",show:"sin",type:0,value:ge.math.sin},{token:"cos",show:"cos",type:0,value:ge.math.cos},{token:"tan",show:"tan",type:0,value:ge.math.tan},{token:"pi",show:"π",type:3,value:"PI"},{token:"(",show:"(",type:4,value:"("},{token:")",show:")",type:5,value:")"},{token:"P",show:"P",type:10,value:ge.math.P},{token:"C",show:"C",type:10,value:ge.math.C},{token:" ",show:" ",type:14,value:" ".anchor},{token:"asin",show:"asin",type:0,value:ge.math.asin},{token:"acos",show:"acos",type:0,value:ge.math.acos},{token:"atan",show:"atan",type:0,value:ge.math.atan},{token:"7",show:"7",type:1,value:"7"},{token:"8",show:"8",type:1,value:"8"},{token:"9",show:"9",type:1,value:"9"},{token:"int",show:"Int",type:0,value:Math.floor},{token:"cosh",show:"cosh",type:0,value:ge.math.cosh},{token:"acosh",show:"acosh",type:0,value:ge.math.acosh},{token:"ln",show:" ln",type:0,value:Math.log},{token:"^",show:"^",type:10,value:Math.pow},{token:"root",show:"root",type:0,value:Math.sqrt},{token:"4",show:"4",type:1,value:"4"},{token:"5",show:"5",type:1,value:"5"},{token:"6",show:"6",type:1,value:"6"},{token:"/",show:"÷",type:2,value:ge.math.div},{token:"!",show:"!",type:7,value:ge.math.fact},{token:"tanh",show:"tanh",type:0,value:ge.math.tanh},{token:"atanh",show:"atanh",type:0,value:ge.math.atanh},{token:"Mod",show:" Mod ",type:2,value:ge.math.mod},{token:"1",show:"1",type:1,value:"1"},{token:"2",show:"2",type:1,value:"2"},{token:"3",show:"3",type:1,value:"3"},{token:"*",show:"×",type:2,value:ge.math.mul},{token:"sinh",show:"sinh",type:0,value:ge.math.sinh},{token:"asinh",show:"asinh",type:0,value:ge.math.asinh},{token:"e",show:"e",type:3,value:"E"},{token:"log",show:" log",type:0,value:ge.math.log},{token:"0",show:"0",type:1,value:"0"},{token:".",show:".",type:6,value:"."},{token:"+",show:"+",type:9,value:ge.math.add},{token:"-",show:"-",type:9,value:ge.math.sub},{token:",",show:",",type:11,value:","},{token:"Sigma",show:"Σ",type:12,value:ge.math.sigma},{token:"n",show:"n",type:13,value:"n"},{token:"Pi",show:"Π",type:12,value:ge.math.Pi},{token:"pow",show:"pow",type:8,value:Math.pow,numberOfArguments:2},{token:"&",show:"&",type:9,value:ge.math.and}],us={0:11,1:0,2:3,3:0,4:0,5:0,6:0,7:11,8:11,9:1,10:10,11:0,12:11,13:0,14:-1,15:11},Jo=0;Jo<on.length;Jo++)on[Jo].precedence=us[on[Jo].type];var Pt={0:!0,1:!0,3:!0,4:!0,6:!0,8:!0,9:!0,12:!0,13:!0,14:!0,15:!0},er={0:!0,1:!0,2:!0,3:!0,4:!0,5:!0,6:!0,7:!0,8:!0,9:!0,10:!0,11:!0,12:!0,13:!0,15:!0},V1={0:!0,3:!0,4:!0,8:!0,12:!0,13:!0,15:!0},vt={},Dr={0:!0,1:!0,3:!0,4:!0,6:!0,8:!0,12:!0,13:!0,15:!0},q1={1:!0},Ye=[[],["1","2","3","7","8","9","4","5","6","+","-","*","/","(",")","^","!","P","C","e","0",".",",","n"," ","&"],["pi","ln","Pi"],["sin","cos","tan","Del","int","Mod","log","pow"],["asin","acos","atan","cosh","root","tanh","sinh"],["acosh","atanh","asinh","Sigma"]];function Y1(e,t,n,r){for(var o=0;o<r;o++)if(e[n+o]!==t[o])return!1;return!0}ge.tokenTypes={FUNCTION_WITH_ONE_ARG:0,NUMBER:1,BINARY_OPERATOR_HIGH_PRECENDENCE:2,CONSTANT:3,OPENING_PARENTHESIS:4,CLOSING_PARENTHESIS:5,DECIMAL:6,POSTFIX_FUNCTION_WITH_ONE_ARG:7,FUNCTION_WITH_N_ARGS:8,BINARY_OPERATOR_LOW_PRECENDENCE:9,BINARY_OPERATOR_PERMUTATION:10,COMMA:11,EVALUATED_FUNCTION:12,EVALUATED_FUNCTION_PARAMETER:13,SPACE:14},ge.addToken=function(e){for(var t=0;t<e.length;t++){var n=e[t].token.length,r=-1;e[t].type===ge.tokenTypes.FUNCTION_WITH_N_ARGS&&e[t].numberOfArguments===void 0&&(e[t].numberOfArguments=2),Ye[n]=Ye[n]||[];for(var o=0;o<Ye[n].length;o++)if(e[t].token===Ye[n][o]){r=Jf(Ye[n][o],on);break}r===-1?(on.push(e[t]),e[t].precedence=us[e[t].type],Ye.length<=e[t].token.length&&(Ye[e[t].token.length]=[]),Ye[e[t].token.length].push(e[t].token)):(on[r]=e[t],e[t].precedence=us[e[t].type])}};function Jf(e,t){for(var n=0;n<t.length;n++)if(t[n].token===e)return n;return-1}function K1(e){for(var t=[],n=e.length,r,o,i,a=0;a<n;a++)if(!(a<n-1&&e[a]===" "&&e[a+1]===" ")){for(r="",o=e.length-a>Ye.length-2?Ye.length-1:e.length-a;o>0;o--)if(Ye[o]!==void 0)for(i=0;i<Ye[o].length;i++)Y1(e,Ye[o][i],a,o)&&(r=Ye[o][i],i=Ye[o].length,o=0);if(a+=r.length-1,r==="")throw new ge.Exception("Can't understand after "+e.slice(a));t.push(on[Jf(r,on)])}return t}var X1={value:ge.math.changeSign,type:0,pre:21,show:"-"},ei={value:")",show:")",type:5,pre:0},Ir={value:"(",type:4,pre:0,show:"("};ge.lex=function(e,t){var n=[Ir],r=[],o=e,i=Pt,a=0,s=vt,l="",c;typeof t<"u"&&ge.addToken(t);var d={},f=K1(o);for(c=0;c<f.length;c++){var p=f[c];if(p.type===14){if(c>0&&c<f.length-1&&f[c+1].type===1&&(f[c-1].type===1||f[c-1].type===6))throw new ge.Exception("Unexpected Space");continue}var m=p.token,h=p.type,v=p.value,x=p.precedence,y=p.show,b=n[n.length-1],$;for($=r.length;$--&&r[$]===0;)if([0,2,3,4,5,9,11,12,13].indexOf(h)!==-1){if(i[h]!==!0)throw new ge.Exception(m+" is not allowed after "+l);n.push(ei),i=er,s=Dr,r.pop()}if(i[h]!==!0)throw new ge.Exception(m+" is not allowed after "+l);if(s[h]===!0&&(h=2,v=ge.math.mul,y="×",x=3,c=c-1),d={value:v,type:h,pre:x,show:y,numberOfArguments:p.numberOfArguments},h===0)i=Pt,s=vt,qe(r,2),n.push(d),f[c+1].type!==4&&(n.push(Ir),r.push(2));else if(h===1)b.type===1?(b.value+=v,qe(r,1)):n.push(d),i=er,s=V1;else if(h===2)i=Pt,s=vt,qe(r,2),n.push(d);else if(h===3)n.push(d),i=er,s=Dr;else if(h===4)qe(r,1),a++,i=Pt,s=vt,n.push(d);else if(h===5){if(!a)throw new ge.Exception("Closing parenthesis are more than opening one, wait What!!!");a--,i=er,s=Dr,n.push(d),qe(r,1)}else if(h===6){if(b.hasDec)throw new ge.Exception("Two decimals are not allowed in one number");b.type!==1&&(b={value:0,type:1,pre:0},n.push(b)),i=q1,qe(r,1),s=vt,b.value+=v,b.hasDec=!0}else h===7&&(i=er,s=Dr,qe(r,1),n.push(d));h===8?(i=Pt,s=vt,qe(r,p.numberOfArguments+2),n.push(d),f[c+1].type!==4&&(n.push(Ir),r.push(p.numberOfArguments+2))):h===9?(b.type===9?b.value===ge.math.add?(b.value=v,b.show=y,qe(r,1)):b.value===ge.math.sub&&y==="-"&&(b.value=ge.math.add,b.show="+",qe(r,1)):b.type!==5&&b.type!==7&&b.type!==1&&b.type!==3&&b.type!==13?m==="-"&&(i=Pt,s=vt,qe(r,2).push(2),n.push(X1),n.push(Ir)):(n.push(d),qe(r,2)),i=Pt,s=vt):h===10?(i=Pt,s=vt,qe(r,2),n.push(d)):h===11?(i=Pt,s=vt,n.push(d)):h===12?(i=Pt,s=vt,qe(r,6),n.push(d),f[c+1].type!==4&&(n.push(Ir),r.push(6))):h===13&&(i=er,s=Dr,n.push(d)),qe(r,-1),l=m}for($=r.length;$--;)n.push(ei);if(i[5]!==!0)throw new ge.Exception("complete the expression");for(;a--;)n.push(ei);return n.push(ei),new ge(n)};var R1=ge,ds=R1;ds.prototype.toPostfix=function(){for(var e=[],t,n,r,o,i,a=[{value:"(",type:4,pre:0}],s=this.value,l=1;l<s.length;l++)if(s[l].type===1||s[l].type===3||s[l].type===13)s[l].type===1&&(s[l].value=Number(s[l].value)),e.push(s[l]);else if(s[l].type===4)a.push(s[l]);else if(s[l].type===5)for(;(n=a.pop()).type!==4;)e.push(n);else if(s[l].type===11){for(;(n=a.pop()).type!==4;)e.push(n);a.push(n)}else{t=s[l],o=t.pre,i=a[a.length-1],r=i.pre;var c=i.value=="Math.pow"&&t.value=="Math.pow";if(o>r)a.push(t);else{for(;r>=o&&!c||c&&o<r;)n=a.pop(),i=a[a.length-1],e.push(n),r=i.pre,c=t.value=="Math.pow"&&i.value=="Math.pow";a.push(t)}}return new ds(e)};var Z1=ds,Lr=Z1;Lr.prototype.postfixEval=function(e){e=e||{},e.PI=Math.PI,e.E=Math.E;for(var t=[],n,r,o,i=this.value,a=typeof e.n<"u",s=0;s<i.length;s++)if(i[s].type===1)t.push({value:i[s].value,type:1});else if(i[s].type===3)t.push({value:e[i[s].value],type:1});else if(i[s].type===0)typeof t[t.length-1].type>"u"?t[t.length-1].value.push(i[s]):t[t.length-1].value=i[s].value(t[t.length-1].value);else if(i[s].type===7)typeof t[t.length-1].type>"u"?t[t.length-1].value.push(i[s]):t[t.length-1].value=i[s].value(t[t.length-1].value);else if(i[s].type===8){for(var l=[],c=0;c<i[s].numberOfArguments;c++)l.push(t.pop().value);t.push({type:1,value:i[s].value.apply(i[s],l.reverse())})}else i[s].type===10?(n=t.pop(),r=t.pop(),typeof r.type>"u"?(r.value=r.concat(n),r.value.push(i[s]),t.push(r)):typeof n.type>"u"?(n.unshift(r),n.push(i[s]),t.push(n)):t.push({type:1,value:i[s].value(r.value,n.value)})):i[s].type===2||i[s].type===9?(n=t.pop(),r=t.pop(),typeof r.type>"u"?(r=r.concat(n),r.push(i[s]),t.push(r)):typeof n.type>"u"?(n.unshift(r),n.push(i[s]),t.push(n)):t.push({type:1,value:i[s].value(r.value,n.value)})):i[s].type===12?(n=t.pop(),typeof n.type<"u"&&(n=[n]),r=t.pop(),o=t.pop(),t.push({type:1,value:i[s].value(o.value,r.value,new Lr(n))})):i[s].type===13&&(a?t.push({value:e[i[s].value],type:3}):t.push([i[s]]));if(t.length>1)throw new Lr.Exception("Uncaught Syntax error");return t[0].value>1e15?"Infinity":parseFloat(t[0].value.toFixed(15))},Lr.eval=function(e,t,n){return typeof t>"u"?this.lex(e).toPostfix().postfixEval():typeof n>"u"?typeof t.length<"u"?this.lex(e,t).toPostfix().postfixEval():this.lex(e).toPostfix().postfixEval(t):this.lex(e,t).toPostfix().postfixEval(n)};var Q1=Lr,ep=Q1;ep.prototype.formulaEval=function(){for(var e,t,n,r=[],o=this.value,i=0;i<o.length;i++)o[i].type===1||o[i].type===3?r.push({value:o[i].type===3?o[i].show:o[i].value,type:1}):o[i].type===13?r.push({value:o[i].show,type:1}):o[i].type===0?r[r.length-1]={value:o[i].show+(o[i].show!="-"?"(":"")+r[r.length-1].value+(o[i].show!="-"?")":""),type:0}:o[i].type===7?r[r.length-1]={value:(r[r.length-1].type!=1?"(":"")+r[r.length-1].value+(r[r.length-1].type!=1?")":"")+o[i].show,type:7}:o[i].type===10?(e=r.pop(),t=r.pop(),o[i].show==="P"||o[i].show==="C"?r.push({value:"<sup>"+t.value+"</sup>"+o[i].show+"<sub>"+e.value+"</sub>",type:10}):r.push({value:(t.type!=1?"(":"")+t.value+(t.type!=1?")":"")+"<sup>"+e.value+"</sup>",type:1})):o[i].type===2||o[i].type===9?(e=r.pop(),t=r.pop(),r.push({value:(t.type!=1?"(":"")+t.value+(t.type!=1?")":"")+o[i].show+(e.type!=1?"(":"")+e.value+(e.type!=1?")":""),type:o[i].type})):o[i].type===12&&(e=r.pop(),t=r.pop(),n=r.pop(),r.push({value:o[i].show+"("+n.value+","+t.value+","+e.value+")",type:12}));return r[0].value};var J1=ep,e$=j1,t$=B1,n$=J1,r$=100,o$=/(\+|\-|\*|\\|[^a-z]|)(\s*)(\()/g,fs,i$=a$;function a$(e,t){fs=0,t=Math.pow(10,t===void 0?5:t),e=e.replace(/\n+/g," ");function n(o,i,a){if(fs++>r$)throw fs=0,new Error("Call stack overflow for "+a);if(o==="")throw new Error(i+"(): '"+a+"' must contain a non-whitespace string");o=r(o,a);var s=s$(o);if(s.length>1||o.indexOf("var(")>-1)return i+"("+o+")";var l=s[0]||"";l==="%"&&(o=o.replace(/\b[0-9\.]+%/g,function(f){return parseFloat(f.slice(0,-1))*.01}));var c=o.replace(new RegExp(l,"gi"),""),d;try{d=n$.eval(c)}catch{return i+"("+o+")"}return l==="%"&&(d*=100),(i.length||l==="%")&&(d=Math.round(d*t)/t),d+=l,d}function r(o,i){o=o.replace(/((?:\-[a-z]+\-)?calc)/g,"");for(var a="",s=o,l;l=o$.exec(s);){l[0].index>0&&(a+=s.substring(0,l[0].index));var c=e$("(",")",s.substring([0].index));if(c.body==="")throw new Error("'"+o+"' must contain a non-whitespace string");var d=n(c.body,"",i);a+=c.pre+d,s=c.post}return a+s}return t$(e,/((?:\-[a-z]+\-)?calc)\(/,n)}function s$(e){for(var t=[],n=[],r=/[\.0-9]([%a-z]+)/gi,o=r.exec(e);o;)!o||!o[1]||(n.indexOf(o[1].toLowerCase())===-1&&(t.push(o[1]),n.push(o[1].toLowerCase())),o=r.exec(e));return t}const ps=Qn(i$);var l$=typeof Ar=="object"&&Ar&&Ar.Object===Object&&Ar,c$=l$,u$=c$,d$=typeof self=="object"&&self&&self.Object===Object&&self,f$=u$||d$||Function("return this")(),ti=f$,p$=ti,h$=p$.Symbol,tp=h$,np=tp,rp=Object.prototype,m$=rp.hasOwnProperty,v$=rp.toString,Fr=np?np.toStringTag:void 0;function g$(e){var t=m$.call(e,Fr),n=e[Fr];try{e[Fr]=void 0;var r=!0}catch{}var o=v$.call(e);return r&&(t?e[Fr]=n:delete e[Fr]),o}var y$=g$,b$=Object.prototype,x$=b$.toString;function w$(e){return x$.call(e)}var $$=w$,op=tp,C$=y$,S$=$$,E$="[object Null]",T$="[object Undefined]",ip=op?op.toStringTag:void 0;function P$(e){return e==null?e===void 0?T$:E$:ip&&ip in Object(e)?C$(e):S$(e)}var ap=P$;function M$(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var ni=M$,k$=ap,O$=ni,_$="[object AsyncFunction]",N$="[object Function]",A$="[object GeneratorFunction]",D$="[object Proxy]";function I$(e){if(!O$(e))return!1;var t=k$(e);return t==N$||t==A$||t==_$||t==D$}var L$=I$,F$=ti,j$=F$["__core-js_shared__"],z$=j$,hs=z$,sp=function(){var e=/[^.]+$/.exec(hs&&hs.keys&&hs.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function W$(e){return!!sp&&sp in e}var B$=W$,U$=Function.prototype,H$=U$.toString;function G$(e){if(e!=null){try{return H$.call(e)}catch{}try{return e+""}catch{}}return""}var V$=G$,q$=L$,Y$=B$,K$=ni,X$=V$,R$=/[\\^$.*+?()[\]{}|]/g,Z$=/^\[object .+?Constructor\]$/,Q$=Function.prototype,J$=Object.prototype,eC=Q$.toString,tC=J$.hasOwnProperty,nC=RegExp("^"+eC.call(tC).replace(R$,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function rC(e){if(!K$(e)||Y$(e))return!1;var t=q$(e)?nC:Z$;return t.test(X$(e))}var oC=rC;function iC(e,t){return e==null?void 0:e[t]}var aC=iC,sC=oC,lC=aC;function cC(e,t){var n=lC(e,t);return sC(n)?n:void 0}var lp=cC,uC=lp,dC=uC(Object,"create"),ri=dC,cp=ri;function fC(){this.__data__=cp?cp(null):{},this.size=0}var pC=fC;function hC(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var mC=hC,vC=ri,gC="__lodash_hash_undefined__",yC=Object.prototype,bC=yC.hasOwnProperty;function xC(e){var t=this.__data__;if(vC){var n=t[e];return n===gC?void 0:n}return bC.call(t,e)?t[e]:void 0}var wC=xC,$C=ri,CC=Object.prototype,SC=CC.hasOwnProperty;function EC(e){var t=this.__data__;return $C?t[e]!==void 0:SC.call(t,e)}var TC=EC,PC=ri,MC="__lodash_hash_undefined__";function kC(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=PC&&t===void 0?MC:t,this}var OC=kC,_C=pC,NC=mC,AC=wC,DC=TC,IC=OC;function tr(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])}}tr.prototype.clear=_C,tr.prototype.delete=NC,tr.prototype.get=AC,tr.prototype.has=DC,tr.prototype.set=IC;var LC=tr;function FC(){this.__data__=[],this.size=0}var jC=FC;function zC(e,t){return e===t||e!==e&&t!==t}var WC=zC,BC=WC;function UC(e,t){for(var n=e.length;n--;)if(BC(e[n][0],t))return n;return-1}var oi=UC,HC=oi,GC=Array.prototype,VC=GC.splice;function qC(e){var t=this.__data__,n=HC(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():VC.call(t,n,1),--this.size,!0}var YC=qC,KC=oi;function XC(e){var t=this.__data__,n=KC(t,e);return n<0?void 0:t[n][1]}var RC=XC,ZC=oi;function QC(e){return ZC(this.__data__,e)>-1}var JC=QC,eS=oi;function tS(e,t){var n=this.__data__,r=eS(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var nS=tS,rS=jC,oS=YC,iS=RC,aS=JC,sS=nS;function nr(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])}}nr.prototype.clear=rS,nr.prototype.delete=oS,nr.prototype.get=iS,nr.prototype.has=aS,nr.prototype.set=sS;var lS=nr,cS=lp,uS=ti,dS=cS(uS,"Map"),fS=dS,up=LC,pS=lS,hS=fS;function mS(){this.size=0,this.__data__={hash:new up,map:new(hS||pS),string:new up}}var vS=mS;function gS(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var yS=gS,bS=yS;function xS(e,t){var n=e.__data__;return bS(t)?n[typeof t=="string"?"string":"hash"]:n.map}var ii=xS,wS=ii;function $S(e){var t=wS(this,e).delete(e);return this.size-=t?1:0,t}var CS=$S,SS=ii;function ES(e){return SS(this,e).get(e)}var TS=ES,PS=ii;function MS(e){return PS(this,e).has(e)}var kS=MS,OS=ii;function _S(e,t){var n=OS(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var NS=_S,AS=vS,DS=CS,IS=TS,LS=kS,FS=NS;function rr(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])}}rr.prototype.clear=AS,rr.prototype.delete=DS,rr.prototype.get=IS,rr.prototype.has=LS,rr.prototype.set=FS;var jS=rr,dp=jS,zS="Expected a function";function ms(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(zS);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(ms.Cache||dp),n}ms.Cache=dp;var WS=ms;const BS=Qn(WS);var fp="__react_svg_text_measurement_id";function US(e,t){try{var n=document.getElementById(fp);if(!n){var r=document.createElementNS("http://www.w3.org/2000/svg","svg");r.setAttribute("aria-hidden","true"),r.style.width="0",r.style.height="0",r.style.position="absolute",r.style.top="-100%",r.style.left="-100%",n=document.createElementNS("http://www.w3.org/2000/svg","text"),n.setAttribute("id",fp),r.appendChild(n),document.body.appendChild(r)}return Object.assign(n.style,t),n.textContent=e,n.getComputedTextLength()}catch{return null}}const pp=BS(US,function(e,t){return e+"_"+JSON.stringify(t)});var HS=["verticalAnchor","scaleToFit","angle","width","lineHeight","capHeight","children","style"];function GS(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function vs(e){return typeof e=="number"}function hp(e){return typeof e=="number"&&Number.isFinite(e)||typeof e=="string"}function VS(e){var t=e.verticalAnchor,n=t===void 0?"end":t,r=e.scaleToFit,o=r===void 0?!1:r,i=e.angle,a=e.width,s=e.lineHeight,l=s===void 0?"1em":s,c=e.capHeight,d=c===void 0?"0.71em":c,f=e.children,p=e.style,m=GS(e,HS),h=m.x,v=h===void 0?0:h,x=m.y,y=x===void 0?0:x,b=!hp(v)||!hp(y),$=u.useMemo(function(){var _=f==null?[]:f.toString().split(/(?:(?!\u00A0+)\s+)/);return{wordsWithWidth:_.map(function(j){return{word:j,wordWidth:pp(j,p)||0}}),spaceWidth:pp(" ",p)||0}},[f,p]),S=$.wordsWithWidth,w=$.spaceWidth,T=u.useMemo(function(){return b?[]:a||o?S.reduce(function(_,j){var F=j.word,V=j.wordWidth,R=_[_.length-1];if(R&&(a==null||o||(R.width||0)+V+w<a))R.words.push(F),R.width=R.width||0,R.width+=V+w;else{var X={words:[F],width:V};_.push(X)}return _},[]):[{words:f==null?[]:f.toString().split(/(?:(?!\u00A0+)\s+)/)}]},[b,a,o,f,S,w]),O=u.useMemo(function(){var _=b?"":ps(n==="start"?"calc("+d+")":n==="middle"?"calc("+(T.length-1)/2+" * -"+l+" + ("+d+" / 2))":"calc("+(T.length-1)+" * -"+l+")");return _},[b,n,d,T.length,l]),P=u.useMemo(function(){var _=[];if(b)return"";if(vs(v)&&vs(y)&&vs(a)&&o&&T.length>0){var j=T[0].width||1,F=o==="shrink-only"?Math.min(a/j,1):a/j,V=F,R=v-F*v,X=y-V*y;_.push("matrix("+F+", 0, 0, "+V+", "+R+", "+X+")")}return i&&_.push("rotate("+i+", "+v+", "+y+")"),_.length>0?_.join(" "):""},[b,v,y,a,o,T,i]);return{wordsByLines:T,startDy:O,transform:P}}var qS=["dx","dy","textAnchor","innerRef","innerTextRef","verticalAnchor","angle","lineHeight","scaleToFit","capHeight","width"];function gs(){return gs=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},gs.apply(this,arguments)}function YS(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var KS={overflow:"visible"};function ys(e){var t=e.dx,n=t===void 0?0:t,r=e.dy,o=r===void 0?0:r,i=e.textAnchor,a=i===void 0?"start":i,s=e.innerRef,l=e.innerTextRef;e.verticalAnchor,e.angle;var c=e.lineHeight,d=c===void 0?"1em":c;e.scaleToFit,e.capHeight,e.width;var f=YS(e,qS),p=f.x,m=p===void 0?0:p,h=f.fontSize,v=VS(e),x=v.wordsByLines,y=v.startDy,b=v.transform;return u.createElement("svg",{ref:s,x:n,y:o,fontSize:h,style:KS},x.length>0?u.createElement("text",gs({ref:l,transform:b},f,{textAnchor:a}),x.map(function($,S){return u.createElement("tspan",{key:S,x:m,dy:S===0?y:d},$.words.join(" "))})):null)}function bs(e,t,n){var r,o,i,a,s;t==null&&(t=100);function l(){var d=Date.now()-a;d<t&&d>=0?r=setTimeout(l,t-d):(r=null,n||(s=e.apply(i,o),i=o=null))}var c=function(){i=this,o=arguments,a=Date.now();var d=n&&!r;return r||(r=setTimeout(l,t)),d&&(s=e.apply(i,o),i=o=null),s};return c.clear=function(){r&&(clearTimeout(r),r=null)},c.flush=function(){r&&(s=e.apply(i,o),i=o=null,clearTimeout(r),r=null)},c}bs.debounce=bs;var XS=bs;const mp=Qn(XS);function RS(e){let{debounce:t,scroll:n,polyfill:r,offsetSize:o}=e===void 0?{debounce:0,scroll:!1,offsetSize:!1}:e;const i=r||(typeof window>"u"?class{}:window.ResizeObserver);if(!i)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[a,s]=u.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),l=u.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:a}),c=t?typeof t=="number"?t:t.scroll:null,d=t?typeof t=="number"?t:t.resize:null,f=u.useRef(!1);u.useEffect(()=>(f.current=!0,()=>void(f.current=!1)));const[p,m,h]=u.useMemo(()=>{const b=()=>{if(!l.current.element)return;const{left:$,top:S,width:w,height:T,bottom:O,right:P,x:_,y:j}=l.current.element.getBoundingClientRect(),F={left:$,top:S,width:w,height:T,bottom:O,right:P,x:_,y:j};l.current.element instanceof HTMLElement&&o&&(F.height=l.current.element.offsetHeight,F.width=l.current.element.offsetWidth),Object.freeze(F),f.current&&!eE(l.current.lastBounds,F)&&s(l.current.lastBounds=F)};return[b,d?mp(b,d):b,c?mp(b,c):b]},[s,o,c,d]);function v(){l.current.scrollContainers&&(l.current.scrollContainers.forEach(b=>b.removeEventListener("scroll",h,!0)),l.current.scrollContainers=null),l.current.resizeObserver&&(l.current.resizeObserver.disconnect(),l.current.resizeObserver=null)}function x(){l.current.element&&(l.current.resizeObserver=new i(h),l.current.resizeObserver.observe(l.current.element),n&&l.current.scrollContainers&&l.current.scrollContainers.forEach(b=>b.addEventListener("scroll",h,{capture:!0,passive:!0})))}const y=b=>{!b||b===l.current.element||(v(),l.current.element=b,l.current.scrollContainers=vp(b),x())};return QS(h,!!n),ZS(m),u.useEffect(()=>{v(),x()},[n,h,m]),u.useEffect(()=>v,[]),[y,a,p]}function ZS(e){u.useEffect(()=>{const t=e;return window.addEventListener("resize",t),()=>void window.removeEventListener("resize",t)},[e])}function QS(e,t){u.useEffect(()=>{if(t){const n=e;return window.addEventListener("scroll",n,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",n,!0)}},[e,t])}function vp(e){const t=[];if(!e||e===document.body)return t;const{overflow:n,overflowX:r,overflowY:o}=window.getComputedStyle(e);return[n,r,o].some(i=>i==="auto"||i==="scroll")&&t.push(e),[...t,...vp(e.parentElement)]}const JS=["x","y","top","bottom","left","right","width","height"],eE=(e,t)=>JS.every(n=>e[n]===t[n]);var an=function(){function e(n){var r=n.x,o=r===void 0?0:r,i=n.y,a=i===void 0?0:i;this.x=0,this.y=0,this.x=o,this.y=a}var t=e.prototype;return t.value=function(){return{x:this.x,y:this.y}},t.toArray=function(){return[this.x,this.y]},e}();function tE(e,t){return new an({x:e.x+t.x,y:e.y+t.y})}function nE(e,t){return new an({x:e.x-t.x,y:e.y-t.y})}const gp=Jn(Object.freeze(Object.defineProperty({__proto__:null,Point:an,subtractPoints:nE,sumPoints:tE},Symbol.toStringTag,{value:"Module"})));function rE(e){return!!e&&e instanceof Element}function oE(e){return!!e&&(e instanceof SVGElement||"ownerSVGElement"in e)}function iE(e){return!!e&&"createSVGPoint"in e}function aE(e){return!!e&&"getScreenCTM"in e}function sE(e){return!!e&&"changedTouches"in e}function lE(e){return!!e&&"clientX"in e}function cE(e){return!!e&&(e instanceof Event||"nativeEvent"in e&&e.nativeEvent instanceof Event)}function jr(){return jr=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},jr.apply(this,arguments)}var xs={x:0,y:0};function uE(e){if(!e)return jr({},xs);if(sE(e))return e.changedTouches.length>0?{x:e.changedTouches[0].clientX,y:e.changedTouches[0].clientY}:jr({},xs);if(lE(e))return{x:e.clientX,y:e.clientY};var t=e==null?void 0:e.target,n=t&&"getBoundingClientRect"in t?t.getBoundingClientRect():null;return n?{x:n.x+n.width/2,y:n.y+n.height/2}:jr({},xs)}function yp(e,t){if(!e||!t)return null;var n=uE(t),r=oE(e)?e.ownerSVGElement:e,o=aE(r)?r.getScreenCTM():null;if(iE(r)&&o){var i=r.createSVGPoint();return i.x=n.x,i.y=n.y,i=i.matrixTransform(o.inverse()),new an({x:i.x,y:i.y})}var a=e.getBoundingClientRect();return new an({x:n.x-a.left-e.clientLeft,y:n.y-a.top-e.clientTop})}function dE(e,t){if(rE(e)&&t)return yp(e,t);if(cE(e)){var n=e,r=n.target;if(r)return yp(r,n)}return null}function sn(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function fE(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function ws(e){let t,n,r;e.length!==2?(t=sn,n=(s,l)=>sn(e(s),l),r=(s,l)=>e(s)-l):(t=e===sn||e===fE?e:pE,n=e,r=e);function o(s,l,c=0,d=s.length){if(c<d){if(t(l,l)!==0)return d;do{const f=c+d>>>1;n(s[f],l)<0?c=f+1:d=f}while(c<d)}return c}function i(s,l,c=0,d=s.length){if(c<d){if(t(l,l)!==0)return d;do{const f=c+d>>>1;n(s[f],l)<=0?c=f+1:d=f}while(c<d)}return c}function a(s,l,c=0,d=s.length){const f=o(s,l,c,d-1);return f>c&&r(s[f-1],l)>-r(s[f],l)?f-1:f}return{left:o,center:a,right:i}}function pE(){return 0}function bp(e){return e===null?NaN:+e}function*hE(e,t){if(t===void 0)for(let n of e)n!=null&&(n=+n)>=n&&(yield n);else{let n=-1;for(let r of e)(r=t(r,++n,e))!=null&&(r=+r)>=r&&(yield r)}}const mE=ws(sn).right;ws(bp).center;const or=mE;function vE(e,t){let n=0;if(t===void 0)for(let r of e)r!=null&&(r=+r)>=r&&++n;else{let r=-1;for(let o of e)(o=t(o,++r,e))!=null&&(o=+o)>=o&&++n}return n}function ai(e,t){let n,r;if(t===void 0)for(const o of e)o!=null&&(n===void 0?o>=o&&(n=r=o):(n>o&&(n=o),r<o&&(r=o)));else{let o=-1;for(let i of e)(i=t(i,++o,e))!=null&&(n===void 0?i>=i&&(n=r=i):(n>i&&(n=i),r<i&&(r=i)))}return[n,r]}class xp extends Map{constructor(t,n=bE){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,o]of t)this.set(r,o)}get(t){return super.get(wp(this,t))}has(t){return super.has(wp(this,t))}set(t,n){return super.set(gE(this,t),n)}delete(t){return super.delete(yE(this,t))}}function wp({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function gE({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function yE({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function bE(e){return e!==null&&typeof e=="object"?e.valueOf():e}function xE(e){return e}function wE(e=sn){if(e===sn)return $p;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 $p(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}var $E=Array.prototype,CE=$E.slice;function $s(e){return()=>e}const SE=Math.sqrt(50),EE=Math.sqrt(10),TE=Math.sqrt(2);function si(e,t,n){const r=(t-e)/Math.max(0,n),o=Math.floor(Math.log10(r)),i=r/Math.pow(10,o),a=i>=SE?10:i>=EE?5:i>=TE?2:1;let s,l,c;return o<0?(c=Math.pow(10,-o)/a,s=Math.round(e*c),l=Math.round(t*c),s/c<e&&++s,l/c>t&&--l,c=-c):(c=Math.pow(10,o)*a,s=Math.round(e/c),l=Math.round(t/c),s*c<e&&++s,l*c>t&&--l),l<s&&.5<=n&&n<2?si(e,t,n*2):[s,l,c]}function li(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[o,i,a]=r?si(t,e,n):si(e,t,n);if(!(i>=o))return[];const s=i-o+1,l=new Array(s);if(r)if(a<0)for(let c=0;c<s;++c)l[c]=(i-c)/-a;else for(let c=0;c<s;++c)l[c]=(i-c)*a;else if(a<0)for(let c=0;c<s;++c)l[c]=(o+c)/-a;else for(let c=0;c<s;++c)l[c]=(o+c)*a;return l}function ir(e,t,n){return t=+t,e=+e,n=+n,si(e,t,n)[2]}function Cs(e,t,n){t=+t,e=+e,n=+n;const r=t<e,o=r?ir(t,e,n):ir(e,t,n);return(r?-1:1)*(o<0?1/-o:o)}function PE(e,t,n){let r;for(;;){const o=ir(e,t,n);if(o===r||o===0||!isFinite(o))return[e,t];o>0?(e=Math.floor(e/o)*o,t=Math.ceil(t/o)*o):o<0&&(e=Math.ceil(e*o)/o,t=Math.floor(t*o)/o),r=o}}function ME(e){return Math.max(1,Math.ceil(Math.log(vE(e))/Math.LN2)+1)}function kE(){var e=xE,t=ai,n=ME;function r(o){Array.isArray(o)||(o=Array.from(o));var i,a=o.length,s,l,c=new Array(a);for(i=0;i<a;++i)c[i]=e(o[i],i,o);var d=t(c),f=d[0],p=d[1],m=n(c,f,p);if(!Array.isArray(m)){const $=p,S=+m;if(t===ai&&([f,p]=PE(f,p,S)),m=li(f,p,S),m[0]<=f&&(l=ir(f,p,S)),m[m.length-1]>=p)if($>=p&&t===ai){const w=ir(f,p,S);isFinite(w)&&(w>0?p=(Math.floor(p/w)+1)*w:w<0&&(p=(Math.ceil(p*-w)+1)/-w))}else m.pop()}for(var h=m.length,v=0,x=h;m[v]<=f;)++v;for(;m[x-1]>p;)--x;(v||x<h)&&(m=m.slice(v,x),h=x-v);var y=new Array(h+1),b;for(i=0;i<=h;++i)b=y[i]=[],b.x0=i>0?m[i-1]:f,b.x1=i<h?m[i]:p;if(isFinite(l)){if(l>0)for(i=0;i<a;++i)(s=c[i])!=null&&f<=s&&s<=p&&y[Math.min(h,Math.floor((s-f)/l))].push(o[i]);else if(l<0){for(i=0;i<a;++i)if((s=c[i])!=null&&f<=s&&s<=p){const $=Math.floor((f-s)*l);y[Math.min(h,$+(m[$]<=s))].push(o[i])}}}else for(i=0;i<a;++i)(s=c[i])!=null&&f<=s&&s<=p&&y[or(m,s,0,h)].push(o[i]);return y}return r.value=function(o){return arguments.length?(e=typeof o=="function"?o:$s(o),r):e},r.domain=function(o){return arguments.length?(t=typeof o=="function"?o:$s([o[0],o[1]]),r):t},r.thresholds=function(o){return arguments.length?(n=typeof o=="function"?o:$s(Array.isArray(o)?CE.call(o):o),r):n},r}function Ss(e,t){let n;if(t===void 0)for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let o of e)(o=t(o,++r,e))!=null&&(n<o||n===void 0&&o>=o)&&(n=o)}return n}function Cp(e,t){let n;if(t===void 0)for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let o of e)(o=t(o,++r,e))!=null&&(n>o||n===void 0&&o>=o)&&(n=o)}return n}function Sp(e,t,n=0,r=1/0,o){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(o=o===void 0?$p:wE(o);r>n;){if(r-n>600){const l=r-n+1,c=t-n+1,d=Math.log(l),f=.5*Math.exp(2*d/3),p=.5*Math.sqrt(d*f*(l-f)/l)*(c-l/2<0?-1:1),m=Math.max(n,Math.floor(t-c*f/l+p)),h=Math.min(r,Math.floor(t+(l-c)*f/l+p));Sp(e,t,m,h,o)}const i=e[t];let a=n,s=r;for(zr(e,n,t),o(e[r],i)>0&&zr(e,n,r);a<s;){for(zr(e,a,s),++a,--s;o(e[a],i)<0;)++a;for(;o(e[s],i)>0;)--s}o(e[n],i)===0?zr(e,n,s):(++s,zr(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function zr(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function OE(e,t,n){if(e=Float64Array.from(hE(e,n)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return Cp(e);if(t>=1)return Ss(e);var r,o=(r-1)*t,i=Math.floor(o),a=Ss(Sp(e,i).subarray(0,i+1)),s=Cp(e.subarray(i+1));return a+(s-a)*(o-i)}}function _E(e,t,n=bp){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,o=(r-1)*t,i=Math.floor(o),a=+n(e[i],i,e),s=+n(e[i+1],i+1,e);return a+(s-a)*(o-i)}}function NE(e,t,n){e=+e,t=+t,n=(o=arguments.length)<2?(t=e,e=0,1):o<3?1:+n;for(var r=-1,o=Math.max(0,Math.ceil((t-e)/n))|0,i=new Array(o);++r<o;)i[r]=e+r*n;return i}function ut(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Wt(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 Es=Symbol("implicit");function ci(){var e=new xp,t=[],n=[],r=Es;function o(i){let a=e.get(i);if(a===void 0){if(r!==Es)return r;e.set(i,a=t.push(i)-1)}return n[a%n.length]}return o.domain=function(i){if(!arguments.length)return t.slice();t=[],e=new xp;for(const a of i)e.has(a)||e.set(a,t.push(a)-1);return o},o.range=function(i){return arguments.length?(n=Array.from(i),o):n.slice()},o.unknown=function(i){return arguments.length?(r=i,o):r},o.copy=function(){return ci(t,n).unknown(r)},ut.apply(o,arguments),o}function ui(){var e=ci().unknown(void 0),t=e.domain,n=e.range,r=0,o=1,i,a,s=!1,l=0,c=0,d=.5;delete e.unknown;function f(){var p=t().length,m=o<r,h=m?o:r,v=m?r:o;i=(v-h)/Math.max(1,p-l+c*2),s&&(i=Math.floor(i)),h+=(v-h-i*(p-l))*d,a=i*(1-l),s&&(h=Math.round(h),a=Math.round(a));var x=NE(p).map(function(y){return h+i*y});return n(m?x.reverse():x)}return e.domain=function(p){return arguments.length?(t(p),f()):t()},e.range=function(p){return arguments.length?([r,o]=p,r=+r,o=+o,f()):[r,o]},e.rangeRound=function(p){return[r,o]=p,r=+r,o=+o,s=!0,f()},e.bandwidth=function(){return a},e.step=function(){return i},e.round=function(p){return arguments.length?(s=!!p,f()):s},e.padding=function(p){return arguments.length?(l=Math.min(1,c=+p),f()):l},e.paddingInner=function(p){return arguments.length?(l=Math.min(1,p),f()):l},e.paddingOuter=function(p){return arguments.length?(c=+p,f()):c},e.align=function(p){return arguments.length?(d=Math.max(0,Math.min(1,p)),f()):d},e.copy=function(){return ui(t(),[r,o]).round(s).paddingInner(l).paddingOuter(c).align(d)},ut.apply(f(),arguments)}function Ep(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return Ep(t())},e}function Tp(){return Ep(ui.apply(null,arguments).paddingInner(1))}function ar(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Wr(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function ln(){}var Tn=.7,sr=1/Tn,lr="\\s*([+-]?\\d+)\\s*",Br="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Mt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",AE=/^#([0-9a-f]{3,8})$/,DE=new RegExp(`^rgb\\(${lr},${lr},${lr}\\)$`),IE=new RegExp(`^rgb\\(${Mt},${Mt},${Mt}\\)$`),LE=new RegExp(`^rgba\\(${lr},${lr},${lr},${Br}\\)$`),FE=new RegExp(`^rgba\\(${Mt},${Mt},${Mt},${Br}\\)$`),jE=new RegExp(`^hsl\\(${Br},${Mt},${Mt}\\)$`),zE=new RegExp(`^hsla\\(${Br},${Mt},${Mt},${Br}\\)$`),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};ar(ln,Ur,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Mp,formatHex:Mp,formatHex8:WE,formatHsl:BE,formatRgb:kp,toString:kp});function Mp(){return this.rgb().formatHex()}function WE(){return this.rgb().formatHex8()}function BE(){return Dp(this).formatHsl()}function kp(){return this.rgb().formatRgb()}function Ur(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=AE.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Op(t):n===3?new ze(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?di(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?di(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=DE.exec(e))?new ze(t[1],t[2],t[3],1):(t=IE.exec(e))?new ze(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=LE.exec(e))?di(t[1],t[2],t[3],t[4]):(t=FE.exec(e))?di(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=jE.exec(e))?Ap(t[1],t[2]/100,t[3]/100,1):(t=zE.exec(e))?Ap(t[1],t[2]/100,t[3]/100,t[4]):Pp.hasOwnProperty(e)?Op(Pp[e]):e==="transparent"?new ze(NaN,NaN,NaN,0):null}function Op(e){return new ze(e>>16&255,e>>8&255,e&255,1)}function di(e,t,n,r){return r<=0&&(e=t=n=NaN),new ze(e,t,n,r)}function Ts(e){return e instanceof ln||(e=Ur(e)),e?(e=e.rgb(),new ze(e.r,e.g,e.b,e.opacity)):new ze}function fi(e,t,n,r){return arguments.length===1?Ts(e):new ze(e,t,n,r??1)}function ze(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}ar(ze,fi,Wr(ln,{brighter(e){return e=e==null?sr:Math.pow(sr,e),new ze(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Tn:Math.pow(Tn,e),new ze(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ze(Pn(this.r),Pn(this.g),Pn(this.b),pi(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:_p,formatHex:_p,formatHex8:UE,formatRgb:Np,toString:Np}));function _p(){return`#${Mn(this.r)}${Mn(this.g)}${Mn(this.b)}`}function UE(){return`#${Mn(this.r)}${Mn(this.g)}${Mn(this.b)}${Mn((isNaN(this.opacity)?1:this.opacity)*255)}`}function Np(){const e=pi(this.opacity);return`${e===1?"rgb(":"rgba("}${Pn(this.r)}, ${Pn(this.g)}, ${Pn(this.b)}${e===1?")":`, ${e})`}`}function pi(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Pn(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Mn(e){return e=Pn(e),(e<16?"0":"")+e.toString(16)}function Ap(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new gt(e,t,n,r)}function Dp(e){if(e instanceof gt)return new gt(e.h,e.s,e.l,e.opacity);if(e instanceof ln||(e=Ur(e)),!e)return new gt;if(e instanceof gt)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,s=i-o,l=(i+o)/2;return s?(t===i?a=(n-r)/s+(n<r)*6:n===i?a=(r-t)/s+2:a=(t-n)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new gt(a,s,l,e.opacity)}function Ps(e,t,n,r){return arguments.length===1?Dp(e):new gt(e,t,n,r??1)}function gt(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}ar(gt,Ps,Wr(ln,{brighter(e){return e=e==null?sr:Math.pow(sr,e),new gt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Tn:Math.pow(Tn,e),new gt(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,o=2*n-r;return new ze(Ms(e>=240?e-240:e+120,o,r),Ms(e,o,r),Ms(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new gt(Ip(this.h),hi(this.s),hi(this.l),pi(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=pi(this.opacity);return`${e===1?"hsl(":"hsla("}${Ip(this.h)}, ${hi(this.s)*100}%, ${hi(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Ip(e){return e=(e||0)%360,e<0?e+360:e}function hi(e){return Math.max(0,Math.min(1,e||0))}function Ms(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 Lp=Math.PI/180,Fp=180/Math.PI,mi=18,jp=.96422,zp=1,Wp=.82521,Bp=4/29,cr=6/29,Up=3*cr*cr,HE=cr*cr*cr;function Hp(e){if(e instanceof kt)return new kt(e.l,e.a,e.b,e.opacity);if(e instanceof Bt)return Gp(e);e instanceof ze||(e=Ts(e));var t=As(e.r),n=As(e.g),r=As(e.b),o=Os((.2225045*t+.7168786*n+.0606169*r)/zp),i,a;return t===n&&n===r?i=a=o:(i=Os((.4360747*t+.3850649*n+.1430804*r)/jp),a=Os((.0139322*t+.0971045*n+.7141733*r)/Wp)),new kt(116*o-16,500*(i-o),200*(o-a),e.opacity)}function ks(e,t,n,r){return arguments.length===1?Hp(e):new kt(e,t,n,r??1)}function kt(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}ar(kt,ks,Wr(ln,{brighter(e){return new kt(this.l+mi*(e??1),this.a,this.b,this.opacity)},darker(e){return new kt(this.l-mi*(e??1),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return t=jp*_s(t),e=zp*_s(e),n=Wp*_s(n),new ze(Ns(3.1338561*t-1.6168667*e-.4906146*n),Ns(-.9787684*t+1.9161415*e+.033454*n),Ns(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}}));function Os(e){return e>HE?Math.pow(e,1/3):e/Up+Bp}function _s(e){return e>cr?e*e*e:Up*(e-Bp)}function Ns(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function As(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function GE(e){if(e instanceof Bt)return new Bt(e.h,e.c,e.l,e.opacity);if(e instanceof kt||(e=Hp(e)),e.a===0&&e.b===0)return new Bt(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Fp;return new Bt(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function Ds(e,t,n,r){return arguments.length===1?GE(e):new Bt(e,t,n,r??1)}function Bt(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function Gp(e){if(isNaN(e.h))return new kt(e.l,0,0,e.opacity);var t=e.h*Lp;return new kt(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}ar(Bt,Ds,Wr(ln,{brighter(e){return new Bt(this.h,this.c,this.l+mi*(e??1),this.opacity)},darker(e){return new Bt(this.h,this.c,this.l-mi*(e??1),this.opacity)},rgb(){return Gp(this).rgb()}}));var Vp=-.14861,Is=1.78277,Ls=-.29227,vi=-.90649,Hr=1.97294,qp=Hr*vi,Yp=Hr*Is,Kp=Is*Ls-vi*Vp;function VE(e){if(e instanceof kn)return new kn(e.h,e.s,e.l,e.opacity);e instanceof ze||(e=Ts(e));var t=e.r/255,n=e.g/255,r=e.b/255,o=(Kp*r+qp*t-Yp*n)/(Kp+qp-Yp),i=r-o,a=(Hr*(n-o)-Ls*i)/vi,s=Math.sqrt(a*a+i*i)/(Hr*o*(1-o)),l=s?Math.atan2(a,i)*Fp-120:NaN;return new kn(l<0?l+360:l,s,o,e.opacity)}function Fs(e,t,n,r){return arguments.length===1?VE(e):new kn(e,t,n,r??1)}function kn(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}ar(kn,Fs,Wr(ln,{brighter(e){return e=e==null?sr:Math.pow(sr,e),new kn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Tn:Math.pow(Tn,e),new kn(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*Lp,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),o=Math.sin(e);return new ze(255*(t+n*(Vp*r+Is*o)),255*(t+n*(Ls*r+vi*o)),255*(t+n*(Hr*r)),this.opacity)}}));function Xp(e,t,n,r,o){var i=e*e,a=i*e;return((1-3*e+3*i-a)*t+(4-6*i+3*a)*n+(1+3*e+3*i-3*a)*r+a*o)/6}function Rp(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),o=e[r],i=e[r+1],a=r>0?e[r-1]:2*o-i,s=r<t-1?e[r+2]:2*i-o;return Xp((n-r/t)*t,a,o,i,s)}}function Zp(e){var t=e.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*t),o=e[(r+t-1)%t],i=e[r%t],a=e[(r+1)%t],s=e[(r+2)%t];return Xp((n-r/t)*t,o,i,a,s)}}const gi=e=>()=>e;function Qp(e,t){return function(n){return e+n*t}}function qE(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 yi(e,t){var n=t-e;return n?Qp(e,n>180||n<-180?n-360*Math.round(n/360):n):gi(isNaN(e)?t:e)}function YE(e){return(e=+e)==1?We:function(t,n){return n-t?qE(t,n,e):gi(isNaN(t)?n:t)}}function We(e,t){var n=t-e;return n?Qp(e,n):gi(isNaN(e)?t:e)}const bi=function e(t){var n=YE(t);function r(o,i){var a=n((o=fi(o)).r,(i=fi(i)).r),s=n(o.g,i.g),l=n(o.b,i.b),c=We(o.opacity,i.opacity);return function(d){return o.r=a(d),o.g=s(d),o.b=l(d),o.opacity=c(d),o+""}}return r.gamma=e,r}(1);function Jp(e){return function(t){var n=t.length,r=new Array(n),o=new Array(n),i=new Array(n),a,s;for(a=0;a<n;++a)s=fi(t[a]),r[a]=s.r||0,o[a]=s.g||0,i[a]=s.b||0;return r=e(r),o=e(o),i=e(i),s.opacity=1,function(l){return s.r=r(l),s.g=o(l),s.b=i(l),s+""}}}var KE=Jp(Rp),XE=Jp(Zp);function js(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),o;return function(i){for(o=0;o<n;++o)r[o]=e[o]*(1-i)+t[o]*i;return r}}function eh(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function RE(e,t){return(eh(t)?js:th)(e,t)}function th(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,o=new Array(r),i=new Array(n),a;for(a=0;a<r;++a)o[a]=On(e[a],t[a]);for(;a<n;++a)i[a]=t[a];return function(s){for(a=0;a<r;++a)i[a]=o[a](s);return i}}function nh(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function yt(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function rh(e,t){var n={},r={},o;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(o in t)o in e?n[o]=On(e[o],t[o]):r[o]=t[o];return function(i){for(o in n)r[o]=n[o](i);return r}}var zs=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ws=new RegExp(zs.source,"g");function ZE(e){return function(){return e}}function QE(e){return function(t){return e(t)+""}}function oh(e,t){var n=zs.lastIndex=Ws.lastIndex=0,r,o,i,a=-1,s=[],l=[];for(e=e+"",t=t+"";(r=zs.exec(e))&&(o=Ws.exec(t));)(i=o.index)>n&&(i=t.slice(n,i),s[a]?s[a]+=i:s[++a]=i),(r=r[0])===(o=o[0])?s[a]?s[a]+=o:s[++a]=o:(s[++a]=null,l.push({i:a,x:yt(r,o)})),n=Ws.lastIndex;return n<t.length&&(i=t.slice(n),s[a]?s[a]+=i:s[++a]=i),s.length<2?l[0]?QE(l[0].x):ZE(t):(t=l.length,function(c){for(var d=0,f;d<t;++d)s[(f=l[d]).i]=f.x(c);return s.join("")})}function On(e,t){var n=typeof t,r;return t==null||n==="boolean"?gi(t):(n==="number"?yt:n==="string"?(r=Ur(t))?(t=r,bi):oh:t instanceof Ur?bi:t instanceof Date?nh:eh(t)?js:Array.isArray(t)?th:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?rh:yt)(e,t)}function JE(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}function e2(e,t){var n=yi(+e,+t);return function(r){var o=n(r);return o-360*Math.floor(o/360)}}function Gr(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var ih=180/Math.PI,Bs={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function ah(e,t,n,r,o,i){var a,s,l;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(l=e*n+t*r)&&(n-=e*l,r-=t*l),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,l/=s),e*r<t*n&&(e=-e,t=-t,l=-l,a=-a),{translateX:o,translateY:i,rotate:Math.atan2(t,e)*ih,skewX:Math.atan(l)*ih,scaleX:a,scaleY:s}}var xi;function t2(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Bs:ah(t.a,t.b,t.c,t.d,t.e,t.f)}function n2(e){return e==null||(xi||(xi=document.createElementNS("http://www.w3.org/2000/svg","g")),xi.setAttribute("transform",e),!(e=xi.transform.baseVal.consolidate()))?Bs:(e=e.matrix,ah(e.a,e.b,e.c,e.d,e.e,e.f))}function sh(e,t,n,r){function o(c){return c.length?c.pop()+" ":""}function i(c,d,f,p,m,h){if(c!==f||d!==p){var v=m.push("translate(",null,t,null,n);h.push({i:v-4,x:yt(c,f)},{i:v-2,x:yt(d,p)})}else(f||p)&&m.push("translate("+f+t+p+n)}function a(c,d,f,p){c!==d?(c-d>180?d+=360:d-c>180&&(c+=360),p.push({i:f.push(o(f)+"rotate(",null,r)-2,x:yt(c,d)})):d&&f.push(o(f)+"rotate("+d+r)}function s(c,d,f,p){c!==d?p.push({i:f.push(o(f)+"skewX(",null,r)-2,x:yt(c,d)}):d&&f.push(o(f)+"skewX("+d+r)}function l(c,d,f,p,m,h){if(c!==f||d!==p){var v=m.push(o(m)+"scale(",null,",",null,")");h.push({i:v-4,x:yt(c,f)},{i:v-2,x:yt(d,p)})}else(f!==1||p!==1)&&m.push(o(m)+"scale("+f+","+p+")")}return function(c,d){var f=[],p=[];return c=e(c),d=e(d),i(c.translateX,c.translateY,d.translateX,d.translateY,f,p),a(c.rotate,d.rotate,f,p),s(c.skewX,d.skewX,f,p),l(c.scaleX,c.scaleY,d.scaleX,d.scaleY,f,p),c=d=null,function(m){for(var h=-1,v=p.length,x;++h<v;)f[(x=p[h]).i]=x.x(m);return f.join("")}}}var r2=sh(t2,"px, ","px)","deg)"),o2=sh(n2,", ",")",")"),i2=1e-12;function lh(e){return((e=Math.exp(e))+1/e)/2}function a2(e){return((e=Math.exp(e))-1/e)/2}function s2(e){return((e=Math.exp(2*e))-1)/(e+1)}const l2=function e(t,n,r){function o(i,a){var s=i[0],l=i[1],c=i[2],d=a[0],f=a[1],p=a[2],m=d-s,h=f-l,v=m*m+h*h,x,y;if(v<i2)y=Math.log(p/c)/t,x=function(O){return[s+O*m,l+O*h,c*Math.exp(t*O*y)]};else{var b=Math.sqrt(v),$=(p*p-c*c+r*v)/(2*c*n*b),S=(p*p-c*c-r*v)/(2*p*n*b),w=Math.log(Math.sqrt($*$+1)-$),T=Math.log(Math.sqrt(S*S+1)-S);y=(T-w)/t,x=function(O){var P=O*y,_=lh(w),j=c/(n*b)*(_*s2(t*P+w)-a2(w));return[s+j*m,l+j*h,c*_/lh(t*P+w)]}}return x.duration=y*1e3*t/Math.SQRT2,x}return o.rho=function(i){var a=Math.max(.001,+i),s=a*a,l=s*s;return e(a,s,l)},o}(Math.SQRT2,2,4);function ch(e){return function(t,n){var r=e((t=Ps(t)).h,(n=Ps(n)).h),o=We(t.s,n.s),i=We(t.l,n.l),a=We(t.opacity,n.opacity);return function(s){return t.h=r(s),t.s=o(s),t.l=i(s),t.opacity=a(s),t+""}}}const uh=ch(yi);var dh=ch(We);function fh(e,t){var n=We((e=ks(e)).l,(t=ks(t)).l),r=We(e.a,t.a),o=We(e.b,t.b),i=We(e.opacity,t.opacity);return function(a){return e.l=n(a),e.a=r(a),e.b=o(a),e.opacity=i(a),e+""}}function ph(e){return function(t,n){var r=e((t=Ds(t)).h,(n=Ds(n)).h),o=We(t.c,n.c),i=We(t.l,n.l),a=We(t.opacity,n.opacity);return function(s){return t.h=r(s),t.c=o(s),t.l=i(s),t.opacity=a(s),t+""}}}const hh=ph(yi);var mh=ph(We);function vh(e){return function t(n){n=+n;function r(o,i){var a=e((o=Fs(o)).h,(i=Fs(i)).h),s=We(o.s,i.s),l=We(o.l,i.l),c=We(o.opacity,i.opacity);return function(d){return o.h=a(d),o.s=s(d),o.l=l(Math.pow(d,n)),o.opacity=c(d),o+""}}return r.gamma=t,r}(1)}const gh=vh(yi);var yh=vh(We);function bh(e,t){t===void 0&&(t=e,e=On);for(var n=0,r=t.length-1,o=t[0],i=new Array(r<0?0:r);n<r;)i[n]=e(o,o=t[++n]);return function(a){var s=Math.max(0,Math.min(r-1,Math.floor(a*=r)));return i[s](a-s)}}function c2(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e(r/(t-1));return n}function u2(e){return function(){return e}}function wi(e){return+e}var xh=[0,1];function Ke(e){return e}function Us(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:u2(isNaN(t)?NaN:.5)}function d2(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function f2(e,t,n){var r=e[0],o=e[1],i=t[0],a=t[1];return o<r?(r=Us(o,r),i=n(a,i)):(r=Us(r,o),i=n(i,a)),function(s){return i(r(s))}}function p2(e,t,n){var r=Math.min(e.length,t.length)-1,o=new Array(r),i=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)o[a]=Us(e[a],e[a+1]),i[a]=n(t[a],t[a+1]);return function(s){var l=or(e,s,1,r)-1;return i[l](o[l](s))}}function Vr(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function $i(){var e=xh,t=xh,n=On,r,o,i,a=Ke,s,l,c;function d(){var p=Math.min(e.length,t.length);return a!==Ke&&(a=d2(e[0],e[p-1])),s=p>2?p2:f2,l=c=null,f}function f(p){return p==null||isNaN(p=+p)?i:(l||(l=s(e.map(r),t,n)))(r(a(p)))}return f.invert=function(p){return a(o((c||(c=s(t,e.map(r),yt)))(p)))},f.domain=function(p){return arguments.length?(e=Array.from(p,wi),d()):e.slice()},f.range=function(p){return arguments.length?(t=Array.from(p),d()):t.slice()},f.rangeRound=function(p){return t=Array.from(p),n=Gr,d()},f.clamp=function(p){return arguments.length?(a=p?!0:Ke,d()):a!==Ke},f.interpolate=function(p){return arguments.length?(n=p,d()):n},f.unknown=function(p){return arguments.length?(i=p,f):i},function(p,m){return r=p,o=m,d()}}function Hs(){return $i()(Ke,Ke)}function h2(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Ci(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function ur(e){return e=Ci(Math.abs(e)),e?e[1]:NaN}function m2(e,t){return function(n,r){for(var o=n.length,i=[],a=0,s=e[0],l=0;o>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),i.push(n.substring(o-=s,o+s)),!((l+=s+1)>r));)s=e[a=(a+1)%e.length];return i.reverse().join(t)}}function v2(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var g2=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function qr(e){if(!(t=g2.exec(e)))throw new Error("invalid format: "+e);var t;return new Gs({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]})}qr.prototype=Gs.prototype;function Gs(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+""}Gs.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 y2(e){e:for(var t=e.length,n=1,r=-1,o;n<t;++n)switch(e[n]){case".":r=o=n;break;case"0":r===0&&(r=n),o=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(o+1):e}var wh;function b2(e,t){var n=Ci(e,t);if(!n)return e+"";var r=n[0],o=n[1],i=o-(wh=Math.max(-8,Math.min(8,Math.floor(o/3)))*3)+1,a=r.length;return i===a?r:i>a?r+new Array(i-a+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+Ci(e,Math.max(0,t+i-1))[0]}function $h(e,t){var n=Ci(e,t);if(!n)return e+"";var r=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")}const Ch={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:h2,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)=>$h(e*100,t),r:$h,s:b2,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Sh(e){return e}var Eh=Array.prototype.map,Th=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function x2(e){var t=e.grouping===void 0||e.thousands===void 0?Sh:m2(Eh.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",o=e.decimal===void 0?".":e.decimal+"",i=e.numerals===void 0?Sh:v2(Eh.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function c(f){f=qr(f);var p=f.fill,m=f.align,h=f.sign,v=f.symbol,x=f.zero,y=f.width,b=f.comma,$=f.precision,S=f.trim,w=f.type;w==="n"?(b=!0,w="g"):Ch[w]||($===void 0&&($=12),S=!0,w="g"),(x||p==="0"&&m==="=")&&(x=!0,p="0",m="=");var T=v==="$"?n:v==="#"&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",O=v==="$"?r:/[%p]/.test(w)?a:"",P=Ch[w],_=/[defgprs%]/.test(w);$=$===void 0?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,$)):Math.max(0,Math.min(20,$));function j(F){var V=T,R=O,X,C,I;if(w==="c")R=P(F)+R,F="";else{F=+F;var H=F<0||1/F<0;if(F=isNaN(F)?l:P(Math.abs(F),$),S&&(F=y2(F)),H&&+F==0&&h!=="+"&&(H=!1),V=(H?h==="("?h:s:h==="-"||h==="("?"":h)+V,R=(w==="s"?Th[8+wh/3]:"")+R+(H&&h==="("?")":""),_){for(X=-1,C=F.length;++X<C;)if(I=F.charCodeAt(X),48>I||I>57){R=(I===46?o+F.slice(X+1):F.slice(X))+R,F=F.slice(0,X);break}}}b&&!x&&(F=t(F,1/0));var B=V.length+F.length+R.length,A=B<y?new Array(y-B+1).join(p):"";switch(b&&x&&(F=t(A+F,A.length?y-R.length:1/0),A=""),m){case"<":F=V+F+R+A;break;case"=":F=V+A+F+R;break;case"^":F=A.slice(0,B=A.length>>1)+V+F+R+A.slice(B);break;default:F=A+V+F+R;break}return i(F)}return j.toString=function(){return f+""},j}function d(f,p){var m=c((f=qr(f),f.type="f",f)),h=Math.max(-8,Math.min(8,Math.floor(ur(p)/3)))*3,v=Math.pow(10,-h),x=Th[8+h/3];return function(y){return m(v*y)+x}}return{format:c,formatPrefix:d}}var Si,Ei,Ph;w2({thousands:",",grouping:[3],currency:["$",""]});function w2(e){return Si=x2(e),Ei=Si.format,Ph=Si.formatPrefix,Si}function $2(e){return Math.max(0,-ur(Math.abs(e)))}function C2(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(ur(t)/3)))*3-ur(Math.abs(e)))}function S2(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,ur(t)-ur(e))+1}function Mh(e,t,n,r){var o=Cs(e,t,n),i;switch(r=qr(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(i=C2(o,a))&&(r.precision=i),Ph(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(i=S2(o,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=i-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(i=$2(o))&&(r.precision=i-(r.type==="%")*2);break}}return Ei(r)}function cn(e){var t=e.domain;return e.ticks=function(n){var r=t();return li(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var o=t();return Mh(o[0],o[o.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),o=0,i=r.length-1,a=r[o],s=r[i],l,c,d=10;for(s<a&&(c=a,a=s,s=c,c=o,o=i,i=c);d-- >0;){if(c=ir(a,s,n),c===l)return r[o]=a,r[i]=s,t(r);if(c>0)a=Math.floor(a/c)*c,s=Math.ceil(s/c)*c;else if(c<0)a=Math.ceil(a*c)/c,s=Math.floor(s*c)/c;else break;l=c}return e},e}function Vs(){var e=Hs();return e.copy=function(){return Vr(e,Vs())},ut.apply(e,arguments),cn(e)}function kh(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,wi),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return kh(e).unknown(t)},e=arguments.length?Array.from(e,wi):[0,1],cn(n)}function Oh(e,t){e=e.slice();var n=0,r=e.length-1,o=e[n],i=e[r],a;return i<o&&(a=n,n=r,r=a,a=o,o=i,i=a),e[n]=t.floor(o),e[r]=t.ceil(i),e}function _h(e){return Math.log(e)}function Nh(e){return Math.exp(e)}function E2(e){return-Math.log(-e)}function T2(e){return-Math.exp(-e)}function P2(e){return isFinite(e)?+("1e"+e):e<0?0:e}function M2(e){return e===10?P2:e===Math.E?Math.exp:t=>Math.pow(e,t)}function k2(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 Ah(e){return(t,n)=>-e(-t,n)}function qs(e){const t=e(_h,Nh),n=t.domain;let r=10,o,i;function a(){return o=k2(r),i=M2(r),n()[0]<0?(o=Ah(o),i=Ah(i),e(E2,T2)):e(_h,Nh),t}return t.base=function(s){return arguments.length?(r=+s,a()):r},t.domain=function(s){return arguments.length?(n(s),a()):n()},t.ticks=s=>{const l=n();let c=l[0],d=l[l.length-1];const f=d<c;f&&([c,d]=[d,c]);let p=o(c),m=o(d),h,v;const x=s==null?10:+s;let y=[];if(!(r%1)&&m-p<x){if(p=Math.floor(p),m=Math.ceil(m),c>0){for(;p<=m;++p)for(h=1;h<r;++h)if(v=p<0?h/i(-p):h*i(p),!(v<c)){if(v>d)break;y.push(v)}}else for(;p<=m;++p)for(h=r-1;h>=1;--h)if(v=p>0?h/i(-p):h*i(p),!(v<c)){if(v>d)break;y.push(v)}y.length*2<x&&(y=li(c,d,x))}else y=li(p,m,Math.min(m-p,x)).map(i);return f?y.reverse():y},t.tickFormat=(s,l)=>{if(s==null&&(s=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=qr(l)).precision==null&&(l.trim=!0),l=Ei(l)),s===1/0)return l;const c=Math.max(1,r*s/t.ticks().length);return d=>{let f=d/i(Math.round(o(d)));return f*r<r-.5&&(f*=r),f<=c?l(d):""}},t.nice=()=>n(Oh(n(),{floor:s=>i(Math.floor(o(s))),ceil:s=>i(Math.ceil(o(s)))})),t}function Ys(){const e=qs($i()).domain([1,10]);return e.copy=()=>Vr(e,Ys()).base(e.base()),ut.apply(e,arguments),e}function Dh(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Ih(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Ks(e){var t=1,n=e(Dh(t),Ih(t));return n.constant=function(r){return arguments.length?e(Dh(t=+r),Ih(t)):t},cn(n)}function Xs(){var e=Ks($i());return e.copy=function(){return Vr(e,Xs()).constant(e.constant())},ut.apply(e,arguments)}function Lh(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function O2(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function _2(e){return e<0?-e*e:e*e}function Rs(e){var t=e(Ke,Ke),n=1;function r(){return n===1?e(Ke,Ke):n===.5?e(O2,_2):e(Lh(n),Lh(1/n))}return t.exponent=function(o){return arguments.length?(n=+o,r()):n},cn(t)}function Ti(){var e=Rs($i());return e.copy=function(){return Vr(e,Ti()).exponent(e.exponent())},ut.apply(e,arguments),e}function Fh(){return Ti.apply(null,arguments).exponent(.5)}function jh(e){return Math.sign(e)*e*e}function N2(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function Zs(){var e=Hs(),t=[0,1],n=!1,r;function o(i){var a=N2(e(i));return isNaN(a)?r:n?Math.round(a):a}return o.invert=function(i){return e.invert(jh(i))},o.domain=function(i){return arguments.length?(e.domain(i),o):e.domain()},o.range=function(i){return arguments.length?(e.range((t=Array.from(i,wi)).map(jh)),o):t.slice()},o.rangeRound=function(i){return o.range(i).round(!0)},o.round=function(i){return arguments.length?(n=!!i,o):n},o.clamp=function(i){return arguments.length?(e.clamp(i),o):e.clamp()},o.unknown=function(i){return arguments.length?(r=i,o):r},o.copy=function(){return Zs(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},ut.apply(o,arguments),cn(o)}function Qs(){var e=[],t=[],n=[],r;function o(){var a=0,s=Math.max(1,t.length);for(n=new Array(s-1);++a<s;)n[a-1]=_E(e,a/s);return i}function i(a){return a==null||isNaN(a=+a)?r:t[or(n,a)]}return i.invertExtent=function(a){var s=t.indexOf(a);return s<0?[NaN,NaN]:[s>0?n[s-1]:e[0],s<n.length?n[s]:e[e.length-1]]},i.domain=function(a){if(!arguments.length)return e.slice();e=[];for(let s of a)s!=null&&!isNaN(s=+s)&&e.push(s);return e.sort(sn),o()},i.range=function(a){return arguments.length?(t=Array.from(a),o()):t.slice()},i.unknown=function(a){return arguments.length?(r=a,i):r},i.quantiles=function(){return n.slice()},i.copy=function(){return Qs().domain(e).range(t).unknown(r)},ut.apply(i,arguments)}function Js(){var e=0,t=1,n=1,r=[.5],o=[0,1],i;function a(l){return l!=null&&l<=l?o[or(r,l,0,n)]:i}function s(){var l=-1;for(r=new Array(n);++l<n;)r[l]=((l+1)*t-(l-n)*e)/(n+1);return a}return a.domain=function(l){return arguments.length?([e,t]=l,e=+e,t=+t,s()):[e,t]},a.range=function(l){return arguments.length?(n=(o=Array.from(l)).length-1,s()):o.slice()},a.invertExtent=function(l){var c=o.indexOf(l);return c<0?[NaN,NaN]:c<1?[e,r[0]]:c>=n?[r[n-1],t]:[r[c-1],r[c]]},a.unknown=function(l){return arguments.length&&(i=l),a},a.thresholds=function(){return r.slice()},a.copy=function(){return Js().domain([e,t]).range(o).unknown(i)},ut.apply(cn(a),arguments)}function el(){var e=[.5],t=[0,1],n,r=1;function o(i){return i!=null&&i<=i?t[or(e,i,0,r)]:n}return o.domain=function(i){return arguments.length?(e=Array.from(i),r=Math.min(e.length,t.length-1),o):e.slice()},o.range=function(i){return arguments.length?(t=Array.from(i),r=Math.min(e.length,t.length-1),o):t.slice()},o.invertExtent=function(i){var a=t.indexOf(i);return[e[a-1],e[a]]},o.unknown=function(i){return arguments.length?(n=i,o):n},o.copy=function(){return el().domain(e).range(t).unknown(n)},ut.apply(o,arguments)}const tl=new Date,nl=new Date;function Fe(e,t,n,r){function o(i){return e(i=arguments.length===0?new Date:new Date(+i)),i}return o.floor=i=>(e(i=new Date(+i)),i),o.ceil=i=>(e(i=new Date(i-1)),t(i,1),e(i),i),o.round=i=>{const a=o(i),s=o.ceil(i);return i-a<s-i?a:s},o.offset=(i,a)=>(t(i=new Date(+i),a==null?1:Math.floor(a)),i),o.range=(i,a,s)=>{const l=[];if(i=o.ceil(i),s=s==null?1:Math.floor(s),!(i<a)||!(s>0))return l;let c;do l.push(c=new Date(+i)),t(i,s),e(i);while(c<i&&i<a);return l},o.filter=i=>Fe(a=>{if(a>=a)for(;e(a),!i(a);)a.setTime(a-1)},(a,s)=>{if(a>=a)if(s<0)for(;++s<=0;)for(;t(a,-1),!i(a););else for(;--s>=0;)for(;t(a,1),!i(a););}),n&&(o.count=(i,a)=>(tl.setTime(+i),nl.setTime(+a),e(tl),e(nl),Math.floor(n(tl,nl))),o.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?o.filter(r?a=>r(a)%i===0:a=>o.count(0,a)%i===0):o)),o}const dr=Fe(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);dr.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Fe(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):dr);const zh=dr.range,Ut=1e3,dt=Ut*60,Ht=dt*60,Gt=Ht*24,rl=Gt*7,Wh=Gt*30,ol=Gt*365,bt=Fe(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Ut)},(e,t)=>(t-e)/Ut,e=>e.getUTCSeconds()),Bh=bt.range,Yr=Fe(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ut)},(e,t)=>{e.setTime(+e+t*dt)},(e,t)=>(t-e)/dt,e=>e.getMinutes()),A2=Yr.range,Kr=Fe(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*dt)},(e,t)=>(t-e)/dt,e=>e.getUTCMinutes()),D2=Kr.range,Xr=Fe(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ut-e.getMinutes()*dt)},(e,t)=>{e.setTime(+e+t*Ht)},(e,t)=>(t-e)/Ht,e=>e.getHours()),I2=Xr.range,Rr=Fe(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Ht)},(e,t)=>(t-e)/Ht,e=>e.getUTCHours()),L2=Rr.range,_n=Fe(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*dt)/Gt,e=>e.getDate()-1),F2=_n.range,fr=Fe(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Gt,e=>e.getUTCDate()-1),j2=fr.range,il=Fe(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Gt,e=>Math.floor(e/Gt)),z2=il.range;function Nn(e){return Fe(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())*dt)/rl)}const An=Nn(0),Zr=Nn(1),Uh=Nn(2),Hh=Nn(3),Dn=Nn(4),Gh=Nn(5),Vh=Nn(6),qh=An.range,W2=Zr.range,B2=Uh.range,U2=Hh.range,H2=Dn.range,G2=Gh.range,V2=Vh.range;function In(e){return Fe(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)/rl)}const Ln=In(0),Qr=In(1),Yh=In(2),Kh=In(3),Fn=In(4),Xh=In(5),Rh=In(6),Zh=Ln.range,q2=Qr.range,Y2=Yh.range,K2=Kh.range,X2=Fn.range,R2=Xh.range,Z2=Rh.range,Jr=Fe(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()),Q2=Jr.range,eo=Fe(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()),J2=eo.range,xt=Fe(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());xt.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Fe(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)});const eT=xt.range,wt=Fe(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());wt.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Fe(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)});const tT=wt.range;function Qh(e,t,n,r,o,i){const a=[[bt,1,Ut],[bt,5,5*Ut],[bt,15,15*Ut],[bt,30,30*Ut],[i,1,dt],[i,5,5*dt],[i,15,15*dt],[i,30,30*dt],[o,1,Ht],[o,3,3*Ht],[o,6,6*Ht],[o,12,12*Ht],[r,1,Gt],[r,2,2*Gt],[n,1,rl],[t,1,Wh],[t,3,3*Wh],[e,1,ol]];function s(c,d,f){const p=d<c;p&&([c,d]=[d,c]);const m=f&&typeof f.range=="function"?f:l(c,d,f),h=m?m.range(c,+d+1):[];return p?h.reverse():h}function l(c,d,f){const p=Math.abs(d-c)/f,m=ws(([,,x])=>x).right(a,p);if(m===a.length)return e.every(Cs(c/ol,d/ol,f));if(m===0)return dr.every(Math.max(Cs(c,d,f),1));const[h,v]=a[p/a[m-1][2]<a[m][2]/p?m-1:m];return h.every(v)}return[s,l]}const[Jh,em]=Qh(wt,eo,Ln,il,Rr,Kr),[tm,nm]=Qh(xt,Jr,An,_n,Xr,Yr);function al(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 sl(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 to(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function nT(e){var t=e.dateTime,n=e.date,r=e.time,o=e.periods,i=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,c=no(o),d=ro(o),f=no(i),p=ro(i),m=no(a),h=ro(a),v=no(s),x=ro(s),y=no(l),b=ro(l),$={a:H,A:B,b:A,B:N,c:null,d:lm,e:lm,f:ET,g:IT,G:FT,H:$T,I:CT,j:ST,L:cm,m:TT,M:PT,p:z,q:J,Q:mm,s:vm,S:MT,u:kT,U:OT,V:_T,w:NT,W:AT,x:null,X:null,y:DT,Y:LT,Z:jT,"%":hm},S={a:Q,A:oe,b:te,B:ae,c:null,d:dm,e:dm,f:UT,g:QT,G:eP,H:zT,I:WT,j:BT,L:fm,m:HT,M:GT,p:Y,q:le,Q:mm,s:vm,S:VT,u:qT,U:YT,V:KT,w:XT,W:RT,x:null,X:null,y:ZT,Y:JT,Z:tP,"%":hm},w={a:j,A:F,b:V,B:R,c:X,d:am,e:am,f:yT,g:im,G:om,H:sm,I:sm,j:hT,L:gT,m:pT,M:mT,p:_,q:fT,Q:xT,s:wT,S:vT,u:sT,U:lT,V:cT,w:aT,W:uT,x:C,X:I,y:im,Y:om,Z:dT,"%":bT};$.x=T(n,$),$.X=T(r,$),$.c=T(t,$),S.x=T(n,S),S.X=T(r,S),S.c=T(t,S);function T(U,q){return function(re){var k=[],de=-1,pe=0,Ce=U.length,ke,je,_t;for(re instanceof Date||(re=new Date(+re));++de<Ce;)U.charCodeAt(de)===37&&(k.push(U.slice(pe,de)),(je=rm[ke=U.charAt(++de)])!=null?ke=U.charAt(++de):je=ke==="e"?" ":"0",(_t=q[ke])&&(ke=_t(re,je)),k.push(ke),pe=de+1);return k.push(U.slice(pe,de)),k.join("")}}function O(U,q){return function(re){var k=to(1900,void 0,1),de=P(k,U,re+="",0),pe,Ce;if(de!=re.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(q&&!("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?(pe=sl(to(k.y,0,1)),Ce=pe.getUTCDay(),pe=Ce>4||Ce===0?Qr.ceil(pe):Qr(pe),pe=fr.offset(pe,(k.V-1)*7),k.y=pe.getUTCFullYear(),k.m=pe.getUTCMonth(),k.d=pe.getUTCDate()+(k.w+6)%7):(pe=al(to(k.y,0,1)),Ce=pe.getDay(),pe=Ce>4||Ce===0?Zr.ceil(pe):Zr(pe),pe=_n.offset(pe,(k.V-1)*7),k.y=pe.getFullYear(),k.m=pe.getMonth(),k.d=pe.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),Ce="Z"in k?sl(to(k.y,0,1)).getUTCDay():al(to(k.y,0,1)).getDay(),k.m=0,k.d="W"in k?(k.w+6)%7+k.W*7-(Ce+5)%7:k.w+k.U*7-(Ce+6)%7);return"Z"in k?(k.H+=k.Z/100|0,k.M+=k.Z%100,sl(k)):al(k)}}function P(U,q,re,k){for(var de=0,pe=q.length,Ce=re.length,ke,je;de<pe;){if(k>=Ce)return-1;if(ke=q.charCodeAt(de++),ke===37){if(ke=q.charAt(de++),je=w[ke in rm?q.charAt(de++):ke],!je||(k=je(U,re,k))<0)return-1}else if(ke!=re.charCodeAt(k++))return-1}return k}function _(U,q,re){var k=c.exec(q.slice(re));return k?(U.p=d.get(k[0].toLowerCase()),re+k[0].length):-1}function j(U,q,re){var k=m.exec(q.slice(re));return k?(U.w=h.get(k[0].toLowerCase()),re+k[0].length):-1}function F(U,q,re){var k=f.exec(q.slice(re));return k?(U.w=p.get(k[0].toLowerCase()),re+k[0].length):-1}function V(U,q,re){var k=y.exec(q.slice(re));return k?(U.m=b.get(k[0].toLowerCase()),re+k[0].length):-1}function R(U,q,re){var k=v.exec(q.slice(re));return k?(U.m=x.get(k[0].toLowerCase()),re+k[0].length):-1}function X(U,q,re){return P(U,t,q,re)}function C(U,q,re){return P(U,n,q,re)}function I(U,q,re){return P(U,r,q,re)}function H(U){return a[U.getDay()]}function B(U){return i[U.getDay()]}function A(U){return l[U.getMonth()]}function N(U){return s[U.getMonth()]}function z(U){return o[+(U.getHours()>=12)]}function J(U){return 1+~~(U.getMonth()/3)}function Q(U){return a[U.getUTCDay()]}function oe(U){return i[U.getUTCDay()]}function te(U){return l[U.getUTCMonth()]}function ae(U){return s[U.getUTCMonth()]}function Y(U){return o[+(U.getUTCHours()>=12)]}function le(U){return 1+~~(U.getUTCMonth()/3)}return{format:function(U){var q=T(U+="",$);return q.toString=function(){return U},q},parse:function(U){var q=O(U+="",!1);return q.toString=function(){return U},q},utcFormat:function(U){var q=T(U+="",S);return q.toString=function(){return U},q},utcParse:function(U){var q=O(U+="",!0);return q.toString=function(){return U},q}}}var rm={"-":"",_:" ",0:"0"},Be=/^\s*\d+/,rT=/^%/,oT=/[\\^$*+?|[\]().{}]/g;function Se(e,t,n){var r=e<0?"-":"",o=(r?-e:e)+"",i=o.length;return r+(i<n?new Array(n-i+1).join(t)+o:o)}function iT(e){return e.replace(oT,"\\$&")}function no(e){return new RegExp("^(?:"+e.map(iT).join("|")+")","i")}function ro(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function aT(e,t,n){var r=Be.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function sT(e,t,n){var r=Be.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function lT(e,t,n){var r=Be.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function cT(e,t,n){var r=Be.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function uT(e,t,n){var r=Be.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function om(e,t,n){var r=Be.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function im(e,t,n){var r=Be.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function dT(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 fT(e,t,n){var r=Be.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function pT(e,t,n){var r=Be.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function am(e,t,n){var r=Be.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function hT(e,t,n){var r=Be.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function sm(e,t,n){var r=Be.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function mT(e,t,n){var r=Be.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function vT(e,t,n){var r=Be.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function gT(e,t,n){var r=Be.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function yT(e,t,n){var r=Be.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function bT(e,t,n){var r=rT.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function xT(e,t,n){var r=Be.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function wT(e,t,n){var r=Be.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function lm(e,t){return Se(e.getDate(),t,2)}function $T(e,t){return Se(e.getHours(),t,2)}function CT(e,t){return Se(e.getHours()%12||12,t,2)}function ST(e,t){return Se(1+_n.count(xt(e),e),t,3)}function cm(e,t){return Se(e.getMilliseconds(),t,3)}function ET(e,t){return cm(e,t)+"000"}function TT(e,t){return Se(e.getMonth()+1,t,2)}function PT(e,t){return Se(e.getMinutes(),t,2)}function MT(e,t){return Se(e.getSeconds(),t,2)}function kT(e){var t=e.getDay();return t===0?7:t}function OT(e,t){return Se(An.count(xt(e)-1,e),t,2)}function um(e){var t=e.getDay();return t>=4||t===0?Dn(e):Dn.ceil(e)}function _T(e,t){return e=um(e),Se(Dn.count(xt(e),e)+(xt(e).getDay()===4),t,2)}function NT(e){return e.getDay()}function AT(e,t){return Se(Zr.count(xt(e)-1,e),t,2)}function DT(e,t){return Se(e.getFullYear()%100,t,2)}function IT(e,t){return e=um(e),Se(e.getFullYear()%100,t,2)}function LT(e,t){return Se(e.getFullYear()%1e4,t,4)}function FT(e,t){var n=e.getDay();return e=n>=4||n===0?Dn(e):Dn.ceil(e),Se(e.getFullYear()%1e4,t,4)}function jT(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Se(t/60|0,"0",2)+Se(t%60,"0",2)}function dm(e,t){return Se(e.getUTCDate(),t,2)}function zT(e,t){return Se(e.getUTCHours(),t,2)}function WT(e,t){return Se(e.getUTCHours()%12||12,t,2)}function BT(e,t){return Se(1+fr.count(wt(e),e),t,3)}function fm(e,t){return Se(e.getUTCMilliseconds(),t,3)}function UT(e,t){return fm(e,t)+"000"}function HT(e,t){return Se(e.getUTCMonth()+1,t,2)}function GT(e,t){return Se(e.getUTCMinutes(),t,2)}function VT(e,t){return Se(e.getUTCSeconds(),t,2)}function qT(e){var t=e.getUTCDay();return t===0?7:t}function YT(e,t){return Se(Ln.count(wt(e)-1,e),t,2)}function pm(e){var t=e.getUTCDay();return t>=4||t===0?Fn(e):Fn.ceil(e)}function KT(e,t){return e=pm(e),Se(Fn.count(wt(e),e)+(wt(e).getUTCDay()===4),t,2)}function XT(e){return e.getUTCDay()}function RT(e,t){return Se(Qr.count(wt(e)-1,e),t,2)}function ZT(e,t){return Se(e.getUTCFullYear()%100,t,2)}function QT(e,t){return e=pm(e),Se(e.getUTCFullYear()%100,t,2)}function JT(e,t){return Se(e.getUTCFullYear()%1e4,t,4)}function eP(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Fn(e):Fn.ceil(e),Se(e.getUTCFullYear()%1e4,t,4)}function tP(){return"+0000"}function hm(){return"%"}function mm(e){return+e}function vm(e){return Math.floor(+e/1e3)}var pr,gm,ym;nP({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 nP(e){return pr=nT(e),gm=pr.format,pr.parse,ym=pr.utcFormat,pr.utcParse,pr}function rP(e){return new Date(e)}function oP(e){return e instanceof Date?+e:+new Date(+e)}function ll(e,t,n,r,o,i,a,s,l,c){var d=Hs(),f=d.invert,p=d.domain,m=c(".%L"),h=c(":%S"),v=c("%I:%M"),x=c("%I %p"),y=c("%a %d"),b=c("%b %d"),$=c("%B"),S=c("%Y");function w(T){return(l(T)<T?m:s(T)<T?h:a(T)<T?v:i(T)<T?x:r(T)<T?o(T)<T?y:b:n(T)<T?$:S)(T)}return d.invert=function(T){return new Date(f(T))},d.domain=function(T){return arguments.length?p(Array.from(T,oP)):p().map(rP)},d.ticks=function(T){var O=p();return e(O[0],O[O.length-1],T??10)},d.tickFormat=function(T,O){return O==null?w:c(O)},d.nice=function(T){var O=p();return(!T||typeof T.range!="function")&&(T=t(O[0],O[O.length-1],T??10)),T?p(Oh(O,T)):d},d.copy=function(){return Vr(d,ll(e,t,n,r,o,i,a,s,l,c))},d}function bm(){return ut.apply(ll(tm,nm,xt,Jr,An,_n,Xr,Yr,bt,gm).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function xm(){return ut.apply(ll(Jh,em,wt,eo,Ln,fr,Rr,Kr,bt,ym).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Pi(){var e=0,t=1,n,r,o,i,a=Ke,s=!1,l;function c(f){return f==null||isNaN(f=+f)?l:a(o===0?.5:(f=(i(f)-n)*o,s?Math.max(0,Math.min(1,f)):f))}c.domain=function(f){return arguments.length?([e,t]=f,n=i(e=+e),r=i(t=+t),o=n===r?0:1/(r-n),c):[e,t]},c.clamp=function(f){return arguments.length?(s=!!f,c):s},c.interpolator=function(f){return arguments.length?(a=f,c):a};function d(f){return function(p){var m,h;return arguments.length?([m,h]=p,a=f(m,h),c):[a(0),a(1)]}}return c.range=d(On),c.rangeRound=d(Gr),c.unknown=function(f){return arguments.length?(l=f,c):l},function(f){return i=f,n=f(e),r=f(t),o=n===r?0:1/(r-n),c}}function un(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function wm(){var e=cn(Pi()(Ke));return e.copy=function(){return un(e,wm())},Wt.apply(e,arguments)}function $m(){var e=qs(Pi()).domain([1,10]);return e.copy=function(){return un(e,$m()).base(e.base())},Wt.apply(e,arguments)}function Cm(){var e=Ks(Pi());return e.copy=function(){return un(e,Cm()).constant(e.constant())},Wt.apply(e,arguments)}function cl(){var e=Rs(Pi());return e.copy=function(){return un(e,cl()).exponent(e.exponent())},Wt.apply(e,arguments)}function iP(){return cl.apply(null,arguments).exponent(.5)}function Sm(){var e=[],t=Ke;function n(r){if(r!=null&&!isNaN(r=+r))return t((or(e,r,1)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(let o of r)o!=null&&!isNaN(o=+o)&&e.push(o);return e.sort(sn),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.range=function(){return e.map((r,o)=>t(o/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(o,i)=>OE(e,i/r))},n.copy=function(){return Sm(t).domain(e)},Wt.apply(n,arguments)}function Mi(){var e=0,t=.5,n=1,r=1,o,i,a,s,l,c=Ke,d,f=!1,p;function m(v){return isNaN(v=+v)?p:(v=.5+((v=+d(v))-i)*(r*v<r*i?s:l),c(f?Math.max(0,Math.min(1,v)):v))}m.domain=function(v){return arguments.length?([e,t,n]=v,o=d(e=+e),i=d(t=+t),a=d(n=+n),s=o===i?0:.5/(i-o),l=i===a?0:.5/(a-i),r=i<o?-1:1,m):[e,t,n]},m.clamp=function(v){return arguments.length?(f=!!v,m):f},m.interpolator=function(v){return arguments.length?(c=v,m):c};function h(v){return function(x){var y,b,$;return arguments.length?([y,b,$]=x,c=bh(v,[y,b,$]),m):[c(0),c(.5),c(1)]}}return m.range=h(On),m.rangeRound=h(Gr),m.unknown=function(v){return arguments.length?(p=v,m):p},function(v){return d=v,o=v(e),i=v(t),a=v(n),s=o===i?0:.5/(i-o),l=i===a?0:.5/(a-i),r=i<o?-1:1,m}}function Em(){var e=cn(Mi()(Ke));return e.copy=function(){return un(e,Em())},Wt.apply(e,arguments)}function Tm(){var e=qs(Mi()).domain([.1,1,10]);return e.copy=function(){return un(e,Tm()).base(e.base())},Wt.apply(e,arguments)}function Pm(){var e=Ks(Mi());return e.copy=function(){return un(e,Pm()).constant(e.constant())},Wt.apply(e,arguments)}function ul(){var e=Rs(Mi());return e.copy=function(){return un(e,ul()).exponent(e.exponent())},Wt.apply(e,arguments)}function aP(){return ul.apply(null,arguments).exponent(.5)}const sP=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:ui,scaleDiverging:Em,scaleDivergingLog:Tm,scaleDivergingPow:ul,scaleDivergingSqrt:aP,scaleDivergingSymlog:Pm,scaleIdentity:kh,scaleImplicit:Es,scaleLinear:Vs,scaleLog:Ys,scaleOrdinal:ci,scalePoint:Tp,scalePow:Ti,scaleQuantile:Qs,scaleQuantize:Js,scaleRadial:Zs,scaleSequential:wm,scaleSequentialLog:$m,scaleSequentialPow:cl,scaleSequentialQuantile:Sm,scaleSequentialSqrt:iP,scaleSequentialSymlog:Cm,scaleSqrt:Fh,scaleSymlog:Xs,scaleThreshold:el,scaleTime:bm,scaleUtc:xm,tickFormat:Mh},Symbol.toStringTag,{value:"Module"}));function lP(e,t){t.domain&&("nice"in e||"quantiles"in e||"padding"in e,e.domain(t.domain))}function cP(e,t){t.range&&("padding"in e,e.range(t.range))}function uP(e,t){"align"in e&&"align"in t&&typeof t.align<"u"&&e.align(t.align)}function dP(e,t){"base"in e&&"base"in t&&typeof t.base<"u"&&e.base(t.base)}function fP(e,t){"clamp"in e&&"clamp"in t&&typeof t.clamp<"u"&&e.clamp(t.clamp)}function pP(e,t){"constant"in e&&"constant"in t&&typeof t.constant<"u"&&e.constant(t.constant)}function hP(e,t){"exponent"in e&&"exponent"in t&&typeof t.exponent<"u"&&e.exponent(t.exponent)}const mP=Object.freeze(Object.defineProperty({__proto__:null,interpolate:On,interpolateArray:RE,interpolateBasis:Rp,interpolateBasisClosed:Zp,interpolateCubehelix:gh,interpolateCubehelixLong:yh,interpolateDate:nh,interpolateDiscrete:JE,interpolateHcl:hh,interpolateHclLong:mh,interpolateHsl:uh,interpolateHslLong:dh,interpolateHue:e2,interpolateLab:fh,interpolateNumber:yt,interpolateNumberArray:js,interpolateObject:rh,interpolateRgb:bi,interpolateRgbBasis:KE,interpolateRgbBasisClosed:XE,interpolateRound:Gr,interpolateString:oh,interpolateTransformCss:r2,interpolateTransformSvg:o2,interpolateZoom:l2,piecewise:bh,quantize:c2},Symbol.toStringTag,{value:"Module"}));var Mm={lab:fh,hcl:hh,"hcl-long":mh,hsl:uh,"hsl-long":dh,cubehelix:gh,"cubehelix-long":yh,rgb:bi};function vP(e){switch(e){case"lab":case"hcl":case"hcl-long":case"hsl":case"hsl-long":case"cubehelix":case"cubehelix-long":case"rgb":return Mm[e]}var t=e.type,n=e.gamma,r=Mm[t];return typeof n>"u"?r:r.gamma(n)}function gP(e,t){if("interpolate"in t&&"interpolate"in e&&typeof t.interpolate<"u"){var n=vP(t.interpolate);e.interpolate(n)}}const yP=Object.freeze(Object.defineProperty({__proto__:null,timeDay:_n,timeDays:F2,timeFriday:Gh,timeFridays:G2,timeHour:Xr,timeHours:I2,timeInterval:Fe,timeMillisecond:dr,timeMilliseconds:zh,timeMinute:Yr,timeMinutes:A2,timeMonday:Zr,timeMondays:W2,timeMonth:Jr,timeMonths:Q2,timeSaturday:Vh,timeSaturdays:V2,timeSecond:bt,timeSeconds:Bh,timeSunday:An,timeSundays:qh,timeThursday:Dn,timeThursdays:H2,timeTickInterval:nm,timeTicks:tm,timeTuesday:Uh,timeTuesdays:B2,timeWednesday:Hh,timeWednesdays:U2,timeWeek:An,timeWeeks:qh,timeYear:xt,timeYears:eT,unixDay:il,unixDays:z2,utcDay:fr,utcDays:j2,utcFriday:Xh,utcFridays:R2,utcHour:Rr,utcHours:L2,utcMillisecond:dr,utcMilliseconds:zh,utcMinute:Kr,utcMinutes:D2,utcMonday:Qr,utcMondays:q2,utcMonth:eo,utcMonths:J2,utcSaturday:Rh,utcSaturdays:Z2,utcSecond:bt,utcSeconds:Bh,utcSunday:Ln,utcSundays:Zh,utcThursday:Fn,utcThursdays:X2,utcTickInterval:em,utcTicks:Jh,utcTuesday:Yh,utcTuesdays:Y2,utcWednesday:Kh,utcWednesdays:K2,utcWeek:Ln,utcWeeks:Zh,utcYear:wt,utcYears:tT},Symbol.toStringTag,{value:"Module"}));var bP=new Date(Date.UTC(2020,1,2,3,4,5)),xP="%Y-%m-%d %H:%M";function km(e){var t=e.tickFormat(1,xP)(bP);return t==="2020-02-02 03:04"}var Om={day:_n,hour:Xr,minute:Yr,month:Jr,second:bt,week:An,year:xt},_m={day:fr,hour:Rr,minute:Kr,month:eo,second:bt,week:Ln,year:wt};function wP(e,t){if("nice"in t&&typeof t.nice<"u"&&"nice"in e){var n=t.nice;if(typeof n=="boolean")n&&e.nice();else if(typeof n=="number")e.nice(n);else{var r=e,o=km(r);if(typeof n=="string")r.nice(o?_m[n]:Om[n]);else{var i=n.interval,a=n.step,s=(o?_m[i]:Om[i]).every(a);s!=null&&r.nice(s)}}}}function $P(e,t){"padding"in e&&"padding"in t&&typeof t.padding<"u"&&e.padding(t.padding),"paddingInner"in e&&"paddingInner"in t&&typeof t.paddingInner<"u"&&e.paddingInner(t.paddingInner),"paddingOuter"in e&&"paddingOuter"in t&&typeof t.paddingOuter<"u"&&e.paddingOuter(t.paddingOuter)}function CP(e,t){if(t.reverse){var n=e.range().slice().reverse();"padding"in e,e.range(n)}}function SP(e,t){"round"in t&&typeof t.round<"u"&&(t.round&&"interpolate"in t&&typeof t.interpolate<"u"?console.warn("[visx/scale/applyRound] ignoring round: scale config contains round and interpolate. only applying interpolate. config:",t):"round"in e?e.round(t.round):"interpolate"in e&&t.round&&e.interpolate(Gr))}function EP(e,t){"unknown"in e&&"unknown"in t&&typeof t.unknown<"u"&&e.unknown(t.unknown)}function TP(e,t){if("zero"in t&&t.zero===!0){var n=e.domain(),r=n[0],o=n[1],i=o<r,a=i?[o,r]:[r,o],s=a[0],l=a[1],c=[Math.min(0,s),Math.max(0,l)];e.domain(i?c.reverse():c)}}var Nm=["domain","nice","zero","interpolate","round","range","reverse","align","base","clamp","constant","exponent","padding","unknown"],PP={domain:lP,nice:wP,zero:TP,interpolate:gP,round:SP,align:uP,base:dP,clamp:fP,constant:pP,exponent:hP,padding:$P,range:cP,reverse:CP,unknown:EP};function Xe(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=new Set(t),o=Nm.filter(function(i){return r.has(i)});return function(a,s){return typeof s<"u"&&o.forEach(function(l){PP[l](a,s)}),a}}var MP=Xe("domain","range","reverse","align","padding","round");function Am(e){return MP(ui(),e)}var kP=Xe("domain","range","reverse","align","padding","round");function Dm(e){return kP(Tp(),e)}var OP=Xe("domain","range","reverse","clamp","interpolate","nice","round","zero");function oo(e){return OP(Vs(),e)}var _P=Xe("domain","range","clamp","nice","round","unknown");function NP(e){return _P(Zs(),e)}var AP=Xe("domain","range","reverse","clamp","interpolate","nice","round");function Im(e){return AP(bm(),e)}var DP=Xe("domain","range","reverse","clamp","interpolate","nice","round");function Lm(e){return DP(xm(),e)}var IP=Xe("domain","range","reverse","base","clamp","interpolate","nice","round");function Fm(e){return IP(Ys(),e)}var LP=Xe("domain","range","reverse","clamp","exponent","interpolate","nice","round","zero");function jm(e){return LP(Ti(),e)}var FP=Xe("domain","range","reverse","unknown");function zm(e){return FP(ci(),e)}var jP=Xe("domain","range","reverse","nice","zero");function Wm(e){return jP(Js(),e)}var zP=Xe("domain","range","reverse");function Bm(e){return zP(Qs(),e)}var WP=Xe("domain","range","reverse","clamp","constant","nice","zero","round");function Um(e){return WP(Xs(),e)}var BP=Xe("domain","range","reverse");function Hm(e){return BP(el(),e)}var UP=Xe("domain","range","reverse","clamp","interpolate","nice","round","zero");function Gm(e){return UP(Fh(),e)}function io(e){if(typeof e<"u"&&"type"in e)switch(e.type){case"linear":return oo(e);case"log":return Fm(e);case"pow":return jm(e);case"sqrt":return Gm(e);case"symlog":return Um(e);case"time":return Im(e);case"utc":return Lm(e);case"quantile":return Bm(e);case"quantize":return Wm(e);case"threshold":return Hm(e);case"ordinal":return zm(e);case"point":return Dm(e);case"band":return Am(e)}return oo(e)}var HP=Xe.apply(void 0,Nm);function GP(e,t){return HP(e.copy(),t)}function VP(e){return"paddingInner"in e?"band":"padding"in e?"point":"quantiles"in e?"quantile":"base"in e?"log":"exponent"in e?e.exponent()===.5?"sqrt":"pow":"constant"in e?"symlog":"clamp"in e?e.ticks()[0]instanceof Date?km(e)?"utc":"time":"linear":"nice"in e?"quantize":"invertExtent"in e?"threshold":"ordinal"}function dl(e){if((typeof e=="function"||typeof e=="object"&&e)&&"valueOf"in e){var t=e.valueOf();if(typeof t=="number")return t}return e}function fl(e,t){var n=e;return"ticks"in n?n.ticks(t):n.domain().filter(function(r,o,i){return t==null||i.length<=t||o%Math.round((i.length-1)/t)===0})}function Vm(e){return e==null?void 0:e.toString()}var qP=new Set(["linear","pow","quantize","sqrt","symlog"]);function pl(e){return qP.has(e.type)}const YP=Object.freeze(Object.defineProperty({__proto__:null,coerceNumber:dl,createScale:io,getTicks:fl,inferScaleType:VP,scaleBand:Am,scaleCanBeZeroed:pl,scaleLinear:oo,scaleLog:Fm,scaleOrdinal:zm,scalePoint:Dm,scalePower:jm,scaleQuantile:Bm,scaleQuantize:Wm,scaleRadial:NP,scaleSqrt:Gm,scaleSymlog:Um,scaleThreshold:Hm,scaleTime:Im,scaleUtc:Lm,toString:Vm,updateScale:GP},Symbol.toStringTag,{value:"Module"}));var KP=u.createContext({});const Ot=KP;function hl(e){var t,n=e;return n&&"bandwidth"in n&&(t=n==null?void 0:n.bandwidth())!=null?t:0}function ft(e){return e!=null&&typeof e=="number"&&!Number.isNaN(e)&&Number.isFinite(e)}const qm=Jn(F1),Ym=Jn(YP);var ml=Math.PI,vl=2*ml,jn=1e-6,XP=vl-jn;function gl(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function yl(){return new gl}gl.prototype=yl.prototype={constructor:gl,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,n,r){this._+="Q"+ +e+","+ +t+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(e,t,n,r,o,i){this._+="C"+ +e+","+ +t+","+ +n+","+ +r+","+(this._x1=+o)+","+(this._y1=+i)},arcTo:function(e,t,n,r,o){e=+e,t=+t,n=+n,r=+r,o=+o;var i=this._x1,a=this._y1,s=n-e,l=r-t,c=i-e,d=a-t,f=c*c+d*d;if(o<0)throw new Error("negative radius: "+o);if(this._x1===null)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(f>jn)if(!(Math.abs(d*s-l*c)>jn)||!o)this._+="L"+(this._x1=e)+","+(this._y1=t);else{var p=n-i,m=r-a,h=s*s+l*l,v=p*p+m*m,x=Math.sqrt(h),y=Math.sqrt(f),b=o*Math.tan((ml-Math.acos((h+f-v)/(2*x*y)))/2),$=b/y,S=b/x;Math.abs($-1)>jn&&(this._+="L"+(e+$*c)+","+(t+$*d)),this._+="A"+o+","+o+",0,0,"+ +(d*p>c*m)+","+(this._x1=e+S*s)+","+(this._y1=t+S*l)}},arc:function(e,t,n,r,o,i){e=+e,t=+t,n=+n,i=!!i;var a=n*Math.cos(r),s=n*Math.sin(r),l=e+a,c=t+s,d=1^i,f=i?r-o:o-r;if(n<0)throw new Error("negative radius: "+n);this._x1===null?this._+="M"+l+","+c:(Math.abs(this._x1-l)>jn||Math.abs(this._y1-c)>jn)&&(this._+="L"+l+","+c),n&&(f<0&&(f=f%vl+vl),f>XP?this._+="A"+n+","+n+",0,1,"+d+","+(e-a)+","+(t-s)+"A"+n+","+n+",0,1,"+d+","+(this._x1=l)+","+(this._y1=c):f>jn&&(this._+="A"+n+","+n+",0,"+ +(f>=ml)+","+d+","+(this._x1=e+n*Math.cos(o))+","+(this._y1=t+n*Math.sin(o))))},rect:function(e,t,n,r){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};function hr(e){return function(){return e}}function Km(e){this._context=e}Km.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 RP(e){return new Km(e)}function Xm(e){return e[0]}function Rm(e){return e[1]}function ZP(){var e=Xm,t=Rm,n=hr(!0),r=null,o=RP,i=null;function a(s){var l,c=s.length,d,f=!1,p;for(r==null&&(i=o(p=yl())),l=0;l<=c;++l)!(l<c&&n(d=s[l],l,s))===f&&((f=!f)?i.lineStart():i.lineEnd()),f&&i.point(+e(d,l,s),+t(d,l,s));if(p)return i=null,p+""||null}return a.x=function(s){return arguments.length?(e=typeof s=="function"?s:hr(+s),a):e},a.y=function(s){return arguments.length?(t=typeof s=="function"?s:hr(+s),a):t},a.defined=function(s){return arguments.length?(n=typeof s=="function"?s:hr(!!s),a):n},a.curve=function(s){return arguments.length?(o=s,r!=null&&(i=o(r)),a):o},a.context=function(s){return arguments.length?(s==null?r=i=null:i=o(r=s),a):r},a}var QP=Array.prototype.slice;function JP(e){return e.source}function eM(e){return e.target}function tM(e){var t=JP,n=eM,r=Xm,o=Rm,i=null;function a(){var s,l=QP.call(arguments),c=t.apply(this,l),d=n.apply(this,l);if(i||(i=s=yl()),e(i,+r.apply(this,(l[0]=c,l)),+o.apply(this,l),+r.apply(this,(l[0]=d,l)),+o.apply(this,l)),s)return i=null,s+""||null}return a.source=function(s){return arguments.length?(t=s,a):t},a.target=function(s){return arguments.length?(n=s,a):n},a.x=function(s){return arguments.length?(r=typeof s=="function"?s:hr(+s),a):r},a.y=function(s){return arguments.length?(o=typeof s=="function"?s:hr(+s),a):o},a.context=function(s){return arguments.length?(i=s??null,a):i},a}function nM(e,t,n,r,o){e.moveTo(t,n),e.bezierCurveTo(t=(t+r)/2,n,t,o,r,o)}function rM(){return tM(nM)}function Zm(e,t){e(t)}function oM(e){var t=e===void 0?{}:e,n=t.x,r=t.y,o=t.defined,i=t.curve,a=ZP();return n&&Zm(a.x,n),r&&Zm(a.y,r),o&&a.defined(o),i&&a.curve(i),a}var iM=["from","to","fill","className","innerRef"];function bl(){return bl=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},bl.apply(this,arguments)}function aM(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function Qm(e){var t=e.from,n=t===void 0?{x:0,y:0}:t,r=e.to,o=r===void 0?{x:1,y:1}:r,i=e.fill,a=i===void 0?"transparent":i,s=e.className,l=e.innerRef,c=aM(e,iM),d=n.x===o.x||n.y===o.y;return u.createElement("line",bl({ref:l,className:et("visx-line",s),x1:n.x,y1:n.y,x2:o.x,y2:o.y,fill:a,shapeRendering:d?"crispEdges":"auto"},c))}var sM=["children","data","x","y","fill","className","curve","innerRef","defined"];function xl(){return xl=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},xl.apply(this,arguments)}function lM(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function cM(e){var t=e.children,n=e.data,r=n===void 0?[]:n,o=e.x,i=e.y,a=e.fill,s=a===void 0?"transparent":a,l=e.className,c=e.curve,d=e.innerRef,f=e.defined,p=f===void 0?function(){return!0}:f,m=lM(e,sM),h=oM({x:o,y:i,defined:p,curve:c});return t?u.createElement(u.Fragment,null,t({path:h})):u.createElement("path",xl({ref:d,className:et("visx-linepath",l),d:h(r)||"",fill:s,strokeLinecap:"round"},m))}var uM=["className","innerRef"];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 dM(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function fM(e){var t=e.className,n=e.innerRef,r=dM(e,uM);return u.createElement("rect",wl({ref:n,className:et("visx-bar",t)},r))}var pM=["children","className","innerRef","x","y","width","height","radius","all","top","bottom","left","right","topLeft","topRight","bottomLeft","bottomRight"];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 hM(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function mM(e){var t=e.all,n=e.bottom,r=e.bottomLeft,o=e.bottomRight,i=e.height,a=e.left,s=e.radius,l=e.right,c=e.top,d=e.topLeft,f=e.topRight,p=e.width,m=e.x,h=e.y;f=t||c||l||f,o=t||n||l||o,r=t||n||a||r,d=t||c||a||d,s=Math.max(1,Math.min(s,Math.min(p,i)/2));var v=2*s,x=("M"+(m+s)+","+h+" h"+(p-v)+`
|
|
64
|
+
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],o=0;o<arguments.length;o++){var i=arguments[o];if(i){var a=typeof i;if(a==="string"||a==="number")r.push(i);else if(Array.isArray(i)){if(i.length){var s=n.apply(null,i);s&&r.push(s)}}else if(a==="object"){if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]")){r.push(i.toString());continue}for(var l in i)t.call(i,l)&&i[l]&&r.push(l)}}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Xf);var Jo=Xf.exports;const et=Qn(Jo);var W1=["top","left","transform","className","children","innerRef"];function vs(){return vs=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},vs.apply(this,arguments)}function U1(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function En(e){var t=e.top,n=t===void 0?0:t,r=e.left,o=r===void 0?0:r,i=e.transform,a=e.className,s=e.children,l=e.innerRef,c=U1(e,W1);return u.createElement("g",vs({ref:l,className:et("visx-group",a),transform:i||"translate("+o+", "+n+")"},c),s)}En.propTypes={top:ne.number,left:ne.number,transform:ne.string,className:ne.string,children:ne.node,innerRef:ne.oneOfType([ne.string,ne.func,ne.object])};const H1=Object.freeze(Object.defineProperty({__proto__:null,Group:En},Symbol.toStringTag,{value:"Module"}));var G1=Rf;function Rf(e,t,n){e instanceof RegExp&&(e=Zf(e,n)),t instanceof RegExp&&(t=Zf(t,n));var r=Qf(e,t,n);return r&&{start:r[0],end:r[1],pre:n.slice(0,r[0]),body:n.slice(r[0]+e.length,r[1]),post:n.slice(r[1]+t.length)}}function Zf(e,t){var n=t.match(e);return n?n[0]:null}Rf.range=Qf;function Qf(e,t,n){var r,o,i,a,s,l=n.indexOf(e),c=n.indexOf(t,l+1),d=l;if(l>=0&&c>0){for(r=[],i=n.length;d>=0&&!s;)d==l?(r.push(d),l=n.indexOf(e,d+1)):r.length==1?s=[r.pop(),c]:(o=r.pop(),o<i&&(i=o,a=c),c=n.indexOf(t,d+1)),d=l<c&&l>=0?l:c;r.length&&(s=[i,a])}return s}var V1=Jf;function Jf(e,t,n){e instanceof RegExp&&(e=ep(e,n)),t instanceof RegExp&&(t=ep(t,n));var r=tp(e,t,n);return r&&{start:r[0],end:r[1],pre:n.slice(0,r[0]),body:n.slice(r[0]+e.length,r[1]),post:n.slice(r[1]+t.length)}}function ep(e,t){var n=t.match(e);return n?n[0]:null}Jf.range=tp;function tp(e,t,n){var r,o,i,a,s,l=n.indexOf(e),c=n.indexOf(t,l+1),d=l;if(l>=0&&c>0){if(e===t)return[l,c];for(r=[],i=n.length;d>=0&&!s;)d==l?(r.push(d),l=n.indexOf(e,d+1)):r.length==1?s=[r.pop(),c]:(o=r.pop(),o<i&&(i=o,a=c),c=n.indexOf(t,d+1)),d=l<c&&l>=0?l:c;r.length&&(s=[i,a])}return s}var q1=V1,Y1=np;function np(e,t,n){var r=e;return K1(e,t).reduce(function(o,i){return o.replace(i.functionIdentifier+"("+i.matches.body+")",X1(i.matches.body,i.functionIdentifier,n,r,t))},e)}function K1(e,t){var n=[],r=typeof t=="string"?new RegExp("\\b("+t+")\\("):t;do{var o=r.exec(e);if(!o)return n;if(o[1]===void 0)throw new Error("Missing the first couple of parenthesis to get the function identifier in "+t);var i=o[1],a=o.index,s=q1("(",")",e.substring(a));if(!s||s.start!==o[0].length-1)throw new SyntaxError(i+"(): missing closing ')' in the value '"+e+"'");n.push({matches:s,functionIdentifier:i}),e=s.post}while(r.test(e));return n}function X1(e,t,n,r,o){return n(np(e,o,n),t,r)}var Ve=function(e){this.value=e};Ve.math={isDegree:!0,acos:function(e){return Ve.math.isDegree?180/Math.PI*Math.acos(e):Math.acos(e)},add:function(e,t){return e+t},asin:function(e){return Ve.math.isDegree?180/Math.PI*Math.asin(e):Math.asin(e)},atan:function(e){return Ve.math.isDegree?180/Math.PI*Math.atan(e):Math.atan(e)},acosh:function(e){return Math.log(e+Math.sqrt(e*e-1))},asinh:function(e){return Math.log(e+Math.sqrt(e*e+1))},atanh:function(e){return Math.log((1+e)/(1-e))},C:function(e,t){var n=1,r=e-t,o=t;o<r&&(o=r,r=t);for(var i=o+1;i<=e;i++)n*=i;return n/Ve.math.fact(r)},changeSign:function(e){return-e},cos:function(e){return Ve.math.isDegree&&(e=Ve.math.toRadian(e)),Math.cos(e)},cosh:function(e){return(Math.pow(Math.E,e)+Math.pow(Math.E,-1*e))/2},div:function(e,t){return e/t},fact:function(e){if(e%1!==0)return"NaN";for(var t=1,n=2;n<=e;n++)t*=n;return t},inverse:function(e){return 1/e},log:function(e){return Math.log(e)/Math.log(10)},mod:function(e,t){return e%t},mul:function(e,t){return e*t},P:function(e,t){for(var n=1,r=Math.floor(e)-Math.floor(t)+1;r<=Math.floor(e);r++)n*=r;return n},Pi:function(e,t,n){for(var r=1,o=e;o<=t;o++)r*=Number(n.postfixEval({n:o}));return r},pow10x:function(e){for(var t=1;e--;)t*=10;return t},sigma:function(e,t,n){for(var r=0,o=e;o<=t;o++)r+=Number(n.postfixEval({n:o}));return r},sin:function(e){return Ve.math.isDegree&&(e=Ve.math.toRadian(e)),Math.sin(e)},sinh:function(e){return(Math.pow(Math.E,e)-Math.pow(Math.E,-1*e))/2},sub:function(e,t){return e-t},tan:function(e){return Ve.math.isDegree&&(e=Ve.math.toRadian(e)),Math.tan(e)},tanh:function(e){return Ve.sinha(e)/Ve.cosha(e)},toRadian:function(e){return e*Math.PI/180},and:function(e,t){return e&t}},Ve.Exception=function(e){this.message=e};var R1=Ve,ge=R1;function qe(e,t){for(var n=0;n<e.length;n++)e[n]+=t;return e}for(var on=[{token:"sin",show:"sin",type:0,value:ge.math.sin},{token:"cos",show:"cos",type:0,value:ge.math.cos},{token:"tan",show:"tan",type:0,value:ge.math.tan},{token:"pi",show:"π",type:3,value:"PI"},{token:"(",show:"(",type:4,value:"("},{token:")",show:")",type:5,value:")"},{token:"P",show:"P",type:10,value:ge.math.P},{token:"C",show:"C",type:10,value:ge.math.C},{token:" ",show:" ",type:14,value:" ".anchor},{token:"asin",show:"asin",type:0,value:ge.math.asin},{token:"acos",show:"acos",type:0,value:ge.math.acos},{token:"atan",show:"atan",type:0,value:ge.math.atan},{token:"7",show:"7",type:1,value:"7"},{token:"8",show:"8",type:1,value:"8"},{token:"9",show:"9",type:1,value:"9"},{token:"int",show:"Int",type:0,value:Math.floor},{token:"cosh",show:"cosh",type:0,value:ge.math.cosh},{token:"acosh",show:"acosh",type:0,value:ge.math.acosh},{token:"ln",show:" ln",type:0,value:Math.log},{token:"^",show:"^",type:10,value:Math.pow},{token:"root",show:"root",type:0,value:Math.sqrt},{token:"4",show:"4",type:1,value:"4"},{token:"5",show:"5",type:1,value:"5"},{token:"6",show:"6",type:1,value:"6"},{token:"/",show:"÷",type:2,value:ge.math.div},{token:"!",show:"!",type:7,value:ge.math.fact},{token:"tanh",show:"tanh",type:0,value:ge.math.tanh},{token:"atanh",show:"atanh",type:0,value:ge.math.atanh},{token:"Mod",show:" Mod ",type:2,value:ge.math.mod},{token:"1",show:"1",type:1,value:"1"},{token:"2",show:"2",type:1,value:"2"},{token:"3",show:"3",type:1,value:"3"},{token:"*",show:"×",type:2,value:ge.math.mul},{token:"sinh",show:"sinh",type:0,value:ge.math.sinh},{token:"asinh",show:"asinh",type:0,value:ge.math.asinh},{token:"e",show:"e",type:3,value:"E"},{token:"log",show:" log",type:0,value:ge.math.log},{token:"0",show:"0",type:1,value:"0"},{token:".",show:".",type:6,value:"."},{token:"+",show:"+",type:9,value:ge.math.add},{token:"-",show:"-",type:9,value:ge.math.sub},{token:",",show:",",type:11,value:","},{token:"Sigma",show:"Σ",type:12,value:ge.math.sigma},{token:"n",show:"n",type:13,value:"n"},{token:"Pi",show:"Π",type:12,value:ge.math.Pi},{token:"pow",show:"pow",type:8,value:Math.pow,numberOfArguments:2},{token:"&",show:"&",type:9,value:ge.math.and}],gs={0:11,1:0,2:3,3:0,4:0,5:0,6:0,7:11,8:11,9:1,10:10,11:0,12:11,13:0,14:-1,15:11},ei=0;ei<on.length;ei++)on[ei].precedence=gs[on[ei].type];var Pt={0:!0,1:!0,3:!0,4:!0,6:!0,8:!0,9:!0,12:!0,13:!0,14:!0,15:!0},er={0:!0,1:!0,2:!0,3:!0,4:!0,5:!0,6:!0,7:!0,8:!0,9:!0,10:!0,11:!0,12:!0,13:!0,15:!0},Z1={0:!0,3:!0,4:!0,8:!0,12:!0,13:!0,15:!0},vt={},Ir={0:!0,1:!0,3:!0,4:!0,6:!0,8:!0,12:!0,13:!0,15:!0},Q1={1:!0},Ye=[[],["1","2","3","7","8","9","4","5","6","+","-","*","/","(",")","^","!","P","C","e","0",".",",","n"," ","&"],["pi","ln","Pi"],["sin","cos","tan","Del","int","Mod","log","pow"],["asin","acos","atan","cosh","root","tanh","sinh"],["acosh","atanh","asinh","Sigma"]];function J1(e,t,n,r){for(var o=0;o<r;o++)if(e[n+o]!==t[o])return!1;return!0}ge.tokenTypes={FUNCTION_WITH_ONE_ARG:0,NUMBER:1,BINARY_OPERATOR_HIGH_PRECENDENCE:2,CONSTANT:3,OPENING_PARENTHESIS:4,CLOSING_PARENTHESIS:5,DECIMAL:6,POSTFIX_FUNCTION_WITH_ONE_ARG:7,FUNCTION_WITH_N_ARGS:8,BINARY_OPERATOR_LOW_PRECENDENCE:9,BINARY_OPERATOR_PERMUTATION:10,COMMA:11,EVALUATED_FUNCTION:12,EVALUATED_FUNCTION_PARAMETER:13,SPACE:14},ge.addToken=function(e){for(var t=0;t<e.length;t++){var n=e[t].token.length,r=-1;e[t].type===ge.tokenTypes.FUNCTION_WITH_N_ARGS&&e[t].numberOfArguments===void 0&&(e[t].numberOfArguments=2),Ye[n]=Ye[n]||[];for(var o=0;o<Ye[n].length;o++)if(e[t].token===Ye[n][o]){r=rp(Ye[n][o],on);break}r===-1?(on.push(e[t]),e[t].precedence=gs[e[t].type],Ye.length<=e[t].token.length&&(Ye[e[t].token.length]=[]),Ye[e[t].token.length].push(e[t].token)):(on[r]=e[t],e[t].precedence=gs[e[t].type])}};function rp(e,t){for(var n=0;n<t.length;n++)if(t[n].token===e)return n;return-1}function e$(e){for(var t=[],n=e.length,r,o,i,a=0;a<n;a++)if(!(a<n-1&&e[a]===" "&&e[a+1]===" ")){for(r="",o=e.length-a>Ye.length-2?Ye.length-1:e.length-a;o>0;o--)if(Ye[o]!==void 0)for(i=0;i<Ye[o].length;i++)J1(e,Ye[o][i],a,o)&&(r=Ye[o][i],i=Ye[o].length,o=0);if(a+=r.length-1,r==="")throw new ge.Exception("Can't understand after "+e.slice(a));t.push(on[rp(r,on)])}return t}var t$={value:ge.math.changeSign,type:0,pre:21,show:"-"},ti={value:")",show:")",type:5,pre:0},Lr={value:"(",type:4,pre:0,show:"("};ge.lex=function(e,t){var n=[Lr],r=[],o=e,i=Pt,a=0,s=vt,l="",c;typeof t<"u"&&ge.addToken(t);var d={},f=e$(o);for(c=0;c<f.length;c++){var p=f[c];if(p.type===14){if(c>0&&c<f.length-1&&f[c+1].type===1&&(f[c-1].type===1||f[c-1].type===6))throw new ge.Exception("Unexpected Space");continue}var m=p.token,h=p.type,v=p.value,w=p.precedence,y=p.show,b=n[n.length-1],$;for($=r.length;$--&&r[$]===0;)if([0,2,3,4,5,9,11,12,13].indexOf(h)!==-1){if(i[h]!==!0)throw new ge.Exception(m+" is not allowed after "+l);n.push(ti),i=er,s=Ir,r.pop()}if(i[h]!==!0)throw new ge.Exception(m+" is not allowed after "+l);if(s[h]===!0&&(h=2,v=ge.math.mul,y="×",w=3,c=c-1),d={value:v,type:h,pre:w,show:y,numberOfArguments:p.numberOfArguments},h===0)i=Pt,s=vt,qe(r,2),n.push(d),f[c+1].type!==4&&(n.push(Lr),r.push(2));else if(h===1)b.type===1?(b.value+=v,qe(r,1)):n.push(d),i=er,s=Z1;else if(h===2)i=Pt,s=vt,qe(r,2),n.push(d);else if(h===3)n.push(d),i=er,s=Ir;else if(h===4)qe(r,1),a++,i=Pt,s=vt,n.push(d);else if(h===5){if(!a)throw new ge.Exception("Closing parenthesis are more than opening one, wait What!!!");a--,i=er,s=Ir,n.push(d),qe(r,1)}else if(h===6){if(b.hasDec)throw new ge.Exception("Two decimals are not allowed in one number");b.type!==1&&(b={value:0,type:1,pre:0},n.push(b)),i=Q1,qe(r,1),s=vt,b.value+=v,b.hasDec=!0}else h===7&&(i=er,s=Ir,qe(r,1),n.push(d));h===8?(i=Pt,s=vt,qe(r,p.numberOfArguments+2),n.push(d),f[c+1].type!==4&&(n.push(Lr),r.push(p.numberOfArguments+2))):h===9?(b.type===9?b.value===ge.math.add?(b.value=v,b.show=y,qe(r,1)):b.value===ge.math.sub&&y==="-"&&(b.value=ge.math.add,b.show="+",qe(r,1)):b.type!==5&&b.type!==7&&b.type!==1&&b.type!==3&&b.type!==13?m==="-"&&(i=Pt,s=vt,qe(r,2).push(2),n.push(t$),n.push(Lr)):(n.push(d),qe(r,2)),i=Pt,s=vt):h===10?(i=Pt,s=vt,qe(r,2),n.push(d)):h===11?(i=Pt,s=vt,n.push(d)):h===12?(i=Pt,s=vt,qe(r,6),n.push(d),f[c+1].type!==4&&(n.push(Lr),r.push(6))):h===13&&(i=er,s=Ir,n.push(d)),qe(r,-1),l=m}for($=r.length;$--;)n.push(ti);if(i[5]!==!0)throw new ge.Exception("complete the expression");for(;a--;)n.push(ti);return n.push(ti),new ge(n)};var n$=ge,ys=n$;ys.prototype.toPostfix=function(){for(var e=[],t,n,r,o,i,a=[{value:"(",type:4,pre:0}],s=this.value,l=1;l<s.length;l++)if(s[l].type===1||s[l].type===3||s[l].type===13)s[l].type===1&&(s[l].value=Number(s[l].value)),e.push(s[l]);else if(s[l].type===4)a.push(s[l]);else if(s[l].type===5)for(;(n=a.pop()).type!==4;)e.push(n);else if(s[l].type===11){for(;(n=a.pop()).type!==4;)e.push(n);a.push(n)}else{t=s[l],o=t.pre,i=a[a.length-1],r=i.pre;var c=i.value=="Math.pow"&&t.value=="Math.pow";if(o>r)a.push(t);else{for(;r>=o&&!c||c&&o<r;)n=a.pop(),i=a[a.length-1],e.push(n),r=i.pre,c=t.value=="Math.pow"&&i.value=="Math.pow";a.push(t)}}return new ys(e)};var r$=ys,Fr=r$;Fr.prototype.postfixEval=function(e){e=e||{},e.PI=Math.PI,e.E=Math.E;for(var t=[],n,r,o,i=this.value,a=typeof e.n<"u",s=0;s<i.length;s++)if(i[s].type===1)t.push({value:i[s].value,type:1});else if(i[s].type===3)t.push({value:e[i[s].value],type:1});else if(i[s].type===0)typeof t[t.length-1].type>"u"?t[t.length-1].value.push(i[s]):t[t.length-1].value=i[s].value(t[t.length-1].value);else if(i[s].type===7)typeof t[t.length-1].type>"u"?t[t.length-1].value.push(i[s]):t[t.length-1].value=i[s].value(t[t.length-1].value);else if(i[s].type===8){for(var l=[],c=0;c<i[s].numberOfArguments;c++)l.push(t.pop().value);t.push({type:1,value:i[s].value.apply(i[s],l.reverse())})}else i[s].type===10?(n=t.pop(),r=t.pop(),typeof r.type>"u"?(r.value=r.concat(n),r.value.push(i[s]),t.push(r)):typeof n.type>"u"?(n.unshift(r),n.push(i[s]),t.push(n)):t.push({type:1,value:i[s].value(r.value,n.value)})):i[s].type===2||i[s].type===9?(n=t.pop(),r=t.pop(),typeof r.type>"u"?(r=r.concat(n),r.push(i[s]),t.push(r)):typeof n.type>"u"?(n.unshift(r),n.push(i[s]),t.push(n)):t.push({type:1,value:i[s].value(r.value,n.value)})):i[s].type===12?(n=t.pop(),typeof n.type<"u"&&(n=[n]),r=t.pop(),o=t.pop(),t.push({type:1,value:i[s].value(o.value,r.value,new Fr(n))})):i[s].type===13&&(a?t.push({value:e[i[s].value],type:3}):t.push([i[s]]));if(t.length>1)throw new Fr.Exception("Uncaught Syntax error");return t[0].value>1e15?"Infinity":parseFloat(t[0].value.toFixed(15))},Fr.eval=function(e,t,n){return typeof t>"u"?this.lex(e).toPostfix().postfixEval():typeof n>"u"?typeof t.length<"u"?this.lex(e,t).toPostfix().postfixEval():this.lex(e).toPostfix().postfixEval(t):this.lex(e,t).toPostfix().postfixEval(n)};var o$=Fr,op=o$;op.prototype.formulaEval=function(){for(var e,t,n,r=[],o=this.value,i=0;i<o.length;i++)o[i].type===1||o[i].type===3?r.push({value:o[i].type===3?o[i].show:o[i].value,type:1}):o[i].type===13?r.push({value:o[i].show,type:1}):o[i].type===0?r[r.length-1]={value:o[i].show+(o[i].show!="-"?"(":"")+r[r.length-1].value+(o[i].show!="-"?")":""),type:0}:o[i].type===7?r[r.length-1]={value:(r[r.length-1].type!=1?"(":"")+r[r.length-1].value+(r[r.length-1].type!=1?")":"")+o[i].show,type:7}:o[i].type===10?(e=r.pop(),t=r.pop(),o[i].show==="P"||o[i].show==="C"?r.push({value:"<sup>"+t.value+"</sup>"+o[i].show+"<sub>"+e.value+"</sub>",type:10}):r.push({value:(t.type!=1?"(":"")+t.value+(t.type!=1?")":"")+"<sup>"+e.value+"</sup>",type:1})):o[i].type===2||o[i].type===9?(e=r.pop(),t=r.pop(),r.push({value:(t.type!=1?"(":"")+t.value+(t.type!=1?")":"")+o[i].show+(e.type!=1?"(":"")+e.value+(e.type!=1?")":""),type:o[i].type})):o[i].type===12&&(e=r.pop(),t=r.pop(),n=r.pop(),r.push({value:o[i].show+"("+n.value+","+t.value+","+e.value+")",type:12}));return r[0].value};var i$=op,a$=G1,s$=Y1,l$=i$,c$=100,u$=/(\+|\-|\*|\\|[^a-z]|)(\s*)(\()/g,bs,d$=f$;function f$(e,t){bs=0,t=Math.pow(10,t===void 0?5:t),e=e.replace(/\n+/g," ");function n(o,i,a){if(bs++>c$)throw bs=0,new Error("Call stack overflow for "+a);if(o==="")throw new Error(i+"(): '"+a+"' must contain a non-whitespace string");o=r(o,a);var s=p$(o);if(s.length>1||o.indexOf("var(")>-1)return i+"("+o+")";var l=s[0]||"";l==="%"&&(o=o.replace(/\b[0-9\.]+%/g,function(f){return parseFloat(f.slice(0,-1))*.01}));var c=o.replace(new RegExp(l,"gi"),""),d;try{d=l$.eval(c)}catch{return i+"("+o+")"}return l==="%"&&(d*=100),(i.length||l==="%")&&(d=Math.round(d*t)/t),d+=l,d}function r(o,i){o=o.replace(/((?:\-[a-z]+\-)?calc)/g,"");for(var a="",s=o,l;l=u$.exec(s);){l[0].index>0&&(a+=s.substring(0,l[0].index));var c=a$("(",")",s.substring([0].index));if(c.body==="")throw new Error("'"+o+"' must contain a non-whitespace string");var d=n(c.body,"",i);a+=c.pre+d,s=c.post}return a+s}return s$(e,/((?:\-[a-z]+\-)?calc)\(/,n)}function p$(e){for(var t=[],n=[],r=/[\.0-9]([%a-z]+)/gi,o=r.exec(e);o;)!o||!o[1]||(n.indexOf(o[1].toLowerCase())===-1&&(t.push(o[1]),n.push(o[1].toLowerCase())),o=r.exec(e));return t}const ws=Qn(d$);var h$=typeof Ar=="object"&&Ar&&Ar.Object===Object&&Ar,m$=h$,v$=m$,g$=typeof self=="object"&&self&&self.Object===Object&&self,y$=v$||g$||Function("return this")(),ni=y$,b$=ni,w$=b$.Symbol,ip=w$,ap=ip,sp=Object.prototype,x$=sp.hasOwnProperty,$$=sp.toString,jr=ap?ap.toStringTag:void 0;function C$(e){var t=x$.call(e,jr),n=e[jr];try{e[jr]=void 0;var r=!0}catch{}var o=$$.call(e);return r&&(t?e[jr]=n:delete e[jr]),o}var S$=C$,E$=Object.prototype,T$=E$.toString;function P$(e){return T$.call(e)}var M$=P$,lp=ip,k$=S$,O$=M$,_$="[object Null]",N$="[object Undefined]",cp=lp?lp.toStringTag:void 0;function D$(e){return e==null?e===void 0?N$:_$:cp&&cp in Object(e)?k$(e):O$(e)}var up=D$;function A$(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var ri=A$,I$=up,L$=ri,F$="[object AsyncFunction]",j$="[object Function]",z$="[object GeneratorFunction]",B$="[object Proxy]";function W$(e){if(!L$(e))return!1;var t=I$(e);return t==j$||t==z$||t==F$||t==B$}var U$=W$,H$=ni,G$=H$["__core-js_shared__"],V$=G$,xs=V$,dp=function(){var e=/[^.]+$/.exec(xs&&xs.keys&&xs.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function q$(e){return!!dp&&dp in e}var Y$=q$,K$=Function.prototype,X$=K$.toString;function R$(e){if(e!=null){try{return X$.call(e)}catch{}try{return e+""}catch{}}return""}var Z$=R$,Q$=U$,J$=Y$,eC=ri,tC=Z$,nC=/[\\^$.*+?()[\]{}|]/g,rC=/^\[object .+?Constructor\]$/,oC=Function.prototype,iC=Object.prototype,aC=oC.toString,sC=iC.hasOwnProperty,lC=RegExp("^"+aC.call(sC).replace(nC,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function cC(e){if(!eC(e)||J$(e))return!1;var t=Q$(e)?lC:rC;return t.test(tC(e))}var uC=cC;function dC(e,t){return e==null?void 0:e[t]}var fC=dC,pC=uC,hC=fC;function mC(e,t){var n=hC(e,t);return pC(n)?n:void 0}var fp=mC,vC=fp,gC=vC(Object,"create"),oi=gC,pp=oi;function yC(){this.__data__=pp?pp(null):{},this.size=0}var bC=yC;function wC(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var xC=wC,$C=oi,CC="__lodash_hash_undefined__",SC=Object.prototype,EC=SC.hasOwnProperty;function TC(e){var t=this.__data__;if($C){var n=t[e];return n===CC?void 0:n}return EC.call(t,e)?t[e]:void 0}var PC=TC,MC=oi,kC=Object.prototype,OC=kC.hasOwnProperty;function _C(e){var t=this.__data__;return MC?t[e]!==void 0:OC.call(t,e)}var NC=_C,DC=oi,AC="__lodash_hash_undefined__";function IC(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=DC&&t===void 0?AC:t,this}var LC=IC,FC=bC,jC=xC,zC=PC,BC=NC,WC=LC;function tr(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])}}tr.prototype.clear=FC,tr.prototype.delete=jC,tr.prototype.get=zC,tr.prototype.has=BC,tr.prototype.set=WC;var UC=tr;function HC(){this.__data__=[],this.size=0}var GC=HC;function VC(e,t){return e===t||e!==e&&t!==t}var qC=VC,YC=qC;function KC(e,t){for(var n=e.length;n--;)if(YC(e[n][0],t))return n;return-1}var ii=KC,XC=ii,RC=Array.prototype,ZC=RC.splice;function QC(e){var t=this.__data__,n=XC(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():ZC.call(t,n,1),--this.size,!0}var JC=QC,eS=ii;function tS(e){var t=this.__data__,n=eS(t,e);return n<0?void 0:t[n][1]}var nS=tS,rS=ii;function oS(e){return rS(this.__data__,e)>-1}var iS=oS,aS=ii;function sS(e,t){var n=this.__data__,r=aS(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var lS=sS,cS=GC,uS=JC,dS=nS,fS=iS,pS=lS;function nr(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])}}nr.prototype.clear=cS,nr.prototype.delete=uS,nr.prototype.get=dS,nr.prototype.has=fS,nr.prototype.set=pS;var hS=nr,mS=fp,vS=ni,gS=mS(vS,"Map"),yS=gS,hp=UC,bS=hS,wS=yS;function xS(){this.size=0,this.__data__={hash:new hp,map:new(wS||bS),string:new hp}}var $S=xS;function CS(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var SS=CS,ES=SS;function TS(e,t){var n=e.__data__;return ES(t)?n[typeof t=="string"?"string":"hash"]:n.map}var ai=TS,PS=ai;function MS(e){var t=PS(this,e).delete(e);return this.size-=t?1:0,t}var kS=MS,OS=ai;function _S(e){return OS(this,e).get(e)}var NS=_S,DS=ai;function AS(e){return DS(this,e).has(e)}var IS=AS,LS=ai;function FS(e,t){var n=LS(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var jS=FS,zS=$S,BS=kS,WS=NS,US=IS,HS=jS;function rr(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])}}rr.prototype.clear=zS,rr.prototype.delete=BS,rr.prototype.get=WS,rr.prototype.has=US,rr.prototype.set=HS;var GS=rr,mp=GS,VS="Expected a function";function $s(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(VS);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new($s.Cache||mp),n}$s.Cache=mp;var qS=$s;const YS=Qn(qS);var vp="__react_svg_text_measurement_id";function KS(e,t){try{var n=document.getElementById(vp);if(!n){var r=document.createElementNS("http://www.w3.org/2000/svg","svg");r.setAttribute("aria-hidden","true"),r.style.width="0",r.style.height="0",r.style.position="absolute",r.style.top="-100%",r.style.left="-100%",n=document.createElementNS("http://www.w3.org/2000/svg","text"),n.setAttribute("id",vp),r.appendChild(n),document.body.appendChild(r)}return Object.assign(n.style,t),n.textContent=e,n.getComputedTextLength()}catch{return null}}const gp=YS(KS,function(e,t){return e+"_"+JSON.stringify(t)});var XS=["verticalAnchor","scaleToFit","angle","width","lineHeight","capHeight","children","style"];function RS(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function Cs(e){return typeof e=="number"}function yp(e){return typeof e=="number"&&Number.isFinite(e)||typeof e=="string"}function ZS(e){var t=e.verticalAnchor,n=t===void 0?"end":t,r=e.scaleToFit,o=r===void 0?!1:r,i=e.angle,a=e.width,s=e.lineHeight,l=s===void 0?"1em":s,c=e.capHeight,d=c===void 0?"0.71em":c,f=e.children,p=e.style,m=RS(e,XS),h=m.x,v=h===void 0?0:h,w=m.y,y=w===void 0?0:w,b=!yp(v)||!yp(y),$=u.useMemo(function(){var _=f==null?[]:f.toString().split(/(?:(?!\u00A0+)\s+)/);return{wordsWithWidth:_.map(function(j){return{word:j,wordWidth:gp(j,p)||0}}),spaceWidth:gp(" ",p)||0}},[f,p]),S=$.wordsWithWidth,x=$.spaceWidth,T=u.useMemo(function(){return b?[]:a||o?S.reduce(function(_,j){var F=j.word,V=j.wordWidth,R=_[_.length-1];if(R&&(a==null||o||(R.width||0)+V+x<a))R.words.push(F),R.width=R.width||0,R.width+=V+x;else{var X={words:[F],width:V};_.push(X)}return _},[]):[{words:f==null?[]:f.toString().split(/(?:(?!\u00A0+)\s+)/)}]},[b,a,o,f,S,x]),O=u.useMemo(function(){var _=b?"":ws(n==="start"?"calc("+d+")":n==="middle"?"calc("+(T.length-1)/2+" * -"+l+" + ("+d+" / 2))":"calc("+(T.length-1)+" * -"+l+")");return _},[b,n,d,T.length,l]),P=u.useMemo(function(){var _=[];if(b)return"";if(Cs(v)&&Cs(y)&&Cs(a)&&o&&T.length>0){var j=T[0].width||1,F=o==="shrink-only"?Math.min(a/j,1):a/j,V=F,R=v-F*v,X=y-V*y;_.push("matrix("+F+", 0, 0, "+V+", "+R+", "+X+")")}return i&&_.push("rotate("+i+", "+v+", "+y+")"),_.length>0?_.join(" "):""},[b,v,y,a,o,T,i]);return{wordsByLines:T,startDy:O,transform:P}}var QS=["dx","dy","textAnchor","innerRef","innerTextRef","verticalAnchor","angle","lineHeight","scaleToFit","capHeight","width"];function Ss(){return Ss=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},Ss.apply(this,arguments)}function JS(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var eE={overflow:"visible"};function Es(e){var t=e.dx,n=t===void 0?0:t,r=e.dy,o=r===void 0?0:r,i=e.textAnchor,a=i===void 0?"start":i,s=e.innerRef,l=e.innerTextRef;e.verticalAnchor,e.angle;var c=e.lineHeight,d=c===void 0?"1em":c;e.scaleToFit,e.capHeight,e.width;var f=JS(e,QS),p=f.x,m=p===void 0?0:p,h=f.fontSize,v=ZS(e),w=v.wordsByLines,y=v.startDy,b=v.transform;return u.createElement("svg",{ref:s,x:n,y:o,fontSize:h,style:eE},w.length>0?u.createElement("text",Ss({ref:l,transform:b},f,{textAnchor:a}),w.map(function($,S){return u.createElement("tspan",{key:S,x:m,dy:S===0?y:d},$.words.join(" "))})):null)}function Ts(e,t,n){var r,o,i,a,s;t==null&&(t=100);function l(){var d=Date.now()-a;d<t&&d>=0?r=setTimeout(l,t-d):(r=null,n||(s=e.apply(i,o),i=o=null))}var c=function(){i=this,o=arguments,a=Date.now();var d=n&&!r;return r||(r=setTimeout(l,t)),d&&(s=e.apply(i,o),i=o=null),s};return c.clear=function(){r&&(clearTimeout(r),r=null)},c.flush=function(){r&&(s=e.apply(i,o),i=o=null,clearTimeout(r),r=null)},c}Ts.debounce=Ts;var tE=Ts;const bp=Qn(tE);function nE(e){let{debounce:t,scroll:n,polyfill:r,offsetSize:o}=e===void 0?{debounce:0,scroll:!1,offsetSize:!1}:e;const i=r||(typeof window>"u"?class{}:window.ResizeObserver);if(!i)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[a,s]=u.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),l=u.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:a}),c=t?typeof t=="number"?t:t.scroll:null,d=t?typeof t=="number"?t:t.resize:null,f=u.useRef(!1);u.useEffect(()=>(f.current=!0,()=>void(f.current=!1)));const[p,m,h]=u.useMemo(()=>{const b=()=>{if(!l.current.element)return;const{left:$,top:S,width:x,height:T,bottom:O,right:P,x:_,y:j}=l.current.element.getBoundingClientRect(),F={left:$,top:S,width:x,height:T,bottom:O,right:P,x:_,y:j};l.current.element instanceof HTMLElement&&o&&(F.height=l.current.element.offsetHeight,F.width=l.current.element.offsetWidth),Object.freeze(F),f.current&&!aE(l.current.lastBounds,F)&&s(l.current.lastBounds=F)};return[b,d?bp(b,d):b,c?bp(b,c):b]},[s,o,c,d]);function v(){l.current.scrollContainers&&(l.current.scrollContainers.forEach(b=>b.removeEventListener("scroll",h,!0)),l.current.scrollContainers=null),l.current.resizeObserver&&(l.current.resizeObserver.disconnect(),l.current.resizeObserver=null)}function w(){l.current.element&&(l.current.resizeObserver=new i(h),l.current.resizeObserver.observe(l.current.element),n&&l.current.scrollContainers&&l.current.scrollContainers.forEach(b=>b.addEventListener("scroll",h,{capture:!0,passive:!0})))}const y=b=>{!b||b===l.current.element||(v(),l.current.element=b,l.current.scrollContainers=wp(b),w())};return oE(h,!!n),rE(m),u.useEffect(()=>{v(),w()},[n,h,m]),u.useEffect(()=>v,[]),[y,a,p]}function rE(e){u.useEffect(()=>{const t=e;return window.addEventListener("resize",t),()=>void window.removeEventListener("resize",t)},[e])}function oE(e,t){u.useEffect(()=>{if(t){const n=e;return window.addEventListener("scroll",n,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",n,!0)}},[e,t])}function wp(e){const t=[];if(!e||e===document.body)return t;const{overflow:n,overflowX:r,overflowY:o}=window.getComputedStyle(e);return[n,r,o].some(i=>i==="auto"||i==="scroll")&&t.push(e),[...t,...wp(e.parentElement)]}const iE=["x","y","top","bottom","left","right","width","height"],aE=(e,t)=>iE.every(n=>e[n]===t[n]);var an=function(){function e(n){var r=n.x,o=r===void 0?0:r,i=n.y,a=i===void 0?0:i;this.x=0,this.y=0,this.x=o,this.y=a}var t=e.prototype;return t.value=function(){return{x:this.x,y:this.y}},t.toArray=function(){return[this.x,this.y]},e}();function sE(e,t){return new an({x:e.x+t.x,y:e.y+t.y})}function lE(e,t){return new an({x:e.x-t.x,y:e.y-t.y})}const xp=Jn(Object.freeze(Object.defineProperty({__proto__:null,Point:an,subtractPoints:lE,sumPoints:sE},Symbol.toStringTag,{value:"Module"})));function cE(e){return!!e&&e instanceof Element}function uE(e){return!!e&&(e instanceof SVGElement||"ownerSVGElement"in e)}function dE(e){return!!e&&"createSVGPoint"in e}function fE(e){return!!e&&"getScreenCTM"in e}function pE(e){return!!e&&"changedTouches"in e}function hE(e){return!!e&&"clientX"in e}function mE(e){return!!e&&(e instanceof Event||"nativeEvent"in e&&e.nativeEvent instanceof Event)}function zr(){return zr=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},zr.apply(this,arguments)}var Ps={x:0,y:0};function vE(e){if(!e)return zr({},Ps);if(pE(e))return e.changedTouches.length>0?{x:e.changedTouches[0].clientX,y:e.changedTouches[0].clientY}:zr({},Ps);if(hE(e))return{x:e.clientX,y:e.clientY};var t=e==null?void 0:e.target,n=t&&"getBoundingClientRect"in t?t.getBoundingClientRect():null;return n?{x:n.x+n.width/2,y:n.y+n.height/2}:zr({},Ps)}function $p(e,t){if(!e||!t)return null;var n=vE(t),r=uE(e)?e.ownerSVGElement:e,o=fE(r)?r.getScreenCTM():null;if(dE(r)&&o){var i=r.createSVGPoint();return i.x=n.x,i.y=n.y,i=i.matrixTransform(o.inverse()),new an({x:i.x,y:i.y})}var a=e.getBoundingClientRect();return new an({x:n.x-a.left-e.clientLeft,y:n.y-a.top-e.clientTop})}function gE(e,t){if(cE(e)&&t)return $p(e,t);if(mE(e)){var n=e,r=n.target;if(r)return $p(r,n)}return null}function sn(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function yE(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Ms(e){let t,n,r;e.length!==2?(t=sn,n=(s,l)=>sn(e(s),l),r=(s,l)=>e(s)-l):(t=e===sn||e===yE?e:bE,n=e,r=e);function o(s,l,c=0,d=s.length){if(c<d){if(t(l,l)!==0)return d;do{const f=c+d>>>1;n(s[f],l)<0?c=f+1:d=f}while(c<d)}return c}function i(s,l,c=0,d=s.length){if(c<d){if(t(l,l)!==0)return d;do{const f=c+d>>>1;n(s[f],l)<=0?c=f+1:d=f}while(c<d)}return c}function a(s,l,c=0,d=s.length){const f=o(s,l,c,d-1);return f>c&&r(s[f-1],l)>-r(s[f],l)?f-1:f}return{left:o,center:a,right:i}}function bE(){return 0}function Cp(e){return e===null?NaN:+e}function*wE(e,t){if(t===void 0)for(let n of e)n!=null&&(n=+n)>=n&&(yield n);else{let n=-1;for(let r of e)(r=t(r,++n,e))!=null&&(r=+r)>=r&&(yield r)}}const xE=Ms(sn).right;Ms(Cp).center;const or=xE;function $E(e,t){let n=0;if(t===void 0)for(let r of e)r!=null&&(r=+r)>=r&&++n;else{let r=-1;for(let o of e)(o=t(o,++r,e))!=null&&(o=+o)>=o&&++n}return n}function si(e,t){let n,r;if(t===void 0)for(const o of e)o!=null&&(n===void 0?o>=o&&(n=r=o):(n>o&&(n=o),r<o&&(r=o)));else{let o=-1;for(let i of e)(i=t(i,++o,e))!=null&&(n===void 0?i>=i&&(n=r=i):(n>i&&(n=i),r<i&&(r=i)))}return[n,r]}class Sp extends Map{constructor(t,n=EE){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,o]of t)this.set(r,o)}get(t){return super.get(Ep(this,t))}has(t){return super.has(Ep(this,t))}set(t,n){return super.set(CE(this,t),n)}delete(t){return super.delete(SE(this,t))}}function Ep({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function CE({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function SE({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function EE(e){return e!==null&&typeof e=="object"?e.valueOf():e}function TE(e){return e}function PE(e=sn){if(e===sn)return Tp;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 Tp(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}var ME=Array.prototype,kE=ME.slice;function ks(e){return()=>e}const OE=Math.sqrt(50),_E=Math.sqrt(10),NE=Math.sqrt(2);function li(e,t,n){const r=(t-e)/Math.max(0,n),o=Math.floor(Math.log10(r)),i=r/Math.pow(10,o),a=i>=OE?10:i>=_E?5:i>=NE?2:1;let s,l,c;return o<0?(c=Math.pow(10,-o)/a,s=Math.round(e*c),l=Math.round(t*c),s/c<e&&++s,l/c>t&&--l,c=-c):(c=Math.pow(10,o)*a,s=Math.round(e/c),l=Math.round(t/c),s*c<e&&++s,l*c>t&&--l),l<s&&.5<=n&&n<2?li(e,t,n*2):[s,l,c]}function ci(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[o,i,a]=r?li(t,e,n):li(e,t,n);if(!(i>=o))return[];const s=i-o+1,l=new Array(s);if(r)if(a<0)for(let c=0;c<s;++c)l[c]=(i-c)/-a;else for(let c=0;c<s;++c)l[c]=(i-c)*a;else if(a<0)for(let c=0;c<s;++c)l[c]=(o+c)/-a;else for(let c=0;c<s;++c)l[c]=(o+c)*a;return l}function ir(e,t,n){return t=+t,e=+e,n=+n,li(e,t,n)[2]}function Os(e,t,n){t=+t,e=+e,n=+n;const r=t<e,o=r?ir(t,e,n):ir(e,t,n);return(r?-1:1)*(o<0?1/-o:o)}function DE(e,t,n){let r;for(;;){const o=ir(e,t,n);if(o===r||o===0||!isFinite(o))return[e,t];o>0?(e=Math.floor(e/o)*o,t=Math.ceil(t/o)*o):o<0&&(e=Math.ceil(e*o)/o,t=Math.floor(t*o)/o),r=o}}function AE(e){return Math.max(1,Math.ceil(Math.log($E(e))/Math.LN2)+1)}function IE(){var e=TE,t=si,n=AE;function r(o){Array.isArray(o)||(o=Array.from(o));var i,a=o.length,s,l,c=new Array(a);for(i=0;i<a;++i)c[i]=e(o[i],i,o);var d=t(c),f=d[0],p=d[1],m=n(c,f,p);if(!Array.isArray(m)){const $=p,S=+m;if(t===si&&([f,p]=DE(f,p,S)),m=ci(f,p,S),m[0]<=f&&(l=ir(f,p,S)),m[m.length-1]>=p)if($>=p&&t===si){const x=ir(f,p,S);isFinite(x)&&(x>0?p=(Math.floor(p/x)+1)*x:x<0&&(p=(Math.ceil(p*-x)+1)/-x))}else m.pop()}for(var h=m.length,v=0,w=h;m[v]<=f;)++v;for(;m[w-1]>p;)--w;(v||w<h)&&(m=m.slice(v,w),h=w-v);var y=new Array(h+1),b;for(i=0;i<=h;++i)b=y[i]=[],b.x0=i>0?m[i-1]:f,b.x1=i<h?m[i]:p;if(isFinite(l)){if(l>0)for(i=0;i<a;++i)(s=c[i])!=null&&f<=s&&s<=p&&y[Math.min(h,Math.floor((s-f)/l))].push(o[i]);else if(l<0){for(i=0;i<a;++i)if((s=c[i])!=null&&f<=s&&s<=p){const $=Math.floor((f-s)*l);y[Math.min(h,$+(m[$]<=s))].push(o[i])}}}else for(i=0;i<a;++i)(s=c[i])!=null&&f<=s&&s<=p&&y[or(m,s,0,h)].push(o[i]);return y}return r.value=function(o){return arguments.length?(e=typeof o=="function"?o:ks(o),r):e},r.domain=function(o){return arguments.length?(t=typeof o=="function"?o:ks([o[0],o[1]]),r):t},r.thresholds=function(o){return arguments.length?(n=typeof o=="function"?o:ks(Array.isArray(o)?kE.call(o):o),r):n},r}function _s(e,t){let n;if(t===void 0)for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let o of e)(o=t(o,++r,e))!=null&&(n<o||n===void 0&&o>=o)&&(n=o)}return n}function Pp(e,t){let n;if(t===void 0)for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let o of e)(o=t(o,++r,e))!=null&&(n>o||n===void 0&&o>=o)&&(n=o)}return n}function Mp(e,t,n=0,r=1/0,o){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(o=o===void 0?Tp:PE(o);r>n;){if(r-n>600){const l=r-n+1,c=t-n+1,d=Math.log(l),f=.5*Math.exp(2*d/3),p=.5*Math.sqrt(d*f*(l-f)/l)*(c-l/2<0?-1:1),m=Math.max(n,Math.floor(t-c*f/l+p)),h=Math.min(r,Math.floor(t+(l-c)*f/l+p));Mp(e,t,m,h,o)}const i=e[t];let a=n,s=r;for(Br(e,n,t),o(e[r],i)>0&&Br(e,n,r);a<s;){for(Br(e,a,s),++a,--s;o(e[a],i)<0;)++a;for(;o(e[s],i)>0;)--s}o(e[n],i)===0?Br(e,n,s):(++s,Br(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function Br(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function LE(e,t,n){if(e=Float64Array.from(wE(e,n)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return Pp(e);if(t>=1)return _s(e);var r,o=(r-1)*t,i=Math.floor(o),a=_s(Mp(e,i).subarray(0,i+1)),s=Pp(e.subarray(i+1));return a+(s-a)*(o-i)}}function FE(e,t,n=Cp){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,o=(r-1)*t,i=Math.floor(o),a=+n(e[i],i,e),s=+n(e[i+1],i+1,e);return a+(s-a)*(o-i)}}function jE(e,t,n){e=+e,t=+t,n=(o=arguments.length)<2?(t=e,e=0,1):o<3?1:+n;for(var r=-1,o=Math.max(0,Math.ceil((t-e)/n))|0,i=new Array(o);++r<o;)i[r]=e+r*n;return i}function ut(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Bt(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 Ns=Symbol("implicit");function ui(){var e=new Sp,t=[],n=[],r=Ns;function o(i){let a=e.get(i);if(a===void 0){if(r!==Ns)return r;e.set(i,a=t.push(i)-1)}return n[a%n.length]}return o.domain=function(i){if(!arguments.length)return t.slice();t=[],e=new Sp;for(const a of i)e.has(a)||e.set(a,t.push(a)-1);return o},o.range=function(i){return arguments.length?(n=Array.from(i),o):n.slice()},o.unknown=function(i){return arguments.length?(r=i,o):r},o.copy=function(){return ui(t,n).unknown(r)},ut.apply(o,arguments),o}function di(){var e=ui().unknown(void 0),t=e.domain,n=e.range,r=0,o=1,i,a,s=!1,l=0,c=0,d=.5;delete e.unknown;function f(){var p=t().length,m=o<r,h=m?o:r,v=m?r:o;i=(v-h)/Math.max(1,p-l+c*2),s&&(i=Math.floor(i)),h+=(v-h-i*(p-l))*d,a=i*(1-l),s&&(h=Math.round(h),a=Math.round(a));var w=jE(p).map(function(y){return h+i*y});return n(m?w.reverse():w)}return e.domain=function(p){return arguments.length?(t(p),f()):t()},e.range=function(p){return arguments.length?([r,o]=p,r=+r,o=+o,f()):[r,o]},e.rangeRound=function(p){return[r,o]=p,r=+r,o=+o,s=!0,f()},e.bandwidth=function(){return a},e.step=function(){return i},e.round=function(p){return arguments.length?(s=!!p,f()):s},e.padding=function(p){return arguments.length?(l=Math.min(1,c=+p),f()):l},e.paddingInner=function(p){return arguments.length?(l=Math.min(1,p),f()):l},e.paddingOuter=function(p){return arguments.length?(c=+p,f()):c},e.align=function(p){return arguments.length?(d=Math.max(0,Math.min(1,p)),f()):d},e.copy=function(){return di(t(),[r,o]).round(s).paddingInner(l).paddingOuter(c).align(d)},ut.apply(f(),arguments)}function kp(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return kp(t())},e}function Op(){return kp(di.apply(null,arguments).paddingInner(1))}function ar(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Wr(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function ln(){}var Tn=.7,sr=1/Tn,lr="\\s*([+-]?\\d+)\\s*",Ur="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Mt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",zE=/^#([0-9a-f]{3,8})$/,BE=new RegExp(`^rgb\\(${lr},${lr},${lr}\\)$`),WE=new RegExp(`^rgb\\(${Mt},${Mt},${Mt}\\)$`),UE=new RegExp(`^rgba\\(${lr},${lr},${lr},${Ur}\\)$`),HE=new RegExp(`^rgba\\(${Mt},${Mt},${Mt},${Ur}\\)$`),GE=new RegExp(`^hsl\\(${Ur},${Mt},${Mt}\\)$`),VE=new RegExp(`^hsla\\(${Ur},${Mt},${Mt},${Ur}\\)$`),_p={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};ar(ln,Hr,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Np,formatHex:Np,formatHex8:qE,formatHsl:YE,formatRgb:Dp,toString:Dp});function Np(){return this.rgb().formatHex()}function qE(){return this.rgb().formatHex8()}function YE(){return jp(this).formatHsl()}function Dp(){return this.rgb().formatRgb()}function Hr(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=zE.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Ap(t):n===3?new ze(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?fi(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?fi(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=BE.exec(e))?new ze(t[1],t[2],t[3],1):(t=WE.exec(e))?new ze(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=UE.exec(e))?fi(t[1],t[2],t[3],t[4]):(t=HE.exec(e))?fi(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=GE.exec(e))?Fp(t[1],t[2]/100,t[3]/100,1):(t=VE.exec(e))?Fp(t[1],t[2]/100,t[3]/100,t[4]):_p.hasOwnProperty(e)?Ap(_p[e]):e==="transparent"?new ze(NaN,NaN,NaN,0):null}function Ap(e){return new ze(e>>16&255,e>>8&255,e&255,1)}function fi(e,t,n,r){return r<=0&&(e=t=n=NaN),new ze(e,t,n,r)}function Ds(e){return e instanceof ln||(e=Hr(e)),e?(e=e.rgb(),new ze(e.r,e.g,e.b,e.opacity)):new ze}function pi(e,t,n,r){return arguments.length===1?Ds(e):new ze(e,t,n,r??1)}function ze(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}ar(ze,pi,Wr(ln,{brighter(e){return e=e==null?sr:Math.pow(sr,e),new ze(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Tn:Math.pow(Tn,e),new ze(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ze(Pn(this.r),Pn(this.g),Pn(this.b),hi(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:Ip,formatHex:Ip,formatHex8:KE,formatRgb:Lp,toString:Lp}));function Ip(){return`#${Mn(this.r)}${Mn(this.g)}${Mn(this.b)}`}function KE(){return`#${Mn(this.r)}${Mn(this.g)}${Mn(this.b)}${Mn((isNaN(this.opacity)?1:this.opacity)*255)}`}function Lp(){const e=hi(this.opacity);return`${e===1?"rgb(":"rgba("}${Pn(this.r)}, ${Pn(this.g)}, ${Pn(this.b)}${e===1?")":`, ${e})`}`}function hi(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Pn(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Mn(e){return e=Pn(e),(e<16?"0":"")+e.toString(16)}function Fp(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new gt(e,t,n,r)}function jp(e){if(e instanceof gt)return new gt(e.h,e.s,e.l,e.opacity);if(e instanceof ln||(e=Hr(e)),!e)return new gt;if(e instanceof gt)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,s=i-o,l=(i+o)/2;return s?(t===i?a=(n-r)/s+(n<r)*6:n===i?a=(r-t)/s+2:a=(t-n)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new gt(a,s,l,e.opacity)}function As(e,t,n,r){return arguments.length===1?jp(e):new gt(e,t,n,r??1)}function gt(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}ar(gt,As,Wr(ln,{brighter(e){return e=e==null?sr:Math.pow(sr,e),new gt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Tn:Math.pow(Tn,e),new gt(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,o=2*n-r;return new ze(Is(e>=240?e-240:e+120,o,r),Is(e,o,r),Is(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new gt(zp(this.h),mi(this.s),mi(this.l),hi(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=hi(this.opacity);return`${e===1?"hsl(":"hsla("}${zp(this.h)}, ${mi(this.s)*100}%, ${mi(this.l)*100}%${e===1?")":`, ${e})`}`}}));function zp(e){return e=(e||0)%360,e<0?e+360:e}function mi(e){return Math.max(0,Math.min(1,e||0))}function Is(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 Bp=Math.PI/180,Wp=180/Math.PI,vi=18,Up=.96422,Hp=1,Gp=.82521,Vp=4/29,cr=6/29,qp=3*cr*cr,XE=cr*cr*cr;function Yp(e){if(e instanceof kt)return new kt(e.l,e.a,e.b,e.opacity);if(e instanceof Wt)return Kp(e);e instanceof ze||(e=Ds(e));var t=Bs(e.r),n=Bs(e.g),r=Bs(e.b),o=Fs((.2225045*t+.7168786*n+.0606169*r)/Hp),i,a;return t===n&&n===r?i=a=o:(i=Fs((.4360747*t+.3850649*n+.1430804*r)/Up),a=Fs((.0139322*t+.0971045*n+.7141733*r)/Gp)),new kt(116*o-16,500*(i-o),200*(o-a),e.opacity)}function Ls(e,t,n,r){return arguments.length===1?Yp(e):new kt(e,t,n,r??1)}function kt(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}ar(kt,Ls,Wr(ln,{brighter(e){return new kt(this.l+vi*(e??1),this.a,this.b,this.opacity)},darker(e){return new kt(this.l-vi*(e??1),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return t=Up*js(t),e=Hp*js(e),n=Gp*js(n),new ze(zs(3.1338561*t-1.6168667*e-.4906146*n),zs(-.9787684*t+1.9161415*e+.033454*n),zs(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}}));function Fs(e){return e>XE?Math.pow(e,1/3):e/qp+Vp}function js(e){return e>cr?e*e*e:qp*(e-Vp)}function zs(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Bs(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function RE(e){if(e instanceof Wt)return new Wt(e.h,e.c,e.l,e.opacity);if(e instanceof kt||(e=Yp(e)),e.a===0&&e.b===0)return new Wt(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Wp;return new Wt(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function Ws(e,t,n,r){return arguments.length===1?RE(e):new Wt(e,t,n,r??1)}function Wt(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function Kp(e){if(isNaN(e.h))return new kt(e.l,0,0,e.opacity);var t=e.h*Bp;return new kt(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}ar(Wt,Ws,Wr(ln,{brighter(e){return new Wt(this.h,this.c,this.l+vi*(e??1),this.opacity)},darker(e){return new Wt(this.h,this.c,this.l-vi*(e??1),this.opacity)},rgb(){return Kp(this).rgb()}}));var Xp=-.14861,Us=1.78277,Hs=-.29227,gi=-.90649,Gr=1.97294,Rp=Gr*gi,Zp=Gr*Us,Qp=Us*Hs-gi*Xp;function ZE(e){if(e instanceof kn)return new kn(e.h,e.s,e.l,e.opacity);e instanceof ze||(e=Ds(e));var t=e.r/255,n=e.g/255,r=e.b/255,o=(Qp*r+Rp*t-Zp*n)/(Qp+Rp-Zp),i=r-o,a=(Gr*(n-o)-Hs*i)/gi,s=Math.sqrt(a*a+i*i)/(Gr*o*(1-o)),l=s?Math.atan2(a,i)*Wp-120:NaN;return new kn(l<0?l+360:l,s,o,e.opacity)}function Gs(e,t,n,r){return arguments.length===1?ZE(e):new kn(e,t,n,r??1)}function kn(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}ar(kn,Gs,Wr(ln,{brighter(e){return e=e==null?sr:Math.pow(sr,e),new kn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Tn:Math.pow(Tn,e),new kn(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*Bp,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),o=Math.sin(e);return new ze(255*(t+n*(Xp*r+Us*o)),255*(t+n*(Hs*r+gi*o)),255*(t+n*(Gr*r)),this.opacity)}}));function Jp(e,t,n,r,o){var i=e*e,a=i*e;return((1-3*e+3*i-a)*t+(4-6*i+3*a)*n+(1+3*e+3*i-3*a)*r+a*o)/6}function eh(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),o=e[r],i=e[r+1],a=r>0?e[r-1]:2*o-i,s=r<t-1?e[r+2]:2*i-o;return Jp((n-r/t)*t,a,o,i,s)}}function th(e){var t=e.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*t),o=e[(r+t-1)%t],i=e[r%t],a=e[(r+1)%t],s=e[(r+2)%t];return Jp((n-r/t)*t,o,i,a,s)}}const yi=e=>()=>e;function nh(e,t){return function(n){return e+n*t}}function QE(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 bi(e,t){var n=t-e;return n?nh(e,n>180||n<-180?n-360*Math.round(n/360):n):yi(isNaN(e)?t:e)}function JE(e){return(e=+e)==1?Be:function(t,n){return n-t?QE(t,n,e):yi(isNaN(t)?n:t)}}function Be(e,t){var n=t-e;return n?nh(e,n):yi(isNaN(e)?t:e)}const wi=function e(t){var n=JE(t);function r(o,i){var a=n((o=pi(o)).r,(i=pi(i)).r),s=n(o.g,i.g),l=n(o.b,i.b),c=Be(o.opacity,i.opacity);return function(d){return o.r=a(d),o.g=s(d),o.b=l(d),o.opacity=c(d),o+""}}return r.gamma=e,r}(1);function rh(e){return function(t){var n=t.length,r=new Array(n),o=new Array(n),i=new Array(n),a,s;for(a=0;a<n;++a)s=pi(t[a]),r[a]=s.r||0,o[a]=s.g||0,i[a]=s.b||0;return r=e(r),o=e(o),i=e(i),s.opacity=1,function(l){return s.r=r(l),s.g=o(l),s.b=i(l),s+""}}}var e2=rh(eh),t2=rh(th);function Vs(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),o;return function(i){for(o=0;o<n;++o)r[o]=e[o]*(1-i)+t[o]*i;return r}}function oh(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function n2(e,t){return(oh(t)?Vs:ih)(e,t)}function ih(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,o=new Array(r),i=new Array(n),a;for(a=0;a<r;++a)o[a]=On(e[a],t[a]);for(;a<n;++a)i[a]=t[a];return function(s){for(a=0;a<r;++a)i[a]=o[a](s);return i}}function ah(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function yt(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function sh(e,t){var n={},r={},o;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(o in t)o in e?n[o]=On(e[o],t[o]):r[o]=t[o];return function(i){for(o in n)r[o]=n[o](i);return r}}var qs=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ys=new RegExp(qs.source,"g");function r2(e){return function(){return e}}function o2(e){return function(t){return e(t)+""}}function lh(e,t){var n=qs.lastIndex=Ys.lastIndex=0,r,o,i,a=-1,s=[],l=[];for(e=e+"",t=t+"";(r=qs.exec(e))&&(o=Ys.exec(t));)(i=o.index)>n&&(i=t.slice(n,i),s[a]?s[a]+=i:s[++a]=i),(r=r[0])===(o=o[0])?s[a]?s[a]+=o:s[++a]=o:(s[++a]=null,l.push({i:a,x:yt(r,o)})),n=Ys.lastIndex;return n<t.length&&(i=t.slice(n),s[a]?s[a]+=i:s[++a]=i),s.length<2?l[0]?o2(l[0].x):r2(t):(t=l.length,function(c){for(var d=0,f;d<t;++d)s[(f=l[d]).i]=f.x(c);return s.join("")})}function On(e,t){var n=typeof t,r;return t==null||n==="boolean"?yi(t):(n==="number"?yt:n==="string"?(r=Hr(t))?(t=r,wi):lh:t instanceof Hr?wi:t instanceof Date?ah:oh(t)?Vs:Array.isArray(t)?ih:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?sh:yt)(e,t)}function i2(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}function a2(e,t){var n=bi(+e,+t);return function(r){var o=n(r);return o-360*Math.floor(o/360)}}function Vr(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var ch=180/Math.PI,Ks={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function uh(e,t,n,r,o,i){var a,s,l;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(l=e*n+t*r)&&(n-=e*l,r-=t*l),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,l/=s),e*r<t*n&&(e=-e,t=-t,l=-l,a=-a),{translateX:o,translateY:i,rotate:Math.atan2(t,e)*ch,skewX:Math.atan(l)*ch,scaleX:a,scaleY:s}}var xi;function s2(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Ks:uh(t.a,t.b,t.c,t.d,t.e,t.f)}function l2(e){return e==null||(xi||(xi=document.createElementNS("http://www.w3.org/2000/svg","g")),xi.setAttribute("transform",e),!(e=xi.transform.baseVal.consolidate()))?Ks:(e=e.matrix,uh(e.a,e.b,e.c,e.d,e.e,e.f))}function dh(e,t,n,r){function o(c){return c.length?c.pop()+" ":""}function i(c,d,f,p,m,h){if(c!==f||d!==p){var v=m.push("translate(",null,t,null,n);h.push({i:v-4,x:yt(c,f)},{i:v-2,x:yt(d,p)})}else(f||p)&&m.push("translate("+f+t+p+n)}function a(c,d,f,p){c!==d?(c-d>180?d+=360:d-c>180&&(c+=360),p.push({i:f.push(o(f)+"rotate(",null,r)-2,x:yt(c,d)})):d&&f.push(o(f)+"rotate("+d+r)}function s(c,d,f,p){c!==d?p.push({i:f.push(o(f)+"skewX(",null,r)-2,x:yt(c,d)}):d&&f.push(o(f)+"skewX("+d+r)}function l(c,d,f,p,m,h){if(c!==f||d!==p){var v=m.push(o(m)+"scale(",null,",",null,")");h.push({i:v-4,x:yt(c,f)},{i:v-2,x:yt(d,p)})}else(f!==1||p!==1)&&m.push(o(m)+"scale("+f+","+p+")")}return function(c,d){var f=[],p=[];return c=e(c),d=e(d),i(c.translateX,c.translateY,d.translateX,d.translateY,f,p),a(c.rotate,d.rotate,f,p),s(c.skewX,d.skewX,f,p),l(c.scaleX,c.scaleY,d.scaleX,d.scaleY,f,p),c=d=null,function(m){for(var h=-1,v=p.length,w;++h<v;)f[(w=p[h]).i]=w.x(m);return f.join("")}}}var c2=dh(s2,"px, ","px)","deg)"),u2=dh(l2,", ",")",")"),d2=1e-12;function fh(e){return((e=Math.exp(e))+1/e)/2}function f2(e){return((e=Math.exp(e))-1/e)/2}function p2(e){return((e=Math.exp(2*e))-1)/(e+1)}const h2=function e(t,n,r){function o(i,a){var s=i[0],l=i[1],c=i[2],d=a[0],f=a[1],p=a[2],m=d-s,h=f-l,v=m*m+h*h,w,y;if(v<d2)y=Math.log(p/c)/t,w=function(O){return[s+O*m,l+O*h,c*Math.exp(t*O*y)]};else{var b=Math.sqrt(v),$=(p*p-c*c+r*v)/(2*c*n*b),S=(p*p-c*c-r*v)/(2*p*n*b),x=Math.log(Math.sqrt($*$+1)-$),T=Math.log(Math.sqrt(S*S+1)-S);y=(T-x)/t,w=function(O){var P=O*y,_=fh(x),j=c/(n*b)*(_*p2(t*P+x)-f2(x));return[s+j*m,l+j*h,c*_/fh(t*P+x)]}}return w.duration=y*1e3*t/Math.SQRT2,w}return o.rho=function(i){var a=Math.max(.001,+i),s=a*a,l=s*s;return e(a,s,l)},o}(Math.SQRT2,2,4);function ph(e){return function(t,n){var r=e((t=As(t)).h,(n=As(n)).h),o=Be(t.s,n.s),i=Be(t.l,n.l),a=Be(t.opacity,n.opacity);return function(s){return t.h=r(s),t.s=o(s),t.l=i(s),t.opacity=a(s),t+""}}}const hh=ph(bi);var mh=ph(Be);function vh(e,t){var n=Be((e=Ls(e)).l,(t=Ls(t)).l),r=Be(e.a,t.a),o=Be(e.b,t.b),i=Be(e.opacity,t.opacity);return function(a){return e.l=n(a),e.a=r(a),e.b=o(a),e.opacity=i(a),e+""}}function gh(e){return function(t,n){var r=e((t=Ws(t)).h,(n=Ws(n)).h),o=Be(t.c,n.c),i=Be(t.l,n.l),a=Be(t.opacity,n.opacity);return function(s){return t.h=r(s),t.c=o(s),t.l=i(s),t.opacity=a(s),t+""}}}const yh=gh(bi);var bh=gh(Be);function wh(e){return function t(n){n=+n;function r(o,i){var a=e((o=Gs(o)).h,(i=Gs(i)).h),s=Be(o.s,i.s),l=Be(o.l,i.l),c=Be(o.opacity,i.opacity);return function(d){return o.h=a(d),o.s=s(d),o.l=l(Math.pow(d,n)),o.opacity=c(d),o+""}}return r.gamma=t,r}(1)}const xh=wh(bi);var $h=wh(Be);function Ch(e,t){t===void 0&&(t=e,e=On);for(var n=0,r=t.length-1,o=t[0],i=new Array(r<0?0:r);n<r;)i[n]=e(o,o=t[++n]);return function(a){var s=Math.max(0,Math.min(r-1,Math.floor(a*=r)));return i[s](a-s)}}function m2(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e(r/(t-1));return n}function v2(e){return function(){return e}}function $i(e){return+e}var Sh=[0,1];function Ke(e){return e}function Xs(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:v2(isNaN(t)?NaN:.5)}function g2(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function y2(e,t,n){var r=e[0],o=e[1],i=t[0],a=t[1];return o<r?(r=Xs(o,r),i=n(a,i)):(r=Xs(r,o),i=n(i,a)),function(s){return i(r(s))}}function b2(e,t,n){var r=Math.min(e.length,t.length)-1,o=new Array(r),i=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)o[a]=Xs(e[a],e[a+1]),i[a]=n(t[a],t[a+1]);return function(s){var l=or(e,s,1,r)-1;return i[l](o[l](s))}}function qr(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Ci(){var e=Sh,t=Sh,n=On,r,o,i,a=Ke,s,l,c;function d(){var p=Math.min(e.length,t.length);return a!==Ke&&(a=g2(e[0],e[p-1])),s=p>2?b2:y2,l=c=null,f}function f(p){return p==null||isNaN(p=+p)?i:(l||(l=s(e.map(r),t,n)))(r(a(p)))}return f.invert=function(p){return a(o((c||(c=s(t,e.map(r),yt)))(p)))},f.domain=function(p){return arguments.length?(e=Array.from(p,$i),d()):e.slice()},f.range=function(p){return arguments.length?(t=Array.from(p),d()):t.slice()},f.rangeRound=function(p){return t=Array.from(p),n=Vr,d()},f.clamp=function(p){return arguments.length?(a=p?!0:Ke,d()):a!==Ke},f.interpolate=function(p){return arguments.length?(n=p,d()):n},f.unknown=function(p){return arguments.length?(i=p,f):i},function(p,m){return r=p,o=m,d()}}function Rs(){return Ci()(Ke,Ke)}function w2(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Si(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function ur(e){return e=Si(Math.abs(e)),e?e[1]:NaN}function x2(e,t){return function(n,r){for(var o=n.length,i=[],a=0,s=e[0],l=0;o>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),i.push(n.substring(o-=s,o+s)),!((l+=s+1)>r));)s=e[a=(a+1)%e.length];return i.reverse().join(t)}}function $2(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var C2=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Yr(e){if(!(t=C2.exec(e)))throw new Error("invalid format: "+e);var t;return new Zs({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]})}Yr.prototype=Zs.prototype;function Zs(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+""}Zs.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 S2(e){e:for(var t=e.length,n=1,r=-1,o;n<t;++n)switch(e[n]){case".":r=o=n;break;case"0":r===0&&(r=n),o=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(o+1):e}var Eh;function E2(e,t){var n=Si(e,t);if(!n)return e+"";var r=n[0],o=n[1],i=o-(Eh=Math.max(-8,Math.min(8,Math.floor(o/3)))*3)+1,a=r.length;return i===a?r:i>a?r+new Array(i-a+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+Si(e,Math.max(0,t+i-1))[0]}function Th(e,t){var n=Si(e,t);if(!n)return e+"";var r=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")}const Ph={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:w2,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)=>Th(e*100,t),r:Th,s:E2,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Mh(e){return e}var kh=Array.prototype.map,Oh=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function T2(e){var t=e.grouping===void 0||e.thousands===void 0?Mh:x2(kh.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",o=e.decimal===void 0?".":e.decimal+"",i=e.numerals===void 0?Mh:$2(kh.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function c(f){f=Yr(f);var p=f.fill,m=f.align,h=f.sign,v=f.symbol,w=f.zero,y=f.width,b=f.comma,$=f.precision,S=f.trim,x=f.type;x==="n"?(b=!0,x="g"):Ph[x]||($===void 0&&($=12),S=!0,x="g"),(w||p==="0"&&m==="=")&&(w=!0,p="0",m="=");var T=v==="$"?n:v==="#"&&/[boxX]/.test(x)?"0"+x.toLowerCase():"",O=v==="$"?r:/[%p]/.test(x)?a:"",P=Ph[x],_=/[defgprs%]/.test(x);$=$===void 0?6:/[gprs]/.test(x)?Math.max(1,Math.min(21,$)):Math.max(0,Math.min(20,$));function j(F){var V=T,R=O,X,C,L;if(x==="c")R=P(F)+R,F="";else{F=+F;var H=F<0||1/F<0;if(F=isNaN(F)?l:P(Math.abs(F),$),S&&(F=S2(F)),H&&+F==0&&h!=="+"&&(H=!1),V=(H?h==="("?h:s:h==="-"||h==="("?"":h)+V,R=(x==="s"?Oh[8+Eh/3]:"")+R+(H&&h==="("?")":""),_){for(X=-1,C=F.length;++X<C;)if(L=F.charCodeAt(X),48>L||L>57){R=(L===46?o+F.slice(X+1):F.slice(X))+R,F=F.slice(0,X);break}}}b&&!w&&(F=t(F,1/0));var W=V.length+F.length+R.length,D=W<y?new Array(y-W+1).join(p):"";switch(b&&w&&(F=t(D+F,D.length?y-R.length:1/0),D=""),m){case"<":F=V+F+R+D;break;case"=":F=V+D+F+R;break;case"^":F=D.slice(0,W=D.length>>1)+V+F+R+D.slice(W);break;default:F=D+V+F+R;break}return i(F)}return j.toString=function(){return f+""},j}function d(f,p){var m=c((f=Yr(f),f.type="f",f)),h=Math.max(-8,Math.min(8,Math.floor(ur(p)/3)))*3,v=Math.pow(10,-h),w=Oh[8+h/3];return function(y){return m(v*y)+w}}return{format:c,formatPrefix:d}}var Ei,Ti,_h;P2({thousands:",",grouping:[3],currency:["$",""]});function P2(e){return Ei=T2(e),Ti=Ei.format,_h=Ei.formatPrefix,Ei}function M2(e){return Math.max(0,-ur(Math.abs(e)))}function k2(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(ur(t)/3)))*3-ur(Math.abs(e)))}function O2(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,ur(t)-ur(e))+1}function Nh(e,t,n,r){var o=Os(e,t,n),i;switch(r=Yr(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(i=k2(o,a))&&(r.precision=i),_h(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(i=O2(o,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=i-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(i=M2(o))&&(r.precision=i-(r.type==="%")*2);break}}return Ti(r)}function cn(e){var t=e.domain;return e.ticks=function(n){var r=t();return ci(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var o=t();return Nh(o[0],o[o.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),o=0,i=r.length-1,a=r[o],s=r[i],l,c,d=10;for(s<a&&(c=a,a=s,s=c,c=o,o=i,i=c);d-- >0;){if(c=ir(a,s,n),c===l)return r[o]=a,r[i]=s,t(r);if(c>0)a=Math.floor(a/c)*c,s=Math.ceil(s/c)*c;else if(c<0)a=Math.ceil(a*c)/c,s=Math.floor(s*c)/c;else break;l=c}return e},e}function Qs(){var e=Rs();return e.copy=function(){return qr(e,Qs())},ut.apply(e,arguments),cn(e)}function Dh(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,$i),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return Dh(e).unknown(t)},e=arguments.length?Array.from(e,$i):[0,1],cn(n)}function Ah(e,t){e=e.slice();var n=0,r=e.length-1,o=e[n],i=e[r],a;return i<o&&(a=n,n=r,r=a,a=o,o=i,i=a),e[n]=t.floor(o),e[r]=t.ceil(i),e}function Ih(e){return Math.log(e)}function Lh(e){return Math.exp(e)}function _2(e){return-Math.log(-e)}function N2(e){return-Math.exp(-e)}function D2(e){return isFinite(e)?+("1e"+e):e<0?0:e}function A2(e){return e===10?D2:e===Math.E?Math.exp:t=>Math.pow(e,t)}function I2(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 Fh(e){return(t,n)=>-e(-t,n)}function Js(e){const t=e(Ih,Lh),n=t.domain;let r=10,o,i;function a(){return o=I2(r),i=A2(r),n()[0]<0?(o=Fh(o),i=Fh(i),e(_2,N2)):e(Ih,Lh),t}return t.base=function(s){return arguments.length?(r=+s,a()):r},t.domain=function(s){return arguments.length?(n(s),a()):n()},t.ticks=s=>{const l=n();let c=l[0],d=l[l.length-1];const f=d<c;f&&([c,d]=[d,c]);let p=o(c),m=o(d),h,v;const w=s==null?10:+s;let y=[];if(!(r%1)&&m-p<w){if(p=Math.floor(p),m=Math.ceil(m),c>0){for(;p<=m;++p)for(h=1;h<r;++h)if(v=p<0?h/i(-p):h*i(p),!(v<c)){if(v>d)break;y.push(v)}}else for(;p<=m;++p)for(h=r-1;h>=1;--h)if(v=p>0?h/i(-p):h*i(p),!(v<c)){if(v>d)break;y.push(v)}y.length*2<w&&(y=ci(c,d,w))}else y=ci(p,m,Math.min(m-p,w)).map(i);return f?y.reverse():y},t.tickFormat=(s,l)=>{if(s==null&&(s=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=Yr(l)).precision==null&&(l.trim=!0),l=Ti(l)),s===1/0)return l;const c=Math.max(1,r*s/t.ticks().length);return d=>{let f=d/i(Math.round(o(d)));return f*r<r-.5&&(f*=r),f<=c?l(d):""}},t.nice=()=>n(Ah(n(),{floor:s=>i(Math.floor(o(s))),ceil:s=>i(Math.ceil(o(s)))})),t}function el(){const e=Js(Ci()).domain([1,10]);return e.copy=()=>qr(e,el()).base(e.base()),ut.apply(e,arguments),e}function jh(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function zh(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function tl(e){var t=1,n=e(jh(t),zh(t));return n.constant=function(r){return arguments.length?e(jh(t=+r),zh(t)):t},cn(n)}function nl(){var e=tl(Ci());return e.copy=function(){return qr(e,nl()).constant(e.constant())},ut.apply(e,arguments)}function Bh(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function L2(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function F2(e){return e<0?-e*e:e*e}function rl(e){var t=e(Ke,Ke),n=1;function r(){return n===1?e(Ke,Ke):n===.5?e(L2,F2):e(Bh(n),Bh(1/n))}return t.exponent=function(o){return arguments.length?(n=+o,r()):n},cn(t)}function Pi(){var e=rl(Ci());return e.copy=function(){return qr(e,Pi()).exponent(e.exponent())},ut.apply(e,arguments),e}function Wh(){return Pi.apply(null,arguments).exponent(.5)}function Uh(e){return Math.sign(e)*e*e}function j2(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function ol(){var e=Rs(),t=[0,1],n=!1,r;function o(i){var a=j2(e(i));return isNaN(a)?r:n?Math.round(a):a}return o.invert=function(i){return e.invert(Uh(i))},o.domain=function(i){return arguments.length?(e.domain(i),o):e.domain()},o.range=function(i){return arguments.length?(e.range((t=Array.from(i,$i)).map(Uh)),o):t.slice()},o.rangeRound=function(i){return o.range(i).round(!0)},o.round=function(i){return arguments.length?(n=!!i,o):n},o.clamp=function(i){return arguments.length?(e.clamp(i),o):e.clamp()},o.unknown=function(i){return arguments.length?(r=i,o):r},o.copy=function(){return ol(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},ut.apply(o,arguments),cn(o)}function il(){var e=[],t=[],n=[],r;function o(){var a=0,s=Math.max(1,t.length);for(n=new Array(s-1);++a<s;)n[a-1]=FE(e,a/s);return i}function i(a){return a==null||isNaN(a=+a)?r:t[or(n,a)]}return i.invertExtent=function(a){var s=t.indexOf(a);return s<0?[NaN,NaN]:[s>0?n[s-1]:e[0],s<n.length?n[s]:e[e.length-1]]},i.domain=function(a){if(!arguments.length)return e.slice();e=[];for(let s of a)s!=null&&!isNaN(s=+s)&&e.push(s);return e.sort(sn),o()},i.range=function(a){return arguments.length?(t=Array.from(a),o()):t.slice()},i.unknown=function(a){return arguments.length?(r=a,i):r},i.quantiles=function(){return n.slice()},i.copy=function(){return il().domain(e).range(t).unknown(r)},ut.apply(i,arguments)}function al(){var e=0,t=1,n=1,r=[.5],o=[0,1],i;function a(l){return l!=null&&l<=l?o[or(r,l,0,n)]:i}function s(){var l=-1;for(r=new Array(n);++l<n;)r[l]=((l+1)*t-(l-n)*e)/(n+1);return a}return a.domain=function(l){return arguments.length?([e,t]=l,e=+e,t=+t,s()):[e,t]},a.range=function(l){return arguments.length?(n=(o=Array.from(l)).length-1,s()):o.slice()},a.invertExtent=function(l){var c=o.indexOf(l);return c<0?[NaN,NaN]:c<1?[e,r[0]]:c>=n?[r[n-1],t]:[r[c-1],r[c]]},a.unknown=function(l){return arguments.length&&(i=l),a},a.thresholds=function(){return r.slice()},a.copy=function(){return al().domain([e,t]).range(o).unknown(i)},ut.apply(cn(a),arguments)}function sl(){var e=[.5],t=[0,1],n,r=1;function o(i){return i!=null&&i<=i?t[or(e,i,0,r)]:n}return o.domain=function(i){return arguments.length?(e=Array.from(i),r=Math.min(e.length,t.length-1),o):e.slice()},o.range=function(i){return arguments.length?(t=Array.from(i),r=Math.min(e.length,t.length-1),o):t.slice()},o.invertExtent=function(i){var a=t.indexOf(i);return[e[a-1],e[a]]},o.unknown=function(i){return arguments.length?(n=i,o):n},o.copy=function(){return sl().domain(e).range(t).unknown(n)},ut.apply(o,arguments)}const ll=new Date,cl=new Date;function Fe(e,t,n,r){function o(i){return e(i=arguments.length===0?new Date:new Date(+i)),i}return o.floor=i=>(e(i=new Date(+i)),i),o.ceil=i=>(e(i=new Date(i-1)),t(i,1),e(i),i),o.round=i=>{const a=o(i),s=o.ceil(i);return i-a<s-i?a:s},o.offset=(i,a)=>(t(i=new Date(+i),a==null?1:Math.floor(a)),i),o.range=(i,a,s)=>{const l=[];if(i=o.ceil(i),s=s==null?1:Math.floor(s),!(i<a)||!(s>0))return l;let c;do l.push(c=new Date(+i)),t(i,s),e(i);while(c<i&&i<a);return l},o.filter=i=>Fe(a=>{if(a>=a)for(;e(a),!i(a);)a.setTime(a-1)},(a,s)=>{if(a>=a)if(s<0)for(;++s<=0;)for(;t(a,-1),!i(a););else for(;--s>=0;)for(;t(a,1),!i(a););}),n&&(o.count=(i,a)=>(ll.setTime(+i),cl.setTime(+a),e(ll),e(cl),Math.floor(n(ll,cl))),o.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?o.filter(r?a=>r(a)%i===0:a=>o.count(0,a)%i===0):o)),o}const dr=Fe(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);dr.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Fe(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):dr);const Hh=dr.range,Ut=1e3,dt=Ut*60,Ht=dt*60,Gt=Ht*24,ul=Gt*7,Gh=Gt*30,dl=Gt*365,bt=Fe(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Ut)},(e,t)=>(t-e)/Ut,e=>e.getUTCSeconds()),Vh=bt.range,Kr=Fe(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ut)},(e,t)=>{e.setTime(+e+t*dt)},(e,t)=>(t-e)/dt,e=>e.getMinutes()),z2=Kr.range,Xr=Fe(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*dt)},(e,t)=>(t-e)/dt,e=>e.getUTCMinutes()),B2=Xr.range,Rr=Fe(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ut-e.getMinutes()*dt)},(e,t)=>{e.setTime(+e+t*Ht)},(e,t)=>(t-e)/Ht,e=>e.getHours()),W2=Rr.range,Zr=Fe(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Ht)},(e,t)=>(t-e)/Ht,e=>e.getUTCHours()),U2=Zr.range,_n=Fe(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*dt)/Gt,e=>e.getDate()-1),H2=_n.range,fr=Fe(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Gt,e=>e.getUTCDate()-1),G2=fr.range,fl=Fe(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Gt,e=>Math.floor(e/Gt)),V2=fl.range;function Nn(e){return Fe(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())*dt)/ul)}const Dn=Nn(0),Qr=Nn(1),qh=Nn(2),Yh=Nn(3),An=Nn(4),Kh=Nn(5),Xh=Nn(6),Rh=Dn.range,q2=Qr.range,Y2=qh.range,K2=Yh.range,X2=An.range,R2=Kh.range,Z2=Xh.range;function In(e){return Fe(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)/ul)}const Ln=In(0),Jr=In(1),Zh=In(2),Qh=In(3),Fn=In(4),Jh=In(5),em=In(6),tm=Ln.range,Q2=Jr.range,J2=Zh.range,eT=Qh.range,tT=Fn.range,nT=Jh.range,rT=em.range,eo=Fe(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()),oT=eo.range,to=Fe(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()),iT=to.range,wt=Fe(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());wt.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Fe(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)});const aT=wt.range,xt=Fe(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());xt.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Fe(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)});const sT=xt.range;function nm(e,t,n,r,o,i){const a=[[bt,1,Ut],[bt,5,5*Ut],[bt,15,15*Ut],[bt,30,30*Ut],[i,1,dt],[i,5,5*dt],[i,15,15*dt],[i,30,30*dt],[o,1,Ht],[o,3,3*Ht],[o,6,6*Ht],[o,12,12*Ht],[r,1,Gt],[r,2,2*Gt],[n,1,ul],[t,1,Gh],[t,3,3*Gh],[e,1,dl]];function s(c,d,f){const p=d<c;p&&([c,d]=[d,c]);const m=f&&typeof f.range=="function"?f:l(c,d,f),h=m?m.range(c,+d+1):[];return p?h.reverse():h}function l(c,d,f){const p=Math.abs(d-c)/f,m=Ms(([,,w])=>w).right(a,p);if(m===a.length)return e.every(Os(c/dl,d/dl,f));if(m===0)return dr.every(Math.max(Os(c,d,f),1));const[h,v]=a[p/a[m-1][2]<a[m][2]/p?m-1:m];return h.every(v)}return[s,l]}const[rm,om]=nm(xt,to,Ln,fl,Zr,Xr),[im,am]=nm(wt,eo,Dn,_n,Rr,Kr);function pl(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 hl(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 no(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function lT(e){var t=e.dateTime,n=e.date,r=e.time,o=e.periods,i=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,c=ro(o),d=oo(o),f=ro(i),p=oo(i),m=ro(a),h=oo(a),v=ro(s),w=oo(s),y=ro(l),b=oo(l),$={a:H,A:W,b:D,B:N,c:null,d:fm,e:fm,f:_T,g:WT,G:HT,H:MT,I:kT,j:OT,L:pm,m:NT,M:DT,p:z,q:J,Q:bm,s:wm,S:AT,u:IT,U:LT,V:FT,w:jT,W:zT,x:null,X:null,y:BT,Y:UT,Z:GT,"%":ym},S={a:Q,A:oe,b:te,B:ae,c:null,d:mm,e:mm,f:KT,g:oP,G:aP,H:VT,I:qT,j:YT,L:vm,m:XT,M:RT,p:Y,q:le,Q:bm,s:wm,S:ZT,u:QT,U:JT,V:eP,w:tP,W:nP,x:null,X:null,y:rP,Y:iP,Z:sP,"%":ym},x={a:j,A:F,b:V,B:R,c:X,d:um,e:um,f:ST,g:cm,G:lm,H:dm,I:dm,j:wT,L:CT,m:bT,M:xT,p:_,q:yT,Q:TT,s:PT,S:$T,u:pT,U:hT,V:mT,w:fT,W:vT,x:C,X:L,y:cm,Y:lm,Z:gT,"%":ET};$.x=T(n,$),$.X=T(r,$),$.c=T(t,$),S.x=T(n,S),S.X=T(r,S),S.c=T(t,S);function T(U,q){return function(re){var k=[],de=-1,pe=0,Ce=U.length,ke,je,_t;for(re instanceof Date||(re=new Date(+re));++de<Ce;)U.charCodeAt(de)===37&&(k.push(U.slice(pe,de)),(je=sm[ke=U.charAt(++de)])!=null?ke=U.charAt(++de):je=ke==="e"?" ":"0",(_t=q[ke])&&(ke=_t(re,je)),k.push(ke),pe=de+1);return k.push(U.slice(pe,de)),k.join("")}}function O(U,q){return function(re){var k=no(1900,void 0,1),de=P(k,U,re+="",0),pe,Ce;if(de!=re.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(q&&!("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?(pe=hl(no(k.y,0,1)),Ce=pe.getUTCDay(),pe=Ce>4||Ce===0?Jr.ceil(pe):Jr(pe),pe=fr.offset(pe,(k.V-1)*7),k.y=pe.getUTCFullYear(),k.m=pe.getUTCMonth(),k.d=pe.getUTCDate()+(k.w+6)%7):(pe=pl(no(k.y,0,1)),Ce=pe.getDay(),pe=Ce>4||Ce===0?Qr.ceil(pe):Qr(pe),pe=_n.offset(pe,(k.V-1)*7),k.y=pe.getFullYear(),k.m=pe.getMonth(),k.d=pe.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),Ce="Z"in k?hl(no(k.y,0,1)).getUTCDay():pl(no(k.y,0,1)).getDay(),k.m=0,k.d="W"in k?(k.w+6)%7+k.W*7-(Ce+5)%7:k.w+k.U*7-(Ce+6)%7);return"Z"in k?(k.H+=k.Z/100|0,k.M+=k.Z%100,hl(k)):pl(k)}}function P(U,q,re,k){for(var de=0,pe=q.length,Ce=re.length,ke,je;de<pe;){if(k>=Ce)return-1;if(ke=q.charCodeAt(de++),ke===37){if(ke=q.charAt(de++),je=x[ke in sm?q.charAt(de++):ke],!je||(k=je(U,re,k))<0)return-1}else if(ke!=re.charCodeAt(k++))return-1}return k}function _(U,q,re){var k=c.exec(q.slice(re));return k?(U.p=d.get(k[0].toLowerCase()),re+k[0].length):-1}function j(U,q,re){var k=m.exec(q.slice(re));return k?(U.w=h.get(k[0].toLowerCase()),re+k[0].length):-1}function F(U,q,re){var k=f.exec(q.slice(re));return k?(U.w=p.get(k[0].toLowerCase()),re+k[0].length):-1}function V(U,q,re){var k=y.exec(q.slice(re));return k?(U.m=b.get(k[0].toLowerCase()),re+k[0].length):-1}function R(U,q,re){var k=v.exec(q.slice(re));return k?(U.m=w.get(k[0].toLowerCase()),re+k[0].length):-1}function X(U,q,re){return P(U,t,q,re)}function C(U,q,re){return P(U,n,q,re)}function L(U,q,re){return P(U,r,q,re)}function H(U){return a[U.getDay()]}function W(U){return i[U.getDay()]}function D(U){return l[U.getMonth()]}function N(U){return s[U.getMonth()]}function z(U){return o[+(U.getHours()>=12)]}function J(U){return 1+~~(U.getMonth()/3)}function Q(U){return a[U.getUTCDay()]}function oe(U){return i[U.getUTCDay()]}function te(U){return l[U.getUTCMonth()]}function ae(U){return s[U.getUTCMonth()]}function Y(U){return o[+(U.getUTCHours()>=12)]}function le(U){return 1+~~(U.getUTCMonth()/3)}return{format:function(U){var q=T(U+="",$);return q.toString=function(){return U},q},parse:function(U){var q=O(U+="",!1);return q.toString=function(){return U},q},utcFormat:function(U){var q=T(U+="",S);return q.toString=function(){return U},q},utcParse:function(U){var q=O(U+="",!0);return q.toString=function(){return U},q}}}var sm={"-":"",_:" ",0:"0"},We=/^\s*\d+/,cT=/^%/,uT=/[\\^$*+?|[\]().{}]/g;function Se(e,t,n){var r=e<0?"-":"",o=(r?-e:e)+"",i=o.length;return r+(i<n?new Array(n-i+1).join(t)+o:o)}function dT(e){return e.replace(uT,"\\$&")}function ro(e){return new RegExp("^(?:"+e.map(dT).join("|")+")","i")}function oo(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function fT(e,t,n){var r=We.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function pT(e,t,n){var r=We.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function hT(e,t,n){var r=We.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function mT(e,t,n){var r=We.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function vT(e,t,n){var r=We.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function lm(e,t,n){var r=We.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function cm(e,t,n){var r=We.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function gT(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 yT(e,t,n){var r=We.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function bT(e,t,n){var r=We.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function um(e,t,n){var r=We.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function wT(e,t,n){var r=We.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function dm(e,t,n){var r=We.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function xT(e,t,n){var r=We.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function $T(e,t,n){var r=We.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function CT(e,t,n){var r=We.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function ST(e,t,n){var r=We.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function ET(e,t,n){var r=cT.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function TT(e,t,n){var r=We.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function PT(e,t,n){var r=We.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function fm(e,t){return Se(e.getDate(),t,2)}function MT(e,t){return Se(e.getHours(),t,2)}function kT(e,t){return Se(e.getHours()%12||12,t,2)}function OT(e,t){return Se(1+_n.count(wt(e),e),t,3)}function pm(e,t){return Se(e.getMilliseconds(),t,3)}function _T(e,t){return pm(e,t)+"000"}function NT(e,t){return Se(e.getMonth()+1,t,2)}function DT(e,t){return Se(e.getMinutes(),t,2)}function AT(e,t){return Se(e.getSeconds(),t,2)}function IT(e){var t=e.getDay();return t===0?7:t}function LT(e,t){return Se(Dn.count(wt(e)-1,e),t,2)}function hm(e){var t=e.getDay();return t>=4||t===0?An(e):An.ceil(e)}function FT(e,t){return e=hm(e),Se(An.count(wt(e),e)+(wt(e).getDay()===4),t,2)}function jT(e){return e.getDay()}function zT(e,t){return Se(Qr.count(wt(e)-1,e),t,2)}function BT(e,t){return Se(e.getFullYear()%100,t,2)}function WT(e,t){return e=hm(e),Se(e.getFullYear()%100,t,2)}function UT(e,t){return Se(e.getFullYear()%1e4,t,4)}function HT(e,t){var n=e.getDay();return e=n>=4||n===0?An(e):An.ceil(e),Se(e.getFullYear()%1e4,t,4)}function GT(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Se(t/60|0,"0",2)+Se(t%60,"0",2)}function mm(e,t){return Se(e.getUTCDate(),t,2)}function VT(e,t){return Se(e.getUTCHours(),t,2)}function qT(e,t){return Se(e.getUTCHours()%12||12,t,2)}function YT(e,t){return Se(1+fr.count(xt(e),e),t,3)}function vm(e,t){return Se(e.getUTCMilliseconds(),t,3)}function KT(e,t){return vm(e,t)+"000"}function XT(e,t){return Se(e.getUTCMonth()+1,t,2)}function RT(e,t){return Se(e.getUTCMinutes(),t,2)}function ZT(e,t){return Se(e.getUTCSeconds(),t,2)}function QT(e){var t=e.getUTCDay();return t===0?7:t}function JT(e,t){return Se(Ln.count(xt(e)-1,e),t,2)}function gm(e){var t=e.getUTCDay();return t>=4||t===0?Fn(e):Fn.ceil(e)}function eP(e,t){return e=gm(e),Se(Fn.count(xt(e),e)+(xt(e).getUTCDay()===4),t,2)}function tP(e){return e.getUTCDay()}function nP(e,t){return Se(Jr.count(xt(e)-1,e),t,2)}function rP(e,t){return Se(e.getUTCFullYear()%100,t,2)}function oP(e,t){return e=gm(e),Se(e.getUTCFullYear()%100,t,2)}function iP(e,t){return Se(e.getUTCFullYear()%1e4,t,4)}function aP(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Fn(e):Fn.ceil(e),Se(e.getUTCFullYear()%1e4,t,4)}function sP(){return"+0000"}function ym(){return"%"}function bm(e){return+e}function wm(e){return Math.floor(+e/1e3)}var pr,xm,$m;lP({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 lP(e){return pr=lT(e),xm=pr.format,pr.parse,$m=pr.utcFormat,pr.utcParse,pr}function cP(e){return new Date(e)}function uP(e){return e instanceof Date?+e:+new Date(+e)}function ml(e,t,n,r,o,i,a,s,l,c){var d=Rs(),f=d.invert,p=d.domain,m=c(".%L"),h=c(":%S"),v=c("%I:%M"),w=c("%I %p"),y=c("%a %d"),b=c("%b %d"),$=c("%B"),S=c("%Y");function x(T){return(l(T)<T?m:s(T)<T?h:a(T)<T?v:i(T)<T?w:r(T)<T?o(T)<T?y:b:n(T)<T?$:S)(T)}return d.invert=function(T){return new Date(f(T))},d.domain=function(T){return arguments.length?p(Array.from(T,uP)):p().map(cP)},d.ticks=function(T){var O=p();return e(O[0],O[O.length-1],T??10)},d.tickFormat=function(T,O){return O==null?x:c(O)},d.nice=function(T){var O=p();return(!T||typeof T.range!="function")&&(T=t(O[0],O[O.length-1],T??10)),T?p(Ah(O,T)):d},d.copy=function(){return qr(d,ml(e,t,n,r,o,i,a,s,l,c))},d}function Cm(){return ut.apply(ml(im,am,wt,eo,Dn,_n,Rr,Kr,bt,xm).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Sm(){return ut.apply(ml(rm,om,xt,to,Ln,fr,Zr,Xr,bt,$m).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Mi(){var e=0,t=1,n,r,o,i,a=Ke,s=!1,l;function c(f){return f==null||isNaN(f=+f)?l:a(o===0?.5:(f=(i(f)-n)*o,s?Math.max(0,Math.min(1,f)):f))}c.domain=function(f){return arguments.length?([e,t]=f,n=i(e=+e),r=i(t=+t),o=n===r?0:1/(r-n),c):[e,t]},c.clamp=function(f){return arguments.length?(s=!!f,c):s},c.interpolator=function(f){return arguments.length?(a=f,c):a};function d(f){return function(p){var m,h;return arguments.length?([m,h]=p,a=f(m,h),c):[a(0),a(1)]}}return c.range=d(On),c.rangeRound=d(Vr),c.unknown=function(f){return arguments.length?(l=f,c):l},function(f){return i=f,n=f(e),r=f(t),o=n===r?0:1/(r-n),c}}function un(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function Em(){var e=cn(Mi()(Ke));return e.copy=function(){return un(e,Em())},Bt.apply(e,arguments)}function Tm(){var e=Js(Mi()).domain([1,10]);return e.copy=function(){return un(e,Tm()).base(e.base())},Bt.apply(e,arguments)}function Pm(){var e=tl(Mi());return e.copy=function(){return un(e,Pm()).constant(e.constant())},Bt.apply(e,arguments)}function vl(){var e=rl(Mi());return e.copy=function(){return un(e,vl()).exponent(e.exponent())},Bt.apply(e,arguments)}function dP(){return vl.apply(null,arguments).exponent(.5)}function Mm(){var e=[],t=Ke;function n(r){if(r!=null&&!isNaN(r=+r))return t((or(e,r,1)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(let o of r)o!=null&&!isNaN(o=+o)&&e.push(o);return e.sort(sn),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.range=function(){return e.map((r,o)=>t(o/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(o,i)=>LE(e,i/r))},n.copy=function(){return Mm(t).domain(e)},Bt.apply(n,arguments)}function ki(){var e=0,t=.5,n=1,r=1,o,i,a,s,l,c=Ke,d,f=!1,p;function m(v){return isNaN(v=+v)?p:(v=.5+((v=+d(v))-i)*(r*v<r*i?s:l),c(f?Math.max(0,Math.min(1,v)):v))}m.domain=function(v){return arguments.length?([e,t,n]=v,o=d(e=+e),i=d(t=+t),a=d(n=+n),s=o===i?0:.5/(i-o),l=i===a?0:.5/(a-i),r=i<o?-1:1,m):[e,t,n]},m.clamp=function(v){return arguments.length?(f=!!v,m):f},m.interpolator=function(v){return arguments.length?(c=v,m):c};function h(v){return function(w){var y,b,$;return arguments.length?([y,b,$]=w,c=Ch(v,[y,b,$]),m):[c(0),c(.5),c(1)]}}return m.range=h(On),m.rangeRound=h(Vr),m.unknown=function(v){return arguments.length?(p=v,m):p},function(v){return d=v,o=v(e),i=v(t),a=v(n),s=o===i?0:.5/(i-o),l=i===a?0:.5/(a-i),r=i<o?-1:1,m}}function km(){var e=cn(ki()(Ke));return e.copy=function(){return un(e,km())},Bt.apply(e,arguments)}function Om(){var e=Js(ki()).domain([.1,1,10]);return e.copy=function(){return un(e,Om()).base(e.base())},Bt.apply(e,arguments)}function _m(){var e=tl(ki());return e.copy=function(){return un(e,_m()).constant(e.constant())},Bt.apply(e,arguments)}function gl(){var e=rl(ki());return e.copy=function(){return un(e,gl()).exponent(e.exponent())},Bt.apply(e,arguments)}function fP(){return gl.apply(null,arguments).exponent(.5)}const pP=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:di,scaleDiverging:km,scaleDivergingLog:Om,scaleDivergingPow:gl,scaleDivergingSqrt:fP,scaleDivergingSymlog:_m,scaleIdentity:Dh,scaleImplicit:Ns,scaleLinear:Qs,scaleLog:el,scaleOrdinal:ui,scalePoint:Op,scalePow:Pi,scaleQuantile:il,scaleQuantize:al,scaleRadial:ol,scaleSequential:Em,scaleSequentialLog:Tm,scaleSequentialPow:vl,scaleSequentialQuantile:Mm,scaleSequentialSqrt:dP,scaleSequentialSymlog:Pm,scaleSqrt:Wh,scaleSymlog:nl,scaleThreshold:sl,scaleTime:Cm,scaleUtc:Sm,tickFormat:Nh},Symbol.toStringTag,{value:"Module"}));function hP(e,t){t.domain&&("nice"in e||"quantiles"in e||"padding"in e,e.domain(t.domain))}function mP(e,t){t.range&&("padding"in e,e.range(t.range))}function vP(e,t){"align"in e&&"align"in t&&typeof t.align<"u"&&e.align(t.align)}function gP(e,t){"base"in e&&"base"in t&&typeof t.base<"u"&&e.base(t.base)}function yP(e,t){"clamp"in e&&"clamp"in t&&typeof t.clamp<"u"&&e.clamp(t.clamp)}function bP(e,t){"constant"in e&&"constant"in t&&typeof t.constant<"u"&&e.constant(t.constant)}function wP(e,t){"exponent"in e&&"exponent"in t&&typeof t.exponent<"u"&&e.exponent(t.exponent)}const xP=Object.freeze(Object.defineProperty({__proto__:null,interpolate:On,interpolateArray:n2,interpolateBasis:eh,interpolateBasisClosed:th,interpolateCubehelix:xh,interpolateCubehelixLong:$h,interpolateDate:ah,interpolateDiscrete:i2,interpolateHcl:yh,interpolateHclLong:bh,interpolateHsl:hh,interpolateHslLong:mh,interpolateHue:a2,interpolateLab:vh,interpolateNumber:yt,interpolateNumberArray:Vs,interpolateObject:sh,interpolateRgb:wi,interpolateRgbBasis:e2,interpolateRgbBasisClosed:t2,interpolateRound:Vr,interpolateString:lh,interpolateTransformCss:c2,interpolateTransformSvg:u2,interpolateZoom:h2,piecewise:Ch,quantize:m2},Symbol.toStringTag,{value:"Module"}));var Nm={lab:vh,hcl:yh,"hcl-long":bh,hsl:hh,"hsl-long":mh,cubehelix:xh,"cubehelix-long":$h,rgb:wi};function $P(e){switch(e){case"lab":case"hcl":case"hcl-long":case"hsl":case"hsl-long":case"cubehelix":case"cubehelix-long":case"rgb":return Nm[e]}var t=e.type,n=e.gamma,r=Nm[t];return typeof n>"u"?r:r.gamma(n)}function CP(e,t){if("interpolate"in t&&"interpolate"in e&&typeof t.interpolate<"u"){var n=$P(t.interpolate);e.interpolate(n)}}const SP=Object.freeze(Object.defineProperty({__proto__:null,timeDay:_n,timeDays:H2,timeFriday:Kh,timeFridays:R2,timeHour:Rr,timeHours:W2,timeInterval:Fe,timeMillisecond:dr,timeMilliseconds:Hh,timeMinute:Kr,timeMinutes:z2,timeMonday:Qr,timeMondays:q2,timeMonth:eo,timeMonths:oT,timeSaturday:Xh,timeSaturdays:Z2,timeSecond:bt,timeSeconds:Vh,timeSunday:Dn,timeSundays:Rh,timeThursday:An,timeThursdays:X2,timeTickInterval:am,timeTicks:im,timeTuesday:qh,timeTuesdays:Y2,timeWednesday:Yh,timeWednesdays:K2,timeWeek:Dn,timeWeeks:Rh,timeYear:wt,timeYears:aT,unixDay:fl,unixDays:V2,utcDay:fr,utcDays:G2,utcFriday:Jh,utcFridays:nT,utcHour:Zr,utcHours:U2,utcMillisecond:dr,utcMilliseconds:Hh,utcMinute:Xr,utcMinutes:B2,utcMonday:Jr,utcMondays:Q2,utcMonth:to,utcMonths:iT,utcSaturday:em,utcSaturdays:rT,utcSecond:bt,utcSeconds:Vh,utcSunday:Ln,utcSundays:tm,utcThursday:Fn,utcThursdays:tT,utcTickInterval:om,utcTicks:rm,utcTuesday:Zh,utcTuesdays:J2,utcWednesday:Qh,utcWednesdays:eT,utcWeek:Ln,utcWeeks:tm,utcYear:xt,utcYears:sT},Symbol.toStringTag,{value:"Module"}));var EP=new Date(Date.UTC(2020,1,2,3,4,5)),TP="%Y-%m-%d %H:%M";function Dm(e){var t=e.tickFormat(1,TP)(EP);return t==="2020-02-02 03:04"}var Am={day:_n,hour:Rr,minute:Kr,month:eo,second:bt,week:Dn,year:wt},Im={day:fr,hour:Zr,minute:Xr,month:to,second:bt,week:Ln,year:xt};function PP(e,t){if("nice"in t&&typeof t.nice<"u"&&"nice"in e){var n=t.nice;if(typeof n=="boolean")n&&e.nice();else if(typeof n=="number")e.nice(n);else{var r=e,o=Dm(r);if(typeof n=="string")r.nice(o?Im[n]:Am[n]);else{var i=n.interval,a=n.step,s=(o?Im[i]:Am[i]).every(a);s!=null&&r.nice(s)}}}}function MP(e,t){"padding"in e&&"padding"in t&&typeof t.padding<"u"&&e.padding(t.padding),"paddingInner"in e&&"paddingInner"in t&&typeof t.paddingInner<"u"&&e.paddingInner(t.paddingInner),"paddingOuter"in e&&"paddingOuter"in t&&typeof t.paddingOuter<"u"&&e.paddingOuter(t.paddingOuter)}function kP(e,t){if(t.reverse){var n=e.range().slice().reverse();"padding"in e,e.range(n)}}function OP(e,t){"round"in t&&typeof t.round<"u"&&(t.round&&"interpolate"in t&&typeof t.interpolate<"u"?console.warn("[visx/scale/applyRound] ignoring round: scale config contains round and interpolate. only applying interpolate. config:",t):"round"in e?e.round(t.round):"interpolate"in e&&t.round&&e.interpolate(Vr))}function _P(e,t){"unknown"in e&&"unknown"in t&&typeof t.unknown<"u"&&e.unknown(t.unknown)}function NP(e,t){if("zero"in t&&t.zero===!0){var n=e.domain(),r=n[0],o=n[1],i=o<r,a=i?[o,r]:[r,o],s=a[0],l=a[1],c=[Math.min(0,s),Math.max(0,l)];e.domain(i?c.reverse():c)}}var Lm=["domain","nice","zero","interpolate","round","range","reverse","align","base","clamp","constant","exponent","padding","unknown"],DP={domain:hP,nice:PP,zero:NP,interpolate:CP,round:OP,align:vP,base:gP,clamp:yP,constant:bP,exponent:wP,padding:MP,range:mP,reverse:kP,unknown:_P};function Xe(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=new Set(t),o=Lm.filter(function(i){return r.has(i)});return function(a,s){return typeof s<"u"&&o.forEach(function(l){DP[l](a,s)}),a}}var AP=Xe("domain","range","reverse","align","padding","round");function Fm(e){return AP(di(),e)}var IP=Xe("domain","range","reverse","align","padding","round");function jm(e){return IP(Op(),e)}var LP=Xe("domain","range","reverse","clamp","interpolate","nice","round","zero");function io(e){return LP(Qs(),e)}var FP=Xe("domain","range","clamp","nice","round","unknown");function jP(e){return FP(ol(),e)}var zP=Xe("domain","range","reverse","clamp","interpolate","nice","round");function zm(e){return zP(Cm(),e)}var BP=Xe("domain","range","reverse","clamp","interpolate","nice","round");function Bm(e){return BP(Sm(),e)}var WP=Xe("domain","range","reverse","base","clamp","interpolate","nice","round");function Wm(e){return WP(el(),e)}var UP=Xe("domain","range","reverse","clamp","exponent","interpolate","nice","round","zero");function Um(e){return UP(Pi(),e)}var HP=Xe("domain","range","reverse","unknown");function Hm(e){return HP(ui(),e)}var GP=Xe("domain","range","reverse","nice","zero");function Gm(e){return GP(al(),e)}var VP=Xe("domain","range","reverse");function Vm(e){return VP(il(),e)}var qP=Xe("domain","range","reverse","clamp","constant","nice","zero","round");function qm(e){return qP(nl(),e)}var YP=Xe("domain","range","reverse");function Ym(e){return YP(sl(),e)}var KP=Xe("domain","range","reverse","clamp","interpolate","nice","round","zero");function Km(e){return KP(Wh(),e)}function ao(e){if(typeof e<"u"&&"type"in e)switch(e.type){case"linear":return io(e);case"log":return Wm(e);case"pow":return Um(e);case"sqrt":return Km(e);case"symlog":return qm(e);case"time":return zm(e);case"utc":return Bm(e);case"quantile":return Vm(e);case"quantize":return Gm(e);case"threshold":return Ym(e);case"ordinal":return Hm(e);case"point":return jm(e);case"band":return Fm(e)}return io(e)}var XP=Xe.apply(void 0,Lm);function RP(e,t){return XP(e.copy(),t)}function ZP(e){return"paddingInner"in e?"band":"padding"in e?"point":"quantiles"in e?"quantile":"base"in e?"log":"exponent"in e?e.exponent()===.5?"sqrt":"pow":"constant"in e?"symlog":"clamp"in e?e.ticks()[0]instanceof Date?Dm(e)?"utc":"time":"linear":"nice"in e?"quantize":"invertExtent"in e?"threshold":"ordinal"}function yl(e){if((typeof e=="function"||typeof e=="object"&&e)&&"valueOf"in e){var t=e.valueOf();if(typeof t=="number")return t}return e}function bl(e,t){var n=e;return"ticks"in n?n.ticks(t):n.domain().filter(function(r,o,i){return t==null||i.length<=t||o%Math.round((i.length-1)/t)===0})}function Xm(e){return e==null?void 0:e.toString()}var QP=new Set(["linear","pow","quantize","sqrt","symlog"]);function wl(e){return QP.has(e.type)}const JP=Object.freeze(Object.defineProperty({__proto__:null,coerceNumber:yl,createScale:ao,getTicks:bl,inferScaleType:ZP,scaleBand:Fm,scaleCanBeZeroed:wl,scaleLinear:io,scaleLog:Wm,scaleOrdinal:Hm,scalePoint:jm,scalePower:Um,scaleQuantile:Vm,scaleQuantize:Gm,scaleRadial:jP,scaleSqrt:Km,scaleSymlog:qm,scaleThreshold:Ym,scaleTime:zm,scaleUtc:Bm,toString:Xm,updateScale:RP},Symbol.toStringTag,{value:"Module"}));var eM=u.createContext({});const Ot=eM;function xl(e){var t,n=e;return n&&"bandwidth"in n&&(t=n==null?void 0:n.bandwidth())!=null?t:0}function ft(e){return e!=null&&typeof e=="number"&&!Number.isNaN(e)&&Number.isFinite(e)}const Rm=Jn(H1),Zm=Jn(JP);var $l=Math.PI,Cl=2*$l,jn=1e-6,tM=Cl-jn;function Sl(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function El(){return new Sl}Sl.prototype=El.prototype={constructor:Sl,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,n,r){this._+="Q"+ +e+","+ +t+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(e,t,n,r,o,i){this._+="C"+ +e+","+ +t+","+ +n+","+ +r+","+(this._x1=+o)+","+(this._y1=+i)},arcTo:function(e,t,n,r,o){e=+e,t=+t,n=+n,r=+r,o=+o;var i=this._x1,a=this._y1,s=n-e,l=r-t,c=i-e,d=a-t,f=c*c+d*d;if(o<0)throw new Error("negative radius: "+o);if(this._x1===null)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(f>jn)if(!(Math.abs(d*s-l*c)>jn)||!o)this._+="L"+(this._x1=e)+","+(this._y1=t);else{var p=n-i,m=r-a,h=s*s+l*l,v=p*p+m*m,w=Math.sqrt(h),y=Math.sqrt(f),b=o*Math.tan(($l-Math.acos((h+f-v)/(2*w*y)))/2),$=b/y,S=b/w;Math.abs($-1)>jn&&(this._+="L"+(e+$*c)+","+(t+$*d)),this._+="A"+o+","+o+",0,0,"+ +(d*p>c*m)+","+(this._x1=e+S*s)+","+(this._y1=t+S*l)}},arc:function(e,t,n,r,o,i){e=+e,t=+t,n=+n,i=!!i;var a=n*Math.cos(r),s=n*Math.sin(r),l=e+a,c=t+s,d=1^i,f=i?r-o:o-r;if(n<0)throw new Error("negative radius: "+n);this._x1===null?this._+="M"+l+","+c:(Math.abs(this._x1-l)>jn||Math.abs(this._y1-c)>jn)&&(this._+="L"+l+","+c),n&&(f<0&&(f=f%Cl+Cl),f>tM?this._+="A"+n+","+n+",0,1,"+d+","+(e-a)+","+(t-s)+"A"+n+","+n+",0,1,"+d+","+(this._x1=l)+","+(this._y1=c):f>jn&&(this._+="A"+n+","+n+",0,"+ +(f>=$l)+","+d+","+(this._x1=e+n*Math.cos(o))+","+(this._y1=t+n*Math.sin(o))))},rect:function(e,t,n,r){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};function hr(e){return function(){return e}}function Qm(e){this._context=e}Qm.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 nM(e){return new Qm(e)}function Jm(e){return e[0]}function ev(e){return e[1]}function rM(){var e=Jm,t=ev,n=hr(!0),r=null,o=nM,i=null;function a(s){var l,c=s.length,d,f=!1,p;for(r==null&&(i=o(p=El())),l=0;l<=c;++l)!(l<c&&n(d=s[l],l,s))===f&&((f=!f)?i.lineStart():i.lineEnd()),f&&i.point(+e(d,l,s),+t(d,l,s));if(p)return i=null,p+""||null}return a.x=function(s){return arguments.length?(e=typeof s=="function"?s:hr(+s),a):e},a.y=function(s){return arguments.length?(t=typeof s=="function"?s:hr(+s),a):t},a.defined=function(s){return arguments.length?(n=typeof s=="function"?s:hr(!!s),a):n},a.curve=function(s){return arguments.length?(o=s,r!=null&&(i=o(r)),a):o},a.context=function(s){return arguments.length?(s==null?r=i=null:i=o(r=s),a):r},a}var oM=Array.prototype.slice;function iM(e){return e.source}function aM(e){return e.target}function sM(e){var t=iM,n=aM,r=Jm,o=ev,i=null;function a(){var s,l=oM.call(arguments),c=t.apply(this,l),d=n.apply(this,l);if(i||(i=s=El()),e(i,+r.apply(this,(l[0]=c,l)),+o.apply(this,l),+r.apply(this,(l[0]=d,l)),+o.apply(this,l)),s)return i=null,s+""||null}return a.source=function(s){return arguments.length?(t=s,a):t},a.target=function(s){return arguments.length?(n=s,a):n},a.x=function(s){return arguments.length?(r=typeof s=="function"?s:hr(+s),a):r},a.y=function(s){return arguments.length?(o=typeof s=="function"?s:hr(+s),a):o},a.context=function(s){return arguments.length?(i=s??null,a):i},a}function lM(e,t,n,r,o){e.moveTo(t,n),e.bezierCurveTo(t=(t+r)/2,n,t,o,r,o)}function cM(){return sM(lM)}function tv(e,t){e(t)}function uM(e){var t=e===void 0?{}:e,n=t.x,r=t.y,o=t.defined,i=t.curve,a=rM();return n&&tv(a.x,n),r&&tv(a.y,r),o&&a.defined(o),i&&a.curve(i),a}var dM=["from","to","fill","className","innerRef"];function Tl(){return Tl=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},Tl.apply(this,arguments)}function fM(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function nv(e){var t=e.from,n=t===void 0?{x:0,y:0}:t,r=e.to,o=r===void 0?{x:1,y:1}:r,i=e.fill,a=i===void 0?"transparent":i,s=e.className,l=e.innerRef,c=fM(e,dM),d=n.x===o.x||n.y===o.y;return u.createElement("line",Tl({ref:l,className:et("visx-line",s),x1:n.x,y1:n.y,x2:o.x,y2:o.y,fill:a,shapeRendering:d?"crispEdges":"auto"},c))}var pM=["children","data","x","y","fill","className","curve","innerRef","defined"];function Pl(){return Pl=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},Pl.apply(this,arguments)}function hM(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function mM(e){var t=e.children,n=e.data,r=n===void 0?[]:n,o=e.x,i=e.y,a=e.fill,s=a===void 0?"transparent":a,l=e.className,c=e.curve,d=e.innerRef,f=e.defined,p=f===void 0?function(){return!0}:f,m=hM(e,pM),h=uM({x:o,y:i,defined:p,curve:c});return t?u.createElement(u.Fragment,null,t({path:h})):u.createElement("path",Pl({ref:d,className:et("visx-linepath",l),d:h(r)||"",fill:s,strokeLinecap:"round"},m))}var vM=["className","innerRef"];function Ml(){return Ml=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},Ml.apply(this,arguments)}function gM(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function yM(e){var t=e.className,n=e.innerRef,r=gM(e,vM);return u.createElement("rect",Ml({ref:n,className:et("visx-bar",t)},r))}var bM=["children","className","innerRef","x","y","width","height","radius","all","top","bottom","left","right","topLeft","topRight","bottomLeft","bottomRight"];function kl(){return kl=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},kl.apply(this,arguments)}function wM(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function xM(e){var t=e.all,n=e.bottom,r=e.bottomLeft,o=e.bottomRight,i=e.height,a=e.left,s=e.radius,l=e.right,c=e.top,d=e.topLeft,f=e.topRight,p=e.width,m=e.x,h=e.y;f=t||c||l||f,o=t||n||l||o,r=t||n||a||r,d=t||c||a||d,s=Math.max(1,Math.min(s,Math.min(p,i)/2));var v=2*s,w=("M"+(m+s)+","+h+" h"+(p-v)+`
|
|
65
65
|
`+(f?"a"+s+","+s+" 0 0 1 "+s+","+s:"h"+s+"v"+s)+`
|
|
66
66
|
v`+(i-v)+`
|
|
67
67
|
`+(o?"a"+s+","+s+" 0 0 1 "+-s+","+s:"v"+s+"h"+-s)+`
|
|
@@ -70,17 +70,17 @@ Valid keys: `+JSON.stringify(Object.keys(N),null," "));var k=re(Y,q,oe,te,ae+".
|
|
|
70
70
|
v`+(v-i)+`
|
|
71
71
|
`+(d?"a"+s+","+s+" 0 0 1 "+s+","+-s:"v"+-s+"h"+s)+`
|
|
72
72
|
z`).split(`
|
|
73
|
-
`).join("");return x}function vM(e){var t=e.children,n=e.className,r=e.innerRef,o=e.x,i=e.y,a=e.width,s=e.height,l=e.radius,c=e.all,d=c===void 0?!1:c,f=e.top,p=f===void 0?!1:f,m=e.bottom,h=m===void 0?!1:m,v=e.left,x=v===void 0?!1:v,y=e.right,b=y===void 0?!1:y,$=e.topLeft,S=$===void 0?!1:$,w=e.topRight,T=w===void 0?!1:w,O=e.bottomLeft,P=O===void 0?!1:O,_=e.bottomRight,j=_===void 0?!1:_,F=hM(e,pM),V=mM({x:o,y:i,width:a,height:s,radius:l,all:d,top:p,bottom:h,left:x,right:b,topLeft:S,topRight:T,bottomLeft:P,bottomRight:j});return t?u.createElement(u.Fragment,null,t({path:V})):u.createElement("path",$l({ref:r,className:et("visx-bar-rounded",n),d:V},F))}function gM(e){return typeof(e==null?void 0:e.x)=="number"?e==null?void 0:e.x:0}function yM(e){return typeof(e==null?void 0:e.y)=="number"?e==null?void 0:e.y:0}function bM(e){return e==null?void 0:e.source}function xM(e){return e==null?void 0:e.target}var wM=["className","children","data","innerRef","path","x","y","source","target"];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 $M(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function CM(e){var t=e.source,n=e.target,r=e.x,o=e.y;return function(i){var a=rM();return a.x(r),a.y(o),a.source(t),a.target(n),a(i)}}function SM(e){var t=e.className,n=e.children,r=e.data,o=e.innerRef,i=e.path,a=e.x,s=a===void 0?yM:a,l=e.y,c=l===void 0?gM:l,d=e.source,f=d===void 0?bM:d,p=e.target,m=p===void 0?xM:p,h=$M(e,wM),v=i||CM({source:f,target:m,x:s,y:c});return n?u.createElement(u.Fragment,null,n({path:v})):u.createElement("path",Cl({ref:o,className:et("visx-link visx-link-horizontal-diagonal",t),d:v(r)||""},h))}var EM=["AxisComponent"];function ki(){return ki=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},ki.apply(this,arguments)}function TM(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function PM(e){var t,n,r,o,i,a,s,l=e.AxisComponent,c=TM(e,EM),d=u.useContext(Ot),f=d.theme,p=d.xScale,m=d.yScale,h=d.margin,v=d.width,x=d.height,y=c.orientation,b=u.useMemo(function(){var P,_,j,F;return y==="left"||y==="right"?f==null||(P=f.axisStyles)==null||(_=P.y)==null?void 0:_[y]:f==null||(j=f.axisStyles)==null||(F=j.x)==null?void 0:F[y]},[f,y]),$=c.tickLabelProps,S=u.useMemo(function(){return $||b?function(P,_,j){return ki({},b==null?void 0:b.tickLabel,{width:y==="left"||y==="right"?h==null?void 0:h[y]:void 0},typeof $=="function"?$(P,_,j):$)}:void 0},[$,b,y,h]),w=y==="bottom"?(x??0)-((t=h==null?void 0:h.bottom)!=null?t:0):y==="top"&&(n=h==null?void 0:h.top)!=null?n:0,T=y==="left"?(r=h==null?void 0:h.left)!=null?r:0:y==="right"?(v??0)-((o=h==null?void 0:h.right)!=null?o:0):0,O=y==="left"||y==="right"?m:p;return O?u.createElement(l,ki({top:w,left:T,labelProps:b==null?void 0:b.axisLabel,stroke:b==null||(i=b.axisLine)==null?void 0:i.stroke,strokeWidth:b==null||(a=b.axisLine)==null?void 0:a.strokeWidth,tickLength:b==null?void 0:b.tickLength,tickStroke:b==null||(s=b.tickLine)==null?void 0:s.stroke},c,{tickLabelProps:S,scale:O})):null}var Oi={};Oi.__esModule=!0;var MM=Oi.default=AM,kM=Jm(u),OM=Jm(Qo),_M=["from","to","fill","className","innerRef"];function Jm(e){return e&&e.__esModule?e:{default:e}}function Sl(){return Sl=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},Sl.apply(this,arguments)}function NM(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function AM(e){var t=e.from,n=t===void 0?{x:0,y:0}:t,r=e.to,o=r===void 0?{x:1,y:1}:r,i=e.fill,a=i===void 0?"transparent":i,s=e.className,l=e.innerRef,c=NM(e,_M),d=n.x===o.x||n.y===o.y;return kM.default.createElement("line",Sl({ref:l,className:(0,OM.default)("visx-line",s),x1:n.x,y1:n.y,x2:o.x,y2:o.y,fill:a,shapeRendering:d?"crispEdges":"auto"},c))}var _i={};_i.__esModule=!0,_i.default=DM;function DM(e){return"bandwidth"in e?e.bandwidth():0}var IM=ov,ev=ao(Zo),tv=ao(u),LM=ao(Qo),FM=ao(Oi),jM=qm,nv=gp,rv=Ym,zM=ao(_i),WM=["top","left","scale","width","stroke","strokeWidth","strokeDasharray","className","children","numTicks","lineStyle","offset","tickValues"];function ao(e){return e&&e.__esModule?e:{default:e}}function El(){return El=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},El.apply(this,arguments)}function BM(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function ov(e){var t=e.top,n=t===void 0?0:t,r=e.left,o=r===void 0?0:r,i=e.scale,a=e.width,s=e.stroke,l=s===void 0?"#eaf0f6":s,c=e.strokeWidth,d=c===void 0?1:c,f=e.strokeDasharray,p=e.className,m=e.children,h=e.numTicks,v=h===void 0?10:h,x=e.lineStyle,y=e.offset,b=e.tickValues,$=BM(e,WM),S=b??(0,rv.getTicks)(i,v),w=(y??0)+(0,zM.default)(i)/2,T=S.map(function(O,P){var _,j=((_=(0,rv.coerceNumber)(i(O)))!=null?_:0)+w;return{index:P,from:new nv.Point({x:0,y:j}),to:new nv.Point({x:a,y:j})}});return tv.default.createElement(jM.Group,{className:(0,LM.default)("visx-rows",p),top:n,left:o},m?m({lines:T}):T.map(function(O){var P=O.from,_=O.to,j=O.index;return tv.default.createElement(FM.default,El({key:"row-line-"+j,from:P,to:_,stroke:l,strokeWidth:d,strokeDasharray:f,style:x},$))}))}ov.propTypes={tickValues:ev.default.array,width:ev.default.number.isRequired};var UM=cv,iv=so(Zo),av=so(u),HM=so(Qo),GM=so(Oi),VM=qm,sv=gp,lv=Ym,qM=so(_i),YM=["top","left","scale","height","stroke","strokeWidth","strokeDasharray","className","numTicks","lineStyle","offset","tickValues","children"];function so(e){return e&&e.__esModule?e:{default:e}}function Tl(){return Tl=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},Tl.apply(this,arguments)}function KM(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function cv(e){var t=e.top,n=t===void 0?0:t,r=e.left,o=r===void 0?0:r,i=e.scale,a=e.height,s=e.stroke,l=s===void 0?"#eaf0f6":s,c=e.strokeWidth,d=c===void 0?1:c,f=e.strokeDasharray,p=e.className,m=e.numTicks,h=m===void 0?10:m,v=e.lineStyle,x=e.offset,y=e.tickValues,b=e.children,$=KM(e,YM),S=y??(0,lv.getTicks)(i,h),w=(x??0)+(0,qM.default)(i)/2,T=S.map(function(O,P){var _,j=((_=(0,lv.coerceNumber)(i(O)))!=null?_:0)+w;return{index:P,from:new sv.Point({x:j,y:0}),to:new sv.Point({x:j,y:a})}});return av.default.createElement(VM.Group,{className:(0,HM.default)("visx-columns",p),top:n,left:o},b?b({lines:T}):T.map(function(O){var P=O.from,_=O.to,j=O.index;return av.default.createElement(GM.default,Tl({key:"column-line-"+j,from:P,to:_,stroke:l,strokeWidth:d,strokeDasharray:f,style:v},$))}))}cv.propTypes={tickValues:iv.default.array,height:iv.default.number.isRequired};var XM=["rows","columns","GridRowsComponent","GridColumnsComponent"];function Ni(){return Ni=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},Ni.apply(this,arguments)}function RM(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function uv(e){var t=e.rows,n=t===void 0?!0:t,r=e.columns,o=r===void 0?!0:r,i=e.GridRowsComponent,a=e.GridColumnsComponent,s=RM(e,XM),l=u.useContext(Ot),c=l.theme,d=l.xScale,f=l.yScale,p=l.margin,m=l.innerWidth,h=l.innerHeight,v=c==null?void 0:c.gridStyles;return u.createElement(u.Fragment,null,n&&f&&m!=null&&u.createElement(i,Ni({left:p==null?void 0:p.left,lineStyle:v,width:m,scale:f},s)),o&&d&&h!=null&&u.createElement(a,Ni({top:p==null?void 0:p.top,lineStyle:v,height:h,scale:d},s)))}uv.propTypes={rows:ne.bool,columns:ne.bool};var ZM={top:"top",left:"left",right:"right",bottom:"bottom"};const $t=ZM;function QM(e){var t=e.labelOffset,n=e.labelProps,r=e.orientation,o=e.range,i=e.tickLabelFontSize,a=e.tickLength,s=r===$t.left||r===$t.top?-1:1,l,c,d;if(r===$t.top||r===$t.bottom){var f=r===$t.bottom&&typeof n.fontSize=="number"?n.fontSize:0;l=(Number(o[0])+Number(o[o.length-1]))/2,c=s*(a+t+i+f)}else l=s*((Number(o[0])+Number(o[o.length-1]))/2),c=-(a+t),d="rotate("+s*90+")";return{x:l,y:c,transform:d}}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 JM(e){var t=e.hideTicks,n=e.horizontal,r=e.orientation,o=e.tickClassName,i=e.tickComponent,a=e.tickLabelProps,s=e.tickStroke,l=s===void 0?"#222":s,c=e.tickTransform,d=e.ticks,f=e.strokeWidth,p=e.tickLineProps;return d.map(function(m){var h,v=m.value,x=m.index,y=m.from,b=m.to,$=m.formattedValue,S=(h=a[x])!=null?h:{},w=Math.max(10,typeof S.fontSize=="number"&&S.fontSize||0),T=b.y+(n&&r!==$t.top?w:0);return u.createElement(En,{key:"visx-tick-"+v+"-"+x,className:et("visx-axis-tick",o),transform:c},!t&&u.createElement(Qm,lo({from:y,to:b,stroke:l,strokeWidth:f,strokeLinecap:"square"},p)),i?i(lo({},S,{x:b.x,y:T,formattedValue:$})):u.createElement(ys,lo({x:b.x,y:T},S),$))})}function Ai(){return Ai=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},Ai.apply(this,arguments)}var dv={textAnchor:"middle",fontFamily:"Arial",fontSize:10,fill:"#222"};function ek(e){var t=e.axisFromPoint,n=e.axisLineClassName,r=e.axisToPoint,o=e.hideAxisLine,i=e.hideTicks,a=e.horizontal,s=e.label,l=s===void 0?"":s,c=e.labelClassName,d=e.labelOffset,f=d===void 0?14:d,p=e.labelProps,m=p===void 0?dv:p,h=e.orientation,v=h===void 0?$t.bottom:h,x=e.scale,y=e.stroke,b=y===void 0?"#222":y,$=e.strokeDasharray,S=e.strokeWidth,w=S===void 0?1:S,T=e.tickClassName,O=e.tickComponent,P=e.tickLineProps,_=e.tickLabelProps,j=e.tickLength,F=j===void 0?8:j,V=e.tickStroke,R=V===void 0?"#222":V,X=e.tickTransform,C=e.ticks,I=e.ticksComponent,H=I===void 0?JM:I,B=Ai({},dv,typeof _=="object"?_:null),A=C.map(function(z){var J=z.value,Q=z.index;return typeof _=="function"?_(J,Q,C):B}),N=Math.max.apply(Math,[10].concat(A.map(function(z){return typeof z.fontSize=="number"?z.fontSize:0})));return u.createElement(u.Fragment,null,H({hideTicks:i,horizontal:a,orientation:v,scale:x,tickClassName:T,tickComponent:O,tickLabelProps:A,tickStroke:R,tickTransform:X,ticks:C,strokeWidth:w,tickLineProps:P}),!o&&u.createElement(Qm,{className:et("visx-axis-line",n),from:t,to:r,stroke:b,strokeWidth:w,strokeDasharray:$}),l&&u.createElement(ys,Ai({className:et("visx-axis-label",c)},QM({labelOffset:f,labelProps:m,orientation:v,range:x.range(),tickLabelFontSize:N,tickLength:F}),m),l))}function tk(e,t){t===void 0&&(t="center");var n=e;if(t!=="start"&&"bandwidth"in n){var r=n.bandwidth();return t==="center"&&(r/=2),n.round()&&(r=Math.round(r)),function(o){var i=n(o);return typeof i=="number"?i+r:i}}return e}function nk(e){var t=e;return"tickFormat"in t?t.tickFormat():Vm}function Di(e,t){var n=e.x,r=e.y;return new an(t?{x:n,y:r}:{x:r,y:n})}function Pl(){return Pl=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},Pl.apply(this,arguments)}var Ml=0;function rk(e){return e===void 0&&(e=Ml),typeof e=="number"?{start:e,end:e}:Pl({start:Ml,end:Ml},e)}var ok=["children","axisClassName","hideAxisLine","hideTicks","hideZero","left","numTicks","orientation","rangePadding","scale","tickFormat","tickLength","tickValues","top"];function kl(){return kl=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},kl.apply(this,arguments)}function ik(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function Ol(e){var t=e.children,n=t===void 0?ek:t,r=e.axisClassName,o=e.hideAxisLine,i=o===void 0?!1:o,a=e.hideTicks,s=a===void 0?!1:a,l=e.hideZero,c=l===void 0?!1:l,d=e.left,f=d===void 0?0:d,p=e.numTicks,m=p===void 0?10:p,h=e.orientation,v=h===void 0?$t.bottom:h,x=e.rangePadding,y=x===void 0?0:x,b=e.scale,$=e.tickFormat,S=e.tickLength,w=S===void 0?8:S,T=e.tickValues,O=e.top,P=O===void 0?0:O,_=ik(e,ok),j=$??nk(b),F=v===$t.left,V=v===$t.top,R=V||v===$t.bottom,X=tk(b),C=F||V?-1:1,I=b.range(),H=rk(y),B=Di({x:Number(I[0])+.5-H.start,y:0},R),A=Di({x:Number(I[I.length-1])+.5+H.end,y:0},R),N=(T??fl(b,m)).filter(function(J){return!c||J!==0&&J!=="0"}).map(function(J,Q){return{value:J,index:Q}}),z=N.map(function(J){var Q=J.value,oe=J.index,te=dl(X(Q));return{value:Q,index:oe,from:Di({x:te,y:0},R),to:Di({x:te,y:w*C},R),formattedValue:j(Q,oe,N)}});return u.createElement(En,{className:et("visx-axis",r),top:P,left:f},n(kl({},_,{axisFromPoint:B,axisToPoint:A,hideAxisLine:i,hideTicks:s,hideZero:c,horizontal:R,numTicks:m,orientation:v,rangePadding:y,scale:b,tickFormat:j,tickLength:w,tickPosition:X,tickSign:C,ticks:z})))}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 fv(e){return u.createElement(PM,_l({AxisComponent:Ol},e))}function Nl(){return Nl=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},Nl.apply(this,arguments)}function ak(e){return u.createElement(uv,Nl({GridRowsComponent:IM,GridColumnsComponent:UM},e))}var sk=["tooltipOpen"];function lk(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function Ii(){return Ii=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},Ii.apply(this,arguments)}function Al(e){var t=u.useState(Ii({tooltipOpen:!1},e)),n=t[0],r=t[1],o=u.useCallback(function(a){return r(typeof a=="function"?function(s){s.tooltipOpen;var l=lk(s,sk);return Ii({},a(l),{tooltipOpen:!0})}:{tooltipOpen:!0,tooltipLeft:a.tooltipLeft,tooltipTop:a.tooltipTop,tooltipData:a.tooltipData})},[r]),i=u.useCallback(function(){return r({tooltipOpen:!1,tooltipLeft:void 0,tooltipTop:void 0,tooltipData:void 0})},[r]);return{tooltipOpen:n.tooltipOpen,tooltipLeft:n.tooltipLeft,tooltipTop:n.tooltipTop,tooltipData:n.tooltipData,updateTooltip:r,showTooltip:o,hideTooltip:i}}function ck(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Dl(e,t)}function Dl(e,t){return Dl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},Dl(e,t)}var pv=function(e){ck(t,e);function t(){return e.apply(this,arguments)||this}var n=t.prototype;return n.componentWillUnmount=function(){this.node&&document.body&&(document.body.removeChild(this.node),delete this.node)},n.render=function(){return!this.node&&typeof document<"u"&&(this.node=document.createElement("div"),this.props.zIndex!=null&&(this.node.style.zIndex=""+this.props.zIndex),document.body.append(this.node)),this.node?At.createPortal(this.props.children,this.node):null},t}(u.PureComponent);pv.propTypes={zIndex:ne.oneOfType([ne.number,ne.string])};var uk=["className","top","left","offsetLeft","offsetTop","style","children","unstyled","applyPositionStyle"];function Li(){return Li=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},Li.apply(this,arguments)}function dk(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var Il={position:"absolute",backgroundColor:"white",color:"#666666",padding:".3rem .5rem",borderRadius:"3px",fontSize:"14px",boxShadow:"0 1px 2px rgba(33,33,33,0.2)",lineHeight:"1em",pointerEvents:"none"},Ll=u.forwardRef(function(e,t){var n=e.className,r=e.top,o=e.left,i=e.offsetLeft,a=i===void 0?10:i,s=e.offsetTop,l=s===void 0?10:s,c=e.style,d=c===void 0?Il:c,f=e.children,p=e.unstyled,m=p===void 0?!1:p,h=e.applyPositionStyle,v=h===void 0?!1:h,x=dk(e,uk);return u.createElement("div",Li({ref:t,className:et("visx-tooltip",n),style:Li({top:r==null||l==null?r:r+l,left:o==null||a==null?o:o+a},v&&{position:"absolute"},!m&&d)},x),f)});Ll.propTypes={children:ne.node,className:ne.string,left:ne.number,offsetLeft:ne.number,offsetTop:ne.number,top:ne.number,applyPositionStyle:ne.bool,unstyled:ne.bool},Ll.displayName="Tooltip";const hv=Ll;function Fl(){return Fl=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},Fl.apply(this,arguments)}function fk(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pk(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,jl(e,t)}function jl(e,t){return jl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},jl(e,t)}var mv={top:0,right:0,bottom:0,left:0,width:0,height:0};function hk(e){var t;return t=function(n){pk(r,n);function r(i){var a;return a=n.call(this,i)||this,a.state={rect:void 0,parentRect:void 0},a.nodeRef=u.createRef(),a.getRects=a.getRects.bind(fk(a)),a}var o=r.prototype;return o.componentDidMount=function(){var a,s=this;this.node=(a=this.nodeRef)!=null&&a.current?this.nodeRef.current:At.findDOMNode(this),this.setState(function(){return s.getRects()})},o.getRects=function(){if(!this.node)return this.state;var a=this.node,s=a.parentNode,l=a.getBoundingClientRect?a.getBoundingClientRect():mv,c=s!=null&&s.getBoundingClientRect?s.getBoundingClientRect():mv;return{rect:l,parentRect:c}},o.render=function(){return u.createElement(e,Fl({nodeRef:this.nodeRef,getRects:this.getRects},this.state,this.props))},r}(u.PureComponent),t.displayName="withBoundingRects("+(e.displayName||"")+")",t}var vv=u.createContext({isFlippedVertically:!1,isFlippedHorizontally:!1}),mk=vv.Provider;vv.Consumer;var vk=["children","getRects","left","offsetLeft","offsetTop","parentRect","rect","style","top","unstyled","nodeRef"];function Fi(){return Fi=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},Fi.apply(this,arguments)}function gk(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function gv(e){var t=e.children;e.getRects;var n=e.left,r=n===void 0?0:n,o=e.offsetLeft,i=o===void 0?10:o,a=e.offsetTop,s=a===void 0?10:a,l=e.parentRect,c=e.rect,d=e.style,f=d===void 0?Il:d,p=e.top,m=p===void 0?0:p,h=e.unstyled,v=h===void 0?!1:h,x=e.nodeRef,y=gk(e,vk),b,$=!1,S=!1;if(c&&l){var w=r,T=m;if(l.width){var O=w+i+c.width-l.width,P=c.width-w-i;$=O>0&&O>P}else{var _=w+i+c.width-window.innerWidth,j=c.width-w-i;$=_>0&&_>j}if(l.height){var F=T+s+c.height-l.height,V=c.height-T-s;S=F>0&&F>V}else S=T+s+c.height>window.innerHeight;w=$?w-c.width-i:w+i,T=S?T-c.height-s:T+s,w=Math.round(w),T=Math.round(T),b="translate("+w+"px, "+T+"px)"}return u.createElement(hv,Fi({ref:x,style:Fi({left:0,top:0,transform:b},!v&&f)},y),u.createElement(mk,{value:{isFlippedVertically:!S,isFlippedHorizontally:!$}},t))}gv.propTypes={nodeRef:ne.oneOfType([ne.string,ne.func,ne.object])};const yk=hk(gv);var bk=["detectBounds","zIndex"],xk=["left","top","detectBounds","zIndex"];function zl(){return zl=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},zl.apply(this,arguments)}function yv(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function Wl(e){var t=e===void 0?{}:e,n=t.detectBounds,r=n===void 0?!0:n,o=t.zIndex,i=yv(t,bk),a=RS(i),s=a[0],l=a[1],c=a[2],d=u.useState(!1),f=d[0],p=d[1];u.useEffect(function(){p(!1)},[]);var m=u.useMemo(function(){return function(h){var v=h.left,x=v===void 0?0:v,y=h.top,b=y===void 0?0:y,$=h.detectBounds,S=h.zIndex,w=yv(h,xk),T=$??r,O=S??o,P=T?yk:hv,_=f?0:window.scrollX,j=f?0:window.scrollY,F=x+(l.left||0)+_,V=b+(l.top||0)+j;return u.createElement(pv,{zIndex:O},u.createElement(P,zl({left:F,top:V},w)))}},[r,o,l.left,l.top,f]);return{containerRef:s,containerBounds:l,forceRefreshBounds:c,TooltipInPortal:m}}var wk=u.createContext(null);const co=wk;var $k=["debounce","detectBounds","horizontalCrosshairStyle","glyphStyle","renderTooltip","renderGlyph","resizeObserverPolyfill","scroll","showDatumGlyph","showHorizontalCrosshair","showSeriesGlyphs","showVerticalCrosshair","snapTooltipToDatumX","snapTooltipToDatumY","verticalCrosshairStyle","zIndex"],Ck=["x","y"];function bv(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function Vt(){return Vt=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},Vt.apply(this,arguments)}var Bl={position:"absolute",pointerEvents:"none",fontSize:0,lineHeight:0},Sk={position:"absolute",left:0,top:0,opacity:0,width:0,height:0,pointerEvents:"none"};function xv(e){var t=u.useContext(Ot)||{},n=t.theme;return u.createElement("circle",Vt({cx:e.x,cy:e.y,r:e.size,fill:e.color,stroke:n==null?void 0:n.backgroundColor,strokeWidth:1.5,paintOrder:"fill"},e.glyphStyle))}xv.propTypes={isNearestDatum:ne.bool.isRequired};function Ek(e){return u.createElement(xv,e)}function wv(e){var t,n,r,o,i,a,s,l,c,d,f,p,m,h=e.debounce,v=e.detectBounds,x=e.horizontalCrosshairStyle,y=e.glyphStyle,b=e.renderTooltip,$=e.renderGlyph,S=$===void 0?Ek:$,w=e.resizeObserverPolyfill,T=e.scroll,O=T===void 0?!0:T,P=e.showDatumGlyph,_=P===void 0?!1:P,j=e.showHorizontalCrosshair,F=j===void 0?!1:j,V=e.showSeriesGlyphs,R=V===void 0?!1:V,X=e.showVerticalCrosshair,C=X===void 0?!1:X,I=e.snapTooltipToDatumX,H=I===void 0?!1:I,B=e.snapTooltipToDatumY,A=B===void 0?!1:B,N=e.verticalCrosshairStyle,z=e.zIndex,J=bv(e,$k),Q=u.useContext(Ot)||{},oe=Q.colorScale,te=Q.theme,ae=Q.innerHeight,Y=Q.innerWidth,le=Q.margin,U=Q.xScale,q=Q.yScale,re=Q.dataRegistry,k=Q.resizeObserverPolyfill,de=u.useContext(co),pe=Wl({debounce:h,detectBounds:v,polyfill:k||w,scroll:O,zIndex:z}),Ce=pe.containerRef,ke=pe.TooltipInPortal,je=pe.forceRefreshBounds,_t=u.useCallback(function(Qe){var pt;Ce((pt=Qe==null?void 0:Qe.parentElement)!=null?pt:null)},[Ce]),mn=de!=null&&de.tooltipOpen?b(Vt({},de,{colorScale:oe})):null,Ze=(de==null?void 0:de.tooltipOpen)&&mn!=null,qt=u.useRef(!1);u.useEffect(function(){Ze&&!qt.current&&je(),qt.current=Ze},[Ze,je]);var yr=de==null?void 0:de.tooltipLeft,Le=de==null?void 0:de.tooltipTop,Ri=U?hl(U):0,Zi=q?hl(q):0,po=u.useCallback(function(Qe,pt){var Kt,Xt,lt=re==null?void 0:re.get(Qe),Bn=lt==null?void 0:lt.xAccessor,Un=lt==null?void 0:lt.yAccessor,xr=U&&Bn?(Kt=Number(U(Bn(pt)))+Ri/2)!=null?Kt:0:void 0,wr=q&&Un?(Xt=Number(q(Un(pt)))+Zi/2)!=null?Xt:0:void 0;return{left:xr,top:wr}},[re,Ri,Zi,U,q]),rt=de==null||(t=de.tooltipData)==null?void 0:t.nearestDatum,vn=(n=rt==null?void 0:rt.key)!=null?n:"";if(Ze&&rt&&(H||A)){var zn=po(vn,rt.datum),Wn=zn.left,ho=zn.top;yr=H&&ft(Wn)?Wn:yr,Le=A&&ft(ho)?ho:Le}var br=[];if(Ze&&(_||R)){var Qi,Ji=Number((Qi=y==null?void 0:y.radius)!=null?Qi:4);if(R){var mo,ea;Object.values((mo=de==null||(ea=de.tooltipData)==null?void 0:ea.datumByKey)!=null?mo:{}).forEach(function(Qe){var pt,Kt,Xt,lt=Qe.key,Bn=Qe.datum,Un=Qe.index,xr=(pt=(Kt=oe==null?void 0:oe(lt))!=null?Kt:te==null||(Xt=te.htmlLabel)==null?void 0:Xt.color)!=null?pt:"#222",wr=po(lt,Bn),ia=wr.left,aa=wr.top;!ft(ia)||!ft(aa)||br.push({key:lt,color:xr,datum:Bn,index:Un,size:Ji,x:ia,y:aa,glyphStyle:y,isNearestDatum:rt?rt.key===lt:!1})})}else if(rt){var ta=po(vn,rt.datum),Nt=ta.left,Yt=ta.top;if(ft(Nt)&&ft(Yt)){var vo,go,yo,na,ra,st,oa=(vo=(go=(yo=(na=vn&&(oe==null?void 0:oe(vn)))!=null?na:null)!=null?yo:te==null||(ra=te.gridStyles)==null?void 0:ra.stroke)!=null?go:te==null||(st=te.htmlLabel)==null?void 0:st.color)!=null?vo:"#222";br.push({key:vn,color:oa,datum:rt.datum,index:rt.index,size:Ji,x:Nt,y:Yt,glyphStyle:y,isNearestDatum:!0})}}}return u.createElement(u.Fragment,null,u.createElement("svg",{ref:_t,style:Sk}),Ze&&u.createElement(u.Fragment,null,C&&u.createElement(ke,{className:"visx-crosshair visx-crosshair-vertical",left:yr,top:le==null?void 0:le.top,offsetLeft:0,offsetTop:0,detectBounds:!1,style:Bl},u.createElement("svg",{width:"1",height:ae,overflow:"visible"},u.createElement("line",Vt({x1:0,x2:0,y1:0,y2:ae,strokeWidth:1.5,stroke:(r=(o=te==null||(i=te.gridStyles)==null?void 0:i.stroke)!=null?o:te==null||(a=te.htmlLabel)==null?void 0:a.color)!=null?r:"#222"},N)))),F&&u.createElement(ke,{className:"visx-crosshair visx-crosshair-horizontal",left:le==null?void 0:le.left,top:Le,offsetLeft:0,offsetTop:0,detectBounds:!1,style:Bl},u.createElement("svg",{width:Y,height:"1",overflow:"visible"},u.createElement("line",Vt({x1:0,x2:Y,y1:0,y2:0,strokeWidth:1.5,stroke:(s=(l=te==null||(c=te.gridStyles)==null?void 0:c.stroke)!=null?l:te==null||(d=te.htmlLabel)==null?void 0:d.color)!=null?s:"#222"},x)))),br.map(function(Qe,pt){var Kt=Qe.x,Xt=Qe.y,lt=bv(Qe,Ck);return u.createElement(ke,{key:pt,className:"visx-tooltip-glyph",left:Kt,top:Xt,offsetLeft:0,offsetTop:0,detectBounds:!1,style:Bl},u.createElement("svg",{overflow:"visible"},S(Vt({x:0,y:0},lt))))}),u.createElement(ke,Vt({left:yr,top:Le,style:Vt({},Il,{background:(f=te==null?void 0:te.backgroundColor)!=null?f:"white",boxShadow:"0 1px 2px "+(te!=null&&(p=te.htmlLabel)!=null&&p.color?(te==null||(m=te.htmlLabel)==null?void 0:m.color)+"55":"#22222255")},te==null?void 0:te.htmlLabel)},J),mn)))}wv.propTypes={renderTooltip:ne.func.isRequired,renderGlyph:ne.func,snapTooltipToDatumX:ne.bool,snapTooltipToDatumY:ne.bool,showVerticalCrosshair:ne.bool,showHorizontalCrosshair:ne.bool,showDatumGlyph:ne.bool,showSeriesGlyphs:ne.bool};function $v(e){var t=u.useContext(co);return t!=null&&t.tooltipOpen?u.createElement(wv,e):null}$v.propTypes={renderTooltip:ne.func.isRequired,renderGlyph:ne.func,snapTooltipToDatumX:ne.bool,snapTooltipToDatumY:ne.bool,showVerticalCrosshair:ne.bool,showHorizontalCrosshair:ne.bool,showDatumGlyph:ne.bool,showSeriesGlyphs:ne.bool};var Tk=ti,Pk=function(){return Tk.Date.now()},Mk=Pk,kk=/\s/;function Ok(e){for(var t=e.length;t--&&kk.test(e.charAt(t)););return t}var _k=Ok,Nk=_k,Ak=/^\s+/;function Dk(e){return e&&e.slice(0,Nk(e)+1).replace(Ak,"")}var Ik=Dk;function Lk(e){return e!=null&&typeof e=="object"}var Fk=Lk,jk=ap,zk=Fk,Wk="[object Symbol]";function Bk(e){return typeof e=="symbol"||zk(e)&&jk(e)==Wk}var Uk=Bk,Hk=Ik,Cv=ni,Gk=Uk,Sv=0/0,Vk=/^[-+]0x[0-9a-f]+$/i,qk=/^0b[01]+$/i,Yk=/^0o[0-7]+$/i,Kk=parseInt;function Xk(e){if(typeof e=="number")return e;if(Gk(e))return Sv;if(Cv(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Cv(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Hk(e);var n=qk.test(e);return n||Yk.test(e)?Kk(e.slice(2),n?2:8):Vk.test(e)?Sv:+e}var Rk=Xk,Zk=ni,Ul=Mk,Ev=Rk,Qk="Expected a function",Jk=Math.max,eO=Math.min;function tO(e,t,n){var r,o,i,a,s,l,c=0,d=!1,f=!1,p=!0;if(typeof e!="function")throw new TypeError(Qk);t=Ev(t)||0,Zk(n)&&(d=!!n.leading,f="maxWait"in n,i=f?Jk(Ev(n.maxWait)||0,t):i,p="trailing"in n?!!n.trailing:p);function m(T){var O=r,P=o;return r=o=void 0,c=T,a=e.apply(P,O),a}function h(T){return c=T,s=setTimeout(y,t),d?m(T):a}function v(T){var O=T-l,P=T-c,_=t-O;return f?eO(_,i-P):_}function x(T){var O=T-l,P=T-c;return l===void 0||O>=t||O<0||f&&P>=i}function y(){var T=Ul();if(x(T))return b(T);s=setTimeout(y,v(T))}function b(T){return s=void 0,p&&r?m(T):(r=o=void 0,a)}function $(){s!==void 0&&clearTimeout(s),c=0,r=l=o=s=void 0}function S(){return s===void 0?a:b(Ul())}function w(){var T=Ul(),O=x(T);if(r=arguments,o=this,l=T,O){if(s===void 0)return h(l);if(f)return clearTimeout(s),s=setTimeout(y,t),m(l)}return s===void 0&&(s=setTimeout(y,t)),a}return w.cancel=$,w.flush=S,w}var Tv=tO;const Pv=Qn(Tv);var nO=Ov,dn=kv(Zo),rO=kv(Tv),mr=iO(u),oO=["className","children","debounceTime","ignoreDimensions","parentSizeStyles","enableDebounceLeadingCall","resizeObserverPolyfill"];function Mv(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(Mv=function(o){return o?n:t})(e)}function iO(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=Mv(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}function kv(e){return e&&e.__esModule?e:{default:e}}function ji(){return ji=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},ji.apply(this,arguments)}function aO(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var sO=[],lO={width:"100%",height:"100%"};function Ov(e){var t=e.className,n=e.children,r=e.debounceTime,o=r===void 0?300:r,i=e.ignoreDimensions,a=i===void 0?sO:i,s=e.parentSizeStyles,l=s===void 0?lO:s,c=e.enableDebounceLeadingCall,d=c===void 0?!0:c,f=e.resizeObserverPolyfill,p=aO(e,oO),m=(0,mr.useRef)(null),h=(0,mr.useRef)(0),v=(0,mr.useState)({width:0,height:0,top:0,left:0}),x=v[0],y=v[1],b=(0,mr.useMemo)(function(){var $=Array.isArray(a)?a:[a];return(0,rO.default)(function(S){y(function(w){var T=Object.keys(w),O=T.filter(function(_){return w[_]!==S[_]}),P=O.every(function(_){return $.includes(_)});return P?w:S})},o,{leading:d})},[o,d,a]);return(0,mr.useEffect)(function(){var $=f||window.ResizeObserver,S=new $(function(w){w.forEach(function(T){var O,P=(O=T==null?void 0:T.contentRect)!=null?O:{},_=P.left,j=P.top,F=P.width,V=P.height;h.current=window.requestAnimationFrame(function(){b({width:F,height:V,top:j,left:_})})})});return m.current&&S.observe(m.current),function(){window.cancelAnimationFrame(h.current),S.disconnect(),b.cancel()}},[b,f]),mr.default.createElement("div",ji({style:l,ref:m,className:t},p),n(ji({},x,{ref:m.current,resize:b})))}Ov.propTypes={className:dn.default.string,debounceTime:dn.default.number,enableDebounceLeadingCall:dn.default.bool,ignoreDimensions:dn.default.oneOfType([dn.default.any,dn.default.arrayOf(dn.default.any)]),children:dn.default.func.isRequired};var cO=u.createContext(null);const _v=cO;function fn(e,t,n){var r=u.useContext(_v),o=u.useRef();o.current=n;var i=u.useCallback(function(a,s,l){r&&r.emit(a,{event:s,svgPoint:dE(s),source:l})},[r]);return u.useEffect(function(){if(r&&e&&t){var a=function(l){var c;(!o.current||l!=null&&l.source&&(c=o.current)!=null&&c.includes(l.source))&&t(l)};return r.on(e,a),function(){return r==null?void 0:r.off(e,a)}}},[r,e,t]),r?i:null}function uO(e){return{all:e=e||new Map,on:function(t,n){var r=e.get(t);r&&r.push(n)||e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&r.splice(r.indexOf(n)>>>0,1)},emit:function(t,n){(e.get(t)||[]).slice().map(function(r){r(n)}),(e.get("*")||[]).slice().map(function(r){r(t,n)})}}}function dO(e){var t=e.children,n=u.useMemo(function(){return uO()},[]);return u.createElement(_v.Provider,{value:n},t)}function Hl(){return Hl=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},Hl.apply(this,arguments)}function Nv(e){var t=e.hideTooltipDebounceMs,n=t===void 0?400:t,r=e.children,o=Al(void 0),i=o.tooltipOpen,a=o.tooltipLeft,s=o.tooltipTop,l=o.tooltipData,c=o.updateTooltip,d=o.hideTooltip,f=u.useRef(null);function p(){f.current&&(f.current.cancel(),f.current=null)}u.useEffect(function(){return p},[]);var m=u.useRef(function(x){var y=x.svgPoint,b=x.index,$=x.key,S=x.datum,w=x.distanceX,T=x.distanceY;p();var O=ft(w)?w:1/0,P=ft(T)?T:1/0,_=Math.sqrt(Math.pow(O,2)+Math.pow(P,2));c(function(j){var F,V,R,X=j.tooltipData,C=X!=null&&X.nearestDatum&&ft(X.nearestDatum.distance)?X.nearestDatum.distance:1/0;return{tooltipOpen:!0,tooltipLeft:y==null?void 0:y.x,tooltipTop:y==null?void 0:y.y,tooltipData:{nearestDatum:((F=X==null||(V=X.nearestDatum)==null?void 0:V.key)!=null?F:"")!==$&&C<_?X==null?void 0:X.nearestDatum:{key:$,index:b,datum:S,distance:_},datumByKey:Hl({},X==null?void 0:X.datumByKey,(R={},R[$]={datum:S,index:b,key:$},R))}}})}),h=u.useCallback(function(){f.current=Pv(d,n),f.current()},[d,n]),v=u.useMemo(function(){return{tooltipOpen:i,tooltipLeft:a,tooltipTop:s,tooltipData:l,updateTooltip:c,showTooltip:m.current,hideTooltip:h}},[h,l,a,i,s,c]);return u.createElement(co.Provider,{value:v},r)}Nv.propTypes={hideTooltipDebounceMs:ne.number,children:ne.node.isRequired};const fO=Jn(sP);var uo={},Gl={};Gl.__esModule=!0,Gl.default=pO;function pO(e,t){t.domain&&("nice"in e||"quantiles"in e||"padding"in e,e.domain(t.domain))}var Vl={};Vl.__esModule=!0,Vl.default=hO;function hO(e,t){t.range&&("padding"in e,e.range(t.range))}var ql={};ql.__esModule=!0,ql.default=mO;function mO(e,t){"align"in e&&"align"in t&&typeof t.align<"u"&&e.align(t.align)}var Yl={};Yl.__esModule=!0,Yl.default=vO;function vO(e,t){"base"in e&&"base"in t&&typeof t.base<"u"&&e.base(t.base)}var Kl={};Kl.__esModule=!0,Kl.default=gO;function gO(e,t){"clamp"in e&&"clamp"in t&&typeof t.clamp<"u"&&e.clamp(t.clamp)}var Xl={};Xl.__esModule=!0,Xl.default=yO;function yO(e,t){"constant"in e&&"constant"in t&&typeof t.constant<"u"&&e.constant(t.constant)}var Rl={};Rl.__esModule=!0,Rl.default=bO;function bO(e,t){"exponent"in e&&"exponent"in t&&typeof t.exponent<"u"&&e.exponent(t.exponent)}var Zl={},Ql={};const Av=Jn(mP);Ql.__esModule=!0,Ql.default=xO;var pn=Av,Dv={lab:pn.interpolateLab,hcl:pn.interpolateHcl,"hcl-long":pn.interpolateHclLong,hsl:pn.interpolateHsl,"hsl-long":pn.interpolateHslLong,cubehelix:pn.interpolateCubehelix,"cubehelix-long":pn.interpolateCubehelixLong,rgb:pn.interpolateRgb};function xO(e){switch(e){case"lab":case"hcl":case"hcl-long":case"hsl":case"hsl-long":case"cubehelix":case"cubehelix-long":case"rgb":return Dv[e]}var t=e.type,n=e.gamma,r=Dv[t];return typeof n>"u"?r:r.gamma(n)}Zl.__esModule=!0,Zl.default=CO;var wO=$O(Ql);function $O(e){return e&&e.__esModule?e:{default:e}}function CO(e,t){if("interpolate"in t&&"interpolate"in e&&typeof t.interpolate<"u"){var n=(0,wO.default)(t.interpolate);e.interpolate(n)}}var Jl={};const SO=Jn(yP);var ec={};ec.__esModule=!0,ec.default=PO;var EO=new Date(Date.UTC(2020,1,2,3,4,5)),TO="%Y-%m-%d %H:%M";function PO(e){var t=e.tickFormat(1,TO)(EO);return t==="2020-02-02 03:04"}Jl.__esModule=!0,Jl.default=OO;var tt=SO,MO=kO(ec);function kO(e){return e&&e.__esModule?e:{default:e}}var Iv={day:tt.timeDay,hour:tt.timeHour,minute:tt.timeMinute,month:tt.timeMonth,second:tt.timeSecond,week:tt.timeWeek,year:tt.timeYear},Lv={day:tt.utcDay,hour:tt.utcHour,minute:tt.utcMinute,month:tt.utcMonth,second:tt.utcSecond,week:tt.utcWeek,year:tt.utcYear};function OO(e,t){if("nice"in t&&typeof t.nice<"u"&&"nice"in e){var n=t.nice;if(typeof n=="boolean")n&&e.nice();else if(typeof n=="number")e.nice(n);else{var r=e,o=(0,MO.default)(r);if(typeof n=="string")r.nice(o?Lv[n]:Iv[n]);else{var i=n.interval,a=n.step,s=(o?Lv[i]:Iv[i]).every(a);s!=null&&r.nice(s)}}}}var tc={};tc.__esModule=!0,tc.default=_O;function _O(e,t){"padding"in e&&"padding"in t&&typeof t.padding<"u"&&e.padding(t.padding),"paddingInner"in e&&"paddingInner"in t&&typeof t.paddingInner<"u"&&e.paddingInner(t.paddingInner),"paddingOuter"in e&&"paddingOuter"in t&&typeof t.paddingOuter<"u"&&e.paddingOuter(t.paddingOuter)}var nc={};nc.__esModule=!0,nc.default=NO;function NO(e,t){if(t.reverse){var n=e.range().slice().reverse();"padding"in e,e.range(n)}}var rc={};rc.__esModule=!0,rc.default=DO;var AO=Av;function DO(e,t){"round"in t&&typeof t.round<"u"&&(t.round&&"interpolate"in t&&typeof t.interpolate<"u"?console.warn("[visx/scale/applyRound] ignoring round: scale config contains round and interpolate. only applying interpolate. config:",t):"round"in e?e.round(t.round):"interpolate"in e&&t.round&&e.interpolate(AO.interpolateRound))}var oc={};oc.__esModule=!0,oc.default=IO;function IO(e,t){"unknown"in e&&"unknown"in t&&typeof t.unknown<"u"&&e.unknown(t.unknown)}var ic={};ic.__esModule=!0,ic.default=LO;function LO(e,t){if("zero"in t&&t.zero===!0){var n=e.domain(),r=n[0],o=n[1],i=o<r,a=i?[o,r]:[r,o],s=a[0],l=a[1],c=[Math.min(0,s),Math.max(0,l)];e.domain(i?c.reverse():c)}}uo.__esModule=!0,uo.ALL_OPERATORS=void 0,uo.default=QO;var FO=nt(Gl),jO=nt(Vl),zO=nt(ql),WO=nt(Yl),BO=nt(Kl),UO=nt(Xl),HO=nt(Rl),GO=nt(Zl),VO=nt(Jl),qO=nt(tc),YO=nt(nc),KO=nt(rc),XO=nt(oc),RO=nt(ic);function nt(e){return e&&e.__esModule?e:{default:e}}var Fv=["domain","nice","zero","interpolate","round","range","reverse","align","base","clamp","constant","exponent","padding","unknown"];uo.ALL_OPERATORS=Fv;var ZO={domain:FO.default,nice:VO.default,zero:RO.default,interpolate:GO.default,round:KO.default,align:zO.default,base:WO.default,clamp:BO.default,constant:UO.default,exponent:HO.default,padding:qO.default,range:jO.default,reverse:YO.default,unknown:XO.default};function QO(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=new Set(t),o=Fv.filter(function(i){return r.has(i)});return function(a,s){return typeof s<"u"&&o.forEach(function(l){ZO[l](a,s)}),a}}var JO=o_,e_=fO,t_=n_(uo);function n_(e){return e&&e.__esModule?e:{default:e}}var r_=(0,t_.default)("domain","range","reverse","unknown");function o_(e){return r_((0,e_.scaleOrdinal)(),e)}var hn={red:["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],pink:["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],grape:["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],violet:["#f3f0ff","#e5dbff","#d0bfff","#b197fc","#9775fa","#845ef7","#7950f2","#7048e8","#6741d9","#5f3dc4"],indigo:["#edf2ff","#dbe4ff","#bac8ff","#91a7ff","#748ffc","#5c7cfa","#4c6ef5","#4263eb","#3b5bdb","#364fc7"],blue:["#e8f7ff","#ccedff","#a3daff","#72c3fc","#4dadf7","#329af0","#228ae6","#1c7cd6","#1b6ec2","#1862ab"],cyan:["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],teal:["#e6fcf5","#c3fae8","#96f2d7","#63e6be","#38d9a9","#20c997","#12b886","#0ca678","#099268","#087f5b"],green:["#ebfbee","#d3f9d8","#b2f2bb","#8ce99a","#69db7c","#51cf66","#40c057","#37b24d","#2f9e44","#2b8a3e"],lime:["#f4fce3","#e9fac8","#d8f5a2","#c0eb75","#a9e34b","#94d82d","#82c91e","#74b816","#66a80f","#5c940d"],yellow:["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],orange:["#fff4e6","#ffe8cc","#ffd8a8","#ffc078","#ffa94d","#ff922b","#fd7e14","#f76707","#e8590c","#d9480f"],gray:["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"]},fo=hn.gray,ac=fo[7],i_=[hn.cyan[9],hn.cyan[3],hn.yellow[5],hn.red[4],hn.grape[8],hn.grape[5],hn.pink[9]];function De(){return De=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},De.apply(this,arguments)}var sc={fontFamily:"-apple-system,BlinkMacSystemFont,Roboto,Helvetica Neue,sans-serif",fontWeight:700,fontSize:12,textAnchor:"middle",pointerEvents:"none",letterSpacing:.4};function a_(e){var t,n,r,o,i,a,s=De({},sc,{fill:ac,stroke:"none"},e.svgLabelBig),l=De({},sc,{fontWeight:200,fontSize:11,fill:ac,stroke:"none"},e.svgLabelSmall),c=De({color:(t=(n=(r=(o=e.htmlLabel)==null?void 0:o.color)!=null?r:(i=e.svgLabelBig)==null?void 0:i.fill)!=null?n:(a=e.svgLabelSmall)==null?void 0:a.fill)!=null?t:ac},sc,e.htmlLabel);return{backgroundColor:e.backgroundColor,colors:[].concat(e.colors),htmlLabel:De({},c),svgLabelSmall:De({},l),svgLabelBig:De({},s),gridStyles:De({stroke:e.gridColor,strokeWidth:1},e.gridStyles),axisStyles:{x:{top:{axisLabel:De({},s,{dy:"-0.25em"}),axisLine:De({stroke:e.gridColorDark,strokeWidth:2},e.xAxisLineStyles),tickLabel:De({},l,{dy:"-0.25em"}),tickLength:e.tickLength,tickLine:De({strokeWidth:1,stroke:e.gridColor},e.xTickLineStyles)},bottom:{axisLabel:De({},s,{dy:"-0.25em"}),axisLine:De({stroke:e.gridColorDark,strokeWidth:2},e.xAxisLineStyles),tickLabel:De({},l,{dy:"0.125em"}),tickLength:e.tickLength,tickLine:De({strokeWidth:1,stroke:e.gridColor},e.xTickLineStyles)}},y:{left:{axisLabel:De({},s,{dx:"-1.25em"}),axisLine:De({stroke:e.gridColor,strokeWidth:1},e.yAxisLineStyles),tickLabel:De({},l,{textAnchor:"end",dx:"-0.25em",dy:"0.25em"}),tickLength:e.tickLength,tickLine:De({strokeWidth:1,stroke:e.gridColor},e.yTickLineStyles)},right:{axisLabel:De({},s,{dx:"1.25em"}),axisLine:De({stroke:e.gridColor,strokeWidth:1},e.yAxisLineStyles),tickLabel:De({},l,{textAnchor:"start",dx:"0.25em",dy:"0.25em"}),tickLength:e.tickLength,tickLine:De({strokeWidth:1,stroke:e.gridColor},e.yTickLineStyles)}}}}}const s_=a_({backgroundColor:"#fff",colors:i_,tickLength:4,svgLabelSmall:{fill:fo[7]},svgLabelBig:{fill:fo[9]},gridColor:fo[5],gridColorDark:fo[9]});var l_=u.createContext(s_);const c_=l_;var u_=function(){function e(){this.registry={},this.registryKeys=[]}var t=e.prototype;return t.registerData=function(r){var o=this,i=Array.isArray(r)?r:[r];i.forEach(function(a){a.key in o.registry&&o.registry[a.key]!=null&&console.debug("Overriding data registry key",a.key),o.registry[a.key]=a,o.registryKeys=Object.keys(o.registry)})},t.unregisterData=function(r){var o=this,i=Array.isArray(r)?r:[r];i.forEach(function(a){delete o.registry[a],o.registryKeys=Object.keys(o.registry)})},t.entries=function(){return Object.values(this.registry)},t.get=function(r){return this.registry[r]},t.keys=function(){return this.registryKeys},e}();function d_(){var e=u.useState(Math.random()),t=e[1],n=u.useMemo(function(){return new u_},[]);return u.useMemo(function(){return{registerData:function(){n.registerData.apply(n,arguments),t(Math.random())},unregisterData:function(){n.unregisterData.apply(n,arguments),t(Math.random())},entries:function(){return n.entries()},get:function(o){return n.get(o)},keys:function(){return n.keys()}}},[n])}var lc={width:0,height:0,margin:{top:0,right:0,bottom:0,left:0}};function f_(e){var t=u.useState({width:(e==null?void 0:e.width)==null?lc.width:e.width,height:(e==null?void 0:e.height)==null?lc.height:e.height,margin:(e==null?void 0:e.margin)==null?lc.margin:e.margin}),n=t[0],r=t[1],o=u.useCallback(function(i){(i.width!==n.width||i.height!==n.height||i.margin.left!==n.margin.left||i.margin.right!==n.margin.right||i.margin.top!==n.margin.top||i.margin.bottom!==n.margin.bottom)&&r(i)},[n.width,n.height,n.margin.left,n.margin.right,n.margin.bottom,n.margin.top]);return[n,o]}function zi(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function p_(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function cc(e){let t,n,r;e.length!==2?(t=zi,n=(s,l)=>zi(e(s),l),r=(s,l)=>e(s)-l):(t=e===zi||e===p_?e:h_,n=e,r=e);function o(s,l,c=0,d=s.length){if(c<d){if(t(l,l)!==0)return d;do{const f=c+d>>>1;n(s[f],l)<0?c=f+1:d=f}while(c<d)}return c}function i(s,l,c=0,d=s.length){if(c<d){if(t(l,l)!==0)return d;do{const f=c+d>>>1;n(s[f],l)<=0?c=f+1:d=f}while(c<d)}return c}function a(s,l,c=0,d=s.length){const f=o(s,l,c,d-1);return f>c&&r(s[f-1],l)>-r(s[f],l)?f-1:f}return{left:o,center:a,right:i}}function h_(){return 0}function m_(e){return e===null?NaN:+e}const v_=cc(zi).left;cc(m_).center;function jv(e,t){let n,r;if(t===void 0)for(const o of e)o!=null&&(n===void 0?o>=o&&(n=r=o):(n>o&&(n=o),r<o&&(r=o)));else{let o=-1;for(let i of e)(i=t(i,++o,e))!=null&&(n===void 0?i>=i&&(n=r=i):(n>i&&(n=i),r<i&&(r=i)))}return[n,r]}function g_(e,t,n){e=+e,t=+t,n=(o=arguments.length)<2?(t=e,e=0,1):o<3?1:+n;for(var r=-1,o=Math.max(0,Math.ceil((t-e)/n))|0,i=new Array(o);++r<o;)i[r]=e+r*n;return i}function uc(e){return(e==null?void 0:e.type)==="band"||(e==null?void 0:e.type)==="ordinal"||(e==null?void 0:e.type)==="point"}function vr(){return vr=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},vr.apply(this,arguments)}function y_(e){var t=e.dataRegistry,n=e.xRange,r=e.xScaleConfig,o=e.yRange,i=e.yScaleConfig,a=t.keys(),s=n[0],l=n[1],c=o[0],d=o[1],f=u.useMemo(function(){var m=a.map(function(y){return t.get(y)}),h=m.reduce(function(y,b){return b?y.concat(b.data.map(function($){return b.xAccessor($)})):y},[]);if(h.length!==0){var v=uc(r)?h:jv(h),x=pl(r)?io(vr({range:[s,l],domain:v,zero:!0},r)):io(vr({range:[s,l],domain:v},r));return m.forEach(function(y){y!=null&&y.xScale&&(x=y.xScale(x))}),x}},[t,r,a,s,l]),p=u.useMemo(function(){var m=a.map(function(y){return t.get(y)}),h=m.reduce(function(y,b){return b?y.concat(b.data.map(function($){return b.yAccessor($)})):y},[]);if(h.length!==0){var v=uc(i)?h:jv(h),x=pl(i)?io(vr({range:[c,d],domain:v,zero:!0},i)):io(vr({range:[c,d],domain:v},i));return m.forEach(function(y){y!=null&&y.yScale&&(x=y.yScale(x))}),x}},[t,i,a,c,d]);return{xScale:f,yScale:p}}function zv(e){var t=e.initialDimensions,n=e.theme,r=e.xScale,o=e.yScale,i=e.children,a=e.horizontal,s=a===void 0?"auto":a,l=e.resizeObserverPolyfill,c=u.useContext(c_),d=n||c,f=f_(t),p=f[0],m=p.width,h=p.height,v=p.margin,x=f[1],y=Math.max(0,m-v.left-v.right),b=Math.max(0,h-v.top-v.bottom),$=d_(),S=y_({dataRegistry:$,xScaleConfig:r,yScaleConfig:o,xRange:[v.left,Math.max(0,m-v.right)],yRange:[Math.max(0,h-v.bottom),v.top]}),w=S.xScale,T=S.yScale,O=$.keys(),P=u.useMemo(function(){return JO({domain:O,range:d.colors})},[O,d.colors]),_=s==="auto"?uc(o)||o.type==="time"||o.type==="utc":s,j=u.useMemo(function(){return{dataRegistry:$,registerData:$.registerData,unregisterData:$.unregisterData,xScale:w,yScale:T,colorScale:P,theme:d,width:m,height:h,margin:v,innerWidth:y,innerHeight:b,setDimensions:x,horizontal:_,resizeObserverPolyfill:l}},[P,$,h,_,b,y,v,x,d,m,w,T,l]);return u.createElement(Ot.Provider,{value:j},i)}zv.propTypes={children:ne.node.isRequired,horizontal:ne.oneOfType([ne.bool,ne.oneOf(["auto"])])};function Wv(e){var t=e.source,n=e.onPointerOut,r=n===void 0?!0:n,o=e.onPointerMove,i=o===void 0?!0:o,a=e.onPointerUp,s=a===void 0?!0:a,l=e.onPointerDown,c=l===void 0?!0:l,d=e.onFocus,f=d===void 0?!1:d,p=e.onBlur,m=p===void 0?!1:p,h=fn(),v=u.useCallback(function(w){return h==null?void 0:h("pointermove",w,t)},[h,t]),x=u.useCallback(function(w){return h==null?void 0:h("pointerout",w,t)},[h,t]),y=u.useCallback(function(w){return h==null?void 0:h("pointerup",w,t)},[h,t]),b=u.useCallback(function(w){return h==null?void 0:h("pointerdown",w,t)},[h,t]),$=u.useCallback(function(w){return h==null?void 0:h("focus",w,t)},[h,t]),S=u.useCallback(function(w){return h==null?void 0:h("blur",w,t)},[h,t]);return{onPointerMove:i?v:void 0,onFocus:f?$:void 0,onBlur:m?S:void 0,onPointerOut:r?x:void 0,onPointerUp:s?y:void 0,onPointerDown:c?b:void 0}}var b_="GLYPHSERIES_EVENT_SOURCE",dc="XYCHART_EVENT_SOURCE";function Bv(e){return!!e&&("clientX"in e||"changedTouches"in e)}function x_(e){return!!e&&!Bv(e)}function Uv(e){var t=e.scale,n=e.accessor,r=e.scaledValue,o=e.data,i=t,a,s;if("invert"in i&&typeof i.invert=="function"){var l=cc(n).left,c=Number(i.invert(r)),d=l(o,c),f=o[d-1],p=o[d];a=!f||Math.abs(c-n(f))>Math.abs(c-n(p))?p:f,s=a===f?d-1:d}else if("step"in i&&typeof i.step<"u"){var m=t.domain(),h=t.range().map(Number),v=[].concat(h).sort(function(T,O){return T-O}),x=g_(v[0],v[1],i.step()),y=v_(x,r),b=h[0]<h[1]?m:m.reverse(),$=b[y-1],S=o.findIndex(function(T){return String(n(T))===String($)});a=o[S],s=S}else return console.warn("[visx/xychart/findNearestDatum] encountered incompatible scale type, bailing"),null;if(a==null||s==null)return null;var w=Math.abs(Number(i(n(a)))-r);return{datum:a,index:s,distance:w}}function w_(e){var t=e.xScale,n=e.xAccessor,r=e.yScale,o=e.yAccessor,i=e.point,a=e.data;if(!i)return null;var s=Uv({scale:t,accessor:n,scaledValue:i.x,data:a});return s?{datum:s.datum,index:s.index,distanceX:s.distance,distanceY:Math.abs(Number(r(o(s.datum)))-i.y)}:null}function $_(e){var t=e.yScale,n=e.yAccessor,r=e.xScale,o=e.xAccessor,i=e.point,a=e.data;if(!i)return null;var s=Uv({scale:t,accessor:n,scaledValue:i.y,data:a});return s?{datum:s.datum,index:s.index,distanceY:s.distance,distanceX:Math.abs(Number(r(o(s.datum)))-i.x)}:null}function fc(){return fc=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},fc.apply(this,arguments)}var pc="__POINTER_EVENTS_ALL",Wi="__POINTER_EVENTS_NEAREST";function Hv(e){var t=e.dataKey,n=e.findNearestDatum,r=e.onBlur,o=e.onFocus,i=e.onPointerMove,a=e.onPointerOut,s=e.onPointerUp,l=e.onPointerDown,c=e.allowedSources,d=u.useContext(Ot),f=d.width,p=d.height,m=d.horizontal,h=d.dataRegistry,v=d.xScale,x=d.yScale,y=n||(m?$_:w_),b=u.useCallback(function(_){var j=_||{},F=j.svgPoint,V=j.event,R={},X=null,C=1/0;if(_&&V&&F&&f&&p&&v&&x){var I,H=t===Wi||t===pc,B=H?(I=h==null?void 0:h.keys())!=null?I:[]:Array.isArray(t)?t:[t];B.forEach(function(N){var z=h==null?void 0:h.get(N);if(z){var J=y({dataKey:N,data:z.data,height:p,point:F,width:f,xAccessor:z.xAccessor,xScale:v,yAccessor:z.yAccessor,yScale:x});if(J&&(R[N]=fc({key:N,svgPoint:F,event:V},J),t===Wi)){var Q,oe,te=Math.sqrt(((Q=J.distanceX)!=null?Q:Math.pow(1/0,2))+((oe=J.distanceY)!=null?oe:Math.pow(1/0,2)));X=te<C?R[N]:X,C=Math.min(C,te)}}});var A=t===Wi?[X]:t===pc||Array.isArray(t)?Object.values(R):[R[t]];return A.filter(function(N){return N})}return[]},[t,h,v,x,f,p,y]),$=u.useCallback(function(_){i&&b(_).forEach(function(j){return i(j)})},[b,i]),S=u.useCallback(function(_){s&&b(_).forEach(function(j){return s(j)})},[b,s]),w=u.useCallback(function(_){l&&b(_).forEach(function(j){return l(j)})},[b,l]),T=u.useCallback(function(_){o&&b(_).forEach(function(j){return o(j)})},[b,o]),O=u.useCallback(function(_){var j=_==null?void 0:_.event;j&&Bv(j)&&a&&a(j)},[a]),P=u.useCallback(function(_){var j=_==null?void 0:_.event;j&&x_(j)&&r&&r(j)},[r]);fn("pointermove",i?$:void 0,c),fn("pointerout",a?O:void 0,c),fn("pointerup",s?S:void 0,c),fn("pointerdown",l?w:void 0,c),fn("focus",o?T:void 0,c),fn("blur",r?P:void 0,c)}function Bi(){return Bi=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},Bi.apply(this,arguments)}var C_={top:50,right:50,bottom:50,left:50},S_=[dc];function gr(e){var t=e.accessibilityLabel,n=t===void 0?"XYChart":t,r=e.captureEvents,o=r===void 0?!0:r,i=e.children,a=e.height,s=e.horizontal,l=e.margin,c=l===void 0?C_:l,d=e.onPointerMove,f=e.onPointerOut,p=e.onPointerUp,m=e.onPointerDown,h=e.pointerEventsDataKey,v=h===void 0?"nearest":h,x=e.theme,y=e.width,b=e.xScale,$=e.yScale,S=e.resizeObserverPolyfill,w=u.useContext(Ot),T=w.setDimensions,O=w.resizeObserverPolyfill,P=u.useContext(co),_=fn();u.useEffect(function(){T&&y!=null&&a!=null&&y>0&&a>0&&T({width:y,height:a,margin:c})},[T,y,a,c]);var j=Wv({source:dc});return Hv({dataKey:v==="nearest"?Wi:pc,onPointerMove:d,onPointerOut:f,onPointerUp:p,onPointerDown:m,allowedSources:S_}),T?y==null||a==null?u.createElement(nO,{resizeObserverPolyfill:O},function(F){return u.createElement(gr,Bi({},e,{width:e.width==null?F.width:e.width,height:e.height==null?F.height:e.height}))}):P==null?u.createElement(Nv,null,u.createElement(gr,e)):_==null?u.createElement(dO,null,u.createElement(gr,e)):y<=0||a<=0?(console.info("XYChart has a zero width or height, bailing",{width:y,height:a}),null):u.createElement("svg",{width:y,height:a,"aria-label":n},i,o&&u.createElement("rect",Bi({x:c.left,y:c.top,width:y-c.left-c.right,height:a-c.top-c.bottom,fill:"transparent"},j))):!b||!$?(console.warn("[@visx/xychart] XYChart: When no DataProvider is available in context, you must pass xScale & yScale config to XYChart."),null):u.createElement(zv,{xScale:b,yScale:$,theme:x,initialDimensions:{width:y,height:a,margin:c},horizontal:s,resizeObserverPolyfill:S},u.createElement(gr,e))}gr.propTypes={accessibilityLabel:ne.string,captureEvents:ne.bool,width:ne.number,height:ne.number,children:ne.node.isRequired,horizontal:ne.oneOfType([ne.bool,ne.oneOf(["auto"])]),onPointerMove:ne.func,onPointerOut:ne.func,onPointerUp:ne.func,onPointerDown:ne.func,pointerEventsDataKey:ne.oneOf(["all","nearest"])};function hc(){return hc=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},hc.apply(this,arguments)}function E_(e){function t(n){var r=n.dataKey,o=n.data,i=n.xAccessor,a=n.yAccessor,s=u.useContext(Ot),l=s.xScale,c=s.yScale,d=s.dataRegistry;u.useEffect(function(){return d&&d.registerData({key:r,data:o,xAccessor:i,yAccessor:a}),function(){return d==null?void 0:d.unregisterData(r)}},[d,r,o,i,a]);var f=d==null?void 0:d.get(r);if(!l||!c||!f)return null;var p=e;return u.createElement(p,hc({},n,{xScale:l,yScale:c,data:f.data,xAccessor:f.xAccessor,yAccessor:f.yAccessor}))}return t}function Gv(e,t,n){return n===void 0&&(n="center"),function(r){var o=e(t(r));if(ft(o)){var i=(n==="start"?0:hl(e))/(n==="center"?2:1);return o+i}return NaN}}function T_(e){var t,n=e.dataKey,r=e.enableEvents,o=e.findNearestDatum,i=e.onBlur,a=e.onFocus,s=e.onPointerMove,l=e.onPointerOut,c=e.onPointerUp,d=e.onPointerDown,f=e.source,p=e.allowedSources,m=(t=u.useContext(co))!=null?t:{},h=m.showTooltip,v=m.hideTooltip,x=u.useCallback(function(w){h(w),s&&s(w)},[h,s]),y=u.useCallback(function(w){h(w),a&&a(w)},[h,a]),b=u.useCallback(function(w){v(),w&&l&&l(w)},[v,l]),$=u.useCallback(function(w){v(),w&&i&&i(w)},[v,i]),S=u.useCallback(function(w){h(w),d&&d(w)},[h,d]);return Hv({dataKey:n,findNearestDatum:o,onBlur:r?$:void 0,onFocus:r?y:void 0,onPointerMove:r?x:void 0,onPointerOut:r?b:void 0,onPointerUp:r?c:void 0,onPointerDown:r?S:void 0,allowedSources:p}),Wv({source:f,onBlur:!!i&&r,onFocus:!!a&&r,onPointerMove:!!s&&r,onPointerOut:!!l&&r,onPointerUp:!!c&&r,onPointerDown:!!d&&r})}function mc(){return mc=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},mc.apply(this,arguments)}function Vv(e){var t,n,r,o=e.colorAccessor,i=e.data,a=e.dataKey,s=e.onBlur,l=e.onFocus,c=e.onPointerMove,d=e.onPointerOut,f=e.onPointerUp,p=e.onPointerDown,m=e.enableEvents,h=m===void 0?!0:m,v=e.renderGlyphs,x=e.size,y=x===void 0?8:x,b=e.xAccessor,$=e.xScale,S=e.yAccessor,w=e.yScale,T=u.useContext(Ot),O=T.colorScale,P=T.theme,_=T.horizontal,j=u.useMemo(function(){return Gv($,b)},[$,b]),F=u.useMemo(function(){return Gv(w,S)},[w,S]),V=(t=(n=O==null?void 0:O(a))!=null?n:P==null||(r=P.colors)==null?void 0:r[0])!=null?t:"#222",R=b_+"-"+a,X=T_({dataKey:a,enableEvents:h,onBlur:s,onFocus:l,onPointerMove:c,onPointerOut:d,onPointerUp:f,onPointerDown:p,source:R,allowedSources:[dc,R]}),C=u.useMemo(function(){return i.map(function(I,H){var B,A=j(I);if(!ft(A))return null;var N=F(I);return ft(N)?{key:""+H,x:A,y:N,color:(B=o==null?void 0:o(I,H))!=null?B:V,size:typeof y=="function"?y(I):y,datum:I}:null}).filter(function(I){return I})},[V,o,i,j,F,y]);return u.createElement(u.Fragment,null,v(mc({glyphs:C,xScale:$,yScale:w,horizontal:_},X)))}Vv.propTypes={colorAccessor:ne.func,size:ne.oneOfType([ne.number,ne.func]),renderGlyphs:ne.func.isRequired};const P_=E_(Vv);function M_(e){var t=e.key,n=e.color,r=e.x,o=e.y,i=e.size,a=e.onBlur,s=e.onFocus,l=e.onPointerMove,c=e.onPointerOut,d=e.onPointerUp;return u.createElement("circle",{className:"visx-circle-glyph",key:t,tabIndex:a||s?0:void 0,fill:n,r:i/2,cx:r,cy:o,onBlur:a,onFocus:s,onPointerMove:l,onPointerOut:c,onPointerUp:d})}var k_=["renderGlyph"];function Ui(){return Ui=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},Ui.apply(this,arguments)}function O_(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function __(e){var t=e.renderGlyph,n=t===void 0?M_:t,r=O_(e,k_),o=u.useCallback(function(i){var a=i.glyphs,s=i.onPointerMove,l=i.onPointerOut,c=i.onPointerUp,d=i.onFocus,f=i.onBlur;return a.map(function(p){return u.createElement(u.Fragment,{key:p.key},n(Ui({},p,{onPointerMove:s,onPointerOut:l,onPointerUp:c,onFocus:d,onBlur:f})))})},[n]);return u.createElement(P_,Ui({},r,{renderGlyphs:o}))}function qv(e){var t=e.top,n=t===void 0?0:t,r=e.left,o=r===void 0?0:r,i=e.className,a=e.children;return u.createElement(En,{className:et("visx-glyph",i),top:n,left:o},a)}qv.propTypes={top:ne.number,left:ne.number,className:ne.string,children:ne.node};var N_=["top","left","className"];function vc(){return vc=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},vc.apply(this,arguments)}function A_(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function gc(e){var t=e.top,n=t===void 0?0:t,r=e.left,o=r===void 0?0:r,i=e.className,a=A_(e,N_);return u.createElement(qv,{top:n,left:o},u.createElement("circle",vc({className:et("visx-glyph-dot",i)},a)))}gc.propTypes={className:ne.string,top:ne.number,left:ne.number,r:ne.number,cx:ne.number,cy:ne.number};var D_=["className","children","debounceTime","ignoreDimensions","parentSizeStyles","enableDebounceLeadingCall","resizeObserverPolyfill"];function Hi(){return Hi=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},Hi.apply(this,arguments)}function I_(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var L_=[],F_={width:"100%",height:"100%"};function Gi(e){var t=e.className,n=e.children,r=e.debounceTime,o=r===void 0?300:r,i=e.ignoreDimensions,a=i===void 0?L_:i,s=e.parentSizeStyles,l=s===void 0?F_:s,c=e.enableDebounceLeadingCall,d=c===void 0?!0:c,f=e.resizeObserverPolyfill,p=I_(e,D_),m=u.useRef(null),h=u.useRef(0),v=u.useState({width:0,height:0,top:0,left:0}),x=v[0],y=v[1],b=u.useMemo(function(){var $=Array.isArray(a)?a:[a];return Pv(function(S){y(function(w){var T=Object.keys(w),O=T.filter(function(_){return w[_]!==S[_]}),P=O.every(function(_){return $.includes(_)});return P?w:S})},o,{leading:d})},[o,d,a]);return u.useEffect(function(){var $=f||window.ResizeObserver,S=new $(function(w){w.forEach(function(T){var O,P=(O=T==null?void 0:T.contentRect)!=null?O:{},_=P.left,j=P.top,F=P.width,V=P.height;h.current=window.requestAnimationFrame(function(){b({width:F,height:V,top:j,left:_})})})});return m.current&&S.observe(m.current),function(){window.cancelAnimationFrame(h.current),S.disconnect(),b.cancel()}},[b,f]),u.createElement("div",Hi({style:l,ref:m,className:t},p),n(Hi({},x,{ref:m.current,resize:b})))}Gi.propTypes={className:ne.string,debounceTime:ne.number,enableDebounceLeadingCall:ne.bool,ignoreDimensions:ne.oneOfType([ne.any,ne.arrayOf(ne.any)]),children:ne.func.isRequired};const Yv=[{name:"default",dark:"#0091E7",light:"#62B9ED"},{name:"yellow",dark:"#8C6A00",light:"#FFDE88"},{name:"plum",dark:"#7D1779",light:"#E1AADD"},{name:"cyan",dark:"#329F95",light:"#C0FFF9"},{name:"purple",dark:"#7651BC",light:"#E7DAFF"},{name:"pink",dark:"#C01443",light:"#FAD4D4"},{name:"green",dark:"#44812F",light:"#B1E39F"},{name:"orange",dark:"#B96400",light:"#FFE7C5"},{name:"teal",dark:"#237C73",light:"#A1DFD5"},{name:"red",dark:"#C62C02",light:"#FFE1D9"}];function Re(e){return Yv[e%Yv.length]}function yc({textLabel:e,axisCharLimit:t,x:n,y:r,textStyles:o}){return L.jsx(Of,{children:L.jsxs(_f,{children:[L.jsx(Nf,{asChild:!0,children:L.jsx("text",{className:"pointer-events-auto cursor-pointer",...o,x:n,y:r,children:e&&(e==null?void 0:e.length)>t?`${e==null?void 0:e.substring(0,t)}...`:e})}),L.jsx(Af,{children:L.jsx(es,{className:"rabbit-ds",children:L.jsx("p",{children:e})})})]})})}const Kv=(e,t)=>u.Children.map(e,n=>u.isValidElement(n)&&typeof n.type=="function"&&n.type.displayName===t.displayName?n:null);function bc({value:e,darkColor:t,lightColor:n}){return L.jsxs("div",{className:"px-2 py-1 justify-start items-center gap-2 inline-flex",children:[L.jsx("div",{style:{backgroundColor:n,borderColor:t},className:"w-3 h-3 relative rounded-3xl border"}),L.jsx("div",{className:"justify-start items-start flex",children:L.jsx("div",{className:"text-zinc-800 text-xs font-normal leading-none",children:e})})]})}function xc({label:e,value:t}){return L.jsxs("div",{className:"px-1 py-0.5 flex-col justify-start items-start inline-flex max-w-sm",children:[L.jsx("div",{className:" text-stone-500 text-[10px] font-normal leading-none",children:e}),L.jsx("div",{className:"justify-start items-start text-sm flex font-medium",children:t||"-"})]})}function Ue({children:e,showSideBySide:t,tooltipTitle:n}){const r=Kv(e,bc),o=Kv(e,xc);return L.jsxs("div",{className:"rabbit-ds z-[1500] relative h-auto w-auto min-w-[200px] max-w-[400px] p-2 bg-white rounded-lg shadow flex-col justify-start items-start gap-2 inline-flex",children:[L.jsx("div",{className:"px-3 py-1 text-zinc-800 font-medium text-xs leading-none",children:n}),L.jsxs("div",{className:"w-full p-2 rounded-lg flex-col justify-start items-start flex",children:[t&&L.jsxs("div",{className:_e("w-full flex"),children:[o&&o[0],L.jsx("div",{className:"w-0 border-r mx-3"}),o&&o[1]]}),!t&&L.jsx("div",{className:_e("w-full grid gap-3 auto-rows-auto"),children:o})]}),r&&r.length>0?L.jsx("div",{className:"h-px px-2 w-full border-top bg-gray-100"}):null,r]})}bc.displayName="Legend",xc.displayName="Item",Ue.Legend=bc,Ue.Item=xc,Ue.defaultProps={showSideBySide:!1};function Xv({xValue:e,yValue:t,tooltipTitle:n,xAxisLabel:r,yAxisLabel:o,showSideBySide:i,legendValue:a,legendDarkColor:s,legendLightColor:l}){const c=e==null?void 0:e.toString(),d=t==null?void 0:t.toString();return L.jsxs(Ue,{tooltipTitle:n,showSideBySide:i,children:[L.jsx(Ue.Item,{label:r,value:c}),L.jsx(Ue.Item,{label:o,value:d}),L.jsx(Ue.Legend,{value:a,darkColor:s,lightColor:l})]})}Xv.defaultProps={xValue:void 0,yValue:void 0};function j_({data:e,xAccessor:t,yAccessor:n,connectNulls:r=!1}){const o=u.useContext(Ot),i=r?e.filter(a=>a.y!==null):e;return L.jsx(cM,{data:i,stroke:i[0].color.dark,strokeWidth:1,x:a=>{var s,l;return((s=o==null?void 0:o.xScale)==null?void 0:s.call(o,t(a)))+((l=o==null?void 0:o.xScale)==null?void 0:l.bandwidth())/2},y:a=>{var s;return(s=o==null?void 0:o.yScale)==null?void 0:s.call(o,n(a))}})}var wc={exports:{}};(function(e,t){(function(n,r){r(t)})(Ar,function(n){var r,o=Object.defineProperty,i=Object.defineProperties,a=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertySymbols,l=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable,d=Math.pow,f=(g,E,M)=>E in g?o(g,E,{enumerable:!0,configurable:!0,writable:!0,value:M}):g[E]=M,p=(g,E)=>{for(var M in E||(E={}))l.call(E,M)&&f(g,M,E[M]);if(s)for(var M of s(E))c.call(E,M)&&f(g,M,E[M]);return g},m=(g,E)=>i(g,a(E)),h=(g,E)=>{var M={};for(var D in g)l.call(g,D)&&E.indexOf(D)<0&&(M[D]=g[D]);if(g!=null&&s)for(var D of s(g))E.indexOf(D)<0&&c.call(g,D)&&(M[D]=g[D]);return M},v=(g,E,M)=>new Promise((D,G)=>{var Z=ie=>{try{K(M.next(ie))}catch(se){G(se)}},W=ie=>{try{K(M.throw(ie))}catch(se){G(se)}},K=ie=>ie.done?D(ie.value):Promise.resolve(ie.value).then(Z,W);K((M=M.apply(g,E)).next())});function x(g,E){return g[13]=1,g[14]=E>>8,g[15]=E&255,g[16]=E>>8,g[17]=E&255,g}const y="p".charCodeAt(0),b="H".charCodeAt(0),$="Y".charCodeAt(0),S="s".charCodeAt(0);let w;function T(){const g=new Int32Array(256);for(let E=0;E<256;E++){let M=E;for(let D=0;D<8;D++)M=M&1?3988292384^M>>>1:M>>>1;g[E]=M}return g}function O(g){let E=-1;w||(w=T());for(let M=0;M<g.length;M++)E=w[(E^g[M])&255]^E>>>8;return E^-1}function P(g){const E=g.length-1;for(let M=E;M>=4;M--)if(g[M-4]===9&&g[M-3]===y&&g[M-2]===b&&g[M-1]===$&&g[M]===S)return M-3;return 0}function _(g,E,M=!1){const D=new Uint8Array(13);E*=39.3701,D[0]=y,D[1]=b,D[2]=$,D[3]=S,D[4]=E>>>24,D[5]=E>>>16,D[6]=E>>>8,D[7]=E&255,D[8]=D[4],D[9]=D[5],D[10]=D[6],D[11]=D[7],D[12]=1;const G=O(D),Z=new Uint8Array(4);if(Z[0]=G>>>24,Z[1]=G>>>16,Z[2]=G>>>8,Z[3]=G&255,M){const W=P(g);return g.set(D,W),g.set(Z,W+13),g}else{const W=new Uint8Array(4);W[0]=0,W[1]=0,W[2]=0,W[3]=9;const K=new Uint8Array(54);return K.set(g,0),K.set(W,33),K.set(D,37),K.set(Z,50),K}}const j="AAlwSFlz",F="AAAJcEhZ",V="AAAACXBI";function R(g){let E=g.indexOf(j);return E===-1&&(E=g.indexOf(F)),E===-1&&(E=g.indexOf(V)),E}const X="[modern-screenshot]",C=typeof window<"u",I=C&&"Worker"in window,H=C&&"atob"in window,B=C&&"btoa"in window,A=C?(r=window.navigator)==null?void 0:r.userAgent:"",N=A.includes("Chrome"),z=A.includes("AppleWebKit")&&!N,J=A.includes("Firefox"),Q=g=>g&&"__CONTEXT__"in g,oe=g=>g.constructor.name==="CSSFontFaceRule",te=g=>g.constructor.name==="CSSImportRule",ae=g=>g.nodeType===1,Y=g=>typeof g.className=="object",le=g=>Y(g)&&g.tagName==="svg",U=g=>Y(g)&&g.tagName==="image",q=g=>ae(g)&&typeof g.style<"u"&&!Y(g),re=g=>g.nodeType===8,k=g=>g.nodeType===3,de=g=>g.tagName==="IMG",pe=g=>g.tagName==="VIDEO",Ce=g=>g.tagName==="CANVAS",ke=g=>g.tagName==="TEXTAREA",je=g=>g.tagName==="INPUT",_t=g=>g.tagName==="STYLE",mn=g=>g.tagName==="SCRIPT",Ze=g=>g.tagName==="SELECT",qt=g=>g.tagName==="SLOT",yr=g=>g.tagName==="IFRAME",Le=(...g)=>console.warn(X,...g),Ri=g=>console.time(`${X} ${g}`),Zi=g=>console.timeEnd(`${X} ${g}`),po=g=>{var E;const M=(E=g==null?void 0:g.createElement)==null?void 0:E.call(g,"canvas");return M&&(M.height=M.width=1),M&&"toDataURL"in M&&!!M.toDataURL("image/webp").includes("image/webp")},rt=g=>g.startsWith("data:");function vn(g,E){if(g.match(/^[a-z]+:\/\//i))return g;if(C&&g.match(/^\/\//))return window.location.protocol+g;if(g.match(/^[a-z]+:/i)||!C)return g;const M=zn().implementation.createHTMLDocument(),D=M.createElement("base"),G=M.createElement("a");return M.head.appendChild(D),M.body.appendChild(G),E&&(D.href=E),G.href=g,G.href}function zn(g){var E;return(E=g&&ae(g)?g==null?void 0:g.ownerDocument:g)!=null?E:window.document}const Wn="http://www.w3.org/2000/svg";function ho(g,E,M){const D=zn(M).createElementNS(Wn,"svg");return D.setAttributeNS(null,"width",g.toString()),D.setAttributeNS(null,"height",E.toString()),D.setAttributeNS(null,"viewBox",`0 0 ${g} ${E}`),D}function br(g,E){let M=new XMLSerializer().serializeToString(g);return E&&(M=M.replace(/[\u0000-\u0008\u000B\u000C\u000E-\u001F\uD800-\uDFFF\uFFFE\uFFFF]/ug,"")),`data:image/svg+xml;charset=utf-8,${encodeURIComponent(M)}`}function Qi(g,E="image/png",M=1){return v(this,null,function*(){try{return yield new Promise((D,G)=>{g.toBlob(Z=>{Z?D(Z):G(new Error("Blob is null"))},E,M)})}catch(D){if(H)return Le("Failed canvas to blob",{type:E,quality:M},D),Ji(g.toDataURL(E,M));throw D}})}function Ji(g){var E,M;const[D,G]=g.split(","),Z=(M=(E=D.match(/data:(.+);/))==null?void 0:E[1])!=null?M:void 0,W=window.atob(G),K=W.length,ie=new Uint8Array(K);for(let se=0;se<K;se+=1)ie[se]=W.charCodeAt(se);return new Blob([ie],{type:Z})}function mo(g,E){return new Promise((M,D)=>{const G=new FileReader;G.onload=()=>M(G.result),G.onerror=()=>D(G.error),G.onabort=()=>D(new Error(`Failed read blob to ${E}`)),E==="dataUrl"?G.readAsDataURL(g):E==="arrayBuffer"&&G.readAsArrayBuffer(g)})}const ea=g=>mo(g,"dataUrl"),ta=g=>mo(g,"arrayBuffer");function Nt(g,E){const M=zn(E).createElement("img");return M.decoding="sync",M.loading="eager",M.src=g,M}function Yt(g,E){return new Promise(M=>{const{timeout:D,ownerDocument:G,onError:Z}=E??{},W=typeof g=="string"?Nt(g,zn(G)):g;let K=null,ie=null;function se(){M(W),K&&clearTimeout(K),ie==null||ie()}if(D&&(K=setTimeout(se,D)),pe(W)){const ce=W.currentSrc||W.src;if(!ce)return W.poster?Yt(W.poster,E).then(M):se();if(W.readyState>=2)return se();const he=se,ue=be=>{Le("Failed video load",ce,be),Z==null||Z(be),se()};ie=()=>{W.removeEventListener("loadeddata",he),W.removeEventListener("error",ue)},W.addEventListener("loadeddata",he,{once:!0}),W.addEventListener("error",ue,{once:!0})}else{const ce=U(W)?W.href.baseVal:W.currentSrc||W.src;if(!ce)return se();const he=()=>v(this,null,function*(){if(de(W)&&"decode"in W)try{yield W.decode()}catch(be){Le("Failed to decode image, trying to render anyway",W.dataset.originalSrc||ce,be)}se()}),ue=be=>{Le("Failed image load",W.dataset.originalSrc||ce,be),se()};if(de(W)&&W.complete)return he();ie=()=>{W.removeEventListener("load",he),W.removeEventListener("error",ue)},W.addEventListener("load",he,{once:!0}),W.addEventListener("error",ue,{once:!0})}})}function vo(g,E){return v(this,null,function*(){q(g)&&(de(g)||pe(g)?yield Yt(g,{timeout:E}):yield Promise.all(["img","video"].flatMap(M=>Array.from(g.querySelectorAll(M)).map(D=>Yt(D,{timeout:E})))))})}const go=function(){let g=0;const E=()=>`0000${(Math.random()*d(36,4)<<0).toString(36)}`.slice(-4);return()=>(g+=1,`u${E()}${g}`)}();function yo(g){return g==null?void 0:g.split(",").map(E=>E.trim().replace(/"|'/g,"").toLowerCase()).filter(Boolean)}function na(g){return{time:E=>g&&Ri(E),timeEnd:E=>g&&Zi(E),warn:(...E)=>g&&Le(...E)}}function ra(g){return{cache:g?"no-cache":"force-cache"}}function st(g,E){return v(this,null,function*(){return Q(g)?g:oa(g,m(p({},E),{autoDestruct:!0}))})}function oa(g,E){return v(this,null,function*(){var M,D,G,Z,W;const{scale:K=1,workerUrl:ie,workerNumber:se=1}=E||{},ce=!!(E!=null&&E.debug),he=(M=E==null?void 0:E.features)!=null?M:!0,ue=(D=g.ownerDocument)!=null?D:C?window.document:void 0,be=(Z=(G=g.ownerDocument)==null?void 0:G.defaultView)!=null?Z:C?window:void 0,ye=new Map,$e=m(p({width:0,height:0,quality:1,type:"image/png",scale:K,backgroundColor:null,style:null,filter:null,maximumCanvasSize:0,timeout:3e4,progress:null,debug:ce,fetch:p({requestInit:ra((W=E==null?void 0:E.fetch)==null?void 0:W.bypassingCache),placeholderImage:"data:image/png;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",bypassingCache:!1},E==null?void 0:E.fetch),font:{},drawImageInterval:100,workerUrl:null,workerNumber:se,onCloneNode:null,onEmbedNode:null,onCreateForeignObjectSvg:null,autoDestruct:!1},E),{__CONTEXT__:!0,log:na(ce),node:g,ownerDocument:ue,ownerWindow:be,dpi:K===1?null:96*K,svgStyleElement:Qe(ue),svgDefsElement:ue==null?void 0:ue.createElementNS(Wn,"defs"),svgStyles:new Map,defaultComputedStyles:new Map,workers:[...new Array(I&&ie&&se?se:0)].map(()=>{try{const Ie=new Worker(ie);return Ie.onmessage=Ne=>v(this,null,function*(){var Je,Rt,gn,_g;const{url:Oc,result:Ng}=Ne.data;Ng?(Rt=(Je=ye.get(Oc))==null?void 0:Je.resovle)==null||Rt.call(Je,Ng):(_g=(gn=ye.get(Oc))==null?void 0:gn.reject)==null||_g.call(gn,new Error(`Error receiving message from worker: ${Oc}`))}),Ie.onmessageerror=Ne=>{var Je,Rt;const{url:gn}=Ne.data;(Rt=(Je=ye.get(gn))==null?void 0:Je.reject)==null||Rt.call(Je,new Error(`Error receiving message from worker: ${gn}`))},Ie}catch(Ie){return Le("Failed to new Worker",Ie),null}}).filter(Boolean),fontFamilies:new Set,fontCssTexts:new Map,acceptOfImage:`${[po(ue)&&"image/webp","image/svg+xml","image/*","*/*"].filter(Boolean).join(",")};q=0.8`,requests:ye,drawImageCount:0,tasks:[],features:he,isEnable:Ie=>{var Ne;return typeof he=="boolean"?he:(Ne=he[Ie])!=null?Ne:!0}});$e.log.time("wait until load"),yield vo(g,$e.timeout),$e.log.timeEnd("wait until load");const{width:Ee,height:Te}=pt(g,$e);return $e.width=Ee,$e.height=Te,$e})}function Qe(g){if(!g)return;const E=g.createElement("style"),M=E.ownerDocument.createTextNode(`
|
|
73
|
+
`).join("");return w}function $M(e){var t=e.children,n=e.className,r=e.innerRef,o=e.x,i=e.y,a=e.width,s=e.height,l=e.radius,c=e.all,d=c===void 0?!1:c,f=e.top,p=f===void 0?!1:f,m=e.bottom,h=m===void 0?!1:m,v=e.left,w=v===void 0?!1:v,y=e.right,b=y===void 0?!1:y,$=e.topLeft,S=$===void 0?!1:$,x=e.topRight,T=x===void 0?!1:x,O=e.bottomLeft,P=O===void 0?!1:O,_=e.bottomRight,j=_===void 0?!1:_,F=wM(e,bM),V=xM({x:o,y:i,width:a,height:s,radius:l,all:d,top:p,bottom:h,left:w,right:b,topLeft:S,topRight:T,bottomLeft:P,bottomRight:j});return t?u.createElement(u.Fragment,null,t({path:V})):u.createElement("path",kl({ref:r,className:et("visx-bar-rounded",n),d:V},F))}function CM(e){return typeof(e==null?void 0:e.x)=="number"?e==null?void 0:e.x:0}function SM(e){return typeof(e==null?void 0:e.y)=="number"?e==null?void 0:e.y:0}function EM(e){return e==null?void 0:e.source}function TM(e){return e==null?void 0:e.target}var PM=["className","children","data","innerRef","path","x","y","source","target"];function Ol(){return Ol=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},Ol.apply(this,arguments)}function MM(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function kM(e){var t=e.source,n=e.target,r=e.x,o=e.y;return function(i){var a=cM();return a.x(r),a.y(o),a.source(t),a.target(n),a(i)}}function OM(e){var t=e.className,n=e.children,r=e.data,o=e.innerRef,i=e.path,a=e.x,s=a===void 0?SM:a,l=e.y,c=l===void 0?CM:l,d=e.source,f=d===void 0?EM:d,p=e.target,m=p===void 0?TM:p,h=MM(e,PM),v=i||kM({source:f,target:m,x:s,y:c});return n?u.createElement(u.Fragment,null,n({path:v})):u.createElement("path",Ol({ref:o,className:et("visx-link visx-link-horizontal-diagonal",t),d:v(r)||""},h))}var _M=["AxisComponent"];function Oi(){return Oi=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},Oi.apply(this,arguments)}function NM(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function DM(e){var t,n,r,o,i,a,s,l=e.AxisComponent,c=NM(e,_M),d=u.useContext(Ot),f=d.theme,p=d.xScale,m=d.yScale,h=d.margin,v=d.width,w=d.height,y=c.orientation,b=u.useMemo(function(){var P,_,j,F;return y==="left"||y==="right"?f==null||(P=f.axisStyles)==null||(_=P.y)==null?void 0:_[y]:f==null||(j=f.axisStyles)==null||(F=j.x)==null?void 0:F[y]},[f,y]),$=c.tickLabelProps,S=u.useMemo(function(){return $||b?function(P,_,j){return Oi({},b==null?void 0:b.tickLabel,{width:y==="left"||y==="right"?h==null?void 0:h[y]:void 0},typeof $=="function"?$(P,_,j):$)}:void 0},[$,b,y,h]),x=y==="bottom"?(w??0)-((t=h==null?void 0:h.bottom)!=null?t:0):y==="top"&&(n=h==null?void 0:h.top)!=null?n:0,T=y==="left"?(r=h==null?void 0:h.left)!=null?r:0:y==="right"?(v??0)-((o=h==null?void 0:h.right)!=null?o:0):0,O=y==="left"||y==="right"?m:p;return O?u.createElement(l,Oi({top:x,left:T,labelProps:b==null?void 0:b.axisLabel,stroke:b==null||(i=b.axisLine)==null?void 0:i.stroke,strokeWidth:b==null||(a=b.axisLine)==null?void 0:a.strokeWidth,tickLength:b==null?void 0:b.tickLength,tickStroke:b==null||(s=b.tickLine)==null?void 0:s.stroke},c,{tickLabelProps:S,scale:O})):null}var _i={};_i.__esModule=!0;var AM=_i.default=zM,IM=rv(u),LM=rv(Jo),FM=["from","to","fill","className","innerRef"];function rv(e){return e&&e.__esModule?e:{default:e}}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 jM(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function zM(e){var t=e.from,n=t===void 0?{x:0,y:0}:t,r=e.to,o=r===void 0?{x:1,y:1}:r,i=e.fill,a=i===void 0?"transparent":i,s=e.className,l=e.innerRef,c=jM(e,FM),d=n.x===o.x||n.y===o.y;return IM.default.createElement("line",_l({ref:l,className:(0,LM.default)("visx-line",s),x1:n.x,y1:n.y,x2:o.x,y2:o.y,fill:a,shapeRendering:d?"crispEdges":"auto"},c))}var Ni={};Ni.__esModule=!0,Ni.default=BM;function BM(e){return"bandwidth"in e?e.bandwidth():0}var WM=lv,ov=so(Qo),iv=so(u),UM=so(Jo),HM=so(_i),GM=Rm,av=xp,sv=Zm,VM=so(Ni),qM=["top","left","scale","width","stroke","strokeWidth","strokeDasharray","className","children","numTicks","lineStyle","offset","tickValues"];function so(e){return e&&e.__esModule?e:{default:e}}function Nl(){return Nl=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},Nl.apply(this,arguments)}function YM(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function lv(e){var t=e.top,n=t===void 0?0:t,r=e.left,o=r===void 0?0:r,i=e.scale,a=e.width,s=e.stroke,l=s===void 0?"#eaf0f6":s,c=e.strokeWidth,d=c===void 0?1:c,f=e.strokeDasharray,p=e.className,m=e.children,h=e.numTicks,v=h===void 0?10:h,w=e.lineStyle,y=e.offset,b=e.tickValues,$=YM(e,qM),S=b??(0,sv.getTicks)(i,v),x=(y??0)+(0,VM.default)(i)/2,T=S.map(function(O,P){var _,j=((_=(0,sv.coerceNumber)(i(O)))!=null?_:0)+x;return{index:P,from:new av.Point({x:0,y:j}),to:new av.Point({x:a,y:j})}});return iv.default.createElement(GM.Group,{className:(0,UM.default)("visx-rows",p),top:n,left:o},m?m({lines:T}):T.map(function(O){var P=O.from,_=O.to,j=O.index;return iv.default.createElement(HM.default,Nl({key:"row-line-"+j,from:P,to:_,stroke:l,strokeWidth:d,strokeDasharray:f,style:w},$))}))}lv.propTypes={tickValues:ov.default.array,width:ov.default.number.isRequired};var KM=pv,cv=lo(Qo),uv=lo(u),XM=lo(Jo),RM=lo(_i),ZM=Rm,dv=xp,fv=Zm,QM=lo(Ni),JM=["top","left","scale","height","stroke","strokeWidth","strokeDasharray","className","numTicks","lineStyle","offset","tickValues","children"];function lo(e){return e&&e.__esModule?e:{default:e}}function Dl(){return Dl=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},Dl.apply(this,arguments)}function ek(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function pv(e){var t=e.top,n=t===void 0?0:t,r=e.left,o=r===void 0?0:r,i=e.scale,a=e.height,s=e.stroke,l=s===void 0?"#eaf0f6":s,c=e.strokeWidth,d=c===void 0?1:c,f=e.strokeDasharray,p=e.className,m=e.numTicks,h=m===void 0?10:m,v=e.lineStyle,w=e.offset,y=e.tickValues,b=e.children,$=ek(e,JM),S=y??(0,fv.getTicks)(i,h),x=(w??0)+(0,QM.default)(i)/2,T=S.map(function(O,P){var _,j=((_=(0,fv.coerceNumber)(i(O)))!=null?_:0)+x;return{index:P,from:new dv.Point({x:j,y:0}),to:new dv.Point({x:j,y:a})}});return uv.default.createElement(ZM.Group,{className:(0,XM.default)("visx-columns",p),top:n,left:o},b?b({lines:T}):T.map(function(O){var P=O.from,_=O.to,j=O.index;return uv.default.createElement(RM.default,Dl({key:"column-line-"+j,from:P,to:_,stroke:l,strokeWidth:d,strokeDasharray:f,style:v},$))}))}pv.propTypes={tickValues:cv.default.array,height:cv.default.number.isRequired};var tk=["rows","columns","GridRowsComponent","GridColumnsComponent"];function Di(){return Di=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},Di.apply(this,arguments)}function nk(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function hv(e){var t=e.rows,n=t===void 0?!0:t,r=e.columns,o=r===void 0?!0:r,i=e.GridRowsComponent,a=e.GridColumnsComponent,s=nk(e,tk),l=u.useContext(Ot),c=l.theme,d=l.xScale,f=l.yScale,p=l.margin,m=l.innerWidth,h=l.innerHeight,v=c==null?void 0:c.gridStyles;return u.createElement(u.Fragment,null,n&&f&&m!=null&&u.createElement(i,Di({left:p==null?void 0:p.left,lineStyle:v,width:m,scale:f},s)),o&&d&&h!=null&&u.createElement(a,Di({top:p==null?void 0:p.top,lineStyle:v,height:h,scale:d},s)))}hv.propTypes={rows:ne.bool,columns:ne.bool};var rk={top:"top",left:"left",right:"right",bottom:"bottom"};const $t=rk;function ok(e){var t=e.labelOffset,n=e.labelProps,r=e.orientation,o=e.range,i=e.tickLabelFontSize,a=e.tickLength,s=r===$t.left||r===$t.top?-1:1,l,c,d;if(r===$t.top||r===$t.bottom){var f=r===$t.bottom&&typeof n.fontSize=="number"?n.fontSize:0;l=(Number(o[0])+Number(o[o.length-1]))/2,c=s*(a+t+i+f)}else l=s*((Number(o[0])+Number(o[o.length-1]))/2),c=-(a+t),d="rotate("+s*90+")";return{x:l,y:c,transform:d}}function co(){return co=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},co.apply(this,arguments)}function ik(e){var t=e.hideTicks,n=e.horizontal,r=e.orientation,o=e.tickClassName,i=e.tickComponent,a=e.tickLabelProps,s=e.tickStroke,l=s===void 0?"#222":s,c=e.tickTransform,d=e.ticks,f=e.strokeWidth,p=e.tickLineProps;return d.map(function(m){var h,v=m.value,w=m.index,y=m.from,b=m.to,$=m.formattedValue,S=(h=a[w])!=null?h:{},x=Math.max(10,typeof S.fontSize=="number"&&S.fontSize||0),T=b.y+(n&&r!==$t.top?x:0);return u.createElement(En,{key:"visx-tick-"+v+"-"+w,className:et("visx-axis-tick",o),transform:c},!t&&u.createElement(nv,co({from:y,to:b,stroke:l,strokeWidth:f,strokeLinecap:"square"},p)),i?i(co({},S,{x:b.x,y:T,formattedValue:$})):u.createElement(Es,co({x:b.x,y:T},S),$))})}function Ai(){return Ai=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},Ai.apply(this,arguments)}var mv={textAnchor:"middle",fontFamily:"Arial",fontSize:10,fill:"#222"};function ak(e){var t=e.axisFromPoint,n=e.axisLineClassName,r=e.axisToPoint,o=e.hideAxisLine,i=e.hideTicks,a=e.horizontal,s=e.label,l=s===void 0?"":s,c=e.labelClassName,d=e.labelOffset,f=d===void 0?14:d,p=e.labelProps,m=p===void 0?mv:p,h=e.orientation,v=h===void 0?$t.bottom:h,w=e.scale,y=e.stroke,b=y===void 0?"#222":y,$=e.strokeDasharray,S=e.strokeWidth,x=S===void 0?1:S,T=e.tickClassName,O=e.tickComponent,P=e.tickLineProps,_=e.tickLabelProps,j=e.tickLength,F=j===void 0?8:j,V=e.tickStroke,R=V===void 0?"#222":V,X=e.tickTransform,C=e.ticks,L=e.ticksComponent,H=L===void 0?ik:L,W=Ai({},mv,typeof _=="object"?_:null),D=C.map(function(z){var J=z.value,Q=z.index;return typeof _=="function"?_(J,Q,C):W}),N=Math.max.apply(Math,[10].concat(D.map(function(z){return typeof z.fontSize=="number"?z.fontSize:0})));return u.createElement(u.Fragment,null,H({hideTicks:i,horizontal:a,orientation:v,scale:w,tickClassName:T,tickComponent:O,tickLabelProps:D,tickStroke:R,tickTransform:X,ticks:C,strokeWidth:x,tickLineProps:P}),!o&&u.createElement(nv,{className:et("visx-axis-line",n),from:t,to:r,stroke:b,strokeWidth:x,strokeDasharray:$}),l&&u.createElement(Es,Ai({className:et("visx-axis-label",c)},ok({labelOffset:f,labelProps:m,orientation:v,range:w.range(),tickLabelFontSize:N,tickLength:F}),m),l))}function sk(e,t){t===void 0&&(t="center");var n=e;if(t!=="start"&&"bandwidth"in n){var r=n.bandwidth();return t==="center"&&(r/=2),n.round()&&(r=Math.round(r)),function(o){var i=n(o);return typeof i=="number"?i+r:i}}return e}function lk(e){var t=e;return"tickFormat"in t?t.tickFormat():Xm}function Ii(e,t){var n=e.x,r=e.y;return new an(t?{x:n,y:r}:{x:r,y:n})}function Al(){return Al=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},Al.apply(this,arguments)}var Il=0;function ck(e){return e===void 0&&(e=Il),typeof e=="number"?{start:e,end:e}:Al({start:Il,end:Il},e)}var uk=["children","axisClassName","hideAxisLine","hideTicks","hideZero","left","numTicks","orientation","rangePadding","scale","tickFormat","tickLength","tickValues","top"];function Ll(){return Ll=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},Ll.apply(this,arguments)}function dk(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function Fl(e){var t=e.children,n=t===void 0?ak:t,r=e.axisClassName,o=e.hideAxisLine,i=o===void 0?!1:o,a=e.hideTicks,s=a===void 0?!1:a,l=e.hideZero,c=l===void 0?!1:l,d=e.left,f=d===void 0?0:d,p=e.numTicks,m=p===void 0?10:p,h=e.orientation,v=h===void 0?$t.bottom:h,w=e.rangePadding,y=w===void 0?0:w,b=e.scale,$=e.tickFormat,S=e.tickLength,x=S===void 0?8:S,T=e.tickValues,O=e.top,P=O===void 0?0:O,_=dk(e,uk),j=$??lk(b),F=v===$t.left,V=v===$t.top,R=V||v===$t.bottom,X=sk(b),C=F||V?-1:1,L=b.range(),H=ck(y),W=Ii({x:Number(L[0])+.5-H.start,y:0},R),D=Ii({x:Number(L[L.length-1])+.5+H.end,y:0},R),N=(T??bl(b,m)).filter(function(J){return!c||J!==0&&J!=="0"}).map(function(J,Q){return{value:J,index:Q}}),z=N.map(function(J){var Q=J.value,oe=J.index,te=yl(X(Q));return{value:Q,index:oe,from:Ii({x:te,y:0},R),to:Ii({x:te,y:x*C},R),formattedValue:j(Q,oe,N)}});return u.createElement(En,{className:et("visx-axis",r),top:P,left:f},n(Ll({},_,{axisFromPoint:W,axisToPoint:D,hideAxisLine:i,hideTicks:s,hideZero:c,horizontal:R,numTicks:m,orientation:v,rangePadding:y,scale:b,tickFormat:j,tickLength:x,tickPosition:X,tickSign:C,ticks:z})))}function jl(){return jl=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},jl.apply(this,arguments)}function vv(e){return u.createElement(DM,jl({AxisComponent:Fl},e))}function zl(){return zl=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},zl.apply(this,arguments)}function fk(e){return u.createElement(hv,zl({GridRowsComponent:WM,GridColumnsComponent:KM},e))}var pk=["tooltipOpen"];function hk(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function Li(){return Li=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},Li.apply(this,arguments)}function Bl(e){var t=u.useState(Li({tooltipOpen:!1},e)),n=t[0],r=t[1],o=u.useCallback(function(a){return r(typeof a=="function"?function(s){s.tooltipOpen;var l=hk(s,pk);return Li({},a(l),{tooltipOpen:!0})}:{tooltipOpen:!0,tooltipLeft:a.tooltipLeft,tooltipTop:a.tooltipTop,tooltipData:a.tooltipData})},[r]),i=u.useCallback(function(){return r({tooltipOpen:!1,tooltipLeft:void 0,tooltipTop:void 0,tooltipData:void 0})},[r]);return{tooltipOpen:n.tooltipOpen,tooltipLeft:n.tooltipLeft,tooltipTop:n.tooltipTop,tooltipData:n.tooltipData,updateTooltip:r,showTooltip:o,hideTooltip:i}}function mk(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Wl(e,t)}function Wl(e,t){return Wl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},Wl(e,t)}var gv=function(e){mk(t,e);function t(){return e.apply(this,arguments)||this}var n=t.prototype;return n.componentWillUnmount=function(){this.node&&document.body&&(document.body.removeChild(this.node),delete this.node)},n.render=function(){return!this.node&&typeof document<"u"&&(this.node=document.createElement("div"),this.props.zIndex!=null&&(this.node.style.zIndex=""+this.props.zIndex),document.body.append(this.node)),this.node?Dt.createPortal(this.props.children,this.node):null},t}(u.PureComponent);gv.propTypes={zIndex:ne.oneOfType([ne.number,ne.string])};var vk=["className","top","left","offsetLeft","offsetTop","style","children","unstyled","applyPositionStyle"];function Fi(){return Fi=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},Fi.apply(this,arguments)}function gk(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var Ul={position:"absolute",backgroundColor:"white",color:"#666666",padding:".3rem .5rem",borderRadius:"3px",fontSize:"14px",boxShadow:"0 1px 2px rgba(33,33,33,0.2)",lineHeight:"1em",pointerEvents:"none"},Hl=u.forwardRef(function(e,t){var n=e.className,r=e.top,o=e.left,i=e.offsetLeft,a=i===void 0?10:i,s=e.offsetTop,l=s===void 0?10:s,c=e.style,d=c===void 0?Ul:c,f=e.children,p=e.unstyled,m=p===void 0?!1:p,h=e.applyPositionStyle,v=h===void 0?!1:h,w=gk(e,vk);return u.createElement("div",Fi({ref:t,className:et("visx-tooltip",n),style:Fi({top:r==null||l==null?r:r+l,left:o==null||a==null?o:o+a},v&&{position:"absolute"},!m&&d)},w),f)});Hl.propTypes={children:ne.node,className:ne.string,left:ne.number,offsetLeft:ne.number,offsetTop:ne.number,top:ne.number,applyPositionStyle:ne.bool,unstyled:ne.bool},Hl.displayName="Tooltip";const yv=Hl;function Gl(){return Gl=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},Gl.apply(this,arguments)}function yk(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function bk(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Vl(e,t)}function Vl(e,t){return Vl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},Vl(e,t)}var bv={top:0,right:0,bottom:0,left:0,width:0,height:0};function wk(e){var t;return t=function(n){bk(r,n);function r(i){var a;return a=n.call(this,i)||this,a.state={rect:void 0,parentRect:void 0},a.nodeRef=u.createRef(),a.getRects=a.getRects.bind(yk(a)),a}var o=r.prototype;return o.componentDidMount=function(){var a,s=this;this.node=(a=this.nodeRef)!=null&&a.current?this.nodeRef.current:Dt.findDOMNode(this),this.setState(function(){return s.getRects()})},o.getRects=function(){if(!this.node)return this.state;var a=this.node,s=a.parentNode,l=a.getBoundingClientRect?a.getBoundingClientRect():bv,c=s!=null&&s.getBoundingClientRect?s.getBoundingClientRect():bv;return{rect:l,parentRect:c}},o.render=function(){return u.createElement(e,Gl({nodeRef:this.nodeRef,getRects:this.getRects},this.state,this.props))},r}(u.PureComponent),t.displayName="withBoundingRects("+(e.displayName||"")+")",t}var wv=u.createContext({isFlippedVertically:!1,isFlippedHorizontally:!1}),xk=wv.Provider;wv.Consumer;var $k=["children","getRects","left","offsetLeft","offsetTop","parentRect","rect","style","top","unstyled","nodeRef"];function ji(){return ji=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},ji.apply(this,arguments)}function Ck(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function xv(e){var t=e.children;e.getRects;var n=e.left,r=n===void 0?0:n,o=e.offsetLeft,i=o===void 0?10:o,a=e.offsetTop,s=a===void 0?10:a,l=e.parentRect,c=e.rect,d=e.style,f=d===void 0?Ul:d,p=e.top,m=p===void 0?0:p,h=e.unstyled,v=h===void 0?!1:h,w=e.nodeRef,y=Ck(e,$k),b,$=!1,S=!1;if(c&&l){var x=r,T=m;if(l.width){var O=x+i+c.width-l.width,P=c.width-x-i;$=O>0&&O>P}else{var _=x+i+c.width-window.innerWidth,j=c.width-x-i;$=_>0&&_>j}if(l.height){var F=T+s+c.height-l.height,V=c.height-T-s;S=F>0&&F>V}else S=T+s+c.height>window.innerHeight;x=$?x-c.width-i:x+i,T=S?T-c.height-s:T+s,x=Math.round(x),T=Math.round(T),b="translate("+x+"px, "+T+"px)"}return u.createElement(yv,ji({ref:w,style:ji({left:0,top:0,transform:b},!v&&f)},y),u.createElement(xk,{value:{isFlippedVertically:!S,isFlippedHorizontally:!$}},t))}xv.propTypes={nodeRef:ne.oneOfType([ne.string,ne.func,ne.object])};const Sk=wk(xv);var Ek=["detectBounds","zIndex"],Tk=["left","top","detectBounds","zIndex"];function ql(){return ql=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},ql.apply(this,arguments)}function $v(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function Yl(e){var t=e===void 0?{}:e,n=t.detectBounds,r=n===void 0?!0:n,o=t.zIndex,i=$v(t,Ek),a=nE(i),s=a[0],l=a[1],c=a[2],d=u.useState(!1),f=d[0],p=d[1];u.useEffect(function(){p(!1)},[]);var m=u.useMemo(function(){return function(h){var v=h.left,w=v===void 0?0:v,y=h.top,b=y===void 0?0:y,$=h.detectBounds,S=h.zIndex,x=$v(h,Tk),T=$??r,O=S??o,P=T?Sk:yv,_=f?0:window.scrollX,j=f?0:window.scrollY,F=w+(l.left||0)+_,V=b+(l.top||0)+j;return u.createElement(gv,{zIndex:O},u.createElement(P,ql({left:F,top:V},x)))}},[r,o,l.left,l.top,f]);return{containerRef:s,containerBounds:l,forceRefreshBounds:c,TooltipInPortal:m}}var Pk=u.createContext(null);const uo=Pk;var Mk=["debounce","detectBounds","horizontalCrosshairStyle","glyphStyle","renderTooltip","renderGlyph","resizeObserverPolyfill","scroll","showDatumGlyph","showHorizontalCrosshair","showSeriesGlyphs","showVerticalCrosshair","snapTooltipToDatumX","snapTooltipToDatumY","verticalCrosshairStyle","zIndex"],kk=["x","y"];function Cv(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function Vt(){return Vt=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},Vt.apply(this,arguments)}var Kl={position:"absolute",pointerEvents:"none",fontSize:0,lineHeight:0},Ok={position:"absolute",left:0,top:0,opacity:0,width:0,height:0,pointerEvents:"none"};function Sv(e){var t=u.useContext(Ot)||{},n=t.theme;return u.createElement("circle",Vt({cx:e.x,cy:e.y,r:e.size,fill:e.color,stroke:n==null?void 0:n.backgroundColor,strokeWidth:1.5,paintOrder:"fill"},e.glyphStyle))}Sv.propTypes={isNearestDatum:ne.bool.isRequired};function _k(e){return u.createElement(Sv,e)}function Ev(e){var t,n,r,o,i,a,s,l,c,d,f,p,m,h=e.debounce,v=e.detectBounds,w=e.horizontalCrosshairStyle,y=e.glyphStyle,b=e.renderTooltip,$=e.renderGlyph,S=$===void 0?_k:$,x=e.resizeObserverPolyfill,T=e.scroll,O=T===void 0?!0:T,P=e.showDatumGlyph,_=P===void 0?!1:P,j=e.showHorizontalCrosshair,F=j===void 0?!1:j,V=e.showSeriesGlyphs,R=V===void 0?!1:V,X=e.showVerticalCrosshair,C=X===void 0?!1:X,L=e.snapTooltipToDatumX,H=L===void 0?!1:L,W=e.snapTooltipToDatumY,D=W===void 0?!1:W,N=e.verticalCrosshairStyle,z=e.zIndex,J=Cv(e,Mk),Q=u.useContext(Ot)||{},oe=Q.colorScale,te=Q.theme,ae=Q.innerHeight,Y=Q.innerWidth,le=Q.margin,U=Q.xScale,q=Q.yScale,re=Q.dataRegistry,k=Q.resizeObserverPolyfill,de=u.useContext(uo),pe=Yl({debounce:h,detectBounds:v,polyfill:k||x,scroll:O,zIndex:z}),Ce=pe.containerRef,ke=pe.TooltipInPortal,je=pe.forceRefreshBounds,_t=u.useCallback(function(Qe){var pt;Ce((pt=Qe==null?void 0:Qe.parentElement)!=null?pt:null)},[Ce]),mn=de!=null&&de.tooltipOpen?b(Vt({},de,{colorScale:oe})):null,Ze=(de==null?void 0:de.tooltipOpen)&&mn!=null,qt=u.useRef(!1);u.useEffect(function(){Ze&&!qt.current&&je(),qt.current=Ze},[Ze,je]);var yr=de==null?void 0:de.tooltipLeft,Le=de==null?void 0:de.tooltipTop,Zi=U?xl(U):0,Qi=q?xl(q):0,ho=u.useCallback(function(Qe,pt){var Kt,Xt,lt=re==null?void 0:re.get(Qe),Wn=lt==null?void 0:lt.xAccessor,Un=lt==null?void 0:lt.yAccessor,wr=U&&Wn?(Kt=Number(U(Wn(pt)))+Zi/2)!=null?Kt:0:void 0,xr=q&&Un?(Xt=Number(q(Un(pt)))+Qi/2)!=null?Xt:0:void 0;return{left:wr,top:xr}},[re,Zi,Qi,U,q]),rt=de==null||(t=de.tooltipData)==null?void 0:t.nearestDatum,vn=(n=rt==null?void 0:rt.key)!=null?n:"";if(Ze&&rt&&(H||D)){var zn=ho(vn,rt.datum),Bn=zn.left,mo=zn.top;yr=H&&ft(Bn)?Bn:yr,Le=D&&ft(mo)?mo:Le}var br=[];if(Ze&&(_||R)){var Ji,ea=Number((Ji=y==null?void 0:y.radius)!=null?Ji:4);if(R){var vo,ta;Object.values((vo=de==null||(ta=de.tooltipData)==null?void 0:ta.datumByKey)!=null?vo:{}).forEach(function(Qe){var pt,Kt,Xt,lt=Qe.key,Wn=Qe.datum,Un=Qe.index,wr=(pt=(Kt=oe==null?void 0:oe(lt))!=null?Kt:te==null||(Xt=te.htmlLabel)==null?void 0:Xt.color)!=null?pt:"#222",xr=ho(lt,Wn),aa=xr.left,sa=xr.top;!ft(aa)||!ft(sa)||br.push({key:lt,color:wr,datum:Wn,index:Un,size:ea,x:aa,y:sa,glyphStyle:y,isNearestDatum:rt?rt.key===lt:!1})})}else if(rt){var na=ho(vn,rt.datum),Nt=na.left,Yt=na.top;if(ft(Nt)&&ft(Yt)){var go,yo,bo,ra,oa,st,ia=(go=(yo=(bo=(ra=vn&&(oe==null?void 0:oe(vn)))!=null?ra:null)!=null?bo:te==null||(oa=te.gridStyles)==null?void 0:oa.stroke)!=null?yo:te==null||(st=te.htmlLabel)==null?void 0:st.color)!=null?go:"#222";br.push({key:vn,color:ia,datum:rt.datum,index:rt.index,size:ea,x:Nt,y:Yt,glyphStyle:y,isNearestDatum:!0})}}}return u.createElement(u.Fragment,null,u.createElement("svg",{ref:_t,style:Ok}),Ze&&u.createElement(u.Fragment,null,C&&u.createElement(ke,{className:"visx-crosshair visx-crosshair-vertical",left:yr,top:le==null?void 0:le.top,offsetLeft:0,offsetTop:0,detectBounds:!1,style:Kl},u.createElement("svg",{width:"1",height:ae,overflow:"visible"},u.createElement("line",Vt({x1:0,x2:0,y1:0,y2:ae,strokeWidth:1.5,stroke:(r=(o=te==null||(i=te.gridStyles)==null?void 0:i.stroke)!=null?o:te==null||(a=te.htmlLabel)==null?void 0:a.color)!=null?r:"#222"},N)))),F&&u.createElement(ke,{className:"visx-crosshair visx-crosshair-horizontal",left:le==null?void 0:le.left,top:Le,offsetLeft:0,offsetTop:0,detectBounds:!1,style:Kl},u.createElement("svg",{width:Y,height:"1",overflow:"visible"},u.createElement("line",Vt({x1:0,x2:Y,y1:0,y2:0,strokeWidth:1.5,stroke:(s=(l=te==null||(c=te.gridStyles)==null?void 0:c.stroke)!=null?l:te==null||(d=te.htmlLabel)==null?void 0:d.color)!=null?s:"#222"},w)))),br.map(function(Qe,pt){var Kt=Qe.x,Xt=Qe.y,lt=Cv(Qe,kk);return u.createElement(ke,{key:pt,className:"visx-tooltip-glyph",left:Kt,top:Xt,offsetLeft:0,offsetTop:0,detectBounds:!1,style:Kl},u.createElement("svg",{overflow:"visible"},S(Vt({x:0,y:0},lt))))}),u.createElement(ke,Vt({left:yr,top:Le,style:Vt({},Ul,{background:(f=te==null?void 0:te.backgroundColor)!=null?f:"white",boxShadow:"0 1px 2px "+(te!=null&&(p=te.htmlLabel)!=null&&p.color?(te==null||(m=te.htmlLabel)==null?void 0:m.color)+"55":"#22222255")},te==null?void 0:te.htmlLabel)},J),mn)))}Ev.propTypes={renderTooltip:ne.func.isRequired,renderGlyph:ne.func,snapTooltipToDatumX:ne.bool,snapTooltipToDatumY:ne.bool,showVerticalCrosshair:ne.bool,showHorizontalCrosshair:ne.bool,showDatumGlyph:ne.bool,showSeriesGlyphs:ne.bool};function Tv(e){var t=u.useContext(uo);return t!=null&&t.tooltipOpen?u.createElement(Ev,e):null}Tv.propTypes={renderTooltip:ne.func.isRequired,renderGlyph:ne.func,snapTooltipToDatumX:ne.bool,snapTooltipToDatumY:ne.bool,showVerticalCrosshair:ne.bool,showHorizontalCrosshair:ne.bool,showDatumGlyph:ne.bool,showSeriesGlyphs:ne.bool};var Nk=ni,Dk=function(){return Nk.Date.now()},Ak=Dk,Ik=/\s/;function Lk(e){for(var t=e.length;t--&&Ik.test(e.charAt(t)););return t}var Fk=Lk,jk=Fk,zk=/^\s+/;function Bk(e){return e&&e.slice(0,jk(e)+1).replace(zk,"")}var Wk=Bk;function Uk(e){return e!=null&&typeof e=="object"}var Hk=Uk,Gk=up,Vk=Hk,qk="[object Symbol]";function Yk(e){return typeof e=="symbol"||Vk(e)&&Gk(e)==qk}var Kk=Yk,Xk=Wk,Pv=ri,Rk=Kk,Mv=0/0,Zk=/^[-+]0x[0-9a-f]+$/i,Qk=/^0b[01]+$/i,Jk=/^0o[0-7]+$/i,eO=parseInt;function tO(e){if(typeof e=="number")return e;if(Rk(e))return Mv;if(Pv(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Pv(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Xk(e);var n=Qk.test(e);return n||Jk.test(e)?eO(e.slice(2),n?2:8):Zk.test(e)?Mv:+e}var nO=tO,rO=ri,Xl=Ak,kv=nO,oO="Expected a function",iO=Math.max,aO=Math.min;function sO(e,t,n){var r,o,i,a,s,l,c=0,d=!1,f=!1,p=!0;if(typeof e!="function")throw new TypeError(oO);t=kv(t)||0,rO(n)&&(d=!!n.leading,f="maxWait"in n,i=f?iO(kv(n.maxWait)||0,t):i,p="trailing"in n?!!n.trailing:p);function m(T){var O=r,P=o;return r=o=void 0,c=T,a=e.apply(P,O),a}function h(T){return c=T,s=setTimeout(y,t),d?m(T):a}function v(T){var O=T-l,P=T-c,_=t-O;return f?aO(_,i-P):_}function w(T){var O=T-l,P=T-c;return l===void 0||O>=t||O<0||f&&P>=i}function y(){var T=Xl();if(w(T))return b(T);s=setTimeout(y,v(T))}function b(T){return s=void 0,p&&r?m(T):(r=o=void 0,a)}function $(){s!==void 0&&clearTimeout(s),c=0,r=l=o=s=void 0}function S(){return s===void 0?a:b(Xl())}function x(){var T=Xl(),O=w(T);if(r=arguments,o=this,l=T,O){if(s===void 0)return h(l);if(f)return clearTimeout(s),s=setTimeout(y,t),m(l)}return s===void 0&&(s=setTimeout(y,t)),a}return x.cancel=$,x.flush=S,x}var Ov=sO;const _v=Qn(Ov);var lO=Av,dn=Dv(Qo),cO=Dv(Ov),mr=dO(u),uO=["className","children","debounceTime","ignoreDimensions","parentSizeStyles","enableDebounceLeadingCall","resizeObserverPolyfill"];function Nv(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(Nv=function(o){return o?n:t})(e)}function dO(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=Nv(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}function Dv(e){return e&&e.__esModule?e:{default:e}}function zi(){return zi=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},zi.apply(this,arguments)}function fO(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var pO=[],hO={width:"100%",height:"100%"};function Av(e){var t=e.className,n=e.children,r=e.debounceTime,o=r===void 0?300:r,i=e.ignoreDimensions,a=i===void 0?pO:i,s=e.parentSizeStyles,l=s===void 0?hO:s,c=e.enableDebounceLeadingCall,d=c===void 0?!0:c,f=e.resizeObserverPolyfill,p=fO(e,uO),m=(0,mr.useRef)(null),h=(0,mr.useRef)(0),v=(0,mr.useState)({width:0,height:0,top:0,left:0}),w=v[0],y=v[1],b=(0,mr.useMemo)(function(){var $=Array.isArray(a)?a:[a];return(0,cO.default)(function(S){y(function(x){var T=Object.keys(x),O=T.filter(function(_){return x[_]!==S[_]}),P=O.every(function(_){return $.includes(_)});return P?x:S})},o,{leading:d})},[o,d,a]);return(0,mr.useEffect)(function(){var $=f||window.ResizeObserver,S=new $(function(x){x.forEach(function(T){var O,P=(O=T==null?void 0:T.contentRect)!=null?O:{},_=P.left,j=P.top,F=P.width,V=P.height;h.current=window.requestAnimationFrame(function(){b({width:F,height:V,top:j,left:_})})})});return m.current&&S.observe(m.current),function(){window.cancelAnimationFrame(h.current),S.disconnect(),b.cancel()}},[b,f]),mr.default.createElement("div",zi({style:l,ref:m,className:t},p),n(zi({},w,{ref:m.current,resize:b})))}Av.propTypes={className:dn.default.string,debounceTime:dn.default.number,enableDebounceLeadingCall:dn.default.bool,ignoreDimensions:dn.default.oneOfType([dn.default.any,dn.default.arrayOf(dn.default.any)]),children:dn.default.func.isRequired};var mO=u.createContext(null);const Iv=mO;function fn(e,t,n){var r=u.useContext(Iv),o=u.useRef();o.current=n;var i=u.useCallback(function(a,s,l){r&&r.emit(a,{event:s,svgPoint:gE(s),source:l})},[r]);return u.useEffect(function(){if(r&&e&&t){var a=function(l){var c;(!o.current||l!=null&&l.source&&(c=o.current)!=null&&c.includes(l.source))&&t(l)};return r.on(e,a),function(){return r==null?void 0:r.off(e,a)}}},[r,e,t]),r?i:null}function vO(e){return{all:e=e||new Map,on:function(t,n){var r=e.get(t);r&&r.push(n)||e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&r.splice(r.indexOf(n)>>>0,1)},emit:function(t,n){(e.get(t)||[]).slice().map(function(r){r(n)}),(e.get("*")||[]).slice().map(function(r){r(t,n)})}}}function gO(e){var t=e.children,n=u.useMemo(function(){return vO()},[]);return u.createElement(Iv.Provider,{value:n},t)}function Rl(){return Rl=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},Rl.apply(this,arguments)}function Lv(e){var t=e.hideTooltipDebounceMs,n=t===void 0?400:t,r=e.children,o=Bl(void 0),i=o.tooltipOpen,a=o.tooltipLeft,s=o.tooltipTop,l=o.tooltipData,c=o.updateTooltip,d=o.hideTooltip,f=u.useRef(null);function p(){f.current&&(f.current.cancel(),f.current=null)}u.useEffect(function(){return p},[]);var m=u.useRef(function(w){var y=w.svgPoint,b=w.index,$=w.key,S=w.datum,x=w.distanceX,T=w.distanceY;p();var O=ft(x)?x:1/0,P=ft(T)?T:1/0,_=Math.sqrt(Math.pow(O,2)+Math.pow(P,2));c(function(j){var F,V,R,X=j.tooltipData,C=X!=null&&X.nearestDatum&&ft(X.nearestDatum.distance)?X.nearestDatum.distance:1/0;return{tooltipOpen:!0,tooltipLeft:y==null?void 0:y.x,tooltipTop:y==null?void 0:y.y,tooltipData:{nearestDatum:((F=X==null||(V=X.nearestDatum)==null?void 0:V.key)!=null?F:"")!==$&&C<_?X==null?void 0:X.nearestDatum:{key:$,index:b,datum:S,distance:_},datumByKey:Rl({},X==null?void 0:X.datumByKey,(R={},R[$]={datum:S,index:b,key:$},R))}}})}),h=u.useCallback(function(){f.current=_v(d,n),f.current()},[d,n]),v=u.useMemo(function(){return{tooltipOpen:i,tooltipLeft:a,tooltipTop:s,tooltipData:l,updateTooltip:c,showTooltip:m.current,hideTooltip:h}},[h,l,a,i,s,c]);return u.createElement(uo.Provider,{value:v},r)}Lv.propTypes={hideTooltipDebounceMs:ne.number,children:ne.node.isRequired};const yO=Jn(pP);var fo={},Zl={};Zl.__esModule=!0,Zl.default=bO;function bO(e,t){t.domain&&("nice"in e||"quantiles"in e||"padding"in e,e.domain(t.domain))}var Ql={};Ql.__esModule=!0,Ql.default=wO;function wO(e,t){t.range&&("padding"in e,e.range(t.range))}var Jl={};Jl.__esModule=!0,Jl.default=xO;function xO(e,t){"align"in e&&"align"in t&&typeof t.align<"u"&&e.align(t.align)}var ec={};ec.__esModule=!0,ec.default=$O;function $O(e,t){"base"in e&&"base"in t&&typeof t.base<"u"&&e.base(t.base)}var tc={};tc.__esModule=!0,tc.default=CO;function CO(e,t){"clamp"in e&&"clamp"in t&&typeof t.clamp<"u"&&e.clamp(t.clamp)}var nc={};nc.__esModule=!0,nc.default=SO;function SO(e,t){"constant"in e&&"constant"in t&&typeof t.constant<"u"&&e.constant(t.constant)}var rc={};rc.__esModule=!0,rc.default=EO;function EO(e,t){"exponent"in e&&"exponent"in t&&typeof t.exponent<"u"&&e.exponent(t.exponent)}var oc={},ic={};const Fv=Jn(xP);ic.__esModule=!0,ic.default=TO;var pn=Fv,jv={lab:pn.interpolateLab,hcl:pn.interpolateHcl,"hcl-long":pn.interpolateHclLong,hsl:pn.interpolateHsl,"hsl-long":pn.interpolateHslLong,cubehelix:pn.interpolateCubehelix,"cubehelix-long":pn.interpolateCubehelixLong,rgb:pn.interpolateRgb};function TO(e){switch(e){case"lab":case"hcl":case"hcl-long":case"hsl":case"hsl-long":case"cubehelix":case"cubehelix-long":case"rgb":return jv[e]}var t=e.type,n=e.gamma,r=jv[t];return typeof n>"u"?r:r.gamma(n)}oc.__esModule=!0,oc.default=kO;var PO=MO(ic);function MO(e){return e&&e.__esModule?e:{default:e}}function kO(e,t){if("interpolate"in t&&"interpolate"in e&&typeof t.interpolate<"u"){var n=(0,PO.default)(t.interpolate);e.interpolate(n)}}var ac={};const OO=Jn(SP);var sc={};sc.__esModule=!0,sc.default=DO;var _O=new Date(Date.UTC(2020,1,2,3,4,5)),NO="%Y-%m-%d %H:%M";function DO(e){var t=e.tickFormat(1,NO)(_O);return t==="2020-02-02 03:04"}ac.__esModule=!0,ac.default=LO;var tt=OO,AO=IO(sc);function IO(e){return e&&e.__esModule?e:{default:e}}var zv={day:tt.timeDay,hour:tt.timeHour,minute:tt.timeMinute,month:tt.timeMonth,second:tt.timeSecond,week:tt.timeWeek,year:tt.timeYear},Bv={day:tt.utcDay,hour:tt.utcHour,minute:tt.utcMinute,month:tt.utcMonth,second:tt.utcSecond,week:tt.utcWeek,year:tt.utcYear};function LO(e,t){if("nice"in t&&typeof t.nice<"u"&&"nice"in e){var n=t.nice;if(typeof n=="boolean")n&&e.nice();else if(typeof n=="number")e.nice(n);else{var r=e,o=(0,AO.default)(r);if(typeof n=="string")r.nice(o?Bv[n]:zv[n]);else{var i=n.interval,a=n.step,s=(o?Bv[i]:zv[i]).every(a);s!=null&&r.nice(s)}}}}var lc={};lc.__esModule=!0,lc.default=FO;function FO(e,t){"padding"in e&&"padding"in t&&typeof t.padding<"u"&&e.padding(t.padding),"paddingInner"in e&&"paddingInner"in t&&typeof t.paddingInner<"u"&&e.paddingInner(t.paddingInner),"paddingOuter"in e&&"paddingOuter"in t&&typeof t.paddingOuter<"u"&&e.paddingOuter(t.paddingOuter)}var cc={};cc.__esModule=!0,cc.default=jO;function jO(e,t){if(t.reverse){var n=e.range().slice().reverse();"padding"in e,e.range(n)}}var uc={};uc.__esModule=!0,uc.default=BO;var zO=Fv;function BO(e,t){"round"in t&&typeof t.round<"u"&&(t.round&&"interpolate"in t&&typeof t.interpolate<"u"?console.warn("[visx/scale/applyRound] ignoring round: scale config contains round and interpolate. only applying interpolate. config:",t):"round"in e?e.round(t.round):"interpolate"in e&&t.round&&e.interpolate(zO.interpolateRound))}var dc={};dc.__esModule=!0,dc.default=WO;function WO(e,t){"unknown"in e&&"unknown"in t&&typeof t.unknown<"u"&&e.unknown(t.unknown)}var fc={};fc.__esModule=!0,fc.default=UO;function UO(e,t){if("zero"in t&&t.zero===!0){var n=e.domain(),r=n[0],o=n[1],i=o<r,a=i?[o,r]:[r,o],s=a[0],l=a[1],c=[Math.min(0,s),Math.max(0,l)];e.domain(i?c.reverse():c)}}fo.__esModule=!0,fo.ALL_OPERATORS=void 0,fo.default=o_;var HO=nt(Zl),GO=nt(Ql),VO=nt(Jl),qO=nt(ec),YO=nt(tc),KO=nt(nc),XO=nt(rc),RO=nt(oc),ZO=nt(ac),QO=nt(lc),JO=nt(cc),e_=nt(uc),t_=nt(dc),n_=nt(fc);function nt(e){return e&&e.__esModule?e:{default:e}}var Wv=["domain","nice","zero","interpolate","round","range","reverse","align","base","clamp","constant","exponent","padding","unknown"];fo.ALL_OPERATORS=Wv;var r_={domain:HO.default,nice:ZO.default,zero:n_.default,interpolate:RO.default,round:e_.default,align:VO.default,base:qO.default,clamp:YO.default,constant:KO.default,exponent:XO.default,padding:QO.default,range:GO.default,reverse:JO.default,unknown:t_.default};function o_(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=new Set(t),o=Wv.filter(function(i){return r.has(i)});return function(a,s){return typeof s<"u"&&o.forEach(function(l){r_[l](a,s)}),a}}var i_=u_,a_=yO,s_=l_(fo);function l_(e){return e&&e.__esModule?e:{default:e}}var c_=(0,s_.default)("domain","range","reverse","unknown");function u_(e){return c_((0,a_.scaleOrdinal)(),e)}var hn={red:["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],pink:["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],grape:["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],violet:["#f3f0ff","#e5dbff","#d0bfff","#b197fc","#9775fa","#845ef7","#7950f2","#7048e8","#6741d9","#5f3dc4"],indigo:["#edf2ff","#dbe4ff","#bac8ff","#91a7ff","#748ffc","#5c7cfa","#4c6ef5","#4263eb","#3b5bdb","#364fc7"],blue:["#e8f7ff","#ccedff","#a3daff","#72c3fc","#4dadf7","#329af0","#228ae6","#1c7cd6","#1b6ec2","#1862ab"],cyan:["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],teal:["#e6fcf5","#c3fae8","#96f2d7","#63e6be","#38d9a9","#20c997","#12b886","#0ca678","#099268","#087f5b"],green:["#ebfbee","#d3f9d8","#b2f2bb","#8ce99a","#69db7c","#51cf66","#40c057","#37b24d","#2f9e44","#2b8a3e"],lime:["#f4fce3","#e9fac8","#d8f5a2","#c0eb75","#a9e34b","#94d82d","#82c91e","#74b816","#66a80f","#5c940d"],yellow:["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],orange:["#fff4e6","#ffe8cc","#ffd8a8","#ffc078","#ffa94d","#ff922b","#fd7e14","#f76707","#e8590c","#d9480f"],gray:["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"]},po=hn.gray,pc=po[7],d_=[hn.cyan[9],hn.cyan[3],hn.yellow[5],hn.red[4],hn.grape[8],hn.grape[5],hn.pink[9]];function Ae(){return Ae=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},Ae.apply(this,arguments)}var hc={fontFamily:"-apple-system,BlinkMacSystemFont,Roboto,Helvetica Neue,sans-serif",fontWeight:700,fontSize:12,textAnchor:"middle",pointerEvents:"none",letterSpacing:.4};function f_(e){var t,n,r,o,i,a,s=Ae({},hc,{fill:pc,stroke:"none"},e.svgLabelBig),l=Ae({},hc,{fontWeight:200,fontSize:11,fill:pc,stroke:"none"},e.svgLabelSmall),c=Ae({color:(t=(n=(r=(o=e.htmlLabel)==null?void 0:o.color)!=null?r:(i=e.svgLabelBig)==null?void 0:i.fill)!=null?n:(a=e.svgLabelSmall)==null?void 0:a.fill)!=null?t:pc},hc,e.htmlLabel);return{backgroundColor:e.backgroundColor,colors:[].concat(e.colors),htmlLabel:Ae({},c),svgLabelSmall:Ae({},l),svgLabelBig:Ae({},s),gridStyles:Ae({stroke:e.gridColor,strokeWidth:1},e.gridStyles),axisStyles:{x:{top:{axisLabel:Ae({},s,{dy:"-0.25em"}),axisLine:Ae({stroke:e.gridColorDark,strokeWidth:2},e.xAxisLineStyles),tickLabel:Ae({},l,{dy:"-0.25em"}),tickLength:e.tickLength,tickLine:Ae({strokeWidth:1,stroke:e.gridColor},e.xTickLineStyles)},bottom:{axisLabel:Ae({},s,{dy:"-0.25em"}),axisLine:Ae({stroke:e.gridColorDark,strokeWidth:2},e.xAxisLineStyles),tickLabel:Ae({},l,{dy:"0.125em"}),tickLength:e.tickLength,tickLine:Ae({strokeWidth:1,stroke:e.gridColor},e.xTickLineStyles)}},y:{left:{axisLabel:Ae({},s,{dx:"-1.25em"}),axisLine:Ae({stroke:e.gridColor,strokeWidth:1},e.yAxisLineStyles),tickLabel:Ae({},l,{textAnchor:"end",dx:"-0.25em",dy:"0.25em"}),tickLength:e.tickLength,tickLine:Ae({strokeWidth:1,stroke:e.gridColor},e.yTickLineStyles)},right:{axisLabel:Ae({},s,{dx:"1.25em"}),axisLine:Ae({stroke:e.gridColor,strokeWidth:1},e.yAxisLineStyles),tickLabel:Ae({},l,{textAnchor:"start",dx:"0.25em",dy:"0.25em"}),tickLength:e.tickLength,tickLine:Ae({strokeWidth:1,stroke:e.gridColor},e.yTickLineStyles)}}}}}const p_=f_({backgroundColor:"#fff",colors:d_,tickLength:4,svgLabelSmall:{fill:po[7]},svgLabelBig:{fill:po[9]},gridColor:po[5],gridColorDark:po[9]});var h_=u.createContext(p_);const m_=h_;var v_=function(){function e(){this.registry={},this.registryKeys=[]}var t=e.prototype;return t.registerData=function(r){var o=this,i=Array.isArray(r)?r:[r];i.forEach(function(a){a.key in o.registry&&o.registry[a.key]!=null&&console.debug("Overriding data registry key",a.key),o.registry[a.key]=a,o.registryKeys=Object.keys(o.registry)})},t.unregisterData=function(r){var o=this,i=Array.isArray(r)?r:[r];i.forEach(function(a){delete o.registry[a],o.registryKeys=Object.keys(o.registry)})},t.entries=function(){return Object.values(this.registry)},t.get=function(r){return this.registry[r]},t.keys=function(){return this.registryKeys},e}();function g_(){var e=u.useState(Math.random()),t=e[1],n=u.useMemo(function(){return new v_},[]);return u.useMemo(function(){return{registerData:function(){n.registerData.apply(n,arguments),t(Math.random())},unregisterData:function(){n.unregisterData.apply(n,arguments),t(Math.random())},entries:function(){return n.entries()},get:function(o){return n.get(o)},keys:function(){return n.keys()}}},[n])}var mc={width:0,height:0,margin:{top:0,right:0,bottom:0,left:0}};function y_(e){var t=u.useState({width:(e==null?void 0:e.width)==null?mc.width:e.width,height:(e==null?void 0:e.height)==null?mc.height:e.height,margin:(e==null?void 0:e.margin)==null?mc.margin:e.margin}),n=t[0],r=t[1],o=u.useCallback(function(i){(i.width!==n.width||i.height!==n.height||i.margin.left!==n.margin.left||i.margin.right!==n.margin.right||i.margin.top!==n.margin.top||i.margin.bottom!==n.margin.bottom)&&r(i)},[n.width,n.height,n.margin.left,n.margin.right,n.margin.bottom,n.margin.top]);return[n,o]}function Bi(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function b_(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function vc(e){let t,n,r;e.length!==2?(t=Bi,n=(s,l)=>Bi(e(s),l),r=(s,l)=>e(s)-l):(t=e===Bi||e===b_?e:w_,n=e,r=e);function o(s,l,c=0,d=s.length){if(c<d){if(t(l,l)!==0)return d;do{const f=c+d>>>1;n(s[f],l)<0?c=f+1:d=f}while(c<d)}return c}function i(s,l,c=0,d=s.length){if(c<d){if(t(l,l)!==0)return d;do{const f=c+d>>>1;n(s[f],l)<=0?c=f+1:d=f}while(c<d)}return c}function a(s,l,c=0,d=s.length){const f=o(s,l,c,d-1);return f>c&&r(s[f-1],l)>-r(s[f],l)?f-1:f}return{left:o,center:a,right:i}}function w_(){return 0}function x_(e){return e===null?NaN:+e}const $_=vc(Bi).left;vc(x_).center;function Uv(e,t){let n,r;if(t===void 0)for(const o of e)o!=null&&(n===void 0?o>=o&&(n=r=o):(n>o&&(n=o),r<o&&(r=o)));else{let o=-1;for(let i of e)(i=t(i,++o,e))!=null&&(n===void 0?i>=i&&(n=r=i):(n>i&&(n=i),r<i&&(r=i)))}return[n,r]}function C_(e,t,n){e=+e,t=+t,n=(o=arguments.length)<2?(t=e,e=0,1):o<3?1:+n;for(var r=-1,o=Math.max(0,Math.ceil((t-e)/n))|0,i=new Array(o);++r<o;)i[r]=e+r*n;return i}function gc(e){return(e==null?void 0:e.type)==="band"||(e==null?void 0:e.type)==="ordinal"||(e==null?void 0:e.type)==="point"}function vr(){return vr=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},vr.apply(this,arguments)}function S_(e){var t=e.dataRegistry,n=e.xRange,r=e.xScaleConfig,o=e.yRange,i=e.yScaleConfig,a=t.keys(),s=n[0],l=n[1],c=o[0],d=o[1],f=u.useMemo(function(){var m=a.map(function(y){return t.get(y)}),h=m.reduce(function(y,b){return b?y.concat(b.data.map(function($){return b.xAccessor($)})):y},[]);if(h.length!==0){var v=gc(r)?h:Uv(h),w=wl(r)?ao(vr({range:[s,l],domain:v,zero:!0},r)):ao(vr({range:[s,l],domain:v},r));return m.forEach(function(y){y!=null&&y.xScale&&(w=y.xScale(w))}),w}},[t,r,a,s,l]),p=u.useMemo(function(){var m=a.map(function(y){return t.get(y)}),h=m.reduce(function(y,b){return b?y.concat(b.data.map(function($){return b.yAccessor($)})):y},[]);if(h.length!==0){var v=gc(i)?h:Uv(h),w=wl(i)?ao(vr({range:[c,d],domain:v,zero:!0},i)):ao(vr({range:[c,d],domain:v},i));return m.forEach(function(y){y!=null&&y.yScale&&(w=y.yScale(w))}),w}},[t,i,a,c,d]);return{xScale:f,yScale:p}}function Hv(e){var t=e.initialDimensions,n=e.theme,r=e.xScale,o=e.yScale,i=e.children,a=e.horizontal,s=a===void 0?"auto":a,l=e.resizeObserverPolyfill,c=u.useContext(m_),d=n||c,f=y_(t),p=f[0],m=p.width,h=p.height,v=p.margin,w=f[1],y=Math.max(0,m-v.left-v.right),b=Math.max(0,h-v.top-v.bottom),$=g_(),S=S_({dataRegistry:$,xScaleConfig:r,yScaleConfig:o,xRange:[v.left,Math.max(0,m-v.right)],yRange:[Math.max(0,h-v.bottom),v.top]}),x=S.xScale,T=S.yScale,O=$.keys(),P=u.useMemo(function(){return i_({domain:O,range:d.colors})},[O,d.colors]),_=s==="auto"?gc(o)||o.type==="time"||o.type==="utc":s,j=u.useMemo(function(){return{dataRegistry:$,registerData:$.registerData,unregisterData:$.unregisterData,xScale:x,yScale:T,colorScale:P,theme:d,width:m,height:h,margin:v,innerWidth:y,innerHeight:b,setDimensions:w,horizontal:_,resizeObserverPolyfill:l}},[P,$,h,_,b,y,v,w,d,m,x,T,l]);return u.createElement(Ot.Provider,{value:j},i)}Hv.propTypes={children:ne.node.isRequired,horizontal:ne.oneOfType([ne.bool,ne.oneOf(["auto"])])};function Gv(e){var t=e.source,n=e.onPointerOut,r=n===void 0?!0:n,o=e.onPointerMove,i=o===void 0?!0:o,a=e.onPointerUp,s=a===void 0?!0:a,l=e.onPointerDown,c=l===void 0?!0:l,d=e.onFocus,f=d===void 0?!1:d,p=e.onBlur,m=p===void 0?!1:p,h=fn(),v=u.useCallback(function(x){return h==null?void 0:h("pointermove",x,t)},[h,t]),w=u.useCallback(function(x){return h==null?void 0:h("pointerout",x,t)},[h,t]),y=u.useCallback(function(x){return h==null?void 0:h("pointerup",x,t)},[h,t]),b=u.useCallback(function(x){return h==null?void 0:h("pointerdown",x,t)},[h,t]),$=u.useCallback(function(x){return h==null?void 0:h("focus",x,t)},[h,t]),S=u.useCallback(function(x){return h==null?void 0:h("blur",x,t)},[h,t]);return{onPointerMove:i?v:void 0,onFocus:f?$:void 0,onBlur:m?S:void 0,onPointerOut:r?w:void 0,onPointerUp:s?y:void 0,onPointerDown:c?b:void 0}}var E_="GLYPHSERIES_EVENT_SOURCE",yc="XYCHART_EVENT_SOURCE";function Vv(e){return!!e&&("clientX"in e||"changedTouches"in e)}function T_(e){return!!e&&!Vv(e)}function qv(e){var t=e.scale,n=e.accessor,r=e.scaledValue,o=e.data,i=t,a,s;if("invert"in i&&typeof i.invert=="function"){var l=vc(n).left,c=Number(i.invert(r)),d=l(o,c),f=o[d-1],p=o[d];a=!f||Math.abs(c-n(f))>Math.abs(c-n(p))?p:f,s=a===f?d-1:d}else if("step"in i&&typeof i.step<"u"){var m=t.domain(),h=t.range().map(Number),v=[].concat(h).sort(function(T,O){return T-O}),w=C_(v[0],v[1],i.step()),y=$_(w,r),b=h[0]<h[1]?m:m.reverse(),$=b[y-1],S=o.findIndex(function(T){return String(n(T))===String($)});a=o[S],s=S}else return console.warn("[visx/xychart/findNearestDatum] encountered incompatible scale type, bailing"),null;if(a==null||s==null)return null;var x=Math.abs(Number(i(n(a)))-r);return{datum:a,index:s,distance:x}}function P_(e){var t=e.xScale,n=e.xAccessor,r=e.yScale,o=e.yAccessor,i=e.point,a=e.data;if(!i)return null;var s=qv({scale:t,accessor:n,scaledValue:i.x,data:a});return s?{datum:s.datum,index:s.index,distanceX:s.distance,distanceY:Math.abs(Number(r(o(s.datum)))-i.y)}:null}function M_(e){var t=e.yScale,n=e.yAccessor,r=e.xScale,o=e.xAccessor,i=e.point,a=e.data;if(!i)return null;var s=qv({scale:t,accessor:n,scaledValue:i.y,data:a});return s?{datum:s.datum,index:s.index,distanceY:s.distance,distanceX:Math.abs(Number(r(o(s.datum)))-i.x)}:null}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)}var wc="__POINTER_EVENTS_ALL",Wi="__POINTER_EVENTS_NEAREST";function Yv(e){var t=e.dataKey,n=e.findNearestDatum,r=e.onBlur,o=e.onFocus,i=e.onPointerMove,a=e.onPointerOut,s=e.onPointerUp,l=e.onPointerDown,c=e.allowedSources,d=u.useContext(Ot),f=d.width,p=d.height,m=d.horizontal,h=d.dataRegistry,v=d.xScale,w=d.yScale,y=n||(m?M_:P_),b=u.useCallback(function(_){var j=_||{},F=j.svgPoint,V=j.event,R={},X=null,C=1/0;if(_&&V&&F&&f&&p&&v&&w){var L,H=t===Wi||t===wc,W=H?(L=h==null?void 0:h.keys())!=null?L:[]:Array.isArray(t)?t:[t];W.forEach(function(N){var z=h==null?void 0:h.get(N);if(z){var J=y({dataKey:N,data:z.data,height:p,point:F,width:f,xAccessor:z.xAccessor,xScale:v,yAccessor:z.yAccessor,yScale:w});if(J&&(R[N]=bc({key:N,svgPoint:F,event:V},J),t===Wi)){var Q,oe,te=Math.sqrt(((Q=J.distanceX)!=null?Q:Math.pow(1/0,2))+((oe=J.distanceY)!=null?oe:Math.pow(1/0,2)));X=te<C?R[N]:X,C=Math.min(C,te)}}});var D=t===Wi?[X]:t===wc||Array.isArray(t)?Object.values(R):[R[t]];return D.filter(function(N){return N})}return[]},[t,h,v,w,f,p,y]),$=u.useCallback(function(_){i&&b(_).forEach(function(j){return i(j)})},[b,i]),S=u.useCallback(function(_){s&&b(_).forEach(function(j){return s(j)})},[b,s]),x=u.useCallback(function(_){l&&b(_).forEach(function(j){return l(j)})},[b,l]),T=u.useCallback(function(_){o&&b(_).forEach(function(j){return o(j)})},[b,o]),O=u.useCallback(function(_){var j=_==null?void 0:_.event;j&&Vv(j)&&a&&a(j)},[a]),P=u.useCallback(function(_){var j=_==null?void 0:_.event;j&&T_(j)&&r&&r(j)},[r]);fn("pointermove",i?$:void 0,c),fn("pointerout",a?O:void 0,c),fn("pointerup",s?S:void 0,c),fn("pointerdown",l?x:void 0,c),fn("focus",o?T:void 0,c),fn("blur",r?P:void 0,c)}function Ui(){return Ui=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},Ui.apply(this,arguments)}var k_={top:50,right:50,bottom:50,left:50},O_=[yc];function gr(e){var t=e.accessibilityLabel,n=t===void 0?"XYChart":t,r=e.captureEvents,o=r===void 0?!0:r,i=e.children,a=e.height,s=e.horizontal,l=e.margin,c=l===void 0?k_:l,d=e.onPointerMove,f=e.onPointerOut,p=e.onPointerUp,m=e.onPointerDown,h=e.pointerEventsDataKey,v=h===void 0?"nearest":h,w=e.theme,y=e.width,b=e.xScale,$=e.yScale,S=e.resizeObserverPolyfill,x=u.useContext(Ot),T=x.setDimensions,O=x.resizeObserverPolyfill,P=u.useContext(uo),_=fn();u.useEffect(function(){T&&y!=null&&a!=null&&y>0&&a>0&&T({width:y,height:a,margin:c})},[T,y,a,c]);var j=Gv({source:yc});return Yv({dataKey:v==="nearest"?Wi:wc,onPointerMove:d,onPointerOut:f,onPointerUp:p,onPointerDown:m,allowedSources:O_}),T?y==null||a==null?u.createElement(lO,{resizeObserverPolyfill:O},function(F){return u.createElement(gr,Ui({},e,{width:e.width==null?F.width:e.width,height:e.height==null?F.height:e.height}))}):P==null?u.createElement(Lv,null,u.createElement(gr,e)):_==null?u.createElement(gO,null,u.createElement(gr,e)):y<=0||a<=0?(console.info("XYChart has a zero width or height, bailing",{width:y,height:a}),null):u.createElement("svg",{width:y,height:a,"aria-label":n},i,o&&u.createElement("rect",Ui({x:c.left,y:c.top,width:y-c.left-c.right,height:a-c.top-c.bottom,fill:"transparent"},j))):!b||!$?(console.warn("[@visx/xychart] XYChart: When no DataProvider is available in context, you must pass xScale & yScale config to XYChart."),null):u.createElement(Hv,{xScale:b,yScale:$,theme:w,initialDimensions:{width:y,height:a,margin:c},horizontal:s,resizeObserverPolyfill:S},u.createElement(gr,e))}gr.propTypes={accessibilityLabel:ne.string,captureEvents:ne.bool,width:ne.number,height:ne.number,children:ne.node.isRequired,horizontal:ne.oneOfType([ne.bool,ne.oneOf(["auto"])]),onPointerMove:ne.func,onPointerOut:ne.func,onPointerUp:ne.func,onPointerDown:ne.func,pointerEventsDataKey:ne.oneOf(["all","nearest"])};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 __(e){function t(n){var r=n.dataKey,o=n.data,i=n.xAccessor,a=n.yAccessor,s=u.useContext(Ot),l=s.xScale,c=s.yScale,d=s.dataRegistry;u.useEffect(function(){return d&&d.registerData({key:r,data:o,xAccessor:i,yAccessor:a}),function(){return d==null?void 0:d.unregisterData(r)}},[d,r,o,i,a]);var f=d==null?void 0:d.get(r);if(!l||!c||!f)return null;var p=e;return u.createElement(p,xc({},n,{xScale:l,yScale:c,data:f.data,xAccessor:f.xAccessor,yAccessor:f.yAccessor}))}return t}function Kv(e,t,n){return n===void 0&&(n="center"),function(r){var o=e(t(r));if(ft(o)){var i=(n==="start"?0:xl(e))/(n==="center"?2:1);return o+i}return NaN}}function N_(e){var t,n=e.dataKey,r=e.enableEvents,o=e.findNearestDatum,i=e.onBlur,a=e.onFocus,s=e.onPointerMove,l=e.onPointerOut,c=e.onPointerUp,d=e.onPointerDown,f=e.source,p=e.allowedSources,m=(t=u.useContext(uo))!=null?t:{},h=m.showTooltip,v=m.hideTooltip,w=u.useCallback(function(x){h(x),s&&s(x)},[h,s]),y=u.useCallback(function(x){h(x),a&&a(x)},[h,a]),b=u.useCallback(function(x){v(),x&&l&&l(x)},[v,l]),$=u.useCallback(function(x){v(),x&&i&&i(x)},[v,i]),S=u.useCallback(function(x){h(x),d&&d(x)},[h,d]);return Yv({dataKey:n,findNearestDatum:o,onBlur:r?$:void 0,onFocus:r?y:void 0,onPointerMove:r?w:void 0,onPointerOut:r?b:void 0,onPointerUp:r?c:void 0,onPointerDown:r?S:void 0,allowedSources:p}),Gv({source:f,onBlur:!!i&&r,onFocus:!!a&&r,onPointerMove:!!s&&r,onPointerOut:!!l&&r,onPointerUp:!!c&&r,onPointerDown:!!d&&r})}function $c(){return $c=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},$c.apply(this,arguments)}function Xv(e){var t,n,r,o=e.colorAccessor,i=e.data,a=e.dataKey,s=e.onBlur,l=e.onFocus,c=e.onPointerMove,d=e.onPointerOut,f=e.onPointerUp,p=e.onPointerDown,m=e.enableEvents,h=m===void 0?!0:m,v=e.renderGlyphs,w=e.size,y=w===void 0?8:w,b=e.xAccessor,$=e.xScale,S=e.yAccessor,x=e.yScale,T=u.useContext(Ot),O=T.colorScale,P=T.theme,_=T.horizontal,j=u.useMemo(function(){return Kv($,b)},[$,b]),F=u.useMemo(function(){return Kv(x,S)},[x,S]),V=(t=(n=O==null?void 0:O(a))!=null?n:P==null||(r=P.colors)==null?void 0:r[0])!=null?t:"#222",R=E_+"-"+a,X=N_({dataKey:a,enableEvents:h,onBlur:s,onFocus:l,onPointerMove:c,onPointerOut:d,onPointerUp:f,onPointerDown:p,source:R,allowedSources:[yc,R]}),C=u.useMemo(function(){return i.map(function(L,H){var W,D=j(L);if(!ft(D))return null;var N=F(L);return ft(N)?{key:""+H,x:D,y:N,color:(W=o==null?void 0:o(L,H))!=null?W:V,size:typeof y=="function"?y(L):y,datum:L}:null}).filter(function(L){return L})},[V,o,i,j,F,y]);return u.createElement(u.Fragment,null,v($c({glyphs:C,xScale:$,yScale:x,horizontal:_},X)))}Xv.propTypes={colorAccessor:ne.func,size:ne.oneOfType([ne.number,ne.func]),renderGlyphs:ne.func.isRequired};const D_=__(Xv);function A_(e){var t=e.key,n=e.color,r=e.x,o=e.y,i=e.size,a=e.onBlur,s=e.onFocus,l=e.onPointerMove,c=e.onPointerOut,d=e.onPointerUp;return u.createElement("circle",{className:"visx-circle-glyph",key:t,tabIndex:a||s?0:void 0,fill:n,r:i/2,cx:r,cy:o,onBlur:a,onFocus:s,onPointerMove:l,onPointerOut:c,onPointerUp:d})}var I_=["renderGlyph"];function Hi(){return Hi=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},Hi.apply(this,arguments)}function L_(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function F_(e){var t=e.renderGlyph,n=t===void 0?A_:t,r=L_(e,I_),o=u.useCallback(function(i){var a=i.glyphs,s=i.onPointerMove,l=i.onPointerOut,c=i.onPointerUp,d=i.onFocus,f=i.onBlur;return a.map(function(p){return u.createElement(u.Fragment,{key:p.key},n(Hi({},p,{onPointerMove:s,onPointerOut:l,onPointerUp:c,onFocus:d,onBlur:f})))})},[n]);return u.createElement(D_,Hi({},r,{renderGlyphs:o}))}function Rv(e){var t=e.top,n=t===void 0?0:t,r=e.left,o=r===void 0?0:r,i=e.className,a=e.children;return u.createElement(En,{className:et("visx-glyph",i),top:n,left:o},a)}Rv.propTypes={top:ne.number,left:ne.number,className:ne.string,children:ne.node};var j_=["top","left","className"];function Cc(){return Cc=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},Cc.apply(this,arguments)}function z_(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function Sc(e){var t=e.top,n=t===void 0?0:t,r=e.left,o=r===void 0?0:r,i=e.className,a=z_(e,j_);return u.createElement(Rv,{top:n,left:o},u.createElement("circle",Cc({className:et("visx-glyph-dot",i)},a)))}Sc.propTypes={className:ne.string,top:ne.number,left:ne.number,r:ne.number,cx:ne.number,cy:ne.number};var B_=["className","children","debounceTime","ignoreDimensions","parentSizeStyles","enableDebounceLeadingCall","resizeObserverPolyfill"];function Gi(){return Gi=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},Gi.apply(this,arguments)}function W_(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var U_=[],H_={width:"100%",height:"100%"};function Vi(e){var t=e.className,n=e.children,r=e.debounceTime,o=r===void 0?300:r,i=e.ignoreDimensions,a=i===void 0?U_:i,s=e.parentSizeStyles,l=s===void 0?H_:s,c=e.enableDebounceLeadingCall,d=c===void 0?!0:c,f=e.resizeObserverPolyfill,p=W_(e,B_),m=u.useRef(null),h=u.useRef(0),v=u.useState({width:0,height:0,top:0,left:0}),w=v[0],y=v[1],b=u.useMemo(function(){var $=Array.isArray(a)?a:[a];return _v(function(S){y(function(x){var T=Object.keys(x),O=T.filter(function(_){return x[_]!==S[_]}),P=O.every(function(_){return $.includes(_)});return P?x:S})},o,{leading:d})},[o,d,a]);return u.useEffect(function(){var $=f||window.ResizeObserver,S=new $(function(x){x.forEach(function(T){var O,P=(O=T==null?void 0:T.contentRect)!=null?O:{},_=P.left,j=P.top,F=P.width,V=P.height;h.current=window.requestAnimationFrame(function(){b({width:F,height:V,top:j,left:_})})})});return m.current&&S.observe(m.current),function(){window.cancelAnimationFrame(h.current),S.disconnect(),b.cancel()}},[b,f]),u.createElement("div",Gi({style:l,ref:m,className:t},p),n(Gi({},w,{ref:m.current,resize:b})))}Vi.propTypes={className:ne.string,debounceTime:ne.number,enableDebounceLeadingCall:ne.bool,ignoreDimensions:ne.oneOfType([ne.any,ne.arrayOf(ne.any)]),children:ne.func.isRequired};const Zv=[{name:"default",dark:"#0091E7",light:"#62B9ED"},{name:"yellow",dark:"#8C6A00",light:"#FFDE88"},{name:"plum",dark:"#7D1779",light:"#E1AADD"},{name:"cyan",dark:"#329F95",light:"#C0FFF9"},{name:"purple",dark:"#7651BC",light:"#E7DAFF"},{name:"pink",dark:"#C01443",light:"#FAD4D4"},{name:"green",dark:"#44812F",light:"#B1E39F"},{name:"orange",dark:"#B96400",light:"#FFE7C5"},{name:"teal",dark:"#237C73",light:"#A1DFD5"},{name:"red",dark:"#C62C02",light:"#FFE1D9"}];function Re(e){return Zv[e%Zv.length]}function Ec({textLabel:e,axisCharLimit:t,x:n,y:r,textStyles:o}){return A.jsx(Af,{children:A.jsxs(If,{children:[A.jsx(Lf,{asChild:!0,children:A.jsx("text",{className:"pointer-events-auto cursor-pointer",...o,x:n,y:r,children:e&&(e==null?void 0:e.length)>t?`${e==null?void 0:e.substring(0,t)}...`:e})}),A.jsx(Ff,{children:A.jsx(ss,{className:"rabbit-ds",children:A.jsx("p",{children:e})})})]})})}const Qv=(e,t)=>u.Children.map(e,n=>u.isValidElement(n)&&typeof n.type=="function"&&n.type.displayName===t.displayName?n:null);function Tc({value:e,darkColor:t,lightColor:n}){return A.jsxs("div",{className:"px-2 py-1 justify-start items-center gap-2 inline-flex",children:[A.jsx("div",{style:{backgroundColor:n,borderColor:t},className:"w-3 h-3 relative rounded-3xl border"}),A.jsx("div",{className:"justify-start items-start flex",children:A.jsx("div",{className:"text-zinc-800 text-xs font-normal leading-none",children:e})})]})}function Pc({label:e,value:t}){return A.jsxs("div",{className:"px-1 py-0.5 flex-col justify-start items-start inline-flex max-w-sm",children:[A.jsx("div",{className:" text-stone-500 text-[10px] font-normal leading-none",children:e}),A.jsx("div",{className:"justify-start items-start text-sm flex font-medium",children:t||"-"})]})}function Ue({children:e,showSideBySide:t,tooltipTitle:n}){const r=Qv(e,Tc),o=Qv(e,Pc);return A.jsxs("div",{className:"rabbit-ds z-[1500] relative h-auto w-auto min-w-[200px] max-w-[400px] p-2 bg-white rounded-lg shadow flex-col justify-start items-start gap-2 inline-flex",children:[A.jsx("div",{className:"px-3 py-1 text-zinc-800 font-medium text-xs leading-none",children:n}),A.jsxs("div",{className:"w-full p-2 rounded-lg flex-col justify-start items-start flex",children:[t&&A.jsxs("div",{className:_e("w-full flex"),children:[o&&o[0],A.jsx("div",{className:"w-0 border-r mx-3"}),o&&o[1]]}),!t&&A.jsx("div",{className:_e("w-full grid gap-3 auto-rows-auto"),children:o})]}),r&&r.length>0?A.jsx("div",{className:"h-px px-2 w-full border-top bg-gray-100"}):null,r]})}Tc.displayName="Legend",Pc.displayName="Item",Ue.Legend=Tc,Ue.Item=Pc,Ue.defaultProps={showSideBySide:!1};function Jv({xValue:e,yValue:t,tooltipTitle:n,xAxisLabel:r,yAxisLabel:o,showSideBySide:i,legendValue:a,legendDarkColor:s,legendLightColor:l}){const c=e==null?void 0:e.toString(),d=t==null?void 0:t.toString();return A.jsxs(Ue,{tooltipTitle:n,showSideBySide:i,children:[A.jsx(Ue.Item,{label:r,value:c}),A.jsx(Ue.Item,{label:o,value:d}),A.jsx(Ue.Legend,{value:a,darkColor:s,lightColor:l})]})}Jv.defaultProps={xValue:void 0,yValue:void 0};function G_({data:e,xAccessor:t,yAccessor:n,connectNulls:r=!1}){const o=u.useContext(Ot),i=r?e.filter(a=>a.y!==null):e;return A.jsx(mM,{data:i,stroke:i[0].color.dark,strokeWidth:1,x:a=>{var s,l;return((s=o==null?void 0:o.xScale)==null?void 0:s.call(o,t(a)))+((l=o==null?void 0:o.xScale)==null?void 0:l.bandwidth())/2},y:a=>{var s;return(s=o==null?void 0:o.yScale)==null?void 0:s.call(o,n(a))}})}var Mc={exports:{}};(function(e,t){(function(n,r){r(t)})(Ar,function(n){var r,o=Object.defineProperty,i=Object.defineProperties,a=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertySymbols,l=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable,d=Math.pow,f=(g,E,M)=>E in g?o(g,E,{enumerable:!0,configurable:!0,writable:!0,value:M}):g[E]=M,p=(g,E)=>{for(var M in E||(E={}))l.call(E,M)&&f(g,M,E[M]);if(s)for(var M of s(E))c.call(E,M)&&f(g,M,E[M]);return g},m=(g,E)=>i(g,a(E)),h=(g,E)=>{var M={};for(var I in g)l.call(g,I)&&E.indexOf(I)<0&&(M[I]=g[I]);if(g!=null&&s)for(var I of s(g))E.indexOf(I)<0&&c.call(g,I)&&(M[I]=g[I]);return M},v=(g,E,M)=>new Promise((I,G)=>{var Z=ie=>{try{K(M.next(ie))}catch(se){G(se)}},B=ie=>{try{K(M.throw(ie))}catch(se){G(se)}},K=ie=>ie.done?I(ie.value):Promise.resolve(ie.value).then(Z,B);K((M=M.apply(g,E)).next())});function w(g,E){return g[13]=1,g[14]=E>>8,g[15]=E&255,g[16]=E>>8,g[17]=E&255,g}const y="p".charCodeAt(0),b="H".charCodeAt(0),$="Y".charCodeAt(0),S="s".charCodeAt(0);let x;function T(){const g=new Int32Array(256);for(let E=0;E<256;E++){let M=E;for(let I=0;I<8;I++)M=M&1?3988292384^M>>>1:M>>>1;g[E]=M}return g}function O(g){let E=-1;x||(x=T());for(let M=0;M<g.length;M++)E=x[(E^g[M])&255]^E>>>8;return E^-1}function P(g){const E=g.length-1;for(let M=E;M>=4;M--)if(g[M-4]===9&&g[M-3]===y&&g[M-2]===b&&g[M-1]===$&&g[M]===S)return M-3;return 0}function _(g,E,M=!1){const I=new Uint8Array(13);E*=39.3701,I[0]=y,I[1]=b,I[2]=$,I[3]=S,I[4]=E>>>24,I[5]=E>>>16,I[6]=E>>>8,I[7]=E&255,I[8]=I[4],I[9]=I[5],I[10]=I[6],I[11]=I[7],I[12]=1;const G=O(I),Z=new Uint8Array(4);if(Z[0]=G>>>24,Z[1]=G>>>16,Z[2]=G>>>8,Z[3]=G&255,M){const B=P(g);return g.set(I,B),g.set(Z,B+13),g}else{const B=new Uint8Array(4);B[0]=0,B[1]=0,B[2]=0,B[3]=9;const K=new Uint8Array(54);return K.set(g,0),K.set(B,33),K.set(I,37),K.set(Z,50),K}}const j="AAlwSFlz",F="AAAJcEhZ",V="AAAACXBI";function R(g){let E=g.indexOf(j);return E===-1&&(E=g.indexOf(F)),E===-1&&(E=g.indexOf(V)),E}const X="[modern-screenshot]",C=typeof window<"u",L=C&&"Worker"in window,H=C&&"atob"in window,W=C&&"btoa"in window,D=C?(r=window.navigator)==null?void 0:r.userAgent:"",N=D.includes("Chrome"),z=D.includes("AppleWebKit")&&!N,J=D.includes("Firefox"),Q=g=>g&&"__CONTEXT__"in g,oe=g=>g.constructor.name==="CSSFontFaceRule",te=g=>g.constructor.name==="CSSImportRule",ae=g=>g.nodeType===1,Y=g=>typeof g.className=="object",le=g=>Y(g)&&g.tagName==="svg",U=g=>Y(g)&&g.tagName==="image",q=g=>ae(g)&&typeof g.style<"u"&&!Y(g),re=g=>g.nodeType===8,k=g=>g.nodeType===3,de=g=>g.tagName==="IMG",pe=g=>g.tagName==="VIDEO",Ce=g=>g.tagName==="CANVAS",ke=g=>g.tagName==="TEXTAREA",je=g=>g.tagName==="INPUT",_t=g=>g.tagName==="STYLE",mn=g=>g.tagName==="SCRIPT",Ze=g=>g.tagName==="SELECT",qt=g=>g.tagName==="SLOT",yr=g=>g.tagName==="IFRAME",Le=(...g)=>console.warn(X,...g),Zi=g=>console.time(`${X} ${g}`),Qi=g=>console.timeEnd(`${X} ${g}`),ho=g=>{var E;const M=(E=g==null?void 0:g.createElement)==null?void 0:E.call(g,"canvas");return M&&(M.height=M.width=1),M&&"toDataURL"in M&&!!M.toDataURL("image/webp").includes("image/webp")},rt=g=>g.startsWith("data:");function vn(g,E){if(g.match(/^[a-z]+:\/\//i))return g;if(C&&g.match(/^\/\//))return window.location.protocol+g;if(g.match(/^[a-z]+:/i)||!C)return g;const M=zn().implementation.createHTMLDocument(),I=M.createElement("base"),G=M.createElement("a");return M.head.appendChild(I),M.body.appendChild(G),E&&(I.href=E),G.href=g,G.href}function zn(g){var E;return(E=g&&ae(g)?g==null?void 0:g.ownerDocument:g)!=null?E:window.document}const Bn="http://www.w3.org/2000/svg";function mo(g,E,M){const I=zn(M).createElementNS(Bn,"svg");return I.setAttributeNS(null,"width",g.toString()),I.setAttributeNS(null,"height",E.toString()),I.setAttributeNS(null,"viewBox",`0 0 ${g} ${E}`),I}function br(g,E){let M=new XMLSerializer().serializeToString(g);return E&&(M=M.replace(/[\u0000-\u0008\u000B\u000C\u000E-\u001F\uD800-\uDFFF\uFFFE\uFFFF]/ug,"")),`data:image/svg+xml;charset=utf-8,${encodeURIComponent(M)}`}function Ji(g,E="image/png",M=1){return v(this,null,function*(){try{return yield new Promise((I,G)=>{g.toBlob(Z=>{Z?I(Z):G(new Error("Blob is null"))},E,M)})}catch(I){if(H)return Le("Failed canvas to blob",{type:E,quality:M},I),ea(g.toDataURL(E,M));throw I}})}function ea(g){var E,M;const[I,G]=g.split(","),Z=(M=(E=I.match(/data:(.+);/))==null?void 0:E[1])!=null?M:void 0,B=window.atob(G),K=B.length,ie=new Uint8Array(K);for(let se=0;se<K;se+=1)ie[se]=B.charCodeAt(se);return new Blob([ie],{type:Z})}function vo(g,E){return new Promise((M,I)=>{const G=new FileReader;G.onload=()=>M(G.result),G.onerror=()=>I(G.error),G.onabort=()=>I(new Error(`Failed read blob to ${E}`)),E==="dataUrl"?G.readAsDataURL(g):E==="arrayBuffer"&&G.readAsArrayBuffer(g)})}const ta=g=>vo(g,"dataUrl"),na=g=>vo(g,"arrayBuffer");function Nt(g,E){const M=zn(E).createElement("img");return M.decoding="sync",M.loading="eager",M.src=g,M}function Yt(g,E){return new Promise(M=>{const{timeout:I,ownerDocument:G,onError:Z}=E??{},B=typeof g=="string"?Nt(g,zn(G)):g;let K=null,ie=null;function se(){M(B),K&&clearTimeout(K),ie==null||ie()}if(I&&(K=setTimeout(se,I)),pe(B)){const ce=B.currentSrc||B.src;if(!ce)return B.poster?Yt(B.poster,E).then(M):se();if(B.readyState>=2)return se();const he=se,ue=be=>{Le("Failed video load",ce,be),Z==null||Z(be),se()};ie=()=>{B.removeEventListener("loadeddata",he),B.removeEventListener("error",ue)},B.addEventListener("loadeddata",he,{once:!0}),B.addEventListener("error",ue,{once:!0})}else{const ce=U(B)?B.href.baseVal:B.currentSrc||B.src;if(!ce)return se();const he=()=>v(this,null,function*(){if(de(B)&&"decode"in B)try{yield B.decode()}catch(be){Le("Failed to decode image, trying to render anyway",B.dataset.originalSrc||ce,be)}se()}),ue=be=>{Le("Failed image load",B.dataset.originalSrc||ce,be),se()};if(de(B)&&B.complete)return he();ie=()=>{B.removeEventListener("load",he),B.removeEventListener("error",ue)},B.addEventListener("load",he,{once:!0}),B.addEventListener("error",ue,{once:!0})}})}function go(g,E){return v(this,null,function*(){q(g)&&(de(g)||pe(g)?yield Yt(g,{timeout:E}):yield Promise.all(["img","video"].flatMap(M=>Array.from(g.querySelectorAll(M)).map(I=>Yt(I,{timeout:E})))))})}const yo=function(){let g=0;const E=()=>`0000${(Math.random()*d(36,4)<<0).toString(36)}`.slice(-4);return()=>(g+=1,`u${E()}${g}`)}();function bo(g){return g==null?void 0:g.split(",").map(E=>E.trim().replace(/"|'/g,"").toLowerCase()).filter(Boolean)}function ra(g){return{time:E=>g&&Zi(E),timeEnd:E=>g&&Qi(E),warn:(...E)=>g&&Le(...E)}}function oa(g){return{cache:g?"no-cache":"force-cache"}}function st(g,E){return v(this,null,function*(){return Q(g)?g:ia(g,m(p({},E),{autoDestruct:!0}))})}function ia(g,E){return v(this,null,function*(){var M,I,G,Z,B;const{scale:K=1,workerUrl:ie,workerNumber:se=1}=E||{},ce=!!(E!=null&&E.debug),he=(M=E==null?void 0:E.features)!=null?M:!0,ue=(I=g.ownerDocument)!=null?I:C?window.document:void 0,be=(Z=(G=g.ownerDocument)==null?void 0:G.defaultView)!=null?Z:C?window:void 0,ye=new Map,$e=m(p({width:0,height:0,quality:1,type:"image/png",scale:K,backgroundColor:null,style:null,filter:null,maximumCanvasSize:0,timeout:3e4,progress:null,debug:ce,fetch:p({requestInit:oa((B=E==null?void 0:E.fetch)==null?void 0:B.bypassingCache),placeholderImage:"data:image/png;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",bypassingCache:!1},E==null?void 0:E.fetch),font:{},drawImageInterval:100,workerUrl:null,workerNumber:se,onCloneNode:null,onEmbedNode:null,onCreateForeignObjectSvg:null,autoDestruct:!1},E),{__CONTEXT__:!0,log:ra(ce),node:g,ownerDocument:ue,ownerWindow:be,dpi:K===1?null:96*K,svgStyleElement:Qe(ue),svgDefsElement:ue==null?void 0:ue.createElementNS(Bn,"defs"),svgStyles:new Map,defaultComputedStyles:new Map,workers:[...new Array(L&&ie&&se?se:0)].map(()=>{try{const Ie=new Worker(ie);return Ie.onmessage=Ne=>v(this,null,function*(){var Je,Rt,gn,Ug;const{url:Fc,result:Hg}=Ne.data;Hg?(Rt=(Je=ye.get(Fc))==null?void 0:Je.resovle)==null||Rt.call(Je,Hg):(Ug=(gn=ye.get(Fc))==null?void 0:gn.reject)==null||Ug.call(gn,new Error(`Error receiving message from worker: ${Fc}`))}),Ie.onmessageerror=Ne=>{var Je,Rt;const{url:gn}=Ne.data;(Rt=(Je=ye.get(gn))==null?void 0:Je.reject)==null||Rt.call(Je,new Error(`Error receiving message from worker: ${gn}`))},Ie}catch(Ie){return Le("Failed to new Worker",Ie),null}}).filter(Boolean),fontFamilies:new Set,fontCssTexts:new Map,acceptOfImage:`${[ho(ue)&&"image/webp","image/svg+xml","image/*","*/*"].filter(Boolean).join(",")};q=0.8`,requests:ye,drawImageCount:0,tasks:[],features:he,isEnable:Ie=>{var Ne;return typeof he=="boolean"?he:(Ne=he[Ie])!=null?Ne:!0}});$e.log.time("wait until load"),yield go(g,$e.timeout),$e.log.timeEnd("wait until load");const{width:Ee,height:Te}=pt(g,$e);return $e.width=Ee,$e.height=Te,$e})}function Qe(g){if(!g)return;const E=g.createElement("style"),M=E.ownerDocument.createTextNode(`
|
|
74
74
|
.______background-clip--text {
|
|
75
75
|
background-clip: text;
|
|
76
76
|
-webkit-background-clip: text;
|
|
77
77
|
}
|
|
78
|
-
`);return E.appendChild(M),E}function pt(g,E){let{width:M,height:
|
|
79
|
-
`);let Te=
|
|
80
|
-
`))}else{const ie=Array.from(M.styleSheets).filter(se=>{try{return"cssRules"in se&&!!se.cssRules.length}catch(ce){return Le(`Error while reading CSS rules from ${se.href}`,ce),!1}});yield Promise.all(ie.flatMap(se=>Array.from(se.cssRules).map((ce,he)=>v(this,null,function*(){if(te(ce)){let ue=he+1;const be=ce.href;let ye="";try{ye=yield
|
|
81
|
-
`)):
|
|
82
|
-
`))}))})}})}const
|
|
78
|
+
`);return E.appendChild(M),E}function pt(g,E){let{width:M,height:I}=E;if(ae(g)&&(!M||!I)){const G=g.getBoundingClientRect();M=M||G.width||Number(g.getAttribute("width"))||0,I=I||G.height||Number(g.getAttribute("height"))||0}return{width:M,height:I}}function Kt(g,E){return v(this,null,function*(){const{log:M,timeout:I,drawImageCount:G,drawImageInterval:Z}=E;M.time("image to canvas");const B=yield Yt(g,{timeout:I}),{canvas:K,context2d:ie}=Xt(g.ownerDocument,E),se=()=>{try{ie==null||ie.drawImage(B,0,0,K.width,K.height)}catch(ce){Le("Failed to drawImage",ce)}};if(se(),E.isEnable("fixSvgXmlDecode"))for(let ce=0;ce<G;ce++)yield new Promise(he=>{setTimeout(()=>{se(),he()},ce+Z)});return E.drawImageCount=0,M.timeEnd("image to canvas"),K})}function Xt(g,E){const{width:M,height:I,scale:G,backgroundColor:Z,maximumCanvasSize:B}=E,K=g.createElement("canvas");K.width=Math.floor(M*G),K.height=Math.floor(I*G),K.style.width=`${M}px`,K.style.height=`${I}px`,B&&(K.width>B||K.height>B)&&(K.width>B&&K.height>B?K.width>K.height?(K.height*=B/K.width,K.width=B):(K.width*=B/K.height,K.height=B):K.width>B?(K.height*=B/K.width,K.width=B):(K.width*=B/K.height,K.height=B));const ie=K.getContext("2d");return ie&&Z&&(ie.fillStyle=Z,ie.fillRect(0,0,K.width,K.height)),{canvas:K,context2d:ie}}const lt=["width","height"],Wn=["stroke","fill"];function Un(g,E,M){var I;const{defaultComputedStyles:G,ownerDocument:Z}=M,B=g.nodeName.toLowerCase(),K=Y(g)&&B!=="svg",ie=K?Wn.map(Te=>[Te,g.getAttribute(Te)]).filter(([,Te])=>Te!==null):[],se=[K&&"svg",B,ie.map((Te,Ie)=>`${Te}=${Ie}`).join(","),E].filter(Boolean).join(":");if(G.has(se))return G.get(se);let ce=M.sandbox;if(!ce)try{Z&&(ce=Z.createElement("iframe"),ce.id=`__SANDBOX__-${yo()}`,ce.width="0",ce.height="0",ce.style.visibility="hidden",ce.style.position="fixed",Z.body.appendChild(ce),(I=ce.contentWindow)==null||I.document.write('<!DOCTYPE html><meta charset="UTF-8"><title></title><body>'),M.sandbox=ce)}catch(Te){Le("Failed to create iframe sandbox",Te)}if(!ce)return new Map;const he=ce.contentWindow;if(!he)return new Map;const ue=he.document;let be,ye;K?(be=ue.createElementNS(Bn,"svg"),ye=be.ownerDocument.createElementNS(be.namespaceURI,B),ie.forEach(([Te,Ie])=>{ye.setAttributeNS(null,Te,Ie)}),be.appendChild(ye)):be=ye=ue.createElement(B),ye.textContent=" ",ue.body.appendChild(be);const $e=he.getComputedStyle(ye,E),Ee=new Map;for(let Te=$e.length,Ie=0;Ie<Te;Ie++){const Ne=$e.item(Ie);lt.includes(Ne)||Ee.set(Ne,$e.getPropertyValue(Ne))}return ue.body.removeChild(be),G.set(se,Ee),Ee}function wr(g,E){var M;const I=new Map,G=[],Z=new Map;for(let B=g.length,K=0;K<B;K++){const ie=g.item(K),se=g.getPropertyValue(ie),ce=g.getPropertyPriority(ie),he=ie.lastIndexOf("-"),ue=he>-1?ie.substring(0,he):void 0;if(ue){let be=Z.get(ue);be||(be=new Map,Z.set(ue,be)),be.set(ie,[se,ce])}E.get(ie)===se&&!ce||(ue?G.push(ue):I.set(ie,[se,ce]))}for(let B=G.length,K=0;K<B;K++)(M=Z.get(G[K]))==null||M.forEach((ie,se)=>I.set(se,ie));return I}const xr=[":before",":after"],aa=[":-webkit-scrollbar",":-webkit-scrollbar-button",":-webkit-scrollbar-thumb",":-webkit-scrollbar-track",":-webkit-scrollbar-track-piece",":-webkit-scrollbar-corner",":-webkit-resizer"];function sa(g,E,M,I){const{ownerWindow:G,svgStyleElement:Z,svgStyles:B}=I;if(!Z||!G)return;function K(ie){var se;const ce=G.getComputedStyle(g,ie);let he=ce.getPropertyValue("content");if(!he||he==="none")return;he=he.replace(/(')|(")|(counter\(.+\))/g,"");const ue=[yo()],be=Un(g,ie,I),ye=[`content: '${he}';`],$e=wr(ce,be);if($e.delete("content"),$e.delete("-webkit-locale"),((se=$e.get("background-clip"))==null?void 0:se[0])==="text"&&E.classList.add("______background-clip--text"),$e.forEach(([Ie,Ne],Je)=>{ye.push(`${Je}: ${Ie}${Ne?" !important":""};`)}),ye.length===1)return;try{E.className=[E.className,...ue].join(" ")}catch{return}const Ee=ye.join(`
|
|
79
|
+
`);let Te=B.get(Ee);Te||(Te=[],B.set(Ee,Te)),Te.push(`.${ue[0]}:${ie}`)}xr.forEach(K),M&&aa.forEach(K)}function T3(g,E){ke(g)&&(E.innerHTML=g.value),(ke(g)||je(g)||Ze(g))&&E.setAttribute("value",g.value)}function P3(g,E,M,I){var G,Z,B,K;const{ownerWindow:ie}=I,se=E.style,ce=ie.getComputedStyle(g),he=Un(g,null,I),ue=wr(ce,he);return ue.delete("transition-property"),ue.delete("all"),ue.delete("d"),ue.delete("content"),M&&(ue.delete("margin-top"),ue.delete("margin-right"),ue.delete("margin-bottom"),ue.delete("margin-left"),ue.delete("margin-block-start"),ue.delete("margin-block-end"),ue.delete("margin-inline-start"),ue.delete("margin-inline-end"),ue.set("box-sizing",["border-box",""])),((G=ue.get("background-clip"))==null?void 0:G[0])==="text"&&E.classList.add("______background-clip--text"),N&&(ue.has("font-kerning")||ue.set("font-kerning",["normal",""]),(((Z=ue.get("overflow-x"))==null?void 0:Z[0])==="hidden"||((B=ue.get("overflow-y"))==null?void 0:B[0])==="hidden")&&((K=ue.get("text-overflow"))==null?void 0:K[0])==="ellipsis"&&g.scrollWidth===g.clientWidth&&ue.set("text-overflow",["clip",""])),ue.forEach(([be,ye],$e)=>{se.setProperty($e,be,ye)}),ue}function M3(g,E){return v(this,null,function*(){var M,I,G;const{ownerDocument:Z,svgDefsElement:B}=E,K=(I=(M=g.querySelectorAll)==null?void 0:M.call(g,"use"))!=null?I:[];if(K.length)for(let ie=K.length,se=0;se<ie;se++){const ce=K[se],he=(G=ce.getAttribute("xlink:href"))!=null?G:ce.getAttribute("href");if(!he)continue;const ue=Z==null?void 0:Z.querySelector(`svg ${he}`);!ue||B!=null&&B.querySelector(he)||B==null||B.appendChild(yield la(ue,E))}return g.cloneNode(!1)})}function k3(g,E){var M;try{if((M=g==null?void 0:g.contentDocument)!=null&&M.body)return la(g.contentDocument.body,E)}catch(I){Le("Failed to clone iframe",I)}return g.cloneNode(!1)}function Og(g){if(g.ownerDocument)try{const G=g.toDataURL();if(G!=="data:,")return Nt(G,g.ownerDocument)}catch{}const E=g.cloneNode(!1),M=g.getContext("2d"),I=E.getContext("2d");try{return M&&I&&I.putImageData(M.getImageData(0,0,g.width,g.height),0,0),E}catch(G){Le("Failed to clone canvas",G)}return E}function O3(g){return v(this,null,function*(){if(g.ownerDocument&&!g.currentSrc&&g.poster)return Nt(g.poster,g.ownerDocument);const E=g.cloneNode(!1);E.crossOrigin="anonymous",g.currentSrc&&g.currentSrc!==g.src&&(E.src=g.currentSrc);const M=E.ownerDocument;if(M){let I=!0;if(yield Yt(E,{onError:()=>I=!1}),!I)return g.poster?Nt(g.poster,g.ownerDocument):E;E.currentTime=g.currentTime,yield new Promise(Z=>{E.addEventListener("seeked",Z,{once:!0})});const G=M.createElement("canvas");G.width=g.offsetWidth,G.height=g.offsetHeight;try{const Z=G.getContext("2d");Z&&Z.drawImage(E,0,0,G.width,G.height)}catch(Z){return Le("Failed to clone video",Z),g.poster?Nt(g.poster,g.ownerDocument):E}return Og(G)}return E})}function _3(g){const E=g.cloneNode(!1);return g.currentSrc&&g.currentSrc!==g.src&&(E.src=g.currentSrc,E.srcset=""),E.loading==="lazy"&&(E.loading="eager"),E}function N3(g,E){return Ce(g)?Og(g):yr(g)?k3(g,E):de(g)?_3(g):pe(g)?O3(g):le(g)?M3(g,E):g.cloneNode(!1)}function _g(g,E,M){return v(this,null,function*(){ae(E)&&(_t(E)||mn(E))||M.filter&&!M.filter(E)||g.appendChild(yield la(E,M))})}function Ng(g,E,M){return v(this,null,function*(){var I,G;const Z=(G=ae(g)?(I=g.shadowRoot)==null?void 0:I.firstChild:void 0)!=null?G:g.firstChild;for(let B=Z;B;B=B.nextSibling)if(!re(B))if(ae(B)&&qt(B)&&typeof B.assignedNodes=="function"){const K=B.assignedNodes();for(let ie=0;ie<K.length;ie++)yield _g(E,K[ie],M)}else yield _g(E,B,M)})}function D3(g,E){const{backgroundColor:M,width:I,height:G,style:Z}=E,B=g.style;if(M&&B.setProperty("background-color",M,"important"),I&&B.setProperty("width",`${I}px`,"important"),G&&B.setProperty("height",`${G}px`,"important"),Z)for(const K in Z)B[K]=Z[K]}const A3=/^[\w-]+$/;function la(g,E,M=!1){return v(this,null,function*(){var I,G,Z,B;const{ownerDocument:K,ownerWindow:ie,fontFamilies:se}=E;if(K&&k(g))return K.createTextNode(g.data);if(K&&ie&&ae(g)&&(q(g)||Y(g))){const he=yield N3(g,E);if(E.isEnable("removeAbnormalAttributes")){const ye=he.getAttributeNames();for(let $e=ye.length,Ee=0;Ee<$e;Ee++){const Te=ye[Ee];A3.test(Te)||he.removeAttribute(Te)}}const ue=P3(g,he,M,E);M&&D3(he,E);let be=!1;if(E.isEnable("copyScrollbar")){const ye=[(I=ue.get("overflow-x"))==null?void 0:I[0],(G=ue.get("overflow-y"))==null?void 0:G[1]];be=ye.includes("scroll")||(ye.includes("auto")||ye.includes("overlay"))&&(g.scrollHeight>g.clientHeight||g.scrollWidth>g.clientWidth)}return sa(g,he,be,E),T3(g,he),(B=bo((Z=ue.get("font-family"))==null?void 0:Z[0]))==null||B.forEach(ye=>se.add(ye)),pe(g)||(yield Ng(g,he,E)),he}const ce=g.cloneNode(!1);return yield Ng(g,ce,E),ce})}function Dg(g){if(g.ownerDocument=void 0,g.ownerWindow=void 0,g.svgStyleElement=void 0,g.svgDefsElement=void 0,g.svgStyles.clear(),g.defaultComputedStyles.clear(),g.sandbox){try{g.sandbox.remove()}catch{}g.sandbox=void 0}g.workers=[],g.fontFamilies.clear(),g.fontCssTexts.clear(),g.requests.clear(),g.tasks=[]}function I3(g){const E=g,{url:M,timeout:I,responseType:G}=E,Z=h(E,["url","timeout","responseType"]),B=new AbortController,K=I?setTimeout(()=>B.abort(),I):void 0;return fetch(M,p({signal:B.signal},Z)).then(ie=>{if(!ie.ok)throw new Error("Failed fetch, not 2xx response",{cause:ie});switch(G){case"dataUrl":return ie.blob().then(ta);case"text":default:return ie.text()}}).finally(()=>clearTimeout(K))}function ca(g,E){const{url:M,requestType:I="text",responseType:G="text",imageDom:Z}=E;let B=M;const{timeout:K,acceptOfImage:ie,requests:se,fetch:{requestInit:ce,bypassingCache:he,placeholderImage:ue},workers:be}=g;I==="image"&&(z||J)&&g.drawImageCount++;let ye=se.get(M);if(!ye){he&&(B+=(/\?/.test(B)?"&":"?")+new Date().getTime());const $e=p({url:B,timeout:K,responseType:G,headers:I==="image"?{accept:ie}:void 0},ce);ye={type:I,resovle:void 0,reject:void 0,response:null},ye.response=(!z&&M.startsWith("http")&&be.length?new Promise((Ee,Te)=>{be[se.size&be.length-1].postMessage(p({rawUrl:M},$e)),ye.resovle=Ee,ye.reject=Te}):I3($e)).catch(Ee=>{if(se.delete(M),I==="image"&&ue)return Le("Failed to fetch image base64, trying to use placeholder image",B),typeof ue=="string"?ue:ue(Z);throw Ee}),se.set(M,ye)}return ye.response}function Ag(g,E,M,I){return v(this,null,function*(){if(!Ig(g))return g;for(const[G,Z]of L3(g,E))try{const B=yield ca(M,{url:Z,requestType:I?"image":"text",responseType:"dataUrl"});g=g.replace(F3(G),`$1${B}$3`)}catch(B){Le("Failed to fetch css data url",G,B)}return g})}function Ig(g){return/url\((['"]?)([^'"]+?)\1\)/.test(g)}const Lg=/url\((['"]?)([^'"]+?)\1\)/g;function L3(g,E){const M=[];return g.replace(Lg,(I,G,Z)=>(M.push([Z,vn(Z,E)]),I)),M.filter(([I])=>!rt(I))}function F3(g){const E=g.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${E})(['"]?\\))`,"g")}function j3(g,E){return v(this,null,function*(){const{ownerDocument:M,svgStyleElement:I,fontFamilies:G,fontCssTexts:Z,tasks:B,font:K}=E;if(!(!M||!I||!G.size))if(K&&K.cssText){const ie=jg(K.cssText,E);I.appendChild(M.createTextNode(`${ie}
|
|
80
|
+
`))}else{const ie=Array.from(M.styleSheets).filter(se=>{try{return"cssRules"in se&&!!se.cssRules.length}catch(ce){return Le(`Error while reading CSS rules from ${se.href}`,ce),!1}});yield Promise.all(ie.flatMap(se=>Array.from(se.cssRules).map((ce,he)=>v(this,null,function*(){if(te(ce)){let ue=he+1;const be=ce.href;let ye="";try{ye=yield ca(E,{url:be,requestType:"text",responseType:"text"})}catch(Ee){Le(`Error fetch remote css import from ${be}`,Ee)}const $e=ye.replace(Lg,(Ee,Te,Ie)=>Ee.replace(Ie,vn(Ie,be)));for(const Ee of B3($e))try{se.insertRule(Ee,Ee.startsWith("@import")?ue+=1:se.cssRules.length)}catch(Te){Le("Error inserting rule from remote css import",{rule:Ee,error:Te})}}})))),ie.flatMap(se=>Array.from(se.cssRules)).filter(se=>{var ce;return oe(se)&&Ig(se.style.getPropertyValue("src"))&&((ce=bo(se.style.getPropertyValue("font-family")))==null?void 0:ce.some(he=>G.has(he)))}).forEach(se=>{const ce=se,he=Z.get(ce.cssText);he?I.appendChild(M.createTextNode(`${he}
|
|
81
|
+
`)):B.push(Ag(ce.cssText,ce.parentStyleSheet?ce.parentStyleSheet.href:null,E).then(ue=>{ue=jg(ue,E),Z.set(ce.cssText,ue),I.appendChild(M.createTextNode(`${ue}
|
|
82
|
+
`))}))})}})}const z3=/(\/\*[\s\S]*?\*\/)/gi,Fg=/((@.*?keyframes [\s\S]*?){([\s\S]*?}\s*?)})/gi;function B3(g){if(g==null)return[];const E=[];let M=g.replace(z3,"");for(;;){const Z=Fg.exec(M);if(!Z)break;E.push(Z[0])}M=M.replace(Fg,"");const I=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,G=new RegExp("((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})","gi");for(;;){let Z=I.exec(M);if(Z)G.lastIndex=I.lastIndex;else if(Z=G.exec(M),Z)I.lastIndex=G.lastIndex;else break;E.push(Z[0])}return E}const W3=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,U3=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function jg(g,E){const{font:M}=E,I=M?M==null?void 0:M.preferredFormat:void 0;return I?g.replace(U3,G=>{for(;;){const[Z,,B]=W3.exec(G)||[];if(!B)return"";if(B===I)return`src: ${Z};`}}):g}function H3(g,E){if(de(g)){const M=g.currentSrc||g.src;if(!rt(M))return[ca(E,{url:M,imageDom:g,requestType:"image",responseType:"dataUrl"}).then(I=>{I&&(g.srcset="",g.dataset.originalSrc=M,g.src=I||"")})];(z||J)&&E.drawImageCount++}else if(Y(g)&&!rt(g.href.baseVal)){const M=g.href.baseVal;return[ca(E,{url:M,imageDom:g,requestType:"image",responseType:"dataUrl"}).then(I=>{I&&(g.dataset.originalSrc=M,g.href.baseVal=I||"")})]}return[]}const G3=["background-image","border-image-source","-webkit-border-image","-webkit-mask-image","list-style-image"];function V3(g,E){return G3.map(M=>{const I=g.getPropertyValue(M);return I?((z||J)&&E.drawImageCount++,Ag(I,null,E,!0).then(G=>{!G||I===G||g.setProperty(M,G,g.getPropertyPriority(M))})):null}).filter(Boolean)}function zg(g,E){const{tasks:M}=E;ae(g)&&(de(g)||U(g))&&M.push(...H3(g,E)),q(g)&&M.push(...V3(g.style,E)),g.childNodes.forEach(I=>{zg(I,E)})}function Bg(g,E){return v(this,null,function*(){const M=yield st(g,E);if(ae(M.node)&&Y(M.node))return M.node;const{ownerDocument:I,log:G,tasks:Z,svgStyleElement:B,svgDefsElement:K,svgStyles:ie,font:se,progress:ce,autoDestruct:he,onCloneNode:ue,onEmbedNode:be,onCreateForeignObjectSvg:ye}=M;G.time("clone node");const $e=yield la(M.node,M,!0);if(B&&I){let Je="";ie.forEach((Rt,gn)=>{Je+=`${Rt.join(`,
|
|
83
83
|
`)} {
|
|
84
84
|
${gn}
|
|
85
85
|
}
|
|
86
|
-
`}),W.appendChild(D.createTextNode(Je))}G.timeEnd("clone node"),ue==null||ue($e),se!==!1&&ae($e)&&(G.time("embed web font"),yield O3($e,M),G.timeEnd("embed web font")),G.time("embed node"),Mg($e,M);const Ee=Z.length;let Te=0;const Ie=()=>v(this,null,function*(){for(;;){const Je=Z.pop();if(!Je)break;try{yield Je}catch(Rt){Le("Failed to run task",Rt)}ce==null||ce(++Te,Ee)}});ce==null||ce(Te,Ee),yield Promise.all([...Array(4)].map(Ie)),G.timeEnd("embed node"),be==null||be($e);const Ne=j3($e,M);return K&&Ne.insertBefore(K,Ne.children[0]),W&&Ne.insertBefore(W,Ne.children[0]),he&&$g(M),ye==null||ye(Ne),Ne})}function j3(g,E){const{width:M,height:D}=E,G=ho(M,D,g.ownerDocument),Z=G.ownerDocument.createElementNS(G.namespaceURI,"foreignObject");return Z.setAttributeNS(null,"x","0%"),Z.setAttributeNS(null,"y","0%"),Z.setAttributeNS(null,"width","100%"),Z.setAttributeNS(null,"height","100%"),Z.append(g),G.appendChild(Z),G}function ca(g,E){return v(this,null,function*(){var M;const D=yield st(g,E),G=yield kg(D),Z=br(G,D.isEnable("removeControlCharacter"));D.autoDestruct||(D.svgStyleElement=Qe(D.ownerDocument),D.svgDefsElement=(M=D.ownerDocument)==null?void 0:M.createElementNS(Wn,"defs"),D.svgStyles.clear());const W=Nt(Z,G.ownerDocument);return yield Kt(W,D)})}function z3(g,E){return v(this,null,function*(){const M=yield st(g,E),{log:D,type:G,quality:Z,dpi:W}=M,K=yield ca(M);D.time("canvas to blob");const ie=yield Qi(K,G,Z);if(["image/png","image/jpeg"].includes(G)&&W){const se=yield ta(ie.slice(0,33));let ce=new Uint8Array(se);return G==="image/png"?ce=_(ce,W):G==="image/jpeg"&&(ce=x(ce,W)),new Blob([ce,ie.slice(33)],{type:G})}return D.timeEnd("canvas to blob"),ie})}function $r(g,E){return v(this,null,function*(){const M=yield st(g,E),{log:D,quality:G,type:Z,dpi:W}=M,K=yield ca(M);D.time("canvas to data url");let ie=K.toDataURL(Z,G);if(["image/png","image/jpeg"].includes(Z)&&W&&H&&B){const[se,ce]=ie.split(",");let he=0,ue=!1;if(Z==="image/png"){const Ne=R(ce);Ne>=0?(he=Math.ceil((Ne+28)/3)*4,ue=!0):he=33/3*4}else Z==="image/jpeg"&&(he=18/3*4);const be=ce.substring(0,he),ye=ce.substring(he),$e=window.atob(be),Ee=new Uint8Array($e.length);for(let Ne=0;Ne<Ee.length;Ne++)Ee[Ne]=$e.charCodeAt(Ne);const Te=Z==="image/png"?_(Ee,W,ue):x(Ee,W),Ie=window.btoa(String.fromCharCode(...Te));ie=[se,",",Ie,ye].join("")}return D.timeEnd("canvas to data url"),ie})}function Og(g,E){return v(this,null,function*(){const M=yield st(g,E),{width:D,height:G,ownerDocument:Z}=M,W=yield $r(M),K=ho(D,G,Z),ie=K.ownerDocument.createElementNS(K.namespaceURI,"image");return ie.setAttributeNS(null,"href",W),ie.setAttributeNS(null,"height","100%"),ie.setAttributeNS(null,"width","100%"),K.appendChild(ie),br(K,M.isEnable("removeControlCharacter"))})}function W3(g,E){return v(this,null,function*(){const M=yield st(g,E),{ownerDocument:D,width:G,height:Z,scale:W,type:K}=M,ie=K==="image/svg+xml"?yield Og(M):yield $r(M),se=Nt(ie,D);return se.width=Math.floor(G*W),se.height=Math.floor(Z*W),se.style.width=`${G}px`,se.style.height=`${Z}px`,se})}function B3(g,E){return v(this,null,function*(){return $r(yield st(g,m(p({},E),{type:"image/jpeg"})))})}function U3(g,E){return v(this,null,function*(){const M=yield st(g,E),D=yield ca(M);return D.getContext("2d").getImageData(0,0,D.width,D.height).data})}function H3(g,E){return v(this,null,function*(){return $r(yield st(g,m(p({},E),{type:"image/png"})))})}function G3(g,E){return v(this,null,function*(){return $r(yield st(g,m(p({},E),{type:"image/webp"})))})}n.createContext=oa,n.destroyContext=$g,n.domToBlob=z3,n.domToCanvas=ca,n.domToDataUrl=$r,n.domToForeignObjectSvg=kg,n.domToImage=W3,n.domToJpeg=B3,n.domToPixel=U3,n.domToPng=H3,n.domToSvg=Og,n.domToWebp=G3,n.loadMedia=Yt,n.waitUntilLoad=vo,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})})})(wc,wc.exports);var z_=wc.exports;const $c=(e,t,n)=>{u.useImperativeHandle(t,()=>({download(){e.current&&z_.domToPng(e.current,{scale:5}).then(r=>{const o=document.createElement("a");o.download=`${n}.png`,o.href=r,o.click()})}}))},W_=({x:e,y:t,datum:n,size:r})=>L.jsx(gc,{cx:e,cy:t,stroke:n.color.dark,strokeWidth:1,fill:n.color.light,r:r/2}),B_=({x:e,y:t,datum:n})=>L.jsx(gc,{cx:e,cy:t,stroke:n.color.dark,strokeWidth:1,fill:n.color.dark,r:5,style:{zIndex:1500}}),Vi={xAccessor:e=>e.x,yAccessor:e=>e.y},Rv=(e,t,n)=>n==="pre"?`${t}${e}`:`${e}${t}`,Zv=10,U_=5,Cc=u.forwardRef(({nodes:e,height:t,width:n,xAxisValues:r,series:o,xAxisLabel:i,yAxisLabel:a,xAxisDomain:s,yAxisDomain:l,xAxisUnitSymbol:c,yAxisUnitSymbol:d,tooltipTitle:f,mode:p,xAxisCharLimit:m,connectNulls:h=!1,maxNodesInMiniMode:v=U_,tooltipStackCharLimit:x=Zv},y)=>{const[b,$]=u.useState(e.map(P=>P.id)),S=u.useRef(null);$c(S,y,`${i}-${a}-LineChart`);const w=u.useMemo(()=>o.map((P,_)=>({points:P.data.map((j,F)=>({x:r[F],y:j,nodeId:P.id,color:Re(_)}))})).slice(0,p==="mini"?v:o.length),[r,o,p,v]),T=u.useMemo(()=>p==="full"?w.filter(P=>b.includes(P.points[0].nodeId)):w,[w,b,p]),O=u.useMemo(()=>Math.floor((n-(p==="mini"?0:150))/(r.length*8)),[n,r,p]);return L.jsxs("div",{ref:S,id:"line-chart",className:"bg-white flex flex-col rabbit-ds",style:{width:n,height:t},children:[L.jsxs("div",{className:"w-full min-w-0 min-h-0 h-full flex flex-row",children:[L.jsx("div",{className:"w-full min-w-0 min-h-0 h-full",children:L.jsxs(gr,{margin:{top:10,left:50,right:50,bottom:50},xScale:{type:"band",nice:!0,...s&&{domain:s}},yScale:{type:"linear",nice:!0,...l&&{domain:l}},children:[L.jsx(ak,{columns:!1,numTicks:6,lineStyle:{stroke:"#EBEFF3",strokeWidth:1}}),L.jsx(fv,{hideTicks:!0,orientation:"bottom",stroke:"#CFD7DF",strokeWidth:1,numTicks:6,tickFormat:P=>c?Rv(P,c.symbol,c.position):P,rangePadding:{end:10},tickComponent:P=>L.jsx(yc,{textLabel:P.formattedValue||"",x:P.x,y:P.y,textStyles:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,fill:"#666666",textAnchor:"middle"},axisCharLimit:m??O}),label:`${i} ➔`,labelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,dy:10,fill:"#666666",textAnchor:"middle",verticalAnchor:"middle"}}),L.jsx(fv,{hideTicks:!0,numTicks:6,strokeWidth:1,orientation:"left",stroke:"#CFD7DF",label:`${a} ➔`,tickFormat:P=>d?Rv(P,d.symbol,d.position):P,tickLabelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,fill:"#666666"},labelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,dx:-20,fill:"#666666",textAnchor:"middle",verticalAnchor:"middle"}}),T.map((P,_)=>L.jsxs(L.Fragment,{children:[L.jsx(j_,{data:P.points,xAccessor:Vi.xAccessor,yAccessor:Vi.yAccessor,connectNulls:h}),L.jsx(__,{dataKey:`Performance Management ${_}`,data:P.points,size:8,renderGlyph:W_,xAccessor:Vi.xAccessor,yAccessor:Vi.yAccessor})]})),L.jsx($v,{showDatumGlyph:!0,scroll:!0,debounce:500,snapTooltipToDatumX:!0,snapTooltipToDatumY:!0,detectBounds:!0,unstyled:!0,applyPositionStyle:!0,renderGlyph:B_,renderTooltip:({tooltipData:P})=>{var F,V,R,X,C,I;const _=e.find(H=>{var B;return H.id===((B=P==null?void 0:P.nearestDatum)==null?void 0:B.datum.nodeId)}),j=((F=P==null?void 0:P.nearestDatum)==null?void 0:F.datum)&&((V=P==null?void 0:P.nearestDatum)==null?void 0:V.datum.x.length)<x;return L.jsx(Xv,{xValue:(R=P==null?void 0:P.nearestDatum)==null?void 0:R.datum.x,yValue:(X=P==null?void 0:P.nearestDatum)==null?void 0:X.datum.y,xAxisLabel:i,yAxisLabel:a,showSideBySide:!!j,tooltipTitle:f,legendValue:(_==null?void 0:_.name)||"",legendDarkColor:((C=P==null?void 0:P.nearestDatum)==null?void 0:C.datum.color.dark)||Re(0).dark,legendLightColor:((I=P==null?void 0:P.nearestDatum)==null?void 0:I.datum.color.light)||Re(0).light})}})]})}),p==="full"&&L.jsxs("div",{className:"w-64 p-4 bg-zinc-100 rounded-lg flex-col justify-start items-start gap-0.5 inline-flex text-xs grow-0 shrink-0 basis-auto",children:[L.jsxs("div",{className:"text-sm font-semibold pb-2",children:[L.jsx("span",{className:"pr-1",children:i}),"(",w.length,")"]}),w.map(P=>{const _=e.find(j=>j.id===P.points[0].nodeId);return _&&L.jsxs("div",{className:"flex justify-between items-center gap-1 py-1 w-full",children:[L.jsxs("div",{className:"flex justify-between items-center",children:[L.jsx("div",{style:{backgroundColor:P.points[0].color.light,borderColor:P.points[0].color.dark},className:"h-3 w-3 rounded-full border mr-1"}),_.name]}),L.jsx("div",{className:"flex items-center",children:L.jsx(Kc,{checked:b.includes(_.id),onCheckedChange:j=>{let F=[...b];j?F=[...b,_.id]:F.splice(b.indexOf(_.id),1),$(F)}})})]},_.id)})]})]}),p==="mini"&&L.jsx("div",{className:"flex flex-row flex-wrap justify-center gap-4 text-[10px] text-[#666666] font-semibold",children:w.map(P=>{const _=e.find(j=>j.id===P.points[0].nodeId);return L.jsxs("div",{className:"flex justify-center items-center gap-1",children:[L.jsx("div",{style:{backgroundColor:P.points[0].color.light,borderColor:P.points[0].color.dark},className:"h-3 w-3 rounded-full border"}),_==null?void 0:_.name]},_==null?void 0:_.id)})})]})}),H_={xAxisUnitSymbol:void 0,yAxisUnitSymbol:void 0,mode:"mini",xAxisCharLimit:void 0,tooltipStackCharLimit:Zv,xAxisDomain:void 0,yAxisDomain:void 0,connectNulls:!1};Cc.defaultProps=H_,Cc.displayName="LineBase";const Qv=u.forwardRef((e,t)=>L.jsx(Gi,{debounceTime:10,children:({width:n,height:r})=>L.jsx(Cc,{ref:t,width:n,height:r,...e})}));Qv.displayName="LineChart";const G_=Qv;function Jv(e,t){let n;if(t===void 0)for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let o of e)(o=t(o,++r,e))!=null&&(n<o||n===void 0&&o>=o)&&(n=o)}return n}function V_(e,t){let n;if(t===void 0)for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let o of e)(o=t(o,++r,e))!=null&&(n>o||n===void 0&&o>=o)&&(n=o)}return n}function Sc(e,t){let n=0;if(t===void 0)for(let r of e)(r=+r)&&(n+=r);else{let r=-1;for(let o of e)(o=+t(o,++r,e))&&(n+=o)}return n}function q_(e,t){return e.sourceLinks.length?e.depth:t-1}function qi(e){return function(){return e}}function eg(e,t){return Yi(e.source,t.source)||e.index-t.index}function tg(e,t){return Yi(e.target,t.target)||e.index-t.index}function Yi(e,t){return e.y0-t.y0}function Ec(e){return e.value}function Y_(e){return e.index}function K_(e){return e.nodes}function X_(e){return e.links}function ng(e,t){const n=e.get(t);if(!n)throw new Error("missing: "+t);return n}function rg({nodes:e}){for(const t of e){let n=t.y0,r=n;for(const o of t.sourceLinks)o.y0=n+o.width/2,n+=o.width;for(const o of t.targetLinks)o.y1=r+o.width/2,r+=o.width}}function R_(){let e=0,t=0,n=1,r=1,o=24,i=8,a,s=Y_,l=q_,c,d,f=K_,p=X_,m=6;function h(){const C={nodes:f.apply(null,arguments),links:p.apply(null,arguments)};return v(C),x(C),y(C),b(C),w(C),rg(C),C}h.update=function(C){return rg(C),C},h.nodeId=function(C){return arguments.length?(s=typeof C=="function"?C:qi(C),h):s},h.nodeAlign=function(C){return arguments.length?(l=typeof C=="function"?C:qi(C),h):l},h.nodeSort=function(C){return arguments.length?(c=C,h):c},h.nodeWidth=function(C){return arguments.length?(o=+C,h):o},h.nodePadding=function(C){return arguments.length?(i=a=+C,h):i},h.nodes=function(C){return arguments.length?(f=typeof C=="function"?C:qi(C),h):f},h.links=function(C){return arguments.length?(p=typeof C=="function"?C:qi(C),h):p},h.linkSort=function(C){return arguments.length?(d=C,h):d},h.size=function(C){return arguments.length?(e=t=0,n=+C[0],r=+C[1],h):[n-e,r-t]},h.extent=function(C){return arguments.length?(e=+C[0][0],n=+C[1][0],t=+C[0][1],r=+C[1][1],h):[[e,t],[n,r]]},h.iterations=function(C){return arguments.length?(m=+C,h):m};function v({nodes:C,links:I}){for(const[B,A]of C.entries())A.index=B,A.sourceLinks=[],A.targetLinks=[];const H=new Map(C.map((B,A)=>[s(B,A,C),B]));for(const[B,A]of I.entries()){A.index=B;let{source:N,target:z}=A;typeof N!="object"&&(N=A.source=ng(H,N)),typeof z!="object"&&(z=A.target=ng(H,z)),N.sourceLinks.push(A),z.targetLinks.push(A)}if(d!=null)for(const{sourceLinks:B,targetLinks:A}of C)B.sort(d),A.sort(d)}function x({nodes:C}){for(const I of C)I.value=I.fixedValue===void 0?Math.max(Sc(I.sourceLinks,Ec),Sc(I.targetLinks,Ec)):I.fixedValue}function y({nodes:C}){const I=C.length;let H=new Set(C),B=new Set,A=0;for(;H.size;){for(const N of H){N.depth=A;for(const{target:z}of N.sourceLinks)B.add(z)}if(++A>I)throw new Error("circular link");H=B,B=new Set}}function b({nodes:C}){const I=C.length;let H=new Set(C),B=new Set,A=0;for(;H.size;){for(const N of H){N.height=A;for(const{source:z}of N.targetLinks)B.add(z)}if(++A>I)throw new Error("circular link");H=B,B=new Set}}function $({nodes:C}){const I=Jv(C,A=>A.depth)+1,H=(n-e-o)/(I-1),B=new Array(I);for(const A of C){const N=Math.max(0,Math.min(I-1,Math.floor(l.call(null,A,I))));A.layer=N,A.x0=e+N*H,A.x1=A.x0+o,B[N]?B[N].push(A):B[N]=[A]}if(c)for(const A of B)A.sort(c);return B}function S(C){const I=V_(C,H=>(r-t-(H.length-1)*a)/Sc(H,Ec));for(const H of C){let B=t;for(const A of H){A.y0=B,A.y1=B+A.value*I,B=A.y1+a;for(const N of A.sourceLinks)N.width=N.value*I}B=(r-B+a)/(H.length+1);for(let A=0;A<H.length;++A){const N=H[A];N.y0+=B*(A+1),N.y1+=B*(A+1)}V(H)}}function w(C){const I=$(C);a=Math.min(i,(r-t)/(Jv(I,H=>H.length)-1)),S(I);for(let H=0;H<m;++H){const B=Math.pow(.99,H),A=Math.max(1-B,(H+1)/m);O(I,B,A),T(I,B,A)}}function T(C,I,H){for(let B=1,A=C.length;B<A;++B){const N=C[B];for(const z of N){let J=0,Q=0;for(const{source:te,value:ae}of z.targetLinks){let Y=ae*(z.layer-te.layer);J+=R(te,z)*Y,Q+=Y}if(!(Q>0))continue;let oe=(J/Q-z.y0)*I;z.y0+=oe,z.y1+=oe,F(z)}c===void 0&&N.sort(Yi),P(N,H)}}function O(C,I,H){for(let B=C.length,A=B-2;A>=0;--A){const N=C[A];for(const z of N){let J=0,Q=0;for(const{target:te,value:ae}of z.sourceLinks){let Y=ae*(te.layer-z.layer);J+=X(z,te)*Y,Q+=Y}if(!(Q>0))continue;let oe=(J/Q-z.y0)*I;z.y0+=oe,z.y1+=oe,F(z)}c===void 0&&N.sort(Yi),P(N,H)}}function P(C,I){const H=C.length>>1,B=C[H];j(C,B.y0-a,H-1,I),_(C,B.y1+a,H+1,I),j(C,r,C.length-1,I),_(C,t,0,I)}function _(C,I,H,B){for(;H<C.length;++H){const A=C[H],N=(I-A.y0)*B;N>1e-6&&(A.y0+=N,A.y1+=N),I=A.y1+a}}function j(C,I,H,B){for(;H>=0;--H){const A=C[H],N=(A.y1-I)*B;N>1e-6&&(A.y0-=N,A.y1-=N),I=A.y0-a}}function F({sourceLinks:C,targetLinks:I}){if(d===void 0){for(const{source:{sourceLinks:H}}of I)H.sort(tg);for(const{target:{targetLinks:H}}of C)H.sort(eg)}}function V(C){if(d===void 0)for(const{sourceLinks:I,targetLinks:H}of C)I.sort(tg),H.sort(eg)}function R(C,I){let H=C.y0-(C.sourceLinks.length-1)*a/2;for(const{target:B,width:A}of C.sourceLinks){if(B===I)break;H+=A+a}for(const{source:B,width:A}of I.targetLinks){if(B===C)break;H-=A}return H}function X(C,I){let H=I.y0-(I.targetLinks.length-1)*a/2;for(const{source:B,width:A}of I.targetLinks){if(B===C)break;H+=A+a}for(const{target:B,width:A}of C.sourceLinks){if(B===I)break;H-=A}return H}return h}function Z_({tooltipData:e,fromLabel:t,toLabel:n,weightLabel:r,tooltipTitle:o}){var s,l,c,d;const i=e.source,a=e.target;return L.jsxs(Ue,{tooltipTitle:o,children:[L.jsx(Ue.Item,{label:t,value:i.name}),L.jsx(Ue.Item,{label:n,value:a.name}),L.jsx(Ue.Item,{label:r,value:e.weight.toString()}),L.jsx(Ue.Legend,{value:i.name,darkColor:(s=Re(i.index||0))==null?void 0:s.dark,lightColor:(l=Re(i.index||0))==null?void 0:l.light}),L.jsx(Ue.Legend,{value:a.name,darkColor:(c=Re(a.index||0))==null?void 0:c.dark,lightColor:(d=Re(a.index||0))==null?void 0:d.light})]})}const og=80,ig=20,Q_=30,J_=12,ag=u.forwardRef(({height:e,width:t,tooltipTitle:n,nodes:r,links:o,groups:i,weightLabel:a},s)=>{const l=u.useMemo(()=>R_().nodeId(C=>C.id).nodeWidth(J_).nodePadding(Q_).nodeAlign(C=>C.group),[]),c=u.useRef(null);$c(c,s,`${n}-SankeyChart`);const[d,f]=u.useState(""),[p,m]=u.useState(null),{tooltipData:h,tooltipLeft:v,tooltipTop:x,tooltipOpen:y,showTooltip:b,hideTooltip:$}=Al(),{containerBounds:S,containerRef:w,TooltipInPortal:T}=Wl({detectBounds:!0,debounce:500,scroll:!0,zIndex:1500}),O=u.useMemo(()=>l.extent([[og,ig],[t-og,e-ig-50]])({nodes:r,links:o.map(C=>({...C,value:Number(C.weight)}))}),[e,t,l,r,o]),P=u.useMemo(()=>Math.max(...O.nodes.map(C=>C.depth??0)),[O]),_=u.useMemo(()=>{const C={};let I=-1/0;return O.nodes.forEach(H=>{const{group:B}=H;C[B]?(C[B].x=Math.max(C[B].x??-1/0,H.x0??-1/0),C[B].y=Math.max(C[B].y??-1/0,H.y1??-1/0)):(C[B]={},C[B].x=H.x0,C[B].y=H.y1),I=Math.max(I,C[B].y??-1/0),C[B].y=I}),C},[O]),j=u.useCallback(C=>{const I=l.nodeId()(C);f(d===I?"":I)},[d,l]),F=u.useCallback(()=>{f(""),m(null)},[]),V=u.useMemo(()=>d===""&&p===null?new Set:new Set(O.links.filter(C=>l.nodeId()(C.source)===d||l.nodeId()(C.target)===d||(p==null?void 0:p.source)===C.source&&(p==null?void 0:p.target)===C.target)),[d,O,p,l]),R=u.useCallback((C,I)=>{const H=("clientX"in C?C.clientX:0)-S.left,B=("clientY"in C?C.clientY:0)-S.top;m(I),H&&B&&b({tooltipLeft:H,tooltipTop:B,tooltipData:I})},[b,S]),X=u.useCallback(()=>{F(),$()},[F,$]);return L.jsxs("div",{ref:c,className:"bg-white w-min h-min rabbit-ds",id:"sankey-chart",children:[L.jsxs("svg",{height:e,width:t,ref:w,children:[L.jsx("g",{children:O.links.map(C=>L.jsx(SM,{data:C,source:I=>({x:I.source.x1,y:I.y0}),target:I=>({x:I.target.x0,y:I.y1}),x:I=>I.x??0,y:I=>I.y??0,fill:"none",pointerEvents:"stroke",onMouseLeave:()=>X(),onMouseMove:I=>R(I,C),stroke:Re(C.source.index||0).light,strokeWidth:C.width,strokeOpacity:V.has(C)?.7:.25},C.index))}),L.jsx("g",{children:O.nodes.map(C=>{var I,H,B;return L.jsx("g",{children:L.jsx(vM,{x:C.x0??0,height:(C.y1??0)-(C.y0??0)+10,width:(C.x1??0)-(C.x0??0),y:(C.y0??0)-5,onMouseEnter:()=>j(C),onMouseLeave:()=>F(),radius:2,fill:d===C.id?(I=Re(C.index||0))==null?void 0:I.dark:(H=Re(C.index||0))==null?void 0:H.light,stroke:(B=Re(C.index||0))==null?void 0:B.dark,all:!0})},C.index)})}),L.jsx("g",{children:i.map(C=>L.jsx(yc,{axisCharLimit:20,x:_[C.id].x??0,y:(_[C.id].y??0)+40,textLabel:C.name,textStyles:{fontSize:10,fontWeight:600,textAnchor:"middle",fill:"#666666"}},C.id))}),L.jsxs("g",{children:[O.nodes.map(C=>L.jsx(yc,{axisCharLimit:8,x:C.depth===P?(C.x1??0)+10:(C.x0??0)-10,y:(C.y0??0)+((C.y1??0)-(C.y0??0))/2,textLabel:C.name,textStyles:{fontSize:10,fontWeight:600,textAnchor:C.depth===P?"start":"end",fill:"#666666"}},C.index)),O.nodes.map(C=>C.value&&L.jsx(ys,{x:C.depth===P?(C.x1??0)+10:(C.x0??0)-10,y:(C.y0??0)+((C.y1??0)-(C.y0??0))/2+16,style:{fontSize:10,fontWeight:400,textAnchor:C.depth===P?"start":"end",fill:"#666666"},children:`(${C.value.toString()})`},C.index))]})]}),y&&h&&L.jsx(T,{top:x,left:v,unstyled:!0,applyPositionStyle:!0,children:L.jsx(Z_,{tooltipData:h,fromLabel:`From: ${i[h.source.group].name}`,toLabel:`To: ${i[h.target.group].name}`,weightLabel:a,tooltipTitle:n})},Math.random())]})});ag.displayName="Sankey";const sg=u.forwardRef((e,t)=>L.jsx(Gi,{debounceTime:10,children:({width:n,height:r})=>n&&r&&L.jsx(ag,{ref:t,width:n,height:r,...e})}));sg.displayName="SankeyChart";const e3=sg;function t3(e){return"bandwidth"in e?e.bandwidth():0}var n3=["top","left","scale","width","stroke","strokeWidth","strokeDasharray","className","children","numTicks","lineStyle","offset","tickValues"];function Tc(){return Tc=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},Tc.apply(this,arguments)}function r3(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function lg(e){var t=e.top,n=t===void 0?0:t,r=e.left,o=r===void 0?0:r,i=e.scale,a=e.width,s=e.stroke,l=s===void 0?"#eaf0f6":s,c=e.strokeWidth,d=c===void 0?1:c,f=e.strokeDasharray,p=e.className,m=e.children,h=e.numTicks,v=h===void 0?10:h,x=e.lineStyle,y=e.offset,b=e.tickValues,$=r3(e,n3),S=b??fl(i,v),w=(y??0)+t3(i)/2,T=S.map(function(O,P){var _,j=((_=dl(i(O)))!=null?_:0)+w;return{index:P,from:new an({x:0,y:j}),to:new an({x:a,y:j})}});return u.createElement(En,{className:et("visx-rows",p),top:n,left:o},m?m({lines:T}):T.map(function(O){var P=O.from,_=O.to,j=O.index;return u.createElement(MM,Tc({key:"row-line-"+j,from:P,to:_,stroke:l,strokeWidth:d,strokeDasharray:f,style:x},$))}))}lg.propTypes={tickValues:ne.array,width:ne.number.isRequired};function cg({xValue:e,yValue:t,tooltipTitle:n,xAxisLabel:r,yAxisLabel:o,legendValue:i,legendDarkColor:a,legendLightColor:s}){const l=e==null?void 0:e.toString(),c=t==null?void 0:t.toString();return L.jsxs(Ue,{tooltipTitle:n,showSideBySide:!0,children:[L.jsx(Ue.Item,{label:r,value:l}),L.jsx(Ue.Item,{label:o,value:c}),L.jsx(Ue.Legend,{value:i,darkColor:a,lightColor:s})]})}cg.defaultProps={xValue:void 0,yValue:void 0};const ug=20,dg=50,Pc=80,Ki=50,o3=10,i3=25,Mc=u.forwardRef(({tooltipTitle:e,xAxisLabel:t,yAxisLabel:n,domain:r,binCount:o,data:i,width:a,height:s,maxBinCount:l=i3,minBinCount:c=o3,integerBins:d=!1,integerYAxis:f=!1},p)=>{const m=u.useMemo(()=>ai(i),[i]),{histogramDomain:h,threshold:v,thresholdInteger:x}=u.useMemo(()=>{const A=m[0]??0,N=A===m[1]?c+A:m[1]??0,z=N-A>c?N:c+A,J=Math.min(Math.max(N-A,c),l),Q=Math.floor(m[0]??0),oe=Math.ceil(z);return{histogramDomain:r||(d?[Q,oe]:[A,N]),threshold:J,thresholdInteger:Math.ceil(J)}},[m,r,d,l,c]),y=u.useMemo(()=>oo({domain:h,range:[Ki,a-dg],round:!0,nice:!0}),[h,a]),b=u.useMemo(()=>kE().domain(y.domain()).thresholds(o||(d?x:v))(i),[y,o,i,v,x,d]),$=u.useMemo(()=>oo({domain:[0,Ss(b,A=>A.length)??0],range:[s-Pc,ug],round:!0,nice:!0}),[b,s]),S=u.useMemo(()=>$.ticks().filter(A=>f?Number.isInteger(A):A),[f,$]),w=u.useRef(null);$c(w,p,`${t}-${n}-Histogram`);const{tooltipData:T,tooltipLeft:O,tooltipTop:P,tooltipOpen:_,showTooltip:j,hideTooltip:F}=Al(),{containerBounds:V,containerRef:R,TooltipInPortal:X}=Wl({detectBounds:!0,debounce:500,scroll:!0,zIndex:1500}),C=a-Ki-dg,I=s-ug-Pc-100,H=u.useCallback((A,N)=>{const z=("clientX"in A?A.clientX:0)-V.left,J=("clientY"in A?A.clientY:0)-V.top;z&&J&&j({tooltipLeft:z,tooltipTop:J,tooltipData:N})},[j,V]),B=u.useCallback(()=>{F()},[F]);return L.jsxs("div",{className:"bg-white flex flex-col rabbit-ds",style:{width:a,height:s},ref:w,children:[L.jsxs("svg",{width:a,height:s,ref:R,children:[L.jsx(Ol,{orientation:"bottom",scale:y,top:s-Pc,hideTicks:!0,numTicks:6,stroke:"#CFD7DF",strokeWidth:1,rangePadding:{end:10},label:`${t} ➔`,tickLabelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,fill:"#666666",textAnchor:"middle"},labelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,dy:10,fill:"#666666",textAnchor:"middle",verticalAnchor:"middle"}}),L.jsx(Ol,{orientation:"left",scale:$,left:Ki,hideTicks:!0,strokeWidth:1,stroke:"#CFD7DF",tickFormat:f?Ei("d"):void 0,tickValues:S,label:`${n} ➔`,tickLabelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,fill:"#666666",textAnchor:"end"},labelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,dx:-20,fill:"#666666",textAnchor:"middle",verticalAnchor:"middle"}}),L.jsxs(En,{children:[L.jsx(lg,{scale:$,width:C,height:I,left:Ki,top:0,lineStyle:{stroke:"#EBEFF3",strokeWidth:1}}),b.map(A=>{const N=Math.abs($(0)-$(A.length)),z=Math.abs(y(A.x1??0)-y(A.x0??0));return L.jsx("g",{children:L.jsx(fM,{x:y(A.x0??0),y:$(A.length),width:z,height:N&&N-1,fill:Re(0).light,stroke:Re(0).dark,strokeWidth:1,onMouseMove:J=>H(J,A),onMouseLeave:()=>B()})},Math.random())})]})]}),_&&T&&L.jsx(X,{top:P,left:O,unstyled:!0,applyPositionStyle:!0,children:L.jsx(cg,{xAxisLabel:t,xValue:`${T.x0} to ${T.x1}`,yAxisLabel:n,yValue:T.length,tooltipTitle:e,legendValue:n,legendDarkColor:Re(0).dark,legendLightColor:Re(0).light})},Math.random()),$.domain()[2]]})}),fg=u.forwardRef((e,t)=>L.jsx(Gi,{debounceTime:10,children:({width:n,height:r})=>L.jsx(Mc,{ref:t,width:n,height:r,...e})}));Mc.defaultProps={domain:void 0,binCount:void 0,integerBins:!1,integerYAxis:!1},Mc.displayName="HistogramBase",fg.displayName="HistogramChart";const a3=fg;function s3({count:e,totalCount:t,title:n,subTitle:r,className:o,unstyledDimension:i=!1,style:a}){const s="max-w-[336px] min-h-[96px] min-w-[200px]";return L.jsxs("div",{className:_e("rabbit-ds box-border px-2 py-4 bg-white rounded-lg shadow flex-col justify-center items-start gap-1 inline-flex",o,!i&&s),style:a,children:[L.jsxs("div",{className:"self-stretch px-3 py-1 flex items-baseline",children:[L.jsx("div",{className:"text-zinc-800 text-2xl font-semibold",children:e}),t&&t>0?L.jsxs("div",{className:"text-stone-500 text-xs font-normal",children:["/",t]}):null]}),L.jsx("div",{className:"self-stretch px-3 justify-start items-center gap-2 inline-flex",children:L.jsxs("div",{className:"grow shrink basis-0 flex-col justify-start items-start gap-0.5 inline-flex",children:[L.jsx("div",{className:"self-stretch justify-start items-start gap-2.5 inline-flex",children:L.jsx("div",{className:"grow shrink basis-0 text-zinc-800 text-xs font-semibold leading-none",children:n})}),r&&L.jsx("div",{className:"self-stretch justify-start py-2 items-center gap-1 inline-flex",children:L.jsx("div",{className:"grow shrink basis-0 text-stone-500 text-xs font-normal leading-none",children:r})})]})})]})}const Xi="ToggleGroup",[pg,r6]=Ct(Xi,[Ao]),hg=Ao(),l3=u.forwardRef((e,t)=>{const{type:n,...r}=e;if(n==="single"){const o=r;return u.createElement(c3,ee({},o,{ref:t}))}if(n==="multiple"){const o=r;return u.createElement(u3,ee({},o,{ref:t}))}throw new Error(`Missing prop \`type\` expected on \`${Xi}\``)}),[mg,vg]=pg(Xi),c3=u.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...i}=e,[a,s]=St({prop:n,defaultProp:r,onChange:o});return u.createElement(mg,{scope:e.__scopeToggleGroup,type:"single",value:a?[a]:[],onItemActivate:s,onItemDeactivate:u.useCallback(()=>s(""),[s])},u.createElement(gg,ee({},i,{ref:t})))}),u3=u.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...i}=e,[a=[],s]=St({prop:n,defaultProp:r,onChange:o}),l=u.useCallback(d=>s((f=[])=>[...f,d]),[s]),c=u.useCallback(d=>s((f=[])=>f.filter(p=>p!==d)),[s]);return u.createElement(mg,{scope:e.__scopeToggleGroup,type:"multiple",value:a,onItemActivate:l,onItemDeactivate:c},u.createElement(gg,ee({},i,{ref:t})))}),[d3,f3]=pg(Xi),gg=u.forwardRef((e,t)=>{const{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:o=!0,orientation:i,dir:a,loop:s=!0,...l}=e,c=hg(n),d=$o(a),f={role:"group",dir:d,...l};return u.createElement(d3,{scope:n,rovingFocus:o,disabled:r},o?u.createElement(Ru,ee({asChild:!0},c,{orientation:i,dir:d,loop:s}),u.createElement(we.div,ee({},f,{ref:t}))):u.createElement(we.div,ee({},f,{ref:t})))}),kc="ToggleGroupItem",p3=u.forwardRef((e,t)=>{const n=vg(kc,e.__scopeToggleGroup),r=f3(kc,e.__scopeToggleGroup),o=hg(e.__scopeToggleGroup),i=n.value.includes(e.value),a=r.disabled||e.disabled,s={...e,pressed:i,disabled:a},l=u.useRef(null);return r.rovingFocus?u.createElement(Zu,ee({asChild:!0},o,{focusable:!a,active:i,ref:l}),u.createElement(yg,ee({},s,{ref:t}))):u.createElement(yg,ee({},s,{ref:t}))}),yg=u.forwardRef((e,t)=>{const{__scopeToggleGroup:n,value:r,...o}=e,i=vg(kc,n),a={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},s=i.type==="single"?a:void 0;return u.createElement(Xc,ee({},s,o,{ref:t,onPressedChange:l=>{l?i.onItemActivate(r):i.onItemDeactivate(r)}}))}),h3=l3,m3=p3;function v3({children:e,...t}){return L.jsx(h3,{className:"flex gap-2",...t,children:e})}function g3({value:e,disabled:t,selected:n,icon:r,label:o,count:i,...a}){return L.jsx(m3,{asChild:!0,value:e,...a,children:L.jsx("button",{type:"button",className:_e("rabbit-ds h-7 flex-col w-auto p-0 border border-solid rounded-full justify-center items-center inline-flex hover:cursor-pointer focus:outline-1 focus:outline-offset-2","data-[state=off]:border-gray-100 data-[state=off]:bg-gray-100 data-[state=off]:text-dove-gray-500","data-[state=on]:border-sky-800 data-[state=on]:bg-sky-100 data-[state=on]:text-sky-800"),children:L.jsxs("div",{className:"px-4 py-1 rounded-full flex-row justify-start items-center gap-2.5 flex",children:[r?L.jsx("div",{className:"w-4 h-4 justify-center items-center flex",children:r}):null,L.jsxs("div",{className:"text-sm leading-tight font-semibold",children:[o?L.jsx("span",{children:o}):null," ",i?L.jsxs("span",{children:["(",i,")"]}):null]})]})})})}ve.Button=N0,ve.CardKPI=s3,ve.Checkbox=Kc,ve.Chip=O0,ve.ChipGroup=v3,ve.ChipGroupItem=g3,ve.Dropdown=Vx,ve.DropdownCheckboxItem=qd,ve.DropdownContent=Gd,ve.DropdownGroup=Bd,ve.DropdownItem=Vd,ve.DropdownLabel=Kd,ve.DropdownPortal=Yx,ve.DropdownRadioGroup=Xx,ve.DropdownRadioItem=Yd,ve.DropdownSeparator=Xd,ve.DropdownSub=Kx,ve.DropdownSubContent=Hd,ve.DropdownSubTrigger=Ud,ve.DropdownTrigger=qx,ve.HistogramChart=a3,ve.Input=A0,ve.LineChart=G_,ve.SankeyChart=e3,ve.Select=Fw,ve.SelectContent=pf,ve.SelectGroup=jw,ve.SelectItem=mf,ve.SelectLabel=hf,ve.SelectSeparator=vf,ve.SelectTrigger=ff,ve.SelectValue=zw,ve.Tooltip=_f,ve.TooltipContent=es,ve.TooltipPortal=Af,ve.TooltipProvider=Of,ve.TooltipTrigger=Nf,Object.defineProperty(ve,Symbol.toStringTag,{value:"Module"})});
|
|
86
|
+
`}),B.appendChild(I.createTextNode(Je))}G.timeEnd("clone node"),ue==null||ue($e),se!==!1&&ae($e)&&(G.time("embed web font"),yield j3($e,M),G.timeEnd("embed web font")),G.time("embed node"),zg($e,M);const Ee=Z.length;let Te=0;const Ie=()=>v(this,null,function*(){for(;;){const Je=Z.pop();if(!Je)break;try{yield Je}catch(Rt){Le("Failed to run task",Rt)}ce==null||ce(++Te,Ee)}});ce==null||ce(Te,Ee),yield Promise.all([...Array(4)].map(Ie)),G.timeEnd("embed node"),be==null||be($e);const Ne=q3($e,M);return K&&Ne.insertBefore(K,Ne.children[0]),B&&Ne.insertBefore(B,Ne.children[0]),he&&Dg(M),ye==null||ye(Ne),Ne})}function q3(g,E){const{width:M,height:I}=E,G=mo(M,I,g.ownerDocument),Z=G.ownerDocument.createElementNS(G.namespaceURI,"foreignObject");return Z.setAttributeNS(null,"x","0%"),Z.setAttributeNS(null,"y","0%"),Z.setAttributeNS(null,"width","100%"),Z.setAttributeNS(null,"height","100%"),Z.append(g),G.appendChild(Z),G}function ua(g,E){return v(this,null,function*(){var M;const I=yield st(g,E),G=yield Bg(I),Z=br(G,I.isEnable("removeControlCharacter"));I.autoDestruct||(I.svgStyleElement=Qe(I.ownerDocument),I.svgDefsElement=(M=I.ownerDocument)==null?void 0:M.createElementNS(Bn,"defs"),I.svgStyles.clear());const B=Nt(Z,G.ownerDocument);return yield Kt(B,I)})}function Y3(g,E){return v(this,null,function*(){const M=yield st(g,E),{log:I,type:G,quality:Z,dpi:B}=M,K=yield ua(M);I.time("canvas to blob");const ie=yield Ji(K,G,Z);if(["image/png","image/jpeg"].includes(G)&&B){const se=yield na(ie.slice(0,33));let ce=new Uint8Array(se);return G==="image/png"?ce=_(ce,B):G==="image/jpeg"&&(ce=w(ce,B)),new Blob([ce,ie.slice(33)],{type:G})}return I.timeEnd("canvas to blob"),ie})}function $r(g,E){return v(this,null,function*(){const M=yield st(g,E),{log:I,quality:G,type:Z,dpi:B}=M,K=yield ua(M);I.time("canvas to data url");let ie=K.toDataURL(Z,G);if(["image/png","image/jpeg"].includes(Z)&&B&&H&&W){const[se,ce]=ie.split(",");let he=0,ue=!1;if(Z==="image/png"){const Ne=R(ce);Ne>=0?(he=Math.ceil((Ne+28)/3)*4,ue=!0):he=33/3*4}else Z==="image/jpeg"&&(he=18/3*4);const be=ce.substring(0,he),ye=ce.substring(he),$e=window.atob(be),Ee=new Uint8Array($e.length);for(let Ne=0;Ne<Ee.length;Ne++)Ee[Ne]=$e.charCodeAt(Ne);const Te=Z==="image/png"?_(Ee,B,ue):w(Ee,B),Ie=window.btoa(String.fromCharCode(...Te));ie=[se,",",Ie,ye].join("")}return I.timeEnd("canvas to data url"),ie})}function Wg(g,E){return v(this,null,function*(){const M=yield st(g,E),{width:I,height:G,ownerDocument:Z}=M,B=yield $r(M),K=mo(I,G,Z),ie=K.ownerDocument.createElementNS(K.namespaceURI,"image");return ie.setAttributeNS(null,"href",B),ie.setAttributeNS(null,"height","100%"),ie.setAttributeNS(null,"width","100%"),K.appendChild(ie),br(K,M.isEnable("removeControlCharacter"))})}function K3(g,E){return v(this,null,function*(){const M=yield st(g,E),{ownerDocument:I,width:G,height:Z,scale:B,type:K}=M,ie=K==="image/svg+xml"?yield Wg(M):yield $r(M),se=Nt(ie,I);return se.width=Math.floor(G*B),se.height=Math.floor(Z*B),se.style.width=`${G}px`,se.style.height=`${Z}px`,se})}function X3(g,E){return v(this,null,function*(){return $r(yield st(g,m(p({},E),{type:"image/jpeg"})))})}function R3(g,E){return v(this,null,function*(){const M=yield st(g,E),I=yield ua(M);return I.getContext("2d").getImageData(0,0,I.width,I.height).data})}function Z3(g,E){return v(this,null,function*(){return $r(yield st(g,m(p({},E),{type:"image/png"})))})}function Q3(g,E){return v(this,null,function*(){return $r(yield st(g,m(p({},E),{type:"image/webp"})))})}n.createContext=ia,n.destroyContext=Dg,n.domToBlob=Y3,n.domToCanvas=ua,n.domToDataUrl=$r,n.domToForeignObjectSvg=Bg,n.domToImage=K3,n.domToJpeg=X3,n.domToPixel=R3,n.domToPng=Z3,n.domToSvg=Wg,n.domToWebp=Q3,n.loadMedia=Yt,n.waitUntilLoad=go,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})})})(Mc,Mc.exports);var V_=Mc.exports;const kc=(e,t,n)=>{u.useImperativeHandle(t,()=>({download(){e.current&&V_.domToPng(e.current,{scale:5}).then(r=>{const o=document.createElement("a");o.download=`${n}.png`,o.href=r,o.click()})}}))},q_=({x:e,y:t,datum:n,size:r})=>A.jsx(Sc,{cx:e,cy:t,stroke:n.color.dark,strokeWidth:1,fill:n.color.light,r:r/2}),Y_=({x:e,y:t,datum:n})=>A.jsx(Sc,{cx:e,cy:t,stroke:n.color.dark,strokeWidth:1,fill:n.color.dark,r:5,style:{zIndex:1500}}),qi={xAccessor:e=>e.x,yAccessor:e=>e.y},eg=(e,t,n)=>n==="pre"?`${t}${e}`:`${e}${t}`,tg=10,K_=5,Oc=u.forwardRef(({nodes:e,height:t,width:n,xAxisValues:r,series:o,xAxisLabel:i,yAxisLabel:a,xAxisDomain:s,yAxisDomain:l,xAxisUnitSymbol:c,yAxisUnitSymbol:d,tooltipTitle:f,mode:p,xAxisCharLimit:m,connectNulls:h=!1,maxNodesInMiniMode:v=K_,tooltipStackCharLimit:w=tg},y)=>{const[b,$]=u.useState(e.map(P=>P.id)),S=u.useRef(null);kc(S,y,`${i}-${a}-LineChart`);const x=u.useMemo(()=>o.map((P,_)=>({points:P.data.map((j,F)=>({x:r[F],y:j,nodeId:P.id,color:Re(_)}))})).slice(0,p==="mini"?v:o.length),[r,o,p,v]),T=u.useMemo(()=>p==="full"?x.filter(P=>b.includes(P.points[0].nodeId)):x,[x,b,p]),O=u.useMemo(()=>Math.floor((n-(p==="mini"?0:150))/(r.length*8)),[n,r,p]);return A.jsxs("div",{ref:S,id:"line-chart",className:"bg-white flex flex-col rabbit-ds",style:{width:n,height:t},children:[A.jsxs("div",{className:"w-full min-w-0 min-h-0 h-full flex flex-row",children:[A.jsx("div",{className:"w-full min-w-0 min-h-0 h-full",children:A.jsxs(gr,{margin:{top:10,left:50,right:50,bottom:50},xScale:{type:"band",nice:!0,...s&&{domain:s}},yScale:{type:"linear",nice:!0,...l&&{domain:l}},children:[A.jsx(fk,{columns:!1,numTicks:6,lineStyle:{stroke:"#EBEFF3",strokeWidth:1}}),A.jsx(vv,{hideTicks:!0,orientation:"bottom",stroke:"#CFD7DF",strokeWidth:1,numTicks:6,tickFormat:P=>c?eg(P,c.symbol,c.position):P,rangePadding:{end:10},tickComponent:P=>A.jsx(Ec,{textLabel:P.formattedValue||"",x:P.x,y:P.y,textStyles:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,fill:"#666666",textAnchor:"middle"},axisCharLimit:m??O}),label:`${i} ➔`,labelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,dy:10,fill:"#666666",textAnchor:"middle",verticalAnchor:"middle"}}),A.jsx(vv,{hideTicks:!0,numTicks:6,strokeWidth:1,orientation:"left",stroke:"#CFD7DF",label:`${a} ➔`,tickFormat:P=>d?eg(P,d.symbol,d.position):P,tickLabelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,fill:"#666666"},labelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,dx:-20,fill:"#666666",textAnchor:"middle",verticalAnchor:"middle"}}),T.map((P,_)=>A.jsxs(A.Fragment,{children:[A.jsx(G_,{data:P.points,xAccessor:qi.xAccessor,yAccessor:qi.yAccessor,connectNulls:h}),A.jsx(F_,{dataKey:`Performance Management ${_}`,data:P.points,size:8,renderGlyph:q_,xAccessor:qi.xAccessor,yAccessor:qi.yAccessor})]})),A.jsx(Tv,{showDatumGlyph:!0,scroll:!0,debounce:500,snapTooltipToDatumX:!0,snapTooltipToDatumY:!0,detectBounds:!0,unstyled:!0,applyPositionStyle:!0,renderGlyph:Y_,renderTooltip:({tooltipData:P})=>{var F,V,R,X,C,L;const _=e.find(H=>{var W;return H.id===((W=P==null?void 0:P.nearestDatum)==null?void 0:W.datum.nodeId)}),j=((F=P==null?void 0:P.nearestDatum)==null?void 0:F.datum)&&((V=P==null?void 0:P.nearestDatum)==null?void 0:V.datum.x.length)<w;return A.jsx(Jv,{xValue:(R=P==null?void 0:P.nearestDatum)==null?void 0:R.datum.x,yValue:(X=P==null?void 0:P.nearestDatum)==null?void 0:X.datum.y,xAxisLabel:i,yAxisLabel:a,showSideBySide:!!j,tooltipTitle:f,legendValue:(_==null?void 0:_.name)||"",legendDarkColor:((C=P==null?void 0:P.nearestDatum)==null?void 0:C.datum.color.dark)||Re(0).dark,legendLightColor:((L=P==null?void 0:P.nearestDatum)==null?void 0:L.datum.color.light)||Re(0).light})}})]})}),p==="full"&&A.jsxs("div",{className:"w-64 p-4 bg-zinc-100 rounded-lg flex-col justify-start items-start gap-0.5 inline-flex text-xs grow-0 shrink-0 basis-auto",children:[A.jsxs("div",{className:"text-sm font-semibold pb-2",children:[A.jsx("span",{className:"pr-1",children:i}),"(",x.length,")"]}),x.map(P=>{const _=e.find(j=>j.id===P.points[0].nodeId);return _&&A.jsxs("div",{className:"flex justify-between items-center gap-1 py-1 w-full",children:[A.jsxs("div",{className:"flex justify-between items-center",children:[A.jsx("div",{style:{backgroundColor:P.points[0].color.light,borderColor:P.points[0].color.dark},className:"h-3 w-3 rounded-full border mr-1"}),_.name]}),A.jsx("div",{className:"flex items-center",children:A.jsx(nu,{checked:b.includes(_.id),onCheckedChange:j=>{let F=[...b];j?F=[...b,_.id]:F.splice(b.indexOf(_.id),1),$(F)}})})]},_.id)})]})]}),p==="mini"&&A.jsx("div",{className:"flex flex-row flex-wrap justify-center gap-4 text-[10px] text-[#666666] font-semibold",children:x.map(P=>{const _=e.find(j=>j.id===P.points[0].nodeId);return A.jsxs("div",{className:"flex justify-center items-center gap-1",children:[A.jsx("div",{style:{backgroundColor:P.points[0].color.light,borderColor:P.points[0].color.dark},className:"h-3 w-3 rounded-full border"}),_==null?void 0:_.name]},_==null?void 0:_.id)})})]})}),X_={xAxisUnitSymbol:void 0,yAxisUnitSymbol:void 0,mode:"mini",xAxisCharLimit:void 0,tooltipStackCharLimit:tg,xAxisDomain:void 0,yAxisDomain:void 0,connectNulls:!1};Oc.defaultProps=X_,Oc.displayName="LineBase";const ng=u.forwardRef((e,t)=>A.jsx(Vi,{debounceTime:10,children:({width:n,height:r})=>A.jsx(Oc,{ref:t,width:n,height:r,...e})}));ng.displayName="LineChart";const R_=ng;function rg(e,t){let n;if(t===void 0)for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let o of e)(o=t(o,++r,e))!=null&&(n<o||n===void 0&&o>=o)&&(n=o)}return n}function Z_(e,t){let n;if(t===void 0)for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let o of e)(o=t(o,++r,e))!=null&&(n>o||n===void 0&&o>=o)&&(n=o)}return n}function _c(e,t){let n=0;if(t===void 0)for(let r of e)(r=+r)&&(n+=r);else{let r=-1;for(let o of e)(o=+t(o,++r,e))&&(n+=o)}return n}function Q_(e,t){return e.sourceLinks.length?e.depth:t-1}function Yi(e){return function(){return e}}function og(e,t){return Ki(e.source,t.source)||e.index-t.index}function ig(e,t){return Ki(e.target,t.target)||e.index-t.index}function Ki(e,t){return e.y0-t.y0}function Nc(e){return e.value}function J_(e){return e.index}function e3(e){return e.nodes}function t3(e){return e.links}function ag(e,t){const n=e.get(t);if(!n)throw new Error("missing: "+t);return n}function sg({nodes:e}){for(const t of e){let n=t.y0,r=n;for(const o of t.sourceLinks)o.y0=n+o.width/2,n+=o.width;for(const o of t.targetLinks)o.y1=r+o.width/2,r+=o.width}}function n3(){let e=0,t=0,n=1,r=1,o=24,i=8,a,s=J_,l=Q_,c,d,f=e3,p=t3,m=6;function h(){const C={nodes:f.apply(null,arguments),links:p.apply(null,arguments)};return v(C),w(C),y(C),b(C),x(C),sg(C),C}h.update=function(C){return sg(C),C},h.nodeId=function(C){return arguments.length?(s=typeof C=="function"?C:Yi(C),h):s},h.nodeAlign=function(C){return arguments.length?(l=typeof C=="function"?C:Yi(C),h):l},h.nodeSort=function(C){return arguments.length?(c=C,h):c},h.nodeWidth=function(C){return arguments.length?(o=+C,h):o},h.nodePadding=function(C){return arguments.length?(i=a=+C,h):i},h.nodes=function(C){return arguments.length?(f=typeof C=="function"?C:Yi(C),h):f},h.links=function(C){return arguments.length?(p=typeof C=="function"?C:Yi(C),h):p},h.linkSort=function(C){return arguments.length?(d=C,h):d},h.size=function(C){return arguments.length?(e=t=0,n=+C[0],r=+C[1],h):[n-e,r-t]},h.extent=function(C){return arguments.length?(e=+C[0][0],n=+C[1][0],t=+C[0][1],r=+C[1][1],h):[[e,t],[n,r]]},h.iterations=function(C){return arguments.length?(m=+C,h):m};function v({nodes:C,links:L}){for(const[W,D]of C.entries())D.index=W,D.sourceLinks=[],D.targetLinks=[];const H=new Map(C.map((W,D)=>[s(W,D,C),W]));for(const[W,D]of L.entries()){D.index=W;let{source:N,target:z}=D;typeof N!="object"&&(N=D.source=ag(H,N)),typeof z!="object"&&(z=D.target=ag(H,z)),N.sourceLinks.push(D),z.targetLinks.push(D)}if(d!=null)for(const{sourceLinks:W,targetLinks:D}of C)W.sort(d),D.sort(d)}function w({nodes:C}){for(const L of C)L.value=L.fixedValue===void 0?Math.max(_c(L.sourceLinks,Nc),_c(L.targetLinks,Nc)):L.fixedValue}function y({nodes:C}){const L=C.length;let H=new Set(C),W=new Set,D=0;for(;H.size;){for(const N of H){N.depth=D;for(const{target:z}of N.sourceLinks)W.add(z)}if(++D>L)throw new Error("circular link");H=W,W=new Set}}function b({nodes:C}){const L=C.length;let H=new Set(C),W=new Set,D=0;for(;H.size;){for(const N of H){N.height=D;for(const{source:z}of N.targetLinks)W.add(z)}if(++D>L)throw new Error("circular link");H=W,W=new Set}}function $({nodes:C}){const L=rg(C,D=>D.depth)+1,H=(n-e-o)/(L-1),W=new Array(L);for(const D of C){const N=Math.max(0,Math.min(L-1,Math.floor(l.call(null,D,L))));D.layer=N,D.x0=e+N*H,D.x1=D.x0+o,W[N]?W[N].push(D):W[N]=[D]}if(c)for(const D of W)D.sort(c);return W}function S(C){const L=Z_(C,H=>(r-t-(H.length-1)*a)/_c(H,Nc));for(const H of C){let W=t;for(const D of H){D.y0=W,D.y1=W+D.value*L,W=D.y1+a;for(const N of D.sourceLinks)N.width=N.value*L}W=(r-W+a)/(H.length+1);for(let D=0;D<H.length;++D){const N=H[D];N.y0+=W*(D+1),N.y1+=W*(D+1)}V(H)}}function x(C){const L=$(C);a=Math.min(i,(r-t)/(rg(L,H=>H.length)-1)),S(L);for(let H=0;H<m;++H){const W=Math.pow(.99,H),D=Math.max(1-W,(H+1)/m);O(L,W,D),T(L,W,D)}}function T(C,L,H){for(let W=1,D=C.length;W<D;++W){const N=C[W];for(const z of N){let J=0,Q=0;for(const{source:te,value:ae}of z.targetLinks){let Y=ae*(z.layer-te.layer);J+=R(te,z)*Y,Q+=Y}if(!(Q>0))continue;let oe=(J/Q-z.y0)*L;z.y0+=oe,z.y1+=oe,F(z)}c===void 0&&N.sort(Ki),P(N,H)}}function O(C,L,H){for(let W=C.length,D=W-2;D>=0;--D){const N=C[D];for(const z of N){let J=0,Q=0;for(const{target:te,value:ae}of z.sourceLinks){let Y=ae*(te.layer-z.layer);J+=X(z,te)*Y,Q+=Y}if(!(Q>0))continue;let oe=(J/Q-z.y0)*L;z.y0+=oe,z.y1+=oe,F(z)}c===void 0&&N.sort(Ki),P(N,H)}}function P(C,L){const H=C.length>>1,W=C[H];j(C,W.y0-a,H-1,L),_(C,W.y1+a,H+1,L),j(C,r,C.length-1,L),_(C,t,0,L)}function _(C,L,H,W){for(;H<C.length;++H){const D=C[H],N=(L-D.y0)*W;N>1e-6&&(D.y0+=N,D.y1+=N),L=D.y1+a}}function j(C,L,H,W){for(;H>=0;--H){const D=C[H],N=(D.y1-L)*W;N>1e-6&&(D.y0-=N,D.y1-=N),L=D.y0-a}}function F({sourceLinks:C,targetLinks:L}){if(d===void 0){for(const{source:{sourceLinks:H}}of L)H.sort(ig);for(const{target:{targetLinks:H}}of C)H.sort(og)}}function V(C){if(d===void 0)for(const{sourceLinks:L,targetLinks:H}of C)L.sort(ig),H.sort(og)}function R(C,L){let H=C.y0-(C.sourceLinks.length-1)*a/2;for(const{target:W,width:D}of C.sourceLinks){if(W===L)break;H+=D+a}for(const{source:W,width:D}of L.targetLinks){if(W===C)break;H-=D}return H}function X(C,L){let H=L.y0-(L.targetLinks.length-1)*a/2;for(const{source:W,width:D}of L.targetLinks){if(W===C)break;H+=D+a}for(const{target:W,width:D}of C.sourceLinks){if(W===L)break;H-=D}return H}return h}function r3({tooltipData:e,fromLabel:t,toLabel:n,weightLabel:r,tooltipTitle:o}){var s,l,c,d;const i=e.source,a=e.target;return A.jsxs(Ue,{tooltipTitle:o,children:[A.jsx(Ue.Item,{label:t,value:i.name}),A.jsx(Ue.Item,{label:n,value:a.name}),A.jsx(Ue.Item,{label:r,value:e.weight.toString()}),A.jsx(Ue.Legend,{value:i.name,darkColor:(s=Re(i.index||0))==null?void 0:s.dark,lightColor:(l=Re(i.index||0))==null?void 0:l.light}),A.jsx(Ue.Legend,{value:a.name,darkColor:(c=Re(a.index||0))==null?void 0:c.dark,lightColor:(d=Re(a.index||0))==null?void 0:d.light})]})}const lg=80,cg=20,o3=30,i3=12,ug=u.forwardRef(({height:e,width:t,tooltipTitle:n,nodes:r,links:o,groups:i,weightLabel:a},s)=>{const l=u.useMemo(()=>n3().nodeId(C=>C.id).nodeWidth(i3).nodePadding(o3).nodeAlign(C=>C.group),[]),c=u.useRef(null);kc(c,s,`${n}-SankeyChart`);const[d,f]=u.useState(""),[p,m]=u.useState(null),{tooltipData:h,tooltipLeft:v,tooltipTop:w,tooltipOpen:y,showTooltip:b,hideTooltip:$}=Bl(),{containerBounds:S,containerRef:x,TooltipInPortal:T}=Yl({detectBounds:!0,debounce:500,scroll:!0,zIndex:1500}),O=u.useMemo(()=>l.extent([[lg,cg],[t-lg,e-cg-50]])({nodes:r,links:o.map(C=>({...C,value:Number(C.weight)}))}),[e,t,l,r,o]),P=u.useMemo(()=>Math.max(...O.nodes.map(C=>C.depth??0)),[O]),_=u.useMemo(()=>{const C={};let L=-1/0;return O.nodes.forEach(H=>{const{group:W}=H;C[W]?(C[W].x=Math.max(C[W].x??-1/0,H.x0??-1/0),C[W].y=Math.max(C[W].y??-1/0,H.y1??-1/0)):(C[W]={},C[W].x=H.x0,C[W].y=H.y1),L=Math.max(L,C[W].y??-1/0),C[W].y=L}),C},[O]),j=u.useCallback(C=>{const L=l.nodeId()(C);f(d===L?"":L)},[d,l]),F=u.useCallback(()=>{f(""),m(null)},[]),V=u.useMemo(()=>d===""&&p===null?new Set:new Set(O.links.filter(C=>l.nodeId()(C.source)===d||l.nodeId()(C.target)===d||(p==null?void 0:p.source)===C.source&&(p==null?void 0:p.target)===C.target)),[d,O,p,l]),R=u.useCallback((C,L)=>{const H=("clientX"in C?C.clientX:0)-S.left,W=("clientY"in C?C.clientY:0)-S.top;m(L),H&&W&&b({tooltipLeft:H,tooltipTop:W,tooltipData:L})},[b,S]),X=u.useCallback(()=>{F(),$()},[F,$]);return A.jsxs("div",{ref:c,className:"bg-white w-min h-min rabbit-ds",id:"sankey-chart",children:[A.jsxs("svg",{height:e,width:t,ref:x,children:[A.jsx("g",{children:O.links.map(C=>A.jsx(OM,{data:C,source:L=>({x:L.source.x1,y:L.y0}),target:L=>({x:L.target.x0,y:L.y1}),x:L=>L.x??0,y:L=>L.y??0,fill:"none",pointerEvents:"stroke",onMouseLeave:()=>X(),onMouseMove:L=>R(L,C),stroke:Re(C.source.index||0).light,strokeWidth:C.width,strokeOpacity:V.has(C)?.7:.25},C.index))}),A.jsx("g",{children:O.nodes.map(C=>{var L,H,W;return A.jsx("g",{children:A.jsx($M,{x:C.x0??0,height:(C.y1??0)-(C.y0??0)+10,width:(C.x1??0)-(C.x0??0),y:(C.y0??0)-5,onMouseEnter:()=>j(C),onMouseLeave:()=>F(),radius:2,fill:d===C.id?(L=Re(C.index||0))==null?void 0:L.dark:(H=Re(C.index||0))==null?void 0:H.light,stroke:(W=Re(C.index||0))==null?void 0:W.dark,all:!0})},C.index)})}),A.jsx("g",{children:i.map(C=>A.jsx(Ec,{axisCharLimit:20,x:_[C.id].x??0,y:(_[C.id].y??0)+40,textLabel:C.name,textStyles:{fontSize:10,fontWeight:600,textAnchor:"middle",fill:"#666666"}},C.id))}),A.jsxs("g",{children:[O.nodes.map(C=>A.jsx(Ec,{axisCharLimit:8,x:C.depth===P?(C.x1??0)+10:(C.x0??0)-10,y:(C.y0??0)+((C.y1??0)-(C.y0??0))/2,textLabel:C.name,textStyles:{fontSize:10,fontWeight:600,textAnchor:C.depth===P?"start":"end",fill:"#666666"}},C.index)),O.nodes.map(C=>C.value&&A.jsx(Es,{x:C.depth===P?(C.x1??0)+10:(C.x0??0)-10,y:(C.y0??0)+((C.y1??0)-(C.y0??0))/2+16,style:{fontSize:10,fontWeight:400,textAnchor:C.depth===P?"start":"end",fill:"#666666"},children:`(${C.value.toString()})`},C.index))]})]}),y&&h&&A.jsx(T,{top:w,left:v,unstyled:!0,applyPositionStyle:!0,children:A.jsx(r3,{tooltipData:h,fromLabel:`From: ${i[h.source.group].name}`,toLabel:`To: ${i[h.target.group].name}`,weightLabel:a,tooltipTitle:n})},Math.random())]})});ug.displayName="Sankey";const dg=u.forwardRef((e,t)=>A.jsx(Vi,{debounceTime:10,children:({width:n,height:r})=>n&&r&&A.jsx(ug,{ref:t,width:n,height:r,...e})}));dg.displayName="SankeyChart";const a3=dg;function s3(e){return"bandwidth"in e?e.bandwidth():0}var l3=["top","left","scale","width","stroke","strokeWidth","strokeDasharray","className","children","numTicks","lineStyle","offset","tickValues"];function Dc(){return Dc=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},Dc.apply(this,arguments)}function c3(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function fg(e){var t=e.top,n=t===void 0?0:t,r=e.left,o=r===void 0?0:r,i=e.scale,a=e.width,s=e.stroke,l=s===void 0?"#eaf0f6":s,c=e.strokeWidth,d=c===void 0?1:c,f=e.strokeDasharray,p=e.className,m=e.children,h=e.numTicks,v=h===void 0?10:h,w=e.lineStyle,y=e.offset,b=e.tickValues,$=c3(e,l3),S=b??bl(i,v),x=(y??0)+s3(i)/2,T=S.map(function(O,P){var _,j=((_=yl(i(O)))!=null?_:0)+x;return{index:P,from:new an({x:0,y:j}),to:new an({x:a,y:j})}});return u.createElement(En,{className:et("visx-rows",p),top:n,left:o},m?m({lines:T}):T.map(function(O){var P=O.from,_=O.to,j=O.index;return u.createElement(AM,Dc({key:"row-line-"+j,from:P,to:_,stroke:l,strokeWidth:d,strokeDasharray:f,style:w},$))}))}fg.propTypes={tickValues:ne.array,width:ne.number.isRequired};function pg({xValue:e,yValue:t,tooltipTitle:n,xAxisLabel:r,yAxisLabel:o,legendValue:i,legendDarkColor:a,legendLightColor:s}){const l=e==null?void 0:e.toString(),c=t==null?void 0:t.toString();return A.jsxs(Ue,{tooltipTitle:n,showSideBySide:!0,children:[A.jsx(Ue.Item,{label:r,value:l}),A.jsx(Ue.Item,{label:o,value:c}),A.jsx(Ue.Legend,{value:i,darkColor:a,lightColor:s})]})}pg.defaultProps={xValue:void 0,yValue:void 0};const hg=20,mg=50,Ac=80,Xi=50,u3=10,d3=25,Ic=u.forwardRef(({tooltipTitle:e,xAxisLabel:t,yAxisLabel:n,domain:r,binCount:o,data:i,width:a,height:s,maxBinCount:l=d3,minBinCount:c=u3,integerBins:d=!1,integerYAxis:f=!1},p)=>{const m=u.useMemo(()=>si(i),[i]),{histogramDomain:h,threshold:v,thresholdInteger:w}=u.useMemo(()=>{const D=m[0]??0,N=D===m[1]?c+D:m[1]??0,z=N-D>c?N:c+D,J=Math.min(Math.max(N-D,c),l),Q=Math.floor(m[0]??0),oe=Math.ceil(z);return{histogramDomain:r||(d?[Q,oe]:[D,N]),threshold:J,thresholdInteger:Math.ceil(J)}},[m,r,d,l,c]),y=u.useMemo(()=>io({domain:h,range:[Xi,a-mg],round:!0,nice:!0}),[h,a]),b=u.useMemo(()=>IE().domain(y.domain()).thresholds(o||(d?w:v))(i),[y,o,i,v,w,d]),$=u.useMemo(()=>io({domain:[0,_s(b,D=>D.length)??0],range:[s-Ac,hg],round:!0,nice:!0}),[b,s]),S=u.useMemo(()=>$.ticks().filter(D=>f?Number.isInteger(D):D),[f,$]),x=u.useRef(null);kc(x,p,`${t}-${n}-Histogram`);const{tooltipData:T,tooltipLeft:O,tooltipTop:P,tooltipOpen:_,showTooltip:j,hideTooltip:F}=Bl(),{containerBounds:V,containerRef:R,TooltipInPortal:X}=Yl({detectBounds:!0,debounce:500,scroll:!0,zIndex:1500}),C=a-Xi-mg,L=s-hg-Ac-100,H=u.useCallback((D,N)=>{const z=("clientX"in D?D.clientX:0)-V.left,J=("clientY"in D?D.clientY:0)-V.top;z&&J&&j({tooltipLeft:z,tooltipTop:J,tooltipData:N})},[j,V]),W=u.useCallback(()=>{F()},[F]);return A.jsxs("div",{className:"bg-white flex flex-col rabbit-ds",style:{width:a,height:s},ref:x,children:[A.jsxs("svg",{width:a,height:s,ref:R,children:[A.jsx(Fl,{orientation:"bottom",scale:y,top:s-Ac,hideTicks:!0,numTicks:6,stroke:"#CFD7DF",strokeWidth:1,rangePadding:{end:10},label:`${t} ➔`,tickLabelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,fill:"#666666",textAnchor:"middle"},labelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,dy:10,fill:"#666666",textAnchor:"middle",verticalAnchor:"middle"}}),A.jsx(Fl,{orientation:"left",scale:$,left:Xi,hideTicks:!0,strokeWidth:1,stroke:"#CFD7DF",tickFormat:f?Ti("d"):void 0,tickValues:S,label:`${n} ➔`,tickLabelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,fill:"#666666",textAnchor:"end"},labelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,dx:-20,fill:"#666666",textAnchor:"middle",verticalAnchor:"middle"}}),A.jsxs(En,{children:[A.jsx(fg,{scale:$,width:C,height:L,left:Xi,top:0,lineStyle:{stroke:"#EBEFF3",strokeWidth:1}}),b.map(D=>{const N=Math.abs($(0)-$(D.length)),z=Math.abs(y(D.x1??0)-y(D.x0??0));return A.jsx("g",{children:A.jsx(yM,{x:y(D.x0??0),y:$(D.length),width:z,height:N&&N-1,fill:Re(0).light,stroke:Re(0).dark,strokeWidth:1,onMouseMove:J=>H(J,D),onMouseLeave:()=>W()})},Math.random())})]})]}),_&&T&&A.jsx(X,{top:P,left:O,unstyled:!0,applyPositionStyle:!0,children:A.jsx(pg,{xAxisLabel:t,xValue:`${T.x0} to ${T.x1}`,yAxisLabel:n,yValue:T.length,tooltipTitle:e,legendValue:n,legendDarkColor:Re(0).dark,legendLightColor:Re(0).light})},Math.random()),$.domain()[2]]})}),vg=u.forwardRef((e,t)=>A.jsx(Vi,{debounceTime:10,children:({width:n,height:r})=>A.jsx(Ic,{ref:t,width:n,height:r,...e})}));Ic.defaultProps={domain:void 0,binCount:void 0,integerBins:!1,integerYAxis:!1},Ic.displayName="HistogramBase",vg.displayName="HistogramChart";const f3=vg;function p3({count:e,totalCount:t,title:n,subTitle:r,className:o,unstyledDimension:i=!1,style:a}){const s="max-w-[336px] min-h-[96px] min-w-[200px]";return A.jsxs("div",{className:_e("rabbit-ds box-border px-2 py-4 bg-white rounded-lg shadow flex-col justify-center items-start gap-1 inline-flex",o,!i&&s),style:a,children:[A.jsxs("div",{className:"self-stretch px-3 py-1 flex items-baseline",children:[A.jsx("div",{className:"text-zinc-800 text-2xl font-semibold",children:e}),t&&t>0?A.jsxs("div",{className:"text-stone-500 text-xs font-normal",children:["/",t]}):null]}),A.jsx("div",{className:"self-stretch px-3 justify-start items-center gap-2 inline-flex",children:A.jsxs("div",{className:"grow shrink basis-0 flex-col justify-start items-start gap-0.5 inline-flex",children:[A.jsx("div",{className:"self-stretch justify-start items-start gap-2.5 inline-flex",children:A.jsx("div",{className:"grow shrink basis-0 text-zinc-800 text-xs font-semibold leading-none",children:n})}),r&&A.jsx("div",{className:"self-stretch justify-start py-2 items-center gap-1 inline-flex",children:A.jsx("div",{className:"grow shrink basis-0 text-stone-500 text-xs font-normal leading-none",children:r})})]})})]})}const Ri="ToggleGroup",[gg,d6]=Ct(Ri,[Ao]),yg=Ao(),h3=u.forwardRef((e,t)=>{const{type:n,...r}=e;if(n==="single"){const o=r;return u.createElement(m3,ee({},o,{ref:t}))}if(n==="multiple"){const o=r;return u.createElement(v3,ee({},o,{ref:t}))}throw new Error(`Missing prop \`type\` expected on \`${Ri}\``)}),[bg,wg]=gg(Ri),m3=u.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...i}=e,[a,s]=St({prop:n,defaultProp:r,onChange:o});return u.createElement(bg,{scope:e.__scopeToggleGroup,type:"single",value:a?[a]:[],onItemActivate:s,onItemDeactivate:u.useCallback(()=>s(""),[s])},u.createElement(xg,ee({},i,{ref:t})))}),v3=u.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...i}=e,[a=[],s]=St({prop:n,defaultProp:r,onChange:o}),l=u.useCallback(d=>s((f=[])=>[...f,d]),[s]),c=u.useCallback(d=>s((f=[])=>f.filter(p=>p!==d)),[s]);return u.createElement(bg,{scope:e.__scopeToggleGroup,type:"multiple",value:a,onItemActivate:l,onItemDeactivate:c},u.createElement(xg,ee({},i,{ref:t})))}),[g3,y3]=gg(Ri),xg=u.forwardRef((e,t)=>{const{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:o=!0,orientation:i,dir:a,loop:s=!0,...l}=e,c=yg(n),d=Co(a),f={role:"group",dir:d,...l};return u.createElement(g3,{scope:n,rovingFocus:o,disabled:r},o?u.createElement(rd,ee({asChild:!0},c,{orientation:i,dir:d,loop:s}),u.createElement(xe.div,ee({},f,{ref:t}))):u.createElement(xe.div,ee({},f,{ref:t})))}),Lc="ToggleGroupItem",b3=u.forwardRef((e,t)=>{const n=wg(Lc,e.__scopeToggleGroup),r=y3(Lc,e.__scopeToggleGroup),o=yg(e.__scopeToggleGroup),i=n.value.includes(e.value),a=r.disabled||e.disabled,s={...e,pressed:i,disabled:a},l=u.useRef(null);return r.rovingFocus?u.createElement(od,ee({asChild:!0},o,{focusable:!a,active:i,ref:l}),u.createElement($g,ee({},s,{ref:t}))):u.createElement($g,ee({},s,{ref:t}))}),$g=u.forwardRef((e,t)=>{const{__scopeToggleGroup:n,value:r,...o}=e,i=wg(Lc,n),a={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},s=i.type==="single"?a:void 0;return u.createElement(ru,ee({},s,o,{ref:t,onPressedChange:l=>{l?i.onItemActivate(r):i.onItemDeactivate(r)}}))}),w3=h3,x3=b3;function $3({children:e,...t}){return A.jsx(w3,{className:"flex gap-2",...t,children:e})}function C3({value:e,disabled:t,selected:n,icon:r,label:o,count:i,...a}){return A.jsx(x3,{asChild:!0,value:e,...a,children:A.jsx("button",{type:"button",className:_e("rabbit-ds h-7 flex-col w-auto p-0 border border-solid rounded-full justify-center items-center inline-flex hover:cursor-pointer focus:outline-1 focus:outline-offset-2","data-[state=off]:border-gray-100 data-[state=off]:bg-gray-100 data-[state=off]:text-dove-gray-500","data-[state=on]:border-sky-800 data-[state=on]:bg-sky-100 data-[state=on]:text-sky-800"),children:A.jsxs("div",{className:"px-4 py-1 rounded-full flex-row justify-start items-center gap-2.5 flex",children:[r?A.jsx("div",{className:"w-4 h-4 justify-center items-center flex",children:r}):null,A.jsxs("div",{className:"text-sm leading-tight font-semibold",children:[o?A.jsx("span",{children:o}):null," ",i?A.jsxs("span",{children:["(",i,")"]}):null]})]})})})}const Cg=Xa,Sg=Ya,Eg=Rd,Tg=Qa,Pg=Ra,Mg=Za,kg=u.forwardRef(({className:e,children:t,align:n="end",...r},o)=>A.jsx(Ka,{ref:o,align:n,...r,children:t}));kg.displayName="SplitButtonDropdownContent";const S3=ba("",{variants:{size:{normal:"icon",small:"smallIcon",icon:"icon",smallIcon:"smallIcon"}},defaultVariants:{size:"normal"}});function E3({children:e,size:t,status:n,variant:r,...o}){return A.jsx("div",{className:"rabbit-ds flex flex-row",children:A.jsxs(Kd,{children:[A.jsx(Tr,{variant:r,status:n,size:t,...o,className:"rounded-r-none",children:e}),A.jsx(Xd,{asChild:!0,children:A.jsx(Tr,{variant:r,status:n,className:"rounded-l-none border-l-0",size:S3({size:t}),children:A.jsx(Gc,{})})})]})})}Cg.displayName="SplitButtonDropdownItem",Sg.displayName="SplitButtonDropdownGroup",Eg.displayName="SplitButtonDropdownRadioGroup",Tg.displayName="SplitButtonDropdownLabel",Pg.displayName="SplitButtonDropdownCheckboxItem",Mg.displayName="SplitButtonDropdownRadioItem",me.Button=Tr,me.CardKPI=p3,me.Checkbox=nu,me.Chip=B0,me.ChipGroup=$3,me.ChipGroupItem=C3,me.Dropdown=Kd,me.DropdownCheckboxItem=Ra,me.DropdownContent=Ka,me.DropdownGroup=Ya,me.DropdownItem=Xa,me.DropdownLabel=Qa,me.DropdownPortal=ex,me.DropdownRadioGroup=Rd,me.DropdownRadioItem=Za,me.DropdownSeparator=Jd,me.DropdownSub=tx,me.DropdownSubContent=Qd,me.DropdownSubTrigger=Zd,me.DropdownTrigger=Xd,me.HistogramChart=f3,me.Input=W0,me.LineChart=R_,me.SankeyChart=a3,me.Select=Hx,me.SelectContent=gf,me.SelectGroup=Gx,me.SelectItem=bf,me.SelectLabel=yf,me.SelectSeparator=wf,me.SelectTrigger=vf,me.SelectValue=Vx,me.SplitButton=E3,me.SplitButtonDropdownCheckboxItem=Pg,me.SplitButtonDropdownContent=kg,me.SplitButtonDropdownGroup=Sg,me.SplitButtonDropdownItem=Cg,me.SplitButtonDropdownLabel=Tg,me.SplitButtonDropdownRadioGroup=Eg,me.SplitButtonDropdownRadioItem=Mg,me.Tooltip=If,me.TooltipContent=ss,me.TooltipPortal=Ff,me.TooltipProvider=Af,me.TooltipTrigger=Lf,Object.defineProperty(me,Symbol.toStringTag,{value:"Module"})});
|