function t(e){return typeof document>"u"?"":getComputedStyle(document.documentElement).getPropertyValue(e).trim()}function d(){return[t("--chart-primary"),t("--chart-secondary"),t("--chart-tertiary"),t("--chart-quaternary"),t("--chart-quinary"),t("--chart-senary"),t("--chart-septenary"),t("--chart-octonary")]}function s(e={}){const o={paper_bgcolor:t("--chart-background"),plot_bgcolor:t("--chart-background"),font:{color:t("--text-primary"),family:"system-ui, -apple-system, sans-serif"},xaxis:{gridcolor:t("--chart-grid"),zerolinecolor:t("--border-default"),color:t("--chart-axis")},yaxis:{gridcolor:t("--chart-grid"),zerolinecolor:t("--border-default"),color:t("--chart-axis")},title:{font:{color:t("--text-primary")}},legend:{font:{color:t("--text-primary")},bgcolor:t("--chart-background"),bordercolor:t("--chart-tooltip-border")},hoverlabel:{bgcolor:t("--chart-tooltip-bg"),font:{color:t("--chart-tooltip-text")}}};return i(o,e)}function i(e,o){const c={...e};return a(e)&&a(o)&&Object.keys(o).forEach(r=>{const n=o[r],l=e[r];a(n)&&a(l)?c[r]=i(l,n):a(n)?c[r]=i({},n):c[r]=n}),c}function a(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function u(){return{responsive:!0,displayModeBar:"hover",displaylogo:!1,modeBarButtonsToRemove:["lasso2d","select2d"]}}function h(){typeof window<"u"&&window.dispatchEvent(new CustomEvent("themeChanged"))}function f(e){if(typeof window>"u")return()=>{};const o=()=>e();return window.addEventListener("themeChanged",o),()=>window.removeEventListener("themeChanged",o)}export{t as a,s as b,u as c,d as g,h as n,f as o};
