@graphysdk/react-renderer 0.0.1-plugins.8 → 1.8.1-beta.1786024899180

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.
@@ -0,0 +1 @@
1
+ @property --graphy-text-scale{syntax:"<number>";inherits:true;initial-value:1}@property --graphy-font-size-xxs{syntax:"<length>";inherits:true;initial-value:10px}@property --graphy-font-size-xs{syntax:"<length>";inherits:true;initial-value:11px}@property --graphy-font-size-sm{syntax:"<length>";inherits:true;initial-value:12px}@property --graphy-font-size-md{syntax:"<length>";inherits:true;initial-value:14px}@property --graphy-font-size-lg{syntax:"<length>";inherits:true;initial-value:16px}@property --graphy-font-size-xl{syntax:"<length>";inherits:true;initial-value:20px}@property --graphy-font-size-editor-body{syntax:"<length>";inherits:true;initial-value:15px}@property --graphy-font-size-heading-sm{syntax:"<length>";inherits:true;initial-value:18px}@property --graphy-font-size-heading-md{syntax:"<length>";inherits:true;initial-value:22px}@property --graphy-font-size-heading-lg{syntax:"<length>";inherits:true;initial-value:28px}._1d8mpa10{overflow:visible}._324dw20{filter:drop-shadow(0 2px 2px #0e0e3414)drop-shadow(0 0 2px #0f0f181f)}._1suo8ub0{filter:drop-shadow(0 4px 4px #0e0e3414)drop-shadow(0 0 4px #0f0f181f)}._16vokpr0{pointer-events:none;-webkit-user-select:none;user-select:none}._2qyyu60{flex-shrink:0;display:block;overflow:visible}._10igzta0{pointer-events:none;position:fixed;top:0;left:0}.bow4tg0{color:var(--graphy-text-primary);font-size:calc(10px * var(--graphy-text-scale));position:relative;overflow:hidden}.bow4tg1{color:var(--graphy-text-primary);font-size:calc(10px * var(--graphy-text-scale))}.bow4tg2{background-color:var(--graphy-graph-background);position:absolute;top:0;bottom:0;left:0;right:0}.bow4tg3{outline:none}.bow4tg4{background-image:linear-gradient(45deg, color-mix(in srgb, var(--graphy-text-primary) 5%, transparent) 25%, transparent 25%, transparent 75%, color-mix(in srgb, var(--graphy-text-primary) 5%, transparent) 75%, color-mix(in srgb, var(--graphy-text-primary) 5%, transparent)), linear-gradient(45deg, color-mix(in srgb, var(--graphy-text-primary) 5%, transparent) 25%, transparent 25%, transparent 75%, color-mix(in srgb, var(--graphy-text-primary) 5%, transparent) 75%, color-mix(in srgb, var(--graphy-text-primary) 5%, transparent));background-position:0 0,1em 1em;background-size:2em 2em}._1ii3bsb0{--graphy-transparent:transparent;--graphy-white:#fff;--graphy-black:#000;--graphy-grey-100:#fff;--graphy-grey-95:#fcfcfc;--graphy-grey-90:#fafafa;--graphy-grey-85:#f5f5f5;--graphy-grey-80:#f0f0f0;--graphy-grey-75:#e8e8e8;--graphy-grey-70:#e5e5e5;--graphy-grey-60:#ccc;--graphy-grey-50:#c4c4c4;--graphy-grey-0:#1d2129;--graphy-red-60:#e14b49;--graphy-red-50:#f93939;--graphy-amber-70:#ffba8c;--graphy-amber-50:#ffc849;--graphy-amber-40:#feae47;--graphy-amber-30:#e7a816;--graphy-green-60:#06b299;--graphy-green-50:#42cd69;--graphy-blue-80:#2e62ff;--graphy-blue-60:#3d70ff;--graphy-purple-50:#7b56ea;--graphy-purple-30:#e093fe;--graphy-grey-gradient-80:linear-gradient(to top, #f0f0f1, #f9f9ff);--graphy-text-primary:var(--graphy-black);--graphy-text-secondary:color-mix(in srgb, transparent, var(--graphy-text-primary) 60%);--graphy-text-disabled:color-mix(in srgb, transparent, var(--graphy-text-primary) 50%);--graphy-icon-primary:currentColor;--graphy-icon-secondary:color-mix(in srgb, transparent, var(--graphy-text-primary) 60%);--graphy-icon-sticker-background:var(--graphy-grey-100);--graphy-brand:var(--graphy-purple-50);--graphy-success:var(--graphy-green-50);--graphy-warning:var(--graphy-amber-50);--graphy-alert:var(--graphy-red-50);--graphy-border-100:var(--graphy-grey-0);--graphy-border-50:color-mix(in srgb, transparent, var(--graphy-grey-0) 50%);--graphy-border-10:color-mix(in srgb, transparent, var(--graphy-grey-0) 10%);--graphy-sunken-background:var(--graphy-grey-90);--graphy-default-background:var(--graphy-grey-100);--graphy-raised-background:var(--graphy-grey-85);--graphy-overlay-background:var(--graphy-grey-100);--graphy-overlay-border-gradient:var(--graphy-border-10);--graphy-elevation-xs:0 0 2px #0f0f181f, 0 2px 2px #0e0e3414;--graphy-elevation-sm:0 0 4px #0f0f181f, 0 4px 4px #0e0e3414;--graphy-elevation-md:0 0 8px #0f0f181f, 0 8px 8px #0e0e3414;--graphy-elevation-lg:0 0 16px #0f0f181f, 0 16px 16px #0e0e3414;--graphy-radii-xs:4px;--graphy-radii-sm:6px;--graphy-radii-md:8px;--graphy-radii-lg:12px;--graphy-space-xxs:2px;--graphy-space-xs:4px;--graphy-space-sm:6px;--graphy-space-md:8px;--graphy-space-lg:12px;--graphy-space-xl:16px;--graphy-z-index-toolbar:10;--graphy-z-index-toolbar-tooltip:20;--graphy-z-index-toolbar-popover:30;--graphy-z-index-editor-popover:950;--graphy-graph-background:var(--graphy-grey-100);--graphy-grid-line-color:var(--graphy-border-10);--graphy-origin-line-color:var(--graphy-grey-0);--graphy-legend-background:var(--graphy-default-background);--graphy-legend-border-color:var(--graphy-border-10);--graphy-legend-focus-outline-color:var(--graphy-border-50);--graphy-legend-text-color:var(--graphy-text-primary);--graphy-dimmed-series-label-text-color:var(--graphy-text-disabled);--graphy-dimmed-series-label-line-color:var(--graphy-grey-60);--graphy-trend-negative-color:var(--graphy-red-60);--graphy-trend-positive-color:var(--graphy-green-60);--graphy-trend-neutral-color:var(--graphy-text-secondary);--graphy-toolbar-background-color:var(--graphy-overlay-background);--graphy-toolbar-button-background-color:transparent;--graphy-toolbar-button-background-color-hovered:var(--graphy-grey-80);--graphy-toolbar-button-background-color-selected:var(--graphy-grey-60);--graphy-toolbar-separator-color:var(--graphy-grey-60);--graphy-tooltip-background:var(--graphy-white);--graphy-tooltip-border-color:var(--graphy-border-10);--graphy-tooltip-heading-text-color:var(--graphy-text-primary);--graphy-tooltip-label-text-color:var(--graphy-text-secondary);--graphy-tooltip-value-text-color:var(--graphy-text-primary);--graphy-tooltip-primary-row-color:var(--graphy-grey-80);--graphy-hover-guide-line-color:color-mix(in srgb, transparent, var(--graphy-black) 20%);--graphy-hover-guide-fill-color:color-mix(in srgb, transparent, var(--graphy-black) 4%);--graphy-heatmap-empty-tile-background:var(--graphy-grey-80);--graphy-data-label-outside-background:color-mix(in srgb, transparent, var(--graphy-text-primary) 10%);--graphy-data-label-text-color:var(--graphy-text-primary);--graphy-data-label-inside-text-color:var(--graphy-white);--graphy-stack-total-text-color:var(--graphy-text-primary);--graphy-stack-total-background:var(--graphy-grey-100);--graphy-stack-total-stroke:var(--graphy-grey-60);--graphy-default-annotation-arrow-stroke:var(--graphy-black);--graphy-default-annotation-shape-stroke:var(--graphy-black);--graphy-default-annotation-shape-fill:var(--graphy-canvas-blue);--graphy-arrow-annotation-sticker-outline-color:#1d2129;--graphy-arrow-annotation-sticker-outline-color-inverse:#fff;--graphy-annotation-frame-border-color:var(--graphy-blue-60);--graphy-edit-menu-trigger-icon-color:#3d414c;--graphy-canvas-default:#000;--graphy-canvas-blue:#3b82f6;--graphy-canvas-cyan:#06b6d4;--graphy-canvas-green:#10b981;--graphy-canvas-yellow:#e5b400;--graphy-canvas-orange:#f97316;--graphy-canvas-red:#ef4444;--graphy-canvas-pink:#e845bf;--graphy-canvas-purple:#8b5cf6;--graphy-canvas-gray:#78716c;--graphy-canvas-inverse:#fff;--graphy-grid-line-width:1px;--graphy-grid-line-dash:2 3;--graphy-grid-line-dotted:1 3;--graphy-tooltip-border-radius:6px;--graphy-tooltip-border-width:1px;--graphy-tooltip-padding-block:8px;--graphy-tooltip-padding-inline:10px;--graphy-tooltip-row-gap:4px;--graphy-tooltip-shadow:0 4px 12px #0000002e;--graphy-editor-control-height:32px;--graphy-tick-label-offset:10px;--graphy-legend-item-gap:8px;--graphy-legend-swatch-gap:8px;--graphy-legend-swatch-width:10px;--graphy-legend-swatch-height:12px;--graphy-legend-pill-padding-inline:8px;--graphy-legend-pill-padding-block:2px;--graphy-legend-pill-border-width:1px;--graphy-headline-row-gap:2px;--graphy-headline-item-gap:24px;--graphy-text-scale:1;--graphy-font-family-default:"Inter", -apple-system, BlinkMacSystemFont, "Open Sans", "Segoe UI", "Roboto", "Oxygen-Sans", "Ubuntu", "Cantarell", "Helvetica Neue", "NotoSansArabic", "NotoSansJP", "NotoSansSC", "NotoSansKR", "NotoSerifKR", sans-serif, "Apple Color Emoji", "NotoColorEmoji";--graphy-font-family-heading:"Inter", -apple-system, BlinkMacSystemFont, "Open Sans", "Segoe UI", "Roboto", "Oxygen-Sans", "Ubuntu", "Cantarell", "Helvetica Neue", "NotoSansArabic", "NotoSansJP", "NotoSansSC", "NotoSansKR", "NotoSerifKR", sans-serif, "Apple Color Emoji", "NotoColorEmoji";--graphy-font-weight-regular:400;--graphy-font-weight-medium:500;--graphy-font-weight-semibold:600;--graphy-font-weight-bold:700;--graphy-font-weight-extra-bold:800;--graphy-font-weight-black:900;--graphy-font-size-xxs:1em;--graphy-font-size-xs:1.1em;--graphy-font-size-sm:1.2em;--graphy-font-size-md:1.4em;--graphy-font-size-lg:1.6em;--graphy-font-size-xl:2em;--graphy-font-line-height-xxs:1;--graphy-font-line-height-xs:1;--graphy-font-line-height-sm:1.3;--graphy-font-line-height-md:1.43;--graphy-font-line-height-lg:1;--graphy-font-line-height-xl:1;--graphy-font-size-editor-body:1.5em;--graphy-font-size-heading-sm:1.8em;--graphy-font-size-heading-md:2.2em;--graphy-font-size-heading-lg:2.8em;--graphy-font-line-height-editor-body:1.47;--graphy-font-line-height-heading-sm:1.25;--graphy-font-line-height-heading-md:1.41;--graphy-font-line-height-heading-lg:1.29;--graphy-font-tick-label:var(--graphy-font-weight-medium) var(--graphy-font-size-sm)/var(--graphy-font-line-height-sm) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-axis-label:var(--graphy-font-weight-medium) var(--graphy-font-size-sm)/var(--graphy-font-line-height-sm) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-data-label:var(--graphy-font-weight-medium) var(--graphy-font-size-xs)/var(--graphy-font-line-height-xs) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-stack-total:var(--graphy-font-weight-semibold) var(--graphy-font-size-xs)/var(--graphy-font-line-height-xs) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-category-label:var(--graphy-font-weight-medium) var(--graphy-font-size-xs)/var(--graphy-font-line-height-xs) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-legend-label:var(--graphy-font-weight-medium) var(--graphy-font-size-sm)/var(--graphy-font-line-height-sm) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-series-label:var(--graphy-font-weight-semibold) var(--graphy-font-size-sm)/var(--graphy-font-line-height-sm) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-tooltip-label:var(--graphy-font-weight-medium) var(--graphy-font-size-md)/var(--graphy-font-line-height-md) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-tooltip-heading:var(--graphy-font-weight-medium) var(--graphy-font-size-sm)/var(--graphy-font-line-height-sm) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-tooltip-footer:var(--graphy-font-weight-regular) var(--graphy-font-size-sm)/var(--graphy-font-line-height-sm) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-jumbo-tooltip-label:var(--graphy-font-weight-regular) var(--graphy-font-size-sm)/var(--graphy-font-line-height-sm) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-jumbo-tooltip:var(--graphy-font-weight-medium) var(--graphy-font-size-heading-md)/var(--graphy-font-line-height-heading-md) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-mini-tooltip-label:var(--graphy-font-weight-medium) var(--graphy-font-size-sm)/var(--graphy-font-line-height-sm) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-mini-tooltip-footer:var(--graphy-font-weight-regular) var(--graphy-font-size-sm)/var(--graphy-font-line-height-sm) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-tooltip-caption:var(--graphy-font-weight-medium) var(--graphy-font-size-sm)/var(--graphy-font-line-height-sm) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-tooltip-caption-small:var(--graphy-font-weight-medium) var(--graphy-font-size-xxs)/var(--graphy-font-line-height-xxs) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-uitooltip:var(--graphy-font-weight-medium) var(--graphy-font-size-md)/var(--graphy-font-line-height-md) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-uitooltip-secondary:var(--graphy-font-weight-medium) var(--graphy-font-size-sm)/var(--graphy-font-line-height-sm) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-trend-tag:var(--graphy-font-weight-medium) var(--graphy-font-size-md)/var(--graphy-font-line-height-md) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-trend-tag-small:var(--graphy-font-weight-medium) var(--graphy-font-size-xs)/var(--graphy-font-line-height-xs) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-goal-line-label:var(--graphy-font-weight-medium) var(--graphy-font-size-xs)/var(--graphy-font-line-height-xs) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-pie-label:var(--graphy-font-weight-medium) var(--graphy-font-size-xs)/var(--graphy-font-line-height-xs) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-pie-chart-total:var(--graphy-font-weight-bold) var(--graphy-font-size-heading-lg)/var(--graphy-font-line-height-heading-lg) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-difference-arrow-small:var(--graphy-font-weight-medium) var(--graphy-font-size-sm)/var(--graphy-font-line-height-sm) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-difference-arrow-medium:var(--graphy-font-weight-medium) var(--graphy-font-size-lg)/var(--graphy-font-line-height-lg) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-difference-arrow-large:var(--graphy-font-weight-semibold) var(--graphy-font-size-xl)/var(--graphy-font-line-height-xl) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-button:var(--graphy-font-weight-medium) var(--graphy-font-size-md)/var(--graphy-font-line-height-md) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-input:var(--graphy-font-weight-medium) var(--graphy-font-size-md)/var(--graphy-font-line-height-md) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-input-label:var(--graphy-font-weight-medium) var(--graphy-font-size-xxs)/var(--graphy-font-line-height-xxs) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-select-label:var(--graphy-font-weight-medium) var(--graphy-font-size-md)/var(--graphy-font-line-height-md) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-select-description:var(--graphy-font-weight-medium) var(--graphy-font-size-sm)/var(--graphy-font-line-height-sm) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-color-select-label:var(--graphy-font-weight-medium) var(--graphy-font-size-sm)/var(--graphy-font-line-height-sm) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-menu-title:var(--graphy-font-weight-semibold) var(--graphy-font-size-md)/var(--graphy-font-line-height-md) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-menu-group-title:var(--graphy-font-weight-medium) var(--graphy-font-size-sm)/var(--graphy-font-line-height-sm) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-menu-item-label:var(--graphy-font-weight-medium) var(--graphy-font-size-md)/var(--graphy-font-line-height-md) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-menu-item-label-secondary:var(--graphy-font-weight-medium) var(--graphy-font-size-sm)/var(--graphy-font-line-height-sm) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-error-boundary-title:var(--graphy-font-weight-semibold) var(--graphy-font-size-heading-sm)/var(--graphy-font-line-height-heading-sm) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-error-boundary-message:var(--graphy-font-weight-medium) var(--graphy-font-size-md)/var(--graphy-font-line-height-md) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-table-cell:var(--graphy-font-weight-medium) var(--graphy-font-size-md)/var(--graphy-font-line-height-md) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-table-header-cell:var(--graphy-font-weight-semibold) var(--graphy-font-size-sm)/var(--graphy-font-line-height-sm) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-source-label:var(--graphy-font-weight-medium) var(--graphy-font-size-sm)/var(--graphy-font-line-height-sm) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-source-link:var(--graphy-font-weight-regular) var(--graphy-font-size-sm)/var(--graphy-font-line-height-sm) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-text-editor-h1:var(--graphy-font-weight-bold) var(--graphy-font-size-heading-lg)/var(--graphy-font-line-height-heading-lg) var(--typography-chart-heading-font-family,var(--graphy-font-family-heading));--graphy-font-text-editor-h2:var(--graphy-font-weight-bold) var(--graphy-font-size-heading-md)/var(--graphy-font-line-height-heading-md) var(--typography-chart-heading-font-family,var(--graphy-font-family-heading));--graphy-font-text-editor-h3:var(--graphy-font-weight-semibold) var(--graphy-font-size-heading-sm)/var(--graphy-font-line-height-heading-sm) var(--typography-chart-heading-font-family,var(--graphy-font-family-heading));--graphy-font-text-editor-h6:var(--graphy-font-weight-medium) var(--graphy-font-size-sm)/var(--graphy-font-line-height-sm) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-text-editor-body:var(--graphy-font-weight-medium) var(--graphy-font-size-editor-body)/var(--graphy-font-line-height-editor-body) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-text-editor-link:var(--graphy-font-weight-regular) var(--graphy-font-size-md)/var(--graphy-font-line-height-md) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-highlight-mode-title:var(--graphy-font-weight-bold) var(--graphy-font-size-md)/var(--graphy-font-line-height-md) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-highlight-mode-subtitle:var(--graphy-font-weight-medium) var(--graphy-font-size-sm)/var(--graphy-font-line-height-sm) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-editor-control-label:var(--graphy-font-weight-medium) var(--graphy-font-size-sm)/var(--graphy-font-line-height-sm) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-editor-control-value:var(--graphy-font-weight-medium) var(--graphy-font-size-sm)/var(--graphy-font-line-height-sm) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-editor-section-title:var(--graphy-font-weight-semibold) var(--graphy-font-size-sm)/var(--graphy-font-line-height-sm) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-editor-caption:var(--graphy-font-weight-medium) var(--graphy-font-size-xxs)/var(--graphy-font-line-height-xxs) var(--typography-chart-font-family,var(--graphy-font-family-default))}._1ii3bsb1{--graphy-transparent:transparent;--graphy-white:#fff;--graphy-black:#000;--graphy-grey-100:#000;--graphy-grey-95:#0d0d0d;--graphy-grey-90:#1a1a1a;--graphy-grey-85:#1f1f1f;--graphy-grey-80:#2a2a2a;--graphy-grey-75:#2e2e2e;--graphy-grey-70:#353535;--graphy-grey-60:#494949;--graphy-grey-50:#6f6f6f;--graphy-grey-0:#fff;--graphy-red-60:#cb3333;--graphy-red-50:#f93939;--graphy-amber-70:#f48135;--graphy-amber-50:#feae47;--graphy-amber-40:#ffc849;--graphy-amber-30:#ffd061;--graphy-green-60:#0ac600;--graphy-green-50:#42cd69;--graphy-blue-80:#2e62ff;--graphy-blue-60:#3d70ff;--graphy-purple-50:#7b56ea;--graphy-purple-30:#e093fe;--graphy-grey-gradient-80:linear-gradient(to top, #222429, #31353f);--graphy-text-primary:var(--graphy-grey-0);--graphy-text-secondary:color-mix(in srgb, transparent, var(--graphy-text-primary) 80%);--graphy-text-disabled:color-mix(in srgb, transparent, var(--graphy-text-primary) 50%);--graphy-icon-primary:currentColor;--graphy-icon-secondary:color-mix(in srgb, transparent, var(--graphy-text-primary) 60%);--graphy-icon-sticker-background:var(--graphy-grey-70);--graphy-border-100:var(--graphy-grey-0);--graphy-border-50:color-mix(in srgb, transparent, var(--graphy-grey-0) 50%);--graphy-border-10:color-mix(in srgb, transparent, var(--graphy-grey-0) 10%);--graphy-brand:var(--graphy-purple-50);--graphy-success:var(--graphy-green-50);--graphy-warning:var(--graphy-amber-50);--graphy-alert:var(--graphy-red-50);--graphy-sunken-background:var(--graphy-grey-100);--graphy-default-background:var(--graphy-grey-90);--graphy-raised-background:var(--graphy-grey-80);--graphy-overlay-background:var(--graphy-grey-90);--graphy-overlay-border-gradient:var(--graphy-grey-gradient-80);--graphy-elevation-xs:0 0 2px #0f0f181f, 0 2px 2px #0e0e3414;--graphy-elevation-sm:0 0 4px #0f0f181f, 0 4px 4px #0e0e3414;--graphy-elevation-md:0 0 8px #0f0f181f, 0 8px 8px #0e0e3414;--graphy-elevation-lg:0 0 16px #0f0f181f, 0 16px 16px #0e0e3414;--graphy-radii-xs:4px;--graphy-radii-sm:6px;--graphy-radii-md:8px;--graphy-radii-lg:12px;--graphy-space-xxs:2px;--graphy-space-xs:4px;--graphy-space-sm:6px;--graphy-space-md:8px;--graphy-space-lg:12px;--graphy-space-xl:16px;--graphy-z-index-toolbar:10;--graphy-z-index-toolbar-tooltip:20;--graphy-z-index-toolbar-popover:30;--graphy-z-index-editor-popover:950;--graphy-graph-background:var(--graphy-grey-90);--graphy-grid-line-color:var(--graphy-border-10);--graphy-origin-line-color:var(--graphy-grey-0);--graphy-legend-background:var(--graphy-default-background);--graphy-legend-border-color:var(--graphy-border-10);--graphy-legend-focus-outline-color:var(--graphy-border-50);--graphy-legend-text-color:var(--graphy-text-primary);--graphy-dimmed-series-label-text-color:var(--graphy-text-disabled);--graphy-dimmed-series-label-line-color:var(--graphy-grey-60);--graphy-trend-negative-color:var(--graphy-red-60);--graphy-trend-positive-color:var(--graphy-green-60);--graphy-trend-neutral-color:var(--graphy-text-secondary);--graphy-toolbar-background-color:var(--graphy-overlay-background);--graphy-toolbar-button-background-color:transparent;--graphy-toolbar-button-background-color-hovered:var(--graphy-grey-80);--graphy-toolbar-button-background-color-selected:var(--graphy-grey-60);--graphy-toolbar-separator-color:var(--graphy-grey-60);--graphy-tooltip-background:var(--graphy-grey-70);--graphy-tooltip-border-color:var(--graphy-grey-60);--graphy-tooltip-heading-text-color:var(--graphy-text-primary);--graphy-tooltip-label-text-color:var(--graphy-text-secondary);--graphy-tooltip-value-text-color:var(--graphy-text-primary);--graphy-tooltip-primary-row-color:var(--graphy-grey-60);--graphy-hover-guide-line-color:color-mix(in srgb, transparent, var(--graphy-white) 20%);--graphy-hover-guide-fill-color:color-mix(in srgb, transparent, var(--graphy-white) 6%);--graphy-heatmap-empty-tile-background:var(--graphy-grey-80);--graphy-data-label-outside-background:color-mix(in srgb, transparent, var(--graphy-text-primary) 10%);--graphy-data-label-text-color:var(--graphy-text-primary);--graphy-data-label-inside-text-color:var(--graphy-white);--graphy-stack-total-text-color:var(--graphy-text-primary);--graphy-stack-total-background:var(--graphy-grey-100);--graphy-stack-total-stroke:var(--graphy-grey-60);--graphy-default-annotation-arrow-stroke:var(--graphy-white);--graphy-default-annotation-shape-stroke:var(--graphy-white);--graphy-default-annotation-shape-fill:var(--graphy-canvas-blue);--graphy-arrow-annotation-sticker-outline-color:#fff;--graphy-arrow-annotation-sticker-outline-color-inverse:#1d2129;--graphy-annotation-frame-border-color:var(--graphy-blue-60);--graphy-edit-menu-trigger-icon-color:var(--graphy-white);--graphy-canvas-default:#fff;--graphy-canvas-blue:#60a5fa;--graphy-canvas-cyan:#22d3ee;--graphy-canvas-green:#34d399;--graphy-canvas-yellow:#ffc800;--graphy-canvas-orange:#fb923c;--graphy-canvas-red:#f87171;--graphy-canvas-pink:#f979d9;--graphy-canvas-purple:#a78bfa;--graphy-canvas-gray:#a8a29e;--graphy-canvas-inverse:#000;--graphy-grid-line-width:1px;--graphy-grid-line-dash:2 3;--graphy-grid-line-dotted:1 3;--graphy-tooltip-border-radius:6px;--graphy-tooltip-border-width:1px;--graphy-tooltip-padding-block:8px;--graphy-tooltip-padding-inline:10px;--graphy-tooltip-row-gap:4px;--graphy-tooltip-shadow:0 4px 12px #0000002e;--graphy-editor-control-height:32px;--graphy-tick-label-offset:10px;--graphy-legend-item-gap:8px;--graphy-legend-swatch-gap:8px;--graphy-legend-swatch-width:10px;--graphy-legend-swatch-height:12px;--graphy-legend-pill-padding-inline:8px;--graphy-legend-pill-padding-block:2px;--graphy-legend-pill-border-width:1px;--graphy-headline-row-gap:2px;--graphy-headline-item-gap:24px;--graphy-text-scale:1;--graphy-font-family-default:"Inter", -apple-system, BlinkMacSystemFont, "Open Sans", "Segoe UI", "Roboto", "Oxygen-Sans", "Ubuntu", "Cantarell", "Helvetica Neue", "NotoSansArabic", "NotoSansJP", "NotoSansSC", "NotoSansKR", "NotoSerifKR", sans-serif, "Apple Color Emoji", "NotoColorEmoji";--graphy-font-family-heading:"Inter", -apple-system, BlinkMacSystemFont, "Open Sans", "Segoe UI", "Roboto", "Oxygen-Sans", "Ubuntu", "Cantarell", "Helvetica Neue", "NotoSansArabic", "NotoSansJP", "NotoSansSC", "NotoSansKR", "NotoSerifKR", sans-serif, "Apple Color Emoji", "NotoColorEmoji";--graphy-font-weight-regular:400;--graphy-font-weight-medium:500;--graphy-font-weight-semibold:600;--graphy-font-weight-bold:700;--graphy-font-weight-extra-bold:800;--graphy-font-weight-black:900;--graphy-font-size-xxs:1em;--graphy-font-size-xs:1.1em;--graphy-font-size-sm:1.2em;--graphy-font-size-md:1.4em;--graphy-font-size-lg:1.6em;--graphy-font-size-xl:2em;--graphy-font-line-height-xxs:1;--graphy-font-line-height-xs:1;--graphy-font-line-height-sm:1.3;--graphy-font-line-height-md:1.43;--graphy-font-line-height-lg:1;--graphy-font-line-height-xl:1;--graphy-font-size-editor-body:1.5em;--graphy-font-size-heading-sm:1.8em;--graphy-font-size-heading-md:2.2em;--graphy-font-size-heading-lg:2.8em;--graphy-font-line-height-editor-body:1.47;--graphy-font-line-height-heading-sm:1.25;--graphy-font-line-height-heading-md:1.41;--graphy-font-line-height-heading-lg:1.29;--graphy-font-tick-label:var(--graphy-font-weight-medium) var(--graphy-font-size-sm)/var(--graphy-font-line-height-sm) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-axis-label:var(--graphy-font-weight-medium) var(--graphy-font-size-sm)/var(--graphy-font-line-height-sm) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-data-label:var(--graphy-font-weight-medium) var(--graphy-font-size-xs)/var(--graphy-font-line-height-xs) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-stack-total:var(--graphy-font-weight-semibold) var(--graphy-font-size-xs)/var(--graphy-font-line-height-xs) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-category-label:var(--graphy-font-weight-medium) var(--graphy-font-size-xs)/var(--graphy-font-line-height-xs) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-legend-label:var(--graphy-font-weight-medium) var(--graphy-font-size-sm)/var(--graphy-font-line-height-sm) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-series-label:var(--graphy-font-weight-semibold) var(--graphy-font-size-sm)/var(--graphy-font-line-height-sm) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-tooltip-label:var(--graphy-font-weight-medium) var(--graphy-font-size-md)/var(--graphy-font-line-height-md) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-tooltip-heading:var(--graphy-font-weight-medium) var(--graphy-font-size-sm)/var(--graphy-font-line-height-sm) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-tooltip-footer:var(--graphy-font-weight-regular) var(--graphy-font-size-sm)/var(--graphy-font-line-height-sm) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-jumbo-tooltip-label:var(--graphy-font-weight-regular) var(--graphy-font-size-sm)/var(--graphy-font-line-height-sm) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-jumbo-tooltip:var(--graphy-font-weight-medium) var(--graphy-font-size-heading-md)/var(--graphy-font-line-height-heading-md) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-mini-tooltip-label:var(--graphy-font-weight-medium) var(--graphy-font-size-sm)/var(--graphy-font-line-height-sm) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-mini-tooltip-footer:var(--graphy-font-weight-regular) var(--graphy-font-size-sm)/var(--graphy-font-line-height-sm) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-tooltip-caption:var(--graphy-font-weight-medium) var(--graphy-font-size-sm)/var(--graphy-font-line-height-sm) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-tooltip-caption-small:var(--graphy-font-weight-medium) var(--graphy-font-size-xxs)/var(--graphy-font-line-height-xxs) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-uitooltip:var(--graphy-font-weight-medium) var(--graphy-font-size-md)/var(--graphy-font-line-height-md) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-uitooltip-secondary:var(--graphy-font-weight-medium) var(--graphy-font-size-sm)/var(--graphy-font-line-height-sm) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-trend-tag:var(--graphy-font-weight-medium) var(--graphy-font-size-md)/var(--graphy-font-line-height-md) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-trend-tag-small:var(--graphy-font-weight-medium) var(--graphy-font-size-xs)/var(--graphy-font-line-height-xs) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-goal-line-label:var(--graphy-font-weight-medium) var(--graphy-font-size-xs)/var(--graphy-font-line-height-xs) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-pie-label:var(--graphy-font-weight-medium) var(--graphy-font-size-xs)/var(--graphy-font-line-height-xs) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-pie-chart-total:var(--graphy-font-weight-bold) var(--graphy-font-size-heading-lg)/var(--graphy-font-line-height-heading-lg) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-difference-arrow-small:var(--graphy-font-weight-medium) var(--graphy-font-size-sm)/var(--graphy-font-line-height-sm) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-difference-arrow-medium:var(--graphy-font-weight-medium) var(--graphy-font-size-lg)/var(--graphy-font-line-height-lg) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-difference-arrow-large:var(--graphy-font-weight-semibold) var(--graphy-font-size-xl)/var(--graphy-font-line-height-xl) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-button:var(--graphy-font-weight-medium) var(--graphy-font-size-md)/var(--graphy-font-line-height-md) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-input:var(--graphy-font-weight-medium) var(--graphy-font-size-md)/var(--graphy-font-line-height-md) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-input-label:var(--graphy-font-weight-medium) var(--graphy-font-size-xxs)/var(--graphy-font-line-height-xxs) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-select-label:var(--graphy-font-weight-medium) var(--graphy-font-size-md)/var(--graphy-font-line-height-md) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-select-description:var(--graphy-font-weight-medium) var(--graphy-font-size-sm)/var(--graphy-font-line-height-sm) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-color-select-label:var(--graphy-font-weight-medium) var(--graphy-font-size-sm)/var(--graphy-font-line-height-sm) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-menu-title:var(--graphy-font-weight-semibold) var(--graphy-font-size-md)/var(--graphy-font-line-height-md) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-menu-group-title:var(--graphy-font-weight-medium) var(--graphy-font-size-sm)/var(--graphy-font-line-height-sm) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-menu-item-label:var(--graphy-font-weight-medium) var(--graphy-font-size-md)/var(--graphy-font-line-height-md) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-menu-item-label-secondary:var(--graphy-font-weight-medium) var(--graphy-font-size-sm)/var(--graphy-font-line-height-sm) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-error-boundary-title:var(--graphy-font-weight-semibold) var(--graphy-font-size-heading-sm)/var(--graphy-font-line-height-heading-sm) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-error-boundary-message:var(--graphy-font-weight-medium) var(--graphy-font-size-md)/var(--graphy-font-line-height-md) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-table-cell:var(--graphy-font-weight-medium) var(--graphy-font-size-md)/var(--graphy-font-line-height-md) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-table-header-cell:var(--graphy-font-weight-semibold) var(--graphy-font-size-sm)/var(--graphy-font-line-height-sm) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-source-label:var(--graphy-font-weight-medium) var(--graphy-font-size-sm)/var(--graphy-font-line-height-sm) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-source-link:var(--graphy-font-weight-regular) var(--graphy-font-size-sm)/var(--graphy-font-line-height-sm) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-text-editor-h1:var(--graphy-font-weight-bold) var(--graphy-font-size-heading-lg)/var(--graphy-font-line-height-heading-lg) var(--typography-chart-heading-font-family,var(--graphy-font-family-heading));--graphy-font-text-editor-h2:var(--graphy-font-weight-bold) var(--graphy-font-size-heading-md)/var(--graphy-font-line-height-heading-md) var(--typography-chart-heading-font-family,var(--graphy-font-family-heading));--graphy-font-text-editor-h3:var(--graphy-font-weight-semibold) var(--graphy-font-size-heading-sm)/var(--graphy-font-line-height-heading-sm) var(--typography-chart-heading-font-family,var(--graphy-font-family-heading));--graphy-font-text-editor-h6:var(--graphy-font-weight-medium) var(--graphy-font-size-sm)/var(--graphy-font-line-height-sm) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-text-editor-body:var(--graphy-font-weight-medium) var(--graphy-font-size-editor-body)/var(--graphy-font-line-height-editor-body) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-text-editor-link:var(--graphy-font-weight-regular) var(--graphy-font-size-md)/var(--graphy-font-line-height-md) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-highlight-mode-title:var(--graphy-font-weight-bold) var(--graphy-font-size-md)/var(--graphy-font-line-height-md) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-highlight-mode-subtitle:var(--graphy-font-weight-medium) var(--graphy-font-size-sm)/var(--graphy-font-line-height-sm) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-editor-control-label:var(--graphy-font-weight-medium) var(--graphy-font-size-sm)/var(--graphy-font-line-height-sm) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-editor-control-value:var(--graphy-font-weight-medium) var(--graphy-font-size-sm)/var(--graphy-font-line-height-sm) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-editor-section-title:var(--graphy-font-weight-semibold) var(--graphy-font-size-sm)/var(--graphy-font-line-height-sm) var(--typography-chart-font-family,var(--graphy-font-family-default));--graphy-font-editor-caption:var(--graphy-font-weight-medium) var(--graphy-font-size-xxs)/var(--graphy-font-line-height-xxs) var(--typography-chart-font-family,var(--graphy-font-family-default))}._1cocly40{color:inherit;text-underline-offset:.15em;text-decoration:underline}._19519k80{background:var(--graphy-tooltip-background);border:var(--graphy-tooltip-border-width) solid var(--graphy-tooltip-border-color);border-radius:var(--graphy-tooltip-border-radius);padding-block:var(--graphy-tooltip-padding-block);min-width:120px;max-width:280px;box-shadow:var(--graphy-tooltip-shadow);flex-direction:column;gap:4px;display:flex}._19519k81{font:var(--graphy-font-tooltip-heading);color:var(--graphy-tooltip-heading-text-color);white-space:nowrap;text-overflow:ellipsis;padding-inline:var(--graphy-tooltip-padding-inline);overflow:hidden}._19519k82{font:var(--graphy-font-tooltip-label);color:var(--graphy-tooltip-value-text-color);padding-inline:var(--graphy-tooltip-padding-inline)}._19519k83{flex-direction:column;display:flex}._19519k84{padding-block:var(--graphy-tooltip-row-gap);padding-inline:var(--graphy-tooltip-padding-inline);flex-direction:row;align-items:center;gap:8px;display:flex}._19519k85{background-color:var(--graphy-tooltip-primary-row-color)}._19519k86{flex-shrink:0;display:block;overflow:visible}._19519k87{width:12px;height:12px}._19519k88{font:var(--graphy-font-tooltip-label);color:var(--graphy-tooltip-label-text-color);white-space:nowrap;text-overflow:ellipsis;min-width:0;overflow:hidden}._19519k89{font:var(--graphy-font-tooltip-label);color:var(--graphy-tooltip-value-text-color);font-variant-numeric:tabular-nums;white-space:nowrap;text-align:right}._19519k8a{pointer-events:none;-webkit-user-select:none;user-select:none;z-index:1000;position:fixed;top:0;left:0}.vultop0{box-sizing:border-box;white-space:nowrap;color:#2a2a28;opacity:.62;background-color:#ffffff8c;border-radius:999px;flex-shrink:0;align-items:center;gap:10px;height:22px;padding-inline-start:9px;padding-inline-end:11px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,system-ui,Roboto,Noto Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:11.5px;line-height:1;text-decoration:none;transition:opacity .12s,max-width .25s,padding .25s,gap .25s;display:inline-flex;box-shadow:0 1px 4px #00000017}.vultop0:hover{opacity:1}.vultop0:focus-visible{opacity:1}.vultop0:focus-visible{outline-offset:2px;outline:2px solid #2a2a28}.vultop0[data-zone=mid]{opacity:.8;background-color:#ffffffbf}.vultop0[data-zone=dark]{opacity:.85;color:#fff;box-shadow:none;background-color:#ffffff14}.vultop0[data-zone=dark]:focus-visible{outline:2px solid #fff}.vultop0[data-visual=mini]{justify-content:center;gap:0;width:22px;padding-inline-start:0;padding-inline-end:0}.vultop0[data-visual=mini]:hover{gap:10px;width:auto;padding-inline-start:9px;padding-inline-end:11px}.vultop0[data-visual=mini]:focus-visible{gap:10px;width:auto;padding-inline-start:9px;padding-inline-end:11px}.vultop1{flex-direction:row-reverse}.vultop2{flex-shrink:0;justify-content:center;align-items:center;width:9px;height:12px;display:inline-flex}.vultop3{object-fit:contain;width:9px;height:12px;display:block}.vultop0[data-zone=dark] .vultop3{filter:invert()}.vultop4{align-items:baseline;gap:.3em;max-width:120px;transition:max-width .25s,opacity .25s;display:inline-flex;overflow:hidden}.vultop0[data-visual=mini] .vultop4{opacity:0;max-width:0}.vultop0[data-visual=mini]:hover .vultop4{opacity:1;max-width:120px}.vultop0[data-visual=mini]:focus-visible .vultop4{opacity:1;max-width:120px}.vultop5{font-weight:550}.vultop6{place-self:end}.vultop7{position:absolute;top:50%;right:0;transform:translateY(-50%)}@media (prefers-reduced-motion:reduce){.vultop0,.vultop4{transition:none}}.yl2d2l0{justify-content:center;align-items:center;gap:var(--graphy-space-xs);block-size:32px;inline-size:32px;padding:0 var(--graphy-space-sm);background:var(--graphy-toolbar-button-background-color);border-radius:var(--graphy-radii-md);cursor:pointer;color:var(--graphy-text-primary);font:var(--graphy-font-button);border:none;display:inline-flex}.yl2d2l0:hover{background:var(--graphy-toolbar-button-background-color-hovered)}.yl2d2l0[data-popup-open]{background:var(--graphy-toolbar-button-background-color-selected)}.yl2d2l1{border:1px solid var(--graphy-border-100);box-sizing:border-box;border-radius:50%;block-size:16px;inline-size:16px}.yl2d2l2{flex-shrink:0;block-size:8px;inline-size:8px}.yl2d2l3{z-index:var(--graphy-z-index-editor-popover)}.yl2d2l4{gap:var(--graphy-space-lg);min-inline-size:220px;padding:var(--graphy-space-lg);background:var(--graphy-overlay-background);border:1px solid var(--graphy-border-10);border-radius:var(--graphy-radii-md);box-shadow:var(--graphy-elevation-md);color:var(--graphy-text-primary);flex-direction:column;display:flex}.yl2d2l5{gap:var(--graphy-space-sm);flex-direction:column;display:flex}.yl2d2l6{font:var(--graphy-font-menu-group-title);color:var(--graphy-text-secondary)}.yl2d2l7{grid-template-columns:repeat(6,1fr);display:grid}.yl2d2l8{border-radius:var(--graphy-radii-md);cursor:pointer;background:0 0;border:none;justify-content:center;align-items:center;block-size:28px;inline-size:28px;padding:0;display:inline-flex}.yl2d2l8:hover{background:var(--graphy-toolbar-button-background-color-hovered)}.yl2d2l8[data-active=true]{background:var(--graphy-toolbar-button-background-color-selected)}.yl2d2l9{box-sizing:border-box;border-radius:50%;block-size:1.6em;inline-size:1.6em}.yl2d2la{align-items:center;gap:var(--graphy-space-sm);inline-size:100%;padding:var(--graphy-space-xs) var(--graphy-space-sm);background:var(--graphy-grey-80);border-radius:var(--graphy-radii-md);border:1px solid var(--graphy-grey-70);color:var(--graphy-text-primary);font:var(--graphy-font-input);cursor:pointer;text-align:start;display:flex}.yl2d2la:hover{border-color:var(--graphy-grey-70)}.yl2d2la:focus-visible{border-color:var(--graphy-grey-60);outline:none}.yl2d2la[data-popup-open]{border-color:var(--graphy-grey-60)}.yl2d2lb{font:var(--graphy-font-input);color:var(--graphy-text-primary);flex:1}.yl2d2lc{gap:var(--graphy-space-md);inline-size:240px;padding:var(--graphy-space-lg);background:var(--graphy-overlay-background);border:1px solid var(--graphy-border-10);border-radius:var(--graphy-radii-md);box-shadow:var(--graphy-elevation-md);color:var(--graphy-text-primary);flex-direction:column;display:flex}.yl2d2ld{block-size:auto!important;inline-size:100%!important}.yl2d2ld .react-colorful__saturation{aspect-ratio:1;border-radius:var(--graphy-radii-md);border:1px solid var(--graphy-grey-70);inline-size:100%;margin-bottom:var(--graphy-space-sm);box-sizing:border-box}.yl2d2ld .react-colorful__hue{border-radius:var(--graphy-radii-sm);border:1px solid var(--graphy-grey-70);box-sizing:border-box;block-size:16px}.yl2d2ld .react-colorful__pointer{border:2px solid var(--graphy-white);block-size:18px;inline-size:18px;box-shadow:var(--graphy-elevation-sm)}.yl2d2ld .react-colorful__saturation-pointer,.yl2d2ld .react-colorful__hue-pointer{border-radius:50%}.yl2d2le{inline-size:100%;padding:var(--graphy-space-xs) var(--graphy-space-sm);background:var(--graphy-grey-80);border:1px solid var(--graphy-grey-70);border-radius:var(--graphy-radii-md);color:var(--graphy-text-primary);font:var(--graphy-font-input);text-transform:uppercase;outline:none}.yl2d2le:hover{border-color:var(--graphy-grey-70)}.yl2d2le:focus{border-color:var(--graphy-grey-60)}._1ebx0ha0{align-items:center;gap:var(--graphy-space-xs);padding:var(--graphy-space-xs);background:var(--graphy-toolbar-background-color);border-radius:var(--graphy-radii-lg);display:flex}._1ebx0ha0:before{content:"";pointer-events:none;border-radius:var(--graphy-radii-lg);background:var(--graphy-overlay-border-gradient) border-box;-webkit-mask-composite:xor;border:1px solid #0000;position:absolute;top:0;bottom:0;left:0;right:0;transform:translateZ(0);-webkit-mask-image:linear-gradient(#fff 0 0),linear-gradient(#fff 0 0);mask-image:linear-gradient(#fff 0 0),linear-gradient(#fff 0 0);-webkit-mask-position:0 0,0 0;mask-position:0 0,0 0;-webkit-mask-size:auto,auto;mask-size:auto,auto;-webkit-mask-repeat:repeat,repeat;mask-repeat:repeat,repeat;-webkit-mask-clip:padding-box,border-box;mask-clip:padding-box,border-box;-webkit-mask-origin:padding-box,border-box;mask-origin:padding-box,border-box;-webkit-mask-composite:xor;mask-composite:exclude;-webkit-mask-source-type:auto,auto;mask-mode:match-source,match-source}._1ebx0ha1{padding-inline:var(--graphy-space-xs);align-items:center;gap:var(--graphy-space-xxs);display:flex}._1ebx0ha2{background:var(--graphy-toolbar-separator-color);width:1px;height:16px}.asohov0{flex-shrink:0}.asohov1{color:var(--graphy-icon-primary)}.asohov2{color:var(--graphy-icon-secondary)}._1qkyw7q0{justify-content:center;align-items:center;gap:var(--graphy-space-xs);block-size:32px;padding:0 var(--graphy-space-sm);background:var(--graphy-toolbar-button-background-color);border-radius:var(--graphy-radii-md);cursor:pointer;color:var(--graphy-text-primary);font:var(--graphy-font-button);border:none;display:inline-flex}._1qkyw7q0:hover{background:var(--graphy-toolbar-button-background-color-hovered)}._1qkyw7q0[data-popup-open]{background:var(--graphy-toolbar-button-background-color-selected)}._1qkyw7q1{white-space:nowrap;align-items:center;display:inline-flex}._1qkyw7q2{flex-shrink:0;block-size:10px;inline-size:10px}._1qkyw7q3{z-index:var(--graphy-z-index-toolbar-popover)}._1qkyw7q4{min-inline-size:180px;padding:var(--graphy-space-xs);background:var(--graphy-overlay-background);border:1px solid var(--graphy-border-10);border-radius:var(--graphy-radii-md);box-shadow:var(--graphy-elevation-md);color:var(--graphy-text-primary);outline:none;flex-direction:column;display:flex}._1qkyw7q5{padding:var(--graphy-space-sm) var(--graphy-space-md);border-radius:var(--graphy-radii-sm);cursor:pointer;color:var(--graphy-text-primary);font:var(--graphy-font-menu-item-label);-webkit-user-select:none;user-select:none;outline:none;align-items:center;display:flex}._1qkyw7q5[data-highlighted]{background:var(--graphy-toolbar-button-background-color-hovered)}._1qkyw7q5[data-selected=true]{background:var(--graphy-toolbar-button-background-color-selected)}.b5kquu0{block-size:32px;min-inline-size:32px;padding:0 var(--graphy-space-sm);background:var(--graphy-toolbar-button-background-color);border-radius:var(--graphy-radii-md);cursor:pointer;color:var(--graphy-text-primary);font:var(--graphy-font-button);border:none;justify-content:center;align-items:center;display:inline-flex}.b5kquu0:hover{background:var(--graphy-toolbar-button-background-color-hovered)}.b5kquu0[data-active=true],.b5kquu0[data-popup-open]{background:var(--graphy-toolbar-button-background-color-selected)}.b5kquu1{z-index:var(--graphy-z-index-toolbar-popover)}.b5kquu2{align-items:center;gap:var(--graphy-space-xs);padding:var(--graphy-space-xs);background:var(--graphy-overlay-background);border:1px solid var(--graphy-border-10);border-radius:var(--graphy-radii-md);box-shadow:var(--graphy-elevation-md);color:var(--graphy-text-primary);outline:none;display:flex}.b5kquu3{inline-size:220px;padding:var(--graphy-space-xs) var(--graphy-space-sm);background:var(--graphy-grey-80);border:1px solid var(--graphy-grey-70);border-radius:var(--graphy-radii-md);color:var(--graphy-text-primary);font:var(--graphy-font-input);outline:none}.b5kquu3:hover{border-color:var(--graphy-grey-70)}.b5kquu3:focus{border-color:var(--graphy-grey-60)}.b5kquu4{background:var(--graphy-toolbar-button-background-color);border-radius:var(--graphy-radii-md);cursor:pointer;block-size:32px;min-inline-size:32px;color:var(--graphy-text-primary);border:none;justify-content:center;align-items:center;padding:0;display:inline-flex}.b5kquu4:hover{background:var(--graphy-toolbar-button-background-color-hovered)}.k91gos0{block-size:32px;min-inline-size:32px;padding:0 var(--graphy-space-sm);background:var(--graphy-toolbar-button-background-color);border-radius:var(--graphy-radii-md);cursor:pointer;color:var(--graphy-text-primary);font:var(--graphy-font-button);border:none;justify-content:center;align-items:center;display:inline-flex}.k91gos0:hover{background:var(--graphy-toolbar-button-background-color-hovered)}.k91gos0[data-pressed]{background:var(--graphy-toolbar-button-background-color-selected)}.k91gos1{padding:var(--graphy-space-xs) var(--graphy-space-md);background:var(--graphy-text-primary);color:var(--graphy-default-background);border-radius:var(--graphy-radii-xs);font:var(--graphy-font-uitooltip-secondary);pointer-events:none;z-index:var(--graphy-z-index-toolbar-tooltip)}._1bp10ig0{z-index:var(--graphy-z-index-toolbar)}._2ngohc0 .ProseMirror{outline:none}._2ngohc0 .ProseMirror .is-empty:before{content:attr(data-placeholder);color:currentColor;opacity:.4;float:left;pointer-events:none;height:0}._2ngohc0 .ProseMirror h1,._2ngohc0 .ProseMirror h2,._2ngohc0 .ProseMirror h3,._2ngohc0 .ProseMirror h4,._2ngohc0 .ProseMirror h5,._2ngohc0 .ProseMirror h6{margin:0}._2ngohc0 .ProseMirror h1{font:var(--graphy-font-text-editor-h1)}._2ngohc0 .ProseMirror h2{font:var(--graphy-font-text-editor-h2)}._2ngohc0 .ProseMirror h3{font:var(--graphy-font-text-editor-h3)}._2ngohc0 .ProseMirror h4,._2ngohc0 .ProseMirror h5,._2ngohc0 .ProseMirror h6{font:var(--graphy-font-text-editor-h6)}._2ngohc0 .ProseMirror p{font:var(--graphy-font-text-editor-body);margin:0}._2ngohc0 .ProseMirror p[data-variant=caption]{font:var(--graphy-font-text-editor-h6)}._2ngohc0 .ProseMirror a{text-underline-offset:.15em;cursor:text;text-decoration:underline}._4dlrid0{font:var(--graphy-font-text-editor-h3);margin:0}._4dlrid1{font:var(--graphy-font-text-editor-body);margin:0}p[data-variant=caption]{font:var(--graphy-font-text-editor-h6);margin:0}.xfz7dq0{position:absolute}.xfz7dq1{align-items:end;column-gap:var(--graphy-space-xs);color:var(--graphy-text-secondary);grid-template-columns:minmax(0,1fr) auto;display:grid}.xfz7dq2{min-width:0;font:var(--graphy-font-source-label)}.xfz7dq3{font:var(--graphy-font-source-link);overflow-wrap:anywhere;text-decoration:underline}.xfz7dq3:hover{color:var(--graphy-text-primary)}.xfz7dq4{font:var(--graphy-font-source-label);margin-right:var(--graphy-space-xs)}.xfz7dq5{font:var(--graphy-font-source-label);overflow-wrap:anywhere}._1k4qtbg0{position:absolute}._1k4qtbg1{padding-right:110px}._1u9qprb0{justify-content:start;align-items:start;gap:var(--graphy-headline-item-gap);pointer-events:none;display:flex;position:absolute}._1u9qprb1{pointer-events:none;justify-content:center;align-items:center;display:flex;position:absolute}._9aen060{align-items:baseline;gap:4px;display:flex}._9aen061,._9aen062{align-items:center;gap:4px;display:flex}._9aen063{align-items:start;gap:var(--graphy-headline-row-gap);flex-direction:column;display:flex}.n7clvo0{color:var(--graphy-text-primary);font-weight:var(--graphy-font-weight-black);line-height:1}.n7clvo1{color:var(--graphy-text-secondary);white-space:nowrap}.n7clvo2{color:var(--graphy-text-secondary)}.n7clvo3{color:var(--graphy-text-secondary);white-space:nowrap}.n7clvo4{font-size:1.9em}.n7clvo5{font-size:2.3em}.n7clvo6{font-size:2.6em}.n7clvo7,.n7clvo8{font-size:1em}.n7clvo9{font-size:1.2em}.n7clvoa{color:var(--graphy-trend-positive-color)}.n7clvob{color:var(--graphy-trend-negative-color)}.n7clvoc{color:var(--graphy-trend-neutral-color)}.n7clvod{border-radius:50%;justify-content:center;align-items:center;width:12px;height:12px;display:flex}.n7clvoe{color:var(--graphy-trend-positive-color);background-color:color-mix(in srgb, transparent, var(--graphy-trend-positive-color) 20%)}.n7clvof{color:var(--graphy-trend-negative-color);background-color:color-mix(in srgb, transparent, var(--graphy-trend-negative-color) 20%);transform:rotate(180deg)}.n7clvog{color:var(--graphy-trend-neutral-color);background-color:color-mix(in srgb, transparent, var(--graphy-text-primary) 10%)}._1oj6yix0{pointer-events:none;height:100%;position:relative}._1oj6yix1{pointer-events:none;position:absolute;top:0;left:0;overflow:visible}._1oj6yix2{font:var(--graphy-font-legend-label);color:var(--graphy-legend-text-color);white-space:nowrap;position:absolute;transform:translateY(-50%)}._6a636s0{pointer-events:none;position:absolute}._1kjk02r0{flex-shrink:0;align-items:center;display:inline-flex;position:relative}._1kjk02r1{padding-inline-start:8px}._1kjk02r2{padding-block-start:8px}._1kjk02r3{background-color:var(--graphy-legend-background);border:var(--graphy-legend-pill-border-width) solid var(--graphy-legend-border-color);pointer-events:none;opacity:.6;border-radius:9999px;position:absolute}._1kjk02r4{top:0;bottom:0}._1kjk02r4:not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){left:8px;right:0}._1kjk02r4:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){left:8px;right:0}._1kjk02r4:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){left:0;right:8px}._1kjk02r4:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){left:0;right:8px}._1kjk02r5{top:8px;bottom:0;left:0;right:0}._1kjk02r6{align-items:center;gap:var(--graphy-legend-swatch-gap);white-space:nowrap;padding-inline:var(--graphy-legend-pill-padding-inline);padding-block:var(--graphy-legend-pill-padding-block);background-color:var(--graphy-legend-background);border:var(--graphy-legend-pill-border-width) solid var(--graphy-legend-border-color);cursor:pointer;pointer-events:auto;font:var(--graphy-font-legend-label);color:var(--graphy-legend-text-color);-webkit-appearance:none;appearance:none;border-radius:9999px;display:inline-flex;position:relative}._1kjk02r6:focus-visible{outline:1px solid var(--graphy-legend-focus-outline-color)}._1kjk02r7{border-color:var(--graphy-text-primary)}._1kjk02r8{font-variant-numeric:tabular-nums}._1kjk02r9{pointer-events:auto;background:var(--graphy-tooltip-background);border:1px solid var(--graphy-tooltip-border-color);border-radius:var(--graphy-tooltip-border-radius);padding-block:var(--graphy-tooltip-padding-block);padding-inline:var(--graphy-tooltip-padding-inline);box-shadow:var(--graphy-tooltip-shadow);z-index:40;max-width:320px;max-height:240px;font:var(--graphy-font-legend-label);color:var(--graphy-legend-text-color);overflow-y:auto}._1kjk02ra{flex-direction:column;gap:6px;margin:0;padding:0;list-style:none;display:flex}._1kjk02rb{align-items:center;gap:var(--graphy-legend-swatch-gap);white-space:nowrap;display:flex}._1dw9dgx0{opacity:.7;border-radius:50%}._1cecisi0{align-items:center;gap:var(--graphy-legend-item-gap);pointer-events:none;font:var(--graphy-font-legend-label);color:var(--graphy-legend-text-color);flex-wrap:nowrap;block-size:100%;inline-size:100%;display:flex}._1cecisi1{flex-direction:row}._1cecisi2{flex-direction:column}._1cecisi3{justify-content:flex-start}._1cecisi4{justify-content:center}._1cecisi5{justify-content:flex-end}._1cecisi6{align-items:flex-start}._1cecisi7{align-items:flex-end}._1cecisi8{align-items:center;gap:var(--graphy-legend-swatch-gap);white-space:nowrap;padding-inline:var(--graphy-legend-pill-padding-inline);padding-block:var(--graphy-legend-pill-padding-block);background-color:var(--graphy-legend-background);border:var(--graphy-legend-pill-border-width) solid var(--graphy-legend-border-color);border-radius:9999px;flex-shrink:0;display:flex}.ph8bdc0{pointer-events:none}.ph8bdc1{flex-shrink:0;align-items:center;display:flex}.ph8bdc2{font:var(--graphy-font-mini-tooltip-label);color:var(--graphy-tooltip-value-text-color)}.ph8bdc3{box-sizing:border-box;background:var(--graphy-tooltip-background);border:1px solid var(--graphy-tooltip-border-color);white-space:nowrap;-webkit-user-select:none;user-select:none;border-radius:6px;flex-direction:row;align-items:center;gap:5px;width:100%;height:100%;padding:4px 7px;display:flex;box-shadow:0 2px 6px #0000001f}.ph8bdc4{pointer-events:auto}.ph8bdc5,._1agclyl0{pointer-events:none}._1agclyl1{pointer-events:none;fill:var(--graphy-data-label-outside-background)}._1agclyl2{pointer-events:none;fill:var(--graphy-stack-total-background);stroke:var(--graphy-stack-total-stroke);stroke-width:1px}._1agclyl3{pointer-events:none;font:var(--graphy-font-data-label);fill:var(--graphy-data-label-text-color);font-variant-numeric:tabular-nums}._1agclyl4{fill:var(--graphy-data-label-inside-text-color)}._1agclyl6{font:var(--graphy-font-category-label);fill:var(--graphy-data-label-inside-text-color)}._1agclyl7{font:var(--graphy-font-category-label)}._1agclyl8{font:var(--graphy-font-stack-total);fill:var(--graphy-stack-total-text-color)}._1y32a200{cursor:pointer}._120wioc0{font:var(--graphy-font-text-editor-body);color:var(--graphy-text-primary);word-wrap:break-word;white-space:break-spaces;text-align:center;box-sizing:border-box;border-radius:.6em;width:100%;padding:.2em .4em}._120wioc0 p{margin:0;line-height:1.25}._120wioc0 h1,._120wioc0 h2,._120wioc0 h3{margin:0}.to1jkx2{stroke-linecap:round;overflow:visible}.to1jkx3{transition:opacity .15s ease-out,filter .15s ease-out}[data-hover-active=true] .to1jkx3{opacity:var(--to1jkx0,.4);filter:var(--to1jkx1,none)}._17uhij30{position:absolute;top:0;left:0;overflow:visible}
package/dist/index.cjs CHANGED
@@ -1,3 +1 @@
1
- require('./index.css');
2
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),N=require("clsx"),g=require("react"),ve=require("zustand"),f=require("@graphysdk/viz-engine"),st=require("zustand/vanilla"),A=require("motion/react"),te=require("d3-shape"),Dr=require("d3-interpolate-path"),H=require("zustand/react/shallow"),Ze=require("color2k"),F=require("@floating-ui/react-dom"),zr=require("@tiptap/core"),Zt=require("@tiptap/extension-bold"),Je=require("@tiptap/extension-document"),Jt=require("@tiptap/extension-hard-break"),Qt=require("@tiptap/extension-heading"),en=require("@tiptap/extension-italic"),tn=require("@tiptap/extension-link"),nn=require("@tiptap/extension-text"),rn=require("@tiptap/extension-text-align"),ce=require("@tiptap/extension-text-style"),on=require("@tiptap/extension-underline"),Me=require("@tiptap/extensions"),Gr=require("@tiptap/extension-paragraph"),at=require("@tiptap/react"),E=require("@base-ui/react/toolbar"),le=require("@base-ui/react/tooltip"),sn=require("react-dom"),Wr=require("@vanilla-extract/dynamic"),_=require("@base-ui/react/popover"),pt=require("react-colorful"),R=require("@base-ui/react/menu"),$r=require("@base-ui/react/toggle");typeof window<"u"&&(window.__GRAPHY_SDK__??={},window.__GRAPHY_SDK__.reactRenderer="0.0.1-plugins.7");const Xr=(e=[])=>{const t=new Map;for(const n of e)t.set(n.type,n);return n=>t.get(n)??null},qr=5,Yr=e=>{if(process.env.NODE_ENV==="production")return{emit:()=>{},subscribe:()=>Ur,getLastTrigger:()=>null,getLastCompile:()=>null,getCacheStats:()=>e.getCacheStats()};const t=new Set;let n=null;return{emit:o=>{const s=e.getLastCompile();if(s){n=o;for(const a of t)a(o,s)}},subscribe:o=>(t.add(o),()=>{t.delete(o)}),getLastTrigger:()=>n,getLastCompile:()=>e.getLastCompile(),getCacheStats:()=>e.getCacheStats()}},Vr=()=>st.createStore(e=>({lastCompile:null,history:[],nextId:1,lastSnapshot:null,recordCompile:(t,n)=>e(o=>{if(o.lastSnapshot===n)return o;const s={id:o.nextId,label:Kr(t),stages:n.stages,durationMs:n.durationMs};return{lastCompile:s,history:Zr(o.history,s,qr),nextId:o.nextId+1,lastSnapshot:n}})})),Ur=()=>{},Kr=e=>{switch(e.kind){case"init":return"init";case"input":return"input change";case"data":return"data change";case"command":return e.command.metadata.description}},Zr=(e,t,n)=>{const o=e.length>=n?e.length-(n-1):0;return[...e.slice(o),t]},mt="graphy-editor",Jr="graphy-editor-host";function Qr({id:e,store:t,dispatch:n}){const o=g.useRef(n);o.current=n,g.useEffect(()=>{if(!e||!eo())return;const s=()=>{const u=f.convertSpecToInput(t.getState().compiled.spec);window.parent.postMessage({source:mt,type:"spec",id:e,input:u},"*")};let a=t.getState().compiled.spec;s();const c=t.subscribe(u=>{u.compiled.spec!==a&&(a=u.compiled.spec,s())}),i=u=>{const h=u.data;if(!h||h.source!==Jr||h.type!=="command"||h.id!==e)return;const m=h.command,p=f.commandRegistry.deserialize({type:m.type,params:m.params,metadata:f.createCommandMetadata({description:m.type})});o.current(p)};window.addEventListener("message",i);const d=u=>{const h=u.target;if(!(h instanceof Element))return;const m=h.closest("[data-graphy-id]");m instanceof HTMLElement&&m.dataset.graphyId===e&&window.parent.postMessage({source:mt,type:"select",id:e},"*")};return document.addEventListener("click",d,!0),()=>{c(),window.removeEventListener("message",i),document.removeEventListener("click",d,!0)}},[e,t])}function eo(){if(typeof window>"u"||window.parent===window)return!1;try{return new URLSearchParams(window.location.search).has("graphyEditor")}catch{return!1}}function to(e){return e}function no(e,t){return{...t,geom:e.type,highlightStrategy:e.highlightStrategy}}var an=["canvasDefault","canvasBlue","canvasCyan","canvasGreen","canvasYellow","canvasOrange","canvasRed","canvasPink","canvasPurple","canvasGray","canvasInverse"],l={white:"var(--graphy-white)",black:"var(--graphy-black)",transparent:"var(--graphy-transparent)",grey100:"var(--graphy-grey-100)",grey95:"var(--graphy-grey-95)",grey90:"var(--graphy-grey-90)",grey85:"var(--graphy-grey-85)",grey80:"var(--graphy-grey-80)",grey75:"var(--graphy-grey-75)",grey70:"var(--graphy-grey-70)",grey60:"var(--graphy-grey-60)",grey50:"var(--graphy-grey-50)",grey0:"var(--graphy-grey-0)",greyGradient80:"var(--graphy-grey-gradient-80)",green60:"var(--graphy-green-60)",green50:"var(--graphy-green-50)",red60:"var(--graphy-red-60)",red50:"var(--graphy-red-50)",amber70:"var(--graphy-amber-70)",amber50:"var(--graphy-amber-50)",amber40:"var(--graphy-amber-40)",amber30:"var(--graphy-amber-30)",blue80:"var(--graphy-blue-80)",blue60:"var(--graphy-blue-60)",purple50:"var(--graphy-purple-50)",purple30:"var(--graphy-purple-30)",brand:"var(--graphy-brand)",success:"var(--graphy-success)",warning:"var(--graphy-warning)",alert:"var(--graphy-alert)",textPrimary:"var(--graphy-text-primary)",textSecondary:"var(--graphy-text-secondary)",textDisabled:"var(--graphy-text-disabled)",iconPrimary:"var(--graphy-icon-primary)",iconSecondary:"var(--graphy-icon-secondary)",iconStickerBackground:"var(--graphy-icon-sticker-background)",border100:"var(--graphy-border-100)",border50:"var(--graphy-border-50)",border10:"var(--graphy-border-10)",sunkenBackground:"var(--graphy-sunken-background)",defaultBackground:"var(--graphy-default-background)",raisedBackground:"var(--graphy-raised-background)",overlayBackground:"var(--graphy-overlay-background)",overlayBorderGradient:"var(--graphy-overlay-border-gradient)",graphBackground:"var(--graphy-graph-background)",gridLineColor:"var(--graphy-grid-line-color)",originLineColor:"var(--graphy-origin-line-color)",targetLineColor:"var(--graphy-target-line-color)",targetLineMarkerColor:"var(--graphy-target-line-marker-color)",targetLineLabelTextColor:"var(--graphy-target-line-label-text-color)",legendBackground:"var(--graphy-legend-background)",legendBorderColor:"var(--graphy-legend-border-color)",legendFocusOutlineColor:"var(--graphy-legend-focus-outline-color)",legendTextColor:"var(--graphy-legend-text-color)",dimmedSeriesLabelTextColor:"var(--graphy-dimmed-series-label-text-color)",dimmedSeriesLabelLineColor:"var(--graphy-dimmed-series-label-line-color)",trendNegativeColor:"var(--graphy-trend-negative-color)",trendPositiveColor:"var(--graphy-trend-positive-color)",trendNeutralColor:"var(--graphy-trend-neutral-color)",defaultAnnotationArrowStroke:"var(--graphy-default-annotation-arrow-stroke)",defaultAnnotationShapeStroke:"var(--graphy-default-annotation-shape-stroke)",defaultAnnotationShapeFill:"var(--graphy-default-annotation-shape-fill)",arrowAnnotationStickerOutlineColor:"var(--graphy-arrow-annotation-sticker-outline-color)",arrowAnnotationStickerOutlineColorInverse:"var(--graphy-arrow-annotation-sticker-outline-color-inverse)",annotationFrameBorderColor:"var(--graphy-annotation-frame-border-color)",annotationMenuTriggerIconColor:"var(--graphy-annotation-menu-trigger-icon-color)",heatmapEmptyTileBackground:"var(--graphy-heatmap-empty-tile-background)",dataLabelOutsideBackground:"var(--graphy-data-label-outside-background)",canvasDefault:"var(--graphy-canvas-default)",canvasBlue:"var(--graphy-canvas-blue)",canvasCyan:"var(--graphy-canvas-cyan)",canvasGreen:"var(--graphy-canvas-green)",canvasYellow:"var(--graphy-canvas-yellow)",canvasOrange:"var(--graphy-canvas-orange)",canvasRed:"var(--graphy-canvas-red)",canvasPink:"var(--graphy-canvas-pink)",canvasPurple:"var(--graphy-canvas-purple)",canvasGray:"var(--graphy-canvas-gray)",canvasInverse:"var(--graphy-canvas-inverse)",elevationXs:"var(--graphy-elevation-xs)",elevationSm:"var(--graphy-elevation-sm)",elevationMd:"var(--graphy-elevation-md)",elevationLg:"var(--graphy-elevation-lg)",radiiXs:"var(--graphy-radii-xs)",radiiSm:"var(--graphy-radii-sm)",radiiMd:"var(--graphy-radii-md)",radiiLg:"var(--graphy-radii-lg)",spaceXxs:"var(--graphy-space-xxs)",spaceXs:"var(--graphy-space-xs)",spaceSm:"var(--graphy-space-sm)",spaceMd:"var(--graphy-space-md)",spaceLg:"var(--graphy-space-lg)",spaceXl:"var(--graphy-space-xl)",zIndexToolbar:"var(--graphy-z-index-toolbar)",zIndexToolbarTooltip:"var(--graphy-z-index-toolbar-tooltip)",zIndexToolbarPopover:"var(--graphy-z-index-toolbar-popover)",toolbarBackgroundColor:"var(--graphy-toolbar-background-color)",toolbarButtonBackgroundColor:"var(--graphy-toolbar-button-background-color)",toolbarButtonBackgroundColorHovered:"var(--graphy-toolbar-button-background-color-hovered)",toolbarButtonBackgroundColorSelected:"var(--graphy-toolbar-button-background-color-selected)",toolbarSeparatorColor:"var(--graphy-toolbar-separator-color)",tooltipBackground:"var(--graphy-tooltip-background)",tooltipBorderColor:"var(--graphy-tooltip-border-color)",tooltipHeadingTextColor:"var(--graphy-tooltip-heading-text-color)",tooltipLabelTextColor:"var(--graphy-tooltip-label-text-color)",tooltipValueTextColor:"var(--graphy-tooltip-value-text-color)",tooltipPrimaryRowColor:"var(--graphy-tooltip-primary-row-color)",hoverGuideLineColor:"var(--graphy-hover-guide-line-color)",hoverGuideFillColor:"var(--graphy-hover-guide-fill-color)",hoveredBarBorderColor:"var(--graphy-hovered-bar-border-color)",hoveredPointRingColor:"var(--graphy-hovered-point-ring-color)",pointStrokeColor:"var(--graphy-point-stroke-color)",stackedBarHoverBorderColor:"var(--graphy-stacked-bar-hover-border-color)",fontFamilyDefault:"var(--graphy-font-family-default)",fontFamilyHeading:"var(--graphy-font-family-heading)",fontWeightRegular:"var(--graphy-font-weight-regular)",fontWeightMedium:"var(--graphy-font-weight-medium)",fontWeightSemibold:"var(--graphy-font-weight-semibold)",fontWeightBold:"var(--graphy-font-weight-bold)",fontWeightExtraBold:"var(--graphy-font-weight-extra-bold)",fontWeightBlack:"var(--graphy-font-weight-black)",textScale:"var(--graphy-text-scale)",fontSizeXxs:"var(--graphy-font-size-xxs)",fontSizeXs:"var(--graphy-font-size-xs)",fontSizeSm:"var(--graphy-font-size-sm)",fontSizeMd:"var(--graphy-font-size-md)",fontSizeLg:"var(--graphy-font-size-lg)",fontSizeXl:"var(--graphy-font-size-xl)",fontLineHeightXxs:"var(--graphy-font-line-height-xxs)",fontLineHeightXs:"var(--graphy-font-line-height-xs)",fontLineHeightSm:"var(--graphy-font-line-height-sm)",fontLineHeightMd:"var(--graphy-font-line-height-md)",fontLineHeightLg:"var(--graphy-font-line-height-lg)",fontLineHeightXl:"var(--graphy-font-line-height-xl)",fontSizeEditorBody:"var(--graphy-font-size-editor-body)",fontSizeHeadingSm:"var(--graphy-font-size-heading-sm)",fontSizeHeadingMd:"var(--graphy-font-size-heading-md)",fontSizeHeadingLg:"var(--graphy-font-size-heading-lg)",fontLineHeightEditorBody:"var(--graphy-font-line-height-editor-body)",fontLineHeightHeadingSm:"var(--graphy-font-line-height-heading-sm)",fontLineHeightHeadingMd:"var(--graphy-font-line-height-heading-md)",fontLineHeightHeadingLg:"var(--graphy-font-line-height-heading-lg)",fontTickLabel:"var(--graphy-font-tick-label)",fontAxisLabel:"var(--graphy-font-axis-label)",fontDataLabel:"var(--graphy-font-data-label)",fontStackTotal:"var(--graphy-font-stack-total)",fontLegendLabel:"var(--graphy-font-legend-label)",fontSeriesLabel:"var(--graphy-font-series-label)",fontTooltipLabel:"var(--graphy-font-tooltip-label)",fontTooltipHeading:"var(--graphy-font-tooltip-heading)",fontTooltipFooter:"var(--graphy-font-tooltip-footer)",fontJumboTooltipLabel:"var(--graphy-font-jumbo-tooltip-label)",fontJumboTooltip:"var(--graphy-font-jumbo-tooltip)",fontMiniTooltipLabel:"var(--graphy-font-mini-tooltip-label)",fontMiniTooltipFooter:"var(--graphy-font-mini-tooltip-footer)",fontTooltipCaption:"var(--graphy-font-tooltip-caption)",fontTooltipCaptionSmall:"var(--graphy-font-tooltip-caption-small)",fontTrendTag:"var(--graphy-font-trend-tag)",fontTrendTagSmall:"var(--graphy-font-trend-tag-small)",fontGoalLineLabel:"var(--graphy-font-goal-line-label)",fontPieLabel:"var(--graphy-font-pie-label)",fontPieChartTotal:"var(--graphy-font-pie-chart-total)",fontDifferenceArrowSmall:"var(--graphy-font-difference-arrow-small)",fontDifferenceArrowMedium:"var(--graphy-font-difference-arrow-medium)",fontDifferenceArrowLarge:"var(--graphy-font-difference-arrow-large)",fontButton:"var(--graphy-font-button)",fontInput:"var(--graphy-font-input)",fontInputLabel:"var(--graphy-font-input-label)",fontSelectLabel:"var(--graphy-font-select-label)",fontSelectDescription:"var(--graphy-font-select-description)",fontColorSelectLabel:"var(--graphy-font-color-select-label)",fontMenuTitle:"var(--graphy-font-menu-title)",fontMenuGroupTitle:"var(--graphy-font-menu-group-title)",fontMenuItemLabel:"var(--graphy-font-menu-item-label)",fontMenuItemLabelSecondary:"var(--graphy-font-menu-item-label-secondary)",fontUITooltip:"var(--graphy-font-uitooltip)",fontUITooltipSecondary:"var(--graphy-font-uitooltip-secondary)",fontErrorBoundaryTitle:"var(--graphy-font-error-boundary-title)",fontErrorBoundaryMessage:"var(--graphy-font-error-boundary-message)",fontTableCell:"var(--graphy-font-table-cell)",fontTableHeaderCell:"var(--graphy-font-table-header-cell)",fontSourceLabel:"var(--graphy-font-source-label)",fontSourceLink:"var(--graphy-font-source-link)",fontTextEditorH1:"var(--graphy-font-text-editor-h1)",fontTextEditorH2:"var(--graphy-font-text-editor-h2)",fontTextEditorH3:"var(--graphy-font-text-editor-h3)",fontTextEditorH6:"var(--graphy-font-text-editor-h6)",fontTextEditorBody:"var(--graphy-font-text-editor-body)",fontTextEditorLink:"var(--graphy-font-text-editor-link)",fontHighlightModeTitle:"var(--graphy-font-highlight-mode-title)",fontHighlightModeSubtitle:"var(--graphy-font-highlight-mode-subtitle)"};const it=1,ln=8,ro=12;l.pointStrokeColor;const oo=1;function so(e){return e}function z(e){return 1-e}const b=e=>`${Number.parseFloat((e*100).toFixed(4))}%`,ao=2,io=.7,ne=({hit:e})=>{const t=f.getColor(e.observation),n=(f.getAlpha(e.observation)??it)*io,o=(f.getSize(e.observation)??ln)/2;return r.jsx("circle",{cx:b(e.x),cy:b(z(e.y)),r:o,fill:t,opacity:n,stroke:l.hoveredPointRingColor,strokeWidth:ao,"data-testid":"companion-point"})},cn=.3,dn=1,I={type:"spring",stiffness:500,damping:60,mass:1},un=1,lo=2,hn=e=>e==="catmull-rom"?te.curveCatmullRom:te.curveLinear,Re=e=>{switch(e){case"dashed":return"8 4";case"dotted":return"2 2";case"solid":return}},Be=(e,t)=>t.lineWidth!=="auto"?t.lineWidth:f.getStrokeWidth(e)??lo,Ie=e=>t=>`${e}:${f.getIdentityKey(t)}`,Pe=(e,t)=>{const n=A.useMotionValue(e);return g.useEffect(()=>{const o=Dr.interpolatePath(n.get(),e);A.animate(0,1,{...t,onUpdate:s=>{const a=o(s);return n.set(a)}})},[t,e,n]),n};var he="_1d8mpa10";const gn=(e,t)=>{const n=hn(t.interpolate),o=te.area().curve(n),s=te.line().curve(n);if(e.mainAxis==="y"){const a=d=>z(f.getY(d)??0),c=d=>f.getXMin(d)??0,i=d=>f.getXMax(d)??f.getX(d)??0;o.y(a).x0(c).x1(i),s.y(a).x(i)}else{const a=d=>f.getX(d)??0,c=d=>z(f.getYMin(d)??0),i=d=>z(f.getYMax(d)??f.getY(d)??0);o.x(a).y0(c).y1(i),s.x(a).y(i)}if(t.missingValues==="gap"){const a=c=>f.getX(c)!==null&&f.getY(c)!==null;o.defined(a),s.defined(a)}return{lineGenerator:s,areaGenerator:o}},fn=(e,t)=>t!=="connect"?e:e.filter(n=>f.getX(n)!==null&&f.getY(n)!==null),co=g.memo(function({layer:t,coordSystem:n,isAnimated:o}){const{lineGenerator:s,areaGenerator:a}=g.useMemo(()=>gn(n,t.params),[t.params,n]),c=g.useMemo(()=>{const i=Ie(t.id),d=[];return t.data.groupBy(f.GROUP_VARIABLES.group).forEach(u=>{const h=fn([...u],t.params.missingValues),m=a(h),p=s(h);if(!m||!p)return;const x=h[0];if(!x)return;const v=f.getColor(x),y=f.getAlpha(x),L=Be(x,t.params),j=Re(f.getLineType(x));d.push({key:i(x),areaPath:m,linePath:p,color:v,fillOpacity:y??cn,strokeWidth:L,strokeOpacity:dn,strokeDasharray:j})}),d},[a,s,t.data,t.id,t.params]);return r.jsx("svg",{viewBox:"0 0 1 1",preserveAspectRatio:"none",width:"100%",height:"100%","data-geom":"area",className:he,children:c.map(i=>r.jsx(uo,{areaPath:i.areaPath,linePath:i.linePath,color:i.color,fillOpacity:i.fillOpacity,strokeWidth:i.strokeWidth,strokeOpacity:i.strokeOpacity,strokeDasharray:i.strokeDasharray,isAnimated:o},i.key))})}),uo=({areaPath:e,linePath:t,color:n,fillOpacity:o,strokeWidth:s,strokeOpacity:a,strokeDasharray:c,isAnimated:i})=>i?r.jsx(ho,{areaPath:e,linePath:t,color:n,fillOpacity:o,strokeWidth:s,strokeOpacity:a,strokeDasharray:c}):r.jsxs("g",{children:[r.jsx("path",{d:e,fill:n,fillOpacity:o,stroke:"none"}),r.jsx("path",{d:t,fill:"none",stroke:n,strokeWidth:s,strokeOpacity:a,strokeDasharray:c,vectorEffect:"non-scaling-stroke"})]}),ho=({areaPath:e,linePath:t,color:n,fillOpacity:o,strokeWidth:s,strokeOpacity:a,strokeDasharray:c})=>{const i=Pe(e,I),d=Pe(t,I);return r.jsxs("g",{children:[r.jsx(A.motion.path,{d:i,fill:n,fillOpacity:o,stroke:"none"}),r.jsx(A.motion.path,{d,fill:"none",stroke:n,strokeWidth:s,strokeOpacity:a,strokeDasharray:c,vectorEffect:"non-scaling-stroke"})]})};var go="_46ebsf0";const Ge=1,fo=2,po=1,mo=ro/2,xo=2.25,Oe=({hit:e,...t})=>{const n=vo(e.observation),o=f.getColor(e.observation),s=f.getAlpha(e.observation)??it,a=b(e.x),c=b(z(e.y)),d=n+Ge/2+po+Ge/2;return r.jsxs("g",{...t,className:go,children:[r.jsx("circle",{cx:a,cy:c,r:d,fill:"none",stroke:l.hoveredPointRingColor,strokeWidth:fo}),r.jsx("circle",{cx:a,cy:c,r:n,fill:o,opacity:s,stroke:l.hoveredPointRingColor,strokeWidth:Ge})]})},vo=e=>{const t=f.getSize(e);return f.isDefined(t)?t/xo:mo},yo=({layer:e,coordSystem:t,primary:n,companions:o})=>{const s=f.getGroup(n.observation),a=g.useMemo(()=>{const p=e.data.filter(f.GROUP_VARIABLES.group,"eq",s);return fn([...p],e.params.missingValues)},[e.data,e.params.missingValues,s]),{areaPath:c,linePath:i}=g.useMemo(()=>{const{lineGenerator:p,areaGenerator:x}=gn(t,e.params);return{areaPath:x(a)??"",linePath:p(a)??""}},[t,e.params,a]);if(!c||!i)return null;const d=f.getColor(n.observation),u=f.getAlpha(n.observation)??cn,h=Be(n.observation,e.params),m=Re(f.getLineType(n.observation));return r.jsxs("g",{"data-testid":"hovered-area",children:[r.jsxs("svg",{viewBox:"0 0 1 1",preserveAspectRatio:"none",width:"100%",height:"100%","data-geom":"area",className:he,children:[r.jsx("path",{d:c,fill:d,fillOpacity:u,stroke:"none","data-testid":"hovered-area-fill"}),r.jsx("path",{d:i,fill:"none",stroke:d,strokeWidth:h,strokeOpacity:dn,strokeDasharray:m,vectorEffect:"non-scaling-stroke","data-testid":"hovered-area-edge"})]}),o.map(p=>r.jsx(ne,{hit:p},`companion-${p.layerId}-${p.pointIndex}`)),r.jsx(Oe,{hit:n,"data-testid":"hovered-area-point"})]})},bo={geom:"area",coord:"cartesian",highlightStrategy:"overlay-anchor",guideMode:"continuous",render:({layer:e,coordSystem:t,isAnimated:n})=>r.jsx(co,{layer:e,coordSystem:t,isAnimated:n}),renderHover:({layer:e,coordSystem:t,primary:n,group:o,related:s})=>r.jsx(yo,{layer:e,coordSystem:t,primary:n,companions:[...o,...s]}),renderHoverCompanions:({related:e})=>r.jsx(r.Fragment,{children:e.map(t=>r.jsx(ne,{hit:t},`companion-${t.layerId}-${t.pointIndex}`))}),getOverlayAnchor:({observation:e,coordSystem:t})=>{if(t.mainAxis==="x"){const s=f.getX(e),a=f.getYMax(e)??f.getY(e);return s===null||a===null?null:{x:s,y:a}}const n=f.getY(e),o=f.getXMax(e)??f.getX(e);return n===null||o===null?null:{x:o,y:n}}},pn=1,ye=4,mn=(e,t)=>{const n=f.getXMin(t),o=f.getXMax(t),s=f.getYMin(t),a=f.getYMax(t)??f.getY(t);if(n===null||o===null||s===null||a===null)return null;if(e==="x"){let d=1-a,u=a-s;return u<0&&(d+=u,u=-u),{x:n,y:d,width:o-n,height:u}}let c=n,i=o-n;return i<0&&(c+=i,i=-i),{x:c,y:1-a,width:i,height:a-s}},So=g.memo(function({layer:t,coordSystem:n,isAnimated:o}){const s=g.useId(),a=g.useMemo(()=>{const i=Ie(t.id),d=new Map;for(const u of t.data){const h=mn(n.mainAxis,u);if(!h)continue;const m=jo(n.mainAxis,h),p=d.get(m),x={key:i(u),...h,fill:f.getColor(u),opacity:f.getAlpha(u)??pn};p?p.push(x):d.set(m,[x])}return[...d.entries()].map(([u,h])=>({id:`${s}${u}`,bars:h,...Co(h)}))},[s,n.mainAxis,t]),c=a.filter(i=>i.bars.length>1);return r.jsxs(r.Fragment,{children:[c.length>0&&r.jsx("defs",{children:c.map(i=>r.jsx("clipPath",{id:i.id,children:r.jsx(Lo,{column:i,isAnimated:o})},i.id))}),a.map(i=>{const[d]=i.bars;if(i.bars.length===1&&d!==void 0){const{key:u,...h}=d;return r.jsx(xt,{...h,rx:ye,isAnimated:o},u)}return r.jsx("g",{clipPath:`url(#${i.id})`,children:i.bars.map(u=>{const{key:h,...m}=u;return r.jsx(xt,{...m,isAnimated:o},h)})},i.id)})]})}),xt=({isAnimated:e,rx:t,...n})=>e?r.jsx(A.motion.rect,{initial:!1,style:{transformBox:"view-box"},transition:I,fill:n.fill,opacity:n.opacity,rx:t,animate:{x:b(n.x),y:b(n.y),width:b(n.width),height:b(n.height),opacity:n.opacity}}):r.jsx("rect",{style:{transformBox:"view-box"},x:b(n.x),y:b(n.y),width:b(n.width),height:b(n.height),fill:n.fill,opacity:n.opacity,rx:t}),Lo=({column:e,isAnimated:t})=>t?r.jsx(A.motion.rect,{initial:!1,style:{transformBox:"view-box"},transition:I,rx:ye,animate:{x:b(e.x),y:b(e.y),width:b(e.width),height:b(e.height)}}):r.jsx("rect",{x:b(e.x),y:b(e.y),width:b(e.width),height:b(e.height),rx:ye}),jo=(e,t)=>e==="x"?`${t.x}-${t.width}`:`${t.y}-${t.height}`,Co=e=>{let t=1/0,n=1/0,o=-1/0,s=-1/0;for(const a of e)a.x<t&&(t=a.x),a.y<n&&(n=a.y),a.x+a.width>o&&(o=a.x+a.width),a.y+a.height>s&&(s=a.y+a.height);return{x:t,y:n,width:o-t,height:s-n}};var To="_1i6dtb60";const pe=3,ko=({coordSystem:e,primary:t,panelRect:n})=>{const o=mn(e.mainAxis,t.observation);if(!o)return null;const s=o.x*n.width,a=o.y*n.height,c=o.width*n.width,i=o.height*n.height,d=s-pe,u=a-pe,h=c+pe*2,m=i+pe*2,p=ye+pe,x=f.getColor(t.observation),v=f.getAlpha(t.observation)??pn;return r.jsxs("g",{"data-testid":"hovered-bar",children:[r.jsx("rect",{x:d,y:u,width:h,height:m,rx:p,fill:l.hoveredBarBorderColor,className:To,"data-testid":"hovered-bar-border"}),r.jsx("rect",{x:b(o.x),y:b(o.y),width:b(o.width),height:b(o.height),fill:x,opacity:v,rx:ye,"data-testid":"hovered-bar-fill"})]})},wo={geom:"bar",coord:"cartesian",highlightStrategy:"observation-rerender",guideMode:"bar",render:({layer:e,coordSystem:t,isAnimated:n})=>r.jsx(So,{layer:e,coordSystem:t,isAnimated:n}),renderHover:({coordSystem:e,primary:t,panelRect:n})=>r.jsx(ko,{coordSystem:e,primary:t,panelRect:n}),renderHoverCompanions:()=>null},xn=e=>{const t=te.line().x(n=>f.getX(n)??0).y(n=>z(f.getY(n)??0)).curve(hn(e.interpolate));return e.missingValues==="gap"&&t.defined(n=>f.getX(n)!==null&&f.getY(n)!==null),t},vn=(e,t)=>t!=="connect"?e:e.filter(n=>f.getX(n)!==null&&f.getY(n)!==null),Ao=g.memo(function({layer:t,isAnimated:n}){const o=g.useMemo(()=>xn(t.params),[t.params]),s=g.useMemo(()=>{const a=Ie(t.id),c=[];return t.data.groupBy(f.GROUP_VARIABLES.group).forEach(i=>{const d=vn([...i],t.params.missingValues),u=o(d);if(!u)return;const h=d[0];if(!h)return;const m=f.getColor(h),p=f.getAlpha(h),x=Be(h,t.params),v=Re(f.getLineType(h));c.push({key:a(h),pathData:u,color:m,opacity:p??un,strokeWidth:x,strokeDasharray:v})}),c},[o,t.data,t.id,t.params]);return r.jsx("svg",{viewBox:"0 0 1 1",preserveAspectRatio:"none",width:"100%",height:"100%","data-geom":"line",className:he,children:s.map(a=>r.jsx(Eo,{pathData:a.pathData,color:a.color,strokeWidth:a.strokeWidth,opacity:a.opacity,strokeDasharray:a.strokeDasharray,isAnimated:n},a.key))})}),Eo=({pathData:e,color:t,strokeWidth:n,opacity:o,strokeDasharray:s,isAnimated:a})=>a?r.jsx(_o,{pathData:e,color:t,strokeWidth:n,opacity:o,strokeDasharray:s}):r.jsx("path",{d:e,fill:"none",stroke:t,strokeWidth:n,opacity:o,strokeDasharray:s,vectorEffect:"non-scaling-stroke"}),_o=({pathData:e,color:t,strokeWidth:n,opacity:o,strokeDasharray:s})=>{const a=Pe(e,I);return r.jsx(A.motion.path,{d:a,fill:"none",stroke:t,strokeWidth:n,opacity:o,strokeDasharray:s,vectorEffect:"non-scaling-stroke"})},Mo=({layer:e,primary:t,companions:n})=>{const o=f.getGroup(t.observation),s=g.useMemo(()=>{const h=e.data.filter(f.GROUP_VARIABLES.group,"eq",o);return vn([...h],e.params.missingValues)},[e.data,e.params.missingValues,o]),a=g.useMemo(()=>xn(e.params)(s),[e.params,s]);if(!a)return null;const c=f.getColor(t.observation),i=f.getAlpha(t.observation)??un,d=Be(t.observation,e.params),u=Re(f.getLineType(t.observation));return r.jsxs("g",{"data-testid":"hovered-line",children:[r.jsx("svg",{viewBox:"0 0 1 1",preserveAspectRatio:"none",width:"100%",height:"100%","data-geom":"line",className:he,children:r.jsx("path",{d:a,fill:"none",stroke:c,strokeWidth:d,opacity:i,strokeDasharray:u,vectorEffect:"non-scaling-stroke","data-testid":"hovered-line-path"})}),n.map(h=>r.jsx(ne,{hit:h},`companion-${h.layerId}-${h.pointIndex}`)),r.jsx(Oe,{hit:t,"data-testid":"hovered-line-point"})]})},Po={geom:"line",coord:"cartesian",highlightStrategy:"overlay-anchor",guideMode:"continuous",render:({layer:e,isAnimated:t})=>r.jsx(Ao,{layer:e,isAnimated:t}),renderHover:({layer:e,primary:t,group:n,related:o})=>r.jsx(Mo,{layer:e,primary:t,companions:[...n,...o]}),renderHoverCompanions:({related:e})=>r.jsx(r.Fragment,{children:e.map(t=>r.jsx(ne,{hit:t},`companion-${t.layerId}-${t.pointIndex}`))}),getOverlayAnchor:({observation:e})=>{const t=f.getX(e),n=f.getY(e);return t===null||n===null?null:{x:t,y:n}}},Fo=g.memo(function({layer:t,isAnimated:n}){const o=g.useMemo(()=>{const s=[];for(const a of t.data){const c=f.getX(a),i=f.getY(a);if(c===null||i===null)continue;const d=f.getColor(a),u=f.getAlpha(a),h=f.getSize(a),m=f.getStrokeWidth(a);s.push({key:f.getIdentityKey(a),cx:c,cy:z(i),radius:(h??t.params.size)/2,fill:d,stroke:l.pointStrokeColor,opacity:u??it,strokeWidth:m??oo})}return s},[t.data,t.params.size]);return r.jsx(r.Fragment,{children:o.map(s=>n?r.jsx(A.motion.circle,{initial:!1,transition:I,fill:s.fill,stroke:s.stroke,strokeWidth:s.strokeWidth,animate:{cx:b(s.cx),cy:b(s.cy),r:s.radius,opacity:s.opacity}},s.key):r.jsx("circle",{cx:b(s.cx),cy:b(s.cy),r:s.radius,fill:s.fill,opacity:s.opacity,stroke:s.stroke,strokeWidth:s.strokeWidth},s.key))})}),No={geom:"point",coord:"cartesian",highlightStrategy:"overlay-anchor",guideMode:null,render:({layer:e,isAnimated:t})=>r.jsx(Fo,{layer:e,isAnimated:t}),renderHover:({primary:e,group:t,related:n})=>r.jsxs("g",{"data-testid":"hovered-point",children:[[...t,...n].map(o=>r.jsx(ne,{hit:o},`companion-${o.layerId}-${o.pointIndex}`)),r.jsx(Oe,{hit:e})]}),renderHoverCompanions:({related:e})=>r.jsx(r.Fragment,{children:e.map(t=>r.jsx(ne,{hit:t},`companion-${t.layerId}-${t.pointIndex}`))}),getOverlayAnchor:({observation:e})=>{const t=f.getX(e),n=f.getY(e);return t===null||n===null?null:{x:t,y:n}}},yn=10,V=(e,t)=>e*yn*t,Ho=/\p{Emoji_Presentation}|\p{Emoji}\uFE0F/gu,bn="😀";class De{constructor(){this.emojiCorrections=new Map,this.currentFont="";const n=new OffscreenCanvas(1,1).getContext("2d");if(!n)throw new Error("Failed to create OffscreenCanvas 2D context");this.ctx=n}static async create(){return typeof document<"u"&&"fonts"in document&&await document.fonts.ready,new De}measureText(t,n){const o=f.buildFontString(n);this.setFont(o);const{width:s,fontBoundingBoxAscent:a,fontBoundingBoxDescent:c}=this.ctx.measureText(t);let i=s;const d=Ro(t);if(d>0){const u=this.getEmojiCorrection(o);i-=u*d}return{width:i,height:a+c,ascent:a,descent:c}}setFont(t){this.currentFont!==t&&(this.ctx.font=t,this.currentFont=t)}getEmojiCorrection(t){const n=this.emojiCorrections.get(t);if(n!==void 0)return n;this.setFont(t);const o=this.ctx.measureText(bn).width,s=Bo(t);let a=0;if(s!==null){const c=o-s;a=c>.5?c:0}return this.emojiCorrections.set(t,a),a}}let q=null;const Ro=e=>{const t=e.match(Ho);return t?t.length:0},Bo=e=>{const t=Io();return t?(t.style.font=e,t.getBoundingClientRect().width):null},Io=()=>typeof document>"u"?null:(q||(q=document.createElement("span"),q.style.position="absolute",q.style.visibility="hidden",q.style.whiteSpace="nowrap",q.style.left="-9999px",q.textContent=bn,document.body.appendChild(q)),q),Sn=g.createContext(null),Ln=({children:e,measurer:t})=>{const[n,o]=g.useState(null);g.useEffect(()=>{if(t!==void 0)return;let a=!1;const c=()=>{a||o(Oo())};return(async()=>{typeof document<"u"&&"fonts"in document&&await document.fonts.ready,c()})(),typeof document<"u"&&"fonts"in document&&document.fonts.addEventListener("loadingdone",c),()=>{a=!0,typeof document<"u"&&"fonts"in document&&document.fonts.removeEventListener("loadingdone",c)}},[t]);const s=t??n;return s===null?null:r.jsx(Sn.Provider,{value:s,children:e})},re=()=>{const e=g.useContext(Sn);if(e===null)throw new Error("useTextMeasurer must be used inside a <TextMeasurerProvider>.");return e},Oo=()=>{try{return new f.CachedTextMeasurer(new De)}catch{return new f.CachedTextMeasurer(new f.HeuristicTextMeasurer)}},O=`'Inter', -apple-system, BlinkMacSystemFont, 'Open Sans', 'Segoe UI', 'Roboto', 'Oxygen-Sans', 'Ubuntu',
3
- 'Cantarell', 'Helvetica Neue', 'NotoSansArabic', 'NotoSansJP', 'NotoSansSC', 'NotoSansKR', 'NotoSerifKR', sans-serif, 'Apple Color Emoji', 'NotoColorEmoji'`,Do=O,Y={regular:400,medium:500,semibold:600,bold:700,extraBold:800,black:900},M={xxs:1,xs:1.1,sm:1.2,md:1.4,lg:1.6,xl:2,editorBody:1.5,headingSm:1.8,headingMd:2.2,headingLg:2.8},B={xxs:1,xs:1,sm:1.3,md:1.43,lg:1,xl:1,editorBody:1.47,headingSm:1.25,headingMd:1.41,headingLg:1.29},zo=`var(--typography-chart-font-family, ${l.fontFamilyDefault})`,We=`var(--typography-chart-heading-font-family, ${l.fontFamilyHeading})`,$=e=>`${e}em`,jn={textScale:"1",fontFamilyDefault:O,fontFamilyHeading:Do,fontWeightRegular:Y.regular.toString(),fontWeightMedium:Y.medium.toString(),fontWeightSemibold:Y.semibold.toString(),fontWeightBold:Y.bold.toString(),fontWeightExtraBold:Y.extraBold.toString(),fontWeightBlack:Y.black.toString(),fontSizeXxs:$(M.xxs),fontSizeXs:$(M.xs),fontSizeSm:$(M.sm),fontSizeMd:$(M.md),fontSizeLg:$(M.lg),fontSizeXl:$(M.xl),fontLineHeightXxs:B.xxs.toString(),fontLineHeightXs:B.xs.toString(),fontLineHeightSm:B.sm.toString(),fontLineHeightMd:B.md.toString(),fontLineHeightLg:B.lg.toString(),fontLineHeightXl:B.xl.toString()},Cn={fontSizeEditorBody:$(M.editorBody),fontSizeHeadingSm:$(M.headingSm),fontSizeHeadingMd:$(M.headingMd),fontSizeHeadingLg:$(M.headingLg),fontLineHeightEditorBody:B.editorBody.toString(),fontLineHeightHeadingSm:B.headingSm.toString(),fontLineHeightHeadingMd:B.headingMd.toString(),fontLineHeightHeadingLg:B.headingLg.toString()},S=(e,t,n,o=zo)=>`${e} ${t}/${n} ${o}`,Tn={fontTickLabel:S(l.fontWeightMedium,l.fontSizeSm,l.fontLineHeightSm),fontAxisLabel:S(l.fontWeightMedium,l.fontSizeSm,l.fontLineHeightSm),fontDataLabel:S(l.fontWeightMedium,l.fontSizeXs,l.fontLineHeightXs),fontStackTotal:S(l.fontWeightSemibold,l.fontSizeXs,l.fontLineHeightXs),fontLegendLabel:S(l.fontWeightMedium,l.fontSizeSm,l.fontLineHeightSm),fontSeriesLabel:S(l.fontWeightSemibold,l.fontSizeSm,l.fontLineHeightSm),fontTooltipLabel:S(l.fontWeightMedium,l.fontSizeMd,l.fontLineHeightMd),fontTooltipHeading:S(l.fontWeightMedium,l.fontSizeSm,l.fontLineHeightSm),fontTooltipFooter:S(l.fontWeightRegular,l.fontSizeSm,l.fontLineHeightSm),fontJumboTooltipLabel:S(l.fontWeightRegular,l.fontSizeSm,l.fontLineHeightSm),fontJumboTooltip:S(l.fontWeightMedium,l.fontSizeHeadingMd,l.fontLineHeightHeadingMd),fontMiniTooltipLabel:S(l.fontWeightMedium,l.fontSizeSm,l.fontLineHeightSm),fontMiniTooltipFooter:S(l.fontWeightRegular,l.fontSizeSm,l.fontLineHeightSm),fontTooltipCaption:S(l.fontWeightMedium,l.fontSizeSm,l.fontLineHeightSm),fontTooltipCaptionSmall:S(l.fontWeightMedium,l.fontSizeXxs,l.fontLineHeightXxs),fontUITooltip:S(l.fontWeightMedium,l.fontSizeMd,l.fontLineHeightMd),fontUITooltipSecondary:S(l.fontWeightMedium,l.fontSizeSm,l.fontLineHeightSm),fontTrendTag:S(l.fontWeightMedium,l.fontSizeMd,l.fontLineHeightMd),fontTrendTagSmall:S(l.fontWeightMedium,l.fontSizeXs,l.fontLineHeightXs),fontGoalLineLabel:S(l.fontWeightMedium,l.fontSizeXs,l.fontLineHeightXs),fontPieLabel:S(l.fontWeightMedium,l.fontSizeXs,l.fontLineHeightXs),fontPieChartTotal:S(l.fontWeightBold,l.fontSizeHeadingLg,l.fontLineHeightHeadingLg),fontDifferenceArrowSmall:S(l.fontWeightMedium,l.fontSizeSm,l.fontLineHeightSm),fontDifferenceArrowMedium:S(l.fontWeightMedium,l.fontSizeLg,l.fontLineHeightLg),fontDifferenceArrowLarge:S(l.fontWeightSemibold,l.fontSizeXl,l.fontLineHeightXl),fontButton:S(l.fontWeightMedium,l.fontSizeMd,l.fontLineHeightMd),fontInput:S(l.fontWeightMedium,l.fontSizeMd,l.fontLineHeightMd),fontInputLabel:S(l.fontWeightMedium,l.fontSizeXxs,l.fontLineHeightXxs),fontSelectLabel:S(l.fontWeightMedium,l.fontSizeMd,l.fontLineHeightMd),fontSelectDescription:S(l.fontWeightMedium,l.fontSizeSm,l.fontLineHeightSm),fontColorSelectLabel:S(l.fontWeightMedium,l.fontSizeSm,l.fontLineHeightSm),fontMenuTitle:S(l.fontWeightSemibold,l.fontSizeMd,l.fontLineHeightMd),fontMenuGroupTitle:S(l.fontWeightMedium,l.fontSizeSm,l.fontLineHeightSm),fontMenuItemLabel:S(l.fontWeightMedium,l.fontSizeMd,l.fontLineHeightMd),fontMenuItemLabelSecondary:S(l.fontWeightMedium,l.fontSizeSm,l.fontLineHeightSm),fontErrorBoundaryTitle:S(l.fontWeightSemibold,l.fontSizeHeadingSm,l.fontLineHeightHeadingSm),fontErrorBoundaryMessage:S(l.fontWeightMedium,l.fontSizeMd,l.fontLineHeightMd),fontTableCell:S(l.fontWeightMedium,l.fontSizeMd,l.fontLineHeightMd),fontTableHeaderCell:S(l.fontWeightSemibold,l.fontSizeSm,l.fontLineHeightSm),fontSourceLabel:S(l.fontWeightMedium,l.fontSizeSm,l.fontLineHeightSm),fontSourceLink:S(l.fontWeightRegular,l.fontSizeSm,l.fontLineHeightSm),fontTextEditorH1:S(l.fontWeightBold,l.fontSizeHeadingLg,l.fontLineHeightHeadingLg,We),fontTextEditorH2:S(l.fontWeightBold,l.fontSizeHeadingMd,l.fontLineHeightHeadingMd,We),fontTextEditorH3:S(l.fontWeightSemibold,l.fontSizeHeadingSm,l.fontLineHeightHeadingSm,We),fontTextEditorH6:S(l.fontWeightMedium,l.fontSizeSm,l.fontLineHeightSm),fontTextEditorBody:S(l.fontWeightMedium,l.fontSizeEditorBody,l.fontLineHeightEditorBody),fontTextEditorLink:S(l.fontWeightRegular,l.fontSizeMd,l.fontLineHeightMd),fontHighlightModeTitle:S(l.fontWeightBold,l.fontSizeMd,l.fontLineHeightMd),fontHighlightModeSubtitle:S(l.fontWeightMedium,l.fontSizeSm,l.fontLineHeightSm)},Go=11.7,Wo=M.xs,$o=O,Xo=Y.medium,xe=5,qo=5,vt=10,yt=10,Yo=4,Fe=13,kn=6,$e=12,bt=21.6,Vo="0 0 10 18",Uo="M2.48935 16.9323L9.07098 9.82964C9.51595 9.34944 9.51504 8.60728 9.0689 8.12818L2.48866 1.06172C1.85811 0.384586 0.974477 0 0.049217 0H0V18H0.0443689C0.972463 18 1.85854 17.6131 2.48935 16.9323Z",St="#FFFFFF",Xe="#1A1A1A";var Ko="_16vokpr0";const Zo=(e,t)=>{const n=e.mapping.y!==void 0,o=t.mainAxis==="y";return n!==o},Jo=(e,t)=>{const n=b(e?1-t:t);return e?{x1:"0%",y1:n,x2:"100%",y2:n}:{x1:n,y1:"0%",x2:n,y2:"100%"}},Qo=(e,t)=>e==="solid"?{}:e==="dotted"?{strokeDasharray:`0 ${t*2}`,strokeLinecap:"round"}:{strokeDasharray:`${t*2} ${t*3}`,strokeLinecap:"round",strokeMiterlimit:16},es=e=>{const t=e.params.color,n=t??l.targetLineColor;let o=l.targetLineLabelTextColor;if(t!==void 0)try{o=Ze.getContrast(t,St)>Ze.getContrast(t,Xe)?St:Xe}catch{o=Xe}return{lineColor:n,labelTextColor:o}},ts=(e,t)=>ke(e)&&ke(t)?`${e}: ${t}`:ke(e)?e:ke(t)?t:null,ke=e=>e!=null&&e.trim()!=="";var ns="_2qyyu60";const Lt=2,rs=12,os=12,jt=1,Ct=2,ss=4,be=({shape:e,color:t,lineType:n="solid",width:o=rs,height:s=os})=>r.jsx("svg",{className:ns,width:o,height:s,viewBox:`0 0 ${o} ${s}`,"aria-hidden":!0,"data-testid":"chart-swatch","data-shape":e,children:as({shape:e,color:t,lineType:n,width:o,height:s})}),as=({shape:e,color:t,lineType:n,width:o,height:s})=>{const a=is(n,o);switch(e){case"square":return r.jsx("rect",{x:1,y:1,width:o-2,height:s-2,rx:2,fill:t});case"line":return r.jsx("line",{x1:a.x1,y1:s/2,x2:a.x2,y2:s/2,stroke:t,strokeWidth:Lt,strokeLinecap:a.linecap,strokeDasharray:a.dashArray});case"circle":{const c=(Math.min(o,s)-2)/2;return r.jsx("circle",{cx:o/2,cy:s/2,r:c,fill:t})}case"area":{const c=s/2-1;return r.jsxs(r.Fragment,{children:[r.jsx("rect",{x:1,y:c,width:o-2,height:s-c-1,fill:t,opacity:.45}),r.jsx("line",{x1:a.x1,y1:c,x2:a.x2,y2:c,stroke:t,strokeWidth:Lt,strokeLinecap:a.linecap,strokeDasharray:a.dashArray})]})}case"slice":return r.jsx("path",{d:`M 0 ${s} L ${o} ${s} A ${o} ${s} 0 0 0 0 0 Z`,fill:t})}},is=(e,t)=>{if(e==="solid")return{x1:0,x2:t,dashArray:void 0,linecap:"round"};if(e==="dashed"){const o=(t-jt*(Ct-1))/Ct;return{x1:0,x2:t,dashArray:`${o} ${jt}`,linecap:"butt"}}const n=t/(ss-1);return{x1:0,x2:t,dashArray:`1 ${n}`,linecap:"round"}},ls=({labelPosition:e,linePosition:t,color:n,pillWidth:o,pillHeight:s,text:a,isAnimated:c})=>{const i=e==="start",d=i?-Fe:-(o-Fe),u=i?d+o-xe:d+xe-$e,h=i?void 0:`rotate(180 ${u+$e/2} ${s/2})`,m=i?"0%":"100%",p=b(1-t),x=r.jsxs("g",{transform:`translate(0, ${-s/2})`,pointerEvents:"none",children:[r.jsx("rect",{x:d,y:0,width:o,height:s,rx:kn,fill:n}),r.jsx("g",{transform:h,children:r.jsx("svg",{x:u,y:(s-bt)/2,width:$e,height:bt,viewBox:Vo,overflow:"visible",children:r.jsx("path",{d:Uo,fill:n})})}),r.jsx("g",{transform:`translate(${d+xe}, ${s/2})`,children:a})]});return c?r.jsx(A.motion.svg,{initial:!1,transition:I,x:m,animate:{y:p},overflow:"visible",children:x}):r.jsx("svg",{x:m,y:p,overflow:"visible",children:x})},cs=({labelPosition:e,linePosition:t,color:n,pillWidth:o,pillHeight:s,text:a,isAnimated:c})=>{const i=e==="start",d=i?-Fe:-(s-Fe),u=b(t),h=i?"100%":"0%",m=r.jsxs("g",{transform:`translate(${-o/2}, 0)`,pointerEvents:"none",children:[r.jsx("rect",{x:0,y:d,width:o,height:s,rx:kn,fill:n}),r.jsx("g",{transform:`translate(${xe}, ${d+s/2})`,children:a})]});return c?r.jsx(A.motion.svg,{initial:!1,transition:I,y:h,animate:{x:u},overflow:"visible",children:m}):r.jsx("svg",{x:u,y:h,overflow:"visible",children:m})},ds=({label:e,textWidth:t,labelPosition:n,isHorizontalLine:o,position:s,color:a,textColor:c,symbolShape:i,symbolColor:d,isAnimated:u})=>{const h=i===null?0:vt+Yo,m=t+h+xe*2,p=Go+qo*2,x=r.jsxs(r.Fragment,{children:[i!==null&&d!==null&&r.jsx("g",{transform:`translate(0, ${-yt/2})`,children:r.jsx(be,{shape:i,color:d,width:vt,height:yt})}),r.jsx("text",{x:h,textAnchor:"start",dominantBaseline:"central",fill:c,style:{font:l.fontGoalLineLabel},children:e})]});return o?r.jsx(ls,{labelPosition:n,linePosition:s,color:a,pillWidth:m,pillHeight:p,text:x,isAnimated:u}):r.jsx(cs,{labelPosition:n,linePosition:s,color:a,pillWidth:m,pillHeight:p,text:x,isAnimated:u})},us=({layer:e,isHorizontalLine:t,position:n,lineColor:o,isAnimated:s})=>{const a=Jo(t,n),c=Qo(e.params.lineType,e.params.strokeWidth);return s?r.jsx(A.motion.line,{initial:!1,transition:I,animate:{x1:a.x1,y1:a.y1,x2:a.x2,y2:a.y2},...c,stroke:o,strokeWidth:e.params.strokeWidth,vectorEffect:"non-scaling-stroke"}):r.jsx("line",{...a,...c,stroke:o,strokeWidth:e.params.strokeWidth,vectorEffect:"non-scaling-stroke"})},hs=g.memo(function({layer:t,coordSystem:n,formattingLocale:o,isAnimated:s}){const a=re(),{guides:c,numberFormat:i,textScale:d,layers:u,compiledLayers:h,colorScale:m}=k(H.useShallow(G=>({guides:G.guides,numberFormat:G.config.numberFormat,textScale:G.config.appearance.textScale,layers:G.spec.layers,compiledLayers:G.layers,colorScale:G.scales.color}))),p=g.useMemo(()=>f.buildAverageLineSymbols(u,h,m,n).get(t.id)??null,[u,h,m,n,t.id]),x=g.useMemo(()=>ts(t.params.label,f.formatRuleValue({guides:c,numberFormat:i,layer:t,locale:o})),[c,i,o,t]),v=g.useMemo(()=>({family:$o,size:V(Wo,d),weight:Xo}),[d]),y=g.useMemo(()=>x===null?0:a.measureText(x,v).width,[x,v,a]),L=t.data.getFirst();if(!L)return null;const{lineColor:j,labelTextColor:C}=es(t),T=Zo(t,n),P=T?f.getY(L):f.getX(L);return P===null?null:r.jsxs("g",{"data-geom":"rule",className:Ko,children:[r.jsx(us,{layer:t,isHorizontalLine:T,position:P,lineColor:j,isAnimated:s}),x!==null&&r.jsx(ds,{label:x,textWidth:y,labelPosition:t.params.labelPosition,isHorizontalLine:T,position:P,color:j,textColor:C,symbolShape:p?.shape??null,symbolColor:p?.color??null,isAnimated:s})]})}),gs={geom:"rule",coord:"cartesian",highlightStrategy:null,guideMode:null,render:({layer:e,coordSystem:t,formattingLocale:n,isAnimated:o})=>r.jsx(hs,{layer:e,coordSystem:t,formattingLocale:n,isAnimated:o}),renderHover:()=>null,renderHoverCompanions:()=>null},wn=1,Qe=te.arc(),Tt=Math.PI*2,fs=g.memo(function({layer:t,isAnimated:n}){const o=g.useRef(!1);g.useEffect(()=>{o.current=!0},[]);const s=g.useMemo(()=>{const a=Ie(t.id),c=[];for(const i of t.data){const d=a(i),{startAngle:u,endAngle:h}=f.getAngleExtent(i),{innerRadius:m,outerRadius:p}=f.getRadiusExtent(i);u===null||h===null||m===null||p===null||c.push({key:d,startAngle:u,endAngle:h,innerRadius:m,outerRadius:p,fill:f.getColor(i),opacity:f.getAlpha(i)??wn})}return c},[t]);return r.jsx("svg",{viewBox:"-1 -1 2 2",preserveAspectRatio:"xMidYMid meet",width:"100%",height:"100%","data-geom":"bar",className:he,children:s.map(a=>{if(n){const{key:c,...i}=a;return r.jsx(ps,{isInitialRender:!o.current,...i},c)}return r.jsx("path",{d:Qe({startAngle:a.startAngle,endAngle:a.endAngle,innerRadius:a.innerRadius,outerRadius:a.outerRadius})??void 0,fill:a.fill,opacity:a.opacity},a.key)})})}),ps=({startAngle:e,endAngle:t,innerRadius:n,outerRadius:o,fill:s,opacity:a,isInitialRender:c})=>{const i=c?e:Tt,d=c?t:Tt,u=A.useSpring(i,I),h=A.useSpring(d,I),m=A.useMotionValue(Qe({startAngle:i,endAngle:d,innerRadius:n,outerRadius:o})??"");return g.useEffect(()=>{u.set(e),h.set(t)},[u,h,e,t]),g.useEffect(()=>{const p=()=>{const y=u.get(),L=h.get();m.set(Qe({startAngle:y,endAngle:L,innerRadius:n,outerRadius:o})??"")},x=u.on("change",p),v=h.on("change",p);return()=>{x(),v()}},[u,h,n,o,m]),r.jsx(A.motion.path,{d:m,fill:s,opacity:a,transition:I})},ms=te.arc(),xs=({primary:e})=>{const{startAngle:t,endAngle:n}=f.getAngleExtent(e.observation),{innerRadius:o,outerRadius:s}=f.getRadiusExtent(e.observation);if(t===null||n===null||o===null||s===null)return null;const a=ms({startAngle:t,endAngle:n,innerRadius:o,outerRadius:s});if(!a)return null;const c=f.getColor(e.observation),i=f.getAlpha(e.observation)??wn;return r.jsx("svg",{viewBox:"-1 -1 2 2",preserveAspectRatio:"xMidYMid meet",width:"100%",height:"100%","data-geom":"arc","data-testid":"hovered-arc",className:he,children:r.jsx("path",{d:a,fill:c,opacity:i})})},vs={geom:"bar",coord:"polar",highlightStrategy:"observation-rerender",guideMode:null,render:({layer:e,isAnimated:t})=>r.jsx(fs,{layer:e,isAnimated:t}),renderHover:({primary:e})=>r.jsx(xs,{primary:e}),renderHoverCompanions:()=>null},kt={bar:{cartesian:wo,polar:vs},line:{cartesian:Po},area:{cartesian:bo},point:{cartesian:No},rule:{cartesian:gs}},ys=(e=[])=>{const t={};for(const n of Object.keys(kt))t[n]={...kt[n]};for(const n of e){const o=t[n.geom]??{};o[n.coord]=n,t[n.geom]=o}return(n,o)=>t[n.geom]?.[o.type]??null},bs=e=>st.createStore(t=>({compiled:e,setCompiled:n=>t(o=>o.compiled===n?o:{compiled:n})}));function Ss(e,t){const n=f.isGraphConfig(e)?e.themeOverrides:void 0;return g.useMemo(()=>({...t,...n}),[t,n])}const An=g.createContext(null),Ls=({data:e,input:t,formattingLocale:n,onChange:o,customPalettes:s,theme:a="light",themeOverrides:c,geoms:i,plugins:d,annotationPlugins:u,id:h,children:m})=>{const[p]=g.useState(()=>f.createCompiler({geoms:i})),[x]=g.useState(()=>Yr(p)),v=g.useMemo(()=>ys(d),[d]),y=g.useMemo(()=>Xr(u),[u]),L=Ss(t,c),j=g.useMemo(()=>({customPalettes:s,theme:a}),[s,a]),[C]=g.useState(()=>{const D=p.compile({input:t,data:e,ctx:j});return x.emit({kind:"init"}),bs(D)}),T=g.useRef({input:t,data:e,ctx:j});g.useEffect(()=>{const D=t!==T.current.input,W=e!==T.current.data,K=j!==T.current.ctx;if(!D&&!W&&!K)return;const Z=C.getState(),J=D||K?p.compile({input:t,data:e,ctx:j}):p.recompile({spec:Z.compiled.spec,data:e});T.current={input:t,data:e,ctx:j},Z.setCompiled(J),x.emit({kind:D?"input":"data"})},[t,e,j,p,C,x]);const P=g.useCallback(D=>{const W=C.getState(),K=D.apply(W.compiled.spec);if(!K)return;const Z=p.recompile({spec:K.spec});if(W.setCompiled(Z),x.emit({kind:"command",command:D}),!o)return;const J=f.convertSpecToInput(K.spec);T.current={input:J,data:T.current.data,ctx:T.current.ctx},o(J)},[o,p,x,C]);Qr({id:h,store:C,dispatch:P});const G=g.useMemo(()=>({store:C,dispatch:P,formattingLocale:n,compileBus:x,theme:a,themeOverrides:L,resolvePlugin:v,resolveAnnotationPlugin:y,id:h}),[C,P,n,x,a,L,v,y,h]);return r.jsx(An.Provider,{value:G,children:m})},oe=()=>{const e=g.useContext(An);if(!e)throw new Error("useGraph* hooks must be used inside a <GraphProvider>");return e},k=e=>{const{store:t}=oe();return ve.useStore(t,n=>e(n.compiled))},lt=()=>{const{dispatch:e}=oe();return e},Se=()=>{const{resolvePlugin:e}=oe();return e},js=()=>{const{resolveAnnotationPlugin:e}=oe();return e};var Cs="drqe3u0",Ts="drqe3u1",ks="drqe3u2",ws="drqe3u3",we="drqe3u4",As="drqe3u5",Es="drqe3u6",_s="drqe3u7",qe="drqe3u8",Ms="drqe3u9",Ps="drqe3ua",Fs="drqe3ub",Ns="drqe3uc",Hs="drqe3ud",Rs="drqe3ue",Bs="drqe3uf",Is="drqe3ug",Os="drqe3uh",Ds="drqe3ui",wt={enabled:"drqe3uk drqe3uj",disabled:"drqe3ul drqe3uj"},At={ran:"drqe3un drqe3um",dim:"drqe3uo drqe3um"},En={ran:"drqe3uq drqe3up",cached:"drqe3ur drqe3up",untouched:"drqe3us drqe3up"};const zs=({width:e=380,style:t,className:n}={})=>{const{compileBus:o}=oe(),[s]=g.useState(()=>Vr()),[a,c]=g.useState(!1),[i,d]=g.useState(f.isCompilerCachingEnabled);g.useEffect(()=>{const{recordCompile:v}=s.getState(),y=o.getLastTrigger(),L=o.getLastCompile();return y&&L&&v(y,L),o.subscribe(v)},[s,o]);const u=ve.useStore(s,v=>v.lastCompile),h=ve.useStore(s,v=>v.history),m=o.getCacheStats(),p=u===null&&h.length===0,x=()=>{d(v=>{const y=!v;return f.setCompilerCachingEnabled(y),y})};return r.jsxs("div",{className:N(Ps,n),style:{width:e,...t},children:[r.jsxs("div",{className:Cs,children:[r.jsxs("div",{children:[r.jsx("div",{className:Ts,children:"compile cache"}),r.jsx("div",{className:Rs,children:p?"production: stats disabled":u?`last: ${u.label} · ${_n(u.durationMs)}`:"awaiting first compile…"})]}),r.jsx("button",{type:"button",onClick:()=>c(v=>!v),className:Bs,children:a?"▾":"▴"})]}),!a&&r.jsxs("div",{className:Fs,children:[r.jsxs("button",{type:"button",onClick:x,className:i?wt.enabled:wt.disabled,"aria-pressed":i,children:["cache ",i?"enabled":"disabled"]}),r.jsx("span",{className:Is,children:"next compile reflects this toggle"})]}),!a&&!p&&r.jsxs(r.Fragment,{children:[r.jsx(Gs,{delta:u?.stages,cumulative:m}),r.jsx(Ws,{entries:h})]})]})},Gs=({delta:e,cumulative:t})=>r.jsxs("table",{className:ks,children:[r.jsx("thead",{children:r.jsxs("tr",{className:Os,children:[r.jsx("th",{className:ws,children:"stage"}),r.jsx("th",{className:we,children:"Δ miss"}),r.jsx("th",{className:we,children:"Δ hit"}),r.jsx("th",{className:we,children:"total miss"}),r.jsx("th",{className:we,children:"total hit"})]})}),r.jsx("tbody",{children:f.COMPILER_STAGE_KEYS.map(n=>{const o=e?.[n],s=$s(o);return r.jsxs("tr",{className:Ns,children:[r.jsxs("td",{className:As,children:[r.jsx("span",{className:En[s],"aria-hidden":!0})," ",n]}),r.jsx("td",{className:s==="ran"?At.ran:At.dim,children:o?.misses??0}),r.jsx("td",{className:qe,children:o?.hits??0}),r.jsx("td",{className:qe,children:t[n].misses}),r.jsx("td",{className:qe,children:t[n].hits})]},n)})})]}),Ws=({entries:e})=>e.length===0?null:r.jsxs("div",{className:Hs,children:[r.jsx("div",{className:Ds,children:"recent compiles"}),e.map(t=>{const n=Xs(t.stages,a=>a.misses>0),o=f.COMPILER_STAGE_KEYS.length,s=n===0?"cached":"ran";return r.jsxs("div",{className:Es,children:[r.jsx("span",{className:En[s],"aria-hidden":!0}),r.jsx("span",{className:_s,title:t.label,children:t.label}),r.jsxs("span",{className:Ms,children:[n,"/",o," ran · ",_n(t.durationMs)]})]},t.id)})]}),$s=e=>!e||e.hits===0&&e.misses===0?"untouched":e.misses>0?"ran":"cached",Xs=(e,t)=>{let n=0;for(const o of f.COMPILER_STAGE_KEYS)t(e[o])&&(n+=1);return n},_n=e=>e>=10?`${e.toFixed(0)}ms`:`${e.toFixed(2)}ms`,qs={small:1.9,medium:2.3,large:2.6},Ys={small:1,medium:1,large:1.2},Vs=O,Mn=B.sm,Us=12,Ks=4,Zs=4,Js=12,Qs=4,ea=2,Pn=24,ta=()=>st.createStore(e=>({hover:f.RESTING_HOVER_STATE,isPointerInside:!1,setHoverState:t=>e(n=>n.hover===t?n:{hover:t}),setPointerInside:t=>e(n=>n.isPointerInside===t?n:{isPointerInside:t})})),na=(e,t)=>{const n=g.useMemo(()=>({layers:e,coordSystem:t}),[e,t]),o=g.useRef(null);o.current===null&&(o.current=new f.HoverEngine(n));const s=o.current,a=g.useRef(!1);return g.useEffect(()=>{if(!a.current){a.current=!0;return}s.update(n)},[s,n]),s},Fn=g.createContext(null),Nn=({children:e})=>{const{layers:t,coordSystem:n}=k(H.useShallow(d=>({layers:d.layers,coordSystem:d.coordSystem}))),o=na(t,n),[s]=g.useState(()=>ta()),a=g.useRef(null),c=g.useRef(null);if(c.current===null){const d=new Map,u={current:null},h=new Set,m=x=>{if(u.current=x,s.getState().setPointerInside(x!==null),x!==null)for(const v of h)v()},p=x=>(h.add(x),()=>{h.delete(x)});c.current={engine:o,store:s,overlayRef:a,hitTesterRegistry:d,cursorRef:u,setCursor:m,subscribeCursorMove:p}}const{hitTesterRegistry:i}=c.current;return g.useEffect(()=>{o.setHitTesters(i)},[o,i]),r.jsx(Fn.Provider,{value:c.current,children:e})},ge=()=>{const e=g.useContext(Fn);if(e===null)throw new Error("useHoverContext must be used inside a <HoverProvider>.");return e};function Le(e){const{store:t}=ge();return ve.useStore(t,e)}var ra="_19519k80",oa="_19519k81",sa="_19519k82",aa="_19519k83",ia="_19519k86",la="_19519k87",ca="_19519k88";const Hn=({content:e})=>r.jsxs(r.Fragment,{children:[e.header!==null&&r.jsx("div",{className:ra,children:e.header}),r.jsx("div",{className:oa,children:e.rows.map(t=>r.jsx(Rn,{row:t,shouldHighlight:t.isPrimary&&e.rows.length>1},t.key))})]}),Rn=({row:e,shouldHighlight:t})=>r.jsxs("div",{className:N(sa,{[aa]:t}),"data-testid":"chart-tooltip-row",children:[e.swatchColor!==null?r.jsx(be,{shape:e.swatchShape,color:e.swatchColor,lineType:e.swatchLineType}):null,r.jsx("span",{className:ia,children:e.label}),r.jsx("span",{className:la,children:e.value})]}),da=e=>{const{cursorRef:t,subscribeCursorMove:n}=ge(),o=Le(a=>a.isPointerInside),s=g.useRef(e);return s.current=e,g.useEffect(()=>n(()=>s.current?.()),[n]),{cursorRef:t,isInside:o}},ua=16,ha=8,ga={x:0,y:0,top:0,left:0,right:0,bottom:0,width:0,height:0,toJSON:()=>({})},fa=()=>{const e=k(H.useShallow(j=>({layers:j.layers,coordSystem:j.coordSystem,scales:j.scales,guides:j.guides,numberFormat:j.config.numberFormat,parsingLocale:j.config.parsingLocale}))),{formattingLocale:t}=oe(),n=Le(j=>j.hover),o=Se(),s=g.useRef(()=>{}),{cursorRef:a,isInside:c}=da(()=>s.current()),i=g.useMemo(()=>f.buildTooltipContent({...e,hover:n,formattingLocale:t}),[e,n,t]),d=i!==null&&c,u=g.useMemo(()=>({getBoundingClientRect:()=>{const j=a.current;return j===null?ga:pa(j)}}),[a]),{refs:h,floatingStyles:m,update:p}=F.useFloating({open:d,placement:"right",middleware:[F.offset(ua),F.flip(),F.shift({padding:ha})],elements:{reference:u}});if(s.current=p,!d)return null;const x=n.primary,v=x===null?null:e.layers.find(j=>j.id===x.layerId)??null,y=v===null?null:o(v,e.coordSystem),L=x!==null&&v!==null&&y?.renderTooltip?y.renderTooltip({content:i,layer:v,coordSystem:e.coordSystem,primary:x,group:n.group,related:n.related}):null;return r.jsx("div",{ref:h.setFloating,role:"tooltip",className:ca,style:m,"data-testid":"chart-tooltip",children:L??r.jsx(Hn,{content:i})})},pa=e=>({x:e.clientX,y:e.clientY,top:e.clientY,left:e.clientX,right:e.clientX,bottom:e.clientY,width:0,height:0,toJSON:()=>({})}),ct=M.sm,Bn=O,In=!1,Ae=6,Q=10,ma=(e,t)=>n=>{if(!n.isVisible||n.ticks.length===0)return 0;const o=n.position==="top"||n.position==="bottom",s=n.ticks.map(i=>e.measureText(i.formattedLabel,{family:Bn,size:V(ct,t)})),a=n.labelMaxWidthPx??Number.POSITIVE_INFINITY;if(o){if(n.labelRotation!==0){const i=s.map(u=>u.width);return Et(i,a)+2*Q}return Math.max(...s.map(i=>i.height))+Q}return Et(s.map(i=>i.width),a)+Q},Et=(e,t)=>Math.min(Math.max(...e),t),xa=e=>()=>V(ct,e),va=(e,t)=>(n,o)=>{const{labelLineHeight:s,labelFontWeight:a}=f.getDifferenceArrowDimensions(o,t);return e.measureText(n,{family:O,size:s,weight:a})},On=e=>{const{value:t,observationLabel:n,comparison:o,swatch:s,label:a}=e;return[{role:"valueRow",gap:Zs,segments:Ye([Ee("value","value",t??"–"),Ee("observation","label",n)])},{role:"trendRow",gap:Qs,ariaLabel:o===null?void 0:La(o),segments:Ye([ba(o),Sa(o),Ee("trendReference","label",o?.reference??null)])},{role:"groupRow",gap:Ks,segments:Ye([ya(s),Ee("label","label",a)])}].filter(i=>i.segments.length>0)},Ee=(e,t,n)=>n===null?null:{kind:"text",textRole:e,fontRole:t,text:n},ya=e=>e===null?null:{kind:"swatch",swatch:e,size:Us},ba=e=>e===null?null:{kind:"trendArrow",direction:e.direction,size:Js},Sa=e=>e===null?null:{kind:"text",textRole:"trendPercentage",fontRole:"label",text:e.percentage,trendDirection:e.direction},La=e=>{switch(e.direction){case"up":return`Increased ${e.percentage} ${e.reference}`;case"down":return`Decreased ${e.percentage} ${e.reference}`;case"flat":return`No change ${e.reference}`}},Ye=e=>e.filter(t=>t!==null),ja=(e,t)=>(n,o)=>{const s=Dn(n,o,e,t),a=zn(s.map(i=>i.width)),c=Math.max(0,s.length-1)*Pn;return{width:a+c,height:Math.max(0,...s.map(i=>i.height))}},Ca=(e,t)=>(n,o)=>Dn(n,o,e,t).map(s=>s.width),Ta=(e,t)=>(n,o)=>{const s=et("value",o,t);return{width:e.measureText(n,s).width,height:s.size*Mn}},ka=(e,t)=>{const n=ja(e,t),o=Ta(e,t);return(s,a)=>s.kind==="perGroup"?n(s,a):o(s.value,a)},Dn=(e,t,n,o)=>{const s={value:et("value",t,o),label:et("label",t,o)},a=c=>wa(c,s,n);return e.items.map(c=>{const i=On(c).map(a),d=Math.max(0,i.length-1)*ea;return{width:Math.max(0,...i.map(u=>u.width)),height:zn(i.map(u=>u.height))+d}})},wa=(e,t,n)=>{let o=0,s=0;for(const a of e.segments)if(a.kind==="text"){const c=t[a.fontRole];o+=n.measureText(a.text,c).width,s=Math.max(s,c.size*Mn)}else o+=a.size,s=Math.max(s,a.size);return{width:o+Math.max(0,e.segments.length-1)*e.gap,height:s}},et=(e,t,n)=>{const o=e==="value"?qs[t]:Ys[t];return{family:Vs,size:V(o,n)}},zn=e=>e.reduce((t,n)=>t+n,0),dt=12,Gn=10,Wn=8,Aa=8,Ea=8,_a=2,$n=1,Xn=2,qn=4,Yn=M.sm,Vn=B.sm,Un=O,Kn=2*(Ea+$n),ut=2*(_a+$n),Ma=Xn*qn,Zn=e=>{const t=V(Yn,e);return{fontSizePx:t,lineBoxHeight:t*Vn}},Jn=e=>e?Gn:0,Pa=(e,t)=>n=>{if(n.items.length===0)return 0;const{fontSizePx:o,lineBoxHeight:s}=Zn(t),a={family:Un,size:o};if(n.position==="top"||n.position==="bottom")return Math.max(s,dt)+ut;const i=n.items.map(d=>{const u=e.measureText(d.formattedLabel,a).width,h=Jn(d.visual.color);return h+(h>0?Wn:0)+u});return Math.max(...i)+Kn},Fa=(e,t)=>n=>e.measureText(n,{family:Bn,size:V(ct,t)}),Na=(e,t)=>g.useMemo(()=>e?{measureAxis:ma(e,t),measureAxisLabel:xa(t),measureLegend:Pa(e,t),measureHeadline:ka(e,t),measureHeadlineItemWidths:Ca(e,t),measureTickLabel:Fa(e,t),measureDifferenceArrowLabel:va(e,t)}:null,[e,t]),Ha=({measurer:e,axes:t,numberFormat:n,parsingLocale:o,formattedLegends:s,containerSize:a,externalMeasurements:c,headline:i,formattingLocale:d,annotations:u,coordSystem:h,textScale:m})=>g.useMemo(()=>e?new f.LayoutCompiler(e).compile({axes:t,numberFormat:n,parsingLocale:o,formattedLegends:s,containerSize:a,externalMeasurements:c,headline:i,formattingLocale:d,annotations:u,coordSystem:h,textScale:m}):null,[t,n,o,s,a,c,i,d,u,h,m,e]),_t="data-variant",Qn=Gr.Paragraph.extend({addAttributes(){return{variant:{default:null,parseHTML:e=>e.getAttribute(_t)??null,renderHTML:e=>e.variant?{[_t]:e.variant}:{}}}}}),Ra=zr.Extension.create({name:"preventBackspaceAcrossTitleBoundary",addOptions(){return{isTitleVisible:!0}},addKeyboardShortcuts(){return{Backspace:({editor:e})=>{if(!this.options.isTitleVisible)return!1;const{selection:t}=e.state;if(!t.empty)return!1;const{$from:n}=t;return n.depth!==1||n.parentOffset!==0?!1:n.index(0)===1}}}}),Ba=({titlePlaceholder:e,subtitlePlaceholder:t,isTitleVisible:n,isSubtitleVisible:o})=>[Oa({isTitleVisible:n,isSubtitleVisible:o}),Qn,nn.Text,Me.UndoRedo,Qt.Heading.configure({levels:[1,2,3]}),Zt.Bold,en.Italic,on.Underline,rn.TextAlign.configure({types:["heading","paragraph"]}),tn.Link.configure({openOnClick:!1,autolink:!0}),ce.TextStyle,ce.Color,ce.FontFamily,Jt.HardBreak,Ra.configure({isTitleVisible:n}),Me.Placeholder.configure({showOnlyCurrent:!1,placeholder:({pos:s,editor:a})=>{if(n&&s===0)return e;const c=n?a.state.doc.firstChild?.nodeSize??-1:0;return o&&s===c?t:""}})],Ia=({placeholder:e})=>[Je.Document,Qn,nn.Text,Me.UndoRedo,Qt.Heading.configure({levels:[1,2,3]}),Zt.Bold,en.Italic,on.Underline,rn.TextAlign.configure({types:["heading","paragraph"]}),tn.Link.configure({openOnClick:!1,autolink:!0}),ce.TextStyle,ce.Color,ce.FontFamily,Jt.HardBreak,Me.Placeholder.configure({showOnlyCurrent:!1,placeholder:({pos:t})=>t===0?e:""})],Oa=({isTitleVisible:e,isSubtitleVisible:t})=>e&&t?Je.Document.extend({content:"block{2,}"}):Je.Document,w=(e,t)=>`color-mix(in srgb, transparent, ${e} ${t*100}%)`,ze=(e,t)=>`hsl(from ${e} h s calc(l * ${1-t}))`,er=(e,t)=>`hsl(from ${e} h s calc(l * ${1+t}))`,tt=(e,t,n)=>`color-mix(in srgb, ${e}, ${t} ${n*100}%)`,Da=e=>/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(e),za=e=>e.length===0?!1:typeof CSS<"u"&&typeof CSS.supports=="function"?CSS.supports("color",e):/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(e),tr={elevationXs:"0 0 2px rgba(15, 15, 24, 0.12), 0 2px 2px rgba(14, 14, 52, 0.08)",elevationSm:"0 0 4px rgba(15, 15, 24, 0.12), 0 4px 4px rgba(14, 14, 52, 0.08)",elevationMd:"0 0 8px rgba(15, 15, 24, 0.12), 0 8px 8px rgba(14, 14, 52, 0.08)",elevationLg:"0 0 16px rgba(15, 15, 24, 0.12), 0 16px 16px rgba(14, 14, 52, 0.08)"},nr={radiiXs:"4px",radiiSm:"6px",radiiMd:"8px",radiiLg:"12px"},rr={zIndexToolbar:"10",zIndexToolbarTooltip:"20",zIndexToolbarPopover:"30"},Ga=8,ie=e=>`${Ga*e}px`,or={spaceXxs:ie(.25),spaceXs:ie(.5),spaceSm:ie(.75),spaceMd:ie(1),spaceLg:ie(1.5),spaceXl:ie(2)},Wa={transparent:"transparent",white:"#FFFFFF",black:"#000000",grey100:"#000000",grey95:"#0D0D0D",grey90:"#1A1A1A",grey85:"#1F1F1F",grey80:"#2A2A2A",grey75:"#2e2e2e",grey70:"#353535",grey60:"#494949",grey50:"#6F6F6F",grey0:"#FFFFFF",red60:"#CB3333",red50:"#F93939",amber70:"#F48135",amber50:"#FEAE47",amber40:"#FFC849",amber30:"#ffd061",green60:"#0AC600",green50:"#42CD69",blue80:"#2E62FF",blue60:"#3D70FF",purple50:"#7B56EA",purple30:"#E093FE",greyGradient80:"linear-gradient(to top, #222429, #31353f)"},$a={textPrimary:l.grey0,textSecondary:w(l.textPrimary,.8),textDisabled:w(l.textPrimary,.5),iconPrimary:"currentColor",iconSecondary:w(l.textPrimary,.6),iconStickerBackground:l.grey70,border100:l.grey0,border50:w(l.grey0,.5),border10:w(l.grey0,.1),brand:l.purple50,success:l.green50,warning:l.amber50,alert:l.red50,sunkenBackground:l.grey100,defaultBackground:l.grey90,raisedBackground:l.grey80,overlayBackground:l.grey90,overlayBorderGradient:l.greyGradient80},Xa={graphBackground:l.grey90,gridLineColor:l.border10,originLineColor:l.grey0,targetLineColor:l.border100,targetLineMarkerColor:l.border100,targetLineLabelTextColor:l.grey100,legendBackground:l.defaultBackground,legendBorderColor:l.border10,legendFocusOutlineColor:l.border50,legendTextColor:l.textPrimary,dimmedSeriesLabelTextColor:l.textDisabled,dimmedSeriesLabelLineColor:l.grey60,trendNegativeColor:l.red60,trendPositiveColor:l.green60,trendNeutralColor:l.textSecondary,toolbarBackgroundColor:l.overlayBackground,toolbarButtonBackgroundColor:"transparent",toolbarButtonBackgroundColorHovered:l.grey80,toolbarButtonBackgroundColorSelected:l.grey60,toolbarSeparatorColor:l.grey60,tooltipBackground:l.grey70,tooltipBorderColor:l.grey60,tooltipHeadingTextColor:l.textPrimary,tooltipLabelTextColor:l.textSecondary,tooltipValueTextColor:l.textPrimary,tooltipPrimaryRowColor:l.grey60,hoverGuideLineColor:w(l.white,.08),hoverGuideFillColor:w(l.white,.06),hoveredBarBorderColor:l.white,hoveredPointRingColor:l.white,pointStrokeColor:l.white,stackedBarHoverBorderColor:l.grey0,heatmapEmptyTileBackground:l.grey80,dataLabelOutsideBackground:w(l.textPrimary,.1),defaultAnnotationArrowStroke:l.white,defaultAnnotationShapeStroke:l.white,defaultAnnotationShapeFill:l.canvasBlue,arrowAnnotationStickerOutlineColor:"#FFFFFF",arrowAnnotationStickerOutlineColorInverse:"#1D2129",annotationFrameBorderColor:l.blue60,annotationMenuTriggerIconColor:l.white},qa={canvasDefault:"#FFFFFF",canvasBlue:"#60a5fa",canvasCyan:"#22d3ee",canvasGreen:"#34d399",canvasYellow:"#FFC800",canvasOrange:"#fb923c",canvasRed:"#f87171",canvasPink:"#F979D9",canvasPurple:"#a78bfa",canvasGray:"#a8a29e",canvasInverse:"#000000"},Ya={...Wa,...$a,...tr,...nr,...or,...rr,...Xa,...qa,...jn,...Cn,...Tn},Va={transparent:"transparent",white:"#FFFFFF",black:"#000000",grey100:"#FFFFFF",grey95:"#FCFCFC",grey90:"#FAFAFA",grey85:"#F5F5F5",grey80:"#F0F0F0",grey75:"#E8E8E8",grey70:"#E5E5E5",grey60:"#CCCCCC",grey50:"#C4C4C4",grey0:"#1D2129",red60:"#E14B49",red50:"#F93939",amber70:"#FFBA8C",amber50:"#FFC849",amber40:"#FEAE47",amber30:"#E7A816",green60:"#06B299",green50:"#42CD69",blue80:"#2E62FF",blue60:"#3D70FF",purple50:"#7B56EA",purple30:"#E093FE",greyGradient80:"linear-gradient(to top, #F0F0F1, #F9F9FF)"},Ua={textPrimary:l.black,textSecondary:w(l.textPrimary,.6),textDisabled:w(l.textPrimary,.5),iconPrimary:"currentColor",iconSecondary:w(l.textPrimary,.6),iconStickerBackground:l.grey100,brand:l.purple50,success:l.green50,warning:l.amber50,alert:l.red50,border100:l.grey0,border50:w(l.grey0,.5),border10:w(l.grey0,.1),sunkenBackground:l.grey90,defaultBackground:l.grey100,raisedBackground:l.grey85,overlayBackground:l.grey100,overlayBorderGradient:l.border10},Ka={graphBackground:l.grey100,gridLineColor:l.border10,originLineColor:l.grey0,targetLineColor:l.border100,targetLineMarkerColor:"#A0A6C5",targetLineLabelTextColor:l.grey100,legendBackground:l.defaultBackground,legendBorderColor:l.border10,legendFocusOutlineColor:l.border50,legendTextColor:l.textPrimary,dimmedSeriesLabelTextColor:l.textDisabled,dimmedSeriesLabelLineColor:l.grey60,trendNegativeColor:l.red60,trendPositiveColor:l.green60,trendNeutralColor:l.textSecondary,toolbarBackgroundColor:l.overlayBackground,toolbarButtonBackgroundColor:"transparent",toolbarButtonBackgroundColorHovered:l.grey80,toolbarButtonBackgroundColorSelected:l.grey60,toolbarSeparatorColor:l.grey60,tooltipBackground:l.white,tooltipBorderColor:l.border10,tooltipHeadingTextColor:l.textPrimary,tooltipLabelTextColor:l.textSecondary,tooltipValueTextColor:l.textPrimary,tooltipPrimaryRowColor:l.grey80,hoverGuideLineColor:w(l.black,.08),hoverGuideFillColor:w(l.black,.04),hoveredBarBorderColor:l.white,hoveredPointRingColor:l.white,pointStrokeColor:l.white,stackedBarHoverBorderColor:l.grey0,heatmapEmptyTileBackground:l.grey80,dataLabelOutsideBackground:w(l.textPrimary,.1),defaultAnnotationArrowStroke:l.black,defaultAnnotationShapeStroke:l.black,defaultAnnotationShapeFill:l.canvasBlue,arrowAnnotationStickerOutlineColor:"#1D2129",arrowAnnotationStickerOutlineColorInverse:"#FFFFFF",annotationFrameBorderColor:l.blue60,annotationMenuTriggerIconColor:"#3d414c"},Za={canvasDefault:"#000000",canvasBlue:"#3b82f6",canvasCyan:"#06b6d4",canvasGreen:"#10b981",canvasYellow:"#E5B400",canvasOrange:"#f97316",canvasRed:"#ef4444",canvasPink:"#E845BF",canvasPurple:"#8b5cf6",canvasGray:"#78716c",canvasInverse:"#ffffff"},Ja={...Va,...Ua,...tr,...nr,...or,...rr,...Ka,...Za,...jn,...Cn,...Tn},Ne=.1,Qa={light:.05,dark:.1},ei=(e,t)=>{switch(e.type){case"none":return null;case"solid":return e.color;case"tinted":return ri(e.color,t);case"gradient":return oi(e.color,t);case"preset":return f.BORDER_PRESET_GRADIENTS[e.preset]}},ti=e=>e.type==="none"?0:e.width,ni=(e,t,n)=>{if(e.type==="solid")return e.color;if(e.type==="tinted")return tt(n,e.color,Qa[t])},ri=(e,t)=>t==="dark"?ze(e,Ne):er(e,Ne),oi=(e,t,n=90)=>{const o=e,s=t==="dark"?ze(e,Ne):er(e,Ne);return`linear-gradient(${n}deg, ${o} 0%, ${s} 100%)`};var si="bow4tg0",ai="bow4tg1",ii="bow4tg2",li="bow4tg3",sr="_1ii3bsb0",ar="_1ii3bsb1";const ht=g.createContext(null),gt=()=>{const e=g.useContext(ht);if(!e)throw new Error("useThemeContext must be used inside a <ThemeProvider>.");return e},ir=({theme:e,themeOverrides:t={},appearance:n,children:o})=>{const s=g.useMemo(()=>({...e==="dark"?Ya:Ja,...t}),[e,t]),a=g.useMemo(()=>{const i={[l.textScale]:String(n.textScale)};for(const[u,h]of Object.entries(t))i[l[u]]=h;const d=ni(n.background,e,s.graphBackground);return d!==void 0&&(i[l.graphBackground]=d),Wr.assignInlineVars(i)},[n.textScale,n.background,e,s.graphBackground,t]),c=g.useMemo(()=>({theme:e,themeClass:e==="dark"?ar:sr,inlineVarsStyle:a,themeValues:s}),[e,a,s]);return r.jsx(ht.Provider,{value:c,children:o})},se=({children:e,className:t,style:n})=>{const o=g.useContext(ht),s=o?N(o.themeClass,ai):void 0,a=o?{...o.inlineVarsStyle,...n}:n;return r.jsx("div",{className:N(s,t),style:a,children:e})},ci="graphy_root",ae=()=>typeof document>"u"?null:document.getElementById(ci)??document.body;var di="yp3g0k0",ui="yp3g0k1",lr="yp3g0k3",hi="yp3g0k4",cr="yp3g0k5",nt="yp3g0k6",gi="yp3g0k7",fi="yp3g0k8",dr="yp3g0k9",pi="yp3g0ka",mi="yp3g0kb",xi="yp3g0kc",vi="yp3g0kd",yi="yp3g0ke";const bi=an.map(e=>l[e]),Si=Object.fromEntries(an.map(e=>[l[e],e])),Li=({editor:e,currentColor:t,isOpen:n,onOpenChange:o})=>{const s=Ci(),a=g.useCallback(i=>{e.chain().setColor(i).run()},[e]),c=i=>{e.chain().focus().setColor(i).run(),o(!1)};return r.jsxs(_.Popover.Root,{open:n,onOpenChange:o,children:[r.jsx(_.Popover.Trigger,{render:r.jsx(E.Toolbar.Button,{}),"aria-label":"Text color",className:di,onMouseDown:i=>i.preventDefault(),children:r.jsx("span",{className:ui,style:{background:t??"transparent"}})}),r.jsx(_.Popover.Portal,{container:ae(),children:r.jsx(se,{children:r.jsx(_.Popover.Positioner,{sideOffset:6,align:"start",className:lr,children:r.jsxs(_.Popover.Popup,{className:hi,onMouseDown:i=>i.preventDefault(),children:[r.jsx(Mt,{title:"Colors",colors:bi,currentColor:t,onPick:c}),s.length>0&&r.jsx(Mt,{title:"Chart colors",colors:s,currentColor:t,onPick:c}),r.jsx(ji,{value:t??"#000000",onChange:a})]})})})})]})},Mt=({title:e,colors:t,currentColor:n,onPick:o})=>r.jsxs("div",{className:cr,children:[r.jsx("div",{className:nt,children:e}),r.jsx("div",{className:gi,children:t.map(s=>r.jsx("button",{type:"button","aria-label":s,className:fi,"data-active":ki(s,n),onMouseDown:a=>a.preventDefault(),onClick:()=>o(s),children:r.jsx("span",{className:dr,style:ur(s)})},s))})]}),ji=({value:e,onChange:t})=>{const[n,o]=g.useState(!1),s=za(e)?e:"#000000",a=Ti(s);return r.jsxs(_.Popover.Root,{open:n,onOpenChange:o,children:[r.jsxs("div",{className:cr,children:[r.jsx("div",{className:nt,children:"Custom"}),r.jsxs(_.Popover.Trigger,{className:pi,onMouseDown:c=>c.preventDefault(),"aria-label":"Pick custom color",children:[r.jsx("span",{className:dr,style:ur(s)}),r.jsx("span",{className:mi,children:a})]})]}),r.jsx(_.Popover.Portal,{container:ae(),children:r.jsx(se,{children:r.jsx(_.Popover.Positioner,{side:"right",align:"start",sideOffset:18,className:lr,children:r.jsxs(_.Popover.Popup,{className:xi,onMouseDown:c=>c.preventDefault(),children:[r.jsx("div",{className:nt,children:"Pick color"}),r.jsx(pt.HexColorPicker,{color:a,onChange:t,className:vi}),r.jsx(pt.HexColorInput,{color:a,onChange:t,prefixed:!0,className:yi,onMouseDown:c=>c.stopPropagation()})]})})})})]})},Ci=()=>{const e=k(t=>t.scales.color);return g.useMemo(()=>{if(!e||e.kind!=="visual")return[];const t=new Set;for(const n of e.domain){const o=e.map(n);typeof o=="string"&&t.add(o)}return[...t]},[e])},ur=e=>({background:e,border:`1px solid ${ze(e,.1)}`}),Ti=e=>{const{themeValues:t}=gt();if(Da(e))return e.toUpperCase();const n=Si[e];return n?t[n].toUpperCase():"#000000"},ki=(e,t)=>t===null?!1:e.toLowerCase()===t.toLowerCase(),wi={xxs:8,xs:12,sm:16,md:20,lg:24,xl:36};var Ai={primary:"asohov1 asohov0",secondary:"asohov2 asohov0"};const U=({children:e,title:t,variant:n="primary",size:o="sm",...s})=>{const a=g.useId(),c=wi[o];return r.jsxs("svg",{className:Ai[n],"aria-labelledby":t?a:void 0,height:c,width:c,fill:"none",viewBox:"0 0 24 24",role:"img",...s,children:[t&&r.jsx("title",{id:a,children:t}),e]})},hr=e=>r.jsx(U,{...e,children:r.jsx("g",{stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:r.jsx("path",{d:"m6 9 6 6 6-6"})})}),Ei="'Noto Serif', Georgia, 'Times New Roman', serif, 'Apple Color Emoji', 'NotoColorEmoji'",gr=`'Aeonik', 'Aeonik Fallback', ${O}`,_i="'PT Mono', 'Courier New', monospace, 'Apple Color Emoji', 'NotoColorEmoji'",Mi="'Intruding Cat', cursive, 'Apple Color Emoji', 'NotoColorEmoji'",Pi=`var(--brand-font-family), ${gr}`,rt=[{id:"modern",label:"Modern",preview:"Aa",fontFamily:O},{id:"fresh",label:"Fresh",preview:"Aa",fontFamily:gr},{id:"timeless",label:"Timeless",preview:"Aa",fontFamily:Ei},{id:"technical",label:"Technical",preview:"00",fontFamily:_i},{id:"fineliner",label:"Fineliner",preview:"Aa",fontFamily:Mi},{id:"brand",label:"Brand",preview:"Aa",fontFamily:Pi}],Fi=e=>e?rt.find(t=>t.fontFamily===e)??null:null;var fr="_1qkyw7q0",pr="_1qkyw7q1",mr="_1qkyw7q3",xr="_1qkyw7q4",vr="_1qkyw7q5";const Ni=({editor:e,currentFontFamily:t,isOpen:n,onOpenChange:o})=>{const s=Fi(t)??rt[0],a=c=>{e.chain().focus().setFontFamily(c.fontFamily).run()};return r.jsxs(R.Menu.Root,{open:n,onOpenChange:o,children:[r.jsxs(R.Menu.Trigger,{render:r.jsx(E.Toolbar.Button,{}),"aria-label":"Font family",className:fr,onMouseDown:c=>c.preventDefault(),children:[r.jsx("span",{className:pr,style:{fontFamily:s?.fontFamily},children:s?.preview}),r.jsx(hr,{size:"sm"})]}),r.jsx(R.Menu.Portal,{container:ae(),children:r.jsx(se,{children:r.jsx(R.Menu.Positioner,{side:"bottom",align:"start",sideOffset:6,className:mr,children:r.jsx(R.Menu.Popup,{className:xr,onMouseDown:c=>c.preventDefault(),children:rt.map(c=>r.jsx(R.Menu.Item,{className:vr,"data-selected":c.id===s?.id,onClick:()=>a(c),children:r.jsx("span",{style:{fontFamily:c.fontFamily},children:c.label})},c.id))})})})})]})},yr={id:"text",label:"Text",previewFont:l.fontTextEditorBody},Pt=[{id:"caption",label:"Caption",previewFont:l.fontTextEditorH6},yr,{id:"h3",label:"Heading 3",previewFont:l.fontTextEditorH3},{id:"h2",label:"Heading 2",previewFont:l.fontTextEditorH2},{id:"h1",label:"Heading 1",previewFont:l.fontTextEditorH1}],Hi=({editor:e,activeStyle:t,isOpen:n,onOpenChange:o})=>{const s=Pt.find(a=>a.id===t)??yr;return r.jsxs(R.Menu.Root,{open:n,onOpenChange:o,children:[r.jsxs(R.Menu.Trigger,{render:r.jsx(E.Toolbar.Button,{}),"aria-label":"Text style",className:fr,onMouseDown:a=>a.preventDefault(),children:[r.jsx("span",{className:pr,children:s.label}),r.jsx(hr,{size:"sm"})]}),r.jsx(R.Menu.Portal,{container:ae(),children:r.jsx(se,{children:r.jsx(R.Menu.Positioner,{side:"bottom",align:"start",sideOffset:6,className:mr,children:r.jsx(R.Menu.Popup,{className:xr,onMouseDown:a=>a.preventDefault(),children:Pt.map(a=>r.jsx(R.Menu.Item,{className:vr,"data-selected":a.id===s.id,onClick:()=>Ri(e,a.id),children:r.jsx(Bi,{font:a.previewFont,children:a.label})},a.id))})})})})]})},Ri=(e,t)=>{switch(t){case"caption":{e.chain().focus().setNode("paragraph",{variant:"caption"}).run();return}case"text":{e.chain().focus().setNode("paragraph",{variant:null}).run();return}case"h1":e.chain().focus().setHeading({level:1}).run();return;case"h2":e.chain().focus().setHeading({level:2}).run();return;case"h3":e.chain().focus().setHeading({level:3}).run()}},Bi=({font:e,children:t})=>r.jsx("span",{style:{font:e,margin:0},children:t}),Ii=e=>r.jsx(U,{...e,children:r.jsx("g",{stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:r.jsx("path",{d:"M20 6 9 17l-5-5"})})}),Oi=e=>r.jsx(U,{...e,children:r.jsxs("g",{stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"}),r.jsx("path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"})]})}),Di=e=>r.jsx(U,{...e,children:r.jsxs("g",{stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("path",{d:"M18 6 6 18"}),r.jsx("path",{d:"m6 6 12 12"})]})}),zi=e=>!e.content||e.content.length===0?!0:e.content.every(t=>!t.content||t.content.length===0),Gi=e=>{const{$from:t}=e.state.selection,n=t.parent.textContent,o=t.parentOffset,s=t.start();let a=o;for(;a>0&&Ft(n[a-1]);)a-=1;let c=o;for(;c<n.length&&Ft(n[c]);)c+=1;return{from:s+a,to:s+c}},Ft=e=>e!==void 0&&/\S/.test(e);var Wi="b5kquu0",$i="b5kquu1",Xi="b5kquu2",qi="b5kquu3",Nt="b5kquu4";const Yi=({editor:e,currentUrl:t,isActive:n,isOpen:o,onOpenChange:s})=>{const[a,c]=g.useState(""),i=g.useRef(null);g.useEffect(()=>{o&&c(t??"")},[o,t]);const d=()=>{Vi(e,a),s(!1)},u=()=>{c(""),s(!1)},h=p=>{c(p.target.value)},m=p=>{p.key==="Enter"&&(p.preventDefault(),d())};return r.jsxs(_.Popover.Root,{open:o,onOpenChange:s,children:[r.jsx(_.Popover.Trigger,{render:r.jsx(E.Toolbar.Button,{}),"aria-label":"Link","data-active":n,className:Wi,onMouseDown:p=>p.preventDefault(),children:r.jsx(Oi,{})}),r.jsx(_.Popover.Portal,{container:ae(),children:r.jsx(se,{children:r.jsx(_.Popover.Positioner,{sideOffset:6,align:"end",className:$i,children:r.jsxs(_.Popover.Popup,{className:Xi,initialFocus:i,onMouseDown:p=>p.preventDefault(),children:[r.jsx("input",{ref:i,type:"url",value:a,placeholder:"Type or paste a link...","aria-label":"Link URL",className:qi,onMouseDown:p=>p.stopPropagation(),onChange:h,onKeyDown:m}),r.jsx("button",{type:"button","aria-label":"Cancel",className:Nt,onClick:u,children:r.jsx(Di,{})}),r.jsx("button",{type:"button","aria-label":"Apply link",className:Nt,onClick:d,children:r.jsx(Ii,{})})]})})})})]})},Vi=(e,t)=>{const n=t.trim(),{selection:o}=e.state;if(!n){e.chain().focus().extendMarkRange("link").unsetLink().run();return}if(!o.empty){e.chain().focus().setLink({href:n}).run();return}if(e.isActive("link")){e.chain().focus().extendMarkRange("link").setLink({href:n}).run();return}const s=Gi(e);e.chain().focus().setTextSelection(s).setLink({href:n}).run()},Ui=e=>r.jsx(U,{...e,children:r.jsxs("g",{stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("path",{d:"M21 5H3"}),r.jsx("path",{d:"M17 12H7"}),r.jsx("path",{d:"M19 19H5"})]})}),Ki=e=>r.jsx(U,{...e,children:r.jsxs("g",{stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("path",{d:"M21 5H3"}),r.jsx("path",{d:"M21 12H9"}),r.jsx("path",{d:"M21 19H7"})]})}),Zi=e=>r.jsx(U,{...e,children:r.jsxs("g",{stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("path",{d:"M21 5H3"}),r.jsx("path",{d:"M15 12H3"}),r.jsx("path",{d:"M17 19H3"})]})});var Ji="k91gos0",Qi="k91gos1";const el=6,de=({label:e,isActive:t,onToggle:n,children:o})=>{const s=a=>a.preventDefault();return r.jsxs(le.Tooltip.Root,{children:[r.jsx(le.Tooltip.Trigger,{render:r.jsx($r.Toggle,{render:r.jsx(E.Toolbar.Button,{}),pressed:t,onPressedChange:()=>n()}),"aria-label":e,className:Ji,onMouseDown:s,children:o}),r.jsx(le.Tooltip.Portal,{container:ae(),children:r.jsx(se,{children:r.jsx(le.Tooltip.Positioner,{sideOffset:el,children:r.jsx(le.Tooltip.Popup,{className:Qi,children:e})})})})]})},tl=({editor:e,activeAlignment:t="left"})=>r.jsxs(r.Fragment,{children:[r.jsx(de,{label:"Align left",isActive:t==="left",onToggle:()=>e.chain().focus().setTextAlign("left").run(),children:r.jsx(Zi,{})}),r.jsx(de,{label:"Align center",isActive:t==="center",onToggle:()=>e.chain().focus().setTextAlign("center").run(),children:r.jsx(Ui,{})}),r.jsx(de,{label:"Align right",isActive:t==="right",onToggle:()=>e.chain().focus().setTextAlign("right").run(),children:r.jsx(Ki,{})})]});var nl="_1bp10ig0",me="_1bp10ig1",_e="_1bp10ig2";const rl=({editor:e})=>({isBold:e?.isActive("bold")??!1,isItalic:e?.isActive("italic")??!1,isUnderline:e?.isActive("underline")??!1,isLink:e?.isActive("link")??!1,linkUrl:e?.getAttributes("link").href??null,color:e?.getAttributes("textStyle").color??null,fontFamily:e?.getAttributes("textStyle").fontFamily??null,fontSize:ol(e),textAlign:sl(e)}),ol=e=>e?e.isActive("heading",{level:1})?"h1":e.isActive("heading",{level:2})?"h2":e.isActive("heading",{level:3})?"h3":e.isActive("paragraph",{variant:"caption"})?"caption":"text":"text",sl=e=>e?e.isActive({textAlign:"center"})?"center":e.isActive({textAlign:"right"})?"right":"left":"left",al=8,il=8,ll=({editor:e})=>{const[t,n]=g.useState(!1),[o,s]=g.useState(null),a=o!==null,c=x=>v=>{s(v?x:null)},{refs:i,floatingStyles:d}=F.useFloating({placement:"top-start",strategy:"fixed",middleware:[F.offset(al),F.flip(),F.shift({padding:il})],whileElementsMounted:F.autoUpdate}),u=g.useRef(null),h=at.useEditorState({editor:e,selector:rl}),m=g.useCallback(x=>{u.current=x,i.setFloating(x)},[i]);if(g.useEffect(()=>{e&&i.setReference(e.view.dom)},[e,i]),g.useEffect(()=>{if(!e)return;const x=()=>n(!0),v=({event:y})=>{const{relatedTarget:L,currentTarget:j}=y,C=L instanceof Node&&u.current?.contains(L),T=L instanceof Node&&j instanceof Node&&j.contains(L);!C&&!T&&n(!1)};return e.on("focus",x),e.on("blur",v),()=>{e.off("focus",x),e.off("blur",v)}},[e]),!e||!t&&!a)return null;const p=ae();return p?sn.createPortal(r.jsx(se,{children:r.jsx(le.Tooltip.Provider,{children:r.jsxs(E.Toolbar.Root,{ref:m,className:nl,style:d,children:[r.jsxs(E.Toolbar.Group,{className:me,children:[r.jsx(Li,{editor:e,currentColor:h?.color??null,isOpen:o==="color",onOpenChange:c("color")}),r.jsx(Ni,{editor:e,currentFontFamily:h?.fontFamily??null,isOpen:o==="fontFamily",onOpenChange:c("fontFamily")})]}),r.jsx(E.Toolbar.Separator,{className:_e}),r.jsx(E.Toolbar.Group,{className:me,children:r.jsx(Hi,{editor:e,activeStyle:h?.fontSize??"text",isOpen:o==="fontSize",onOpenChange:c("fontSize")})}),r.jsx(E.Toolbar.Separator,{className:_e}),r.jsxs(E.Toolbar.Group,{className:me,children:[r.jsx(de,{label:"Bold",isActive:h?.isBold??!1,onToggle:()=>e.chain().focus().toggleBold().run(),children:r.jsx("strong",{children:"B"})}),r.jsx(de,{label:"Italic",isActive:h?.isItalic??!1,onToggle:()=>e.chain().focus().toggleItalic().run(),children:r.jsx("em",{children:"I"})}),r.jsx(de,{label:"Underline",isActive:h?.isUnderline??!1,onToggle:()=>e.chain().focus().toggleUnderline().run(),children:r.jsx("u",{children:"U"})})]}),r.jsx(E.Toolbar.Separator,{className:_e}),r.jsx(E.Toolbar.Group,{className:me,children:r.jsx(tl,{editor:e,activeAlignment:h?.textAlign})}),r.jsx(E.Toolbar.Separator,{className:_e}),r.jsx(E.Toolbar.Group,{className:me,children:r.jsx(Yi,{editor:e,currentUrl:h?.linkUrl??null,isActive:h?.isLink??!1,isOpen:o==="link",onOpenChange:c("link")})})]})})}),p):null};var cl="_2ngohc0";const br=({editor:e,ariaLabel:t})=>r.jsxs("div",{className:cl,children:[r.jsx(ll,{editor:e}),r.jsx(at.EditorContent,{editor:e,"aria-label":t})]}),dl=(e,t)=>{const n=g.useRef(e);n.current=e;const o=g.useRef(t);o.current=t;const s=g.useRef(null),a=g.useRef(null),c=g.useMemo(()=>{const i=()=>{a.current!==null&&(clearTimeout(a.current),a.current=null),s.current=null},d=()=>{a.current!==null&&(clearTimeout(a.current),a.current=null);const h=s.current;h!==null&&(s.current=null,n.current(...h))};return{run:(...h)=>{if(o.current<=0){n.current(...h);return}s.current=h,a.current!==null&&clearTimeout(a.current),a.current=setTimeout(d,o.current)},flush:d,cancel:i}},[]);return g.useEffect(()=>()=>{a.current!==null&&clearTimeout(a.current)},[]),c},ul=200,Sr=({content:e,extensions:t,isEditable:n,onUpdate:o,updateDebounceMs:s=ul})=>{const a=g.useRef(Ht(e)),c=g.useRef(!1),i=dl(u=>{c.current=!0,o?.(u)},s),d=at.useEditor({extensions:t,content:a.current,editable:n,immediatelyRender:!1,onUpdate:({editor:u})=>i.run(u.getJSON())});return g.useEffect(()=>{d?.setEditable(n)},[d,n]),g.useEffect(()=>{if(!d)return;if(c.current){c.current=!1;return}const u=Ht(e),h=d.getJSON();hl(h,u)||(i.cancel(),d.commands.setContent(u,{emitUpdate:!1}))},[d,e,i]),g.useEffect(()=>()=>i.flush(),[i]),d},Ht=e=>e===null?{type:"doc",content:[]}:typeof e=="string"?{type:"doc",content:[{type:"paragraph",content:e?[{type:"text",text:e}]:[]}]}:e,hl=(e,t)=>JSON.stringify(e)===JSON.stringify(t),gl=/^(?:https?:|mailto:)/i,Lr=e=>{if(typeof e!="string")return!1;const t=e.replace(/^[\x00-\x20]+/,"");return t.length===0?!1:gl.test(t)};var fl="_1cocly40";const pl={modern:"'Inter', -apple-system, BlinkMacSystemFont, 'Open Sans', 'Segoe UI', 'Roboto', 'Oxygen-Sans', 'Ubuntu', 'Cantarell', 'Helvetica Neue', sans-serif",timeless:"'Noto Serif', Georgia, 'Times New Roman', serif",fresh:"'Aeonik', 'Aeonik Fallback', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif",technical:"'PT Mono', 'Courier New', monospace",handwritten:"'Permanent Marker', cursive",fineliner:"'Intruding Cat', cursive",brand:"var(--brand-font-family), 'Aeonik', 'Inter', sans-serif"},He=({content:e})=>r.jsx(r.Fragment,{children:jr(e.content??[e])}),jr=e=>e.map((t,n)=>ml(t,n)),ml=(e,t)=>{if(e.type==="text")return xl(e,t);if(e.type==="hardBreak"||e.type==="hard_break")return r.jsx("br",{},t);const n=e.content?jr(e.content):null;switch(e.type){case"doc":return r.jsx(g.Fragment,{children:n},t);case"heading":{const o=Sl(e.attrs?.level);return Ll(o,t,n,Bt(e.attrs))}case"paragraph":{const o=ue(e.attrs?.variant);return r.jsx("p",{"data-variant":o??void 0,style:Cr(Bt(e.attrs)),children:n},t)}case"blockquote":return r.jsx("blockquote",{children:n},t);case"bulletList":case"bullet_list":return r.jsx("ul",{children:n},t);case"orderedList":case"ordered_list":return r.jsx("ol",{children:n},t);case"listItem":case"list_item":return r.jsx("li",{children:n},t);default:return r.jsx("span",{children:n},t)}},xl=(e,t)=>{const n=e.text??"";return!e.marks||e.marks.length===0?r.jsx("span",{children:n},t):e.marks.reduceRight((o,s,a)=>vl(s,o,`${t}-${a}`),n)},vl=(e,t,n)=>{switch(e.type){case"bold":case"strong":return r.jsx("strong",{children:t},n);case"italic":case"em":return r.jsx("em",{children:t},n);case"underline":return r.jsx("u",{children:t},n);case"strike":case"strikethrough":case"s":return r.jsx("s",{children:t},n);case"code":return r.jsx("code",{children:t},n);case"link":{const o=ue(e.attrs?.href);return Lr(o)?r.jsx("a",{className:fl,href:o,rel:"noopener noreferrer",target:"_blank",children:t},n):r.jsx("span",{children:t},n)}case"textStyle":{const o=yl(e.attrs);return o?r.jsx("span",{style:o,children:t},n):r.jsx("span",{children:t},n)}default:return r.jsx("span",{children:t},n)}},Rt=e=>{const t=ue(e&&typeof e=="object"?e.fontFamily:e);if(t)return pl[t]??t},yl=e=>{if(!e)return null;const t={},n=ue(e.color);n&&(t.color=n);const o=Rt(e.font)??Rt(e.fontFamily);o&&(t.fontFamily=o);const s=bl(e.fontSize);return s&&(t.fontSize=s),Object.keys(t).length>0?t:null},bl=e=>typeof e=="number"&&Number.isFinite(e)?`${e/10}em`:ue(e),ue=e=>typeof e=="string"&&e.length>0?e:void 0,Sl=e=>typeof e!="number"?3:e<1?1:e>3?3:Math.round(e),Ll=(e,t,n,o)=>{const s=Cr(o);switch(e){case 1:return r.jsx("h1",{style:s,children:n},t);case 2:return r.jsx("h2",{style:s,children:n},t);case 3:return r.jsx("h3",{style:s,children:n},t)}},Bt=e=>{const t=e?.textAlign;if(t==="left"||t==="right"||t==="center"||t==="justify")return t},Cr=e=>e?{textAlign:e}:void 0;var jl="_4dlrid0",Tr="_4dlrid1",Cl="xfz7dq0",Tl="xfz7dq1",kl="xfz7dq2",wl="xfz7dq3",Al="xfz7dq4";const El=({ref:e,footerRect:t,mode:n="readonly"})=>{const{caption:o,isCaptionVisible:s,source:a,isSourceVisible:c}=k(H.useShallow(h=>({caption:h.config.content.caption,isCaptionVisible:h.config.content.isCaptionVisible,source:h.config.content.source,isSourceVisible:h.config.content.isSourceVisible}))),i=n==="editable",d=s&&(i||o!==null),u=c&&a!==null&&Fl(a);return!d&&!u?null:r.jsxs("div",{ref:e,className:Cl,style:{left:t.x,top:t.y,width:t.width},children:[d?i?r.jsx(Nl,{caption:o}):r.jsx(_l,{caption:o}):null,u&&r.jsx(Ml,{source:a})]})},_l=({caption:e})=>e===null?null:typeof e=="string"?r.jsx("p",{className:Tr,children:e}):r.jsx(He,{content:e}),Ml=({source:e})=>{const t=Lr(e.url)?e.url:void 0,n=e.label??(t!==void 0?Pl(t):"");return n===""&&t===void 0?null:r.jsxs("div",{className:Tl,children:[r.jsx("span",{className:wl,children:"Source:"}),t!==void 0?r.jsx("a",{className:kl,href:t,target:"_blank",rel:"noopener noreferrer",children:n}):r.jsx("span",{className:Al,children:n})]})},Pl=e=>{try{return new URL(e).hostname}catch{return e}},Fl=e=>e.label!==void 0&&e.label!==""||e.url!==void 0&&e.url!=="",Nl=({caption:e})=>{const t=lt(),n=g.useMemo(()=>Ia({placeholder:"Add caption"}),[]),o=Sr({content:e,extensions:n,isEditable:!0,onUpdate:s=>{const a=zi(s)?null:s;t(new f.SetContentCaptionCommand({caption:a}))}});return r.jsx(br,{editor:o,ariaLabel:"Chart caption"})};var Hl="_1k4qtbg0";const Rl=3,Bl=({title:e,isTitleVisible:t,subtitle:n,isSubtitleVisible:o})=>{const s=[];return t&&s.push({type:"heading",attrs:{level:Rl},content:Ol(e)}),o&&s.push(...Dl(n)),{type:"doc",content:s}},Il=e=>{const t=e.content??[],[n,...o]=t;return{title:zl(n?.content??[]),subtitle:Gl(o)}},ft=e=>({type:e.type??"text",...e.content!==void 0?{content:e.content.map(ft)}:{},...e.text!==void 0?{text:e.text}:{},...e.marks!==void 0?{marks:e.marks}:{},...e.attrs!==void 0?{attrs:e.attrs}:{}}),Ol=e=>e===null?[]:typeof e=="string"?e===""?[]:[{type:"text",text:e}]:e.type==="doc"&&e.content?e.content.flatMap(t=>t.content??[]):e.type==="text"||e.type==="hardBreak"?[e]:e.content??[],Dl=e=>e===null?[{type:"paragraph"}]:typeof e=="string"?e===""?[{type:"paragraph"}]:[{type:"paragraph",content:[{type:"text",text:e}]}]:e.type==="doc"&&e.content?e.content.length===0?[{type:"paragraph"}]:e.content.map(It):[It(e)],It=e=>e.type==="paragraph"?e:{type:"paragraph",content:e.content??[e]},zl=e=>{if(e.length===0)return null;const[t]=e;return t&&e.length===1&&t.type==="text"&&(!t.marks||t.marks.length===0)?t.text??null:{type:"paragraph",content:e.map(ft)}},Gl=e=>{const t=e.filter(o=>(o.content??[]).length>0);if(t.length===0)return null;const[n]=t;if(n&&t.length===1&&n.type==="paragraph"){const o=n.content??[],[s]=o;if(s&&o.length===1&&s.type==="text"&&(!s.marks||s.marks.length===0))return s.text??null}return{type:"doc",content:t.map(ft)}},Wl=({ref:e,headerRect:t,mode:n="readonly"})=>{const{title:o,isTitleVisible:s,subtitle:a,isSubtitleVisible:c}=k(H.useShallow(h=>({isTitleVisible:h.config.content.isTitleVisible,isSubtitleVisible:h.config.content.isSubtitleVisible,title:h.config.content.title,subtitle:h.config.content.subtitle}))),i=n==="editable";return!(s&&(i||o!==null))&&!(c&&(i||a!==null))?null:r.jsx("div",{ref:e,className:Hl,style:{left:t.x,top:t.y,width:t.width},children:i?r.jsx(Xl,{title:o,isTitleVisible:s,isSubtitleVisible:c,subtitle:a},[s?"title":"",c?"subtitle":""].join("-")):r.jsx($l,{title:o,isTitleVisible:s,isSubtitleVisible:c,subtitle:a})})},$l=({title:e,isTitleVisible:t,isSubtitleVisible:n,subtitle:o})=>{const s=t&&e!==null,a=n&&o!==null;return r.jsxs(r.Fragment,{children:[s&&(typeof e=="string"?r.jsx("h1",{className:jl,children:e}):r.jsx(He,{content:e})),a&&(typeof o=="string"?r.jsx("p",{className:Tr,children:o}):r.jsx(He,{content:o}))]})},Xl=({title:e,isTitleVisible:t,isSubtitleVisible:n,subtitle:o})=>{const s=lt(),a=g.useMemo(()=>Ba({titlePlaceholder:"Untitled",subtitlePlaceholder:"Untitled",isTitleVisible:t,isSubtitleVisible:n}),[t,n]),c=g.useMemo(()=>Bl({title:e,isTitleVisible:t,subtitle:o,isSubtitleVisible:n}),[e,t,o,n]),i=Sr({content:c,extensions:a,isEditable:!0,onUpdate:d=>{const u=Il(d);t&&s(new f.SetContentTitleCommand({title:u.title})),n&&s(new f.SetContentSubtitleCommand({subtitle:u.subtitle}))}});return r.jsx(br,{editor:i,ariaLabel:"Chart title and subtitle"})};var ql="_1u9qprb0",Yl="_1u9qprb1",Vl="_9aen060",Ul="_9aen061",Kl="_9aen062",kr="_9aen063";const Zl=Object.freeze(Object.defineProperty({__proto__:null,groupRow:Kl,item:kr,trendRow:Ul,valueRow:Vl},Symbol.toStringTag,{value:"Module"})),Jl=e=>r.jsx(U,{...e,children:r.jsxs("g",{stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("path",{d:"m5 12 7-7 7 7"}),r.jsx("path",{d:"M12 19V5"})]})}),Ql=e=>r.jsx(U,{...e,children:r.jsx("g",{stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:r.jsx("path",{d:"M5 12h14"})})});var wr="n7clvo0",ec="n7clvo1",tc="n7clvo2",nc="n7clvo3",Ar={small:"n7clvo4",medium:"n7clvo5",large:"n7clvo6"},rc={small:"n7clvo7",medium:"n7clvo8",large:"n7clvo9"},oc={up:"n7clvoa",down:"n7clvob",flat:"n7clvoc"},sc={up:"n7clvoe n7clvod",down:"n7clvof n7clvod",flat:"n7clvog n7clvod"};const ac=({segment:e,resolvedSize:t})=>{if(e.kind==="swatch")return r.jsx(be,{shape:e.swatch.shape,color:e.swatch.color,width:e.size,height:e.size});if(e.kind==="trendArrow")return r.jsx("div",{className:sc[e.direction],children:e.direction==="flat"?r.jsx(Ql,{size:"xs",title:""}):r.jsx(Jl,{size:"xs",title:""})});const n=e.fontRole==="value"?Ar[t]:rc[t];return r.jsx("span",{className:N.clsx(ic(e),n),children:e.text})},ic=e=>{switch(e.textRole){case"value":return wr;case"observation":return ec;case"trendPercentage":return oc[e.trendDirection??"up"];case"trendReference":return tc;case"label":return nc}},lc=({item:e,resolvedSize:t})=>r.jsx("div",{className:kr,children:On(e).map(n=>r.jsx(cc,{row:n,resolvedSize:t},n.role))}),cc=({row:e,resolvedSize:t})=>{const n=e.role==="trendRow";return r.jsx("div",{className:Zl[e.role],"data-testid":n?"headline-trend":void 0,"data-direction":n?dc(e):void 0,role:n?"img":void 0,"aria-label":n?e.ariaLabel:void 0,children:e.segments.map((o,s)=>r.jsx(ac,{segment:o,resolvedSize:t},s))})},dc=e=>{const t=e.segments.find(n=>n.kind==="trendArrow");return t?.kind==="trendArrow"?t.direction:void 0},uc=({headline:e,rect:t,resolvedSize:n,visibleItemCount:o})=>{const s={left:t.x,top:t.y,width:t.width,height:t.height};return e.kind==="grandTotal"?r.jsx("div",{className:Yl,style:s,children:r.jsx("span",{className:N.clsx(wr,Ar[n]),children:e.value})}):r.jsx("div",{className:ql,style:s,children:e.items.slice(0,o).map((a,c)=>r.jsx(lc,{item:a,resolvedSize:n},`${a.label}-${c}`))})};var hc="_1oj6yix0",gc="_1oj6yix1",fc="_1oj6yix2";const pc=8,mc=16,xc=2,vc=({legends:e,containerRect:t,textScale:n})=>{const{lineBoxHeight:o}=Zn(n),{placements:s,hasOverlap:a}=yc(e,t,o);if(s.length===0)return null;const c=a?mc:pc,i=c-xc;return r.jsxs("div",{className:hc,children:[a&&r.jsx("svg",{className:gc,width:t.width,height:t.height,children:s.map(d=>r.jsx(bc,{anchorY:d.anchorY,labelY:d.y,endX:i,color:d.payload.color},d.payload.key))}),s.map(d=>r.jsx("span",{className:fc,style:{left:c,top:d.y,color:d.payload.color},children:d.payload.label},d.payload.key))]})},yc=(e,t,n)=>g.useMemo(()=>{const o=[];for(const s of e)for(const a of s.items){if(a.normalizedY===null)continue;const c=typeof a.visual.color=="string"?a.visual.color:void 0;o.push({normalizedY:a.normalizedY,payload:{key:String(o.length),label:a.formattedLabel,color:c}})}return o.length===0||t.height<=0?{placements:[],hasOverlap:!1}:f.computeDirectLabelsLayout({items:o,containerHeight:t.height,labelHeight:n})},[e,t.height,n]),bc=({anchorY:e,labelY:t,endX:n,color:o})=>{const s=n/2;return r.jsx("path",{d:`M0,${e} C${s},${e} ${s},${t} ${n},${t}`,fill:"none",stroke:o??"currentColor",strokeWidth:1,strokeDasharray:"2 2"})};var Sc="_6a636s0",Lc="_1kjk02r0",jc="_1kjk02r1",Cc="_1kjk02r2",Tc="_1kjk02r3",kc="_1kjk02r4",wc="_1kjk02r5",Ac="_1kjk02r6",Ec="_1kjk02r7",_c="_1kjk02r8",Mc="_1kjk02r9",Pc="_1kjk02ra",Fc="_1kjk02rb",Nc="_1dw9dgx0";const Hc="#9ca3af",Ve="\0",Rc=e=>{const t=[];return e.forEach((n,o)=>{const s=n.aesthetics.includes("size");for(const a of n.items){if(s){const u=Number(a.visual.size);if(!Number.isFinite(u)||u<=0)continue}const c=a.visual.color??"",i=s?`${Ve}${Number(a.visual.size)}`:"",d=a.visual.lineType;t.push({key:`${o}${Ve}${String(a.value)}${Ve}${c}${i}`,formattedLabel:a.formattedLabel,visual:a.visual,swatchShape:a.swatchShape,isBubble:s,primaryLineType:d})}}),t},Er=({pill:e})=>e.isBubble?r.jsx(Oc,{pill:e}):r.jsx(Ic,{pill:e}),Bc=({color:e,lineType:t,shape:n})=>e?r.jsx(be,{shape:n,color:e,lineType:t,width:Gn,height:dt}):null,Ic=({pill:e})=>r.jsxs(r.Fragment,{children:[r.jsx(Bc,{color:e.visual.color,lineType:e.primaryLineType,shape:e.swatchShape}),r.jsx("span",{children:e.formattedLabel})]}),Oc=({pill:e})=>{const t=Number(e.visual.size);return r.jsxs(r.Fragment,{children:[r.jsx("span",{className:Nc,style:{width:t,height:t,backgroundColor:e.visual.color??Hc}}),r.jsx("span",{children:e.formattedLabel})]})},Dc=({hiddenPills:e,placement:t})=>{const[n,o]=g.useState(!1),{refs:s,floatingStyles:a}=F.useFloating({open:n,placement:t,middleware:[F.offset(4),F.flip(),F.shift({padding:8})]});g.useEffect(()=>{if(!n)return;const u=m=>{const p=m.target;if(!p)return;const x=s.reference.current,v=s.floating.current;x instanceof Element&&x.contains(p)||v instanceof Element&&v.contains(p)||o(!1)},h=m=>{m.key==="Escape"&&o(!1)};return document.addEventListener("pointerdown",u),document.addEventListener("keydown",h),()=>{document.removeEventListener("pointerdown",u),document.removeEventListener("keydown",h)}},[n,s.floating,s.reference]);const c=t==="left"||t==="right",i=Math.min(e.length-1,Xn),d=Array.from({length:i},(u,h)=>i-h);return r.jsxs(r.Fragment,{children:[r.jsxs("div",{ref:s.setReference,className:N.clsx(Lc,{[Cc]:c,[jc]:!c}),children:[d.map(u=>r.jsx("span",{className:N.clsx(Tc,{[wc]:c,[kc]:!c}),style:zc(u,c),"aria-hidden":!0},u)),r.jsx("button",{type:"button",className:N.clsx(Ac,{[Ec]:n}),onClick:()=>o(u=>!u),"aria-haspopup":"dialog","aria-expanded":n,"aria-label":`Show ${e.length} hidden legend ${e.length===1?"item":"items"}`,children:r.jsxs("span",{className:_c,children:["+",e.length]})})]}),n&&r.jsx("div",{ref:s.setFloating,role:"dialog","aria-label":"Hidden legend items",className:Mc,style:a,children:r.jsx("ul",{className:Pc,children:e.map(u=>r.jsx("li",{className:Fc,children:r.jsx(Er,{pill:u})},u.key))})})]})},zc=(e,t)=>{const n=-e*qn;return{transform:t?`translateY(${n}px)`:`translateX(${n}px)`}};var Gc="_1cecisi0",Wc="_1cecisi1",$c="_1cecisi2",Xc="_1cecisi3";const qc=({edge:e,formattedLegends:t,containerWidth:n,containerHeight:o,textScale:s})=>{const a=re(),c=g.useMemo(()=>Rc(t),[t]),i=e==="left"||e==="right",d=i?o:n,u=g.useMemo(()=>{if(c.length===0)return{visibleCount:0,hasOverflow:!1};if(d<=0)return{visibleCount:c.length,hasOverflow:!1};const x=V(Yn,s),v={family:Un,size:x},y=x*Vn,L=P=>i?Yc(P,y):Ot({label:P.formattedLabel,swatchInlineSize:Vc(P),textMeasurer:a,font:v}),j=c.map(L),T=(i?y+ut:Ot({label:`+${c.length}`,swatchInlineSize:0,textMeasurer:a,font:v}))+Ma;return Kc({pillSizes:j,overflowPillSize:T,containerSize:d,gap:Aa})},[c,d,i,a,s]);if(c.length===0)return null;const h=c.slice(0,u.visibleCount),m=c.slice(u.visibleCount),p=u.hasOverflow&&m.length>0;return r.jsxs("div",{className:N.clsx(Gc,{[$c]:i,[Wc]:!i}),children:[h.map(x=>r.jsx("div",{className:Xc,children:r.jsx(Er,{pill:x})},x.key)),p&&r.jsx(Dc,{hiddenPills:m,placement:Zc(e)})]})},Ot=({label:e,swatchInlineSize:t,textMeasurer:n,font:o})=>{const s=n.measureText(e,o).width,a=t>0?Wn:0;return t+a+s+Kn},Yc=(e,t)=>{const n=Uc(e);return Math.max(t,n)+ut},Vc=e=>e.isBubble?Number(e.visual.size):Jn(e.visual.color),Uc=e=>e.isBubble?Number(e.visual.size):dt,Kc=({pillSizes:e,overflowPillSize:t,containerSize:n,gap:o})=>{if(e.length===0)return{visibleCount:0,hasOverflow:!1};let s=0;for(let i=0;i<e.length;i+=1)i>0&&(s+=o),s+=e[i]??0;if(s<=n)return{visibleCount:e.length,hasOverflow:!1};let a=0,c=0;for(const i of e){const d=a+(c>0?o:0)+i;if(d+o+t>n)break;a=d,c+=1}return{visibleCount:c,hasOverflow:!0}},Zc=e=>{switch(e){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left"}},Jc=g.memo(function({formattedLegends:t,rects:n,textScale:o}){const s=g.useMemo(()=>{const a=new Map;for(const c of t){let i=a.get(c.position);i||(i={pill:[],direct:[]},a.set(c.position,i)),c.display==="pill"?i.pill.push(c):i.direct.push(c)}return a},[t]);return r.jsx(r.Fragment,{children:Array.from(s,([a,c])=>{const i=n[a];return i===void 0?null:r.jsxs("div",{className:Sc,style:{left:i.x,top:i.y,width:i.width,height:i.height},children:[r.jsx(qc,{edge:a,formattedLegends:c.pill,containerWidth:i.width,containerHeight:i.height,textScale:o}),r.jsx(vc,{legends:c.direct,containerRect:i,textScale:o})]},a)})})}),Qc=(e,t,n)=>{const o=e.filter(a=>a.interactive);if(o.length===0)return null;const s=o.map(a=>n(a,t)).filter(a=>a!==null).map(a=>a.guideMode);return s.length===0?null:s.some(a=>a==="bar")?"bar":s.every(a=>a==="continuous")?"continuous":null};function ed(e,t){const n=f.getMainAxisCoordinate(e.mainAxis,t);if(e.mainAxis==="y"){const s=b(z(n));return{x1:0,x2:"100%",y1:s,y2:s}}const o=b(n);return{x1:o,x2:o,y1:0,y2:"100%"}}function td(e,t,n){const o=e.mainAxis==="y"?f.getY(n.observation):f.getX(n.observation);if(o===null)return null;const s=e.mainAxis==="y"?rd(n):nd(n),c=(t.x?.kind==="position"?t.x:null)?.bandwidth??s;if(c===null||c<=0)return null;const i=c/2;if(e.mainAxis==="y"){const h=b(z(o+i)),m=b(c);return{x:0,y:h,width:"100%",height:m}}const d=b(o-i),u=b(c);return{x:d,y:0,width:u,height:"100%"}}function nd(e){const t=f.getXMin(e.observation),n=f.getXMax(e.observation);return t===null||n===null?null:n-t}function rd(e){const t=f.getYMin(e.observation),n=f.getYMax(e.observation);return t===null||n===null?null:n-t}const od=1,sd="4 3",ad=({panelRect:e})=>{const{coordSystem:t,layers:n,scales:o}=k(H.useShallow(i=>({coordSystem:i.coordSystem,layers:i.layers,scales:i.scales}))),s=Le(i=>i.hover.primary),a=Se();if(t.type!=="cartesian"||n.length===0||s===null)return null;const c=Qc(n,t,a);return c===null?null:c==="bar"?r.jsx(ld,{coordSystem:t,scales:o,primary:s,panelRect:e}):r.jsx(id,{coordSystem:t,primary:s,panelRect:e})},id=({coordSystem:e,primary:t,panelRect:n})=>{const o=ed(e,t);return r.jsx(_r,{panelRect:n,children:r.jsx("line",{...o,stroke:l.hoverGuideLineColor,strokeWidth:od,strokeDasharray:sd,strokeLinecap:"round","data-testid":"hover-guide-line"})})},ld=({coordSystem:e,scales:t,primary:n,panelRect:o})=>{const s=td(e,t,n);return s===null?null:r.jsx(_r,{panelRect:o,children:r.jsx("rect",{...s,fill:l.hoverGuideFillColor,"data-testid":"hover-guide-rect"})})},_r=({panelRect:e,children:t})=>r.jsx("svg",{x:e.x,y:e.y,width:e.width,height:e.height,style:{overflow:"visible",pointerEvents:"none"},"data-testid":"hover-guide",children:t}),cd=200,dd=({engine:e,store:t,overlayRef:n,setCursor:o=ud})=>{g.useEffect(()=>{const s=n.current;if(!s)return;const a=hd(s,e),c=gd(s,e,t,o);return()=>{c(),a()}},[e,t,n,o])},ud=()=>{},hd=(e,t)=>{const n=()=>{const c=e.getBoundingClientRect();c.width===0||c.height===0||t.setViewport({width:c.width,height:c.height})};let o=null;const s=()=>{o!==null&&clearTimeout(o),o=setTimeout(()=>{o=null,n()},cd)},a=new ResizeObserver(s);return a.observe(e),n(),()=>{a.disconnect(),o!==null&&clearTimeout(o)}},gd=(e,t,n,o)=>{let s=null,a=null;const c=()=>{a=null;const u=s;if(s=null,!u)return;o({clientX:u.clientX,clientY:u.clientY});const h=e.getBoundingClientRect();if(h.width===0||h.height===0)return;const m={x:(u.clientX-h.left)/h.width,y:1-(u.clientY-h.top)/h.height};n.getState().setHoverState(t.query(m))},i=u=>{s=u,a===null&&(a=requestAnimationFrame(c))},d=()=>{s=null,a!==null&&(cancelAnimationFrame(a),a=null),o(null);const u=n.getState();u.hover.primary!==null&&u.setHoverState(f.RESTING_HOVER_STATE)};return e.addEventListener("pointermove",i),e.addEventListener("pointerleave",d),()=>{e.removeEventListener("pointermove",i),e.removeEventListener("pointerleave",d),a!==null&&cancelAnimationFrame(a),s=null}},fd=({panelRect:e})=>{const{engine:t,store:n,overlayRef:o,setCursor:s}=ge();return dd({engine:t,store:n,overlayRef:o,setCursor:s}),r.jsx("rect",{ref:o,x:e.x,y:e.y,width:e.width,height:e.height,fill:"transparent",pointerEvents:"all","data-testid":"pointer-capture-layer"})},Ue="data-hover-active",pd=e=>{const{store:t}=ge(),n=ve.useStore(t,o=>o.hover.primary!==null);g.useEffect(()=>{const o=e.current;if(o)return n?o.setAttribute(Ue,"true"):o.removeAttribute(Ue),()=>{o.removeAttribute(Ue)}},[e,n])},Dt=({panelRect:e,zOrder:t})=>{const n=k(c=>c.annotations.custom),o=js(),s=n.filter(c=>{const i=o(c.type);return i!==null&&(c.zOrder??i.zOrder)===t});if(s.length===0)return null;const a={width:e.width,height:e.height};return r.jsx("svg",{x:e.x,y:e.y,width:e.width,height:e.height,overflow:"visible","data-testid":`custom-annotations-${t}`,children:s.map(c=>{const i=o(c.type);return i===null?null:r.jsx("g",{"data-annotation-type":c.type,children:i.draw({targets:c.targets,area:a,params:c.params})},c.id)})})},Mr=M.xs,ot=O,Pr=Y.medium,md=Y.semibold,Fr=6,Nr=2,xd=4,vd=2,zt=4;var yd="_1agclyl0",bd="_1agclyl1",Sd="_1agclyl2",Ld={inside:"_1agclyl4 _1agclyl3",outside:"_1agclyl5 _1agclyl3"},jd="_1agclyl6 _1agclyl3";const Hr=({x:e,y:t,width:n,height:o,text:s,isRotated:a,target:c,position:i,coordType:d})=>{const u=a?`rotate(-90 ${e} ${t})`:void 0,h=c==="aggregate"?jd:Ld[i],m=Cd(c,i,d);return r.jsxs("g",{transform:u,children:[m&&r.jsx("rect",{className:m,x:e-n/2,y:t-o/2,width:n,height:o,rx:zt,ry:zt}),r.jsx("text",{className:h,x:e,y:t,textAnchor:"middle",dominantBaseline:"central",children:s})]})},Cd=(e,t,n)=>{if(e==="aggregate")return Sd;if(t==="outside"&&n==="cartesian")return bd},Td={dataLabel:{x:Fr,y:Nr},stackTotal:{x:xd,y:vd}},kd=({panelRect:e,formattingLocale:t})=>{const n=re(),o=k(H.useShallow(i=>({layers:i.layers,coordSystem:i.coordSystem,axes:i.guides.axes,numberFormat:i.config.numberFormat,parsingLocale:i.config.parsingLocale,textScale:i.config.appearance.textScale}))),s=g.useMemo(()=>{const i=V(Mr,o.textScale);return{dataLabel:{family:ot,size:i,weight:Pr},stackTotal:{family:ot,size:i,weight:md}}},[o.textScale]),a=g.useMemo(()=>(i,d)=>{const u=n.measureText(d,s[i]),h=Td[i];return{...u,width:u.width+h.x*2,height:u.height+h.y*2}},[n,s]),c=g.useMemo(()=>f.buildDataLabelsContent({...o,panelRect:e,measureDataLabel:a,formattingLocale:t}),[o,e,a,t]);return r.jsx("g",{className:yd,transform:`translate(${e.x}, ${e.y})`,"data-testid":"data-labels",children:c.labels.map(i=>r.jsx(Hr,{x:i.x,y:i.y,width:i.width,height:i.height,text:i.text,isRotated:i.isRotated,target:i.target,position:i.position,coordType:o.coordSystem.type},i.key))})},wd=({linePath:e,arrowheadPath:t,stroke:n,strokeWidth:o})=>{const s={stroke:n,strokeWidth:o,strokeLinecap:"round",fill:"none"};return r.jsxs("g",{children:[r.jsx("path",{d:e,...s}),r.jsx("path",{d:t,...s,strokeLinejoin:"round"})]})},Ad=({x:e,y:t,text:n,lineHeight:o,paddingX:s,paddingY:a,strokeWidth:c,strokeColor:i,fontWeight:d})=>{const u=re(),m=g.useMemo(()=>u.measureText(n,{family:O,size:o,weight:d}),[u,n,o,d]).width+s*2,p=o+a*2;return r.jsxs("g",{style:{pointerEvents:"none"},children:[r.jsx("rect",{x:e-m/2,y:t-p/2,width:m,height:p,rx:4,fill:l.graphBackground,stroke:i,strokeWidth:c}),r.jsx("text",{x:e,y:t,dominantBaseline:"central",textAnchor:"middle",fill:l.textPrimary,style:{fontFamily:O,fontSize:o,fontWeight:d},children:n})]})},Ed=({panelRect:e,formattingLocale:t})=>{const n=k(H.useShallow(s=>({differenceArrows:s.annotations.differenceArrows,mainAxis:s.coordSystem.type==="cartesian"?s.coordSystem.mainAxis:"x",textScale:s.config.appearance.textScale}))),o=g.useMemo(()=>n.differenceArrows.map(s=>f.computeDifferenceArrow({arrow:s,mainAxis:n.mainAxis,panelWidth:e.width,panelHeight:e.height,textScale:n.textScale,locale:t})),[n,e.width,e.height,t]);return o.length===0?null:r.jsx("g",{transform:`translate(${e.x}, ${e.y})`,"data-testid":"difference-arrows",children:o.map(({color:s,id:a,linePath:c,arrowheadPath:i,strokeWidth:d,labelPosition:u,labelText:h,labelLineHeight:m,labelPaddingX:p,labelPaddingY:x,labelStrokeWidth:v,labelFontWeight:y})=>{const L=s??l.defaultAnnotationArrowStroke;return r.jsxs(g.Fragment,{children:[r.jsx(wd,{linePath:c,arrowheadPath:i,stroke:L,strokeWidth:d}),r.jsx(Ad,{x:u.x,y:u.y,text:h,lineHeight:m,paddingX:p,paddingY:x,strokeWidth:v,strokeColor:L,fontWeight:y})]},a)})})},_d=0,Md=1.15,Gt=1.15,Pd="rgba(0, 0, 0, 0.16)",Wt=2,Fd=1.4,Nd=({arrow:e,fallbackColor:t,stickerOutlineColor:n,stickerOutlineColorInverse:o})=>{const s=g.useId(),a=e.color??t,c=Hd(e.color,n,o),i=e.dashArray?{strokeDasharray:e.dashArray,strokeDashoffset:e.dashOffset}:{},d=e.arrowheadExtent+e.strokeWidth+Wt+Gt,u={x:Math.min(e.startX,e.endX)-d,y:Math.min(e.startY,e.endY)-d,width:Math.abs(e.endX-e.startX)+2*d,height:Math.abs(e.endY-e.startY)+2*d},h=[e.linePath,e.startArrowheadPath,e.endArrowheadPath].filter(m=>m.length>0).join(" ");return r.jsxs("g",{children:[e.hasStickerStyle&&r.jsx("defs",{children:r.jsx("filter",{id:s,filterUnits:"userSpaceOnUse",...u,children:r.jsx("feDropShadow",{dx:_d,dy:Md,stdDeviation:Gt,floodColor:Pd})})}),r.jsxs("g",{filter:e.hasStickerStyle?`url(#${s})`:void 0,children:[e.hasStickerStyle&&r.jsx("path",{d:h,stroke:c,strokeWidth:e.strokeWidth+2*Wt,strokeLinecap:"round",fill:"none"}),r.jsx("path",{d:e.linePath,stroke:a,strokeWidth:e.strokeWidth,strokeLinecap:"round",fill:"none",...i}),e.startArrowheadPath.length>0&&r.jsx("path",{d:e.startArrowheadPath,stroke:a,strokeWidth:e.strokeWidth,strokeLinecap:"round",fill:"none"}),e.endArrowheadPath.length>0&&r.jsx("path",{d:e.endArrowheadPath,stroke:a,strokeWidth:e.strokeWidth,strokeLinecap:"round",fill:"none"})]})]})},Hd=(e,t,n)=>{if(e===null)return n;try{return Ze.getContrast(e,t)<Fd?n:t}catch{return n}},Rd=({panelRect:e})=>{const{themeValues:t}=gt(),n=k(s=>s.annotations.freeformArrows),o=g.useMemo(()=>n.map(s=>f.computeFreeformArrow({arrow:s,panelWidth:e.width,panelHeight:e.height})).filter(s=>s!==null),[n,e.width,e.height]);return o.length===0?null:r.jsx("g",{transform:`translate(${e.x}, ${e.y})`,"data-testid":"freeform-arrows",children:o.map(s=>r.jsx(Nd,{arrow:s,fallbackColor:l.defaultAnnotationArrowStroke,stickerOutlineColor:t.arrowAnnotationStickerOutlineColor,stickerOutlineColorInverse:t.arrowAnnotationStickerOutlineColorInverse},s.id))})},Bd=({edge:e,areTicksVisible:t,position:n,labelRotation:o,label:s})=>{const a=b(n),c=t?1:0,i={style:{font:l.fontTickLabel},fill:l.textSecondary},d=o!==0&&(e==="top"||e==="bottom"),u=e==="top";return d?r.jsx("svg",{x:a,y:u?"100%":0,style:{overflow:"visible"},children:r.jsx("text",{...Od(u,c,o),...i,children:s})}):r.jsx("text",{...Id(e,a,c),...i,children:s})},Id=(e,t,n)=>{switch(e){case"bottom":return{x:t,y:Q*n,textAnchor:"middle",dominantBaseline:"hanging"};case"top":return{x:t,y:"100%",dy:-Q*n,textAnchor:"middle",dominantBaseline:"auto"};case"left":return{x:"100%",dx:-Q*n,y:t,textAnchor:"end",dominantBaseline:"central"};case"right":return{x:Q*n,y:t,textAnchor:"start",dominantBaseline:"central"}}},Od=(e,t,n)=>{const o=Q*t,s=e?-o:o;return{x:0,y:s,textAnchor:e?"start":"end",dominantBaseline:"central",transform:`rotate(${n}, 0, ${s})`}},Dd=({formattedAxis:e,rect:t})=>{const n=e.position==="bottom"||e.position==="top";return r.jsxs("svg",{x:t.x,y:t.y,width:t.width,height:t.height,style:{overflow:"visible"},children:[In,e.ticks.map((o,s)=>{const a=o.formattedLabel,c=n?o.position:1-o.position,i=zd(e.position,c,t);return r.jsxs("g",{children:[e.ticksVisible&&r.jsx("line",{...i,stroke:l.gridLineColor,strokeWidth:1}),r.jsx(Bd,{edge:e.position,areTicksVisible:e.ticksVisible,position:c,labelRotation:e.labelRotation,label:a})]},s)})]})},zd=(e,t,n)=>{const o=b(t);switch(e){case"bottom":return{x1:o,y1:0,x2:o,y2:Ae};case"top":return{x1:o,y1:n.height,x2:o,y2:n.height-Ae};case"left":return{x1:n.width,y1:o,x2:n.width-Ae,y2:o};case"right":return{x1:0,y1:o,x2:Ae,y2:o}}},Gd=({formattedAxes:e,rects:t})=>r.jsx(r.Fragment,{children:e.map(n=>{const o=t[n.position];return!o||!n.isVisible?null:r.jsx(Dd,{formattedAxis:n,rect:o},n.scaleAestheticKey)})}),Wd=({axes:e,rects:t})=>r.jsx(r.Fragment,{children:e.map(n=>{const o=t[n.position];if(!o||!n.isVisible)return null;const s=$d(n.position,o);return r.jsxs("g",{transform:`translate(${o.x}, ${o.y})`,children:[In,r.jsx("text",{style:{font:l.fontAxisLabel},fill:l.textPrimary,...s,children:n.label})]},`axis-label-${n.position}`)})}),$d=(e,t)=>{const n={x:t.width/2,y:t.height/2,textAnchor:"middle",dominantBaseline:"middle"};return e==="left"?(n.x=0,n.textAnchor="start"):e==="right"&&(n.x=t.width,n.textAnchor="end"),n},$t={strokeWidth:1,strokeDashoffset:"0",strokeDasharray:"2 3",strokeLinecap:"round"},Xd=({axes:e,panel:t,panelRect:n})=>r.jsxs("svg",{x:n.x,y:n.y,width:n.width,height:n.height,style:{overflow:"visible"},children:[t.border.isVisible&&r.jsx("rect",{x:0,y:0,width:n.width,height:n.height,fill:"none",stroke:l.gridLineColor,rx:8,ry:8,...$t}),e.map(o=>{if(!o.gridVisible)return null;const s=o.position==="bottom"||o.position==="top";return r.jsx("g",{children:o.ticks.map((a,c)=>{if(a.position<=0||a.position>=1)return null;const i=s?a.position:1-a.position,d=b(i),u=s?{x1:d,y1:0,x2:d,y2:"100%"}:{x1:0,y1:d,x2:"100%",y2:d};return r.jsx("line",{...u,...$t,stroke:l.gridLineColor},c)})},o.scaleAestheticKey)})]}),Xt=8,qt=.5,Yt={strokeWidth:1,strokeLinecap:"round"},qd=({axes:e,panelRect:t,coordSystem:n})=>{const o=e.find(y=>y.geometry==="circular"),s=e.find(y=>y.geometry==="radial");if(!o||o.ticks.length===0)return null;const a=t.x+t.width/2,c=t.y+t.height/2,i=Math.min(t.width,t.height)/2,{startAngle:d,innerRadius:u}=n,h=y=>y*2*Math.PI+d,m=(y,L)=>{const j=a+L*Math.sin(y),C=c-L*Math.cos(y);return`${j.toFixed(2)},${C.toFixed(2)}`},p=o.ticks.map(y=>h(y.position)),x=y=>`${p.map((L,j)=>`${j===0?"M":"L"} ${m(L,y)}`).join(" ")} Z`,v=(s?.ticks??[]).map(y=>(u+y.position*(1-u))*i).filter(y=>y>qt);return v.some(y=>Math.abs(y-i)<qt)||v.push(i),r.jsxs("g",{"data-guide":"polar",style:{overflow:"visible"},children:[v.map((y,L)=>r.jsx("path",{d:x(y),fill:"none",stroke:l.gridLineColor,...Yt},`ring-${L}`)),p.map((y,L)=>r.jsx("line",{x1:a,y1:c,x2:a+i*Math.sin(y),y2:c-i*Math.cos(y),stroke:l.gridLineColor,...Yt},`spoke-${L}`)),o.ticks.map((y,L)=>{const j=h(y.position),C=Math.sin(j),T=-Math.cos(j);return r.jsx("text",{x:a+C*(i+Xt),y:c+T*(i+Xt),textAnchor:C>.1?"start":C<-.1?"end":"middle",dominantBaseline:T>.1?"hanging":T<-.1?"auto":"central",style:{font:l.fontTickLabel},fill:l.textSecondary,children:y.formattedLabel},`label-${L}`)})]})},Vt=({panelRect:e,zOrder:t})=>{const o=k(s=>s.annotations.shapes).filter(s=>s.zOrder===t);return o.length===0?null:r.jsx("svg",{x:e.x,y:e.y,width:e.width,height:e.height,overflow:"visible","data-testid":`shapes-${t}`,children:o.map(({id:s,x:a,y:c,width:i,height:d,fillColor:u,fillOpacity:h,strokeWidth:m,strokeColor:p})=>r.jsx("rect",{x:b(a),y:b(c),width:b(i),height:b(d),fill:u,fillOpacity:h,stroke:m>0?p??l.defaultAnnotationShapeStroke:"none",strokeWidth:m},s))})};var Yd="_120wioc0";const Vd=({panelRect:e})=>{const t=k(n=>n.annotations.textAnnotations);return t.length===0?null:r.jsx("svg",{x:e.x,y:e.y,width:e.width,height:e.height,overflow:"visible","data-testid":"text-annotations",children:t.map(n=>r.jsx("foreignObject",{x:b(n.x),y:b(n.y),width:b(n.width),height:b(1-n.y),overflow:"visible",children:r.jsx("div",{className:Yd,style:Ud(n.backgroundColor,n.backgroundColorStyle),children:r.jsx(He,{content:n.content})})},n.id))})},Ud=(e,t)=>e===null||e==="transparent"?{color:l.textPrimary}:t==="fade"?{color:l.textPrimary,backgroundColor:tt(e,l.grey100,.5),boxShadow:`0 0 0 1.5px ${tt(e,l.grey0,.2)}`}:{color:l.textPrimary,backgroundColor:e,boxShadow:`0 0 0 1.5px ${ze(e,.1)}`};var Kd="usd3ea0",Zd="usd3ea1";const Jd=({layer:e,coordSystem:t,isAnimated:n,isDimmed:o,highlightStyle:s,formattingLocale:a})=>{const i=Se()(e,t);return i===null?r.jsxs("text",{children:[e.geom," not implemented"]}):r.jsx("g",{className:N({[Zd]:o&&s==="desaturate",[Kd]:o&&s==="dim"}),children:i.render({layer:e,coordSystem:t,isAnimated:n,formattingLocale:a})})};function Qd({plugin:e,layer:t,coordSystem:n,candidates:o}){if(e?.getOverlayAnchor===void 0||o.length===0)return[];const s=[];for(const{observation:a,observationIndex:c}of o){const i=e.getOverlayAnchor({layer:t,coordSystem:n,observation:a});i!==null&&s.push({observation:a,observationIndex:c,anchor:i})}return s}const eu=4,tu=({plugin:e,layer:t,matchedLayer:n,overlayCandidates:o,coordSystem:s,isAnimated:a,panelRect:c,formattingLocale:i})=>{const{numberFormat:d,textScale:u}=k(H.useShallow(v=>({numberFormat:v.config.numberFormat,textScale:v.config.appearance.textScale}))),h=g.useMemo(()=>Qd({plugin:e,layer:t,coordSystem:s,candidates:o}),[e,t,s,o]),m=g.useMemo(()=>f.createSegmentYReader(t),[t]),p=g.useMemo(()=>f.buildLayerYValueFormatter({layer:t,numberFormat:d,locale:i}),[d,t,i]),x=Mr*yn*u;return e===null||n===null&&h.length===0?null:r.jsxs(r.Fragment,{children:[n?e.render({layer:n,coordSystem:s,isAnimated:a,formattingLocale:i}):null,h.map(({observation:v,observationIndex:y,anchor:L})=>r.jsx(nu,{observation:v,anchor:L,panelRect:c,readSegmentY:m,formatYValue:p,labelFontSizePx:x},ru(v,y)))]})},nu=({observation:e,anchor:t,panelRect:n,readSegmentY:o,formatYValue:s,labelFontSizePx:a})=>{const c=re(),i=t.x,d=z(t.y),u=(f.getSize(e)??ln)/2,h=o(e),m=f.isDefined(h)?s(h,e):null,p=g.useMemo(()=>{if(m===null)return null;const x=c.measureText(m,{family:ot,size:a,weight:Pr});return{width:x.width+Fr*2,height:x.height+Nr*2}},[m,c,a]);return r.jsxs(r.Fragment,{children:[r.jsx("circle",{"data-testid":"highlight-overlay-dot",cx:b(i),cy:b(d),r:u,fill:f.getColor(e)}),m!==null&&p!==null&&r.jsx(Hr,{x:i*n.width,y:d*n.height-u-eu-p.height/2,width:p.width,height:p.height,text:m,isRotated:!1,target:"observation",position:"outside",coordType:"cartesian"})]})},ru=(e,t)=>{const n=e[f.GROUP_VARIABLES.group];return`${String(n??"")}\0${t}`},ou=({layer:e,coordSystem:t,panelRect:n})=>{const o=Se(),{primary:s,group:a,related:c}=Le(H.useShallow(u=>({primary:u.hover.primary,group:u.hover.group,related:u.hover.related})));if(s===null)return null;const i=o(e,t);if(i===null)return null;const d=c.get(e.id)??[];return s.layerId===e.id?i.renderHover({layer:e,coordSystem:t,primary:s,group:a,related:d,panelRect:n}):d.length===0?null:i.renderHoverCompanions({layer:e,primary:s,related:d})};var su="to1jkx0",au="to1jkx1";const iu=({shouldAnimate:e,panelRect:t,formattingLocale:n})=>{const{layers:o,coordSystem:s,highlightStyle:a}=k(H.useShallow(c=>({layers:c.layers,coordSystem:c.coordSystem,highlightStyle:c.config.appearance.highlightStyle})));return r.jsx("svg",{x:t.x,y:t.y,width:t.width,height:t.height,className:su,"data-testid":"geom-layers",children:o.map(c=>r.jsxs(g.Fragment,{children:[r.jsx(du,{layer:c,coordSystem:s,highlightStyle:a,shouldAnimate:e,panelRect:t,formattingLocale:n}),r.jsx(ou,{layer:c,coordSystem:s,panelRect:t})]},`${c.id}-${lu(s)}`))})},lu=e=>e.type==="cartesian"?`cartesian-${e.mainAxis}`:e.type,cu=e=>{if(e.highlight!==null)return au},du=({layer:e,coordSystem:t,highlightStyle:n,shouldAnimate:o,panelRect:s,formattingLocale:a})=>{const c=Se(),i=g.useMemo(()=>c(e,t),[c,e,t]),d=e.highlight;return r.jsxs("g",{className:cu(e),children:[r.jsx(Jd,{layer:e,coordSystem:t,isAnimated:o,isDimmed:d?.composition.isDimmed??!1,highlightStyle:n,formattingLocale:a}),d!==null&&r.jsx(tu,{plugin:i,layer:e,matchedLayer:d.composition.matchedLayer,overlayCandidates:d.composition.overlayCandidates,coordSystem:t,isAnimated:o,panelRect:s,formattingLocale:a})]})};var uu="_17uhij30";const hu=({formattedAxes:e,formattedPolarAxes:t,plotRect:n,panelRect:o,axisRects:s,axisLabelRects:a,shouldAnimate:c,formattingLocale:i})=>{const d=g.useRef(null);pd(d);const{axes:u,panelGuide:h,coordSystem:m}=k(H.useShallow(L=>({axes:L.guides.axes,panelGuide:L.guides.panel,coordSystem:L.coordSystem}))),p=g.useMemo(()=>Rr(o,n),[o,n]),x=g.useMemo(()=>Ut(s,n),[s,n]),v=g.useMemo(()=>Ut(a,n),[a,n]),y=g.useMemo(()=>u.filter(L=>L.geometry==="linear"),[u]);return r.jsxs("svg",{ref:d,className:uu,width:n.width,height:n.height,style:{transform:`translate(${n.x}px, ${n.y}px)`},"data-testid":"plot",children:[r.jsx(Xd,{axes:e,panel:h,panelRect:p}),m.type==="polar"&&r.jsx(qd,{axes:t,panelRect:p,coordSystem:m}),r.jsx(ad,{panelRect:p}),r.jsx(Gd,{formattedAxes:e,rects:x}),r.jsx(Wd,{axes:y,rects:v}),r.jsx(Vt,{panelRect:p,zOrder:"background"}),r.jsx(Dt,{panelRect:p,zOrder:"background"}),r.jsx(iu,{shouldAnimate:c,panelRect:p,formattingLocale:i}),r.jsx(kd,{panelRect:p,formattingLocale:i}),r.jsx(Ed,{panelRect:p,formattingLocale:i}),r.jsx(Vt,{panelRect:p,zOrder:"foreground"}),r.jsx(Dt,{panelRect:p,zOrder:"foreground"}),r.jsx(Rd,{panelRect:p}),r.jsx(Vd,{panelRect:p}),r.jsx(fd,{panelRect:p})]})},Rr=(e,t)=>({x:e.x-t.x,y:e.y-t.y,width:e.width,height:e.height}),Ut=(e,t)=>{const n={};for(const[o,s]of Object.entries(e))n[o]=Rr(s,t);return n},Ke={headerSize:{width:0,height:0},footerSize:{width:0,height:0}},gu=()=>{const[e,t]=g.useState(null),[n,o]=g.useState(null),[s,a]=g.useState(Ke);return g.useEffect(()=>{const c=()=>{const d=e?{width:e.offsetWidth,height:e.offsetHeight}:Ke.headerSize,u=n?{width:n.offsetWidth,height:n.offsetHeight}:Ke.footerSize;a(h=>fu(h,{headerSize:d,footerSize:u})?{headerSize:d,footerSize:u}:h)};c();const i=new ResizeObserver(c);return e&&i.observe(e),n&&i.observe(n),()=>i.disconnect()},[e,n]),{headerRef:t,footerRef:o,measurements:s}},fu=(e,t)=>e.headerSize.width!==t.headerSize.width||e.headerSize.height!==t.headerSize.height||e.footerSize.width!==t.footerSize.width||e.footerSize.height!==t.footerSize.height,pu=({appearance:e,isEditable:t,editorId:n,style:o,children:s})=>{const{theme:a,themeClass:c,inlineVarsStyle:i}=gt(),d=ti(e.border),u=Math.max(0,e.cornerRadius),h=u===0?0:u+d,m=g.useMemo(()=>{const v={...o,borderRadius:`${h}px`,...i},y=ei(e.border,a);return y!==null&&(v.background=y),v},[o,h,i,e.border,a]),p=g.useMemo(()=>({inset:`${d}px`,borderRadius:`${u}px`}),[d,u]),x=t&&e.background.type==="solid"&&e.background.color==="transparent";return r.jsx("div",{"data-testid":"graph-wrapper","data-graphy-id":n,className:N(si,c),style:m,children:r.jsx("div",{"data-testid":"graph-inner",className:N(ii,{[li]:x}),style:p,children:s})})},mu=e=>r.jsx(Nn,{children:r.jsx(Ln,{children:r.jsx(xu,{...e})})}),xu=({width:e,height:t,isAnimated:n,showTooltips:o=!0,mode:s="readonly"})=>{const{axes:a,legends:c,numberFormat:i,parsingLocale:d,appearance:u,annotations:h,coordSystem:m,headline:p,headlineConfig:x}=k(H.useShallow(X=>({axes:X.guides.axes,legends:X.guides.legends,numberFormat:X.config.numberFormat,parsingLocale:X.config.parsingLocale,appearance:X.config.appearance,annotations:X.annotations,coordSystem:X.coordSystem,headline:X.guides.headline,headlineConfig:X.config.headline}))),v=A.useReducedMotion(),{headerRef:y,footerRef:L,measurements:j}=gu(),{formattingLocale:C,theme:T,themeOverrides:P,id:G}=oe(),D=g.useMemo(()=>f.formatLegends({legends:c,numberFormat:i,parsingLocale:d,formattingLocale:C}),[c,i,d,C]),W=g.useMemo(()=>f.formatHeadline({headline:p,show:x.show,numberFormat:i,parsingLocale:d,formattingLocale:C}),[p,x.show,i,d,C]),K=re(),Z=u.border.type==="none"?0:u.border.width,J=g.useMemo(()=>({width:Math.max(0,e-2*Z),height:Math.max(0,t-2*Z)}),[e,t,Z]),je=g.useMemo(()=>W?{formatted:W,size:x.size,position:x.position,innerRadius:m.type==="polar"?m.innerRadius:0}:void 0,[W,x.size,x.position,m]),Ce=Na(K,u.textScale),fe=Ha({measurer:Ce,axes:a,numberFormat:i,parsingLocale:d,formattedLegends:D,containerSize:J,externalMeasurements:j,headline:je,formattingLocale:C,annotations:h,coordSystem:m,textScale:u.textScale}),Te=g.useMemo(()=>!fe||!je||!Ce?null:f.resolveHeadlinePlacement({headline:je,layout:fe.layout,containerSize:J,measurer:Ce,itemGap:Pn}),[fe,je,J,Ce]);if(!fe)return null;const{layout:ee,formattedAxes:Ir,formattedPolarAxes:Or}=fe;return r.jsx(ir,{theme:T,themeOverrides:P,appearance:u,children:r.jsxs(pu,{appearance:u,isEditable:s==="editable",editorId:G,style:{width:e,height:t},children:[r.jsx(Wl,{ref:y,headerRect:ee.header,mode:s}),r.jsx(hu,{formattedAxes:Ir,formattedPolarAxes:Or,plotRect:ee.plot,panelRect:ee.panel,axisRects:ee.axes,axisLabelRects:ee.axisLabels,shouldAnimate:n??!v,formattingLocale:C??d}),r.jsx(El,{ref:L,footerRect:ee.footer,mode:s}),r.jsx(Jc,{formattedLegends:D,rects:ee.legends,textScale:u.textScale}),W&&Te&&r.jsx(uc,{headline:W,rect:Te.rect,resolvedSize:Te.resolvedSize,visibleItemCount:Te.visibleItemCount}),o&&r.jsx(fa,{})]})})};function vu(e,t){return{type:e.type,zOrder:t.zOrder,draw:t.draw}}const yu=2147483646;function bu(){const e=g.useRef(null),[t,n]=g.useState(null),o=g.useCallback(()=>{const a=e.current;if(!a)return;const c=a.getBoundingClientRect(),i={left:c.left,top:c.top,width:c.width,height:c.height};n(d=>d&&Lu(d,i)?d:i)},[]),s=g.useCallback(a=>{e.current=a},[]);return g.useLayoutEffect(()=>{if(!e.current)return;o();const a=new ResizeObserver(o);return a.observe(e.current),window.addEventListener("resize",o),window.addEventListener("scroll",o,!0),()=>{a.disconnect(),window.removeEventListener("resize",o),window.removeEventListener("scroll",o,!0)}},[o]),{ref:s,rect:t}}function Su({rect:e,children:t}){return sn.createPortal(r.jsx("div",{style:{position:"fixed",left:e.left,top:e.top,width:e.width,height:e.height,pointerEvents:"none",zIndex:yu,overflow:"visible"},children:t}),document.body)}function Lu(e,t){return e.left===t.left&&e.top===t.top&&e.width===t.width&&e.height===t.height}function*ju(e,t){for(const n of e)yield{kind:n[t],observation:n}}function Cu(e,t,n,o){return e>=n&&t>=o}const Tu=({children:e,style:t,...n})=>r.jsx("svg",{width:"100%",height:"100%",viewBox:"0 0 1 1",preserveAspectRatio:"none",...n,style:{overflow:"visible",...t},children:e});function ku(){return g.useMemo(()=>{const e=f.DEFAULT_COLOR_PALETTE;return t=>e[t%e.length]??e[0]??"#000000"},[])}function wu(e,t){const{hitTesterRegistry:n}=ge(),o=g.useRef(t);o.current=t,g.useLayoutEffect(()=>{const s=a=>o.current(a);return n.set(e,s),()=>{n.delete(e)}},[n,e])}function Au(e){const{engine:t,store:n,setCursor:o}=ge();return g.useCallback((s,a)=>{if(s===null){n.getState().setHoverState(f.RESTING_HOVER_STATE),o(null);return}n.getState().setHoverState(t.hoverByKey(e,s)),a&&o(a)},[t,n,o,e])}function Br(e,t,n){const o=Kt(e),s=Kt(t),a=(c,i)=>Math.round(c+(i-c)*n);return`rgb(${a(o.red,s.red)}, ${a(o.green,s.green)}, ${a(o.blue,s.blue)})`}function Eu(e,t){return Br(e,"#ffffff",t)}function Kt(e){const t=e.replace("#","");return{red:Number.parseInt(t.slice(0,2),16),green:Number.parseInt(t.slice(2,4),16),blue:Number.parseInt(t.slice(4,6),16)}}exports.CanvasTextMeasurer=De;exports.CompanionDot=ne;exports.DevToolsPanel=zs;exports.GraphProvider=Ls;exports.GraphRenderer=mu;exports.HoverProvider=Nn;exports.PanelOverlayPortal=Su;exports.PrimaryDot=Oe;exports.Swatch=be;exports.TextMeasurerProvider=Ln;exports.ThemeProvider=ir;exports.TooltipBody=Hn;exports.TooltipRowView=Rn;exports.UnitSpaceSvg=Tu;exports.darkTheme=ar;exports.defineAnnotationRenderer=vu;exports.defineGeomPlugin=to;exports.defineGeomRenderer=no;exports.emToPx=V;exports.fitsLabel=Cu;exports.lightTheme=sr;exports.lighten=Eu;exports.mixColor=Br;exports.partitionByKind=ju;exports.toPercent=b;exports.toViewBoxX=so;exports.toViewBoxY=z;exports.useCategoricalColor=ku;exports.useCompiledSelector=k;exports.useGeomHitTest=wu;exports.useGeomHover=Au;exports.useGraphCommandDispatcher=lt;exports.useHoverState=Le;exports.usePanelScreenRect=bu;exports.useSvgPathMorph=Pe;exports.useTextMeasurer=re;exports.vars=l;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./index.css');const l=require("./history-chords-xdwpWM21.cjs"),se=require("./font-values-DAorZ_7T.cjs");let y=require("@graphysdk/viz-engine"),c=require("react"),i=require("react/jsx-runtime"),Y=require("zustand"),K=require("zustand/vanilla"),P=require("clsx");P=l.__toESM(P,1);function L(e){for(const r of e)(r.severity==="error"?console.error:console.warn)(`[graphy] ${r.code}: ${r.message}`,r)}var ne="_1a5iqpb0",oe="_1a5iqpb1";var ie="_1a5iqpb3",ae="_1a5iqpb4",ce="_1a5iqpb5";var O=({errors:e})=>{const[r,...t]=e;return(0,i.jsxs)("div",{role:"alert",className:ne,children:[(0,i.jsx)("strong",{className:oe,children:"This chart could not be rendered."}),r&&(0,i.jsx)(U,{diagnostic:r}),t.length>0&&(0,i.jsx)("ul",{className:"_1a5iqpb2",children:t.map((s,n)=>(0,i.jsx)("li",{children:(0,i.jsx)(U,{diagnostic:s})},`${s.code}-${n}`))})]})},U=({diagnostic:e})=>(0,i.jsxs)("div",{className:ie,children:[(0,i.jsx)("span",{className:ae,children:e.code}),(0,i.jsx)("p",{className:ce,children:e.message}),e.suggestion&&(0,i.jsx)("p",{className:"_1a5iqpb6",children:e.suggestion})]});function le(e=[],r=[]){return e.length===r.length&&e.every((t,s)=>Object.is(t,r[s]))}var z=class extends c.Component{constructor(...e){super(...e),this.state={caughtDiagnostic:null}}static getDerivedStateFromError(e){return{caughtDiagnostic:(0,y.buildDiagnostic)(e)}}componentDidCatch(e,r){const t=(0,y.buildDiagnostic)(e);L([t]),this.props.onError?.([t]),console.error("Chart render component stack:",r.componentStack)}componentDidUpdate(e){this.state.caughtDiagnostic&&!le(e.resetKeys,this.props.resetKeys)&&this.setState({caughtDiagnostic:null})}render(){const{caughtDiagnostic:e}=this.state;if(e)return(0,i.jsx)(O,{errors:[e]});const{forcedErrors:r,children:t}=this.props;return r&&r.length>0?(0,i.jsx)(O,{errors:r}):t}},X=e=>typeof e=="object"&&"geom"in e&&"render"in e,de=e=>{const r=(0,y.resolveDefinition)(e);return r instanceof y.Geom?r:null},Q=(e,r)=>{const t=e.filter(s=>ue(s,r));return t.length===e.length?e:t},ue=(e,r)=>e.kind!=="annotation"?!0:(0,y.findAnnotation)(r.annotations,e.id)!==null,F=[],me=()=>(0,K.createStore)(e=>({selection:F,setSelection:r=>e(t=>he(t.selection,r)?t:{selection:r}),clearSelection:()=>e(r=>r.selection.length===0?r:{selection:F})})),he=(e,r)=>e===r?!0:e.length!==r.length?!1:e.every((t,s)=>{const n=r[s];return n!==void 0&&(0,y.areEditTargetsEqual)(t,n)}),ge=5,pe=e=>{if(process.env.NODE_ENV==="production")return{emit:()=>{},subscribe:()=>ve,getLastTrigger:()=>null,getLastCompile:()=>null,getCacheStats:()=>e.getCacheStats()};const r=new Set;let t=null;return{emit:s=>{const n=e.getLastCompile();if(n){t=s;for(const u of r)u(s,n)}},subscribe:s=>(r.add(s),()=>{r.delete(s)}),getLastTrigger:()=>t,getLastCompile:()=>e.getLastCompile(),getCacheStats:()=>e.getCacheStats()}},fe=()=>(0,K.createStore)(e=>({lastCompile:null,history:[],nextId:1,lastSnapshot:null,recordCompile:(r,t)=>e(s=>{if(s.lastSnapshot===t)return s;const n={id:s.nextId,label:ye(r),stages:t.stages,durationMs:t.durationMs};return{lastCompile:n,history:Se(s.history,n,ge),nextId:s.nextId+1,lastSnapshot:t}})})),ve=()=>{},ye=e=>{switch(e.kind){case"init":return"init";case"input":return"input change";case"data":return"data change";case"command":return e.command.metadata.description}},Se=(e,r,t)=>{const s=e.length>=t?e.length-(t-1):0;return[...e.slice(s),r]};function be(e){const r=e.filter(X),t=new Set([...Object.keys(l.BUILT_IN_GEOM_RENDERERS),...r.map(d=>d.geom)]),s=[],n=new Set;for(const d of e){const m=de(d);m===null||t.has(m.type)||n.has(m.type)||(n.add(m.type),s.push({kind:"user-input",severity:"error",code:"MISSING_GEOM_RENDERER",message:`Custom geom '${m.type}' is registered but has no renderer.`,context:{requested:m.type,kind:"geom-renderer"},suggestion:`Add a render half for it: \`defineGeomRenderer(${m.type}Geom, { coord, render })\`, then include it in \`plugins\`.`}))}const u=new Map;for(const d of r){if("definition"in d)continue;const m=`${d.geom}|${d.coord}`,g=u.get(m);g?g.count+=1:u.set(m,{geom:d.geom,coord:d.coord,count:1})}const a=[];for(const{geom:d,coord:m,count:g}of u.values())g<2||a.push({kind:"user-input",severity:"warning",code:"DUPLICATE_REGISTERED_TYPE",message:`Multiple render-only overrides register ('${d}', '${m}') (${g} entries); the last in the array wins.`,context:{requested:`${d}@${m}`,kind:"geom-renderer"},suggestion:`Keep a single render-only override for ('${d}', '${m}').`});return{errors:s,warnings:a}}function Ee(e,r){const{coordSystem:t,layers:s}=e,n=new Set,u=[];for(const a of s)r(a.geom,t.type)!==null||n.has(a.geom)||(n.add(a.geom),u.push({kind:"user-input",severity:"warning",code:"MISSING_GEOM_RENDERER",message:`No renderer for geom '${a.geom}' under ${t.type} coords; the layer is not painted.`,context:{requested:a.geom,kind:"geom-renderer"},suggestion:`Register a renderer for ('${a.geom}', '${t.type}') via \`defineGeomRenderer\`.`}));return u}function Ce(e,r){const{coordSystem:t,layers:s}=e,n=new Set,u=[];for(const a of s){if(a.interactive===!1||a.spatialKind!=="render-hit-test"||n.has(a.geom))continue;const d=r(a.geom,t.type);d===null||d.hitTest||l.isOverlayHosted(d)||(n.add(a.geom),u.push({kind:"user-input",severity:"warning",code:"MISSING_RENDER_HIT_TEST",message:`Geom '${a.geom}' declares spatialKind 'render-hit-test' but its renderer provides no hit-test; the layer has no hover.`,context:{requested:a.geom,kind:"geom-renderer"},suggestion:`Add a \`hitTest\` factory (precomputed geometry) or an overlay render (\`{ fn, options: { overlay: true } }\`, live simulation) to the renderer for ('${a.geom}', '${t.type}').`}))}return u}function xe(e){const r=new Set,t=[];for(const s of e.layers){const n=s.identityKey;s.interactive!==!1&&(s.spatialKind!=="render-hit-test"||typeof n!="object"||r.has(s.geom)||s.data.hasVariable(n.variable)||(r.add(s.geom),t.push({kind:"user-input",severity:"warning",code:"RENDER_HIT_TEST_IDENTITY",message:`Geom '${s.geom}' keys its identity on '${n.variable}', a column its compile output does not emit; its hover lookup is empty.`,context:{requested:s.geom,kind:"geom-renderer"},suggestion:`Emit the '${n.variable}' column from the geom's \`compile()\`, or point \`identityKey\` at a column it does emit.`})))}return t}function Te(e,r){const{coordSystem:t,layers:s}=e,n=new Set,u=[];for(const a of s){if(a.interactive===!1||a.spatialKind!=="render-hit-test"||n.has(a.geom))continue;const d=r(a.geom,t.type);d===null||!d.hitTest||!l.isOverlayHosted(d)||(n.add(a.geom),u.push({kind:"user-input",severity:"warning",code:"CONFLICTING_RENDER_HIT_TEST",message:`Geom '${a.geom}' declares both a \`hitTest\` factory and an overlay render; these are alternatives, so only the overlay is used.`,context:{requested:a.geom,kind:"geom-renderer"},suggestion:"Keep one: a `hitTest` factory for precomputed geometry, OR an overlay render (`{ fn, options: { overlay: true } }`) for a live simulation."}))}return u}function Re(e,r){const t=new Set,s=[];for(const n of e.layers)n.interactive!==!1&&(n.spatialKind!=="render-hit-test"||t.has(n.geom)||r.hasCapability(n.geom)||(t.add(n.geom),s.push({kind:"user-input",severity:"warning",code:"MISSING_ANCHOR_CAPABILITY",message:`Geom '${n.geom}' declares no \`resolveAnchorPosition\`; its observations cannot be annotated, so the editor overlay paints no creation trigger on them.`,context:{requested:n.geom,kind:"geom-renderer"},suggestion:"Implement `resolveAnchorPosition(observation, context)` on the geom, returning the normalised panel position an annotation on that observation belongs at."})));return s}function qe(e,r){const{coordSystem:t,layers:s}=e,n=new Set,u=[];for(const a of s){if(a.interactive===!1||a.spatialKind==="render-hit-test"||n.has(a.geom))continue;const d=r(a.geom,t.type);d===null||!l.isOverlayHosted(d)||(n.add(a.geom),u.push({kind:"user-input",severity:"warning",code:"OVERLAY_REQUIRES_RENDER_HIT_TEST",message:`Geom '${a.geom}' declares an overlay render but its layer's spatialKind is '${a.spatialKind}', not 'render-hit-test'; the overlay's push-path hover resolves to nothing.`,context:{requested:a.geom,kind:"geom-renderer"},suggestion:"Have the geom's manifest yield spatialKind 'render-hit-test' so the compiled layer carries the `byKey` index the overlay's `pushHover` resolves against."}))}return u}var Ge=e=>(0,K.createStore)(r=>({compiled:e,setCompiled:t=>r(s=>s.compiled===t?s:{compiled:t})})),Ne=({input:e,data:r,customPalettes:t,plugins:s,resolveRenderer:n,anchorResolver:u,onChange:a,onError:d,onWarnings:m})=>{const g=l.useLatestRef(a),q=l.useLatestRef(d),j=l.useLatestRef(m),[{session:p,compileBus:b}]=(0,c.useState)(()=>{const o=(0,y.createCompiler)({plugins:s});return{session:new y.GraphCompilationSession(o),compileBus:pe(o)}}),[h]=(0,c.useState)(()=>be(s??[])),f=(0,c.useRef)(null),[S]=(0,c.useState)(ke),x=(0,c.useRef)(null),G=(0,c.useCallback)(o=>h.errors.length===0?o:[...h.errors,...o??[]],[h]),T=(0,c.useCallback)(o=>{if(!o.ok)return o.errors;if(x.current)x.current.getState().setCompiled(o.compiled);else{const v=Ge(o.compiled);v.subscribe(S.notify),x.current=v,S.notify()}return null},[S]),[I,_]=(0,c.useState)(()=>{const o=p.compile({input:e,data:r,customPalettes:t});return f.current=o,G(T(o))}),R=(0,c.useCallback)(o=>o.ok?[...o.warnings,...Ee(o.compiled,n),...Ce(o.compiled,n),...xe(o.compiled),...Te(o.compiled,n),...qe(o.compiled,n),...Re(o.compiled,u)]:o.warnings,[n,u]),N=(0,c.useCallback)(o=>{o.length!==0&&(L(o),q.current?.(o))},[q]),E=(0,c.useCallback)(o=>{o.length!==0&&(L(o),j.current?.(o))},[j]);(0,c.useEffect)(()=>{const o=f.current;o&&(N([...h.errors,...o.ok?[]:o.errors]),E([...h.warnings,...R(o)]),o.ok&&b.emit({kind:"init"}))},[b,N,E,h,R]),(0,c.useEffect)(()=>{const o=p.update({input:e,data:r,customPalettes:t});if(!o)return;o.sealedInput&&g.current?.(o.sealedInput);const v=T(o.result);_(G(v)),v&&N(v),E(R(o.result)),v||b.emit({kind:o.inputChanged?"input":"data"})},[e,r,t,p,b,T,N,E,G,R,g]);const D=(0,c.useCallback)(o=>{_(v=>v===null?v:G(null)),E(R(o))},[G,E,R]),k=(0,c.useCallback)(o=>{o.compiled&&x.current?.getState().setCompiled(o.compiled),o.result&&D(o.result),o.command&&b.emit({kind:"command",command:o.command}),o.input&&g.current?.(o.input),o.errors&&N([...o.errors])},[D,b,g,N]),C=(0,c.useCallback)(o=>{for(const v of o)k(v);return o.some(v=>!!v.compiled)},[k]),w=(0,c.useCallback)((o,v)=>{C(p.applyCommand(o,v))},[p,C]),M=(0,c.useCallback)(()=>{C(p.seal())},[p,C]),B=(0,c.useCallback)(()=>C(p.undo()),[p,C]),A=(0,c.useCallback)(()=>C(p.redo()),[p,C]),re=(0,c.useMemo)(()=>({stack:p.history,undo:B,redo:A}),[p,B,A]),te=(0,c.useCallback)(()=>x.current?.getState().compiled??null,[]);return{store:x.current,dispatch:w,seal:M,history:re,subscribe:S.subscribe,getCompiled:te,compileBus:b,compileErrors:I}},ke=()=>{const e=new Set;return{subscribe:r=>(e.add(r),()=>{e.delete(r)}),notify:()=>e.forEach(r=>r())}},je={},J=({data:e,input:r,plugins:t=[],formattingLocale:s,handleRef:n,onChange:u,onError:a,onWarnings:d,customPalettes:m,colorScheme:g="light",themeOverrides:q=je,children:j})=>{const[p]=(0,c.useState)(()=>l.createGeomRendererResolver(t.filter(X))),b=(0,c.useId)(),[h]=(0,c.useState)(()=>(0,y.createAnchorResolver)(t)),[f]=(0,c.useState)(()=>me()),{store:S,dispatch:x,seal:G,history:T,subscribe:I,getCompiled:_,compileBus:R,compileErrors:N}=Ne({input:r,data:e,customPalettes:m,plugins:t,resolveRenderer:p,anchorResolver:h,onChange:u,onError:a,onWarnings:d});(0,c.useEffect)(()=>{if(S)return S.subscribe((k,C)=>{if(k.compiled.spec===C.compiled.spec)return;const{selection:w,setSelection:M}=f.getState();w.length!==0&&M(Q(w,k.compiled.spec))})},[S,f]);const E=(0,c.useMemo)(()=>({dispatch:x,seal:G}),[x,G]);(0,c.useImperativeHandle)(n,()=>({commands:E,undo:T.undo,redo:T.redo,subscribe:I,getCompiled:_,getSelection:()=>f.getState().selection,setSelection:k=>f.getState().setSelection(k),subscribeSelection:f.subscribe}),[E,T,I,_,f]);const D=(0,c.useMemo)(()=>S?{chartId:b,store:S,selectionStore:f,commands:E,history:T,formattingLocale:s,compileBus:R,colorScheme:g,themeOverrides:q,anchorResolver:h}:null,[b,S,f,E,T,s,R,g,q,h]);return(0,i.jsx)(z,{forcedErrors:N,onError:a,resetKeys:[r,e],children:D?(0,i.jsx)(l.GraphContext.Provider,{value:D,children:(0,i.jsx)(l.GeomRendererResolverProvider,{value:p,children:j})}):null})};function _e(e){const r=(0,y.createGraphyBuilder)(e);return{...r,GraphProvider:s=>(0,i.jsx)(J,{...s,plugins:r.plugins})}}var De=({children:e,...r})=>(0,i.jsx)("svg",{viewBox:"0 0 1 1",preserveAspectRatio:"none",width:"100%",height:"100%",pointerEvents:"none",...r,children:e}),Ie="drqe3u0",we="drqe3u1",He="drqe3u2",Me="drqe3u3",H="drqe3u4",$e="drqe3u5",Pe="drqe3u6",Le="drqe3u7",$="drqe3u8",Oe="drqe3u9",Ke="drqe3ua";var Be="drqe3uc",Ae="drqe3ud",Ye="drqe3ue",Ue="drqe3uf";var Fe="drqe3uh",Ve="drqe3ui",V={enabled:"drqe3uk drqe3uj",disabled:"drqe3ul drqe3uj"},W={ran:"drqe3un drqe3um",dim:"drqe3uo drqe3um"},Z={ran:"drqe3uq drqe3up",cached:"drqe3ur drqe3up",untouched:"drqe3us drqe3up"},We=({width:e=380,style:r,className:t}={})=>{const{compileBus:s}=l.useGraphContext(),[n]=(0,c.useState)(()=>fe()),[u,a]=(0,c.useState)(!1),[d,m]=(0,c.useState)(y.isCompilerCachingEnabled);(0,c.useEffect)(()=>{const{recordCompile:h}=n.getState(),f=s.getLastTrigger(),S=s.getLastCompile();return f&&S&&h(f,S),s.subscribe(h)},[n,s]);const g=(0,Y.useStore)(n,h=>h.lastCompile),q=(0,Y.useStore)(n,h=>h.history),j=s.getCacheStats(),p=g===null&&q.length===0,b=()=>{m(h=>{const f=!h;return(0,y.setCompilerCachingEnabled)(f),f})};return(0,i.jsxs)("div",{className:(0,P.default)(Ke,t),style:{width:e,...r},children:[(0,i.jsxs)("div",{className:Ie,children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("div",{className:we,children:"compile cache"}),(0,i.jsx)("div",{className:Ye,children:p?"production: stats disabled":g?`last: ${g.label} · ${ee(g.durationMs)}`:"awaiting first compile…"})]}),(0,i.jsx)("button",{type:"button",onClick:()=>a(h=>!h),className:Ue,children:u?"▾":"▴"})]}),!u&&(0,i.jsxs)("div",{className:"drqe3ub",children:[(0,i.jsxs)("button",{type:"button",onClick:b,className:d?V.enabled:V.disabled,"aria-pressed":d,children:["cache ",d?"enabled":"disabled"]}),(0,i.jsx)("span",{className:"drqe3ug",children:"next compile reflects this toggle"})]}),!u&&!p&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(ze,{delta:g?.stages,cumulative:j}),(0,i.jsx)(Xe,{entries:q})]})]})},ze=({delta:e,cumulative:r})=>(0,i.jsxs)("table",{className:He,children:[(0,i.jsx)("thead",{children:(0,i.jsxs)("tr",{className:Fe,children:[(0,i.jsx)("th",{className:Me,children:"stage"}),(0,i.jsx)("th",{className:H,children:"Δ miss"}),(0,i.jsx)("th",{className:H,children:"Δ hit"}),(0,i.jsx)("th",{className:H,children:"total miss"}),(0,i.jsx)("th",{className:H,children:"total hit"})]})}),(0,i.jsx)("tbody",{children:y.COMPILER_STAGE_KEYS.map(t=>{const s=e?.[t],n=Qe(s);return(0,i.jsxs)("tr",{className:Be,children:[(0,i.jsxs)("td",{className:$e,children:[(0,i.jsx)("span",{className:Z[n],"aria-hidden":!0})," ",t]}),(0,i.jsx)("td",{className:n==="ran"?W.ran:W.dim,children:s?.misses??0}),(0,i.jsx)("td",{className:$,children:s?.hits??0}),(0,i.jsx)("td",{className:$,children:r[t].misses}),(0,i.jsx)("td",{className:$,children:r[t].hits})]},t)})})]}),Xe=({entries:e})=>e.length===0?null:(0,i.jsxs)("div",{className:Ae,children:[(0,i.jsx)("div",{className:Ve,children:"recent compiles"}),e.map(r=>{const t=Je(r.stages,u=>u.misses>0),s=y.COMPILER_STAGE_KEYS.length,n=t===0?"cached":"ran";return(0,i.jsxs)("div",{className:Pe,children:[(0,i.jsx)("span",{className:Z[n],"aria-hidden":!0}),(0,i.jsx)("span",{className:Le,title:r.label,children:r.label}),(0,i.jsxs)("span",{className:Oe,children:[t,"/",s," ran · ",ee(r.durationMs)]})]},r.id)})]}),Qe=e=>!e||e.hits===0&&e.misses===0?"untouched":e.misses>0?"ran":"cached",Je=(e,r)=>{let t=0;for(const s of y.COMPILER_STAGE_KEYS)r(e[s])&&(t+=1);return t},ee=e=>e>=10?`${e.toFixed(0)}ms`:`${e.toFixed(2)}ms`,Ze=()=>{const{history:e}=l.useGraphContext(),{stack:r,undo:t,redo:s}=e,n=(0,c.useCallback)(d=>r.subscribe(d),[r]),u=(0,c.useCallback)(()=>r.getSnapshot(),[r]),a=(0,c.useSyncExternalStore)(n,u,u);return(0,c.useMemo)(()=>({...a,undo:t,redo:s}),[a,t,s])},er=new Set(["button","checkbox","color","file","hidden","image","radio","range","reset","submit"]),rr=(e,r={})=>{const{target:t,enabled:s=!0}=r;(0,c.useEffect)(()=>{const n=tr(t);if(!s||!n)return;const u=a=>{if(!sr(a)||a.defaultPrevented||nr(a.target))return;const d=l.resolveHistoryStep(a);if(!d)return;const m=e.current;m&&(d==="undo"?m.undo():m.redo())&&a.preventDefault()};return n.addEventListener("keydown",u),()=>n.removeEventListener("keydown",u)},[e,t,s])},tr=e=>e===void 0?window:e!==null&&"current"in e?e.current:e,sr=e=>"key"in e,nr=e=>e instanceof HTMLInputElement?!er.has(e.type):e instanceof HTMLElement?e.isContentEditable||e.tagName==="TEXTAREA":!1;exports.BrandMark=l.BrandMark;exports.CanvasTextMeasurer=l.CanvasTextMeasurer;exports.DefaultFooter=l.DefaultFooter;exports.DefaultGrid=l.DefaultGrid;exports.DefaultHeader=l.DefaultHeader;exports.DefaultSwatch=l.DefaultSwatch;exports.DefaultTooltip=l.DefaultTooltip;exports.DevToolsPanel=We;exports.GraphErrorBoundary=z;exports.GraphErrorPanel=O;exports.GraphProvider=J;exports.GraphRenderer=l.GraphRenderer;exports.HoverProvider=l.HoverProvider;exports.TextMeasurerProvider=l.TextMeasurerProvider;exports.ThemeProvider=l.ThemeProvider;exports.UnitSpaceSvg=De;exports.createGraphyKit=_e;exports.darkTheme=l.darkTheme;exports.defineGeomRenderer=l.defineGeomRenderer;exports.lightTheme=l.lightTheme;exports.lightenCss=l.lightenCss;exports.pruneSelection=Q;exports.resolveBrandMarkVisual=l.resolveBrandMarkVisual;exports.useCompiledSelector=l.useCompiledSelector;exports.useElementScreenRect=l.useElementScreenRect;exports.useGeomHitTest=l.useGeomHitTest;exports.useGeomHover=l.useGeomHover;exports.useGraphCommands=l.useGraphCommands;exports.useGraphHandle=l.useGraphHandle;exports.useGraphHistory=Ze;exports.useGraphHistoryShortcuts=rr;exports.useGraphSelection=l.useGraphSelection;exports.useHandleCompiled=l.useHandleCompiled;exports.useHoverState=l.useHoverState;exports.useTextMeasurer=l.useTextMeasurer;exports.vars=se.vars;