@texturehq/edges 5.5.1 → 5.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { BreadcrumbProps, BreadcrumbsProps, DateValue, CalendarProps as CalendarProps$1, ValidationResult, DisclosureGroupProps, DisclosurePanelProps, ButtonProps, DisclosureProps, DateRangePickerProps as DateRangePickerProps$1, FormProps, TooltipTriggerComponentProps, TooltipProps as TooltipProps$1, ListBoxProps as ListBoxProps$1, ListBoxItemProps, ModalOverlayProps, Key, PopoverProps as PopoverProps$1, ProgressBarProps as ProgressBarProps$1, RangeCalendarProps as RangeCalendarProps$1, TabProps as TabProps$1, TabListProps as TabListProps$1, TabPanelProps, TabsProps as TabsProps$2 } from 'react-aria-components';
2
2
  export { BreadcrumbProps, BreadcrumbsProps, DialogTrigger, Focusable } from 'react-aria-components';
3
- import { as as LoadingState, B as BadgeProps, at as FilterState, au as SortState, av as SearchConfig, aw as FacetConfig, ax as FacetCounts, ay as Column, az as CellEmphasis, aA as FieldValue, aB as BooleanFormat, aC as FormattedValue, aD as FieldFormat, aE as CurrentFormat, aF as DateFormat, aG as DistanceFormat, aH as EnergyUnit, aI as EnergyFormat, aJ as CurrencyFormat, aK as NumberFormat, aL as PhoneFormat, aM as PowerFormat, aN as FormatterFunction, aO as ResistanceFormat, aP as TemperatureFormat, aQ as TemperatureUnitString, aR as TemperatureUnit, aS as TextFormat, aT as VoltageFormat, e as BaseDataPoint, $ as YFormatType, R as TooltipData, aU as CellComponentProps, aV as CellAlignment, aW as LinkBehavior, D as DeviceState, s as GridState, aX as ComponentFormatter, aY as DataTableProps, aZ as LayerSpec, a_ as CustomPinsSpec, a$ as GeoJsonLayerSpec, b0 as RasterLayerSpec, b1 as VectorLayerSpec, b2 as ClusteredVectorLayerSpec, b3 as ColorSpec } from './colors-D_tNti6E.cjs';
4
- export { A as ABSENT_GRID_FIELDS, a as ActionItem, b4 as ActionMenu, b as ActionMenuProps, b5 as AppShell, c as AppShellProps, b6 as Avatar, d as AvatarProps, b7 as Badge, b8 as BaseFormat, C as CATEGORY_COLOR_TOKENS, f as CATEGORY_NEUTRAL_COLOR, b9 as CellComponent, ba as CellContext, bb as ChartContext, g as ChartMargin, bc as CodeEditor, h as CodeEditorProps, i as CodeLanguage, j as CodeTheme, bd as ComponentFormatOptions, be as CurrentUnit, bf as CustomFormat, bg as DEFAULT_MAP_TYPE, bh as DateFormatStyle, bi as DistanceUnit, bj as ENTITY_CATEGORY_CONFIG, E as ENTITY_CONFIG, k as EntityArchetype, bk as EntityCategory, bl as EntityCategoryConfig, l as EntityConfig, m as EntityStateRule, n as EntityType, bm as FacetType, bn as FilterChip, bo as FilterCondition, bp as FilterGroup, bq as FilterOperator, G as GRID_ELEMENT_TYPE_BY_ENTITY, br as GRID_STATE_COLORS, o as GRID_STAT_LIST, p as GridElementSourceType, q as GridStatField, r as GridStatFieldFormat, bs as GridStateColor, H as HEADLINE_METRIC_BOUNDS, t as Heading, u as HeadlineMetric, bt as InteractiveMap, bu as InteractiveMapHandle, I as InteractiveMapProps, bv as LayerCheckState, bw as LayerFeature, bx as LayerSelection, by as LayerStyle, bz as LayerTreeNode, bA as LayerVisibilityPatch, L as Loader, v as Logo, bB as MAP_TYPES, M as MapPoint, bC as MapType, bD as Meter, w as MeterProps, x as MetricFormat, y as MetricSource, bE as MobileBreakpoint, bF as MobileConfig, bG as MobileRenderer, bH as PercentBarCell, bI as PercentBarCellProps, P as PercentThresholdLevel, z as PercentThresholds, bJ as PercentageFormat, bK as PowerUnit, bL as RenderType, bM as ResistanceUnit, S as SegmentOption, bN as SegmentedControl, F as SegmentedControlProps, J as SerializableFieldFormat, K as SideNav, N as SideNavItem, O as SideNavProps, bO as SortConfig, bP as SortDirection, bQ as StackNav, bR as StackNavGroup, bS as StackNavItem, bT as StackNavLinkComponentProps, bU as StackNavProps, bV as StackNavRenderRow, bW as StackNavRowRenderProps, bX as StackNavTheme, bY as StaticMap, Q as StaticMapProps, bZ as TableDensity, b_ as TableLayout, b$ as TableWidth, T as TextLink, c0 as TextTransform, c1 as TextTruncatePosition, U as TooltipSeries, V as TopNav, W as TopNavProps, X as UNARY_FILTER_OPERATORS, Y as UNARY_OPERATOR_LABELS, c2 as UNVERIFIED_VOLTAGE_UNIT_ROWS, Z as UnaryFilterOperator, c3 as UseInfiniteScrollOptions, c4 as UseInfiniteScrollReturn, c5 as VoltageUnit, _ as YFormatSettings, c6 as ZoomStops, a0 as activeDeviceStates, c7 as addFilterCondition, a1 as archetypeFor, c8 as baselineFromPoint, a2 as clearColorCache, a3 as createCategoryColorMap, c9 as createEmptyFilter, ca as createFilter, cb as createFilters, a4 as createXScale, a5 as createYScale, a6 as defaultMargin, a7 as deviceStateLabels, a8 as deviceStateMetricFormats, a9 as entityHasDetailPage, aa as entityHasStatList, ab as entityShowsNow, cc as filterToChips, cd as formatComponentValue, ac as getContrastingTextColor, ad as getDefaultChartColor, ae as getDefaultColors, af as getDeviceStateDisplayLabel, af as getDeviceStateLabel, ce as getEntityCategory, ag as getEntityConfig, ah as getEntityIcon, ai as getEntityLabel, aj as getEntityStatList, cf as getFilterFields, ak as getGridStateLabel, al as getResolvedColor, am as getThemeCategoricalColors, an as getYFormatSettings, ao as gridStateLabels, ap as isActiveDeviceState, ap as isActiveState, cg as isFilterEmpty, aq as isLightColor, ar as isUnaryFilterOperator, ch as mapValuesToCategoricalColors, ci as percentThresholdLevel, cj as removeFilterCondition, ck as useChartContext, cl as useComponentFormatter, cm as useInfiniteScroll } from './colors-D_tNti6E.cjs';
3
+ import { as as LoadingState, B as BadgeProps, at as FilterState, au as SortState, av as SearchConfig, aw as FacetConfig, ax as FacetCounts, ay as Column, az as CellEmphasis, aA as FieldValue, aB as BooleanFormat, aC as FormattedValue, aD as FieldFormat, aE as CurrentFormat, aF as DateFormat, aG as DistanceFormat, aH as EnergyUnit, aI as EnergyFormat, aJ as CurrencyFormat, aK as NumberFormat, aL as PhoneFormat, aM as PowerFormat, aN as FormatterFunction, aO as ResistanceFormat, aP as TemperatureFormat, aQ as TemperatureUnitString, aR as TemperatureUnit, aS as TextFormat, aT as VoltageFormat, e as BaseDataPoint, $ as YFormatType, R as TooltipData, aU as CellComponentProps, aV as CellAlignment, aW as LinkBehavior, D as DeviceState, s as GridState, aX as ComponentFormatter, aY as DataTableProps, aZ as LayerSpec, a_ as CustomPinsSpec, a$ as GeoJsonLayerSpec, b0 as RasterLayerSpec, b1 as VectorLayerSpec, b2 as ClusteredVectorLayerSpec, b3 as ColorSpec } from './colors-DVgI6s3w.cjs';
4
+ export { A as ABSENT_GRID_FIELDS, a as ActionItem, b4 as ActionMenu, b as ActionMenuProps, b5 as AppShell, c as AppShellProps, b6 as Avatar, d as AvatarProps, b7 as Badge, b8 as BaseFormat, C as CATEGORY_COLOR_TOKENS, f as CATEGORY_NEUTRAL_COLOR, b9 as CellComponent, ba as CellContext, bb as ChartContext, g as ChartMargin, bc as CodeEditor, h as CodeEditorProps, i as CodeLanguage, j as CodeTheme, bd as ComponentFormatOptions, be as CurrentUnit, bf as CustomFormat, bg as DEFAULT_MAP_TYPE, bh as DateFormatStyle, bi as DistanceUnit, bj as ENTITY_CATEGORY_CONFIG, E as ENTITY_CONFIG, k as EntityArchetype, bk as EntityCategory, bl as EntityCategoryConfig, l as EntityConfig, m as EntityStateRule, n as EntityType, bm as FacetType, bn as FilterChip, bo as FilterCondition, bp as FilterGroup, bq as FilterOperator, G as GRID_ELEMENT_TYPE_BY_ENTITY, br as GRID_STATE_COLORS, o as GRID_STAT_LIST, p as GridElementSourceType, q as GridStatField, r as GridStatFieldFormat, bs as GridStateColor, H as HEADLINE_METRIC_BOUNDS, t as Heading, u as HeadlineMetric, bt as InteractiveMap, bu as InteractiveMapHandle, I as InteractiveMapProps, bv as LayerCheckState, bw as LayerFeature, bx as LayerSelection, by as LayerStyle, bz as LayerTreeNode, bA as LayerVisibilityPatch, L as Loader, v as Logo, bB as MAP_TYPES, M as MapPoint, bC as MapType, bD as Meter, w as MeterProps, x as MetricFormat, y as MetricSource, bE as MobileBreakpoint, bF as MobileConfig, bG as MobileRenderer, bH as PercentBarCell, bI as PercentBarCellProps, P as PercentThresholdLevel, z as PercentThresholds, bJ as PercentageFormat, bK as PowerUnit, bL as RenderType, bM as ResistanceUnit, S as SegmentOption, bN as SegmentedControl, F as SegmentedControlProps, J as SerializableFieldFormat, K as SideNav, N as SideNavItem, O as SideNavProps, bO as SortConfig, bP as SortDirection, bQ as StackNav, bR as StackNavGroup, bS as StackNavItem, bT as StackNavLinkComponentProps, bU as StackNavProps, bV as StackNavRenderRow, bW as StackNavRowRenderProps, bX as StackNavTheme, bY as StaticMap, Q as StaticMapProps, bZ as TableDensity, b_ as TableLayout, b$ as TableWidth, T as TextLink, c0 as TextTransform, c1 as TextTruncatePosition, U as TooltipSeries, V as TopNav, W as TopNavProps, X as UNARY_FILTER_OPERATORS, Y as UNARY_OPERATOR_LABELS, c2 as UNVERIFIED_VOLTAGE_UNIT_ROWS, Z as UnaryFilterOperator, c3 as UseInfiniteScrollOptions, c4 as UseInfiniteScrollReturn, c5 as VoltageUnit, _ as YFormatSettings, c6 as ZoomStops, a0 as activeDeviceStates, c7 as addFilterCondition, a1 as archetypeFor, c8 as baselineFromPoint, a2 as clearColorCache, a3 as createCategoryColorMap, c9 as createEmptyFilter, ca as createFilter, cb as createFilters, a4 as createXScale, a5 as createYScale, a6 as defaultMargin, a7 as deviceStateLabels, a8 as deviceStateMetricFormats, a9 as entityHasDetailPage, aa as entityHasStatList, ab as entityShowsNow, cc as filterToChips, cd as formatComponentValue, ac as getContrastingTextColor, ad as getDefaultChartColor, ae as getDefaultColors, af as getDeviceStateDisplayLabel, af as getDeviceStateLabel, ce as getEntityCategory, ag as getEntityConfig, ah as getEntityIcon, ai as getEntityLabel, aj as getEntityStatList, cf as getFilterFields, ak as getGridStateLabel, al as getResolvedColor, am as getThemeCategoricalColors, an as getYFormatSettings, ao as gridStateLabels, ap as isActiveDeviceState, ap as isActiveState, cg as isFilterEmpty, aq as isLightColor, ar as isUnaryFilterOperator, ch as mapValuesToCategoricalColors, ci as percentThresholdLevel, cj as removeFilterCondition, ck as useChartContext, cl as useComponentFormatter, cm as useInfiniteScroll } from './colors-DVgI6s3w.cjs';
5
5
  import * as react_jsx_runtime from 'react/jsx-runtime';
6
6
  import * as React$1 from 'react';
7
7
  import React__default, { ReactNode, HTMLAttributes, ComponentProps, CSSProperties, Component, ErrorInfo } from 'react';
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { BreadcrumbProps, BreadcrumbsProps, DateValue, CalendarProps as CalendarProps$1, ValidationResult, DisclosureGroupProps, DisclosurePanelProps, ButtonProps, DisclosureProps, DateRangePickerProps as DateRangePickerProps$1, FormProps, TooltipTriggerComponentProps, TooltipProps as TooltipProps$1, ListBoxProps as ListBoxProps$1, ListBoxItemProps, ModalOverlayProps, Key, PopoverProps as PopoverProps$1, ProgressBarProps as ProgressBarProps$1, RangeCalendarProps as RangeCalendarProps$1, TabProps as TabProps$1, TabListProps as TabListProps$1, TabPanelProps, TabsProps as TabsProps$2 } from 'react-aria-components';
2
2
  export { BreadcrumbProps, BreadcrumbsProps, DialogTrigger, Focusable } from 'react-aria-components';
3
- import { as as LoadingState, B as BadgeProps, at as FilterState, au as SortState, av as SearchConfig, aw as FacetConfig, ax as FacetCounts, ay as Column, az as CellEmphasis, aA as FieldValue, aB as BooleanFormat, aC as FormattedValue, aD as FieldFormat, aE as CurrentFormat, aF as DateFormat, aG as DistanceFormat, aH as EnergyUnit, aI as EnergyFormat, aJ as CurrencyFormat, aK as NumberFormat, aL as PhoneFormat, aM as PowerFormat, aN as FormatterFunction, aO as ResistanceFormat, aP as TemperatureFormat, aQ as TemperatureUnitString, aR as TemperatureUnit, aS as TextFormat, aT as VoltageFormat, e as BaseDataPoint, $ as YFormatType, R as TooltipData, aU as CellComponentProps, aV as CellAlignment, aW as LinkBehavior, D as DeviceState, s as GridState, aX as ComponentFormatter, aY as DataTableProps, aZ as LayerSpec, a_ as CustomPinsSpec, a$ as GeoJsonLayerSpec, b0 as RasterLayerSpec, b1 as VectorLayerSpec, b2 as ClusteredVectorLayerSpec, b3 as ColorSpec } from './colors-DBJMg-uV.js';
4
- export { A as ABSENT_GRID_FIELDS, a as ActionItem, b4 as ActionMenu, b as ActionMenuProps, b5 as AppShell, c as AppShellProps, b6 as Avatar, d as AvatarProps, b7 as Badge, b8 as BaseFormat, C as CATEGORY_COLOR_TOKENS, f as CATEGORY_NEUTRAL_COLOR, b9 as CellComponent, ba as CellContext, bb as ChartContext, g as ChartMargin, bc as CodeEditor, h as CodeEditorProps, i as CodeLanguage, j as CodeTheme, bd as ComponentFormatOptions, be as CurrentUnit, bf as CustomFormat, bg as DEFAULT_MAP_TYPE, bh as DateFormatStyle, bi as DistanceUnit, bj as ENTITY_CATEGORY_CONFIG, E as ENTITY_CONFIG, k as EntityArchetype, bk as EntityCategory, bl as EntityCategoryConfig, l as EntityConfig, m as EntityStateRule, n as EntityType, bm as FacetType, bn as FilterChip, bo as FilterCondition, bp as FilterGroup, bq as FilterOperator, G as GRID_ELEMENT_TYPE_BY_ENTITY, br as GRID_STATE_COLORS, o as GRID_STAT_LIST, p as GridElementSourceType, q as GridStatField, r as GridStatFieldFormat, bs as GridStateColor, H as HEADLINE_METRIC_BOUNDS, t as Heading, u as HeadlineMetric, bt as InteractiveMap, bu as InteractiveMapHandle, I as InteractiveMapProps, bv as LayerCheckState, bw as LayerFeature, bx as LayerSelection, by as LayerStyle, bz as LayerTreeNode, bA as LayerVisibilityPatch, L as Loader, v as Logo, bB as MAP_TYPES, M as MapPoint, bC as MapType, bD as Meter, w as MeterProps, x as MetricFormat, y as MetricSource, bE as MobileBreakpoint, bF as MobileConfig, bG as MobileRenderer, bH as PercentBarCell, bI as PercentBarCellProps, P as PercentThresholdLevel, z as PercentThresholds, bJ as PercentageFormat, bK as PowerUnit, bL as RenderType, bM as ResistanceUnit, S as SegmentOption, bN as SegmentedControl, F as SegmentedControlProps, J as SerializableFieldFormat, K as SideNav, N as SideNavItem, O as SideNavProps, bO as SortConfig, bP as SortDirection, bQ as StackNav, bR as StackNavGroup, bS as StackNavItem, bT as StackNavLinkComponentProps, bU as StackNavProps, bV as StackNavRenderRow, bW as StackNavRowRenderProps, bX as StackNavTheme, bY as StaticMap, Q as StaticMapProps, bZ as TableDensity, b_ as TableLayout, b$ as TableWidth, T as TextLink, c0 as TextTransform, c1 as TextTruncatePosition, U as TooltipSeries, V as TopNav, W as TopNavProps, X as UNARY_FILTER_OPERATORS, Y as UNARY_OPERATOR_LABELS, c2 as UNVERIFIED_VOLTAGE_UNIT_ROWS, Z as UnaryFilterOperator, c3 as UseInfiniteScrollOptions, c4 as UseInfiniteScrollReturn, c5 as VoltageUnit, _ as YFormatSettings, c6 as ZoomStops, a0 as activeDeviceStates, c7 as addFilterCondition, a1 as archetypeFor, c8 as baselineFromPoint, a2 as clearColorCache, a3 as createCategoryColorMap, c9 as createEmptyFilter, ca as createFilter, cb as createFilters, a4 as createXScale, a5 as createYScale, a6 as defaultMargin, a7 as deviceStateLabels, a8 as deviceStateMetricFormats, a9 as entityHasDetailPage, aa as entityHasStatList, ab as entityShowsNow, cc as filterToChips, cd as formatComponentValue, ac as getContrastingTextColor, ad as getDefaultChartColor, ae as getDefaultColors, af as getDeviceStateDisplayLabel, af as getDeviceStateLabel, ce as getEntityCategory, ag as getEntityConfig, ah as getEntityIcon, ai as getEntityLabel, aj as getEntityStatList, cf as getFilterFields, ak as getGridStateLabel, al as getResolvedColor, am as getThemeCategoricalColors, an as getYFormatSettings, ao as gridStateLabels, ap as isActiveDeviceState, ap as isActiveState, cg as isFilterEmpty, aq as isLightColor, ar as isUnaryFilterOperator, ch as mapValuesToCategoricalColors, ci as percentThresholdLevel, cj as removeFilterCondition, ck as useChartContext, cl as useComponentFormatter, cm as useInfiniteScroll } from './colors-DBJMg-uV.js';
3
+ import { as as LoadingState, B as BadgeProps, at as FilterState, au as SortState, av as SearchConfig, aw as FacetConfig, ax as FacetCounts, ay as Column, az as CellEmphasis, aA as FieldValue, aB as BooleanFormat, aC as FormattedValue, aD as FieldFormat, aE as CurrentFormat, aF as DateFormat, aG as DistanceFormat, aH as EnergyUnit, aI as EnergyFormat, aJ as CurrencyFormat, aK as NumberFormat, aL as PhoneFormat, aM as PowerFormat, aN as FormatterFunction, aO as ResistanceFormat, aP as TemperatureFormat, aQ as TemperatureUnitString, aR as TemperatureUnit, aS as TextFormat, aT as VoltageFormat, e as BaseDataPoint, $ as YFormatType, R as TooltipData, aU as CellComponentProps, aV as CellAlignment, aW as LinkBehavior, D as DeviceState, s as GridState, aX as ComponentFormatter, aY as DataTableProps, aZ as LayerSpec, a_ as CustomPinsSpec, a$ as GeoJsonLayerSpec, b0 as RasterLayerSpec, b1 as VectorLayerSpec, b2 as ClusteredVectorLayerSpec, b3 as ColorSpec } from './colors-LvDVM-KX.js';
4
+ export { A as ABSENT_GRID_FIELDS, a as ActionItem, b4 as ActionMenu, b as ActionMenuProps, b5 as AppShell, c as AppShellProps, b6 as Avatar, d as AvatarProps, b7 as Badge, b8 as BaseFormat, C as CATEGORY_COLOR_TOKENS, f as CATEGORY_NEUTRAL_COLOR, b9 as CellComponent, ba as CellContext, bb as ChartContext, g as ChartMargin, bc as CodeEditor, h as CodeEditorProps, i as CodeLanguage, j as CodeTheme, bd as ComponentFormatOptions, be as CurrentUnit, bf as CustomFormat, bg as DEFAULT_MAP_TYPE, bh as DateFormatStyle, bi as DistanceUnit, bj as ENTITY_CATEGORY_CONFIG, E as ENTITY_CONFIG, k as EntityArchetype, bk as EntityCategory, bl as EntityCategoryConfig, l as EntityConfig, m as EntityStateRule, n as EntityType, bm as FacetType, bn as FilterChip, bo as FilterCondition, bp as FilterGroup, bq as FilterOperator, G as GRID_ELEMENT_TYPE_BY_ENTITY, br as GRID_STATE_COLORS, o as GRID_STAT_LIST, p as GridElementSourceType, q as GridStatField, r as GridStatFieldFormat, bs as GridStateColor, H as HEADLINE_METRIC_BOUNDS, t as Heading, u as HeadlineMetric, bt as InteractiveMap, bu as InteractiveMapHandle, I as InteractiveMapProps, bv as LayerCheckState, bw as LayerFeature, bx as LayerSelection, by as LayerStyle, bz as LayerTreeNode, bA as LayerVisibilityPatch, L as Loader, v as Logo, bB as MAP_TYPES, M as MapPoint, bC as MapType, bD as Meter, w as MeterProps, x as MetricFormat, y as MetricSource, bE as MobileBreakpoint, bF as MobileConfig, bG as MobileRenderer, bH as PercentBarCell, bI as PercentBarCellProps, P as PercentThresholdLevel, z as PercentThresholds, bJ as PercentageFormat, bK as PowerUnit, bL as RenderType, bM as ResistanceUnit, S as SegmentOption, bN as SegmentedControl, F as SegmentedControlProps, J as SerializableFieldFormat, K as SideNav, N as SideNavItem, O as SideNavProps, bO as SortConfig, bP as SortDirection, bQ as StackNav, bR as StackNavGroup, bS as StackNavItem, bT as StackNavLinkComponentProps, bU as StackNavProps, bV as StackNavRenderRow, bW as StackNavRowRenderProps, bX as StackNavTheme, bY as StaticMap, Q as StaticMapProps, bZ as TableDensity, b_ as TableLayout, b$ as TableWidth, T as TextLink, c0 as TextTransform, c1 as TextTruncatePosition, U as TooltipSeries, V as TopNav, W as TopNavProps, X as UNARY_FILTER_OPERATORS, Y as UNARY_OPERATOR_LABELS, c2 as UNVERIFIED_VOLTAGE_UNIT_ROWS, Z as UnaryFilterOperator, c3 as UseInfiniteScrollOptions, c4 as UseInfiniteScrollReturn, c5 as VoltageUnit, _ as YFormatSettings, c6 as ZoomStops, a0 as activeDeviceStates, c7 as addFilterCondition, a1 as archetypeFor, c8 as baselineFromPoint, a2 as clearColorCache, a3 as createCategoryColorMap, c9 as createEmptyFilter, ca as createFilter, cb as createFilters, a4 as createXScale, a5 as createYScale, a6 as defaultMargin, a7 as deviceStateLabels, a8 as deviceStateMetricFormats, a9 as entityHasDetailPage, aa as entityHasStatList, ab as entityShowsNow, cc as filterToChips, cd as formatComponentValue, ac as getContrastingTextColor, ad as getDefaultChartColor, ae as getDefaultColors, af as getDeviceStateDisplayLabel, af as getDeviceStateLabel, ce as getEntityCategory, ag as getEntityConfig, ah as getEntityIcon, ai as getEntityLabel, aj as getEntityStatList, cf as getFilterFields, ak as getGridStateLabel, al as getResolvedColor, am as getThemeCategoricalColors, an as getYFormatSettings, ao as gridStateLabels, ap as isActiveDeviceState, ap as isActiveState, cg as isFilterEmpty, aq as isLightColor, ar as isUnaryFilterOperator, ch as mapValuesToCategoricalColors, ci as percentThresholdLevel, cj as removeFilterCondition, ck as useChartContext, cl as useComponentFormatter, cm as useInfiniteScroll } from './colors-LvDVM-KX.js';
5
5
  import * as react_jsx_runtime from 'react/jsx-runtime';
6
6
  import * as React$1 from 'react';
7
7
  import React__default, { ReactNode, HTMLAttributes, ComponentProps, CSSProperties, Component, ErrorInfo } from 'react';
package/dist/index.js CHANGED
@@ -44,5 +44,5 @@ import {TooltipTrigger,Tooltip,OverlayArrow,composeRenderProps,DialogTrigger,Men
44
44
  `;return}else W.tagName;}for(let W=0;W<A.childNodes.length;W++)H(A.childNodes[W]);};return H(z),Y},[]),M=useCallback((z,Y)=>{let H=document.createTreeWalker(z,NodeFilter.SHOW_TEXT,{acceptNode:L=>{let I=L.parentElement;return I&&I.closest("[data-chip-id]")?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),A=H.nextNode(),W=Math.max(0,Y);for(;A;){let L=A.nodeValue||"";if(L.length>=W){let I=document.createRange();I.setStart(A,W),I.collapse(true);let J=window.getSelection();J?.removeAllRanges(),J?.addRange(I);return}W-=L.length,A=H.nextNode();}let k=window.getSelection(),C=document.createRange();C.selectNodeContents(z),C.collapse(false),k?.removeAllRanges(),k?.addRange(C);},[]);useEffect(()=>{N.current&&!m&&N.current.textContent!==""&&(N.current.textContent="");},[m]),useLayoutEffect(()=>{if(N.current){if(m===""){if(R)try{N.current.focus({preventScroll:!0}),M(N.current,0);}catch{}return}if(P.current!=null)try{M(N.current,P.current);}finally{P.current=null;}}},[m,M,R]);let B=useCallback((z,Y)=>{if(p?.(z),z===""){x?.();return}if(h&&b&&Y!==void 0){let H=z.slice(0,Y),A=typeof h=="string"?new RegExp(`\\${h}([^\\s]*)$`):h,W=H.match(A);if(W){let k=W[1]||"",C=Y-W[0].length;b({query:k,position:Y,startIndex:C});}else x?.();}},[p,h,b,x]),O=useCallback(z=>{if(!g||!p)return;let Y=f.filter(A=>A.id!==z);g(Y);let H=m.replace(new RegExp(`\\{\\{${z}\\}\\}`,"g"),"");p(H);},[f,g,m,p]),G=useCallback(z=>y?y(z,()=>O(z.id)):jsx(Ur,{variant:v,size:F,onRemove:l?void 0:()=>O(z.id),isDisabled:l,className:"py-0.5 px-1.5 gap-1 text-xs leading-none rounded-md",children:z.label},z.id),[y,v,F,O,l]),Q=()=>{let z=Vt({isInvalid:s,isDisabled:l,isFocused:R,transparent:i,size:o}),Y=`min-h-[100px] py-2 px-3 ${l?"resize-none":c?"resize-y":"resize-none"}`,H=twMerge("focus:outline-none overflow-auto","[&_[data-chip-id]::selection]:bg-action-primary/20","[&:empty]:before:content-[attr(data-placeholder)] [&:empty]:before:text-text-disabled [&:empty]:before:pointer-events-none");return twMerge(z,Y,H,d)},_=()=>m?m.split(/(\{\{[^}]+\}\})/g).map((Y,H)=>{let A=Y.match(/\{\{([^}]+)\}\}/);if(A){let W=A[1],k=f.find(C=>C.id===W);if(k)return jsx("span",{className:"inline-block align-baseline cursor-pointer",contentEditable:false,suppressContentEditableWarning:true,"data-chip-id":W,style:{userSelect:"none",verticalAlign:"baseline",lineHeight:"1"},onClick:C=>{C.preventDefault();let L=window.getSelection(),I=document.createRange();I.selectNode(C.currentTarget),L?.removeAllRanges(),L?.addRange(I);},children:G(k)},`chip-${W}-${H}`)}return Y.includes(`
45
45
  `)?Y.split(`
46
46
  `).map((W,k)=>jsxs(qe__default.Fragment,{children:[W,k<Y.split(`
47
- `).length-1&&jsx("br",{})]},`line-${H}-${k}`)):Y}):null;return jsx("div",{className:"group flex flex-col",children:jsxs("div",{className:"flex flex-col",children:[e&&jsx(Ue,{size:o,tooltip:n,isRequired:a,children:e}),jsx(xt,{children:jsx("div",{ref:N,contentEditable:!l,suppressContentEditableWarning:true,onInput:z=>{if(l)return;let Y=z.target,H=Y.querySelector("[data-chip-id]")!==null,A;if(H?(A=D(Y),A=A.replace(/(\{\{[^}]+\}\})\s{2,}/g,"$1 ").replace(/\s{2,}(\{\{[^}]+\}\})/g," $1")):A=Y.textContent||"",A===""){try{let C=document.createRange();C.selectNodeContents(Y),C.collapse(!0);let L=window.getSelection();L?.removeAllRanges(),L?.addRange(C),P.current=0;}catch{}B("",0);return}if(A===m)return;let W=window.getSelection(),k=0;if(W&&W.rangeCount>0)try{let C=W.getRangeAt(0);if(H){let L=0,I=!1,J=ae=>{if(I)return !0;if(ae===C.startContainer)return L+=C.startOffset,I=!0,!0;if(ae.nodeType===Node.TEXT_NODE){if(!ae.parentElement?.closest("[data-chip-id]")){if(ae.contains(C.startContainer))return L+=C.startOffset,I=!0,!0;L+=(ae.textContent||"").length;}}else if(ae.nodeType===Node.ELEMENT_NODE){let de=ae;if(de.hasAttribute("data-chip-id")){if(de.contains(C.startContainer)||de===C.startContainer){let ie=de.getAttribute("data-chip-id");return L+=`{{${ie}}}`.length,I=!0,!0}let re=de.getAttribute("data-chip-id");return L+=`{{${re}}}`.length,!1}else if(de.tagName==="BR")return de===C.startContainer?(I=!0,!0):(L+=1,!1)}for(let de=0;de<ae.childNodes.length;de++)if(J(ae.childNodes[de]))return !0;return !1};J(Y),k=L;}else {let L=document.createRange();L.setStart(Y,0),L.setEnd(C.startContainer,C.startOffset),k=L.toString().length;}}catch{k=A.length;}P.current=k,B(A,k);},onKeyDown:z=>{if(l)return;let Y=window.getSelection();if(!(!Y||Y.rangeCount===0))try{let H=Y.getRangeAt(0),A=H.commonAncestorContainer;if(z.key==="ArrowLeft"||z.key==="ArrowRight"){let W=A.nodeType===Node.TEXT_NODE?A.parentElement?.closest("[data-chip-id]"):A.closest("[data-chip-id]");if(W){z.preventDefault();try{let k=document.createRange(),C=window.getSelection();z.key==="ArrowLeft"?k.setStartBefore(W):k.setStartAfter(W),k.collapse(!0),C?.removeAllRanges(),C?.addRange(k);}catch{}}}if(z.key==="Backspace"){let W=null;if(W=(A.nodeType===Node.TEXT_NODE?A.parentElement?.closest("[data-chip-id]"):A.closest("[data-chip-id]"))||null,!W)if(A.nodeType===Node.TEXT_NODE){let k=A;if(H.startOffset===0&&k.parentElement){let C=k.previousSibling;if(C&&C.nodeType===Node.ELEMENT_NODE){let L=C.closest("[data-chip-id]");L&&(W=L);}}}else {let k=A;if(H.startOffset>0){let C=k.childNodes[H.startOffset-1];if(C&&C.nodeType===Node.ELEMENT_NODE){let L=C.closest("[data-chip-id]");L&&(W=L);}}}if(W){z.preventDefault(),z.stopPropagation();let k=W.getAttribute("data-chip-id");if(!k)return;let C=`{{${k}}}`,L=m.indexOf(C);if(L!==-1){let I=m.slice(0,L)+m.slice(L+C.length),J=f.filter(ae=>ae.id!==k);P.current=L;try{window.getSelection()?.removeAllRanges();}catch{}g?.(J),p?.(I);}}}}catch{}},onFocus:z=>{l||(w.onFocus&&w.onFocus(z),T(z));},onBlur:z=>{l||(w.onBlur&&w.onBlur(z),E(z));},className:Q(),style:{whiteSpace:"pre-wrap",wordBreak:"break-word",...w.style},"data-placeholder":w.placeholder,children:_()},m===""?"empty":"content")}),t&&jsx(Ne,{size:o,className:"mt-3",children:t}),typeof r=="string"&&jsx(be,{size:o,className:"mt-1",children:r}),typeof r=="function"&&u&&jsx(be,{size:o,className:"mt-1",children:r(u)})]})})}function JA({isPlaceholder:e,isDisabled:t,size:r="md"}){return twMerge("inline-block box-content px-0.5 rounded outline-none tabular-nums text-center transition-colors",{sm:"text-base md:text-xs",md:"text-base md:text-sm",lg:"text-base",xl:"text-lg"}[r],e?"text-text-disabled italic":"text-text-primary",t?"text-text-disabled cursor-not-allowed":"cursor-text",!t&&"hover:bg-background-hover","data-[focused]:bg-background-selected data-[focused]:text-text-primary")}function EC({label:e,description:t,errorMessage:r,size:o="md",tooltip:n,isRequired:a,isDisabled:i,isInvalid:s,reserveErrorSpace:l=true,validationResult:c,className:d,descriptionPlacement:u="below",...m}){return jsxs(TimeField,{...m,isDisabled:i,isRequired:a,isInvalid:s,className:Re(d,"flex flex-col gap-1"),children:[e&&jsx(Ue,{size:o,tooltip:n,description:u==="tooltip"||u==="inline"?t:void 0,descriptionPlacement:u,isRequired:a,children:e}),jsx(xt,{children:jsx(DateInput,{className:twMerge(en({isInvalid:s,isDisabled:i}),"px-3 py-2 flex items-center gap-0.5 w-full"),children:p=>jsx(DateSegment,{segment:p,className:JA({isPlaceholder:p.isPlaceholder,isDisabled:!p.isEditable||i,size:o})})})}),l?jsx("div",{className:"mt-1 min-h-[20px]",children:typeof r=="string"?jsx(be,{size:o,children:r}):typeof r=="function"&&c?jsx(be,{size:o,children:r(c)}):t&&u==="below"?jsx(Ne,{size:o,children:t}):null}):jsx(Fragment,{children:typeof r=="string"?jsx(be,{size:o,className:"mt-1",children:r}):typeof r=="function"&&c?jsx(be,{size:o,className:"mt-1",children:r(c)}):t&&u==="below"?jsx(Ne,{size:o,className:"mt-1",children:t}):null})]})}function MC({children:e,className:t=""}){return jsx("div",{className:`flex flex-col ${t}`.trim(),role:"list",children:e})}function LC({children:e,variant:t="default",icon:r,label:o,isLast:n=false,className:a=""}){let s={default:{dot:"bg-border-default border-border-default",line:"bg-border-default",label:"text-text-secondary",content:"text-text-primary"},active:{dot:"bg-text-primary border-text-primary",line:"bg-border-default",label:"text-text-secondary",content:"text-text-primary font-medium"},muted:{dot:"bg-border-muted border-border-muted",line:"bg-border-muted",label:"text-text-secondary",content:"text-text-secondary"},success:{dot:"bg-feedback-success-border border-feedback-success-border",line:"bg-border-default",label:"text-text-secondary",content:"text-text-primary"},error:{dot:"bg-feedback-error-border border-feedback-error-border",line:"bg-border-default",label:"text-text-secondary",content:"text-text-primary"},warning:{dot:"bg-feedback-warning-border border-feedback-warning-border",line:"bg-border-default",label:"text-text-secondary",content:"text-text-primary"},info:{dot:"bg-feedback-info-border border-feedback-info-border",line:"bg-border-default",label:"text-text-secondary",content:"text-text-primary"}}[t];return jsxs("div",{className:`flex gap-3 ${a}`.trim(),role:"listitem",children:[jsxs("div",{className:"flex flex-col items-center",style:{width:"20px"},children:[jsx("div",{className:`flex items-center justify-center rounded-full border-2 ${s.dot}`,style:{width:"20px",height:"20px",flexShrink:0},children:r&&jsx(V,{name:r,size:12,className:"text-background-body"})}),!n&&jsx("div",{className:`w-0.5 flex-1 ${s.line}`,style:{minHeight:"24px"}})]}),jsxs("div",{className:"flex-1 pb-6",children:[o&&jsx("div",{className:`text-xs mb-1 ${s.label}`,children:o}),jsx("div",{className:`text-sm ${s.content}`,children:e})]})]})}function ZA(e){return "primary"}var _A="flex font-medium justify-center items-center gap-2 text-center transition whitespace-nowrap box-border",DC={primary:{selected:"bg-action-primary text-[color:var(--color-action-primary-text)] hover:bg-action-primary-hover forced-colors:bg-[ButtonText] forced-colors:text-[ButtonFace] border-2 border-transparent",unselected:"bg-transparent text-action-primary border-2 border-border-muted hover:bg-text-primary/[0.05] forced-colors:border-[ButtonBorder] forced-colors:bg-[ButtonFace] forced-colors:text-[ButtonText]"}},$A="opacity-[--control-hover-opacity] cursor-not-allowed pointer-events-none grayscale",eI="opacity-100 cursor-pointer",tI={"top-right":"-right-2 -top-2","top-left":"-left-2 -top-2","bottom-right":"-right-2 -bottom-2","bottom-left":"-left-2 -bottom-2"},rI={primary:"bg-action-primary text-[color:var(--color-action-primary-text)]",destructive:"bg-feedback-error-border text-text-inverse"};function oI(e){let{variant:t="primary",size:r="md",isDisabled:o,isSelected:n,borderRadius:a,borderRight:i,borderLeft:s}=e,l=ZA(),c=`${_A} ${n?DC[l].selected:DC[l].unselected}`;return c+=` ${Ge[r].text} ${Ge[r].height} ${Ge[r].padding} ${Ge[r].gap}`,c+=` ${o?$A:eI}`,a==="left"&&(c+=" rounded-l-sm"),a==="right"&&(c+=" rounded-r-sm"),i&&(c+=" border-r"),s&&(c+=" border-l"),c+=` ${tt()}`,(c+=" focus-visible:outline-action-primary"),twMerge(c)}function IC(e){let{className:t,children:r,onPress:o,icon:n,iconPosition:a="left",iconWeight:i,isLoading:s=false,loadingText:l,loadingIndicator:c,size:d="md",badgeNumber:u,badgeVariant:m="primary",badgePosition:p="top-right",...f}=e,g=n?jsx(V,{name:n,size:d,weight:i}):null,h=()=>{let x=jsxs(Fragment,{children:[a==="left"&&g,r,a==="right"&&g]});return s?jsxs("div",{className:"relative inline-flex items-center justify-center",children:[jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:c||jsx(V,{name:"CircleNotch",size:d,className:"animate-spin","aria-hidden":"true"})}),jsx("div",{className:"invisible","aria-hidden":"true",children:x}),l&&jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:l})]}):x},b=jsx(ToggleButton,{onPress:o,...f,className:twMerge(oI(e),t),"aria-busy":s,children:h()});return u&&u>0?jsxs("div",{className:"relative",children:[b,jsx("span",{className:`absolute ${tI[p]} flex h-5 w-5 items-center justify-center rounded-full ${rI[m]} text-xs`,"aria-label":`${u} items`,children:u})]}):b}var aI={open:{className:"text-feedback-success-border",token:"--color-feedback-success-border",label:"Open"},closed:{className:"text-feedback-error-border",token:"--color-feedback-error-border",label:"Closed"}},iI={platform:{label:"Platform",description:"Core product objects that structure the Texture workspace.",icon:"Stack",order:0},grid:{label:"Grid Elements",description:"Physical utility-grid infrastructure imported from a customer's GIS export.",icon:"TreeStructure",order:1},device:{label:"Devices",description:"Behind-the-meter connected energy devices.",icon:"Lightning",order:2}},sI=["energized","customerName","gs_max_continuous_current"],lI=["CAPACITOR.nominalVoltage","NODE.nominalVoltage","REGULATOR.outputVoltagePhA","REGULATOR.outputVoltagePhB","REGULATOR.outputVoltagePhC","GENERATOR.outputVoltage","MOTOR.voltage"],gt={TRANSFORMER:[{key:"capacityKva",label:"kVA Rating",format:{type:"power",unit:"kVA",decimals:0}},{key:"primaryVoltageKv",label:"Primary Voltage",format:{type:"voltage",unit:"kV",decimals:1}},{key:"outputVoltageKv",label:"Output Voltage",format:{type:"voltage",unit:"kV",decimals:2}}],CONSUMER:[{key:"meterNumber",label:"Meter Number",format:{type:"text"}}],SOURCE:[{key:"voltageKv",label:"Nominal Voltage",format:{type:"voltage",unit:"kV",decimals:1}},{key:"substationNumber",label:"Substation Number",format:{type:"text"}}],SWITCH:[{key:"switchId",label:"Switch ID",format:{type:"text"}},{key:"ratedCurrent",label:"Rated Current",format:{type:"number",unit:"A",decimals:0}},{key:"normalState",label:"Normal State",format:{type:"text"}}],CAPACITOR:[{key:"unitSizeKvar",label:"Capacity",format:{type:"power",unit:"kVar",decimals:1}},{key:"nominalVoltage",label:"Nominal Voltage",format:{type:"voltage",unit:"V",decimals:0}}],OVERCURRENT_DEVICE:[{key:"ratedCurrent",label:"Rated Current",format:{type:"number",unit:"A",decimals:0}},{key:"deviceType",label:"Device Type",format:{type:"text"}}],REGULATOR:[{key:"outputVoltagePhA",label:"Output Voltage Phase A",format:{type:"voltage",unit:"V",decimals:0}},{key:"outputVoltagePhB",label:"Output Voltage Phase B",format:{type:"voltage",unit:"V",decimals:0}},{key:"outputVoltagePhC",label:"Output Voltage Phase C",format:{type:"voltage",unit:"V",decimals:0}},{key:"ratedPower",label:"Rated Power",format:{type:"power",unit:"kVA",decimals:1}}],OVERHEAD_LINE:[{key:"impedanceLength",label:"Length",format:{type:"distance",unit:"ft",decimals:0}},{key:"conductorDescPhA",label:"Conductor Phase A",format:{type:"text"}},{key:"conductorDescPhB",label:"Conductor Phase B",format:{type:"text"}},{key:"conductorDescPhC",label:"Conductor Phase C",format:{type:"text"}}],UNDERGROUND_LINE:[{key:"impedanceLength",label:"Length",format:{type:"distance",unit:"ft",decimals:0}},{key:"conductorDescPhA",label:"Conductor Phase A",format:{type:"text"}},{key:"conductorDescPhB",label:"Conductor Phase B",format:{type:"text"}},{key:"conductorDescPhC",label:"Conductor Phase C",format:{type:"text"}}],NODE:[{key:"nominalVoltage",label:"Nominal Voltage",format:{type:"voltage",unit:"V",decimals:0}}],GENERATOR:[{key:"ratedPower",label:"Rated Power",format:{type:"power",unit:"kW",decimals:1}},{key:"outputVoltage",label:"Output Voltage",format:{type:"voltage",unit:"V",decimals:0}}],MOTOR:[{key:"ratedPower",label:"Rated Power",format:{type:"power",unit:"kW",decimals:1}},{key:"voltage",label:"Voltage",format:{type:"voltage",unit:"V",decimals:0}}]},Sa={app:{icon:"AppWindow",category:"platform",archetype:"platform",detailPage:false,label:{singular:"App",plural:"Apps"},description:"Workspace tools and third-party integrations"},site:{icon:"MapPin",category:"platform",archetype:"platform",detailPage:true,label:{singular:"Site",plural:"Sites"},description:"Physical location housing energy systems"},device:{icon:"ShareNetwork",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Device",plural:"Devices"},description:"Connected, controllable energy device"},customer:{icon:"Users",category:"platform",archetype:"platform",detailPage:true,label:{singular:"Customer",plural:"Customers"},description:"End customer or owner of one or more sites"},contact:{icon:"Users",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Contact",plural:"Contacts"},description:"Person associated with a customer or site"},program:{icon:"ClipboardText",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Program",plural:"Programs"},description:"Demand-response or virtual power plant program"},workflow:{icon:"FlowArrow",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Workflow",plural:"Workflows"},description:"Automated rule that runs in response to events"},collection:{icon:"Stack",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Collection",plural:"Collections"},description:"Named group of related entities or records"},board:{icon:"SquaresFour",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Board",plural:"Boards"},description:"Dashboard for monitoring metrics and devices"},report:{icon:"ChartLine",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Report",plural:"Reports"},description:"Saved analytics view or generated report"},event:{icon:"ClockCounterClockwise",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Event",plural:"Events"},description:"Recorded system event or logged activity"},alert:{icon:"Warning",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Alert",plural:"Alerts"},description:"Notification raised when attention is needed"},monitor:{icon:"Pulse",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Monitor",plural:"Monitors"},description:"Rule that watches a metric against a threshold"},command:{icon:"Play",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Command",plural:"Commands"},description:"Control action issued to a connected device"},source:{icon:"TextureSource",category:"grid",archetype:"grid-energized",detailPage:true,properties:{statList:gt.SOURCE},label:{singular:"Source",plural:"Sources"},description:"Upstream feed where the network originates"},substation:{icon:"TextureSource",category:"grid",archetype:"grid-energized",detailPage:true,properties:{statList:gt.SOURCE},label:{singular:"Substation",plural:"Substations"},description:"Facility that steps down transmission voltage"},capacitor:{icon:"TextureCapacitor",category:"grid",archetype:"grid-energized",detailPage:true,properties:{statList:gt.CAPACITOR},label:{singular:"Capacitor",plural:"Capacitors"},description:"Capacitor bank for power-factor and voltage support"},switch:{icon:"TextureSwitchClosed",category:"grid",archetype:"grid-energized",detailPage:true,properties:{statList:gt.SWITCH},label:{singular:"Switch",plural:"Switches"},description:"Sectionalizing or disconnect switch on the line",states:{open:{icon:"TextureSwitch",color:"open"},closed:{icon:"TextureSwitchClosed",color:"closed"}}},sectionalizer:{icon:"TextureSectionalizerClosed",category:"grid",archetype:"grid-energized",detailPage:true,properties:{statList:gt.SWITCH},label:{singular:"Sectionalizer",plural:"Sectionalizers"},description:"Counts upstream recloser trips and opens to isolate a faulted section",states:{open:{icon:"TextureSectionalizerOpen",color:"open"},closed:{icon:"TextureSectionalizerClosed",color:"closed"}}},relay:{icon:"Cpu",category:"grid",archetype:"grid-energized",detailPage:true,properties:{statList:gt.NODE},label:{singular:"Relay",plural:"Relays"},description:"Microprocessor relay that senses faults and trips devices"},transformer:{icon:"TextureTransformer",category:"grid",archetype:"grid-energized",detailPage:true,properties:{statList:gt.TRANSFORMER},label:{singular:"Transformer",plural:"Transformers"},description:"Transformer that steps voltage up or down"},meter:{icon:"Gauge",category:"grid",archetype:"grid-energized",detailPage:true,properties:{statList:gt.CONSUMER},label:{singular:"Meter",plural:"Meters"},description:"Revenue meter at the point of consumption"},consumer:{icon:"Gauge",category:"grid",archetype:"grid-energized",detailPage:true,properties:{statList:gt.CONSUMER},label:{singular:"Consumer",plural:"Consumers"},description:"Service point or customer premise on the grid"},singlePhaseOverheadLine:{icon:"TextureSinglePhaseOverheadLine",category:"grid",archetype:"grid-line",detailPage:true,properties:{statList:gt.OVERHEAD_LINE},label:{singular:"Single-Phase Overhead Line",plural:"Single-Phase Overhead Lines"},description:"Overhead line carrying one phase conductor"},twoPhaseOverheadLine:{icon:"TextureTwoPhaseOverheadLine",category:"grid",archetype:"grid-line",detailPage:true,properties:{statList:gt.OVERHEAD_LINE},label:{singular:"Two-Phase Overhead Line",plural:"Two-Phase Overhead Lines"},description:"Overhead line carrying two phase conductors"},threePhaseOverheadLine:{icon:"TextureThreePhaseOverheadLine",category:"grid",archetype:"grid-line",detailPage:true,properties:{statList:gt.OVERHEAD_LINE},label:{singular:"Three-Phase Overhead Line",plural:"Three-Phase Overhead Lines"},description:"Overhead line carrying three phase conductors"},singlePhaseUndergroundLine:{icon:"TextureSinglePhaseUndergroundLine",category:"grid",archetype:"grid-line",detailPage:true,properties:{statList:gt.UNDERGROUND_LINE},label:{singular:"Single-Phase Underground Line",plural:"Single-Phase Underground Lines"},description:"Buried line carrying one phase conductor"},twoPhaseUndergroundLine:{icon:"TextureTwoPhaseUndergroundLine",category:"grid",archetype:"grid-line",detailPage:true,properties:{statList:gt.UNDERGROUND_LINE},label:{singular:"Two-Phase Underground Line",plural:"Two-Phase Underground Lines"},description:"Buried line carrying two phase conductors"},threePhaseUndergroundLine:{icon:"TextureThreePhaseUndergroundLine",category:"grid",archetype:"grid-line",detailPage:true,properties:{statList:gt.UNDERGROUND_LINE},label:{singular:"Three-Phase Underground Line",plural:"Three-Phase Underground Lines"},description:"Buried line carrying three phase conductors"},motorSwitch:{icon:"Diamond",category:"grid",archetype:"grid-energized",detailPage:true,properties:{statList:gt.MOTOR},label:{singular:"Motor Switch",plural:"Motor Switches"},description:"Motor-operated switch or motor load element"},recloser:{icon:"TextureRecloser",category:"grid",archetype:"grid-energized",detailPage:true,properties:{statList:gt.OVERCURRENT_DEVICE},label:{singular:"Recloser",plural:"Reclosers"},description:"Auto-reclosing device that clears transient faults",states:{open:{color:"open"},closed:{color:"closed"}}},fuse:{icon:"TextureFuse",category:"grid",archetype:"grid-energized",detailPage:true,properties:{statList:gt.OVERCURRENT_DEVICE},label:{singular:"Fuse",plural:"Fuses"},description:"Fusible element providing overcurrent protection"},breaker:{icon:"TextureBreaker",category:"grid",archetype:"grid-energized",detailPage:true,properties:{statList:gt.OVERCURRENT_DEVICE},label:{singular:"Breaker",plural:"Breakers"},description:"Circuit breaker that interrupts fault current",states:{open:{color:"open"},closed:{color:"closed"}}},generator:{icon:"Wind",category:"grid",archetype:"grid-energized",detailPage:true,properties:{statList:gt.GENERATOR},label:{singular:"Generator",plural:"Generators"},description:"Distributed generation unit feeding the grid"},regulator:{icon:"TextureRegulator",category:"grid",archetype:"grid-energized",detailPage:true,properties:{statList:gt.REGULATOR},label:{singular:"Regulator",plural:"Regulators"},description:"Voltage regulator that holds line voltage in range"},supportStructure:{icon:"TextureSupportStructure",category:"grid",archetype:"grid-line",detailPage:true,properties:{statList:gt.NODE},label:{singular:"Support Structure",plural:"Support Structures"},description:"Structure carrying overhead line equipment"},battery:{icon:"BatteryHigh",category:"device",archetype:"device",detailPage:true,label:{singular:"Battery",plural:"Batteries"},description:"Behind-the-meter battery or storage system",fusedMetricId:"soc",fields:{headlineMetrics:[{id:"power",label:"device.battery.fields.power",source:{kind:"state",path:"state.gridPower"},format:{type:"power",decimals:1},icon:"Lightning"},{id:"soc",label:"device.battery.fields.soc",source:{kind:"state",path:"state.chargePercentage"},format:{type:"percentage",decimals:0},icon:"BatteryCharging"},{id:"backupReserve",label:"device.battery.fields.backupReserve",source:{kind:"state",path:"state.backupReserve"},format:{type:"percentage",decimals:0},icon:"BatteryCharging"},{id:"loadPower",label:"device.battery.fields.loadPower",source:{kind:"state",path:"state.loadPower"},format:{type:"power",decimals:1},icon:"Lightning"}]},stateRules:{primaryState:{label:"device.battery.fields.status",fieldPath:"state.chargingState",mapping:{charging:"charging",discharging:"discharging",idle:"idle",unknown:"unknown"},fallback:"unknown"},secondaryState:{label:"device.battery.fields.gridState",fieldPath:"state.gridStatus",mapping:{importing:"importing",exporting:"exporting",idle:"importing",unknown:"importing"},fallback:"importing"}}},evCharger:{icon:"ChargingStation",category:"device",archetype:"device",detailPage:true,label:{singular:"EV Charger",plural:"EV Chargers"},description:"Electric-vehicle charging station or port",fusedMetricId:"power",fields:{headlineMetrics:[{id:"power",label:"device.evCharger.fields.power",source:{kind:"state",path:"state.chargerWattage"},format:{type:"power",decimals:1},icon:"Lightning"},{id:"isPluggedIn",label:"device.evCharger.fields.isPluggedIn",source:{kind:"state",path:"state.isPluggedIn"},format:{type:"boolean",trueText:"Yes",falseText:"No"},icon:"Plug"},{id:"voltage",label:"device.evCharger.fields.voltage",source:{kind:"state",path:"state.chargerVoltage"},format:{type:"voltage",decimals:1},icon:"Lightning"},{id:"current",label:"device.evCharger.fields.current",source:{kind:"state",path:"state.chargerCurrent"},format:{type:"current",decimals:1},icon:"Lightning"}]},stateRules:{primaryState:{label:"device.evCharger.fields.status",fieldPath:"state.chargingState",mapping:{charging:"charging",discharging:"discharging",idle:"idle",unknown:"unknown"},fallback:"unknown"}}},inverter:{icon:"Sun",category:"device",archetype:"device",detailPage:true,label:{singular:"Solar / Inverter",plural:"Solar / Inverters"},description:"Solar PV inverter and its connected array",fusedMetricId:"power",fields:{headlineMetrics:[{id:"power",label:"device.inverter.fields.power",source:{kind:"state",path:"state.power"},format:{type:"power",decimals:0},icon:"Lightning"},{id:"gridPower",label:"device.inverter.fields.gridPower",source:{kind:"state",path:"state.gridPower"},format:{type:"power",decimals:0},icon:"GridFour"},{id:"generatedEnergy",label:"device.inverter.fields.generatedEnergy",source:{kind:"state",path:"state.generatedEnergy"},format:{type:"energy",decimals:1},icon:"Lightning"},{id:"lifetimeEnergyGenerated",label:"device.inverter.fields.lifetimeEnergyGenerated",source:{kind:"state",path:"state.lifetimeEnergyGenerated"},format:{type:"energy",decimals:0},icon:"Lightning"}]},stateRules:{primaryState:{label:"device.inverter.fields.gridStatus",fieldPath:"state.gridStatus",mapping:{exporting:"exporting",importing:"importing",idle:"idle"},fallback:"unknown"}}},thermostat:{icon:"Thermometer",category:"device",archetype:"device",detailPage:true,label:{singular:"Thermostat",plural:"Thermostats"},description:"Smart thermostat or connected HVAC control",fusedMetricId:"ambientTemperature",fields:{headlineMetrics:[{id:"ambientTemperature",label:"device.thermostat.fields.ambientTemperature",source:{kind:"state",path:"state.ambientTemperature"},format:{type:"temperature",decimals:0},icon:"Thermometer"},{id:"heatTarget",label:"device.thermostat.fields.heatTarget",source:{kind:"state",path:"state.heatTarget"},format:{type:"temperature",decimals:0},icon:"Flame"},{id:"coolTarget",label:"device.thermostat.fields.coolTarget",source:{kind:"state",path:"state.coolTarget"},format:{type:"temperature",decimals:0},icon:"Snowflake"},{id:"fanMode",label:"device.thermostat.fields.fanMode",source:{kind:"state",path:"state.fanMode"},format:{type:"text"}}]},stateRules:{primaryState:{label:"device.thermostat.fields.operatingMode",fieldPath:"state.operatingMode",mapping:{heat:"heat",cool:"cool",auto:"auto",off:"off",eco:"eco",unknown:"unknown"},fallback:"unknown"}}},vehicle:{icon:"Car",category:"device",archetype:"device",detailPage:true,label:{singular:"EV",plural:"EVs"},description:"Electric vehicle managed as a flexible load",fusedMetricId:"chargePercentage",fields:{headlineMetrics:[{id:"chargePercentage",label:"device.vehicle.fields.chargePercentage",source:{kind:"state",path:"state.chargePercentage"},format:{type:"percentage",decimals:0},icon:"BatteryCharging"},{id:"range",label:"device.vehicle.fields.range",source:{kind:"state",path:"state.range"},format:{type:"distance",unit:"mi",decimals:0},icon:"GasPump"},{id:"chargeLimit",label:"device.vehicle.fields.chargeLimit",source:{kind:"state",path:"state.chargeLimit"},format:{type:"percentage",decimals:0},icon:"BatteryCharging"},{id:"isPluggedIn",label:"device.vehicle.fields.isPluggedIn",source:{kind:"state",path:"state.isPluggedIn"},format:{type:"boolean",trueText:"Yes",falseText:"No"},icon:"Plug"}]},stateRules:{primaryState:{label:"device.vehicle.fields.status",fieldPath:"state.chargingState",mapping:{charging:"charging",discharging:"discharging",idle:"idle",unknown:"unknown"},fallback:"unknown"}}},waterHeater:{icon:"Drop",category:"device",archetype:"device",detailPage:true,label:{singular:"Water Heater",plural:"Water Heaters"},description:"Connected or smart electric water heater"}},cI={source:"SOURCE",substation:"SOURCE",capacitor:"CAPACITOR",switch:"SWITCH",sectionalizer:"SWITCH",relay:"NODE",transformer:"TRANSFORMER",meter:"CONSUMER",consumer:"CONSUMER",singlePhaseOverheadLine:"OVERHEAD_LINE",twoPhaseOverheadLine:"OVERHEAD_LINE",threePhaseOverheadLine:"OVERHEAD_LINE",singlePhaseUndergroundLine:"UNDERGROUND_LINE",twoPhaseUndergroundLine:"UNDERGROUND_LINE",threePhaseUndergroundLine:"UNDERGROUND_LINE",motorSwitch:"MOTOR",recloser:"OVERCURRENT_DEVICE",fuse:"OVERCURRENT_DEVICE",breaker:"OVERCURRENT_DEVICE",generator:"GENERATOR",regulator:"REGULATOR",supportStructure:"NODE"};function fd(e){return Sa[e]}function dI(e){return Sa[e].icon}function uI(e,t=false){return t?Sa[e].label.plural:Sa[e].label.singular}function pI(e){return Sa[e].category}var mI={min:2,max:4};function fI(e){let t=Sa[e];if(!t)throw new Error(`archetypeFor: unknown entity type "${String(e)}"`);return t.archetype}function gI(e){return fd(e).detailPage}function bI(e){return (fd(e).fields?.headlineMetrics.length??0)>0}function FC(e){return fd(e).properties?.statList??[]}function hI(e){return FC(e).length>0}function xI({formId:e="dialog-form",onSubmit:t,primaryLabel:r="Save",secondaryLabel:o="Cancel",onCancel:n,primaryVariant:a,secondaryVariant:i="secondary",children:s,title:l,...c}){return jsx(dr,{title:l,primaryAction:{label:r,onPress:()=>{let u=document.getElementById(e);u&&u.requestSubmit();},variant:a},secondaryAction:n?{label:o,onPress:n,variant:i}:void 0,...c,children:jsx(oi,{id:e,onSubmit:t,children:s})})}function yI({formId:e="drawer-form",onSubmit:t,primaryLabel:r="Save",secondaryLabel:o="Cancel",onCancel:n,primaryVariant:a,secondaryVariant:i="secondary",children:s,...l}){return jsx(os,{primaryAction:{label:r,onPress:()=>{let d=document.getElementById(e);d&&d.requestSubmit();},variant:a},secondaryAction:n?{label:o,onPress:n,variant:i}:void 0,...l,children:jsx(oi,{id:e,onSubmit:t,className:"mt-2",children:s})})}function CI({align:e="end",className:t,...r}){return jsx("div",{...r,className:twMerge("flex gap-2",e==="start"?"justify-start":e==="between"?"justify-between":"justify-end",t)})}var NI={sm:"gap-2",md:"gap-4",lg:"gap-6"};function kI(e){if(!e)return "";let t=e.base?`grid-cols-${e.base}`:"",r=e.md?`md:grid-cols-${e.md}`:"",o=e.lg?`lg:grid-cols-${e.lg}`:"";return [t,r,o].filter(Boolean).join(" ")}function TI({cols:e={base:1},gap:t="lg",className:r,...o}){return jsx("div",{...o,className:twMerge("grid",kI(e),NI[t],r)})}function EI({title:e,description:t,showDivider:r,className:o,children:n,...a}){return jsxs("section",{...a,className:twMerge("flex flex-col",o),children:[(e||t)&&jsxs("div",{className:"flex flex-col gap-1 mb-6",children:[typeof e=="string"?jsx(cr,{tag:"h3",size:"sm",children:e}):e,t?jsx(Ne,{size:"lg",children:t}):null]}),jsx("div",{className:"flex flex-col gap-6",children:n}),r&&jsx("hr",{className:"mt-2 border-border-muted"})]})}function MI(){return jsx("hr",{className:"border-border-muted"})}function LI({steps:e,currentStepId:t,onStepClick:r,className:o}){let n=e.findIndex(a=>a.id===t);return jsx("nav",{"aria-label":"Progress",className:twMerge("w-full",o),children:jsx("div",{className:"relative mb-12",children:jsx("ol",{className:"relative flex items-start justify-between",children:e.map((a,i)=>{let s=a.id===t,l=i<n,c=r&&(l||s);return jsxs("li",{className:"relative flex flex-col items-center",style:{flex:`1 1 ${100/e.length}%`},children:[jsx("button",{type:"button",disabled:!c,onClick:()=>c&&r?.(a.id),className:twMerge("relative z-10 flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-full border-2 transition-colors bg-background-body",l&&"border-action-primary bg-action-primary text-text-inverse hover:bg-action-primary/90",s&&"border-action-primary bg-background-body text-action-primary",!l&&!s&&"border-border-default bg-background-body text-text-secondary",c&&"cursor-pointer",!c&&"cursor-default"),"aria-current":s?"step":void 0,children:l?jsx(V,{name:"Check",size:20,weight:"bold"}):jsx("span",{className:"text-sm font-semibold",children:i+1})}),i<e.length-1&&jsx("div",{className:"absolute top-5 h-0.5 transition-colors",style:{left:"50%",width:"100%",marginLeft:"20px",backgroundColor:i<n?"var(--color-action-primary)":"var(--color-border-default)"}}),jsxs("div",{className:"mt-3 flex flex-col items-center text-center w-32",children:[jsx("span",{className:twMerge("text-sm font-medium",s&&"text-text-default",l&&"text-text-primary",!s&&!l&&"text-text-secondary"),children:a.title}),a.description&&jsx("span",{className:"mt-1 text-xs text-text-secondary",children:a.description})]})]},a.id)})})})})}function AI({formId:e,show:t,isSubmitting:r,onCancel:o,primaryLabel:n="Save changes",secondaryLabel:a="Cancel",className:i}){return t?jsx("div",{className:twMerge("fixed inset-x-0 bottom-0 z-40 border-t border-border-muted bg-background-surface/95 backdrop-blur supports-[backdrop-filter]:bg-background-surface/70",i),children:jsxs("div",{className:"mx-auto flex max-w-screen-lg items-center justify-between gap-3 p-3",children:[jsx("div",{className:"text-sm text-text-secondary",children:"You have unsaved changes"}),jsxs("div",{className:"flex gap-2",children:[jsx(te,{variant:"secondary",onPress:o,children:a}),jsx(te,{type:"submit",form:e,isDisabled:!!r,children:r?"Saving...":n})]})]})}):null}function II({when:e,message:t="You have unsaved changes. Leave anyway?"}){return qe.useEffect(()=>{if(!e)return;let r=o=>(o.preventDefault(),o.returnValue=t,t);return window.addEventListener("beforeunload",r),()=>window.removeEventListener("beforeunload",r)},[e,t]),null}function FI({steps:e,initialStepId:t,canNavigate:r}){if(e.length===0)throw new Error("useWizard: steps array cannot be empty");let[o,n]=qe.useState(t||e[0].id),a=e.findIndex(u=>u.id===o),i=a>0,s=a<e.length-1,l=async u=>u===o?true:r&&!await r(o,u)?false:(n(u),true);return {steps:e,currentStepId:o,setCurrentStepId:l,next:async()=>!s||a===-1?false:l(e[a+1].id),prev:async()=>!i||a===-1?false:l(e[a-1].id),hasNext:s,hasPrev:i,stepIndex:a}}function Ms(e,t){return t.split(".").reduce((r,o)=>r?.[o],e)}function UC(e){return e==null?true:Array.isArray(e)?e.length===0:typeof e=="string"?e.trim()==="":false}function VI(e,t){let r=Ms(e,t.field),o=t.value;switch(t.operator){case "eq":return r===o;case "neq":return r!==o;case "in":return Array.isArray(o)?Array.isArray(r)?r.some(n=>o.includes(n)):o.includes(r):false;case "nin":return Array.isArray(o)?Array.isArray(r)?!r.some(n=>o.includes(n)):!o.includes(r):false;case "gt":return r instanceof Date&&typeof o=="string"?r>new Date(o):r>o;case "gte":return r instanceof Date&&typeof o=="string"?r>=new Date(o):r>=o;case "lt":return r instanceof Date&&typeof o=="string"?r<new Date(o):r<o;case "lte":return r instanceof Date&&typeof o=="string"?r<=new Date(o):r<=o;case "contains":return typeof r!="string"?false:r.toLowerCase().includes(String(o).toLowerCase());case "startsWith":return typeof r!="string"?false:r.toLowerCase().startsWith(String(o).toLowerCase());case "endsWith":return typeof r!="string"?false:r.toLowerCase().endsWith(String(o).toLowerCase());case "isEmpty":return UC(r);case "isNotEmpty":return !UC(r);default:return false}}function KC(e,t){if(t.conditions.length===0)return true;let r=t.conditions.map(o=>"conditions"in o?KC(e,o):VI(e,o));return t.logic==="AND"?r.every(Boolean):r.some(Boolean)}function OI(e,t){return !t||t.conditions.length===0?e:e.filter(r=>KC(r,t))}function zI(e,t,r){if(e==null&&t==null)return 0;if(e==null)return r==="asc"?1:-1;if(t==null)return r==="asc"?-1:1;if(e instanceof Date&&t instanceof Date){let o=e.getTime()-t.getTime();return r==="asc"?o:-o}if(typeof e=="string"&&typeof t=="string"){let o=e.toLowerCase().localeCompare(t.toLowerCase());return r==="asc"?o:-o}return e<t?r==="asc"?-1:1:e>t?r==="asc"?1:-1:0}function HI(e,t){return t?[...e].sort((r,o)=>{let n=Ms(r,t.field),a=Ms(o,t.field);return zI(n,a,t.direction)}):e}function GI(e,t){if(!t||!t.query.trim())return e;let{query:r,fields:o,fuzzy:n=true,threshold:a=.3}=t;if(n)return new BI(e,{keys:o,threshold:a,ignoreLocation:true,includeScore:true}).search(r).map(c=>c.item);let i=r.toLowerCase();return e.filter(s=>o.some(l=>{let c=Ms(s,l);return c==null?false:String(c).toLowerCase().includes(i)}))}function WI(e,t){let r={};for(let o of t){if(r[o.field]={},o.values)for(let n of o.values)r[o.field][String(n.value)]=0;for(let n of e){let a=Ms(n,o.field);if(a!=null)if(Array.isArray(a))for(let i of a){let s=String(i);r[o.field][s]=(r[o.field][s]||0)+1;}else {let i=String(a);r[o.field][i]=(r[o.field][i]||0)+1;}}}return r}function Wm({data:e,filters:t,sort:r,search:o,facetConfigs:n=[]}){let a=GI(e,o||null);a=OI(a,t||null);let i=WI(a,n);return a=HI(a,r||null),{data:a,facetCounts:i,resultCount:a.length}}function bd({data:e,filters:t,sort:r,search:o,facetConfigs:n=[]}){return useMemo(()=>Wm({data:e,filters:t,sort:r,search:o,facetConfigs:n}),[e,t,r,o,n])}function hd({filters:e,sort:t,search:r,onStateChange:o,searchDebounce:n=300}){let a=$o(r,n),i=useRef(true);useEffect(()=>{if(i.current){i.current=false;return}o({filters:e,sort:t,search:a});},[e,t,a,o]);}function YC(e){return e.mode==="client"?bd({data:e.data,filters:e.filters,sort:e.sort,search:e.search,facetConfigs:e.facetConfigs}):(hd({filters:e.filters,sort:e.sort,search:e.search,onStateChange:e.onStateChange,searchDebounce:e.searchDebounce}),{data:e.data,facetCounts:e.facetCounts||{},resultCount:e.resultCount??e.data.length})}var JC=Qm(np());function XI(e,t,r=true){let o=e;if(r){let n=new Date().toISOString().replace(/[:.]/g,"-").slice(0,-5);return `${o}-${n}.${t}`}return `${o}.${t}`}function jI(e,t){return t.accessor?typeof t.accessor=="function"?t.accessor(e):e[t.accessor]:null}function XC(e,t){let r=jI(t,e);return e.exportValue?e.exportValue(r,t)??"":r==null?"":r instanceof Date?r.toISOString():typeof r=="object"?JSON.stringify(r):r}function Um(e){return e.filter(t=>t.exportable!==false)}function jC(e){let t=e.map(n=>n.exportLabel||n.label),r=new Set,o=[];for(let n of t)r.has(n)?o.includes(n)||o.push(n):r.add(n);if(o.length>0)throw new Error(`Duplicate export headers found: ${o.join(", ")}. Use exportLabel to provide unique headers.`)}async function Km(e){let{columns:t,data:r,metadata:o={}}=e;try{let n=Um(t);if(n.length===0)throw new Error("No exportable columns found");jC(n);let a=r.map(c=>{let d={};for(let u of n){let m=u.exportLabel||u.label;d[m]=XC(u,c);}return d}),i=iP.unparse(a,{header:!0,skipEmptyLines:!0}),s=new Blob([i],{type:"text/csv;charset=utf-8;"}),l=XI(o.filename||"table-data","csv",o.timestamp!==!1);(0,JC.saveAs)(s,l);}catch(n){throw new Error(`CSV export failed: ${n instanceof Error?n.message:"Unknown error"}`)}}function qI(e){let{columns:t,data:r}=e,o=Um(t);return jC(o),r.map(n=>{let a={};for(let i of o){let s=i.exportLabel||i.label;a[s]=XC(i,n);}return a})}function QI(e){return Um(e).map(t=>t.exportLabel||t.label)}function qC({columns:e,data:t,metadata:r}){let n=e.filter(i=>i.exportable!==false).length>0&&t.length>0;return {exportCSV:useCallback(async()=>{try{await Km({columns:e,data:t,metadata:r});}catch(i){throw console.error("Table export failed:",i),i}},[e,t,r]),canExport:n}}function Xse(e){switch(e){case "charging":case "on":return "success";case "discharging":return "warning";case "heat":case "cool":return "info";case "off":case "idle":case "eco":case "auto":return "neutral";default:return "neutral"}}export{sI as ABSENT_GRID_FIELDS,ux as ActionCell,Ba as ActionMenu,hu as ActivityFeed,_s as ActivityFeedGroup,$s as ActivityItem,wg as Alert,Lg as AppShell,dn as AreaSeries,uc as AutoMobileRenderer,sl as Autocomplete,Io as Avatar,Pn as BREAKPOINTS,ut as Badge,mx as BadgeCell,cl as Banner,Cl as BarSeries,fx as BooleanCell,lf as BrandProvider,ul as BreadcrumbItem,dl as Breadcrumbs,te as Button,zc as CATEGORICAL_RAMP,gx as CATEGORY_COLOR_TOKENS,ql as CATEGORY_NEUTRAL_COLOR,iu as CHART_HEADER_HEIGHT,ms as COLOR_RAMPS,ka as CUSTOM_ICON_REGISTRY,Ga as Calendar,Ze as Card,cu as CardContent,du as CardFooter,Js as CardHeader,lu as CardMedia,pc as CardMobileRenderer,ib as CarouselAutoplayTrigger,rb as CarouselControl,zu as CarouselIndicator,ab as CarouselIndicatorGroup,tb as CarouselItem,eb as CarouselItemGroup,nb as CarouselNextTrigger,ob as CarouselPrevTrigger,sb as CarouselProgressText,$g as CarouselRoot,Ob as CategoryBarChart,hx as CategoryCell,Yr as ChartAxis,qa as ChartBottomBar,nh as ChartContainer,Kr as ChartContext,Pl as ChartEventMarkers,Rl as ChartEventSpans,cp as ChartExpandOwnedByAncestor,Ia as ChartHeader,Qo as ChartLabelledBy,og as ChartOwnsItsTitle,un as ChartTooltip,_r as Checkbox,Hu as CheckboxGroup,Ur as Chip,fb as ChipInputField,Li as ClearButton,hb as CodeEditor,Wa as Collapse,ln as CollapseContent,sn as CollapseHeader,an as CollapseItem,sT as ColorField,xf as ColorModeProvider,cy as CommandPalette,wb as Confirm,Nb as ConnectionStatusBadge,kb as ContactCard,yx as ContactMetaCell,bl as ContactMetaDisplay,Rb as ContainerQueryProvider,tn as CopyToClipboard,vx as CustomCell,Xc as DEFAULT_MAP_TYPE,Oc as DIVERGING_RAMPS,_h as DataControls,Zx as DataTable,Cx as DateCell,nx as DateField,Ul as DateRangePicker,Sx as DeltaCell,Ne as Description,$x as DeviceHealthBadge,Nx as DeviceMetaCell,_l as DeviceMetaDisplay,$n as DeviceStateBadge,Px as DeviceStateCell,tc as DeviceStateWithMetric,ty as DeviceTypeIcon,dr as Dialog,xI as DialogForm,_t as DialogHeader,os as Drawer,yI as DrawerForm,iI as ENTITY_CATEGORY_CONFIG,Sa as ENTITY_CONFIG,Il as EmptyState,oy as EnrollmentStatusBadge,Zr as ErrorBoundary,be as FieldError,Ig as FieldGroup,ay as FileUpload,$h as FilterChips,lx as FilterDialog,sy as FirmwareVersionBadge,oi as Form,CI as FormActions,MI as FormDivider,TI as FormGrid,EI as FormSection,LI as FormStepper,ce as FormatRegistry,Ex as FormattedCell,lh as FunnelSeries,cI as GRID_ELEMENT_TYPE_BY_ENTITY,aI as GRID_STATE_COLORS,gt as GRID_STAT_LIST,py as GlobalSearch,Zp as Grid,ec as GridStateBadge,mI as HEADLINE_METRIC_BOUNDS,cr as Heading,Hy as HierarchyExplorer,zp as HorizontalBarCell,OM as HoverCard,V as Icon,Dx as IndexCell,Gr as InfiniteScrollIndicator,nl as Input,xt as InputWrapper,hs as InteractiveMap,Jy as Kpi,am as KpiGroup,Ue as Label,Kn as LineSeries,_y as List,nL as ListBox,mr as ListBoxItem,ev as ListItem,tv as ListPane,Hr as Loader,Oa as Logo,zv as MAP_TYPES,Ov as MapStyleProvider,Kv as Meter,Hp as MiniBarCell,Nr as ModalBackdrop,Jv as MultiSelect,od as Notice,nd as NoticeContainer,jv as NoticeProvider,Fx as NumberCell,Zi as NumberField,Yg as PageBanner,ga as PageLayout,Up as PercentBarCell,rC as PlaceSearch,bt as Popover,nC as ProgressBar,aC as Prose,dC as Radio,iC as RadioCard,sC as RadioCardGroup,cC as RadioGroup,$a as RangeCalendar,Ox as RangeCell,Xi as ResultsCount,mC as RichTextEditor,Vc as SEQUENTIAL_RAMPS,hn as SKELETON_SIZES,Wd as SOURCE_UNIT_TO_WH,AI as SaveBar,qn as SearchControl,my as SearchEmptyState,gy as SearchLoadingState,hy as SearchResultGroup,xy as SearchResultItem,yy as SearchResultsList,Cy as SearchTrigger,mi as Section,id as SectionNav,Vl as SegmentedControl,Ao as Select,ic as SelectCell,tl as SideNav,fC as SiteCard,bC as SiteContactCard,Hx as SiteMetaCell,sc as SiteMetaDisplay,K as Skeleton,hC as Slider,ji as SortControl,Kp as SparklineCell,md as SplitPane,za as StackNav,Cc as StatList,pi as StaticMap,Kl as Switch,ud as Tab,dd as TabList,$v as TabPanel,cd as Tabs,wC as TextArea,PC as TextAreaWithChips,Kx as TextCell,Xr as TextField,lt as TextLink,Dl as TiledTimeSeriesChart,Xh as TiledTimeSeriesExplorer,Ol as TimeControls,EC as TimeField,MC as Timeline,LC as TimelineItem,IC as ToggleButton,ur as Tooltip,Mi as TopNav,ht as Tray,ex as UNARY_FILTER_OPERATORS,rx as UNARY_OPERATOR_LABELS,lI as UNVERIFIED_VOLTAGE_UNIT_ROWS,II as UnsavedChangesPrompt,l2 as activeDeviceStates,bn as addFilterCondition,Wm as applyDataOperations,fI as archetypeFor,kh as assembleSeries,CS as autoScaleCurrent,Pf as autoScaleDistance,Lf as autoScaleEnergy,ES as autoScalePower,MS as autoScaleResistance,VS as autoScaleVoltage,HT as baselineFromPoint,Xf as camelCaseToWords,Yf as capitalize,LS as celsiusToFahrenheit,J4 as celsiusToKelvin,P4 as centimetersToInches,Bh as classicPresetRanges,Fs as clearColorCache,oS as createCategoryColorMap,qi as createEmptyFilter,yR as createFilter,vR as createFilters,yF as createFormat,dt as createTextureIcon,ch as createTiledCameraSyncGroup,$u as createXScale,Vi as createYScale,eu as csvUnitFor,Qf as csvValueFor,ze as defaultMargin,Em as defaultMultiSelectMatcher,Fp as deltaDirectionFromValue,c2 as deviceStateLabels,DJ as deviceStateMetricFormats,Th as emptyStore,gI as entityHasDetailPage,hI as entityHasStatList,bI as entityShowsNow,FS as enumToSentenceCase,ip as exportChart,Km as exportTableAsCSV,DS as fahrenheitToCelsius,X4 as fahrenheitToKelvin,x4 as feetToMeters,C4 as feetToMiles,Qc as filterMultiSelectOptions,CR as filterToChips,yf as formatBoolean,Q5 as formatCapacity,uo as formatComponentValue,Nf as formatCurrency,Ad as formatCurrent,kf as formatDate,Rf as formatDistance,Xl as formatEmptyValue,Ud as formatEnergy,kr as formatFieldValue,Kd as formatInternationalPhone,wf as formatNumber,Cf as formatPercent,Df as formatPhone,Ra as formatPhoneNumber,jd as formatPower,Z5 as formatPowerRating,Qd as formatResistance,Hf as formatTemperature,qf as formatText,Hs as formatUSPhone,$d as formatVoltage,cx as getBadgeClasses,dx as getBooleanBadgeVariant,Ap as getCellAlignmentClasses,Se as getCellContainerClasses,vr as getCellTextClasses,vm as getColorRamp,Cm as getColorRampsByKind,nS as getContrastingTextColor,p4 as getDateParts,yi as getDefaultChartColor,Bs as getDefaultColors,Vp as getDeviceStateDisplayLabel,Vp as getDeviceStateLabel,pI as getEntityCategory,fd as getEntityConfig,dI as getEntityIcon,uI as getEntityLabel,FC as getEntityStatList,Bo as getEventColor,uP as getExportFormatName,QI as getExportHeaders,cN as getFieldGroupStyles,Zn as getFilterFields,Tx as getGridStateLabel,Ag as getInputBackgroundStyles,Vt as getInputBaseStyles,en as getInputStateStyles,Ip as getLinkClasses,jl as getNumericColorClasses,Ft as getResolvedColor,Ct as getSkeletonSize,Xse as getStateTone,Do as getThemeCategoricalColors,eo as getYFormatSettings,u2 as gridStateLabels,T4 as inchesToCentimeters,Bp as isActiveDeviceState,Bp as isActiveState,hm as isCustomPinsLayer,dP as isExportSupported,Wl as isFilterEmpty,bm as isGeoJsonLayer,df as isLightColor,ge as isNil,xm as isRasterLayer,tx as isUnaryFilterOperator,gm as isVectorLayer,AS as kelvinToCelsius,j4 as kelvinToFahrenheit,v4 as kilometersToMiles,fm as layer,Td as mapValuesToCategoricalColors,h4 as metersToFeet,S4 as metersToMiles,k4 as metersToYards,Tf as milesToFeet,y4 as milesToKilometers,w4 as milesToMeters,Mm as multiSelectSearchKeys,_c as multiSelectSelectionEntries,Xo as parseBoolean,Wp as percentThresholdLevel,Gd as pickEnergyUnit,qI as prepareTableDataForExport,Wv as registerPhosphorIcon,Qn as removeFilterCondition,pe as resolveValue,Zc as shouldOfferLiteralOption,jf as snakeCaseToWords,Fl as telemetryPresetRanges,Ff as temperatureStringToSymbol,Al as tierForViewport,y1 as tileIndexAt,xr as tileKey,Ph as tileReducer,pn as tilesForViewport,s4 as toA,pS as toActiveInactive,Os as toAmps,Jo as toBoolean,Vf as toCelsius,TS as toCentimeters,fS as toCheckmark,xS as toCompactNumber,Sf as toCurrency,kS as toCustomDateFormat,SS as toDateString,dS as toEnabledDisabled,Bf as toFahrenheit,Bd as toFeet,bS as toFloat,hS as toFormattedNumber,wS as toFullDateTime,z4 as toGW,Mf as toGWh,Xd as toGigawatts,NS as toISOString,RS as toInches,gS as toInteger,l4 as toKA,rF as toKV,V4 as toKW,Of as toKelvin,Dd as toKiloamps,Af as toKilohms,Fd as toKilometers,_d as toKilovolts,Yd as toKilowatts,Wf as toLowerCase,i4 as toMA,eF as toMV,O4 as toMW,Ef as toMWh,Jd as toMegawatts,If as toMegohms,Id as toMeters,Vd as toMiles,Ld as toMilliamps,PS as toMillimeters,qd as toMilliohms,Zd as toMillivolts,b4 as toNauticalMiles,Ws as toOhms,uS as toOnOff,vf as toPercentage,zs as toRelativeTime,yS as toScientificNotation,BS as toSecret,Uf as toSentenceCase,zf as toTemperature,Kf as toTitleCase,mS as toTrueFalse,Gf as toUpperCase,tF as toV,Ys as toVolts,B4 as toW,Gs as toWatts,zd as toWh,Od as toYards,Hd as tokWh,Ks as truncateEnd,Ea as truncateMiddle,Us as truncateStart,Nt as typeRole,po as typographyRole,Jf as ucFirst,ir as useBreakpoint,Wn as useChartContext,Un as useChartExpand,Aa as useChartHeaderMetrics,ng as useChartOwnsItsTitle,bd as useClientDataControls,Xt as useColorMode,t4 as useComponentFormatter,Tb as useContainerBreakpoint,YC as useDataControls,$o as useDebounce,Ha as useElementSize,Zo as useInfiniteScroll,pr as useInputFocus,Dc as useLocalStorage,ci as useMapStyleOverride,ar as useMediaQuery,Qv as useNotice,hd as useServerDataControls,qC as useTableExport,Ih as useTileWindow,Cp as useTiledTimeSeries,FI as useWizard,wo as wrapWithLink,N4 as yardsToMeters};//# sourceMappingURL=index.js.map
47
+ `).length-1&&jsx("br",{})]},`line-${H}-${k}`)):Y}):null;return jsx("div",{className:"group flex flex-col",children:jsxs("div",{className:"flex flex-col",children:[e&&jsx(Ue,{size:o,tooltip:n,isRequired:a,children:e}),jsx(xt,{children:jsx("div",{ref:N,contentEditable:!l,suppressContentEditableWarning:true,onInput:z=>{if(l)return;let Y=z.target,H=Y.querySelector("[data-chip-id]")!==null,A;if(H?(A=D(Y),A=A.replace(/(\{\{[^}]+\}\})\s{2,}/g,"$1 ").replace(/\s{2,}(\{\{[^}]+\}\})/g," $1")):A=Y.textContent||"",A===""){try{let C=document.createRange();C.selectNodeContents(Y),C.collapse(!0);let L=window.getSelection();L?.removeAllRanges(),L?.addRange(C),P.current=0;}catch{}B("",0);return}if(A===m)return;let W=window.getSelection(),k=0;if(W&&W.rangeCount>0)try{let C=W.getRangeAt(0);if(H){let L=0,I=!1,J=ae=>{if(I)return !0;if(ae===C.startContainer)return L+=C.startOffset,I=!0,!0;if(ae.nodeType===Node.TEXT_NODE){if(!ae.parentElement?.closest("[data-chip-id]")){if(ae.contains(C.startContainer))return L+=C.startOffset,I=!0,!0;L+=(ae.textContent||"").length;}}else if(ae.nodeType===Node.ELEMENT_NODE){let de=ae;if(de.hasAttribute("data-chip-id")){if(de.contains(C.startContainer)||de===C.startContainer){let ie=de.getAttribute("data-chip-id");return L+=`{{${ie}}}`.length,I=!0,!0}let re=de.getAttribute("data-chip-id");return L+=`{{${re}}}`.length,!1}else if(de.tagName==="BR")return de===C.startContainer?(I=!0,!0):(L+=1,!1)}for(let de=0;de<ae.childNodes.length;de++)if(J(ae.childNodes[de]))return !0;return !1};J(Y),k=L;}else {let L=document.createRange();L.setStart(Y,0),L.setEnd(C.startContainer,C.startOffset),k=L.toString().length;}}catch{k=A.length;}P.current=k,B(A,k);},onKeyDown:z=>{if(l)return;let Y=window.getSelection();if(!(!Y||Y.rangeCount===0))try{let H=Y.getRangeAt(0),A=H.commonAncestorContainer;if(z.key==="ArrowLeft"||z.key==="ArrowRight"){let W=A.nodeType===Node.TEXT_NODE?A.parentElement?.closest("[data-chip-id]"):A.closest("[data-chip-id]");if(W){z.preventDefault();try{let k=document.createRange(),C=window.getSelection();z.key==="ArrowLeft"?k.setStartBefore(W):k.setStartAfter(W),k.collapse(!0),C?.removeAllRanges(),C?.addRange(k);}catch{}}}if(z.key==="Backspace"){let W=null;if(W=(A.nodeType===Node.TEXT_NODE?A.parentElement?.closest("[data-chip-id]"):A.closest("[data-chip-id]"))||null,!W)if(A.nodeType===Node.TEXT_NODE){let k=A;if(H.startOffset===0&&k.parentElement){let C=k.previousSibling;if(C&&C.nodeType===Node.ELEMENT_NODE){let L=C.closest("[data-chip-id]");L&&(W=L);}}}else {let k=A;if(H.startOffset>0){let C=k.childNodes[H.startOffset-1];if(C&&C.nodeType===Node.ELEMENT_NODE){let L=C.closest("[data-chip-id]");L&&(W=L);}}}if(W){z.preventDefault(),z.stopPropagation();let k=W.getAttribute("data-chip-id");if(!k)return;let C=`{{${k}}}`,L=m.indexOf(C);if(L!==-1){let I=m.slice(0,L)+m.slice(L+C.length),J=f.filter(ae=>ae.id!==k);P.current=L;try{window.getSelection()?.removeAllRanges();}catch{}g?.(J),p?.(I);}}}}catch{}},onFocus:z=>{l||(w.onFocus&&w.onFocus(z),T(z));},onBlur:z=>{l||(w.onBlur&&w.onBlur(z),E(z));},className:Q(),style:{whiteSpace:"pre-wrap",wordBreak:"break-word",...w.style},"data-placeholder":w.placeholder,children:_()},m===""?"empty":"content")}),t&&jsx(Ne,{size:o,className:"mt-3",children:t}),typeof r=="string"&&jsx(be,{size:o,className:"mt-1",children:r}),typeof r=="function"&&u&&jsx(be,{size:o,className:"mt-1",children:r(u)})]})})}function JA({isPlaceholder:e,isDisabled:t,size:r="md"}){return twMerge("inline-block box-content px-0.5 rounded outline-none tabular-nums text-center transition-colors",{sm:"text-base md:text-xs",md:"text-base md:text-sm",lg:"text-base",xl:"text-lg"}[r],e?"text-text-disabled italic":"text-text-primary",t?"text-text-disabled cursor-not-allowed":"cursor-text",!t&&"hover:bg-background-hover","data-[focused]:bg-background-selected data-[focused]:text-text-primary")}function EC({label:e,description:t,errorMessage:r,size:o="md",tooltip:n,isRequired:a,isDisabled:i,isInvalid:s,reserveErrorSpace:l=true,validationResult:c,className:d,descriptionPlacement:u="below",...m}){return jsxs(TimeField,{...m,isDisabled:i,isRequired:a,isInvalid:s,className:Re(d,"flex flex-col gap-1"),children:[e&&jsx(Ue,{size:o,tooltip:n,description:u==="tooltip"||u==="inline"?t:void 0,descriptionPlacement:u,isRequired:a,children:e}),jsx(xt,{children:jsx(DateInput,{className:twMerge(en({isInvalid:s,isDisabled:i}),"px-3 py-2 flex items-center gap-0.5 w-full"),children:p=>jsx(DateSegment,{segment:p,className:JA({isPlaceholder:p.isPlaceholder,isDisabled:!p.isEditable||i,size:o})})})}),l?jsx("div",{className:"mt-1 min-h-[20px]",children:typeof r=="string"?jsx(be,{size:o,children:r}):typeof r=="function"&&c?jsx(be,{size:o,children:r(c)}):t&&u==="below"?jsx(Ne,{size:o,children:t}):null}):jsx(Fragment,{children:typeof r=="string"?jsx(be,{size:o,className:"mt-1",children:r}):typeof r=="function"&&c?jsx(be,{size:o,className:"mt-1",children:r(c)}):t&&u==="below"?jsx(Ne,{size:o,className:"mt-1",children:t}):null})]})}function MC({children:e,className:t=""}){return jsx("div",{className:`flex flex-col ${t}`.trim(),role:"list",children:e})}function LC({children:e,variant:t="default",icon:r,label:o,isLast:n=false,className:a=""}){let s={default:{dot:"bg-border-default border-border-default",line:"bg-border-default",label:"text-text-secondary",content:"text-text-primary"},active:{dot:"bg-text-primary border-text-primary",line:"bg-border-default",label:"text-text-secondary",content:"text-text-primary font-medium"},muted:{dot:"bg-border-muted border-border-muted",line:"bg-border-muted",label:"text-text-secondary",content:"text-text-secondary"},success:{dot:"bg-feedback-success-border border-feedback-success-border",line:"bg-border-default",label:"text-text-secondary",content:"text-text-primary"},error:{dot:"bg-feedback-error-border border-feedback-error-border",line:"bg-border-default",label:"text-text-secondary",content:"text-text-primary"},warning:{dot:"bg-feedback-warning-border border-feedback-warning-border",line:"bg-border-default",label:"text-text-secondary",content:"text-text-primary"},info:{dot:"bg-feedback-info-border border-feedback-info-border",line:"bg-border-default",label:"text-text-secondary",content:"text-text-primary"}}[t];return jsxs("div",{className:`flex gap-3 ${a}`.trim(),role:"listitem",children:[jsxs("div",{className:"flex flex-col items-center",style:{width:"20px"},children:[jsx("div",{className:`flex items-center justify-center rounded-full border-2 ${s.dot}`,style:{width:"20px",height:"20px",flexShrink:0},children:r&&jsx(V,{name:r,size:12,className:"text-background-body"})}),!n&&jsx("div",{className:`w-0.5 flex-1 ${s.line}`,style:{minHeight:"24px"}})]}),jsxs("div",{className:"flex-1 pb-6",children:[o&&jsx("div",{className:`text-xs mb-1 ${s.label}`,children:o}),jsx("div",{className:`text-sm ${s.content}`,children:e})]})]})}function ZA(e){return "primary"}var _A="flex font-medium justify-center items-center gap-2 text-center transition whitespace-nowrap box-border",DC={primary:{selected:"bg-action-primary text-[color:var(--color-action-primary-text)] hover:bg-action-primary-hover forced-colors:bg-[ButtonText] forced-colors:text-[ButtonFace] border-2 border-transparent",unselected:"bg-transparent text-action-primary border-2 border-border-muted hover:bg-text-primary/[0.05] forced-colors:border-[ButtonBorder] forced-colors:bg-[ButtonFace] forced-colors:text-[ButtonText]"}},$A="opacity-[--control-hover-opacity] cursor-not-allowed pointer-events-none grayscale",eI="opacity-100 cursor-pointer",tI={"top-right":"-right-2 -top-2","top-left":"-left-2 -top-2","bottom-right":"-right-2 -bottom-2","bottom-left":"-left-2 -bottom-2"},rI={primary:"bg-action-primary text-[color:var(--color-action-primary-text)]",destructive:"bg-feedback-error-border text-text-inverse"};function oI(e){let{variant:t="primary",size:r="md",isDisabled:o,isSelected:n,borderRadius:a,borderRight:i,borderLeft:s}=e,l=ZA(),c=`${_A} ${n?DC[l].selected:DC[l].unselected}`;return c+=` ${Ge[r].text} ${Ge[r].height} ${Ge[r].padding} ${Ge[r].gap}`,c+=` ${o?$A:eI}`,a==="left"&&(c+=" rounded-l-sm"),a==="right"&&(c+=" rounded-r-sm"),i&&(c+=" border-r"),s&&(c+=" border-l"),c+=` ${tt()}`,(c+=" focus-visible:outline-action-primary"),twMerge(c)}function IC(e){let{className:t,children:r,onPress:o,icon:n,iconPosition:a="left",iconWeight:i,isLoading:s=false,loadingText:l,loadingIndicator:c,size:d="md",badgeNumber:u,badgeVariant:m="primary",badgePosition:p="top-right",...f}=e,g=n?jsx(V,{name:n,size:d,weight:i}):null,h=()=>{let x=jsxs(Fragment,{children:[a==="left"&&g,r,a==="right"&&g]});return s?jsxs("div",{className:"relative inline-flex items-center justify-center",children:[jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:c||jsx(V,{name:"CircleNotch",size:d,className:"animate-spin","aria-hidden":"true"})}),jsx("div",{className:"invisible","aria-hidden":"true",children:x}),l&&jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:l})]}):x},b=jsx(ToggleButton,{onPress:o,...f,className:twMerge(oI(e),t),"aria-busy":s,children:h()});return u&&u>0?jsxs("div",{className:"relative",children:[b,jsx("span",{className:`absolute ${tI[p]} flex h-5 w-5 items-center justify-center rounded-full ${rI[m]} text-xs`,"aria-label":`${u} items`,children:u})]}):b}var aI={open:{className:"text-feedback-success-border",token:"--color-feedback-success-border",label:"Open"},closed:{className:"text-feedback-error-border",token:"--color-feedback-error-border",label:"Closed"}},iI={platform:{label:"Platform",description:"Core product objects that structure the Texture workspace.",icon:"Stack",order:0},grid:{label:"Grid Elements",description:"Physical utility-grid infrastructure imported from a customer's GIS export.",icon:"TreeStructure",order:1},device:{label:"Devices",description:"Behind-the-meter connected energy devices.",icon:"Lightning",order:2}},sI=["energized","customerName","gs_max_continuous_current"],lI=["MOTOR.voltage"],gt={TRANSFORMER:[{key:"capacityKva",label:"kVA Rating",format:{type:"power",unit:"kVA",decimals:0}},{key:"phase",label:"Phase",format:{type:"text"}},{key:"primaryVoltageKv",label:"Primary Voltage",format:{type:"voltage",unit:"kV",decimals:1}},{key:"outputVoltageKv",label:"Output Voltage",format:{type:"voltage",unit:"kV",decimals:2}},{key:"manufacturer",label:"Manufacturer",format:{type:"text"}},{key:"xfmr_conductor_description",label:"Conductor",format:{type:"text"}}],CONSUMER:[{key:"service_address",label:"Service address",format:{type:"text"}},{key:"name",label:"Customer",format:{type:"text"}},{key:"account_number",label:"Account #",format:{type:"text"}},{key:"meterNumber",label:"Meter Number",format:{type:"text"}},{key:"service_type",label:"Service type",format:{type:"text"}}],SOURCE:[{key:"voltageKv",label:"Nominal Voltage",format:{type:"voltage",unit:"kV",decimals:1}},{key:"substationNumber",label:"Substation Number",format:{type:"text"}},{key:"trf_capacity",label:"Rated Capacity",format:{type:"text"}},{key:"connection_code",label:"Connection",format:{type:"text"}}],SWITCH:[{key:"switchId",label:"Switch ID",format:{type:"text"}},{key:"phase",label:"Phase",format:{type:"text"}},{key:"switchIsOpen",label:"Position",format:{type:"text"}},{key:"switch_status",label:"Status",format:{type:"text"}},{key:"partnerIdentifier",label:"Partner ID",format:{type:"text"}}],CAPACITOR:[{key:"phase",label:"Phase",format:{type:"text"}},{key:"nominalVoltageV",label:"Nominal Voltage",format:{type:"voltage",unit:"V",decimals:0}}],OVERCURRENT_DEVICE:[{key:"size_value",label:"Size",format:{type:"text"}},{key:"phase",label:"Phase",format:{type:"text"}}],REGULATOR:[{key:"rated_kva",label:"Rated kVA",format:{type:"power",unit:"kVA",decimals:0}},{key:"phase",label:"Phase",format:{type:"text"}},{key:"manufacturer",label:"Manufacturer",format:{type:"text"}},{key:"high_side_configuration",label:"High Side",format:{type:"text"}},{key:"forwardSetVoltageV",label:"Forward Set Voltage",format:{type:"voltage",unit:"V",decimals:1}}],OVERHEAD_LINE:[{key:"impedanceLength",label:"Length",format:{type:"distance",unit:"ft",decimals:0}},{key:"conductorDescPhA",label:"Conductor Phase A",format:{type:"text"}},{key:"conductorDescPhB",label:"Conductor Phase B",format:{type:"text"}},{key:"conductorDescPhC",label:"Conductor Phase C",format:{type:"text"}},{key:"conductorDescNeutral",label:"Conductor Neutral",format:{type:"text"}},{key:"phase",label:"Phase",format:{type:"text"}},{key:"subtype_cd",label:"Subtype",format:{type:"text"}}],UNDERGROUND_LINE:[{key:"impedanceLength",label:"Length",format:{type:"distance",unit:"ft",decimals:0}},{key:"conductorDescPhA",label:"Conductor Phase A",format:{type:"text"}},{key:"conductorDescPhB",label:"Conductor Phase B",format:{type:"text"}},{key:"conductorDescPhC",label:"Conductor Phase C",format:{type:"text"}},{key:"phase",label:"Phase",format:{type:"text"}},{key:"subtype_cd",label:"Subtype",format:{type:"text"}}],NODE:[],SUPPORT_STRUCTURE:[{key:"height",label:"Height",format:{type:"distance",unit:"ft",decimals:0}},{key:"class",label:"Class",format:{type:"text"}},{key:"species",label:"Material",format:{type:"text"}},{key:"phase",label:"Phase",format:{type:"text"}},{key:"substation",label:"Substation",format:{type:"text"}}],GENERATOR:[{key:"phase",label:"Phase",format:{type:"text"}}],MOTOR:[{key:"ratedPower",label:"Rated Power",format:{type:"power",unit:"kW",decimals:1}},{key:"voltage",label:"Voltage",format:{type:"voltage",unit:"V",decimals:0}}]},Sa={app:{icon:"AppWindow",category:"platform",archetype:"platform",detailPage:false,label:{singular:"App",plural:"Apps"},description:"Workspace tools and third-party integrations"},site:{icon:"MapPin",category:"platform",archetype:"platform",detailPage:true,label:{singular:"Site",plural:"Sites"},description:"Physical location housing energy systems"},device:{icon:"ShareNetwork",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Device",plural:"Devices"},description:"Connected, controllable energy device"},customer:{icon:"Users",category:"platform",archetype:"platform",detailPage:true,label:{singular:"Customer",plural:"Customers"},description:"End customer or owner of one or more sites"},contact:{icon:"Users",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Contact",plural:"Contacts"},description:"Person associated with a customer or site"},program:{icon:"ClipboardText",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Program",plural:"Programs"},description:"Demand-response or virtual power plant program"},workflow:{icon:"FlowArrow",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Workflow",plural:"Workflows"},description:"Automated rule that runs in response to events"},collection:{icon:"Stack",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Collection",plural:"Collections"},description:"Named group of related entities or records"},board:{icon:"SquaresFour",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Board",plural:"Boards"},description:"Dashboard for monitoring metrics and devices"},report:{icon:"ChartLine",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Report",plural:"Reports"},description:"Saved analytics view or generated report"},event:{icon:"ClockCounterClockwise",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Event",plural:"Events"},description:"Recorded system event or logged activity"},alert:{icon:"Warning",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Alert",plural:"Alerts"},description:"Notification raised when attention is needed"},monitor:{icon:"Pulse",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Monitor",plural:"Monitors"},description:"Rule that watches a metric against a threshold"},command:{icon:"Play",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Command",plural:"Commands"},description:"Control action issued to a connected device"},source:{icon:"TextureSource",category:"grid",archetype:"grid-energized",detailPage:true,properties:{statList:gt.SOURCE},label:{singular:"Source",plural:"Sources"},description:"Upstream feed where the network originates"},substation:{icon:"TextureSource",category:"grid",archetype:"grid-energized",detailPage:true,properties:{statList:gt.SOURCE},label:{singular:"Substation",plural:"Substations"},description:"Facility that steps down transmission voltage"},capacitor:{icon:"TextureCapacitor",category:"grid",archetype:"grid-energized",detailPage:true,properties:{statList:gt.CAPACITOR},label:{singular:"Capacitor",plural:"Capacitors"},description:"Capacitor bank for power-factor and voltage support"},switch:{icon:"TextureSwitchClosed",category:"grid",archetype:"grid-energized",detailPage:true,properties:{statList:gt.SWITCH},label:{singular:"Switch",plural:"Switches"},description:"Sectionalizing or disconnect switch on the line",states:{open:{icon:"TextureSwitch",color:"open"},closed:{icon:"TextureSwitchClosed",color:"closed"}}},sectionalizer:{icon:"TextureSectionalizerClosed",category:"grid",archetype:"grid-energized",detailPage:true,properties:{statList:gt.SWITCH},label:{singular:"Sectionalizer",plural:"Sectionalizers"},description:"Counts upstream recloser trips and opens to isolate a faulted section",states:{open:{icon:"TextureSectionalizerOpen",color:"open"},closed:{icon:"TextureSectionalizerClosed",color:"closed"}}},relay:{icon:"Cpu",category:"grid",archetype:"grid-energized",detailPage:true,properties:{statList:gt.NODE},label:{singular:"Relay",plural:"Relays"},description:"Microprocessor relay that senses faults and trips devices"},transformer:{icon:"TextureTransformer",category:"grid",archetype:"grid-energized",detailPage:true,properties:{statList:gt.TRANSFORMER},label:{singular:"Transformer",plural:"Transformers"},description:"Transformer that steps voltage up or down"},meter:{icon:"Gauge",category:"grid",archetype:"grid-energized",detailPage:true,properties:{statList:gt.CONSUMER},label:{singular:"Meter",plural:"Meters"},description:"Revenue meter at the point of consumption"},consumer:{icon:"Gauge",category:"grid",archetype:"grid-energized",detailPage:true,properties:{statList:gt.CONSUMER},label:{singular:"Consumer",plural:"Consumers"},description:"Service point or customer premise on the grid"},singlePhaseOverheadLine:{icon:"TextureSinglePhaseOverheadLine",category:"grid",archetype:"grid-line",detailPage:true,properties:{statList:gt.OVERHEAD_LINE},label:{singular:"Single-Phase Overhead Line",plural:"Single-Phase Overhead Lines"},description:"Overhead line carrying one phase conductor"},twoPhaseOverheadLine:{icon:"TextureTwoPhaseOverheadLine",category:"grid",archetype:"grid-line",detailPage:true,properties:{statList:gt.OVERHEAD_LINE},label:{singular:"Two-Phase Overhead Line",plural:"Two-Phase Overhead Lines"},description:"Overhead line carrying two phase conductors"},threePhaseOverheadLine:{icon:"TextureThreePhaseOverheadLine",category:"grid",archetype:"grid-line",detailPage:true,properties:{statList:gt.OVERHEAD_LINE},label:{singular:"Three-Phase Overhead Line",plural:"Three-Phase Overhead Lines"},description:"Overhead line carrying three phase conductors"},singlePhaseUndergroundLine:{icon:"TextureSinglePhaseUndergroundLine",category:"grid",archetype:"grid-line",detailPage:true,properties:{statList:gt.UNDERGROUND_LINE},label:{singular:"Single-Phase Underground Line",plural:"Single-Phase Underground Lines"},description:"Buried line carrying one phase conductor"},twoPhaseUndergroundLine:{icon:"TextureTwoPhaseUndergroundLine",category:"grid",archetype:"grid-line",detailPage:true,properties:{statList:gt.UNDERGROUND_LINE},label:{singular:"Two-Phase Underground Line",plural:"Two-Phase Underground Lines"},description:"Buried line carrying two phase conductors"},threePhaseUndergroundLine:{icon:"TextureThreePhaseUndergroundLine",category:"grid",archetype:"grid-line",detailPage:true,properties:{statList:gt.UNDERGROUND_LINE},label:{singular:"Three-Phase Underground Line",plural:"Three-Phase Underground Lines"},description:"Buried line carrying three phase conductors"},motorSwitch:{icon:"Diamond",category:"grid",archetype:"grid-energized",detailPage:true,properties:{statList:gt.MOTOR},label:{singular:"Motor Switch",plural:"Motor Switches"},description:"Motor-operated switch or motor load element"},recloser:{icon:"TextureRecloser",category:"grid",archetype:"grid-energized",detailPage:true,properties:{statList:gt.OVERCURRENT_DEVICE},label:{singular:"Recloser",plural:"Reclosers"},description:"Auto-reclosing device that clears transient faults",states:{open:{color:"open"},closed:{color:"closed"}}},fuse:{icon:"TextureFuse",category:"grid",archetype:"grid-energized",detailPage:true,properties:{statList:gt.OVERCURRENT_DEVICE},label:{singular:"Fuse",plural:"Fuses"},description:"Fusible element providing overcurrent protection"},breaker:{icon:"TextureBreaker",category:"grid",archetype:"grid-energized",detailPage:true,properties:{statList:gt.OVERCURRENT_DEVICE},label:{singular:"Breaker",plural:"Breakers"},description:"Circuit breaker that interrupts fault current",states:{open:{color:"open"},closed:{color:"closed"}}},generator:{icon:"Wind",category:"grid",archetype:"grid-energized",detailPage:true,properties:{statList:gt.GENERATOR},label:{singular:"Generator",plural:"Generators"},description:"Distributed generation unit feeding the grid"},regulator:{icon:"TextureRegulator",category:"grid",archetype:"grid-energized",detailPage:true,properties:{statList:gt.REGULATOR},label:{singular:"Regulator",plural:"Regulators"},description:"Voltage regulator that holds line voltage in range"},supportStructure:{icon:"TextureSupportStructure",category:"grid",archetype:"grid-line",detailPage:true,properties:{statList:gt.SUPPORT_STRUCTURE},label:{singular:"Support Structure",plural:"Support Structures"},description:"Structure carrying overhead line equipment"},battery:{icon:"BatteryHigh",category:"device",archetype:"device",detailPage:true,label:{singular:"Battery",plural:"Batteries"},description:"Behind-the-meter battery or storage system",fusedMetricId:"soc",fields:{headlineMetrics:[{id:"power",label:"device.battery.fields.power",source:{kind:"state",path:"state.gridPower"},format:{type:"power",decimals:1},icon:"Lightning"},{id:"soc",label:"device.battery.fields.soc",source:{kind:"state",path:"state.chargePercentage"},format:{type:"percentage",decimals:0},icon:"BatteryCharging"},{id:"backupReserve",label:"device.battery.fields.backupReserve",source:{kind:"state",path:"state.backupReserve"},format:{type:"percentage",decimals:0},icon:"BatteryCharging"},{id:"loadPower",label:"device.battery.fields.loadPower",source:{kind:"state",path:"state.loadPower"},format:{type:"power",decimals:1},icon:"Lightning"}]},stateRules:{primaryState:{label:"device.battery.fields.status",fieldPath:"state.chargingState",mapping:{charging:"charging",discharging:"discharging",idle:"idle",unknown:"unknown"},fallback:"unknown"},secondaryState:{label:"device.battery.fields.gridState",fieldPath:"state.gridStatus",mapping:{importing:"importing",exporting:"exporting",idle:"importing",unknown:"importing"},fallback:"importing"}}},evCharger:{icon:"ChargingStation",category:"device",archetype:"device",detailPage:true,label:{singular:"EV Charger",plural:"EV Chargers"},description:"Electric-vehicle charging station or port",fusedMetricId:"power",fields:{headlineMetrics:[{id:"power",label:"device.evCharger.fields.power",source:{kind:"state",path:"state.chargerWattage"},format:{type:"power",decimals:1},icon:"Lightning"},{id:"isPluggedIn",label:"device.evCharger.fields.isPluggedIn",source:{kind:"state",path:"state.isPluggedIn"},format:{type:"boolean",trueText:"Yes",falseText:"No"},icon:"Plug"},{id:"voltage",label:"device.evCharger.fields.voltage",source:{kind:"state",path:"state.chargerVoltage"},format:{type:"voltage",decimals:1},icon:"Lightning"},{id:"current",label:"device.evCharger.fields.current",source:{kind:"state",path:"state.chargerCurrent"},format:{type:"current",decimals:1},icon:"Lightning"}]},stateRules:{primaryState:{label:"device.evCharger.fields.status",fieldPath:"state.chargingState",mapping:{charging:"charging",discharging:"discharging",idle:"idle",unknown:"unknown"},fallback:"unknown"}}},inverter:{icon:"Sun",category:"device",archetype:"device",detailPage:true,label:{singular:"Solar / Inverter",plural:"Solar / Inverters"},description:"Solar PV inverter and its connected array",fusedMetricId:"power",fields:{headlineMetrics:[{id:"power",label:"device.inverter.fields.power",source:{kind:"state",path:"state.power"},format:{type:"power",decimals:0},icon:"Lightning"},{id:"gridPower",label:"device.inverter.fields.gridPower",source:{kind:"state",path:"state.gridPower"},format:{type:"power",decimals:0},icon:"GridFour"},{id:"generatedEnergy",label:"device.inverter.fields.generatedEnergy",source:{kind:"state",path:"state.generatedEnergy"},format:{type:"energy",decimals:1},icon:"Lightning"},{id:"lifetimeEnergyGenerated",label:"device.inverter.fields.lifetimeEnergyGenerated",source:{kind:"state",path:"state.lifetimeEnergyGenerated"},format:{type:"energy",decimals:0},icon:"Lightning"}]},stateRules:{primaryState:{label:"device.inverter.fields.gridStatus",fieldPath:"state.gridStatus",mapping:{exporting:"exporting",importing:"importing",idle:"idle"},fallback:"unknown"}}},thermostat:{icon:"Thermometer",category:"device",archetype:"device",detailPage:true,label:{singular:"Thermostat",plural:"Thermostats"},description:"Smart thermostat or connected HVAC control",fusedMetricId:"ambientTemperature",fields:{headlineMetrics:[{id:"ambientTemperature",label:"device.thermostat.fields.ambientTemperature",source:{kind:"state",path:"state.ambientTemperature"},format:{type:"temperature",decimals:0},icon:"Thermometer"},{id:"heatTarget",label:"device.thermostat.fields.heatTarget",source:{kind:"state",path:"state.heatTarget"},format:{type:"temperature",decimals:0},icon:"Flame"},{id:"coolTarget",label:"device.thermostat.fields.coolTarget",source:{kind:"state",path:"state.coolTarget"},format:{type:"temperature",decimals:0},icon:"Snowflake"},{id:"fanMode",label:"device.thermostat.fields.fanMode",source:{kind:"state",path:"state.fanMode"},format:{type:"text"}}]},stateRules:{primaryState:{label:"device.thermostat.fields.operatingMode",fieldPath:"state.operatingMode",mapping:{heat:"heat",cool:"cool",auto:"auto",off:"off",eco:"eco",unknown:"unknown"},fallback:"unknown"}}},vehicle:{icon:"Car",category:"device",archetype:"device",detailPage:true,label:{singular:"EV",plural:"EVs"},description:"Electric vehicle managed as a flexible load",fusedMetricId:"chargePercentage",fields:{headlineMetrics:[{id:"chargePercentage",label:"device.vehicle.fields.chargePercentage",source:{kind:"state",path:"state.chargePercentage"},format:{type:"percentage",decimals:0},icon:"BatteryCharging"},{id:"range",label:"device.vehicle.fields.range",source:{kind:"state",path:"state.range"},format:{type:"distance",unit:"mi",decimals:0},icon:"GasPump"},{id:"chargeLimit",label:"device.vehicle.fields.chargeLimit",source:{kind:"state",path:"state.chargeLimit"},format:{type:"percentage",decimals:0},icon:"BatteryCharging"},{id:"isPluggedIn",label:"device.vehicle.fields.isPluggedIn",source:{kind:"state",path:"state.isPluggedIn"},format:{type:"boolean",trueText:"Yes",falseText:"No"},icon:"Plug"}]},stateRules:{primaryState:{label:"device.vehicle.fields.status",fieldPath:"state.chargingState",mapping:{charging:"charging",discharging:"discharging",idle:"idle",unknown:"unknown"},fallback:"unknown"}}},waterHeater:{icon:"Drop",category:"device",archetype:"device",detailPage:true,label:{singular:"Water Heater",plural:"Water Heaters"},description:"Connected or smart electric water heater"}},cI={source:"SOURCE",substation:"SOURCE",capacitor:"CAPACITOR",switch:"SWITCH",sectionalizer:"SWITCH",relay:"NODE",transformer:"TRANSFORMER",meter:"CONSUMER",consumer:"CONSUMER",singlePhaseOverheadLine:"OVERHEAD_LINE",twoPhaseOverheadLine:"OVERHEAD_LINE",threePhaseOverheadLine:"OVERHEAD_LINE",singlePhaseUndergroundLine:"UNDERGROUND_LINE",twoPhaseUndergroundLine:"UNDERGROUND_LINE",threePhaseUndergroundLine:"UNDERGROUND_LINE",motorSwitch:"MOTOR",recloser:"OVERCURRENT_DEVICE",fuse:"OVERCURRENT_DEVICE",breaker:"OVERCURRENT_DEVICE",generator:"GENERATOR",regulator:"REGULATOR",supportStructure:"SUPPORT_STRUCTURE"};function fd(e){return Sa[e]}function dI(e){return Sa[e].icon}function uI(e,t=false){return t?Sa[e].label.plural:Sa[e].label.singular}function pI(e){return Sa[e].category}var mI={min:2,max:4};function fI(e){let t=Sa[e];if(!t)throw new Error(`archetypeFor: unknown entity type "${String(e)}"`);return t.archetype}function gI(e){return fd(e).detailPage}function bI(e){return (fd(e).fields?.headlineMetrics.length??0)>0}function FC(e){return fd(e).properties?.statList??[]}function hI(e){return FC(e).length>0}function xI({formId:e="dialog-form",onSubmit:t,primaryLabel:r="Save",secondaryLabel:o="Cancel",onCancel:n,primaryVariant:a,secondaryVariant:i="secondary",children:s,title:l,...c}){return jsx(dr,{title:l,primaryAction:{label:r,onPress:()=>{let u=document.getElementById(e);u&&u.requestSubmit();},variant:a},secondaryAction:n?{label:o,onPress:n,variant:i}:void 0,...c,children:jsx(oi,{id:e,onSubmit:t,children:s})})}function yI({formId:e="drawer-form",onSubmit:t,primaryLabel:r="Save",secondaryLabel:o="Cancel",onCancel:n,primaryVariant:a,secondaryVariant:i="secondary",children:s,...l}){return jsx(os,{primaryAction:{label:r,onPress:()=>{let d=document.getElementById(e);d&&d.requestSubmit();},variant:a},secondaryAction:n?{label:o,onPress:n,variant:i}:void 0,...l,children:jsx(oi,{id:e,onSubmit:t,className:"mt-2",children:s})})}function CI({align:e="end",className:t,...r}){return jsx("div",{...r,className:twMerge("flex gap-2",e==="start"?"justify-start":e==="between"?"justify-between":"justify-end",t)})}var NI={sm:"gap-2",md:"gap-4",lg:"gap-6"};function kI(e){if(!e)return "";let t=e.base?`grid-cols-${e.base}`:"",r=e.md?`md:grid-cols-${e.md}`:"",o=e.lg?`lg:grid-cols-${e.lg}`:"";return [t,r,o].filter(Boolean).join(" ")}function TI({cols:e={base:1},gap:t="lg",className:r,...o}){return jsx("div",{...o,className:twMerge("grid",kI(e),NI[t],r)})}function EI({title:e,description:t,showDivider:r,className:o,children:n,...a}){return jsxs("section",{...a,className:twMerge("flex flex-col",o),children:[(e||t)&&jsxs("div",{className:"flex flex-col gap-1 mb-6",children:[typeof e=="string"?jsx(cr,{tag:"h3",size:"sm",children:e}):e,t?jsx(Ne,{size:"lg",children:t}):null]}),jsx("div",{className:"flex flex-col gap-6",children:n}),r&&jsx("hr",{className:"mt-2 border-border-muted"})]})}function MI(){return jsx("hr",{className:"border-border-muted"})}function LI({steps:e,currentStepId:t,onStepClick:r,className:o}){let n=e.findIndex(a=>a.id===t);return jsx("nav",{"aria-label":"Progress",className:twMerge("w-full",o),children:jsx("div",{className:"relative mb-12",children:jsx("ol",{className:"relative flex items-start justify-between",children:e.map((a,i)=>{let s=a.id===t,l=i<n,c=r&&(l||s);return jsxs("li",{className:"relative flex flex-col items-center",style:{flex:`1 1 ${100/e.length}%`},children:[jsx("button",{type:"button",disabled:!c,onClick:()=>c&&r?.(a.id),className:twMerge("relative z-10 flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-full border-2 transition-colors bg-background-body",l&&"border-action-primary bg-action-primary text-text-inverse hover:bg-action-primary/90",s&&"border-action-primary bg-background-body text-action-primary",!l&&!s&&"border-border-default bg-background-body text-text-secondary",c&&"cursor-pointer",!c&&"cursor-default"),"aria-current":s?"step":void 0,children:l?jsx(V,{name:"Check",size:20,weight:"bold"}):jsx("span",{className:"text-sm font-semibold",children:i+1})}),i<e.length-1&&jsx("div",{className:"absolute top-5 h-0.5 transition-colors",style:{left:"50%",width:"100%",marginLeft:"20px",backgroundColor:i<n?"var(--color-action-primary)":"var(--color-border-default)"}}),jsxs("div",{className:"mt-3 flex flex-col items-center text-center w-32",children:[jsx("span",{className:twMerge("text-sm font-medium",s&&"text-text-default",l&&"text-text-primary",!s&&!l&&"text-text-secondary"),children:a.title}),a.description&&jsx("span",{className:"mt-1 text-xs text-text-secondary",children:a.description})]})]},a.id)})})})})}function AI({formId:e,show:t,isSubmitting:r,onCancel:o,primaryLabel:n="Save changes",secondaryLabel:a="Cancel",className:i}){return t?jsx("div",{className:twMerge("fixed inset-x-0 bottom-0 z-40 border-t border-border-muted bg-background-surface/95 backdrop-blur supports-[backdrop-filter]:bg-background-surface/70",i),children:jsxs("div",{className:"mx-auto flex max-w-screen-lg items-center justify-between gap-3 p-3",children:[jsx("div",{className:"text-sm text-text-secondary",children:"You have unsaved changes"}),jsxs("div",{className:"flex gap-2",children:[jsx(te,{variant:"secondary",onPress:o,children:a}),jsx(te,{type:"submit",form:e,isDisabled:!!r,children:r?"Saving...":n})]})]})}):null}function II({when:e,message:t="You have unsaved changes. Leave anyway?"}){return qe.useEffect(()=>{if(!e)return;let r=o=>(o.preventDefault(),o.returnValue=t,t);return window.addEventListener("beforeunload",r),()=>window.removeEventListener("beforeunload",r)},[e,t]),null}function FI({steps:e,initialStepId:t,canNavigate:r}){if(e.length===0)throw new Error("useWizard: steps array cannot be empty");let[o,n]=qe.useState(t||e[0].id),a=e.findIndex(u=>u.id===o),i=a>0,s=a<e.length-1,l=async u=>u===o?true:r&&!await r(o,u)?false:(n(u),true);return {steps:e,currentStepId:o,setCurrentStepId:l,next:async()=>!s||a===-1?false:l(e[a+1].id),prev:async()=>!i||a===-1?false:l(e[a-1].id),hasNext:s,hasPrev:i,stepIndex:a}}function Ms(e,t){return t.split(".").reduce((r,o)=>r?.[o],e)}function UC(e){return e==null?true:Array.isArray(e)?e.length===0:typeof e=="string"?e.trim()==="":false}function VI(e,t){let r=Ms(e,t.field),o=t.value;switch(t.operator){case "eq":return r===o;case "neq":return r!==o;case "in":return Array.isArray(o)?Array.isArray(r)?r.some(n=>o.includes(n)):o.includes(r):false;case "nin":return Array.isArray(o)?Array.isArray(r)?!r.some(n=>o.includes(n)):!o.includes(r):false;case "gt":return r instanceof Date&&typeof o=="string"?r>new Date(o):r>o;case "gte":return r instanceof Date&&typeof o=="string"?r>=new Date(o):r>=o;case "lt":return r instanceof Date&&typeof o=="string"?r<new Date(o):r<o;case "lte":return r instanceof Date&&typeof o=="string"?r<=new Date(o):r<=o;case "contains":return typeof r!="string"?false:r.toLowerCase().includes(String(o).toLowerCase());case "startsWith":return typeof r!="string"?false:r.toLowerCase().startsWith(String(o).toLowerCase());case "endsWith":return typeof r!="string"?false:r.toLowerCase().endsWith(String(o).toLowerCase());case "isEmpty":return UC(r);case "isNotEmpty":return !UC(r);default:return false}}function KC(e,t){if(t.conditions.length===0)return true;let r=t.conditions.map(o=>"conditions"in o?KC(e,o):VI(e,o));return t.logic==="AND"?r.every(Boolean):r.some(Boolean)}function OI(e,t){return !t||t.conditions.length===0?e:e.filter(r=>KC(r,t))}function zI(e,t,r){if(e==null&&t==null)return 0;if(e==null)return r==="asc"?1:-1;if(t==null)return r==="asc"?-1:1;if(e instanceof Date&&t instanceof Date){let o=e.getTime()-t.getTime();return r==="asc"?o:-o}if(typeof e=="string"&&typeof t=="string"){let o=e.toLowerCase().localeCompare(t.toLowerCase());return r==="asc"?o:-o}return e<t?r==="asc"?-1:1:e>t?r==="asc"?1:-1:0}function HI(e,t){return t?[...e].sort((r,o)=>{let n=Ms(r,t.field),a=Ms(o,t.field);return zI(n,a,t.direction)}):e}function GI(e,t){if(!t||!t.query.trim())return e;let{query:r,fields:o,fuzzy:n=true,threshold:a=.3}=t;if(n)return new BI(e,{keys:o,threshold:a,ignoreLocation:true,includeScore:true}).search(r).map(c=>c.item);let i=r.toLowerCase();return e.filter(s=>o.some(l=>{let c=Ms(s,l);return c==null?false:String(c).toLowerCase().includes(i)}))}function WI(e,t){let r={};for(let o of t){if(r[o.field]={},o.values)for(let n of o.values)r[o.field][String(n.value)]=0;for(let n of e){let a=Ms(n,o.field);if(a!=null)if(Array.isArray(a))for(let i of a){let s=String(i);r[o.field][s]=(r[o.field][s]||0)+1;}else {let i=String(a);r[o.field][i]=(r[o.field][i]||0)+1;}}}return r}function Wm({data:e,filters:t,sort:r,search:o,facetConfigs:n=[]}){let a=GI(e,o||null);a=OI(a,t||null);let i=WI(a,n);return a=HI(a,r||null),{data:a,facetCounts:i,resultCount:a.length}}function bd({data:e,filters:t,sort:r,search:o,facetConfigs:n=[]}){return useMemo(()=>Wm({data:e,filters:t,sort:r,search:o,facetConfigs:n}),[e,t,r,o,n])}function hd({filters:e,sort:t,search:r,onStateChange:o,searchDebounce:n=300}){let a=$o(r,n),i=useRef(true);useEffect(()=>{if(i.current){i.current=false;return}o({filters:e,sort:t,search:a});},[e,t,a,o]);}function YC(e){return e.mode==="client"?bd({data:e.data,filters:e.filters,sort:e.sort,search:e.search,facetConfigs:e.facetConfigs}):(hd({filters:e.filters,sort:e.sort,search:e.search,onStateChange:e.onStateChange,searchDebounce:e.searchDebounce}),{data:e.data,facetCounts:e.facetCounts||{},resultCount:e.resultCount??e.data.length})}var JC=Qm(np());function XI(e,t,r=true){let o=e;if(r){let n=new Date().toISOString().replace(/[:.]/g,"-").slice(0,-5);return `${o}-${n}.${t}`}return `${o}.${t}`}function jI(e,t){return t.accessor?typeof t.accessor=="function"?t.accessor(e):e[t.accessor]:null}function XC(e,t){let r=jI(t,e);return e.exportValue?e.exportValue(r,t)??"":r==null?"":r instanceof Date?r.toISOString():typeof r=="object"?JSON.stringify(r):r}function Um(e){return e.filter(t=>t.exportable!==false)}function jC(e){let t=e.map(n=>n.exportLabel||n.label),r=new Set,o=[];for(let n of t)r.has(n)?o.includes(n)||o.push(n):r.add(n);if(o.length>0)throw new Error(`Duplicate export headers found: ${o.join(", ")}. Use exportLabel to provide unique headers.`)}async function Km(e){let{columns:t,data:r,metadata:o={}}=e;try{let n=Um(t);if(n.length===0)throw new Error("No exportable columns found");jC(n);let a=r.map(c=>{let d={};for(let u of n){let m=u.exportLabel||u.label;d[m]=XC(u,c);}return d}),i=iP.unparse(a,{header:!0,skipEmptyLines:!0}),s=new Blob([i],{type:"text/csv;charset=utf-8;"}),l=XI(o.filename||"table-data","csv",o.timestamp!==!1);(0,JC.saveAs)(s,l);}catch(n){throw new Error(`CSV export failed: ${n instanceof Error?n.message:"Unknown error"}`)}}function qI(e){let{columns:t,data:r}=e,o=Um(t);return jC(o),r.map(n=>{let a={};for(let i of o){let s=i.exportLabel||i.label;a[s]=XC(i,n);}return a})}function QI(e){return Um(e).map(t=>t.exportLabel||t.label)}function qC({columns:e,data:t,metadata:r}){let n=e.filter(i=>i.exportable!==false).length>0&&t.length>0;return {exportCSV:useCallback(async()=>{try{await Km({columns:e,data:t,metadata:r});}catch(i){throw console.error("Table export failed:",i),i}},[e,t,r]),canExport:n}}function Xse(e){switch(e){case "charging":case "on":return "success";case "discharging":return "warning";case "heat":case "cool":return "info";case "off":case "idle":case "eco":case "auto":return "neutral";default:return "neutral"}}export{sI as ABSENT_GRID_FIELDS,ux as ActionCell,Ba as ActionMenu,hu as ActivityFeed,_s as ActivityFeedGroup,$s as ActivityItem,wg as Alert,Lg as AppShell,dn as AreaSeries,uc as AutoMobileRenderer,sl as Autocomplete,Io as Avatar,Pn as BREAKPOINTS,ut as Badge,mx as BadgeCell,cl as Banner,Cl as BarSeries,fx as BooleanCell,lf as BrandProvider,ul as BreadcrumbItem,dl as Breadcrumbs,te as Button,zc as CATEGORICAL_RAMP,gx as CATEGORY_COLOR_TOKENS,ql as CATEGORY_NEUTRAL_COLOR,iu as CHART_HEADER_HEIGHT,ms as COLOR_RAMPS,ka as CUSTOM_ICON_REGISTRY,Ga as Calendar,Ze as Card,cu as CardContent,du as CardFooter,Js as CardHeader,lu as CardMedia,pc as CardMobileRenderer,ib as CarouselAutoplayTrigger,rb as CarouselControl,zu as CarouselIndicator,ab as CarouselIndicatorGroup,tb as CarouselItem,eb as CarouselItemGroup,nb as CarouselNextTrigger,ob as CarouselPrevTrigger,sb as CarouselProgressText,$g as CarouselRoot,Ob as CategoryBarChart,hx as CategoryCell,Yr as ChartAxis,qa as ChartBottomBar,nh as ChartContainer,Kr as ChartContext,Pl as ChartEventMarkers,Rl as ChartEventSpans,cp as ChartExpandOwnedByAncestor,Ia as ChartHeader,Qo as ChartLabelledBy,og as ChartOwnsItsTitle,un as ChartTooltip,_r as Checkbox,Hu as CheckboxGroup,Ur as Chip,fb as ChipInputField,Li as ClearButton,hb as CodeEditor,Wa as Collapse,ln as CollapseContent,sn as CollapseHeader,an as CollapseItem,sT as ColorField,xf as ColorModeProvider,cy as CommandPalette,wb as Confirm,Nb as ConnectionStatusBadge,kb as ContactCard,yx as ContactMetaCell,bl as ContactMetaDisplay,Rb as ContainerQueryProvider,tn as CopyToClipboard,vx as CustomCell,Xc as DEFAULT_MAP_TYPE,Oc as DIVERGING_RAMPS,_h as DataControls,Zx as DataTable,Cx as DateCell,nx as DateField,Ul as DateRangePicker,Sx as DeltaCell,Ne as Description,$x as DeviceHealthBadge,Nx as DeviceMetaCell,_l as DeviceMetaDisplay,$n as DeviceStateBadge,Px as DeviceStateCell,tc as DeviceStateWithMetric,ty as DeviceTypeIcon,dr as Dialog,xI as DialogForm,_t as DialogHeader,os as Drawer,yI as DrawerForm,iI as ENTITY_CATEGORY_CONFIG,Sa as ENTITY_CONFIG,Il as EmptyState,oy as EnrollmentStatusBadge,Zr as ErrorBoundary,be as FieldError,Ig as FieldGroup,ay as FileUpload,$h as FilterChips,lx as FilterDialog,sy as FirmwareVersionBadge,oi as Form,CI as FormActions,MI as FormDivider,TI as FormGrid,EI as FormSection,LI as FormStepper,ce as FormatRegistry,Ex as FormattedCell,lh as FunnelSeries,cI as GRID_ELEMENT_TYPE_BY_ENTITY,aI as GRID_STATE_COLORS,gt as GRID_STAT_LIST,py as GlobalSearch,Zp as Grid,ec as GridStateBadge,mI as HEADLINE_METRIC_BOUNDS,cr as Heading,Hy as HierarchyExplorer,zp as HorizontalBarCell,OM as HoverCard,V as Icon,Dx as IndexCell,Gr as InfiniteScrollIndicator,nl as Input,xt as InputWrapper,hs as InteractiveMap,Jy as Kpi,am as KpiGroup,Ue as Label,Kn as LineSeries,_y as List,nL as ListBox,mr as ListBoxItem,ev as ListItem,tv as ListPane,Hr as Loader,Oa as Logo,zv as MAP_TYPES,Ov as MapStyleProvider,Kv as Meter,Hp as MiniBarCell,Nr as ModalBackdrop,Jv as MultiSelect,od as Notice,nd as NoticeContainer,jv as NoticeProvider,Fx as NumberCell,Zi as NumberField,Yg as PageBanner,ga as PageLayout,Up as PercentBarCell,rC as PlaceSearch,bt as Popover,nC as ProgressBar,aC as Prose,dC as Radio,iC as RadioCard,sC as RadioCardGroup,cC as RadioGroup,$a as RangeCalendar,Ox as RangeCell,Xi as ResultsCount,mC as RichTextEditor,Vc as SEQUENTIAL_RAMPS,hn as SKELETON_SIZES,Wd as SOURCE_UNIT_TO_WH,AI as SaveBar,qn as SearchControl,my as SearchEmptyState,gy as SearchLoadingState,hy as SearchResultGroup,xy as SearchResultItem,yy as SearchResultsList,Cy as SearchTrigger,mi as Section,id as SectionNav,Vl as SegmentedControl,Ao as Select,ic as SelectCell,tl as SideNav,fC as SiteCard,bC as SiteContactCard,Hx as SiteMetaCell,sc as SiteMetaDisplay,K as Skeleton,hC as Slider,ji as SortControl,Kp as SparklineCell,md as SplitPane,za as StackNav,Cc as StatList,pi as StaticMap,Kl as Switch,ud as Tab,dd as TabList,$v as TabPanel,cd as Tabs,wC as TextArea,PC as TextAreaWithChips,Kx as TextCell,Xr as TextField,lt as TextLink,Dl as TiledTimeSeriesChart,Xh as TiledTimeSeriesExplorer,Ol as TimeControls,EC as TimeField,MC as Timeline,LC as TimelineItem,IC as ToggleButton,ur as Tooltip,Mi as TopNav,ht as Tray,ex as UNARY_FILTER_OPERATORS,rx as UNARY_OPERATOR_LABELS,lI as UNVERIFIED_VOLTAGE_UNIT_ROWS,II as UnsavedChangesPrompt,l2 as activeDeviceStates,bn as addFilterCondition,Wm as applyDataOperations,fI as archetypeFor,kh as assembleSeries,CS as autoScaleCurrent,Pf as autoScaleDistance,Lf as autoScaleEnergy,ES as autoScalePower,MS as autoScaleResistance,VS as autoScaleVoltage,HT as baselineFromPoint,Xf as camelCaseToWords,Yf as capitalize,LS as celsiusToFahrenheit,J4 as celsiusToKelvin,P4 as centimetersToInches,Bh as classicPresetRanges,Fs as clearColorCache,oS as createCategoryColorMap,qi as createEmptyFilter,yR as createFilter,vR as createFilters,yF as createFormat,dt as createTextureIcon,ch as createTiledCameraSyncGroup,$u as createXScale,Vi as createYScale,eu as csvUnitFor,Qf as csvValueFor,ze as defaultMargin,Em as defaultMultiSelectMatcher,Fp as deltaDirectionFromValue,c2 as deviceStateLabels,DJ as deviceStateMetricFormats,Th as emptyStore,gI as entityHasDetailPage,hI as entityHasStatList,bI as entityShowsNow,FS as enumToSentenceCase,ip as exportChart,Km as exportTableAsCSV,DS as fahrenheitToCelsius,X4 as fahrenheitToKelvin,x4 as feetToMeters,C4 as feetToMiles,Qc as filterMultiSelectOptions,CR as filterToChips,yf as formatBoolean,Q5 as formatCapacity,uo as formatComponentValue,Nf as formatCurrency,Ad as formatCurrent,kf as formatDate,Rf as formatDistance,Xl as formatEmptyValue,Ud as formatEnergy,kr as formatFieldValue,Kd as formatInternationalPhone,wf as formatNumber,Cf as formatPercent,Df as formatPhone,Ra as formatPhoneNumber,jd as formatPower,Z5 as formatPowerRating,Qd as formatResistance,Hf as formatTemperature,qf as formatText,Hs as formatUSPhone,$d as formatVoltage,cx as getBadgeClasses,dx as getBooleanBadgeVariant,Ap as getCellAlignmentClasses,Se as getCellContainerClasses,vr as getCellTextClasses,vm as getColorRamp,Cm as getColorRampsByKind,nS as getContrastingTextColor,p4 as getDateParts,yi as getDefaultChartColor,Bs as getDefaultColors,Vp as getDeviceStateDisplayLabel,Vp as getDeviceStateLabel,pI as getEntityCategory,fd as getEntityConfig,dI as getEntityIcon,uI as getEntityLabel,FC as getEntityStatList,Bo as getEventColor,uP as getExportFormatName,QI as getExportHeaders,cN as getFieldGroupStyles,Zn as getFilterFields,Tx as getGridStateLabel,Ag as getInputBackgroundStyles,Vt as getInputBaseStyles,en as getInputStateStyles,Ip as getLinkClasses,jl as getNumericColorClasses,Ft as getResolvedColor,Ct as getSkeletonSize,Xse as getStateTone,Do as getThemeCategoricalColors,eo as getYFormatSettings,u2 as gridStateLabels,T4 as inchesToCentimeters,Bp as isActiveDeviceState,Bp as isActiveState,hm as isCustomPinsLayer,dP as isExportSupported,Wl as isFilterEmpty,bm as isGeoJsonLayer,df as isLightColor,ge as isNil,xm as isRasterLayer,tx as isUnaryFilterOperator,gm as isVectorLayer,AS as kelvinToCelsius,j4 as kelvinToFahrenheit,v4 as kilometersToMiles,fm as layer,Td as mapValuesToCategoricalColors,h4 as metersToFeet,S4 as metersToMiles,k4 as metersToYards,Tf as milesToFeet,y4 as milesToKilometers,w4 as milesToMeters,Mm as multiSelectSearchKeys,_c as multiSelectSelectionEntries,Xo as parseBoolean,Wp as percentThresholdLevel,Gd as pickEnergyUnit,qI as prepareTableDataForExport,Wv as registerPhosphorIcon,Qn as removeFilterCondition,pe as resolveValue,Zc as shouldOfferLiteralOption,jf as snakeCaseToWords,Fl as telemetryPresetRanges,Ff as temperatureStringToSymbol,Al as tierForViewport,y1 as tileIndexAt,xr as tileKey,Ph as tileReducer,pn as tilesForViewport,s4 as toA,pS as toActiveInactive,Os as toAmps,Jo as toBoolean,Vf as toCelsius,TS as toCentimeters,fS as toCheckmark,xS as toCompactNumber,Sf as toCurrency,kS as toCustomDateFormat,SS as toDateString,dS as toEnabledDisabled,Bf as toFahrenheit,Bd as toFeet,bS as toFloat,hS as toFormattedNumber,wS as toFullDateTime,z4 as toGW,Mf as toGWh,Xd as toGigawatts,NS as toISOString,RS as toInches,gS as toInteger,l4 as toKA,rF as toKV,V4 as toKW,Of as toKelvin,Dd as toKiloamps,Af as toKilohms,Fd as toKilometers,_d as toKilovolts,Yd as toKilowatts,Wf as toLowerCase,i4 as toMA,eF as toMV,O4 as toMW,Ef as toMWh,Jd as toMegawatts,If as toMegohms,Id as toMeters,Vd as toMiles,Ld as toMilliamps,PS as toMillimeters,qd as toMilliohms,Zd as toMillivolts,b4 as toNauticalMiles,Ws as toOhms,uS as toOnOff,vf as toPercentage,zs as toRelativeTime,yS as toScientificNotation,BS as toSecret,Uf as toSentenceCase,zf as toTemperature,Kf as toTitleCase,mS as toTrueFalse,Gf as toUpperCase,tF as toV,Ys as toVolts,B4 as toW,Gs as toWatts,zd as toWh,Od as toYards,Hd as tokWh,Ks as truncateEnd,Ea as truncateMiddle,Us as truncateStart,Nt as typeRole,po as typographyRole,Jf as ucFirst,ir as useBreakpoint,Wn as useChartContext,Un as useChartExpand,Aa as useChartHeaderMetrics,ng as useChartOwnsItsTitle,bd as useClientDataControls,Xt as useColorMode,t4 as useComponentFormatter,Tb as useContainerBreakpoint,YC as useDataControls,$o as useDebounce,Ha as useElementSize,Zo as useInfiniteScroll,pr as useInputFocus,Dc as useLocalStorage,ci as useMapStyleOverride,ar as useMediaQuery,Qv as useNotice,hd as useServerDataControls,qC as useTableExport,Ih as useTileWindow,Cp as useTiledTimeSeries,FI as useWizard,wo as wrapWithLink,N4 as yardsToMeters};//# sourceMappingURL=index.js.map
48
48
  //# sourceMappingURL=index.js.map